1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's fetch_registers and store_registers
4 ops into methods of process_target.
6 * target.h (struct process_stratum_target): Remove the target ops.
7 (class process_target): Add the target ops.
8 (fetch_inferior_registers): Update the macro.
9 (store_inferior_registers): Update the macro.
11 Update the derived classes and callers below.
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_fetch_registers): Turn into ...
15 (linux_process_target::fetch_registers): ... this.
16 (linux_store_registers): Turn into ...
17 (linux_process_target::store_registers): ... this.
18 * linux-low.h (class linux_process_target): Update.
19 * lynx-low.cc (lynx_target_ops): Update.
20 (lynx_fetch_registers): Turn into ...
21 (lynx_process_target::fetch_registers): ... this.
22 (lynx_store_registers): Turn into ...
23 (lynx_process_target::store_registers): ... this.
24 * lynx-low.h (class lynx_process_target): Update.
25 * nto-low.cc (nto_target_ops): Update.
26 (nto_fetch_registers): Turn into ...
27 (nto_process_target::fetch_registers): ... this.
28 (nto_store_registers): Turn into ...
29 (nto_process_target::store_registers): ... this.
30 * nto-low.h (class nto_process_target): Update.
31 * win32-low.cc (win32_target_ops): Update.
32 (win32_fetch_inferior_registers): Turn into ...
33 (win32_process_target::fetch_registers): ... this.
34 (win32_store_inferior_registers): Turn into ...
35 (win32_process_target::store_registers): ... this.
36 * win32-low.h (class win32_process_target): Update.
38 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
40 Turn process_stratum_target's wait op into a method of
43 * target.h (struct process_stratum_target): Remove the target op.
44 (class process_target): Add the target op.
46 Update the derived classes and callers below.
48 * target.cc (target_wait): Update.
49 * linux-low.cc (linux_target_ops): Update.
50 (linux_wait): Turn into ...
51 (linux_process_target::wait): ... this.
52 * linux-low.h (class linux_process_target): Update.
53 * lynx-low.cc (lynx_target_ops): Update.
54 (lynx_wait): Turn into ...
55 (lynx_process_target::wait): ... this.
56 * lynx-low.h (class lynx_process_target): Update.
57 * nto-low.cc (nto_target_ops): Update.
58 (nto_wait): Turn into ...
59 (nto_process_target::wait): ... this.
60 * nto-low.h (class nto_process_target): Update.
61 * win32-low.cc (win32_target_ops): Update.
62 (win32_wait): Turn into ...
63 (win32_process_target::wait): ... this.
64 (do_initial_child_stuff): Update.
65 * win32-low.h (class win32_process_target): Update.
67 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
69 Turn process_stratum_target's resume op into a method of
72 * target.h (struct process_stratum_target): Remove the target op.
73 (class process_target): Add the target op.
75 Update the derived classes and callers below.
77 * server.cc (resume): Update.
78 * target.cc (target_stop_and_wait): Update.
79 (target_continue_no_signal): Update.
80 (target_continue): Update.
81 * linux-low.cc (linux_target_ops): Update.
82 (linux_resume): Turn into ...
83 (linux_process_target::resume): ... this.
84 * linux-low.h (class linux_process_target): Update.
85 * lynx-low.cc (lynx_target_ops): Update.
86 (lynx_resume): Turn into ...
87 (lynx_process_target::resume): ... this.
88 * lynx-low.h (class lynx_process_target): Update.
89 * nto-low.cc (nto_target_ops): Update.
90 (nto_resume): Turn into ...
91 (nto_process_target::resume): ... this.
92 * nto-low.h (class nto_process_target): Update.
93 * win32-low.cc (win32_target_ops): Update.
94 (win32_resume): Turn into ...
95 (win32_process_target::resume): ... this.
96 (win32_process_target::detach): Update.
97 (do_initial_child_stuff): Update.
98 * win32-low.h (class win32_process_target): Update.
100 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
102 Turn process_stratum_target's thread_alive op into a method of
105 * target.h (struct process_stratum_target): Remove the target op.
106 (class process_target): Add the target op.
107 (mythread_alive): Update the macro.
109 Update the derived classes and callers below.
111 * linux-low.cc (linux_target_ops): Update.
112 (linux_thread_alive): Turn into ...
113 (linux_process_target::thread_alive): ... this.
114 (wait_for_sigstop): Update.
115 * linux-low.h (class linux_process_target): Update.
116 * lynx-low.cc (lynx_target_ops): Update.
117 (lynx_thread_alive): Turn into ...
118 (lynx_process_target::thread_alive): ... this.
119 * lynx-low.h (class lynx_process_target): Update.
120 * nto-low.cc (nto_target_ops): Update.
121 (nto_thread_alive): Turn into ...
122 (nto_process_target::thread_alive): ... this.
123 * nto-low.h (class nto_process_target): Update.
124 * win32-low.cc (win32_target_ops): Update.
125 (win32_thread_alive): Turn into ...
126 (win32_process_target::thread_alive): ... this.
127 * win32-low.h (class win32_process_target): Update.
129 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
131 Turn process_stratum_target's join op into a method of
134 * target.h (struct process_stratum_target): Remove the target op.
135 (class process_target): Add the target op.
136 (join_inferior): Update the macro.
138 Update the derived classes and callers below.
140 * linux-low.cc (linux_target_ops): Update.
141 (linux_join): Turn into ...
142 (linux_process_target::join): ... this.
143 * linux-low.h (class linux_process_target): Update.
144 * lynx-low.cc (lynx_target_ops): Update.
145 (lynx_join): Turn into ...
146 (lynx_process_target::join): ... this.
147 * lynx-low.h (class lynx_process_target): Update.
148 * nto-low.cc (nto_target_ops): Update.
149 (nto_process_target::join): Define.
150 * nto-low.h (class nto_process_target): Update.
151 * win32-low.cc (win32_target_ops): Update.
152 (win32_join): Turn into ...
153 (win32_process_target::join): ... this.
154 * win32-low.h (class win32_process_target): Update.
156 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
158 Turn process_stratum_target's mourn op into a method of
161 * target.h (struct process_stratum_target): Remove the target op.
162 (class process_target): Add the target op.
164 Update the derived classes and callers below.
166 * target.cc (target_mourn_inferior): Update.
167 * linux-low.cc (linux_target_ops): Update.
168 (linux_mourn): Turn into ...
169 (linux_process_target::mourn): ... this.
170 (handle_extended_wait): Update.
171 (linux_process_target::kill): Update.
172 (linux_process_target::detach): Update.
173 * linux-low.h (class linux_process_target): Update.
174 * lynx-low.cc (lynx_target_ops): Update.
175 (lynx_mourn): Turn into ...
176 (lynx_process_target::mourn): ... this.
177 * lynx-low.h (class lynx_process_target): Update.
178 * nto-low.cc (nto_target_ops): Update.
179 (nto_mourn): Turn into ...
180 (nto_process_target::mourn): ... this.
181 * nto-low.h (class nto_process_target): Update.
182 * win32-low.cc (win32_target_ops): Update.
183 (win32_mourn): Turn into ...
184 (win32_process_target::mourn): ... this.
185 * win32-low.h (class win32_process_target): Update.
187 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
189 Turn process_stratum_target's detach op into a method of
192 * target.h (struct process_stratum_target): Remove the target op.
193 (class process_target): Add the target op.
194 (detach_inferior): Update the macro.
196 Update the derived classes and callers below.
198 * linux-low.cc (linux_target_ops): Update.
199 (linux_detach): Turn into ...
200 (linux_process_target::detach): ... this.
201 * linux-low.h (class linux_process_target): Update.
202 * lynx-low.cc (lynx_target_ops): Update.
203 (lynx_detach): Turn into ...
204 (lynx_process_target::detach): ... this.
205 * lynx-low.h (class lynx_process_target): Update.
206 * nto-low.cc (nto_target_ops): Update.
207 (nto_detach): Turn into ...
208 (nto_process_target::detach): ... this.
209 * nto-low.h (class nto_process_target): Update.
210 * win32-low.cc (win32_target_ops): Update.
211 (win32_detach): Turn into ...
212 (win32_process_target::detach): ... this.
213 * win32-low.h (class win32_process_target): Update.
215 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
217 Turn process_stratum_target's kill op into a method of
220 * target.h (struct process_stratum_target): Remove the target op.
221 (class process_target): Add the target op.
223 Update the derived classes and callers below.
225 * target.cc (kill_inferior): Update.
226 * linux-low.cc (linux_target_ops): Update.
227 (linux_kill): Turn into ...
228 (linux_process_target::kill): ... this.
229 * linux-low.h (class linux_process_target): Update.
230 * lynx-low.cc (lynx_target_ops): Update.
231 (lynx_kill): Turn into ...
232 (lynx_process_target::kill): ... this.
233 * lynx-low.h (class lynx_process_target): Update.
234 * nto-low.cc (nto_target_ops): Update.
235 (nto_kill): Turn into ...
236 (nto_process_target::kill): ... this.
237 * nto-low.h (class nto_process_target): Update.
238 * win32-low.cc (win32_target_ops): Update.
239 (win32_kill): Turn into ...
240 (win32_process_target::kill): ... this.
241 * win32-low.h (class win32_process_target): Update.
243 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
245 Turn process_stratum_target's attach op into a method of
248 * target.h (struct process_stratum_target): Remove the target op.
249 (class process_target): Add the target op.
250 (myattach): Update the macro.
252 Update the derived classes and callers below.
254 * linux-low.cc (linux_target_ops): Update.
255 (linux_attach): Turn into ...
256 (linux_process_target::attach): ... this.
257 * linux-low.h (class linux_process_target): Update.
258 * lynx-low.cc (lynx_target_ops): Update.
259 (lynx_attach): Turn into ...
260 (lynx_process_target::attach): ... this.
261 * lynx-low.h (class lynx_process_target): Update.
262 * nto-low.cc (nto_target_ops): Update.
263 (nto_attach): Turn into ...
264 (nto_process_target::attach): ... this.
265 * nto-low.h (class nto_process_target): Update.
266 * win32-low.cc (win32_target_ops): Update.
267 (win32_attach): Turn into ...
268 (win32_process_target::attach): ... this.
269 * win32-low.h (class win32_process_target): Update.
271 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
273 Turn process_stratum_target's post_create_inferior op into a method
276 * target.h (struct process_stratum_target): Remove the target op.
277 (class process_target): Add the target op.
278 (target_post_create_inferior): Update the macro.
279 * target.cc (process_target::post_create_inferior): Define.
281 Update the derived classes and callers below.
283 * linux-low.cc (linux_target_ops): Update.
284 (linux_post_create_inferior): Turn into ...
285 (linux_process_target::post_create_inferior): ... this.
286 * linux-low.h (class linux_process_target): Update.
287 * lynx-low.cc (lynx_target_ops): Update.
288 * nto-low.cc (nto_target_ops): Update.
289 * win32-low.cc (win32_target_ops): Update.
291 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
293 Turn process_stratum_target's create_inferior op into a method of
296 * target.h (struct process_stratum_target): Remove the target op.
297 (class process_target): Add the target op.
298 (create_inferior): Rename the macro to ...
299 (target_create_inferior): ... this.
301 Update the derived classes and callers below.
303 * server.cc (handle_v_run): Update.
304 (captured_main): Update.
305 (process_serial_event): Update.
306 * linux-low.cc (linux_target_ops): Update.
307 (linux_create_inferior): Turn into ...
308 (linux_process_target::create_inferior): ... this.
309 * linux-low.h (class linux_process_target): Update.
310 * lynx-low.cc (lynx_target_ops): Update.
311 (lynx_create_inferior): Turn into ...
312 (lynx_process_target::create_inferior): ... this.
313 * lynx-low.h (class lynx_process_target): Update.
314 * nto-low.cc (nto_target_ops): Update.
315 (nto_create_inferior): Turn into ...
316 (nto_process_target::create_inferior): ... this.
317 * nto-low.h (class nto_process_target): Update.
318 * win32-low.cc (win32_target_ops): Update.
319 (win32_create_inferior): Turn into ...
320 (win32_process_target::create_inferior): ... this.
321 * win32-low.h (class win32_process_target): Update.
323 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
325 * target.h (class process_target): New class definition.
326 (struct process_stratum_target) <pt>: New field with type
328 * linux-low.h (class linux_process_target): Define as a derived
329 class of 'process_target'.
330 * linux-low.cc (linux_target_ops): Add a linux_process_target*
332 * lynx-low.h (class lynx_process_target): Define as a derived
333 class of 'process_target'.
334 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
336 * nto-low.h (class nto_process_target): Define as a derived
337 class of 'process_target'.
338 * nto-low.cc (nto_target_ops): Add an nto_process_target*
340 * win32-low.h (class win32_process_target): Define as a derived
341 class of 'process_target'.
342 * win32-low.cc (win32_target_ops): Add a win32_process_target*
345 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
347 * configure: Regenerate.
349 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
350 Andrew Burgess <andrew.burgess@embecosm.com>
352 * linux-riscv-low.cc: New file.
353 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
354 and nat/riscv-linux-tdesc.c.
355 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
356 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
359 2020-02-14 Tom Tromey <tom@tromey.com>
361 * acinclude.m4: Don't include acx_configure_dir.m4.
362 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
363 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
364 (all, install-only, uninstall, clean-info, clean)
365 (maintainer-clean): Don't recurse.
366 (subdir_do, all-lib): Remove.
367 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
369 (generated_files): Update.
370 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
371 * configure: Rebuild.
372 * configure.ac: Don't configure gnulib or libiberty.
375 2020-02-14 Eli Zaretskii <eliz@gnu.org>
377 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
378 preparing the command line for CreateProcess.
379 (win32_create_inferior): Reflect the program name in debugging
380 output that shows the process and its command line.
382 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
384 * Makefile.in: Rename source files from .c to .cc.
385 * %.c: Rename to %.cc.
386 * configure.ac: Rename server.c to server.cc.
387 * configure: Re-generate.
389 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
391 * Makefile.in: Rename gdbsupport source files from .c to .cc.
393 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
395 * win32-low.c (win32_create_inferior): Set signal_pid.
397 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
398 Pedro Alves <palves@redhat.com>
400 Skip building gdbserver in a cross-configuration.
401 * configure.srv: Set $gdbserver_host depending on whether $target
402 is $host. Use $gdbserver_host instead of $host.
404 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
406 * configure: Re-generate.
408 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
410 * configure: Re-generate.
412 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
414 * acinclude.m4: Update warning.m4 path.
416 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
418 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
419 (handle_exception): Set siginfo_er.
420 (win32_xfer_siginfo): New function.
422 2020-02-07 Tom Tromey <tom@tromey.com>
423 Pedro Alves <palves@redhat.com>
425 * README: Update build documentation.
426 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
428 * configure.ac: Update paths.
429 * configure: Rebuild.
430 * acinclude.m4: Update paths.
431 * Makefile.in: Update include paths.
432 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
433 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
434 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
435 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
436 (%-generated.c): Update paths.
437 * Move entire directory from ../gdb/gdbserver.
439 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
441 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
443 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
445 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
446 assignment instead of srv_linux_obj.
448 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
450 * server.c (handle_qxfer_libraries): Write segment-address with
453 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
455 * Makefile.in (install-strip): New target.
456 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
457 * aclocal.m4: Regenerate.
458 * configure: Regenerate.
459 * configure.ac: Add AM_PROG_INSTALL_STRIP.
461 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
463 * Makefile.in (SFILES): Adjust paths to point to real files.
464 (OBS): Move waitstatus.o to target/waitstatus.o.
465 (TAGS): Transform paths appropriately.
467 (nat/%.o): ... this pattern rule.
469 (target/%.o): ... this pattern rule.
470 * configure.srv: Adjust paths throughout to include nat/ prefix
471 with the revant files.
472 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
473 * configure: Regenerate.
475 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
477 * Makefile.in (TAGS): Remove config files from the recipe.
479 2020-01-14 Tom Tromey <tom@tromey.com>
481 * configure: Rebuild.
482 * configure.ac: Remove any checks that were added to common.m4.
483 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
486 2020-01-14 Tom Tromey <tom@tromey.com>
488 * server.h: Include config.h.
489 * gdbreplay.c: Include config.h.
490 * configure: Rebuild.
491 * configure.ac: Don't source common.host.
492 * acinclude.m4: Update path.
493 * Makefile.in (INCSUPPORT): New variable.
494 (INCLUDE_CFLAGS): Add INCSUPPORT.
495 (SFILES): Update paths.
496 (version-generated.c): Update path to create-version.sh.
497 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
499 2020-01-14 Tom Tromey <tom@tromey.com>
501 * configure.ac (LIBS): Use WIN32APILIBS.
502 (USE_WIN32API): Don't define.
503 * configure: Rebuild.
505 2020-01-14 Tom Tromey <tom@tromey.com>
507 * configure: Rebuild.
509 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
511 * Makefile.in (%-generated.c): Remove rule for files from
514 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
516 * configure: Re-generate.
518 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
520 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
522 * tracepoint.c (stop_tracing, flush_trace_buffer,
523 about_to_request_buffer_space, get_trace_state_variable_value,
524 set_trace_state_variable_value, gdb_collect): Add declaration.
526 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
528 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
529 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
530 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
531 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
532 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
535 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
537 * inferiors.c: Include gdbsupport/common-inferior.h.
539 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
541 * hostio-errno.c: Include hostio.h.
543 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
545 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
548 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
550 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
551 * linux-arm-tdesc.h: Include arch/arm.h.
553 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
555 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
557 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
559 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
560 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
562 2020-01-10 Pedro Alves <palves@redhat.com>
564 * fork-child.c (post_fork_inferior): Pass target down to
566 * inferiors.c (switch_to_thread): Add process_stratum_target
568 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
569 * nto-low.c (nto_target_ops): Now a process_stratum_target.
570 * linux-low.c (linux_target_ops): Now a process_stratum_target.
571 * remote-utils.c (prepare_resume_reply): Pass the target to
573 * target.c (the_target): Now a process_stratum_target.
574 (done_accessing_memory): Pass the target to switch_to_thread.
575 (set_target_ops): Ajust to use process_stratum_target.
576 * target.h (struct target_ops): Rename to ...
577 (struct process_stratum_target): ... this.
578 (the_target, set_target_ops): Adjust.
579 (prepare_to_access_memory): Adjust comment.
580 * win32-low.c (child_xfer_memory): Adjust to use
581 process_stratum_target.
582 (win32_target_ops): Now a process_stratum_target.
584 2020-01-06 Eli Zaretskii <eliz@gnu.org>
585 Pedro Alves <palves@redhat.com>
587 * win32-low.c (get_child_debug_event): Extract the fatal exception
588 from the exit status and convert to the equivalent Posix signal
590 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
591 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
593 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
595 * Makefile.in: Use INSTALL_PROGRAM_ENV.
597 2020-01-01 Joel Brobecker <brobecker@adacore.com>
599 * server.c (gdbserver_version): Change copyright year to 2020.
600 * gdbreplay.c (gdbreplay_version): Likewise.
602 2019-12-19 Christian Biesinger <cbiesinger@google.com>
604 * configure: Regenerate.
605 * configure.ac: Quote variable arguments of test.
607 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
609 * Makefile.in: Fix build with GNU Make 3.81
611 2019-12-16 Tom Tromey <tromey@adacore.com>
613 * server.c (get_exec_file): Constify result.
615 2019-12-10 Christian Biesinger <cbiesinger@google.com>
617 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
618 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
619 * config.in: Regenerate.
620 * configure: Regenerate.
621 * configure.ac: Don't check for strerror.
622 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
623 Call safe_strerror instead of strerror.
624 * server.h (strerror): Remove this now-unnecessary declaration.
625 * tracepoint.c (init_named_socket): Call safe_strerror instead of
627 (gdb_agent_helper_thread): Likewise.
628 * utils.c (perror_with_name): Likewise.
630 2019-11-26 Tom Tromey <tom@tromey.com>
632 * configure, config.in: Rebuild.
634 2019-11-26 Tom Tromey <tom@tromey.com>
636 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
637 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
639 * configure, config.in: Rebuild.
641 2019-11-26 Tom Tromey <tom@tromey.com>
643 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
644 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
645 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
646 * acinclude.m4: Include ax_pthread.m4.
647 * config.in, configure: Rebuild.
649 2019-11-26 Christian Biesinger <cbiesinger@google.com>
651 * debug.c (debug_set_output): Call safe_strerror instead of
653 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
654 (linux_kill_one_lwp): Likewise.
655 (linux_detach_one_lwp): Likewise.
656 (linux_wait_for_event_filtered): Likewise.
657 (store_register): Likewise.
658 * lynx-low.c (lynx_attach): Likewise.
659 * mem-break.c (insert_memory_breakpoint): Likewise.
660 (remove_memory_breakpoint): Likewise.
661 (delete_fast_tracepoint_jump): Likewise.
662 (set_fast_tracepoint_jump): Likewise.
663 (uninsert_fast_tracepoint_jumps_at): Likewise.
664 (reinsert_fast_tracepoint_jumps_at): Likewise.
665 * nto-low.c (nto_xfer_memory): Likewise.
666 (nto_resume): Likewise.
668 2019-11-20 Luis Machado <luis.machado@linaro.org>
670 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
671 instead of register count.
672 * tdesc.c (tdesc_contains_feature): New function.
673 * tdesc.h (tdesc_contains_feature): New prototype.
675 2019-11-15 Christian Biesinger <cbiesinger@google.com>
677 * Makefile.in: Add safe-strerror.c.
678 * configure: Regenerate.
679 * configure.ac: Don't source common.host.
681 2019-11-15 Christian Biesinger <cbiesinger@google.com>
683 * config.in: Regenerate.
684 * configure: Regenerate.
686 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
688 * ax.c (ax_printf): Handle size_t_arg.
690 2019-11-06 Christian Biesinger <cbiesinger@google.com>
692 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
693 * mi/mi-main.c (output_cores): Likewise.
694 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
695 (linux_xfer_osdata_modules): Likewise.
696 * remote.c (register_remote_support_xml): Likewise.
697 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
698 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
700 2019-11-01 Christian Biesinger <cbiesinger@google.com>
702 * configure: Regenerate.
703 * configure.ac: Remove check for strerror_r.
705 2019-10-31 Christian Biesinger <cbiesinger@google.com>
707 * config.in: Regenerate.
708 * configure: Regenerate.
709 * configure.ac: Also check for strerror_r.
711 2019-10-31 Christian Biesinger <cbiesinger@google.com>
713 * ax.h (debug_agent): Remove duplicate declaration.
715 2019-10-26 Tom de Vries <tdevries@suse.de>
717 * linux-aarch64-low.c: Fix typos in comments.
718 * linux-arm-low.c: Same.
720 * linux-ppc-low.c: Same.
721 * proc-service.c: Same.
724 * tracepoint.c: Same.
727 2019-10-25 Tom Tromey <tromey@adacore.com>
729 * utils.c (xstrdup): Remove.
731 2019-10-23 Tom Tromey <tom@tromey.com>
733 * configure, config.in: Rebuild.
735 2019-10-23 Tom Tromey <tom@tromey.com>
737 * configure: Rebuild.
738 * acinclude.m4: Use m4_include, not sinclude.
740 2019-10-17 Tom Tromey <tromey@adacore.com>
742 * configure: Rebuild.
743 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
744 in AC_CONFIG_FILES invocation.
745 * Makefile.in (stamp-h, Makefile): Use new-style config.status
748 2019-10-16 Christian Biesinger <cbiesinger@google.com>
750 * server.c: Include xml-builtin.h.
751 (get_xml_features): Don't declare xml_builtins here.
753 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
755 * Makefile.in: Remove references to vec-ipa.o.
757 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
759 * Makefile.in: Remove references to vec.c.
761 2019-10-02 Christian Biesinger <cbiesinger@google.com>
763 * server.c (server_waiting): Change to bool.
764 (extended_protocol): Likewise.
765 (response_needed): Likewise.
766 (exit_requested): Likewise.
767 (run_once): Likewise.
768 (report_no_resumed): Likewise.
769 (non_stop): Likewise.
770 (disable_packet_vCont): Likewise.
771 (disable_packet_Tthread): Likewise.
772 (disable_packet_qC): Likewise.
773 (disable_packet_qfThreadInfo): Likewise.
774 (handle_general_set): Update.
775 (handle_detach): Update.
776 (handle_monitor_command): Update.
777 (handle_query): Update.
778 (captured_main): Update.
779 (process_serial_event): Update.
780 * server.h (server_waiting): Change to bool.
781 (disable_packet_vCont): Likewise.
782 (disable_packet_Tthread): Likewise.
783 (disable_packet_qC): Likewise.
784 (disable_packet_qfThreadInfo): Likewise.
785 (run_once): Likewise.
786 (non_stop): Likewise.
787 * target.c (target_stop_and_wait): Update.
789 2019-10-02 Tom Tromey <tromey@adacore.com>
791 * Makefile.in (SFILES): Add common-inferior.c.
792 (OBS): Add common-inferior.o.
793 * server.c (startup_with_shell): Don't define.
795 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
797 * linux-low.c (linux_low_read_btrace): Update for change to
800 2019-09-20 Christian Biesinger <cbiesinger@google.com>
802 * debug.c (debug_threads): Remove comment in favor of the header.
803 * debug.h (using_threads): Add declaration.
804 (debug_threads): Add comment.
805 * linux-aarch64-low.c: Include debug.h and remove declaration of
807 * nto-low.c: Likewise.
808 * remote-utils.c: Likewise.
809 * thread-db.c: Likewise.
811 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
813 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
814 and powerpc-cell64l-ipa.o.
815 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
816 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
817 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
820 * spu-low.c: Remove file.
822 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
823 (parse_spufs_run): Remove.
824 (ppc_get_pc): Remove Cell/B.E. support.
825 (ppc_set_pc): Likewise.
826 (ppc_breakpoint_at): Likewise.
827 (ppc_arch_setup): Likewise.
828 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
829 tdesc_powerpc_cell32l.
830 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
831 or init_registers_powerpc_cell32l.
832 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
833 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
834 or init_registers_powerpc_cell32l.
835 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
836 (init_registers_powerpc_cell32l): Remove prototype.
837 (init_registers_powerpc_cell64l): Likewise.
839 * target.h (struct target_ops): Remove qxfer_spu member.
840 * server.c (handle_qxfer_spu): Remove.
841 (qxfer_packets): Remove entry for "spu".
842 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
843 * linux-low.c (SPUFS_MAGIC): Remove.
844 (spu_enumerate_spu_ids): Remove.
845 (linux_qxfer_spu): Remove.
846 (linux_target_ops): Remove qxfer_spu member.
847 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
848 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
849 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
851 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
853 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
854 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
855 * config.in: Regenerate.
856 * configure: Regenerate.
858 2019-08-15 Tom Tromey <tromey@adacore.com>
860 * target.c (target_write_memory): Use gdb::byte_vector.
862 2019-08-15 Tom Tromey <tromey@adacore.com>
864 * tracepoint.c (write_inferior_data_pointer)
865 (write_inferior_integer, write_inferior_int8)
866 (write_inferior_uinteger, m_tracepoint_action_download)
867 (r_tracepoint_action_download, x_tracepoint_action_download)
868 (l_tracepoint_action_download, clear_inferior_trace_buffer)
869 (download_agent_expr, download_tracepoint_1)
870 (download_trace_state_variables, upload_fast_traceframes): Update.
871 * server.c (gdb_write_memory): Update.
872 * remote-utils.c (relocate_instruction): Update.
873 * proc-service.c (ps_pdwrite): Update.
874 * mem-break.c (remove_memory_breakpoint)
875 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
876 (uninsert_fast_tracepoint_jumps_at)
877 (reinsert_fast_tracepoint_jumps_at): Update.
878 * linux-x86-low.c (append_insns)
879 (i386_install_fast_tracepoint_jump_pad)
880 (amd64_write_goto_address, i386_write_goto_address): Update.
881 * linux-s390-low.c (append_insns, s390_write_goto_address):
883 * linux-ppc-low.c (ppc_relocate_instruction)
884 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
885 (ppc_write_goto_address): Update.
886 * linux-aarch64-low.c (append_insns): Update.
887 * target.h (struct target_ops): Update.
888 (write_inferior_memory): Don't declare.
889 * target.c (target_write_memory): Rename from
890 write_inferior_memory. Remove old target_write_memory.
892 2019-08-15 Tom Tromey <tromey@adacore.com>
894 * target.c (write_inferior_memory): Use std::vector.
896 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
899 * configure.ac: Drop enable-libmcheck support.
900 * configure, config.in: Rebuild.
901 * acinclude.m4: Don't include it.
903 2019-07-19 Alan Hayward <alan.hayward@arm.com>
905 * configure.srv: Remove Arm xml files.
907 2019-07-19 Alan Hayward <alan.hayward@arm.com>
909 * configure.srv: Add new files. Remove xml generated files.
910 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
912 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
913 * linux-aarch32-tdesc.c: New file.
914 * linux-aarch32-tdesc.h: New file.
915 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
916 * linux-arm-low.c (init_registers_arm, tdesc_arm)
917 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
918 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
919 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
920 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
921 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
922 (arm_read_description): Call arm_linux_read_description.
923 (initialize_low_arch): Don't init registers.
924 * linux-arm-tdesc.c: New file.
925 * linux-arm-tdesc.h: New file.
927 2019-07-10 Alan Hayward <alan.hayward@arm.com>
929 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
930 Move counter inside for.
931 (arm_read_description): Check ptrace earlier.
932 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
934 2019-07-09 Tom Tromey <tom@tromey.com>
936 * configure: Rebuild.
937 * configure.ac: Change common to gdbsupport.
938 * acinclude.m4: Change common to gdbsupport.
939 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
940 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
941 common to gdbsupport.
942 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
943 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
944 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
945 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
946 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
947 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
948 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
949 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
950 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
951 common to gdbsupport.
953 2019-07-04 Alan Hayward <alan.hayward@arm.com>
955 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
957 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
959 2019-07-04 Alan Hayward <alan.hayward@arm.com>
961 * configure.srv: Remove legacy xml.
962 * linux-aarch64-low.c (initialize_low_arch): Remove
963 initialize_low_tdesc call.
964 * linux-aarch64-tdesc-selftest.c: Remove file.
965 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
966 * linux-x86-low.c (initialize_low_arch): Remove
967 initialize_low_tdesc call.
968 * linux-x86-tdesc-selftest.c: Remove file.
969 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
971 2019-06-20 Tom de Vries <tdevries@suse.de>
973 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
974 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
976 2019-06-19 Tom de Vries <tdevries@suse.de>
978 * debug.h (debug_write): Change return type to ssize_t.
979 * debug.c (debug_write): Same.
981 2019-06-14 Tom Tromey <tom@tromey.com>
983 * configure.ac: Use new path to gnulib.
984 * configure: Rebuild.
985 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
988 2019-06-11 Tom Tromey <tom@tromey.com>
990 * Makefile.in (SFILES): Add alloc.c.
992 (IPA_OBJS): Add alloc-ipa.o.
993 (alloc-ipa.o): New target.
994 (%.o: ../%.c): New pattern rule.
996 2019-06-10 Tom Tromey <tromey@adacore.com>
998 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
999 end warning with a newline.
1000 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1002 * thread-db.c (attach_thread): Don't end warning with a newline.
1003 (thread_db_notice_clone): Likewise.
1004 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1006 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1007 end warning with a newline.
1009 2019-06-04 Pedro Alves <palves@redhat.com>
1011 * server.c (captured_main): Use make_unique_xstrdup.
1013 2019-06-02 Tom Tromey <tom@tromey.com>
1015 * gdbreplay.c (fromhex): Remove.
1016 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1018 2019-05-29 Tom Tromey <tromey@adacore.com>
1020 * configure: Rebuild.
1022 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1024 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1025 sign extension code on 32-bit builds.
1027 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1030 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1032 2019-04-19 Tom Tromey <tom@tromey.com>
1034 * server.c (struct vstop_notif): Derive from notif_event.
1036 (queue_stop_reply): Update.
1037 (remove_all_on_match_ptid): Change type. Rewrite.
1038 (discard_queued_stop_replies): Rewrite.
1039 (in_queued_stop_replies_ptid): Change type.
1040 (in_queued_stop_replies): Rewrite.
1041 (notif_stop): Update.
1042 (queue_stop_reply_callback): Update.
1043 (captured_main): Don't call initialize_notif.
1044 (push_stop_notification): Update.
1045 * notif.c (notif_write_event, handle_notif_ack)
1046 (notif_event_enque, notif_push): Update.
1047 (notif_event_xfree, initialize_notif): Remove.
1048 * notif.h (struct notif_event): Include <list>, not
1050 (struct notif_server) <queue>: Now a std::list.
1051 (notif_event_p): Remove typedef.
1052 (initialize_notif): Don't declare.
1053 (struct notif_event): Add virtual destructor.
1055 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1057 * ax.c (ax_vdebug): Call debug_printf.
1058 * debug.c (debug_write): New function.
1059 * debug.h (debug_write): New declaration.
1060 * linux-low.c (sigchld_handler): Call debug_write.
1062 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1064 * debug.c (debug_set_output): New function.
1065 (debug_vprintf): Send output to debug_file.
1066 (debug_flush): Likewise.
1067 * debug.h (debug_set_output): New declaration.
1068 * server.c (handle_monitor_command): Add debug-file option.
1069 (captured_main): Likewise.
1071 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1073 * debug.c (remote_debug): Add definition.
1074 * debug.h (remote_debug): Add declaration.
1075 * hostio.c (remote_debug): Remove declaration.
1076 * remote-utils.c (struct ui_file): Likewise.
1077 (remote_debug): Likewise.
1078 * remote-utils.h (remote_debug): Likewise,
1079 * server.c (remote_debug): Remove definition.
1081 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1083 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1084 when using a 64-bit gdbserver.
1086 2019-04-09 Tom Tromey <tromey@adacore.com>
1088 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1090 2019-04-08 Tom Tromey <tom@tromey.com>
1092 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1094 (linux_resume_one_lwp): Likewise.
1096 2019-04-08 Tom Tromey <tom@tromey.com>
1098 * gdbreplay.c: Update.
1099 * linux-low.c: Update.
1102 2019-04-08 Tom Tromey <tom@tromey.com>
1104 * server.c: Use C++ exception handling.
1105 * linux-low.c: Use C++ exception handling.
1106 * gdbreplay.c: Use C++ exception handling.
1108 2019-04-08 Tom Tromey <tom@tromey.com>
1110 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1111 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1112 (captured_main, main): Update.
1113 * gdbreplay.c (main): Update.
1115 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1117 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1118 value in argument pointer, return 1 if the entry is found and 0
1119 otherwise. Move comment.
1120 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1121 * linux-low.h (linux_get_auxv): Declare.
1122 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1124 2019-04-05 Tom Tromey <tromey@adacore.com>
1126 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1129 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1131 * linux-low.c (AT_HWCAP2): Add define if not already included.
1133 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1135 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1136 (aarch64_arch_setup): Call linux_get_hwcap.
1137 * linux-arm-low.c (arm_get_hwcap): Remove function.
1138 (arm_read_description): Call linux_get_hwcap.
1139 * linux-low.c (linux_get_auxv): New function.
1140 (linux_get_hwcap): Likewise.
1141 (linux_get_hwcap2): Likewise.
1142 * linux-low.h (linux_get_hwcap): New declaration.
1143 (linux_get_hwcap2): Likewise.
1144 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1145 (ppc_arch_setup): Call linux_get_hwcap.
1146 * linux-s390-low.c (s390_get_hwcap): Remove function.
1147 (s390_arch_setup): Call linux_get_hwcap.
1149 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1150 Jiong Wang <jiong.wang@arm.com>
1152 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1153 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1155 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1157 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1158 Jiong Wang <jiong.wang@arm.com>
1160 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1161 (aarch64_get_hwcap): New function.
1162 (aarch64_arch_setup): Read APIA hwcap.
1164 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1165 Jiong Wang <jiong.wang@arm.com>
1167 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1168 (initialize_low_tracepoint): Likewise.
1169 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1170 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1171 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1172 (aarch64_linux_read_description): Likewise.
1173 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1175 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1177 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1178 i386_create_target_description for 'segments' parameter.
1179 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1180 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1181 * win32-i386-low.c (i386_arch_setup): Likewise.
1183 2019-03-12 Tom Tromey <tromey@adacore.com>
1185 * linux-low.c (iterate_over_lwps): Update.
1187 2019-03-06 Tom Tromey <tom@tromey.com>
1189 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1190 (captured_main): Use SCOPE_EXIT.
1192 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1194 * configure.srv: Use '$enable_unittest' instead of '$development'
1195 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1198 2019-02-27 Tom Tromey <tromey@adacore.com>
1200 * gdbreplay.c (logchar): Handle \r\n.
1202 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1204 * linux-low.c (linux_attach): Add process before lwp.
1205 * server.c (attach_inferior): Check if already attached.
1207 2019-02-07 Tom Tromey <tom@tromey.com>
1209 * x86-tdesc.h: Rename include guard.
1210 * x86-low.h: Add include guard.
1211 * wincecompat.h: Rename include guard.
1212 * win32-low.h: Add include guard.
1213 * utils.h: Rename include guard.
1214 * tracepoint.h: Rename include guard.
1215 * tdesc.h: Rename include guard.
1216 * target.h: Rename include guard.
1217 * server.h: Rename include guard.
1218 * remote-utils.h: Rename include guard.
1219 * regcache.h: Rename include guard.
1220 * nto-low.h: Rename include guard.
1221 * notif.h: Add include guard.
1222 * mem-break.h: Rename include guard.
1223 * lynx-low.h: Add include guard.
1224 * linux-x86-tdesc.h: Add include guard.
1225 * linux-s390-tdesc.h: Add include guard.
1226 * linux-ppc-tdesc-init.h: Add include guard.
1227 * linux-low.h: Add include guard.
1228 * linux-aarch64-tdesc.h: Add include guard.
1229 * linux-aarch32-low.h: Add include guard.
1230 * inferiors.h: Rename include guard.
1231 * i387-fp.h: Rename include guard.
1232 * hostio.h: Rename include guard.
1233 * gdbthread.h: Rename include guard.
1234 * gdb_proc_service.h: Rename include guard.
1235 * event-loop.h: Rename include guard.
1236 * dll.h: Rename include guard.
1237 * debug.h: Rename include guard.
1238 * ax.h: Rename include guard.
1240 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1243 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1244 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1246 2019-01-25 Tom Tromey <tom@tromey.com>
1248 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1250 2019-01-25 Tom Tromey <tom@tromey.com>
1252 * win32-low.c: Fix common/ includes.
1253 * win32-i386-low.c: Fix common/ includes.
1254 * tracepoint.c: Fix common/ includes.
1255 * thread-db.c: Fix common/ includes.
1256 * target.h: Fix common/ includes.
1257 * symbol.c: Fix common/ includes.
1258 * spu-low.c: Fix common/ includes.
1259 * server.h: Fix common/ includes.
1260 * server.c: Fix common/ includes.
1261 * remote-utils.c: Fix common/ includes.
1262 * regcache.h: Fix common/ includes.
1263 * regcache.c: Fix common/ includes.
1264 * nto-x86-low.c: Fix common/ includes.
1265 * notif.h: Fix common/ includes.
1266 * mem-break.h: Fix common/ includes.
1267 * lynx-low.c: Fix common/ includes.
1268 * lynx-i386-low.c: Fix common/ includes.
1269 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1270 * linux-x86-low.c: Fix common/ includes.
1271 * linux-low.c: Fix common/ includes.
1272 * inferiors.h: Fix common/ includes.
1273 * i387-fp.c: Fix common/ includes.
1274 * hostio.c: Fix common/ includes.
1275 * hostio-errno.c: Fix common/ includes.
1276 * gdbthread.h: Fix common/ includes.
1277 * gdbreplay.c: Fix common/ includes.
1278 * fork-child.c: Fix common/ includes.
1279 * event-loop.c: Fix common/ includes.
1281 (enum gdb_agent_op): Fix common/ includes.
1283 2019-01-21 Tom Tromey <tom@tromey.com>
1285 * tracepoint.c: Fix includes.
1286 * remote-utils.c: Fix includes.
1287 * linux-x86-low.c: Fix includes.
1289 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1291 * gdbreplay.c (gdbreplay_version): Update copyright year in
1293 * server.c (gdbserver_version): Likewise.
1295 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1297 * linux-low.c (add_lwp): Switch ordering.
1299 2018-11-29 Tom Tromey <tom@tromey.com>
1301 * win32-low.c (win32_join): Take pid, not process.
1302 * target.h (struct target_ops) <join>: Change argument type.
1303 (join_inferior): Change argument name.
1304 * spu-low.c (spu_join): Take pid, not process.
1305 * server.c (handle_detach): Preserve pid before destroying
1307 * lynx-low.c (lynx_join): Take pid, not process.
1308 * linux-low.c (linux_join): Take pid, not process.
1310 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1312 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1313 (aarch64_cannot_fetch_register): Likewise.
1314 (struct linux_target_ops): Update references.
1316 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1318 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1320 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1322 * configure.srv (ipa_ppc_linux_regobj): Add
1323 powerpc-isa207-htm-vsx32l-ipa.o and
1324 powerpc-isa207-htm-vsx64l-ipa.o.
1325 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1326 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1327 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1328 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1329 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1330 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1331 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1332 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1333 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1334 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1335 (init_registers_powerpc_isa207_htm_vsx32l)
1336 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1337 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1338 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1339 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1340 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1341 (ppc_store_tm_ctarregset): New functions.
1342 (ppc_regsets): Add entries for HTM regsets.
1343 (ppc_arch_setup): Set htm in features struct when needed. Set
1344 sizes for the HTM regsets.
1345 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1346 (initialize_low_arch): Call
1347 init_registers_powerpc_isa207_htm_vsx32l and
1348 init_registers_powerpc_isa207_htm_vsx64l.
1349 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1350 PPC_TDESC_ISA207_HTM_VSX.
1351 (initialize_low_tracepoint): Call
1352 init_registers_powerpc_isa207_htm_vsx32l and
1353 init_registers_powerpc_isa207_htm_vsx64l.
1355 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1357 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1358 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1359 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1360 (ppc_store_pmuregset): New functions.
1361 (ppc_regsets): Add entries for ebb and pmu regsets.
1362 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1363 pmu regsets are available. Set sizes for these regsets.
1365 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1367 * configure.srv (ipa_ppc_linux_regobj): Add
1368 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1369 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1370 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1371 rs6000/powerpc-isa207-vsx32l.xml, and
1372 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1373 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1374 <PPC_TDESC_ISA207_VSX>: New enum value.
1375 (init_registers_powerpc_isa207_vsx32l): Declare.
1376 (init_registers_powerpc_isa207_vsx64l): Declare.
1377 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1378 (ppc_store_tarregset): New function.
1379 (ppc_regsets): Add entry for the TAR regset.
1380 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1381 size for the TAR regsets.
1382 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1383 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1384 and init_registers_powerpc_isa207_vsx64l.
1385 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1386 (initialize_low_tracepoint): Call
1387 init_registers_powerpc_isa207_vsx32l and
1388 init_registers_powerpc_isa207_vsx64l.
1390 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1391 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1393 * configure.srv (ipa_ppc_linux_regobj): Add
1394 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1395 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1396 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1397 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1398 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1399 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1400 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1401 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1402 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1403 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1404 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1405 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1406 (ppc_hwcap): Add comment.
1407 (ppc_hwcap2): New global.
1408 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1409 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1410 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1411 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1412 when needed. Set sizes for the the DSCR and PPR regsets.
1413 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1414 (initialize_low_arch): Call
1415 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1416 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1417 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1418 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1419 (initialize_low_tracepoint): Call
1420 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1421 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1423 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1425 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1427 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1428 Simon Marchi <simark@simark.ca>
1430 * acinclude.m4: Include "../selftest.m4".
1431 * configure: Regenerate.
1432 * configure.ac: Use "GDB_AC_SELFTEST".
1433 * configure.srv: Use "$enable_unittests" instead of
1434 "$development" when checking whether unit tests have been
1436 * server.c (captured_main): Update message informing that
1437 selftests have been disabled.
1439 2018-10-04 Tom Tromey <tom@tromey.com>
1441 * configure: Rebuild.
1443 2018-10-04 Tom Tromey <tom@tromey.com>
1445 * server.c (handle_status): Rename inner "thread".
1446 (process_serial_event): Declare "res" in 'm' case.
1447 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1448 (iterate_over_lwps): Rename inner "thread".
1449 (linux_qxfer_libraries_svr4): Rename inner "len".
1450 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1452 2018-10-01 Gary Benson <gbenson@redhat.com>
1454 * gdb_proc_service.h: Moved common code to
1455 common/gdb_proc_service.h.
1457 2018-10-01 Gary Benson <gbenson@redhat.com>
1459 * gdb_proc_service.h: Synchronize comments and whitespace with
1460 GDB's version of this file.
1462 2018-09-25 Tom Tromey <tom@tromey.com>
1464 * configure: Rebuild.
1465 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1467 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1469 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1470 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1471 ($(IPA_LIB)): Sort IPA_OBJS.
1473 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1475 * Makefile.in: Remove references to $(ADD_DEPS).
1477 2018-09-16 Tom Tromey <tom@tromey.com>
1479 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1481 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1484 2018-09-05 Tom Tromey <tom@tromey.com>
1486 * configure: Rebuild.
1488 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1491 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1493 2018-08-27 Tom Tromey <tom@tromey.com>
1496 * configure: Rebuild.
1498 2018-08-27 Tom Tromey <tom@tromey.com>
1500 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1501 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1502 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1503 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1504 (s390x_emit_stack_adjust): Add casts to unsigned char.
1506 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1510 * server.h (struct client_state) <disable_randomization>:
1513 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1515 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1517 (mips_supply_ptrace_register): Likewise.
1519 2018-07-22 Tom Tromey <tom@tromey.com>
1521 * configure: Rebuild.
1523 2018-07-22 Tom Tromey <tom@tromey.com>
1525 * win32-low.c (win32_create_inferior): Remove unused variables.
1526 * gdbreplay.c (remote_open): Remove unused variable.
1527 * remote-utils.c (remote_prepare): Remove unused variable.
1528 * x86-tdesc.h (X86_TDESC_H): Define.
1529 (amd64_expedite_regs): Define conditionally.
1530 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1531 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1532 * remote-utils.c (readchar): Remove unused variable.
1534 2018-07-13 Pedro Alves <palves@redhat.com>
1536 * linux-low.c (linux_kill): Change parameter to process_info
1537 pointer instead of pid. Adjust.
1538 * lynx-low.c (lynx_kill): Likewise.
1539 * nto-low.c (nto_kill): Likewise.
1540 * spu-low.c (spu_kill): Likewise.
1541 * win32-low.c (win32_kill): Likewise.
1542 * server.c (handle_v_kill, kill_inferior_callback)
1543 (detach_or_kill_for_exit): Adjust.
1544 * target.c (kill_inferior): Change parameter to process_info
1545 pointer instead of pid. Adjust.
1546 * target.h (struct target_ops) <kill>: Change parameter to
1547 process_info pointer instead of pid. Adjust all implementations
1549 (kill_inferior): Likewise.
1551 2018-07-13 Pedro Alves <palves@redhat.com>
1553 * linux-low.c (linux_detach, linux_join): Change parameter to
1554 process_info pointer instead of pid. Adjust.
1555 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1556 * nto-low.c (nto_detach): Likewise.
1557 * spu-low.c (spu_detach, spu_join): Likewise.
1558 * win32-low.c (win32_detach, win32_join): Likewise.
1559 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1560 * target.h (struct target_ops) <detach, join>: Change parameter to
1561 process_info pointer instead of pid. Adjust all implementations
1563 (detach_inferior, join_inferior): Rename 'pid' parameter to
1566 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1567 Jan Kratochvil <jan.kratochvil@redhat.com>
1568 Paul Fertser <fercerpav@gmail.com>
1569 Tsutomu Seki <sekiriki@gmail.com>
1571 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1572 (OBS): Add 'common/netstuff.o'.
1573 (GDBREPLAY_OBS): Likewise.
1574 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1575 (remote_open): Implement support for IPv6
1577 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1579 (handle_accept_event): Accept connections from IPv6 sources.
1580 (remote_prepare): Handle IPv6-style hostnames; implement
1581 support for IPv6 connections.
1582 (remote_open): Implement support for printing connections from
1585 2018-07-11 Pedro Alves <palves@redhat.com>
1588 * mem-break.c (any_persistent_commands): Add process_info
1589 parameter and use it instead of relying on the current process.
1590 Change return type to bool.
1591 * mem-break.h (any_persistent_commands): Add process_info
1592 parameter and change return type to bool.
1593 * server.c (handle_detach): Remove require_running_or_return call.
1594 Look up the process_info for the process we're about to detach.
1595 If not found, return back error to GDB. Adjust
1596 any_persistent_commands call to pass down a process pointer.
1598 2018-07-11 Pedro Alves <palves@redhat.com>
1600 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1601 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1602 instead of collect_register_by_name.
1603 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1604 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1606 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1607 Pedro Alves <palves@redhat.com>
1609 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1611 2018-07-03 Tom Tromey <tom@tromey.com>
1613 * linux-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 * win32-low.c: Update.
1623 2018-07-03 Tom Tromey <tom@tromey.com>
1627 2018-07-03 Tom Tromey <tom@tromey.com>
1629 * linux-low.c: Update.
1631 2018-07-03 Tom Tromey <tom@tromey.com>
1635 2018-07-03 Tom Tromey <tom@tromey.com>
1637 * linux-low.c: Update.
1638 * linux-mips-low.c: Update.
1639 * lynx-low.c: Update.
1640 * nto-low.c: Update.
1641 * remote-utils.c: Update.
1643 * spu-low.c: Update.
1645 * thread-db.c: Update.
1647 2018-07-03 Tom Tromey <tom@tromey.com>
1649 * linux-low.c: Update.
1650 * linux-mips-low.c: Update.
1651 * lynx-low.c: Update.
1652 * mem-break.c: Update.
1653 * nto-low.c: Update.
1654 * remote-utils.c: Update.
1656 * spu-low.c: Update.
1658 * tracepoint.c: Update.
1660 2018-07-03 Tom Tromey <tom@tromey.com>
1662 * linux-low.c: Update.
1663 * linux-ppc-low.c: Update.
1664 * linux-x86-low.c: Update.
1665 * proc-service.c: Update.
1667 * spu-low.c: Update.
1668 * thread-db.c: Update.
1669 * win32-low.c: Update.
1671 2018-07-03 Tom Tromey <tom@tromey.com>
1673 * linux-low.c: Update.
1674 * lynx-low.c: Update.
1675 * nto-low.c: Update.
1676 * remote-utils.c: Update.
1677 * spu-low.c: Update.
1678 * thread-db.c: Update.
1679 * win32-low.c: Update.
1681 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1683 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1684 parameter in call to 'amd64_create_target_description'.
1686 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1688 * x86-tdesc.h: Remove executable permission flag.
1690 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1692 * configure.ac: Remove AC_PREREQ, add missing quoting.
1693 * configure: Re-generate.
1694 * config.in: Re-generate.
1695 * aclocal.m4: Re-generate.
1697 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1699 * tracepoint.h (current_traceframe): Remove declaration.
1701 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1703 * linux-aarch64-low.c (is_sve_tdesc): New function.
1704 (aarch64_sve_regs_copy_to_regcache): Likewise.
1705 (aarch64_sve_regs_copy_from_regcache): Likewise.
1706 (aarch64_regs_info): Add SVE checks.
1707 (initialize_low_arch): Initialize SVE.
1709 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1711 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1713 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1715 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1716 (initialize_low_tracepoint): Likewise
1717 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1718 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1720 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1722 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1724 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1726 * server.h (PBUFSIZ): Increase size
1728 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1730 * regcache.c (regcache::raw_compare): New function.
1731 * regcache.h (regcache::raw_compare): New declaration.
1733 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1735 * regcache.c (new_register_cache): Use new.
1736 (free_register_cache): Use delete.
1737 (register_data): Use const.
1738 (supply_register): Move body inside regcache.
1739 (regcache::raw_supply): New override function.
1740 (collect_register): Move body inside regcache.
1741 (regcache::raw_collect): New override function.
1742 (regcache::get_register_status): New override function.
1743 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1745 2018-06-09 Tom Tromey <tom@tromey.com>
1747 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1749 (event_queue): Use std::queue.
1750 (gdb_event_xfree): Remove.
1751 (initialize_event_loop, process_event, wait_for_event): Update.
1753 2018-06-08 Stan Cox <scox@redhat.com>
1755 * win32-low.c (win32_create_inferior): last_ptid and last_status
1756 moved to client_state.
1758 2018-06-08 Pedro Alves <palves@redhat.com>
1760 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1761 common/common-exceptions.o, common/common-utils.o,
1762 common/errors.o, common/print-utils.o and utils.o.
1763 * gdbreplay.c: Include "common-defs.h" instead of the two
1764 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1765 string.h or alloca.h.
1766 (perror_with_name): Delete.
1767 (remote_open): Use xstrdup instead of strdup.
1768 (main): Rename to ...
1769 (captured_main): ... this.
1772 2018-06-08 Tom Tromey <tom@tromey.com>
1774 * linux-low.c (linux_low_read_btrace): Update.
1776 2018-06-04 Stan Cox <scox@redhat.com>
1778 * server.h (struct client_state): New.
1779 * server.c (cont_thread, general_thread, multi_process)
1780 (report_fork_events, report_vfork_events, report_exec_events)
1781 (report_thread_events, swbreak_feature, hwbreak_feature)
1782 (vCont_supported, disable_randomization, pass_signals)
1783 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1784 Moved to client_state.
1785 * remote-utils.c (remote_debug, noack_mode)
1786 (transport_is_reliable): Moved to client_state.
1787 * tracepoint.c (current_traceframe): Moved to client_state.
1790 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1791 linux-low.c, remote-utils.h, target.c: Use client_state.
1793 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1795 * configure.srv: Add new c/h file.
1797 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1799 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1802 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1804 * gdb.arch/mips-fpregset-core.exp: New test.
1805 * gdb.arch/mips-fpregset-core.c: New test source.
1807 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1810 * hostio.c (require_int): Do not report overflow for integers
1811 between 0xfffffff and 0x7fffffff.
1813 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1815 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1816 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1817 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1819 (the_low_target): Wire them.
1821 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1823 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1824 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1825 mode. Call collect_register_by_name with vscr using
1826 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1827 (ppc_store_vrregset): Add and set vscr_offset variable as in
1828 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1831 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1833 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1834 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1835 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1837 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1839 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1840 (ppc_store_vsxregset): Likewise.
1841 (ppc_fill_vrregset): Likewise.
1842 (ppc_store_vrregset): Likewise.
1843 (ppc_fill_evrregset): Likewise.
1844 (ppc_store_evrregset): Likewise.
1845 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1846 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1849 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1851 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1852 wordsize of the inferior. Call ppc_linux_target_wordsize.
1854 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1856 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1857 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1858 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1859 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1860 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1861 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1862 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1863 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1864 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1865 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1866 (tdesc_powerpc_e500l): Remove.
1867 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1868 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1869 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1870 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1872 (ppc_arch_setup): Remove target description matching code. Fill a
1873 ppc_linux_features struct and call ppc_linux_match_description
1876 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1878 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1879 width of the requested register exceeds the width of the
1881 (mips_cannot_store_register): Likewise.
1883 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1885 * linux-mips-low.c (mips_fetch_register): New function. Update
1887 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1888 (the_low_target): Wire `mips_fetch_register'.
1890 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1892 * lynx-i386-low.c (LYNXOS_178): New macro.
1893 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1894 the layout on LynxOS-178.
1895 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1896 handle floating point registers that are not supported by
1899 2018-05-10 Tom Tromey <tom@tromey.com>
1901 * configure: Rebuild.
1903 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1906 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1907 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1908 Use it to set the expedite_regs field in the given tdesc.
1909 * x86-tdesc.h: New file.
1910 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1911 Adjust following the addition of the new expedite_regs parameter
1912 to init_target_desc.
1913 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1914 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1915 (i386_linux_read_description, amd64_linux_read_description):
1916 Adjust following the addition of the new expedite_regs parameter
1917 to init_target_desc.
1918 * lynx-i386-low.c: #include "x86-tdesc.h".
1919 (lynx_i386_arch_setup): Adjust following the addition of the new
1920 expedite_regs parameter to init_target_desc.
1921 * nto-x86-low.c: #include "x86-tdesc.h".
1922 (nto_x86_arch_setup): Adjust following the addition of the new
1923 expedite_regs parameter to init_target_desc.
1924 * win32-i386-low.c: #include "x86-tdesc.h".
1925 (i386_arch_setup): Adjust following the addition of the new
1926 expedite_regs parameter to init_target_desc.
1928 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1931 * win32-low.c (win32_create_inferior): Add call to my_wait
1932 setting last_status global.
1934 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1937 * win32-low.c (create_process): Only call gdb_tilde_expand if
1938 inferior_cwd is not NULL.
1940 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1942 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1943 registers to the cache if their values have changed.
1944 (i387_xsave_to_cache): Provide default values for x87 control
1945 registers when these features are available, but disabled.
1946 * regcache.c (supply_register_by_name_zeroed): New function.
1947 * regcache.h (supply_register_by_name_zeroed): Declare new
1950 2018-05-07 Tom Tromey <tom@tromey.com>
1952 * configure: Rebuild.
1954 2018-05-04 Tom Tromey <tom@tromey.com>
1956 * configure: Rebuild.
1958 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1959 Pedro Alves <palves@redhat.com>
1961 * linux-aarch64-low.c (aarch64_stopped_data_address):
1964 2018-04-27 Tom Tromey <tom@tromey.com>
1966 * configure: Rebuild.
1968 2018-04-23 Tom Tromey <tom@tromey.com>
1970 * configure: Rebuild.
1972 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1974 * Makefile.in (depcomp): Add "..".
1975 (all_deps_files): New and use it.
1977 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1979 * configure.srv (aarch64*-*-linux*): Don't include xml.
1980 (i[34567]86-*-cygwin*): Likewise.
1981 (i[34567]86-*-linux*): Likewise.
1982 (i[34567]86-*-lynxos*): Likewise.
1983 (i[34567]86-*-mingw32ce*): Likewise.
1984 (i[34567]86-*-mingw*): Likewise.
1985 (i[34567]86-*-nto*): Likewise.
1986 (tic6x-*-uclinux): Likewise.
1987 (x86_64-*-linux*): Likewise.
1988 (x86_64-*-mingw*): Likewise.
1989 (x86_64-*-cygwin*): Likewise.
1991 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1993 * tdesc.c: Remove xml parameter.
1995 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1997 * server.c (get_features_xml): Remove cast.
1998 * tdesc.c (void target_desc::accept): Fill in function.
1999 (tdesc_get_features_xml): Remove old xml creation.
2000 (print_xml_feature::visit_pre): Add xml vistor.
2001 * tdesc.h (struct target_desc): Make xmltarget mutable.
2002 (tdesc_get_features_xml): Remove declaration.
2004 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2006 * tdesc.c (tdesc_architecture_name): Add new function.
2007 (tdesc_osabi_name): Likewise.
2008 (tdesc_get_features_xml): Use new functions.
2010 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2012 * tdesc.c (tdesc_create_flags): Remove.
2013 (tdesc_add_flag): Likewise.
2014 (tdesc_named_type): Likewise.
2015 (tdesc_create_union): Likewise.
2016 (tdesc_create_struct): Likewise.
2017 (tdesc_create_vector): Likewise.
2018 (tdesc_add_bitfield): Likewise.
2019 (tdesc_add_field): Likewise.
2020 (tdesc_set_struct_size): Likewise.
2022 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2024 * tdesc.c (~target_desc): Remove implictly deleted items.
2025 (init_target_desc): Iterate all features.
2026 (tdesc_get_features_xml): Use vector.
2027 (tdesc_create_feature): Create feature.
2028 * tdesc.h (tdesc_feature) Remove
2029 (target_desc): Add features.
2031 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2033 * Makefile.in: Add common/tdesc.c
2034 * tdesc.c (init_target_desc): init all reg_defs from register
2036 (tdesc_create_reg): Create tdesc_reg.
2037 * tdesc.h (tdesc_feature): Add register vector.
2039 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2041 * tdesc.h (struct target_desc) <features>: Change type to
2042 std::vector<std::string>.
2043 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2045 (tdesc_get_features_xml): Likewise.
2046 (tdesc_create_feature): Likewise.
2048 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2050 * regcache.c (find_register_by_number): Return a ref.
2051 (find_regno): Use references.
2052 (register_size): Likewise.
2053 (register_data): Likewise.
2054 * tdesc.c (target_desc::~target_desc): Remove free calls.
2055 (target_desc::operator==): Use std::vector compare.
2056 (init_target_desc): Use reference.
2057 (tdesc_create_reg): Use reg constructors.
2058 * tdesc.h (struct target_desc): Replace pointer with object.
2060 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2062 * regcache.c (find_register_by_number): Make static.
2063 (find_regno): Use find_register_by_number
2064 * regcache.h (struct reg): Remove declaration.
2066 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2068 * tdesc.c (target_desc::~target_desc): Move to here.
2069 (target_desc::operator==): Likewise.
2070 * tdesc.h (target_desc::~target_desc): Move from here.
2071 (target_desc::operator==): Likewise.
2073 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2075 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2077 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2079 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2081 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2082 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2083 and init_registers_s390_gs_linux64.
2085 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2087 * linux-s390-low.c (s390_fill_gs): Remove function.
2088 (s390_fill_gsbc): Remove function.
2089 (s390_regsets): Set fill functions for the guarded storage regsets
2092 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2094 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2095 the word size. Add comment.
2096 (s390_get_wordsize): New function.
2097 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2098 pswm with it. Instead, use s390_get_wordsize to determine the
2099 word size first and derive the correct tdesc from that directly.
2101 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2103 * Makefile.in: Include silent-rules.mk.
2104 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2105 (COMPILE): Add ECHO_CXX.
2106 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2107 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2108 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2109 (version-generated.c): Add ECHO_GEN.
2110 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2111 (IPAGENT_COMPILE): Add ECHO_CXX.
2112 (%-generated.c): Add ECHO_REGDAT.
2114 2018-03-14 Tom Tromey <tom@tromey.com>
2117 * ax.c (ax_printf): Special case for NULL.
2119 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2121 * linux-low.c (linux_qxfer_libraries_svr4): Use
2122 xml_escape_text_append.
2124 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2126 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2128 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2130 * server.c (handle_general_set): Remove unnecessary xstrdup.
2132 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2134 * server.c (parse_debug_format_options): Adjust to
2135 delim_string_to_char_ptr_vec changes.
2136 * thread-db.c (thread_db_load_search): Adjust to
2137 dirnames_to_char_ptr_vec changes.
2139 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2141 * target.h (target_enable_btrace, target_disable_btrace)
2142 (target_read_btrace, target_read_btrace_conf): Turn macro into
2143 inline function. Throw error if target method is not defined.
2144 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2145 check for btrace target method. Be prepared to handle exceptions
2146 from btrace target methods.
2148 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2150 * server.c (captured_main): Change order of error message printed
2151 when the current working directory cannot be found.
2153 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2155 * server.c: Include "filenames.h" and "pathstuff.h".
2156 (program_name): Delete variable.
2157 (program_path): New anonymous class.
2158 (get_exec_wrapper): Use "program_path" instead of
2160 (handle_v_run): Likewise.
2161 (captured_main): Likewise.
2162 (process_serial_event): Likewise.
2164 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2166 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2167 (OBJS): Add "pathstuff.o".
2168 * server.c (current_directory): New global variable.
2169 (captured_main): Initialize "current_directory".
2171 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2173 * tdesc.c: Use common/tdesc.h.
2174 * tdesc.h: Likewise.
2176 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2177 Simon Marchi <simon.marchi@ericsson.com>
2179 * Makefile.in: Switch order of make rules.
2181 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2183 * Makefile.in: Add common directory in build.
2184 * configure.ac: Add common reference.
2185 * configure: Regenerate.
2187 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2189 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2190 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2191 * spu-low.c (spu_target_ops): Likewise.
2192 * win32-low.c (win32_target_ops): Likewise.
2193 * server.c (supported_btrace_packets): Report packets unconditionally.
2194 * target.h (target_ops) <supports_btrace>: Remove.
2195 (target_supports_btrace): Remove.
2197 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2199 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2200 (handle_btrace_disable): Change return type to void. Use exceptions
2202 (handle_btrace_general_set): Catch exception and copy message to
2205 2018-02-08 Tom Tromey <tom@tromey.com>
2207 * linux-low.c (install_software_single_step_breakpoints): Use
2208 make_scoped_restore.
2209 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2210 (do_restore_current_thread_cleanup): Remove.
2211 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2214 2018-02-08 Tom Tromey <tom@tromey.com>
2216 * mem-break.c (set_raw_breakpoint_at): Use
2217 gdb::unique_xmalloc_ptr.
2219 2018-01-30 Pedro Alves <palves@redhat.com>
2222 * target.c (target_terminal::terminal_state): Rename to ...
2223 (target_terminal::m_terminal_state): ... this.
2225 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2227 * linux-low.c (handle_extended_wait): Surround call to
2228 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2230 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2232 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2233 linux_ptrace_attach_fail_reason_string now returning an
2235 (linux_attach): Likewise.
2236 * thread-db.c (attach_thread): Likewise.
2238 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2241 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2242 checking for fs_base/gs_base fields in struct user_regs_struct.
2243 * configure: Regenerate.
2245 2018-01-16 Yao Qi <yao.qi@linaro.org>
2248 * linux-low.c (fetch_register): Call supply_register instead of
2251 2018-01-08 Yao Qi <yao.qi@linaro.org>
2252 Simon Marchi <simon.marchi@ericsson.com>
2254 * Makefile.in (OBS): Remove selftest.o.
2255 * configure.ac: Set srv_selftest_objs if $development is true.
2256 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2257 * configure: Re-generated.
2258 * server.c (captured_main): Wrap variable selftest_filter with
2261 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2263 * server.c (parse_debug_format_options): Return std::string.
2264 (handle_monitor_command, captured_main): Adjust.
2266 2018-01-05 Pedro Alves <palves@redhat.com>
2269 * server.c (captured_main): Pass quiet=false to
2270 save_original_signals_state.
2272 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2274 * gdbreplay.c (gdbreplay_version): Update copyright year in
2276 * server.c (gdbserver_version): Likewise.
2278 2017-12-08 Tom Tromey <tom@tromey.com>
2280 * ax.c (ax_printf): Update.
2282 2017-12-07 Yao Qi <yao.qi@linaro.org>
2284 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2285 aarch64_linux_read_description.
2286 * linux-amd64-ipa.c (idx2mask): New array.
2287 (get_ipa_tdesc): Move idx2mask out.
2288 (initialize_low_tracepoint): Initialize target descriptions.
2289 * linux-i386-ipa.c (idx2mask): New array.
2290 (get_ipa_tdesc): Move idx2mask out.
2291 (initialize_low_tracepoint): Initialize target descriptions.
2293 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2295 * tdesc.c (struct tdesc_type): Change return type.
2296 (tdesc_add_flag): Change parameter type.
2297 (tdesc_add_bitfield): Likewise.
2298 (tdesc_add_field): Likewise.
2299 (tdesc_set_struct_size): Likewise.
2301 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2303 * regcache.c (registers_to_string): Remove unused variable.
2305 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2307 * inferiors.c (for_each_inferior_with_data): Remove.
2308 * inferiors.h (for_each_inferior_with_data): Remove.
2309 * server.c (handle_qxfer_threads_worker): Change parameter type.
2310 (handle_qxfer_threads_proper): Use for_each_thread.
2312 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2314 * inferiors.c (for_each_inferior): Remove.
2315 (clear_inferiors): Use for_each_thread.
2316 * inferiors.h (for_each_inferior): Remove.
2317 * linux-low.c (linux_wait_for_event_filtered): Use
2319 (linux_stabilize_threads): Likewise.
2320 * regcache.c (regcache_release): Likewise.
2321 * server.c (gdb_wants_all_threads_stopped): Likewise.
2322 (clear_pending_status_callback): Remove.
2323 (handle_status): Use for_each_thread.
2324 (captured_main): Likewise.
2325 * win32-low.c (child_init_thread_list): Likewise.
2326 (win32_clear_inferiors): Likewise.
2327 (fake_breakpoint_event): Likewise.
2329 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2331 * inferiors.h (find_inferior): Remove.
2332 * inferiors.c (find_inferior): Remove.
2334 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2336 * linux-low.c (resume_status_pending_p): Update comment.
2337 (need_step_over_p): Update comment.
2339 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2341 * linux-low.c (proceed_one_lwp): Return void, change parameter
2343 (unsuspend_and_proceed_one_lwp): Likewise.
2344 (proceed_all_lwps): Use for_each_thread.
2345 (unstop_all_lwps): Likewise.
2347 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2349 * linux-low.c (linux_resume_one_thread): Return void, take
2351 (linux_resume): Use for_each_thread.
2353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2355 * linux-low.c (send_sigstop_callback): Return void, change
2356 parameter type. Rename to...
2357 (send_sigstop): ... this.
2358 (suspend_and_send_sigstop_callback): Return void, change parameter
2360 (suspend_and_send_sigstop): ... this.
2361 (stop_all_lwps): Use for_each_thread.
2363 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2365 * linux-low.c (lwp_running): Return bool, remove unused
2367 (linux_stabilize_threads): Use find_thread.
2369 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2371 * linux-low.c (select_singlestep_lwp_callback): Remove.
2372 (count_events_callback): Remove.
2373 (select_event_lwp_callback): Remove.
2374 (select_event_lwp): Use find_thread/for_each_thread.
2376 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2378 * linux-low.c (not_stopped_callback): Return bool, take filter
2380 (linux_wait_for_event_filtered): Use find_thread.
2381 (linux_wait_1): Likewise.
2383 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2385 * linux-low.c (same_lwp): Remove.
2386 (find_lwp_pid): Use find_thread.
2388 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2390 * linux-low.c (delete_lwp_callback): Remove.
2391 (linux_mourn): Use for_each_thread.
2393 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2395 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2396 args parameter, don't check for pid.
2397 (linux_detach): Use for_each_thread.
2399 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2401 * linux-low.c (struct counter): Remove.
2402 (second_thread_of_pid_p): Remove.
2403 (last_thread_of_process_p): Use find_thread.
2405 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2407 * inferiors.c (find_inferior_in_random): Remove.
2408 * inferiors.h (find_inferior_in_random): Remove.
2409 * linux-low.c (status_pending_p_callback): Return bool, accept
2410 parameter ptid directly.
2411 (linux_wait_for_event_filtered): Use find_thread_in_random.
2412 (linux_wait_1): Likewise.
2414 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2416 * inferiors.c (find_inferior_id): Remove.
2417 (find_thread_ptid): Move implemention from find_inferior_id to
2419 * inferiors.h (find_inferior_id): Remove.
2420 * server.c (handle_status): Use find_thread_ptid.
2421 (process_serial_event): Likewise.
2422 * thread-db.c (find_one_thread): Likewise.
2423 (thread_db_thread_handle): Likewise.
2424 * win32-low.c (thread_rec): Likewise.
2425 (child_delete_thread): Likewise.
2426 (win32_thread_alive): Likewise.
2427 (get_child_debug_event): Likewise.
2429 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2431 * linux-mips-low.c (update_watch_registers_callback): Return
2432 void, remove pid_p parameter, don't check for pid.
2433 (mips_insert_point, mips_remove_point): Use for_each_thread.
2435 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2437 * lynx.low (lynx_delete_thread_callback): Remove.
2438 (lynx_mourn): Use for_each_thread.
2440 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2442 * regcache.c (regcache_invalidate_one): Remove.
2443 (regcache_invalidate_pid): use for_each_thread.
2445 2017-11-26 Tom Tromey <tom@tromey.com>
2447 * linux-low.c (linux_create_inferior): Update.
2449 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2451 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2453 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2455 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2456 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2457 * linux-aarch64-tdesc-selftest.c: New file.
2458 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2460 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2462 * configure.srv: Add new file.
2463 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2464 * linux-aarch64-tdesc-selftest.c: New file.
2465 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2467 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2469 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2470 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2471 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2473 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2475 * configure.srv: Add new files.
2476 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2477 aarch64_linux_read_description.
2478 * linux-aarch64-low.c (aarch64_linux_read_description):
2479 Merge with aarch64_arch_setup.
2480 (aarch64_arch_setup): Call aarch64_linux_read_description.
2481 * linux-aarch64-tdesc.c: New file.
2482 * linux-aarch64-tdesc.h: New file.
2484 2017-11-24 Yao Qi <yao.qi@linaro.org>
2486 * configure.srv: Set $srv_regobj for tic6x-linux.
2487 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2488 (tic6x_read_description): Move some code to tic6x_arch_setup.
2489 (tic6x_tdesc_test): New function.
2490 (initialize_low_arch): Call selftests::register_test.
2492 2017-11-22 Yao Qi <yao.qi@linaro.org>
2494 * remote-utils.c (prepare_resume_reply): Use memcpy.
2496 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2498 * linux-low.c (kill_one_lwp_callback): Return void, take
2499 argument directly, don't filter on pid.
2500 (linux_kill): Use for_each_thread.
2502 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2504 * linux-low.c (need_step_over_p): Return bool, remove dummy
2506 (linux_resume, proceed_all_lwps): Use find_thread.
2508 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2510 * linux-low.c (resume_status_pending_p): Return bool, remove
2512 (linux_resume): Use find_thread.
2514 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2516 * linux-low.c (struct thread_resume_array): Remove.
2517 (linux_set_resume_request): Return void, take arguments
2519 (linux_resume): Use for_each_thread.
2521 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2523 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2524 return bool, remove data argument.
2525 (linux_stabilize_threads): Use find_thread.
2527 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2529 * linux-low.c (unsuspend_one_lwp): Remove.
2530 (unsuspend_all_lwps): Use for_each_thread, inline code from
2533 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2535 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2536 * linux-low.c (struct iterate_over_lwps_args): Remove.
2537 (iterate_over_lwps_filter): Remove.
2538 (iterate_over_lwps): Use find_thread.
2540 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2542 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2543 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2544 code from reset_lwp_ptrace_options_callback.
2546 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2548 * linux-arm-low.c (struct update_registers_data): Remove.
2549 (update_registers_callback): Return void, take arguments
2550 directly, don't check thread's pid.
2551 (arm_insert_point, arm_remove_point): Use for_each_thread.
2553 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2555 * win32-low.c (continue_one_thread): Return void, take argument
2557 (child_continue): Use for_each_thread.
2559 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2561 * win32-i386-low.c (update_debug_registers_callback): Rename
2563 (update_debug_registers): ... this, return void, remove pid_p arg.
2564 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2566 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2568 * inferiors.h (struct process_info): Add constructor, initialize
2570 <syscalls_to_catch>: Change type to std::vector<int>.
2571 * inferiors.c (add_process): Allocate process_info with new.
2572 (remove_process): Free process_info with delete.
2573 * linux-low.c (handle_extended_wait): Adjust.
2574 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2575 * server.c (handle_general_set): Adjust.
2577 2017-11-16 Pedro Alves <palves@redhat.com>
2579 * remote-utils.c (remote_close): Block SIGIO signals instead of
2580 uninstalling the SIGIO handler.
2582 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2584 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2586 2017-11-16 Yao Qi <yao.qi@linaro.org>
2588 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2589 (tic6x_store_gregset): Likewise.
2590 (tic6x_usrregs_info): Move it up.
2592 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2594 * Makefile.in: Update arch rules.
2595 * configure.srv: Explicitly mark arch/ files.
2597 2017-11-13 Andreas Schwab <schwab@suse.de>
2599 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2601 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2603 2017-11-06 Pedro Alves <palves@redhat.com>
2605 * config.in, configure: Regenerate.
2607 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2609 * target.c (struct thread_search): Remove.
2610 (thread_search_callback): Remove.
2611 (prepare_to_access_memory): Use for_each_thread instead of
2612 find_inferior. Inline code from thread_search_callback.
2614 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2616 * server.c (struct visit_actioned_threads_data): Remove.
2617 (visit_actioned_threads): Change prototype to take arguments
2619 (resume): Use find_thread instead of find_inferior.
2621 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2623 * server.c (queue_stop_reply_callback): Change prototype, return
2625 (find_status_pending_thread_callback): Remove.
2626 (handle_status): Replace find_inferior with find_thread and
2629 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2631 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2633 (aarch64_store_gregset): Likewise.
2634 (aarch64_fill_fpregset): Likewise.
2635 (aarch64_store_fpregset): Likewise.
2637 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2639 * gdbthread.h (find_thread, for_each_thread): New functions.
2640 * inferiors.c (thread_of_pid): Remove.
2641 (find_any_thread_of_pid): Use find_thread.
2642 * linux-low.c (num_lwps): Use for_each_thread.
2644 2017-10-17 Yao Qi <yao.qi@linaro.org>
2646 * Makefile.in: Remove one rule.
2647 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2649 2017-10-17 Yao Qi <yao.qi@linaro.org>
2651 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2652 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2654 2017-10-17 Yao Qi <yao.qi@linaro.org>
2656 * configure.srv: Rename arm.o with arch/arm.o.
2658 2017-10-17 Yao Qi <yao.qi@linaro.org>
2660 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2661 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2662 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2663 (arch-i386.o, arch-amd64.o): Remove rules.
2664 (arch/%.o): New rule.
2665 Update POSTCOMPILE and COMPILE.pre.
2666 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2667 * configure: Re-generated.
2668 * configure.srv: Replace arch-i386.o with arch/i386.o.
2669 Replace arch-amd64.o with arch/amd64.o.
2671 2017-10-16 Yao Qi <yao.qi@linaro.org>
2673 * configure: Regenerated.
2675 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2677 * inferiors.h: (struct inferior_list): Remove.
2678 (struct inferior_list_entry); Remove.
2679 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2680 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2681 get_first_inferior): Remove.
2682 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2683 find_inferior_id, find_inferior_in_random): Change signature.
2684 * inferiors.c (all_threads): Change type to
2685 std::list<thread_info *>.
2686 (get_thread): Remove macro.
2687 (find_inferior, find_inferior_id): Change signature, implement
2689 (find_inferior_in_random): Change signature, implement using
2690 find_thread_in_random.
2691 (for_each_inferior, for_each_inferior_with_data): Change
2692 signature, implement using for_each_thread.
2693 (add_inferior_to_list, remove_inferior): Remove.
2694 (add_thread, get_first_thread, thread_of_pid,
2695 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2696 (get_first_inferior, one_inferior_p, clear_inferior_list):
2698 (clear_inferiors, get_thread_process): Update.
2699 * gdbthread.h: Include <list>.
2700 (struct thread_info) <entry>: Remove field.
2702 (all_threads): Change type to std::list<thread_info *>.
2703 (get_first_inferior): Add doc.
2704 (find_thread, for_each_thread, find_thread_in_random): New
2706 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2707 * linux-arm-low.c (update_registers_callback): Update.
2708 * linux-low.c (second_thread_of_pid_p): Update.
2709 (kill_one_lwp_callback, linux_detach_lwp_callback,
2710 delete_lwp_callback, status_pending_p_callback, same_lwp,
2711 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2712 iterate_over_lwps, not_stopped_callback,
2713 resume_stopped_resumed_lwps, count_events_callback,
2714 select_singlestep_lwp_callback, select_event_lwp_callback,
2715 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2716 suspend_and_send_sigstop_callback, wait_for_sigstop,
2717 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2718 lwp_running, linux_set_resume_request, resume_status_pending_p,
2719 need_step_over_p, start_step_over, linux_resume_one_thread,
2720 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2721 reset_lwp_ptrace_options_callback): Update.
2722 * linux-mips-low.c (update_watch_registers_callback): Update.
2723 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2725 (free_register_cache_thread_one): Remove.
2726 (regcache_release): Update.
2727 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2728 handle_qxfer_threads_worker): Update.
2729 (handle_query): Update, use list iterator.
2730 (visit_actioned_threads, handle_pending_status,
2731 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2732 clear_pending_status_callback, set_pending_status_callback,
2733 find_status_pending_thread_callback, handle_status,
2734 process_serial_event): Update.
2735 * target.c (thread_search_callback): Update.
2736 * thread-db.c (thread_db_get_tls_address): Update.
2737 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2739 * win32-i386-low.c (update_debug_registers_callback): Update.
2740 * win32-low.c (delete_thread_info, child_delete_thread,
2741 continue_one_thread, suspend_one_thread,
2742 get_child_debug_event): Adjust.
2744 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2746 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2747 * inferiors.h: Include <list>.
2748 (struct process_info) <entry>: Remove field.
2750 (pid_of): Change macro to function.
2751 (ptid_of, lwpid_of): Remove macro.
2752 (all_processes): Change type to std::list<process_info *>.
2753 (ALL_PROCESSES): Remove macro.
2754 (for_each_process, find_process): New function.
2755 * inferiors.c (all_processes): Change type to
2756 std::list<process_info *>.
2757 (find_thread_process): Adjust.
2758 (add_process): Likewise.
2759 (remove_process): Likewise.
2760 (find_process_pid): Likewise.
2761 (get_first_process): Likewise.
2762 (started_inferior_callback): Remove.
2763 (have_started_inferiors_p): Adjust.
2764 (attached_inferior_callback): Remove.
2765 (have_attached_inferiors_p): Adjust.
2766 * linux-low.c (check_zombie_leaders): Likewise.
2767 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2768 (x86_linux_update_xmltarget): Adjust.
2769 * server.c (handle_query): Likewise.
2770 (gdb_reattached_process): Remove.
2771 (handle_status): Adjust.
2772 (kill_inferior_callback): Likewise.
2773 (detach_or_kill_inferior): Remove.
2774 (print_started_pid): Likewise.
2775 (print_attached_pid): Likewise.
2776 (detach_or_kill_for_exit): Update.
2777 (process_serial_event): Likewise.
2778 * linux-arm-low.c (arm_new_fork): Likewise.
2780 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2782 * dll.h: Include <list>.
2783 (struct dll_info): Add constructor.
2784 <entry>: Remove field.
2785 (all_dlls): Change type to std::list<dll_info>.
2786 * dll.c: Include <algorithm>.
2787 (get_dll): Remove macro.
2788 (all_dlls): Change type to std::list<dll_info *>.
2789 (free_one_dll): Remove.
2790 (match_dll): Likewise.
2791 (loaded_dll): Adjust.
2792 (unloaded_dll): Adjust to all_dlls type change, use
2793 std::find_if. Inline code from match_dll.
2794 (clear_dlls): Adjust to all_dlls type change.
2795 * server.c (emit_dll_description): Remove.
2796 (handle_qxfer_libraries): Adjust to all_dlls type change,
2797 integrate emit_dll_description's functionality.
2799 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2801 * linux-low.h (struct linux_target_ops) <delete_process>: New
2803 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2804 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2805 (struct linux_target_ops): Add delete_process callback.
2806 * linux-arm-low.c (arm_delete_process): New.
2807 (struct linux_target_ops): Add delete_process callback.
2808 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2809 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2810 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2811 * linux-mips-low.c (mips_linux_delete_process): New.
2812 (struct linux_target_ops): Add delete_process callback.
2813 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2814 * linux-s390-low.c (struct linux_target_ops): Likewise.
2815 * linux-sh-low.c (struct linux_target_ops): Likewise.
2816 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2817 * linux-tile-low.c (struct linux_target_ops): Likewise.
2818 * linux-x86-low.c (x86_linux_delete_process): New.
2819 (struct linux_target_ops): Add delete_process callback.
2820 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2822 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2824 * linux-aarch64-low.c (the_low_target): Add thread delete
2826 * linux-arm-low.c (arm_delete_thread): New function.
2827 (the_low_target): Add thread delete callback.
2828 * linux-bfin-low.c (the_low_target): Likewise.
2829 * linux-crisv32-low.c (the_low_target): Likewise.
2830 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2832 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2834 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2835 * linux-mips-low.c (mips_linux_delete_thread): New function.
2836 (the_low_target): Add thread delete callback.
2837 * linux-ppc-low.c (the_low_target): Likewise.
2838 * linux-s390-low.c (the_low_target): Likewise.
2839 * linux-sh-low.c (the_low_target): Likewise.
2840 * linux-tic6x-low.c (the_low_target): Likewise.
2841 * linux-tile-low.c (the_low_target): Likewise.
2842 * linux-x86-low.c (the_low_target): Likewise.
2843 * linux-xtensa-low.c (the_low_target): Likewise.
2845 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2847 * win32-low.c: Include "common-inferior.h".
2849 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2851 * inferiors.c (set_inferior_cwd): New function.
2852 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2853 (handle_query): Inform that QSetWorkingDir is supported.
2854 * win32-low.c (create_process): Pass the inferior's cwd to
2857 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2859 * inferiors.c (current_inferior_cwd): New global variable.
2860 (get_inferior_cwd): New function.
2861 * inferiors.h (struct process_info) <cwd>: New field.
2863 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2865 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2866 (OBS): Add gdb_tilde_expand.o.
2868 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2870 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2871 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2873 2017-09-29 Pedro Alves <palves@redhat.com>
2875 * ax.c (gdb_parse_agent_expr): Constify.
2876 * ax.h (gdb_parse_agent_expr): Constify.
2877 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2879 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2880 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2881 * remote-utils.h (read_ptid): Constify.
2882 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2883 (process_point_options, process_serial_event): Constify.
2884 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2885 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2886 (cmd_qtbuffer): Constify.
2888 2017-09-29 Pedro Alves <palves@redhat.com>
2890 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2893 2017-09-29 Pedro Alves <palves@redhat.com>
2895 * linux-low.c (handle_extended_wait): Pass parent thread instead
2896 of process to thread_db_notice_clone.
2897 * linux-low.h (thread_db_notice_clone): Replace parent process
2898 parameter with parent thread parameter.
2899 * thread-db.c (find_one_thread): Add comment.
2900 (thread_db_notice_clone): Replace parent process parameter with
2901 parent thread parameter. Temporarily switch to the parent thread.
2903 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2905 * gdbthread.h: Include "common-gdbthread.h".
2906 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2907 "if" when validating the ptid.
2908 * remote-utils.c: Include "gdbthread.h".
2909 (prepare_resume_reply): Use "switch_to_thread".
2910 * target.c (done_accessing_memory): Likewise.
2912 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2914 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2915 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2916 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2917 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2918 s390x-gs-linux64-ipa.o to ipa_obj.
2919 * linux-s390-low.c (HWCAP_S390_GS): New define.
2920 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2922 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2923 (s390_arch_setup): Check for guarded-storage support and choose
2925 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2926 init_registers_s390x_gs_linux64.
2927 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2929 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2930 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2932 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2934 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2936 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2938 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2939 (thread_db_thread_handle): Declare.
2940 * linux-low.c (linux_target_ops): Initialize thread_handle.
2941 * server.c (handle_qxfer_threads_worker): Add support for
2943 * target.h (struct target_ops): Add new function pointer,
2945 (target_thread_handle): Define.
2946 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2948 (thread_db_thread_handle): New function.
2950 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2952 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2953 * linux-low.h (thread_db_notice_clone): Declare.
2954 * thread-db.c (thread_db_notice_clone): New function.
2956 2017-09-21 Pedro Alves <palves@redhat.com>
2958 * server.c (gdb_read_memory, handle_status, process_serial_event)
2959 (handle_serial_event, handle_target_event): Adjust to
2960 set_desired_thread prototype change.
2961 * target.c (set_desired_thread): Remove 'use_general' parameter
2963 * target.h (set_desired_thread): Remove 'use_general' parameter.
2965 2017-09-20 Tom Tromey <tom@tromey.com>
2967 * target.c (target_terminal::terminal_state): Define.
2968 (target_terminal::init): Rename from target_terminal_init.
2969 (target_terminal::inferior): Rename from
2970 target_terminal_inferior.
2971 (target_terminal::ours): Rename from target_terminal_ours.
2972 (target_terminal::ours_for_output, target_terminal::info): New.
2974 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2976 * server.c (accumulate_file_name_length): Remove.
2977 (emit_dll_description): Adjust to std::string change.
2978 (handle_qxfer_libraries): Use std::string to hold document.
2980 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2982 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2983 return type of xml_escape_text.
2984 * server.c (emit_dll_description): Likewise.
2986 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2988 * server.c (captured_main): Accept argument for --selftest.
2989 Update run_tests call.
2990 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2991 when registering selftests.
2993 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2995 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2996 instead of "VEC" for "target_desc.reg_defs".
2997 (regcache_cpy): Likewise.
2998 (registers_to_string): Likewise.
2999 (registers_from_string): Likewise.
3000 (find_regno): Likewise.
3001 (supply_regblock): Likewise.
3002 (regcache_raw_read_unsigned): Likewise.
3003 * tdesc.c (init_target_desc): Likewise.
3004 (tdesc_create_reg): Likewise.
3005 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3006 (struct target_desc) <reg_defs>: Convert to "std::vector".
3007 (target_desc): Do not initialize "reg_defs".
3008 (~target_desc): Update code to use "std::vector" instead of "VEC"
3009 for "target_desc.reg_defs".
3010 (operator==): Likewise.
3012 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3014 * inferiors.h (thread_to_gdb_id): Remove.
3015 * inferiors.c (thread_to_gdb_id): Remove.
3016 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3017 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3018 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3020 * nto-low.c (nto_fetch_registers, nto_store_registers,
3021 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3023 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3025 * inferiors.h (gdb_id_to_thread_id): Remove.
3026 * inferiors.c (gdb_id_to_thread_id): Remove.
3027 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3028 removal. Move pid declaration closer to where it's used.
3030 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3032 * server.c (handle_detach): New function.
3033 (process_serial_event): Move code out, call handle_detach.
3035 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3037 * server.c (require_running): Rename to ...
3038 (require_running_or_return): ... this ...
3039 (require_running_or_break): ... and this.
3040 (handle_query, process_serial_event): Adjust.
3042 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3044 * linux-low.c (linux_set_resume_request): Remove unused
3047 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3049 * server.c (first_thread_of): Remove.
3050 (process_serial_event): Replace usage of first_thread_of with
3051 find_any_thread_of_pid.
3052 * tracepoint.c (same_process_p): Remove.
3053 (gdb_agent_about_to_close): Replace usage of same_process_p with
3054 find_any_thread_of_pid.
3055 * linux-x86-low.c (same_process_callback): Remove.
3056 (x86_arch_setup_process_callback): Replace usage of
3057 same_process_callback with find_any_thread_of_pid.
3058 * thread-db.c (any_thread_of): Remove.
3059 (switch_to_process): Replace usage of any_thread_of with
3060 find_any_thread_of_pid.
3061 * inferiors.c (thread_pid_matches_callback): Remove.
3062 (find_thread_process): Adjust to use find_any_thread_of_pid.
3064 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3066 * regcache.c (get_thread_regcache): Guard calls to "memset"
3069 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3071 * linux-low.c (handle_extended_wait): Use
3072 "allocate_target_description" instead of "XNEW".
3073 * linux-x86-low.c (initialize_low_arch): Likewise.
3075 2017-09-05 Yao Qi <yao.qi@linaro.org>
3077 * configure.srv (srv_i386_regobj): Remove.
3078 (srv_amd64_regobj): Remove.
3079 (srv_regobj): Set it to "" for x86 non-linux targets.
3080 * linux-x86-tdesc.c (i386_linux_read_description):
3081 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3082 (init_registers_i386): Remove the declaration.
3083 (tdesc_i386): Remove the declaration.
3084 (lynx_i386_arch_setup): Call i386_create_target_description.
3085 * nto-x86-low.c: Likewise.
3086 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3087 [!__x86_64__]: include arch/i386.h.
3088 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3090 2017-09-05 Yao Qi <yao.qi@linaro.org>
3092 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3093 i386/amd64-XXX-linux from it.
3095 2017-09-05 Yao Qi <yao.qi@linaro.org>
3097 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3099 (ipa_amd64_linux_regobj): Remove.
3100 (ipa_x32_linux_regobj): Remove.
3102 2017-09-05 Yao Qi <yao.qi@linaro.org>
3104 * Makefile.in (arch-amd64.o): New rule.
3105 * configure.srv: Append arch-amd64.o.
3106 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3107 (get_ipa_tdesc): Call amd64_linux_read_description.
3108 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3109 and init_registers_amd64_XXX.
3110 * linux-x86-low.c (x86_linux_read_description): Call
3111 amd64_linux_read_description.
3112 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3113 (initialize_low_arch): Don't call init_registers_x32_XXX and
3114 init_registers_amd64_XXX.
3115 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3116 and tdesc_amd64_XXX.
3117 [__x86_64__] (amd64_tdesc_test): New function.
3118 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3119 and init_registers_amd64_XXX.
3120 * linux-x86-tdesc.c: Include arch/amd64.h.
3121 (xcr0_to_tdesc_idx): New function.
3122 (i386_linux_read_description): New function.
3123 (amd64_get_ipa_tdesc_idx): New function.
3124 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3125 (amd64_get_ipa_tdesc): Declare.
3127 2017-09-05 Yao Qi <yao.qi@linaro.org>
3129 * configure.srv (srv_i386_linux_xmlfiles): Remove
3130 i386/i386-XXX-linux.xml from it.
3132 2017-09-05 Yao Qi <yao.qi@linaro.org>
3134 * configure.srv: Set srv_i386_linux_regobj empty if $development
3136 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3137 initialize_low_tdesc.
3138 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3139 with #if initialize_low_tdesc.
3140 * linux-x86-tdesc-selftest.c: New file.
3141 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3143 2017-09-05 Yao Qi <yao.qi@linaro.org>
3145 * Makefile.in (arch-i386.o): New rule.
3146 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3147 (x86_64-*-linux*): Likewise.
3148 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3149 include arch/i386.h.
3150 (i386_linux_read_description): Remove code and call
3151 i386_create_target_description.
3152 * tdesc.c (allocate_target_description): New function.
3153 * tdesc.h (set_tdesc_architecture): Remove declaration.
3154 (set_tdesc_osabi): Likewise.
3156 2017-09-05 Yao Qi <yao.qi@linaro.org>
3158 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3159 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3160 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3162 * server.c (get_features_xml): Call tdesc_get_features_xml.
3163 * tdesc.c (set_tdesc_architecture): New function.
3164 (set_tdesc_osabi): New function.
3165 (tdesc_get_features_xml): New function.
3166 (tdesc_create_feature): Add an argument.
3167 * tdesc.h (struct target_desc) <features>: New field.
3168 <arch, osabi>: New field.
3169 (~target_desc): xfree features, arch, and osabi.
3170 (target_desc::oerator==): Don't compare .xmltarget.
3171 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3172 (set_tdesc_osabi): Likewise.
3173 (tdesc_get_features_xml): Likewise.
3175 2017-09-05 Yao Qi <yao.qi@linaro.org>
3177 * linux-x86-tdesc.c: Include selftest.h.
3178 (i386_tdesc_test): New function.
3179 (initialize_low_tdesc): Call selftests::register_test.
3180 * tdesc.h: Include regdef.h.
3181 (target_desc): Override operator == and !=.
3183 2017-09-05 Yao Qi <yao.qi@linaro.org>
3185 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3186 (ipa_obj): Likewise.
3187 * linux-i386-ipa.c: Include common/x86-xstate.h
3188 (get_ipa_tdesc): Call i386_linux_read_description.
3189 (initialize_low_tracepoint): Don't call init_registers_XXX
3190 functions, call initialize_low_tdesc instead.
3191 * linux-x86-low.c (x86_linux_read_description): Call
3192 i386_linux_read_description.
3193 (initialize_low_arch): Don't call init_registers_i386_XXX
3194 functions, call initialize_low_tdesc.
3195 * linux-x86-tdesc.c: New file.
3196 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3197 (i386_get_ipa_tdesc_idx): Declare.
3198 (i386_get_ipa_tdesc): Declare.
3199 (initialize_low_tdesc): Declare.
3201 2017-09-05 Yao Qi <yao.qi@linaro.org>
3203 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3206 2017-09-05 Yao Qi <yao.qi@linaro.org>
3208 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3209 * regcache.c (get_thread_regcache): Use VEC_length.
3210 (init_register_cache): Likewise.
3211 (regcache_cpy): Likewise.
3212 (registers_to_string): Iterate reg_defs via VEC_iterate.
3213 (find_regno): Likewise.
3214 (find_register_by_number): Use VEC_index.
3215 (register_size): Call find_register_by_number.
3216 (register_data): Call find_register_by_number.
3217 (supply_regblock): Use VEC_length.
3218 (regcache_raw_read_unsigned): Likewise.
3219 * tdesc.c (init_target_desc): Iterate reg_defs via
3221 (default_description): Update initializer.
3222 (copy_target_description): Don't update field num_registers.
3223 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3224 <num_registers>: Remove.
3226 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3228 * Makefile.in (.SECONDARY): Define target.
3230 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3232 * linux-low.c (linux_wait_1): Adjust.
3233 * server.c (queue_stop_reply_callback): Adjust.
3235 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3237 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3238 QEnvironmentUnset and QEnvironmentReset packets.
3239 (handle_query): Inform remote that QEnvironmentHexEncoded,
3240 QEnvironmentUnset and QEnvironmentReset are supported.
3242 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3244 * inferiors.h (inferior_target_data): Rename to ...
3245 (thread_target_data): ... this.
3246 (inferior_regcache_data): Rename to ...
3247 (thread_regcache_data): ... this.
3248 (set_inferior_regcache_data): Rename to ...
3249 (set_thread_regcache_data): ... this.
3250 * inferiors.c (inferior_target_data): Rename to ...
3251 (thread_target_data): ... this.
3252 (inferior_regcache_data): Rename to ...
3253 (thread_regcache_data): ... this.
3254 (set_inferior_regcache_data): Rename to ...
3255 (set_thread_regcache_data): ... this.
3256 (free_one_thread): Update.
3257 * linux-low.h (get_thread_lwp): Update.
3258 * regcache.c (get_thread_regcache): Update.
3259 (regcache_invalidate_thread): Update.
3260 (free_register_cache_thread): Update.
3261 * win32-i386-low.c (update_debug_registers_callback): Update.
3262 (win32_get_current_dr): Update.
3263 * win32-low.c (thread_rec): Update.
3264 (delete_thread_info): Update.
3265 (continue_one_thread): Update.
3266 (suspend_one_thread): Update.
3268 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3270 * inferiors.c (set_inferior_target_data): Remove.
3271 * inferiors.h (set_inferior_target_data): Remove.
3273 2017-08-18 Yao Qi <yao.qi@linaro.org>
3275 * Makefile.in (OBS): Add selftest.o.
3276 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3277 * configure, config.in: Re-generated.
3278 * server.c: Include common/sefltest.h.
3279 (captured_main): Handle option --selftest.
3281 2017-08-09 Yao Qi <yao.qi@linaro.org>
3283 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3284 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3285 i386-avx-mpx.o and i386-mmx.o.
3286 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3287 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3288 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3289 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3290 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3291 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3292 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3293 i386/amd64-avx-mpx.xml.
3295 2017-08-09 Yao Qi <yao.qi@linaro.org>
3297 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3298 and x32-avx-avx512.o.
3299 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3300 i386/x32-avx-avx512.xml.
3302 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3304 * tracepoint.h (enum class fast_tpoint_collect_result): New
3306 (fast_tracepoint_collecting): Change return type to
3307 fast_tpoint_collect_result.
3308 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3309 * linux-low.h: Include tracepoint.h.
3310 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3311 fast_tpoint_collect_result.
3312 * linux-low.c (handle_tracepoints): Adjust.
3313 (linux_fast_tracepoint_collecting): Change return type to
3314 fast_tpoint_collect_result.
3315 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3316 linux_wait_1, stuck_in_jump_pad_callback,
3317 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3318 proceed_one_lwp): Adjust to type change.
3320 2017-07-10 Yao Qi <yao.qi@linaro.org>
3322 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3324 2017-06-29 Yao Qi <yao.qi@linaro.org>
3326 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3328 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3330 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3332 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3334 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3336 * linux-low.c (linux_create_inferior): Adjust code to access the
3337 environment information via 'gdb_environ' class.
3338 * lynx-low.c (lynx_create_inferior): Likewise.
3339 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3340 (get_environ): Return a pointer to 'our_environ'.
3341 (captured_main): Initialize 'our_environ'.
3342 * server.h (get_environ): Adjust prototype.
3343 * spu-low.c (spu_create_inferior): Adjust code to access the
3344 environment information via 'gdb_environ' class.
3346 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3348 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3349 usage of "register" keyword.
3351 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3353 * configure: Re-generate.
3355 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3357 * configure: Re-generate.
3359 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3361 * Makefile.in (COMPILE.pre): Add "-x c++".
3363 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3365 * fork-child.c: Conditionally include <signal.h>.
3367 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3369 * server.c (handle_general_set): Handle new packet
3370 "QStartupWithShell".
3371 (handle_query): Add "QStartupWithShell" to the list of supported
3373 (gdbserver_usage): Add help text explaining the
3374 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3376 (captured_main): Recognize and act upon the presence of the new
3379 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3380 Pedro Alves <palves@redhat.com>
3382 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3383 * configure: Regenerate.
3384 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3386 (i[34567]86-*-lynxos*): Likewise.
3387 (spu*-*-*): Likewise.
3388 * fork-child.c: New file.
3389 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3391 (linux_ptrace_fun): New function.
3392 (linux_create_inferior): Adjust function prototype to reflect
3393 change on "target.h". Adjust function code to use
3395 (linux_request_interrupt): Delete "signal_pid".
3396 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3397 (lynx_ptrace_fun): New function.
3398 (lynx_create_inferior): Adjust function prototype to reflect
3399 change on "target.h". Adjust function code to use
3401 * nto-low.c (nto_create_inferior): Adjust function prototype and
3402 code to reflect change on "target.h". Update comments.
3403 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3404 "common-terminal.h" and "environ.h".
3405 (terminal_fd): Moved to fork-child.c.
3406 (old_foreground_pgrp): Likewise.
3407 (restore_old_foreground_pgrp): Likewise.
3408 (last_status): Make it global.
3409 (last_ptid): Likewise.
3410 (our_environ): New variable.
3411 (startup_with_shell): Likewise.
3412 (program_name): Likewise.
3413 (program_argv): Rename to...
3414 (program_args): ...this.
3415 (wrapper_argv): New variable.
3416 (start_inferior): Delete function.
3417 (get_exec_wrapper): New function.
3418 (get_exec_file): Likewise.
3419 (get_environ): Likewise.
3420 (prefork_hook): Likewise.
3421 (post_fork_inferior): Likewise.
3422 (postfork_hook): Likewise.
3423 (postfork_child_hook): Likewise.
3424 (handle_v_run): Update code to deal with arguments coming from the
3425 remote host. Update calls from "start_inferior" to
3427 (captured_main): Likewise. Initialize environment variable. Call
3429 * server.h (post_fork_inferior): New prototype.
3430 (get_environ): Likewise.
3431 (last_status): Declare.
3432 (last_ptid): Likewise.
3433 (signal_pid): Likewise.
3434 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3435 (spu_ptrace_fun): New function.
3436 (spu_create_inferior): Adjust function prototype to reflect change
3437 on "target.h". Adjust function code to use "fork_inferior".
3438 * target.c (target_terminal_init): New function.
3439 (target_terminal_inferior): Likewise.
3440 (target_terminal_ours): Likewise.
3441 * target.h: Include <vector>.
3442 (struct target_ops) <create_inferior>: Update prototype.
3443 (create_inferior): Update macro.
3444 * utils.c (gdb_flush_out_err): New function.
3445 * win32-low.c (win32_create_inferior): Adjust function prototype
3446 and code to reflect change on "target.h".
3448 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3450 * inferiors.c (switch_to_thread): New function.
3452 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3454 * Makefile.in (SFILE): Add "common/job-control.c".
3455 (OBS): Add "job-control.o".
3457 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3459 * Makefile: Remove "@host_makefile_frag@".
3461 2017-05-05 Pedro Alves <palves@redhat.com>
3463 * configure: Regenerate.
3465 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3467 * configure: Regenerate.
3469 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3471 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3472 software_single_step change of return type to
3473 std::vector<CORE_ADDR>.
3474 * linux-low.c (install_software_single_step_breakpoints):
3476 * linux-low.h (install_software_single_step_breakpoints):
3479 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3481 * remote-utils.c: Include "gdb_termios.h" instead of
3483 * terminal.h: Delete file.
3485 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3487 * server.c: Include <vector>.
3488 <program_argv, wrapper_argv>: Convert to std::vector.
3489 (start_inferior): Rewrite function to use C++.
3490 (handle_v_run): Likewise. Update code that calculates the argv
3491 based on the vRun packet; use C++.
3492 (captured_main): Likewise.
3494 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3496 * server.c (handle_v_cont): Initialize thread_resume::thread
3499 2017-04-05 Pedro Alves <palves@redhat.com>
3501 * configure: Regenerate.
3503 2017-04-05 Pedro Alves <palves@redhat.com>
3505 * gdbreplay.c (sync_error): Constify.
3506 * linux-x86-low.c (push_opcode): Constify.
3508 2017-04-05 Pedro Alves <palves@redhat.com>
3510 * win32-low.c (get_child_debug_event)
3511 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3512 Report TARGET_WAITKIND_SPURIOUS instead.
3514 2017-04-05 Pedro Alves <palves@redhat.com>
3516 * remote-utils.c (remote_prepare, remote_open): Constify.
3517 * remote-utils.h (remote_prepare, remote_open): Constify.
3518 * server.c (captured_main): Constify 'port' handling.
3520 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3522 * Makefile.in (clean): Clear .deps.
3524 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3526 * .gitignore: Remove generated files, replace with wildcard.
3527 * (clean): Replace removal of generated files with wildcard.
3528 (version.c): Replace with...
3529 (version-generated.c): ...this.
3530 (xml-builtin.c): Replace with...
3531 (xml-builtin-generated.c): ...this.
3532 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3533 (%.c: *regformats*): Replace with...
3534 (%-generated.c: *regformats*): ...this.
3536 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3538 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3539 (xtensa_fill_gregset): Call collect_register_by_name for
3541 (xtensa_store_gregset): Call supply_register_by_name for
3544 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3546 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3547 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3548 (xtensa_store_gregset): Call supply_register for all registers in
3549 a0_regnum..a0_regnum + C0_NREGS range.
3551 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3553 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3554 (ax-ipa.o: ax.c): Remove.
3555 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3556 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3557 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3558 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3559 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3561 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3563 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3564 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3565 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3566 (errors-ipa.o: ../common/errors.c): Remove.
3567 (format-ipa.o: ../common/format.c): Remove.
3568 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3570 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3572 * Makefile.in (%-ipa.o: %.c): New rule.
3573 (tracepoint-ipa.o: tracepoint.c): Remove.
3574 (utils-ipa.o: utils.c): Remove.
3575 (remote-utils-ipa.o: remote-utils.c): Remove.
3576 (regcache-ipa.o: regcache.c): Remove.
3577 (i386-linux-ipa.o: i386-linux.c): Remove.
3578 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3579 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3580 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3581 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3582 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3583 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3584 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3585 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3586 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3587 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3588 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3589 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3590 (aarch64-ipa.o: aarch64.c): Remove.
3591 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3592 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3593 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3594 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3595 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3596 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3597 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3598 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3599 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3600 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3601 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3602 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3603 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3604 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3605 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3606 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3607 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3608 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3609 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3610 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3611 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3612 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3613 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3614 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3615 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3616 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3617 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3618 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3619 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3620 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3621 (tdesc-ipa.o: tdesc.c): Remove.
3622 (x32-linux-ipa.o: x32-linux.c): Remove.
3623 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3624 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3626 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3628 * Makefile.in (%.o: ../arch/%.c): New rule.
3629 (arm.o: ../arch/arm.c): Remove.
3630 (arm-linux.o: ../arch/arm-linux.c): Remove.
3631 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3632 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3634 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3636 * Makefile.in (%.o: ../nat/%.c): New rule.
3637 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3638 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3639 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3640 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3641 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3642 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3643 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3644 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3645 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3646 (linux-personality.o: ../nat/linux-personality.c): Remove.
3647 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3648 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3649 (x86-linux.o: ../nat/x86-linux.c): Remove.
3650 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3651 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3653 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3655 * Makefile.in (%.o: ../common/%.c): New rule.
3656 (signals.o: ../common/signals.c): Remove.
3657 (print-utils.o: ../common/print-utils.c): Remove.
3658 (rsp-low.o: ../common/rsp-low.c): Remove.
3659 (common-utils.o: ../common/common-utils.c): Remove.
3660 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3661 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3662 (vec.o: ../common/vec.c): Remove.
3663 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3664 (xml-utils.o: ../common/xml-utils.c): Remove.
3665 (ptid.o: ../common/ptid.c): Remove.
3666 (buffer.o: ../common/buffer.c): Remove.
3667 (format.o: ../common/format.c): Remove.
3668 (filestuff.o: ../common/filestuff.c): Remove.
3669 (agent.o: ../common/agent.c): Remove.
3670 (errors.o: ../common/errors.c): Remove.
3671 (environ.o: ../common/environ.c): Remove.
3672 (common-debug.o: ../common/common-debug.c): Remove.
3673 (cleanups.o: ../common/cleanups.c): Remove.
3674 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3675 (fileio.o: ../common/fileio.c): Remove.
3676 (common-regcache.o: ../common/common-regcache.c): Remove.
3677 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3678 (new-op.o: ../common/new-op.c): Remove.
3679 (btrace-common.o: ../common/btrace-common.c): Remove.
3681 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3683 * Makefile.in (%.o: ../target/%.c): New rule.
3684 (waitstatus.o: ../target/waitstatus.c): Remove.
3686 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3689 (%.c: ../regformats/%.dat,
3690 (%.c: ../regformats/arm/%.dat,
3691 (%.c: ../regformats/i386/%.dat,
3692 (%.c: ../regformats/rs6000/%.dat): New rules.
3693 (aarch64.c): Remove.
3694 (reg-arm.c): Remove.
3695 (arm-with-iwmmxt.c): Remove.
3696 (arm-with-vfpv2.c): Remove.
3697 (arm-with-vfpv3.c): Remove.
3698 (arm-with-neon.c): Remove.
3699 (reg-bfin.c): Remove.
3700 (reg-cris.c): Remove.
3701 (reg-crisv32.c): Remove.
3703 (i386-linux.c): Remove.
3704 (i386-avx.c): Remove.
3705 (i386-avx-linux.c): Remove.
3706 (i386-avx-avx512.c): Remove.
3707 (i386-avx-avx512-linux.c): Remove.
3708 (i386-mpx.c): Remove.
3709 (i386-mpx-linux.c): Remove.
3710 (i386-avx-mpx-avx512-pku.c): Remove.
3711 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3712 (i386-avx-mpx.c): Remove.
3713 (i386-avx-mpx-linux.c): Remove.
3714 (i386-mmx.c): Remove.
3715 (i386-mmx-linux.c): Remove.
3716 (reg-ia64.c): Remove.
3717 (reg-m32r.c): Remove.
3718 (reg-m68k.c): Remove.
3720 (mips-linux.c): Remove.
3721 (mips-dsp-linux.c): Remove.
3722 (mips64-linux.c): Remove.
3723 (mips64-dsp-linux.c): Remove.
3724 (nios2-linux.c): Remove.
3725 (powerpc-32.c): Remove.
3726 (powerpc-32l.c): Remove.
3727 (powerpc-altivec32l.c): Remove.
3728 (powerpc-cell32l.c): Remove.
3729 (powerpc-vsx32l.c): Remove.
3730 (powerpc-isa205-32l.c): Remove.
3731 (powerpc-isa205-altivec32l.c): Remove.
3732 (powerpc-isa205-vsx32l.c): Remove.
3733 (powerpc-e500l.c): Remove.
3734 (powerpc-64l.c): Remove.
3735 (powerpc-altivec64l.c): Remove.
3736 (powerpc-cell64l.c): Remove.
3737 (powerpc-vsx64l.c): Remove.
3738 (powerpc-isa205-64l.c): Remove.
3739 (powerpc-isa205-altivec64l.c): Remove.
3740 (powerpc-isa205-vsx64l.c): Remove.
3741 (s390-linux32.c): Remove.
3742 (s390-linux32v1.c): Remove.
3743 (s390-linux32v2.c): Remove.
3744 (s390-linux64.c): Remove.
3745 (s390-linux64v1.c): Remove.
3746 (s390-linux64v2.c): Remove.
3747 (s390-te-linux64.c): Remove.
3748 (s390-vx-linux64.c): Remove.
3749 (s390-tevx-linux64.c): Remove.
3750 (s390x-linux64.c): Remove.
3751 (s390x-linux64v1.c): Remove.
3752 (s390x-linux64v2.c): Remove.
3753 (s390x-te-linux64.c): Remove.
3754 (s390x-vx-linux64.c): Remove.
3755 (s390x-tevx-linux64.c): Remove.
3756 (tic6x-c64xp-linux.c): Remove.
3757 (tic6x-c64x-linux.c): Remove.
3758 (tic6x-c62x-linux.c): Remove.
3760 (reg-sparc64.c): Remove.
3761 (reg-spu.c): Remove.
3763 (amd64-linux.c): Remove.
3764 (amd64-avx.c): Remove.
3765 (amd64-avx-linux.c): Remove.
3766 (amd64-avx-avx512.c): Remove.
3767 (amd64-avx-avx512-linux.c): Remove.
3768 (amd64-mpx.c): Remove.
3769 (amd64-mpx-linux.c): Remove.
3770 (amd64-avx-mpx-avx512-pku.c): Remove.
3771 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3772 (amd64-avx-mpx.c): Remove.
3773 (amd64-avx-mpx-linux.c): Remove.
3775 (x32-linux.c): Remove.
3776 (x32-avx.c): Remove.
3777 (x32-avx-linux.c): Remove.
3778 (x32-avx-avx512.c): Remove.
3779 (x32-avx-avx512-linux.c): Remove.
3780 (reg-xtensa.c): Remove.
3781 (reg-tilegx.c): Remove.
3782 (reg-tilegx32.c): Remove.
3784 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3786 * Makefile.in (SFILES): Add "common/environ.c".
3787 (OBJS): Add "common/environ.h".
3789 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3791 * configure.ac: Check if the fs_base and gs_base members of
3792 `struct user_regs_struct' exist.
3793 * config.in: Regenerated.
3794 * configure: Likewise.
3796 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3798 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3800 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3801 (get_next_pcs_syscall_next_pc): Likewise.
3803 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3805 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3806 * nto-x86-low.c: Likewise.
3808 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3810 * Makefile.in: Include disable-implicit-rules.mk.
3812 2016-11-23 Pedro Alves <palves@redhat.com>
3814 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3815 (debug_vprintf): Use std::chrono::steady_clock instead of
3816 gettimeofday. Use '.' instead of ':'.
3817 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3818 (get_timestamp): Use std::chrono::steady_clock instead of
3821 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3823 * Makefile.in: Fix whitespace formatting.
3825 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3827 * Makefile.in (SFILES, OBS): Flatten list and order
3830 2016-11-23 Pedro Alves <palves@redhat.com>
3832 * event-loop.c (handle_file_event): Use warning.
3833 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3834 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3837 2016-11-23 Pedro Alves <palves@redhat.com>
3839 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3841 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3842 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3843 debug_printf and debug_flush for debug output.
3844 * server.c (handle_general_set): Likewise.
3845 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3848 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3850 * Makefile.in (.c.o): Replace rule with ...
3851 (%.o: %.c): ... this one.
3853 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3855 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3856 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3858 * configure.ac: Remove checks for the make program.
3859 * configure: Re-generate.
3861 2016-10-28 Pedro Alves <palves@redhat.com>
3863 * Makefile.in (CXX_DIALECT): Get from configure.
3864 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3865 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3866 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3867 * config.in: Regenerate.
3868 * configure: Regenerate.
3870 2016-10-27 Yao Qi <yao.qi@linaro.org>
3872 * linux-low.c (linux_supports_range_stepping): Return true if
3873 can_software_single_step return true.
3875 2016-10-27 Yao Qi <yao.qi@linaro.org>
3877 * inferiors.c (find_inferior_in_random): New function.
3878 * inferiors.h (find_inferior_in_random): Declare.
3879 * linux-low.c (linux_wait_for_event_filtered): Call
3880 find_inferior_in_random instead of find_inferior.
3882 2016-10-27 Yao Qi <yao.qi@linaro.org>
3884 * linux-low.c (linux_wait_1): If single-step breakpoints are
3885 inserted, remove them.
3887 2016-10-26 Pedro Alves <palves@redhat.com>
3889 * linux-low.c (handle_extended_wait): Link parent/child fork
3891 (linux_wait_1): Unlink them.
3892 (linux_set_resume_request): Ignore resume requests for
3893 already-resumed and unhandled fork child threads.
3894 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3895 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3897 (handle_v_requests) <vCont>: Don't call require_running.
3898 * server.h (in_queued_stop_replies): New declaration.
3900 2016-10-24 Yao Qi <yao.qi@linaro.org>
3903 * linux-aarch64-low.c (append_insns): Cast the return value to
3906 2016-10-10 Yao Qi <yao.qi@linaro.org>
3908 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3910 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3912 * target.c (target_supports_multi_process): New function, moved
3914 * target.h (target_supports_multi_process): ... here. Remove
3917 2016-10-05 Tom Tromey <tom@tromey.com>
3920 * tracepoint.c (handle_tracepoint_bkpts): Check
3921 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3923 2016-10-05 Yao Qi <yao.qi@linaro.org>
3925 * configure.srv: Update the path of arm-*.xml files.
3927 2016-10-05 Terry Guo <terry.guo@arm.com>
3928 Yao Qi <yao.qi@linaro.org>
3930 * Makefile.in: Adjust the path of rules.
3931 * configure.srv: Update the path of xml files.
3932 * regformats/arm-with-iwmmxt.dat: Regenerated.
3933 * regformats/arm-with-neon.dat: Likewise.
3934 * regformats/arm-with-vfpv2.dat: Likewise.
3935 * regformats/arm-with-vfpv3.dat Likewise.
3937 2016-09-30 Yao Qi <yao.qi@linaro.org>
3940 * target.c (target_stop_and_wait): Don't call
3941 target_continue_no_signal, use resume_stop instead.
3943 2016-09-26 Yao Qi <yao.qi@linaro.org>
3945 * linux-low.c (linux_wait_1): Call debug_exit.
3947 2016-09-23 Pedro Alves <palves@redhat.com>
3949 * Makefile.in (SFILES): Add common/new-op.c.
3950 (OBS): Add common/new-op.o.
3951 (new-op.o): New rule.
3953 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3955 * .gitinore: Ignore more files.
3957 2016-09-21 Yao Qi <yao.qi@linaro.org>
3959 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3962 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3964 * server.c (start_inferior): Call target_mourn_inferior instead of
3965 mourn_inferior; pass ptid_t argument to it.
3967 (handle_target_event): Likewise.
3968 * target.c (target_mourn_inferior): New function.
3969 * target.h (mourn_inferior): Delete macro.
3971 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3973 * linux-low.c (lwp_is_stepping): New function.
3975 2016-09-06 Carl Love <cel@us.ibm.com>
3977 * server.c (start_inferior): Fixed comment, requested comment change
3978 didn't get updated correctly. Removed reference to ptrace () call as
3979 it is only true on Linux systems.
3981 2016-09-06 Carl Love <cel@us.ibm.com>
3983 * server.c (start_inferior): Do not call
3984 function target_post_create_inferior () if the
3985 inferior process has already exited.
3987 2016-09-05 Pedro Alves <palves@redhat.com>
3989 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3990 (COMPILE.pre, CC_LD): Use CXX directly.
3991 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3992 * acinclude.m4: Don't include build-with-cxx.m4.
3993 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3994 * configure: Regenerate.
3996 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3999 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4000 call writing data to own_buf.
4002 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4004 * target.c (mywait): Call target_wait instead of
4006 (target_wait): New function.
4008 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4010 * server.c (start_inferior): New variable 'ptid'. Replace calls
4011 to the_target->resume by target_continue{,_no_signal}, depending
4013 * target.c (target_stop_and_wait): Call target_continue_no_signal
4014 instead of the_target->resume.
4015 (target_continue): New function.
4017 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4019 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4021 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4024 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4026 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4027 * linux-arm-low.c (ps_get_thread_area): Likewise.
4028 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4029 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4030 * linux-mips-low.c (ps_get_thread_area): Likewise.
4031 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4032 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4033 * linux-x86-low.c (ps_get_thread_area): Likewise.
4034 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4036 2016-08-19 Pedro Alves <palves@redhat.com>
4038 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4040 2016-08-19 Pedro Alves <palves@redhat.com>
4042 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4043 comment. Use memcpy instead of casting through unsigned long.
4045 2016-08-19 Pedro Alves <palves@redhat.com>
4047 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4048 allocating around 0x80000000.
4050 2016-08-19 Pedro Alves <palves@redhat.com>
4053 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4054 (x32-avx512-linux-ipa.o): New rules.
4055 * configure.ac (x86_64-*-linux*): New x32 check.
4056 * configure.srv (ipa_x32_linux_regobj): New.
4057 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4058 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4060 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4062 * configure: Regenerate.
4064 2016-08-09 Pedro Alves <palves@redhat.com>
4067 * Makefile.in (OBS): Add signals-state-save-restore.o.
4068 (signals-state-save-restore.o): New rule.
4069 * config.in: Regenerate.
4070 * configure: Regenerate.
4071 * linux-low.c: Include "signals-state-save-restore.h".
4072 (linux_create_inferior): Call
4073 restore_original_signals_state.
4074 * server.c: Include "dispositions-save-restore.h".
4075 (captured_main): Call save_original_signals_state.
4077 2016-08-05 Pedro Alves <palves@redhat.com>
4079 * configure: Regenerate.
4081 2016-08-04 Yao Qi <yao.qi@linaro.org>
4083 * linux-low.c (regsets_fetch_inferior_registers): Check
4084 errno is ESRCH or not.
4086 2016-08-02 Yao Qi <yao.qi@linaro.org>
4088 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4089 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4090 (thread_db_load_search): Update.
4091 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4092 td_ta_set_event and td_ta_event_getmsg.
4094 2016-07-26 Pedro Alves <palves@redhat.com>
4097 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4098 of unsigned long for 64-bit registers and use uint32_t instead of
4099 unsigned int for 32-bit registers.
4101 2016-07-26 Pedro Alves <palves@redhat.com>
4103 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4106 2016-07-21 Tom Tromey <tom@tromey.com>
4108 * configure: Rebuild.
4110 2016-07-21 Yao Qi <yao.qi@linaro.org>
4112 * mem-break.c (find_gdb_breakpoint): Cast bp to
4113 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4115 2016-07-21 Yao Qi <yao.qi@linaro.org>
4117 * server.c (handle_v_requests): Support s and S actions
4118 if target_supports_software_single_step return true.
4120 2016-07-21 Yao Qi <yao.qi@linaro.org>
4122 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4123 is resume_step, call maybe_hw_step.
4124 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4126 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4128 (proceed_one_lwp): If resume request is resume_step, install
4129 reinsert breakpoints and call maybe_hw_step.
4131 2016-07-21 Yao Qi <yao.qi@linaro.org>
4133 * linux-low.c (proceed_one_lwp): Declare.
4134 (linux_resume_one_thread): Remove local variable 'step'.
4135 Lift code enqueue signal. Call proceed_one_lwp instead of
4136 linux_resume_one_lwp.
4138 2016-07-21 Yao Qi <yao.qi@linaro.org>
4140 * linux-low.c (linux_resume_one_thread): Call
4141 enqueue_pending_signal.
4143 2016-07-21 Yao Qi <yao.qi@linaro.org>
4145 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4146 * inferiors.c (do_restore_current_thread_cleanup): New function.
4147 (make_cleanup_restore_current_thread): Likewise.
4148 * linux-low.c (install_software_single_step_breakpoints): Call
4149 make_cleanup_restore_current_thread. Switch current_thread to
4152 2016-07-21 Yao Qi <yao.qi@linaro.org>
4154 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4155 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4156 (clone_one_breakpoint): Likewise.
4157 (delete_reinsert_breakpoints): Change parameter to thread.
4159 (has_reinsert_breakpoints): Likewise.
4160 (uninsert_reinsert_breakpoints): Likewise.
4161 (reinsert_reinsert_breakpoints): Likewise.
4162 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4163 (delete_reinsert_breakpoints): Likewise.
4164 (reinsert_reinsert_breakpoints): Likewise.
4165 (uninsert_reinsert_breakpoints): Likewise.
4166 (has_reinsert_breakpoints): Likewise.
4168 2016-07-21 Yao Qi <yao.qi@linaro.org>
4170 * inferiors.c (get_thread_process): Make parameter const.
4171 * inferiors.h (get_thread_process): Update declaration.
4172 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4173 Add new parameters child_thread and parent_thread. Callers
4175 * mem-break.h (clone_all_breakpoints): Update declaration.
4177 2016-07-21 Yao Qi <yao.qi@linaro.org>
4179 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4180 <command_list, handler>: Remove.
4181 (struct gdb_breakpoint): New.
4182 (struct other_breakpoint): New.
4183 (struct reinsert_breakpoint): New.
4184 (is_gdb_breakpoint): New function.
4185 (any_persistent_commands): Update command_list if
4186 is_gdb_breakpoint returns true.
4187 (set_breakpoint): Create breakpoints according to their types.
4188 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4189 (set_gdb_breakpoint_1): Likewise.
4190 (set_gdb_breakpoint): Likewise.
4191 (clear_breakpoint_conditions): Change parameter type to
4192 'struct gdb_breakpoint *'.
4193 (clear_breakpoint_commands): Likewise.
4194 (clear_breakpoint_conditions_and_commands): Likewise.
4195 (add_condition_to_breakpoint): Likewise.
4196 (add_breakpoint_condition): Likewise.
4197 (add_commands_to_breakpoint): Likewise.
4198 (check_breakpoints): Check other_breakpoint.
4199 (clone_one_breakpoint): Clone breakpopint according to its type.
4200 * mem-break.h (struct gdb_breakpoint): Declare.
4201 (set_gdb_breakpoint): Update declaration.
4202 (clear_breakpoint_conditions_and_commands): Likewise.
4203 (add_breakpoint_condition): Likewise.
4204 (add_breakpoint_commands): Likewise.
4205 * server.c (process_point_options): Change parameter type to
4206 'struct gdb_breakpoint *'.
4208 2016-07-21 Yao Qi <yao.qi@linaro.org>
4210 * mem-break.c (set_breakpoint_at): Rename it to ...
4211 (set_breakpoint_type_at): ... it.
4212 (set_breakpoint_at): Call set_breakpoint_type_at.
4213 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4214 * mem-break.h (set_breakpoint_at): Update comments.
4216 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4218 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4220 (nios2_store_gregset): Likewise.
4222 2016-07-01 Pedro Alves <palves@redhat.com>
4223 Antoine Tremblay <antoine.tremblay@ericsson.com>
4225 * linux-low.c: Change interface to take the target lwp_info
4226 pointer directly and return void. Handle detaching from a zombie
4228 (linux_detach_lwp_callback): New function.
4229 (linux_detach): Detach from the leader thread after detaching from
4232 2016-06-28 Yao Qi <yao.qi@linaro.org>
4234 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4235 for variable new_offset.
4236 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4237 (aarch64_ftrace_insn_reloc_cb): Likewise.
4238 (aarch64_ftrace_insn_reloc_tb): Likewise.
4239 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4240 PRIx64 instead of PRIx32.
4242 2016-06-28 Yao Qi <yao.qi@linaro.org>
4244 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4245 (the_low_target): Install arm_get_syscall_trapinfo.
4247 2016-06-28 Yao Qi <yao.qi@linaro.org>
4249 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4251 (the_low_target): Install aarch64_get_syscall_trapinfo.
4253 2016-06-28 Yao Qi <yao.qi@linaro.org>
4255 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4257 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4258 Remove parameter sysno.
4259 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4262 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4264 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4265 (s390_emit_ne_goto): Likewise.
4266 (s390_emit_lt_goto): Likewise.
4267 (s390_emit_le_goto): Likewise.
4268 (s390_emit_gt_goto): Likewise.
4269 (s390_emit_ge_goto): Likewise.
4270 (s390x_emit_eq_goto): Likewise.
4271 (s390x_emit_ne_goto): Likewise.
4272 (s390x_emit_lt_goto): Likewise.
4273 (s390x_emit_le_goto): Likewise.
4274 (s390x_emit_gt_goto): Likewise.
4275 (s390x_emit_ge_goto): Likewise.
4276 (s390_emit_ops_impl): Mark variable static.
4277 (s390x_emit_ops): Likewise.
4279 2016-06-17 Yao Qi <yao.qi@linaro.org>
4281 * linux-low.c (handle_extended_wait): Call
4282 uninsert_reinsert_breakpoints for the parent process. Remove
4283 reinsert breakpoints from the child process. Reinsert them to
4284 the parent process when vfork is done.
4285 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4286 (reinsert_reinsert_breakpoints): New function.
4287 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4288 (reinsert_reinsert_breakpoints): Declare.
4290 2016-06-17 Yao Qi <yao.qi@linaro.org>
4292 * linux-low.c (handle_extended_wait): If the parent is doing
4293 step-over, remove the reinsert breakpoints from the forked child.
4295 2016-06-17 Yao Qi <yao.qi@linaro.org>
4297 * linux-low.c (unsuspend_all_lwps): Declare.
4298 (linux_low_filter_event): If thread exited, call finish_step_over.
4299 If step-over is finished, unsuspend other threads.
4301 2016-06-17 Yao Qi <yao.qi@linaro.org>
4303 * linux-low.c (linux_resume_one_lwp_throw): Assert
4304 has_reinsert_breakpoints returns false.
4305 * mem-break.c (delete_disabled_breakpoints): Assert
4306 bp type isn't reinsert_breakpoint.
4308 2016-06-17 Yao Qi <yao.qi@linaro.org>
4310 * linux-low.c (maybe_hw_step): New function.
4311 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4312 (finish_step_over): Switch current_thread to lwp temporarily,
4313 and assert has_reinsert_breakpoints returns true.
4314 (proceed_one_lwp): Call maybe_hw_step.
4315 * mem-break.c (has_reinsert_breakpoints): New function.
4316 * mem-break.h (has_reinsert_breakpoints): Declare.
4318 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4320 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4322 2016-05-17 Yao Qi <yao.qi@linaro.org>
4324 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4325 instead of find_inferior.
4327 2016-05-05 Yao Qi <yao.qi@linaro.org>
4329 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4330 Initialize res to zero.
4332 2016-05-05 Yao Qi <yao.qi@linaro.org>
4334 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4337 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4339 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4340 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4341 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4343 2016-04-28 Par Olsson <par.olsson@windriver.com>
4344 Simon Marchi <simon.marchi@ericsson.com>
4346 * tracepoint.c (write_inferior_int8): New function.
4347 (cmd_qtenable_disable): Write enable flag using
4348 write_inferior_int8.
4350 2016-04-25 Yao Qi <yao.qi@linaro.org>
4352 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4353 (need_step_over_p): Return zero if the LWP has pending signals
4354 can be delivered on software single step target.
4356 2016-04-25 Yao Qi <yao.qi@linaro.org>
4358 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4359 return instead of error.
4361 2016-04-22 Yao Qi <yao.qi@linaro.org>
4363 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4366 2016-04-22 Yao Qi <yao.qi@linaro.org>
4368 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4369 signal when stepping over breakpoint with software single
4372 2016-04-21 Pedro Alves <palves@redhat.com>
4374 * linux-s390-low.c (s390_collect_ptrace_register)
4375 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4377 (s390_check_regset): Use void * instead of gdb_byte *.
4379 2016-04-20 Pedro Alves <palves@redhat.com>
4381 * configure: Renegerate.
4383 2016-04-20 Yao Qi <yao.qi@linaro.org>
4385 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4386 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4388 (arm_store_gregset): Likewise.
4390 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4392 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4393 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4394 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4395 (amd64-avx-mpx-linux.c): New rules.
4396 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4397 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4398 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4399 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4400 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4401 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4402 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4403 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4404 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4405 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4406 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4407 * linux-x86-low.c (x86_linux_read_description): Add case for
4408 X86_XSTATE_AVX_MPX_MASK.
4409 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4410 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4411 init_registers_i386_avx_mpx_linux.
4412 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4413 (initialize_low_tracepoint): Call
4414 init_registers_i386_avx_mpx_linux.
4415 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4416 (initialize_low_tracepoint): Call
4417 init_registers_amd64_avx_mpx_linux.
4418 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4419 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4420 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4423 2016-04-18 Pedro Alves <palves@redhat.com>
4425 * configure: Regenerate.
4427 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4429 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4430 (aarch64_emit_sub): Likewise.
4432 2016-04-12 Pedro Alves <palves@redhat.com>
4434 * utils.c (prepare_to_throw_exception): Delete.
4436 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4438 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4440 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4442 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4444 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4446 * linux-aarch64-ipa.c: Add <elf.h> include.
4447 * linux-ppc-ipa.c: Add <elf.h> include.
4448 * linux-s390-ipa.c: Add <elf.h> include.
4450 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4452 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4453 (get_raw_reg_ptr): Likewise.
4454 (get_trace_state_variable_value_ptr): Likewise.
4455 (set_trace_state_variable_value_ptr): Likewise.
4456 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4459 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4460 Marcin Kościelnicki <koriakin@0x04.net>
4463 * linux-ppc-low.c (emit_insns): New function.
4464 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4465 (ppc_emit_prologue): New function.
4466 (ppc_emit_epilogue): New function.
4467 (ppc_emit_add): New function.
4468 (ppc_emit_sub): New function.
4469 (ppc_emit_mul): New function.
4470 (ppc_emit_lsh): New function.
4471 (ppc_emit_rsh_signed): New function.
4472 (ppc_emit_rsh_unsigned): New function.
4473 (ppc_emit_ext): New function.
4474 (ppc_emit_zero_ext): New function.
4475 (ppc_emit_log_not): New function.
4476 (ppc_emit_bit_and): New function.
4477 (ppc_emit_bit_or): New function.
4478 (ppc_emit_bit_xor): New function.
4479 (ppc_emit_bit_not): New function.
4480 (ppc_emit_equal): New function.
4481 (ppc_emit_less_signed): New function.
4482 (ppc_emit_less_unsigned): New function.
4483 (ppc_emit_ref): New function.
4484 (ppc_emit_const): New function.
4485 (ppc_emit_reg): New function.
4486 (ppc_emit_pop): New function.
4487 (ppc_emit_stack_flush): New function.
4488 (ppc_emit_swap): New function.
4489 (ppc_emit_stack_adjust): New function.
4490 (ppc_emit_call): New function.
4491 (ppc_emit_int_call_1): New function.
4492 (ppc_emit_void_call_2): New function.
4493 (ppc_emit_if_goto): New function.
4494 (ppc_emit_goto): New function.
4495 (ppc_emit_eq_goto): New function.
4496 (ppc_emit_ne_goto): New function.
4497 (ppc_emit_lt_goto): New function.
4498 (ppc_emit_le_goto): New function.
4499 (ppc_emit_gt_goto): New function.
4500 (ppc_emit_ge_goto): New function.
4501 (ppc_write_goto_address): New function.
4502 (ppc_emit_ops_impl): New static variable.
4503 (ppc64v1_emit_prologue): New function.
4504 (ppc64v2_emit_prologue): New function.
4505 (ppc64_emit_epilogue): New function.
4506 (ppc64_emit_add): New function.
4507 (ppc64_emit_sub): New function.
4508 (ppc64_emit_mul): New function.
4509 (ppc64_emit_lsh): New function.
4510 (ppc64_emit_rsh_signed): New function.
4511 (ppc64_emit_rsh_unsigned): New function.
4512 (ppc64_emit_ext): New function.
4513 (ppc64_emit_zero_ext): New function.
4514 (ppc64_emit_log_not): New function.
4515 (ppc64_emit_bit_and): New function.
4516 (ppc64_emit_bit_or): New function.
4517 (ppc64_emit_bit_xor): New function.
4518 (ppc64_emit_bit_not): New function.
4519 (ppc64_emit_equal): New function.
4520 (ppc64_emit_less_signed): New function.
4521 (ppc64_emit_less_unsigned): New function.
4522 (ppc64_emit_ref): New function.
4523 (ppc64_emit_const): New function.
4524 (ppc64v1_emit_reg): New function.
4525 (ppc64v2_emit_reg): New function.
4526 (ppc64_emit_pop): New function.
4527 (ppc64_emit_stack_flush): New function.
4528 (ppc64_emit_swap): New function.
4529 (ppc64v1_emit_call): New function.
4530 (ppc64v2_emit_call): New function.
4531 (ppc64v1_emit_int_call_1): New function.
4532 (ppc64v2_emit_int_call_1): New function.
4533 (ppc64v1_emit_void_call_2): New function.
4534 (ppc64v2_emit_void_call_2): New function.
4535 (ppc64_emit_if_goto): New function.
4536 (ppc64_emit_eq_goto): New function.
4537 (ppc64_emit_ne_goto): New function.
4538 (ppc64_emit_lt_goto): New function.
4539 (ppc64_emit_le_goto): New function.
4540 (ppc64_emit_gt_goto): New function.
4541 (ppc64_emit_ge_goto): New function.
4542 (ppc64v1_emit_ops_impl): New static variable.
4543 (ppc64v2_emit_ops_impl): New static variable.
4544 (ppc_emit_ops): New function.
4545 (linux_low_target): Wire in ppc_emit_ops.
4547 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4548 Marcin Kościelnicki <koriakin@0x04.net>
4551 * Makefile.in: Add powerpc-*-ipa.o
4552 * configure.srv: Add ipa_obj for powerpc*-linux.
4553 * linux-ppc-ipa.c: New file.
4554 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4556 (PPC_FIELD): New macro.
4557 (PPC_SEXT): New macro.
4558 (PPC_OP6): New macro.
4559 (PPC_BO): New macro.
4560 (PPC_LI): New macro.
4561 (PPC_BD): New macro.
4562 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4563 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4564 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4565 (ppc_get_thread_area): New function.
4566 (is_elfv2_inferior): New function.
4567 (gen_ds_form): New function.
4568 (GEN_STD): New macro.
4569 (GEN_STDU): New macro.
4570 (GEN_LD): New macro.
4571 (GEN_LDU): New macro.
4572 (gen_d_form): New function.
4573 (GEN_ADDI): New macro.
4574 (GEN_ADDIS): New macro.
4575 (GEN_LI): New macro.
4576 (GEN_LIS): New macro.
4577 (GEN_ORI): New macro.
4578 (GEN_ORIS): New macro.
4579 (GEN_LWZ): New macro.
4580 (GEN_STW): New macro.
4581 (GEN_STWU): New macro.
4582 (gen_xfx_form): New function.
4583 (GEN_MFSPR): New macro.
4584 (GEN_MTSPR): New macro.
4585 (GEN_MFCR): New macro.
4586 (GEN_MTCR): New macro.
4587 (GEN_SYNC): New macro.
4588 (GEN_LWSYNC): New macro.
4589 (gen_x_form): New function.
4590 (GEN_OR): New macro.
4591 (GEN_MR): New macro.
4592 (GEN_LWARX): New macro.
4593 (GEN_STWCX): New macro.
4594 (GEN_CMPW): New macro.
4595 (gen_md_form): New function.
4596 (GEN_RLDICL): New macro.
4597 (GEN_RLDICR): New macro.
4598 (gen_i_form): New function.
4600 (GEN_BL): New macro.
4601 (gen_b_form): New function.
4602 (GEN_BNE): New macro.
4603 (GEN_LOAD): New macro.
4604 (GEN_STORE): New macro.
4605 (gen_limm): New function.
4606 (gen_atomic_xchg): New function.
4607 (gen_call): New function.
4608 (ppc_relocate_instruction): New function.
4609 (ppc_install_fast_tracepoint_jump_pad): New function.
4610 (ppc_get_min_fast_tracepoint_insn_len): New function.
4611 (ppc_get_ipa_tdesc_idx): New function.
4612 (the_low_target): Wire in the new functions.
4613 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4615 * linux-ppc-tdesc.h: New file.
4617 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4619 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4620 (alloc_jump_pad_buffer): New function.
4621 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4622 (alloc_jump_pad_buffer): New function.
4623 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4624 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4625 (alloc_jump_pad_buffer): New function.
4626 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4627 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4628 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4629 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4631 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4633 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4634 * linux-amd64-ipa.c: Likewise.
4635 * linux-i386-ipa.c: Likewise.
4636 * linux-s390-ipa.c: Likewise.
4637 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4638 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4639 set_trace_state_variable_value_ptr.
4640 (struct ipa_sym_addresses): Likewise.
4641 (symbol_list): Likewise.
4642 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4643 accessing gdb_collect directly.
4644 (gdb_collect_ptr_type): New typedef.
4645 (get_raw_reg_ptr_type): New typedef.
4646 (get_trace_state_variable_value_ptr_type): New typedef.
4647 (set_trace_state_variable_value_ptr_type): New typedef.
4648 (gdb_collect_ptr): New global.
4649 (get_raw_reg_ptr): New global.
4650 (get_trace_state_variable_value_ptr): New global.
4651 (set_trace_state_variable_value_ptr): New global.
4652 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4653 accessing get_raw_reg directly.
4654 (get_get_tsv_func_addr): Likewise for
4655 get_trace_state_variable_value_ptr.
4656 (get_set_tsv_func_addr): Likewise for
4657 set_trace_state_variable_value_ptr.
4658 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4660 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4662 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4664 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4666 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4668 (relocate_instruction): Remove own_buf.
4669 * server.c (own_buf): Make global.
4670 (handle_v_requests): Make global.
4671 * server.h (own_buf): New declaration.
4672 (handle_v_requests): New prototype.
4674 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4677 * linux-s390-low.c (add_insns): New function.
4678 (s390_emit_prologue): New function.
4679 (s390_emit_epilogue): New function.
4680 (s390_emit_add): New function.
4681 (s390_emit_sub): New function.
4682 (s390_emit_mul): New function.
4683 (s390_emit_lsh): New function.
4684 (s390_emit_rsh_signed): New function.
4685 (s390_emit_rsh_unsigned): New function.
4686 (s390_emit_ext): New function.
4687 (s390_emit_log_not): New function.
4688 (s390_emit_bit_and): New function.
4689 (s390_emit_bit_or): New function.
4690 (s390_emit_bit_xor): New function.
4691 (s390_emit_bit_not): New function.
4692 (s390_emit_equal): New function.
4693 (s390_emit_less_signed): New function.
4694 (s390_emit_less_unsigned): New function.
4695 (s390_emit_ref): New function.
4696 (s390_emit_if_goto): New function.
4697 (s390_emit_goto): New function.
4698 (s390_write_goto_address): New function.
4699 (s390_emit_litpool): New function.
4700 (s390_emit_const): New function.
4701 (s390_emit_call): New function.
4702 (s390_emit_reg): New function.
4703 (s390_emit_pop): New function.
4704 (s390_emit_stack_flush): New function.
4705 (s390_emit_zero_ext): New function.
4706 (s390_emit_swap): New function.
4707 (s390_emit_stack_adjust): New function.
4708 (s390_emit_set_r2): New function.
4709 (s390_emit_int_call_1): New function.
4710 (s390_emit_void_call_2): New function.
4711 (s390_emit_eq_goto): New function.
4712 (s390_emit_ne_goto): New function.
4713 (s390_emit_lt_goto): New function.
4714 (s390_emit_le_goto): New function.
4715 (s390_emit_gt_goto): New function.
4716 (s390_emit_ge_goto): New function.
4717 (s390x_emit_prologue): New function.
4718 (s390x_emit_epilogue): New function.
4719 (s390x_emit_add): New function.
4720 (s390x_emit_sub): New function.
4721 (s390x_emit_mul): New function.
4722 (s390x_emit_lsh): New function.
4723 (s390x_emit_rsh_signed): New function.
4724 (s390x_emit_rsh_unsigned): New function.
4725 (s390x_emit_ext): New function.
4726 (s390x_emit_log_not): New function.
4727 (s390x_emit_bit_and): New function.
4728 (s390x_emit_bit_or): New function.
4729 (s390x_emit_bit_xor): New function.
4730 (s390x_emit_bit_not): New function.
4731 (s390x_emit_equal): New function.
4732 (s390x_emit_less_signed): New function.
4733 (s390x_emit_less_unsigned): New function.
4734 (s390x_emit_ref): New function.
4735 (s390x_emit_if_goto): New function.
4736 (s390x_emit_const): New function.
4737 (s390x_emit_call): New function.
4738 (s390x_emit_reg): New function.
4739 (s390x_emit_pop): New function.
4740 (s390x_emit_stack_flush): New function.
4741 (s390x_emit_zero_ext): New function.
4742 (s390x_emit_swap): New function.
4743 (s390x_emit_stack_adjust): New function.
4744 (s390x_emit_int_call_1): New function.
4745 (s390x_emit_void_call_2): New function.
4746 (s390x_emit_eq_goto): New function.
4747 (s390x_emit_ne_goto): New function.
4748 (s390x_emit_lt_goto): New function.
4749 (s390x_emit_le_goto): New function.
4750 (s390x_emit_gt_goto): New function.
4751 (s390x_emit_ge_goto): New function.
4752 (s390_emit_ops): New function.
4753 (struct linux_target_ops): Fill in emit_ops hook.
4755 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4758 * Makefile.in: Add s390 IPA files.
4759 * configure.srv: Build IPA for s390.
4760 * linux-s390-ipa.c: New file.
4761 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4762 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4763 (tdesc_s390_linux32): Likewise.
4764 (init_registers_s390_linux32v1): Likewise.
4765 (tdesc_s390_linux32v1): Likewise.
4766 (init_registers_s390_linux32v2): Likewise.
4767 (tdesc_s390_linux32v2): Likewise.
4768 (init_registers_s390_linux64): Likewise.
4769 (tdesc_s390_linux64): Likewise.
4770 (init_registers_s390_linux64v1): Likewise.
4771 (tdesc_s390_linux64v1): Likewise.
4772 (init_registers_s390_linux64v2): Likewise.
4773 (tdesc_s390_linux64v2): Likewise.
4774 (init_registers_s390_te_linux64): Likewise.
4775 (tdesc_s390_te_linux64): Likewise.
4776 (init_registers_s390_vx_linux64): Likewise.
4777 (tdesc_s390_vx_linux64): Likewise.
4778 (init_registers_s390_tevx_linux64): Likewise.
4779 (tdesc_s390_tevx_linux64): Likewise.
4780 (init_registers_s390x_linux64): Likewise.
4781 (tdesc_s390x_linux64): Likewise.
4782 (init_registers_s390x_linux64v1): Likewise.
4783 (tdesc_s390x_linux64v1): Likewise.
4784 (init_registers_s390x_linux64v2): Likewise.
4785 (tdesc_s390x_linux64v2): Likewise.
4786 (init_registers_s390x_te_linux64): Likewise.
4787 (tdesc_s390x_te_linux64): Likewise.
4788 (init_registers_s390x_vx_linux64): Likewise.
4789 (tdesc_s390x_vx_linux64): Likewise.
4790 (init_registers_s390x_tevx_linux64): Likewise.
4791 (tdesc_s390x_tevx_linux64): Likewise.
4792 (have_hwcap_s390_vx): New static variable.
4793 (s390_arch_setup): Fill have_hwcap_s390_vx.
4794 (s390_get_thread_area): New function.
4795 (s390_ft_entry_gpr_esa): New const.
4796 (s390_ft_entry_gpr_zarch): New const.
4797 (s390_ft_entry_misc): New const.
4798 (s390_ft_entry_fr): New const.
4799 (s390_ft_entry_vr): New const.
4800 (s390_ft_main_31): New const.
4801 (s390_ft_main_64): New const.
4802 (s390_ft_exit_fr): New const.
4803 (s390_ft_exit_vr): New const.
4804 (s390_ft_exit_misc): New const.
4805 (s390_ft_exit_gpr_esa): New const.
4806 (s390_ft_exit_gpr_zarch): New const.
4807 (append_insns): New function.
4808 (s390_relocate_instruction): New function.
4809 (s390_install_fast_tracepoint_jump_pad): New function.
4810 (s390_get_min_fast_tracepoint_insn_len): New function.
4811 (s390_get_ipa_tdesc_idx): New function.
4812 (struct linux_target_ops): Wire in the above functions.
4813 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4814 * linux-s390-tdesc.h: New file.
4816 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4818 * linux-s390-low.c (s390_supports_tracepoints): New function.
4819 (struct linux_target_ops): Fill supports_tracepoints hook.
4821 2016-03-18 Yao Qi <yao.qi@linaro.org>
4823 * linux-low.c (lwp_signal_can_be_delivered): New function.
4824 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4826 2016-03-18 Yao Qi <yao.qi@linaro.org>
4828 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4829 0 if signal is enqueued. Remove 'signal' from one debugging
4830 message. Move one debugging message to some lines below.
4831 Remove code setting 'signal' to 0.
4833 2016-03-18 Yao Qi <yao.qi@linaro.org>
4835 * linux-low.c (linux_low_filter_event): Remove redundant
4836 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4838 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4840 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4841 (struct linux_target_ops): Wire in the above.
4843 2016-03-03 Yao Qi <yao.qi@linaro.org>
4845 * linux-low.c: Update comments to start_step_over.
4847 2016-03-03 Yao Qi <yao.qi@linaro.org>
4850 * linux-low.c (handle_extended_wait): Set child suspended
4851 if event_lwp->bp_reinsert isn't zero.
4853 2016-03-02 Yao Qi <yao.qi@linaro.org>
4855 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4856 enqueue_pending_signal.
4858 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4860 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4863 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4865 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4866 (s390_regmap_3264) [!__s390x__]: New global.
4867 (s390_collect_ptrace_register): Skip map entries containing -1.
4868 (s390_supply_ptrace_register): Ditto.
4869 (s390_fill_gprs_high): New function.
4870 (s390_store_gprs_high): New function.
4871 (s390_regsets): Add NT_S390_HIGH_GPRS.
4872 (s390_get_hwcap): Enable on 31-bit.
4873 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4874 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4875 Detect NT_S390_HIGH_GPRS.
4876 (s390_usrregs_info_3264): Enable on 31-bit.
4877 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4878 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4880 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4883 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4884 * configure.srv: Ditto.
4885 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4886 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4887 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4888 (init_registers_amd64_linux): Remove prototype.
4889 (tdesc_amd64_linux): Remove declaration.
4890 (get_ipa_tdesc): New function.
4891 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4892 initialize remaining tdescs.
4893 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4894 (init_registers_i386_linux): Remove prototype.
4895 (tdesc_i386_linux): Remove declaration.
4896 (get_ipa_tdesc): New function.
4897 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4898 initialize remaining tdescs.
4899 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4900 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4901 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4902 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4903 (x86_get_ipa_tdesc_idx): New function.
4904 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4905 * linux-x86-tdesc.h: New file.
4906 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4907 (target_get_ipa_tdesc_idx): New macro.
4908 * tracepoint.c (ipa_tdesc_idx): New macro.
4909 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4910 (symbol_list): Add ipa_tdesc_idx.
4911 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4912 (ipa_tdesc): Remove.
4913 (ipa_tdesc_idx): New variable.
4914 (get_context_regcache): Use get_ipa_tdesc.
4915 (gdb_collect): Ditto.
4917 * tracepoint.h (get_ipa_tdesc): New prototype.
4918 (ipa_tdesc): Remove.
4920 2016-02-24 Pedro Alves <palves@redhat.com>
4922 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4923 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4924 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4925 Factor out common code between the USE_SIGTRAP_SIGINFO and
4926 !USE_SIGTRAP_SIGINFO blocks.
4927 (linux_low_filter_event): Call save_stop_reason instead of
4928 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4930 (linux_wait_1): Update comments.
4932 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4934 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4935 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4936 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4937 ppc_insert_point, ppc_remove_point.
4939 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4941 * linux-s390-low.c (s390_supports_z_point_type): New function.
4942 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4944 2016-02-16 Yao Qi <yao.qi@linaro.org>
4946 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4947 PC. Get pc from regcache_read_pc.
4949 2016-02-12 Yao Qi <yao.qi@linaro.org>
4951 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4952 or linux_get_pc_32bit.
4953 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4955 2016-02-12 Yao Qi <yao.qi@linaro.org>
4957 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4958 arm_linux_get_next_pcs_fixup.
4960 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4962 * tracepoint.c (x_tracepoint_action_download): Change
4963 write_inferior_data_ptr to write_inferior_data_pointer.
4964 (cmd_qtstart): Likewise.
4965 (write_inferior_data_ptr): Remove.
4966 (download_agent_expr): Change write_inferior_data_ptr to
4967 write_inferior_data_pointer.
4968 (download_tracepoint_1): Likewise.
4969 (download_tracepoint): Likewise.
4970 (download_trace_state_variables): Likewise.
4972 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4973 Marcin Kościelnicki <koriakin@0x04.net>
4975 * tracepoint.c (struct tracepoint_action_ops): Remove.
4976 (struct tracepoint_action): Remove ops.
4977 (m_tracepoint_action_download, r_tracepoint_action_download)
4978 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4979 size and offset accordingly.
4980 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4981 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4982 (tracepoint_action_send, tracepoint_action_download): New functions.
4983 Helpers for trace action handlers.
4984 (add_tracepoint_action): Remove setup actions ops.
4985 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4987 2016-02-10 Yao Qi <yao.qi@linaro.org>
4989 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4991 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4993 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4995 * configure: Regenerate.
4997 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4999 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5000 void * to gdb_byte *.
5001 * linux-low.c (siginfo_fixup): Likewise.
5002 (linux_xfer_siginfo): Likewise.
5003 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5005 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5007 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5009 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5011 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5013 * linux-x86-low.c [__x86_64__]: Include
5014 "nat/amd64-linux-siginfo.h".
5015 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5016 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5017 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5018 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5019 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5020 (cpt_si_fd, si_timerid, si_overrun): Move from
5021 nat/amd64-linux-siginfo.c.
5022 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5024 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5026 * server.c (skip_to_semicolon): Remove.
5027 (process_point_options): Use strchrnul instead of
5030 2016-01-26 Yao Qi <yao.qi@linaro.org>
5032 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5033 * linux-low.c (install_software_single_step_breakpoints): Don't
5034 call regcache_read_pc.
5035 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5038 2016-01-26 Yao Qi <yao.qi@linaro.org>
5040 * linux-low.c (install_software_single_step_breakpoints): Call
5041 regcache_read_pc instead of get_pc.
5043 2016-01-26 Yao Qi <yao.qi@linaro.org>
5045 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5046 (unblock_async_io): Rename to ...
5047 (block_unblock_async_io): ... it. New function.
5048 (enable_async_io): Don't install SIGIO handler. Unblock it
5050 (disable_async_io): Don't ignore SIGIO. Block it instead.
5051 (initialize_async_io): Install SIGIO handler. Don't call
5054 2016-01-26 Yao Qi <yao.qi@linaro.org>
5056 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5057 first character is '\003', call *the_target->request_interrupt.
5059 2016-01-25 Yao Qi <yao.qi@linaro.org>
5061 * remote-utils.c (new_thread_notify): Remove.
5062 (dead_thread_notify): Likewise.
5063 * remote-utils.h (new_thread_notify): Remove declaration.
5064 (dead_thread_notify): Likewise.
5066 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5068 * gdb.trace/pending.exp: Fix expected message on continue.
5070 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5072 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5073 it works properly on big-endian machines where sizeof (CORE_ADDR)
5076 2016-01-21 Pedro Alves <palves@redhat.com>
5078 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5079 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5080 * configure: Regenerate.
5082 2016-01-21 Yao Qi <yao.qi@linaro.org>
5084 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5085 is_thumb and set it according to CPSR saved on the stack.
5086 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5087 arm_sigreturn_next_pc.
5089 2016-01-18 Yao Qi <yao.qi@linaro.org>
5091 * linux-low.c (linux_set_pc_64bit): New function.
5092 (linux_get_pc_64bit): New function.
5093 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5095 * linux-sparc-low.c (debug_threads): Remove declaration.
5096 (sparc_get_pc): Remove.
5097 (the_low_target): Use linux_get_pc_64bit instead of
5099 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5100 (the_low_target): Use linux_get_pc_64bit and
5103 2016-01-18 Yao Qi <yao.qi@linaro.org>
5105 * linux-arm-low.c (debug_threads): Remove declaration.
5106 (arm_get_pc, arm_set_pc): Remove.
5107 (the_low_target): Use linux_get_pc_32bit and
5109 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5110 (the_low_target): Use linux_get_pc_32bit and
5112 * linux-cris-low.c (debug_threads): Remove declaration.
5113 (cris_get_pc, cris_set_pc,): Remove.
5114 (the_low_target): Use linux_get_pc_32bit and
5116 * linux-crisv32-low.c (debug_threads): Remove declaration.
5117 (cris_get_pc, cris_set_pc): Remove.
5118 (the_low_target): Use linux_get_pc_32bit and
5120 * linux-low.c: Include inttypes.h.
5121 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5122 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5123 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5124 (the_low_target): Use linux_get_pc_32bit and
5126 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5127 (the_low_target): Use linux_get_pc_32bit and
5129 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5130 (the_low_target): Use linux_get_pc_32bit and
5132 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5133 (the_low_target): Use linux_get_pc_32bit and
5135 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5136 (the_low_target): Use linux_get_pc_32bit and
5139 2016-01-18 Gary Benson <gbenson@redhat.com>
5141 * configure.ac (AC_FUNC_FORK): New check.
5142 * config.in: Regenerate.
5143 * configure: Likewise.
5145 2016-01-14 Yao Qi <yao.qi@linaro.org>
5147 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5148 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5149 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5150 arm_get_next_pcs_ctor.
5152 2016-01-12 Josh Stone <jistone@redhat.com>
5153 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5155 * inferiors.h: Include "gdb_vecs.h".
5156 (struct process_info): Add syscalls_to_catch.
5157 * inferiors.c (remove_process): Free syscalls_to_catch.
5158 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5159 syscall_return stops.
5160 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5161 * server.c (handle_general_set): Handle QCatchSyscalls.
5162 (handle_query): Report support for QCatchSyscalls.
5163 * target.h (struct target_ops): Add supports_catch_syscall.
5164 (target_supports_catch_syscall): New macro.
5165 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5166 (struct lwp_info): Add syscall_state.
5167 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5168 Maintain syscall_state and syscalls_to_catch across exec.
5169 (get_syscall_trapinfo): New function, proxy to the_low_target.
5170 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5171 (linux_low_filter_event): Toggle syscall_state entry/return for
5172 syscall traps, and set it ignored for all others.
5173 (gdb_catching_syscalls_p): New function.
5174 (gdb_catch_this_syscall_p): New function.
5175 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5176 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5177 (linux_supports_catch_syscall): New function.
5178 (linux_target_ops): Install it.
5179 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5180 (the_low_target): Install it.
5182 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5184 * acinclude.m4: Include new ../warning.m4 file.
5185 * configure: Regenerated.
5186 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5188 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5190 * ax.c (is_goto_target): Mark static.
5191 * linux-low.c (register_addr): Likewise.
5192 (linux_fetch_registers, linux_store_registers): Likewise.
5193 * mem-break.c (any_persistent_commands): Fix old prototype.
5194 (add_commands_to_breakpoint): Mark static.
5195 * regcache.c (find_register_by_name): Delete unused func.
5196 * remote-utils.c (hex_or_minus_one): Mark static.
5197 * server.c (monitor_show_help): Mark static.
5198 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5199 handle_v_requests): Likewise.
5201 2016-01-12 Pedro Alves <palves@redhat.com>
5203 Remove use of the registered trademark symbol throughout.
5205 2016-01-08 Yao Qi <yao.qi@linaro.org>
5207 * remote-utils.c (getpkt): If c is '\003', call target hook
5210 2016-01-06 Yao Qi <yao.qi@linaro.org>
5212 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5213 linux-aarch32-low.c.
5214 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5215 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5216 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5217 (thumb2_breakpoint): Declare.
5218 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5219 linux-aarch32-low.h.
5220 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5221 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5222 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5224 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5226 * gdbreplay.c (gdbreplay_version): Change copyright year in
5228 * server.c (gdbserver_version): Likewise.
5230 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5232 * server.c (crc32_table): Delete.
5233 (crc32): Use libiberty's xcrc32 function.
5235 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5237 * lynx-low.c (lynx_delete_thread_callback): New function.
5238 (lynx_mourn): Properly delete our process and all of its
5239 threads. Remove call to clear_inferiors.
5241 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5243 * target.c (thread_search_callback): Add check that
5244 the thread_stopped target callback is not NULL before
5247 2015-12-21 Yao Qi <yao.qi@linaro.org>
5249 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5252 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5254 * server.c (handle_query): Call target_supports_software_single_step.
5256 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5258 * linux-low.c (single_step): New function.
5259 (linux_resume_one_lwp_throw): Call single_step.
5260 (start_step_over): Likewise.
5262 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5264 * Makefile.in (SFILES): Append arch/arm-linux.c,
5265 arch/arm-get-next-pcs.c.
5266 (arm-linux.o): New rule.
5267 (arm-get-next-pcs.o): New rule.
5268 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5270 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5271 to linux-aarch32-low.c.
5272 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5273 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5274 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5275 (thumb2_breakpoint_len): Likewise.
5276 (arm_is_thumb_mode): Make non-static.
5277 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5278 from linux-aarch32-low.c.
5279 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5280 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5281 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5282 (thumb2_breakpoint_len): Likewise.
5283 (arm_is_thumb_mode): New declaration.
5284 * linux-arm-low.c: Include arch/arm-linux.h
5285 aarch/arm-get-next-pcs.h, sys/syscall.h.
5286 (get_next_pcs_ops): New struct.
5287 (get_next_pcs_addr_bits_remove): New function.
5288 (get_next_pcs_is_thumb): New function.
5289 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5290 (arm_sigreturn_next_pc): Likewise.
5291 (get_next_pcs_syscall_next_pc): Likewise.
5292 (arm_gdbserver_get_next_pcs): Likewise.
5293 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5295 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5296 * server.h: Include gdb_vecs.h.
5298 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5300 * Makefile.in (SFILES): Append common/common-regcache.c.
5301 (OBS): Append common-regcache.o.
5302 (common-regcache.o): New rule.
5303 * regcache.c (init_register_cache): Initialize cache to
5305 (regcache_raw_read_unsigned): New function.
5306 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5307 register_status enum.
5309 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5311 * linux-aarch64-low.c (the_low_targets): Rename
5312 breakpoint_reinsert_addr to get_next_pcs.
5313 * linux-arm-low.c (the_low_targets): Likewise.
5314 * linux-bfin-low.c (the_low_targets): Likewise.
5315 * linux-cris-low.c (the_low_targets): Likewise.
5316 * linux-crisv32-low.c (the_low_targets): Likewise.
5317 * linux-low.c (can_software_single_step): Likewise.
5318 (install_software_single_step_breakpoints): New function.
5319 (start_step_over): Use install_software_single_step_breakpoints.
5320 * linux-low.h: New CORE_ADDR vector.
5321 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5323 * linux-mips-low.c (the_low_targets): Likewise.
5324 * linux-nios2-low.c (the_low_targets): Likewise.
5325 * linux-sparc-low.c (the_low_targets): Likewise.
5327 2015-12-17 Pedro Alves <palves@redhat.com>
5329 * linux-low.c (linux_kill_one_lwp): Remove references to
5331 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5333 (linux_init_signals): Delete.
5334 (initialize_low): Adjust.
5335 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5337 2015-12-16 Pedro Alves <palves@redhat.com>
5339 * configure.ac (compiler warning flags): When testing a
5340 -Wno-foo option, check whether -Wfoo works instead.
5341 * configure: Regenerate.
5343 2015-12-11 Don Breazeal <donb@codesourcery.com>
5345 * server.c (process_serial_event): Don't exit from gdbserver
5346 in remote mode if there are still active inferiors.
5348 2015-12-11 Yao Qi <yao.qi@linaro.org>
5350 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5351 arm_breakpoint_at if the process is 32-bit.
5353 2015-12-11 Yao Qi <yao.qi@linaro.org>
5355 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5358 2015-12-07 Yao Qi <yao.qi@linaro.org>
5360 * configure.srv: Append arm.o to srv_tgtobj for
5361 aarch64*-*-linux* target.
5362 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5363 from linux-arm-low.c.
5364 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5365 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5366 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5367 (thumb2_breakpoint_len): Likewise.
5368 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5369 (arm_breakpoint_kinds): Likewise.
5370 (arm_breakpoint_kind_from_pc): Likewise.
5371 (arm_sw_breakpoint_from_kind): Likewise.
5372 (arm_breakpoint_kind_from_current_state): Likewise.
5373 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5374 (arm_sw_breakpoint_from_kind): Declare.
5375 (arm_breakpoint_kind_from_current_state): Declare.
5376 (arm_breakpoint_at): Declare.
5377 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5378 arm_sw_breakpoint_from_kind if process is 32-bit.
5379 (aarch64_breakpoint_kind_from_pc): New function.
5380 (aarch64_breakpoint_kind_from_current_state): New function.
5381 (the_low_target): Initialize fields breakpoint_kind_from_pc
5382 and breakpoint_kind_from_current_state.
5383 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5384 linux-aarch32-low.c.
5385 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5386 (arm_breakpoint, arm_breakpoint_len): Likewise.
5387 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5388 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5389 (arm_is_thumb_mode): Likewise.
5390 (arm_breakpoint_at): Likewise.
5391 (arm_breakpoint_kind_from_pc): Likewise.
5392 (arm_sw_breakpoint_from_kind): Likewise.
5393 (arm_breakpoint_kind_from_current_state): Likewise.
5396 2015-08-04 Yao Qi <yao.qi@linaro.org>
5398 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5399 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5400 * server.c (extended_protocol): Remove "static".
5401 * server.h (extended_protocol): Declare it.
5403 2015-12-04 Josh Stone <jistone@redhat.com>
5405 * target.h (struct target_ops) <arch_setup>: Rename to ...
5406 (struct target_ops) <post_create_inferior>: ... this.
5407 (target_arch_setup): Rename to ...
5408 (target_post_create_inferior): ... this, calling post_create_inferior.
5409 * server.c (start_inferior): Update target_arch_setup calls to
5410 target_post_create_inferior.
5411 * linux-low.c (linux_low_ptrace_options): Forward declare.
5412 (linux_arch_setup): Update its comment for general use.
5413 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5414 (struct linux_target_ops): Use linux_post_create_inferior.
5415 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5416 to post_create_inferior.
5417 * nto-low.c (struct nto_target_ops): Likewise.
5418 * spu-low.c (struct spu_target_ops): Likewise.
5419 * win32-low.c (struct win32_target_ops): Likewise.
5421 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5423 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5425 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5427 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5428 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5429 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5430 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5431 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5432 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5433 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5434 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5435 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5436 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5437 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5438 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5440 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5442 * linux-low.c (linux_look_up_symbols): Don't call
5443 linux_supports_traceclone.
5444 * linux-low.h (thread_db_init): Remove use_events argument.
5445 * thread-db.c (thread_db_use_event): Remove global variable.
5446 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5447 (struct thread_db) <td_create_bp>: Remove field.
5448 (thread_db_create_event): Remove function.
5449 (thread_db_enable_reporting): Likewise.
5450 (find_one_thread): Don't check for thread_db_use_events.
5451 (attach_thread): Likewise.
5452 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5453 (try_thread_db_load_1): Don't check for thread_db_use_events.
5454 (thread_db_init): Remove use_events argument and thread events
5456 (remove_thread_event_breakpoints): Remove function.
5457 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5459 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5461 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5463 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5464 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5465 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5466 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5467 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5469 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5471 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5472 * linux-low.c (can_hardware_single_step): Use
5473 supports_hardware_single_step.
5474 (can_software_single_step): New function.
5475 (start_step_over): Call can_software_single_step.
5476 (linux_supports_hardware_single_step): New function.
5477 (struct target_ops) <supports_software_single_step>: Initialize.
5478 * linux-low.h (struct linux_target_ops)
5479 <supports_hardware_single_step>: Initialize.
5480 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5481 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5482 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5483 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5484 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5485 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5486 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5487 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5488 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5489 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5491 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5492 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5494 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5496 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5498 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5499 * target.h (struct target_ops): <supports_software_single_step>:
5501 (target_supports_software_single_step): New macro.
5503 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5505 * linux-low.c (linux_wait_1): Fix pc advance condition.
5506 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5507 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5509 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5511 * linux-arm-low.c (arm_is_thumb_mode): New function.
5512 (arm_breakpoint_at): Use arm_is_thumb_mode.
5513 (arm_breakpoint_kind_from_current_state): New function.
5514 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5516 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5517 (linux_breakpoint_kind_from_current_state): New function.
5518 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5519 * linux-low.h (struct linux_target_ops)
5520 <breakpoint_kind_from_current_state>: New field.
5521 * target.h (struct target_ops): Likewise.
5522 (target_breakpoint_kind_from_current_state): New macro.
5524 2015-11-30 Pedro Alves <palves@redhat.com>
5526 * linux-low.c (linux_resume): Wake up the event loop before
5529 2015-11-30 Pedro Alves <palves@redhat.com>
5531 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5533 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5535 * target.c (struct thread_search): New structure.
5536 (thread_search_callback): New function.
5537 (prev_general_thread): New global.
5538 (prepare_to_access_memory, done_accessing_memory): New functions.
5539 * target.h (prepare_to_access_memory, done_accessing_memory):
5540 Replace macros with function declarations.
5542 2015-11-30 Pedro Alves <palves@redhat.com>
5545 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5546 report TARGET_WAITKIND_NO_RESUMED.
5547 * remote-utils.c (prepare_resume_reply): Handle
5548 TARGET_WAITKIND_NO_RESUMED.
5549 * server.c (report_no_resumed): New global.
5550 (handle_query) <qSupported>: Handle "no-resumed+". Report
5551 "no-resumed+" support.
5552 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5553 return error if the client doesn't support no-resumed events.
5554 (push_stop_notification): New function.
5555 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5556 events if the client supports them.
5558 2015-11-30 Pedro Alves <palves@redhat.com>
5560 * linux-low.c (thread_still_has_status_pending_p): Don't check
5562 (lwp_resumed): New function.
5563 (status_pending_p_callback): Return early if the LWP is not
5564 supposed to be resumed.
5566 2015-11-30 Pedro Alves <palves@redhat.com>
5568 * linux-low.c (handle_extended_wait): Assert that the LWP's
5569 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5570 thread create events, leave the new child's status pending.
5571 (linux_low_filter_event): If GDB wants to hear about thread exit
5572 events, leave the LWP marked dead and don't delete it.
5573 (linux_wait_for_event_filtered): Don't check for thread exit.
5574 (filter_exit_event): New function.
5575 (linux_wait_1): Use it, when returning an exit event.
5576 (linux_resume_one_lwp_throw): Assert that the LWP's
5577 waitstatus is TARGET_WAITKIND_IGNORE.
5578 * remote-utils.c (prepare_resume_reply): Handle
5579 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5580 * server.c (report_thread_events): New global.
5581 (handle_general_set): Handle QThreadEvents.
5582 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5583 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5584 TARGET_WAITKIND_THREAD_EXITED.
5585 * server.h (report_thread_events): Declare.
5587 2015-11-30 Pedro Alves <palves@redhat.com>
5589 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5590 the thread's last_resume_kind was resume_stop.
5592 2015-11-30 Pedro Alves <palves@redhat.com>
5594 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5597 2015-11-30 Pedro Alves <palves@redhat.com>
5599 * server.c (handle_v_requests): Handle vCtrlC.
5601 2015-11-30 Pedro Alves <palves@redhat.com>
5603 * gdbthread.h (find_any_thread_of_pid): Declare.
5604 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5606 * server.c (handle_query): If current_thread is NULL, look for
5607 another thread of the selected process.
5609 2015-11-26 Daniel Colascione <dancol@dancol.org>
5610 Simon Marchi <simon.marchi@ericsson.com>
5612 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5613 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5615 * target.h (struct target_ops) <thread_name>: New field.
5616 (target_thread_name): New macro.
5618 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5620 * regcache.h (regcache_invalidate_pid): Add declaration.
5621 * regcache.c (regcache_invalidate_pid): New function, extracted
5622 from regcache_invalidate.
5623 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5624 Add trivial documentation comment.
5625 * lynx-low.c: Use regcache_invalidate_pid instead of
5626 regcache_invalidate.
5628 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5630 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5631 and Elf64_auxv_t if the target is Android.
5633 2015-11-22 Doug Evans <xdje42@gmail.com>
5635 * target.h: #include <sys/types.h>.
5637 2015-11-19 Pedro Alves <palves@redhat.com>
5639 * linux-low.c (linux_process_qsupported): Change prototype.
5641 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5643 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5644 and adjust to loop over all features.
5645 * server.c (handle_query) <qSupported>: Adjust to call
5646 target_process_qsupported once, passing it a vector of unprocessed
5648 * target.h (struct target_ops) <process_qsupported>: Change
5650 (target_process_qsupported): Adjust.
5652 2015-11-19 Pedro Alves <palves@redhat.com>
5654 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5656 * configure: Regenerate.
5658 2015-11-19 Pedro Alves <palves@redhat.com>
5660 * configure: Regenerate.
5662 2015-11-19 Yao Qi <yao.qi@linaro.org>
5664 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5667 2015-11-19 Yao Qi <yao.qi@linaro.org>
5669 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5670 (struct aarch64_operand): Move enum out.
5672 2015-11-19 Yao Qi <yao.qi@linaro.org>
5674 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5675 struct user_fpsimd_state *.
5676 (aarch64_store_fpregset): Likewise.
5678 2015-11-19 Yao Qi <yao.qi@linaro.org>
5680 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5681 struct user_pt_regs *.
5682 (aarch64_store_gregset): Likewise.
5684 2015-11-18 Pedro Alves <palves@redhat.com>
5686 * Makefile.in (all_object_files): Add $IPA_OBJS.
5688 2015-11-17 Pedro Alves <palves@redhat.com>
5690 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5691 GDB_SIGNAL_0 and gdb_signal_to_string.
5693 2015-11-17 Pedro Alves <palves@redhat.com>
5695 * win32-low.c (handle_output_debug_string): Remove parameter.
5696 (win32_kill): Remove our_status local and adjust call to
5697 handle_output_debug_string.
5698 (get_child_debug_event): Adjust call to
5699 handle_output_debug_string.
5701 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5703 * linux-mips-low.c (mips_fill_gregset): Add cast.
5704 (mips_store_gregset): Likewise.
5705 (mips_fill_fpregset): Likewise.
5706 (mips_store_fpregset): Likewise.
5708 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5710 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5713 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5715 * linux-mips-low.c (mips_linux_new_thread): Change type of
5716 watch_type to enum target_hw_bp_type.
5718 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5720 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5721 Change return type to arm_hwbp_type.
5723 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5725 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5726 (arm_store_gregset): Likewise.
5727 * linux-arm-low.c (arm_get_hwcap): Likewise.
5728 (arm_read_description): Likewise.
5730 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5732 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5734 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5736 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5737 (ppc_fill_vsxregset): Likewise.
5738 (ppc_store_vsxregset): Likewise.
5739 (ppc_fill_vrregset): Likewise.
5740 (ppc_store_vrregset): Likewise.
5741 (ppc_fill_evrregset): Likewise.
5742 (ppc_store_evrregset): Likewise.
5744 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5746 * linux-ppc-low.c (ppc_usrregs_info): Remove
5747 forward-declaration.
5748 (ppc_arch_setup): Move lower in file.
5750 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5752 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5753 (ps_pdwrite): Likewise.
5755 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5757 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5758 to after assert checks.
5760 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5762 * proc-service.c (ps_pdread): Add/adjust casts.
5763 (ps_pdwrite): Add/adjust casts.
5765 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5767 * server.c (handle_search_memory_1): Cast return value of
5770 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5772 * server.c (write_qxfer_response): Change type of data to
5775 2015-10-29 Pedro Alves <palves@redhat.com>
5777 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5779 2015-10-29 Pedro Alves <palves@redhat.com>
5781 * tracepoint.c (clear_installed_tracepoints): Add casts.
5783 2015-10-29 Pedro Alves <palves@redhat.com>
5785 * server.c (handle_v_cont, process_serial_event): Add enum
5786 gdb_signal casts to signal parsing code.
5788 2015-10-29 Pedro Alves <palves@redhat.com>
5790 * linux-low.h (NULL_REGSET): Define.
5791 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5792 * linux-arm-low.c (arm_regsets): Likewise.
5793 * linux-crisv32-low.c (cris_regsets): Likewise.
5794 * linux-m68k-low.c (m68k_regsets): Likewise.
5795 * linux-mips-low.c (mips_regsets): Likewise.
5796 * linux-nios2-low.c (nios2_regsets): Likewise.
5797 * linux-ppc-low.c (ppc_regsets): Likewise.
5798 * linux-s390-low.c (s390_regsets): Likewise.
5799 * linux-sh-low.c (sh_regsets): Likewise.
5800 * linux-sparc-low.c (sparc_regsets): Likewise.
5801 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5802 * linux-tile-low.c (tile_regsets): Likewise.
5803 * linux-x86-low.c (x86_regsets): Likewise.
5804 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5806 2015-10-29 Pedro Alves <palves@redhat.com>
5808 * linux-low.h (NULL_REGSET): Define.
5809 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5810 * linux-arm-low.c (arm_regsets): Likewise.
5811 * linux-crisv32-low.c (cris_regsets): Likewise.
5812 * linux-m68k-low.c (m68k_regsets): Likewise.
5813 * linux-mips-low.c (mips_regsets): Likewise.
5814 * linux-nios2-low.c (nios2_regsets): Likewise.
5815 * linux-ppc-low.c (ppc_regsets): Likewise.
5816 * linux-s390-low.c (s390_regsets): Likewise.
5817 * linux-sh-low.c (sh_regsets): Likewise.
5818 * linux-sparc-low.c (sparc_regsets): Likewise.
5819 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5820 * linux-tile-low.c (tile_regsets): Likewise.
5821 * linux-x86-low.c (x86_regsets): Likewise.
5822 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5824 2015-10-26 Doug Evans <dje@google.com>
5826 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5828 2015-10-26 Doug Evans <dje@google.com>
5830 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5832 2015-10-26 Doug Evans <dje@google.com>
5834 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5836 (attach_thread, find_new_threads_callback): Ditto.
5838 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5840 * mem-break.h (set_breakpoint_data): Remove.
5842 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5844 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5845 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5846 (initialize_low): Remove set_breakpoint_data call.
5847 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5848 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5849 (initialize_low): Remove set_breakpoint_data call.
5850 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5851 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5852 (initialize_low): Remove set_breakpoint_data call.
5854 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5856 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5857 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5858 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5859 * target.h (target_breakpoint_kind_from_pc): New macro.
5861 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5863 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5864 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5865 the default breakpoint kind.
5867 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5869 * linux-arm-low.c (arm_supports_z_point_type): Add software
5872 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5874 * linux-arm-low.c: Refactor breakpoint definitions.
5875 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5876 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5878 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5880 * Makefile.in: Add arm.c/o.
5881 * configure.srv: Likewise.
5882 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5883 (arm_breakpoint_kind_from_pc): New function.
5884 (arm_sw_breakpoint_from_kind): Return proper kind.
5885 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5887 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5889 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5891 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5892 (struct raw_breakpoint) <size>: Remove.
5893 (struct raw_breakpoint) <kind>: Add.
5894 (bp_size): New function.
5895 (bp_opcode): Likewise.
5896 (find_raw_breakpoint_at): Adjust for kind.
5897 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5898 (remove_memory_breakpoint): Adjust for kind call bp_size.
5899 (set_raw_breakpoint_at): Adjust for kind.
5900 (set_breakpoint): Likewise.
5901 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5902 (delete_raw_breakpoint): Adjust for kind.
5903 (delete_breakpoint): Likewise.
5904 (find_gdb_breakpoint): Likewise.
5905 (set_gdb_breakpoint_1): Likewise.
5906 (set_gdb_breakpoint): Likewise.
5907 (delete_gdb_breakpoint_1): Likewise.
5908 (delete_gdb_breakpoint): Likewise.
5909 (uninsert_raw_breakpoint): Likewise.
5910 (reinsert_raw_breakpoint): Likewise.
5911 (set_breakpoint_data): Remove.
5912 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5913 (check_mem_read): Adjust for kind call bp_size.
5914 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5915 (clone_one_breakpoint): Adjust for kind.
5916 * mem-break.h (set_gdb_breakpoint): Likewise.
5917 (delete_gdb_breakpoint): Likewise.
5918 * server.c (process_serial_event): Likewise.
5920 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5922 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5928 (arm_sw_breakpoint_from_kind): New function.
5929 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5930 (struct linux_target_ops) <breakpoint>: Remove.
5931 (struct linux_target_ops) <breakpoint_len>: Remove.
5932 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5933 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5934 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5935 (struct linux_target_ops) <breakpoint>: Remove.
5936 (struct linux_target_ops) <breakpoint_len>: Remove.
5937 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5938 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5939 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5940 (struct linux_target_ops) <breakpoint>: Remove.
5941 (struct linux_target_ops) <breakpoint_len>: Remove.
5942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5944 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5945 and sw_breakpoint_from_kind to increment the pc.
5946 (linux_breakpoint_kind_from_pc): New function.
5947 (linux_sw_breakpoint_from_kind): New function.
5948 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5949 (initialize_low): Call breakpoint_kind_from_pc and
5950 sw_breakpoint_from_kind to replace breakpoint_data/len.
5951 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5953 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5954 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5955 (struct linux_target_ops) <breakpoint>: Remove.
5956 (struct linux_target_ops) <breakpoint_len>: Remove.
5957 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5958 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5959 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5960 (struct linux_target_ops) <breakpoint>: Remove.
5961 (struct linux_target_ops) <breakpoint_len>: Remove.
5962 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5963 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5964 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5965 (struct linux_target_ops) <breakpoint>: Remove.
5966 (struct linux_target_ops) <breakpoint_len>: Remove.
5967 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5968 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5969 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5970 (struct linux_target_ops) <breakpoint>: Remove.
5971 (struct linux_target_ops) <breakpoint_len>: Remove.
5972 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5973 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5974 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5975 (struct linux_target_ops) <breakpoint>: Remove.
5976 (struct linux_target_ops) <breakpoint_len>: Remove.
5977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5979 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5980 (struct linux_target_ops) <breakpoint>: Remove.
5981 (struct linux_target_ops) <breakpoint_len>: Remove.
5982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5984 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5985 (struct linux_target_ops) <breakpoint>: Remove.
5986 (struct linux_target_ops) <breakpoint_len>: Remove.
5987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5989 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5990 (struct linux_target_ops) <breakpoint>: Remove.
5991 (struct linux_target_ops) <breakpoint_len>: Remove.
5992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5994 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5995 (struct linux_target_ops) <breakpoint>: Remove.
5996 (struct linux_target_ops) <breakpoint_len>: Remove.
5997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5999 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6000 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6001 (struct linux_target_ops) <breakpoint>: Remove.
6002 (struct linux_target_ops) <breakpoint_len>: Remove.
6003 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6004 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6005 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6006 (struct linux_target_ops) <breakpoint>: Remove.
6007 (struct linux_target_ops) <breakpoint_len>: Remove.
6008 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6009 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6011 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6013 * linux-cris-low.c (cris_get_pc): Remove void arg.
6015 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6017 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6020 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6022 * inferiors.c (thread_pid_matches_callback): New function.
6023 (find_thread_process): New function.
6024 (remove_thread): Reset current_thread.
6025 (remove_process): Assert threads have been removed first.
6027 2015-10-15 Yao Qi <yao.qi@linaro.org>
6029 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6031 (aarch64_remove_point): Likewise.
6032 * regcache.c (regcache_register_size): New function.
6034 2015-10-12 Yao Qi <yao.qi@linaro.org>
6036 * linux-aarch64-low.c: Update all callers as emit_load_store
6037 is renamed to aarch64_emit_load_store.
6039 2015-10-12 Yao Qi <yao.qi@linaro.org>
6041 * linux-aarch64-low.c: Update all callers of function renaming
6042 from emit_insn to aarch64_emit_insn.
6044 2015-10-12 Yao Qi <yao.qi@linaro.org>
6046 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6047 arch/aarch64-insn.h.
6048 (struct aarch64_memory_operand): Likewise.
6050 (emit_insn): Move to arch/aarch64-insn.c.
6051 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6052 (emit_load_store): Move to arch/aarch64-insn.c.
6053 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6054 (can_encode_int32): Remove.
6056 2015-10-12 Yao Qi <yao.qi@linaro.org>
6058 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6059 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6060 (aarch64_relocate_instruction): Likewise.
6061 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6062 (struct aarch64_insn_visitor): Likewise.
6064 2015-10-12 Yao Qi <yao.qi@linaro.org>
6066 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6067 (struct aarch64_insn_visitor): New.
6068 (struct aarch64_insn_relocation_data): New.
6069 (aarch64_ftrace_insn_reloc_b): New function.
6070 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6071 (aarch64_ftrace_insn_reloc_cb): Likewise.
6072 (aarch64_ftrace_insn_reloc_tb): Likewise.
6073 (aarch64_ftrace_insn_reloc_adr): Likewise.
6074 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6075 (aarch64_ftrace_insn_reloc_others): Likewise.
6077 (aarch64_relocate_instruction): Use visitor.
6079 2015-10-12 Yao Qi <yao.qi@linaro.org>
6081 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6082 int. Add argument buf.
6083 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6084 aarch64_relocate_instruction.
6086 2015-10-12 Yao Qi <yao.qi@linaro.org>
6088 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6089 argument insn. Remove local variable insn. Don't call
6091 (aarch64_install_fast_tracepoint_jump_pad): Call
6094 2015-09-30 Yao Qi <yao.qi@linaro.org>
6096 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6097 (emit_load_store_pair): Likewise.
6099 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6101 * dll.c (match_dll): Add cast(s).
6102 (unloaded_dll): Likewise.
6103 * linux-low.c (second_thread_of_pid_p): Likewise.
6104 (delete_lwp_callback): Likewise.
6105 (count_events_callback): Likewise.
6106 (select_event_lwp_callback): Likewise.
6107 (linux_set_resume_request): Likewise.
6108 * server.c (accumulate_file_name_length): Likewise.
6109 (emit_dll_description): Likewise.
6110 (handle_qxfer_threads_worker): Likewise.
6111 (visit_actioned_threads): Likewise.
6112 * thread-db.c (any_thread_of): Likewise.
6113 * tracepoint.c (same_process_p): Likewise.
6114 (match_blocktype): Likewise.
6115 (build_traceframe_info_xml): Likewise.
6117 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6119 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6121 (gdb_unparse_agent_expr): Likewise.
6122 * hostio.c (require_data): Likewise.
6123 (handle_pread): Likewise.
6124 * linux-low.c (disable_regset): Likewise.
6125 (fetch_register): Likewise.
6126 (store_register): Likewise.
6127 (get_dynamic): Likewise.
6128 (linux_qxfer_libraries_svr4): Likewise.
6129 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6130 (set_fast_tracepoint_jump): Likewise.
6131 (uninsert_fast_tracepoint_jumps_at): Likewise.
6132 (reinsert_fast_tracepoint_jumps_at): Likewise.
6133 (validate_inserted_breakpoint): Likewise.
6134 (clone_agent_expr): Likewise.
6135 * regcache.c (init_register_cache): Likewise.
6136 * remote-utils.c (putpkt_binary_1): Likewise.
6137 (decode_M_packet): Likewise.
6138 (decode_X_packet): Likewise.
6139 (look_up_one_symbol): Likewise.
6140 (relocate_instruction): Likewise.
6141 (monitor_output): Likewise.
6142 * server.c (handle_search_memory): Likewise.
6143 (handle_qxfer_exec_file): Likewise.
6144 (handle_qxfer_libraries): Likewise.
6145 (handle_qxfer): Likewise.
6146 (handle_query): Likewise.
6147 (handle_v_cont): Likewise.
6148 (handle_v_run): Likewise.
6149 (captured_main): Likewise.
6150 * target.c (write_inferior_memory): Likewise.
6151 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6152 * tracepoint.c (init_trace_buffer): Likewise.
6153 (add_tracepoint_action): Likewise.
6154 (add_traceframe): Likewise.
6155 (add_traceframe_block): Likewise.
6156 (cmd_qtdpsrc): Likewise.
6157 (cmd_qtdv): Likewise.
6158 (cmd_qtstatus): Likewise.
6159 (response_source): Likewise.
6160 (response_tsv): Likewise.
6161 (cmd_qtnotes): Likewise.
6162 (gdb_collect): Likewise.
6163 (initialize_tracepoint): Likewise.
6165 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6167 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6168 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6169 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6171 (enum aarch64_condition_codes): New enum.
6172 (w0): New static global.
6175 (struct aarch64_memory_operand) <type>: New
6176 MEMORY_OPERAND_POSTINDEX type.
6177 (postindex_memory_operand): New helper function.
6178 (emit_ret): New function.
6179 (emit_load_store_pair): New function, factored out of emit_stp
6180 with support for MEMORY_OPERAND_POSTINDEX.
6181 (emit_stp): Rewrite using emit_load_store_pair.
6182 (emit_ldp): New function.
6183 (emit_load_store): Likewise.
6184 (emit_ldr): Mention post-index instruction in comment.
6185 (emit_ldrh): New function.
6186 (emit_ldrb): New function.
6187 (emit_ldrsw): Mention post-index instruction in comment.
6188 (emit_str): Likewise.
6189 (emit_subs): New function.
6190 (emit_cmp): Likewise.
6191 (emit_and): Likewise.
6192 (emit_orr): Likewise.
6193 (emit_orn): Likewise.
6194 (emit_eor): Likewise.
6195 (emit_mvn): Likewise.
6196 (emit_lslv): Likewise.
6197 (emit_lsrv): Likewise.
6198 (emit_asrv): Likewise.
6199 (emit_mul): Likewise.
6200 (emit_sbfm): Likewise.
6201 (emit_sbfx): Likewise.
6202 (emit_ubfm): Likewise.
6203 (emit_ubfx): Likewise.
6204 (emit_csinc): Likewise.
6205 (emit_cset): Likewise.
6206 (emit_nop): Likewise.
6207 (emit_ops_insns): New helper function.
6208 (emit_pop): Likewise.
6209 (emit_push): Likewise.
6210 (aarch64_emit_prologue): New function.
6211 (aarch64_emit_epilogue): Likewise.
6212 (aarch64_emit_add): Likewise.
6213 (aarch64_emit_sub): Likewise.
6214 (aarch64_emit_mul): Likewise.
6215 (aarch64_emit_lsh): Likewise.
6216 (aarch64_emit_rsh_signed): Likewise.
6217 (aarch64_emit_rsh_unsigned): Likewise.
6218 (aarch64_emit_ext): Likewise.
6219 (aarch64_emit_log_not): Likewise.
6220 (aarch64_emit_bit_and): Likewise.
6221 (aarch64_emit_bit_or): Likewise.
6222 (aarch64_emit_bit_xor): Likewise.
6223 (aarch64_emit_bit_not): Likewise.
6224 (aarch64_emit_equal): Likewise.
6225 (aarch64_emit_less_signed): Likewise.
6226 (aarch64_emit_less_unsigned): Likewise.
6227 (aarch64_emit_ref): Likewise.
6228 (aarch64_emit_if_goto): Likewise.
6229 (aarch64_emit_goto): Likewise.
6230 (aarch64_write_goto_address): Likewise.
6231 (aarch64_emit_const): Likewise.
6232 (aarch64_emit_call): Likewise.
6233 (aarch64_emit_reg): Likewise.
6234 (aarch64_emit_pop): Likewise.
6235 (aarch64_emit_stack_flush): Likewise.
6236 (aarch64_emit_zero_ext): Likewise.
6237 (aarch64_emit_swap): Likewise.
6238 (aarch64_emit_stack_adjust): Likewise.
6239 (aarch64_emit_int_call_1): Likewise.
6240 (aarch64_emit_void_call_2): Likewise.
6241 (aarch64_emit_eq_goto): Likewise.
6242 (aarch64_emit_ne_goto): Likewise.
6243 (aarch64_emit_lt_goto): Likewise.
6244 (aarch64_emit_le_goto): Likewise.
6245 (aarch64_emit_gt_goto): Likewise.
6246 (aarch64_emit_ge_got): Likewise.
6247 (aarch64_emit_ops_impl): New static global variable.
6248 (aarch64_emit_ops): New target function, return
6249 &aarch64_emit_ops_impl.
6250 (struct linux_target_ops): Install it.
6252 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6254 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6255 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6257 * linux-aarch64-ipa.c: New file.
6258 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6260 (aarch64_get_thread_area): New target method.
6261 (extract_signed_bitfield): New helper function.
6262 (aarch64_decode_ldr_literal): New function.
6263 (enum aarch64_opcodes): New enum.
6264 (struct aarch64_register): New struct.
6265 (struct aarch64_operand): New struct.
6266 (x0): New static global.
6275 (aarch64_register): New helper function.
6276 (register_operand): Likewise.
6277 (immediate_operand): Likewise.
6278 (struct aarch64_memory_operand): New struct.
6279 (offset_memory_operand): New helper function.
6280 (preindex_memory_operand): Likewise.
6281 (enum aarch64_system_control_registers): New enum.
6282 (ENCODE): New macro.
6283 (emit_insn): New helper function.
6284 (emit_b): New function.
6285 (emit_bcond): Likewise.
6286 (emit_cb): Likewise.
6287 (emit_tb): Likewise.
6288 (emit_blr): Likewise.
6289 (emit_stp): Likewise.
6290 (emit_ldp_q_offset): Likewise.
6291 (emit_stp_q_offset): Likewise.
6292 (emit_load_store): Likewise.
6293 (emit_ldr): Likewise.
6294 (emit_ldrsw): Likewise.
6295 (emit_str): Likewise.
6296 (emit_ldaxr): Likewise.
6297 (emit_stxr): Likewise.
6298 (emit_stlr): Likewise.
6299 (emit_data_processing_reg): Likewise.
6300 (emit_data_processing): Likewise.
6301 (emit_add): Likewise.
6302 (emit_sub): Likewise.
6303 (emit_mov): Likewise.
6304 (emit_movk): Likewise.
6305 (emit_mov_addr): Likewise.
6306 (emit_mrs): Likewise.
6307 (emit_msr): Likewise.
6308 (emit_sevl): Likewise.
6309 (emit_wfe): Likewise.
6310 (append_insns): Likewise.
6311 (can_encode_int32_in): New helper function.
6312 (aarch64_relocate_instruction): New function.
6313 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6314 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6315 (struct linux_target_ops): Install aarch64_get_thread_area,
6316 aarch64_install_fast_tracepoint_jump_pad and
6317 aarch64_get_min_fast_tracepoint_insn_len.
6319 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6321 * Makefile.in (aarch64-insn.o): New rule.
6322 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6324 2015-09-21 Yao Qi <yao.qi@linaro.org>
6326 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6328 2015-09-21 Yao Qi <yao.qi@linaro.org>
6330 * tracepoint.c (max_jump_pad_size): Remove.
6332 2015-09-18 Yao Qi <yao.qi@linaro.org>
6334 * linux-aarch64-low.c: Don't include sys/uio.h.
6335 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6337 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6339 * tracepoint.c (eval_result_type): Change prototype.
6340 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6342 2015-09-15 Pedro Alves <palves@redhat.com>
6344 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6345 Check whether to report exec events instead of checking whether
6346 multiprocess is enabled.
6348 2015-09-15 Pedro Alves <palves@redhat.com>
6351 * remote-utils.c (prepare_resume_reply): Merge
6352 TARGET_WAITKIND_VFORK_DONE switch case with the
6353 TARGET_WAITKIND_FORKED case.
6355 2015-09-15 Yao Qi <yao.qi@linaro.org>
6357 * server.c (handle_query): Check string comparison using
6358 "else if" instead of "if".
6360 2015-09-15 Yao Qi <yao.qi@linaro.org>
6362 * server.c (vCont_supported): New global variable.
6363 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6364 matches. Append ";vContSupported+" to own_buf.
6365 (handle_v_requests): Append ";s;S" to own_buf if target supports
6366 hardware single step or vCont_supported is false.
6367 (capture_main): Set vCont_supported to zero.
6369 2015-09-15 Yao Qi <yao.qi@linaro.org>
6371 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6373 (linux_supports_hardware_single_step): ... New function.
6374 (linux_target_ops): Update.
6375 * lynx-low.c (lynx_target_ops): Set field
6376 supports_hardware_single_step to target_can_do_hardware_single_step.
6377 * nto-low.c (nto_target_ops): Likewise.
6378 * spu-low.c (spu_target_ops): Likewise.
6379 * win32-low.c (win32_target_ops): Likewise.
6380 * target.c (target_can_do_hardware_single_step): New function.
6381 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6382 Remove. <supports_hardware_single_step>: New field.
6383 (target_supports_conditional_breakpoints): Remove.
6384 (target_supports_hardware_single_step): New macro.
6385 (target_can_do_hardware_single_step): Declare.
6386 * server.c (handle_query): Use target_supports_hardware_single_step
6387 instead of target_supports_conditional_breakpoints.
6389 2015-09-15 Yao Qi <yao.qi@linaro.org>
6391 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6393 (struct linux_target_ops the_low_target): Install
6394 aarch64_linux_siginfo_fixup.
6396 2015-09-11 Don Breazeal <donb@codesourcery.com>
6397 Luis Machado <lgustavo@codesourcery.com>
6399 * linux-low.c (linux_mourn): Static declaration.
6400 (linux_arch_setup): Move in front of
6401 handle_extended_wait.
6402 (linux_arch_setup_thread): New function.
6403 (handle_extended_wait): Handle exec events. Call
6404 linux_arch_setup_thread. Make event_lwp argument a
6405 pointer-to-a-pointer.
6406 (check_zombie_leaders): Do not check stopped threads.
6407 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6408 (linux_low_filter_event): Add lwp and thread for exec'ing
6409 non-leader thread if leader thread has been deleted.
6410 Refactor code into linux_arch_setup_thread and call it.
6411 Pass child lwp pointer by reference to handle_extended_wait.
6412 (linux_wait_for_event_filtered): Update comment.
6413 (linux_wait_1): Prevent clobbering exec event status.
6414 (linux_supports_exec_events): New function.
6415 (linux_target_ops) <supports_exec_events>: Initialize new member.
6416 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6418 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6419 * server.c (report_exec_events): New global variable.
6420 (handle_query): Handle qSupported query for exec-events feature.
6421 (captured_main): Initialize report_exec_events.
6422 * server.h (report_exec_events): Declare new global variable.
6423 * target.h (struct target_ops) <supports_exec_events>: New
6425 (target_supports_exec_events): New macro.
6426 * win32-low.c (win32_target_ops) <supports_exec_events>:
6427 Initialize new member.
6429 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6431 * linux-low.c (linux_low_enable_btrace): Remove.
6432 (linux_target_ops): Replace linux_low_enable_btrace with
6433 linux_enable_btrace.
6435 2015-09-03 Yao Qi <yao.qi@linaro.org>
6437 * linux-aarch64-low.c (aarch64_insert_point): Call
6438 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6441 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6443 * linux-low.c (check_stopped_by_breakpoint): Use
6444 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6446 2015-08-27 Pedro Alves <palves@redhat.com>
6448 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6450 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6452 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6453 the XNEW-family equivalent.
6454 (compile_bytecodes): Likewise.
6455 * dll.c (loaded_dll): Likewise.
6456 * event-loop.c (append_callback_event): Likewise.
6457 (create_file_handler): Likewise.
6458 (create_file_event): Likewise.
6459 * hostio.c (handle_open): Likewise.
6460 * inferiors.c (add_thread): Likewise.
6461 (add_process): Likewise.
6462 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6463 * linux-arm-low.c (arm_new_process): Likewise.
6464 (arm_new_thread): Likewise.
6465 * linux-low.c (add_to_pid_list): Likewise.
6466 (linux_add_process): Likewise.
6467 (handle_extended_wait): Likewise.
6468 (add_lwp): Likewise.
6469 (enqueue_one_deferred_signal): Likewise.
6470 (enqueue_pending_signal): Likewise.
6471 (linux_resume_one_lwp_throw): Likewise.
6472 (linux_resume_one_thread): Likewise.
6473 (linux_read_memory): Likewise.
6474 (linux_write_memory): Likewise.
6475 * linux-mips-low.c (mips_linux_new_process): Likewise.
6476 (mips_linux_new_thread): Likewise.
6477 (mips_add_watchpoint): Likewise.
6478 * linux-x86-low.c (initialize_low_arch): Likewise.
6479 * lynx-low.c (lynx_add_process): Likewise.
6480 * mem-break.c (set_raw_breakpoint_at): Likewise.
6481 (set_breakpoint): Likewise.
6482 (add_condition_to_breakpoint): Likewise.
6483 (add_commands_to_breakpoint): Likewise.
6484 (clone_agent_expr): Likewise.
6485 (clone_one_breakpoint): Likewise.
6486 * regcache.c (new_register_cache): Likewise.
6487 * remote-utils.c (look_up_one_symbol): Likewise.
6488 * server.c (queue_stop_reply): Likewise.
6489 (start_inferior): Likewise.
6490 (queue_stop_reply_callback): Likewise.
6491 (handle_target_event): Likewise.
6492 * spu-low.c (fetch_ppc_memory): Likewise.
6493 (store_ppc_memory): Likewise.
6494 * target.c (set_target_ops): Likewise.
6495 * thread-db.c (thread_db_load_search): Likewise.
6496 (try_thread_db_load_1): Likewise.
6497 * tracepoint.c (add_tracepoint): Likewise.
6498 (add_tracepoint_action): Likewise.
6499 (create_trace_state_variable): Likewise.
6500 (cmd_qtdpsrc): Likewise.
6501 (cmd_qtro): Likewise.
6502 (add_while_stepping_state): Likewise.
6503 * win32-low.c (child_add_thread): Likewise.
6504 (get_image_name): Likewise.
6506 2015-08-25 Yao Qi <yao.qi@linaro.org>
6508 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6510 2015-08-25 Yao Qi <yao.qi@linaro.org>
6512 * Makefile.in (aarch64-linux.o): New rule.
6513 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6515 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6516 (aarch64_init_debug_reg_state): Make it extern.
6517 (aarch64_linux_prepare_to_resume): Remove.
6519 2015-08-25 Yao Qi <yao.qi@linaro.org>
6521 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6522 lwp_arch_private_info and ptid_of_lwp.
6524 2015-08-25 Yao Qi <yao.qi@linaro.org>
6526 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6527 Find proc_info by find_process_pid. All callers updated.
6529 2015-08-25 Yao Qi <yao.qi@linaro.org>
6531 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6533 (debug_reg_change_callback): Remove.
6534 (aarch64_notify_debug_reg_change): Remove.
6536 2015-08-25 Yao Qi <yao.qi@linaro.org>
6538 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6539 Call current_lwp_ptid.
6541 2015-08-25 Yao Qi <yao.qi@linaro.org>
6543 * linux-aarch64-low.c (debug_reg_change_callback): Use
6546 2015-08-25 Yao Qi <yao.qi@linaro.org>
6548 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6550 2015-08-25 Yao Qi <yao.qi@linaro.org>
6552 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6554 2015-08-25 Yao Qi <yao.qi@linaro.org>
6556 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6559 2015-08-25 Yao Qi <yao.qi@linaro.org>
6561 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6563 (debug_reg_change_callback): Remove argument entry and add argument
6564 lwp. Remove local variable thread. Don't print thread id in the
6565 debugging output. Don't check whether pid of thread equals to pid.
6566 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6567 iterate_over_lwps instead find_inferior.
6569 2015-08-24 Pedro Alves <palves@redhat.com>
6571 * inferiors.c (get_first_process): New function.
6572 * inferiors.h (get_first_process): New declaration.
6573 * remote-utils.c (read_ptid): Default to the first process in the
6574 list, instead of to the current thread's process.
6576 2015-08-24 Pedro Alves <palves@redhat.com>
6578 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6579 * event-loop.c: Likewise.
6580 * remote-utils.c: Likewise.
6581 * tracepoint.c: Likewise.
6583 2015-08-24 Pedro Alves <palves@redhat.com>
6585 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6588 2015-08-21 Pedro Alves <palves@redhat.com>
6590 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6591 instead of literal 1.
6593 2015-08-21 Pedro Alves <palves@redhat.com>
6595 * tdesc.c (default_description): Explicitly zero-initialize.
6597 2015-08-21 Pedro Alves <palves@redhat.com>
6600 * inferiors.c (remove_thread): Discard any pending stop reply for
6602 * server.c (remove_all_on_match_pid): Rename to ...
6603 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6605 (discard_queued_stop_replies): Change parameter to a ptid. Now
6607 (handle_v_kill, kill_inferior_callback, captured_main)
6608 (process_serial_event): Adjust.
6609 * server.h (discard_queued_stop_replies): Declare.
6611 2015-08-21 Pedro Alves <palves@redhat.com>
6613 * linux-low.c (wait_for_sigstop): Always switch to no thread
6614 selected if the previously current thread dies.
6615 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6616 process instead of the current thread's.
6617 * remote-utils.c (input_interrupt): Don't check if there's no
6619 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6620 current thread to the general thread fails, error out.
6621 (handle_qxfer_auxv, handle_qxfer_libraries)
6622 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6623 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6624 (handle_query): Check if there's a thread selected instead of
6625 checking whether there's any thread in the thread list.
6626 (handle_qxfer_threads, handle_qxfer_btrace)
6627 (handle_qxfer_btrace_conf): Don't error out early if there's no
6628 thread in the thread list.
6629 (handle_v_cont, myresume): Don't set the current thread to the
6631 (process_serial_event) <Hg handling>: Also set thread_id if the
6632 previous general thread is still alive.
6633 (process_serial_event) <g/G handling>: If setting the current
6634 thread to the general thread fails, error out.
6635 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6636 thread's lwp instead of the current thread's.
6637 * target.c (set_desired_thread): If the desired thread was not
6638 found, leave the current thread pointing to NULL. Return an int
6639 (boolean) indicating success.
6640 * target.h (set_desired_thread): Change return type to int.
6642 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6644 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6645 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6647 (ps_get_thread_area): New function.
6649 2015-08-19 Gary Benson <gbenson@redhat.com>
6651 * hostio.c (handle_pread): Do not attempt to read more data
6652 than hostio_reply_with_data can fit in a packet.
6654 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6656 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6658 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6660 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6662 2015-08-06 Pedro Alves <palves@redhat.com>
6664 * tracepoint.c (expr_eval_result): Now an int.
6666 2015-08-06 Pedro Alves <palves@redhat.com>
6668 * gdbthread.h (struct regcache): Forward declare.
6669 (struct thread_info) <regcache_data>: Now a struct regcache
6671 * inferiors.c (inferior_regcache_data)
6672 (set_inferior_regcache_data): Now work with struct regcache
6674 * inferiors.h (struct regcache): Forward declare.
6675 (inferior_regcache_data, set_inferior_regcache_data): Now work
6676 with struct regcache pointers.
6677 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6678 (free_register_cache_thread): Remove struct regcache pointer
6681 2015-08-06 Pedro Alves <palves@redhat.com>
6683 * server.c (captured_main): On error, print the exception message
6684 to stderr, and if run_once is set, throw a quit.
6686 2015-08-06 Pedro Alves <palves@redhat.com>
6688 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6691 2015-08-06 Pedro Alves <palves@redhat.com>
6693 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6694 reading beyond the passed in buffer length.
6696 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6698 * tracepoint.c (symbol_list) <required>: Remove.
6700 2015-08-06 Pedro Alves <palves@redhat.com>
6702 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6703 count if stopping and suspending threads.
6704 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6705 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6706 (linux_detach): Complete an ongoing step-over.
6707 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6709 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6710 (linux_wait_1): If passing a signal to the inferior after
6711 finishing a step-over, unsuspend and re-resume all lwps. If we
6712 see a single-step event but the thread should be continuing, don't
6713 pass the trap to gdb.
6714 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6715 internal_error instead of gdb_assert.
6716 (enqueue_pending_signal): New function.
6717 (check_ptrace_stopped_lwp_gone): Add debug output.
6718 (start_step_over): Use internal_error instead of gdb_assert.
6719 (complete_ongoing_step_over): New function.
6720 (linux_resume_one_thread): Don't resume a suspended thread.
6721 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6724 2015-08-06 Pedro Alves <palves@redhat.com>
6726 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6727 (linux_thread_alive): Use lwp_is_marked_dead.
6728 (extended_event_reported): Delete.
6729 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6730 instead of extended_event_reported.
6731 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6733 (lwp_is_marked_dead): New function.
6734 (lwp_running): Use lwp_is_marked_dead.
6735 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6738 2015-08-06 Pedro Alves <palves@redhat.com>
6740 * linux-low.c (linux_wait_1): Move fork event output out of the
6741 !report_to_gdb check. Pass event_child->waitstatus to
6742 target_waitstatus_to_string instead of ourstatus.
6744 2015-08-04 Yao Qi <yao.qi@linaro.org>
6746 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6747 if current_thread is 32 bit.
6749 2015-08-04 Yao Qi <yao.qi@linaro.org>
6751 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6752 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6753 * server.c (extended_protocol): Remove "static".
6754 * server.h (extended_protocol): Declare it.
6756 2015-08-04 Yao Qi <yao.qi@linaro.org>
6758 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6759 both aarch64 and aarch32.
6760 (aarch64_set_pc): Likewise.
6762 2015-08-04 Yao Qi <yao.qi@linaro.org>
6764 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6765 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6766 arm-with-neon.xml to srv_xmlfiles.
6767 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6768 (is_64bit_tdesc): New function.
6769 (aarch64_linux_read_description): New function.
6770 (aarch64_arch_setup): Call aarch64_linux_read_description.
6771 (regs_info): Rename to regs_info_aarch64.
6772 (aarch64_regs_info): Return right regs_info.
6773 (initialize_low_arch): Call initialize_low_arch_aarch32.
6775 2015-08-04 Yao Qi <yao.qi@linaro.org>
6777 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6778 * linux-aarch32-low.c: New file.
6779 * linux-aarch32-low.h: New file.
6780 * linux-arm-low.c (arm_fill_gregset): Move it to
6781 linux-aarch32-low.c.
6782 (arm_store_gregset): Likewise.
6783 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6784 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6785 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6786 (regs_info): Rename to regs_info_arm.
6787 (arm_regs_info): Return regs_info_aarch32 if
6788 have_ptrace_getregset is 1 and target description is
6789 arm_with_neon or arm_with_vfpv3.
6790 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6791 Call initialize_low_arch_aarch32 instead.
6793 2015-08-04 Yao Qi <yao.qi@linaro.org>
6795 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6796 * linux-low.c: ... here.
6797 * linux-low.h (have_ptrace_getregset): Declare it.
6799 2015-08-04 Pedro Alves <palves@redhat.com>
6801 * thread-db.c (struct thread_db): Use new typedefs.
6802 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6804 (disable_thread_event_reporting): Cast result of dlsym to
6805 destination function pointer type.
6806 (thread_db_mourn): Use td_ta_delete_ftype.
6808 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6810 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6812 (CDX_BREAKPOINT): Define for R2.
6813 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6814 (the_low_target): Add comments.
6816 2015-07-30 Yao Qi <yao.qi@linaro.org>
6818 * linux-arm-low.c (arm_hwcap): Remove it.
6819 (arm_read_description): New local variable arm_hwcap. Don't
6820 set arm_hwcap to zero.
6822 2015-07-30 Yao Qi <yao.qi@linaro.org>
6824 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6825 Use regcache->tdesc instead.
6826 (arm_store_wmmxregset): Likewise.
6827 (arm_fill_vfpregset): Likewise.
6828 (arm_store_vfpregset): Likewise.
6830 2015-07-30 Yao Qi <yao.qi@linaro.org>
6832 * linux-arm-low.c: Include arch/arm.h.
6833 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6834 (arm_store_gregset): Likewise.
6836 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6838 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6839 ptrace's 4th parameter.
6841 2015-07-27 Yao Qi <yao.qi@linaro.org>
6843 * configure.srv (case aarch64*-*-linux*): Don't set
6846 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6848 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6850 * linux-arm-low.c: Likewise.
6851 * linux-cris-low.c: Likewise.
6852 * linux-crisv32-low.c: Likewise.
6853 * linux-low.c: Likewise.
6854 * linux-m68k-low.c: Likewise.
6855 * linux-mips-low.c: Likewise.
6856 * linux-nios2-low.c: Likewise.
6857 * linux-s390-low.c: Likewise.
6858 * linux-sparc-low.c: Likewise.
6859 * linux-tic6x-low.c: Likewise.
6860 * linux-tile-low.c: Likewise.
6861 * linux-x86-low.c: Likewise.
6863 2015-07-24 Pedro Alves <palves@redhat.com>
6865 * config.in: Regenerate.
6866 * configure: Regenerate.
6868 2015-07-24 Pedro Alves <palves@redhat.com>
6870 * acinclude.m4: Include ../ptrace.m4.
6871 * configure.ac: Call GDB_AC_PTRACE.
6872 * config.in, configure: Regenerate.
6874 2015-07-24 Yao Qi <yao.qi@linaro.org>
6876 * linux-low.c (linux_create_inferior): Remove setting to
6877 proc->priv->new_inferior.
6878 (linux_attach): Likewise.
6879 (linux_low_filter_event): Likewise.
6880 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6882 2015-07-24 Yao Qi <yao.qi@linaro.org>
6884 * linux-low.c (linux_arch_setup): New function.
6885 (linux_low_filter_event): If proc->tdesc is NULL and
6886 proc->attached is true, call the_low_target.arch_setup.
6887 Otherwise, keep status pending, and return.
6888 (linux_resume_one_lwp_throw): Don't call get_pc if
6889 thread->while_stepping isn't NULL. Don't call
6890 get_thread_regcache if proc->tdesc is NULL.
6891 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6892 (linux_target_ops): Install arch_setup.
6893 * server.c (start_inferior): Call the_target->arch_setup.
6894 * target.h (struct target_ops) <arch_setup>: New field.
6895 (target_arch_setup): New marco.
6896 * lynx-low.c (lynx_target_ops): Update.
6897 * nto-low.c (nto_target_ops): Update.
6898 * spu-low.c (spu_target_ops): Update.
6899 * win32-low.c (win32_target_ops): Update.
6901 2015-07-24 Yao Qi <yao.qi@linaro.org>
6903 * linux-low.c (linux_add_process): Don't set
6904 proc->priv->new_inferior.
6905 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6906 (linux_attach): Likewise.
6908 2015-07-24 Yao Qi <yao.qi@linaro.org>
6910 * server.c (start_inferior): Code refactor.
6912 2015-07-24 Yao Qi <yao.qi@linaro.org>
6914 * server.c (process_serial_event): Set general_thread.
6916 2015-07-21 Yao Qi <yao.qi@linaro.org>
6918 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6919 aarch64_linux_get_debug_reg_capacity.
6921 2015-07-17 Yao Qi <yao.qi@linaro.org>
6923 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6924 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6925 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6926 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6927 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6928 (AARCH64_HWP_ALIGNMENT): Likewise.
6929 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6930 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6931 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6932 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6933 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6934 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6935 (struct aarch64_debug_reg_state): Likewise.
6936 (struct arch_lwp_info): Likewise.
6937 (aarch64_align_watchpoint): Likewise.
6938 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6939 (aarch64_watchpoint_length): Likewise.
6940 (aarch64_point_encode_ctrl_reg): Likewise
6941 (aarch64_point_is_aligned): Likewise.
6942 (aarch64_align_watchpoint): Likewise.
6943 (aarch64_linux_set_debug_regs):
6944 (aarch64_dr_state_insert_one_point): Likewise.
6945 (aarch64_dr_state_remove_one_point): Likewise.
6946 (aarch64_handle_breakpoint): Likewise.
6947 (aarch64_handle_aligned_watchpoint): Likewise.
6948 (aarch64_handle_unaligned_watchpoint): Likewise.
6949 (aarch64_handle_watchpoint): Likewise.
6951 2015-07-17 Yao Qi <yao.qi@linaro.org>
6953 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6954 and don't aarch64_get_debug_reg_state. All callers update.
6955 (aarch64_handle_aligned_watchpoint): Likewise.
6956 (aarch64_handle_unaligned_watchpoint): Likewise.
6957 (aarch64_handle_watchpoint): Likewise.
6958 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6959 (aarch64_remove_point): Likewise.
6961 2015-07-17 Yao Qi <yao.qi@linaro.org>
6963 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6965 (aarch64_handle_unaligned_watchpoint): Likewise.
6967 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6969 Revert the previous 3 commits:
6970 Move gdb_regex* to common/
6971 Move linux_find_memory_regions_full & co.
6972 gdbserver build-id attribute generator
6974 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6975 Jan Kratochvil <jan.kratochvil@redhat.com>
6977 gdbserver build-id attribute generator.
6978 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6979 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6980 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6982 (get_dynamic): Use find_pdhr to traverse program headers.
6983 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6984 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6985 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6986 (get_hex_build_id): New.
6987 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6988 to reply XML document.
6990 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6991 Jan Kratochvil <jan.kratochvil@redhat.com>
6993 * target.c: Include target/target-utils.h and fcntl.h.
6994 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6995 (target_fileio_read_stralloc): New functions.
6997 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6999 * Makefile.in (OBS): Add gdb_regex.o.
7001 * config.in: Rebuilt.
7002 * configure: Rebuilt.
7004 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7005 Jan Kratochvil <jan.kratochvil@redhat.com>
7007 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7008 * Makefile.in (OBS): Add target-utils.o.
7009 (linux-maps.o, target-utils.o): New.
7010 * configure.srv (srv_linux_obj): Add linux-maps.o.
7012 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7014 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7016 (the_low_target): Install it.
7018 2015-07-14 Pedro Alves <palves@redhat.com>
7020 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7021 Instead, ignore ECHILD, and throw an error for other errnos.
7023 2015-07-10 Pedro Alves <palves@redhat.com>
7025 * event-loop.c (struct callback_event) <data>: Change type to
7026 gdb_client_data instance instead of gdb_client_data pointer.
7027 (append_callback_event): Adjust.
7029 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7031 * linux-aarch64-low.c: Add comments for each linux_target_ops
7032 method. Remove comments already covered in target_ops and
7033 linux_target_ops definitions.
7034 (the_low_target): Add comments for each unimplemented method.
7036 2015-07-09 Yao Qi <yao.qi@linaro.org>
7038 * linux-aarch64-low.c (aarch64_regmap): Remove.
7039 (aarch64_usrregs_info): Remove.
7040 (regs_info): Set field usrregs to NULL.
7042 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7044 * linux-low.c: Include "rsp-low.h"
7045 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7046 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7047 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7048 (handle_btrace_enable_pt): New.
7049 (handle_btrace_general_set): Support "pt".
7050 (handle_btrace_conf_general_set): Support "pt:size".
7052 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7054 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7057 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7059 * linux-aarch64-low.c: Remove comment about endianness.
7060 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7061 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7064 2015-06-24 Gary Benson <gbenson@redhat.com>
7066 * linux-i386-ipa.c (stdint.h): Do not include.
7067 * lynx-i386-low.c (stdint.h): Likewise.
7068 * lynx-ppc-low.c (stdint.h): Likewise.
7069 * mem-break.c (stdint.h): Likewise.
7070 * thread-db.c (stdint.h): Likewise.
7071 * tracepoint.c (stdint.h): Likewise.
7072 * win32-low.c (stdint.h): Likewise.
7074 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7076 * server.c (write_qxfer_response): Update call to
7077 remote_escape_output.
7079 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7080 Jan Kratochvil <jan.kratochvil@redhat.com>
7082 Merge multiple hex conversions.
7083 * gdbreplay.c (tohex): Rename to 'fromhex'.
7084 (logchar): Use fromhex.
7086 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7088 * server.c (handle_qxfer_libraries): Set `version' attribute for
7091 2015-06-10 Gary Benson <gbenson@redhat.com>
7093 * target.h (struct target_ops) <multifs_open>: New field.
7094 <multifs_unlink>: Likewise.
7095 <multifs_readlink>: Likewise.
7096 * linux-low.c (nat/linux-namespaces.h): New include.
7097 (linux_target_ops): Initialize the_target->multifs_open,
7098 the_target->multifs_unlink and the_target->multifs_readlink.
7099 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7100 * hostio.c (hostio_fs_pid): New static variable.
7101 (hostio_handle_new_gdb_connection): New function.
7102 (handle_setfs): Likewise.
7103 (handle_open): Use the_target->multifs_open as appropriate.
7104 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7105 (handle_readlink): Use the_target->multifs_readlink as
7107 (handle_vFile): Handle vFile:setfs packets.
7108 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7109 after target_handle_new_gdb_connection.
7111 2015-06-10 Gary Benson <gbenson@redhat.com>
7113 * configure.ac (AC_CHECK_FUNCS): Add setns.
7114 * config.in: Regenerate.
7115 * configure: Likewise.
7116 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7117 (linux-namespaces.o): New rule.
7118 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7120 2015-06-09 Gary Benson <gbenson@redhat.com>
7122 * hostio.c (handle_open): Process mode argument with
7123 fileio_to_host_mode.
7125 2015-06-01 Yao Qi <yao.qi@linaro.org>
7127 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7128 * linux-x86-low.c: Likewise.
7130 2015-05-28 Don Breazeal <donb@codesourcery.com>
7132 * linux-low.c (handle_extended_wait): Initialize
7133 thread_info.last_resume_kind for new fork children.
7135 2015-05-15 Pedro Alves <palves@redhat.com>
7137 * target.h (target_handle_new_gdb_connection): Rewrite using if
7138 wrapped in do/while.
7140 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7142 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7143 * configure, config.in: Regenerate.
7144 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7147 2015-05-12 Don Breazeal <donb@codesourcery.com>
7149 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7150 PTRACE_EVENT_VFORK_DONE.
7151 (linux_low_ptrace_options, extended_event_reported): Add vfork
7153 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7154 and "vforkdone" for RSP 'T' Stop Reply Packet.
7155 * server.h (report_vfork_events): Declare
7158 2015-05-12 Don Breazeal <donb@codesourcery.com>
7160 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7161 (the_low_target) <new_fork>: Initialize new member.
7162 * linux-arm-low.c (arm_new_fork): New function.
7163 (the_low_target) <new_fork>: Initialize new member.
7164 * linux-low.c (handle_extended_wait): Call new target function
7166 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7167 * linux-mips-low.c (mips_add_watchpoint): New function
7168 extracted from mips_insert_point.
7169 (the_low_target) <new_fork>: Initialize new member.
7170 (mips_linux_new_fork): New function.
7171 (mips_insert_point): Call mips_add_watchpoint.
7172 * linux-x86-low.c (x86_linux_new_fork): New function.
7173 (the_low_target) <new_fork>: Initialize new member.
7175 2015-05-12 Don Breazeal <donb@codesourcery.com>
7177 * linux-low.c (handle_extended_wait): Implement return value,
7178 rename argument 'event_child' to 'event_lwp', handle
7179 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7180 (linux_low_ptrace_options): New function.
7181 (linux_low_filter_event): Call linux_low_ptrace_options,
7182 use different argument fo linux_enable_event_reporting,
7183 use return value from handle_extended_wait.
7184 (extended_event_reported): New function.
7185 (linux_wait_1): Call extended_event_reported and set
7186 status to report fork events.
7187 (linux_write_memory): Add pid to debug message.
7188 (reset_lwp_ptrace_options_callback): New function.
7189 (linux_handle_new_gdb_connection): New function.
7190 (linux_target_ops): Initialize new structure member.
7191 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7192 * lynx-low.c: Initialize new structure member.
7193 * remote-utils.c (prepare_resume_reply): Implement stop reason
7194 "fork" for "T" stop message.
7195 * server.c (handle_query): Call handle_new_gdb_connection.
7196 * server.h (report_fork_events): Declare global flag.
7197 * target.h (struct target_ops) <handle_new_gdb_connection>:
7199 (target_handle_new_gdb_connection): New macro.
7200 * win32-low.c: Initialize new structure member.
7202 2015-05-12 Don Breazeal <donb@codesourcery.com>
7204 * mem-break.c (APPEND_TO_LIST): Define macro.
7205 (clone_agent_expr): New function.
7206 (clone_one_breakpoint): New function.
7207 (clone_all_breakpoints): New function.
7208 * mem-break.h: Declare new functions.
7210 2015-05-12 Don Breazeal <donb@codesourcery.com>
7212 * linux-low.c (linux_supports_fork_events): New function.
7213 (linux_supports_vfork_events): New function.
7214 (linux_target_ops): Initialize new structure members.
7215 (initialize_low): Call linux_check_ptrace_features.
7216 * lynx-low.c (lynx_target_ops): Initialize new structure
7218 * server.c (report_fork_events, report_vfork_events):
7220 (handle_query): Add new features to qSupported packet and
7222 (captured_main): Initialize new global variables.
7223 * target.h (struct target_ops) <supports_fork_events>:
7225 <supports_vfork_events>: New member.
7226 (target_supports_fork_events): New macro.
7227 (target_supports_vfork_events): New macro.
7228 * win32-low.c (win32_target_ops): Initialize new structure
7231 2015-05-12 Gary Benson <gbenson@redhat.com>
7233 * server.c (handle_qxfer_exec_file): Use current process
7236 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7238 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7239 Remove HAVE_PTRACE_GETREGS conditionals.
7240 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7241 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7243 2015-05-08 Yao Qi <yao.qi@linaro.org>
7245 * linux-low.c (linux_supports_conditional_breakpoints): New
7247 (linux_target_ops): Install new target method.
7248 * lynx-low.c (lynx_target_ops): Install NULL hook for
7249 supports_conditional_breakpoints.
7250 * nto-low.c (nto_target_ops): Likewise.
7251 * spu-low.c (spu_target_ops): Likewise.
7252 * win32-low.c (win32_target_ops): Likewise.
7253 * server.c (handle_query): Check
7254 target_supports_conditional_breakpoints.
7255 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7257 (target_supports_conditional_breakpoints): New macro.
7259 2015-05-06 Pedro Alves <palves@redhat.com>
7262 * server.c (start_inferior): If the process exits, mourn it.
7264 2015-04-21 Gary Benson <gbenson@redhat.com>
7266 * hostio.c (fileio_open_flags_to_host): Factored out to
7267 fileio_to_host_openflags in common/fileio.c. Single use
7270 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7272 * linux-xtensa-low.c (xtensa_fill_gregset)
7273 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7276 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7278 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7279 (regs_info): Replace usrregs pointer with NULL.
7281 2015-04-17 Gary Benson <gbenson@redhat.com>
7283 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7284 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7285 * server.c (handle_qxfer_exec_file): New function.
7286 (qxfer_packets): Add exec-file entry.
7287 (handle_query): Report qXfer:exec-file:read as supported packet.
7289 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7291 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7293 2015-04-09 Gary Benson <gbenson@redhat.com>
7295 * hostio-errno.c (errno_to_fileio_error): Remove function.
7296 Update caller to use remote_fileio_to_fio_error.
7298 2015-04-09 Yao Qi <yao.qi@linaro.org>
7300 * linux-low.c (linux_insert_point): Call
7301 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7302 (linux_remove_point): Call remove_memory_breakpoint if type is
7304 * linux-x86-low.c (x86_insert_point): Don't call
7305 insert_memory_breakpoint.
7306 (x86_remove_point): Don't call remove_memory_breakpoint.
7308 2015-04-01 Pedro Alves <palves@redhat.com>
7309 Cleber Rosa <crosa@redhat.com>
7311 * server.c (gdbserver_usage): Reorganize and extend the usage
7314 2015-03-24 Pedro Alves <palves@redhat.com>
7316 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7317 output. Also dump TRAP_TRACE.
7318 (linux_low_filter_event): In debug output, distinguish a
7319 resume_stop SIGSTOP from a delayed SIGSTOP.
7321 2015-03-24 Gary Benson <gbenson@redhat.com>
7323 * linux-x86-low.c (x86_linux_new_thread): Moved to
7325 (x86_linux_prepare_to_resume): Likewise.
7327 2015-03-24 Gary Benson <gbenson@redhat.com>
7329 * Makefile.in (x86-linux-dregs.o): New rule.
7330 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7331 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7332 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7333 (x86_linux_dr_get): Likewise.
7334 (x86_linux_dr_set): Likewise.
7335 (update_debug_registers_callback): Likewise.
7336 (x86_linux_dr_set_addr): Likewise.
7337 (x86_linux_dr_get_addr): Likewise.
7338 (x86_linux_dr_set_control): Likewise.
7339 (x86_linux_dr_get_control): Likewise.
7340 (x86_linux_dr_get_status): Likewise.
7341 (x86_linux_update_debug_registers): Likewise.
7343 2015-03-24 Gary Benson <gbenson@redhat.com>
7345 * linux-x86-low.c (x86_linux_update_debug_registers):
7346 New function, factored out from...
7347 (x86_linux_prepare_to_resume): ...this.
7349 2015-03-24 Gary Benson <gbenson@redhat.com>
7351 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7352 (x86_linux_dr_set): Likewise.
7353 (update_debug_registers_callback): Likewise.
7354 (x86_linux_dr_set_addr): Likewise.
7355 (x86_linux_dr_get_addr): Likewise.
7356 (x86_linux_dr_set_control): Likewise.
7357 (x86_linux_dr_get_control): Likewise.
7358 (x86_linux_dr_get_status): Likewise.
7359 (x86_linux_prepare_to_resume): Likewise.
7361 2015-03-24 Gary Benson <gbenson@redhat.com>
7363 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7364 Use perror_with_name. Pass string through gettext.
7365 (x86_linux_dr_set): Likewise.
7367 2015-03-24 Gary Benson <gbenson@redhat.com>
7369 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7370 (x86_linux_dr_set_addr): ...this.
7371 (x86_dr_low_get_addr): Rename to...
7372 (x86_linux_dr_get_addr): ...this.
7373 (x86_dr_low_set_control): Rename to...
7374 (x86_linux_dr_set_control): ...this.
7375 (x86_dr_low_get_control): Rename to...
7376 (x86_linux_dr_get_control): ...this.
7377 (x86_dr_low_get_status): Rename to...
7378 (x86_linux_dr_get_status): ...this.
7379 (x86_dr_low): Update with new function names.
7381 2015-03-24 Gary Benson <gbenson@redhat.com>
7383 * Makefile.in (x86-linux.o): New rule.
7384 * configure.srv: Add x86-linux.o to relevant targets.
7385 * linux-low.c (lwp_set_arch_private_info): New function.
7386 (lwp_arch_private_info): Likewise.
7387 * linux-x86-low.c: Include nat/x86-linux.h.
7388 (arch_lwp_info): Removed structure.
7389 (update_debug_registers_callback):
7390 Use lwp_set_debug_registers_changed.
7391 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7392 and lwp_set_debug_registers_changed.
7393 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7395 2015-03-24 Gary Benson <gbenson@redhat.com>
7397 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7398 * linux-arm-low.c (arm_new_thread): Likewise.
7399 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7400 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7401 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7402 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7404 2015-03-24 Gary Benson <gbenson@redhat.com>
7406 * linux-low.c (ptid_of_lwp): New function.
7407 (lwp_is_stopped): Likewise.
7408 (lwp_stop_reason): Likewise.
7409 * linux-x86-low.c (update_debug_registers_callback):
7411 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7414 2015-03-24 Gary Benson <gbenson@redhat.com>
7416 * linux-low.h (linux_stop_lwp): Remove declaration.
7418 2015-03-24 Gary Benson <gbenson@redhat.com>
7420 * linux-low.h: Include nat/linux-nat.h.
7421 * linux-low.c (iterate_over_lwps_args): New structure.
7422 (iterate_over_lwps_filter): New function.
7423 (iterate_over_lwps): Likewise.
7424 * linux-x86-low.c (update_debug_registers_callback):
7425 Update signature to what iterate_over_lwps expects.
7426 Remove PID check that iterate_over_lwps now performs.
7427 (x86_dr_low_set_addr): Use iterate_over_lwps.
7428 (x86_dr_low_set_control): Likewise.
7430 2015-03-24 Gary Benson <gbenson@redhat.com>
7432 * linux-x86-low.c (x86_debug_reg_state): New function.
7433 (x86_linux_prepare_to_resume): Use the above.
7435 2015-03-24 Gary Benson <gbenson@redhat.com>
7437 * linux-low.c (current_lwp_ptid): New function.
7438 * linux-x86-low.c: Include nat/linux-nat.h.
7439 (x86_dr_low_get_addr): Use current_lwp_ptid.
7440 (x86_dr_low_get_control): Likewise.
7441 (x86_dr_low_get_status): Likewise.
7443 2015-03-20 Pedro Alves <palves@redhat.com>
7445 * tracepoint.c (cmd_qtstatus): Make "str" const.
7447 2015-03-20 Pedro Alves <palves@redhat.com>
7449 * server.c (handle_general_set): Make "req_str" const.
7451 2015-03-19 Pedro Alves <palves@redhat.com>
7453 * linux-low.c (linux_resume_one_lwp): Rename to ...
7454 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7455 instead call perror_with_name.
7456 (check_ptrace_stopped_lwp_gone): New function.
7457 (linux_resume_one_lwp): Reimplement as wrapper around
7458 linux_resume_one_lwp_throw that swallows errors if the LWP is
7461 2015-03-19 Pedro Alves <palves@redhat.com>
7463 * linux-low.c (count_events_callback, select_event_lwp_callback):
7464 No longer check whether the thread has resume_stop as last resume
7467 2015-03-19 Pedro Alves <palves@redhat.com>
7469 * linux-low.c (count_events_callback, select_event_lwp_callback):
7470 Use the lwp's status_pending_p field, not the thread's.
7472 2015-03-19 Pedro Alves <palves@redhat.com>
7474 * linux-low.c (select_event_lwp_callback): Update comments to
7475 no longer mention SIGTRAP.
7477 2015-03-18 Gary Benson <gbenson@redhat.com>
7479 * server.c (handle_query): Do not report vFile:fstat as supported.
7481 2015-03-11 Gary Benson <gbenson@redhat.com>
7483 * hostio.c (sys/types.h): New include.
7484 (sys/stat.h): Likewise.
7485 (common-remote-fileio.h): Likewise.
7486 (handle_fstat): New function.
7487 (handle_vFile): Handle vFile:fstat packets.
7489 2015-03-11 Gary Benson <gbenson@redhat.com>
7491 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7492 struct stat.st_blocks and struct stat.st_blksize.
7493 * configure: Regenerate.
7494 * config.in: Likewise.
7495 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7496 (OBS): Add common-remote-fileio.o.
7497 (common-remote-fileio.o): New rule.
7499 2015-03-09 Pedro Alves <palves@redhat.com>
7501 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7502 'struct sockaddr' pointer in 'accept' call.
7504 2015-03-09 Pedro Alves <palves@redhat.com>
7507 2015-03-07 Pedro Alves <palves@redhat.com>
7508 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7509 or <winsock2.h> here. Instead include "gdb_socket.h".
7510 (remote_open): Use union gdb_sockaddr_u.
7511 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7512 or <winsock2.h> here. Instead include "gdb_socket.h".
7513 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7514 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7516 (init_named_socket, gdb_agent_helper_thread): Use union
7519 2015-03-07 Pedro Alves <palves@redhat.com>
7521 * configure.ac (build_warnings): Move
7522 -Wdeclaration-after-statement to the C-specific set.
7523 * configure: Regenerate.
7525 2015-03-07 Pedro Alves <palves@redhat.com>
7527 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7528 or <winsock2.h> here. Instead include "gdb_socket.h".
7529 (remote_open): Use union gdb_sockaddr_u.
7530 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7531 or <winsock2.h> here. Instead include "gdb_socket.h".
7532 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7533 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7535 (init_named_socket, gdb_agent_helper_thread): Use union
7538 2015-03-07 Pedro Alves <palves@redhat.com>
7540 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7543 2015-03-06 Yao Qi <yao.qi@linaro.org>
7545 * linux-aarch64-low.c (aarch64_insert_point): Use
7546 show_debug_regs as a boolean.
7547 (aarch64_remove_point): Likewise.
7549 2015-03-05 Pedro Alves <palves@redhat.com>
7551 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7552 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7553 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7554 * nto-low.c (nto_target_ops): Likewise.
7555 * spu-low.c (spu_target_ops): Likewise.
7556 * win32-low.c (win32_target_ops): Likewise.
7558 2015-03-04 Pedro Alves <palves@redhat.com>
7560 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7561 Decide whether a breakpoint triggered based on the SIGTRAP's
7563 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7564 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7565 (linux_low_filter_event): Check for breakpoints before checking
7567 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7569 (linux_stopped_by_sw_breakpoint)
7570 (linux_supports_stopped_by_sw_breakpoint)
7571 (linux_stopped_by_hw_breakpoint)
7572 (linux_supports_stopped_by_hw_breakpoint): New functions.
7573 (linux_target_ops): Install new target methods.
7575 2015-03-04 Pedro Alves <palves@redhat.com>
7577 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7578 * server.c (swbreak_feature, hwbreak_feature): New globals.
7579 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7580 (captured_main): Clear swbreak_feature and hwbreak_feature.
7581 * server.h (swbreak_feature, hwbreak_feature): Declare.
7582 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7583 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7584 supports_stopped_by_hw_breakpoint>: New fields.
7585 (target_supports_stopped_by_sw_breakpoint)
7586 (target_stopped_by_sw_breakpoint)
7587 (target_supports_stopped_by_hw_breakpoint)
7588 (target_stopped_by_hw_breakpoint): Declare.
7590 2015-03-04 Pedro Alves <palves@redhat.com>
7592 enum lwp_stop_reason -> enum target_stop_reason
7593 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7594 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7595 (linux_wait_1, stuck_in_jump_pad_callback)
7596 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7597 (linux_stopped_by_watchpoint):
7598 * linux-low.h (enum lwp_stop_reason): Delete.
7599 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7600 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7602 2015-03-04 Yao Qi <yao.qi@linaro.org>
7604 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7606 2015-03-03 Gary Benson <gbenson@redhat.com>
7608 * hostio.c (handle_vFile): Fix prefix lengths.
7610 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7612 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7615 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7617 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7618 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7619 (clean): Add "rm -f" for above C files.
7620 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7621 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7622 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7623 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7624 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7625 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7626 (init_registers_s390x_vx_linux64)
7627 (init_registers_s390x_tevx_linux64)
7628 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7629 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7631 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7632 (s390_store_vxrs_high): New functions.
7633 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7635 (s390_arch_setup): Add logic for selecting one of the new target
7636 descriptions. Activate the new vector regsets if applicable.
7637 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7638 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7639 and init_registers_s390x_tevx_linux64.
7641 2015-03-01 Pedro Alves <palves@redhat.com>
7643 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7646 2015-02-27 Pedro Alves <palves@redhat.com>
7648 * linux-x86-low.c (u_debugreg_offset): New function.
7649 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7651 2015-02-27 Pedro Alves <palves@redhat.com>
7653 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7654 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7655 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7656 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7657 (ps_lsetfpregs, ps_getpid)
7658 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7659 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7660 (ps_lsetxregs, ps_plog): Declare.
7662 2015-02-27 Pedro Alves <palves@redhat.com>
7664 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7665 IP_AGENT_EXPORT_FUNC.
7666 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7667 IP_AGENT_EXPORT_FUNC.
7668 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7669 (IP_AGENT_EXPORT): Delete.
7670 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7671 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7672 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7673 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7674 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7675 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7676 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7677 (traceframe_read_count, traceframe_write_count)
7678 (traceframes_created, trace_state_variables, get_raw_reg)
7679 (get_trace_state_variable_value, set_trace_state_variable_value)
7680 (ust_loaded, helper_thread_id, cmd_buf): Use
7681 IPA_SYM_EXPORTED_NAME.
7682 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7683 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7684 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7685 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7686 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7687 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7688 EXTERN_C_PUSH/EXTERN_C_POP.
7689 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7690 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7691 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7692 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7693 (traceframe_write_count, traceframe_read_count)
7694 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7695 (about_to_request_buffer_space, get_trace_state_variable_value)
7696 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7697 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7698 EXTERN_C_PUSH/EXTERN_C_POP.
7699 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7700 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7701 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7702 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7703 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7704 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7705 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7706 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7708 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7709 (IP_AGENT_EXPORT_VAR_DECL): Define.
7711 (gdb_agent_get_raw_reg): Declare.
7713 2015-02-27 Tom Tromey <tromey@redhat.com>
7714 Pedro Alves <palves@redhat.com>
7716 Rename symbols whose names are reserved C++ keywords throughout.
7718 2015-02-27 Pedro Alves <palves@redhat.com>
7720 * Makefile.in (COMPILER): New, get it from autoconf.
7721 (CXX): Get from autoconf instead.
7722 (COMPILE.pre): Use COMPILER.
7723 (CC-LD): Rename to ...
7724 (CC_LD): ... this. Use COMPILER.
7725 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7726 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7727 * acinclude.m4: Include build-with-cxx.m4.
7728 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7729 Disable -Werror by default if building in C++ mode.
7730 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7731 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7732 the C++ compiler. Save/restore CXXFLAGS too.
7733 * configure: Regenerate.
7735 2015-02-27 Pedro Alves <palves@redhat.com>
7737 * acinclude.m4: Include libiberty.m4.
7738 * configure.ac: Call libiberty_INIT.
7739 * config.in, configure: Regenerate.
7741 2015-02-26 Pedro Alves <palves@redhat.com>
7743 * linux-low.c (linux_wait_1): When incrementing the PC past a
7744 program breakpoint always use the_low_target.breakpoint_len as
7745 increment, rather than the maximum between that and
7746 the_low_target.decr_pc_after_break.
7748 2015-02-23 Pedro Alves <palves@redhat.com>
7750 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7751 thread was doing a step-over; always adjust the PC if
7752 we stepped over a permanent breakpoint.
7753 (linux_wait_1): If we stepped over breakpoint that was on top of a
7754 permanent breakpoint, manually advance the PC past it.
7756 2015-02-23 Pedro Alves <palves@redhat.com>
7758 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7760 (x86_fill_gregset, x86_store_gregset): Use it when handling
7763 2015-02-20 Pedro Alves <palves@redhat.com>
7765 * thread-db.c: Include "nat/linux-procfs.h".
7766 (thread_db_init): Skip listing new threads if the kernel supports
7767 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7769 2015-02-20 Pedro Alves <palves@redhat.com>
7771 * linux-low.c (status_pending_p_callback): Use ptid_match.
7773 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7775 PR breakpoints/16812
7776 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7777 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7778 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7780 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7782 PR breakpoints/15956
7783 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7785 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7787 * linux-low.c (linux_low_btrace_conf): Print size.
7788 * server.c (handle_btrace_conf_general_set): New.
7789 (hanle_general_set): Call handle_btrace_conf_general_set.
7790 (handle_query): Report Qbtrace-conf:bts:size as supported.
7792 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7794 * linux-low.c (linux_low_enable_btrace): Update parameters.
7795 (linux_low_btrace_conf): New.
7796 (linux_target_ops)<to_btrace_conf>: Initialize.
7797 * server.c (current_btrace_conf): New.
7798 (handle_btrace_enable): Rename to ...
7799 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7800 to target_enable_btrace. Update comment. Update users.
7801 (handle_qxfer_btrace_conf): New.
7802 (qxfer_packets): Add btrace-conf entry.
7803 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7804 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7805 (target_ops)<read_btrace_conf>: New.
7806 (target_enable_btrace): Update parameters.
7807 (target_read_btrace_conf): New.
7809 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7811 * server.c (handle_btrace_general_set): Remove call to
7812 target_supports_btrace.
7813 (supported_btrace_packets): New.
7814 (handle_query): Call supported_btrace_packets.
7815 * target.h: include btrace-common.h.
7816 (btrace_target_info): Removed.
7817 (supports_btrace, target_supports_btrace): Update parameters.
7819 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7821 * Makefile.in (SFILES): Add common/btrace-common.c.
7822 (OBS): Add common/btrace-common.o.
7823 (btrace-common.o): Add build rules.
7824 * linux-low: Include btrace-common.h.
7825 (linux_low_read_btrace): Use struct btrace_data. Call
7826 btrace_data_init and btrace_data_fini.
7828 2015-02-06 Pedro Alves <palves@redhat.com>
7830 * thread-db.c (find_new_threads_callback): Add debug output.
7832 2015-02-04 Pedro Alves <palves@redhat.com>
7834 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7835 (resume_stopped_resumed_lwps): New function.
7836 (linux_wait_for_event_filtered): Use it.
7838 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7840 * Makefile.in (SFILES): Add linux-personality.c.
7841 (linux-personality.o): New rule.
7842 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7843 list of objects to be built.
7844 * linux-low.c: Include nat/linux-personality.h.
7845 (linux_create_inferior): Remove code to disable address space
7846 randomization (moved to ../nat/linux-personality.c). Create
7847 cleanup to disable address space randomization.
7849 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7851 * Makefile.in (posix-strerror.o): New rule.
7852 (mingw-strerror.o): Likewise.
7853 * configure: Regenerated.
7854 * configure.ac: Source file ../common/common.host. Initialize new
7855 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7857 2015-01-14 Yao Qi <yao@codesourcery.com>
7859 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7860 (ppc-linux.o): New rule.
7861 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7862 * configure.ac: AC_CHECK_FUNCS(getauxval).
7863 * config.in: Re-generated.
7864 * configure: Re-generated.
7865 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7866 ppc64_64bit_inferior_p
7868 2015-01-14 Yao Qi <yao@codesourcery.com>
7870 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7871 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7872 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7873 (PT_ORIG_R3, PT_TRAP): Likewise.
7874 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7875 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7876 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7878 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7880 * i387-fp.c (i387_cache_to_xsave): In look over
7881 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7882 zmmh_low_space field by use of zmmh_high_space.
7884 2015-01-09 Pedro Alves <palves@redhat.com>
7886 * linux-low.c (step_over_bkpt): Move higher up in the file.
7887 (handle_extended_wait): Don't store the stop_pc here.
7888 (get_stop_pc): Adjust comments and rename to ...
7889 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7890 stopped for a software breakpoint or hardware breakpoint.
7891 (thread_still_has_status_pending_p): New function.
7892 (status_pending_p_callback): Use
7893 thread_still_has_status_pending_p. If the event is no longer
7894 interesting, resume the LWP.
7895 (handle_tracepoints): Add assert.
7896 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7897 (wstatus_maybe_breakpoint): New function.
7898 (cancel_breakpoint): Delete function.
7899 (check_stopped_by_watchpoint): New function, factored out from
7900 linux_low_filter_event.
7901 (lp_status_maybe_breakpoint): Delete function.
7902 (linux_low_filter_event): Remove filter_ptid argument.
7903 Leave thread group exits pending here. Store the LWP's stop PC.
7904 Always leave events pending.
7905 (linux_wait_for_event_filtered): Pull all events out of the
7906 kernel, and leave them all pending.
7907 (count_events_callback, select_event_lwp_callback): Consider all
7909 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7910 (select_event_lwp): Only give preference to the stepping LWP in
7911 all-stop mode. Adjust comments.
7912 (ignore_event): New function.
7913 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7914 references to cancel_breakpoints. Adjust to renames. Also give
7915 equal priority to all LWPs that have had events in non-stop mode.
7916 If reporting a software breakpoint event, unadjust the LWP's PC.
7917 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7918 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7920 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7921 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7922 (linux_stopped_by_watchpoint): Adjust.
7923 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7924 * linux-low.h (enum lwp_stop_reason): New.
7925 (struct lwp_info) <stop_pc>: Adjust comment.
7926 <stopped_by_watchpoint>: Delete field.
7927 <stop_reason>: New field.
7928 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7929 * mem-break.c (software_breakpoint_inserted_here)
7930 (hardware_breakpoint_inserted_here): New function.
7931 * mem-break.h (software_breakpoint_inserted_here)
7932 (hardware_breakpoint_inserted_here): Declare.
7933 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7934 (cancel_breakpoints): Delete.
7935 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7936 (upload_fast_traceframes): Remove references to
7939 2015-01-09 Pedro Alves <palves@redhat.com>
7941 * thread-db.c (find_new_threads_callback): Ignore thread if the
7942 kernel thread ID is -1.
7944 2015-01-09 Pedro Alves <palves@redhat.com>
7946 * linux-low.c (linux_attach_fail_reason_string): Move to
7947 nat/linux-ptrace.c, and rename.
7948 (linux_attach_lwp): Update comment.
7949 (attach_proc_task_lwp_callback): New function.
7950 (linux_attach): Adjust to rename and use
7951 linux_proc_attach_tgid_threads.
7952 (linux_attach_fail_reason_string): Delete declaration.
7954 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7956 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7957 * server.c (gdbserver_version): Likewise.
7959 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7961 * remote-utils.c: Include ctype.h.
7962 (input_interrupt): Explicitly handle the case when the char
7963 received is the NUL byte. Improve the printing of non-ASCII
7966 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7968 * linux-low.c (linux_low_filter_event): Update call to
7969 linux_enable_event_reporting following the addition of
7970 a new parameter to that function.
7972 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7975 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7976 (AARCH64_FPCR_REGNO): Likewise.
7977 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7978 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7979 (aarch64_store_fpregset): Likewise.
7981 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7983 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7984 Remove FIXME comment about assumption about N.
7986 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7988 * configure.ac: If large-file support is disabled in GDBserver,
7989 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7990 * configure: Regenerate.
7992 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7994 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7995 warning upon ENODATA from ptrace.
7996 * linux-s390-low.c (s390_store_tdb): New.
7997 (s390_regsets): Add regset for NT_S390_TDB.
7999 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8001 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8002 without a fill_function.
8003 * linux-s390-low.c (s390_fill_last_break): Remove.
8004 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8005 (s390_arch_setup): Use regset's size instead of fill_function for
8008 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8010 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8011 the regset's store function when ptrace returned an error.
8012 * regcache.c (get_thread_regcache): Invalidate register cache
8013 before fetching inferior's registers.
8015 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8017 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8018 while-loop as for-loop.
8019 (regsets_store_inferior_registers): Likewise.
8021 2014-11-28 Yao Qi <yao@codesourcery.com>
8023 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8024 * config.in, configure: Re-generate.
8025 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8028 2014-11-21 Yao Qi <yao@codesourcery.com>
8030 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8031 (AC_CHECK_HEADERS): Remove malloc.h.
8032 * configure: Re-generated.
8033 * config.in: Re-generated.
8034 * server.h: Don't include alloca.h and malloc.h.
8035 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8036 Don't include malloc.h.
8038 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8040 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8041 corresponding ERRNO check in same block.
8043 2014-11-12 Pedro Alves <palves@redhat.com>
8045 * server.c (cont_thread): Update comment.
8046 (start_inferior, attach_inferior): No longer clear cont_thread.
8047 (handle_v_cont): No longer set cont_thread.
8048 (captured_main): Clear cont_thread each time a GDB connects.
8050 2014-11-12 Pedro Alves <palves@redhat.com>
8052 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8053 thread, and don't resume all threads if the Hc thread has exited.
8055 2014-11-12 Pedro Alves <palves@redhat.com>
8057 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8058 the process group instead of to a specific LWP.
8060 2014-10-15 Pedro Alves <palves@redhat.com>
8063 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8065 (arm_set_thread_context): Delete.
8066 (the_low_target): Adjust.
8067 * win32-i386-low.c (debug_registers_changed)
8068 (debug_registers_used): Delete.
8069 (update_debug_registers_callback): New function.
8070 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8071 needing to update their debug registers.
8072 (win32_get_current_dr): New function.
8073 (x86_dr_low_get_addr, x86_dr_low_get_control)
8074 (x86_dr_low_get_status): Fetch the debug register from the thread
8076 (i386_initial_stuff): Adjust.
8077 (i386_get_thread_context): Remove current_event parameter. Don't
8078 clear debug_registers_changed nor copy DR values to
8080 (i386_set_thread_context): Delete.
8081 (i386_prepare_to_resume): New function.
8082 (i386_thread_added): Mark the thread as needing to update irs
8084 (the_low_target): Remove i386_set_thread_context and install
8085 i386_prepare_to_resume.
8086 * win32-low.c (win32_get_thread_context): Adjust.
8087 (win32_set_thread_context): Use SetThreadContext
8089 (win32_prepare_to_resume): New function.
8090 (win32_require_context): New function, factored out from ...
8091 (thread_rec): ... this.
8092 (continue_one_thread): Call win32_prepare_to_resume on each thread
8093 we're about to continue.
8094 (win32_resume): Call win32_prepare_to_resume on the event thread.
8095 * win32-low.h (struct win32_thread_info)
8096 <debug_registers_changed>: New field.
8097 (struct win32_target_ops): Change prototype of set_thread_context,
8098 delete set_thread_context and add prepare_to_resume.
8099 (win32_require_context): New declaration.
8101 2014-10-08 Gary Benson <gbenson@redhat.com>
8103 * server.h: Do not include common-exceptions.h.
8105 2014-10-08 Gary Benson <gbenson@redhat.com>
8107 * server.h: Do not include cleanups.h.
8109 2014-09-30 James Hogan <james.hogan@imgtec.com>
8111 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8114 2014-09-23 Yao Qi <yao@codesourcery.com>
8116 * linux-low.c (lp_status_maybe_breakpoint): New function.
8117 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8118 (count_events_callback): Likewise.
8119 (select_event_lwp_callback): Likewise.
8120 (cancel_breakpoints_callback): Likewise.
8122 2014-09-19 Don Breazeal <donb@codesourcery.com>
8124 * linux-low.c (handle_extended_wait): Call
8125 linux_ptrace_get_extended_event.
8126 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8127 linux_is_extended_waitstatus.
8129 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8131 * Makefile.in (CPPFLAGS): Define.
8132 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8133 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8135 2014-09-16 Gary Benson <gbenson@redhat.com>
8137 * inferiors.h (current_inferior): Renamed as...
8138 (current_thread): New variable. All uses updated.
8139 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8140 (maybe_move_out_of_jump_pad): Likewise.
8141 (cancel_breakpoint): Likewise.
8142 (linux_low_filter_event): Likewise.
8143 (wait_for_sigstop): Likewise.
8144 (linux_resume_one_lwp): Likewise.
8145 (need_step_over_p): Likewise.
8146 (start_step_over): Likewise.
8147 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8148 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8149 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8150 and save_inferior as saved_thread.
8151 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8153 (regcache_invalidate_thread): Likewise.
8154 * remote-utils.c (prepare_resume_reply): Likewise.
8155 * thread-db.c (thread_db_get_tls_address): Likewise.
8156 (disable_thread_event_reporting): Likewise.
8157 (remove_thread_event_breakpoints): Likewise.
8158 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8160 * target.h (set_desired_inferior): Renamed as...
8161 (set_desired_thread): New declaration. All uses updated.
8162 * server.c (myresume): Updated comment to reference thread instead
8164 (handle_serial_event): Likewise.
8165 (handle_target_event): Likewise.
8167 2014-09-12 Tom Tromey <tromey@redhat.com>
8168 Gary Benson <gbenson@redhat.com>
8170 * regcache.h: Include common-regcache.h.
8171 (regcache_read_pc): Don't declare.
8172 * regcache.c (get_thread_regcache_for_ptid): New function.
8174 2014-09-11 Tom Tromey <tromey@redhat.com>
8175 Gary Benson <gbenson@redhat.com>
8177 * symbol.c: New file.
8178 * Makefile.in (SFILES): Add symbol.c.
8179 (OBS): Add symbol.o.
8181 2014-09-11 Gary Benson <gbenson@redhat.com>
8183 * target.c (target_stop_ptid, target_continue_ptid): New
8186 2014-09-11 Tom Tromey <tromey@redhat.com>
8187 Gary Benson <gbenson@redhat.com>
8189 * target.h: Include target/target.h.
8190 * target.c (target_read_memory, target_read_uint32)
8191 (target_write_memory): New functions.
8193 2014-09-11 Gary Benson <gbenson@redhat.com>
8195 * server.h (debug_hw_points): Don't declare.
8196 * server.c (debug_hw_points): Don't define. Replace all uses
8197 with show_debug_regs.
8198 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8199 all uses with show_debug_regs.
8201 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8203 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8204 endianness into account.
8205 (ppc_supply_ptrace_register): Likewise.
8207 2014-09-03 James Hogan <james.hogan@imgtec.com>
8209 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8210 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8212 2014-09-03 Gary Benson <gbenson@redhat.com>
8214 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8215 ALL_DEBUG_ADDRESS_REGISTERS.
8217 2014-09-02 Gary Benson <gbenson@redhat.com>
8219 * i386-low.h: Renamed as...
8220 * x86-low.h: New file. All type, function and variable name
8221 prefixes changed from "i386_" to "x86_". All references updated.
8222 * i386-low.c: Renamed as...
8223 * x86-low.c: New file. All type, function and variable name
8224 prefixes changed from "i386_" to "x86_". All references updated.
8226 2014-09-02 Gary Benson <gbenson@redhat.com>
8228 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8229 (x86_linux_new_thread): Likewise.
8231 2014-08-29 Gary Benson <gbenson@redhat.com>
8233 * server.h (setjmp.h): Do not include.
8234 (toplevel): Do not declare.
8235 (common-exceptions.h): Include.
8236 (cleanups.h): Likewise.
8237 * server.c (toplevel): Do not define.
8238 (exit_code): New static global.
8239 (detach_or_kill_for_exit_cleanup): New function.
8240 (main): New function. Original main renamed to...
8241 (captured_main): New function.
8242 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8244 2014-08-29 Gary Benson <gbenson@redhat.com>
8246 * Makefile.in (SFILES): Add common/common-exceptions.c.
8247 (OBS): Add common-exceptions.o.
8248 (common-exceptions.o): New rule.
8249 * utils.c (prepare_to_throw_exception): New function.
8251 2014-08-29 Gary Benson <gbenson@redhat.com>
8253 * config.in: Regenerate.
8254 * configure: Likewise.
8256 2014-08-29 Gary Benson <gbenson@redhat.com>
8258 * Makefile.in (SFILES): Add common/cleanups.c.
8260 (cleanups.o): New rule.
8262 2014-08-29 Gary Benson <gbenson@redhat.com>
8264 * utils.c (internal_vwarning): New function.
8266 2014-08-28 Gary Benson <gbenson@redhat.com>
8268 * utils.h (fatal): Remove declaration.
8269 * utils.c (fatal): Remove function.
8271 2014-08-28 Gary Benson <gbenson@redhat.com>
8273 * tracepoint.c (gdb_agent_init): Replace fatal with
8275 (initialize_tracepoint): Likewise.
8277 2014-08-28 Gary Benson <gbenson@redhat.com>
8279 * remote-utils.c (remote_prepare): Replace fatal with error.
8281 2014-08-28 Gary Benson <gbenson@redhat.com>
8283 * linux-low.c (linux_async): Replace fatal with warning.
8285 (linux_start_non_stop): Return -1 if linux_async failed.
8287 2014-08-28 Gary Benson <gbenson@redhat.com>
8289 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8291 (i386_dr_low_get_addr): Remove vague comment.
8292 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8295 2014-08-28 Gary Benson <gbenson@redhat.com>
8297 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8298 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8300 (linux_resume_one_lwp): Likewise.
8301 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8303 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8304 with internal_error.
8305 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8306 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8307 (find_register_by_name): Replace fatal with internal_error.
8308 (find_regno): Likewise.
8309 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8310 * thread-db.c (thread_db_create_event): Likewise.
8311 (thread_db_load_search): Likewise.
8312 (try_thread_db_load_1): Likewise.
8313 * tracepoint.c (get_jump_space_head): Replace fatal with
8315 (claim_trampoline_space): Likewise.
8316 (have_fast_tracepoint_trampoline_buffer): Likewise.
8317 (cmd_qtstart): Likewise.
8318 (stop_tracing): Likewise.
8319 (fast_tracepoint_collecting): Likewise.
8320 (target_malloc): Likewise.
8321 (download_tracepoint): Likewise.
8322 (download_trace_state_variables): Replace check with gdb_assert.
8323 (upload_fast_traceframes): Replace fatal with internal_error.
8325 2014-08-19 Tom Tromey <tromey@redhat.com>
8326 Gary Benson <gbenson@redhat.com>
8328 * Makefile.in (SFILES): Add common/common-debug.c.
8329 (OBS): Add common-debug.o.
8330 (common-debug.o): New rule.
8331 * debug.h (debug_printf): Don't declare.
8332 * debug.c (debug_printf): Renamed and rewritten as...
8333 (debug_vprintf): New function.
8335 2014-08-19 Gary Benson <gbenson@redhat.com>
8337 * utils.h: Do not include print-utils.h.
8339 2014-08-19 Tom Tromey <tromey@redhat.com>
8340 Gary Benson <gbenson@redhat.com>
8342 * server.h: Add static assertion.
8343 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8345 2014-08-19 Tom Tromey <tromey@redhat.com>
8346 Gary Benson <gbenson@redhat.com>
8348 * Makefile.in (SFILES): Add common/errors.c.
8349 (OBS): Add errors.o.
8350 (IPA_OBS): Add errors-ipa.o.
8351 (errors.o): New rule.
8352 (errors-ipa.o): Likewise.
8353 * utils.h (perror_with_name, error, warning): Don't declare.
8354 * utils.c (warning): Renamed and rewritten as...
8355 (vwarning): New function.
8356 (error): Renamed and rewritten as...
8357 (verror): New function.
8358 (internal_error): Renamed and rewritten as...
8359 (internal_verror): New function.
8361 2014-08-07 Gary Benson <gbenson@redhat.com>
8363 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8364 * configure: Regenerate.
8365 * config.in: Likewise.
8366 * server.h: Do not include errno.h.
8367 * event-loop.c: Likewise.
8368 * hostio-errno.c: Likewise.
8369 * linux-low.c: Likewise.
8370 * remote-utils.c: Likewise.
8371 * spu-low.c: Likewise.
8372 * utils.c: Likewise.
8373 * gdbreplay.c: Unconditionally include errno.h.
8375 2014-08-07 Gary Benson <gbenson@redhat.com>
8377 * server.h: Do not include string.h.
8378 * event-loop.c: Likewise.
8379 * linux-low.c: Likewise.
8380 * regcache.c: Likewise.
8381 * remote-utils.c: Likewise.
8382 * spu-low.c: Likewise.
8383 * utils.c: Likewise.
8385 2014-08-07 Gary Benson <gbenson@redhat.com>
8387 * server.h: Do not include gdb_assert.h.
8389 2014-08-07 Gary Benson <gbenson@redhat.com>
8391 * server.h: Do not include common-utils.h.
8393 2014-08-07 Gary Benson <gbenson@redhat.com>
8395 * server.h: Do not include ptid.h.
8396 * notif.h: Likewise.
8398 2014-08-07 Gary Benson <gbenson@redhat.com>
8400 * server.h: Do not include gdb_locale.h.
8402 2014-08-07 Gary Benson <gbenson@redhat.com>
8404 * server.h: Do not include gdb/signals.h.
8405 * win32-low.c: Likewise.
8407 2014-08-07 Gary Benson <gbenson@redhat.com>
8409 * server.h: Do not include pathmax.h.
8411 2014-08-07 Gary Benson <gbenson@redhat.com>
8413 * server.h: Do not include libiberty.h.
8414 * linux-bfin-low.c: Likewise.
8416 2014-08-07 Gary Benson <gbenson@redhat.com>
8418 * server.h: Do not include ansidecl.h.
8420 2014-08-07 Gary Benson <gbenson@redhat.com>
8422 * linux-x86-low.c: Do not include stddef.h.
8423 * lynx-ppc-low.c: Likewise.
8424 * tracepoint.c: Likewise.
8426 2014-08-07 Gary Benson <gbenson@redhat.com>
8428 * server.h: Do not include stdarg.h.
8429 * nto-low.c: Likewise.
8431 2014-08-07 Gary Benson <gbenson@redhat.com>
8433 * server.h: Do not include stdlib.h.
8434 * inferiors.c: Likewise.
8435 * linux-low.c: Likewise.
8436 * regcache.c: Likewise.
8437 * spu-low.c: Likewise.
8438 * tracepoint.c: Likewise.
8439 * utils.c: Likewise.
8441 2014-08-07 Gary Benson <gbenson@redhat.com>
8443 * server.h: Do not include stdio.h.
8444 * linux-low.c: Likewise.
8445 * remote-utils.c: Likewise.
8446 * spu-low.c: Likewise.
8447 * utils.c: Likewise.
8448 * wincecompat.c: Likewise.
8450 2014-08-06 Gary Benson <gbenson@redhat.com>
8452 * regcache.c (init_register_cache): Move conditionals inside if.
8454 2014-08-06 Gary Benson <gbenson@redhat.com>
8456 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8458 2014-07-31 Gary Benson <gbenson@redhat.com>
8460 * ax.h: Do not include server.h.
8461 * gdbthread.h: Likewise.
8462 * lynx-low.h: Likewise.
8463 * notif.h: Likewise.
8465 2014-07-30 Gary Benson <gbenson@redhat.com>
8467 * server.h: Include common-defs.h.
8468 Do not include config.h or build-gnulib-gdbserver/config.h.
8470 2014-07-30 Gary Benson <gbenson@redhat.com>
8472 * hostio-errno.c: Move server.h to top of includes list.
8473 * inferiors.c: Likewise.
8474 * linux-x86-low.c: Likewise.
8475 * notif.c: Include server.h.
8477 2014-07-24 Tom Tromey <tromey@redhat.com>
8478 Gary Benson <gbenson@redhat.com>
8480 * server.h (CORE_ADDR): Now unsigned.
8482 2014-07-16 Pedro Alves <palves@redhat.com>
8484 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8486 2014-07-15 Pedro Alves <palves@redhat.com>
8488 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8491 2014-07-11 Pedro Alves <palves@redhat.com>
8493 * linux-low.c (kill_wait_lwp): New function, based on
8494 kill_one_lwp_callback, but use my_waitpid directly.
8495 (kill_one_lwp_callback, linux_kill): Use it.
8497 2014-06-23 Pedro Alves <palves@redhat.com>
8499 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8500 before setting DR0..DR3.
8502 2014-06-20 Gary Benson <gbenson@redhat.com>
8504 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8505 * configure: Regenerated.
8506 * config.in: Likewise.
8508 2014-06-20 Gary Benson <gbenson@redhat.com>
8510 * Makefile.in (SFILES): Update locations for files moved
8512 (object file files): Reordered.
8514 2014-06-20 Gary Benson <gbenson@redhat.com>
8516 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8517 (i386_dr_low_set_addr): Likewise.
8518 (i386_dr_low_get_addr): Likewise.
8519 (i386_dr_low_can_set_control): Likewise.
8520 (i386_dr_low_set_control): Likewise.
8521 (i386_dr_low_get_control): Likewise.
8522 (i386_dr_low_get_status): Likewise.
8523 (i386_get_debug_register_length): Likewise.
8524 * linux-x86-low.c (i386_dr_low_set_addr):
8525 Changed signature. Made static.
8526 (i386_dr_low_get_addr): Likewise.
8527 (i386_dr_low_set_control): Likewise.
8528 (i386_dr_low_get_control): Likewise.
8529 (i386_dr_low_get_status): Likewise.
8530 (i386_dr_low): New global variable.
8531 * win32-i386-low.c (i386_dr_low_set_addr):
8532 Changed signature. Made static.
8533 (i386_dr_low_get_addr): Likewise.
8534 (i386_dr_low_set_control): Likewise.
8535 (i386_dr_low_get_control): Likewise.
8536 (i386_dr_low_get_status): Likewise.
8537 (i386_dr_low): New global variable.
8539 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8541 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8542 * Makefile.in (AR, AR_FLAGS): Define.
8543 * configure: Regenerate.
8545 2014-06-19 Gary Benson <gbenson@redhat.com>
8547 * Makefile.in (i386-dregs.o): New rule.
8548 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8549 * i386-low.c (target.h): Remove include.
8550 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8551 (DR_CONTROL_SHIFT): Likewise.
8552 (DR_CONTROL_SIZE): Likewise.
8553 (DR_RW_EXECUTE): Likewise.
8554 (DR_RW_WRITE): Likewise.
8555 (DR_RW_READ): Likewise.
8556 (DR_RW_IORW): Likewise.
8557 (DR_LEN_1): Likewise.
8558 (DR_LEN_2): Likewise.
8559 (DR_LEN_4): Likewise.
8560 (DR_LEN_8): Likewise.
8561 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8562 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8563 (DR_ENABLE_SIZE): Likewise.
8564 (DR_LOCAL_SLOWDOWN): Likewise.
8565 (DR_GLOBAL_SLOWDOWN): Likewise.
8566 (DR_CONTROL_RESERVED): Likewise.
8567 (I386_DR_CONTROL_MASK): Likewise.
8568 (I386_DR_VACANT): Likewise.
8569 (I386_DR_LOCAL_ENABLE): Likewise.
8570 (I386_DR_GLOBAL_ENABLE): Likewise.
8571 (I386_DR_DISABLE): Likewise.
8572 (I386_DR_SET_RW_LEN): Likewise.
8573 (I386_DR_GET_RW_LEN): Likewise.
8574 (I386_DR_WATCH_HIT): Likewise.
8575 (i386_wp_op_t): Likewise.
8576 (i386_show_dr): Likewise.
8577 (i386_length_and_rw_bits): Likewise.
8578 (i386_insert_aligned_watchpoint): Likewise.
8579 (i386_remove_aligned_watchpoint): Likewise.
8580 (i386_handle_nonaligned_watchpoint): Likewise.
8581 i386_update_inferior_debug_regs(): Likewise.
8582 (i386_dr_insert_watchpoint): Likewise.
8583 (i386_dr_remove_watchpoint): Likewise.
8584 (i386_dr_region_ok_for_watchpoint): Likewise.
8585 (i386_dr_stopped_data_address): Likewise.
8586 (i386_dr_stopped_by_watchpoint): Likewise.
8588 2014-06-19 Gary Benson <gbenson@redhat.com>
8590 * i386-low.c (i386_dr_show): Renamed to
8591 i386_show_dr and made static. All uses updated.
8592 (i386_dr_length_and_rw_bits): Renamed to
8593 i386_length_and_rw_bits and made static.
8595 (i386_dr_insert_aligned_watchpoint): Renamed to
8596 i386_insert_aligned_watchpoint and made static.
8598 (i386_dr_remove_aligned_watchpoint): Renamed to
8599 i386_remove_aligned_watchpoint and made static.
8601 (i386_dr_update_inferior_debug_regs): Renamed to
8602 i386_update_inferior_debug_regs and made static.
8605 2014-06-18 Gary Benson <gbenson@redhat.com>
8607 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8608 (i386_dr_low_can_set_control): Likewise.
8609 (i386_get_debug_register_length): Likewise.
8610 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8611 (i386_dr_low_can_set_control): Likewise.
8612 (i386_get_debug_register_length): Likewise.
8614 2014-06-17 Gary Benson <gbenson@redhat.com>
8616 * i386-low.h (i386-dregs.h): New include.
8617 (DR_FIRSTADDR): Now in i386-dregs.h.
8618 (DR_LASTADDR): Likewise.
8619 (DR_NADDR): Likewise.
8620 (DR_STATUS): Likewise.
8621 (DR_CONTROL): Likewise.
8622 (i386_debug_reg_state): Likewise.
8623 (i386_dr_insert_watchpoint): Likewise.
8624 (i386_dr_remove_watchpoint): Likewise.
8625 (i386_dr_region_ok_for_watchpoint): Likewise.
8626 (i386_dr_stopped_data_address): Likewise.
8627 (i386_dr_stopped_by_watchpoint): Likewise.
8628 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8630 2014-06-18 Gary Benson <gbenson@redhat.com>
8632 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8633 i386_dr_insert_watchpoint.
8634 (i386_low_remove_watchpoint): Renamed to
8635 i386_dr_remove_watchpoint.
8636 (i386_low_region_ok_for_watchpoint): Renamed to
8637 i386_dr_region_ok_for_watchpoint.
8638 (i386_low_stopped_data_address): Renamed to
8639 i386_dr_stopped_data_address.
8640 (i386_low_stopped_by_watchpoint): Renamed to
8641 i386_dr_stopped_by_watchpoint.
8642 * i386-low.c (i386_show_dr): Renamed to
8643 i386_dr_show and made nonstatic. All uses updated.
8644 (i386_length_and_rw_bits): Renamed to
8645 i386_dr_length_and_rw_bits and made nonstatic.
8647 (i386_insert_aligned_watchpoint): Renamed to
8648 i386_dr_insert_aligned_watchpoint and made nonstatic.
8650 (i386_remove_aligned_watchpoint): Renamed to
8651 i386_dr_remove_aligned_watchpoint and made nonstatic.
8653 (i386_update_inferior_debug_regs): Renamed to
8654 i386_dr_update_inferior_debug_regs and made nonstatic.
8656 (i386_low_insert_watchpoint): Renamed to
8657 i386_dr_insert_watchpoint. All uses updated.
8658 (i386_low_remove_watchpoint): Renamed to
8659 i386_dr_remove_watchpoint. All uses updated.
8660 (i386_low_region_ok_for_watchpoint): Renamed to
8661 i386_dr_region_ok_for_watchpoint. All uses updated.
8662 (i386_low_stopped_data_address): Renamed to
8663 i386_dr_stopped_data_address. All uses updated.
8664 (i386_low_stopped_by_watchpoint): Renamed to
8665 i386_dr_stopped_by_watchpoint. All uses updated.
8667 2014-06-18 Gary Benson <gbenson@redhat.com>
8669 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8670 (i386_dr_low_can_set_control): Likewise.
8671 (i386_insert_aligned_watchpoint): New check.
8673 2014-06-18 Gary Benson <gbenson@redhat.com>
8675 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8678 2014-06-18 Gary Benson <gbenson@redhat.com>
8680 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8681 instead of fatal and error.
8682 (i386_handle_nonaligned_watchpoint): Likewise.
8684 2014-06-18 Gary Benson <gbenson@redhat.com>
8686 * i386-low.c (i386_get_debug_register_length): New macro.
8687 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8688 (i386_show_dr): Use debug_printf instead of fprintf. Use
8689 phex to format values.
8691 2014-06-18 Gary Benson <gbenson@redhat.com>
8693 * i386-low.h: Comment changes.
8694 * i386-low.c: Likewise.
8696 2014-06-18 Gary Benson <gbenson@redhat.com>
8698 * i386-low.c: Whitespace changes.
8700 2014-06-12 Tom Tromey <tromey@redhat.com>
8702 * utils.c (freeargv): Remove.
8704 2014-06-12 Tom Tromey <tromey@redhat.com>
8706 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8707 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8708 (parse_debug_format_options): Likewise.
8709 (gdbserver_usage): Likewise.
8710 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8711 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8712 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8714 ($(LIBGNU)): Depend on libiberty.
8715 (all-lib): Recurse into all subdirs.
8716 (install-only): Invoke "install" target in subdirs.
8717 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8719 * configure: Rebuild.
8720 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8721 for vasprintf, vsnprintf, or gettimeofday.
8722 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8725 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8727 * development.sh: Delete.
8728 * Makefile.in (config.status): Adjust dependency on development.sh.
8729 * configure.ac: Adjust development.sh source call.
8730 * configure: Regenerate.
8732 2014-06-02 Pedro Alves <palves@redhat.com>
8734 * ax.c (gdb_free_agent_expr): New function.
8735 * ax.h (gdb_free_agent_expr): New declaration.
8736 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8738 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8740 (clear_breakpoint_conditions_and_commands): New function.
8741 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8742 (clear_breakpoint_conditions_and_commands): New declaration.
8744 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8746 * linux-aarch64-low.c (asm/ptrace.h): Include.
8748 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8750 Fix TLS access for -static -pthread.
8751 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8752 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8753 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8755 2014-05-20 Pedro Alves <palves@redhat.com>
8757 * linux-aarch64-low.c (aarch64_insert_point)
8758 (aarch64_remove_point): No longer check whether the type is
8759 supported here. Adjust to new interface.
8760 (the_low_target): Install aarch64_supports_z_point_type as
8761 supports_z_point_type method.
8762 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8763 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8764 instead of a Z packet char. Adjust.
8765 (arm_supports_z_point_type): New function.
8766 (arm_insert_point, arm_remove_point): Adjust to new interface.
8767 (the_low_target): Install arm_supports_z_point_type.
8768 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8769 (cris_insert_point, cris_remove_point): Adjust to new interface.
8770 Don't check whether the type is supported here.
8771 (the_low_target): Install cris_supports_z_point_type.
8772 * linux-low.c (linux_supports_z_point_type): New function.
8773 (linux_insert_point, linux_remove_point): Adjust to new interface.
8774 * linux-low.h (struct linux_target_ops) <insert_point,
8775 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8776 raw_breakpoint pointer parameter.
8777 <supports_z_point_type>: New method.
8778 * linux-mips-low.c (mips_supports_z_point_type): New function.
8779 (mips_insert_point, mips_remove_point): Adjust to new interface.
8780 Use mips_supports_z_point_type.
8781 (the_low_target): Install mips_supports_z_point_type.
8782 * linux-ppc-low.c (the_low_target): Install NULL as
8783 supports_z_point_type method.
8784 * linux-s390-low.c (the_low_target): Install NULL as
8785 supports_z_point_type method.
8786 * linux-sparc-low.c (the_low_target): Install NULL as
8787 supports_z_point_type method.
8788 * linux-x86-low.c (x86_supports_z_point_type): New function.
8789 (x86_insert_point): Adjust to new insert_point interface. Use
8790 insert_memory_breakpoint. Adjust to new
8791 i386_low_insert_watchpoint interface.
8792 (x86_remove_point): Adjust to remove_point interface. Use
8793 remove_memory_breakpoint. Adjust to new
8794 i386_low_remove_watchpoint interface.
8795 (the_low_target): Install x86_supports_z_point_type.
8796 * lynx-low.c (lynx_target_ops): Install NULL as
8797 supports_z_point_type callback.
8798 * nto-low.c (nto_supports_z_point_type): New.
8799 (nto_insert_point, nto_remove_point): Adjust to new interface.
8800 (nto_target_ops): Install nto_supports_z_point_type.
8801 * mem-break.c: Adjust intro comment.
8802 (struct raw_breakpoint) <raw_type, size>: New fields.
8803 <inserted>: Update comment.
8804 <shlib_disabled>: Delete field.
8805 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8806 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8807 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8808 (raw_bkpt_type_to_target_hw_bp_type): New function.
8809 (find_enabled_raw_code_breakpoint_at): New function.
8810 (find_raw_breakpoint_at): New type and size parameters. Use them.
8811 (insert_memory_breakpoint): New function, based off
8812 set_raw_breakpoint_at.
8813 (remove_memory_breakpoint): New function.
8814 (set_raw_breakpoint_at): Reimplement.
8815 (set_breakpoint): New, based on set_breakpoint_at.
8816 (set_breakpoint_at): Reimplement.
8817 (delete_raw_breakpoint): Go through the_target->remove_point
8818 instead of assuming memory breakpoints.
8819 (find_gdb_breakpoint_at): Delete.
8820 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8821 (find_gdb_breakpoint): New function.
8822 (set_gdb_breakpoint_at): Delete.
8823 (z_type_supported): New function.
8824 (set_gdb_breakpoint_1): New function, loosely based off
8825 set_gdb_breakpoint_at.
8826 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8827 (delete_gdb_breakpoint_at): Delete.
8828 (delete_gdb_breakpoint_1): New function, loosely based off
8829 delete_gdb_breakpoint_at.
8830 (delete_gdb_breakpoint): New function.
8831 (clear_gdb_breakpoint_conditions): Rename to ...
8832 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8834 (add_condition_to_breakpoint): Make static.
8835 (add_breakpoint_condition): Take a struct breakpoint pointer
8836 instead of an address. Adjust.
8837 (gdb_condition_true_at_breakpoint): Rename to ...
8838 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8840 (gdb_condition_true_at_breakpoint): Reimplement.
8841 (add_breakpoint_commands): Take a struct breakpoint pointer
8842 instead of an address. Adjust.
8843 (gdb_no_commands_at_breakpoint): Rename to ...
8844 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8845 parameter. Return true if no breakpoint was found. Change debug
8847 (gdb_no_commands_at_breakpoint): Reimplement.
8848 (run_breakpoint_commands): Rename to ...
8849 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8850 and change return type to boolean.
8851 (run_breakpoint_commands): New function.
8852 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8853 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8854 breakpoint. Go through the_target->remove_point instead of
8855 assuming memory breakpoint.
8856 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8857 software and hardware breakpoints.
8858 (reinsert_raw_breakpoint): Go through the_target->insert_point
8859 instead of assuming memory breakpoint.
8860 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8861 software and hardware breakpoints.
8862 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8863 Check both software and hardware breakpoints.
8864 (validate_inserted_breakpoint): Assert the breakpoint is a
8865 software breakpoint. Set the inserted flag to -1 instead of
8866 setting shlib_disabled.
8867 (delete_disabled_breakpoints): Adjust.
8868 (validate_breakpoints): Only validate software breakpoints.
8869 Adjust to inserted flag change.
8870 (check_mem_read, check_mem_write): Skip breakpoint types other
8871 than software breakpoints. Adjust to inserted flag change.
8872 * mem-break.h (enum raw_bkpt_type): New enum.
8873 (raw_breakpoint, struct process_info): Forward declare.
8874 (Z_packet_to_target_hw_bp_type): Delete declaration.
8875 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8876 (set_gdb_breakpoint, delete_gdb_breakpoint)
8877 (clear_breakpoint_conditions): New declarations.
8878 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8879 (breakpoint_inserted_here): Update comment.
8880 (add_breakpoint_condition, add_breakpoint_commands): Replace
8881 address parameter with a breakpoint pointer parameter.
8882 (gdb_breakpoint_here): Update comment.
8883 (delete_gdb_breakpoint_at): Delete.
8884 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8885 * server.c (process_point_options): Take a struct breakpoint
8886 pointer instead of an address. Adjust.
8887 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8888 delete_gdb_breakpoint.
8889 * spu-low.c (spu_target_ops): Install NULL as
8890 supports_z_point_type method.
8891 * target.h: Include mem-break.h.
8892 (struct target_ops) <prepare_to_access_memory>: Update comment.
8893 <supports_z_point_type>: New field.
8894 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8895 instead of a char. Also take a raw breakpoint pointer.
8896 * win32-arm-low.c (the_low_target): Install NULL as
8897 supports_z_point_type.
8898 * win32-i386-low.c (i386_supports_z_point_type): New function.
8899 (i386_insert_point, i386_remove_point): Adjust to new interface.
8900 (the_low_target): Install i386_supports_z_point_type.
8901 * win32-low.c (win32_supports_z_point_type): New function.
8902 (win32_insert_point, win32_remove_point): Adjust to new interface.
8903 (win32_target_ops): Install win32_supports_z_point_type.
8904 * win32-low.h (struct win32_target_ops):
8905 <supports_z_point_type>: New method.
8906 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8907 instead of a char. Also take a raw breakpoint pointer.
8909 2014-05-20 Pedro Alves <palves@redhat.com>
8911 * mem-break.h: Include break-common.h.
8912 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8913 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8914 (Z_packet_to_target_hw_bp_type): New declaration.
8915 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8916 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8917 (Z_PACKET_ACCESS_WP): Delete macros.
8918 (Z_packet_to_hw_type): Delete function.
8919 * i386-low.h: Don't include break-common.h here.
8920 (Z_packet_to_hw_type): Delete declaration.
8921 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8922 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8923 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8924 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8925 * linux-aarch64-low.c: Don't include break-common.h here.
8926 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8927 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8928 (Z_packet_to_target_hw_bp_type): Delete function.
8929 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8931 (mips_insert_point, mips_remove_point): Use
8932 Z_packet_to_target_hw_bp_type.
8934 2014-05-20 Pedro Alves <palves@redhat.com>
8936 * linux-aarch64-low.c: Include break-common.h.
8937 (enum target_point_type): Delete.
8938 (Z_packet_to_point_type): Rename to ...
8939 (Z_packet_to_target_hw_bp_type): ... this, and return a
8940 target_hw_bp_type instead.
8941 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8942 instead of an enum target_point_type.
8943 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8945 (aarch64_dr_state_insert_one_point)
8946 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8947 (aarch64_handle_aligned_watchpoint)
8948 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8949 Take an enum target_hw_bp_type instead of an enum
8951 (aarch64_supports_z_point_type): New function.
8952 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8953 use Z_packet_to_target_hw_bp_type.
8955 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8957 * configure.ac: Only use -Werror by default when DEVELOPMENT
8959 * configure: Regenerate.
8961 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8963 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8964 * linux-x86-low.c (X86_64_USER_REGS): New.
8965 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8967 2014-04-28 Yao Qi <yao@codesourcery.com>
8969 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8972 2014-04-25 Pedro Alves <palves@redhat.com>
8975 * linux-low.c (linux_attach_fail_reason_string): New function.
8976 (linux_attach_lwp): Delete.
8977 (linux_attach_lwp_1): Rename to ...
8978 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8979 argument. Remove "initial" parameter. Return int instead of
8980 void. Don't error or warn here.
8981 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8982 failure to attach to the tgid. Call warning when failing to
8984 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8985 argument. Remove "initial" parameter. Return int instead of
8986 void. Don't error or warn here.
8987 (linux_attach_fail_reason_string): New declaration.
8988 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8989 interface change. Use linux_attach_fail_reason_string.
8991 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8992 Walfred Tedeschi <walfred.tedeschi@intel.com>
8994 * Makefile.in: Added rules to handle new files
8995 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8996 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8997 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8998 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8999 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9000 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9002 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9003 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9004 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9005 i386/x32-avx512.xml.
9006 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9007 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9008 i386/x32-avx512-linux.xml.
9009 * i387-fp.c (num_avx512_k_registers): New constant for number
9011 (num_avx512_zmmh_low_registers): New constant for number of
9012 lower ZMM registers (0-15).
9013 (num_avx512_zmmh_high_registers): New constant for number of
9014 higher ZMM registers (16-31).
9015 (num_avx512_ymmh_registers): New contant for number of higher
9016 YMM registers (ymm16-31 added by avx521 on x86_64).
9017 (num_avx512_xmm_registers): New constant for number of higher
9018 XMM registers (xmm16-31 added by AVX512 on x86_64).
9019 (struct i387_xsave): Add space for AVX512 registers.
9020 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9021 Add code to handle AVX512 registers.
9022 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9023 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9024 prototypei from generated file.
9025 (tdesc_amd64_avx512_linux): Likewise.
9026 (init_registers_x32_avx512_linux): Likewise.
9027 (tdesc_x32_avx512_linux): Likewise.
9028 (init_registers_i386_avx512_linux): Likewise.
9029 (tdesc_i386_avx512_linux): Likewise.
9030 (x86_64_regmap): Add AVX512 registers.
9031 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9033 (initialize_low_arch): Add code to initialize AVX512 registers.
9035 2014-04-23 Pedro Alves <palves@redhat.com>
9037 * mem-break.c (find_gdb_breakpoint_at): Make static.
9038 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9040 2014-04-23 Pedro Alves <palves@redhat.com>
9042 * i386-low.c: Don't include break-common.h here.
9043 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9044 prototype to take target_hw_bp_type as argument instead of a Z
9046 * i386-low.h: Include break-common.h here.
9047 (Z_packet_to_hw_type): Declare.
9048 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9050 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9051 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9052 (x86_remove_point): Convert the packet number to a
9053 target_hw_bp_type before calling i386_low_remove_watchpoint.
9054 * win32-i386-low.c (i386_insert_point): Convert the packet number
9055 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9056 (i386_remove_point): Convert the packet number to a
9057 target_hw_bp_type before calling i386_low_remove_watchpoint.
9059 2014-04-23 Pedro Alves <palves@redhat.com>
9061 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9063 2014-04-10 Pedro Alves <palves@redhat.com>
9065 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9066 Check if the condition or command is NULL before checking if the
9067 breakpoint is known. On success, return true.
9068 * mem-break.h (add_breakpoint_condition): Document return.
9069 (add_breakpoint_commands): Add describing comment.
9070 * server.c (skip_to_semicolon): New function.
9071 (process_point_options): Use it.
9073 2014-04-09 Pedro Alves <palves@redhat.com>
9075 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9078 2014-02-27 Pedro Alves <palves@redhat.com>
9081 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9083 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9085 (last_thread_of_process_p): Take a PID argument instead of a
9087 (linux_wait_for_lwp): Delete.
9088 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9090 (linux_low_filter_event): New function, party factored out from
9091 linux_wait_for_event.
9092 (linux_wait_for_event): Rename to ...
9093 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9094 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9095 sigsuspend. Check for zombie leaders.
9096 (linux_wait_for_event): Reimplement as wrapper around
9097 linux_wait_for_event_filtered.
9098 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9099 a normal or signal exit is seen, it's the whole process exiting.
9100 (wait_for_sigstop): No longer a for_each_inferior callback.
9101 Rewrite on top of linux_wait_for_event_filtered.
9102 (stop_all_lwps): Call wait_for_sigstop directly.
9103 * server.c (resume, handle_target_event): Handle
9104 TARGET_WAITKIND_NO_RESUMED.
9106 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9108 * win32-low.c (psapi_get_dll_name,
9109 * win32_CreateToolhelp32Snapshot): Delete.
9110 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9111 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9113 (handle_load_dll): Add function description.
9114 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9116 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9118 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9120 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9121 base address when calling win32_add_one_solib.
9122 (handle_load_dll): Delete local variable load_addr.
9123 Remove 0x1000 offset applied to DLL base address when calling
9124 win32_add_one_solib.
9125 (handle_unload_dll): Add comment.
9127 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9129 * win32-low.c (win32_add_all_dlls): Renames
9130 win32_ensure_ntdll_loaded. Rewrite function documentation.
9131 Adjust implementation to always load all DLLs.
9132 Add 0x1000 offset to DLL base address when calling
9133 win32_add_one_solib.
9134 (child_initialization_done): New static global.
9135 (do_initial_child_stuff): Set child_initialization_done to
9136 zero during child initialization, and 1 after. Replace call
9137 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9139 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9140 (handle_unload_dll): Add function documentation.
9141 (get_child_debug_event): Ignore load and unload DLL events
9142 during child initialization.
9144 2014-02-20 Doug Evans <dje@google.com>
9146 Remove global all_lwps.
9147 * inferiors.h (ptid_of): Move here from linux-low.h.
9148 (pid_of, lwpid_of): Ditto.
9149 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9150 parameter is a struct thread_info * now.
9151 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9152 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9153 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9155 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9156 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9157 * linux-arm-low.c (update_registers_callback): Update, "entry"
9158 parameter is a struct thread_info * now.
9159 Fetch lwpid from current_inferior directly.
9160 (arm_insert_point): Pass &all_threads to find_inferior instead of
9162 (arm_remove_point): Ditto.
9163 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9164 (arm_prepare_to_resume): Fetch pid from thread.
9165 (arm_read_description): Fetch lwpid from current_inferior directly.
9166 * linux-low.c (all_lwps): Delete.
9167 (delete_lwp): Delete call to remove_inferior.
9168 (handle_extended_wait): Fetch lwpid from thread.
9169 (add_lwp): Don't set lwp->entry.id. Remove call to
9170 add_inferior_to_list.
9171 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9172 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9173 (kill_one_lwp_callback): Ditto.
9174 (linux_kill): Don't dereference NULL pointer.
9175 Fetch ptid,lwpid from thread.
9176 (get_detach_signal): Fetch ptid from thread.
9177 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9178 Simplify call to regcache_invalidate_thread.
9179 (delete_lwp_callback): Update, "entry" parameter is a
9180 struct thread_info * now. Fetch pid from thread.
9181 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9182 (status_pending_p_callback): Update, "entry" parameter is a
9183 struct thread_info * now. Fetch ptid from thread.
9184 (find_lwp_pid): Update, "entry" parameter is a
9185 struct thread_info * now.
9186 (linux_wait_for_lwp): Fetch pid from thread.
9187 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9188 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9189 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9190 (dequeue_one_deferred_signal): Ditto.
9191 (cancel_breakpoint): Fetch ptid from current_inferior.
9192 (linux_wait_for_event): Pass &all_threads to find_inferior,
9193 not &all_lwps. Fetch ptid, lwpid from thread.
9194 (count_events_callback): Update, "entry" parameter is a
9195 struct thread_info * now.
9196 (select_singlestep_lwp_callback): Ditto.
9197 (select_event_lwp_callback): Ditto.
9198 (cancel_breakpoints_callback): Ditto.
9199 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9201 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9202 (unsuspend_one_lwp): Update, "entry" parameter is a
9203 struct thread_info * now.
9204 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9206 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9207 Fetch lwpid from thread, not lwp.
9208 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9209 Pass &all_threads to find_inferior, not &all_lwps.
9210 (send_sigstop): Fetch lwpid from thread, not lwp.
9211 (send_sigstop_callback): Update, "entry" parameter is a
9212 struct thread_info * now.
9213 (suspend_and_send_sigstop_callback): Ditto.
9214 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9215 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9216 struct thread_info * now.
9217 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9219 (lwp_running): Update, "entry" parameter is a
9220 struct thread_info * now.
9221 (stop_all_lwps): Fetch ptid from thread.
9222 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9223 (linux_resume_one_lwp): Fetch lwpid from thread.
9224 (linux_set_resume_request): Update, "entry" parameter is a
9225 struct thread_info * now. Fetch pid, lwpid from thread.
9226 (resume_status_pending_p): Update, "entry" parameter is a
9227 struct thread_info * now.
9228 (need_step_over_p): Ditto. Fetch lwpid from thread.
9229 (start_step_over): Fetch lwpid from thread.
9230 (linux_resume_one_thread): Update, "entry" parameter is a
9231 struct thread_info * now. Fetch lwpid from thread.
9232 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9233 (proceed_one_lwp): Update, "entry" parameter is a
9234 struct thread_info * now. Fetch lwpid from thread.
9235 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9236 struct thread_info * now.
9237 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9238 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9239 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9241 (regsets_store_inferior_registers): Ditto.
9242 (fetch_register, store_register): Ditto.
9243 (linux_read_memory, linux_write_memory): Ditto.
9244 (linux_request_interrupt): Ditto.
9245 (linux_read_auxv): Ditto.
9246 (linux_xfer_siginfo): Ditto.
9247 (linux_qxfer_spu): Ditto.
9248 (linux_qxfer_libraries_svr4): Ditto.
9249 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9250 moved to inferiors.h.
9252 (get_thread_lwp): Update.
9253 (struct lwp_info): Delete member "entry". Simplify comment for
9256 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9257 current_inferior directly.
9258 (update_watch_registers_callback): Update, "entry" parameter is a
9259 struct thread_info * now. Fetch pid from thread.
9260 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9261 (mips_insert_point): Fetch lwpid from current_inferior.
9262 Pass &all_threads to find_inferior, not &all_lwps.
9263 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9264 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9266 (mips_stopped_data_address): Ditto.
9267 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9269 * linux-tile-low.c (tile_arch_setup): Ditto.
9270 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9271 (update_debug_registers_callback): Update, "entry" parameter is a
9272 struct thread_info * now. Fetch pid from thread.
9273 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9274 Pass &all_threads to find_inferior, not &all_lwps.
9275 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9276 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9277 Pass &all_threads to find_inferior, not &all_lwps.
9278 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9279 (i386_dr_low_get_status): Ditto.
9280 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9281 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9282 (x86_linux_read_description): Ditto.
9283 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9285 2014-02-20 Doug Evans <dje@google.com>
9287 * inferiors.c (get_first_inferior): Fix buglet.
9289 2014-02-19 Doug Evans <dje@google.com>
9291 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9292 * inferiors.c (add_thread): Change result type to struct thread_info *.
9293 All callers updated.
9294 (add_lwp): Call add_thread here instead of in callers.
9295 All callers updated.
9296 * linux-low.h (get_lwp_thread): Rewrite.
9297 (struct lwp_info): New member "thread".
9299 2014-02-19 Doug Evans <dje@google.com>
9301 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9302 All callers updated.
9304 2014-02-19 Doug Evans <dje@google.com>
9306 * inferiors.c (add_thread): Fix whitespace.
9308 2014-02-19 Doug Evans <dje@google.com>
9310 * dll.c (clear_dlls): Replace accessing list implemention details
9312 * gdbthread.h (get_first_thread): Declare.
9313 * inferiors.c (for_each_inferior_with_data): New function.
9314 (get_first_thread): New function.
9315 (find_thread_ptid): Simplify.
9316 (get_first_inferior): New function.
9317 (clear_list): Delete.
9318 (one_inferior_p): New function.
9319 (clear_inferior_list): New function.
9320 (clear_inferiors): Update.
9321 * inferiors.h (for_each_inferior_with_data): Declare.
9322 (clear_inferior_list): Declare.
9323 (one_inferior_p): Declare.
9324 (get_first_inferior): Declare.
9325 * linux-low.c (linux_wait_for_event): Replace accessing list
9326 implemention details with API function.
9327 * server.c (target_running): Ditto.
9328 (accumulate_file_name_length): New function.
9329 (emit_dll_description): New function.
9330 (handle_qxfer_libraries): Replace accessing list implemention
9331 details with API function.
9332 (handle_qxfer_threads_worker): New function.
9333 (handle_qxfer_threads_proper): Replace accessing list implemention
9334 details with API function.
9335 (handle_query): Ditto.
9336 (visit_actioned_threads_callback_ftype): New typedef.
9337 (visit_actioned_threads_data): New struct.
9338 (visit_actioned_threads): Rewrite to be find_inferior callback.
9339 (resume): Call find_inferior.
9340 (handle_status): Replace accessing list implemention
9341 details with API function.
9342 (process_serial_event): Replace accessing list implemention details
9344 * target.c (set_desired_inferior): Replace accessing list implemention
9345 details with API function.
9346 * tracepoint.c (same_process_p): New function.
9347 (gdb_agent_about_to_close): Replace accessing list implemention
9348 details with API function.
9349 * win32-low.c (child_delete_thread): Replace accessing list
9350 implemention details with API function.
9351 (match_dll_by_basename): New function.
9352 (dll_is_loaded_by_basename): New function.
9353 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9354 details call to dll_is_loaded_by_basename.
9356 2014-02-19 Doug Evans <dje@google.com>
9358 * dll.h (struct dll_info): Add comment.
9359 * gdbthread.h (struct thread_info): Add comment.
9360 (current_ptid): Simplify.
9361 * inferiors.c (add_process): Update.
9362 (remove_process): Update.
9363 * inferiors.h (struct process_info): Rename member "head" to "entry".
9364 * linux-low.c (delete_lwp): Update.
9366 (last_thread_of_process_p): Update.
9367 (kill_one_lwp_callback, linux_kill): Update.
9368 (status_pending_p_callback): Update.
9369 (wait_for_sigstop): Update. Simplify read of ptid.
9370 (start_step_over): Update.
9371 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9372 (get_lwp_thread): Update.
9373 (struct lwp_info): Rename member "head" to "entry".
9374 * regcache.h (inferior_list_entry): Delete.
9375 * server.c (kill_inferior_callback): Update.
9376 (detach_or_kill_inferior_callback): Update.
9377 (print_started_pid): Update.
9378 (print_attached_pid): Update.
9379 (process_serial_event): Simplify read of ptid.
9380 * thread-db.c (thread_db_create_event): Update.
9381 (thread_db_get_tls_address): Update.
9382 * win32-low.c (current_inferior_ptid): Simplify.
9384 2014-02-19 Tom Tromey <tromey@redhat.com>
9386 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9388 (target_supports_btrace): Update.
9390 2014-02-14 Yao Qi <yao@codesourcery.com>
9392 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9393 (rsp-low-ipa.o): New target.
9395 2014-02-12 Tom Tromey <tromey@redhat.com>
9397 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9398 convert_ascii_to_int.
9399 * regcache.c (registers_to_string): Likewise.
9400 * remote-utils.c (decode_M_packet): Likewise.
9401 * server.c (process_serial_event): Likewise.
9403 2014-02-12 Tom Tromey <tromey@redhat.com>
9405 * server.c (handle_query, handle_v_run): Use hex2bin, not
9407 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9409 2014-02-12 Tom Tromey <tromey@redhat.com>
9411 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9412 convert_int_to_ascii.
9413 * regcache.c (registers_to_string, collect_register_as_string):
9415 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9417 * server.c (process_serial_event): Likewise.
9418 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9419 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9421 2014-02-12 Tom Tromey <tromey@redhat.com>
9423 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9424 bin2hex, not hexify.
9425 * tracepoint.c (cmd_qtstatus): Likewise.
9427 2014-02-12 Tom Tromey <tromey@redhat.com>
9429 * remote-utils.c (monitor_output): Pass explicit length to
9432 2014-02-12 Tom Tromey <tromey@redhat.com>
9434 * tracepoint.c: Include rsp-low.h.
9435 * server.c: Include rsp-low.h.
9436 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9437 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9439 * remote-utils.c: Include rsp-low.h.
9440 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9441 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9442 (convert_int_to_ascii, convert_ascii_to_int): Move to
9444 * regcache.c: Include rsp-low.h.
9445 * ax.c: Include rsp-low.h.
9446 * Makefile.in (SFILES): Add common/rsp-low.c.
9447 (OBS): Add rsp-low.o.
9448 (rsp-low.o): New target.
9450 2014-02-12 Tom Tromey <tromey@redhat.com>
9452 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9453 Include print-utils.h.
9454 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9455 (plongest, thirty_two, phex_nz): Remove.
9456 * Makefile.in (SFILES): Add common/print-utils.c.
9457 (OBS): Add print-utils.o.
9458 (print-utils-ipa.o): New target.
9459 (print-utils.o): New target.
9460 (IPA_OBJS): Add print-utils-ipa.o.
9462 2014-02-06 Tom Tromey <tromey@redhat.com>
9464 * Makefile.in (SFILES): Fix indentation.
9466 2014-02-05 Doug Evans <dje@google.com>
9468 * linux-low.c (linux_wait_for_event): Improve comment.
9469 (linux_wait_1): Keep current_inferior in sync with event_child.
9471 2014-01-22 Doug Evans <dje@google.com>
9473 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9475 2014-01-22 Doug Evans <dje@google.com>
9477 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9478 * configure: Regenerate.
9479 * config.in: Regenerate.
9480 * Makefile.in (SFILES): Add debug.c.
9482 * debug.c: New file.
9483 * debug.h: New file.
9484 * linux-aarch64-low.c (*): Update all debugging printfs to use
9485 debug_printf instead of fprintf.
9486 * linux-arm-low.c (*): Ditto.
9487 * linux-cris-low.c (*): Ditto.
9488 * linux-crisv32-low.c (*): Ditto.
9489 * linux-m32r-low.c (*): Ditto.
9490 * linux-sparc-low.c (*): Ditto.
9491 * linux-x86.c (*): Ditto.
9492 * linux-low.c (*): Ditto.
9493 (linux_wait_1): Add calls to debug_enter, debug_exit.
9494 (linux_wait): Remove redundant debugging printf.
9495 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9496 (linux_resume, unstop_all_lwps): Ditto.
9497 * mem-break.c (*): Update all debugging printfs to use
9498 debug_printf instead of fprintf.
9499 * remote-utils.c (*): Ditto.
9500 * thread-db.c (*): Ditto.
9501 * server.c #include <ctype.h>, "gdb_vecs.h".
9502 (debug_threads): Moved to debug.c.
9503 (*): Update all debugging printfs to use debug_printf instead of
9505 (start_inferior): Replace call to fflush with call to debug_flush.
9506 (monitor_show_help): Mention set debug-format.
9507 (parse_debug_format_options): New function.
9508 (handle_monitor_command): Handle "monitor set debug-format".
9509 (gdbserver_usage): Mention --debug-format.
9510 (main): Parse --debug-format.
9511 * server.h (debug_threads): Declaration moved to debug.h.
9513 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9514 trace_debug_1 that uses debug_printf.
9515 (tracepoint_look_up_symbols): Update all debugging printfs to use
9516 debug_printf instead of fprintf.
9518 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9520 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9523 2014-01-17 Pedro Alves <palves@redhat.com>
9526 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9527 defined after including gdb_proc_service.h.
9529 2014-01-16 Doug Evans <dje@google.com>
9531 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9532 (match_dll): Use it.
9534 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9536 * target.h (target_ops) <read_btrace>: Change parameters and
9537 return type to allow error reporting.
9538 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9539 trace reading errors on.
9540 * linux-low.c (linux_low_read_btrace): Pass trace reading
9542 (linux_low_disable_btrace): New.
9544 2014-01-15 Doug Evans <dje@google.com>
9546 * inferiors.c (thread_id_to_gdb_id): Delete.
9547 * inferiors.h (thread_id_to_gdb_id): Delete.
9549 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9551 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9552 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9555 2014-01-08 Pedro Alves <palves@redhat.com>
9557 * server.c (handle_status): Don't discard previous queued stop
9558 replies or thread's pending status here.
9559 (main) <disconnection>: Do it here instead.
9561 2014-01-08 Pedro Alves <palves@redhat.com>
9563 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9564 * server.c (visit_actioned_threads, handle_pending_status): New
9566 (handle_v_cont): Factor out parts to ...
9567 (resume): ... this new function. If in all-stop, and a thread
9568 being resumed has a pending status, report it without actually
9570 (myresume): Adjust to use the new 'resume' function.
9571 (clear_pending_status_callback, set_pending_status_callback)
9572 (find_status_pending_thread_callback): New functions.
9573 (handle_status): Handle the case of multiple threads having
9574 interesting statuses to report. Report threads' real last signal
9575 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9576 with an interesting thread to report the status for, instead of
9577 always reporting the status of the first thread.
9579 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9581 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9582 * gdbreplay.c (gdbreplay_version): Likewise.
9584 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9586 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9587 iov.iov_len with the real length in use.
9589 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9591 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9592 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9593 for all targets that use win32-low.c.
9594 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9595 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9597 2013-12-13 Pedro Alves <palves@redhat.com>
9599 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9600 if equal to TARGET_WAITKIND_LOADED.
9601 * win32-low.c (cached_status): New static global.
9602 (win32_wait): Add declaration.
9603 (do_initial_child_stuff): Flush all initial pending debug events
9604 up to the initial breakpoint.
9605 (win32_wait): If CACHED_STATUS was set, return that instead
9606 of doing a real wait. Remove the code resuming the execution
9607 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9608 during the initial phase. Also remove the code changing
9609 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9610 TARGET_WAITKIND_STOPPED.
9612 2013-12-11 Yao Qi <yao@codesourcery.com>
9614 * notif.c (handle_notif_ack): Return 0 if no notification
9617 2013-11-20 Doug Evans <dje@google.com>
9619 * linux-low.c (linux_set_resume_request): Fix comment.
9621 2013-11-20 Doug Evans <dje@google.com>
9623 * linux-low.c (resume_status_pending_p): Tweak comment.
9625 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9627 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9628 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9629 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9630 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9631 (srv_amd64_regobj): Add amd64-mpx.o.
9632 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9633 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9634 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9635 * i387-fp.c (num_pl_bnd_register) Added constant.
9636 (num_pl_bnd_cfg_registers) Added constant.
9637 (struct i387_xsave) Added reserved area and MPX fields.
9638 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9639 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9641 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9642 (init_registers_amd64_mpx_linux): Declare new function.
9643 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9644 (x86_64_regmap): Add MPX registers.
9645 (x86_linux_read_description): Add MPX case.
9646 (initialize_low_arch): Initialize MPX targets.
9648 2013-11-18 Tom Tromey <tromey@redhat.com>
9650 * configure: Rebuild.
9651 * configure.ac: Don't check for stdlib.h.
9652 * gdbreplay.c: Unconditionally include stdlib.h.
9654 2013-11-18 Tom Tromey <tromey@redhat.com>
9656 * config.in: Rebuild.
9657 * configure: Rebuild.
9658 * configure.ac: Don't use AC_HEADER_DIRENT.
9660 2013-11-18 Tom Tromey <tromey@redhat.com>
9662 * server.h: Don't check HAVE_STRING_H.
9663 * gdbreplay.c: Don't check HAVE_STRING_H.
9664 * configure: Rebuild.
9666 2013-11-18 Tom Tromey <tromey@redhat.com>
9668 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9671 2013-11-08 Tom Tromey <tromey@redhat.com>
9673 * configure, config.in: Rebuild.
9674 * configure.ac: Remove unused configury.
9676 2013-11-08 Tom Tromey <tromey@redhat.com>
9678 * acinclude.m4: Include common.m4, codeset.m4.
9679 * configure, config.in: Rebuild.
9680 * configure.ac: Use GDB_AC_COMMON.
9682 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9684 * linux-s390-low.c (HWCAP_S390_TE): New define.
9685 (s390_arch_setup): Consider the TE field in the HWCAP for
9686 determining 'have_regset_tdb'.
9688 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9691 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9694 2013-10-02 Pedro Alves <palves@redhat.com>
9696 * server.c (process_serial_event): Don't output "GDBserver
9697 exiting" if GDB is connected through stdio.
9698 * target.c (mywait): Likewise, be silent if GDB is connected
9701 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9703 * lynx-low.c (lynx_add_threads_after_attach): New function.
9704 (lynx_attach): Remove call to add_thread. Add call to
9705 lynx_add_threads_after_attach instead.
9707 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9709 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9710 * config.in, configure: Regenerated.
9712 2013-09-18 Yao Qi <yao@codesourcery.com>
9715 * server.c (start_inferior): Clear 'resume_info'.
9717 2013-09-16 Jiong Wang <jiwang@tilera.com>
9719 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9722 2013-09-16 Jiong Wang <jiwang@tilera.com>
9724 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9725 linux-tile-low.o to srv_tgtobj.
9727 2013-09-16 Will Newton <will.newton@linaro.org>
9729 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9732 2013-09-06 Pedro Alves <palves@redhat.com>
9734 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9735 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9736 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9737 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9738 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9739 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9741 2013-09-06 Pedro Alves <palves@redhat.com>
9743 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9744 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9746 2013-09-06 Pedro Alves <palves@redhat.com>
9748 * linux-amd64-ipa.c: Include tracepoint.h.
9749 * linux-i386-ipa.c: Include tracepoint.h.
9751 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9753 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9754 (ps_get_thread_area): New function.
9756 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9758 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9759 (initialize_low_arch): Call init_registers_crisv32 rather than
9760 init_register_crisv32.
9762 2013-09-05 Pedro Alves <palves@redhat.com>
9764 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9766 * hostio.h: ... this new file.
9767 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9768 win32-low.c: Include hostio.h.
9770 2013-09-05 Pedro Alves <palves@redhat.com>
9772 * server.h (gdb_client_data, handler_func, callback_handler_func)
9773 (delete_file_handler, add_file_handler, append_callback_event)
9774 (delete_callback_event, start_event_loop, initialize_event_loop):
9775 Move to event-loop.h and include it.
9776 * event-loop.h: New file.
9778 2013-09-05 Pedro Alves <palves@redhat.com>
9780 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9781 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9782 (loaded_dll, unloaded_dll): Move to ...
9783 * dll.h: ... this new file.
9784 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9786 2013-09-05 Pedro Alves <palves@redhat.com>
9788 * server.h (current_process, get_thread_process, all_processes)
9789 (add_inferior_to_list, for_each_inferior, current_inferior)
9790 (remove_inferior, add_process, remove_process, find_process_pid)
9791 (have_started_inferiors_p, have_attached_inferiors_p)
9792 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9793 (clear_inferiors, find_inferior, find_inferior_id)
9794 (inferior_target_data, set_inferior_target_data)
9795 (inferior_regcache_data, set_inferior_regcache_data): Move to
9796 inferiors.h, and include it.
9797 * inferiors.h: New file.
9799 2013-09-05 Pedro Alves <palves@redhat.com>
9801 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9805 2013-09-05 Pedro Alves <palves@redhat.com>
9807 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9809 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9810 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9811 (handle_tracepoint_general_set, handle_tracepoint_query)
9812 (tracepoint_finished_step, tracepoint_was_hit)
9813 (release_while_stepping_state_list, current_traceframe)
9814 (in_readonly_region, traceframe_read_mem)
9815 (fetch_traceframe_registers, traceframe_read_sdata)
9816 (traceframe_read_info, struct fast_tpoint_collect_status)
9817 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9818 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9819 (supply_fast_tracepoint_registers)
9820 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9821 (ipa_tdesc, claim_trampoline_space)
9822 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9823 (agent_mem_read, agent_get_trace_state_variable_value)
9824 (agent_set_trace_state_variable_value, agent_tsv_read)
9825 (agent_mem_read_string, get_raw_reg_func_addr)
9826 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9827 * tracepoint.h: ... this new file.
9829 2013-09-05 Pedro Alves <palves@redhat.com>
9831 * server.h (perror_with_name, error, fatal, warning, paddress)
9832 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9834 * utils.h: New file.
9836 2013-09-05 Pedro Alves <palves@redhat.com>
9838 * server.h (remote_debug, noack_mode, transport_is_reliable)
9839 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9840 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9841 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9842 (write_enn, initialize_async_io, enable_async_io)
9843 (disable_async_io, check_remote_input_interrupt_request)
9844 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9845 (dead_thread_notify, prepare_resume_reply)
9846 (decode_address_to_semicolon, decode_address, decode_m_packet)
9847 (decode_M_packet, decode_X_packet, decode_xfer_write)
9848 (decode_search_memory_packet, unhexify, hexify)
9849 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9850 (look_up_one_symbol, relocate_instruction)
9851 (monitor_output): Move to remote-utils.h, and include it.
9852 * remote-utils.h: New file.
9854 2013-09-05 Pedro Alves <palves@redhat.com>
9856 * server.h (_): Delete.
9858 2013-09-02 Pedro Alves <palves@redhat.com>
9860 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9861 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9863 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9865 2013-09-02 Pierre Muller <muller@sourceware.org>
9867 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9868 or WriteProcessMemory complete successfully and handle
9869 ERROR_PARTIAL_COPY error.
9871 2013-09-02 Pedro Alves <palves@redhat.com>
9873 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9874 error instead of EIO.
9876 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9879 * linux-low.c: Include filestuff.h.
9880 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9881 * lynx-low.c: Include filestuff.h.
9882 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9883 * server.c: Include filestuff.h.
9884 (main): Call notice_open_fds.
9885 * spu-low.c: Include filestuff.h.
9886 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9888 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9890 * Makefile.in: Explain why ../target and ../nat are not
9891 listed as include file search paths.
9892 (linux-waitpid.o): New object file rule.
9893 * configure.srv (srv_native_linux_obj): New variable.
9894 Replace all occurrences of linux native object files with
9895 $srv_native_linux_obj.
9896 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9897 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9898 (linux_enable_event_reporting): Remove declaration.
9899 (my_waitpid): Moved to common/linux-waitpid.c.
9900 (linux_wait_for_event): Pass ptid when calling
9901 linux_enable_event_reporting.
9902 (linux_supports_tracefork_flag): Remove.
9903 (linux_enable_event_reporting): Likewise.
9904 (linux_tracefork_grandchild): Remove.
9905 (STACK_SIZE): Moved to common/linux-ptrace.c.
9906 (linux_tracefork_child): Remove.
9907 (linux_test_for_tracefork): Remove.
9908 (linux_look_up_symbols): Call linux_supports_traceclone.
9909 (initialize_low): Remove call to linux_test_for_tracefork.
9910 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9911 common/linux-ptrace.h.
9912 (PTRACE_TYPE_ARG4): Likewise.
9913 Include linux-ptrace.h.
9915 2013-08-21 Pedro Alves <palves@redhat.com>
9917 * config.in: Renegerate.
9919 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9921 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9922 (SFILES): Remove $(srcdir)/common/target-common.c and
9923 add $(srcdir)/target/waitstatus.c.
9924 (OBS): Remove target-common.o and add waitstatus.o.
9925 (server_h): Remove $(srcdir)/../common/target-common.h and
9926 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9927 and $(srcdir)/../target/waitstatus.h.
9928 (target-common.o): Remove.
9929 (waitstatus.o): New target object file.
9930 * target.h: Do not include target-common.h and
9931 include target/resume.h, target/wait.h and
9932 target/waitstatus.h.
9934 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9936 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9937 to PTRACE_TYPE_ARG3.
9938 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9939 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9941 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9942 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9944 2013-07-27 Jie Zhang <jie@codesourcery.com>
9945 Daniel Jacobowitz <dan@codesourcery.com>
9946 Yao Qi <yao@codesourcery.com>
9948 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9949 (mips-linux-watch.o): New rule.
9950 (mips_linux_watch_h): New variable.
9951 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9953 * linux-mips-low.c: Include mips-linux-watch.h.
9954 (struct arch_process_info, struct arch_lwp_info): New.
9955 (update_watch_registers_callback): New function.
9956 (mips_linux_new_process, mips_linux_new_thread) New functions.
9957 (mips_linux_prepare_to_resume, mips_insert_point): New
9959 (mips_remove_point, mips_stopped_by_watchpoint): New
9961 (rsp_bp_type_to_target_hw_bp_type): New function.
9962 (mips_stopped_data_address): New function.
9963 (the_low_target): Add watchpoint support functions.
9965 2013-07-27 Yao Qi <yao@codesourcery.com>
9967 * i386-low.c: Include break-common.h.
9968 (enum target_hw_bp_type): Remove.
9970 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9972 * Makefile.in (SFILES): /common/target-common.c.
9973 (OBS): Add target-common.o.
9974 (server_h): Add $(srcdir)/../common/target-common.h.
9975 (target-common.o): New target.
9976 * server.c (queue_stop_reply_callback): Free
9977 status string after use.
9978 * target.c (target_waitstatus_to_string): Remove.
9979 * target.h: Include target-common.h.
9980 (resume_kind): Likewise.
9981 (target_waitkind): Likewise.
9982 (target_waitstatus): Likewise.
9983 (TARGET_WNOHANG): Likewise.
9985 2013-07-04 Yao Qi <yao@codesourcery.com>
9987 * Makefile.in (host_alias): Use @host_noncanonical@.
9988 (target_alias): Use @target_noncanonical@.
9989 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9990 ACX_NONCANONICAL_HOST.
9991 * configure: Regenerated.
9994 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9996 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9997 * configure: Rebuild.
9998 * Makefile.in (version_host, version_target): Get from configure.
9999 (version.c): Use $(version_host) and $(version_target).
10001 2013-07-03 Pedro Alves <palves@redhat.com>
10003 * Makefile.in (config.status): Depend on development.sh.
10004 * acinclude.m4: Include libmcheck.m4.
10005 * configure: Regenerate.
10007 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10009 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10010 attribute inside the parentheses.
10011 (winapi_DebugSetProcessKillOnExit): Ditto.
10012 (winapi_DebugBreakProcess): Ditto.
10013 (winapi_GenerateConsoleCtrlEvent): Ditto.
10015 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10017 * notif.h (notif_event): Add a dummy member to avoid compiler
10020 2013-07-01 Pedro Alves <palves@redhat.com>
10022 * hostio.c (HOSTIO_PATH_MAX): Define.
10023 (require_filename, handle_open, handle_unlink, handle_readlink):
10026 2013-07-01 Pedro Alves <palves@redhat.com>
10028 * server.h: Include "pathmax.h".
10029 * linux-low.c: Don't include sys/param.h.
10030 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10032 * win32-low.c: Don't include sys/param.h.
10033 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10035 2013-07-01 Pedro Alves <palves@redhat.com>
10037 * event-loop.c: Don't check HAVE_UNISTD_H before including
10039 * gdbreplay.c: Likewise.
10040 * remote-utils.c: Likewise.
10041 * server.c: Likewise.
10042 * configure.ac: Don't check for unistd.h.
10043 * configure: Regenerate.
10045 2013-06-28 Tom Tromey <tromey@redhat.com>
10047 * Makefile.in (version.c): Use version.in, not
10050 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10052 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10053 * configure: Rebuild.
10054 * Makefile.in (version_host, version_target): Get from configure.
10055 (version.c): Use $(version_host) and $(version_target).
10057 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10059 Fix trace-status to output user name without trailing colon.
10060 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10062 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10064 Fix trace-status to output proper start-time and stop-time.
10065 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10066 output start time and stop time in hex as gdb expects.
10068 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10070 * tracepoint.c (build_traceframe_info_xml): Output trace state
10071 variables present in the trace buffer.
10073 2013-06-24 Tom Tromey <tromey@redhat.com>
10075 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10077 (version.o): Remove.
10078 * gdbreplay.c: Include version.h.
10079 (version, host_name): Don't declare.
10080 * server.h: Include version.h.
10081 (version, host_name): Don't declare.
10083 2013-06-12 Pedro Alves <palves@redhat.com>
10085 * linux-x86-low.c (linux_is_elf64): Delete global.
10086 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10087 with local linux_pid_exe_is_elf_64_file use.
10089 2013-06-11 Pedro Alves <palves@redhat.com>
10091 * linux-low.c (regset_disabled, disable_regset): New functions.
10092 (regsets_fetch_inferior_registers)
10093 (regsets_store_inferior_registers): Use them.
10094 (initialize_regsets_info); Don't allocate the disabled_regsets
10096 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10099 2013-06-11 Pedro Alves <palves@redhat.com>
10101 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10104 2013-06-11 Pedro Alves <palves@redhat.com>
10106 * linux-x86-low.c (initialize_low_arch): Call
10107 init_registers_x32_avx_linux.
10109 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10111 Fix compatibility with Android Bionic.
10112 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10115 2013-06-07 Pedro Alves <palves@redhat.com>
10118 * Makefile.in (OBS): Add tdesc.o.
10119 (IPA_OBJS): Add tdesc-ipa.o.
10120 (tdesc-ipa.o): New rule.
10121 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10123 * linux-low.c (new_inferior): Delete.
10124 (disabled_regsets, num_regsets): Delete.
10125 (linux_add_process): Adjust to set the new per-process
10127 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10128 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10129 was a stop. When calling arch_setup, switch the current inferior
10130 to the thread that got an event.
10131 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10132 (regsets_fetch_inferior_registers)
10133 (regsets_store_inferior_registers): New regsets_info parameter.
10135 (linux_register_in_regsets): New regs_info parameter. Adjust to
10137 (register_addr, fetch_register, store_register): New usrregs_info
10138 parameter. Adjust to use it.
10139 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10140 parameter regs_info. Adjust to use it.
10141 (linux_fetch_registers): Get the current inferior's regs_info, and
10143 (linux_store_registers): Ditto.
10144 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10145 (initialize_low): Don't initialize the target_regsets here. Call
10146 initialize_low_arch.
10147 * linux-low.h (target_regsets): Delete declaration.
10148 (struct regsets_info): New.
10149 (struct usrregs_info): New.
10150 (struct regs_info): New.
10151 (struct process_info_private) <new_inferior>: New field.
10152 (struct linux_target_ops): Delete the num_regs, regmap, and
10153 regset_bitmap fields. New field regs_info.
10154 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10155 * i387-fp.c (num_xmm_registers): Delete.
10156 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10157 calls to new interface.
10158 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10159 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10160 Infer the number of xmm registers from the regcache's target
10162 * i387-fp.h (num_xmm_registers): Delete.
10163 * inferiors.c (add_thread): Don't install the thread's regcache
10165 * proc-service.c (gregset_info): Fetch the current inferior's
10166 regs_info. Adjust to use it.
10167 * regcache.c: Include tdesc.h.
10168 (register_bytes, reg_defs, num_registers)
10169 (gdbserver_expedite_regs): Delete.
10170 (get_thread_regcache): If the thread doesn't have a regcache yet,
10171 create one, instead of aborting gdbserver.
10172 (regcache_invalidate_one): Rename to ...
10173 (regcache_invalidate_thread): ... this.
10174 (regcache_invalidate_one): New.
10175 (regcache_invalidate): Only invalidate registers of the current
10177 (init_register_cache): Add target_desc parameter, and use it.
10178 (new_register_cache): Ditto. Assert the target description has a
10179 non zero registers_size.
10180 (regcache_cpy): Add assertions. Adjust.
10181 (realloc_register_cache, set_register_cache): Delete.
10182 (registers_to_string, registers_from_string): Adjust.
10183 (find_register_by_name, find_regno, find_register_by_number)
10184 (register_cache_size): Add target_desc parameter, and use it.
10185 (free_register_cache_thread, free_register_cache_thread_one)
10186 (regcache_release, register_cache_size): New.
10187 (register_size): Add target_desc parameter, and use it.
10188 (register_data, supply_register, supply_register_zeroed)
10189 (supply_regblock, supply_register_by_name, collect_register)
10190 (collect_register_as_string, collect_register_by_name): Adjust.
10191 * regcache.h (struct target_desc): Forward declare.
10192 (struct regcache) <tdesc>: New field.
10193 (init_register_cache, new_register_cache): Add target_desc
10195 (regcache_invalidate_thread): Declare.
10196 (regcache_invalidate_one): Delete declaration.
10197 (regcache_release): Declare.
10198 (find_register_by_number, register_cache_size, register_size)
10199 (find_regno): Add target_desc parameter.
10200 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10202 * remote-utils.c: Include tdesc.h.
10203 (outreg, prepare_resume_reply): Adjust.
10204 * server.c: Include tdesc.h.
10205 (gdbserver_xmltarget): Delete declaration.
10206 (get_features_xml, process_serial_event): Adjust.
10207 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10209 (struct process_info) <tdesc>: New field.
10210 (ipa_tdesc): Declare.
10211 * tdesc.c: New file.
10212 * tdesc.h: New file.
10213 * tracepoint.c: Include tdesc.h.
10214 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10215 (get_context_regcache): Adjust to pass ipa_tdesc down.
10216 (do_action_at_tracepoint): Adjust to get the register cache size
10217 from the context regcache's description.
10218 (traceframe_walk_blocks): Adjust to get the register cache size
10219 from the current trace frame's description.
10220 (traceframe_get_pc): Adjust to get current trace frame's
10221 description and pass it down.
10222 (gdb_collect): Adjust to get the register cache size from the
10224 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10225 (gdbserver_xmltarget): Delete.
10226 (initialize_low_tracepoint): Set the ipa's target description.
10227 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10228 (initialize_low_tracepoint): Set the ipa's target description.
10229 * linux-x86-low.c: Include tdesc.h.
10230 [__x86_64__] (is_64bit_tdesc): New.
10231 (ps_get_thread_area, x86_get_thread_area): Use it.
10232 (i386_cannot_store_register): Rename to ...
10233 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10234 (i386_cannot_fetch_register): Rename to ...
10235 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10236 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10238 (target_regsets): Rename to ...
10239 (x86_regsets): ... this.
10240 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10242 (x86_siginfo_fixup): Use is_64bit_tdesc.
10243 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10244 (tdesc_x32_avx_linux, tdesc_x32_linux)
10245 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10247 (x86_linux_update_xmltarget): Delete.
10248 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10249 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10250 (AMD64_LINUX_USER64_CS): New.
10251 (x86_linux_read_description): New, based on
10252 x86_linux_update_xmltarget.
10253 (same_process_callback): New.
10254 (x86_arch_setup_process_callback): New.
10255 (x86_linux_update_xmltarget): New.
10256 (x86_regsets_info): New.
10257 (amd64_linux_regs_info): New.
10258 (i386_linux_usrregs_info): New.
10259 (i386_linux_regs_info): New.
10260 (x86_linux_regs_info): New.
10261 (x86_arch_setup): Reimplement.
10262 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10263 (x86_emit_ops): Ditto.
10264 (the_low_target): Adjust. Install x86_linux_regs_info,
10265 x86_cannot_fetch_register, and x86_cannot_store_register.
10266 (initialize_low_arch): New.
10267 * linux-ia64-low.c (tdesc_ia64): Declare.
10268 (ia64_fetch_register): Adjust.
10269 (ia64_usrregs_info, regs_info): New globals.
10270 (ia64_regs_info): New function.
10271 (the_low_target): Adjust.
10272 (initialize_low_arch): New function.
10273 * linux-sparc-low.c (tdesc_sparc64): Declare.
10274 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10276 (sparc_arch_setup): New function.
10277 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10278 (the_low_target): Adjust.
10279 (initialize_low_arch): New function.
10280 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10281 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10282 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10283 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10284 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10285 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10286 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10287 (tdesc_powerpc_isa205_vsx64l): Declare.
10288 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10289 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10290 (ppc_set_pc, ppc_get_hwcap): Adjust.
10291 (ppc_usrregs_info): Forward declare.
10292 (!__powerpc64__) ppc_regmap_adjusted: New global.
10293 (ppc_arch_setup): Adjust to the current process'es target
10295 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10296 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10297 (ppc_store_evrregset): Adjust.
10298 (target_regsets): Rename to ...
10299 (ppc_regsets): ... this, and make static.
10300 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10301 (ppc_regs_info): New function.
10302 (the_low_target): Adjust.
10303 (initialize_low_arch): New function.
10304 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10305 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10306 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10307 (tdesc_s390x_linux64v2): Declare.
10308 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10309 (s390_fill_gregset, s390_store_last_break): Adjust.
10310 (target_regsets): Rename to ...
10311 (s390_regsets): ... this, and make static.
10312 (s390_get_pc, s390_set_pc): Adjust.
10313 (s390_get_hwcap): New target_desc parameter, and use it.
10314 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10315 (s390_arch_setup): Adjust to set the current process'es target
10316 description. Don't adjust the regmap.
10317 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10318 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10319 (regs_info_3264): New globals.
10320 (s390_regs_info): New function.
10321 (the_low_target): Adjust.
10322 (initialize_low_arch): New function.
10323 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10324 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10325 [__mips64] (init_registers_mips_linux)
10326 (init_registers_mips_dsp_linux): Delete defines.
10327 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10328 (have_dsp): New global.
10329 (mips_read_description): New, based on mips_arch_setup.
10330 (mips_arch_setup): Reimplement.
10331 (get_usrregs_info): New function.
10332 (mips_cannot_fetch_register, mips_cannot_store_register)
10333 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10334 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10335 (target_regsets): Rename to ...
10336 (mips_regsets): ... this, and make static.
10337 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10338 (dsp_regs_info, regs_info): New globals.
10339 (mips_regs_info): New function.
10340 (the_low_target): Adjust.
10341 (initialize_low_arch): New function.
10342 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10343 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10345 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10346 (arm_read_description): New, with bits factored from
10348 (arm_arch_setup): Reimplement.
10349 (target_regsets): Rename to ...
10350 (arm_regsets): ... this, and make static.
10351 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10352 (arm_regs_info): New function.
10353 (the_low_target): Adjust.
10354 (initialize_low_arch): New function.
10355 * linux-m68k-low.c (tdesc_m68k): Declare.
10356 (target_regsets): Rename to ...
10357 (m68k_regsets): ... this, and make static.
10358 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10359 (m68k_regs_info): New function.
10360 (m68k_arch_setup): New function.
10361 (the_low_target): Adjust.
10362 (initialize_low_arch): New function.
10363 * linux-sh-low.c (tdesc_sharch): Declare.
10364 (target_regsets): Rename to ...
10365 (sh_regsets): ... this, and make static.
10366 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10367 (sh_regs_info, sh_arch_setup): New functions.
10368 (the_low_target): Adjust.
10369 (initialize_low_arch): New function.
10370 * linux-bfin-low.c (tdesc_bfin): Declare.
10371 (bfin_arch_setup): New function.
10372 (bfin_usrregs_info, regs_info): New globals.
10373 (bfin_regs_info): New function.
10374 (the_low_target): Adjust.
10375 (initialize_low_arch): New function.
10376 * linux-cris-low.c (tdesc_cris): Declare.
10377 (cris_arch_setup): New function.
10378 (cris_usrregs_info, regs_info): New globals.
10379 (cris_regs_info): New function.
10380 (the_low_target): Adjust.
10381 (initialize_low_arch): New function.
10382 * linux-cris-low.c (tdesc_crisv32): Declare.
10383 (cris_arch_setup): New function.
10384 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10385 (cris_regs_info): New function.
10386 (the_low_target): Adjust.
10387 (initialize_low_arch): New function.
10388 * linux-m32r-low.c (tdesc_m32r): Declare.
10389 (m32r_arch_setup): New function.
10390 (m32r_usrregs_info, regs_info): New globals.
10391 (m32r_regs_info): Adjust.
10392 (initialize_low_arch): New function.
10393 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10394 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10395 (tic6x_usrregs_info): Forward declare.
10396 (tic6x_read_description): New function, based on ...
10397 (tic6x_arch_setup): ... this. Reimplement.
10398 (target_regsets): Rename to ...
10399 (tic6x_regsets): ... this, and make static.
10400 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10401 (tic6x_regs_info): New function.
10402 (the_low_target): Adjust.
10403 (initialize_low_arch): New function.
10404 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10405 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10406 (target_regsets): Rename to ...
10407 (xtensa_regsets): ... this, and make static.
10408 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10410 (xtensa_arch_setup, xtensa_regs_info): New functions.
10411 (the_low_target): Adjust.
10412 (initialize_low_arch): New function.
10413 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10414 (nios2_arch_setup): Set the current process'es tdesc.
10415 (target_regsets): Rename to ...
10416 (nios2_regsets): ... this.
10417 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10418 (nios2_regs_info): New function.
10419 (the_low_target): Adjust.
10420 (initialize_low_arch): New function.
10421 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10422 (aarch64_arch_setup): Set the current process'es tdesc.
10423 (target_regsets): Rename to ...
10424 (aarch64_regsets): ... this.
10425 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10426 (aarch64_regs_info): New function.
10427 (the_low_target): Adjust.
10428 (initialize_low_arch): New function.
10429 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10431 (target_regsets): Rename to ...
10432 (tile_regsets): ... this.
10433 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10434 (tile_regs_info): New function.
10435 (tile_arch_setup): Set the current process'es tdesc.
10436 (the_low_target): Adjust.
10437 (initialize_low_arch): New function.
10438 * spu-low.c (tdesc_spu): Declare.
10439 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10440 * win32-arm-low.c (tdesc_arm): Declare.
10441 (arm_arch_setup): New function.
10442 (the_low_target): Install arm_arch_setup instead of
10443 init_registers_arm.
10444 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10445 (init_windows_x86): Rename to ...
10446 (i386_arch_setup): ... this. Set `win32_tdesc'.
10447 (the_low_target): Adjust.
10448 * win32-low.c (win32_tdesc): New global.
10449 (child_add_thread): Don't create the thread cache here.
10450 (do_initial_child_stuff): Set the new process'es tdesc.
10451 * win32-low.h (struct target_desc): Forward declare.
10452 (win32_tdesc): Declare.
10453 * lynx-i386-low.c (tdesc_i386): Declare global.
10454 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10455 * lynx-low.c (lynx_tdesc): New global.
10456 (lynx_add_process): Set the new process'es tdesc.
10457 * lynx-low.h (struct target_desc): Forward declare.
10458 (lynx_tdesc): Declare global.
10459 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10460 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10461 * nto-low.c (nto_tdesc): New global.
10462 (do_attach): Set the new process'es tdesc.
10463 * nto-low.h (struct target_desc): Forward declare.
10464 (nto_tdesc): Declare.
10465 * nto-x86-low.c (tdesc_i386): Declare.
10466 (nto_x86_arch_setup): Set `nto_tdesc'.
10468 2013-06-04 Gary Benson <gbenson@redhat.com>
10470 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10471 to qSupported response when appropriate.
10472 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10473 with nonzero-length annex.
10474 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10475 arguments supplied in annex.
10477 2013-05-31 Doug Evans <dje@google.com>
10480 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10481 64 bits in 64-cross-32 environment.
10483 2013-05-28 Pedro Alves <palves@redhat.com>
10485 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10486 (aarch64-without-fpu.c): Delete rule.
10487 * configure.srv (aarch64*-*-linux*): Remove references to
10488 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10489 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10492 2013-05-24 Pedro Alves <palves@redhat.com>
10494 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10495 instead of strchr/decode_address. Error if the range isn't split
10496 with a ','. Don't assume there's be a ':' in the action.
10498 2013-05-23 Yao Qi <yao@codesourcery.com>
10499 Pedro Alves <palves@redhat.com>
10501 * linux-low.c (lwp_in_step_range): New function.
10502 (linux_wait_1): If the thread was range stepping and stopped
10503 outside the stepping range, report the stop to GDB. Otherwise,
10504 continue stepping. Add range stepping debug output.
10505 (linux_set_resume_request): Copy the step range from the resume
10506 request to the lwp.
10507 (linux_supports_range_stepping): New.
10508 (linux_target_ops) <supports_range_stepping>: Set to
10509 linux_supports_range_stepping.
10510 * linux-low.h (struct linux_target_ops)
10511 <supports_range_stepping>: New field.
10512 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10513 * linux-x86-low.c (x86_supports_range_stepping): New.
10514 (the_low_target) <supports_range_stepping>: Set to
10515 x86_supports_range_stepping.
10516 * server.c (handle_v_cont): Handle 'r' action.
10517 (handle_v_requests): Append ";r" if the target supports range
10519 * target.h (struct thread_resume) <step_range_start,
10520 step_range_end>: New fields.
10521 (struct target_ops) <supports_range_stepping>:
10523 (target_supports_range_stepping): New macro.
10525 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10527 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10528 confusion in comment.
10530 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10532 * lynx-low.c (struct process_info_private): New type.
10533 (lynx_add_process): New function.
10534 (lynx_create_inferior, lynx_attach): Replace calls to
10535 add_process by calls to lynx_add_process.
10536 (lynx_resume): If PTID is null, then try using
10537 current_process()->private->last_wait_event_ptid.
10539 (lynx_clear_inferiors): Delete. The contents of that function
10540 has been inlined in lynx_mourn;
10541 (lynx_wait_1): Save the ptid in the process's private data.
10542 (lynx_mourn): Free the process' private data. Replace call
10543 to lynx_clear_inferiors by call to clear_inferiors.
10545 2013-05-17 Yao Qi <yao@codesourcery.com>
10547 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10550 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10552 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10553 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10554 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10555 PT_TEXT_END_ADDR guards. Update comments.
10556 (linux_target_op) <read_offsets>: Conditionally define to
10557 linux_read_offsets if the target is UCLIBC and if it defines
10558 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10560 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10561 Andrew Jenner <andrew@codesourcery.com>
10563 * Makefile.in (SFILES): Add linux-nios2-low.c.
10564 (clean): Add action to delete nios2-linux.c.
10565 (nios2-linux.c): New rule.
10566 * configure.srv: Add nios2*-*-linux*.
10567 * linux-nios2-low.c: New.
10569 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10571 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10573 2013-04-25 Hui Zhu <hui@codesourcery.com>
10576 * ax.c (ax_printf): Add fflush.
10578 2013-04-22 Tom Tromey <tromey@redhat.com>
10580 * Makefile.in (SFILES): Add filestuff.c.
10581 (OBS): Add filestuff.o.
10582 (filestuff.o): New target.
10583 * config.in, configure: Rebuild.
10584 * configure.ac: Check for fdwalk, pipe2.
10586 2013-04-17 Pedro Alves <palves@redhat.com>
10588 * configure.ac (USE_THREAD_DB): Delete variable.
10589 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10590 Don't AC_SUBST USE_THREAD_DB.
10591 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10592 * config.in, configure: Regenerate.
10594 2013-04-16 Pedro Alves <palves@redhat.com>
10596 * linux-low.h (struct lwp_info) <thread_known>: Move under
10597 the USE_THREAD_DB #ifdef.
10599 2013-04-16 Pedro Alves <palves@redhat.com>
10601 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10602 (linux-low.o): Delete rule.
10603 * linux-low.h: Always include "gdb_thread_db.h" instead of
10604 conditionally including thread_db.h.
10605 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10608 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10610 * Makefile.in (install-only): Fix make install regression.
10612 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10614 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10615 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10617 * gdbserver.1: Remove.
10619 2013-03-22 Pedro Alves <palves@redhat.com>
10621 * linux-low.c (handle_extended_wait): Don't call
10622 linux_enable_event_reporting.
10624 2013-03-15 Tony Theodore <tonyt@logyst.com>
10627 * Makefile.in (SHELL): Use @SHELL@.
10629 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10631 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10634 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10636 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10637 Remove extraneous NULL element.
10639 2013-03-13 Yao Qi <yao@codesourcery.com>
10641 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10642 'V' block in trace frame.
10644 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10646 * target.h (struct target_ops): Add btrace ops.
10647 (target_supports_btrace): New macro.
10648 (target_enable_btrace): New macro.
10649 (target_disable_btrace): New macro.
10650 (target_read_btrace): New macro.
10651 * gdbthread.h (struct thread_info): Add btrace field.
10652 * server.c: Include btrace-common.h.
10653 (handle_btrace_general_set): New function.
10654 (handle_btrace_enable): New function.
10655 (handle_btrace_disable): New function.
10656 (handle_general_set): Call handle_btrace_general_set.
10657 (handle_qxfer_btrace): New function.
10658 (struct qxfer qxfer_packets[]): Add btrace entry.
10659 * inferiors.c (remove_thread): Disable btrace.
10660 * linux-low: Include linux-btrace.h.
10661 (linux_low_enable_btrace): New function.
10662 (linux_low_read_btrace): New function.
10663 (linux_target_ops): Add btrace ops.
10664 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10665 Add srv_linux_btrace=yes.
10666 (x86_64-*-linux*): Add linux-btrace.o.
10667 Add srv_linux_btrace=yes.
10668 * configure.ac: Define HAVE_LINUX_BTRACE.
10669 * config.in: Regenerated.
10670 * configure: Regenerated.
10672 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10674 * server.c (handle_qxfer): Preserve error message if -3 is
10676 (qxfer): Document the -3 return value.
10678 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10680 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10681 (linux_btrace_h): New variable.
10682 (linux-btrace.o): New rule.
10684 2013-03-08 Stan Shebs <stan@codesourcery.com>
10685 Hafiz Abid Qadeer <abidh@codesourcery.com>
10687 * tracepoint.c (trace_buffer_size): New global.
10688 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10689 (init_trace_buffer): Change to one-argument function. Allocate
10690 trace buffer memory.
10691 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10692 handle QTBuffer:size packet.
10693 (cmd_bigqtbuffer_size): New function.
10694 (initialize_tracepoint): Call init_trace_buffer with
10695 DEFAULT_TRACE_BUFFER_SIZE.
10696 * server.c (handle_query): Add QTBuffer:size in the
10699 2013-03-07 Yao Qi <yao@codesourcery.com>
10701 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10702 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10704 (cmd_qtsp): Adjust condition. Do post increment.
10705 Set cur_action and cur_step_action back to 0.
10707 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10710 * linux-low.c (linux_write_memory): Return early success if LEN is
10713 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10715 * configure.srv: Add x86_64-*-cygwin* as target.
10717 2013-02-28 Tom Tromey <tromey@redhat.com>
10719 * configure.ac: Invoke AC_SYS_LARGEFILE.
10720 * configure, config.in: Rebuild.
10722 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10724 * win32-low.c: Throughout, fix format strings and casts of
10725 printf-like functions to avoid type related warnings on all
10727 (get_child_debug_event): Print dwDebugEventCode as hex since
10728 that's how it's usually documented.
10730 2013-02-28 Yao Qi <yao@codesourcery.com>
10732 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10735 2013-02-27 Jiong Wang <jiwang@tilera.com>
10737 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10738 (reg-tilegx32.c): New rule.
10739 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10740 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10741 different register info initializer according to elf class.
10742 (init_registers_tilgx32): New function. The tilegx32 register info
10744 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10745 (tile_store_gregset): Likewise.
10747 2013-02-27 Yao Qi <yao@codesourcery.com>
10749 * server.c (process_point_options): Print debug message when
10750 debug_threads is true.
10752 2013-02-26 Yao Qi <yao@codesourcery.com>
10754 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10756 2013-02-19 Pedro Alves <palves@redhat.com>
10757 Kai Tietz <ktietz@redhat.com>
10761 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10762 instead of strtoul to extract address from packet.
10763 (process_serial_event) <'z'>: Likewise.
10765 2013-02-18 Yao Qi <yao@codesourcery.com>
10767 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10769 2013-02-14 Pedro Alves <palves@redhat.com>
10773 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10774 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10776 2013-02-14 Pedro Alves <palves@redhat.com>
10778 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10780 2013-02-14 Pedro Alves <palves@redhat.com>
10782 * tracepoint.c (save_string): Delete.
10783 (add_tracepoint_action): Use savestring instead of save_string.
10785 2013-02-12 Pedro Alves <palves@redhat.com>
10787 * linux-xtensa-low.c: Ditto.
10788 * xtensa-xtregs.c: Ditto.
10790 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10792 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10795 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10797 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10798 aarch64_num_wp_regs and aarch64_num_bp_regs to
10799 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10801 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10803 * linux-aarch64-low.c (ps_get_thread_area): Replace
10804 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10806 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10807 Marcus Shawcroft <marcus.shawcroft@arm.com>
10808 Nigel Stephens <nigel.stephens@arm.com>
10809 Yufeng Zhang <yufeng.zhang@arm.com>
10811 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10812 (aarch64.c, aarch64-without-fpu.c): New targets.
10813 * configure.srv (aarch64*-*-linux*): New.
10814 * linux-aarch64-low.c: New file.
10816 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10818 * linux-low.c (handle_extended_wait, linux_create_inferior)
10819 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10820 (dequeue_one_deferred_signal, linux_resume_one_thread)
10821 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10822 (linux_tracefork_grandchild, linux_test_for_tracefork)
10823 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10824 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10825 where the argument is 0.
10827 2013-01-25 Yao Qi <yao@codesourcery.com>
10829 * event-loop.c: Include "queue.h".
10830 (gdb_event_p): New typedef.
10831 (struct gdb_event) <next_event>: Remove.
10832 (event_queue): Change to QUEUE(gdb_event_p).
10833 (async_queue_event): Remove.
10834 (gdb_event_xfree): New.
10835 (initialize_event_loop): New.
10836 (process_event): Use API from QUEUE.
10837 (wait_for_event): Likewise.
10838 * server.c (main): Call initialize_event_loop.
10839 * server.h (initialize_event_loop): Declare.
10841 2013-01-18 Yao Qi <yao@codesourcery.com>
10843 * ax.h (struct eval_agent_expr_context): New.
10844 (gdb_eval_agent_expr): Update declaration.
10845 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10846 TFRAME. Add new argument CTX.
10847 * server.h (struct eval_agent_expr_context): Declare.
10848 (agent_mem_read, agent_tsv_read): Update declaration.
10849 (agent_mem_read_string): Likewise.
10850 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10851 (add_traceframe_block): Add new argument TPOINT.
10852 Increase TPOINT->traceframe_usage.
10853 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10854 eval_tracepoint_agent_expr.
10855 (condition_true_at_tracepoint): Likewise.
10856 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10857 (agent_mem_read_string, agent_tsv_read): Likewise.
10859 2013-01-16 Yao Qi <yao@codesourcery.com>
10861 * linux-low.c (linux_resume_one_lwp): Don't check
10862 'lwp->bp_reinsert != 0'.
10864 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10865 Pedro Alves <palves@redhat.com>
10867 * lynx-low.c (ptrace_request_to_str): Define a temporary
10868 macro and use it to simplify this function's implementation.
10870 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10872 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10875 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10877 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10879 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10881 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10883 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10885 * lynx-low.c (lynx_resume): Use the resume_info parameter
10886 to determine the ptid for the lynx_ptrace call, unless
10887 it is equal to minus_one_ptid, in which case we use the
10888 ptid of the current_inferior.
10889 (lynx_wait_1): After having received a thread create/exit
10890 event, resume the inferior's execution using the signaling
10891 thread's ptid, rather than the old ptid.
10893 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10895 * lynx-low.c (lynx_resume): Delete variable ret.
10897 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10899 * gdbreplay.c (gdbreplay_version): Update copyright year.
10900 * server.c (gdbserver_version): Likewise.
10902 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10904 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10907 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10909 * lynx-low.c (ptrace_request_to_str): Add handling for
10910 PTRACE_GETTRACESIG.
10912 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10914 * lynx-low.c (lynx_attach): Delete variable new_process.
10916 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10918 * lynx-low.c (lynx_create_inferior): Delete variable
10921 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10923 * lynx-low.c (ptrace_request_to_str): Do not handle
10924 PTRACE_GETTHREADLIST if this macro does not exist.
10926 2012-12-15 Yao Qi <yao@codesourcery.com>
10928 * Makefile.in (OBS): Add notif.o.
10929 * notif.c, notif.h: New.
10930 * server.c: Include "notif.h".
10931 (struct vstop_notif) <next>: Remove.
10933 (queue_stop_reply): Update.
10934 (push_event, send_next_stop_reply): Remove.
10935 (discard_queued_stop_replies): Update.
10936 (notif_stop): New variable.
10937 (handle_v_stopped): Remove.
10938 (handle_v_requests): Don't call handle_v_stopped. Call
10939 handle_ack_notif instead.
10940 (queue_stop_reply_callback): Call notif_event_enque instead
10941 of queue_stop_reply.
10942 (handle_status): Don't call send_next_stop_reply, call
10943 notif_write_event instead.
10944 (kill_inferior_callback): Likewise.
10945 (detach_or_kill_inferior_callback): Likewise.
10946 (main): Call initialize_notif.
10947 (process_serial_event): Call QUEUE_is_empty.
10948 (handle_target_event): Call notif_push instead of push event.
10949 * server.h (push_event): Remove declaration.
10951 2012-12-10 Tom Tromey <tromey@redhat.com>
10953 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10954 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10957 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10958 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10959 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10960 (amd64-linux-ipa.o, ax.o): Rewrite.
10961 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10962 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10963 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10964 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10965 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10966 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10967 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10968 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10969 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10970 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10971 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10972 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10973 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10974 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10975 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10976 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10977 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10978 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10979 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10980 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10981 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10982 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10983 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10984 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10985 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10986 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10987 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10988 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10989 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10990 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10991 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10992 (reg-tilegx.o): Remove.
10993 (all_object_files): New macro.
10994 Include .deps files.
10995 * aclocal.m4, configure: Rebuild.
10996 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10997 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10998 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11000 2012-12-05 Tom Tromey <tromey@redhat.com>
11003 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11005 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11007 * configure.ac: Check for linux/perf_event.h.
11008 * config.in: Regenerated.
11009 * configure: Regenerated.
11011 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11013 * hostio.c (handle_readlink): Decrease buffer size
11014 parameter passed to readlink by one byte.
11016 2012-11-26 Yao Qi <yao@codesourcery.com>
11018 * configure.ac (build_warnings): Append '-Wempty-body'.
11019 * configure: Regenerated.
11020 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11023 2012-11-15 Pierre Muller <muller@sourceware.org>
11025 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11026 * config.in: Regenerate.
11027 * configure: Regenerate.
11028 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11029 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11030 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11031 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11033 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11034 instead of <sys/wait.h> header.
11035 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11037 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11039 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11040 (various make rules): Remove -DGDBSERVER
11042 2012-11-09 Yao Qi <yao@codesourcery.com>
11044 * spu-low.c (current_ptid): Move it to ..
11045 * gdbthread.h: ... here. New.
11046 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11047 * server.c (myresume, process_serial_event): Likewise.
11048 * thread-db.c (thread_db_find_new_threads): Likewise.
11049 * tracepoint.c (run_inferior_command): Likewise.
11051 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11053 * server.c (handle_search_memory_1): Include access length in
11056 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11058 * linux-crisv32-low.c: Fix compile errors.
11060 2012-09-04 Yao Qi <yao@codesourcery.com>
11062 * tracepoint.c (cmd_qtsv): Adjust debug message.
11063 Don't check CUR_TPOINT.
11065 2012-08-28 Yao Qi <yao@codesourcery.com>
11067 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11068 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11069 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11070 Remove declarations of xmalloc, xreallloc, xstrdup and
11072 * Makefile.in (libiberty_h): New.
11073 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11074 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11076 2012-08-23 Yao Qi <yao@codesourcery.com>
11078 * server.h: Remove declaration of 'xsnprintf'.
11080 2012-08-22 Keith Seitz <keiths@redhat.com>
11082 * server.h: Include build-gnulib-gbserver/config.h.
11083 * gdbreplay.c: Likewise.
11085 2012-08-08 Doug Evans <dje@google.com>
11087 * Makefile.in (SFILES): Add gdb_vecs.c.
11088 (OBS): Add gdb_vecs.o.
11089 (gdb_vecs_h, host_defs_h): New variables.
11090 (thread-db.o): Add $(gdb_vecs_h) dependency.
11091 (gdb_vecs.o): New rule.
11092 * thread-db.c: #include "gdb_vecs.h".
11093 (thread_db_load_search): Use a vector to iterate over path elements.
11094 Handle text appearing after "$pdir".
11096 * configure.ac: Add check for strstr.
11097 * config.in: Regenerate.
11098 * configure: Regenerate.
11100 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11102 * hostio.c (handle_pread): If pread fails, fall back to attempting
11104 (handle_pwrite): Likewise for pwrite.
11106 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11108 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11109 between unsupported TYPE and unimplementable ADDR/LEN combination.
11110 (arm_insert_point): Act on new return value.
11112 2012-07-31 Pedro Alves <palves@redhat.com>
11114 * server.c (process_point_options): Only skip tokens if we find
11115 one that is unrecognized. Don't treat 'X' specially while
11116 skipping unrecognized tokens.
11118 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11120 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11121 to 4-byte-align HW breakpoint addresses for Thumb.
11123 2012-07-27 Yao Qi <yao@codesourcery.com>
11127 * server.h: Declare gdb_agent_about_to_close.
11128 * target.c (kill_inferior): Include "agent.h".
11129 New. Send command 'kill'.
11130 * target.h (kill_inferior): Removed macro.
11131 * tracepoint.c (gdb_agent_about_to_close): New.
11132 (gdb_agent_helper_thread): Handle command 'close'.
11133 Wait endlessly until the inferior stops.
11134 Install gdb_agent_remove_socket to atexit hook.
11135 (agent_socket_name): New static variable.
11136 (gdb_agent_socket_init): Replace local variable 'name' with
11137 'agent_socket_name'.
11138 (gdb_agent_remove_socket): New.
11140 2012-07-27 Yao Qi <yao@codesourcery.com>
11142 * server.c (process_point_options): Stop at 'X' when parsing.
11144 2012-07-19 Michael Eager <eager@eagercon.com>
11146 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11148 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11149 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11150 hardware breakpoint.
11152 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11154 * gdbserver/linux-low.c (initialize_low): Call
11155 linux_ptrace_init_warnings.
11157 2012-07-02 Doug Evans <dje@google.com>
11159 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11162 2012-07-02 Stan Shebs <stan@codesourcery.com>
11164 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11165 (ax.o): Add it to build rule.
11167 (OBS): Add format.o.
11168 (IPA_OBS): Add format.o.
11169 * server.c (handle_query): Claim support for breakpoint commands.
11170 (process_point_options): Add command case.
11171 (process_serial_event): Leave running if there are printfs in
11173 * mem-break.h (any_persistent_commands): Declare.
11174 (add_breakpoint_commands): Declare.
11175 (gdb_no_commands_at_breakpoint): Declare.
11176 (run_breakpoint_commands): Declare.
11177 * mem-break.c (struct point_command_list): New struct.
11178 (struct breakpoint): New field command_list.
11179 (any_persistent_commands): New function.
11180 (add_commands_to_breakpoint): New function.
11181 (add_breakpoint_commands): New function.
11182 (gdb_no_commands_at_breakpoint): New function.
11183 (run_breakpoint_commands): New function.
11184 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11186 * ax.c: Include format.h.
11187 (ax_printf): New function.
11188 (gdb_eval_agent_expr): Add printf opcode.
11190 2012-06-13 Yao Qi <yao@codesourcery.com>
11192 * server.c (start_inferior): Remove duplicated writes to fields
11193 'last_resume_kind' and 'last_status' of 'current_inferior'.
11195 2012-06-12 Yao Qi <yao@codesourcery.com>
11196 Pedro Alves <palves@redhat.com>
11198 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11200 * server.c (handle_v_cont): Extend comment.
11202 2012-06-11 Yao Qi <yao@codesourcery.com>
11204 * linux-low.c (linux_attach): Add 'static'.
11206 2012-06-06 Yao Qi <yao@codesourcery.com>
11208 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11210 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11212 Fix gcc -flto compilation warning.
11213 * server.c (main): Make variable multi_mode and attach volatile.
11215 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11217 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11218 if the platform doesn't know about it.
11220 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11222 * Makefile.in (SFILES): Add linux-tile-low.c.
11223 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11224 * configure.srv: Handle tilegx-*-linux*.
11225 * linux-tile-low.c: New file.
11227 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11229 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11231 2012-05-24 Pedro Alves <palves@redhat.com>
11235 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11237 2012-05-24 Pedro Alves <palves@redhat.com>
11241 Replace target_signal with gdb_signal throughout.
11243 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11245 * linux-low.c (linux_store_registers): Avoid the copying sequence
11246 when no data has been retrieved by ptrace.
11248 2012-05-22 Will Deacon <will.deacon@arm.com>
11250 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11251 Include asm/ptrace.h.
11252 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11255 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11257 * linux-low.c (linux_store_registers): Don't re-retrieve data
11258 with ptrace that has already been obtained from /proc. Always
11259 copy any data retrieved with ptrace to the buffer supplied.
11261 2012-05-11 Yao Qi <yao@codesourcery.com>
11262 Pedro Alves <palves@redhat.com>
11264 * linux-low.c (enum stopping_threads_kind): New.
11265 (stopping_threads): Change type to `enum stopping_threads_kind'.
11266 (handle_extended_wait): If stopping and suspending threads, leave
11267 the new_lwp suspended too.
11268 (linux_wait_for_event): Adjust.
11269 (stop_all_lwps): Set `stopping_threads' to
11270 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11271 whether we're suspending threads or just stopping them. Assert no
11274 2012-04-29 Yao Qi <yao@codesourcery.com>
11276 * server.h: Move some code to ...
11277 * gdbthread.h: ... here. New.
11278 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11279 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11280 (nto-low.o, win32-low.o): Likewise.
11281 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11282 * regcache.c, remote-utils.c, server.c: Likewise.
11283 * target.c, tracepoint.c, win32-low.c: Likewise.
11285 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11287 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11288 (PTRACE_ARG4_TYPE): Likewise.
11289 (PTRACE_XFER_TYPE): Likewise.
11290 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11291 ptrace to PTRACE_ARG3_TYPE.
11292 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11293 (PTRACE_ARG4_TYPE): Likewise.
11294 (PTRACE_XFER_TYPE): Likewise.
11295 (linux_detach_one_lwp): Cast fourth argument of
11296 ptrace to long then PTRACE_ARG4_TYPE.
11297 (regsets_fetch_inferior_registers): Cast third argument of
11298 ptrace to long then PTRACE_ARG3_TYPE.
11299 (regsets_store_inferior_registers): Likewise.
11301 2012-04-20 Pedro Alves <palves@redhat.com>
11303 * configure: Regenerate.
11305 2012-04-19 Pedro Alves <palves@redhat.com>
11307 * Makefile.in (GNULIB_BUILDDIR): New.
11308 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11309 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11310 (all, install-only, uninstall, clean-info, all-lib, clean): No
11311 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11312 (maintainer-clean realclean distclean): Use subdir_do.
11314 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11315 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11316 * acinclude.m4: Include acx_configure_dir.m4.
11317 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11318 calls. Call AC_PROG_RANLIB. Configure gnulib using
11321 (GNULIB_STDINT_H): Adjust.
11322 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11323 * gdbreplay.c: Include build-gnulib/config.h.
11324 * server.h: Likewise.
11325 * aclocal.m4: Regenerate.
11326 * config.in: Regenerate.
11327 * configure: Regenerate.
11329 2012-04-19 Pedro Alves <palves@redhat.com>
11331 * Makefile.in (LIBGNU, INCGNU): Adjust.
11332 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11333 (all, install-only, uninstall, clean-info, all-lib, clean)
11334 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11335 * configure.ac: Adjust AC_OUTPUT output.
11336 * aclocal.m4: Regenerate.
11337 * configure: Regenerate.
11339 2012-04-19 Pedro Alves <palves@redhat.com>
11341 * Makefile.in (generated_files): New.
11342 (server_h): Remove the explicit dependency on config.h, and depend
11343 on $generated_files.
11345 2012-04-19 Pedro Alves <palves@redhat.com>
11347 * Makefile.in (INCGNU): Add -Ignulib.
11349 2012-04-19 Pedro Alves <palves@redhat.com>
11351 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11352 (INCGNU): ... this, and spell out -I here.
11353 (GNULIB_LIB): Rename to ...
11354 (LIBGNU): ... this.
11355 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11357 2012-04-19 Pedro Alves <palves@redhat.com>
11359 * config.in: Regenerate.
11361 2012-04-19 Pedro Alves <palves@redhat.com>
11363 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11364 * server.h (memmem): Remove declaration.
11365 * config.in: Regenerate.
11366 * configure: Regenerate.
11368 2012-04-19 Yao Qi <yao@codesourcery.com>
11370 * Makefile.in (SFILES): Add common/vec.c.
11374 2012-04-19 Yao Qi <yao@codesourcery.com>
11376 * remote-utils.c (prepare_resume_reply): Replace with macro
11377 target_core_of_thread.
11378 * server.c (handle_qxfer_threads_proper): Likewise.
11379 * target.h (traget_core_of_thread): New macro.
11381 2012-04-18 Pedro Alves <palves@redhat.com>
11383 * aclocal.m4: Regenerate.
11384 * configure: Regenerate.
11386 2012-04-16 Yao Qi <yao@codesourcery.com>
11388 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11389 duplicated on address.
11391 2012-04-16 Yao Qi <yao@codesourcery.com>
11393 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11394 (struct tracepoint_action_ops) <send>: New field.
11395 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11396 (agent_expr_send, x_tracepoint_action_send): New.
11397 (l_tracepoint_action_send): New.
11398 (cmd_qtdp): Download and install tracepoint
11399 according to `use_agent'.
11400 (run_inferior_command): Add one more parameter `len'.
11402 (tracepoint_send_agent): New.
11403 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11405 2012-04-16 Yao Qi <yao@codesourcery.com>
11407 * tracepoint.c (download_tracepoints): Moved to ...
11408 (cmd_qtstart): ... here.
11410 2012-04-14 Yao Qi <yao@codesourcery.com>
11412 * tracepoint.c: Include inttypes.h.
11413 (struct collect_memory_action): Use sized types.
11414 (struct tracepoint): Likewise.
11415 (cmd_qtdp, stop_tracing): Update print specifiers.
11416 (cmd_qtp, response_tracepoint): Likewise.
11417 (collect_data_at_tracepoint): Likewise.
11418 (collect_data_at_step): Likewise.
11420 2012-04-14 Yao Qi <yao@codesourcery.com>
11422 Import gnulib module inttypes.
11423 * aclocal.m4, config.in, configure: Regenerated.
11425 2012-04-14 Yao Qi <yao@codesourcery.com>
11427 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11428 Makefile and config.status at last.
11430 2012-04-13 Yao Qi <yao@codesourcery.com>
11432 * tracepoint.c: Include stdint.h unconditionally.
11434 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11436 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11437 on BFD_HAVE_SYS_PROCFS_TYPE.
11438 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11439 * configure: Regenerate.
11440 * config.in: Likewise.
11442 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11444 * Makefile.in (clean): Also remove x32.c x32-linux.c
11445 x32-avx.c x32-avx-linux.c.
11446 (x32.o): New target.
11448 (x32-linux.o): Likewise.
11449 (x32-linux.c): Likewise.
11450 (x32-avx.o): Likewise.
11451 (x32-avx.c): Likewise.
11452 (x32-avx-linux.o): Likewise.
11453 (x32-avx-linux.c): Likewise.
11455 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11456 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11457 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11458 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11459 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11460 i386/x32-avx-linux.xml.
11462 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11463 (init_registers_x32_avx_linux): Likwise.
11464 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11465 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11467 2012-04-13 Pedro Alves <palves@redhat.com>
11469 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11470 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11471 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11472 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11475 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11477 * linux-x86-low.c (compat_x32_clock_t): New.
11478 (compat_x32_siginfo_t): Likewise.
11479 (compat_x32_siginfo_from_siginfo): Likewise.
11480 (siginfo_from_compat_x32_siginfo): Likewise.
11481 (linux_is_elf64): Likewise.
11482 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11483 and siginfo_from_compat_x32_siginfo for x32.
11484 (x86_arch_setup): Set linux_is_elf64.
11486 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11489 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11491 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11492 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11493 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11494 compatible with process.
11496 2012-04-12 Yao Qi <yao@codesourcery.com>
11498 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11499 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11500 (install-only, install-info, clean): Handle sub dir gnulib.
11501 (all-lib, am--refresh): New targets.
11502 (memmem.o): Remove target.
11503 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11504 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11505 (AC_REPLACE_FUNCS): Remove memmem.
11506 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11507 (AC_OUTPUT): Generate Makefile in gnulib/.
11508 * aclocal.m4, config.in, configure: Regenerated.
11510 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11512 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11514 2012-04-05 Pedro Alves <palves@redhat.com>
11516 -Werror=strict-aliasing
11518 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11521 2012-04-04 Pedro Alves <palves@redhat.com>
11523 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11524 (sparc_store_gregset_from_stack, sparc_store_gregset)
11525 (sparc_breakpoint_at): Fix formatting.
11527 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11529 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11531 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11532 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11533 * config.in: Regenerate.
11534 * configure: Likewise.
11536 2012-03-29 Pedro Alves <palves@redhat.com>
11538 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11539 Correct ptrace arguments.
11541 2012-03-28 Pedro Alves <palves@redhat.com>
11543 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11544 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11545 (IA64_FR1_REGNUM): New defines.
11546 (ia64_fetch_register): New.
11547 (the_low_target): Install it.
11548 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11550 * linux-low.c (linux_fetch_registers): Try the
11551 the_low_target.fetch_register hook first.
11553 * linux-arm-low.c (the_low_target): Adjust.
11554 * linux-bfin-low.c (the_low_target): Adjust.
11555 * linux-cris-low.c (the_low_target): Adjust.
11556 * linux-crisv32-low.c (the_low_target): Adjust.
11557 * linux-m32r-low.c (the_low_target): Adjust.
11558 * linux-m68k-low.c (the_low_target): Adjust.
11559 * linux-mips-low.c (the_low_target): Adjust.
11560 * linux-ppc-low.c (the_low_target): Adjust.
11561 * linux-s390-low.c (the_low_target): Adjust.
11562 * linux-sh-low.c (the_low_target): Adjust.
11563 * linux-sparc-low.c (the_low_target): Adjust.
11564 * linux-tic6x-low.c (the_low_target): Adjust.
11565 * linux-x86-low.c (the_low_target): Adjust.
11566 * linux-xtensa-low.c (the_low_target): Adjust.
11568 2012-03-26 Pedro Alves <palves@redhat.com>
11570 * server.c (handle_qxfer_libraries): Don't bail early if
11571 the_target->qxfer_libraries_svr4 is not NULL.
11573 2012-03-26 Pedro Alves <palves@redhat.com>
11575 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11577 2012-03-23 Pedro Alves <palves@redhat.com>
11579 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11580 "library-list-svr4" element's start tag when the the DSO list is
11583 2012-03-23 Pedro Alves <palves@redhat.com>
11585 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11586 a variable whose type size is the same as the inferior's pointer
11589 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11591 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11593 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11594 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11595 * linux-low.h: Include <signal.h>.
11596 (struct siginfo): Remove forward declaration.
11597 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11600 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11602 * .gitignore: Ignore more files.
11604 2012-03-19 Pedro Alves <palves@redhat.com>
11605 Jan Kratochvil <jan.kratochvil@redhat.com>
11607 * server.c (cont_thread, general_thread): Add describing comments.
11608 (start_inferior): Clear `cont_thread'.
11609 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11612 2012-03-15 Yao Qi <yao@codesourcery.com>
11614 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11616 (cmd_qtdp): ... here.
11618 2012-03-15 Yao Qi <yao@codesourcery.com>
11620 * tracepoint.c (struct tracepoint_action_ops): New.
11621 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11622 (m_tracepoint_action_download): New.
11623 (r_tracepoint_action_download): New.
11624 (x_tracepoint_action_download): New.
11625 (l_tracepoint_action_download): New.
11626 (add_tracepoint_action): Install `action->ops' according type.
11627 (download_tracepoint_1): Move code `download' function pointer
11628 of various tracepoint_action_ops.
11630 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11632 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11633 linux_ptrace_attach_warnings.
11635 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11637 * Makefile.in (linux-ptrace.o): New.
11638 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11639 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11640 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11641 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11642 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11644 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11646 2012-03-08 Yao Qi <yao@codesourcery.com>
11647 Pedro Alves <palves@redhat.com>
11649 Fix PR server/13392.
11650 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11651 offset of JMP insn.
11652 * tracepoint.c (remove_tracepoint): New.
11653 (cmd_qtdp): Call remove_tracepoint when failed to install.
11655 2012-03-07 Pedro Alves <palves@redhat.com>
11657 * linux-low.c (get_detach_signal): New.
11658 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11659 Pass on pending signals to PTRACE_DETACH. Check the result of the
11661 * server.c (program_signals, program_signals_p): New.
11662 (handle_general_set): Handle QProgramSignals.
11663 * server.h (program_signals, program_signals_p): Declare.
11665 2012-03-05 Pedro Alves <palves@redhat.com>
11666 Jan Kratochvil <jan.kratochvil@redhat.com>
11668 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11671 2012-03-03 Yao Qi <yao@codesourcery.com>
11673 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11674 agent_look_up_symbols.
11676 2012-03-03 Yao Qi <yao@codesourcery.com>
11678 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11679 (linux-x86-low.o): Likewise.
11680 * server.h: Remove in_process_agent_loaded.
11681 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11685 2012-03-03 Yao Qi <yao@codesourcery.com>
11687 * tracepoint.c (gdb_agent_capability): New global.
11688 (in_process_agent_loaded_ust): Renamed to
11689 `in_process_agent_supports_ust'.
11691 (in_process_agent_supports_ust): Call agent_capability_check.
11692 (clear_installed_tracepoints): Assert that agent supports
11695 2012-03-03 Yao Qi <yao@codesourcery.com>
11697 * linux-low.c (linux_supports_agent): New.
11698 (linux_target_ops): Initialize field `supports_agent' with
11699 linux_supports_agent.
11700 * target.h (struct target_ops) <supports_agent>: New.
11701 (target_supports_agent): New macro.
11702 * server.c (handle_general_set): Handle packet 'QAgent'.
11703 (handle_query): Send `QAgent+'.
11704 * Makefile.in (server.o): Depends on agent.h.
11706 2012-03-03 Yao Qi <yao@codesourcery.com>
11708 * Makefile.in (OBS): Add agent.o.
11709 Add new rule for agent.o.
11710 Track dependence of tracepoint.c on agent.h.
11711 * tracepoint.c (run_inferior_command_1):
11712 (run_inferior_command): Call agent_run_command.
11713 (gdb_ust_connect_sync_socket): Deleted. Move it to
11715 (resume_thread, stop_thread): Likewise.
11716 (gdb_ust_socket_init): Renamed to ...
11717 (gdb_agent_socket_init): ... New.
11718 (gdb_ust_thread): Renamed to ...
11719 (gdb_agent_helper_thread): ... New.
11720 (gdb_ust_init): Move some code to ...
11721 (gdb_agent_init): ... here. New.
11722 [HAVE_UST]: Call gdb_ust_init.
11723 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11724 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11725 * config.in, configure: Regenerated.
11727 2012-03-02 Pedro Alves <palves@redhat.com>
11729 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11730 * linux-low.c (struct simple_pid_list): New.
11731 (stopped_pids): New a struct simple_pid_list pointer.
11732 (add_to_pid_list, pull_pid_from_list): New.
11733 (handle_extended_wait): Don't assume the first signal new children
11734 report is SIGSTOP. Adjust call to pull_pid_from_list.
11735 (linux_wait_for_lwp): Adjust.
11737 2012-03-02 Yao Qi <yao@codesourcery.com>
11739 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11742 2012-03-02 Yao Qi <yao@codesourcery.com>
11744 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11745 `stop_pc' and `tpoint'. Update caller.
11747 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11749 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11750 * linux-low.c (use_linux_regsets): New macro.
11751 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11752 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11753 (linux_register_in_regsets): New function.
11754 (usr_fetch_inferior_registers): Skip registers covered by
11756 (usr_store_inferior_registers): Likewise.
11757 (usr_fetch_inferior_registers): New macro.
11758 (usr_store_inferior_registers): Likewise.
11759 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11760 (linux_store_registers): Likewise.
11761 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11763 (init_registers_mips64_dsp_linux): Likewise.
11764 (init_registers_mips_linux): New macro.
11765 (init_registers_mips_dsp_linux): Likewise.
11766 (mips_dsp_num_regs): Likewise.
11767 (DSP_BASE, DSP_CONTROL): New fallback macros.
11768 (mips_base_regs): New macro.
11769 (mips_regmap): Use it. Fix the size.
11770 (mips_dsp_regmap): New variable.
11771 (mips_dsp_regset_bitmap): Likewise.
11772 (mips_arch_setup): New function.
11773 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11775 (mips_cannot_store_register): Likewise.
11776 (the_low_target): Update .arch_setup, .num_regs and .regmap
11777 initializers. Add .regset_bitmap initializer.
11778 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11780 * linux-bfin-low.c (the_low_target): Likewise.
11781 * linux-cris-low.c (the_low_target): Likewise.
11782 * linux-crisv32-low.c (the_low_target): Likewise.
11783 * linux-ia64-low.c (the_low_target): Likewise.
11784 * linux-m32r-low.c (the_low_target): Likewise.
11785 * linux-m68k-low.c (the_low_target): Likewise.
11786 * linux-ppc-low.c (the_low_target): Likewise.
11787 * linux-s390-low.c (the_low_target): Likewise.
11788 * linux-sh-low.c (the_low_target): Likewise.
11789 * linux-sparc-low.c (the_low_target): Likewise.
11790 * linux-tic6x-low.c (the_low_target): Likewise.
11791 * linux-x86-low.c (the_low_target): Likewise.
11792 * linux-xtensa-low.c (the_low_target): Likewise.
11793 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11794 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11795 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11797 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11798 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11800 2012-02-29 Yao Qi <yao@codesourcery.com>
11801 Pedro Alves <palves@redhat.com>
11803 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11804 `step_over_finished' is true.
11806 2012-02-27 Pedro Alves <palves@redhat.com>
11808 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11809 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11811 2012-02-27 Pedro Alves <palves@redhat.com>
11814 * linux-low.c (pid_is_stopped): New.
11815 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11817 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11819 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11822 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11824 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11826 2012-02-24 Luis Machado <lgustavo@codesourcery>
11828 * server.c (handle_query): Advertise support for target-side
11829 breakpoint condition evaluation.
11830 (process_point_options): New function.
11831 (process_serial_event): When inserting a breakpoint, check for
11832 a target-side condition that should be evaluated.
11834 * mem-break.c: Include regcache.h and ax.h.
11835 (point_cond_list_t): New data structure.
11836 (breakpoint) <cond_list>: New field.
11837 (find_gdb_breakpoint_at): Make non-static.
11838 (delete_gdb_breakpoint_at): Clear any target-side
11840 (clear_gdb_breakpoint_conditions): New function.
11841 (add_condition_to_breakpoint): Likewise.
11842 (add_breakpoint_condition): Likewise.
11843 (gdb_condition_true_at_breakpoint): Likewise.
11844 (gdb_breakpoint_here): Return result directly instead
11845 of going through a local variable.
11847 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11848 (clear_gdb_breakpoint_conditions): Likewise.
11849 (add_breakpoint_condition): Likewise.
11850 (gdb_condition_true_at_breakpoint): Likewise.
11852 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11853 (need_step_over_p): Take target-side breakpoint condition into
11856 2012-02-24 Luis Machado <lgustavo@codesourcery>
11858 * server.h: Include tracepoint.h.
11859 (agent_mem_read, agent_get_trace_state_variable_value,
11860 agent_set_trace_state_variable_value,
11861 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11862 get_set_tsv_func_addr): New prototypes.
11864 * ax.h: New include file.
11865 * ax.c: New source file.
11867 * tracepoint.c: Include ax.h.
11868 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11869 agent_expr, eval_result_type): Move to ax.h.
11870 (parse_agent_expr): Rename to ...
11871 (gdb_parse_agent_expr): ... this, make it non-static and move
11873 (unparse_agent_expr) Rename to ...
11874 (gdb_unparse_agent_expr): ... this, make it non-static and move
11876 (eval_agent_expr): Rename to ...
11877 (eval_tracepoint_agent_expr): ... this.
11878 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11879 forward declarations.
11880 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11881 (agent_get_trace_state_variable_value): New function.
11882 (agent_set_trace_state_variable_value): New function.
11883 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11884 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11885 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11886 (condition_true_at_tracepoint): Likewise.
11887 (parse_agent_expr): Rename to ...
11888 (gdb_parse_agent_expr): ... this and move to ax.c.
11889 (unparse_agent_expr): Rename to ...
11890 (gdb_unparse_agent_expr): ... this and move to ax.c.
11891 (gdb_agent_op_name): Move to ax.c.
11892 (eval_agent_expr): Rename to ...
11893 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11895 (eval_tracepoint_agent_expr): New function.
11896 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11898 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11900 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11901 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11902 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11903 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11904 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11905 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11906 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11907 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11908 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11909 (compile_bytecodes): Remove forward declaration.
11910 (is_goto_target): Move to ax.c.
11911 (compile_bytecodes): Move to ax.c and call
11912 agent_get_trace_state_variable_value (...) and
11913 agent_set_trace_state_variable_value (...).
11915 * Makefile.in: Update ax.c and IPA dependencies.
11917 2012-02-24 Pedro Alves <palves@redhat.com>
11919 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11920 (cmd_bigqtbuffer_circular): ... this. Only handle
11921 'QTBuffer:circular:'.
11922 (handle_tracepoint_general_set): Adjust.
11924 2012-02-16 Yao Qi <yao@codesourcery.com>
11926 * inferiors.c: Move code to ...
11927 * dll.c: .... here. New.
11928 * server.h: Declare clear_dlls.
11929 * Makefile.in (SFILES): Add dll.c.
11933 2012-02-11 Yao Qi <yao@codesourcery.com>
11935 * server.c: (handle_monitor_command): Add a new parameter
11937 (handle_query): Update caller.
11939 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11941 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11942 * configure, config.in: Regenerate.
11943 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11946 2012-02-02 Pedro Alves <palves@redhat.com>
11948 Try SIGKILL first, then PTRACE_KILL.
11949 * linux-low.c (linux_kill_one_lwp): New.
11950 (linux_kill_one_lwp): Rename to ...
11951 (kill_one_lwp_callback): ... this. Use the new
11952 linux_kill_one_lwp.
11954 2012-02-02 Pedro Alves <palves@redhat.com>
11956 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11959 2012-01-27 Pedro Alves <palves@redhat.com>
11961 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11962 (elf_64_file_p): Make static.
11963 (linux_pid_exe_is_elf_64_file): New.
11964 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11965 Delete declarations.
11966 (linux_pid_exe_is_elf_64_file): Declare.
11967 * linux-x86-low.c (x86_arch_setup): Use
11968 linux_pid_exe_is_elf_64_file.
11970 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11972 * linux-low.c (linux_wait_for_event_1): Rename to ...
11973 (linux_wait_for_event): ... here and merge it with former
11974 linux_wait_for_event - new variable wait_ptid, use it.
11975 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11977 2012-01-23 Pedro Alves <palves@redhat.com>
11979 * server.c (main): Avoid yet another case of infinite loop while
11980 detaching/killing after a longjmp.
11982 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11985 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11987 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11989 * hostio.c (handle_readlink): New function.
11990 (handle_vFile): Call it to handle "vFile:readlink" packets.
11992 2012-01-20 Pedro Alves <palves@redhat.com>
11993 Ulrich Weigand <ulrich.weigand@linaro.org>
11995 * server.c (handle_v_requests): Only support vAttach and vRun to
11996 start multiple processes when in extended protocol mode.
11998 2012-01-17 Pedro Alves <palves@redhat.com>
12000 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12001 memalign plus mprotect to allocate the scratch buffer.
12003 2012-01-13 Pedro Alves <palves@redhat.com>
12005 * server.c (attach_inferior): Clear `cont_thread'.
12007 2012-01-13 Pedro Alves <palves@redhat.com>
12009 * server.c (main): Avoid infinite loop while detaching/killing
12012 2012-01-09 Doug Evans <dje@google.com>
12014 * server.c (start_inferior): Set last_ptid in --wrapper case.
12016 2012-01-06 Yao Qi <yao@codesourcery.com>
12018 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12020 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12022 2012-01-04 Yao Qi <yao@codesourcery.com>
12024 * tracepoint.c (cmd_qtdp): Print debug message
12025 for static tracepoint.
12027 2012-01-04 Yao Qi <yao@codesourcery.com>
12029 * tracepoint.c (trace_vdebug): Differentiate debug message
12030 between gdbserver and IPA.
12032 2012-01-03 Yao Qi <yao@codesourcery.com>
12034 * tracepoint.c (tracepoint_was_hit): Don't collect for
12037 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12039 * terminal.h: Reformat copyright header.
12041 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12043 * server.c (gdbserver_version): Update copyright year.
12044 * gdbreplay.c (gdbreplay_version): Likewise.
12046 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12048 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12051 2011-12-18 Hui Zhu <teawater@gmail.com>
12052 * linux-low.c (linux_create_inferior): Save return value to ret.
12054 2011-12-18 Hui Zhu <teawater@gmail.com>
12056 * linux-low.c (linux_create_inferior): Save return value to ret.
12058 2011-12-16 Doug Evans <dje@google.com>
12060 * linux-low.c (linux_create_inferior): If stdio connection,
12061 redirect stdin from /dev/null, stdout to stderr.
12062 * remote-utils.c (remote_is_stdio): New static global.
12063 (remote_connection_is_stdio): New function.
12064 (remote_prepare): Handle stdio connection.
12065 (remote_open): Ditto.
12066 (remote_close): Don't close stdin for stdio connections.
12067 (read_prim,write_prim): New functions. Replace all calls to
12068 read/write to these.
12069 * server.c (main): Watch for "-" argument. Move call to
12070 remote_prepare before start_inferior.
12071 * server.h (STDIO_CONNECTION_NAME): New macro.
12072 (remote_connection_is_stdio): Declare.
12074 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12075 in debugging output.
12077 2011-12-15 Yao Qi <yao@codesourcery.com>
12079 * tracepoint.c: Include sys/syscall.h.
12080 (gdb_ust_thread): Remove preprocessor conditional.
12082 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12084 * linux-low.c (linux_detach_one_lwp): Call
12085 the_low_target.prepare_to_resume before detaching.
12087 2011-12-14 Yao Qi <yao@codesourcery.com>
12089 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12092 2011-12-14 Yao Qi <yao@codesourcery.com>
12094 * i386-low.c (i386_low_stopped_data_address): Initialize local
12095 variable `control'.
12097 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12101 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12102 DR_CONTROL unless necessary. Extend comments.
12103 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12104 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12106 2011-12-13 Yao Qi <yao@codesourcery.com>
12108 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12110 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12112 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12114 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12115 Print new debug message for such case.
12117 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12119 Fix overlapping memcpy.
12120 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12121 the read_inferior_memory transfer.
12122 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12123 write_inferior_memory transfer.
12124 (set_fast_tracepoint_jump): New variable buf. Use it for the
12125 read_inferior_memory and write_inferior_memory transfers.
12126 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12127 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12128 Use it for the write_inferior_memory transfer.
12129 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12132 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12134 * linux-low.c (fetch_register, store_register): Make code
12135 consistent, fix formatting.
12137 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12139 * linux-low.c (usr_store_inferior_registers): Factor out code
12140 to handle individual registers into...
12141 (store_register): ... this new function.
12143 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12145 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12146 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12147 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12148 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12149 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12150 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12151 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12152 (srv_xmlfiles): Add new XML files.
12154 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12156 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12157 (init_registers_s390_linux32v1): Add prototype.
12158 (init_registers_s390_linux32v2): Likewise.
12159 (init_registers_s390_linux64v1): Likewise.
12160 (init_registers_s390_linux64v2): Likewise.
12161 (init_registers_s390x_linux64v1): Likewise.
12162 (init_registers_s390x_linux64v2): Likewise.
12163 (s390_num_regs): Increment to 52.
12164 (s390_regmap): Add orig_r2 register.
12165 (s390_num_regs_3264): Increment to 68.
12166 (s390_regmap_3264): Add orig_r2 register.
12167 (s390_collect_ptrace_register): Handle orig_r2 register.
12168 (s390_supply_ptrace_register): Likewise.
12169 (s390_fill_last_break): New function.
12170 (s390_store_last_break): Likewise.
12171 (s390_fill_system_call): New function.
12172 (s390_store_system_call): Likewise.
12173 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12175 (s390_check_regset): New function.
12176 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12177 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12178 Update target_regsets for available register sets.
12180 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12181 Jan Kratochvil <jan.kratochvil@redhat.com>
12183 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12184 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12186 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12187 * linux-low.h (struct process_info_private): New member r_debug.
12188 * server.c (handle_qxfer_libraries): Call
12189 the_target->qxfer_libraries_svr4.
12190 (handle_qxfer_libraries_svr4): New function.
12191 (qxfer_packets): New entry "libraries-svr4".
12192 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12193 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12194 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12195 PACKET_qXfer_libraries_svr4.
12197 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12199 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12200 PSW address/mask between 8-byte and 16-byte formats.
12201 (s390_supply_ptrace_register): Likewise.
12202 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12203 basic addressing mode bit.
12205 2011-11-24 Stan Shebs <stan@codesourcery.com>
12207 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12209 2011-11-17 Stan Shebs <stan@codesourcery.com>
12211 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12212 (tracing_start_time): New global.
12213 (tracing_stop_time): New global.
12214 (tracing_user_name): New global.
12215 (tracing_notes): New global.
12216 (tracing_stop_note): New global.
12217 (cmd_qtstart): Set traceframe_usage, start_time.
12218 (stop_tracing): Set stop_time.
12219 (cmd_qtstatus): Report additional status.
12220 (cmd_qtp): New function.
12221 (handle_tracepoint_query): Call it.
12222 (cmd_qtnotes): New function.
12223 (handle_tracepoint_general_set): Call it.
12224 (get_timestamp): Rename from tsv_get_timestamp.
12226 2011-11-14 Stan Shebs <stan@codesourcery.com>
12227 Kwok Cheung Yeung <kcy@codesourcery.com>
12229 * linux-x86-low.c (small_jump_insn): New.
12230 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12231 trampoline and error message, build a trampoline and issue a small
12232 jump instruction to it.
12233 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12234 trampoline and error message.
12235 (x86_get_min_fast_tracepoint_insn_len): New.
12236 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12237 * linux-low.h (struct linux_target_ops): Add arguments to
12238 install_fast_tracepoint_jump_pad operation, add new operation.
12239 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12241 (linux_get_min_fast_tracepoint_insn_len): New function.
12242 (linux_target_op): Add new operation.
12243 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12244 (gdb_trampoline_buffer_end): Ditto.
12245 (gdb_trampoline_buffer_error): Ditto.
12246 (struct ipa_sym_addresses): Add fields for new IPA variables.
12247 (symbol_list): Add entries for new IPA variables.
12248 (struct tracepoint): Add fields to hold the address range of the
12249 trampoline used by the tracepoint.
12250 (trampoline_buffer_head): New static variable.
12251 (trampoline_buffer_tail): Ditto.
12252 (claim_trampoline_space): New function.
12253 (have_fast_tracepoint_trampoline_buffer): New function.
12254 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12256 (install_fast_tracepoint): Ditto, also add error buffer argument.
12257 (cmd_qtminftpilen): New function.
12258 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12259 (fast_tracepoint_from_trampoline_address): New function.
12260 (fast_tracepoint_collecting): Handle trampoline as part of jump
12262 (set_trampoline_buffer_space): New function.
12263 (initialize_tracepoint): Initialize new IPA variables.
12264 * target.h (struct target_ops): Add arguments to
12265 install_fast_tracepoint_jump_pad operation, add new
12266 get_min_fast_tracepoint_insn_len operation.
12267 (target_get_min_fast_tracepoint_insn_len): New.
12268 (install_fast_tracepoint_jump_pad): Add arguments.
12269 * server.h (IPA_BUFSIZ): Define.
12270 * linux-i386-ipa.c: Include extra header files.
12271 (initialize_fast_tracepoint_trampoline_buffer): New function.
12272 (initialize_low_tracepoint): Call it.
12273 * server.h (set_trampoline_buffer_space): Declare.
12274 (claim_trampoline_space): Ditto.
12275 (have_fast_tracepoint_trampoline_buffer): Ditto.
12277 2011-11-14 Yao Qi <yao@codesourcery.com>
12279 * server.c (handle_query): Handle InstallInTrace for qSupported.
12280 * tracepoint.c (add_tracepoint): Sort list.
12281 (install_tracepoint, download_tracepoint): New.
12282 (cmd_qtdp): Call them to install and download tracepoints.
12283 (sort_tracepoints): Removed.
12284 (cmd_qtstart): Update.
12286 2011-11-14 Yao Qi <yao@codesourcery.com>
12288 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12289 * mem-break.h: Declare.
12290 * tracepoint.c (cmd_qtstart): Move some code to ...
12291 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12293 (download_tracepoints): Move some code to ...
12294 (download_tracepoint_1): ... here. New.
12296 2011-11-08 Yao Qi <yao@codesourcery.com>
12298 * remote-utils.c (relocate_instruction): A comment fix.
12300 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12302 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12303 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12304 dr_status_mirror and dr_control_mirror from debug_reg_state.
12305 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12306 (i386_initial_stuff): Remove use of deleted globals.
12307 (i386_get_thread_context, i386_set_thread_context,
12308 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12309 from debug_reg_state.
12311 2011-11-05 Yao Qi <yao@codesourcery.com>
12313 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12314 address as TPOINT's.
12316 2011-11-02 Stan Shebs <stan@codesourcery.com>
12318 * tracepoint.c (agent_mem_read_string): New function.
12319 (eval_agent_expr): Call it for tracenz.
12320 * server.c (handle_query): Report support for tracenz.
12322 2011-11-02 Yao Qi <yao@codesourcery.com>
12324 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12326 2011-11-02 Yao Qi <yao@codesourcery.com>
12328 * target.h: Fix a typo in comment.
12330 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12332 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12333 clobber the breakpoints' shadows with fast tracepoint jumps.
12334 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12335 * target.c (write_inferior_memory): Also pass MYADDR down to
12338 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12340 * configure.ac: Check support for personality routine.
12341 * configure: Regenerate.
12342 * config.in: Likewise.
12343 * linux-low.c: Include <sys/personality.h>.
12344 Define ADDR_NO_RANDOMIZE if necessary.
12345 (linux_create_inferior): Disable address space randomization when
12346 forking inferior, if requested.
12347 (linux_supports_disable_randomization): New function.
12348 (linux_target_ops): Install it.
12349 * server.h (disable_randomization): Declare.
12350 * server.c (disable_randomization): New global variable.
12351 (handle_general_set): Handle QDisableRandomization.
12352 (handle_query): Likewise for qSupported.
12353 (main): Support --disable-randomization and --no-disable-randomization
12354 command line arguments.
12355 * target.h (struct target_ops): Add supports_disable_randomization.
12356 (target_supports_disable_randomization): New macro.
12358 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12360 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12362 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12363 [!PT_GETDSBT] (target_loadmap): New definition.
12364 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12365 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12366 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12367 and PT_GETDSBT to LINUX_LOADMAP.
12368 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12369 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12371 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12373 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12374 (arm_linux_hwbp_cap): New static variable.
12375 (arm_linux_get_hwbp_cap): Replace by ...
12376 (arm_linux_init_hwbp_cap): ... this new function.
12377 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12378 (arm_linux_get_hw_watchpoint_count): Likewise.
12379 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12380 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12381 (arm_prepare_to_resume): Use perror_with_name instead of error.
12383 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12385 * linux-arm-low.c: Include <signal.h>.
12386 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12387 (struct arm_linux_hwbp_cap): New data type.
12388 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12389 (struct arm_linux_hw_breakpoint): New data type.
12390 (MAX_BPTS, MAX_WPTS): Define.
12391 (struct arch_process_info, struct arch_lwp_info): New data types.
12392 (arm_linux_get_hwbp_cap): New function.
12393 (arm_linux_get_hw_breakpoint_count): Likewise.
12394 (arm_linux_get_hw_watchpoint_count): Likewise.
12395 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12396 (arm_hwbp_control_initialize): Likewise.
12397 (arm_hwbp_control_is_enabled): Likewise.
12398 (arm_hwbp_control_is_initialized): Likewise.
12399 (arm_hwbp_control_disable): Likewise.
12400 (arm_linux_hw_breakpoint_equal): Likewise.
12401 (arm_linux_hw_point_initialize): Likewise.
12402 (struct update_registers_data): New data structure.
12403 (update_registers_callback: New function.
12404 (arm_insert_point): Likewise.
12405 (arm_remove_point): Likewise.
12406 (arm_stopped_by_watchpoint): Likewise.
12407 (arm_stopped_data_address): Likewise.
12408 (arm_new_process): Likewise.
12409 (arm_new_thread): Likewise.
12410 (arm_prepare_to_resume): Likewise.
12411 (the_low_target): Register arm_insert_point, arm_remove_point,
12412 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12413 arm_new_thread, and arm_prepare_to_resume.
12415 2011-09-15 Stan Shebs <stan@codesourcery.com>
12417 * server.h (struct emit_ops): Add compare-goto fields.
12418 * tracepoint.c (gdb_agent_op_sizes): New table.
12419 (emit_eq_goto): New function.
12420 (emit_ne_goto): New function.
12421 (emit_lt_goto): New function.
12422 (emit_le_goto): New function.
12423 (emit_gt_goto): New function.
12424 (emit_ge_goto): New function.
12425 (is_goto_target): New function.
12426 (compile_bytecodes): Recognize special cases of compare-goto
12427 combinations and call specialized emitters for them.
12428 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12429 (amd64_emit_ne_goto): New function.
12430 (amd64_emit_lt_goto): New function.
12431 (amd64_emit_le_goto): New function.
12432 (amd64_emit_gt_goto): New function.
12433 (amd64_emit_ge_goto): New function.
12434 (amd64_emit_ops): Add the new functions.
12435 (i386_emit_eq_goto): New function.
12436 (i386_emit_ne_goto): New function.
12437 (i386_emit_lt_goto): New function.
12438 (i386_emit_le_goto): New function.
12439 (i386_emit_gt_goto): New function.
12440 (i386_emit_ge_goto): New function.
12441 (i386_emit_ops): Add the new functions.
12443 2011-09-08 Stan Shebs <stan@codesourcery.com>
12445 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12446 (i386_emit_epilogue): Restore %ebx.
12448 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12450 * server.c (step_thread): Remove definition.
12451 (process_serial_event): Don't handle Hs.
12452 * server.h (step_thread): Remove declaration.
12453 * target.c (set_desired_inferior): Remove use of step_thread.
12455 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12457 * linux-low.c: Include linux-procfs.h.
12458 (linux_attach_lwp_1): Update comments.
12459 (linux_attach): Scan for existing threads when attaching to a
12460 process that is the tgid.
12461 * Makefile.in: Update dependencies.
12463 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12465 * configure.srv: Add linux-procfs.o dependencies.
12467 2011-08-14 Yao Qi <yao@codesourcery.com>
12469 * target.h (struct target_ops): Fix indent.
12470 * win32-low.c (win32_target_ops): Fix comment.
12472 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12473 Yao Qi <yao@codesourcery.com>
12475 * Makefile.in (clean): Remove tic6x-*.c files.
12476 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12477 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12478 (tic6x-c64xp-linux.c): Likewise.
12479 * configure.srv: Add support for tic6x-*-uclinux.
12480 * linux-tic6x-low.c: New.
12481 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12483 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12484 Yao Qi <yao@codesourcery.com>
12486 * target.h (struct target_ops): Add read_loadmap.
12487 * linux-low.c (struct target_loadseg): New type.
12488 (struct target_loadmap): New type.
12489 (linux_read_loadmap): New function.
12490 (linux_target_ops): Add linux_read_loadmap.
12491 * server.c (handle_query): Support qXfer:fdpic:read packet.
12492 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12495 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12497 * win32-low.c: Include <stdint.h>.
12499 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12501 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12502 to the inferior here.
12503 (i386_remove_aligned_watchpoint): Ditto.
12504 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12505 fit part of the watchpoint in the debug registers.
12506 (i386_update_inferior_debug_regs): New.
12507 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12508 registers, and only update the inferior on success.
12509 (i386_low_remove_watchpoint): Ditto.
12511 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12513 * linux-low.c (compare_ints, unique, list_threads, show_process,
12514 linux_core_of_thread): Delete.
12515 (linux_target_ops): Change linux_core_of_thread to
12516 linux_common_core_of_thread.
12517 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12518 * utils.c (malloc_failure): Change type of argument.
12519 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12520 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12521 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12522 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12523 (IPA_OBJS): Add common-utils-ipa.o.
12524 (ptid_h, linux_osdata_h): New macros.
12525 (server_h): Add common/common-utils.h, common/xml-utils.h,
12526 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12528 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12529 ptid.o, buffer.o): New rules.
12530 (linux-low.o): Add common/linux-osdata.h as a dependency.
12531 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12532 * configure.ac: Add AC_HEADER_DIRENT check.
12533 * config.in: Regenerate.
12534 * configure: Regenerate.
12535 * remote-utils.c (xml_escape_text): Delete.
12536 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12537 buffer_xml_printf): Move to common/buffer.c.
12538 * server.c (main): Remove call to initialize_inferiors.
12539 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12540 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12541 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12542 internal_error, gdb_assert, gdb_assert_fail): Delete.
12543 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12544 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12546 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12547 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12548 initialize_inferiors): Delete.
12550 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12552 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12555 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12557 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12559 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12561 2011-05-26 Yao Qi <yao@codesourcery.com>
12563 * Makefile.in (thread-db.o): Track dependence to
12564 common/gdb_thread_db.h.
12565 * thread-db.c: include gdb_thread_db.h from right place.
12567 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12569 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12570 __FILE__ and __LINE__ to internal_error.
12572 2011-05-13 Doug Evans <dje@google.com>
12574 * thread-db.c (try_thread_db_load_from_sdir): New function.
12575 (try_thread_db_load_from_dir): New function.
12576 (thread_db_load_search): Handle $sdir, ignore $pdir.
12577 Remove trying of system directories if search of
12578 libthread-db-search-path fails, that is now done via $sdir.
12580 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12582 * server.c (handle_query): Add EnableDisableTracepoints to the list
12583 of supported features.
12584 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12586 (cmd_qtenable_disable): New.
12587 (cmd_qtstart): Install tracepoints even if disabled.
12588 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12589 receiving a QTEnable or QTDisable packet.
12590 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12591 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12593 (gdb_probe): Skip data collection if static tracepoint is disabled.
12595 2011-05-10 Doug Evans <dje@google.com>
12597 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12599 2011-05-04 Doug Evans <dje@google.com>
12601 * linux-low.c (linux_join): Skip process lookup.
12602 * spu-low.c (spu_join): Ditto.
12603 * server.c (join_inferiors_callback): Delete.
12604 (process_serial_event): For 'D' packet (detach) call join_inferior
12607 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12609 * README: Don't mention xscale*-*-linux*.
12610 * configure.srv (xscale*-*-linux*): Don't handle target.
12612 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12614 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12616 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12617 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12618 (i386_emit_void_call_2): Likewise.
12620 2011-04-26 Yao Qi <yao@codesourcery.com>
12622 * linux-low.c: Move common macros to linux-ptrace.h.
12623 Include linux-ptrace.h.
12624 * Makefile.in (linux_ptrace_h): New.
12625 (linux-low.o): Depends on linux-ptrace.h.
12627 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12629 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12630 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12631 (remote_prepare): New function with most of the TCP code from ...
12632 (remote_open): ... here. Detect PORT here unconditionally. Move also
12633 setting transport_is_reliable.
12634 * server.c (run_once): New variable.
12635 (gdbserver_usage): Document it.
12636 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12637 the first run if RUN_ONCE.
12638 * server.h (run_once, remote_prepare): New declarations.
12640 2011-04-19 Tom Tromey <tromey@redhat.com>
12642 * win32-low.c (handle_load_dll): Remove duplicate "the".
12644 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12646 Remove support for old Cygwin 1.5 versions.
12647 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12648 function to avoid warning.
12649 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12652 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12654 * gdbserver/server.h (Macro _): Define it if not available.
12656 2011-03-14 Michael Snyder <msnyder@vmware.com>
12658 * hostio.c (handle_close): Remove unnecessary null test.
12660 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12662 * Makefile.in (maintainer-clean realclean distclean): Remove
12663 "make ... subdir_do" command.
12665 2011-03-10 Michael Snyder <msnyder@vmware.com>
12667 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12669 * server.c (handle_v_run): Free alloced buffer on early return.
12671 2011-03-09 Yao Qi <yao@codesourcery.com>
12674 2011-03-04 Yao Qi <yao@codesourcery.com>
12676 * Makefile.in: Remove GNU make feature --directory.
12678 2011-03-05 Yao Qi <yao@codesourcery.com>
12680 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12681 (subdir_do): New make target. Copied from gdb/Makefile.
12682 (maintainer-clean, realclean, distclean, clean): Call corresponding
12683 make targets in common/Makefile.
12685 2011-02-11 Yao Qi <yao@codesourcery.com>
12687 * configure.ac: Call AC_PROG_RANLIB.
12688 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12689 * configure: Regenerate.
12691 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12693 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12695 2011-03-06 Yao Qi <yao@codesourcery.com>
12697 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12699 2011-03-05 Yao Qi <yao@codesourcery.com>
12701 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12702 (subdir_do): New make target. Copied from gdb/Makefile.
12703 (maintainer-clean, realclean, distclean, clean): Call corresponding
12704 make targets in common/Makefile.
12706 2011-03-04 Yao Qi <yao@codesourcery.com>
12708 * Makefile.in: Remove GNU make feature --directory.
12710 2011-03-04 Michael Snyder <msnyder@vmware.com>
12712 * server.c (queue_stop_reply): Call xmalloc not malloc.
12714 2011-03-02 Michael Snyder <msnyder@vmware.com>
12716 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12718 2011-02-28 Michael Snyder <msnyder@vmware.com>
12720 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12721 (cmd_qtframe): Ditto.
12722 (cmd_qtbuffer): Ditto.
12723 (cmd_bigqtbuffer): Ditto.
12725 * utils.c (decimal2str): Initialize 'width' to nine, then
12726 don't mess with it.
12728 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12730 * hostio.c (require_data): Free *data, not data.
12732 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12734 * hostio.c (require_data): Use free, not xfree.
12736 2011-02-27 Michael Snyder <msnyder@vmware.com>
12738 * server.c (handle_query): Discard unused value.
12740 * hostio.c (require_data): Free malloc memory before returning
12743 2011-02-26 Michael Snyder <msnyder@vmware.com>
12745 * linux-low.c (list_threads): Call closedir for dirent.
12747 2011-02-27 Michael Snyder <msnyder@vmware.com>
12749 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12750 a case statement falls through.
12752 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12754 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12757 2011-02-26 Michael Snyder <msnyder@vmware.com>
12759 * utils.c (decimal2str): Eliminate dead code and dead param.
12760 (pulongest): Drop dead param from call to decimal2str.
12763 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12765 Revert the following patch (not approved yet):
12766 2011-02-21 Hui Zhu <teawater@gmail.com>
12767 * tracepoint.c (tp_printf): New function.
12768 (eval_agent_expr): Handle gdb_agent_op_printf.
12770 2011-02-21 Hui Zhu <teawater@gmail.com>
12772 * tracepoint.c (tp_printf): New function.
12773 (eval_agent_expr): Handle gdb_agent_op_printf.
12775 2011-02-18 Tom Tromey <tromey@redhat.com>
12777 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12778 (tracepoint.o): Likewise.
12779 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12780 (gdb_agent_op_names): Likewise.
12782 2011-02-18 Tom Tromey <tromey@redhat.com>
12784 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12785 gdb_agent_op_rot>: New constants.
12786 (gdb_agent_op_names): Add pick and roll.
12787 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12790 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12792 * aclocal.m4: Regenerated with aclocal-1.11.1.
12794 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12796 * server.c (handle_qxfer_traceframe_info): New.
12797 (qxfer_packets): Register "traceframe-info".
12798 (handle_query): Report support for qXfer:traceframe-info:read+.
12799 * tracepoint.c (match_blocktype): New.
12800 (traceframe_find_block_type): Rename to ...
12801 (traceframe_walk_blocks): ... this. Add callback filter argument,
12803 (traceframe_find_block_type): New, reimplemented on top of
12804 traceframe_walk_blocks.
12805 (build_traceframe_info_xml): New.
12806 (traceframe_read_info): New.
12807 * server.h (traceframe_read_info): Declare.
12809 2011-02-11 Yao Qi <yao@codesourcery.com>
12811 * configure.ac: Call AC_PROG_RANLIB.
12812 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12813 * configure: Regenerate.
12815 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12817 * server.c (gdb_read_memory): Change return semantics to allow
12819 (handle_search_memory_1): Adjust.
12820 (process_serial_event) <'m' packet>: Handle partial transfers.
12821 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12823 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12825 * regcache.c (init_register_cache): Initialize
12826 regcache->register_status.
12827 (free_register_cache): Release regcache->register_status.
12828 (regcache_cpy): Copy register_status.
12829 (registers_to_string): Print 'x's for unavailable registers.
12830 (supply_register): Mark the register's status valid or
12831 unavailable, depending on whether a buffer was passed in or not.
12832 (supply_register_zeroed): New.
12833 (supply_regblock): Mark the registers' status valid or
12834 unavailable, depending on whether a buffer was passed in or not.
12835 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12836 (struct regcache): New `register_status' field.
12837 (supply_register_zeroed): Declare.
12838 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12839 supply_register_zeroed, rather than passing a NULL buffer to
12841 * tracepoint.c (fetch_traceframe_registers): Update comment.
12843 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12845 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12848 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12850 * server.h (decode_xfer_write): Change prototype.
12851 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12852 and don't extract the annex here.
12853 * server.c (decode_xfer_read): Remove `annex' parameter,
12854 and don't extract the annex here.
12855 (decode_xfer): New.
12856 (struct qxfer): New.
12857 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12858 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12859 (handle_qxfer_statictrace): New functions, abstracted out from
12860 handle_query, and made to use the struct qxfer interface.
12861 (handle_threads_qxfer_proper): Rename to ...
12862 (handle_qxfer_threads_proper): ... this.
12863 (handle_threads_qxfer): Rename to ...
12864 (handle_qxfer_threads): ... this. Adjust.
12865 (qxfer_packets): New array.
12866 (handle_qxfer): New function.
12867 (handle_query): Use handle_qxfer.
12869 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12871 * gdbreplay.c: Shorten lines of >= 80 columns.
12872 * linux-low.c: Ditto.
12873 * linux-ppc-low.c: Ditto.
12874 * linux-s390-low.c: Ditto.
12875 * linux-sparc-low.c: Ditto.
12876 * linux-x86-low.c: Ditto.
12877 * linux-xtensa-low.c: Ditto.
12878 * mem-break.c: Ditto.
12879 * nto-low.c: Ditto.
12880 * regcache.h: Ditto.
12881 * remote-utils.c: Ditto.
12884 * thread-db.c: Ditto.
12885 * tracepoint.c: Ditto.
12887 * win32-low.h: Ditto.
12889 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12891 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12894 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12896 * server.c (gdbserver_version): Update copyright year in version
12898 * gdbreplay.c (gdbreplay_version): Ditto.
12900 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12902 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12903 * linux-bfin-low.c: New file.
12904 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12905 PT_DATA_ADDR for BFIN targets.
12906 * Makefile.in (SFILES): Add linux-bfin-low.c.
12907 (clean): Remove reg-bfin.c.
12908 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12909 * README: Mention supported Blackfin targets.
12911 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12913 * .gitignore: New file.
12915 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12917 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12919 2010-10-22 Jie Zhang <jie@codesourcery.com>
12921 * Makefile.in: Add FLAGS_TO_PASS variable.
12922 (install): Remove dependency of install-only and recursively
12923 invoke make for install-only.
12925 2010-10-04 Doug Evans <dje@google.com>
12927 * Makefile.in (uninstall): Use $(DESTDIR).
12929 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12933 * linux-x86-low.c (compat_siginfo_from_siginfo)
12934 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12935 si_code is < 0. Check for si_code == SI_TIMER before checking for
12938 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12940 * lynx-i386-low.c: New file.
12941 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12943 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12945 * lynx-low.c (ptrace_request_to_str): Remove handling for
12946 request values that have been removed in LynxOS 5.x.
12948 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12950 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12953 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12955 * configure.ac: Add --enable-inprocess-agent option.
12956 * configure: Rebuilt.
12958 2010-09-06 Yao Qi <yao@codesourcery.com>
12960 * linux-low.c (linux_kill): Remove unused variable.
12961 (linux_stabilize_threads): Likewise.
12962 * server.c (start_inferior): Likewise.
12963 (queue_stop_reply_callback): Likewise.
12964 * tracepoint.c (do_action_at_tracepoint): Likewise.
12966 2010-09-06 Yao Qi <yao@codesourcery.com>
12968 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12971 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12973 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12975 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12977 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12980 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12982 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12983 gdbserver/lynx-ppc-low.c: New files.
12984 * Makefile.in (lynx_low_h): New variable.
12985 (lynx-low.o, lynx-ppc-low.o): New rules.
12986 * configure.ac: On LynxOS, link with -lnetinet.
12987 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12988 * configure: regenerate.
12990 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12992 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12993 * configure.ac: Add check for vasprintf and vsnprintf.
12994 * configure, config.in: Regenerate.
12995 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12997 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12999 * gdbreplay.c: Move include of alloca.h up, next to include of
13001 * server.h: Add include of malloc.h.
13002 * mem-break.c: Remove include of malloc.h.
13003 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13005 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13007 * Makefile.in (memmem.o): Build with -Wno-error.
13009 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13011 * utils.c (xsnprintf): Make non-static.
13012 * server.h: Add xsnprintf declaration.
13013 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13014 replace calls to snprintf by calls to xsnprintf throughout.
13016 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13018 * configure.ac: Add configure check for alloca.
13019 * configure, config.in: Regenerate.
13020 * server.h: Include alloca.h if it exists.
13021 * gdbreplay.c: Include alloca.h if it exists.
13023 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13025 * linux-low.c (__SIGRTMIN): Define if not already defined.
13026 (linux_create_inferior): Check for __ANDROID__ rather than
13028 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13029 are already deferred.
13030 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13031 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13032 stopped and already has a pending signal to report.
13033 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13034 a pending signal to report or is moving out of a jump pad.
13035 (linux_init_signals): Check for __ANDROID__ rather than
13038 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13040 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13041 debug_threads check. Avoid a linear search when not doing debug
13044 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13046 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13047 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13048 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13049 (process_event): Change local fd's type to gdb_fildes_t.
13050 (create_file_handler): Adjust prototype.
13051 (delete_file_handler): Adjust prototype.
13052 (handle_file_event): Adjust prototype. Use pfildes.
13053 (create_file_event): Adjsut prototype.
13054 * remote-utils.c (remote_desc, listen_desc): Change type to
13056 * server.h: New gdb_fildes_t typedef.
13057 [USE_WIN32API]: Include winsock2.h.
13058 (delete_file_handler, add_file_handler): Adjust prototypes.
13059 (pfildes): Declare.
13060 * utils.c (pfildes): New.
13062 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13064 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13065 * configure: Regenerate.
13067 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13069 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13070 (linux_done_accessing_memory): ... this.
13071 (linux_target_ops): Adjust.
13072 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13073 * nto-low.c (nto_target_ops): Adjust comment.
13074 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13075 * spu-low.c (spu_target_ops): Adjust comment.
13076 * target.h (target_ops): Rename unprepare_to_access_memory field
13077 to done_accessing_memory.
13078 (unprepare_to_access_memory): Rename to ...
13079 (done_accessing_memory): ... this.
13081 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13083 * linux-low.c (linux_prepare_to_access_memory): New.
13084 (linux_unprepare_to_access_memory): New.
13085 (linux_target_ops): Install them.
13086 * server.c (read_memory): Rename to ...
13087 (gdb_read_memory): ... this. Use
13088 prepare_to_access_memory/prepare_to_access_memory.
13089 (write_memory): Rename to ...
13090 (gdb_write_memory): ... this. Use
13091 prepare_to_access_memory/prepare_to_access_memory.
13092 (handle_search_memory_1): Adjust.
13093 (process_serial_event): Adjust.
13094 * target.h (struct target_ops): New fields
13095 prepare_to_access_memory and unprepare_to_access_memory.
13096 (prepare_to_access_memory, unprepare_to_access_memory): New.
13097 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13098 prepare_to_access_memory/prepare_to_access_memory.
13099 * nto-low.c (nto_target_ops): Adjust.
13100 * spu-low.c (spu_target_ops): Adjust.
13101 * win32-low.c (win32_target_ops): Adjust.
13103 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13105 * Makefile.in (WARN_CFLAGS): Get it from configure.
13106 (WERROR_CFLAGS): New.
13107 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13108 * configure.ac: Introduce --enable-werror, which adds -Werror to
13109 the compiler command line. Enabled by default. Disable with
13110 --disable-werror. Add -Wdeclaration-after-statement
13111 Wpointer-arith and -Wformat-nonliteral to warning flags.
13112 * configure: Regenerate.
13114 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13116 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13118 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13120 * gdbreplay.c (remote_error): New.
13122 (expect): Use gdbchar. Check for error reading from GDB.
13123 Clarify sync error output.
13124 (play): Check for errors writing to GDB.
13125 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13126 * remote-utils.c (getpkt): Check for errors writing to the remote
13129 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13131 * linux-low.c (linux_wait_1): Move non-debugging code out of
13132 `debug_threads' control.
13134 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13136 * linux-low.c (linux_wait_1): Don't set last_status here.
13137 * server.c (push_event, queue_stop_reply_callback): Assert we're
13138 not pushing a TARGET_WAITKIND_IGNORE event.
13139 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13140 (myresume, handle_target_event): Set the thread's last_resume_kind
13141 and last_status from the target returned status.
13143 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13147 * linux-x86-low.c (update_debug_registers_callback): New.
13148 (i386_dr_low_set_addr): Use it.
13149 (i386_dr_low_get_addr): New.
13150 (i386_dr_low_set_control): Use update_debug_registers_callback.
13151 (i386_dr_low_get_control): New.
13152 (i386_dr_low_get_status): Adjust.
13153 * linux-low.c (linux_stop_lwp): New.
13154 * linux-low.h (linux_stop_lwp): Declare.
13156 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13157 argument instead of a i386_debug_reg_state.
13158 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13159 a i386_debug_reg_state.
13160 (i386_insert_aligned_watchpoint): Adjust.
13161 (i386_remove_aligned_watchpoint): Adjust.
13162 (i386_low_stopped_data_address): Read the debug registers from the
13163 inferior instead of from the mirrors.
13164 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13165 (i386_dr_low_get_addr): Declare.
13166 (i386_dr_low_get_control): Declare.
13167 (i386_dr_low_get_status): Change prototype.
13169 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13170 (i386_dr_low_get_addr): New.
13171 (i386_dr_low_get_control): New.
13172 (i386_dr_low_get_status): Adjust prototype. Return
13174 (i386_initial_stuff): Clear dr_status_mirror and
13176 (i386_get_thread_context): Adjust.
13177 (i386_set_thread_context): Adjust.
13178 (i386_thread_added): Adjust.
13180 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13182 * linux-low.h (linux_thread_area): Delete declaration.
13184 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13186 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13187 after its termination.
13189 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13191 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13192 (gdb_wants_all_stopped): Delete.
13193 (linux_wait_1): Don't call them.
13194 * server.c (handle_v_cont): Tag all threads as want-stopped.
13195 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13196 stopped as "client-wants-stopped".
13198 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13200 * Makefile.in (signals_h): New.
13201 (server_h): Depend on it.
13202 (server.o): Don't depend on $(signals_def).
13203 (signals.o): Depend on $(signals_def).
13205 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13207 * Makefile.in (signals_def): New.
13208 (server_h): Append include/gdb/signals.h and signals_def.
13209 (server.o): Append signals_def.
13211 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13213 * server.c (handle_target_event): Use target_signal_to_host for
13214 resume_info.sig initialization.
13215 * target.h (struct thread_resume) <sig>: New comment.
13217 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13219 * server.c (handle_query): strcpy() the returned string from paddress()
13220 instead of sprintf().
13221 * utils.c (paddress): Return phex_nz().
13223 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13225 * server.c (handle_v_cont): Call mourn_inferior if process
13227 (myresume): Likewise.
13229 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13231 Static tracepoints, and integration with UST.
13233 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13234 * mem-break.c (uninsert_all_breakpoints)
13235 (reinsert_all_breakpoints): New.
13236 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13237 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13238 (gdb_agent_ust_loaded, helper_thread_id)
13239 (gdb_agent_helper_thread_id): New macros.
13240 (struct ipa_sym_addresses): Add addr_ust_loaded,
13241 addr_helper_thread_id, addr_cmd_buf.
13242 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13243 (in_process_agent_loaded_ust): New.
13244 (write_e_ust_not_loaded): New.
13245 (maybe_write_ipa_ust_not_loaded): New.
13246 (struct collect_static_trace_data_action): New.
13247 (enum tracepoint_type) <static_tracepoint>: New.
13248 (struct tracepoint) <handle>: Mention static tracepoints.
13249 (struct static_tracepoint_ctx): New.
13250 (CMD_BUF_SIZE): New.
13251 (add_tracepoint_action): Handle static tracepoint actions.
13252 (unprobe_marker_at): New.
13253 (clear_installed_tracepoints): Handle static tracepoints.
13254 (cmd_qtdp): Handle static tracepoints.
13255 (probe_marker_at): New.
13256 (cmd_qtstart): Handle static tracepoints.
13257 (response_tracepoint): Handle static tracepoints.
13258 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13259 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13260 (get_context_regcache): Handle static tracepoints.
13261 (do_action_at_tracepoint): Handle static tracepoint actions.
13262 (traceframe_find_block_type): Handle static trace data blocks.
13263 (traceframe_read_sdata): New.
13264 (download_tracepoints): Download static tracepoint actions.
13265 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13266 (GDB_PROBE_NAME): New.
13268 (GET_UST_SYM): New.
13271 (ust_marker_to_static_tracepoint): New.
13273 (collect_ust_data_at_tracepoint): New.
13274 (gdb_ust_probe): New.
13275 (UNIX_PATH_MAX, SOCK_DIR): New.
13276 (gdb_ust_connect_sync_socket): New.
13277 (resume_thread, stop_thread): New.
13278 (run_inferior_command): New.
13279 (init_named_socket): New.
13280 (gdb_ust_socket_init): New.
13281 (cstr_to_hexstr): New.
13283 (first_marker, next_marker): New.
13284 (response_ust_marker): New.
13285 (cmd_qtfstm, cmd_qtsstm): New.
13286 (unprobe_marker_at, probe_marker_at): New.
13287 (cmd_qtstmat, gdb_ust_thread): New.
13288 (gdb_ust_init): New.
13289 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13290 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13291 (ST_REGENTRY): New.
13292 (x86_64_st_collect_regmap): New.
13293 (X86_64_NUM_ST_COLLECT_GREGS): New.
13294 (AMD64_RIP_REGNUM): New.
13295 (supply_static_tracepoint_registers): New.
13296 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13297 (ST_REGENTRY): New.
13298 (i386_st_collect_regmap): New.
13299 (i386_NUM_ST_COLLECT_GREGS): New.
13300 (supply_static_tracepoint_registers): New.
13301 * server.c (handle_query): Handle qXfer:statictrace:read.
13302 <qSupported>: Report support for StaticTracepoints, and
13303 qXfer:statictrace:read features.
13304 * server.h (traceframe_read_sdata)
13305 (supply_static_tracepoint_registers): Declare.
13306 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13307 (unpack_varlen_hex): Include in IPA build.
13308 * Makefile.in (ustlibs, ustinc): New.
13309 (IPA_OBJS): Add remote-utils-ipa.o.
13310 ($(IPA_LIB)): Link -ldl and -lpthread.
13312 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13313 * config.in, configure: Regenerate.
13315 2010-06-20 Ian Lance Taylor <iant@google.com>
13316 Pedro Alves <pedro@codesourcery.com>
13318 * linux-x86-low.c (always_true): Delete.
13319 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13320 trying to fool the compiler with always_true.
13322 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13324 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13325 conditions in gdbserver.
13327 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13329 * spu-low.c (spu_read_memory): Wrap around local store limit.
13330 (spu_write_memory): Likewise.
13332 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13334 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13335 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13337 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13339 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13340 uses with LONGEST uses.
13342 2010-06-14 Stan Shebs <stan@codesourcery.com>
13343 Pedro Alves <pedro@codesourcery.com>
13347 * linux-x86-low.c: Include limits.h.
13349 (always_true): New.
13352 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13353 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13354 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13355 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13356 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13357 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13358 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13359 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13360 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13361 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13362 (amd64_emit_void_call_2): New.
13363 (amd64_emit_ops): New.
13364 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13365 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13366 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13367 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13368 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13369 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13370 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13371 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13372 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13373 (i386_emit_stack_adjust, i386_emit_int_call_1)
13374 (i386_emit_void_call_2): New.
13375 (i386_emit_ops): New.
13376 (x86_emit_ops): New.
13377 (the_low_target): Install x86_emit_ops.
13378 * server.h (struct emit_ops): New.
13379 (get_raw_reg_func_addr): Declare.
13380 (current_insn_ptr, emit_error): Declare.
13381 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13382 (set_trace_state_variable_value): New defines.
13383 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13384 addr_get_trace_state_variable_value and
13385 addr_set_trace_state_variable_value.
13386 (symbol_list): New fields for get_raw_reg,
13387 get_trace_state_variable_value and set_trace_state_variable_value.
13388 (condfn): New typedef.
13389 (struct tracepoint): New field `compiled_cond'.
13390 (do_action_at_tracepoint): Clear compiled_cond.
13391 (get_trace_state_variable_value, set_trace_state_variable_value):
13393 (condition_true_at_tracepoint): If there's a compiled condition,
13395 (current_insn_ptr, emit_error): New globals.
13396 (struct bytecode_address): New.
13397 (get_raw_reg_func_addr): New.
13398 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13399 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13400 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13401 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13402 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13403 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13404 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13405 (compile_tracepoint_condition, compile_bytecodes): New.
13406 * target.h (emit_ops): Forward declare.
13407 (struct target_ops): New field emit_ops.
13408 (target_emit_ops): New.
13409 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13410 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13411 * linux-low.c (linux_emit_ops): New.
13412 (linux_target_ops): Install it.
13413 * linux-low.h (struct linux_target_ops): New field emit_ops.
13415 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13417 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13418 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13420 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13421 Stan Shebs <stan@codesourcery.com>
13423 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13424 (all): Depend on $(extra_libraries).
13425 (install-only): Install the IPA.
13426 (IPA_OBJS, IPA_LIB): New.
13427 (clean): Remove the IPA lib.
13428 (IPAGENT_CFLAGS): New.
13429 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13430 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13431 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13432 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13433 * configure.ac: Check for atomic builtins support in the compiler.
13434 (IPA_DEPFILES, extra_libraries): Define.
13435 * configure.srv (ipa_obj): Add description.
13436 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13437 (i[34567]86-*-linux*): Set ipa_obj.
13438 (x86_64-*-linux*): Set ipa_obj.
13439 * linux-low.c (stabilizing_threads): New.
13440 (supports_fast_tracepoints): New.
13441 (linux_detach): Stabilize threads before detaching.
13442 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13443 the lwp is either not stabilizing, or is moving out of a jump pad.
13444 (linux_fast_tracepoint_collecting): New.
13445 (maybe_move_out_of_jump_pad): New.
13446 (enqueue_one_deferred_signal): New.
13447 (dequeue_one_deferred_signal): New.
13448 (linux_wait_for_event_1): If moving out of a jump pad, defer
13449 pending signals to later.
13450 (linux_stabilize_threads): New.
13451 (linux_wait_1): Check if threads need moving out of jump pads, and
13453 (stuck_in_jump_pad_callback): New.
13454 (move_out_of_jump_pad_callback): New.
13455 (lwp_running): New.
13456 (linux_resume_one_lwp): Handle moving out of jump pads.
13457 (linux_set_resume_request): Dequeue deferred signals.
13458 (need_step_over_p): Also step over fast tracepoint jumps.
13459 (start_step_over): Also uninsert fast tracepoint jumps.
13460 (finish_step_over): Also reinsert fast tracepoint jumps.
13461 (linux_install_fast_tracepoint_jump): New.
13462 (linux_target_ops): Install linux_stabilize_threads and
13463 linux_install_fast_tracepoint_jump_pad.
13464 * linux-low.h (linux_target_ops) <get_thread_area,
13465 install_fast_tracepoint_jump_pad>: New fields.
13466 (struct lwp_info) <collecting_fast_tracepoint,
13467 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13468 (linux_get_thread_area): Declare.
13469 * linux-x86-low.c (jump_insn): New.
13470 (x86_get_thread_area): New.
13471 (append_insns): New.
13472 (push_opcode): New.
13473 (amd64_install_fast_tracepoint_jump_pad): New.
13474 (i386_install_fast_tracepoint_jump_pad): New.
13475 (x86_install_fast_tracepoint_jump_pad): New.
13476 (the_low_target): Install x86_get_thread_area and
13477 x86_install_fast_tracepoint_jump_pad.
13478 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13479 (struct fast_tracepoint_jump): New.
13480 (fast_tracepoint_jump_insn): New.
13481 (fast_tracepoint_jump_shadow): New.
13482 (find_fast_tracepoint_jump_at): New.
13483 (fast_tracepoint_jump_here): New.
13484 (delete_fast_tracepoint_jump): New.
13485 (set_fast_tracepoint_jump): New.
13486 (uninsert_fast_tracepoint_jumps_at): New.
13487 (reinsert_fast_tracepoint_jumps_at): New.
13488 (set_breakpoint_at): Use write_inferior_memory.
13489 (uninsert_raw_breakpoint): Use write_inferior_memory.
13490 (check_mem_read): Mask out fast tracepoint jumps.
13491 (check_mem_write): Mask out fast tracepoint jumps.
13492 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13493 (set_fast_tracepoint_jump): Declare.
13494 (delete_fast_tracepoint_jump)
13495 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13496 (reinsert_fast_tracepoint_jumps_at): Declare.
13497 * regcache.c: Don't compile many functions when building the
13498 in-process agent library.
13499 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13500 the register buffer in the heap.
13501 (free_register_cache): If the register buffer isn't owned by the
13502 regcache, don't free it.
13503 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13504 pre-existing register caches.
13505 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13507 (convert_ascii_to_int): : Constify `from' parameter type.
13508 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13509 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13510 the needed buffer in-place.
13511 (relocate_instruction): New.
13512 * server.c (handle_query) <qSymbols>: If the target supports
13513 tracepoints, give it a chance of looking up symbols. Report
13514 support for fast tracepoints.
13515 (handle_status): Stabilize threads.
13516 (process_serial_event): Adjust.
13517 * server.h (struct fast_tracepoint_jump): Forward declare.
13518 (struct process_info) <fast_tracepoint_jumps>: New field.
13519 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13520 (decode_X_packet, decode_M_packet): Adjust.
13521 (relocate_instruction): Declare.
13522 (in_process_agent_loaded): Declare.
13523 (tracepoint_look_up_symbols): Declare.
13524 (struct fast_tpoint_collect_status): Declare.
13525 (fast_tracepoint_collecting): Declare.
13526 (force_unlock_trace_buffer): Declare.
13527 (handle_tracepoint_bkpts): Declare.
13528 (initialize_low_tracepoint)
13529 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13530 * target.h (struct target_ops) <stabilize_threads,
13531 install_fast_tracepoint_jump_pad>: New fields.
13532 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13533 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13534 [HAVE_STDINT_H]: Include stdint.h.
13535 (trace_debug_1): Rename to ...
13536 (trace_vdebug): ... this.
13537 (trace_debug): Rename to ...
13538 (trace_debug_1): ... this. Add `level' parameter.
13539 (trace_debug): New.
13540 (ATTR_USED, ATTR_NOINLINE): New.
13541 (IP_AGENT_EXPORT): New.
13542 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13543 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13544 (about_to_request_buffer_space, trace_buffer_is_full)
13545 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13546 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13547 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13548 (traceframe_write_count, traceframes_created)
13549 (trace_state_variables)
13550 New renaming defines.
13551 (struct ipa_sym_addresses): New.
13552 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13553 (symbol_list): New.
13554 (ipa_sym_addrs): New.
13555 (all_tracepoint_symbols_looked_up): New.
13556 (in_process_agent_loaded): New.
13557 (write_e_ipa_not_loaded): New.
13558 (maybe_write_ipa_not_loaded): New.
13559 (tracepoint_look_up_symbols): New.
13560 (debug_threads) [IN_PROCESS_AGENT]: New.
13561 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13562 (UNKNOWN_SIDE_EFFECTS): New.
13563 (stop_tracing): New.
13564 (flush_trace_buffer): New.
13565 (stop_tracing_bkpt): New.
13566 (flush_trace_buffer_bkpt): New.
13567 (read_inferior_integer): New.
13568 (read_inferior_uinteger): New.
13569 (read_inferior_data_pointer): New.
13570 (write_inferior_data_pointer): New.
13571 (write_inferior_integer): New.
13572 (write_inferior_uinteger): New.
13573 (struct collect_static_trace_data_action): Delete.
13574 (enum tracepoint_type): New.
13575 (struct tracepoint) <type>: New field `type'.
13576 <actions_str, step_actions, step_actions_str>: Only include in
13578 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13579 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13580 (tracepoints): Use IP_AGENT_EXPORT.
13581 (last_tracepoint): Don't include in the IPA.
13582 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13583 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13584 (alloced_trace_state_variables): New.
13585 (trace_state_variables): Use IP_AGENT_EXPORT.
13586 (traceframe_t): Delete unused variable.
13587 (circular_trace_buffer): Don't include in the IPA.
13588 (trace_buffer_start): Delete.
13589 (struct trace_buffer_control): New.
13590 (trace_buffer_free): Delete.
13591 (struct ipa_trace_buffer_control): New.
13592 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13593 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13595 (trace_buffer_ctrl): New.
13596 (TRACE_BUFFER_CTRL_CURR): New.
13597 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13598 Reimplement as macros.
13599 (trace_buffer_wrap): Delete.
13600 (traceframe_write_count, traceframe_read_count)
13601 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13602 (struct tracepoint_hit_ctx) <type>: New field.
13603 (struct fast_tracepoint_ctx): New.
13604 (memory_barrier): New.
13606 (record_tracepoint_error): Update atomically in the IPA.
13607 (clear_inferior_trace_buffer): New.
13608 (about_to_request_buffer_space): New.
13609 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13610 updating the same buffer.
13611 (add_tracepoint): Default the tracepoint's type to trap
13612 tracepoint, and orig_size to -1.
13613 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13614 internal variables.
13615 (create_trace_state_variable): New parameter `gdb'. Handle it.
13616 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13617 (cmd_qtdp): Handle fast tracepoints.
13618 (cmd_qtdv): Adjust.
13619 (max_jump_pad_size): New.
13620 (gdb_jump_pad_head): New.
13621 (get_jump_space_head): New.
13622 (claim_jump_space): New.
13623 (sort_tracepoints): New.
13624 (MAX_JUMP_SIZE): New.
13625 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13627 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13628 support. Upload fast traceframes, and delete internal IPA
13630 (stop_tracing_handler): New.
13631 (flush_trace_buffer_handler): New.
13632 (cmd_qtstop): Upload fast tracepoints.
13633 (response_tracepoint): Handle fast tracepoints.
13634 (tracepoint_finished_step): Upload fast traceframes. Set the
13635 tracepoint hit context's tracepoint type.
13636 (handle_tracepoint_bkpts): New.
13637 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13638 type. Add comment about fast tracepoints.
13639 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13640 non-existing action_str field.
13641 (get_context_regcache): Handle fast tracepoints.
13642 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13644 (fast_tracepoint_from_jump_pad_address): New.
13645 (fast_tracepoint_from_ipa_tpoint_address): New.
13646 (collecting_t): New.
13647 (force_unlock_trace_buffer): New.
13648 (fast_tracepoint_collecting): New.
13650 (gdb_collect): New.
13651 (write_inferior_data_ptr): New.
13652 (target_tp_heap): New.
13653 (target_malloc): New.
13654 (download_agent_expr): New.
13656 (download_tracepoints): New.
13657 (download_trace_state_variables): New.
13658 (upload_fast_traceframes): New.
13659 (IPA_FIRST_TRACEFRAME): New.
13660 (IPA_NEXT_TRACEFRAME_1): New.
13661 (IPA_NEXT_TRACEFRAME): New.
13662 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13663 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13664 (gdb_jump_pad_buffer_end): New.
13665 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13666 (initialize_tracepoint): Adjust.
13667 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13668 buffer. Initialize the low module.
13669 * utils.c (PREFIX, TOOLNAME): New.
13670 (malloc_failure): Use PREFIX.
13671 (error): In the IPA, an error causes an exit.
13672 (fatal, warning): Use PREFIX.
13673 (internal_error): Use TOOLNAME.
13674 (NUMCELLS): Increase to 10.
13675 * configure, config.in: Regenerate.
13677 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13679 * server.c (handle_query) <qSupported>: Do two passes over the
13680 qSupported string to avoid nesting strtok.
13682 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13684 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13686 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13687 -Wl,--dynamic-list.
13688 * configure: Regenerate.
13689 * proc-service.list: New.
13691 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13693 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13696 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13698 * gdbreplay.c (remote_open): Check error return from socket() call by
13699 its equality to -1 not by it being negative.
13700 * remote-utils.c (remote_open): Likewise.
13702 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13704 * config.h: Regenerate.
13706 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13708 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13709 doesn't provide PTRACE_GET_THREAD_AREA.
13711 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13713 * linux-m68k-low.c: Include <asm/ptrace.h>
13714 (ps_get_thread_area): Implement.
13716 2010-05-03 Doug Evans <dje@google.com>
13718 * event-loop.c (struct callback_event): New struct.
13719 (callback_list): New global.
13720 (append_callback_event, delete_callback_event): New functions.
13721 (process_callback): New function.
13722 (start_event_loop): Call it.
13723 * remote-utils.c (NOT_SCHEDULED): Define.
13724 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13725 moved out of readchar.
13726 (readchar): Rewrite. Call reschedule before returning.
13727 (reset_readchar): New function.
13728 (remote_close): Call it.
13729 (process_remaining, reschedule): New functions.
13730 * server.h (callback_handler_func): New typedef.
13731 (append_callback_event, delete_callback_event): Declare.
13733 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13735 * proc-service.c (ps_pglobal_lookup): Use
13736 thread_db_look_up_one_symbol.
13737 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13738 parameter. Use it instead of all_symbols_looked_up.
13739 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13741 (all_symbols_looked_up): Don't declare.
13742 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13743 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13745 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13746 Set all_symbols_looked_up here.
13747 (thread_db_look_up_one_symbol): New.
13748 (thread_db_get_tls_address): Adjust.
13749 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13750 thread_db object on the heap, and tentatively set it in the
13752 (thread_db_init): Don't set all_symbols_looked_up here.
13753 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13755 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13757 * linux-low.c (linux_kill, linux_detach): Adjust.
13758 (status_pending_p_callback): Remove redundant statement. Check
13759 for !TARGET_WAITIKIND_IGNORE, instead of
13760 TARGET_WAITKIND_STOPPED.
13761 (handle_tracepoints): Make sure LWP is locked. Adjust.
13762 (linux_wait_for_event_1): Adjust.
13763 (linux_cancel_breakpoints): New.
13764 (unsuspend_one_lwp): New.
13765 (unsuspend_all_lwps): New.
13766 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13767 (send_sigstop_callback): Change return type to int, add new
13768 `except' parameter and handle it.
13769 (suspend_and_send_sigstop_callback): New.
13770 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13771 pass them down. If SUSPEND, also increment the lwp's suspend
13773 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13774 (need_step_over_p): Don't consider suspended LWPs.
13775 (start_step_over): Adjust.
13776 (proceed_one_lwp): Change return type to int, add new `except'
13777 parameter and handle it.
13778 (unsuspend_and_proceed_one_lwp): New.
13779 (proceed_all_lwps): Use find_inferior instead of
13781 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13782 also decrement the suspend count of LWPs. Pass `except' down,
13783 instead of hacking its suspend count.
13784 (linux_pause_all): Add `freeze' parameter. Adjust.
13785 (linux_unpause_all): New.
13786 (linux_target_ops): Install linux_unpause_all.
13787 * server.c (handle_status): Adjust.
13788 * target.h (struct target_ops): New fields `unpause_all' and
13789 `cancel_breakpoints'. Add new parameter to `pause_all'.
13790 (pause_all): Add new `freeze' parameter.
13791 (unpause_all): New.
13792 (cancel_breakpoints): New.
13793 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13794 cancel breakpoints.
13795 (cmd_qtstart): Pause threads.
13796 (stop_tracing): Pause threads, and cancel breakpoints.
13797 * win32-low.c (win32_target_ops): Adjust.
13799 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13801 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13802 the inferior right away from here...
13803 (linux_wait_1): ... to here, and adjust to check the thread's
13804 last_resume_kind instead of the lwp's step or stop_expected flags.
13806 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13808 * README: Use consistent `GDB' and `GDBserver' spellings.
13810 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13812 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13813 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13814 (linux_detach_one_lwp): Assume the lwp is stopped.
13815 (any_thread_of): Delete.
13816 (linux_detach): Stop all lwps here. Don't blindly delete all
13818 (delete_lwp_callback): New.
13819 (linux_mourn): Delete all lwps of the process that is gone.
13820 (linux_wait_1): Don't delete the last lwp of the process here.
13821 * mem-break.h (mark_breakpoints_out): Declare.
13822 * mem-break.c (mark_breakpoints_out): New.
13823 (free_all_breakpoints): Use it.
13824 * server.c (handle_target_event): If the process is gone, mark
13826 * thread-db.c (struct thread_db) <create_bp>: New field.
13827 (thread_db_enable_reporting): Fix prototype. Store a thread event
13828 breakpoint reference in the thread_db struct.
13829 (thread_db_load_search): Clear the thread_db object.
13830 (try_thread_db_load_1): Ditto.
13831 (switch_to_process): New.
13832 (disable_thread_event_reporting): Use it.
13833 (remove_thread_event_breakpoints): New.
13834 (thread_db_detach, thread_db_mourn): Use it.
13836 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13838 * linux-low.c (linux_enable_event_reporting): New.
13839 (linux_wait_for_event_1, handle_extended_wait): Use it.
13841 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13843 * linux-low.c (linux_kill_one_lwp, linux_kill)
13844 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13845 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13846 SIGSTOP even if the LWP is stopped.
13847 (send_sigstop_callback): New.
13848 (stop_all_lwps): Use send_sigstop_callback instead.
13849 (linux_resume_one_thread): Adjust.
13850 (proceed_one_lwp): Still proceed an LWP that the client has
13851 requested to stop, if we haven't reported it as stopped yet. Make
13852 sure that LWPs the client want stopped, have a pending SIGSTOP.
13854 2010-04-26 Doug Evans <dje@google.com>
13856 * server.c (handle_general_set): Make static.
13858 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13859 Print received char after testing for error/eof instead of before.
13860 (input_interrupt): Tweak comment.
13862 2010-04-23 Doug Evans <dje@google.com>
13864 * server.c (start_inferior): Print inferior argv if --debug.
13866 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13868 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13869 * nto-x86-low.c: Include server.h
13871 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13873 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13874 be consistent with other sources of this directory.
13875 (init_registers_amd64): Correct name of source file of this function
13878 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13880 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13881 64-bit executables.
13883 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13885 * win32-i386-low.c: Add 64-bit support.
13886 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13887 (init_registers_amd64): Declare.
13888 (mappings): Add 64-bit version of array.
13889 (init_windows_x86): New function.
13890 (the_low_target): Change init_arch field to init_windows_x86.
13892 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13894 * win32-low.c: Adapt to support also 64-bit architecture.
13895 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13896 (get_image_name): Use SIZE_T type for local variable `done'.
13897 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13898 (toolhelp_get_dll_name): Idem.
13899 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13900 Use uintptr_t typecast to avoid warning.
13901 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13902 (handle_exception): Use phex_nz to avoid warning.
13903 (win32_wait): Remove unused local variable `process'.
13905 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13907 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13910 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13912 * configure.ac: Use `ws2_32' library for srv_mingw.
13913 * configure: Regenerate.
13914 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13915 * remote-utils.c: Likewise.
13917 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13919 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13920 if __x86_64__ is defined.
13922 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13924 * configure: Regenerate.
13926 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13928 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13929 * target.h (target_ops): New get_tib_address field.
13930 * win32-low.h (win32_thread_info): Add thread_local_base field.
13931 * win32-low.c (child_add_thread): Add tlb argument.
13932 Set thread_local_base field to TLB.
13933 (get_child_debug_event): Adapt to child_add_thread change.
13934 (win32_get_tib_address): New function.
13935 (win32_target_ops): Set get_tib_address field to
13936 win32_get_tib_address.
13937 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13939 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13941 * linux-low.c (linux_mourn): Also remove the process.
13942 * server.c (handle_target_event): Don't remove the process here.
13943 * nto-low.c (nto_mourn): New.
13944 (nto_target_ops): Install it.
13945 * spu-low.c (spu_mourn): New.
13946 (spu_target_ops): Install it.
13947 * win32-low.c (win32_mourn): New.
13948 (win32_target_ops): Install it.
13950 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13952 * server.h (buffer_xml_printf): Remove redundant `;'.
13954 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13956 * regcache.c (set_register_cache): Invalidate regcaches before
13957 changing the register cache layout.
13958 (regcache_invalidate_one): Allow a NULL regcache.
13959 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13960 regcaches before changing the register cache layout or the target
13963 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13965 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13966 variable warning on Linux/x86-64.
13968 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13970 GDBserver disconnected tracing support.
13972 * linux-low.c (linux_remove_process): Delete.
13973 (add_lwp): Don't set last_resume_kind here.
13974 (linux_kill): Use `mourn'.
13975 (linux_detach): Use `thread_db_detach', and `mourn'.
13976 (linux_mourn): New.
13977 (linux_attach_lwp_1): Adjust comment.
13978 (linux_attach): last_resume_kind moved the thread_info; adjust.
13979 (status_pending_p_callback): Adjust.
13980 (linux_wait_for_event_1): Adjust.
13981 (count_events_callback, select_singlestep_lwp_callback)
13982 (select_event_lwp_callback, cancel_breakpoints_callback)
13983 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13984 (proceed_one_lwp): Adjust.
13985 (linux_async): Add debug output.
13986 (linux_thread_stopped): New.
13987 (linux_pause_all): New.
13988 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13990 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13991 (thread_db_free): Delete declaration.
13992 (thread_db_detach, thread_db_mourn): Declare.
13993 * thread-db.c (thread_db_init): Use thread_db_mourn.
13994 (thread_db_free): Delete, split in two.
13995 (disable_thread_event_reporting): New.
13996 (thread_db_detach): New.
13997 (thread_db_mourn): New.
13999 * server.h (struct thread_info) <last_resume_kind>: New field.
14000 <attached>: Add comment.
14001 <gdb_detached>: New field.
14002 (handler_func): Change return type to int.
14003 (handle_serial_event, handle_target_event): Ditto.
14004 (gdb_connected): Declare.
14006 (disconnected_tracing): Declare.
14007 (stop_tracing): Declare.
14009 * server.c (handle_query) <qSupported>: Report support for
14010 disconnected tracing.
14011 (queue_stop_reply_callback): Account for running threads.
14012 (gdb_wants_thread_stopped): New.
14013 (gdb_wants_all_threads_stopped): New.
14014 (gdb_reattached_process): New.
14015 (handle_status): Clear the `gdb_detached' flag of all processes.
14016 In all-stop, stop all threads.
14017 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14018 (process_serial_event): If the remote connection breaks, or if an
14019 exit was forced with "monitor exit", force an event loop exit.
14020 Handle disconnected tracing on detach.
14021 (handle_serial_event): Adjust.
14022 (handle_target_event): If GDB isn't connected, forward events back
14023 to the inferior, unless the last process exited, in which case,
14024 exit gdbserver. Adjust interface.
14026 * remote-utils.c (remote_open): Don't block in accept. Instead
14027 register an event loop source on the listen socket file
14028 descriptor. Refactor bits into ...
14029 (listen_desc): ... this new global.
14030 (gdb_connected): ... this new function.
14031 (enable_async_notification): ... this new function.
14032 (handle_accept_event): ... this new function.
14033 (remote_close): Clear remote_desc.
14035 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14037 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14039 (mourn_inferior): Define.
14040 (target_process_qsupported): Avoid the dangling else problem.
14041 (thread_stopped): Define.
14042 (pause_all): Define.
14043 (target_waitstatus_to_string): Declare.
14044 * target.c (target_waitstatus_to_string): New.
14046 * tracepoint.c (tracing): Make extern.
14047 (disconnected_tracing): New.
14048 (stop_tracing): Make extern. Handle tracing stops due to GDB
14050 (cmd_qtdisconnected): New.
14051 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14052 (handle_tracepoint_general_set): Handle QTDisconnected.
14054 * event-loop.c (event_handler_func): Change return type to int.
14055 (process_event): Bail out if the event handler wants the event
14057 (handle_file_event): Ditto.
14058 (start_event_loop): Bail out if the event handler wants the event
14061 * nto-low.c (nto_target_ops): Adjust.
14062 * spu-low.c (spu_wait): Don't remove the process here.
14063 (spu_target_ops): Adjust.
14064 * win32-low.c (win32_wait): Don't remove the process here.
14065 (win32_target_ops): Adjust.
14067 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14069 * regcache.c (realloc_register_cache): Invalidate inferior's
14070 regcache before recreating it.
14072 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14074 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14076 2010-04-09 Stan Shebs <stan@codesourcery.com>
14077 Pedro Alves <pedro@codesourcery.com>
14079 * server.h (LONGEST): New.
14080 (struct thread_info) <while_stepping>: New field.
14081 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14083 (initialize_tracepoint, handle_tracepoint_general_set)
14084 (handle_tracepoint_query, tracepoint_finished_step)
14085 (tracepoint_was_hit, release_while_stepping_state_list):
14086 (current_traceframe): Declare.
14087 * server.c (handle_general_set): Handle tracepoint packets.
14088 (read_memory): New.
14089 (write_memory): New.
14090 (handle_search_memory_1): Use read_memory.
14091 (handle_query): Report support for conditional tracepoints, trace
14092 state variables, and tracepoint sources. Handle tracepoint
14094 (main): Initialize the tracepoints module.
14095 (process_serial_event): Handle traceframe reads/writes.
14097 * linux-low.c (handle_tracepoints): New.
14098 (linux_wait_1): Call it.
14099 (linux_resume_one_lwp): Handle while-stepping.
14100 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14101 (linux_target_ops): Install them.
14102 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14104 * linux-x86-low.c (x86_supports_tracepoints): New.
14105 (the_low_target). Install it.
14107 * mem-break.h (delete_breakpoint): Declare.
14108 * mem-break.c (delete_breakpoint): Make external.
14110 * target.h (struct target_ops): Add `supports_tracepoints',
14111 `read_pc', and `write_pc' fields.
14112 (target_supports_tracepoints): Define.
14113 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14116 * regcache.h (struct regcache) <registers_owned>: New field.
14117 (init_register_cache, regcache_cpy): Declare.
14118 (regcache_read_pc, regcache_write_pc): Declare.
14119 (register_cache_size): Declare.
14120 (supply_regblock): Declare.
14121 * regcache.c (init_register_cache): New.
14122 (new_register_cache): Use it.
14123 (regcache_cpy): New.
14124 (register_cache_size): New.
14125 (supply_regblock): New.
14126 (regcache_read_pc, regcache_write_pc): New.
14128 * tracepoint.c: New.
14130 * Makefile.in (OBS): Add tracepoint.o.
14131 (tracepoint.o): New rule.
14133 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14135 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14137 (i386-mmx.c): Likewise.
14138 (i386-mmx-linux.o): Likewise.
14139 (i386-mmx-linux.c): Likewise.
14141 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14142 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14143 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14144 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14146 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14147 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14148 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14150 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14152 * Makefile.in (clean): Updated.
14154 (i386-avx.c): Likewise.
14155 (i386-avx-linux.o): Likewise.
14156 (i386-avx-linux.c): Likewise.
14157 (amd64-avx.o): Likewise.
14158 (amd64-avx.c): Likewise.
14159 (amd64-avx-linux.o): Likewise.
14160 (amd64-avx-linux.c): Likewise.
14162 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14163 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14164 (srv_amd64_regobj): Add amd64-avx.o.
14165 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14166 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14167 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14168 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14169 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14170 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14171 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14173 * i387-fp.c: Include "i386-xstate.h".
14175 (i387_cache_to_xsave): Likewise.
14176 (i387_xsave_to_cache): Likewise.
14177 (x86_xcr0): Likewise.
14179 * i387-fp.h (i387_cache_to_xsave): Likewise.
14180 (i387_xsave_to_cache): Likewise.
14181 (x86_xcr0): Likewise.
14183 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14184 * linux-crisv32-low.c (target_regsets): Likewise.
14185 * linux-m68k-low.c (target_regsets): Likewise.
14186 * linux-mips-low.c (target_regsets): Likewise.
14187 * linux-ppc-low.c (target_regsets): Likewise.
14188 * linux-s390-low.c (target_regsets): Likewise.
14189 * linux-sh-low.c (target_regsets): Likewise.
14190 * linux-sparc-low.c (target_regsets): Likewise.
14191 * linux-xtensa-low.c (target_regsets): Likewise.
14193 * linux-low.c: Include <sys/uio.h>.
14194 (regsets_fetch_inferior_registers): Support nt_type.
14195 (regsets_store_inferior_registers): Likewise.
14196 (linux_process_qsupported): New.
14197 (linux_target_ops): Add linux_process_qsupported.
14199 * linux-low.h (regset_info): Add nt_type.
14200 (linux_target_ops): Add process_qsupported.
14202 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14204 (init_registers_i386_avx_linux): New.
14205 (init_registers_amd64_avx_linux): Likewise.
14206 (xmltarget_i386_linux_no_xml): Likewise.
14207 (xmltarget_amd64_linux_no_xml): Likewise.
14208 (PTRACE_GETREGSET): Likewise.
14209 (PTRACE_SETREGSET): Likewise.
14210 (x86_fill_xstateregset): Likewise.
14211 (x86_store_xstateregset): Likewise.
14212 (use_xml): Likewise.
14213 (x86_linux_update_xmltarget): Likewise.
14214 (x86_linux_process_qsupported): Likewise.
14215 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14216 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14217 init_registers_i386_linux here. Call
14218 x86_linux_update_xmltarget.
14219 (the_low_target): Add x86_linux_process_qsupported.
14221 * server.c (handle_query): Call target_process_qsupported.
14223 * target.h (target_ops): Add process_qsupported.
14224 (target_process_qsupported): New.
14226 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14228 * inferiors.c (add_thread): Set last_status kind to
14229 TARGET_WAITKIND_IGNORE.
14230 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14231 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14232 (linux_wait_1): Move `thread' local definition to block that uses
14233 it. Don't NULL initialize `event_child'.
14234 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14235 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14236 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14238 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14240 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14241 an extended waitstatus, or by a watchpoint.
14242 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14243 thread was stepping or has been stopped by a watchpoint.
14245 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14247 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14248 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14249 of another, then delete the previous, and validate all
14251 (validate_inserted_breakpoint): New.
14252 (delete_disabled_breakpoints): New.
14253 (validate_breakpoints): New.
14254 (check_mem_read): Validate breakpoints before trusting their
14255 shadow. Delete disabled breakpoints.
14256 (check_mem_write): Validate breakpoints before trusting they
14257 should be inserted. Delete disabled breakpoints.
14258 * mem-break.h (validate_breakpoints):
14259 * server.c (handle_query): Validate breakpoints when we see a
14262 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14264 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14265 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14266 if we could tell there's a GDB breakpoint at stop_pc.
14267 (need_step_over_p): Don't do a step over if we find a GDB
14268 breakpoint at the resume PC.
14270 * mem-break.c (struct raw_breakpoint): New.
14271 (enum bkpt_type): New type `gdb_breakpoint'.
14272 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14273 fields. New field `raw'.
14274 (find_raw_breakpoint_at): New.
14275 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14276 breakpoint instead.
14277 (set_breakpoint_at): Adjust.
14278 (delete_raw_breakpoint): New.
14279 (release_breakpoint): New.
14280 (delete_breakpoint): Rename to...
14281 (delete_breakpoint_1): ... this. Add proc parameter. Use
14282 release_breakpoint. Return ENOENT.
14283 (delete_breakpoint): Reimplement.
14284 (find_breakpoint_at): Delete.
14285 (find_gdb_breakpoint_at): New.
14286 (delete_breakpoint_at): Delete.
14287 (set_gdb_breakpoint_at): New.
14288 (delete_gdb_breakpoint_at): New.
14289 (gdb_breakpoint_here): New.
14290 (set_reinsert_breakpoint): Use release_breakpoint.
14291 (uninsert_breakpoint): Rename to ...
14292 (uninsert_raw_breakpoint): ... this.
14293 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14294 (reinsert_raw_breakpoint): Change parameter type to
14296 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14298 (check_breakpoints): Adjust. Use release_breakpoint.
14299 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14300 (breakpoint_inserted_here): Ditto.
14301 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14302 Don't trust the breakpoint's shadow if it is not inserted.
14303 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14304 (delete_all_breakpoints): Adjust.
14305 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14306 use delete_breakpoint_1.
14308 * mem-break.h (breakpoints_supported): Delete declaration.
14309 (set_gdb_breakpoint_at): Declare.
14310 (gdb_breakpoint_here): Declare.
14311 (delete_breakpoint_at): Delete.
14312 (delete_gdb_breakpoint_at): Declare.
14314 * server.h (struct raw_breakpoint): Forward declare.
14315 (struct process_info): New field `raw_breakpoints'.
14317 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14320 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14322 * linux-low.c (status_pending_p_callback): Fix comment.
14323 (linux_wait_for_event_1): Move most of the internal breakpoint
14324 handling from here...
14325 (linux_wait_1): ... to here.
14326 (count_events_callback): New.
14327 (select_singlestep_lwp_callback): New.
14328 (select_event_lwp_callback): New.
14329 (cancel_breakpoints_callback): New.
14330 (select_event_lwp): New.
14331 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14332 priority to all LWPs that have had events that should be reported
14333 to the client. Cancel breakpoints when about to reporting the
14334 event to the client, not while stopping lwps. No longer cancel
14335 finished single-steps here.
14336 (cancel_finished_single_step): Delete.
14337 (cancel_finished_single_steps): Delete.
14339 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14341 * mem-break.c (enum bkpt_type): New.
14342 (struct breakpoint): New field `type'.
14343 (set_breakpoint_at): Change return type to struct breakpoint
14344 pointer. Set type to `other_breakpoint' by default.
14345 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14346 in the breakpoint list.
14347 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14348 (reinsert_breakpoint): Rename to ...
14349 (reinsert_raw_breakpoint): ... this.
14350 (reinsert_breakpoints_at): Adjust.
14351 * mem-break.h (struct breakpoint): Declare.
14352 (set_breakpoint_at): Change return type to struct breakpoint
14355 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14357 * server.c (handle_query): Assign, not compare.
14359 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14361 Teach linux gdbserver to step-over-breakpoints.
14363 * linux-low.c (can_hardware_single_step): New.
14364 (supports_breakpoints): New.
14365 (handle_extended_wait): If stopping threads, read the stop pc of
14366 the new cloned LWP.
14368 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14369 low target doesn't support retrieving the PC.
14370 (add_lwp): Set last_resume_kind to resume_continue.
14371 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14372 (linux_attach): Don't clear stop_expected. Set the lwp's
14373 last_resume_kind to resume_stop.
14374 (linux_detach_one_lwp): Don't check for removed breakpoints.
14375 (check_removed_breakpoint): Delete.
14376 (status_pending_p): Rename to ...
14377 (status_pending_p_callback): ... this. Don't check for removed
14378 breakpoints. Don't consider threads that are stopped from GDB's
14380 (linux_wait_for_lwp): Always read the stop_pc here.
14381 (cancel_breakpoint): New.
14382 (step_over_bkpt): New global.
14383 (linux_wait_for_event_1): Implement stepping over breakpoints.
14384 (gdb_wants_lwp_stopped): New.
14385 (gdb_wants_all_stopped): New.
14386 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14387 single-step traps here. Store the thread's last reported target
14389 (send_sigstop): Don't clear stop_expected. Always set it,
14391 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14392 (cancel_finished_single_step): New.
14393 (cancel_finished_single_steps): New.
14394 (wait_for_sigstop): Don't cancel finished single-step traps here.
14395 (linux_resume_one_lwp): Don't check for removed breakpoints.
14396 Don't set `step' on non-hardware step archs.
14397 (linux_set_resume_request): Ignore resume_stop requests if already
14398 stopping or stopped. Set the lwp's last_resume_kind.
14399 (resume_status_pending_p): Don't check for removed breakpoints.
14400 (need_step_over_p): New.
14401 (start_step_over): New.
14402 (finish_step_over): New.
14403 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14404 requests. Clear the thread's last reported target waitstatus.
14405 Don't use the `suspended' flag. Don't consider pending breakpoints.
14406 (linux_resume): Start a step-over if necessary.
14407 (proceed_one_lwp): New.
14408 (proceed_all_lwps): New.
14409 (unstop_all_lwps): New.
14410 * linux-low.h (struct lwp_info): Rewrite comment for the
14411 `suspended' flag. Add the `stop_pc' field. Delete the
14412 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14413 Add `'last_resume_kind' and `need_step_over' fields.
14414 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14415 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14416 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14417 (set_raw_breakpoint_at): New.
14418 (set_breakpoint_at): Rewrite to use it.
14419 (reinsert_breakpoint_handler): Delete.
14420 (set_reinsert_breakpoint): New.
14421 (reinsert_breakpoint_by_bp): Delete.
14422 (delete_reinsert_breakpoints): New.
14423 (uninsert_breakpoint): Rewrite.
14424 (uninsert_breakpoints_at): New.
14425 (reinsert_breakpoint): Rewrite.
14426 (reinsert_breakpoints_at): New.
14427 (check_breakpoints): Rewrite.
14428 (breakpoint_here): New.
14429 (breakpoint_inserted_here): New.
14430 (check_mem_read): Adjust.
14431 * mem-break.h (breakpoints_supported, breakpoint_here)
14432 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14433 (reinsert_breakpoint_by_bp): Delete declaration.
14434 (delete_reinsert_breakpoints): Declare.
14435 (reinsert_breakpoint): Delete declaration.
14436 (reinsert_breakpoints_at): Declare.
14437 (uninsert_breakpoint): Delete declaration.
14438 (uninsert_breakpoints_at): Declare.
14439 (check_breakpoints): Adjust prototype.
14440 * server.h: Adjust include order.
14441 (struct thread_info): Declare here. Add a `last_status' field.
14443 2010-03-23 Michael Snyder <msnyder@vmware.com>
14445 * server.c (crc32): New function.
14446 (handle_query): Add handling for 'qCRC:' request.
14448 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14450 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14451 lwp had been stopped by a watchpoint.
14453 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14455 * server.h (internal_error): Declare.
14456 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14457 * utils.c (internal_error): New function.
14459 2010-03-15 Andreas Schwab <schwab@redhat.com>
14461 * configure.srv: Fix typo setting srv_regobj.
14463 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14465 * linux-low.c (fetch_register): Avoid passing a non string literal
14467 (usr_store_inferior_registers): Ditto.
14469 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14471 * linux-low.c (linux_write_memory): Bail out early if peeking
14474 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14476 * linux-low.h (struct lwp_info): New fields
14477 `stopped_by_watchpoint' and `stopped_data_address'.
14478 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14479 here, and cache them in the lwp object.
14480 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14482 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14484 (linux_stopped_by_watchpoint): Rewrite.
14485 (linux_stopped_data_address): Rewrite.
14487 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14489 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14490 switching the current inferior, not before.
14492 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14494 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14495 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14496 i386-linux.c and amd64-linux.c.
14497 (reg-i386.o): Removed.
14498 (reg-i386.c): Likewise.
14499 (reg-i386-linux.o): Likewise.
14500 (reg-i386-linux.c): Likewise.
14501 (reg-x86-64.o): Likewise.
14502 (reg-x86-64.c): Likewise.
14503 (reg-x86-64-linux.o): Likewise.
14504 (reg-x86-64-linux.c): Likewise.
14506 (i386.c): Likewise.
14507 (i386-linux.o): Likewise.
14508 (i386-linux.c): Likewise.
14509 (amd64.o): Likewise.
14510 (amd64.c): Likewise.
14511 (amd64-linux.o): Likewise.
14512 (amd64-linux.c): Likewise.
14514 * configure.srv (srv_i386_regobj): New.
14515 (srv_i386_linux_regobj): Likewise.
14516 (srv_amd64_regobj): Likewise.
14517 (srv_amd64_linux_regobj): Likewise.
14518 (srv_i386_32bit_xmlfiles): Likewise.
14519 (srv_i386_64bit_xmlfiles): Likewise.
14520 (srv_i386_xmlfiles): Likewise.
14521 (srv_amd64_xmlfiles): Likewise.
14522 (srv_i386_linux_xmlfiles): Likewise.
14523 (srv_amd64_linux_xmlfiles): Likewise.
14524 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14525 srv_xmlfiles to $srv_i386_xmlfiles.
14526 (i[34567]86-*-mingw32ce*): Likewise.
14527 (i[34567]86-*-mingw*): Likewise.
14528 (i[34567]86-*-nto*): Likewise.
14529 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14530 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14531 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14532 (x86_64-*-linux*): Likewise.
14534 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14535 (init_registers_amd64_linux): New.
14536 (x86_arch_setup): Replace init_registers_x86_64_linux with
14537 init_registers_amd64_linux.
14539 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14541 * configure.ac: Check for libdl. If it is not available link against
14542 static libthread_db.
14543 * configure: Regenerate.
14545 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14549 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14550 handing a read watchpoint.
14551 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14553 2010-02-12 Doug Evans <dje@google.com>
14555 * linux-low.c (linux_supports_tracefork_flag): Document.
14556 (linux_look_up_symbols): Add comment.
14558 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14560 * regcache.c (supply_register): Clear regcache if buf is NULL.
14562 2010-02-02 Nicolas Roche <roche@sourceware.org>
14563 Joel Brobecker <brobecker@adacore.com>
14565 * inferiors.c (find_inferior): Add function documentation.
14566 (unloaded_dll): Handle the case where the unloaded dll has not
14567 been previously registered in the dll list.
14569 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14571 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14572 (thumb2_breakpoint): New.
14573 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14575 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14577 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14578 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14581 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14583 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14585 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14587 * linux-s390-low.c (s390_collect_ptrace_register)
14588 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14590 2010-01-21 Doug Evans <dje@google.com>
14592 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14593 (PTRACE_ARG4_TYPE): New macro.
14594 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14595 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14596 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14597 (usr_store_inferior_registers): Ditto.
14598 (linux_read_memory, linux_write_memory): Ditto.
14599 (linux_test_for_tracefork): Ditto.
14601 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14602 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14604 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14606 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14609 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14611 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14612 prototype to take a regcache. Adjust.
14614 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14616 * regcache.h (struct thread_info): Forward declare.
14617 (struct regcache): New.
14618 (new_register_cache): Adjust prototype.
14619 (get_thread_regcache): Declare.
14620 (free_register_cache): Adjust prototype.
14621 (registers_to_string, registers_from_string): Ditto.
14622 (supply_register, supply_register_by_name, collect_register)
14623 (collect_register_as_string, collect_register_by_name): Ditto.
14624 * regcache.c (struct inferior_regcache_data): Delete.
14625 (get_regcache): Rename to ...
14626 (get_thread_regcache): ... this. Adjust. Switch inferior before
14627 fetching registers.
14628 (regcache_invalidate_one): Adjust.
14629 (regcache_invalidate): Fix prototype.
14630 (new_register_cache): Return the new register cache.
14631 (free_register_cache): Change prototype.
14632 (realloc_register_cache): Adjust.
14633 (registers_to_string): Change prototype to take a regcache. Adjust.
14634 (registers_from_string): Ditto.
14635 (register_data): Ditto.
14636 (supply_register): Ditto.
14637 (supply_register_by_name): Ditto.
14638 (collect_register): Ditto.
14639 (collect_register_as_string): Ditto.
14640 (collect_register_by_name): Ditto.
14641 * server.c (process_serial_event): Adjust.
14642 * linux-low.h (regset_fill_func, regset_store_func): Change
14644 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14646 * linux-low.c (get_stop_pc): Adjust.
14647 (check_removed_breakpoint): Adjust.
14648 (linux_wait_for_event): Adjust.
14649 (linux_resume_one_lwp): Adjust.
14650 (fetch_register): Add regcache parameter. Adjust.
14651 (usr_store_inferior_registers): Ditto.
14652 (regsets_fetch_inferior_registers): Ditto.
14653 (regsets_store_inferior_registers): Ditto.
14654 (linux_fetch_registers, linux_store_registers): Ditto.
14655 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14657 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14659 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14660 prototype to take a regcache.
14661 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14662 * remote-utils.c (convert_ascii_to_int, outreg)
14663 (prepare_resume_reply): Change prototype to take a regcache.
14665 * target.h (struct target_ops) <fetch_registers, store_registers>:
14666 Change prototype to take a regcache.
14667 (fetch_inferior_registers, store_inferior_registers): Change
14668 prototype to take a regcache. Adjust.
14669 * proc-service.c (ps_lgetregs): Adjust.
14670 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14671 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14672 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14673 take a regcache. Adjust.
14674 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14675 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14676 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14677 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14678 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14679 (cris_cannot_fetch_register):
14680 (cris_breakpoint_at): Change prototype to take a regcache.
14682 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14683 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14684 to take a regcache. Adjust.
14685 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14687 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14688 take a regcache. Adjust.
14689 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14690 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14691 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14692 * linux-mips-low.c (mips_get_pc):
14693 (mips_set_pc): Change prototype to take a regcache. Adjust.
14694 (mips_reinsert_addr): Adjust.
14695 (mips_collect_register): Change prototype to take a regcache.
14697 (mips_supply_register):
14698 (mips_collect_register_32bit, mips_supply_register_32bit)
14699 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14700 (mips_store_fpregset): Ditto.
14701 * linux-ppc-low.c (ppc_supply_ptrace_register)
14702 (ppc_supply_ptrace_register): Ditto.
14703 (parse_spufs_run): Adjust.
14704 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14705 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14706 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14707 take a regcache. Adjust.
14708 * linux-s390-low.c (s390_collect_ptrace_register)
14709 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14710 (s390_set_pc): Change prototype to take a regcache. Adjust.
14711 (s390_arch_setup): Adjust.
14712 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14713 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14714 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14715 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14716 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14718 (sparc_breakpoint_at): Adjust.
14719 * linux-xtensa-low.c (xtensa_fill_gregset):
14720 (xtensa_store_gregset):
14721 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14722 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14723 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14724 prototype to take a regcache. Adjust.
14725 * win32-arm-low.c (arm_fetch_inferior_register)
14726 (arm_store_inferior_register): Change prototype to take a
14728 * win32-i386-low.c (i386_fetch_inferior_register)
14729 (i386_store_inferior_register): Change prototype to take a
14731 * win32-low.c (child_fetch_inferior_registers)
14732 (child_store_inferior_registers): Change prototype to take a
14734 (win32_wait): Adjust.
14735 (win32_fetch_inferior_registers): Change prototype to take a
14737 (win32_store_inferior_registers): Adjust.
14738 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14739 store_inferior_register>: Change prototype to take a regcache.
14741 2010-01-20 Doug Evans <dje@google.com>
14743 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14745 (linux_wait_for_event1, linux_init_signals): Ditto.
14746 (W_STOPCODE): Provide definition if missing.
14748 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14750 * linux-low.c (linux_core_of_thread): New.
14751 (compare_ints, show_process, list_threads): New.
14752 (linux_qxfer_osdata): Report threads and cores.
14753 (linux_target_op): Register linux_core_of_thread.
14754 * remote-utils.c (prepare_resume_reply): Report the core.
14755 (buffer_xml_printf): Support %d specifier.
14756 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14758 (handle_query): Handle qXfer:threads. Announce availability
14760 * target.h (struct target_ops): New field core_of_thread.
14762 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14764 * Makefile.in (clean): Remove new generated files.
14765 (reg-s390.o, reg-s390.c): Remove rules.
14766 (reg-s390x.o, reg-s390x.c): Likewise.
14767 (s390-linux32.o, s390-linux32.c): Add rules.
14768 (s390-linux64.o, s390-linux64.c): Likewise.
14769 (s390x-linux64.o, s390x-linux64.c): Likewise.
14770 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14771 * linux-s390-low.c: Include <elf.h>.
14772 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14773 (init_registers_s390): Remove prototype.
14774 (init_registers_s390x): Likewise.
14775 (init_registers_s390_linux32): Add prototype.
14776 (init_registers_s390_linux64): Likewise.
14777 (init_registers_s390x_linux64): Likewise.
14778 (s390_num_regs_3264): New define.
14779 (s390_regmap_3264): New global variable.
14780 (s390_cannot_fetch_register): Remove obsolete check.
14781 (s390_cannot_store_register): Likewise.
14782 (s390_collect_ptrace_register): Handle upper/lower register halves.
14783 (s390_supply_ptrace_register): Likewise.
14784 (s390_fill_gregset): Update to register number changes.
14785 (s390_get_hwcap): New routine.
14786 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14787 Install appropriate regmap and register set.
14789 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14791 * server.c (gdbserver_version): Update copyright year to 2010.
14792 * gdbreplay.c (gdbreplay_version): Likewise.
14794 2009-12-28 Doug Evans <dje@google.com>
14796 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14797 elf/external.h. Include <elf.h> instead but only if necessary.
14799 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14801 * linux-low.c (linux_remove_process): Remove `detaching'
14802 parameter. Don't release/detach from thread_db here.
14803 (linux_kill): Release/detach from thread_db here, ...
14804 (linux_detach): ... and here, before actually detaching.
14805 (linux_wait_1): ... and here, when a process exits.
14806 * thread-db.c (any_thread_of): New.
14807 (thread_db_free): Switch the current inferior to a thread of the
14810 2009-12-21 Doug Evans <dje@google.com>
14812 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14814 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14815 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14816 warning ifndef __NR_tkill. Move setting of errno there too.
14817 Delete unnecessary resetting of errno after syscall.
14818 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14820 * configure.ac: Check for dladdr.
14821 * config.in: Regenerate.
14822 * configure: Regenerate.
14823 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14824 (try_thread_db_load): Update.
14826 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14828 2009-12-18 Doug Evans <dje@google.com>
14830 * event-loop.c: Include unistd.h if it exists.
14832 * linux-low.c (my_waitpid): Move definition away from being in
14833 between linux_tracefork_child/linux_test_for_tracefork.
14835 * gdb_proc_service.h (psaddr_t): Fix type.
14836 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14837 signature to match glibc.
14839 2009-12-16 Doug Evans <dje@google.com>
14841 * linux-low.c (linux_read_memory): Fix argument to read.
14843 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14845 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14846 events, don't leave current_inferior pointing at null.
14848 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14850 * win32-low.c (LOG): Delete.
14851 (OUTMSG): Output to stderr.
14852 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14853 on compile time LOG macro.
14854 (win32_wait): Fix debug output.
14856 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14858 * win32-low.c (win32_add_one_solib): If the dll name is
14859 "ntdll.dll", prepend the system directory to the dll path.
14861 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14863 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14865 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14866 Vladimir Prus <vladimir@codesourcery.com>
14868 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14869 * configure.ac: Check for __mcoldfire__ and set
14870 gdb_cv_m68k_is_coldfire.
14871 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14872 reg-cf.o and reg-m68k.o.
14873 * configure: Regenerated.
14875 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14877 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14878 Pass it to thread_db_free.
14879 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14880 proper `detaching' argument to linux_remove_process.
14881 * linux-low.h (thread_db_free): Add `detaching' parameter.
14882 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14884 (thread_db_free): Add `detaching' parameter. Only
14885 call td_ta_clear_event if detaching from process.
14887 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14889 * thread-db.c (thread_db_free): Fix typo.
14891 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14894 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14896 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14898 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14899 with an i686 compiler.
14900 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14902 * configure: Rebuilt.
14904 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14908 * server.c (handle_search_memory_1): Correct read_addr initialization
14909 in loop for searching subsequent chunks.
14911 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14913 * configure.ac: New --with-libthread-db option.
14914 * thread-db.c: Allow direct dependence on libthread_db.
14915 (thread_db_free): Adjust.
14916 * config.in: Regenerate.
14917 * configure: Likewise.
14919 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14922 * thread-db.c (attach_thread): New function.
14923 (maybe_attach_thread): Return success/failure.
14924 (find_new_threads_callback): Adjust.
14925 (thread_db_find_new_threads): Loop until no new threads.
14927 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14929 * proc-service.c (ps_lgetregs): Formatting.
14931 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14933 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14934 * configure.ac: Adjust.
14935 * linux-low.h (struct process_info_private): Move members to struct
14937 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14938 * linux-low.c (linux_remove_process): Adjust.
14939 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14940 * server.c (handle_query): Move code ...
14941 (handle_monitor_command): ... here. New function.
14942 * target.h (struct target_ops): New member.
14943 * thread-db.c (struct thread_db): New.
14944 (libthread_db_search_path): New variable.
14945 (thread_db_create_event, thread_db_enable_reporting)
14946 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14947 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14948 (try_thread_db_load_1, dladdr_to_soname): New functions.
14949 (try_thread_db_load, thread_db_load_search): New functions.
14950 (thread_db_init): Search for libthread_db.
14951 (thread_db_free): New function.
14952 (thread_db_handle_monitor_command): Likewise.
14953 * config.in: Regenerate.
14954 * configure: Regenerate.
14956 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14958 * spu-low.c (spu_kill): Wait for inferior to terminate.
14959 Call clear_inferiors.
14960 (spu_detach): Call clear_inferiors.
14962 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14964 * aclocal.m4: Regenerate.
14965 * config.in: Likewise.
14966 * configure: Likewise.
14968 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14970 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14971 (parse_spufs_run): New function.
14972 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14973 (ppc_breakpoint_at): Handle SPU breakpoints.
14975 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14977 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14978 (SPUFS_MAGIC): Define.
14979 (spu_enumerate_spu_ids): New function.
14980 (linux_qxfer_spu): New function.
14981 (linux_target_ops): Install linux_qxfer_spu.
14983 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14985 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14986 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14987 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14988 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14989 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14990 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14991 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14992 (init_registers_powerpc_cell32l): Add prototype.
14993 (init_registers_powerpc_cell64l): Likewise.
14994 (ppc_arch_setup): Detect Cell/B.E. architecture.
14996 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14998 * Makefile.in (datarootdir): New variable.
15000 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15002 * linux-low.c (linux_write_memory): Update debugging output.
15003 * Makefile.in (clean): Add new descriptions.
15004 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15005 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15006 * configure.srv: Add new files for arm*-*-linux*.
15007 * linux-arm-low.c: Add new declarations.
15008 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15009 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15010 (HWCAP_VFPv3D16): New.
15011 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15012 instead of __IWMMXT__.
15013 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15014 (arm_arch_setup): New.
15015 (target_regsets): Remove #ifdef. Add VFP regset.
15016 (the_low_target): Use arm_arch_setup.
15018 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15020 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15021 the main thread again.
15023 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15025 Adding Neutrino gdbserver.
15026 * configure: Regenerated.
15027 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15028 * configure.srv (i[34567]86-*-nto*): New target.
15029 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15030 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15031 (nto_comctrl) [__QNX__]: New function.
15032 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15034 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15036 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15039 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15040 Pedro Alves <pedro@codesourcery.com>
15042 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15043 don't support CONTEXT_EXTENDED_REGISTERS.
15044 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15045 (the_low_target): Install them.
15046 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15047 failing with ERROR_PIPE_NOT_CONNECTED.
15049 2009-06-30 Doug Evans <dje@google.com>
15050 Pierre Muller <muller@ics.u-strasbg.fr>
15052 Add h/w watchpoint support to x86-linux, win32-i386.
15053 * Makefile.in (SFILES): Add i386-low.c
15054 (i386_low_h): Define.
15055 (i386-low.o): Add dependencies.
15056 (linux-x86-low.o): Add i386-low.h dependency.
15057 (win32-i386-low.o): Ditto.
15058 * i386-low.c: New file.
15059 * i386-low.h: New file.
15060 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15061 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15062 * linux-low.c (linux_add_process): Initialize arch_private.
15063 (linux_remove_process): Free arch_private.
15064 (add_lwp): Initialize arch_private.
15065 (delete_lwp): Free arch_private.
15066 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15068 * linux-low.h (process_info_private): New member arch_private.
15069 (lwp_info): New member arch_private.
15070 (linux_target_ops): New members new_process, new_thread,
15072 (ptid_of): New macro.
15073 * linux-x86-low.c: Include stddef.h, i386-low.h.
15074 (arch_process_info): New struct.
15075 (arch_lwp_info): New struct.
15076 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15077 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15078 (i386_dr_low_get_status): New function.
15079 (x86_insert_point, x86_remove_point): New functions.
15080 (x86_stopped_by_watchpoint): New function.
15081 (x86_stopped_data_address): New function.
15082 (x86_linux_new_process, x86_linux_new_thread): New functions.
15083 (x86_linux_prepare_to_resume): New function.
15084 (the_low_target): Add entries for insert_point, remove_point,
15085 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15087 * server.c (debug_hw_points): New global.
15088 (monitor_show_help): Document set debug-hw-points.
15089 (handle_query): Process "set debug-hw-points".
15090 * server.h (debug_hw_points): Declare.
15091 (paddress): Declare.
15092 * utils.c (NUMCELLS, CELLSIZE): New macros.
15093 (get_sell, xsnprintf, paddress): New functions.
15094 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15095 remove_point, stopped_by_watchpoint, stopped_data_address.
15096 * win32-i386-low.c: Include i386-low.h.
15097 (debug_reg_state): Replaces dr.
15098 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15099 (i386_dr_low_get_status): New function.
15100 (i386_insert_point, i386_remove_point): New functions.
15101 (i386_stopped_by_watchpoint): New function.
15102 (i386_stopped_data_address): New function.
15103 (i386_initial_stuff): Update.
15104 (get_thread_context,set_thread_context,i386_thread_added): Update.
15105 (the_low_target): Add entries for insert_point,
15106 remove_point, stopped_by_watchpoint, stopped_data_address.
15107 * win32-low.c (win32_insert_watchpoint): New function.
15108 (win32_remove_watchpoint): New function.
15109 (win32_stopped_by_watchpoint): New function.
15110 (win32_stopped_data_address): New function.
15111 (win32_target_ops): Add entries for insert_watchpoint,
15112 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15113 * win32-low.h (win32_target_ops): New members insert_point,
15114 remove_point, stopped_by_watchpoint, stopped_data_address.
15116 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15118 * server.c (process_serial_event): Re-return unsupported, not
15119 error, if the type isn't recognized. Re-allow supporting only
15120 insert or remove packets. Also call require_running for
15121 breakpoints. Add missing break statement to default case. Tidy.
15122 * target.h (struct target_ops): Rename insert_watchpoint to
15123 insert_point, and remove_watchpoint to remove_point.
15125 * linux-low.h (struct linux_target_ops): Likewise.
15126 * linux-low.c (linux_insert_watchpoint): Rename to ...
15127 (linux_insert_point): ... this. Adjust.
15128 (linux_remove_watchpoint): Rename to ...
15129 (linux_remove_point): ... this. Adjust.
15130 (linux_target_ops): Adjust.
15131 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15132 (cris_insert_point): ... this.
15133 (cris_remove_watchpoint): Rename to ...
15134 (cris_remove_point): ... this.
15135 (the_low_target): Adjust.
15137 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15139 * server.c (handle_v_kill): Pass signal_pid to
15140 kill_inferior if multi_process is zero.
15142 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15144 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15145 * target.h (target_ops): Comment for *_watchpoint to make it clear
15146 the functions can get types '0' and '1'.
15148 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15150 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15151 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15152 * regcache.c (get_regcache): Likewise.
15153 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15154 * win32-low.c (child_fetch_inferior_registers): Remove check for
15157 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15158 Pedro Alves <pedro@codesourcery.com>
15160 * target.h (struct target_ops) <supports_multi_process>: New
15162 (target_supports_multi_process): New.
15163 * server.c (handle_query): Even if GDB reports support, only
15164 enable multi-process if the target also supports it. Report
15165 multi-process support only if the target backend supports it.
15166 * linux-low.c (linux_supports_multi_process): New function.
15167 (linux_target_ops): Install it as target_supports_multi_process
15170 2009-05-24 Doug Evans <dje@google.com>
15172 Global renaming of find_thread_pid to find_thread_ptid.
15173 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15174 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15175 All callers updated.
15177 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15178 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15181 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15182 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15183 (linux_resume_one_lwp): Ditto.
15185 2009-05-23 Doug Evans <dje@google.com>
15187 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15188 from struct inferior_list_entry * to struct lwp_info *.
15189 All callers updated.
15191 2009-05-13 Doug Evans <dje@google.com>
15193 * linux-x86-low.c: Don't include assert.h.
15194 (x86_siginfo_fixup): Use fatal, not assert.
15195 (x86_arch_setup): Fix comment.
15197 2009-05-12 Doug Evans <dje@google.com>
15199 Biarch support for i386/amd64 gdbserver.
15200 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15201 Add linux-x86-low.c.
15202 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15203 (linux-x86-low.o): Add.
15204 * linux-x86-64-low.c: Delete.
15205 * linux-i386-low.c: Delete.
15206 * linux-x86-low.c: New file.
15207 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15209 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15211 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15212 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15213 (linux_child_pid_to_exec_file): New function.
15214 (elf_64_header_p, elf_64_file_p): New functions.
15215 (siginfo_fixup): New function.
15216 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15217 give target a chance to convert layout.
15218 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15219 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15221 2009-05-07 Doug Evans <dje@google.com>
15223 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15224 (regsets_store_inferior_registers): Ditto.
15226 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15230 * linux-low.c (must_set_ptrace_flags): Delete.
15231 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15233 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15234 `lwp->must_set_ptrace_flags' instead.
15235 (linux_wait_for_event_1): Set ptrace options here.
15236 (linux_wait_1): ... not here.
15238 2009-04-30 Doug Evans <dje@google.com>
15240 * inferiors.c (started_inferior_callback): New function.
15241 (attached_inferior_callback): New function.
15242 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15243 * server.c (print_started_pid, print_attached_pid): New functions.
15244 (detach_or_kill_for_exit): New function.
15245 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15246 * server.h (have_started_inferiors_p): Declare.
15247 (have_attached_inferiors_p): Declare.
15249 * inferiors.c (remove_process): Fix memory leak, free process.
15250 * linux-low.c (linux_remove_process): New function.
15251 (linux_kill): Call it instead of remove_process.
15252 (linux_detach, linux_wait_1): Ditto.
15254 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15256 * configure.srv: Add x86 Windows CE target.
15258 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15260 * inferiors.c (get_thread_process): Make global.
15261 * server.h (get_thread_process): Add prototype.
15262 * thread-db.c (find_one_thread): Use get_thread_process
15263 instead of current_process.
15264 (thread_db_get_tls_address): Do not crash if called when
15265 thread layer is not yet initialized.
15267 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15269 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15270 * spu-low.c (current_tid): Rename to ...
15271 (current_ptid): ... this.
15272 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15273 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15274 ptid_get_lwp (current_ptid) instead of current_tid.
15275 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15276 instead of current_tid. Use find_process_pid to verify pid
15277 argument is valid. Pass proper argument to remove_process.
15278 (spu_thread_alive): Compare current_ptid instead of current_tid.
15279 (spu_resume): Likewise.
15281 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15283 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15286 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15288 Implement the multiprocess extensions, and add linux multiprocess
15291 * server.h (ULONGEST): Declare.
15292 (struct ptid, ptid_t): New.
15293 (minus_one_ptid, null_ptid): Declare.
15294 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15295 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15296 (struct inferior_list_entry): Change `id' type from unsigned from
15298 (struct sym_cache, struct breakpoint, struct
15299 process_info_private): Forward declare.
15300 (struct process_info): Declare.
15301 (current_process): Declare.
15302 (all_processes): Declare.
15303 (initialize_inferiors): Declare.
15304 (add_thread): Adjust to use ptid_t.
15305 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15306 (add_process, remove_process, find_thread_pid): Declare.
15307 (find_inferior_id): Adjust to use ptid_t.
15308 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15309 (multi_process): Declare.
15310 (push_event): Adjust to use ptid_t.
15311 (read_ptid, write_ptid): Declare.
15312 (prepare_resume_reply): Adjust to use ptid_t.
15313 (clear_symbol_cache): Declare.
15314 * inferiors.c (all_processes): New.
15315 (null_ptid, minus_one_ptid): New.
15316 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15317 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15318 (add_thread): Change unsigned long to ptid. Remove gdb_id
15320 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15321 (gdb_id_to_thread): Rename to ...
15322 (find_thread_pid): ... this. Change unsigned long to ptid.
15323 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15324 (loaded_dll, pull_pid_from_list): Adjust.
15325 (add_process, remove_process, find_process_pid)
15326 (get_thread_process, current_process, initialize_inferiors): New.
15327 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15328 (struct target_waitstatus) <related_pid>: Ditto.
15329 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15330 return type to int.
15331 (struct target_ops) <join>: Add `pid' argument.
15332 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15333 (struct target_ops) <wait>: Add `ptid' field. Change return type
15335 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15336 (mywait): Add `ptid' argument. Change return type to ptid_t.
15337 (target_pid_to_str): Declare.
15338 * target.c (set_desired_inferior): Adjust to use ptids.
15339 (mywait): Add new `ptid' argument. Adjust.
15340 (target_pid_to_str): New.
15341 * mem-break.h (free_all_breakpoints): Declare.
15342 * mem-break.c (breakpoints): Delelete.
15343 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15344 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15345 to use per-process breakpoint list.
15346 (free_all_breakpoints): New.
15347 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15348 (symbol_cache, all_symbols_looked_up): Delete.
15350 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15352 (prepare_resume_reply): Change ptid argument's type from unsigned
15353 long to ptid_t. Adjust. Implement W;process and X;process.
15354 (free_sym_cache, clear_symbol_cache): New.
15355 (look_up_one_symbol): Adjust to per-process symbol cache. *
15356 * server.c (cont_thread, general_thread, step_thread): Change type
15358 (attached): Delete.
15359 (multi_process): New.
15360 (last_ptid): Change type to ptid_t.
15361 (struct vstop_notif) <ptid>: Change type to ptid_t.
15362 (queue_stop_reply, push_event): Change `ptid' argument's type to
15364 (discard_queued_stop_replies): Add `pid' argument.
15365 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15366 changes. Don't reference the `attached' global.
15367 (attach_inferior): Adjust to mywait interface changes.
15368 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15369 features. Handle and report "multiprocess+". Handle
15371 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15373 (handle_v_kill): New.
15374 (handle_v_stopped): Adjust to use target_pid_to_str.
15375 (handle_v_requests): Allow multiple attaches and runs when
15376 multiprocess extensions are in effect. Handle "vKill".
15377 (myresume): Adjust to use ptids.
15378 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15379 (handle_status): Adjust to discard_queued_stop_replies interface
15381 (first_thread_of, kill_inferior_callback)
15382 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15383 (main): Call initialize_inferiors. Adjust to use ptids, killing
15384 and detaching from all inferiors. Handle multiprocess packet
15386 * linux-low.h: Include gdb_proc_service.h.
15387 (struct process_info_private): New.
15388 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15389 <lwpid_of>: Use ptid_get_lwp.
15390 (get_lwp_thread): Adjust.
15391 (struct lwp_info): Add `dead' member.
15392 (find_lwp_pid): Declare.
15393 * linux-low.c (thread_db_active): Delete.
15394 (new_inferior): Adjust comment.
15395 (inferior_pid): Delete.
15396 (linux_add_process): New.
15397 (handle_extended_wait): Adjust.
15398 (add_lwp): Change unsigned long to ptid.
15399 (linux_create_inferior): Add process to processes table. Adjust
15400 to use ptids. Don't set new_inferior here.
15401 (linux_attach_lwp): Rename to ...
15402 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15403 it. Adjust to use ptids.
15404 (linux_attach_lwp): New.
15405 (linux_attach): Add process to processes table. Don't set
15407 (struct counter): New.
15408 (second_thread_of_pid_p, last_thread_of_process_p): New.
15409 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15410 multiple processes.
15411 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15412 processes. Remove process from process table.
15413 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15414 to multiple processes.
15415 (any_thread_of): New.
15416 (linux_detach): Add `pid' argument, and handle it. Remove process
15417 from processes table.
15418 (linux_join): Add `pid' argument. Handle it.
15419 (linux_thread_alive): Change unsighed long argument to ptid_t.
15420 Consider dead lwps as not being alive.
15421 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15422 threads we're not interested in.
15423 (same_lwp, find_lwp_pid): New.
15424 (linux_wait_for_lwp): Change `pid' argument's type from int to
15426 (linux_wait_for_event): Rename to ...
15427 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15428 from int to ptid_t. Adjust.
15429 (linux_wait_for_event): New.
15430 (linux_wait_1): Add `ptid' argument. Change return type to
15431 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15432 that exit from the process table.
15433 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15435 (mark_lwp_dead): New.
15436 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15437 stopping all threads, mark its main lwp as dead.
15438 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15440 (fetch_register, usr_store_inferior_registers)
15441 (regsets_fetch_inferior_registers)
15442 (regsets_store_inferior_registers, linux_read_memory)
15443 (linux_write_memory): Inline `inferior_pid'.
15444 (linux_look_up_symbols): Adjust to use per-process
15445 `thread_db_active'.
15446 (linux_request_interrupt): Adjust to use ptids.
15447 (linux_read_auxv): Inline `inferior_pid'.
15448 (initialize_low): Don't reference thread_db_active.
15449 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15450 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15451 (ps_getpid): Return the pid of the current inferior.
15452 * thread-db.c (proc_handle, thread_agent): Delete.
15453 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15455 (find_one_thread): Change argument type to ptid_t. Adjust to
15457 (maybe_attach_thread): Adjust to per-process data and ptids.
15458 (thread_db_find_new_threads): Ditto.
15459 (thread_db_init): Ditto.
15460 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15461 processes table. Adjust to use ptids.
15462 (spu_kill, spu_detach): Adjust interface. Remove process from
15464 (spu_join, spu_thread_alive): Adjust interface.
15465 (spu_wait): Adjust interface. Remove process from processes
15466 table. Adjust to use ptids.
15467 * win32-low.c (current_inferior_tid): Delete.
15468 (current_inferior_ptid): New.
15469 (debug_event_ptid): New.
15470 (thread_rec): Take a ptid. Adjust.
15471 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15472 (child_delete_thread): Ditto.
15473 (do_initial_child_stuff): Add `attached' argument. Add process to
15475 (child_fetch_inferior_registers, child_store_inferior_registers):
15477 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15478 (win32_attach): Pass 1 to do_initial_child_stuff.
15479 (win32_kill): Adjust interface. Remove process from processes
15481 (win32_detach): Ditto.
15482 (win32_join): Adjust interface.
15483 (win32_thread_alive): Take a ptid.
15484 (win32_resume): Adjust to use ptids.
15485 (get_child_debug_event): Ditto.
15486 (win32_wait): Adjust interface. Remove exiting process from
15489 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15491 Non-stop mode support.
15493 * server.h (non_stop): Declare.
15494 (gdb_client_data, handler_func): Declare.
15495 (delete_file_handler, add_file_handler, start_event_loop):
15497 (handle_serial_event, handle_target_event, push_event)
15498 (putpkt_notif): Declare.
15499 * target.h (enum resume_kind): New.
15500 (struct thread_resume): Replace `step' field by `kind' field.
15501 (TARGET_WNOHANG): Define.
15502 (struct target_ops) <wait>: Add `options' argument.
15503 <supports_non_stop, async, start_non_stop>: New fields.
15504 (target_supports_non_stop, target_async): New.
15505 (start_non_stop): Declare.
15506 (mywait): Add `options' argument.
15507 * target.c (mywait): Add `options' argument. Print child exit
15508 notifications here.
15509 (start_non_stop): New.
15510 * server.c (non_stop, own_buf, mem_buf): New globals.
15511 (struct vstop_notif): New.
15512 (notif_queue): New global.
15513 (queue_stop_reply, push_event, discard_queued_stop_replies)
15514 (send_next_stop_reply): New.
15515 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15517 (attach_inferior): In non-stop mode, don't wait for the target
15519 (handle_general_set): Handle QNonStop.
15520 (handle_query): When handling qC, return the current general
15521 thread, instead of the first thread of the list.
15522 (handle_query): If the backend supports non-stop mode, include
15523 QNonStop+ in the qSupported query response.
15524 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15526 (handle_v_attach, handle_v_run): Handle non-stop mode.
15527 (handle_v_stopped): New.
15528 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15529 (myresume): Adjust to use resume_kind. Handle non-stop.
15530 (queue_stop_reply_callback): New.
15531 (handle_status): Handle non-stop mode.
15532 (main): Clear non_stop flag on reconnection. Use the event-loop.
15533 Refactor serial protocol handling from here ...
15534 (process_serial_event): ... to this new function. When GDB
15535 selects any thread, select one here. In non-stop mode, wait until
15536 GDB acks all pending events before exiting.
15537 (handle_serial_event, handle_target_event): New.
15538 * remote-utils.c (remote_open): Install remote_desc in the event
15540 (remote_close): Remove remote_desc from the event loop.
15541 (putpkt_binary): Rename to...
15542 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15543 (putpkt_binary): New as wrapper around putpkt_binary_1.
15544 (putpkt_notif): New.
15545 (prepare_resume_reply): In non-stop mode, don't change the
15547 * event-loop.c: New.
15548 * Makefile.in (OBJ): Add event-loop.o.
15549 (event-loop.o): New rule.
15551 * linux-low.h (pid_of): Moved here.
15553 (get_lwp_thread): Use lwpid_of.
15554 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15555 * linux-low.c (pid_of): Delete.
15556 (inferior_pid): Use lwpid_of.
15557 (linux_event_pipe): New.
15558 (target_is_async_p): New.
15560 (handle_extended_wait): Use lwpid_of.
15561 (add_lwp): Don't set lwpid field.
15562 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15563 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15564 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15565 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15566 first. Adjust to linux_wait_for_event interface changes. Use
15568 (linux_detach): Don't delete the main lwp here.
15569 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15570 (status_pending_p): Don't consider explicitly suspended lwps.
15571 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15572 pointer. Add OPTIONS argument. Change return type to int. Use
15573 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15574 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15575 pointer. Add status pointer argument. Return a pid instead of a
15576 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15577 changes. In non-stop mode, don't switch to a random thread.
15578 (linux_wait): Rename to...
15579 (linux_wait_1): ... this. Add target_options argument, and handle
15580 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15581 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15582 clean exit and signal exit code. Don't stop all threads in
15583 non-stop mode. In all-stop mode, only stop all threads when
15584 reporting a stop to GDB. Handle explicit thread stop requests.
15585 (async_file_flush, async_file_mark): New.
15587 (send_sigstop): Use lwpid_of.
15588 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15589 interface changes. In non-stop mode, don't switch to a random
15591 (linux_resume_one_lwp): Use lwpid_of.
15592 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15593 (linux_resume_one_thread): ... this. Handle resume_stop. In
15594 non-stop mode, don't look for pending flag in all threads.
15595 (resume_status_pending_p): Don't consider explicitly suspended
15597 (my_waitpid): Reimplement. Emulate __WALL.
15598 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15600 (sigchld_handler, linux_supports_non_stop, linux_async)
15601 (linux_start_non_stop): New.
15602 (linux_target_ops): Register linux_supports_non_stop, linux_async
15603 and linux_start_non_stop.
15604 (initialize_low): Install SIGCHLD handler.
15605 * thread-db.c (thread_db_create_event, find_one_thread)
15606 (thread_db_get_tls_address): Use lwpid_of.
15607 * win32-low.c (win32_detach): Adjust to use resume_kind.
15608 (win32_wait): Add `options' argument.
15609 * spu-low.c (spu_resume): Adjust to use resume_kind.
15610 (spu_wait): Add `options' argument.
15612 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15614 Decouple target code from remote protocol.
15616 * target.h (enum target_waitkind): New.
15617 (struct target_waitstatus): New.
15618 (struct target_ops) <wait>: Return an unsigned long. Take a
15619 target_waitstatus pointer instead of a char pointer.
15620 (mywait): Likewise.
15621 * target.c (mywait): Change prototype to return an unsigned long.
15622 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15623 * server.h (thread_from_wait, old_thread_from_wait): Delete
15625 (prepare_resume_reply): Change prototype to take a
15627 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15628 (last_status, last_ptid): New.
15629 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15630 pid instead of a signal.
15631 (attach_inferior): Remove "status" and "signal" parameters.
15633 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15635 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15636 (handle_v_requests, myresume): Remove "status" and "signal"
15637 parameters. Adjust.
15638 (handle_status): New.
15639 (main): Delete local `status'. Adjust.
15640 * remote-utils.c: Include target.h.
15641 (prepare_resume_reply): Change prototype to take a
15642 target_waitstatus. Adjust.
15644 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15646 * spu-low.c (spu_wait): Adjust.
15647 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15649 (win32_wait): Adjust.
15651 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15653 * target.h (struct thread_resume): Delete leave_stopped member.
15654 (struct target_ops): Add a `n' argument to the `resume' callback.
15655 * server.c (start_inferior): Adjust.
15656 (handle_v_cont, myresume): Adjust.
15657 * linux-low.c (check_removed_breakpoint): Adjust to resume
15658 interface change, and to removed leave_stopped field.
15659 (resume_ptr): Delete.
15660 (struct thread_resume_array): New.
15661 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15662 resume interface change.
15663 (linux_continue_one_thread, linux_queue_one_thread)
15664 (resume_status_pending_p): Check if the resume field is NULL
15665 instead of checking the leave_stopped member.
15666 (linux_resume): Adjust to the target resume interface change.
15667 * spu-low.c (spu_resume): Adjust to the target resume interface
15669 * win32-low.c (win32_detach, win32_resume): Ditto.
15671 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15673 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15675 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15677 (linux_continue_one_thread): Only preserve the stepping flag if
15678 there's a pending breakpoint.
15680 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15682 * server.c (main): After the inferior having exited, call
15683 remote_close before exiting gdbserver.
15685 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15687 Fix size of FPSCR in Power 7 processors.
15688 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15689 (PPC_FEATURE_HAS_DFP): New #define.
15690 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15693 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15695 * server.c (handle_query) Whitespace and formatting.
15697 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15699 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15700 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15701 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15702 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15703 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15704 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15705 Makefile.in, configure.ac: Fix whitespace throughout.
15706 * configure: Regenerate.
15708 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15710 * inferiors.c (find_inferior): Make it safe for the callback
15711 function to delete the currently iterated inferior.
15713 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15715 * Makefile.in (linuw_low_h): Move higher.
15716 (thread-db.o): Depend on $(linux_low_h).
15718 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15720 Rename "process" to "lwp" throughout.
15722 * linux-low.c (all_processes): Rename to...
15723 (all_lwps): ... this.
15724 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15725 (add_process): Rename to ...
15726 (add_lwp): ... this. Adjust.
15727 (linux_create_inferior): Adjust.
15728 (linux_attach_lwp): Adjust.
15729 (linux_attach): Adjust.
15730 (linux_kill_one_process): Rename to ...
15731 (linux_kill_one_lwp): ... this. Adjust.
15732 (linux_kill): Adjust.
15733 (linux_detach_one_process): Rename to ...
15734 (linux_detach_one_lwp): ... this. Adjust.
15735 (linux_detach): Adjust.
15736 (check_removed_breakpoint): Adjust.
15737 (status_pending_p): Adjust.
15738 (linux_wait_for_process): Rename to ...
15739 (linux_wait_for_lwp): ... this. Adjust.
15740 (linux_wait_for_event): Adjust.
15741 (send_sigstop): Adjust.
15742 (wait_for_sigstop): Adjust.
15743 (stop_all_processes): Rename to ...
15744 (stop_all_lwps): ... this.
15745 (linux_resume_one_process): Rename to ...
15746 (linux_resume_one_lwp): ... this. Adjust.
15747 (linux_set_resume_request, linux_continue_one_thread)
15748 (linux_queue_one_thread, resume_status_pending_p)
15749 (usr_store_inferior_registers, regsets_store_inferior_registers)
15750 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15752 * linux-low.h (get_process): Rename to ...
15753 (get_lwp): ... this. Adjust.
15754 (get_thread_process): Rename to ...
15755 (get_thread_lwp): ... this. Adjust.
15756 (get_process_thread): Rename to ...
15757 (get_lwp_thread): ... this. Adjust.
15758 (struct process_info): Rename to ...
15759 (struct lwp_info): ... this.
15760 (all_processes): Rename to ...
15761 (all_lwps): ... this.
15762 * proc-service.c (ps_lgetregs): Adjust.
15763 * thread-db.c (thread_db_create_event, find_one_thread)
15764 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15766 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15768 * server.c (handle_query): Handle "qAttached".
15770 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15772 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15773 GPLv3, update license URL.
15775 2009-03-01 Doug Evans <dje@google.com>
15777 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15778 (server_h): Add gdb_signals.h.
15779 (signals.o): Update.
15780 * server.h (target_signal_from_host,target_signal_to_host_p)
15781 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15783 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15785 * remote-utils.c (getpkt): Also generate remote-debug
15786 information if noack_mode is set.
15788 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15790 * server.c (handle_query): Report qXfer:siginfo:read and
15791 qXfer:siginfo:write as supported and handle them.
15792 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15793 * linux-low.c (linux_xfer_siginfo): New.
15794 (linux_target_ops): Set it.
15796 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15798 * server.c (gdbserver_usage): Mention --remote-debug.
15799 (main): Accept '--remote-debug' switch.
15801 2009-01-18 Doug Evans <dje@google.com>
15803 * regcache.c (new_register_cache): No need to check result of xcalloc.
15804 * server.c (handle_search_memory): Back out calls to xmalloc,
15805 result is checked and error is returned to user upon failure.
15806 (handle_query): Ditto. Add more checks for result of malloc.
15807 (handle_v_cont): Check result of malloc, report error back to
15809 (handle_v_run): Ditto. Call freeargv.
15810 * server.h (freeargv): Declare.
15811 * utils.c (freeargv): New fn.
15813 2009-01-15 Doug Evans <dje@google.com>
15815 * gdbreplay.c (perror_with_name): Make arg const char *.
15816 * server.h (target_signal_to_name): Make return type const char *.
15817 * thread-db.c (thread_db_err_str): Make return type const char *.
15818 * utils.c (perror_with_name): Make arg const char *.
15820 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15822 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15823 when handling a EXIT_PROCESS_DEBUG_EVENT.
15825 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15827 * gdbreplay.c (gdbreplay_version): Update copyright year.
15828 * server.c (gdbserver_version): Likewise.
15830 2009-01-05 Doug Evans <dje@google.com>
15832 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15833 (handle_extended_wait): Improve comment.
15835 2008-12-13 Doug Evans <dje@google.com>
15837 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15838 * server.h (ATTR_MALLOC): New macro.
15839 (xmalloc,xcalloc,xstrdup): Declare.
15840 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15841 * inferiors.c: Ditto.
15842 * linux-low.c: Ditto.
15843 * mem-break.c: Ditto.
15844 * regcache.c: Ditto.
15845 * remote-utils.c: Ditto.
15848 * win32-low.c: Ditto.
15850 2008-12-12 Doug Evans <dje@google.com>
15852 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15853 in debugging printf.
15855 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15857 2008-12-09 Doug Evans <dje@google.com>
15859 * linux-low.h (struct process_info): Delete member tid, unused.
15860 * thread-db.c (find_one_thread): Update.
15861 (maybe_attach_thread): Update.
15863 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15865 * target.h (struct target_ops): Add qxfer_osdata member.
15866 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15868 (linux_qxfer_osdata): New functions.
15869 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15871 * server.c (handle_query): Handle "qXfer:osdata:read:".
15872 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15873 (buffer_xml_printf): New functions.
15874 * server.h (struct buffer): New.
15875 (buffer_grow_str, buffer_grow_str0): New macros.
15876 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15877 (buffer_xml_printf): Declare.
15879 2008-11-24 Doug Evans <dje@google.com>
15881 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15883 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15885 * server.c (handle_v_run): Always use the supplied argument list.
15887 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15889 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15890 (xtensa_regmap_table): Add entry for scompare1.
15892 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15894 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15895 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15896 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15897 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15898 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15899 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15900 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15901 XML target descriptions.
15902 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15903 when inferior is running on an ISA 2.05 or later processor. Add
15904 special case to return offset for full 64-bit slot of FPSCR when
15907 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15909 * Makefile.in (SFILES, clean): Added sparc64 files.
15910 (reg-sparc64.o, reg-sparc64.c): New.
15911 * configure.srv (sparc*-*-linux*): New configuration.
15912 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15913 syscall arguments for SPARC.
15914 (regsets_store_inferior_registers): Likewise.
15915 * linux-sparc-low.c: New file.
15917 2008-10-21 Doug Evans <dje@google.com>
15919 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15920 (READLINE_DIR,READLINE_DEP): Delete.
15921 (INTERNAL_CFLAGS): Update.
15922 (LINTFLAGS): Update.
15924 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15926 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15927 whole argv from the last run, not just argv[0].
15929 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15931 * regcache.c (new_register_cache): Return NULL if the register
15932 cache size isn't known yet.
15933 (free_register_cache): Avoid dereferencing a NULL regcache.
15935 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15937 * configure.srv: Merge MIPS and MIPS64.
15939 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15941 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15943 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15945 * Makefile.in: Add required vsx dependencies.
15947 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15948 Declare init_registers_powerpc_vsx32l.
15949 Declare init_registers_powerpc_vsx64l.
15950 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15951 (ppc_arch_setup): Check for VSX in hwcap.
15952 (ppc_fill_vsxregset): New function.
15953 (ppc_store_vsxregset): New function.
15954 Add new VSX entry in regset_info target_regsets.
15956 * configure.srv: Add new VSX dependencies.
15958 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15960 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15961 (remote_open): Set or clear transport_is_reliable.
15962 (putpkt_binary): Don't expect acks in noack mode.
15963 (getpkt): Don't send ack/nac in noack mode.
15964 * server.c (handle_general_set): Handle QStartNoAckMode.
15965 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15967 (main): Reset noack_mode on every connection.
15968 * server.h (noack_mode): Declare.
15970 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15972 * Makefile.in (GDBREPLAY_OBS): New variable.
15973 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15975 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15976 Daniel Jacobowitz <dan@codesourcery.com>
15978 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15979 (usr_store_inferior_registers): Likewise.
15980 (regsets_store_inferior_registers): Likewise.
15982 2008-07-31 Rolf Jansen <rj@surtec.com>
15983 Pedro Alves <pedro@codesourcery.com>
15985 * configure.ac: Check for memmem declaration.
15986 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15987 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15988 (disable_packet_qfThreadInfo): Unconditionally compile.
15989 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15990 * configure, config.in: Regenerate.
15992 2008-07-28 Doug Kwan <dougkwan@google.com>
15994 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15995 (linux_write_memory): Remove declaration of errno.
15997 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15999 * linux-low.c (handle_extended_wait): Do not use "status"
16000 variable uninitialized.
16002 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16004 * server.c (handle_v_attach): Inhibit reporting dll changes.
16006 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16008 * remote-utils.c (prepare_resume_reply): If requested, don't
16009 output "thread:TID" in the T stop reply.
16011 * server.c (disable_packet_vCont, disable_packet_Tthread)
16012 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16013 (handle_query): If requested, disable support for qC, qfThreadInfo
16015 (handle_v_requests): If requested, disable support for vCont.
16016 (gdbserver_show_disableable): New.
16017 (main): Handle --disable-packet and --disable-packet=LIST.
16019 * server.h (disable_packet_vCont, disable_packet_Tthread)
16020 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16022 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16024 * server.c (gdbserver_usage): Mention --version.
16026 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16028 * Makefile.in (gdbreplay.o): New rule.
16030 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16032 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16033 message, not gdbserver.
16035 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16036 Nathan Sidwell <nathan@codesourcery.com>
16037 Joseph Myers <joseph@codesourcery.com>
16039 * acinclude.m4: Include ../../config/acx.m4.
16040 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16041 * configure, config.in: Regenerate.
16042 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16043 * server.c (gdbserver_version): Print PKGVERSION.
16044 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16045 (main): Adjust gdbserver_usage calls.
16046 * gdbreplay.c (version, host_name): Add declarations.
16047 (gdbreplay_version, gdbreplay_usage): New.
16048 (main): Accept --version and --help options.
16050 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16052 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16053 (arm_breakpoint_at): Handle Thumb.
16054 (the_low_target): Add comment.
16056 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16058 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16060 2008-05-09 Doug Evans <dje@google.com>
16062 * server.h (decode_search_memory_packet): Declare.
16063 * remote-utils.c (decode_search_memory_packet): New fn.
16064 * server.c (handle_search_memory_1): New fn.
16065 (handle_search_memory): New fn.
16066 (handle_query): Process qSearch:memory packets.
16068 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16070 * regcache.c (registers_length): Remove.
16071 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16072 full register packet.
16073 * regcache.h (registers_length): Remove prototype.
16074 * server.h (PBUFSIZ): Define to 16384.
16076 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16078 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16079 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16080 powerpc-64l.o, and powerpc-altivec64l.o.
16081 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16082 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16083 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16084 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16085 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16088 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16089 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16090 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16091 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16092 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16093 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16094 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16095 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16096 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16097 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16100 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16101 (init_registers_powerpc_32l): ... this new prototype.
16102 (init_registers_powerpc_32): Remove, replace by ...
16103 (init_registers_powerpc_altivec32l): ... this new prototype.
16104 (init_registers_powerpc_e500): Remove, replace by ...
16105 (init_registers_powerpc_e500l): ... this new prototype.
16106 (init_registers_ppc64): Remove, replace by ...
16107 (init_registers_powerpc_64l): ... this new prototype.
16108 (init_registers_powerpc_64): Remove, replace by ...
16109 (init_registers_powerpc_altivec64l): ... this new prototype.
16110 (ppc_num_regs): Set to 73.
16111 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16112 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16113 (ppc_cannot_store_register): Handle orig_r3 and trap.
16114 (ppc_arch_setup): Update init_registers_... calls.
16115 (ppc_fill_gregset): Handle orig_r3 and trap.
16117 * inferiors.c (clear_inferiors): Reset current_inferior.
16119 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16121 * acinclude.m4: Add override.m4.
16122 * configure: Regenerate.
16124 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16126 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16127 initial call to init_register_ppc64.
16129 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16131 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16132 single powerpc*-*-linux* case.
16133 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16135 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16137 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16138 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16140 * linux-ppc-low.c: Include <elf.h>.
16141 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16142 (ppc_hwcap): New global variable.
16143 (ppc_regmap): Remove __SPE__ #ifdef sections.
16144 (ppc_regmap_e500): New global variable.
16145 (ppc_cannot_store_register): Update __SPE__ special case.
16146 (ppc_get_hwcap): New function.
16147 (ppc_arch_setup): Use it to determine whether inferior supports
16148 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16149 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16150 Do not access registers if target does not support AltiVec.
16151 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16152 Do not access registers if target does not support SPE.
16153 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16155 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16157 * linux-low.c (disabled_regsets, num_regsets): New.
16158 (use_regsets_p): Delete.
16159 (linux_wait_for_process): Clear disabled_regsets.
16160 (regsets_fetch_inferior_registers): Check and set it.
16161 (regsets_store_inferior_registers): Likewise.
16162 (linux_fetch_registers, linux_store_registers): Do not use
16164 (initialize_low): Allocate disabled_regsets.
16166 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16168 * Makefile.in (LIBOBJS): New.
16169 (OBS): Use LIBOBJS.
16170 (memmem.o): New rule.
16171 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16172 * configure: Regenerated.
16174 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16176 * server.c (handle_query): Never return "unsupported" for
16177 qXfer:features:read queries.
16179 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16181 * server.c (get_features_xml): Fix inverted condition.
16182 (handle_query): Always support qXfer:feature:read.
16184 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16186 * server.c (wrapper_argv): New.
16187 (start_inferior): Handle wrapper_argv. If set, expect an extra
16189 (gdbserver_usage): Document --wrapper.
16190 (main): Parse --wrapper.
16192 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16194 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16195 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16196 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16197 (ppc_set_pc): Likewise.
16198 (ppc_arch_setup): New function.
16199 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16200 of collect_register.
16201 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16203 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16205 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16206 instead of linux-ppc64-low.o.
16207 * linux-ppc64-low.c: Remove file.
16208 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16209 (linux-ppc64-low.o): Remove rule.
16211 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16212 (init_registers_powerpc_64): Likewise.
16213 (ppc_regmap): Conditionally define depending on __powerpc64__.
16214 (ppc_cannot_store_register): Do not special-case "fpscr" when
16215 compiled on __powerpc64__.
16216 (ppc_collect_ptrace_register): New function.
16217 (ppc_supply_ptrace_register): New function.
16218 (ppc_breakpoint): Change type to "unsigned int".
16219 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16220 (the_low_target): Conditionally provide initializers for the
16221 arch_setup member depending on __powerpc64__. Install
16222 collect_ptrace_register and supply_ptrace_register members.
16224 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16226 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16227 * server.c (gdbserver_xmltarget): Define.
16228 (get_features_xml): Use it to replace "target.xml" and arch_string.
16230 * configure.srv: Remove srv_xmltarget. Add XML files that were
16231 mentioned there to srv_xmlfiles instead. Remove conditional tests
16232 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16233 srv_xmlfiles and srv_regobj to include all possible choices.
16234 * configure.ac (srv_xmltarget): Remove.
16235 (srv_xmlfiles): Do not add "target.xml".
16236 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16237 checks for supplementary target information.
16238 * configure: Regenerate.
16239 * Makefile.in (XML_TARGET): Remove.
16240 (target.xml): Remove rule.
16241 (clean): Do not clean up target.xml.
16242 (.PRECIOUS): Do not mention target.xml.
16244 * target.h (struct target_ops): Remove arch_string member.
16245 * linux-low.c (linux_arch_string): Remove.
16246 (linux_target_ops): Remove arch_string initializer.
16247 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16248 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16249 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16250 * spu-low.c (spu_arch_string): Remove.
16251 (spu_target_ops): Remove arch_string initializer.
16252 * win32-low.c (win32_arch_string): Remove.
16253 (win32_target_ops): Remove arch_string initializer.
16254 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16255 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16256 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16258 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16260 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16261 by collect_ptrace_register and supply_ptrace_register hooks.
16262 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16263 instead of checking for the_low_target.left_pad_xfer.
16264 (usr_store_inferior_registers): Use collect_ptrace_register callback
16265 instead of checking for the_low_target.left_pad_xfer.
16267 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16268 (s390_supply_ptrace_register): Likewise.
16269 (s390_fill_gregset): Call s390_collect_ptrace_register.
16270 (the_low_target): Update.
16272 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16273 (ppc_supply_ptrace_register): Likewise.
16274 (the_low_target): Update.
16276 * linux-i386-low.c (the_low_target): Update.
16277 * linux-x86-64-low.c (the_low_target): Update.
16279 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16281 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16282 reg-s390.o and reg-s390x.o.
16284 * linux-low.c (new_inferior): New global variable.
16285 (linux_create_inferior, linux_attach): Set it.
16286 (linux_wait_for_process): Call the_low_target.arch_setup after the
16287 target has stopped for the first time.
16288 (initialize_low): Do not call the_low_target.arch_setup.
16290 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16291 (s390_set_pc): Likewise.
16292 (s390_arch_setup): New function.
16293 (the_low_target): Use s390_arch_setup as arch_setup routine.
16295 * regcache.c (realloc_register_cache): New function.
16296 (set_register_cache): Call it for each existing regcache.
16298 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16300 * server.h (init_registers): Remove prototype.
16302 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16303 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16304 instead of init_registers ().
16305 * linux-arm-low.c (init_registers_arm): Add prototype.
16306 (init_registers_arm_with_iwmmxt): Likewise.
16307 (the_low_target): Add initializer for arch_setup field.
16308 * linux-cris-low.c (init_registers_cris): Add prototype.
16309 (the_low_target): Add initializer for arch_setup field.
16310 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16311 (the_low_target): Add initializer for arch_setup field.
16312 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16313 (the_low_target): Add initializer for arch_setup field.
16314 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16315 (the_low_target): Add initializer for arch_setup field.
16316 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16317 (the_low_target): Add initializer for arch_setup field.
16318 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16319 (the_low_target): Add initializer for arch_setup field.
16320 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16321 (init_registers_mips64_linux): Likewise.
16322 (the_low_target): Add initializer for arch_setup field.
16323 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16324 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16325 (the_low_target): Add initializer for arch_setup field.
16326 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16327 (init_registers_powerpc_64): Likewise.
16328 (the_low_target): Add initializer for arch_setup field.
16329 * linux-s390-low.c (init_registers_s390): Add prototype.
16330 (init_registers_s390x): Likewise.
16331 (the_low_target): Add initializer for arch_setup field.
16332 * linux-sh-low.c (init_registers_sh): Add prototype.
16333 (the_low_target): Add initializer for arch_setup field.
16334 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16335 (the_low_target): Add initializer for arch_setup field.
16336 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16337 (the_low_target): Add initializer for arch_setup field.
16339 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16340 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16341 instead of init_registers ().
16342 * win32-arm-low.c (init_registers_arm): Add prototype.
16343 (the_low_target): Add initializer for arch_setup field.
16344 * win32-i386-low.c (init_registers_i386): Add prototype.
16345 (the_low_target): Add initializer for arch_setup field.
16347 * spu-low.c (init_registers_spu): Add prototype.
16348 (initialize_low): Call initialie_registers_spu () instead of
16349 initialize_registers ().
16351 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16353 * server.c (handle_v_requests): When handling the vRun and vAttach
16354 packets, if already debugging a process, don't kill it. Return an
16357 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16359 * server.c (handle_query): Correct length check.
16361 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16363 * win32-low.c (do_initial_child_stuff): Add process handle
16364 parameter. Set current_process_handle and current_process_id from the
16365 parameters. Clear globals.
16366 (win32_create_inferior): Don't set current_process_handle and
16367 current_process_id here. Instead pass them on the call to
16368 do_initial_child_stuff.
16369 (win32_attach): Likewise.
16370 (win32_clear_inferiors): New.
16371 (win32_kill): Don't close the current process handle or the
16372 current thread handle here. Instead call win32_clear_inferiors.
16373 (win32_detach): Don't open a new handle to the process. Call
16374 win32_clear_inferiors.
16375 (win32_join): Don't rely on current_process_handle; open a new
16376 handle using the process id.
16377 (win32_wait): Call win32_clear_inferiors when the inferior process
16380 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16382 * server.c (monitor_show_help): Add "exit".
16384 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16386 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16387 (clean): Add reg-xtensa.c.
16388 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16389 * configure.srv (xtensa*-*-linux*) New target.
16390 * linux-xtensa-low.c: New.
16391 * xtensa-xtregs.c: New.
16393 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16395 * hostio.c: Don't include errno.h.
16396 (errno_to_fileio_errno): Move to hostio-errno.
16397 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16398 error number outputting to the target->hostio_last_error callback.
16399 (hostio_packet_error): Use FILEIO_EINVAL directly.
16400 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16401 calls to hostio_error.
16402 * hostio-errno.c: New.
16403 * server.h (hostio_last_error_from_errno): Declare.
16404 * target.h (target_ops): Add hostio_last_error member.
16405 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16406 as hostio_last_error handler.
16407 * spu-low.c (spu_target_ops): Likewise.
16408 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16409 (wince_hostio_last_error): New functions.
16410 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16411 as hostio_last_error handler.
16412 (win32_target_ops) [!_WIN32_WCE]: Register
16413 hostio_last_error_from_errno as hostio_last_error handler.
16414 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16415 (hostio-errno.o): New rule.
16416 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16417 * configure.srv (srv_hostio_err_objs): New variable. Default to
16419 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16420 * configure: Regenerate.
16422 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16424 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16425 (linux_kill, linux_detach): Clean up the process list.
16426 * remote-utils.c (remote_open): Improve port number parsing.
16427 (putpkt_binary, input_interrupt): Only send interrupts if the target
16429 * server.c (extended_protocol): Make static.
16430 (attached): Define earlier.
16431 (exit_requested, response_needed, program_argv): New variables.
16432 (target_running): New.
16433 (start_inferior): Clear attached here.
16434 (attach_inferior): Set attached here.
16435 (require_running): Define.
16436 (handle_query): Use require_running and target_running. Implement
16438 (handle_v_attach, handle_v_run): New.
16439 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16440 (gdbserver_usage): Update.
16441 (main): Redo argument parsing. Handle --debug and --multi. Handle
16442 --attach along with other options or after the port. Save
16443 program_argv. Support no initial program. Resynchronize
16444 communication with GDB after an error. Handle "monitor exit".
16445 Use require_running and target_running. Always allow the extended
16446 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16447 restart in extended mode.
16448 * README: Refer to the GDB manual. Update --attach usage.
16450 2007-12-20 Andreas Schwab <schwab@suse.de>
16452 * linux-low.c (STACK_SIZE): Define.
16453 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16454 (linux_test_for_tracefork): Likewise.
16456 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16458 * linux-low.c (linux_wait_for_event): Update messages. Do not
16459 reinsert auto-delete breakpoints.
16460 * mem-break.c (struct breakpoint): Change return type of handler to
16462 (set_breakpoint_at): Update handler type.
16463 (reinsert_breakpoint_handler): Return 1 instead of calling
16465 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16467 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16468 * mem-break.h (set_breakpoint_at): Update handler type.
16469 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16470 * win32-low.c (auto_delete_breakpoint): New.
16471 (get_child_debug_event): Use it.
16473 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16475 * configure.ac: Check for pread and pwrite.
16476 * hostio.c (handle_pread): Fall back to lseek and read.
16477 (handle_pwrite): Fall back to lseek and write.
16478 * config.in, configure: Regenerated.
16480 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16482 * server.c (myresume): Add own_buf argument.
16483 (main): Update calls.
16485 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16487 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16488 * remote-utils.c (remote_open): Do not call disable_async_io.
16489 (block_async_io): Delete.
16490 (unblock_async_io): Make static.
16491 (initialize_async_io): New.
16492 * server.c (handle_v_cont): Handle async I/O here.
16493 (myresume): Likewise. Move other common resume tasks here...
16494 (main): ... from here. Call initialize_async_io. Disable async
16495 I/O before the main loop.
16496 * server.h (initialize_async_io): Declare.
16497 (block_async_io, unblock_async_io): Delete prototypes.
16498 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16500 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16502 * remote-utils.c (readchar): Allow binary data in received messages.
16504 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16506 * win32-low.c (attaching): New global.
16507 (win32_create_inferior): Clear the `attaching' global.
16508 (win32_attach): Set the `attaching' global.
16509 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16510 attaching. Only set a breakpoint at the entry point if not
16513 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16515 * server.c (main): Don't report dll events on the initial
16516 connection on attaches.
16518 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16520 * server.c (main): Relax numerical bases supported for the pid of
16521 the --attach command line argument.
16523 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16525 * win32-low.c (win32_attach): Call OpenProcess before
16526 DebugActiveProcess, not after. Add last error output to error
16529 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16531 * win32-low.c (win32_get_thread_context)
16532 (win32_set_thread_context): New functions.
16533 (thread_rec): Use win32_get_thread_context.
16534 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16535 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16538 2007-12-03 Leo Zayas
16539 Pedro Alves <pedro_alves@portugalmail.pt>
16541 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16543 (child_add_thread): Minor cleanup.
16544 (child_continue): Resume artificially suspended threads before
16545 calling ContinueDebugEvent.
16546 (suspend_one_thread): New.
16547 (fake_breakpoint_event): New.
16548 (get_child_debug_event): Change return type to int. Check here if
16549 gdb sent an interrupt request. If a soft interrupt was requested,
16550 fake a breakpoint event. Return 0 if there is no event to handle,
16552 (win32_wait): Don't check here if gdb sent an interrupt request.
16553 Ensure there is a valid event to handle.
16554 (win32_request_interrupt): Add soft interruption method as last
16557 2007-12-03 Leo Zayas
16558 Pedro Alves <pedro_alves@portugalmail.pt>
16560 * win32-low.h (win32_thread_info): Add descriptions to the
16561 structure members. Replace `suspend_count' counter by a
16563 * win32-low.c (thread_rec): Update condition of when to get the
16564 context from the inferior. Rely on ContextFlags being set if it
16565 has already been retrieved. Only suspend the inferior thread if
16566 we haven't already. Warn if that fails.
16567 (continue_one_thread): s/suspend_count/suspended/. Only call
16568 ResumeThread once. Warn if that fails.
16570 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16572 * win32-low.c (win32_wait): Don't read from the inferior when it
16573 has already exited.
16575 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16577 * Makefile.in (win32_low_h): New variable.
16578 (win32-low.o): Add dependency on $(win32_low_h).
16579 (win32-arm-low.o, win32-i386-low.o): New rules.
16581 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16583 * hostio.c: Correct copyright year.
16585 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16587 * Makefile.in (OBS): Add hostio.o.
16588 (hostio.o): New rule.
16589 * server.h (handle_vFile): Declare.
16590 * hostio.c: New file.
16591 * server.c (handle_v_requests): Take packet_len and new_packet_len
16592 for binary packets. Call handle_vFile.
16593 (main): Update call to handle_v_requests.
16595 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16597 * linux-low.c: Include <sched.h>.
16599 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16601 * linux-low.c (linux_tracefork_grandchild): New.
16602 (linux_tracefork_child): Use clone.
16603 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16605 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16607 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16609 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16611 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16613 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16615 * inferiors.c (change_inferior_id): Delete.
16616 (add_pid_to_list, pull_pid_from_list): New.
16617 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16618 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16619 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16620 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16621 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16622 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16623 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16624 (using_threads): Always set to 1.
16625 (handle_extended_wait): New.
16626 (add_process): Do not set TID.
16627 (linux_create_inferior): Set must_set_ptrace_flags.
16628 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16629 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16630 (linux_thread_alive): Rename TID argument to LWPID.
16631 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16632 (linux_wait_for_event): Do not use TID or check using_threads. Update
16633 call to dead_thread_notify. Call handle_extended_wait.
16634 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16635 (send_sigstop): Delete sigstop_sent.
16636 (wait_for_sigstop): Avoid TID.
16637 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16638 (linux_test_for_tracefork): New.
16639 (linux_lookup_signals): Use thread_db_active and
16640 linux_supports_tracefork_flag.
16641 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16642 * linux-low.h (get_process_thread): Avoid TID.
16643 (struct process_ifo): Move thread_known and tid to the end. Remove
16645 (linux_attach_lwp, thread_db_init): Update prototypes.
16646 * server.h (change_inferior_id): Delete prototype.
16647 (add_pid_to_list, pull_pid_from_list): New prototypes.
16648 * thread-db.c (thread_db_use_events): New.
16649 (find_first_thread): Rename to...
16650 (find_one_thread): ...this. Update callers and messages. Do not
16651 call fatal. Check thread_db_use_events. Do not call
16652 change_inferior_id or new_thread_notify.
16653 (maybe_attach_thread): Update. Do not call new_thread_notify.
16654 (thread_db_init): Set thread_db_use_events. Check use_events.
16655 * utils.c (fatal, warning): Correct message prefix.
16657 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16659 * Makefile.in (clean): Remove new files.
16660 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16661 (powerpc-64.o, powerpc-64.c): New rules.
16662 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16663 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16665 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16667 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16668 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16669 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16670 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16671 (target_regsets): Add AltiVec and SPE register sets.
16672 * configure.ac: Check for AltiVec and SPE.
16673 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16674 (ppc_fill_vrregset, ppc_store_vrregset): New.
16675 (target_regsets): Add AltiVec register set.
16676 * configure: Regenerated.
16678 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16680 * linux-low.c (O_LARGEFILE): Define.
16681 (linux_read_memory): Use /proc/PID/mem.
16682 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16683 * configure, config.in: Regenerated.
16685 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16687 * linux-low.c (linux_wait_for_event): Do not pass signals while
16690 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16692 * win32-low.c (create_process): New.
16693 (win32_create_inferior): Use create_process instead of
16694 CreateProcess. If create_process failed retry appending an ".exe"
16695 suffix. Store the GetLastError result immediatelly after
16696 create_process calls and use it on the call to error.
16698 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16700 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16702 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16704 * configure.ac: Switch license to GPLv3.
16706 2007-08-01 Michael Snyder <msnyder@access-company.com>
16708 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16710 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16712 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16714 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16715 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16716 CloseToolhelp32Snapshot.
16717 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16718 CloseToolhelp32Snapshot.
16720 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16722 * server.c (main): Check for inferior exit before main loop.
16724 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16726 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16727 instead of on tmp_desc.
16729 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16730 Daniel Jacobowitz <dan@codesourcery.com>
16732 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16733 (add_thread): Minor cleanups.
16734 (clear_inferiors): Move lower in the file. Clear the DLL
16736 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16737 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16738 (xml_escape_text): New.
16739 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16741 (handle_v_cont): Report errors.
16742 (gdbserver_version): Update.
16743 (main): Correct size of own_buf. Do not report initial DLL events.
16744 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16745 (unloaded_dll, xml_escape_text): New.
16746 * win32-low.c (enum target_waitkind): Update comments.
16747 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16748 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16749 (win32_EnumProcessModules, win32_GetModuleInformation)
16750 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16751 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16752 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16753 (win32_Module32First, win32_Module32Next, load_toolhelp)
16754 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16755 (get_child_debug_event): Handle DLL events.
16756 (win32_wait): Likewise.
16758 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16760 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16761 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16763 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16765 * win32-low.c (handle_output_debug_string): Ignore event if not
16768 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16770 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16772 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16774 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16776 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16778 * inferiors.c (change_inferior_id): Add comment.
16779 * linux-low.c (check_removed_breakpoint): Add an early
16780 prototype. Improve debug output.
16781 (linux_attach): Doc update.
16782 (linux_detach_one_process, linux_detach): Clean up before releasing
16784 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16785 * linux-low.h (struct process_info): Doc improvement.
16786 * mem-break.c (delete_all_breakpoints): New.
16787 * mem-break.h (delete_all_breakpoints): New prototype.
16788 * thread-db.c (find_first_thread): New.
16789 (thread_db_create_event): Call it instead of
16790 thread_db_find_new_threads. Clean up unused variables.
16791 (maybe_attach_thread): Remove first thread handling.
16792 (thread_db_find_new_threads): Use find_first_thread.
16793 (thread_db_get_tls_address): Likewise.
16795 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16797 * thread-db.c (thread_db_find_new_threads): Add prototype.
16798 (thread_db_create_event): Check for the main thread before adding
16800 (maybe_attach_thread): Only enable event reporting if TID == 0.
16801 (thread_db_get_tls_address): Check for new threads.
16803 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16805 * linux-low.c (linux_create_inferior): Try execv before execvp.
16806 * spu-low.c (spu_create_inferior): Likewise.
16808 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16810 * linux-low.c (linux_create_inferior): Change execv to execvp.
16811 * spu-low.c (spu_create_inferior): Likewies.
16813 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16815 * Makefile.in (clean): Clean new files instead of deleted ones.
16816 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16817 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16819 * configure.srv: Specify XML files and new regformats for MIPS and
16821 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16822 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16823 an entry for the restart register.
16824 (mips_cannot_fetch_register, mips_cannot_store_register)
16825 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16826 register names to match the XML descriptions.
16827 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16828 restart register instead of $0.
16830 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16831 Markus Deuling <deuling@de.ibm.com>
16833 * remote-utils.c (decode_xfer_write): New function.
16834 * server.h (decode_xfer_write): Add prototype.
16835 * server.c (handle_query): Add PACKET_LEN argument. Support
16836 qXfer:spu:read and qXfer:spu:write packets.
16837 (main): Pass packet_len to handle_query.
16838 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16839 * target.h (target_ops): Add qxfer_spu.
16841 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16843 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16844 accessing non-seekable spufs files.
16846 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16848 * server.c (handle_query): Add reply for qC packet.
16850 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16851 Leo Zayas <lerele@champenstudios@com>
16853 * server.h (check_remote_input_interrupt_request): New function.
16854 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16855 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16856 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16857 (check_remote_input_interrupt_request): New function.
16858 * server.h (check_remote_input_interrupt_request): Declare.
16859 * win32-low.c (winapi_DebugBreakProcess,
16860 winapi_GenerateConsoleCtrlEvent): New typedefs.
16861 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16863 (win32_wait): Check for remote interrupt request
16864 with check_remote_input_interrupt_request.
16865 (win32_request_interrupt): New function.
16866 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16868 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16870 * win32-low.c (debug_registers_changed,
16871 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16872 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16873 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16874 (thread_rec): Get context using the low target.
16875 (child_add_thread): Call thread_added on the low target,
16876 which does the same thing.
16878 (do_initial_child_stuff): Remove debug registers references.
16879 Set context using the low target. Resume threads after
16880 setting the contexts.
16881 (child_continue): Remove dead variable. Remove debug
16882 registers references.
16883 (child_fetch_inferior_registers): Go through the low target.
16884 (do_child_store_inferior_registers): Remove.
16885 (child_store_inferior_registers): Go through the low target.
16886 (win32_resume): Remove debug registers references.
16887 Set context using the low target.
16888 (handle_exception): Change return type to void. Don't record
16889 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16890 first chance exception.
16891 (get_child_debug_event): Change return type to void. Remove
16892 goto loop. Always return after waiting for debug event.
16893 (win32_wait): Convert to switch statement. Handle spurious
16896 * win32-i386-low.c (debug_registers_changed,
16897 debug_registers_used): New.
16898 (initial_stuff): Rename to ...
16899 (i386_initial_stuff): ... this. Clear debug registers
16901 (store_debug_registers): Delete.
16902 (i386_get_thread_context): New.
16903 (load_debug_registers): Delete.
16904 (i386_set_thread_context): New.
16905 (i386_thread_added): New.
16906 (single_step): Rename to ...
16907 (i386_single_step): ... this.
16908 (do_fetch_inferior_registers): Rename to ...
16909 (i386_fetch_inferior_register): ... this.
16910 (i386_store_inferior_register): New.
16911 (the_low_target): Adapt to new interface.
16913 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16914 (arm_get_thread_context): New.
16915 (arm_set_thread_context): New.
16917 (do_fetch_inferior_registers): Rename to ...
16918 (arm_fetch_inferior_register): ... this.
16919 (arm_store_inferior_register): New.
16920 (arm_wince_breakpoint): Reimplement as unsigned long.
16921 (arm_wince_breakpoint_len): Define.
16922 (the_low_target): Adapt to new interface.
16924 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16925 load_debug_registers. Add get_thread_context, set_thread_context,
16926 thread_added and store_inferior_register. Rename
16927 fetch_inferior_registers to fetch_inferior_register.
16928 (regptr): Remove declaration.
16930 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16932 * linux-low.c (linux_detach): Change return type to int. Return 0.
16933 * spu-low.c (spu_detach): Likewise.
16935 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16937 * target.h (target_ops): Change return type of detach to int.
16939 (join_inferior): New.
16940 * server.c (main): Don't skip detach support on mingw32.
16941 If the inferior doesn't support detaching return error.
16942 Call join_inferior instead of using waitpid.
16943 * linux-low.c (linux_join): New.
16944 (linux_target_op): Add linux_join.
16945 * spu-low.c (spu_join): New.
16946 (spu_target_ops): Add spu_join.
16947 * win32-low.c (win32_detach): Adapt to new interface.
16948 Reopen current_process_handle before detaching. Issue a child
16949 resume before detaching.
16951 (win32_target_op): Add win32_join.
16953 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16955 * win32-low.c (win32-attach): Fix return value.
16956 * target.h (target_ops): Describe ATTACH return values.
16958 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16960 * win32-low.c (GETPROCADDRESS): Define.
16961 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16962 (winapi_DebugSetProcessKillOnExit): Likewise.
16963 (win32_create_inferior): Force usage of ansi CreateProcessA.
16964 (win32_attach): Use GETPROCADDRESS.
16965 (win32_detach): Likewise.
16967 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16969 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16971 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16973 * win32-low.c: Commit leftover changes from 2007-03-29.
16975 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16977 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16978 fields short instead of int. Add explicit padding.
16979 (i387_cache_to_fsave): Remove unnecessary casts.
16980 (i387_fsave_to_cache): Doc fix.
16981 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16983 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16985 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16986 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16988 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16990 * configure.srv (arm*-*-mingw32ce*): Move near the other
16993 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16995 * configure.ac: Add errno checking.
16996 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16997 sys/file.h and malloc.h.
16998 (AC_CHECK_DECLS): Add perror.
16999 (srv_mingwce): Handle.
17000 * configure.srv (i[34567]86-*-cygwin*): Add
17001 win32-i386-low.o to srv_tgtobj.
17002 (i[34567]86-*-mingw*): Likewise.
17003 (arm*-*-mingw32ce*): Add case.
17004 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17005 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17006 [__MINGW32CE__] (strerror): New function.
17007 [__MINGW32CE__] (errno): Define to GetLastError.
17008 [__MINGW32CE__] (COUNTOF): New macro.
17009 (remote_open): Remove extra close call.
17010 * mem-break.c (delete_breakpoint_at): New function.
17011 * mem-break.h (delete_breakpoint_at): Declare.
17012 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17013 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17014 [USE_WIN32API] (read, write): Add char* casts.
17015 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17016 * server.h: Include wincecompat.h on Windows CE.
17017 [HAVE_ERRNO_H]: Check.
17018 (perror): Declare if not declared.
17019 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17020 (perror_with_name): Remove errno declaration.
17021 * wincecompat.h: New.
17022 * wincecompat.c: New.
17023 * win32-low.h: New.
17024 * win32-arm-low.c: New.
17025 * win32-i386-low.c: New.
17026 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17027 (OUTMSG2): Make it safe.
17029 (COUNTOF): New macro.
17030 (NUM_REGS): Get it from the low target.
17031 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17032 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17033 (thread_rec): Let low target handle debug registers.
17034 (child_add_thread): Likewise.
17035 (child_init_thread_list): Likewise.
17036 (continue_one_thread): Likewise.
17038 (do_child_fetch_inferior_registers): Move to ...
17039 * win32-i386-low.c: ... here, and rename to ...
17040 (do_fetch_inferior_registers): ... this.
17041 * win32-low.c (child_fetch_inferior_registers):
17042 Go through the low target.
17043 (do_child_store_inferior_registers): Use regptr.
17044 (strwinerror): New function.
17045 (win32_create_inferior): Handle Windows CE.
17046 Use strwinerror instead of strerror on Windows error
17047 codes. Add program to the error output.
17048 Don't close the main thread handle on Windows CE.
17049 (win32_attach): Use coredll.dll on Windows CE.
17050 (win32_kill): Close current process and current
17052 (win32_detach): Use coredll.dll on Windows CE.
17053 (win32_resume): Let low target handle debug registers, and
17055 (handle_exception): Add/Remove initial breakpoint. Avoid
17056 non-existant WSTOPSIG on Windows CE.
17057 (win32_read_inferior_memory): Cast to remove warning.
17058 (win32_arch_string): Go through the low target.
17059 (initialize_low): Call set_breakpoint_data with the low
17060 target's breakpoint.
17061 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17062 FOP_REGNUM, mappings): Move to ...
17063 * win32-i386-low.c: ... here.
17064 * win32-low.c (win32_thread_info): Move to ...
17065 * win32-low.h: ... here.
17066 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17067 win32-arm-low.c and wincecompat.c.
17068 (all:): Add $EXEEXT.
17069 (install-only:): Likewise.
17070 (gdbserver:): Likewise.
17071 (gdbreplay:): Likewise.
17072 * config.in: Regenerate.
17073 * configure: Regenerate.
17075 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17077 * win32-low.c: Rename typedef thread_info to
17078 win32_thread_info throughout.
17080 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17082 * win32-i386-low.c: Rename to ...
17083 * win32-low.c: ... this.
17084 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17085 * Makefile.in: Likewise.
17087 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17089 * remote-utils.c (monitor_output): Constify msg parameter.
17090 * server.h (monitor_output): Likewise.
17091 * win32-i386-low.c (handle_output_debug_string): New.
17092 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17093 handle_output_debug_string.
17094 (get_child_debug_event): Likewise.
17096 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17098 * server.c (main): Correct strtoul check.
17100 2007-03-27 Jon Ringle <jon@ringle.org>
17102 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17104 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17106 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17108 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17110 * terminal.h: Check HAVE_SGTTY_H.
17112 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17114 * remote-utils.c (remote_open): Print out the assigned port number.
17116 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17118 * remote-utils.c (monitor_output): New function.
17119 * server.c (debug_threads): Define here.
17120 (monitor_show_help): New function.
17121 (handle_query): Handle qRcmd.
17122 (main): Do not handle 'd' packet.
17123 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17124 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17127 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17129 * Makefile.in (EXEEXT): New.
17130 (clean): Use $(EXEEXT).
17132 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17134 * target.h (target_ops): Rename send_signal to request_interrupt,
17135 and remove enum target_signal parameter.
17136 * linux-low.c (linux_request_interrupt): Rename from
17137 linux_send_signal, and always send SIGINT.
17138 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17139 and always send SIGINT.
17140 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17142 (input_interrupt): Likewise.
17144 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17146 * server.c (get_features_xml): Check if target implemented
17148 * win32-i386-low.c (win32_arch_string): New.
17149 (win32_target_ops): Add win32_arch_string as arch_string member.
17151 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17153 * spu-low.c (spu_arch_string): New.
17154 (spu_target_ops): Add spu_arch_string.
17156 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17158 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17159 * configure.ac: Do not check for terminal.h.
17160 * configure, config.in: Regenerated.
17162 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17164 * Makefile.in (OBS): Add $(XML_BUILTIN).
17165 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17167 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17168 (arm-with-iwmmxt.c): New.
17169 * config.in, configure: Regenerate.
17170 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17171 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17172 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17173 (arm*-*-linux*): Add iWMMXt and regset support.
17174 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17175 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17176 (arm_store_wmmxregset, target_regsets): New.
17177 * server.c (get_features_xml): Take annex argument. Check builtin
17179 (handle_query): Handle multiple annexes.
17181 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17183 * remote-utils.c [USE_WIN32API] (read, write): Define.
17184 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17187 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17189 * linux-i386-low.c (the_low_target): Set arch_string.
17190 * linux-x86-64-low.c (the_low_target): Likewise.
17191 * linux-low.c (linux_arch_string): New.
17192 (linux_target_ops): Add it.
17193 * linux-low.h (struct linux_target_ops): Add arch_string.
17194 * server.c (write_qxfer_response): Use const void * for DATA.
17195 (get_features_xml): New.
17196 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17197 * target.h (struct target_ops): Add arch_string method.
17199 2007-01-03 Denis Pilat <denis.pilat@st.com>
17200 Daniel Jacobowitz <dan@codesourcery.com>
17202 * linux-low.c (linux_kill): Handle being called with no threads.
17203 * win32-i386-low.c (win32_kill): Likewise.
17204 (get_child_debug_event): Clear current_process_handle.
17206 2006-12-30 Denis PILAT <denis.pilat@st.com>
17207 Daniel Jacobowitz <dan@codesourcery.com>
17209 * remote-utils.c (remote_open): Check the type of specified
17210 serial port devices before opening them.
17211 * server.c (main): Kill the inferior if an error occurs during
17212 the first remote_open.
17214 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17216 * README: Update supported targets.
17218 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17220 * Makefile.in (clean): Remove reg-mips64.c.
17221 (reg-mips64.c, reg-mips64.o): New rules.
17222 * configure.srv: Handle mips64. Include regset support for mips.
17223 * linux-mips-low.c (union mips_register): New.
17224 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17225 (mips_breakpoint, mips_breakpoint_at): Use int.
17226 (mips_collect_register, mips_supply_register)
17227 (mips_collect_register_32bit, mips_supply_register_32bit)
17228 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17229 (mips_store_fpregset, target_regsets): New.
17230 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17232 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17234 * configure.srv: Add target "spu*-*-*".
17235 * Makefile.in (clean): Remove reg-spu.c.
17236 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17237 * spu-low.c: New file.
17239 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17241 * configure.ac: Correct td_thr_tls_get_addr test.
17242 * configure: Regenerated.
17244 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17246 * linux-low.c (linux_wait_for_event): Reformat. Use the
17247 pass_signals array.
17248 * remote-utils.c (decode_address_to_semicolon): New.
17249 * server.c (pass_signals, handle_general_set): New.
17250 (handle_query): Mention QPassSignals for qSupported.
17251 (main): Call handle_general_set.
17252 * server.h (pass_signals, decode_address_to_semicolon): New.
17254 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17256 * server.c (handle_query): Correct error handling for read_auxv.
17258 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17260 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17261 and srv_linux_thread_db to yes.
17262 * linux-s390-low.c (s390_fill_gregset): New function.
17263 (target_regsets): Define data structure.
17265 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17267 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17268 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17269 * config.in, configure: Regenerated.
17270 * inferiors.c (gdb_id_to_thread): New function.
17271 (gdb_id_to_thread_id): Use it.
17272 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17273 * linux-low.h (struct process_info): Add th member.
17274 (thread_db_get_tls_address): New prototype.
17275 * remote-utils.c (decode_address): Make non-static.
17276 * server.c (handle_query): Handle qGetTLSAddr.
17277 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17278 * target.h (struct target_ops): Add get_tls_address.
17279 * thread-db.c (maybe_attach_thread): Save the thread handle.
17280 (thread_db_get_tls_address): New.
17282 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17284 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17285 (linux_resume_one_process): Take a siginfo_t *. Update all
17286 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17287 (struct pending_signals): Add a siginfo_t.
17288 (linux_wait_for_process): Always set last_status.
17289 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17290 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17291 * linux-low.h (struct process_info): Add last_status.
17293 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17295 * remote-utils.c (try_rle): New function.
17296 (putpkt_binary): Use it.
17298 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17300 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17301 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17302 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17303 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17304 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17307 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17309 * server.c (terminal_fd): New variable.
17310 (old_foreground_pgrp): Likewise.
17311 (restore_old_foreground_pgrp): New function.
17312 (start_inferior): Record the terminal file descriptor in terminal_fd
17313 and its original foreground group in old_foreground_pgrp. Register
17314 restore_old_foreground_pgrp with atexit().
17316 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17318 * server.c (handle_query): Correct qPart to qXfer.
17320 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17322 * configure.ac: Check for more headers which are missing on
17323 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17324 * configure.srv: Add Cygwin and mingw32.
17325 * remote-utils.c: Don't include headers unconditionally which
17326 are missing on mingw32. Include <winsock.h> for mingw32.
17327 (remote_open): Adjust for mingw32 support. Flush
17328 standard error after writing to it.
17329 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17330 (unblock_async_io, enable_async_io, disable_async_io)
17331 (readchar, getpkt): Update for Winsock support.
17332 (prepare_resume_reply): Expect a protocol signal number.
17333 * server.c: Disable <sys/wait.h> on mingw32.
17334 (start_inferior): Adjust for mingw32 support. Flush
17335 standard error after writing to it.
17336 (attach_inferior): Likewise. Use protocol signal
17338 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17340 * win32-i386-low.c: New file.
17341 * Makefile.in (XM_CLIBS): Set.
17342 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17343 (win32-i386-low.o): New dependency rule.
17344 * linux-low.c (linux_wait): Use target signal numbers.
17345 * target.h (struct target_ops): Doc fix.
17346 * server.h (target_signal_to_name): New prototype.
17347 * gdbreplay.c: Don't include headers unconditionally which
17348 are missing on mingw32. Include <winsock.h> for mingw32.
17349 (remote_close, remote_open): Adjust for Winsock support.
17350 * configure, config.in: Regenerated.
17352 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17354 * server.c (decode_xfer_read, write_qxfer_response): New.
17355 (handle_query): Take a packet length argument. Handle
17356 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17357 the qSupported response.
17358 (main): Update call to handle_query.
17360 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17362 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17363 (putpkt_binary): Renamed from putpkt and adjusted for binary
17365 (putpkt): New wrapper for putpkt_binary.
17366 (readchar): Don't mask off the high bit.
17367 (decode_X_packet): New function.
17368 * server.c (main): Call putpkt_binary if a handler sets the packet
17369 length. Save the length of the incoming packet. Handle 'X'.
17370 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17372 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17374 * server.c (handle_query): Handle qSupported.
17376 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17378 * remote-utils.c (all_symbols_looked_up): New variable.
17379 (look_up_one_symbol): Check it.
17380 * server.h (look_up_one_symbol): New declaration.
17381 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17383 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17385 * Makefile.in (linux-arm-low.o): Update dependencies.
17386 * linux-arm-low.c: Include "gdb_proc_service.h".
17387 (PTRACE_GET_THREAD_AREA): Define.
17388 (ps_get_thread_area): New function.
17390 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17392 * configure.srv (m68k*-*-uclinux*): New target.
17393 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17394 (linux_resume_one_process): Remove extraneous cast.
17395 (linux_read_offsets): New.
17396 (linux_target_op): Add linux_read_offsets on mmuless systems.
17397 * server.c (handle_query): Add qOffsets logic.
17398 * target.h (struct target_ops): Add read_offsets.
17400 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17402 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17403 (PTRACE_GET_THREAD_AREA): Define.
17404 (ps_get_thread_area): New function.
17405 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17406 (linux-x86-64-low.o): Update.
17408 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17410 * configure.ac: Remove checks for prfpregset_t.
17411 * gdb_proc_service.h: New file.
17412 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17413 new "gdb_proc_service.h".
17414 * proc-service.c: Likewise.
17415 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17416 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17417 * Makefile.in (gdb_proc_service_h): Updated.
17418 * configure, config.in: Regenerated.
17420 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17422 * remote-utils.c (prepare_resume_reply): Move declaration
17423 of gdb_id_from_wait to the top of the block.
17425 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17427 * linux-low.c (regsets_store_inferior_registers): Read the regset
17428 from the target before filling it.
17430 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17432 * server.c (attach_inferior): Return SIGTRAP for a successful
17435 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17437 * Makefile.in (OBS): Add version.o.
17438 (STAGESTUFF): Delete.
17439 (version.o): Add dependencies.
17440 (version.c): Replace rule.
17441 (clean): Remove version.c.
17442 * server.c (gdbserver_version): New.
17443 (gdbserver_usage): Use printf.
17444 (main): Handle --version and --help.
17445 * server.h (version, host_name): Add declarations.
17447 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17459 * linux-x86-64-low.c:
17461 * linux-s390-low.c:
17462 * linux-ppc64-low.c:
17464 * linux-mips-low.c:
17465 * linux-m68k-low.c:
17466 * linux-m32r-low.c:
17469 * linux-ia64-low.c:
17470 * linux-i386-low.c:
17471 * linux-crisv32-low.c:
17483 * gdbserver.1: Add (C) after Copyright. Update the FSF
17486 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17488 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17489 (arm_breakpoint_at): Recognize both breakpoints.
17490 (the_low_target): Use the correct breakpoint instruction.
17492 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17494 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17495 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17496 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17497 (the_low_target): Update.
17499 2005-10-25 Andreas Schwab <schwab@suse.de>
17501 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17503 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17504 (ia64_num_regs): Reduce to 462.
17506 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17508 * acinclude.m4: Correct quoting.
17509 * aclocal.m4: Regenerated.
17511 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17512 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17513 (thread_db_init): Call thread_db_err_str.
17514 * configure.ac: Check for TD_VERSION.
17515 * config.in, configure: Regenerated.
17517 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17519 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17521 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17523 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17524 is not available. Define HAVE_PTRACE_GETREGS if it is.
17525 * config.in, configure: Regenerated.
17526 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17527 * linux-i386-low.c, linux-m68k-low.c: Update to use
17528 HAVE_PTRACE_GETREGS.
17529 * linux-low.c (regsets_fetch_inferior_registers)
17530 (regsets_store_inferior_registers): Only return 0 if we processed
17532 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17533 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17535 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17537 * inferiors.c (struct thread_info): Add gdb_id.
17538 (add_thread): Add gdb_id argument.
17539 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17540 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17541 calls to add_thread.
17542 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17543 * server.c (handle_query): Use thread_to_gdb_id.
17544 (handle_v_cont, main): Use gdb_id_to_thread_id.
17545 * server.h (add_thread): Update prototype.
17546 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17549 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17551 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17552 left-padded registers.
17553 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17554 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17556 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17558 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17559 * configure: Regenerate.
17560 * config.in: Regenerate.
17561 * server.h (NEED_DECLARATION_STRERROR):
17562 Replace with !HAVE_DECL_STRERROR.
17564 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17566 * linux-low.c (linux_wait, linux_send_signal): Don't test
17567 an unsigned long variable for > 0 if it could be MAX_ULONG.
17568 * server.c (myresume): Likewise.
17569 * target.c (set_desired_inferior): Likewise.
17571 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17573 * configure.ac: Simplify and improve check for socklen_t.
17574 * configure, config.in: Regenerate.
17576 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17578 * acconfig.h: Remove.
17579 * configure.ac: Add a test for socklen_t. Use three-argument
17580 AC_DEFINE throughout.
17581 * config.in: Regenerated using autoheader 2.59.
17582 * configure: Regenerated.
17584 * gdbreplay.c (socklen_t): Provide a default.
17585 (remote_open): Use socklen_t.
17586 * remote-utils.c (socklen_t): Provide a default.
17587 (remote_open): Use socklen_t.
17588 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17591 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17593 * linux-low.c (linux_read_memory, linux_write_memory)
17594 (linux_read_auxv): Likewise.
17595 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17596 (check_mem_write): Likewise.
17597 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17599 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17600 (registers_from_string, register_data): Likewise.
17601 * server.c (handle_query, main): Likewise.
17602 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17603 (decode_M_packet): Likewise.
17604 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17605 * target.h (struct target_ops): Update read_memory, write_memory,
17607 (read_inferior_memory, write_inferior_memory): Update.
17608 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17609 to unsigned char *.
17610 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17611 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17612 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17613 linux-s390-low.c, linux-sh-low.c: Update for changes in
17614 read_inferior_memory and the_low_target->breakpoint.
17616 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17618 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17619 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17620 * configure.srv: Add powerpc64-*-linux*.
17621 * linux-ppc64-low.c: New file.
17623 2005-05-23 Orjan Friberg <orjanf@axis.com>
17625 * linux-cris-low.c: New file with support for CRIS.
17626 * linux-crisv32-low.c: Ditto for CRISv32.
17627 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17628 (clean): Add reg-cris.c and reg-crisv32.c.
17629 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17630 reg-crisv32.o, and reg-crisv32.c to make rules.
17631 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17632 recognized targets.
17634 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17636 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17637 of sizeof (PTRACE_XFER_TYPE).
17638 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17640 2005-05-12 Orjan Friberg <orjanf@axis.com>
17642 * target.h (struct target_ops): Add insert_watchpoint,
17643 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17644 pointers for hardware watchpoint support.
17645 * linux-low.h (struct linux_target_ops): Ditto.
17646 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17647 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17648 to linux_target_ops.
17649 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17651 * server.c (main): Recognize 'Z' and 'z' packets.
17653 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17655 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17656 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17657 (the_low_target): Add new members.
17659 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17661 * proc-service.c (ps_lgetregs): Search all_processes instead of
17664 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17666 * server.c (start_inferior): Change return type to int.
17667 (attach_inferior): Change sigptr to int *.
17668 (handle_v_cont, handle_v_requests): Change signal to int *.
17669 (main): Change signal to int.
17671 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17673 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17674 * configure.srv: Add m32r*-*-linux*.
17675 * linux-m32r-low.c: New file.
17677 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17679 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17681 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17683 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17684 Take unsigned long arguments for PIDs.
17685 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17686 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17687 (wait_for_sigstop, linux_resume_one_process)
17688 (regsets_fetch_inferior_registers, linux_send_signal)
17689 (linux_read_auxv): Likewise. Update the types of variables holding
17690 PIDs. Update format string specifiers.
17691 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17692 * remote-utils.c (prepare_resume_reply): Likewise.
17693 * server.c (cont_thread, general_thread, step_thread)
17694 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17696 (handle_query): Update format specifiers.
17697 (handle_v_cont, main): Use strtoul for thread IDs.
17698 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17699 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17700 (general_thread, step_thread, thread_from_wait)
17701 (old_thread_from_wait): Update.
17702 * target.h (struct thread_resume): Use unsigned long for THREAD.
17703 (struct target_ops): Use unsigned long for arguments to attach and
17706 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17708 * acinclude.m4: Include bfd/bfd.m4 directly.
17709 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17710 <agriffis@toolchain.org>.
17711 * aclocal.m4, configure: Regenerated.
17713 2005-01-07 Andrew Cagney <cagney@gnu.org>
17715 * configure.ac: Rename configure.in, require autoconf 2.59.
17716 * configure: Re-generate.
17718 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17720 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17721 LIBS when finished.
17722 * aclocal.m4: Regenerated.
17723 * configure: Regenerated.
17725 2004-11-21 Andreas Schwab <schwab@suse.de>
17727 * linux-m68k-low.c (m68k_num_gregs): Define.
17728 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17729 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17730 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17731 (m68k_breakpoint_at): New. Add to the_low_target.
17733 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17734 srv_linux_thread_db to yes.
17736 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17738 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17739 (ARCH_SET_FS): Likewise.
17740 (ARCH_GET_FS): Likewise.
17741 (ARCH_GET_GS): Likewise.
17743 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17745 * linux-i386-low.c (ps_get_thread_area): New.
17746 * linux-x86-64-low.c (ps_get_thread_area): New.
17747 * linux-low.c: Include <sys/syscall.h>.
17748 (linux_kill_one_process): Don't kill the first thread here.
17749 (linux_kill): Kill the first thread here.
17750 (kill_lwp): New function.
17751 (send_sigstop, linux_send_signal): Use it.
17752 * proc-service.c: Clean up #ifdefs.
17753 (fpregset_info): Delete.
17754 (ps_lgetregs): Update and enable implementation.
17755 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17757 * remote-utils.c (struct sym_cache, symbol_cache): New.
17758 (input_interrupt): Print a clearer message.
17759 (async_io_enabled): New variable.
17760 (enable_async_io, disable_async_io): Use it. Update comments.
17761 (look_up_one_symbol): Use the symbol cache.
17762 * thread-db.c (thread_db_look_up_symbols): New function.
17763 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17765 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17767 * configure.in: Test for -rdynamic.
17768 * configure: Regenerated.
17769 * Makefile (INTERNAL_LDFLAGS): New.
17770 (gdbserver, gdbreplay): Use it.
17772 2004-09-02 Andrew Cagney <cagney@gnu.org>
17774 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17776 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17778 * linux-low.c (linux_wait): Clear all_processes list also.
17780 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17782 * linux-low.c: Include <errno.h>. Remove extern declaration of
17785 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17787 * gdbreplay.c, server.h, utils.c: Update copyright years.
17789 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17791 * server.c (main): Print child status or termination signal from
17792 variable 'signal', not 'sig'.
17794 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17796 * linux-low.c (linux_read_memory): Change return type to
17797 int. Check for and return error from ptrace().
17798 * target.c (read_inferior_memory): Change return type to int. Pass
17799 back return status from the_target->read_memory().
17800 * target.h (struct target_ops): Adapt *read_memory() prototype.
17802 (read_inferior_memory): Adapt prototype.
17803 * server.c (main): Return an error packet if
17804 read_inferior_memory() returns an error.
17806 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17808 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17809 Unify with other clean targets.
17811 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17813 * server.c (handle_v_cont): Call set_desired_inferior.
17815 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17817 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17819 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17821 * linux-low.c (linux_wait): Unblock async I/O.
17822 (linux_resume): Block and enable async I/O.
17823 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17824 * server.h (block_async_io, unblock_async_io): Add prototypes.
17826 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17828 * remote-utils.c (remote_open): Print a status notice after
17829 opening a TCP port.
17830 * server.c (attach_inferior): Print a status notice after
17833 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17835 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17837 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17839 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17841 * server.c, target.h: Update copyright years.
17843 2004-02-25 Roland McGrath <roland@redhat.com>
17845 * target.h (struct target_ops): New member `read_auxv'.
17846 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17847 * linux-low.c (linux_read_auxv): New function.
17848 (linux_target_ops): Initialize `read_auxv' member to that.
17850 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17852 Committed by Jim Blandy <jimb@redhat.com>.
17854 * linux-s390-low.c (s390_num_regs): Update.
17855 (s390_regmap): Remove control registers. Use __s390x__ predefine
17856 instead of GPR_SIZE to distiguish s390 and s390x targets.
17858 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17860 * linux-low.c: Update copyright year.
17861 (check_removed_breakpoint): Clear pending_is_breakpoint.
17862 (linux_set_resume_request, linux_queue_one_thread)
17863 (resume_status_pending_p): New functions.
17864 (linux_continue_one_thread): Use process->resume.
17865 (linux_resume): Only resume threads if there are no pending events.
17866 * linux-low.h (struct process_info): Add resume request
17869 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17871 * regcache.c (new_register_cache): Clear the allocated register
17872 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17874 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17876 * linux-low.c (linux_resume): Take a struct thread_resume *
17878 (linux_wait): Update call.
17879 (resume_ptr): New static variable.
17880 (linux_continue_one_thread): Renamed from
17881 linux_continue_one_process. Use resume_ptr.
17882 (linux_resume): Use linux_continue_one_thread.
17883 * server.c (handle_v_cont, handle_v_requests): New functions.
17884 (myresume): New function.
17885 (main): Handle 'v' case.
17886 * target.h (struct thread_resume): New type.
17887 (struct target_ops): Change argument of "resume" to struct
17889 (myresume): Delete macro.
17891 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17893 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17894 (uninstall): Support DESTDIR.
17896 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17898 * configure.srv: Add xscale*linux copy of arm*linux entry.
17900 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17902 * linux-arm-low.c (arm_reinsert_addr): New function.
17903 (the_low_target): Add arm_reinsert_addr.
17905 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17907 * mem-break.c: Remove whitespace at end of file.
17909 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17911 * configure.in: Check whether we need to prototype strerror.
17912 * server.h: Optionally prototype strerror.
17913 * gdbreplay.c (perror_with_name): Use strerror.
17914 * linux-low.c (linux_attach_lwp): Use strerror.
17915 * utils.c (perror_with_name): Use strerror.
17916 * config.in, configure: Regenerated.
17918 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17920 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17921 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17923 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17925 * Makefile.in (SFILES): Update.
17926 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17927 low-sun3.c: Remove files.
17929 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17931 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17932 (linux_detach_one_process, linux_detach): New functions.
17933 (linux_target_ops): Add linux_detach.
17934 * server.c (main): Handle 'D' packet.
17935 * target.h (struct target_ops): Add "detach" member.
17936 (detach_inferior): Define.
17938 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17940 From Kelley Cook <kelleycook@wideopenwest.com>:
17941 * configure.srv: Accept i[34567]86 variants.
17943 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17945 * linux-low.c (linux_wait_for_event): Correct comment typos.
17946 (linux_resume_one_process): Call check_removed_breakpoint.
17947 (linux_send_signal): New function.
17948 (linux_target_ops): Add linux_send_signal.
17949 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17951 * target.h (struct target_ops): Add send_signal.
17953 2003-05-29 Jim Blandy <jimb@redhat.com>
17955 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17956 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17957 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17958 away part of the register's value.
17960 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17962 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17963 (linux_wait_for_event, linux_init_signals): Likewise.
17965 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17967 * configure.in: Check for stdlib.h.
17968 * configure: Regenerated.
17969 * config.in: Regenerated.
17971 2003-01-04 Andreas Schwab <schwab@suse.de>
17973 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17975 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17977 * Makefile.in: Remove obsolete code.
17979 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17981 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17982 defined(PT_FPR0_HI).
17984 2002-11-17 Stuart Hughes <seh@zee2.com>
17986 * linux-arm-low.c (arm_num_regs): Increase.
17987 (arm_regmap): Include status register.
17989 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17991 * linux-low.c (register_addr): Remove incorrect -1 check.
17993 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17995 * linux-low.c (linux_create_inferior): Call setpgid. Return
17997 (unstopped_p, linux_signal_pid): Remove.
17998 (linux_target_ops): Remove linux_signal_pid.
17999 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18000 global instead of target method.
18001 * target.h (struct target_ops): Remove signal_pid. Update comment
18002 for create_inferior.
18003 * server.c (signal_pid): New variable.
18004 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18005 gdbserver. Set the child to be the foreground process group.
18006 (attach_inferior): Set signal_pid.
18008 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18010 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18012 2002-08-20 Jim Blandy <jimb@redhat.com>
18014 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18017 2002-08-01 Andrew Cagney <cagney@redhat.com>
18019 * Makefile.in: Make chill references obsolete.
18021 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18023 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18024 * configure: Regenerate.
18025 * config.in: Regenerate.
18027 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18029 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18030 (perror_with_name, remote_close, remote_open, expect, play): Static.
18032 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18034 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18035 byte offsets instead of an array of indexes.
18036 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18038 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18040 * regcache.c: Add comment.
18042 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18044 * thread-db.c: New file.
18045 * proc-service.c: New file.
18046 * acinclude.m4: New file.
18047 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18048 proc-service.o, and thread-db.o.
18049 (linux-low.o): Add USE_THREAD_DB.
18050 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18051 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18052 * aclocal.m4: Regenerated.
18053 * config.in: Regenerated.
18054 * configure: Regenerated.
18055 * configure.in: Check for proc_service.h, sys/procfs.h,
18056 thread_db.h, and linux/elf.h headrs.
18057 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18058 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18059 Check for -lthread_db and thread support.
18060 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18061 PowerPC, and SuperH.
18062 * i387-fp.c: Constify arguments.
18063 * i387-fp.h: Likewise.
18064 * inferiors.c: (struct thread_info): Renamed from
18065 `struct inferior_info'. Remove PID member. Use generic inferior
18066 list header. All uses updated.
18067 (inferiors, signal_pid): Removed.
18068 (all_threads): New variable.
18069 (get_thread): Define.
18070 (add_inferior_to_list): New function.
18071 (for_each_inferior): New function.
18072 (change_inferior_id): New function.
18073 (add_inferior): Removed.
18074 (remove_inferior): New function.
18075 (add_thread): New function.
18076 (free_one_thread): New function.
18077 (remove_thread): New function.
18078 (clear_inferiors): Use for_each_inferior and free_one_thread.
18079 (find_inferior): New function.
18080 (find_inferior_id): New function.
18081 (inferior_target_data): Update argument type.
18082 (set_inferior_target_data): Likewise.
18083 (inferior_regcache_data): Likewise.
18084 (set_inferior_regcache_data): Likewise.
18085 * linux-low.c (linux_bp_reinsert): Remove.
18086 (all_processes, stopping_threads, using_thrads)
18087 (struct pending_signals, debug_threads, pid_of): New.
18088 (inferior_pid): Replace with macro.
18089 (struct inferior_linux_data): Remove.
18090 (get_stop_pc, add_process): New functions.
18091 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18092 Use add_process and add_thread.
18093 (linux_attach_lwp): New function, based on old linux_attach. Use
18094 add_process and add_thread. Set stop_expected for new threads.
18095 (linux_attach): New function.
18096 (linux_kill_one_process): New function.
18097 (linux_kill): Kill all LWPs.
18098 (linux_thread_alive): Use find_inferior_id.
18099 (check_removed_breakpoints, status_pending_p): New functions.
18100 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18101 Update. Use WNOHANG. Wait for cloned processes also. Update process
18102 struct for the found process.
18103 (linux_wait_for_event): New function.
18104 (linux_wait): Use it. Support LWPs.
18105 (send_sigstop, wait_for_sigstop, stop_all_processes)
18106 (linux_resume_one_process, linux_continue_one_process): New functions.
18107 (linux_resume): Support LWPs.
18108 (REGISTER_RAW_SIZE): Remove.
18109 (fetch_register): Use register_size instead. Call supply_register.
18110 (usr_store_inferior_registers): Likewise. Call collect_register.
18111 Fix recursive case.
18112 (regsets_fetch_inferior_registers): Improve error message.
18113 (regsets_store_inferior_registers): Add debugging.
18114 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18115 (unstopped_p, linux_signal_pid): New functions.
18116 (linux_target_ops): Add linux_signal_pid.
18117 (linux_init_signals): New function.
18118 (initialize_low): Call it. Initialize using_threads.
18119 * regcache.c (inferior_regcache_data): Add valid
18121 (get_regcache): Fetch registers lazily. Add fetch argument
18122 and update all callers.
18123 (regcache_invalidate_one, regcache_invalidate): New
18125 (new_register_cache): Renamed from create_register_cache.
18126 Return the new regcache.
18127 (free_register_cache): Change argument to a void *.
18128 (registers_to_string, registers_from_string): Call get_regcache
18129 with fetch flag set.
18130 (register_data): Make static. Pass fetch flag to get_regcache.
18131 (supply_register): Call get_regcache with fetch flag clear.
18132 (collect_register): Call get_regcache with fetch flag set.
18133 (collect_register_as_string): New function.
18134 * regcache.h: Update.
18135 * remote-utils.c (putpkt): Flush after debug output and use
18137 Handle input interrupts while waiting for an ACK.
18138 (input_interrupt): Use signal_pid method.
18139 (getpkt): Flush after debug output and use stderr.
18140 (outreg): Use collect_register_as_string.
18141 (new_thread_notify, dead_thread_notify): New functions.
18142 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18143 and general_thread.
18144 (look_up_one_symbol): Flush after debug output.
18145 * server.c (step_thread, server_waiting): New variables.
18146 (start_inferior): Don't use signal_pid. Update call to mywait.
18147 (attach_inferior): Update call to mywait.
18148 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18149 (main): Don't fetch/store registers explicitly. Use
18150 set_desired_inferior. Support proposed ``Hs'' packet. Update
18152 * server.h: Update.
18153 (struct inferior_list, struct_inferior_list_entry): New.
18154 * target.c (set_desired_inferior): New.
18155 (write_inferior_memory): Constify.
18156 (mywait): New function.
18157 * target.h: Update.
18158 (struct target_ops): New signal_pid method.
18159 (mywait): Removed macro, added prototype.
18161 * linux-low.h (regset_func): Removed.
18162 (regset_fill_func, regset_store_func): New.
18163 (enum regset_type): New.
18164 (struct regset_info): Add type field. Use new operation types.
18165 (struct linux_target_ops): stop_pc renamed to get_pc.
18166 Add decr_pc_after_break and breakpoint_at.
18167 (get_process, get_thread_proess, get_process_thread)
18168 (strut process_info, all_processes, linux_attach_lwp)
18169 (thread_db_init): New.
18171 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18172 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18173 (the_low_target): Add new members.
18174 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18175 (i386_store_fpxregset): Constify.
18176 (target_regsets): Add new kind identifier.
18177 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18178 (i386_set_pc): Add debugging.
18179 (i386_breakpoint_at): New function.
18180 (the_low_target): Add new members.
18181 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18182 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18183 (mips_breakpoint_at): New.
18184 (the_low_target): Add new members.
18185 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18186 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18187 (the_low_target): Add new members.
18188 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18189 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18190 (the_low_target): Add new members.
18191 * linux-x86-64-low.c (target_regsets): Add new kind
18194 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18196 From Martin Pool <mbp@samba.org>:
18197 * server.c (gdbserver_usage): New function.
18200 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18202 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18203 stop_at -> stop_pc.
18205 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18207 * Makefile.in: Remove obsolete code.
18209 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18211 * linux-low.c (regsets_fetch_inferior_registers),
18212 (regsets_store_inferior_registers): Removed cast to int from
18214 * regcache.h: Added declaration of struct inferior_info.
18216 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18218 * inferiors.c (struct inferior_info): Add regcache_data.
18219 (add_inferior): Call create_register_cache.
18220 (clear_inferiors): Call free_register_cache.
18221 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18222 * regcache.c (struct inferior_regcache_data): New.
18223 (registers): Remove.
18224 (get_regcache): New function.
18225 (create_register_cache, free_register_cache): New functions.
18226 (set_register_cache): Don't initialize the register cache here.
18227 (registers_to_string, registers_from_string, register_data): Call
18229 * regcache.h: Add prototypes.
18230 * server.h: Likewise.
18232 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18234 * mem-break.c: New file.
18235 * mem-break.h: New file.
18236 * Makefile.in: Add mem-break.o rule; update server.h
18238 * inferiors.c (struct inferior_info): Add target_data
18240 (clear_inferiors): Free target_data member if set.
18241 (inferior_target_data, set_inferior_target_data): New functions.
18242 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18243 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18244 * linux-low.c (linux_bp_reinsert): New variable.
18245 (struct inferior_linux_data): New.
18246 (linux_create_inferior): Use set_inferior_target_data.
18247 (linux_attach): Likewise. Call add_inferior.
18248 (linux_wait_for_one_inferior): New function.
18249 (linux_wait): Call it.
18250 (linux_write_memory): Add const.
18251 (initialize_low): Call set_breakpoint_data.
18252 * linux-low.h (struct linux_target_ops): Add breakpoint
18254 * server.c (attach_inferior): Remove extra add_inferior
18256 * server.h: Include mem-break.h. Update inferior.c
18258 * target.c (read_inferior_memory)
18259 (write_inferior_memory): New functions.
18260 * target.h (read_inferior_memory)
18261 (write_inferior_memory): Change macros to prototypes.
18262 (struct target_ops): Update comments. Add const to write_memory
18265 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18267 * linux-low.c (usr_store_inferior_registers): Support
18268 registers which are allowed to fail to store.
18269 * linux-low.h (linux_target_ops): Likewise.
18270 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18271 (ppc_cannot_store_register): FPSCR may not be storable.
18273 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18275 * server.h: Include <string.h> if HAVE_STRING_H.
18276 * ChangeLog: Correct paths in last ChangeLog entry.
18278 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18280 * linux-low.h: Remove obsolete prototypes.
18281 (struct linux_target_ops): New.
18282 (extern the_low_target): New.
18283 * linux-low.c (num_regs, regmap): Remove declarations.
18284 (register_addr): Use the_low_target explicitly.
18285 (fetch_register): Likewise.
18286 (usr_fetch_inferior_registers): Likewise.
18287 (usr_store_inferior_registers): Likewise.
18288 * linux-arm-low.c (num_regs): Remove.
18289 (arm_num_regs): Define.
18290 (arm_regmap): Renamed from regmap, made static.
18291 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18293 (arm_cannot_store_register): Renamed from cannot_store_register,
18295 (the_low_target): New.
18296 * linux-i386-low.c (num_regs): Remove.
18297 (i386_num_regs): Define.
18298 (i386_regmap): Renamed from regmap, made static.
18299 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18301 (i386_cannot_store_register): Renamed from cannot_store_register,
18303 (the_low_target): New.
18304 * linux-ia64-low.c (num_regs): Remove.
18305 (ia64_num_regs): Define.
18306 (ia64_regmap): Renamed from regmap, made static.
18307 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18309 (ia64_cannot_store_register): Renamed from cannot_store_register,
18311 (the_low_target): New.
18312 * linux-m68k-low.c (num_regs): Remove.
18313 (m68k_num_regs): Define.
18314 (m68k_regmap): Renamed from regmap, made static.
18315 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18317 (m68k_cannot_store_register): Renamed from cannot_store_register,
18319 (the_low_target): New.
18320 * linux-mips-low.c (num_regs): Remove.
18321 (mips_num_regs): Define.
18322 (mips_regmap): Renamed from regmap, made static.
18323 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18325 (mips_cannot_store_register): Renamed from cannot_store_register,
18327 (the_low_target): New.
18328 * linux-ppc-low.c (num_regs): Remove.
18329 (ppc_num_regs): Define.
18330 (ppc_regmap): Renamed from regmap, made static.
18331 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18333 (ppc_cannot_store_register): Renamed from cannot_store_register,
18335 (the_low_target): New.
18336 * linux-s390-low.c (num_regs): Remove.
18337 (s390_num_regs): Define.
18338 (s390_regmap): Renamed from regmap, made static.
18339 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18341 (s390_cannot_store_register): Renamed from cannot_store_register,
18343 (the_low_target): New.
18344 * linux-sh-low.c (num_regs): Remove.
18345 (sh_num_regs): Define.
18346 (sh_regmap): Renamed from regmap, made static.
18347 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18349 (sh_cannot_store_register): Renamed from cannot_store_register,
18351 (the_low_target): New.
18352 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18353 (the_low_target): New.
18355 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18357 * Makefile.in: Add stamp-h target.
18358 * configure.in: Create stamp-h.
18359 * configure: Regenerated.
18361 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18363 * inferiors.c: New file.
18364 * target.c: New file.
18365 * target.h: New file.
18366 * Makefile.in: Add target.o and inferiors.o. Update
18368 * linux-low.c (inferior_pid): New static variable,
18369 moved from server.c.
18370 (linux_create_inferior): Renamed from create_inferior.
18371 Call add_inferior. Return 0 on success instead of a PID.
18372 (linux_attach): Renamed from myattach.
18373 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18374 (linux_thread_alive): Renamed from mythread_alive.
18375 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18377 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18378 (regsets_store_inferior_registers): Correct error message.
18379 Add missing ``return 0''.
18380 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18381 (linux_store_registers): Renamed from store_inferior_registers.
18382 (linux_read_memory): Renamed from read_inferior_memory.
18383 (linux_write_memory): Renamed from write_inferior_memory.
18384 (linux_target_ops): New structure.
18385 (initialize_low): Call set_target_ops ().
18386 * remote-utils.c (unhexify): New function.
18387 (hexify): New function.
18388 (input_interrupt): Send signals to ``signal_pid''.
18389 * server.c (inferior_pid): Remove.
18390 (start_inferior): Update create_inferior call.
18391 (attach_inferior): Call add_inferior.
18392 (handle_query): New function.
18393 (main): Call handle_query for `q' packets.
18394 * server.h: Include "target.h". Remove obsolete prototypes.
18395 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18397 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18399 * Makefile.in: Add WARN_CFLAGS. Update configury
18401 * configure.in: Check for <string.h>
18402 * configure: Regenerate.
18403 * config.in: Regenerate.
18404 * gdbreplay.c: Include needed system headers.
18405 (remote_open): Remove strchr prototype.
18406 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18407 * regcache.c (supply_register): Change buf argument to const void *.
18408 (supply_register_by_name): Likewise.
18409 (collect_register): Change buf argument to void *.
18410 (collect_register_by_name): Likewise.
18411 * regcache.h: Add missing prototypes.
18412 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18413 * server.c (handle_query): New function.
18414 (attached): New static variable, moved out of main.
18415 (main): Quiet longjmp clobber warnings.
18416 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18417 * utils.c (error): Remove NORETURN.