1 2020-02-07 Tom Tromey <tom@tromey.com>
2 Pedro Alves <palves@redhat.com>
4 * README: Update build documentation.
5 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
7 * configure.ac: Update paths.
9 * acinclude.m4: Update paths.
10 * Makefile.in: Update include paths.
11 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
12 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
13 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
14 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
15 (%-generated.c): Update paths.
16 * Move entire directory from ../gdb/gdbserver.
18 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
20 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
22 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
24 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
25 assignment instead of srv_linux_obj.
27 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
29 * server.c (handle_qxfer_libraries): Write segment-address with
32 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
34 * Makefile.in (install-strip): New target.
35 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
36 * aclocal.m4: Regenerate.
37 * configure: Regenerate.
38 * configure.ac: Add AM_PROG_INSTALL_STRIP.
40 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
42 * Makefile.in (SFILES): Adjust paths to point to real files.
43 (OBS): Move waitstatus.o to target/waitstatus.o.
44 (TAGS): Transform paths appropriately.
46 (nat/%.o): ... this pattern rule.
48 (target/%.o): ... this pattern rule.
49 * configure.srv: Adjust paths throughout to include nat/ prefix
50 with the revant files.
51 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
52 * configure: Regenerate.
54 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
56 * Makefile.in (TAGS): Remove config files from the recipe.
58 2020-01-14 Tom Tromey <tom@tromey.com>
61 * configure.ac: Remove any checks that were added to common.m4.
62 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
65 2020-01-14 Tom Tromey <tom@tromey.com>
67 * server.h: Include config.h.
68 * gdbreplay.c: Include config.h.
70 * configure.ac: Don't source common.host.
71 * acinclude.m4: Update path.
72 * Makefile.in (INCSUPPORT): New variable.
73 (INCLUDE_CFLAGS): Add INCSUPPORT.
74 (SFILES): Update paths.
75 (version-generated.c): Update path to create-version.sh.
76 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
78 2020-01-14 Tom Tromey <tom@tromey.com>
80 * configure.ac (LIBS): Use WIN32APILIBS.
81 (USE_WIN32API): Don't define.
84 2020-01-14 Tom Tromey <tom@tromey.com>
88 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
90 * Makefile.in (%-generated.c): Remove rule for files from
93 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
95 * configure: Re-generate.
97 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
99 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
101 * tracepoint.c (stop_tracing, flush_trace_buffer,
102 about_to_request_buffer_space, get_trace_state_variable_value,
103 set_trace_state_variable_value, gdb_collect): Add declaration.
105 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
107 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
108 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
109 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
110 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
111 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
114 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
116 * inferiors.c: Include gdbsupport/common-inferior.h.
118 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
120 * hostio-errno.c: Include hostio.h.
122 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
124 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
127 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
129 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
130 * linux-arm-tdesc.h: Include arch/arm.h.
132 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
134 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
136 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
138 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
139 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
141 2020-01-10 Pedro Alves <palves@redhat.com>
143 * fork-child.c (post_fork_inferior): Pass target down to
145 * inferiors.c (switch_to_thread): Add process_stratum_target
147 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
148 * nto-low.c (nto_target_ops): Now a process_stratum_target.
149 * linux-low.c (linux_target_ops): Now a process_stratum_target.
150 * remote-utils.c (prepare_resume_reply): Pass the target to
152 * target.c (the_target): Now a process_stratum_target.
153 (done_accessing_memory): Pass the target to switch_to_thread.
154 (set_target_ops): Ajust to use process_stratum_target.
155 * target.h (struct target_ops): Rename to ...
156 (struct process_stratum_target): ... this.
157 (the_target, set_target_ops): Adjust.
158 (prepare_to_access_memory): Adjust comment.
159 * win32-low.c (child_xfer_memory): Adjust to use
160 process_stratum_target.
161 (win32_target_ops): Now a process_stratum_target.
163 2020-01-06 Eli Zaretskii <eliz@gnu.org>
164 Pedro Alves <palves@redhat.com>
166 * win32-low.c (get_child_debug_event): Extract the fatal exception
167 from the exit status and convert to the equivalent Posix signal
169 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
170 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
172 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
174 * Makefile.in: Use INSTALL_PROGRAM_ENV.
176 2020-01-01 Joel Brobecker <brobecker@adacore.com>
178 * server.c (gdbserver_version): Change copyright year to 2020.
179 * gdbreplay.c (gdbreplay_version): Likewise.
181 2019-12-19 Christian Biesinger <cbiesinger@google.com>
183 * configure: Regenerate.
184 * configure.ac: Quote variable arguments of test.
186 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
188 * Makefile.in: Fix build with GNU Make 3.81
190 2019-12-16 Tom Tromey <tromey@adacore.com>
192 * server.c (get_exec_file): Constify result.
194 2019-12-10 Christian Biesinger <cbiesinger@google.com>
196 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
197 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
198 * config.in: Regenerate.
199 * configure: Regenerate.
200 * configure.ac: Don't check for strerror.
201 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
202 Call safe_strerror instead of strerror.
203 * server.h (strerror): Remove this now-unnecessary declaration.
204 * tracepoint.c (init_named_socket): Call safe_strerror instead of
206 (gdb_agent_helper_thread): Likewise.
207 * utils.c (perror_with_name): Likewise.
209 2019-11-26 Tom Tromey <tom@tromey.com>
211 * configure, config.in: Rebuild.
213 2019-11-26 Tom Tromey <tom@tromey.com>
215 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
216 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
218 * configure, config.in: Rebuild.
220 2019-11-26 Tom Tromey <tom@tromey.com>
222 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
223 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
224 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
225 * acinclude.m4: Include ax_pthread.m4.
226 * config.in, configure: Rebuild.
228 2019-11-26 Christian Biesinger <cbiesinger@google.com>
230 * debug.c (debug_set_output): Call safe_strerror instead of
232 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
233 (linux_kill_one_lwp): Likewise.
234 (linux_detach_one_lwp): Likewise.
235 (linux_wait_for_event_filtered): Likewise.
236 (store_register): Likewise.
237 * lynx-low.c (lynx_attach): Likewise.
238 * mem-break.c (insert_memory_breakpoint): Likewise.
239 (remove_memory_breakpoint): Likewise.
240 (delete_fast_tracepoint_jump): Likewise.
241 (set_fast_tracepoint_jump): Likewise.
242 (uninsert_fast_tracepoint_jumps_at): Likewise.
243 (reinsert_fast_tracepoint_jumps_at): Likewise.
244 * nto-low.c (nto_xfer_memory): Likewise.
245 (nto_resume): Likewise.
247 2019-11-20 Luis Machado <luis.machado@linaro.org>
249 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
250 instead of register count.
251 * tdesc.c (tdesc_contains_feature): New function.
252 * tdesc.h (tdesc_contains_feature): New prototype.
254 2019-11-15 Christian Biesinger <cbiesinger@google.com>
256 * Makefile.in: Add safe-strerror.c.
257 * configure: Regenerate.
258 * configure.ac: Don't source common.host.
260 2019-11-15 Christian Biesinger <cbiesinger@google.com>
262 * config.in: Regenerate.
263 * configure: Regenerate.
265 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
267 * ax.c (ax_printf): Handle size_t_arg.
269 2019-11-06 Christian Biesinger <cbiesinger@google.com>
271 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
272 * mi/mi-main.c (output_cores): Likewise.
273 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
274 (linux_xfer_osdata_modules): Likewise.
275 * remote.c (register_remote_support_xml): Likewise.
276 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
277 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
279 2019-11-01 Christian Biesinger <cbiesinger@google.com>
281 * configure: Regenerate.
282 * configure.ac: Remove check for strerror_r.
284 2019-10-31 Christian Biesinger <cbiesinger@google.com>
286 * config.in: Regenerate.
287 * configure: Regenerate.
288 * configure.ac: Also check for strerror_r.
290 2019-10-31 Christian Biesinger <cbiesinger@google.com>
292 * ax.h (debug_agent): Remove duplicate declaration.
294 2019-10-26 Tom de Vries <tdevries@suse.de>
296 * linux-aarch64-low.c: Fix typos in comments.
297 * linux-arm-low.c: Same.
299 * linux-ppc-low.c: Same.
300 * proc-service.c: Same.
303 * tracepoint.c: Same.
306 2019-10-25 Tom Tromey <tromey@adacore.com>
308 * utils.c (xstrdup): Remove.
310 2019-10-23 Tom Tromey <tom@tromey.com>
312 * configure, config.in: Rebuild.
314 2019-10-23 Tom Tromey <tom@tromey.com>
316 * configure: Rebuild.
317 * acinclude.m4: Use m4_include, not sinclude.
319 2019-10-17 Tom Tromey <tromey@adacore.com>
321 * configure: Rebuild.
322 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
323 in AC_CONFIG_FILES invocation.
324 * Makefile.in (stamp-h, Makefile): Use new-style config.status
327 2019-10-16 Christian Biesinger <cbiesinger@google.com>
329 * server.c: Include xml-builtin.h.
330 (get_xml_features): Don't declare xml_builtins here.
332 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
334 * Makefile.in: Remove references to vec-ipa.o.
336 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
338 * Makefile.in: Remove references to vec.c.
340 2019-10-02 Christian Biesinger <cbiesinger@google.com>
342 * server.c (server_waiting): Change to bool.
343 (extended_protocol): Likewise.
344 (response_needed): Likewise.
345 (exit_requested): Likewise.
346 (run_once): Likewise.
347 (report_no_resumed): Likewise.
348 (non_stop): Likewise.
349 (disable_packet_vCont): Likewise.
350 (disable_packet_Tthread): Likewise.
351 (disable_packet_qC): Likewise.
352 (disable_packet_qfThreadInfo): Likewise.
353 (handle_general_set): Update.
354 (handle_detach): Update.
355 (handle_monitor_command): Update.
356 (handle_query): Update.
357 (captured_main): Update.
358 (process_serial_event): Update.
359 * server.h (server_waiting): Change to bool.
360 (disable_packet_vCont): Likewise.
361 (disable_packet_Tthread): Likewise.
362 (disable_packet_qC): Likewise.
363 (disable_packet_qfThreadInfo): Likewise.
364 (run_once): Likewise.
365 (non_stop): Likewise.
366 * target.c (target_stop_and_wait): Update.
368 2019-10-02 Tom Tromey <tromey@adacore.com>
370 * Makefile.in (SFILES): Add common-inferior.c.
371 (OBS): Add common-inferior.o.
372 * server.c (startup_with_shell): Don't define.
374 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
376 * linux-low.c (linux_low_read_btrace): Update for change to
379 2019-09-20 Christian Biesinger <cbiesinger@google.com>
381 * debug.c (debug_threads): Remove comment in favor of the header.
382 * debug.h (using_threads): Add declaration.
383 (debug_threads): Add comment.
384 * linux-aarch64-low.c: Include debug.h and remove declaration of
386 * nto-low.c: Likewise.
387 * remote-utils.c: Likewise.
388 * thread-db.c: Likewise.
390 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
392 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
393 and powerpc-cell64l-ipa.o.
394 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
395 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
396 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
399 * spu-low.c: Remove file.
401 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
402 (parse_spufs_run): Remove.
403 (ppc_get_pc): Remove Cell/B.E. support.
404 (ppc_set_pc): Likewise.
405 (ppc_breakpoint_at): Likewise.
406 (ppc_arch_setup): Likewise.
407 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
408 tdesc_powerpc_cell32l.
409 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
410 or init_registers_powerpc_cell32l.
411 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
412 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
413 or init_registers_powerpc_cell32l.
414 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
415 (init_registers_powerpc_cell32l): Remove prototype.
416 (init_registers_powerpc_cell64l): Likewise.
418 * target.h (struct target_ops): Remove qxfer_spu member.
419 * server.c (handle_qxfer_spu): Remove.
420 (qxfer_packets): Remove entry for "spu".
421 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
422 * linux-low.c (SPUFS_MAGIC): Remove.
423 (spu_enumerate_spu_ids): Remove.
424 (linux_qxfer_spu): Remove.
425 (linux_target_ops): Remove qxfer_spu member.
426 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
427 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
428 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
430 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
432 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
433 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
434 * config.in: Regenerate.
435 * configure: Regenerate.
437 2019-08-15 Tom Tromey <tromey@adacore.com>
439 * target.c (target_write_memory): Use gdb::byte_vector.
441 2019-08-15 Tom Tromey <tromey@adacore.com>
443 * tracepoint.c (write_inferior_data_pointer)
444 (write_inferior_integer, write_inferior_int8)
445 (write_inferior_uinteger, m_tracepoint_action_download)
446 (r_tracepoint_action_download, x_tracepoint_action_download)
447 (l_tracepoint_action_download, clear_inferior_trace_buffer)
448 (download_agent_expr, download_tracepoint_1)
449 (download_trace_state_variables, upload_fast_traceframes): Update.
450 * server.c (gdb_write_memory): Update.
451 * remote-utils.c (relocate_instruction): Update.
452 * proc-service.c (ps_pdwrite): Update.
453 * mem-break.c (remove_memory_breakpoint)
454 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
455 (uninsert_fast_tracepoint_jumps_at)
456 (reinsert_fast_tracepoint_jumps_at): Update.
457 * linux-x86-low.c (append_insns)
458 (i386_install_fast_tracepoint_jump_pad)
459 (amd64_write_goto_address, i386_write_goto_address): Update.
460 * linux-s390-low.c (append_insns, s390_write_goto_address):
462 * linux-ppc-low.c (ppc_relocate_instruction)
463 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
464 (ppc_write_goto_address): Update.
465 * linux-aarch64-low.c (append_insns): Update.
466 * target.h (struct target_ops): Update.
467 (write_inferior_memory): Don't declare.
468 * target.c (target_write_memory): Rename from
469 write_inferior_memory. Remove old target_write_memory.
471 2019-08-15 Tom Tromey <tromey@adacore.com>
473 * target.c (write_inferior_memory): Use std::vector.
475 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
478 * configure.ac: Drop enable-libmcheck support.
479 * configure, config.in: Rebuild.
480 * acinclude.m4: Don't include it.
482 2019-07-19 Alan Hayward <alan.hayward@arm.com>
484 * configure.srv: Remove Arm xml files.
486 2019-07-19 Alan Hayward <alan.hayward@arm.com>
488 * configure.srv: Add new files. Remove xml generated files.
489 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
491 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
492 * linux-aarch32-tdesc.c: New file.
493 * linux-aarch32-tdesc.h: New file.
494 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
495 * linux-arm-low.c (init_registers_arm, tdesc_arm)
496 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
497 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
498 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
499 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
500 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
501 (arm_read_description): Call arm_linux_read_description.
502 (initialize_low_arch): Don't init registers.
503 * linux-arm-tdesc.c: New file.
504 * linux-arm-tdesc.h: New file.
506 2019-07-10 Alan Hayward <alan.hayward@arm.com>
508 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
509 Move counter inside for.
510 (arm_read_description): Check ptrace earlier.
511 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
513 2019-07-09 Tom Tromey <tom@tromey.com>
515 * configure: Rebuild.
516 * configure.ac: Change common to gdbsupport.
517 * acinclude.m4: Change common to gdbsupport.
518 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
519 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
520 common to gdbsupport.
521 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
522 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
523 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
524 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
525 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
526 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
527 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
528 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
529 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
530 common to gdbsupport.
532 2019-07-04 Alan Hayward <alan.hayward@arm.com>
534 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
536 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
538 2019-07-04 Alan Hayward <alan.hayward@arm.com>
540 * configure.srv: Remove legacy xml.
541 * linux-aarch64-low.c (initialize_low_arch): Remove
542 initialize_low_tdesc call.
543 * linux-aarch64-tdesc-selftest.c: Remove file.
544 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
545 * linux-x86-low.c (initialize_low_arch): Remove
546 initialize_low_tdesc call.
547 * linux-x86-tdesc-selftest.c: Remove file.
548 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
550 2019-06-20 Tom de Vries <tdevries@suse.de>
552 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
553 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
555 2019-06-19 Tom de Vries <tdevries@suse.de>
557 * debug.h (debug_write): Change return type to ssize_t.
558 * debug.c (debug_write): Same.
560 2019-06-14 Tom Tromey <tom@tromey.com>
562 * configure.ac: Use new path to gnulib.
563 * configure: Rebuild.
564 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
567 2019-06-11 Tom Tromey <tom@tromey.com>
569 * Makefile.in (SFILES): Add alloc.c.
571 (IPA_OBJS): Add alloc-ipa.o.
572 (alloc-ipa.o): New target.
573 (%.o: ../%.c): New pattern rule.
575 2019-06-10 Tom Tromey <tromey@adacore.com>
577 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
578 end warning with a newline.
579 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
581 * thread-db.c (attach_thread): Don't end warning with a newline.
582 (thread_db_notice_clone): Likewise.
583 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
585 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
586 end warning with a newline.
588 2019-06-04 Pedro Alves <palves@redhat.com>
590 * server.c (captured_main): Use make_unique_xstrdup.
592 2019-06-02 Tom Tromey <tom@tromey.com>
594 * gdbreplay.c (fromhex): Remove.
595 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
597 2019-05-29 Tom Tromey <tromey@adacore.com>
599 * configure: Rebuild.
601 2019-05-06 Kevin Buettner <kevinb@redhat.com>
603 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
604 sign extension code on 32-bit builds.
606 2019-05-03 Eli Zaretskii <eliz@gnu.org>
609 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
611 2019-04-19 Tom Tromey <tom@tromey.com>
613 * server.c (struct vstop_notif): Derive from notif_event.
615 (queue_stop_reply): Update.
616 (remove_all_on_match_ptid): Change type. Rewrite.
617 (discard_queued_stop_replies): Rewrite.
618 (in_queued_stop_replies_ptid): Change type.
619 (in_queued_stop_replies): Rewrite.
620 (notif_stop): Update.
621 (queue_stop_reply_callback): Update.
622 (captured_main): Don't call initialize_notif.
623 (push_stop_notification): Update.
624 * notif.c (notif_write_event, handle_notif_ack)
625 (notif_event_enque, notif_push): Update.
626 (notif_event_xfree, initialize_notif): Remove.
627 * notif.h (struct notif_event): Include <list>, not
629 (struct notif_server) <queue>: Now a std::list.
630 (notif_event_p): Remove typedef.
631 (initialize_notif): Don't declare.
632 (struct notif_event): Add virtual destructor.
634 2019-04-17 Alan Hayward <alan.hayward@arm.com>
636 * ax.c (ax_vdebug): Call debug_printf.
637 * debug.c (debug_write): New function.
638 * debug.h (debug_write): New declaration.
639 * linux-low.c (sigchld_handler): Call debug_write.
641 2019-04-17 Alan Hayward <alan.hayward@arm.com>
643 * debug.c (debug_set_output): New function.
644 (debug_vprintf): Send output to debug_file.
645 (debug_flush): Likewise.
646 * debug.h (debug_set_output): New declaration.
647 * server.c (handle_monitor_command): Add debug-file option.
648 (captured_main): Likewise.
650 2019-04-17 Alan Hayward <alan.hayward@arm.com>
652 * debug.c (remote_debug): Add definition.
653 * debug.h (remote_debug): Add declaration.
654 * hostio.c (remote_debug): Remove declaration.
655 * remote-utils.c (struct ui_file): Likewise.
656 (remote_debug): Likewise.
657 * remote-utils.h (remote_debug): Likewise,
658 * server.c (remote_debug): Remove definition.
660 2019-04-10 Kevin Buettner <kevinb@redhat.com>
662 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
663 when using a 64-bit gdbserver.
665 2019-04-09 Tom Tromey <tromey@adacore.com>
667 * linux-low.c (select_event_lwp): Use find_thread_in_random.
669 2019-04-08 Tom Tromey <tom@tromey.com>
671 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
673 (linux_resume_one_lwp): Likewise.
675 2019-04-08 Tom Tromey <tom@tromey.com>
677 * gdbreplay.c: Update.
678 * linux-low.c: Update.
681 2019-04-08 Tom Tromey <tom@tromey.com>
683 * server.c: Use C++ exception handling.
684 * linux-low.c: Use C++ exception handling.
685 * gdbreplay.c: Use C++ exception handling.
687 2019-04-08 Tom Tromey <tom@tromey.com>
689 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
690 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
691 (captured_main, main): Update.
692 * gdbreplay.c (main): Update.
694 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
696 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
697 value in argument pointer, return 1 if the entry is found and 0
698 otherwise. Move comment.
699 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
700 * linux-low.h (linux_get_auxv): Declare.
701 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
703 2019-04-05 Tom Tromey <tromey@adacore.com>
705 * server.c (gdbserver_usage): Use upper-case for metasyntactic
708 2019-03-28 Alan Hayward <alan.hayward@arm.com>
710 * linux-low.c (AT_HWCAP2): Add define if not already included.
712 2019-03-26 Alan Hayward <alan.hayward@arm.com>
714 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
715 (aarch64_arch_setup): Call linux_get_hwcap.
716 * linux-arm-low.c (arm_get_hwcap): Remove function.
717 (arm_read_description): Call linux_get_hwcap.
718 * linux-low.c (linux_get_auxv): New function.
719 (linux_get_hwcap): Likewise.
720 (linux_get_hwcap2): Likewise.
721 * linux-low.h (linux_get_hwcap): New declaration.
722 (linux_get_hwcap2): Likewise.
723 * linux-ppc-low.c (ppc_get_auxv): Remove function.
724 (ppc_arch_setup): Call linux_get_hwcap.
725 * linux-s390-low.c (s390_get_hwcap): Remove function.
726 (s390_arch_setup): Call linux_get_hwcap.
728 2019-03-22 Alan Hayward <alan.hayward@arm.com>
729 Jiong Wang <jiong.wang@arm.com>
731 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
732 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
734 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
736 2019-03-22 Alan Hayward <alan.hayward@arm.com>
737 Jiong Wang <jiong.wang@arm.com>
739 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
740 (aarch64_get_hwcap): New function.
741 (aarch64_arch_setup): Read APIA hwcap.
743 2019-03-22 Alan Hayward <alan.hayward@arm.com>
744 Jiong Wang <jiong.wang@arm.com>
746 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
747 (initialize_low_tracepoint): Likewise.
748 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
749 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
750 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
751 (aarch64_linux_read_description): Likewise.
752 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
754 2019-03-12 John Baldwin <jhb@FreeBSD.org>
756 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
757 i386_create_target_description for 'segments' parameter.
758 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
759 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
760 * win32-i386-low.c (i386_arch_setup): Likewise.
762 2019-03-12 Tom Tromey <tromey@adacore.com>
764 * linux-low.c (iterate_over_lwps): Update.
766 2019-03-06 Tom Tromey <tom@tromey.com>
768 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
769 (captured_main): Use SCOPE_EXIT.
771 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
773 * configure.srv: Use '$enable_unittest' instead of '$development'
774 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
777 2019-02-27 Tom Tromey <tromey@adacore.com>
779 * gdbreplay.c (logchar): Handle \r\n.
781 2019-02-07 Alan Hayward <alan.hayward@arm.com>
783 * linux-low.c (linux_attach): Add process before lwp.
784 * server.c (attach_inferior): Check if already attached.
786 2019-02-07 Tom Tromey <tom@tromey.com>
788 * x86-tdesc.h: Rename include guard.
789 * x86-low.h: Add include guard.
790 * wincecompat.h: Rename include guard.
791 * win32-low.h: Add include guard.
792 * utils.h: Rename include guard.
793 * tracepoint.h: Rename include guard.
794 * tdesc.h: Rename include guard.
795 * target.h: Rename include guard.
796 * server.h: Rename include guard.
797 * remote-utils.h: Rename include guard.
798 * regcache.h: Rename include guard.
799 * nto-low.h: Rename include guard.
800 * notif.h: Add include guard.
801 * mem-break.h: Rename include guard.
802 * lynx-low.h: Add include guard.
803 * linux-x86-tdesc.h: Add include guard.
804 * linux-s390-tdesc.h: Add include guard.
805 * linux-ppc-tdesc-init.h: Add include guard.
806 * linux-low.h: Add include guard.
807 * linux-aarch64-tdesc.h: Add include guard.
808 * linux-aarch32-low.h: Add include guard.
809 * inferiors.h: Rename include guard.
810 * i387-fp.h: Rename include guard.
811 * hostio.h: Rename include guard.
812 * gdbthread.h: Rename include guard.
813 * gdb_proc_service.h: Rename include guard.
814 * event-loop.h: Rename include guard.
815 * dll.h: Rename include guard.
816 * debug.h: Rename include guard.
817 * ax.h: Rename include guard.
819 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
822 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
823 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
825 2019-01-25 Tom Tromey <tom@tromey.com>
827 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
829 2019-01-25 Tom Tromey <tom@tromey.com>
831 * win32-low.c: Fix common/ includes.
832 * win32-i386-low.c: Fix common/ includes.
833 * tracepoint.c: Fix common/ includes.
834 * thread-db.c: Fix common/ includes.
835 * target.h: Fix common/ includes.
836 * symbol.c: Fix common/ includes.
837 * spu-low.c: Fix common/ includes.
838 * server.h: Fix common/ includes.
839 * server.c: Fix common/ includes.
840 * remote-utils.c: Fix common/ includes.
841 * regcache.h: Fix common/ includes.
842 * regcache.c: Fix common/ includes.
843 * nto-x86-low.c: Fix common/ includes.
844 * notif.h: Fix common/ includes.
845 * mem-break.h: Fix common/ includes.
846 * lynx-low.c: Fix common/ includes.
847 * lynx-i386-low.c: Fix common/ includes.
848 * linux-x86-tdesc-selftest.c: Fix common/ includes.
849 * linux-x86-low.c: Fix common/ includes.
850 * linux-low.c: Fix common/ includes.
851 * inferiors.h: Fix common/ includes.
852 * i387-fp.c: Fix common/ includes.
853 * hostio.c: Fix common/ includes.
854 * hostio-errno.c: Fix common/ includes.
855 * gdbthread.h: Fix common/ includes.
856 * gdbreplay.c: Fix common/ includes.
857 * fork-child.c: Fix common/ includes.
858 * event-loop.c: Fix common/ includes.
860 (enum gdb_agent_op): Fix common/ includes.
862 2019-01-21 Tom Tromey <tom@tromey.com>
864 * tracepoint.c: Fix includes.
865 * remote-utils.c: Fix includes.
866 * linux-x86-low.c: Fix includes.
868 2019-01-01 Joel Brobecker <brobecker@adacore.com>
870 * gdbreplay.c (gdbreplay_version): Update copyright year in
872 * server.c (gdbserver_version): Likewise.
874 2018-12-05 Alan Hayward <alan.hayward@arm.com>
876 * linux-low.c (add_lwp): Switch ordering.
878 2018-11-29 Tom Tromey <tom@tromey.com>
880 * win32-low.c (win32_join): Take pid, not process.
881 * target.h (struct target_ops) <join>: Change argument type.
882 (join_inferior): Change argument name.
883 * spu-low.c (spu_join): Take pid, not process.
884 * server.c (handle_detach): Preserve pid before destroying
886 * lynx-low.c (lynx_join): Take pid, not process.
887 * linux-low.c (linux_join): Take pid, not process.
889 2018-11-23 Alan Hayward <alan.hayward@arm.com>
891 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
892 (aarch64_cannot_fetch_register): Likewise.
893 (struct linux_target_ops): Update references.
895 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
897 * linux-ppc-low.c: Include nat/linux-ptrace.h.
899 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
901 * configure.srv (ipa_ppc_linux_regobj): Add
902 powerpc-isa207-htm-vsx32l-ipa.o and
903 powerpc-isa207-htm-vsx64l-ipa.o.
904 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
905 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
906 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
907 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
908 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
909 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
910 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
911 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
912 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
913 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
914 (init_registers_powerpc_isa207_htm_vsx32l)
915 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
916 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
917 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
918 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
919 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
920 (ppc_store_tm_ctarregset): New functions.
921 (ppc_regsets): Add entries for HTM regsets.
922 (ppc_arch_setup): Set htm in features struct when needed. Set
923 sizes for the HTM regsets.
924 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
925 (initialize_low_arch): Call
926 init_registers_powerpc_isa207_htm_vsx32l and
927 init_registers_powerpc_isa207_htm_vsx64l.
928 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
929 PPC_TDESC_ISA207_HTM_VSX.
930 (initialize_low_tracepoint): Call
931 init_registers_powerpc_isa207_htm_vsx32l and
932 init_registers_powerpc_isa207_htm_vsx64l.
934 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
936 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
937 rs6000/power-linux-pmu.xml to srv_xmlfiles.
938 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
939 (ppc_store_pmuregset): New functions.
940 (ppc_regsets): Add entries for ebb and pmu regsets.
941 (ppc_arch_setup): Set isa207 in features struct if the ebb and
942 pmu regsets are available. Set sizes for these regsets.
944 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
946 * configure.srv (ipa_ppc_linux_regobj): Add
947 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
948 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
949 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
950 rs6000/powerpc-isa207-vsx32l.xml, and
951 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
952 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
953 <PPC_TDESC_ISA207_VSX>: New enum value.
954 (init_registers_powerpc_isa207_vsx32l): Declare.
955 (init_registers_powerpc_isa207_vsx64l): Declare.
956 * linux-ppc-low.c (ppc_fill_tarregset): New function.
957 (ppc_store_tarregset): New function.
958 (ppc_regsets): Add entry for the TAR regset.
959 (ppc_arch_setup): Set isa207 in features struct when needed. Set
960 size for the TAR regsets.
961 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
962 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
963 and init_registers_powerpc_isa207_vsx64l.
964 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
965 (initialize_low_tracepoint): Call
966 init_registers_powerpc_isa207_vsx32l and
967 init_registers_powerpc_isa207_vsx64l.
969 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
970 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
972 * configure.srv (ipa_ppc_linux_regobj): Add
973 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
974 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
975 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
976 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
977 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
978 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
979 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
980 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
981 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
982 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
983 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
984 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
985 (ppc_hwcap): Add comment.
986 (ppc_hwcap2): New global.
987 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
988 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
989 (ppc_regsets): Add entries for the DSCR and PPR regsets.
990 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
991 when needed. Set sizes for the the DSCR and PPR regsets.
992 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
993 (initialize_low_arch): Call
994 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
995 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
996 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
997 PPC_TDESC_ISA205_PPR_DSCR_VSX.
998 (initialize_low_tracepoint): Call
999 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1000 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1002 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1004 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1006 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1007 Simon Marchi <simark@simark.ca>
1009 * acinclude.m4: Include "../selftest.m4".
1010 * configure: Regenerate.
1011 * configure.ac: Use "GDB_AC_SELFTEST".
1012 * configure.srv: Use "$enable_unittests" instead of
1013 "$development" when checking whether unit tests have been
1015 * server.c (captured_main): Update message informing that
1016 selftests have been disabled.
1018 2018-10-04 Tom Tromey <tom@tromey.com>
1020 * configure: Rebuild.
1022 2018-10-04 Tom Tromey <tom@tromey.com>
1024 * server.c (handle_status): Rename inner "thread".
1025 (process_serial_event): Declare "res" in 'm' case.
1026 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1027 (iterate_over_lwps): Rename inner "thread".
1028 (linux_qxfer_libraries_svr4): Rename inner "len".
1029 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1031 2018-10-01 Gary Benson <gbenson@redhat.com>
1033 * gdb_proc_service.h: Moved common code to
1034 common/gdb_proc_service.h.
1036 2018-10-01 Gary Benson <gbenson@redhat.com>
1038 * gdb_proc_service.h: Synchronize comments and whitespace with
1039 GDB's version of this file.
1041 2018-09-25 Tom Tromey <tom@tromey.com>
1043 * configure: Rebuild.
1044 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1046 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1048 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1049 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1050 ($(IPA_LIB)): Sort IPA_OBJS.
1052 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1054 * Makefile.in: Remove references to $(ADD_DEPS).
1056 2018-09-16 Tom Tromey <tom@tromey.com>
1058 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1060 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1063 2018-09-05 Tom Tromey <tom@tromey.com>
1065 * configure: Rebuild.
1067 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1070 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1072 2018-08-27 Tom Tromey <tom@tromey.com>
1075 * configure: Rebuild.
1077 2018-08-27 Tom Tromey <tom@tromey.com>
1079 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1080 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1081 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1082 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1083 (s390x_emit_stack_adjust): Add casts to unsigned char.
1085 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1089 * server.h (struct client_state) <disable_randomization>:
1092 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1094 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1096 (mips_supply_ptrace_register): Likewise.
1098 2018-07-22 Tom Tromey <tom@tromey.com>
1100 * configure: Rebuild.
1102 2018-07-22 Tom Tromey <tom@tromey.com>
1104 * win32-low.c (win32_create_inferior): Remove unused variables.
1105 * gdbreplay.c (remote_open): Remove unused variable.
1106 * remote-utils.c (remote_prepare): Remove unused variable.
1107 * x86-tdesc.h (X86_TDESC_H): Define.
1108 (amd64_expedite_regs): Define conditionally.
1109 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1110 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1111 * remote-utils.c (readchar): Remove unused variable.
1113 2018-07-13 Pedro Alves <palves@redhat.com>
1115 * linux-low.c (linux_kill): Change parameter to process_info
1116 pointer instead of pid. Adjust.
1117 * lynx-low.c (lynx_kill): Likewise.
1118 * nto-low.c (nto_kill): Likewise.
1119 * spu-low.c (spu_kill): Likewise.
1120 * win32-low.c (win32_kill): Likewise.
1121 * server.c (handle_v_kill, kill_inferior_callback)
1122 (detach_or_kill_for_exit): Adjust.
1123 * target.c (kill_inferior): Change parameter to process_info
1124 pointer instead of pid. Adjust.
1125 * target.h (struct target_ops) <kill>: Change parameter to
1126 process_info pointer instead of pid. Adjust all implementations
1128 (kill_inferior): Likewise.
1130 2018-07-13 Pedro Alves <palves@redhat.com>
1132 * linux-low.c (linux_detach, linux_join): Change parameter to
1133 process_info pointer instead of pid. Adjust.
1134 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1135 * nto-low.c (nto_detach): Likewise.
1136 * spu-low.c (spu_detach, spu_join): Likewise.
1137 * win32-low.c (win32_detach, win32_join): Likewise.
1138 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1139 * target.h (struct target_ops) <detach, join>: Change parameter to
1140 process_info pointer instead of pid. Adjust all implementations
1142 (detach_inferior, join_inferior): Rename 'pid' parameter to
1145 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1146 Jan Kratochvil <jan.kratochvil@redhat.com>
1147 Paul Fertser <fercerpav@gmail.com>
1148 Tsutomu Seki <sekiriki@gmail.com>
1150 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1151 (OBS): Add 'common/netstuff.o'.
1152 (GDBREPLAY_OBS): Likewise.
1153 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1154 (remote_open): Implement support for IPv6
1156 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1158 (handle_accept_event): Accept connections from IPv6 sources.
1159 (remote_prepare): Handle IPv6-style hostnames; implement
1160 support for IPv6 connections.
1161 (remote_open): Implement support for printing connections from
1164 2018-07-11 Pedro Alves <palves@redhat.com>
1167 * mem-break.c (any_persistent_commands): Add process_info
1168 parameter and use it instead of relying on the current process.
1169 Change return type to bool.
1170 * mem-break.h (any_persistent_commands): Add process_info
1171 parameter and change return type to bool.
1172 * server.c (handle_detach): Remove require_running_or_return call.
1173 Look up the process_info for the process we're about to detach.
1174 If not found, return back error to GDB. Adjust
1175 any_persistent_commands call to pass down a process pointer.
1177 2018-07-11 Pedro Alves <palves@redhat.com>
1179 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1180 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1181 instead of collect_register_by_name.
1182 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1183 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1185 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1186 Pedro Alves <palves@redhat.com>
1188 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1190 2018-07-03 Tom Tromey <tom@tromey.com>
1192 * linux-low.c: Update.
1193 * lynx-low.c: Update.
1194 * mem-break.c: Update.
1195 * nto-low.c: Update.
1196 * remote-utils.c: Update.
1198 * spu-low.c: Update.
1200 * win32-low.c: Update.
1202 2018-07-03 Tom Tromey <tom@tromey.com>
1206 2018-07-03 Tom Tromey <tom@tromey.com>
1208 * linux-low.c: Update.
1210 2018-07-03 Tom Tromey <tom@tromey.com>
1214 2018-07-03 Tom Tromey <tom@tromey.com>
1216 * linux-low.c: Update.
1217 * linux-mips-low.c: Update.
1218 * lynx-low.c: Update.
1219 * nto-low.c: Update.
1220 * remote-utils.c: Update.
1222 * spu-low.c: Update.
1224 * thread-db.c: Update.
1226 2018-07-03 Tom Tromey <tom@tromey.com>
1228 * linux-low.c: Update.
1229 * linux-mips-low.c: Update.
1230 * lynx-low.c: Update.
1231 * mem-break.c: Update.
1232 * nto-low.c: Update.
1233 * remote-utils.c: Update.
1235 * spu-low.c: Update.
1237 * tracepoint.c: Update.
1239 2018-07-03 Tom Tromey <tom@tromey.com>
1241 * linux-low.c: Update.
1242 * linux-ppc-low.c: Update.
1243 * linux-x86-low.c: Update.
1244 * proc-service.c: Update.
1246 * spu-low.c: Update.
1247 * thread-db.c: Update.
1248 * win32-low.c: Update.
1250 2018-07-03 Tom Tromey <tom@tromey.com>
1252 * linux-low.c: Update.
1253 * lynx-low.c: Update.
1254 * nto-low.c: Update.
1255 * remote-utils.c: Update.
1256 * spu-low.c: Update.
1257 * thread-db.c: Update.
1258 * win32-low.c: Update.
1260 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1262 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1263 parameter in call to 'amd64_create_target_description'.
1265 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1267 * x86-tdesc.h: Remove executable permission flag.
1269 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1271 * configure.ac: Remove AC_PREREQ, add missing quoting.
1272 * configure: Re-generate.
1273 * config.in: Re-generate.
1274 * aclocal.m4: Re-generate.
1276 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1278 * tracepoint.h (current_traceframe): Remove declaration.
1280 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1282 * linux-aarch64-low.c (is_sve_tdesc): New function.
1283 (aarch64_sve_regs_copy_to_regcache): Likewise.
1284 (aarch64_sve_regs_copy_from_regcache): Likewise.
1285 (aarch64_regs_info): Add SVE checks.
1286 (initialize_low_arch): Initialize SVE.
1288 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1290 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1292 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1294 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1295 (initialize_low_tracepoint): Likewise
1296 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1297 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1299 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1301 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1303 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1305 * server.h (PBUFSIZ): Increase size
1307 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1309 * regcache.c (regcache::raw_compare): New function.
1310 * regcache.h (regcache::raw_compare): New declaration.
1312 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1314 * regcache.c (new_register_cache): Use new.
1315 (free_register_cache): Use delete.
1316 (register_data): Use const.
1317 (supply_register): Move body inside regcache.
1318 (regcache::raw_supply): New override function.
1319 (collect_register): Move body inside regcache.
1320 (regcache::raw_collect): New override function.
1321 (regcache::get_register_status): New override function.
1322 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1324 2018-06-09 Tom Tromey <tom@tromey.com>
1326 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1328 (event_queue): Use std::queue.
1329 (gdb_event_xfree): Remove.
1330 (initialize_event_loop, process_event, wait_for_event): Update.
1332 2018-06-08 Stan Cox <scox@redhat.com>
1334 * win32-low.c (win32_create_inferior): last_ptid and last_status
1335 moved to client_state.
1337 2018-06-08 Pedro Alves <palves@redhat.com>
1339 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1340 common/common-exceptions.o, common/common-utils.o,
1341 common/errors.o, common/print-utils.o and utils.o.
1342 * gdbreplay.c: Include "common-defs.h" instead of the two
1343 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1344 string.h or alloca.h.
1345 (perror_with_name): Delete.
1346 (remote_open): Use xstrdup instead of strdup.
1347 (main): Rename to ...
1348 (captured_main): ... this.
1351 2018-06-08 Tom Tromey <tom@tromey.com>
1353 * linux-low.c (linux_low_read_btrace): Update.
1355 2018-06-04 Stan Cox <scox@redhat.com>
1357 * server.h (struct client_state): New.
1358 * server.c (cont_thread, general_thread, multi_process)
1359 (report_fork_events, report_vfork_events, report_exec_events)
1360 (report_thread_events, swbreak_feature, hwbreak_feature)
1361 (vCont_supported, disable_randomization, pass_signals)
1362 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1363 Moved to client_state.
1364 * remote-utils.c (remote_debug, noack_mode)
1365 (transport_is_reliable): Moved to client_state.
1366 * tracepoint.c (current_traceframe): Moved to client_state.
1369 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1370 linux-low.c, remote-utils.h, target.c: Use client_state.
1372 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1374 * configure.srv: Add new c/h file.
1376 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1378 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1381 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1383 * gdb.arch/mips-fpregset-core.exp: New test.
1384 * gdb.arch/mips-fpregset-core.c: New test source.
1386 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1389 * hostio.c (require_int): Do not report overflow for integers
1390 between 0xfffffff and 0x7fffffff.
1392 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1394 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1395 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1396 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1398 (the_low_target): Wire them.
1400 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1402 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1403 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1404 mode. Call collect_register_by_name with vscr using
1405 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1406 (ppc_store_vrregset): Add and set vscr_offset variable as in
1407 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1410 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1412 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1413 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1414 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1416 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1418 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1419 (ppc_store_vsxregset): Likewise.
1420 (ppc_fill_vrregset): Likewise.
1421 (ppc_store_vrregset): Likewise.
1422 (ppc_fill_evrregset): Likewise.
1423 (ppc_store_evrregset): Likewise.
1424 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1425 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1428 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1430 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1431 wordsize of the inferior. Call ppc_linux_target_wordsize.
1433 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1435 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1436 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1437 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1438 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1439 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1440 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1441 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1442 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1443 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1444 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1445 (tdesc_powerpc_e500l): Remove.
1446 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1447 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1448 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1449 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1451 (ppc_arch_setup): Remove target description matching code. Fill a
1452 ppc_linux_features struct and call ppc_linux_match_description
1455 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1457 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1458 width of the requested register exceeds the width of the
1460 (mips_cannot_store_register): Likewise.
1462 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1464 * linux-mips-low.c (mips_fetch_register): New function. Update
1466 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1467 (the_low_target): Wire `mips_fetch_register'.
1469 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1471 * lynx-i386-low.c (LYNXOS_178): New macro.
1472 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1473 the layout on LynxOS-178.
1474 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1475 handle floating point registers that are not supported by
1478 2018-05-10 Tom Tromey <tom@tromey.com>
1480 * configure: Rebuild.
1482 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1485 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1486 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1487 Use it to set the expedite_regs field in the given tdesc.
1488 * x86-tdesc.h: New file.
1489 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1490 Adjust following the addition of the new expedite_regs parameter
1491 to init_target_desc.
1492 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1493 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1494 (i386_linux_read_description, amd64_linux_read_description):
1495 Adjust following the addition of the new expedite_regs parameter
1496 to init_target_desc.
1497 * lynx-i386-low.c: #include "x86-tdesc.h".
1498 (lynx_i386_arch_setup): Adjust following the addition of the new
1499 expedite_regs parameter to init_target_desc.
1500 * nto-x86-low.c: #include "x86-tdesc.h".
1501 (nto_x86_arch_setup): Adjust following the addition of the new
1502 expedite_regs parameter to init_target_desc.
1503 * win32-i386-low.c: #include "x86-tdesc.h".
1504 (i386_arch_setup): Adjust following the addition of the new
1505 expedite_regs parameter to init_target_desc.
1507 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1510 * win32-low.c (win32_create_inferior): Add call to my_wait
1511 setting last_status global.
1513 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1516 * win32-low.c (create_process): Only call gdb_tilde_expand if
1517 inferior_cwd is not NULL.
1519 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1521 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1522 registers to the cache if their values have changed.
1523 (i387_xsave_to_cache): Provide default values for x87 control
1524 registers when these features are available, but disabled.
1525 * regcache.c (supply_register_by_name_zeroed): New function.
1526 * regcache.h (supply_register_by_name_zeroed): Declare new
1529 2018-05-07 Tom Tromey <tom@tromey.com>
1531 * configure: Rebuild.
1533 2018-05-04 Tom Tromey <tom@tromey.com>
1535 * configure: Rebuild.
1537 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1538 Pedro Alves <palves@redhat.com>
1540 * linux-aarch64-low.c (aarch64_stopped_data_address):
1543 2018-04-27 Tom Tromey <tom@tromey.com>
1545 * configure: Rebuild.
1547 2018-04-23 Tom Tromey <tom@tromey.com>
1549 * configure: Rebuild.
1551 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1553 * Makefile.in (depcomp): Add "..".
1554 (all_deps_files): New and use it.
1556 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1558 * configure.srv (aarch64*-*-linux*): Don't include xml.
1559 (i[34567]86-*-cygwin*): Likewise.
1560 (i[34567]86-*-linux*): Likewise.
1561 (i[34567]86-*-lynxos*): Likewise.
1562 (i[34567]86-*-mingw32ce*): Likewise.
1563 (i[34567]86-*-mingw*): Likewise.
1564 (i[34567]86-*-nto*): Likewise.
1565 (tic6x-*-uclinux): Likewise.
1566 (x86_64-*-linux*): Likewise.
1567 (x86_64-*-mingw*): Likewise.
1568 (x86_64-*-cygwin*): Likewise.
1570 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1572 * tdesc.c: Remove xml parameter.
1574 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1576 * server.c (get_features_xml): Remove cast.
1577 * tdesc.c (void target_desc::accept): Fill in function.
1578 (tdesc_get_features_xml): Remove old xml creation.
1579 (print_xml_feature::visit_pre): Add xml vistor.
1580 * tdesc.h (struct target_desc): Make xmltarget mutable.
1581 (tdesc_get_features_xml): Remove declaration.
1583 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1585 * tdesc.c (tdesc_architecture_name): Add new function.
1586 (tdesc_osabi_name): Likewise.
1587 (tdesc_get_features_xml): Use new functions.
1589 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1591 * tdesc.c (tdesc_create_flags): Remove.
1592 (tdesc_add_flag): Likewise.
1593 (tdesc_named_type): Likewise.
1594 (tdesc_create_union): Likewise.
1595 (tdesc_create_struct): Likewise.
1596 (tdesc_create_vector): Likewise.
1597 (tdesc_add_bitfield): Likewise.
1598 (tdesc_add_field): Likewise.
1599 (tdesc_set_struct_size): Likewise.
1601 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1603 * tdesc.c (~target_desc): Remove implictly deleted items.
1604 (init_target_desc): Iterate all features.
1605 (tdesc_get_features_xml): Use vector.
1606 (tdesc_create_feature): Create feature.
1607 * tdesc.h (tdesc_feature) Remove
1608 (target_desc): Add features.
1610 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1612 * Makefile.in: Add common/tdesc.c
1613 * tdesc.c (init_target_desc): init all reg_defs from register
1615 (tdesc_create_reg): Create tdesc_reg.
1616 * tdesc.h (tdesc_feature): Add register vector.
1618 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1620 * tdesc.h (struct target_desc) <features>: Change type to
1621 std::vector<std::string>.
1622 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1624 (tdesc_get_features_xml): Likewise.
1625 (tdesc_create_feature): Likewise.
1627 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1629 * regcache.c (find_register_by_number): Return a ref.
1630 (find_regno): Use references.
1631 (register_size): Likewise.
1632 (register_data): Likewise.
1633 * tdesc.c (target_desc::~target_desc): Remove free calls.
1634 (target_desc::operator==): Use std::vector compare.
1635 (init_target_desc): Use reference.
1636 (tdesc_create_reg): Use reg constructors.
1637 * tdesc.h (struct target_desc): Replace pointer with object.
1639 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1641 * regcache.c (find_register_by_number): Make static.
1642 (find_regno): Use find_register_by_number
1643 * regcache.h (struct reg): Remove declaration.
1645 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1647 * tdesc.c (target_desc::~target_desc): Move to here.
1648 (target_desc::operator==): Likewise.
1649 * tdesc.h (target_desc::~target_desc): Move from here.
1650 (target_desc::operator==): Likewise.
1652 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1654 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1656 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1658 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1660 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1661 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1662 and init_registers_s390_gs_linux64.
1664 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1666 * linux-s390-low.c (s390_fill_gs): Remove function.
1667 (s390_fill_gsbc): Remove function.
1668 (s390_regsets): Set fill functions for the guarded storage regsets
1671 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1673 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1674 the word size. Add comment.
1675 (s390_get_wordsize): New function.
1676 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1677 pswm with it. Instead, use s390_get_wordsize to determine the
1678 word size first and derive the correct tdesc from that directly.
1680 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1682 * Makefile.in: Include silent-rules.mk.
1683 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1684 (COMPILE): Add ECHO_CXX.
1685 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1686 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1687 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1688 (version-generated.c): Add ECHO_GEN.
1689 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1690 (IPAGENT_COMPILE): Add ECHO_CXX.
1691 (%-generated.c): Add ECHO_REGDAT.
1693 2018-03-14 Tom Tromey <tom@tromey.com>
1696 * ax.c (ax_printf): Special case for NULL.
1698 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1700 * linux-low.c (linux_qxfer_libraries_svr4): Use
1701 xml_escape_text_append.
1703 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1705 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1707 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1709 * server.c (handle_general_set): Remove unnecessary xstrdup.
1711 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1713 * server.c (parse_debug_format_options): Adjust to
1714 delim_string_to_char_ptr_vec changes.
1715 * thread-db.c (thread_db_load_search): Adjust to
1716 dirnames_to_char_ptr_vec changes.
1718 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1720 * target.h (target_enable_btrace, target_disable_btrace)
1721 (target_read_btrace, target_read_btrace_conf): Turn macro into
1722 inline function. Throw error if target method is not defined.
1723 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1724 check for btrace target method. Be prepared to handle exceptions
1725 from btrace target methods.
1727 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1729 * server.c (captured_main): Change order of error message printed
1730 when the current working directory cannot be found.
1732 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1734 * server.c: Include "filenames.h" and "pathstuff.h".
1735 (program_name): Delete variable.
1736 (program_path): New anonymous class.
1737 (get_exec_wrapper): Use "program_path" instead of
1739 (handle_v_run): Likewise.
1740 (captured_main): Likewise.
1741 (process_serial_event): Likewise.
1743 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1745 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1746 (OBJS): Add "pathstuff.o".
1747 * server.c (current_directory): New global variable.
1748 (captured_main): Initialize "current_directory".
1750 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1752 * tdesc.c: Use common/tdesc.h.
1753 * tdesc.h: Likewise.
1755 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1756 Simon Marchi <simon.marchi@ericsson.com>
1758 * Makefile.in: Switch order of make rules.
1760 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1762 * Makefile.in: Add common directory in build.
1763 * configure.ac: Add common reference.
1764 * configure: Regenerate.
1766 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1768 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1769 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1770 * spu-low.c (spu_target_ops): Likewise.
1771 * win32-low.c (win32_target_ops): Likewise.
1772 * server.c (supported_btrace_packets): Report packets unconditionally.
1773 * target.h (target_ops) <supports_btrace>: Remove.
1774 (target_supports_btrace): Remove.
1776 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1778 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1779 (handle_btrace_disable): Change return type to void. Use exceptions
1781 (handle_btrace_general_set): Catch exception and copy message to
1784 2018-02-08 Tom Tromey <tom@tromey.com>
1786 * linux-low.c (install_software_single_step_breakpoints): Use
1787 make_scoped_restore.
1788 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1789 (do_restore_current_thread_cleanup): Remove.
1790 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1793 2018-02-08 Tom Tromey <tom@tromey.com>
1795 * mem-break.c (set_raw_breakpoint_at): Use
1796 gdb::unique_xmalloc_ptr.
1798 2018-01-30 Pedro Alves <palves@redhat.com>
1801 * target.c (target_terminal::terminal_state): Rename to ...
1802 (target_terminal::m_terminal_state): ... this.
1804 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1806 * linux-low.c (handle_extended_wait): Surround call to
1807 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1809 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1811 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1812 linux_ptrace_attach_fail_reason_string now returning an
1814 (linux_attach): Likewise.
1815 * thread-db.c (attach_thread): Likewise.
1817 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1820 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1821 checking for fs_base/gs_base fields in struct user_regs_struct.
1822 * configure: Regenerate.
1824 2018-01-16 Yao Qi <yao.qi@linaro.org>
1827 * linux-low.c (fetch_register): Call supply_register instead of
1830 2018-01-08 Yao Qi <yao.qi@linaro.org>
1831 Simon Marchi <simon.marchi@ericsson.com>
1833 * Makefile.in (OBS): Remove selftest.o.
1834 * configure.ac: Set srv_selftest_objs if $development is true.
1835 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1836 * configure: Re-generated.
1837 * server.c (captured_main): Wrap variable selftest_filter with
1840 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1842 * server.c (parse_debug_format_options): Return std::string.
1843 (handle_monitor_command, captured_main): Adjust.
1845 2018-01-05 Pedro Alves <palves@redhat.com>
1848 * server.c (captured_main): Pass quiet=false to
1849 save_original_signals_state.
1851 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1853 * gdbreplay.c (gdbreplay_version): Update copyright year in
1855 * server.c (gdbserver_version): Likewise.
1857 2017-12-08 Tom Tromey <tom@tromey.com>
1859 * ax.c (ax_printf): Update.
1861 2017-12-07 Yao Qi <yao.qi@linaro.org>
1863 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1864 aarch64_linux_read_description.
1865 * linux-amd64-ipa.c (idx2mask): New array.
1866 (get_ipa_tdesc): Move idx2mask out.
1867 (initialize_low_tracepoint): Initialize target descriptions.
1868 * linux-i386-ipa.c (idx2mask): New array.
1869 (get_ipa_tdesc): Move idx2mask out.
1870 (initialize_low_tracepoint): Initialize target descriptions.
1872 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1874 * tdesc.c (struct tdesc_type): Change return type.
1875 (tdesc_add_flag): Change parameter type.
1876 (tdesc_add_bitfield): Likewise.
1877 (tdesc_add_field): Likewise.
1878 (tdesc_set_struct_size): Likewise.
1880 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1882 * regcache.c (registers_to_string): Remove unused variable.
1884 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1886 * inferiors.c (for_each_inferior_with_data): Remove.
1887 * inferiors.h (for_each_inferior_with_data): Remove.
1888 * server.c (handle_qxfer_threads_worker): Change parameter type.
1889 (handle_qxfer_threads_proper): Use for_each_thread.
1891 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1893 * inferiors.c (for_each_inferior): Remove.
1894 (clear_inferiors): Use for_each_thread.
1895 * inferiors.h (for_each_inferior): Remove.
1896 * linux-low.c (linux_wait_for_event_filtered): Use
1898 (linux_stabilize_threads): Likewise.
1899 * regcache.c (regcache_release): Likewise.
1900 * server.c (gdb_wants_all_threads_stopped): Likewise.
1901 (clear_pending_status_callback): Remove.
1902 (handle_status): Use for_each_thread.
1903 (captured_main): Likewise.
1904 * win32-low.c (child_init_thread_list): Likewise.
1905 (win32_clear_inferiors): Likewise.
1906 (fake_breakpoint_event): Likewise.
1908 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1910 * inferiors.h (find_inferior): Remove.
1911 * inferiors.c (find_inferior): Remove.
1913 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1915 * linux-low.c (resume_status_pending_p): Update comment.
1916 (need_step_over_p): Update comment.
1918 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1920 * linux-low.c (proceed_one_lwp): Return void, change parameter
1922 (unsuspend_and_proceed_one_lwp): Likewise.
1923 (proceed_all_lwps): Use for_each_thread.
1924 (unstop_all_lwps): Likewise.
1926 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1928 * linux-low.c (linux_resume_one_thread): Return void, take
1930 (linux_resume): Use for_each_thread.
1932 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1934 * linux-low.c (send_sigstop_callback): Return void, change
1935 parameter type. Rename to...
1936 (send_sigstop): ... this.
1937 (suspend_and_send_sigstop_callback): Return void, change parameter
1939 (suspend_and_send_sigstop): ... this.
1940 (stop_all_lwps): Use for_each_thread.
1942 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1944 * linux-low.c (lwp_running): Return bool, remove unused
1946 (linux_stabilize_threads): Use find_thread.
1948 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1950 * linux-low.c (select_singlestep_lwp_callback): Remove.
1951 (count_events_callback): Remove.
1952 (select_event_lwp_callback): Remove.
1953 (select_event_lwp): Use find_thread/for_each_thread.
1955 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1957 * linux-low.c (not_stopped_callback): Return bool, take filter
1959 (linux_wait_for_event_filtered): Use find_thread.
1960 (linux_wait_1): Likewise.
1962 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1964 * linux-low.c (same_lwp): Remove.
1965 (find_lwp_pid): Use find_thread.
1967 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1969 * linux-low.c (delete_lwp_callback): Remove.
1970 (linux_mourn): Use for_each_thread.
1972 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1974 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1975 args parameter, don't check for pid.
1976 (linux_detach): Use for_each_thread.
1978 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1980 * linux-low.c (struct counter): Remove.
1981 (second_thread_of_pid_p): Remove.
1982 (last_thread_of_process_p): Use find_thread.
1984 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1986 * inferiors.c (find_inferior_in_random): Remove.
1987 * inferiors.h (find_inferior_in_random): Remove.
1988 * linux-low.c (status_pending_p_callback): Return bool, accept
1989 parameter ptid directly.
1990 (linux_wait_for_event_filtered): Use find_thread_in_random.
1991 (linux_wait_1): Likewise.
1993 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1995 * inferiors.c (find_inferior_id): Remove.
1996 (find_thread_ptid): Move implemention from find_inferior_id to
1998 * inferiors.h (find_inferior_id): Remove.
1999 * server.c (handle_status): Use find_thread_ptid.
2000 (process_serial_event): Likewise.
2001 * thread-db.c (find_one_thread): Likewise.
2002 (thread_db_thread_handle): Likewise.
2003 * win32-low.c (thread_rec): Likewise.
2004 (child_delete_thread): Likewise.
2005 (win32_thread_alive): Likewise.
2006 (get_child_debug_event): Likewise.
2008 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2010 * linux-mips-low.c (update_watch_registers_callback): Return
2011 void, remove pid_p parameter, don't check for pid.
2012 (mips_insert_point, mips_remove_point): Use for_each_thread.
2014 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2016 * lynx.low (lynx_delete_thread_callback): Remove.
2017 (lynx_mourn): Use for_each_thread.
2019 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2021 * regcache.c (regcache_invalidate_one): Remove.
2022 (regcache_invalidate_pid): use for_each_thread.
2024 2017-11-26 Tom Tromey <tom@tromey.com>
2026 * linux-low.c (linux_create_inferior): Update.
2028 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2030 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2032 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2034 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2035 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2036 * linux-aarch64-tdesc-selftest.c: New file.
2037 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2039 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2041 * configure.srv: Add new file.
2042 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2043 * linux-aarch64-tdesc-selftest.c: New file.
2044 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2046 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2048 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2049 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2050 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2052 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2054 * configure.srv: Add new files.
2055 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2056 aarch64_linux_read_description.
2057 * linux-aarch64-low.c (aarch64_linux_read_description):
2058 Merge with aarch64_arch_setup.
2059 (aarch64_arch_setup): Call aarch64_linux_read_description.
2060 * linux-aarch64-tdesc.c: New file.
2061 * linux-aarch64-tdesc.h: New file.
2063 2017-11-24 Yao Qi <yao.qi@linaro.org>
2065 * configure.srv: Set $srv_regobj for tic6x-linux.
2066 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2067 (tic6x_read_description): Move some code to tic6x_arch_setup.
2068 (tic6x_tdesc_test): New function.
2069 (initialize_low_arch): Call selftests::register_test.
2071 2017-11-22 Yao Qi <yao.qi@linaro.org>
2073 * remote-utils.c (prepare_resume_reply): Use memcpy.
2075 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2077 * linux-low.c (kill_one_lwp_callback): Return void, take
2078 argument directly, don't filter on pid.
2079 (linux_kill): Use for_each_thread.
2081 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2083 * linux-low.c (need_step_over_p): Return bool, remove dummy
2085 (linux_resume, proceed_all_lwps): Use find_thread.
2087 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2089 * linux-low.c (resume_status_pending_p): Return bool, remove
2091 (linux_resume): Use find_thread.
2093 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2095 * linux-low.c (struct thread_resume_array): Remove.
2096 (linux_set_resume_request): Return void, take arguments
2098 (linux_resume): Use for_each_thread.
2100 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2102 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2103 return bool, remove data argument.
2104 (linux_stabilize_threads): Use find_thread.
2106 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2108 * linux-low.c (unsuspend_one_lwp): Remove.
2109 (unsuspend_all_lwps): Use for_each_thread, inline code from
2112 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2114 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2115 * linux-low.c (struct iterate_over_lwps_args): Remove.
2116 (iterate_over_lwps_filter): Remove.
2117 (iterate_over_lwps): Use find_thread.
2119 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2121 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2122 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2123 code from reset_lwp_ptrace_options_callback.
2125 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2127 * linux-arm-low.c (struct update_registers_data): Remove.
2128 (update_registers_callback): Return void, take arguments
2129 directly, don't check thread's pid.
2130 (arm_insert_point, arm_remove_point): Use for_each_thread.
2132 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2134 * win32-low.c (continue_one_thread): Return void, take argument
2136 (child_continue): Use for_each_thread.
2138 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2140 * win32-i386-low.c (update_debug_registers_callback): Rename
2142 (update_debug_registers): ... this, return void, remove pid_p arg.
2143 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2145 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2147 * inferiors.h (struct process_info): Add constructor, initialize
2149 <syscalls_to_catch>: Change type to std::vector<int>.
2150 * inferiors.c (add_process): Allocate process_info with new.
2151 (remove_process): Free process_info with delete.
2152 * linux-low.c (handle_extended_wait): Adjust.
2153 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2154 * server.c (handle_general_set): Adjust.
2156 2017-11-16 Pedro Alves <palves@redhat.com>
2158 * remote-utils.c (remote_close): Block SIGIO signals instead of
2159 uninstalling the SIGIO handler.
2161 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2163 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2165 2017-11-16 Yao Qi <yao.qi@linaro.org>
2167 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2168 (tic6x_store_gregset): Likewise.
2169 (tic6x_usrregs_info): Move it up.
2171 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2173 * Makefile.in: Update arch rules.
2174 * configure.srv: Explicitly mark arch/ files.
2176 2017-11-13 Andreas Schwab <schwab@suse.de>
2178 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2180 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2182 2017-11-06 Pedro Alves <palves@redhat.com>
2184 * config.in, configure: Regenerate.
2186 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2188 * target.c (struct thread_search): Remove.
2189 (thread_search_callback): Remove.
2190 (prepare_to_access_memory): Use for_each_thread instead of
2191 find_inferior. Inline code from thread_search_callback.
2193 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2195 * server.c (struct visit_actioned_threads_data): Remove.
2196 (visit_actioned_threads): Change prototype to take arguments
2198 (resume): Use find_thread instead of find_inferior.
2200 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2202 * server.c (queue_stop_reply_callback): Change prototype, return
2204 (find_status_pending_thread_callback): Remove.
2205 (handle_status): Replace find_inferior with find_thread and
2208 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2210 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2212 (aarch64_store_gregset): Likewise.
2213 (aarch64_fill_fpregset): Likewise.
2214 (aarch64_store_fpregset): Likewise.
2216 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2218 * gdbthread.h (find_thread, for_each_thread): New functions.
2219 * inferiors.c (thread_of_pid): Remove.
2220 (find_any_thread_of_pid): Use find_thread.
2221 * linux-low.c (num_lwps): Use for_each_thread.
2223 2017-10-17 Yao Qi <yao.qi@linaro.org>
2225 * Makefile.in: Remove one rule.
2226 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2228 2017-10-17 Yao Qi <yao.qi@linaro.org>
2230 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2231 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2233 2017-10-17 Yao Qi <yao.qi@linaro.org>
2235 * configure.srv: Rename arm.o with arch/arm.o.
2237 2017-10-17 Yao Qi <yao.qi@linaro.org>
2239 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2240 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2241 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2242 (arch-i386.o, arch-amd64.o): Remove rules.
2243 (arch/%.o): New rule.
2244 Update POSTCOMPILE and COMPILE.pre.
2245 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2246 * configure: Re-generated.
2247 * configure.srv: Replace arch-i386.o with arch/i386.o.
2248 Replace arch-amd64.o with arch/amd64.o.
2250 2017-10-16 Yao Qi <yao.qi@linaro.org>
2252 * configure: Regenerated.
2254 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2256 * inferiors.h: (struct inferior_list): Remove.
2257 (struct inferior_list_entry); Remove.
2258 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2259 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2260 get_first_inferior): Remove.
2261 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2262 find_inferior_id, find_inferior_in_random): Change signature.
2263 * inferiors.c (all_threads): Change type to
2264 std::list<thread_info *>.
2265 (get_thread): Remove macro.
2266 (find_inferior, find_inferior_id): Change signature, implement
2268 (find_inferior_in_random): Change signature, implement using
2269 find_thread_in_random.
2270 (for_each_inferior, for_each_inferior_with_data): Change
2271 signature, implement using for_each_thread.
2272 (add_inferior_to_list, remove_inferior): Remove.
2273 (add_thread, get_first_thread, thread_of_pid,
2274 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2275 (get_first_inferior, one_inferior_p, clear_inferior_list):
2277 (clear_inferiors, get_thread_process): Update.
2278 * gdbthread.h: Include <list>.
2279 (struct thread_info) <entry>: Remove field.
2281 (all_threads): Change type to std::list<thread_info *>.
2282 (get_first_inferior): Add doc.
2283 (find_thread, for_each_thread, find_thread_in_random): New
2285 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2286 * linux-arm-low.c (update_registers_callback): Update.
2287 * linux-low.c (second_thread_of_pid_p): Update.
2288 (kill_one_lwp_callback, linux_detach_lwp_callback,
2289 delete_lwp_callback, status_pending_p_callback, same_lwp,
2290 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2291 iterate_over_lwps, not_stopped_callback,
2292 resume_stopped_resumed_lwps, count_events_callback,
2293 select_singlestep_lwp_callback, select_event_lwp_callback,
2294 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2295 suspend_and_send_sigstop_callback, wait_for_sigstop,
2296 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2297 lwp_running, linux_set_resume_request, resume_status_pending_p,
2298 need_step_over_p, start_step_over, linux_resume_one_thread,
2299 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2300 reset_lwp_ptrace_options_callback): Update.
2301 * linux-mips-low.c (update_watch_registers_callback): Update.
2302 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2304 (free_register_cache_thread_one): Remove.
2305 (regcache_release): Update.
2306 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2307 handle_qxfer_threads_worker): Update.
2308 (handle_query): Update, use list iterator.
2309 (visit_actioned_threads, handle_pending_status,
2310 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2311 clear_pending_status_callback, set_pending_status_callback,
2312 find_status_pending_thread_callback, handle_status,
2313 process_serial_event): Update.
2314 * target.c (thread_search_callback): Update.
2315 * thread-db.c (thread_db_get_tls_address): Update.
2316 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2318 * win32-i386-low.c (update_debug_registers_callback): Update.
2319 * win32-low.c (delete_thread_info, child_delete_thread,
2320 continue_one_thread, suspend_one_thread,
2321 get_child_debug_event): Adjust.
2323 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2325 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2326 * inferiors.h: Include <list>.
2327 (struct process_info) <entry>: Remove field.
2329 (pid_of): Change macro to function.
2330 (ptid_of, lwpid_of): Remove macro.
2331 (all_processes): Change type to std::list<process_info *>.
2332 (ALL_PROCESSES): Remove macro.
2333 (for_each_process, find_process): New function.
2334 * inferiors.c (all_processes): Change type to
2335 std::list<process_info *>.
2336 (find_thread_process): Adjust.
2337 (add_process): Likewise.
2338 (remove_process): Likewise.
2339 (find_process_pid): Likewise.
2340 (get_first_process): Likewise.
2341 (started_inferior_callback): Remove.
2342 (have_started_inferiors_p): Adjust.
2343 (attached_inferior_callback): Remove.
2344 (have_attached_inferiors_p): Adjust.
2345 * linux-low.c (check_zombie_leaders): Likewise.
2346 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2347 (x86_linux_update_xmltarget): Adjust.
2348 * server.c (handle_query): Likewise.
2349 (gdb_reattached_process): Remove.
2350 (handle_status): Adjust.
2351 (kill_inferior_callback): Likewise.
2352 (detach_or_kill_inferior): Remove.
2353 (print_started_pid): Likewise.
2354 (print_attached_pid): Likewise.
2355 (detach_or_kill_for_exit): Update.
2356 (process_serial_event): Likewise.
2357 * linux-arm-low.c (arm_new_fork): Likewise.
2359 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2361 * dll.h: Include <list>.
2362 (struct dll_info): Add constructor.
2363 <entry>: Remove field.
2364 (all_dlls): Change type to std::list<dll_info>.
2365 * dll.c: Include <algorithm>.
2366 (get_dll): Remove macro.
2367 (all_dlls): Change type to std::list<dll_info *>.
2368 (free_one_dll): Remove.
2369 (match_dll): Likewise.
2370 (loaded_dll): Adjust.
2371 (unloaded_dll): Adjust to all_dlls type change, use
2372 std::find_if. Inline code from match_dll.
2373 (clear_dlls): Adjust to all_dlls type change.
2374 * server.c (emit_dll_description): Remove.
2375 (handle_qxfer_libraries): Adjust to all_dlls type change,
2376 integrate emit_dll_description's functionality.
2378 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2380 * linux-low.h (struct linux_target_ops) <delete_process>: New
2382 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2383 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2384 (struct linux_target_ops): Add delete_process callback.
2385 * linux-arm-low.c (arm_delete_process): New.
2386 (struct linux_target_ops): Add delete_process callback.
2387 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2388 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2389 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2390 * linux-mips-low.c (mips_linux_delete_process): New.
2391 (struct linux_target_ops): Add delete_process callback.
2392 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2393 * linux-s390-low.c (struct linux_target_ops): Likewise.
2394 * linux-sh-low.c (struct linux_target_ops): Likewise.
2395 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2396 * linux-tile-low.c (struct linux_target_ops): Likewise.
2397 * linux-x86-low.c (x86_linux_delete_process): New.
2398 (struct linux_target_ops): Add delete_process callback.
2399 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2401 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2403 * linux-aarch64-low.c (the_low_target): Add thread delete
2405 * linux-arm-low.c (arm_delete_thread): New function.
2406 (the_low_target): Add thread delete callback.
2407 * linux-bfin-low.c (the_low_target): Likewise.
2408 * linux-crisv32-low.c (the_low_target): Likewise.
2409 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2411 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2413 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2414 * linux-mips-low.c (mips_linux_delete_thread): New function.
2415 (the_low_target): Add thread delete callback.
2416 * linux-ppc-low.c (the_low_target): Likewise.
2417 * linux-s390-low.c (the_low_target): Likewise.
2418 * linux-sh-low.c (the_low_target): Likewise.
2419 * linux-tic6x-low.c (the_low_target): Likewise.
2420 * linux-tile-low.c (the_low_target): Likewise.
2421 * linux-x86-low.c (the_low_target): Likewise.
2422 * linux-xtensa-low.c (the_low_target): Likewise.
2424 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2426 * win32-low.c: Include "common-inferior.h".
2428 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2430 * inferiors.c (set_inferior_cwd): New function.
2431 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2432 (handle_query): Inform that QSetWorkingDir is supported.
2433 * win32-low.c (create_process): Pass the inferior's cwd to
2436 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2438 * inferiors.c (current_inferior_cwd): New global variable.
2439 (get_inferior_cwd): New function.
2440 * inferiors.h (struct process_info) <cwd>: New field.
2442 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2444 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2445 (OBS): Add gdb_tilde_expand.o.
2447 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2449 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2450 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2452 2017-09-29 Pedro Alves <palves@redhat.com>
2454 * ax.c (gdb_parse_agent_expr): Constify.
2455 * ax.h (gdb_parse_agent_expr): Constify.
2456 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2458 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2459 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2460 * remote-utils.h (read_ptid): Constify.
2461 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2462 (process_point_options, process_serial_event): Constify.
2463 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2464 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2465 (cmd_qtbuffer): Constify.
2467 2017-09-29 Pedro Alves <palves@redhat.com>
2469 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2472 2017-09-29 Pedro Alves <palves@redhat.com>
2474 * linux-low.c (handle_extended_wait): Pass parent thread instead
2475 of process to thread_db_notice_clone.
2476 * linux-low.h (thread_db_notice_clone): Replace parent process
2477 parameter with parent thread parameter.
2478 * thread-db.c (find_one_thread): Add comment.
2479 (thread_db_notice_clone): Replace parent process parameter with
2480 parent thread parameter. Temporarily switch to the parent thread.
2482 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2484 * gdbthread.h: Include "common-gdbthread.h".
2485 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2486 "if" when validating the ptid.
2487 * remote-utils.c: Include "gdbthread.h".
2488 (prepare_resume_reply): Use "switch_to_thread".
2489 * target.c (done_accessing_memory): Likewise.
2491 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2493 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2494 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2495 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2496 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2497 s390x-gs-linux64-ipa.o to ipa_obj.
2498 * linux-s390-low.c (HWCAP_S390_GS): New define.
2499 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2501 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2502 (s390_arch_setup): Check for guarded-storage support and choose
2504 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2505 init_registers_s390x_gs_linux64.
2506 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2508 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2509 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2511 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2513 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2515 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2517 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2518 (thread_db_thread_handle): Declare.
2519 * linux-low.c (linux_target_ops): Initialize thread_handle.
2520 * server.c (handle_qxfer_threads_worker): Add support for
2522 * target.h (struct target_ops): Add new function pointer,
2524 (target_thread_handle): Define.
2525 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2527 (thread_db_thread_handle): New function.
2529 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2531 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2532 * linux-low.h (thread_db_notice_clone): Declare.
2533 * thread-db.c (thread_db_notice_clone): New function.
2535 2017-09-21 Pedro Alves <palves@redhat.com>
2537 * server.c (gdb_read_memory, handle_status, process_serial_event)
2538 (handle_serial_event, handle_target_event): Adjust to
2539 set_desired_thread prototype change.
2540 * target.c (set_desired_thread): Remove 'use_general' parameter
2542 * target.h (set_desired_thread): Remove 'use_general' parameter.
2544 2017-09-20 Tom Tromey <tom@tromey.com>
2546 * target.c (target_terminal::terminal_state): Define.
2547 (target_terminal::init): Rename from target_terminal_init.
2548 (target_terminal::inferior): Rename from
2549 target_terminal_inferior.
2550 (target_terminal::ours): Rename from target_terminal_ours.
2551 (target_terminal::ours_for_output, target_terminal::info): New.
2553 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2555 * server.c (accumulate_file_name_length): Remove.
2556 (emit_dll_description): Adjust to std::string change.
2557 (handle_qxfer_libraries): Use std::string to hold document.
2559 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2561 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2562 return type of xml_escape_text.
2563 * server.c (emit_dll_description): Likewise.
2565 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2567 * server.c (captured_main): Accept argument for --selftest.
2568 Update run_tests call.
2569 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2570 when registering selftests.
2572 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2574 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2575 instead of "VEC" for "target_desc.reg_defs".
2576 (regcache_cpy): Likewise.
2577 (registers_to_string): Likewise.
2578 (registers_from_string): Likewise.
2579 (find_regno): Likewise.
2580 (supply_regblock): Likewise.
2581 (regcache_raw_read_unsigned): Likewise.
2582 * tdesc.c (init_target_desc): Likewise.
2583 (tdesc_create_reg): Likewise.
2584 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2585 (struct target_desc) <reg_defs>: Convert to "std::vector".
2586 (target_desc): Do not initialize "reg_defs".
2587 (~target_desc): Update code to use "std::vector" instead of "VEC"
2588 for "target_desc.reg_defs".
2589 (operator==): Likewise.
2591 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2593 * inferiors.h (thread_to_gdb_id): Remove.
2594 * inferiors.c (thread_to_gdb_id): Remove.
2595 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2596 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2597 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2599 * nto-low.c (nto_fetch_registers, nto_store_registers,
2600 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2602 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2604 * inferiors.h (gdb_id_to_thread_id): Remove.
2605 * inferiors.c (gdb_id_to_thread_id): Remove.
2606 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2607 removal. Move pid declaration closer to where it's used.
2609 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2611 * server.c (handle_detach): New function.
2612 (process_serial_event): Move code out, call handle_detach.
2614 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2616 * server.c (require_running): Rename to ...
2617 (require_running_or_return): ... this ...
2618 (require_running_or_break): ... and this.
2619 (handle_query, process_serial_event): Adjust.
2621 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2623 * linux-low.c (linux_set_resume_request): Remove unused
2626 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2628 * server.c (first_thread_of): Remove.
2629 (process_serial_event): Replace usage of first_thread_of with
2630 find_any_thread_of_pid.
2631 * tracepoint.c (same_process_p): Remove.
2632 (gdb_agent_about_to_close): Replace usage of same_process_p with
2633 find_any_thread_of_pid.
2634 * linux-x86-low.c (same_process_callback): Remove.
2635 (x86_arch_setup_process_callback): Replace usage of
2636 same_process_callback with find_any_thread_of_pid.
2637 * thread-db.c (any_thread_of): Remove.
2638 (switch_to_process): Replace usage of any_thread_of with
2639 find_any_thread_of_pid.
2640 * inferiors.c (thread_pid_matches_callback): Remove.
2641 (find_thread_process): Adjust to use find_any_thread_of_pid.
2643 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2645 * regcache.c (get_thread_regcache): Guard calls to "memset"
2648 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2650 * linux-low.c (handle_extended_wait): Use
2651 "allocate_target_description" instead of "XNEW".
2652 * linux-x86-low.c (initialize_low_arch): Likewise.
2654 2017-09-05 Yao Qi <yao.qi@linaro.org>
2656 * configure.srv (srv_i386_regobj): Remove.
2657 (srv_amd64_regobj): Remove.
2658 (srv_regobj): Set it to "" for x86 non-linux targets.
2659 * linux-x86-tdesc.c (i386_linux_read_description):
2660 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2661 (init_registers_i386): Remove the declaration.
2662 (tdesc_i386): Remove the declaration.
2663 (lynx_i386_arch_setup): Call i386_create_target_description.
2664 * nto-x86-low.c: Likewise.
2665 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2666 [!__x86_64__]: include arch/i386.h.
2667 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2669 2017-09-05 Yao Qi <yao.qi@linaro.org>
2671 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2672 i386/amd64-XXX-linux from it.
2674 2017-09-05 Yao Qi <yao.qi@linaro.org>
2676 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2678 (ipa_amd64_linux_regobj): Remove.
2679 (ipa_x32_linux_regobj): Remove.
2681 2017-09-05 Yao Qi <yao.qi@linaro.org>
2683 * Makefile.in (arch-amd64.o): New rule.
2684 * configure.srv: Append arch-amd64.o.
2685 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2686 (get_ipa_tdesc): Call amd64_linux_read_description.
2687 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2688 and init_registers_amd64_XXX.
2689 * linux-x86-low.c (x86_linux_read_description): Call
2690 amd64_linux_read_description.
2691 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2692 (initialize_low_arch): Don't call init_registers_x32_XXX and
2693 init_registers_amd64_XXX.
2694 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2695 and tdesc_amd64_XXX.
2696 [__x86_64__] (amd64_tdesc_test): New function.
2697 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2698 and init_registers_amd64_XXX.
2699 * linux-x86-tdesc.c: Include arch/amd64.h.
2700 (xcr0_to_tdesc_idx): New function.
2701 (i386_linux_read_description): New function.
2702 (amd64_get_ipa_tdesc_idx): New function.
2703 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2704 (amd64_get_ipa_tdesc): Declare.
2706 2017-09-05 Yao Qi <yao.qi@linaro.org>
2708 * configure.srv (srv_i386_linux_xmlfiles): Remove
2709 i386/i386-XXX-linux.xml from it.
2711 2017-09-05 Yao Qi <yao.qi@linaro.org>
2713 * configure.srv: Set srv_i386_linux_regobj empty if $development
2715 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2716 initialize_low_tdesc.
2717 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2718 with #if initialize_low_tdesc.
2719 * linux-x86-tdesc-selftest.c: New file.
2720 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2722 2017-09-05 Yao Qi <yao.qi@linaro.org>
2724 * Makefile.in (arch-i386.o): New rule.
2725 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2726 (x86_64-*-linux*): Likewise.
2727 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2728 include arch/i386.h.
2729 (i386_linux_read_description): Remove code and call
2730 i386_create_target_description.
2731 * tdesc.c (allocate_target_description): New function.
2732 * tdesc.h (set_tdesc_architecture): Remove declaration.
2733 (set_tdesc_osabi): Likewise.
2735 2017-09-05 Yao Qi <yao.qi@linaro.org>
2737 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2738 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2739 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2741 * server.c (get_features_xml): Call tdesc_get_features_xml.
2742 * tdesc.c (set_tdesc_architecture): New function.
2743 (set_tdesc_osabi): New function.
2744 (tdesc_get_features_xml): New function.
2745 (tdesc_create_feature): Add an argument.
2746 * tdesc.h (struct target_desc) <features>: New field.
2747 <arch, osabi>: New field.
2748 (~target_desc): xfree features, arch, and osabi.
2749 (target_desc::oerator==): Don't compare .xmltarget.
2750 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2751 (set_tdesc_osabi): Likewise.
2752 (tdesc_get_features_xml): Likewise.
2754 2017-09-05 Yao Qi <yao.qi@linaro.org>
2756 * linux-x86-tdesc.c: Include selftest.h.
2757 (i386_tdesc_test): New function.
2758 (initialize_low_tdesc): Call selftests::register_test.
2759 * tdesc.h: Include regdef.h.
2760 (target_desc): Override operator == and !=.
2762 2017-09-05 Yao Qi <yao.qi@linaro.org>
2764 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2765 (ipa_obj): Likewise.
2766 * linux-i386-ipa.c: Include common/x86-xstate.h
2767 (get_ipa_tdesc): Call i386_linux_read_description.
2768 (initialize_low_tracepoint): Don't call init_registers_XXX
2769 functions, call initialize_low_tdesc instead.
2770 * linux-x86-low.c (x86_linux_read_description): Call
2771 i386_linux_read_description.
2772 (initialize_low_arch): Don't call init_registers_i386_XXX
2773 functions, call initialize_low_tdesc.
2774 * linux-x86-tdesc.c: New file.
2775 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2776 (i386_get_ipa_tdesc_idx): Declare.
2777 (i386_get_ipa_tdesc): Declare.
2778 (initialize_low_tdesc): Declare.
2780 2017-09-05 Yao Qi <yao.qi@linaro.org>
2782 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2785 2017-09-05 Yao Qi <yao.qi@linaro.org>
2787 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2788 * regcache.c (get_thread_regcache): Use VEC_length.
2789 (init_register_cache): Likewise.
2790 (regcache_cpy): Likewise.
2791 (registers_to_string): Iterate reg_defs via VEC_iterate.
2792 (find_regno): Likewise.
2793 (find_register_by_number): Use VEC_index.
2794 (register_size): Call find_register_by_number.
2795 (register_data): Call find_register_by_number.
2796 (supply_regblock): Use VEC_length.
2797 (regcache_raw_read_unsigned): Likewise.
2798 * tdesc.c (init_target_desc): Iterate reg_defs via
2800 (default_description): Update initializer.
2801 (copy_target_description): Don't update field num_registers.
2802 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2803 <num_registers>: Remove.
2805 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2807 * Makefile.in (.SECONDARY): Define target.
2809 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2811 * linux-low.c (linux_wait_1): Adjust.
2812 * server.c (queue_stop_reply_callback): Adjust.
2814 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2816 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2817 QEnvironmentUnset and QEnvironmentReset packets.
2818 (handle_query): Inform remote that QEnvironmentHexEncoded,
2819 QEnvironmentUnset and QEnvironmentReset are supported.
2821 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2823 * inferiors.h (inferior_target_data): Rename to ...
2824 (thread_target_data): ... this.
2825 (inferior_regcache_data): Rename to ...
2826 (thread_regcache_data): ... this.
2827 (set_inferior_regcache_data): Rename to ...
2828 (set_thread_regcache_data): ... this.
2829 * inferiors.c (inferior_target_data): Rename to ...
2830 (thread_target_data): ... this.
2831 (inferior_regcache_data): Rename to ...
2832 (thread_regcache_data): ... this.
2833 (set_inferior_regcache_data): Rename to ...
2834 (set_thread_regcache_data): ... this.
2835 (free_one_thread): Update.
2836 * linux-low.h (get_thread_lwp): Update.
2837 * regcache.c (get_thread_regcache): Update.
2838 (regcache_invalidate_thread): Update.
2839 (free_register_cache_thread): Update.
2840 * win32-i386-low.c (update_debug_registers_callback): Update.
2841 (win32_get_current_dr): Update.
2842 * win32-low.c (thread_rec): Update.
2843 (delete_thread_info): Update.
2844 (continue_one_thread): Update.
2845 (suspend_one_thread): Update.
2847 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2849 * inferiors.c (set_inferior_target_data): Remove.
2850 * inferiors.h (set_inferior_target_data): Remove.
2852 2017-08-18 Yao Qi <yao.qi@linaro.org>
2854 * Makefile.in (OBS): Add selftest.o.
2855 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2856 * configure, config.in: Re-generated.
2857 * server.c: Include common/sefltest.h.
2858 (captured_main): Handle option --selftest.
2860 2017-08-09 Yao Qi <yao.qi@linaro.org>
2862 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2863 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2864 i386-avx-mpx.o and i386-mmx.o.
2865 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2866 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2867 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2868 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2869 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2870 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2871 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2872 i386/amd64-avx-mpx.xml.
2874 2017-08-09 Yao Qi <yao.qi@linaro.org>
2876 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2877 and x32-avx-avx512.o.
2878 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2879 i386/x32-avx-avx512.xml.
2881 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2883 * tracepoint.h (enum class fast_tpoint_collect_result): New
2885 (fast_tracepoint_collecting): Change return type to
2886 fast_tpoint_collect_result.
2887 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2888 * linux-low.h: Include tracepoint.h.
2889 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2890 fast_tpoint_collect_result.
2891 * linux-low.c (handle_tracepoints): Adjust.
2892 (linux_fast_tracepoint_collecting): Change return type to
2893 fast_tpoint_collect_result.
2894 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2895 linux_wait_1, stuck_in_jump_pad_callback,
2896 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2897 proceed_one_lwp): Adjust to type change.
2899 2017-07-10 Yao Qi <yao.qi@linaro.org>
2901 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2903 2017-06-29 Yao Qi <yao.qi@linaro.org>
2905 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2907 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2909 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2911 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2913 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2915 * linux-low.c (linux_create_inferior): Adjust code to access the
2916 environment information via 'gdb_environ' class.
2917 * lynx-low.c (lynx_create_inferior): Likewise.
2918 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2919 (get_environ): Return a pointer to 'our_environ'.
2920 (captured_main): Initialize 'our_environ'.
2921 * server.h (get_environ): Adjust prototype.
2922 * spu-low.c (spu_create_inferior): Adjust code to access the
2923 environment information via 'gdb_environ' class.
2925 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2927 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2928 usage of "register" keyword.
2930 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2932 * configure: Re-generate.
2934 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2936 * configure: Re-generate.
2938 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2940 * Makefile.in (COMPILE.pre): Add "-x c++".
2942 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2944 * fork-child.c: Conditionally include <signal.h>.
2946 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2948 * server.c (handle_general_set): Handle new packet
2949 "QStartupWithShell".
2950 (handle_query): Add "QStartupWithShell" to the list of supported
2952 (gdbserver_usage): Add help text explaining the
2953 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2955 (captured_main): Recognize and act upon the presence of the new
2958 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2959 Pedro Alves <palves@redhat.com>
2961 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2962 * configure: Regenerate.
2963 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2965 (i[34567]86-*-lynxos*): Likewise.
2966 (spu*-*-*): Likewise.
2967 * fork-child.c: New file.
2968 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2970 (linux_ptrace_fun): New function.
2971 (linux_create_inferior): Adjust function prototype to reflect
2972 change on "target.h". Adjust function code to use
2974 (linux_request_interrupt): Delete "signal_pid".
2975 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2976 (lynx_ptrace_fun): New function.
2977 (lynx_create_inferior): Adjust function prototype to reflect
2978 change on "target.h". Adjust function code to use
2980 * nto-low.c (nto_create_inferior): Adjust function prototype and
2981 code to reflect change on "target.h". Update comments.
2982 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2983 "common-terminal.h" and "environ.h".
2984 (terminal_fd): Moved to fork-child.c.
2985 (old_foreground_pgrp): Likewise.
2986 (restore_old_foreground_pgrp): Likewise.
2987 (last_status): Make it global.
2988 (last_ptid): Likewise.
2989 (our_environ): New variable.
2990 (startup_with_shell): Likewise.
2991 (program_name): Likewise.
2992 (program_argv): Rename to...
2993 (program_args): ...this.
2994 (wrapper_argv): New variable.
2995 (start_inferior): Delete function.
2996 (get_exec_wrapper): New function.
2997 (get_exec_file): Likewise.
2998 (get_environ): Likewise.
2999 (prefork_hook): Likewise.
3000 (post_fork_inferior): Likewise.
3001 (postfork_hook): Likewise.
3002 (postfork_child_hook): Likewise.
3003 (handle_v_run): Update code to deal with arguments coming from the
3004 remote host. Update calls from "start_inferior" to
3006 (captured_main): Likewise. Initialize environment variable. Call
3008 * server.h (post_fork_inferior): New prototype.
3009 (get_environ): Likewise.
3010 (last_status): Declare.
3011 (last_ptid): Likewise.
3012 (signal_pid): Likewise.
3013 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3014 (spu_ptrace_fun): New function.
3015 (spu_create_inferior): Adjust function prototype to reflect change
3016 on "target.h". Adjust function code to use "fork_inferior".
3017 * target.c (target_terminal_init): New function.
3018 (target_terminal_inferior): Likewise.
3019 (target_terminal_ours): Likewise.
3020 * target.h: Include <vector>.
3021 (struct target_ops) <create_inferior>: Update prototype.
3022 (create_inferior): Update macro.
3023 * utils.c (gdb_flush_out_err): New function.
3024 * win32-low.c (win32_create_inferior): Adjust function prototype
3025 and code to reflect change on "target.h".
3027 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3029 * inferiors.c (switch_to_thread): New function.
3031 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3033 * Makefile.in (SFILE): Add "common/job-control.c".
3034 (OBS): Add "job-control.o".
3036 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3038 * Makefile: Remove "@host_makefile_frag@".
3040 2017-05-05 Pedro Alves <palves@redhat.com>
3042 * configure: Regenerate.
3044 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3046 * configure: Regenerate.
3048 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3050 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3051 software_single_step change of return type to
3052 std::vector<CORE_ADDR>.
3053 * linux-low.c (install_software_single_step_breakpoints):
3055 * linux-low.h (install_software_single_step_breakpoints):
3058 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3060 * remote-utils.c: Include "gdb_termios.h" instead of
3062 * terminal.h: Delete file.
3064 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3066 * server.c: Include <vector>.
3067 <program_argv, wrapper_argv>: Convert to std::vector.
3068 (start_inferior): Rewrite function to use C++.
3069 (handle_v_run): Likewise. Update code that calculates the argv
3070 based on the vRun packet; use C++.
3071 (captured_main): Likewise.
3073 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3075 * server.c (handle_v_cont): Initialize thread_resume::thread
3078 2017-04-05 Pedro Alves <palves@redhat.com>
3080 * configure: Regenerate.
3082 2017-04-05 Pedro Alves <palves@redhat.com>
3084 * gdbreplay.c (sync_error): Constify.
3085 * linux-x86-low.c (push_opcode): Constify.
3087 2017-04-05 Pedro Alves <palves@redhat.com>
3089 * win32-low.c (get_child_debug_event)
3090 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3091 Report TARGET_WAITKIND_SPURIOUS instead.
3093 2017-04-05 Pedro Alves <palves@redhat.com>
3095 * remote-utils.c (remote_prepare, remote_open): Constify.
3096 * remote-utils.h (remote_prepare, remote_open): Constify.
3097 * server.c (captured_main): Constify 'port' handling.
3099 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3101 * Makefile.in (clean): Clear .deps.
3103 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3105 * .gitignore: Remove generated files, replace with wildcard.
3106 * (clean): Replace removal of generated files with wildcard.
3107 (version.c): Replace with...
3108 (version-generated.c): ...this.
3109 (xml-builtin.c): Replace with...
3110 (xml-builtin-generated.c): ...this.
3111 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3112 (%.c: *regformats*): Replace with...
3113 (%-generated.c: *regformats*): ...this.
3115 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3117 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3118 (xtensa_fill_gregset): Call collect_register_by_name for
3120 (xtensa_store_gregset): Call supply_register_by_name for
3123 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3125 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3126 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3127 (xtensa_store_gregset): Call supply_register for all registers in
3128 a0_regnum..a0_regnum + C0_NREGS range.
3130 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3132 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3133 (ax-ipa.o: ax.c): Remove.
3134 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3135 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3136 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3137 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3138 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3140 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3142 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3143 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3144 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3145 (errors-ipa.o: ../common/errors.c): Remove.
3146 (format-ipa.o: ../common/format.c): Remove.
3147 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3149 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3151 * Makefile.in (%-ipa.o: %.c): New rule.
3152 (tracepoint-ipa.o: tracepoint.c): Remove.
3153 (utils-ipa.o: utils.c): Remove.
3154 (remote-utils-ipa.o: remote-utils.c): Remove.
3155 (regcache-ipa.o: regcache.c): Remove.
3156 (i386-linux-ipa.o: i386-linux.c): Remove.
3157 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3158 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3159 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3160 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3161 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3162 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3163 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3164 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3165 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3166 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3167 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3168 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3169 (aarch64-ipa.o: aarch64.c): Remove.
3170 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3171 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3172 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3173 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3174 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3175 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3176 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3177 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3178 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3179 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3180 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3181 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3182 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3183 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3184 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3185 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3186 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3187 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3188 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3189 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3190 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3191 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3192 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3193 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3194 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3195 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3196 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3197 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3198 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3199 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3200 (tdesc-ipa.o: tdesc.c): Remove.
3201 (x32-linux-ipa.o: x32-linux.c): Remove.
3202 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3203 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3205 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3207 * Makefile.in (%.o: ../arch/%.c): New rule.
3208 (arm.o: ../arch/arm.c): Remove.
3209 (arm-linux.o: ../arch/arm-linux.c): Remove.
3210 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3211 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3213 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3215 * Makefile.in (%.o: ../nat/%.c): New rule.
3216 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3217 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3218 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3219 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3220 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3221 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3222 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3223 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3224 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3225 (linux-personality.o: ../nat/linux-personality.c): Remove.
3226 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3227 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3228 (x86-linux.o: ../nat/x86-linux.c): Remove.
3229 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3230 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3232 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3234 * Makefile.in (%.o: ../common/%.c): New rule.
3235 (signals.o: ../common/signals.c): Remove.
3236 (print-utils.o: ../common/print-utils.c): Remove.
3237 (rsp-low.o: ../common/rsp-low.c): Remove.
3238 (common-utils.o: ../common/common-utils.c): Remove.
3239 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3240 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3241 (vec.o: ../common/vec.c): Remove.
3242 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3243 (xml-utils.o: ../common/xml-utils.c): Remove.
3244 (ptid.o: ../common/ptid.c): Remove.
3245 (buffer.o: ../common/buffer.c): Remove.
3246 (format.o: ../common/format.c): Remove.
3247 (filestuff.o: ../common/filestuff.c): Remove.
3248 (agent.o: ../common/agent.c): Remove.
3249 (errors.o: ../common/errors.c): Remove.
3250 (environ.o: ../common/environ.c): Remove.
3251 (common-debug.o: ../common/common-debug.c): Remove.
3252 (cleanups.o: ../common/cleanups.c): Remove.
3253 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3254 (fileio.o: ../common/fileio.c): Remove.
3255 (common-regcache.o: ../common/common-regcache.c): Remove.
3256 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3257 (new-op.o: ../common/new-op.c): Remove.
3258 (btrace-common.o: ../common/btrace-common.c): Remove.
3260 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3262 * Makefile.in (%.o: ../target/%.c): New rule.
3263 (waitstatus.o: ../target/waitstatus.c): Remove.
3265 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3268 (%.c: ../regformats/%.dat,
3269 (%.c: ../regformats/arm/%.dat,
3270 (%.c: ../regformats/i386/%.dat,
3271 (%.c: ../regformats/rs6000/%.dat): New rules.
3272 (aarch64.c): Remove.
3273 (reg-arm.c): Remove.
3274 (arm-with-iwmmxt.c): Remove.
3275 (arm-with-vfpv2.c): Remove.
3276 (arm-with-vfpv3.c): Remove.
3277 (arm-with-neon.c): Remove.
3278 (reg-bfin.c): Remove.
3279 (reg-cris.c): Remove.
3280 (reg-crisv32.c): Remove.
3282 (i386-linux.c): Remove.
3283 (i386-avx.c): Remove.
3284 (i386-avx-linux.c): Remove.
3285 (i386-avx-avx512.c): Remove.
3286 (i386-avx-avx512-linux.c): Remove.
3287 (i386-mpx.c): Remove.
3288 (i386-mpx-linux.c): Remove.
3289 (i386-avx-mpx-avx512-pku.c): Remove.
3290 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3291 (i386-avx-mpx.c): Remove.
3292 (i386-avx-mpx-linux.c): Remove.
3293 (i386-mmx.c): Remove.
3294 (i386-mmx-linux.c): Remove.
3295 (reg-ia64.c): Remove.
3296 (reg-m32r.c): Remove.
3297 (reg-m68k.c): Remove.
3299 (mips-linux.c): Remove.
3300 (mips-dsp-linux.c): Remove.
3301 (mips64-linux.c): Remove.
3302 (mips64-dsp-linux.c): Remove.
3303 (nios2-linux.c): Remove.
3304 (powerpc-32.c): Remove.
3305 (powerpc-32l.c): Remove.
3306 (powerpc-altivec32l.c): Remove.
3307 (powerpc-cell32l.c): Remove.
3308 (powerpc-vsx32l.c): Remove.
3309 (powerpc-isa205-32l.c): Remove.
3310 (powerpc-isa205-altivec32l.c): Remove.
3311 (powerpc-isa205-vsx32l.c): Remove.
3312 (powerpc-e500l.c): Remove.
3313 (powerpc-64l.c): Remove.
3314 (powerpc-altivec64l.c): Remove.
3315 (powerpc-cell64l.c): Remove.
3316 (powerpc-vsx64l.c): Remove.
3317 (powerpc-isa205-64l.c): Remove.
3318 (powerpc-isa205-altivec64l.c): Remove.
3319 (powerpc-isa205-vsx64l.c): Remove.
3320 (s390-linux32.c): Remove.
3321 (s390-linux32v1.c): Remove.
3322 (s390-linux32v2.c): Remove.
3323 (s390-linux64.c): Remove.
3324 (s390-linux64v1.c): Remove.
3325 (s390-linux64v2.c): Remove.
3326 (s390-te-linux64.c): Remove.
3327 (s390-vx-linux64.c): Remove.
3328 (s390-tevx-linux64.c): Remove.
3329 (s390x-linux64.c): Remove.
3330 (s390x-linux64v1.c): Remove.
3331 (s390x-linux64v2.c): Remove.
3332 (s390x-te-linux64.c): Remove.
3333 (s390x-vx-linux64.c): Remove.
3334 (s390x-tevx-linux64.c): Remove.
3335 (tic6x-c64xp-linux.c): Remove.
3336 (tic6x-c64x-linux.c): Remove.
3337 (tic6x-c62x-linux.c): Remove.
3339 (reg-sparc64.c): Remove.
3340 (reg-spu.c): Remove.
3342 (amd64-linux.c): Remove.
3343 (amd64-avx.c): Remove.
3344 (amd64-avx-linux.c): Remove.
3345 (amd64-avx-avx512.c): Remove.
3346 (amd64-avx-avx512-linux.c): Remove.
3347 (amd64-mpx.c): Remove.
3348 (amd64-mpx-linux.c): Remove.
3349 (amd64-avx-mpx-avx512-pku.c): Remove.
3350 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3351 (amd64-avx-mpx.c): Remove.
3352 (amd64-avx-mpx-linux.c): Remove.
3354 (x32-linux.c): Remove.
3355 (x32-avx.c): Remove.
3356 (x32-avx-linux.c): Remove.
3357 (x32-avx-avx512.c): Remove.
3358 (x32-avx-avx512-linux.c): Remove.
3359 (reg-xtensa.c): Remove.
3360 (reg-tilegx.c): Remove.
3361 (reg-tilegx32.c): Remove.
3363 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3365 * Makefile.in (SFILES): Add "common/environ.c".
3366 (OBJS): Add "common/environ.h".
3368 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3370 * configure.ac: Check if the fs_base and gs_base members of
3371 `struct user_regs_struct' exist.
3372 * config.in: Regenerated.
3373 * configure: Likewise.
3375 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3377 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3379 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3380 (get_next_pcs_syscall_next_pc): Likewise.
3382 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3384 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3385 * nto-x86-low.c: Likewise.
3387 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3389 * Makefile.in: Include disable-implicit-rules.mk.
3391 2016-11-23 Pedro Alves <palves@redhat.com>
3393 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3394 (debug_vprintf): Use std::chrono::steady_clock instead of
3395 gettimeofday. Use '.' instead of ':'.
3396 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3397 (get_timestamp): Use std::chrono::steady_clock instead of
3400 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3402 * Makefile.in: Fix whitespace formatting.
3404 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3406 * Makefile.in (SFILES, OBS): Flatten list and order
3409 2016-11-23 Pedro Alves <palves@redhat.com>
3411 * event-loop.c (handle_file_event): Use warning.
3412 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3413 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3416 2016-11-23 Pedro Alves <palves@redhat.com>
3418 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3420 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3421 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3422 debug_printf and debug_flush for debug output.
3423 * server.c (handle_general_set): Likewise.
3424 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3427 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3429 * Makefile.in (.c.o): Replace rule with ...
3430 (%.o: %.c): ... this one.
3432 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3434 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3435 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3437 * configure.ac: Remove checks for the make program.
3438 * configure: Re-generate.
3440 2016-10-28 Pedro Alves <palves@redhat.com>
3442 * Makefile.in (CXX_DIALECT): Get from configure.
3443 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3444 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3445 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3446 * config.in: Regenerate.
3447 * configure: Regenerate.
3449 2016-10-27 Yao Qi <yao.qi@linaro.org>
3451 * linux-low.c (linux_supports_range_stepping): Return true if
3452 can_software_single_step return true.
3454 2016-10-27 Yao Qi <yao.qi@linaro.org>
3456 * inferiors.c (find_inferior_in_random): New function.
3457 * inferiors.h (find_inferior_in_random): Declare.
3458 * linux-low.c (linux_wait_for_event_filtered): Call
3459 find_inferior_in_random instead of find_inferior.
3461 2016-10-27 Yao Qi <yao.qi@linaro.org>
3463 * linux-low.c (linux_wait_1): If single-step breakpoints are
3464 inserted, remove them.
3466 2016-10-26 Pedro Alves <palves@redhat.com>
3468 * linux-low.c (handle_extended_wait): Link parent/child fork
3470 (linux_wait_1): Unlink them.
3471 (linux_set_resume_request): Ignore resume requests for
3472 already-resumed and unhandled fork child threads.
3473 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3474 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3476 (handle_v_requests) <vCont>: Don't call require_running.
3477 * server.h (in_queued_stop_replies): New declaration.
3479 2016-10-24 Yao Qi <yao.qi@linaro.org>
3482 * linux-aarch64-low.c (append_insns): Cast the return value to
3485 2016-10-10 Yao Qi <yao.qi@linaro.org>
3487 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3489 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3491 * target.c (target_supports_multi_process): New function, moved
3493 * target.h (target_supports_multi_process): ... here. Remove
3496 2016-10-05 Tom Tromey <tom@tromey.com>
3499 * tracepoint.c (handle_tracepoint_bkpts): Check
3500 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3502 2016-10-05 Yao Qi <yao.qi@linaro.org>
3504 * configure.srv: Update the path of arm-*.xml files.
3506 2016-10-05 Terry Guo <terry.guo@arm.com>
3507 Yao Qi <yao.qi@linaro.org>
3509 * Makefile.in: Adjust the path of rules.
3510 * configure.srv: Update the path of xml files.
3511 * regformats/arm-with-iwmmxt.dat: Regenerated.
3512 * regformats/arm-with-neon.dat: Likewise.
3513 * regformats/arm-with-vfpv2.dat: Likewise.
3514 * regformats/arm-with-vfpv3.dat Likewise.
3516 2016-09-30 Yao Qi <yao.qi@linaro.org>
3519 * target.c (target_stop_and_wait): Don't call
3520 target_continue_no_signal, use resume_stop instead.
3522 2016-09-26 Yao Qi <yao.qi@linaro.org>
3524 * linux-low.c (linux_wait_1): Call debug_exit.
3526 2016-09-23 Pedro Alves <palves@redhat.com>
3528 * Makefile.in (SFILES): Add common/new-op.c.
3529 (OBS): Add common/new-op.o.
3530 (new-op.o): New rule.
3532 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3534 * .gitinore: Ignore more files.
3536 2016-09-21 Yao Qi <yao.qi@linaro.org>
3538 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3541 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3543 * server.c (start_inferior): Call target_mourn_inferior instead of
3544 mourn_inferior; pass ptid_t argument to it.
3546 (handle_target_event): Likewise.
3547 * target.c (target_mourn_inferior): New function.
3548 * target.h (mourn_inferior): Delete macro.
3550 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3552 * linux-low.c (lwp_is_stepping): New function.
3554 2016-09-06 Carl Love <cel@us.ibm.com>
3556 * server.c (start_inferior): Fixed comment, requested comment change
3557 didn't get updated correctly. Removed reference to ptrace () call as
3558 it is only true on Linux systems.
3560 2016-09-06 Carl Love <cel@us.ibm.com>
3562 * server.c (start_inferior): Do not call
3563 function target_post_create_inferior () if the
3564 inferior process has already exited.
3566 2016-09-05 Pedro Alves <palves@redhat.com>
3568 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3569 (COMPILE.pre, CC_LD): Use CXX directly.
3570 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3571 * acinclude.m4: Don't include build-with-cxx.m4.
3572 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3573 * configure: Regenerate.
3575 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3578 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3579 call writing data to own_buf.
3581 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3583 * target.c (mywait): Call target_wait instead of
3585 (target_wait): New function.
3587 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3589 * server.c (start_inferior): New variable 'ptid'. Replace calls
3590 to the_target->resume by target_continue{,_no_signal}, depending
3592 * target.c (target_stop_and_wait): Call target_continue_no_signal
3593 instead of the_target->resume.
3594 (target_continue): New function.
3596 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3598 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3600 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3603 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3605 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3606 * linux-arm-low.c (ps_get_thread_area): Likewise.
3607 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3608 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3609 * linux-mips-low.c (ps_get_thread_area): Likewise.
3610 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3611 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3612 * linux-x86-low.c (ps_get_thread_area): Likewise.
3613 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3615 2016-08-19 Pedro Alves <palves@redhat.com>
3617 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3619 2016-08-19 Pedro Alves <palves@redhat.com>
3621 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3622 comment. Use memcpy instead of casting through unsigned long.
3624 2016-08-19 Pedro Alves <palves@redhat.com>
3626 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3627 allocating around 0x80000000.
3629 2016-08-19 Pedro Alves <palves@redhat.com>
3632 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3633 (x32-avx512-linux-ipa.o): New rules.
3634 * configure.ac (x86_64-*-linux*): New x32 check.
3635 * configure.srv (ipa_x32_linux_regobj): New.
3636 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3637 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3639 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3641 * configure: Regenerate.
3643 2016-08-09 Pedro Alves <palves@redhat.com>
3646 * Makefile.in (OBS): Add signals-state-save-restore.o.
3647 (signals-state-save-restore.o): New rule.
3648 * config.in: Regenerate.
3649 * configure: Regenerate.
3650 * linux-low.c: Include "signals-state-save-restore.h".
3651 (linux_create_inferior): Call
3652 restore_original_signals_state.
3653 * server.c: Include "dispositions-save-restore.h".
3654 (captured_main): Call save_original_signals_state.
3656 2016-08-05 Pedro Alves <palves@redhat.com>
3658 * configure: Regenerate.
3660 2016-08-04 Yao Qi <yao.qi@linaro.org>
3662 * linux-low.c (regsets_fetch_inferior_registers): Check
3663 errno is ESRCH or not.
3665 2016-08-02 Yao Qi <yao.qi@linaro.org>
3667 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3668 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3669 (thread_db_load_search): Update.
3670 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3671 td_ta_set_event and td_ta_event_getmsg.
3673 2016-07-26 Pedro Alves <palves@redhat.com>
3676 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3677 of unsigned long for 64-bit registers and use uint32_t instead of
3678 unsigned int for 32-bit registers.
3680 2016-07-26 Pedro Alves <palves@redhat.com>
3682 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3685 2016-07-21 Tom Tromey <tom@tromey.com>
3687 * configure: Rebuild.
3689 2016-07-21 Yao Qi <yao.qi@linaro.org>
3691 * mem-break.c (find_gdb_breakpoint): Cast bp to
3692 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3694 2016-07-21 Yao Qi <yao.qi@linaro.org>
3696 * server.c (handle_v_requests): Support s and S actions
3697 if target_supports_software_single_step return true.
3699 2016-07-21 Yao Qi <yao.qi@linaro.org>
3701 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3702 is resume_step, call maybe_hw_step.
3703 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3705 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3707 (proceed_one_lwp): If resume request is resume_step, install
3708 reinsert breakpoints and call maybe_hw_step.
3710 2016-07-21 Yao Qi <yao.qi@linaro.org>
3712 * linux-low.c (proceed_one_lwp): Declare.
3713 (linux_resume_one_thread): Remove local variable 'step'.
3714 Lift code enqueue signal. Call proceed_one_lwp instead of
3715 linux_resume_one_lwp.
3717 2016-07-21 Yao Qi <yao.qi@linaro.org>
3719 * linux-low.c (linux_resume_one_thread): Call
3720 enqueue_pending_signal.
3722 2016-07-21 Yao Qi <yao.qi@linaro.org>
3724 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3725 * inferiors.c (do_restore_current_thread_cleanup): New function.
3726 (make_cleanup_restore_current_thread): Likewise.
3727 * linux-low.c (install_software_single_step_breakpoints): Call
3728 make_cleanup_restore_current_thread. Switch current_thread to
3731 2016-07-21 Yao Qi <yao.qi@linaro.org>
3733 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3734 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3735 (clone_one_breakpoint): Likewise.
3736 (delete_reinsert_breakpoints): Change parameter to thread.
3738 (has_reinsert_breakpoints): Likewise.
3739 (uninsert_reinsert_breakpoints): Likewise.
3740 (reinsert_reinsert_breakpoints): Likewise.
3741 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3742 (delete_reinsert_breakpoints): Likewise.
3743 (reinsert_reinsert_breakpoints): Likewise.
3744 (uninsert_reinsert_breakpoints): Likewise.
3745 (has_reinsert_breakpoints): Likewise.
3747 2016-07-21 Yao Qi <yao.qi@linaro.org>
3749 * inferiors.c (get_thread_process): Make parameter const.
3750 * inferiors.h (get_thread_process): Update declaration.
3751 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3752 Add new parameters child_thread and parent_thread. Callers
3754 * mem-break.h (clone_all_breakpoints): Update declaration.
3756 2016-07-21 Yao Qi <yao.qi@linaro.org>
3758 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3759 <command_list, handler>: Remove.
3760 (struct gdb_breakpoint): New.
3761 (struct other_breakpoint): New.
3762 (struct reinsert_breakpoint): New.
3763 (is_gdb_breakpoint): New function.
3764 (any_persistent_commands): Update command_list if
3765 is_gdb_breakpoint returns true.
3766 (set_breakpoint): Create breakpoints according to their types.
3767 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3768 (set_gdb_breakpoint_1): Likewise.
3769 (set_gdb_breakpoint): Likewise.
3770 (clear_breakpoint_conditions): Change parameter type to
3771 'struct gdb_breakpoint *'.
3772 (clear_breakpoint_commands): Likewise.
3773 (clear_breakpoint_conditions_and_commands): Likewise.
3774 (add_condition_to_breakpoint): Likewise.
3775 (add_breakpoint_condition): Likewise.
3776 (add_commands_to_breakpoint): Likewise.
3777 (check_breakpoints): Check other_breakpoint.
3778 (clone_one_breakpoint): Clone breakpopint according to its type.
3779 * mem-break.h (struct gdb_breakpoint): Declare.
3780 (set_gdb_breakpoint): Update declaration.
3781 (clear_breakpoint_conditions_and_commands): Likewise.
3782 (add_breakpoint_condition): Likewise.
3783 (add_breakpoint_commands): Likewise.
3784 * server.c (process_point_options): Change parameter type to
3785 'struct gdb_breakpoint *'.
3787 2016-07-21 Yao Qi <yao.qi@linaro.org>
3789 * mem-break.c (set_breakpoint_at): Rename it to ...
3790 (set_breakpoint_type_at): ... it.
3791 (set_breakpoint_at): Call set_breakpoint_type_at.
3792 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3793 * mem-break.h (set_breakpoint_at): Update comments.
3795 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3797 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3799 (nios2_store_gregset): Likewise.
3801 2016-07-01 Pedro Alves <palves@redhat.com>
3802 Antoine Tremblay <antoine.tremblay@ericsson.com>
3804 * linux-low.c: Change interface to take the target lwp_info
3805 pointer directly and return void. Handle detaching from a zombie
3807 (linux_detach_lwp_callback): New function.
3808 (linux_detach): Detach from the leader thread after detaching from
3811 2016-06-28 Yao Qi <yao.qi@linaro.org>
3813 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3814 for variable new_offset.
3815 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3816 (aarch64_ftrace_insn_reloc_cb): Likewise.
3817 (aarch64_ftrace_insn_reloc_tb): Likewise.
3818 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3819 PRIx64 instead of PRIx32.
3821 2016-06-28 Yao Qi <yao.qi@linaro.org>
3823 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3824 (the_low_target): Install arm_get_syscall_trapinfo.
3826 2016-06-28 Yao Qi <yao.qi@linaro.org>
3828 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3830 (the_low_target): Install aarch64_get_syscall_trapinfo.
3832 2016-06-28 Yao Qi <yao.qi@linaro.org>
3834 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3836 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3837 Remove parameter sysno.
3838 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3841 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3843 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3844 (s390_emit_ne_goto): Likewise.
3845 (s390_emit_lt_goto): Likewise.
3846 (s390_emit_le_goto): Likewise.
3847 (s390_emit_gt_goto): Likewise.
3848 (s390_emit_ge_goto): Likewise.
3849 (s390x_emit_eq_goto): Likewise.
3850 (s390x_emit_ne_goto): Likewise.
3851 (s390x_emit_lt_goto): Likewise.
3852 (s390x_emit_le_goto): Likewise.
3853 (s390x_emit_gt_goto): Likewise.
3854 (s390x_emit_ge_goto): Likewise.
3855 (s390_emit_ops_impl): Mark variable static.
3856 (s390x_emit_ops): Likewise.
3858 2016-06-17 Yao Qi <yao.qi@linaro.org>
3860 * linux-low.c (handle_extended_wait): Call
3861 uninsert_reinsert_breakpoints for the parent process. Remove
3862 reinsert breakpoints from the child process. Reinsert them to
3863 the parent process when vfork is done.
3864 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3865 (reinsert_reinsert_breakpoints): New function.
3866 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3867 (reinsert_reinsert_breakpoints): Declare.
3869 2016-06-17 Yao Qi <yao.qi@linaro.org>
3871 * linux-low.c (handle_extended_wait): If the parent is doing
3872 step-over, remove the reinsert breakpoints from the forked child.
3874 2016-06-17 Yao Qi <yao.qi@linaro.org>
3876 * linux-low.c (unsuspend_all_lwps): Declare.
3877 (linux_low_filter_event): If thread exited, call finish_step_over.
3878 If step-over is finished, unsuspend other threads.
3880 2016-06-17 Yao Qi <yao.qi@linaro.org>
3882 * linux-low.c (linux_resume_one_lwp_throw): Assert
3883 has_reinsert_breakpoints returns false.
3884 * mem-break.c (delete_disabled_breakpoints): Assert
3885 bp type isn't reinsert_breakpoint.
3887 2016-06-17 Yao Qi <yao.qi@linaro.org>
3889 * linux-low.c (maybe_hw_step): New function.
3890 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3891 (finish_step_over): Switch current_thread to lwp temporarily,
3892 and assert has_reinsert_breakpoints returns true.
3893 (proceed_one_lwp): Call maybe_hw_step.
3894 * mem-break.c (has_reinsert_breakpoints): New function.
3895 * mem-break.h (has_reinsert_breakpoints): Declare.
3897 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3899 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3901 2016-05-17 Yao Qi <yao.qi@linaro.org>
3903 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3904 instead of find_inferior.
3906 2016-05-05 Yao Qi <yao.qi@linaro.org>
3908 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3909 Initialize res to zero.
3911 2016-05-05 Yao Qi <yao.qi@linaro.org>
3913 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3916 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3918 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3919 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3920 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3922 2016-04-28 Par Olsson <par.olsson@windriver.com>
3923 Simon Marchi <simon.marchi@ericsson.com>
3925 * tracepoint.c (write_inferior_int8): New function.
3926 (cmd_qtenable_disable): Write enable flag using
3927 write_inferior_int8.
3929 2016-04-25 Yao Qi <yao.qi@linaro.org>
3931 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3932 (need_step_over_p): Return zero if the LWP has pending signals
3933 can be delivered on software single step target.
3935 2016-04-25 Yao Qi <yao.qi@linaro.org>
3937 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3938 return instead of error.
3940 2016-04-22 Yao Qi <yao.qi@linaro.org>
3942 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3945 2016-04-22 Yao Qi <yao.qi@linaro.org>
3947 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3948 signal when stepping over breakpoint with software single
3951 2016-04-21 Pedro Alves <palves@redhat.com>
3953 * linux-s390-low.c (s390_collect_ptrace_register)
3954 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3956 (s390_check_regset): Use void * instead of gdb_byte *.
3958 2016-04-20 Pedro Alves <palves@redhat.com>
3960 * configure: Renegerate.
3962 2016-04-20 Yao Qi <yao.qi@linaro.org>
3964 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3965 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3967 (arm_store_gregset): Likewise.
3969 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3971 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3972 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3973 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3974 (amd64-avx-mpx-linux.c): New rules.
3975 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3976 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3977 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3978 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3979 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3980 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3981 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3982 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3983 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3984 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3985 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3986 * linux-x86-low.c (x86_linux_read_description): Add case for
3987 X86_XSTATE_AVX_MPX_MASK.
3988 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3989 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3990 init_registers_i386_avx_mpx_linux.
3991 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3992 (initialize_low_tracepoint): Call
3993 init_registers_i386_avx_mpx_linux.
3994 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3995 (initialize_low_tracepoint): Call
3996 init_registers_amd64_avx_mpx_linux.
3997 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3998 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3999 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4002 2016-04-18 Pedro Alves <palves@redhat.com>
4004 * configure: Regenerate.
4006 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4008 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4009 (aarch64_emit_sub): Likewise.
4011 2016-04-12 Pedro Alves <palves@redhat.com>
4013 * utils.c (prepare_to_throw_exception): Delete.
4015 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4017 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4019 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4021 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4023 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4025 * linux-aarch64-ipa.c: Add <elf.h> include.
4026 * linux-ppc-ipa.c: Add <elf.h> include.
4027 * linux-s390-ipa.c: Add <elf.h> include.
4029 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4031 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4032 (get_raw_reg_ptr): Likewise.
4033 (get_trace_state_variable_value_ptr): Likewise.
4034 (set_trace_state_variable_value_ptr): Likewise.
4035 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4038 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4039 Marcin Kościelnicki <koriakin@0x04.net>
4042 * linux-ppc-low.c (emit_insns): New function.
4043 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4044 (ppc_emit_prologue): New function.
4045 (ppc_emit_epilogue): New function.
4046 (ppc_emit_add): New function.
4047 (ppc_emit_sub): New function.
4048 (ppc_emit_mul): New function.
4049 (ppc_emit_lsh): New function.
4050 (ppc_emit_rsh_signed): New function.
4051 (ppc_emit_rsh_unsigned): New function.
4052 (ppc_emit_ext): New function.
4053 (ppc_emit_zero_ext): New function.
4054 (ppc_emit_log_not): New function.
4055 (ppc_emit_bit_and): New function.
4056 (ppc_emit_bit_or): New function.
4057 (ppc_emit_bit_xor): New function.
4058 (ppc_emit_bit_not): New function.
4059 (ppc_emit_equal): New function.
4060 (ppc_emit_less_signed): New function.
4061 (ppc_emit_less_unsigned): New function.
4062 (ppc_emit_ref): New function.
4063 (ppc_emit_const): New function.
4064 (ppc_emit_reg): New function.
4065 (ppc_emit_pop): New function.
4066 (ppc_emit_stack_flush): New function.
4067 (ppc_emit_swap): New function.
4068 (ppc_emit_stack_adjust): New function.
4069 (ppc_emit_call): New function.
4070 (ppc_emit_int_call_1): New function.
4071 (ppc_emit_void_call_2): New function.
4072 (ppc_emit_if_goto): New function.
4073 (ppc_emit_goto): New function.
4074 (ppc_emit_eq_goto): New function.
4075 (ppc_emit_ne_goto): New function.
4076 (ppc_emit_lt_goto): New function.
4077 (ppc_emit_le_goto): New function.
4078 (ppc_emit_gt_goto): New function.
4079 (ppc_emit_ge_goto): New function.
4080 (ppc_write_goto_address): New function.
4081 (ppc_emit_ops_impl): New static variable.
4082 (ppc64v1_emit_prologue): New function.
4083 (ppc64v2_emit_prologue): New function.
4084 (ppc64_emit_epilogue): New function.
4085 (ppc64_emit_add): New function.
4086 (ppc64_emit_sub): New function.
4087 (ppc64_emit_mul): New function.
4088 (ppc64_emit_lsh): New function.
4089 (ppc64_emit_rsh_signed): New function.
4090 (ppc64_emit_rsh_unsigned): New function.
4091 (ppc64_emit_ext): New function.
4092 (ppc64_emit_zero_ext): New function.
4093 (ppc64_emit_log_not): New function.
4094 (ppc64_emit_bit_and): New function.
4095 (ppc64_emit_bit_or): New function.
4096 (ppc64_emit_bit_xor): New function.
4097 (ppc64_emit_bit_not): New function.
4098 (ppc64_emit_equal): New function.
4099 (ppc64_emit_less_signed): New function.
4100 (ppc64_emit_less_unsigned): New function.
4101 (ppc64_emit_ref): New function.
4102 (ppc64_emit_const): New function.
4103 (ppc64v1_emit_reg): New function.
4104 (ppc64v2_emit_reg): New function.
4105 (ppc64_emit_pop): New function.
4106 (ppc64_emit_stack_flush): New function.
4107 (ppc64_emit_swap): New function.
4108 (ppc64v1_emit_call): New function.
4109 (ppc64v2_emit_call): New function.
4110 (ppc64v1_emit_int_call_1): New function.
4111 (ppc64v2_emit_int_call_1): New function.
4112 (ppc64v1_emit_void_call_2): New function.
4113 (ppc64v2_emit_void_call_2): New function.
4114 (ppc64_emit_if_goto): New function.
4115 (ppc64_emit_eq_goto): New function.
4116 (ppc64_emit_ne_goto): New function.
4117 (ppc64_emit_lt_goto): New function.
4118 (ppc64_emit_le_goto): New function.
4119 (ppc64_emit_gt_goto): New function.
4120 (ppc64_emit_ge_goto): New function.
4121 (ppc64v1_emit_ops_impl): New static variable.
4122 (ppc64v2_emit_ops_impl): New static variable.
4123 (ppc_emit_ops): New function.
4124 (linux_low_target): Wire in ppc_emit_ops.
4126 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4127 Marcin Kościelnicki <koriakin@0x04.net>
4130 * Makefile.in: Add powerpc-*-ipa.o
4131 * configure.srv: Add ipa_obj for powerpc*-linux.
4132 * linux-ppc-ipa.c: New file.
4133 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4135 (PPC_FIELD): New macro.
4136 (PPC_SEXT): New macro.
4137 (PPC_OP6): New macro.
4138 (PPC_BO): New macro.
4139 (PPC_LI): New macro.
4140 (PPC_BD): New macro.
4141 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4142 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4143 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4144 (ppc_get_thread_area): New function.
4145 (is_elfv2_inferior): New function.
4146 (gen_ds_form): New function.
4147 (GEN_STD): New macro.
4148 (GEN_STDU): New macro.
4149 (GEN_LD): New macro.
4150 (GEN_LDU): New macro.
4151 (gen_d_form): New function.
4152 (GEN_ADDI): New macro.
4153 (GEN_ADDIS): New macro.
4154 (GEN_LI): New macro.
4155 (GEN_LIS): New macro.
4156 (GEN_ORI): New macro.
4157 (GEN_ORIS): New macro.
4158 (GEN_LWZ): New macro.
4159 (GEN_STW): New macro.
4160 (GEN_STWU): New macro.
4161 (gen_xfx_form): New function.
4162 (GEN_MFSPR): New macro.
4163 (GEN_MTSPR): New macro.
4164 (GEN_MFCR): New macro.
4165 (GEN_MTCR): New macro.
4166 (GEN_SYNC): New macro.
4167 (GEN_LWSYNC): New macro.
4168 (gen_x_form): New function.
4169 (GEN_OR): New macro.
4170 (GEN_MR): New macro.
4171 (GEN_LWARX): New macro.
4172 (GEN_STWCX): New macro.
4173 (GEN_CMPW): New macro.
4174 (gen_md_form): New function.
4175 (GEN_RLDICL): New macro.
4176 (GEN_RLDICR): New macro.
4177 (gen_i_form): New function.
4179 (GEN_BL): New macro.
4180 (gen_b_form): New function.
4181 (GEN_BNE): New macro.
4182 (GEN_LOAD): New macro.
4183 (GEN_STORE): New macro.
4184 (gen_limm): New function.
4185 (gen_atomic_xchg): New function.
4186 (gen_call): New function.
4187 (ppc_relocate_instruction): New function.
4188 (ppc_install_fast_tracepoint_jump_pad): New function.
4189 (ppc_get_min_fast_tracepoint_insn_len): New function.
4190 (ppc_get_ipa_tdesc_idx): New function.
4191 (the_low_target): Wire in the new functions.
4192 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4194 * linux-ppc-tdesc.h: New file.
4196 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4198 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4199 (alloc_jump_pad_buffer): New function.
4200 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4201 (alloc_jump_pad_buffer): New function.
4202 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4203 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4204 (alloc_jump_pad_buffer): New function.
4205 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4206 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4207 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4208 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4210 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4212 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4213 * linux-amd64-ipa.c: Likewise.
4214 * linux-i386-ipa.c: Likewise.
4215 * linux-s390-ipa.c: Likewise.
4216 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4217 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4218 set_trace_state_variable_value_ptr.
4219 (struct ipa_sym_addresses): Likewise.
4220 (symbol_list): Likewise.
4221 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4222 accessing gdb_collect directly.
4223 (gdb_collect_ptr_type): New typedef.
4224 (get_raw_reg_ptr_type): New typedef.
4225 (get_trace_state_variable_value_ptr_type): New typedef.
4226 (set_trace_state_variable_value_ptr_type): New typedef.
4227 (gdb_collect_ptr): New global.
4228 (get_raw_reg_ptr): New global.
4229 (get_trace_state_variable_value_ptr): New global.
4230 (set_trace_state_variable_value_ptr): New global.
4231 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4232 accessing get_raw_reg directly.
4233 (get_get_tsv_func_addr): Likewise for
4234 get_trace_state_variable_value_ptr.
4235 (get_set_tsv_func_addr): Likewise for
4236 set_trace_state_variable_value_ptr.
4237 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4239 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4241 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4243 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4245 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4247 (relocate_instruction): Remove own_buf.
4248 * server.c (own_buf): Make global.
4249 (handle_v_requests): Make global.
4250 * server.h (own_buf): New declaration.
4251 (handle_v_requests): New prototype.
4253 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4256 * linux-s390-low.c (add_insns): New function.
4257 (s390_emit_prologue): New function.
4258 (s390_emit_epilogue): New function.
4259 (s390_emit_add): New function.
4260 (s390_emit_sub): New function.
4261 (s390_emit_mul): New function.
4262 (s390_emit_lsh): New function.
4263 (s390_emit_rsh_signed): New function.
4264 (s390_emit_rsh_unsigned): New function.
4265 (s390_emit_ext): New function.
4266 (s390_emit_log_not): New function.
4267 (s390_emit_bit_and): New function.
4268 (s390_emit_bit_or): New function.
4269 (s390_emit_bit_xor): New function.
4270 (s390_emit_bit_not): New function.
4271 (s390_emit_equal): New function.
4272 (s390_emit_less_signed): New function.
4273 (s390_emit_less_unsigned): New function.
4274 (s390_emit_ref): New function.
4275 (s390_emit_if_goto): New function.
4276 (s390_emit_goto): New function.
4277 (s390_write_goto_address): New function.
4278 (s390_emit_litpool): New function.
4279 (s390_emit_const): New function.
4280 (s390_emit_call): New function.
4281 (s390_emit_reg): New function.
4282 (s390_emit_pop): New function.
4283 (s390_emit_stack_flush): New function.
4284 (s390_emit_zero_ext): New function.
4285 (s390_emit_swap): New function.
4286 (s390_emit_stack_adjust): New function.
4287 (s390_emit_set_r2): New function.
4288 (s390_emit_int_call_1): New function.
4289 (s390_emit_void_call_2): New function.
4290 (s390_emit_eq_goto): New function.
4291 (s390_emit_ne_goto): New function.
4292 (s390_emit_lt_goto): New function.
4293 (s390_emit_le_goto): New function.
4294 (s390_emit_gt_goto): New function.
4295 (s390_emit_ge_goto): New function.
4296 (s390x_emit_prologue): New function.
4297 (s390x_emit_epilogue): New function.
4298 (s390x_emit_add): New function.
4299 (s390x_emit_sub): New function.
4300 (s390x_emit_mul): New function.
4301 (s390x_emit_lsh): New function.
4302 (s390x_emit_rsh_signed): New function.
4303 (s390x_emit_rsh_unsigned): New function.
4304 (s390x_emit_ext): New function.
4305 (s390x_emit_log_not): New function.
4306 (s390x_emit_bit_and): New function.
4307 (s390x_emit_bit_or): New function.
4308 (s390x_emit_bit_xor): New function.
4309 (s390x_emit_bit_not): New function.
4310 (s390x_emit_equal): New function.
4311 (s390x_emit_less_signed): New function.
4312 (s390x_emit_less_unsigned): New function.
4313 (s390x_emit_ref): New function.
4314 (s390x_emit_if_goto): New function.
4315 (s390x_emit_const): New function.
4316 (s390x_emit_call): New function.
4317 (s390x_emit_reg): New function.
4318 (s390x_emit_pop): New function.
4319 (s390x_emit_stack_flush): New function.
4320 (s390x_emit_zero_ext): New function.
4321 (s390x_emit_swap): New function.
4322 (s390x_emit_stack_adjust): New function.
4323 (s390x_emit_int_call_1): New function.
4324 (s390x_emit_void_call_2): New function.
4325 (s390x_emit_eq_goto): New function.
4326 (s390x_emit_ne_goto): New function.
4327 (s390x_emit_lt_goto): New function.
4328 (s390x_emit_le_goto): New function.
4329 (s390x_emit_gt_goto): New function.
4330 (s390x_emit_ge_goto): New function.
4331 (s390_emit_ops): New function.
4332 (struct linux_target_ops): Fill in emit_ops hook.
4334 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4337 * Makefile.in: Add s390 IPA files.
4338 * configure.srv: Build IPA for s390.
4339 * linux-s390-ipa.c: New file.
4340 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4341 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4342 (tdesc_s390_linux32): Likewise.
4343 (init_registers_s390_linux32v1): Likewise.
4344 (tdesc_s390_linux32v1): Likewise.
4345 (init_registers_s390_linux32v2): Likewise.
4346 (tdesc_s390_linux32v2): Likewise.
4347 (init_registers_s390_linux64): Likewise.
4348 (tdesc_s390_linux64): Likewise.
4349 (init_registers_s390_linux64v1): Likewise.
4350 (tdesc_s390_linux64v1): Likewise.
4351 (init_registers_s390_linux64v2): Likewise.
4352 (tdesc_s390_linux64v2): Likewise.
4353 (init_registers_s390_te_linux64): Likewise.
4354 (tdesc_s390_te_linux64): Likewise.
4355 (init_registers_s390_vx_linux64): Likewise.
4356 (tdesc_s390_vx_linux64): Likewise.
4357 (init_registers_s390_tevx_linux64): Likewise.
4358 (tdesc_s390_tevx_linux64): Likewise.
4359 (init_registers_s390x_linux64): Likewise.
4360 (tdesc_s390x_linux64): Likewise.
4361 (init_registers_s390x_linux64v1): Likewise.
4362 (tdesc_s390x_linux64v1): Likewise.
4363 (init_registers_s390x_linux64v2): Likewise.
4364 (tdesc_s390x_linux64v2): Likewise.
4365 (init_registers_s390x_te_linux64): Likewise.
4366 (tdesc_s390x_te_linux64): Likewise.
4367 (init_registers_s390x_vx_linux64): Likewise.
4368 (tdesc_s390x_vx_linux64): Likewise.
4369 (init_registers_s390x_tevx_linux64): Likewise.
4370 (tdesc_s390x_tevx_linux64): Likewise.
4371 (have_hwcap_s390_vx): New static variable.
4372 (s390_arch_setup): Fill have_hwcap_s390_vx.
4373 (s390_get_thread_area): New function.
4374 (s390_ft_entry_gpr_esa): New const.
4375 (s390_ft_entry_gpr_zarch): New const.
4376 (s390_ft_entry_misc): New const.
4377 (s390_ft_entry_fr): New const.
4378 (s390_ft_entry_vr): New const.
4379 (s390_ft_main_31): New const.
4380 (s390_ft_main_64): New const.
4381 (s390_ft_exit_fr): New const.
4382 (s390_ft_exit_vr): New const.
4383 (s390_ft_exit_misc): New const.
4384 (s390_ft_exit_gpr_esa): New const.
4385 (s390_ft_exit_gpr_zarch): New const.
4386 (append_insns): New function.
4387 (s390_relocate_instruction): New function.
4388 (s390_install_fast_tracepoint_jump_pad): New function.
4389 (s390_get_min_fast_tracepoint_insn_len): New function.
4390 (s390_get_ipa_tdesc_idx): New function.
4391 (struct linux_target_ops): Wire in the above functions.
4392 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4393 * linux-s390-tdesc.h: New file.
4395 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4397 * linux-s390-low.c (s390_supports_tracepoints): New function.
4398 (struct linux_target_ops): Fill supports_tracepoints hook.
4400 2016-03-18 Yao Qi <yao.qi@linaro.org>
4402 * linux-low.c (lwp_signal_can_be_delivered): New function.
4403 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4405 2016-03-18 Yao Qi <yao.qi@linaro.org>
4407 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4408 0 if signal is enqueued. Remove 'signal' from one debugging
4409 message. Move one debugging message to some lines below.
4410 Remove code setting 'signal' to 0.
4412 2016-03-18 Yao Qi <yao.qi@linaro.org>
4414 * linux-low.c (linux_low_filter_event): Remove redundant
4415 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4417 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4419 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4420 (struct linux_target_ops): Wire in the above.
4422 2016-03-03 Yao Qi <yao.qi@linaro.org>
4424 * linux-low.c: Update comments to start_step_over.
4426 2016-03-03 Yao Qi <yao.qi@linaro.org>
4429 * linux-low.c (handle_extended_wait): Set child suspended
4430 if event_lwp->bp_reinsert isn't zero.
4432 2016-03-02 Yao Qi <yao.qi@linaro.org>
4434 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4435 enqueue_pending_signal.
4437 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4439 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4442 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4444 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4445 (s390_regmap_3264) [!__s390x__]: New global.
4446 (s390_collect_ptrace_register): Skip map entries containing -1.
4447 (s390_supply_ptrace_register): Ditto.
4448 (s390_fill_gprs_high): New function.
4449 (s390_store_gprs_high): New function.
4450 (s390_regsets): Add NT_S390_HIGH_GPRS.
4451 (s390_get_hwcap): Enable on 31-bit.
4452 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4453 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4454 Detect NT_S390_HIGH_GPRS.
4455 (s390_usrregs_info_3264): Enable on 31-bit.
4456 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4457 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4459 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4462 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4463 * configure.srv: Ditto.
4464 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4465 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4466 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4467 (init_registers_amd64_linux): Remove prototype.
4468 (tdesc_amd64_linux): Remove declaration.
4469 (get_ipa_tdesc): New function.
4470 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4471 initialize remaining tdescs.
4472 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4473 (init_registers_i386_linux): Remove prototype.
4474 (tdesc_i386_linux): Remove declaration.
4475 (get_ipa_tdesc): New function.
4476 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4477 initialize remaining tdescs.
4478 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4479 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4480 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4481 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4482 (x86_get_ipa_tdesc_idx): New function.
4483 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4484 * linux-x86-tdesc.h: New file.
4485 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4486 (target_get_ipa_tdesc_idx): New macro.
4487 * tracepoint.c (ipa_tdesc_idx): New macro.
4488 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4489 (symbol_list): Add ipa_tdesc_idx.
4490 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4491 (ipa_tdesc): Remove.
4492 (ipa_tdesc_idx): New variable.
4493 (get_context_regcache): Use get_ipa_tdesc.
4494 (gdb_collect): Ditto.
4496 * tracepoint.h (get_ipa_tdesc): New prototype.
4497 (ipa_tdesc): Remove.
4499 2016-02-24 Pedro Alves <palves@redhat.com>
4501 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4502 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4503 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4504 Factor out common code between the USE_SIGTRAP_SIGINFO and
4505 !USE_SIGTRAP_SIGINFO blocks.
4506 (linux_low_filter_event): Call save_stop_reason instead of
4507 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4509 (linux_wait_1): Update comments.
4511 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4513 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4514 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4515 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4516 ppc_insert_point, ppc_remove_point.
4518 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4520 * linux-s390-low.c (s390_supports_z_point_type): New function.
4521 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4523 2016-02-16 Yao Qi <yao.qi@linaro.org>
4525 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4526 PC. Get pc from regcache_read_pc.
4528 2016-02-12 Yao Qi <yao.qi@linaro.org>
4530 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4531 or linux_get_pc_32bit.
4532 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4534 2016-02-12 Yao Qi <yao.qi@linaro.org>
4536 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4537 arm_linux_get_next_pcs_fixup.
4539 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4541 * tracepoint.c (x_tracepoint_action_download): Change
4542 write_inferior_data_ptr to write_inferior_data_pointer.
4543 (cmd_qtstart): Likewise.
4544 (write_inferior_data_ptr): Remove.
4545 (download_agent_expr): Change write_inferior_data_ptr to
4546 write_inferior_data_pointer.
4547 (download_tracepoint_1): Likewise.
4548 (download_tracepoint): Likewise.
4549 (download_trace_state_variables): Likewise.
4551 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4552 Marcin Kościelnicki <koriakin@0x04.net>
4554 * tracepoint.c (struct tracepoint_action_ops): Remove.
4555 (struct tracepoint_action): Remove ops.
4556 (m_tracepoint_action_download, r_tracepoint_action_download)
4557 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4558 size and offset accordingly.
4559 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4560 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4561 (tracepoint_action_send, tracepoint_action_download): New functions.
4562 Helpers for trace action handlers.
4563 (add_tracepoint_action): Remove setup actions ops.
4564 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4566 2016-02-10 Yao Qi <yao.qi@linaro.org>
4568 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4570 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4572 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4574 * configure: Regenerate.
4576 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4578 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4579 void * to gdb_byte *.
4580 * linux-low.c (siginfo_fixup): Likewise.
4581 (linux_xfer_siginfo): Likewise.
4582 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4584 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4586 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4588 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4590 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4592 * linux-x86-low.c [__x86_64__]: Include
4593 "nat/amd64-linux-siginfo.h".
4594 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4595 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4596 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4597 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4598 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4599 (cpt_si_fd, si_timerid, si_overrun): Move from
4600 nat/amd64-linux-siginfo.c.
4601 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4603 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4605 * server.c (skip_to_semicolon): Remove.
4606 (process_point_options): Use strchrnul instead of
4609 2016-01-26 Yao Qi <yao.qi@linaro.org>
4611 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4612 * linux-low.c (install_software_single_step_breakpoints): Don't
4613 call regcache_read_pc.
4614 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4617 2016-01-26 Yao Qi <yao.qi@linaro.org>
4619 * linux-low.c (install_software_single_step_breakpoints): Call
4620 regcache_read_pc instead of get_pc.
4622 2016-01-26 Yao Qi <yao.qi@linaro.org>
4624 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4625 (unblock_async_io): Rename to ...
4626 (block_unblock_async_io): ... it. New function.
4627 (enable_async_io): Don't install SIGIO handler. Unblock it
4629 (disable_async_io): Don't ignore SIGIO. Block it instead.
4630 (initialize_async_io): Install SIGIO handler. Don't call
4633 2016-01-26 Yao Qi <yao.qi@linaro.org>
4635 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4636 first character is '\003', call *the_target->request_interrupt.
4638 2016-01-25 Yao Qi <yao.qi@linaro.org>
4640 * remote-utils.c (new_thread_notify): Remove.
4641 (dead_thread_notify): Likewise.
4642 * remote-utils.h (new_thread_notify): Remove declaration.
4643 (dead_thread_notify): Likewise.
4645 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4647 * gdb.trace/pending.exp: Fix expected message on continue.
4649 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4651 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4652 it works properly on big-endian machines where sizeof (CORE_ADDR)
4655 2016-01-21 Pedro Alves <palves@redhat.com>
4657 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4658 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4659 * configure: Regenerate.
4661 2016-01-21 Yao Qi <yao.qi@linaro.org>
4663 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4664 is_thumb and set it according to CPSR saved on the stack.
4665 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4666 arm_sigreturn_next_pc.
4668 2016-01-18 Yao Qi <yao.qi@linaro.org>
4670 * linux-low.c (linux_set_pc_64bit): New function.
4671 (linux_get_pc_64bit): New function.
4672 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4674 * linux-sparc-low.c (debug_threads): Remove declaration.
4675 (sparc_get_pc): Remove.
4676 (the_low_target): Use linux_get_pc_64bit instead of
4678 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4679 (the_low_target): Use linux_get_pc_64bit and
4682 2016-01-18 Yao Qi <yao.qi@linaro.org>
4684 * linux-arm-low.c (debug_threads): Remove declaration.
4685 (arm_get_pc, arm_set_pc): Remove.
4686 (the_low_target): Use linux_get_pc_32bit and
4688 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4689 (the_low_target): Use linux_get_pc_32bit and
4691 * linux-cris-low.c (debug_threads): Remove declaration.
4692 (cris_get_pc, cris_set_pc,): Remove.
4693 (the_low_target): Use linux_get_pc_32bit and
4695 * linux-crisv32-low.c (debug_threads): Remove declaration.
4696 (cris_get_pc, cris_set_pc): Remove.
4697 (the_low_target): Use linux_get_pc_32bit and
4699 * linux-low.c: Include inttypes.h.
4700 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4701 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4702 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4703 (the_low_target): Use linux_get_pc_32bit and
4705 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4706 (the_low_target): Use linux_get_pc_32bit and
4708 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4709 (the_low_target): Use linux_get_pc_32bit and
4711 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4712 (the_low_target): Use linux_get_pc_32bit and
4714 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4715 (the_low_target): Use linux_get_pc_32bit and
4718 2016-01-18 Gary Benson <gbenson@redhat.com>
4720 * configure.ac (AC_FUNC_FORK): New check.
4721 * config.in: Regenerate.
4722 * configure: Likewise.
4724 2016-01-14 Yao Qi <yao.qi@linaro.org>
4726 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4727 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4728 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4729 arm_get_next_pcs_ctor.
4731 2016-01-12 Josh Stone <jistone@redhat.com>
4732 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4734 * inferiors.h: Include "gdb_vecs.h".
4735 (struct process_info): Add syscalls_to_catch.
4736 * inferiors.c (remove_process): Free syscalls_to_catch.
4737 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4738 syscall_return stops.
4739 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4740 * server.c (handle_general_set): Handle QCatchSyscalls.
4741 (handle_query): Report support for QCatchSyscalls.
4742 * target.h (struct target_ops): Add supports_catch_syscall.
4743 (target_supports_catch_syscall): New macro.
4744 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4745 (struct lwp_info): Add syscall_state.
4746 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4747 Maintain syscall_state and syscalls_to_catch across exec.
4748 (get_syscall_trapinfo): New function, proxy to the_low_target.
4749 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4750 (linux_low_filter_event): Toggle syscall_state entry/return for
4751 syscall traps, and set it ignored for all others.
4752 (gdb_catching_syscalls_p): New function.
4753 (gdb_catch_this_syscall_p): New function.
4754 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4755 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4756 (linux_supports_catch_syscall): New function.
4757 (linux_target_ops): Install it.
4758 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4759 (the_low_target): Install it.
4761 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4763 * acinclude.m4: Include new ../warning.m4 file.
4764 * configure: Regenerated.
4765 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4767 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4769 * ax.c (is_goto_target): Mark static.
4770 * linux-low.c (register_addr): Likewise.
4771 (linux_fetch_registers, linux_store_registers): Likewise.
4772 * mem-break.c (any_persistent_commands): Fix old prototype.
4773 (add_commands_to_breakpoint): Mark static.
4774 * regcache.c (find_register_by_name): Delete unused func.
4775 * remote-utils.c (hex_or_minus_one): Mark static.
4776 * server.c (monitor_show_help): Mark static.
4777 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4778 handle_v_requests): Likewise.
4780 2016-01-12 Pedro Alves <palves@redhat.com>
4782 Remove use of the registered trademark symbol throughout.
4784 2016-01-08 Yao Qi <yao.qi@linaro.org>
4786 * remote-utils.c (getpkt): If c is '\003', call target hook
4789 2016-01-06 Yao Qi <yao.qi@linaro.org>
4791 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4792 linux-aarch32-low.c.
4793 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4794 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4795 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4796 (thumb2_breakpoint): Declare.
4797 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4798 linux-aarch32-low.h.
4799 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4800 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4801 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4803 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4805 * gdbreplay.c (gdbreplay_version): Change copyright year in
4807 * server.c (gdbserver_version): Likewise.
4809 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4811 * server.c (crc32_table): Delete.
4812 (crc32): Use libiberty's xcrc32 function.
4814 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4816 * lynx-low.c (lynx_delete_thread_callback): New function.
4817 (lynx_mourn): Properly delete our process and all of its
4818 threads. Remove call to clear_inferiors.
4820 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4822 * target.c (thread_search_callback): Add check that
4823 the thread_stopped target callback is not NULL before
4826 2015-12-21 Yao Qi <yao.qi@linaro.org>
4828 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4831 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4833 * server.c (handle_query): Call target_supports_software_single_step.
4835 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4837 * linux-low.c (single_step): New function.
4838 (linux_resume_one_lwp_throw): Call single_step.
4839 (start_step_over): Likewise.
4841 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4843 * Makefile.in (SFILES): Append arch/arm-linux.c,
4844 arch/arm-get-next-pcs.c.
4845 (arm-linux.o): New rule.
4846 (arm-get-next-pcs.o): New rule.
4847 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4849 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4850 to linux-aarch32-low.c.
4851 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4852 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4853 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4854 (thumb2_breakpoint_len): Likewise.
4855 (arm_is_thumb_mode): Make non-static.
4856 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4857 from linux-aarch32-low.c.
4858 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4859 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4860 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4861 (thumb2_breakpoint_len): Likewise.
4862 (arm_is_thumb_mode): New declaration.
4863 * linux-arm-low.c: Include arch/arm-linux.h
4864 aarch/arm-get-next-pcs.h, sys/syscall.h.
4865 (get_next_pcs_ops): New struct.
4866 (get_next_pcs_addr_bits_remove): New function.
4867 (get_next_pcs_is_thumb): New function.
4868 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4869 (arm_sigreturn_next_pc): Likewise.
4870 (get_next_pcs_syscall_next_pc): Likewise.
4871 (arm_gdbserver_get_next_pcs): Likewise.
4872 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4874 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4875 * server.h: Include gdb_vecs.h.
4877 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4879 * Makefile.in (SFILES): Append common/common-regcache.c.
4880 (OBS): Append common-regcache.o.
4881 (common-regcache.o): New rule.
4882 * regcache.c (init_register_cache): Initialize cache to
4884 (regcache_raw_read_unsigned): New function.
4885 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4886 register_status enum.
4888 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4890 * linux-aarch64-low.c (the_low_targets): Rename
4891 breakpoint_reinsert_addr to get_next_pcs.
4892 * linux-arm-low.c (the_low_targets): Likewise.
4893 * linux-bfin-low.c (the_low_targets): Likewise.
4894 * linux-cris-low.c (the_low_targets): Likewise.
4895 * linux-crisv32-low.c (the_low_targets): Likewise.
4896 * linux-low.c (can_software_single_step): Likewise.
4897 (install_software_single_step_breakpoints): New function.
4898 (start_step_over): Use install_software_single_step_breakpoints.
4899 * linux-low.h: New CORE_ADDR vector.
4900 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4902 * linux-mips-low.c (the_low_targets): Likewise.
4903 * linux-nios2-low.c (the_low_targets): Likewise.
4904 * linux-sparc-low.c (the_low_targets): Likewise.
4906 2015-12-17 Pedro Alves <palves@redhat.com>
4908 * linux-low.c (linux_kill_one_lwp): Remove references to
4910 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4912 (linux_init_signals): Delete.
4913 (initialize_low): Adjust.
4914 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4916 2015-12-16 Pedro Alves <palves@redhat.com>
4918 * configure.ac (compiler warning flags): When testing a
4919 -Wno-foo option, check whether -Wfoo works instead.
4920 * configure: Regenerate.
4922 2015-12-11 Don Breazeal <donb@codesourcery.com>
4924 * server.c (process_serial_event): Don't exit from gdbserver
4925 in remote mode if there are still active inferiors.
4927 2015-12-11 Yao Qi <yao.qi@linaro.org>
4929 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4930 arm_breakpoint_at if the process is 32-bit.
4932 2015-12-11 Yao Qi <yao.qi@linaro.org>
4934 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4937 2015-12-07 Yao Qi <yao.qi@linaro.org>
4939 * configure.srv: Append arm.o to srv_tgtobj for
4940 aarch64*-*-linux* target.
4941 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4942 from linux-arm-low.c.
4943 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4944 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4945 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4946 (thumb2_breakpoint_len): Likewise.
4947 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4948 (arm_breakpoint_kinds): Likewise.
4949 (arm_breakpoint_kind_from_pc): Likewise.
4950 (arm_sw_breakpoint_from_kind): Likewise.
4951 (arm_breakpoint_kind_from_current_state): Likewise.
4952 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4953 (arm_sw_breakpoint_from_kind): Declare.
4954 (arm_breakpoint_kind_from_current_state): Declare.
4955 (arm_breakpoint_at): Declare.
4956 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4957 arm_sw_breakpoint_from_kind if process is 32-bit.
4958 (aarch64_breakpoint_kind_from_pc): New function.
4959 (aarch64_breakpoint_kind_from_current_state): New function.
4960 (the_low_target): Initialize fields breakpoint_kind_from_pc
4961 and breakpoint_kind_from_current_state.
4962 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4963 linux-aarch32-low.c.
4964 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4965 (arm_breakpoint, arm_breakpoint_len): Likewise.
4966 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4967 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4968 (arm_is_thumb_mode): Likewise.
4969 (arm_breakpoint_at): Likewise.
4970 (arm_breakpoint_kind_from_pc): Likewise.
4971 (arm_sw_breakpoint_from_kind): Likewise.
4972 (arm_breakpoint_kind_from_current_state): Likewise.
4975 2015-08-04 Yao Qi <yao.qi@linaro.org>
4977 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4978 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4979 * server.c (extended_protocol): Remove "static".
4980 * server.h (extended_protocol): Declare it.
4982 2015-12-04 Josh Stone <jistone@redhat.com>
4984 * target.h (struct target_ops) <arch_setup>: Rename to ...
4985 (struct target_ops) <post_create_inferior>: ... this.
4986 (target_arch_setup): Rename to ...
4987 (target_post_create_inferior): ... this, calling post_create_inferior.
4988 * server.c (start_inferior): Update target_arch_setup calls to
4989 target_post_create_inferior.
4990 * linux-low.c (linux_low_ptrace_options): Forward declare.
4991 (linux_arch_setup): Update its comment for general use.
4992 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4993 (struct linux_target_ops): Use linux_post_create_inferior.
4994 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4995 to post_create_inferior.
4996 * nto-low.c (struct nto_target_ops): Likewise.
4997 * spu-low.c (struct spu_target_ops): Likewise.
4998 * win32-low.c (struct win32_target_ops): Likewise.
5000 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5002 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5004 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5006 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5007 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5008 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5009 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5010 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5011 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5012 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5013 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5014 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5015 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5016 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5017 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5019 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5021 * linux-low.c (linux_look_up_symbols): Don't call
5022 linux_supports_traceclone.
5023 * linux-low.h (thread_db_init): Remove use_events argument.
5024 * thread-db.c (thread_db_use_event): Remove global variable.
5025 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5026 (struct thread_db) <td_create_bp>: Remove field.
5027 (thread_db_create_event): Remove function.
5028 (thread_db_enable_reporting): Likewise.
5029 (find_one_thread): Don't check for thread_db_use_events.
5030 (attach_thread): Likewise.
5031 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5032 (try_thread_db_load_1): Don't check for thread_db_use_events.
5033 (thread_db_init): Remove use_events argument and thread events
5035 (remove_thread_event_breakpoints): Remove function.
5036 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5038 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5040 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5042 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5043 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5044 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5045 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5046 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5048 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5050 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5051 * linux-low.c (can_hardware_single_step): Use
5052 supports_hardware_single_step.
5053 (can_software_single_step): New function.
5054 (start_step_over): Call can_software_single_step.
5055 (linux_supports_hardware_single_step): New function.
5056 (struct target_ops) <supports_software_single_step>: Initialize.
5057 * linux-low.h (struct linux_target_ops)
5058 <supports_hardware_single_step>: Initialize.
5059 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5060 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5061 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5062 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5063 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5064 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5065 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5066 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5067 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5068 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5070 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5071 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5073 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5074 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5075 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5077 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5078 * target.h (struct target_ops): <supports_software_single_step>:
5080 (target_supports_software_single_step): New macro.
5082 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5084 * linux-low.c (linux_wait_1): Fix pc advance condition.
5085 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5086 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5088 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5090 * linux-arm-low.c (arm_is_thumb_mode): New function.
5091 (arm_breakpoint_at): Use arm_is_thumb_mode.
5092 (arm_breakpoint_kind_from_current_state): New function.
5093 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5095 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5096 (linux_breakpoint_kind_from_current_state): New function.
5097 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5098 * linux-low.h (struct linux_target_ops)
5099 <breakpoint_kind_from_current_state>: New field.
5100 * target.h (struct target_ops): Likewise.
5101 (target_breakpoint_kind_from_current_state): New macro.
5103 2015-11-30 Pedro Alves <palves@redhat.com>
5105 * linux-low.c (linux_resume): Wake up the event loop before
5108 2015-11-30 Pedro Alves <palves@redhat.com>
5110 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5112 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5114 * target.c (struct thread_search): New structure.
5115 (thread_search_callback): New function.
5116 (prev_general_thread): New global.
5117 (prepare_to_access_memory, done_accessing_memory): New functions.
5118 * target.h (prepare_to_access_memory, done_accessing_memory):
5119 Replace macros with function declarations.
5121 2015-11-30 Pedro Alves <palves@redhat.com>
5124 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5125 report TARGET_WAITKIND_NO_RESUMED.
5126 * remote-utils.c (prepare_resume_reply): Handle
5127 TARGET_WAITKIND_NO_RESUMED.
5128 * server.c (report_no_resumed): New global.
5129 (handle_query) <qSupported>: Handle "no-resumed+". Report
5130 "no-resumed+" support.
5131 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5132 return error if the client doesn't support no-resumed events.
5133 (push_stop_notification): New function.
5134 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5135 events if the client supports them.
5137 2015-11-30 Pedro Alves <palves@redhat.com>
5139 * linux-low.c (thread_still_has_status_pending_p): Don't check
5141 (lwp_resumed): New function.
5142 (status_pending_p_callback): Return early if the LWP is not
5143 supposed to be resumed.
5145 2015-11-30 Pedro Alves <palves@redhat.com>
5147 * linux-low.c (handle_extended_wait): Assert that the LWP's
5148 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5149 thread create events, leave the new child's status pending.
5150 (linux_low_filter_event): If GDB wants to hear about thread exit
5151 events, leave the LWP marked dead and don't delete it.
5152 (linux_wait_for_event_filtered): Don't check for thread exit.
5153 (filter_exit_event): New function.
5154 (linux_wait_1): Use it, when returning an exit event.
5155 (linux_resume_one_lwp_throw): Assert that the LWP's
5156 waitstatus is TARGET_WAITKIND_IGNORE.
5157 * remote-utils.c (prepare_resume_reply): Handle
5158 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5159 * server.c (report_thread_events): New global.
5160 (handle_general_set): Handle QThreadEvents.
5161 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5162 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5163 TARGET_WAITKIND_THREAD_EXITED.
5164 * server.h (report_thread_events): Declare.
5166 2015-11-30 Pedro Alves <palves@redhat.com>
5168 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5169 the thread's last_resume_kind was resume_stop.
5171 2015-11-30 Pedro Alves <palves@redhat.com>
5173 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5176 2015-11-30 Pedro Alves <palves@redhat.com>
5178 * server.c (handle_v_requests): Handle vCtrlC.
5180 2015-11-30 Pedro Alves <palves@redhat.com>
5182 * gdbthread.h (find_any_thread_of_pid): Declare.
5183 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5185 * server.c (handle_query): If current_thread is NULL, look for
5186 another thread of the selected process.
5188 2015-11-26 Daniel Colascione <dancol@dancol.org>
5189 Simon Marchi <simon.marchi@ericsson.com>
5191 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5192 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5194 * target.h (struct target_ops) <thread_name>: New field.
5195 (target_thread_name): New macro.
5197 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5199 * regcache.h (regcache_invalidate_pid): Add declaration.
5200 * regcache.c (regcache_invalidate_pid): New function, extracted
5201 from regcache_invalidate.
5202 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5203 Add trivial documentation comment.
5204 * lynx-low.c: Use regcache_invalidate_pid instead of
5205 regcache_invalidate.
5207 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5209 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5210 and Elf64_auxv_t if the target is Android.
5212 2015-11-22 Doug Evans <xdje42@gmail.com>
5214 * target.h: #include <sys/types.h>.
5216 2015-11-19 Pedro Alves <palves@redhat.com>
5218 * linux-low.c (linux_process_qsupported): Change prototype.
5220 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5222 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5223 and adjust to loop over all features.
5224 * server.c (handle_query) <qSupported>: Adjust to call
5225 target_process_qsupported once, passing it a vector of unprocessed
5227 * target.h (struct target_ops) <process_qsupported>: Change
5229 (target_process_qsupported): Adjust.
5231 2015-11-19 Pedro Alves <palves@redhat.com>
5233 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5235 * configure: Regenerate.
5237 2015-11-19 Pedro Alves <palves@redhat.com>
5239 * configure: Regenerate.
5241 2015-11-19 Yao Qi <yao.qi@linaro.org>
5243 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5246 2015-11-19 Yao Qi <yao.qi@linaro.org>
5248 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5249 (struct aarch64_operand): Move enum out.
5251 2015-11-19 Yao Qi <yao.qi@linaro.org>
5253 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5254 struct user_fpsimd_state *.
5255 (aarch64_store_fpregset): Likewise.
5257 2015-11-19 Yao Qi <yao.qi@linaro.org>
5259 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5260 struct user_pt_regs *.
5261 (aarch64_store_gregset): Likewise.
5263 2015-11-18 Pedro Alves <palves@redhat.com>
5265 * Makefile.in (all_object_files): Add $IPA_OBJS.
5267 2015-11-17 Pedro Alves <palves@redhat.com>
5269 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5270 GDB_SIGNAL_0 and gdb_signal_to_string.
5272 2015-11-17 Pedro Alves <palves@redhat.com>
5274 * win32-low.c (handle_output_debug_string): Remove parameter.
5275 (win32_kill): Remove our_status local and adjust call to
5276 handle_output_debug_string.
5277 (get_child_debug_event): Adjust call to
5278 handle_output_debug_string.
5280 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5282 * linux-mips-low.c (mips_fill_gregset): Add cast.
5283 (mips_store_gregset): Likewise.
5284 (mips_fill_fpregset): Likewise.
5285 (mips_store_fpregset): Likewise.
5287 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5289 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5292 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5294 * linux-mips-low.c (mips_linux_new_thread): Change type of
5295 watch_type to enum target_hw_bp_type.
5297 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5299 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5300 Change return type to arm_hwbp_type.
5302 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5304 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5305 (arm_store_gregset): Likewise.
5306 * linux-arm-low.c (arm_get_hwcap): Likewise.
5307 (arm_read_description): Likewise.
5309 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5311 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5313 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5315 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5316 (ppc_fill_vsxregset): Likewise.
5317 (ppc_store_vsxregset): Likewise.
5318 (ppc_fill_vrregset): Likewise.
5319 (ppc_store_vrregset): Likewise.
5320 (ppc_fill_evrregset): Likewise.
5321 (ppc_store_evrregset): Likewise.
5323 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5325 * linux-ppc-low.c (ppc_usrregs_info): Remove
5326 forward-declaration.
5327 (ppc_arch_setup): Move lower in file.
5329 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5331 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5332 (ps_pdwrite): Likewise.
5334 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5336 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5337 to after assert checks.
5339 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5341 * proc-service.c (ps_pdread): Add/adjust casts.
5342 (ps_pdwrite): Add/adjust casts.
5344 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5346 * server.c (handle_search_memory_1): Cast return value of
5349 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5351 * server.c (write_qxfer_response): Change type of data to
5354 2015-10-29 Pedro Alves <palves@redhat.com>
5356 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5358 2015-10-29 Pedro Alves <palves@redhat.com>
5360 * tracepoint.c (clear_installed_tracepoints): Add casts.
5362 2015-10-29 Pedro Alves <palves@redhat.com>
5364 * server.c (handle_v_cont, process_serial_event): Add enum
5365 gdb_signal casts to signal parsing code.
5367 2015-10-29 Pedro Alves <palves@redhat.com>
5369 * linux-low.h (NULL_REGSET): Define.
5370 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5371 * linux-arm-low.c (arm_regsets): Likewise.
5372 * linux-crisv32-low.c (cris_regsets): Likewise.
5373 * linux-m68k-low.c (m68k_regsets): Likewise.
5374 * linux-mips-low.c (mips_regsets): Likewise.
5375 * linux-nios2-low.c (nios2_regsets): Likewise.
5376 * linux-ppc-low.c (ppc_regsets): Likewise.
5377 * linux-s390-low.c (s390_regsets): Likewise.
5378 * linux-sh-low.c (sh_regsets): Likewise.
5379 * linux-sparc-low.c (sparc_regsets): Likewise.
5380 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5381 * linux-tile-low.c (tile_regsets): Likewise.
5382 * linux-x86-low.c (x86_regsets): Likewise.
5383 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5385 2015-10-29 Pedro Alves <palves@redhat.com>
5387 * linux-low.h (NULL_REGSET): Define.
5388 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5389 * linux-arm-low.c (arm_regsets): Likewise.
5390 * linux-crisv32-low.c (cris_regsets): Likewise.
5391 * linux-m68k-low.c (m68k_regsets): Likewise.
5392 * linux-mips-low.c (mips_regsets): Likewise.
5393 * linux-nios2-low.c (nios2_regsets): Likewise.
5394 * linux-ppc-low.c (ppc_regsets): Likewise.
5395 * linux-s390-low.c (s390_regsets): Likewise.
5396 * linux-sh-low.c (sh_regsets): Likewise.
5397 * linux-sparc-low.c (sparc_regsets): Likewise.
5398 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5399 * linux-tile-low.c (tile_regsets): Likewise.
5400 * linux-x86-low.c (x86_regsets): Likewise.
5401 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5403 2015-10-26 Doug Evans <dje@google.com>
5405 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5407 2015-10-26 Doug Evans <dje@google.com>
5409 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5411 2015-10-26 Doug Evans <dje@google.com>
5413 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5415 (attach_thread, find_new_threads_callback): Ditto.
5417 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5419 * mem-break.h (set_breakpoint_data): Remove.
5421 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5423 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5424 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5425 (initialize_low): Remove set_breakpoint_data call.
5426 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5427 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5428 (initialize_low): Remove set_breakpoint_data call.
5429 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5430 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5431 (initialize_low): Remove set_breakpoint_data call.
5433 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5435 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5436 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5437 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5438 * target.h (target_breakpoint_kind_from_pc): New macro.
5440 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5442 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5443 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5444 the default breakpoint kind.
5446 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5448 * linux-arm-low.c (arm_supports_z_point_type): Add software
5451 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5453 * linux-arm-low.c: Refactor breakpoint definitions.
5454 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5455 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5457 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5459 * Makefile.in: Add arm.c/o.
5460 * configure.srv: Likewise.
5461 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5462 (arm_breakpoint_kind_from_pc): New function.
5463 (arm_sw_breakpoint_from_kind): Return proper kind.
5464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5466 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5468 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5470 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5471 (struct raw_breakpoint) <size>: Remove.
5472 (struct raw_breakpoint) <kind>: Add.
5473 (bp_size): New function.
5474 (bp_opcode): Likewise.
5475 (find_raw_breakpoint_at): Adjust for kind.
5476 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5477 (remove_memory_breakpoint): Adjust for kind call bp_size.
5478 (set_raw_breakpoint_at): Adjust for kind.
5479 (set_breakpoint): Likewise.
5480 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5481 (delete_raw_breakpoint): Adjust for kind.
5482 (delete_breakpoint): Likewise.
5483 (find_gdb_breakpoint): Likewise.
5484 (set_gdb_breakpoint_1): Likewise.
5485 (set_gdb_breakpoint): Likewise.
5486 (delete_gdb_breakpoint_1): Likewise.
5487 (delete_gdb_breakpoint): Likewise.
5488 (uninsert_raw_breakpoint): Likewise.
5489 (reinsert_raw_breakpoint): Likewise.
5490 (set_breakpoint_data): Remove.
5491 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5492 (check_mem_read): Adjust for kind call bp_size.
5493 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5494 (clone_one_breakpoint): Adjust for kind.
5495 * mem-break.h (set_gdb_breakpoint): Likewise.
5496 (delete_gdb_breakpoint): Likewise.
5497 * server.c (process_serial_event): Likewise.
5499 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5501 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5502 (struct linux_target_ops) <breakpoint>: Remove.
5503 (struct linux_target_ops) <breakpoint_len>: Remove.
5504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5506 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5507 (arm_sw_breakpoint_from_kind): New function.
5508 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5509 (struct linux_target_ops) <breakpoint>: Remove.
5510 (struct linux_target_ops) <breakpoint_len>: Remove.
5511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5513 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5514 (struct linux_target_ops) <breakpoint>: Remove.
5515 (struct linux_target_ops) <breakpoint_len>: Remove.
5516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5518 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5519 (struct linux_target_ops) <breakpoint>: Remove.
5520 (struct linux_target_ops) <breakpoint_len>: Remove.
5521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5523 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5524 and sw_breakpoint_from_kind to increment the pc.
5525 (linux_breakpoint_kind_from_pc): New function.
5526 (linux_sw_breakpoint_from_kind): New function.
5527 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5528 (initialize_low): Call breakpoint_kind_from_pc and
5529 sw_breakpoint_from_kind to replace breakpoint_data/len.
5530 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5533 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5534 (struct linux_target_ops) <breakpoint>: Remove.
5535 (struct linux_target_ops) <breakpoint_len>: Remove.
5536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5538 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5539 (struct linux_target_ops) <breakpoint>: Remove.
5540 (struct linux_target_ops) <breakpoint_len>: Remove.
5541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5543 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5544 (struct linux_target_ops) <breakpoint>: Remove.
5545 (struct linux_target_ops) <breakpoint_len>: Remove.
5546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5548 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5549 (struct linux_target_ops) <breakpoint>: Remove.
5550 (struct linux_target_ops) <breakpoint_len>: Remove.
5551 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5552 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5553 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5554 (struct linux_target_ops) <breakpoint>: Remove.
5555 (struct linux_target_ops) <breakpoint_len>: Remove.
5556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5558 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5559 (struct linux_target_ops) <breakpoint>: Remove.
5560 (struct linux_target_ops) <breakpoint_len>: Remove.
5561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5563 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5564 (struct linux_target_ops) <breakpoint>: Remove.
5565 (struct linux_target_ops) <breakpoint_len>: Remove.
5566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5568 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5569 (struct linux_target_ops) <breakpoint>: Remove.
5570 (struct linux_target_ops) <breakpoint_len>: Remove.
5571 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5572 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5573 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5574 (struct linux_target_ops) <breakpoint>: Remove.
5575 (struct linux_target_ops) <breakpoint_len>: Remove.
5576 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5577 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5578 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5579 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5580 (struct linux_target_ops) <breakpoint>: Remove.
5581 (struct linux_target_ops) <breakpoint_len>: Remove.
5582 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5583 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5584 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5585 (struct linux_target_ops) <breakpoint>: Remove.
5586 (struct linux_target_ops) <breakpoint_len>: Remove.
5587 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5588 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5590 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5592 * linux-cris-low.c (cris_get_pc): Remove void arg.
5594 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5596 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5599 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5601 * inferiors.c (thread_pid_matches_callback): New function.
5602 (find_thread_process): New function.
5603 (remove_thread): Reset current_thread.
5604 (remove_process): Assert threads have been removed first.
5606 2015-10-15 Yao Qi <yao.qi@linaro.org>
5608 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5610 (aarch64_remove_point): Likewise.
5611 * regcache.c (regcache_register_size): New function.
5613 2015-10-12 Yao Qi <yao.qi@linaro.org>
5615 * linux-aarch64-low.c: Update all callers as emit_load_store
5616 is renamed to aarch64_emit_load_store.
5618 2015-10-12 Yao Qi <yao.qi@linaro.org>
5620 * linux-aarch64-low.c: Update all callers of function renaming
5621 from emit_insn to aarch64_emit_insn.
5623 2015-10-12 Yao Qi <yao.qi@linaro.org>
5625 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5626 arch/aarch64-insn.h.
5627 (struct aarch64_memory_operand): Likewise.
5629 (emit_insn): Move to arch/aarch64-insn.c.
5630 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5631 (emit_load_store): Move to arch/aarch64-insn.c.
5632 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5633 (can_encode_int32): Remove.
5635 2015-10-12 Yao Qi <yao.qi@linaro.org>
5637 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5638 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5639 (aarch64_relocate_instruction): Likewise.
5640 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5641 (struct aarch64_insn_visitor): Likewise.
5643 2015-10-12 Yao Qi <yao.qi@linaro.org>
5645 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5646 (struct aarch64_insn_visitor): New.
5647 (struct aarch64_insn_relocation_data): New.
5648 (aarch64_ftrace_insn_reloc_b): New function.
5649 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5650 (aarch64_ftrace_insn_reloc_cb): Likewise.
5651 (aarch64_ftrace_insn_reloc_tb): Likewise.
5652 (aarch64_ftrace_insn_reloc_adr): Likewise.
5653 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5654 (aarch64_ftrace_insn_reloc_others): Likewise.
5656 (aarch64_relocate_instruction): Use visitor.
5658 2015-10-12 Yao Qi <yao.qi@linaro.org>
5660 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5661 int. Add argument buf.
5662 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5663 aarch64_relocate_instruction.
5665 2015-10-12 Yao Qi <yao.qi@linaro.org>
5667 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5668 argument insn. Remove local variable insn. Don't call
5670 (aarch64_install_fast_tracepoint_jump_pad): Call
5673 2015-09-30 Yao Qi <yao.qi@linaro.org>
5675 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5676 (emit_load_store_pair): Likewise.
5678 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5680 * dll.c (match_dll): Add cast(s).
5681 (unloaded_dll): Likewise.
5682 * linux-low.c (second_thread_of_pid_p): Likewise.
5683 (delete_lwp_callback): Likewise.
5684 (count_events_callback): Likewise.
5685 (select_event_lwp_callback): Likewise.
5686 (linux_set_resume_request): Likewise.
5687 * server.c (accumulate_file_name_length): Likewise.
5688 (emit_dll_description): Likewise.
5689 (handle_qxfer_threads_worker): Likewise.
5690 (visit_actioned_threads): Likewise.
5691 * thread-db.c (any_thread_of): Likewise.
5692 * tracepoint.c (same_process_p): Likewise.
5693 (match_blocktype): Likewise.
5694 (build_traceframe_info_xml): Likewise.
5696 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5698 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5700 (gdb_unparse_agent_expr): Likewise.
5701 * hostio.c (require_data): Likewise.
5702 (handle_pread): Likewise.
5703 * linux-low.c (disable_regset): Likewise.
5704 (fetch_register): Likewise.
5705 (store_register): Likewise.
5706 (get_dynamic): Likewise.
5707 (linux_qxfer_libraries_svr4): Likewise.
5708 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5709 (set_fast_tracepoint_jump): Likewise.
5710 (uninsert_fast_tracepoint_jumps_at): Likewise.
5711 (reinsert_fast_tracepoint_jumps_at): Likewise.
5712 (validate_inserted_breakpoint): Likewise.
5713 (clone_agent_expr): Likewise.
5714 * regcache.c (init_register_cache): Likewise.
5715 * remote-utils.c (putpkt_binary_1): Likewise.
5716 (decode_M_packet): Likewise.
5717 (decode_X_packet): Likewise.
5718 (look_up_one_symbol): Likewise.
5719 (relocate_instruction): Likewise.
5720 (monitor_output): Likewise.
5721 * server.c (handle_search_memory): Likewise.
5722 (handle_qxfer_exec_file): Likewise.
5723 (handle_qxfer_libraries): Likewise.
5724 (handle_qxfer): Likewise.
5725 (handle_query): Likewise.
5726 (handle_v_cont): Likewise.
5727 (handle_v_run): Likewise.
5728 (captured_main): Likewise.
5729 * target.c (write_inferior_memory): Likewise.
5730 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5731 * tracepoint.c (init_trace_buffer): Likewise.
5732 (add_tracepoint_action): Likewise.
5733 (add_traceframe): Likewise.
5734 (add_traceframe_block): Likewise.
5735 (cmd_qtdpsrc): Likewise.
5736 (cmd_qtdv): Likewise.
5737 (cmd_qtstatus): Likewise.
5738 (response_source): Likewise.
5739 (response_tsv): Likewise.
5740 (cmd_qtnotes): Likewise.
5741 (gdb_collect): Likewise.
5742 (initialize_tracepoint): Likewise.
5744 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5746 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5747 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5748 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5750 (enum aarch64_condition_codes): New enum.
5751 (w0): New static global.
5754 (struct aarch64_memory_operand) <type>: New
5755 MEMORY_OPERAND_POSTINDEX type.
5756 (postindex_memory_operand): New helper function.
5757 (emit_ret): New function.
5758 (emit_load_store_pair): New function, factored out of emit_stp
5759 with support for MEMORY_OPERAND_POSTINDEX.
5760 (emit_stp): Rewrite using emit_load_store_pair.
5761 (emit_ldp): New function.
5762 (emit_load_store): Likewise.
5763 (emit_ldr): Mention post-index instruction in comment.
5764 (emit_ldrh): New function.
5765 (emit_ldrb): New function.
5766 (emit_ldrsw): Mention post-index instruction in comment.
5767 (emit_str): Likewise.
5768 (emit_subs): New function.
5769 (emit_cmp): Likewise.
5770 (emit_and): Likewise.
5771 (emit_orr): Likewise.
5772 (emit_orn): Likewise.
5773 (emit_eor): Likewise.
5774 (emit_mvn): Likewise.
5775 (emit_lslv): Likewise.
5776 (emit_lsrv): Likewise.
5777 (emit_asrv): Likewise.
5778 (emit_mul): Likewise.
5779 (emit_sbfm): Likewise.
5780 (emit_sbfx): Likewise.
5781 (emit_ubfm): Likewise.
5782 (emit_ubfx): Likewise.
5783 (emit_csinc): Likewise.
5784 (emit_cset): Likewise.
5785 (emit_nop): Likewise.
5786 (emit_ops_insns): New helper function.
5787 (emit_pop): Likewise.
5788 (emit_push): Likewise.
5789 (aarch64_emit_prologue): New function.
5790 (aarch64_emit_epilogue): Likewise.
5791 (aarch64_emit_add): Likewise.
5792 (aarch64_emit_sub): Likewise.
5793 (aarch64_emit_mul): Likewise.
5794 (aarch64_emit_lsh): Likewise.
5795 (aarch64_emit_rsh_signed): Likewise.
5796 (aarch64_emit_rsh_unsigned): Likewise.
5797 (aarch64_emit_ext): Likewise.
5798 (aarch64_emit_log_not): Likewise.
5799 (aarch64_emit_bit_and): Likewise.
5800 (aarch64_emit_bit_or): Likewise.
5801 (aarch64_emit_bit_xor): Likewise.
5802 (aarch64_emit_bit_not): Likewise.
5803 (aarch64_emit_equal): Likewise.
5804 (aarch64_emit_less_signed): Likewise.
5805 (aarch64_emit_less_unsigned): Likewise.
5806 (aarch64_emit_ref): Likewise.
5807 (aarch64_emit_if_goto): Likewise.
5808 (aarch64_emit_goto): Likewise.
5809 (aarch64_write_goto_address): Likewise.
5810 (aarch64_emit_const): Likewise.
5811 (aarch64_emit_call): Likewise.
5812 (aarch64_emit_reg): Likewise.
5813 (aarch64_emit_pop): Likewise.
5814 (aarch64_emit_stack_flush): Likewise.
5815 (aarch64_emit_zero_ext): Likewise.
5816 (aarch64_emit_swap): Likewise.
5817 (aarch64_emit_stack_adjust): Likewise.
5818 (aarch64_emit_int_call_1): Likewise.
5819 (aarch64_emit_void_call_2): Likewise.
5820 (aarch64_emit_eq_goto): Likewise.
5821 (aarch64_emit_ne_goto): Likewise.
5822 (aarch64_emit_lt_goto): Likewise.
5823 (aarch64_emit_le_goto): Likewise.
5824 (aarch64_emit_gt_goto): Likewise.
5825 (aarch64_emit_ge_got): Likewise.
5826 (aarch64_emit_ops_impl): New static global variable.
5827 (aarch64_emit_ops): New target function, return
5828 &aarch64_emit_ops_impl.
5829 (struct linux_target_ops): Install it.
5831 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5833 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5834 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5836 * linux-aarch64-ipa.c: New file.
5837 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5839 (aarch64_get_thread_area): New target method.
5840 (extract_signed_bitfield): New helper function.
5841 (aarch64_decode_ldr_literal): New function.
5842 (enum aarch64_opcodes): New enum.
5843 (struct aarch64_register): New struct.
5844 (struct aarch64_operand): New struct.
5845 (x0): New static global.
5854 (aarch64_register): New helper function.
5855 (register_operand): Likewise.
5856 (immediate_operand): Likewise.
5857 (struct aarch64_memory_operand): New struct.
5858 (offset_memory_operand): New helper function.
5859 (preindex_memory_operand): Likewise.
5860 (enum aarch64_system_control_registers): New enum.
5861 (ENCODE): New macro.
5862 (emit_insn): New helper function.
5863 (emit_b): New function.
5864 (emit_bcond): Likewise.
5865 (emit_cb): Likewise.
5866 (emit_tb): Likewise.
5867 (emit_blr): Likewise.
5868 (emit_stp): Likewise.
5869 (emit_ldp_q_offset): Likewise.
5870 (emit_stp_q_offset): Likewise.
5871 (emit_load_store): Likewise.
5872 (emit_ldr): Likewise.
5873 (emit_ldrsw): Likewise.
5874 (emit_str): Likewise.
5875 (emit_ldaxr): Likewise.
5876 (emit_stxr): Likewise.
5877 (emit_stlr): Likewise.
5878 (emit_data_processing_reg): Likewise.
5879 (emit_data_processing): Likewise.
5880 (emit_add): Likewise.
5881 (emit_sub): Likewise.
5882 (emit_mov): Likewise.
5883 (emit_movk): Likewise.
5884 (emit_mov_addr): Likewise.
5885 (emit_mrs): Likewise.
5886 (emit_msr): Likewise.
5887 (emit_sevl): Likewise.
5888 (emit_wfe): Likewise.
5889 (append_insns): Likewise.
5890 (can_encode_int32_in): New helper function.
5891 (aarch64_relocate_instruction): New function.
5892 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5893 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5894 (struct linux_target_ops): Install aarch64_get_thread_area,
5895 aarch64_install_fast_tracepoint_jump_pad and
5896 aarch64_get_min_fast_tracepoint_insn_len.
5898 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5900 * Makefile.in (aarch64-insn.o): New rule.
5901 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5903 2015-09-21 Yao Qi <yao.qi@linaro.org>
5905 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5907 2015-09-21 Yao Qi <yao.qi@linaro.org>
5909 * tracepoint.c (max_jump_pad_size): Remove.
5911 2015-09-18 Yao Qi <yao.qi@linaro.org>
5913 * linux-aarch64-low.c: Don't include sys/uio.h.
5914 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5916 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5918 * tracepoint.c (eval_result_type): Change prototype.
5919 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5921 2015-09-15 Pedro Alves <palves@redhat.com>
5923 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5924 Check whether to report exec events instead of checking whether
5925 multiprocess is enabled.
5927 2015-09-15 Pedro Alves <palves@redhat.com>
5930 * remote-utils.c (prepare_resume_reply): Merge
5931 TARGET_WAITKIND_VFORK_DONE switch case with the
5932 TARGET_WAITKIND_FORKED case.
5934 2015-09-15 Yao Qi <yao.qi@linaro.org>
5936 * server.c (handle_query): Check string comparison using
5937 "else if" instead of "if".
5939 2015-09-15 Yao Qi <yao.qi@linaro.org>
5941 * server.c (vCont_supported): New global variable.
5942 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5943 matches. Append ";vContSupported+" to own_buf.
5944 (handle_v_requests): Append ";s;S" to own_buf if target supports
5945 hardware single step or vCont_supported is false.
5946 (capture_main): Set vCont_supported to zero.
5948 2015-09-15 Yao Qi <yao.qi@linaro.org>
5950 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5952 (linux_supports_hardware_single_step): ... New function.
5953 (linux_target_ops): Update.
5954 * lynx-low.c (lynx_target_ops): Set field
5955 supports_hardware_single_step to target_can_do_hardware_single_step.
5956 * nto-low.c (nto_target_ops): Likewise.
5957 * spu-low.c (spu_target_ops): Likewise.
5958 * win32-low.c (win32_target_ops): Likewise.
5959 * target.c (target_can_do_hardware_single_step): New function.
5960 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5961 Remove. <supports_hardware_single_step>: New field.
5962 (target_supports_conditional_breakpoints): Remove.
5963 (target_supports_hardware_single_step): New macro.
5964 (target_can_do_hardware_single_step): Declare.
5965 * server.c (handle_query): Use target_supports_hardware_single_step
5966 instead of target_supports_conditional_breakpoints.
5968 2015-09-15 Yao Qi <yao.qi@linaro.org>
5970 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5972 (struct linux_target_ops the_low_target): Install
5973 aarch64_linux_siginfo_fixup.
5975 2015-09-11 Don Breazeal <donb@codesourcery.com>
5976 Luis Machado <lgustavo@codesourcery.com>
5978 * linux-low.c (linux_mourn): Static declaration.
5979 (linux_arch_setup): Move in front of
5980 handle_extended_wait.
5981 (linux_arch_setup_thread): New function.
5982 (handle_extended_wait): Handle exec events. Call
5983 linux_arch_setup_thread. Make event_lwp argument a
5984 pointer-to-a-pointer.
5985 (check_zombie_leaders): Do not check stopped threads.
5986 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5987 (linux_low_filter_event): Add lwp and thread for exec'ing
5988 non-leader thread if leader thread has been deleted.
5989 Refactor code into linux_arch_setup_thread and call it.
5990 Pass child lwp pointer by reference to handle_extended_wait.
5991 (linux_wait_for_event_filtered): Update comment.
5992 (linux_wait_1): Prevent clobbering exec event status.
5993 (linux_supports_exec_events): New function.
5994 (linux_target_ops) <supports_exec_events>: Initialize new member.
5995 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5997 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5998 * server.c (report_exec_events): New global variable.
5999 (handle_query): Handle qSupported query for exec-events feature.
6000 (captured_main): Initialize report_exec_events.
6001 * server.h (report_exec_events): Declare new global variable.
6002 * target.h (struct target_ops) <supports_exec_events>: New
6004 (target_supports_exec_events): New macro.
6005 * win32-low.c (win32_target_ops) <supports_exec_events>:
6006 Initialize new member.
6008 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6010 * linux-low.c (linux_low_enable_btrace): Remove.
6011 (linux_target_ops): Replace linux_low_enable_btrace with
6012 linux_enable_btrace.
6014 2015-09-03 Yao Qi <yao.qi@linaro.org>
6016 * linux-aarch64-low.c (aarch64_insert_point): Call
6017 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6020 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6022 * linux-low.c (check_stopped_by_breakpoint): Use
6023 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6025 2015-08-27 Pedro Alves <palves@redhat.com>
6027 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6029 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6031 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6032 the XNEW-family equivalent.
6033 (compile_bytecodes): Likewise.
6034 * dll.c (loaded_dll): Likewise.
6035 * event-loop.c (append_callback_event): Likewise.
6036 (create_file_handler): Likewise.
6037 (create_file_event): Likewise.
6038 * hostio.c (handle_open): Likewise.
6039 * inferiors.c (add_thread): Likewise.
6040 (add_process): Likewise.
6041 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6042 * linux-arm-low.c (arm_new_process): Likewise.
6043 (arm_new_thread): Likewise.
6044 * linux-low.c (add_to_pid_list): Likewise.
6045 (linux_add_process): Likewise.
6046 (handle_extended_wait): Likewise.
6047 (add_lwp): Likewise.
6048 (enqueue_one_deferred_signal): Likewise.
6049 (enqueue_pending_signal): Likewise.
6050 (linux_resume_one_lwp_throw): Likewise.
6051 (linux_resume_one_thread): Likewise.
6052 (linux_read_memory): Likewise.
6053 (linux_write_memory): Likewise.
6054 * linux-mips-low.c (mips_linux_new_process): Likewise.
6055 (mips_linux_new_thread): Likewise.
6056 (mips_add_watchpoint): Likewise.
6057 * linux-x86-low.c (initialize_low_arch): Likewise.
6058 * lynx-low.c (lynx_add_process): Likewise.
6059 * mem-break.c (set_raw_breakpoint_at): Likewise.
6060 (set_breakpoint): Likewise.
6061 (add_condition_to_breakpoint): Likewise.
6062 (add_commands_to_breakpoint): Likewise.
6063 (clone_agent_expr): Likewise.
6064 (clone_one_breakpoint): Likewise.
6065 * regcache.c (new_register_cache): Likewise.
6066 * remote-utils.c (look_up_one_symbol): Likewise.
6067 * server.c (queue_stop_reply): Likewise.
6068 (start_inferior): Likewise.
6069 (queue_stop_reply_callback): Likewise.
6070 (handle_target_event): Likewise.
6071 * spu-low.c (fetch_ppc_memory): Likewise.
6072 (store_ppc_memory): Likewise.
6073 * target.c (set_target_ops): Likewise.
6074 * thread-db.c (thread_db_load_search): Likewise.
6075 (try_thread_db_load_1): Likewise.
6076 * tracepoint.c (add_tracepoint): Likewise.
6077 (add_tracepoint_action): Likewise.
6078 (create_trace_state_variable): Likewise.
6079 (cmd_qtdpsrc): Likewise.
6080 (cmd_qtro): Likewise.
6081 (add_while_stepping_state): Likewise.
6082 * win32-low.c (child_add_thread): Likewise.
6083 (get_image_name): Likewise.
6085 2015-08-25 Yao Qi <yao.qi@linaro.org>
6087 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6089 2015-08-25 Yao Qi <yao.qi@linaro.org>
6091 * Makefile.in (aarch64-linux.o): New rule.
6092 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6094 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6095 (aarch64_init_debug_reg_state): Make it extern.
6096 (aarch64_linux_prepare_to_resume): Remove.
6098 2015-08-25 Yao Qi <yao.qi@linaro.org>
6100 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6101 lwp_arch_private_info and ptid_of_lwp.
6103 2015-08-25 Yao Qi <yao.qi@linaro.org>
6105 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6106 Find proc_info by find_process_pid. All callers updated.
6108 2015-08-25 Yao Qi <yao.qi@linaro.org>
6110 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6112 (debug_reg_change_callback): Remove.
6113 (aarch64_notify_debug_reg_change): Remove.
6115 2015-08-25 Yao Qi <yao.qi@linaro.org>
6117 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6118 Call current_lwp_ptid.
6120 2015-08-25 Yao Qi <yao.qi@linaro.org>
6122 * linux-aarch64-low.c (debug_reg_change_callback): Use
6125 2015-08-25 Yao Qi <yao.qi@linaro.org>
6127 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6129 2015-08-25 Yao Qi <yao.qi@linaro.org>
6131 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6133 2015-08-25 Yao Qi <yao.qi@linaro.org>
6135 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6138 2015-08-25 Yao Qi <yao.qi@linaro.org>
6140 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6142 (debug_reg_change_callback): Remove argument entry and add argument
6143 lwp. Remove local variable thread. Don't print thread id in the
6144 debugging output. Don't check whether pid of thread equals to pid.
6145 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6146 iterate_over_lwps instead find_inferior.
6148 2015-08-24 Pedro Alves <palves@redhat.com>
6150 * inferiors.c (get_first_process): New function.
6151 * inferiors.h (get_first_process): New declaration.
6152 * remote-utils.c (read_ptid): Default to the first process in the
6153 list, instead of to the current thread's process.
6155 2015-08-24 Pedro Alves <palves@redhat.com>
6157 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6158 * event-loop.c: Likewise.
6159 * remote-utils.c: Likewise.
6160 * tracepoint.c: Likewise.
6162 2015-08-24 Pedro Alves <palves@redhat.com>
6164 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6167 2015-08-21 Pedro Alves <palves@redhat.com>
6169 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6170 instead of literal 1.
6172 2015-08-21 Pedro Alves <palves@redhat.com>
6174 * tdesc.c (default_description): Explicitly zero-initialize.
6176 2015-08-21 Pedro Alves <palves@redhat.com>
6179 * inferiors.c (remove_thread): Discard any pending stop reply for
6181 * server.c (remove_all_on_match_pid): Rename to ...
6182 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6184 (discard_queued_stop_replies): Change parameter to a ptid. Now
6186 (handle_v_kill, kill_inferior_callback, captured_main)
6187 (process_serial_event): Adjust.
6188 * server.h (discard_queued_stop_replies): Declare.
6190 2015-08-21 Pedro Alves <palves@redhat.com>
6192 * linux-low.c (wait_for_sigstop): Always switch to no thread
6193 selected if the previously current thread dies.
6194 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6195 process instead of the current thread's.
6196 * remote-utils.c (input_interrupt): Don't check if there's no
6198 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6199 current thread to the general thread fails, error out.
6200 (handle_qxfer_auxv, handle_qxfer_libraries)
6201 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6202 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6203 (handle_query): Check if there's a thread selected instead of
6204 checking whether there's any thread in the thread list.
6205 (handle_qxfer_threads, handle_qxfer_btrace)
6206 (handle_qxfer_btrace_conf): Don't error out early if there's no
6207 thread in the thread list.
6208 (handle_v_cont, myresume): Don't set the current thread to the
6210 (process_serial_event) <Hg handling>: Also set thread_id if the
6211 previous general thread is still alive.
6212 (process_serial_event) <g/G handling>: If setting the current
6213 thread to the general thread fails, error out.
6214 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6215 thread's lwp instead of the current thread's.
6216 * target.c (set_desired_thread): If the desired thread was not
6217 found, leave the current thread pointing to NULL. Return an int
6218 (boolean) indicating success.
6219 * target.h (set_desired_thread): Change return type to int.
6221 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6223 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6224 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6226 (ps_get_thread_area): New function.
6228 2015-08-19 Gary Benson <gbenson@redhat.com>
6230 * hostio.c (handle_pread): Do not attempt to read more data
6231 than hostio_reply_with_data can fit in a packet.
6233 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6235 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6237 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6239 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6241 2015-08-06 Pedro Alves <palves@redhat.com>
6243 * tracepoint.c (expr_eval_result): Now an int.
6245 2015-08-06 Pedro Alves <palves@redhat.com>
6247 * gdbthread.h (struct regcache): Forward declare.
6248 (struct thread_info) <regcache_data>: Now a struct regcache
6250 * inferiors.c (inferior_regcache_data)
6251 (set_inferior_regcache_data): Now work with struct regcache
6253 * inferiors.h (struct regcache): Forward declare.
6254 (inferior_regcache_data, set_inferior_regcache_data): Now work
6255 with struct regcache pointers.
6256 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6257 (free_register_cache_thread): Remove struct regcache pointer
6260 2015-08-06 Pedro Alves <palves@redhat.com>
6262 * server.c (captured_main): On error, print the exception message
6263 to stderr, and if run_once is set, throw a quit.
6265 2015-08-06 Pedro Alves <palves@redhat.com>
6267 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6270 2015-08-06 Pedro Alves <palves@redhat.com>
6272 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6273 reading beyond the passed in buffer length.
6275 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6277 * tracepoint.c (symbol_list) <required>: Remove.
6279 2015-08-06 Pedro Alves <palves@redhat.com>
6281 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6282 count if stopping and suspending threads.
6283 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6284 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6285 (linux_detach): Complete an ongoing step-over.
6286 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6288 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6289 (linux_wait_1): If passing a signal to the inferior after
6290 finishing a step-over, unsuspend and re-resume all lwps. If we
6291 see a single-step event but the thread should be continuing, don't
6292 pass the trap to gdb.
6293 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6294 internal_error instead of gdb_assert.
6295 (enqueue_pending_signal): New function.
6296 (check_ptrace_stopped_lwp_gone): Add debug output.
6297 (start_step_over): Use internal_error instead of gdb_assert.
6298 (complete_ongoing_step_over): New function.
6299 (linux_resume_one_thread): Don't resume a suspended thread.
6300 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6303 2015-08-06 Pedro Alves <palves@redhat.com>
6305 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6306 (linux_thread_alive): Use lwp_is_marked_dead.
6307 (extended_event_reported): Delete.
6308 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6309 instead of extended_event_reported.
6310 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6312 (lwp_is_marked_dead): New function.
6313 (lwp_running): Use lwp_is_marked_dead.
6314 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6317 2015-08-06 Pedro Alves <palves@redhat.com>
6319 * linux-low.c (linux_wait_1): Move fork event output out of the
6320 !report_to_gdb check. Pass event_child->waitstatus to
6321 target_waitstatus_to_string instead of ourstatus.
6323 2015-08-04 Yao Qi <yao.qi@linaro.org>
6325 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6326 if current_thread is 32 bit.
6328 2015-08-04 Yao Qi <yao.qi@linaro.org>
6330 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6331 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6332 * server.c (extended_protocol): Remove "static".
6333 * server.h (extended_protocol): Declare it.
6335 2015-08-04 Yao Qi <yao.qi@linaro.org>
6337 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6338 both aarch64 and aarch32.
6339 (aarch64_set_pc): Likewise.
6341 2015-08-04 Yao Qi <yao.qi@linaro.org>
6343 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6344 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6345 arm-with-neon.xml to srv_xmlfiles.
6346 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6347 (is_64bit_tdesc): New function.
6348 (aarch64_linux_read_description): New function.
6349 (aarch64_arch_setup): Call aarch64_linux_read_description.
6350 (regs_info): Rename to regs_info_aarch64.
6351 (aarch64_regs_info): Return right regs_info.
6352 (initialize_low_arch): Call initialize_low_arch_aarch32.
6354 2015-08-04 Yao Qi <yao.qi@linaro.org>
6356 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6357 * linux-aarch32-low.c: New file.
6358 * linux-aarch32-low.h: New file.
6359 * linux-arm-low.c (arm_fill_gregset): Move it to
6360 linux-aarch32-low.c.
6361 (arm_store_gregset): Likewise.
6362 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6363 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6364 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6365 (regs_info): Rename to regs_info_arm.
6366 (arm_regs_info): Return regs_info_aarch32 if
6367 have_ptrace_getregset is 1 and target description is
6368 arm_with_neon or arm_with_vfpv3.
6369 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6370 Call initialize_low_arch_aarch32 instead.
6372 2015-08-04 Yao Qi <yao.qi@linaro.org>
6374 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6375 * linux-low.c: ... here.
6376 * linux-low.h (have_ptrace_getregset): Declare it.
6378 2015-08-04 Pedro Alves <palves@redhat.com>
6380 * thread-db.c (struct thread_db): Use new typedefs.
6381 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6383 (disable_thread_event_reporting): Cast result of dlsym to
6384 destination function pointer type.
6385 (thread_db_mourn): Use td_ta_delete_ftype.
6387 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6389 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6391 (CDX_BREAKPOINT): Define for R2.
6392 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6393 (the_low_target): Add comments.
6395 2015-07-30 Yao Qi <yao.qi@linaro.org>
6397 * linux-arm-low.c (arm_hwcap): Remove it.
6398 (arm_read_description): New local variable arm_hwcap. Don't
6399 set arm_hwcap to zero.
6401 2015-07-30 Yao Qi <yao.qi@linaro.org>
6403 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6404 Use regcache->tdesc instead.
6405 (arm_store_wmmxregset): Likewise.
6406 (arm_fill_vfpregset): Likewise.
6407 (arm_store_vfpregset): Likewise.
6409 2015-07-30 Yao Qi <yao.qi@linaro.org>
6411 * linux-arm-low.c: Include arch/arm.h.
6412 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6413 (arm_store_gregset): Likewise.
6415 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6417 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6418 ptrace's 4th parameter.
6420 2015-07-27 Yao Qi <yao.qi@linaro.org>
6422 * configure.srv (case aarch64*-*-linux*): Don't set
6425 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6427 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6429 * linux-arm-low.c: Likewise.
6430 * linux-cris-low.c: Likewise.
6431 * linux-crisv32-low.c: Likewise.
6432 * linux-low.c: Likewise.
6433 * linux-m68k-low.c: Likewise.
6434 * linux-mips-low.c: Likewise.
6435 * linux-nios2-low.c: Likewise.
6436 * linux-s390-low.c: Likewise.
6437 * linux-sparc-low.c: Likewise.
6438 * linux-tic6x-low.c: Likewise.
6439 * linux-tile-low.c: Likewise.
6440 * linux-x86-low.c: Likewise.
6442 2015-07-24 Pedro Alves <palves@redhat.com>
6444 * config.in: Regenerate.
6445 * configure: Regenerate.
6447 2015-07-24 Pedro Alves <palves@redhat.com>
6449 * acinclude.m4: Include ../ptrace.m4.
6450 * configure.ac: Call GDB_AC_PTRACE.
6451 * config.in, configure: Regenerate.
6453 2015-07-24 Yao Qi <yao.qi@linaro.org>
6455 * linux-low.c (linux_create_inferior): Remove setting to
6456 proc->priv->new_inferior.
6457 (linux_attach): Likewise.
6458 (linux_low_filter_event): Likewise.
6459 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6461 2015-07-24 Yao Qi <yao.qi@linaro.org>
6463 * linux-low.c (linux_arch_setup): New function.
6464 (linux_low_filter_event): If proc->tdesc is NULL and
6465 proc->attached is true, call the_low_target.arch_setup.
6466 Otherwise, keep status pending, and return.
6467 (linux_resume_one_lwp_throw): Don't call get_pc if
6468 thread->while_stepping isn't NULL. Don't call
6469 get_thread_regcache if proc->tdesc is NULL.
6470 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6471 (linux_target_ops): Install arch_setup.
6472 * server.c (start_inferior): Call the_target->arch_setup.
6473 * target.h (struct target_ops) <arch_setup>: New field.
6474 (target_arch_setup): New marco.
6475 * lynx-low.c (lynx_target_ops): Update.
6476 * nto-low.c (nto_target_ops): Update.
6477 * spu-low.c (spu_target_ops): Update.
6478 * win32-low.c (win32_target_ops): Update.
6480 2015-07-24 Yao Qi <yao.qi@linaro.org>
6482 * linux-low.c (linux_add_process): Don't set
6483 proc->priv->new_inferior.
6484 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6485 (linux_attach): Likewise.
6487 2015-07-24 Yao Qi <yao.qi@linaro.org>
6489 * server.c (start_inferior): Code refactor.
6491 2015-07-24 Yao Qi <yao.qi@linaro.org>
6493 * server.c (process_serial_event): Set general_thread.
6495 2015-07-21 Yao Qi <yao.qi@linaro.org>
6497 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6498 aarch64_linux_get_debug_reg_capacity.
6500 2015-07-17 Yao Qi <yao.qi@linaro.org>
6502 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6503 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6504 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6505 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6506 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6507 (AARCH64_HWP_ALIGNMENT): Likewise.
6508 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6509 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6510 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6511 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6512 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6513 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6514 (struct aarch64_debug_reg_state): Likewise.
6515 (struct arch_lwp_info): Likewise.
6516 (aarch64_align_watchpoint): Likewise.
6517 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6518 (aarch64_watchpoint_length): Likewise.
6519 (aarch64_point_encode_ctrl_reg): Likewise
6520 (aarch64_point_is_aligned): Likewise.
6521 (aarch64_align_watchpoint): Likewise.
6522 (aarch64_linux_set_debug_regs):
6523 (aarch64_dr_state_insert_one_point): Likewise.
6524 (aarch64_dr_state_remove_one_point): Likewise.
6525 (aarch64_handle_breakpoint): Likewise.
6526 (aarch64_handle_aligned_watchpoint): Likewise.
6527 (aarch64_handle_unaligned_watchpoint): Likewise.
6528 (aarch64_handle_watchpoint): Likewise.
6530 2015-07-17 Yao Qi <yao.qi@linaro.org>
6532 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6533 and don't aarch64_get_debug_reg_state. All callers update.
6534 (aarch64_handle_aligned_watchpoint): Likewise.
6535 (aarch64_handle_unaligned_watchpoint): Likewise.
6536 (aarch64_handle_watchpoint): Likewise.
6537 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6538 (aarch64_remove_point): Likewise.
6540 2015-07-17 Yao Qi <yao.qi@linaro.org>
6542 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6544 (aarch64_handle_unaligned_watchpoint): Likewise.
6546 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6548 Revert the previous 3 commits:
6549 Move gdb_regex* to common/
6550 Move linux_find_memory_regions_full & co.
6551 gdbserver build-id attribute generator
6553 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6554 Jan Kratochvil <jan.kratochvil@redhat.com>
6556 gdbserver build-id attribute generator.
6557 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6558 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6559 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6561 (get_dynamic): Use find_pdhr to traverse program headers.
6562 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6563 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6564 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6565 (get_hex_build_id): New.
6566 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6567 to reply XML document.
6569 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6570 Jan Kratochvil <jan.kratochvil@redhat.com>
6572 * target.c: Include target/target-utils.h and fcntl.h.
6573 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6574 (target_fileio_read_stralloc): New functions.
6576 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6578 * Makefile.in (OBS): Add gdb_regex.o.
6580 * config.in: Rebuilt.
6581 * configure: Rebuilt.
6583 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6584 Jan Kratochvil <jan.kratochvil@redhat.com>
6586 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6587 * Makefile.in (OBS): Add target-utils.o.
6588 (linux-maps.o, target-utils.o): New.
6589 * configure.srv (srv_linux_obj): Add linux-maps.o.
6591 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6593 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6595 (the_low_target): Install it.
6597 2015-07-14 Pedro Alves <palves@redhat.com>
6599 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6600 Instead, ignore ECHILD, and throw an error for other errnos.
6602 2015-07-10 Pedro Alves <palves@redhat.com>
6604 * event-loop.c (struct callback_event) <data>: Change type to
6605 gdb_client_data instance instead of gdb_client_data pointer.
6606 (append_callback_event): Adjust.
6608 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6610 * linux-aarch64-low.c: Add comments for each linux_target_ops
6611 method. Remove comments already covered in target_ops and
6612 linux_target_ops definitions.
6613 (the_low_target): Add comments for each unimplemented method.
6615 2015-07-09 Yao Qi <yao.qi@linaro.org>
6617 * linux-aarch64-low.c (aarch64_regmap): Remove.
6618 (aarch64_usrregs_info): Remove.
6619 (regs_info): Set field usrregs to NULL.
6621 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6623 * linux-low.c: Include "rsp-low.h"
6624 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6625 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6626 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6627 (handle_btrace_enable_pt): New.
6628 (handle_btrace_general_set): Support "pt".
6629 (handle_btrace_conf_general_set): Support "pt:size".
6631 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6633 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6636 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6638 * linux-aarch64-low.c: Remove comment about endianness.
6639 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6640 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6643 2015-06-24 Gary Benson <gbenson@redhat.com>
6645 * linux-i386-ipa.c (stdint.h): Do not include.
6646 * lynx-i386-low.c (stdint.h): Likewise.
6647 * lynx-ppc-low.c (stdint.h): Likewise.
6648 * mem-break.c (stdint.h): Likewise.
6649 * thread-db.c (stdint.h): Likewise.
6650 * tracepoint.c (stdint.h): Likewise.
6651 * win32-low.c (stdint.h): Likewise.
6653 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6655 * server.c (write_qxfer_response): Update call to
6656 remote_escape_output.
6658 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6659 Jan Kratochvil <jan.kratochvil@redhat.com>
6661 Merge multiple hex conversions.
6662 * gdbreplay.c (tohex): Rename to 'fromhex'.
6663 (logchar): Use fromhex.
6665 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6667 * server.c (handle_qxfer_libraries): Set `version' attribute for
6670 2015-06-10 Gary Benson <gbenson@redhat.com>
6672 * target.h (struct target_ops) <multifs_open>: New field.
6673 <multifs_unlink>: Likewise.
6674 <multifs_readlink>: Likewise.
6675 * linux-low.c (nat/linux-namespaces.h): New include.
6676 (linux_target_ops): Initialize the_target->multifs_open,
6677 the_target->multifs_unlink and the_target->multifs_readlink.
6678 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6679 * hostio.c (hostio_fs_pid): New static variable.
6680 (hostio_handle_new_gdb_connection): New function.
6681 (handle_setfs): Likewise.
6682 (handle_open): Use the_target->multifs_open as appropriate.
6683 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6684 (handle_readlink): Use the_target->multifs_readlink as
6686 (handle_vFile): Handle vFile:setfs packets.
6687 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6688 after target_handle_new_gdb_connection.
6690 2015-06-10 Gary Benson <gbenson@redhat.com>
6692 * configure.ac (AC_CHECK_FUNCS): Add setns.
6693 * config.in: Regenerate.
6694 * configure: Likewise.
6695 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6696 (linux-namespaces.o): New rule.
6697 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6699 2015-06-09 Gary Benson <gbenson@redhat.com>
6701 * hostio.c (handle_open): Process mode argument with
6702 fileio_to_host_mode.
6704 2015-06-01 Yao Qi <yao.qi@linaro.org>
6706 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6707 * linux-x86-low.c: Likewise.
6709 2015-05-28 Don Breazeal <donb@codesourcery.com>
6711 * linux-low.c (handle_extended_wait): Initialize
6712 thread_info.last_resume_kind for new fork children.
6714 2015-05-15 Pedro Alves <palves@redhat.com>
6716 * target.h (target_handle_new_gdb_connection): Rewrite using if
6717 wrapped in do/while.
6719 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6721 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6722 * configure, config.in: Regenerate.
6723 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6726 2015-05-12 Don Breazeal <donb@codesourcery.com>
6728 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6729 PTRACE_EVENT_VFORK_DONE.
6730 (linux_low_ptrace_options, extended_event_reported): Add vfork
6732 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6733 and "vforkdone" for RSP 'T' Stop Reply Packet.
6734 * server.h (report_vfork_events): Declare
6737 2015-05-12 Don Breazeal <donb@codesourcery.com>
6739 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6740 (the_low_target) <new_fork>: Initialize new member.
6741 * linux-arm-low.c (arm_new_fork): New function.
6742 (the_low_target) <new_fork>: Initialize new member.
6743 * linux-low.c (handle_extended_wait): Call new target function
6745 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6746 * linux-mips-low.c (mips_add_watchpoint): New function
6747 extracted from mips_insert_point.
6748 (the_low_target) <new_fork>: Initialize new member.
6749 (mips_linux_new_fork): New function.
6750 (mips_insert_point): Call mips_add_watchpoint.
6751 * linux-x86-low.c (x86_linux_new_fork): New function.
6752 (the_low_target) <new_fork>: Initialize new member.
6754 2015-05-12 Don Breazeal <donb@codesourcery.com>
6756 * linux-low.c (handle_extended_wait): Implement return value,
6757 rename argument 'event_child' to 'event_lwp', handle
6758 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6759 (linux_low_ptrace_options): New function.
6760 (linux_low_filter_event): Call linux_low_ptrace_options,
6761 use different argument fo linux_enable_event_reporting,
6762 use return value from handle_extended_wait.
6763 (extended_event_reported): New function.
6764 (linux_wait_1): Call extended_event_reported and set
6765 status to report fork events.
6766 (linux_write_memory): Add pid to debug message.
6767 (reset_lwp_ptrace_options_callback): New function.
6768 (linux_handle_new_gdb_connection): New function.
6769 (linux_target_ops): Initialize new structure member.
6770 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6771 * lynx-low.c: Initialize new structure member.
6772 * remote-utils.c (prepare_resume_reply): Implement stop reason
6773 "fork" for "T" stop message.
6774 * server.c (handle_query): Call handle_new_gdb_connection.
6775 * server.h (report_fork_events): Declare global flag.
6776 * target.h (struct target_ops) <handle_new_gdb_connection>:
6778 (target_handle_new_gdb_connection): New macro.
6779 * win32-low.c: Initialize new structure member.
6781 2015-05-12 Don Breazeal <donb@codesourcery.com>
6783 * mem-break.c (APPEND_TO_LIST): Define macro.
6784 (clone_agent_expr): New function.
6785 (clone_one_breakpoint): New function.
6786 (clone_all_breakpoints): New function.
6787 * mem-break.h: Declare new functions.
6789 2015-05-12 Don Breazeal <donb@codesourcery.com>
6791 * linux-low.c (linux_supports_fork_events): New function.
6792 (linux_supports_vfork_events): New function.
6793 (linux_target_ops): Initialize new structure members.
6794 (initialize_low): Call linux_check_ptrace_features.
6795 * lynx-low.c (lynx_target_ops): Initialize new structure
6797 * server.c (report_fork_events, report_vfork_events):
6799 (handle_query): Add new features to qSupported packet and
6801 (captured_main): Initialize new global variables.
6802 * target.h (struct target_ops) <supports_fork_events>:
6804 <supports_vfork_events>: New member.
6805 (target_supports_fork_events): New macro.
6806 (target_supports_vfork_events): New macro.
6807 * win32-low.c (win32_target_ops): Initialize new structure
6810 2015-05-12 Gary Benson <gbenson@redhat.com>
6812 * server.c (handle_qxfer_exec_file): Use current process
6815 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6817 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6818 Remove HAVE_PTRACE_GETREGS conditionals.
6819 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6820 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6822 2015-05-08 Yao Qi <yao.qi@linaro.org>
6824 * linux-low.c (linux_supports_conditional_breakpoints): New
6826 (linux_target_ops): Install new target method.
6827 * lynx-low.c (lynx_target_ops): Install NULL hook for
6828 supports_conditional_breakpoints.
6829 * nto-low.c (nto_target_ops): Likewise.
6830 * spu-low.c (spu_target_ops): Likewise.
6831 * win32-low.c (win32_target_ops): Likewise.
6832 * server.c (handle_query): Check
6833 target_supports_conditional_breakpoints.
6834 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6836 (target_supports_conditional_breakpoints): New macro.
6838 2015-05-06 Pedro Alves <palves@redhat.com>
6841 * server.c (start_inferior): If the process exits, mourn it.
6843 2015-04-21 Gary Benson <gbenson@redhat.com>
6845 * hostio.c (fileio_open_flags_to_host): Factored out to
6846 fileio_to_host_openflags in common/fileio.c. Single use
6849 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6851 * linux-xtensa-low.c (xtensa_fill_gregset)
6852 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6855 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6857 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6858 (regs_info): Replace usrregs pointer with NULL.
6860 2015-04-17 Gary Benson <gbenson@redhat.com>
6862 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6863 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6864 * server.c (handle_qxfer_exec_file): New function.
6865 (qxfer_packets): Add exec-file entry.
6866 (handle_query): Report qXfer:exec-file:read as supported packet.
6868 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6870 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6872 2015-04-09 Gary Benson <gbenson@redhat.com>
6874 * hostio-errno.c (errno_to_fileio_error): Remove function.
6875 Update caller to use remote_fileio_to_fio_error.
6877 2015-04-09 Yao Qi <yao.qi@linaro.org>
6879 * linux-low.c (linux_insert_point): Call
6880 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6881 (linux_remove_point): Call remove_memory_breakpoint if type is
6883 * linux-x86-low.c (x86_insert_point): Don't call
6884 insert_memory_breakpoint.
6885 (x86_remove_point): Don't call remove_memory_breakpoint.
6887 2015-04-01 Pedro Alves <palves@redhat.com>
6888 Cleber Rosa <crosa@redhat.com>
6890 * server.c (gdbserver_usage): Reorganize and extend the usage
6893 2015-03-24 Pedro Alves <palves@redhat.com>
6895 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6896 output. Also dump TRAP_TRACE.
6897 (linux_low_filter_event): In debug output, distinguish a
6898 resume_stop SIGSTOP from a delayed SIGSTOP.
6900 2015-03-24 Gary Benson <gbenson@redhat.com>
6902 * linux-x86-low.c (x86_linux_new_thread): Moved to
6904 (x86_linux_prepare_to_resume): Likewise.
6906 2015-03-24 Gary Benson <gbenson@redhat.com>
6908 * Makefile.in (x86-linux-dregs.o): New rule.
6909 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6910 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6911 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6912 (x86_linux_dr_get): Likewise.
6913 (x86_linux_dr_set): Likewise.
6914 (update_debug_registers_callback): Likewise.
6915 (x86_linux_dr_set_addr): Likewise.
6916 (x86_linux_dr_get_addr): Likewise.
6917 (x86_linux_dr_set_control): Likewise.
6918 (x86_linux_dr_get_control): Likewise.
6919 (x86_linux_dr_get_status): Likewise.
6920 (x86_linux_update_debug_registers): Likewise.
6922 2015-03-24 Gary Benson <gbenson@redhat.com>
6924 * linux-x86-low.c (x86_linux_update_debug_registers):
6925 New function, factored out from...
6926 (x86_linux_prepare_to_resume): ...this.
6928 2015-03-24 Gary Benson <gbenson@redhat.com>
6930 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6931 (x86_linux_dr_set): Likewise.
6932 (update_debug_registers_callback): Likewise.
6933 (x86_linux_dr_set_addr): Likewise.
6934 (x86_linux_dr_get_addr): Likewise.
6935 (x86_linux_dr_set_control): Likewise.
6936 (x86_linux_dr_get_control): Likewise.
6937 (x86_linux_dr_get_status): Likewise.
6938 (x86_linux_prepare_to_resume): Likewise.
6940 2015-03-24 Gary Benson <gbenson@redhat.com>
6942 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6943 Use perror_with_name. Pass string through gettext.
6944 (x86_linux_dr_set): Likewise.
6946 2015-03-24 Gary Benson <gbenson@redhat.com>
6948 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6949 (x86_linux_dr_set_addr): ...this.
6950 (x86_dr_low_get_addr): Rename to...
6951 (x86_linux_dr_get_addr): ...this.
6952 (x86_dr_low_set_control): Rename to...
6953 (x86_linux_dr_set_control): ...this.
6954 (x86_dr_low_get_control): Rename to...
6955 (x86_linux_dr_get_control): ...this.
6956 (x86_dr_low_get_status): Rename to...
6957 (x86_linux_dr_get_status): ...this.
6958 (x86_dr_low): Update with new function names.
6960 2015-03-24 Gary Benson <gbenson@redhat.com>
6962 * Makefile.in (x86-linux.o): New rule.
6963 * configure.srv: Add x86-linux.o to relevant targets.
6964 * linux-low.c (lwp_set_arch_private_info): New function.
6965 (lwp_arch_private_info): Likewise.
6966 * linux-x86-low.c: Include nat/x86-linux.h.
6967 (arch_lwp_info): Removed structure.
6968 (update_debug_registers_callback):
6969 Use lwp_set_debug_registers_changed.
6970 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6971 and lwp_set_debug_registers_changed.
6972 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6974 2015-03-24 Gary Benson <gbenson@redhat.com>
6976 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6977 * linux-arm-low.c (arm_new_thread): Likewise.
6978 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6979 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6980 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6981 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6983 2015-03-24 Gary Benson <gbenson@redhat.com>
6985 * linux-low.c (ptid_of_lwp): New function.
6986 (lwp_is_stopped): Likewise.
6987 (lwp_stop_reason): Likewise.
6988 * linux-x86-low.c (update_debug_registers_callback):
6990 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6993 2015-03-24 Gary Benson <gbenson@redhat.com>
6995 * linux-low.h (linux_stop_lwp): Remove declaration.
6997 2015-03-24 Gary Benson <gbenson@redhat.com>
6999 * linux-low.h: Include nat/linux-nat.h.
7000 * linux-low.c (iterate_over_lwps_args): New structure.
7001 (iterate_over_lwps_filter): New function.
7002 (iterate_over_lwps): Likewise.
7003 * linux-x86-low.c (update_debug_registers_callback):
7004 Update signature to what iterate_over_lwps expects.
7005 Remove PID check that iterate_over_lwps now performs.
7006 (x86_dr_low_set_addr): Use iterate_over_lwps.
7007 (x86_dr_low_set_control): Likewise.
7009 2015-03-24 Gary Benson <gbenson@redhat.com>
7011 * linux-x86-low.c (x86_debug_reg_state): New function.
7012 (x86_linux_prepare_to_resume): Use the above.
7014 2015-03-24 Gary Benson <gbenson@redhat.com>
7016 * linux-low.c (current_lwp_ptid): New function.
7017 * linux-x86-low.c: Include nat/linux-nat.h.
7018 (x86_dr_low_get_addr): Use current_lwp_ptid.
7019 (x86_dr_low_get_control): Likewise.
7020 (x86_dr_low_get_status): Likewise.
7022 2015-03-20 Pedro Alves <palves@redhat.com>
7024 * tracepoint.c (cmd_qtstatus): Make "str" const.
7026 2015-03-20 Pedro Alves <palves@redhat.com>
7028 * server.c (handle_general_set): Make "req_str" const.
7030 2015-03-19 Pedro Alves <palves@redhat.com>
7032 * linux-low.c (linux_resume_one_lwp): Rename to ...
7033 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7034 instead call perror_with_name.
7035 (check_ptrace_stopped_lwp_gone): New function.
7036 (linux_resume_one_lwp): Reimplement as wrapper around
7037 linux_resume_one_lwp_throw that swallows errors if the LWP is
7040 2015-03-19 Pedro Alves <palves@redhat.com>
7042 * linux-low.c (count_events_callback, select_event_lwp_callback):
7043 No longer check whether the thread has resume_stop as last resume
7046 2015-03-19 Pedro Alves <palves@redhat.com>
7048 * linux-low.c (count_events_callback, select_event_lwp_callback):
7049 Use the lwp's status_pending_p field, not the thread's.
7051 2015-03-19 Pedro Alves <palves@redhat.com>
7053 * linux-low.c (select_event_lwp_callback): Update comments to
7054 no longer mention SIGTRAP.
7056 2015-03-18 Gary Benson <gbenson@redhat.com>
7058 * server.c (handle_query): Do not report vFile:fstat as supported.
7060 2015-03-11 Gary Benson <gbenson@redhat.com>
7062 * hostio.c (sys/types.h): New include.
7063 (sys/stat.h): Likewise.
7064 (common-remote-fileio.h): Likewise.
7065 (handle_fstat): New function.
7066 (handle_vFile): Handle vFile:fstat packets.
7068 2015-03-11 Gary Benson <gbenson@redhat.com>
7070 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7071 struct stat.st_blocks and struct stat.st_blksize.
7072 * configure: Regenerate.
7073 * config.in: Likewise.
7074 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7075 (OBS): Add common-remote-fileio.o.
7076 (common-remote-fileio.o): New rule.
7078 2015-03-09 Pedro Alves <palves@redhat.com>
7080 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7081 'struct sockaddr' pointer in 'accept' call.
7083 2015-03-09 Pedro Alves <palves@redhat.com>
7086 2015-03-07 Pedro Alves <palves@redhat.com>
7087 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7088 or <winsock2.h> here. Instead include "gdb_socket.h".
7089 (remote_open): Use union gdb_sockaddr_u.
7090 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7091 or <winsock2.h> here. Instead include "gdb_socket.h".
7092 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7093 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7095 (init_named_socket, gdb_agent_helper_thread): Use union
7098 2015-03-07 Pedro Alves <palves@redhat.com>
7100 * configure.ac (build_warnings): Move
7101 -Wdeclaration-after-statement to the C-specific set.
7102 * configure: Regenerate.
7104 2015-03-07 Pedro Alves <palves@redhat.com>
7106 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7107 or <winsock2.h> here. Instead include "gdb_socket.h".
7108 (remote_open): Use union gdb_sockaddr_u.
7109 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7110 or <winsock2.h> here. Instead include "gdb_socket.h".
7111 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7112 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7114 (init_named_socket, gdb_agent_helper_thread): Use union
7117 2015-03-07 Pedro Alves <palves@redhat.com>
7119 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7122 2015-03-06 Yao Qi <yao.qi@linaro.org>
7124 * linux-aarch64-low.c (aarch64_insert_point): Use
7125 show_debug_regs as a boolean.
7126 (aarch64_remove_point): Likewise.
7128 2015-03-05 Pedro Alves <palves@redhat.com>
7130 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7131 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7132 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7133 * nto-low.c (nto_target_ops): Likewise.
7134 * spu-low.c (spu_target_ops): Likewise.
7135 * win32-low.c (win32_target_ops): Likewise.
7137 2015-03-04 Pedro Alves <palves@redhat.com>
7139 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7140 Decide whether a breakpoint triggered based on the SIGTRAP's
7142 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7143 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7144 (linux_low_filter_event): Check for breakpoints before checking
7146 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7148 (linux_stopped_by_sw_breakpoint)
7149 (linux_supports_stopped_by_sw_breakpoint)
7150 (linux_stopped_by_hw_breakpoint)
7151 (linux_supports_stopped_by_hw_breakpoint): New functions.
7152 (linux_target_ops): Install new target methods.
7154 2015-03-04 Pedro Alves <palves@redhat.com>
7156 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7157 * server.c (swbreak_feature, hwbreak_feature): New globals.
7158 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7159 (captured_main): Clear swbreak_feature and hwbreak_feature.
7160 * server.h (swbreak_feature, hwbreak_feature): Declare.
7161 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7162 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7163 supports_stopped_by_hw_breakpoint>: New fields.
7164 (target_supports_stopped_by_sw_breakpoint)
7165 (target_stopped_by_sw_breakpoint)
7166 (target_supports_stopped_by_hw_breakpoint)
7167 (target_stopped_by_hw_breakpoint): Declare.
7169 2015-03-04 Pedro Alves <palves@redhat.com>
7171 enum lwp_stop_reason -> enum target_stop_reason
7172 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7173 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7174 (linux_wait_1, stuck_in_jump_pad_callback)
7175 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7176 (linux_stopped_by_watchpoint):
7177 * linux-low.h (enum lwp_stop_reason): Delete.
7178 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7179 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7181 2015-03-04 Yao Qi <yao.qi@linaro.org>
7183 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7185 2015-03-03 Gary Benson <gbenson@redhat.com>
7187 * hostio.c (handle_vFile): Fix prefix lengths.
7189 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7191 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7194 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7196 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7197 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7198 (clean): Add "rm -f" for above C files.
7199 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7200 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7201 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7202 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7203 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7204 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7205 (init_registers_s390x_vx_linux64)
7206 (init_registers_s390x_tevx_linux64)
7207 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7208 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7210 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7211 (s390_store_vxrs_high): New functions.
7212 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7214 (s390_arch_setup): Add logic for selecting one of the new target
7215 descriptions. Activate the new vector regsets if applicable.
7216 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7217 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7218 and init_registers_s390x_tevx_linux64.
7220 2015-03-01 Pedro Alves <palves@redhat.com>
7222 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7225 2015-02-27 Pedro Alves <palves@redhat.com>
7227 * linux-x86-low.c (u_debugreg_offset): New function.
7228 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7230 2015-02-27 Pedro Alves <palves@redhat.com>
7232 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7233 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7234 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7235 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7236 (ps_lsetfpregs, ps_getpid)
7237 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7238 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7239 (ps_lsetxregs, ps_plog): Declare.
7241 2015-02-27 Pedro Alves <palves@redhat.com>
7243 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7244 IP_AGENT_EXPORT_FUNC.
7245 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7246 IP_AGENT_EXPORT_FUNC.
7247 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7248 (IP_AGENT_EXPORT): Delete.
7249 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7250 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7251 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7252 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7253 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7254 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7255 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7256 (traceframe_read_count, traceframe_write_count)
7257 (traceframes_created, trace_state_variables, get_raw_reg)
7258 (get_trace_state_variable_value, set_trace_state_variable_value)
7259 (ust_loaded, helper_thread_id, cmd_buf): Use
7260 IPA_SYM_EXPORTED_NAME.
7261 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7262 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7263 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7264 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7265 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7266 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7267 EXTERN_C_PUSH/EXTERN_C_POP.
7268 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7269 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7270 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7271 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7272 (traceframe_write_count, traceframe_read_count)
7273 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7274 (about_to_request_buffer_space, get_trace_state_variable_value)
7275 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7276 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7277 EXTERN_C_PUSH/EXTERN_C_POP.
7278 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7279 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7280 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7281 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7282 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7283 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7284 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7285 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7287 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7288 (IP_AGENT_EXPORT_VAR_DECL): Define.
7290 (gdb_agent_get_raw_reg): Declare.
7292 2015-02-27 Tom Tromey <tromey@redhat.com>
7293 Pedro Alves <palves@redhat.com>
7295 Rename symbols whose names are reserved C++ keywords throughout.
7297 2015-02-27 Pedro Alves <palves@redhat.com>
7299 * Makefile.in (COMPILER): New, get it from autoconf.
7300 (CXX): Get from autoconf instead.
7301 (COMPILE.pre): Use COMPILER.
7302 (CC-LD): Rename to ...
7303 (CC_LD): ... this. Use COMPILER.
7304 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7305 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7306 * acinclude.m4: Include build-with-cxx.m4.
7307 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7308 Disable -Werror by default if building in C++ mode.
7309 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7310 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7311 the C++ compiler. Save/restore CXXFLAGS too.
7312 * configure: Regenerate.
7314 2015-02-27 Pedro Alves <palves@redhat.com>
7316 * acinclude.m4: Include libiberty.m4.
7317 * configure.ac: Call libiberty_INIT.
7318 * config.in, configure: Regenerate.
7320 2015-02-26 Pedro Alves <palves@redhat.com>
7322 * linux-low.c (linux_wait_1): When incrementing the PC past a
7323 program breakpoint always use the_low_target.breakpoint_len as
7324 increment, rather than the maximum between that and
7325 the_low_target.decr_pc_after_break.
7327 2015-02-23 Pedro Alves <palves@redhat.com>
7329 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7330 thread was doing a step-over; always adjust the PC if
7331 we stepped over a permanent breakpoint.
7332 (linux_wait_1): If we stepped over breakpoint that was on top of a
7333 permanent breakpoint, manually advance the PC past it.
7335 2015-02-23 Pedro Alves <palves@redhat.com>
7337 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7339 (x86_fill_gregset, x86_store_gregset): Use it when handling
7342 2015-02-20 Pedro Alves <palves@redhat.com>
7344 * thread-db.c: Include "nat/linux-procfs.h".
7345 (thread_db_init): Skip listing new threads if the kernel supports
7346 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7348 2015-02-20 Pedro Alves <palves@redhat.com>
7350 * linux-low.c (status_pending_p_callback): Use ptid_match.
7352 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7354 PR breakpoints/16812
7355 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7356 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7357 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7359 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7361 PR breakpoints/15956
7362 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7364 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7366 * linux-low.c (linux_low_btrace_conf): Print size.
7367 * server.c (handle_btrace_conf_general_set): New.
7368 (hanle_general_set): Call handle_btrace_conf_general_set.
7369 (handle_query): Report Qbtrace-conf:bts:size as supported.
7371 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7373 * linux-low.c (linux_low_enable_btrace): Update parameters.
7374 (linux_low_btrace_conf): New.
7375 (linux_target_ops)<to_btrace_conf>: Initialize.
7376 * server.c (current_btrace_conf): New.
7377 (handle_btrace_enable): Rename to ...
7378 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7379 to target_enable_btrace. Update comment. Update users.
7380 (handle_qxfer_btrace_conf): New.
7381 (qxfer_packets): Add btrace-conf entry.
7382 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7383 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7384 (target_ops)<read_btrace_conf>: New.
7385 (target_enable_btrace): Update parameters.
7386 (target_read_btrace_conf): New.
7388 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7390 * server.c (handle_btrace_general_set): Remove call to
7391 target_supports_btrace.
7392 (supported_btrace_packets): New.
7393 (handle_query): Call supported_btrace_packets.
7394 * target.h: include btrace-common.h.
7395 (btrace_target_info): Removed.
7396 (supports_btrace, target_supports_btrace): Update parameters.
7398 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7400 * Makefile.in (SFILES): Add common/btrace-common.c.
7401 (OBS): Add common/btrace-common.o.
7402 (btrace-common.o): Add build rules.
7403 * linux-low: Include btrace-common.h.
7404 (linux_low_read_btrace): Use struct btrace_data. Call
7405 btrace_data_init and btrace_data_fini.
7407 2015-02-06 Pedro Alves <palves@redhat.com>
7409 * thread-db.c (find_new_threads_callback): Add debug output.
7411 2015-02-04 Pedro Alves <palves@redhat.com>
7413 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7414 (resume_stopped_resumed_lwps): New function.
7415 (linux_wait_for_event_filtered): Use it.
7417 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7419 * Makefile.in (SFILES): Add linux-personality.c.
7420 (linux-personality.o): New rule.
7421 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7422 list of objects to be built.
7423 * linux-low.c: Include nat/linux-personality.h.
7424 (linux_create_inferior): Remove code to disable address space
7425 randomization (moved to ../nat/linux-personality.c). Create
7426 cleanup to disable address space randomization.
7428 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7430 * Makefile.in (posix-strerror.o): New rule.
7431 (mingw-strerror.o): Likewise.
7432 * configure: Regenerated.
7433 * configure.ac: Source file ../common/common.host. Initialize new
7434 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7436 2015-01-14 Yao Qi <yao@codesourcery.com>
7438 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7439 (ppc-linux.o): New rule.
7440 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7441 * configure.ac: AC_CHECK_FUNCS(getauxval).
7442 * config.in: Re-generated.
7443 * configure: Re-generated.
7444 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7445 ppc64_64bit_inferior_p
7447 2015-01-14 Yao Qi <yao@codesourcery.com>
7449 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7450 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7451 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7452 (PT_ORIG_R3, PT_TRAP): Likewise.
7453 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7454 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7455 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7457 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7459 * i387-fp.c (i387_cache_to_xsave): In look over
7460 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7461 zmmh_low_space field by use of zmmh_high_space.
7463 2015-01-09 Pedro Alves <palves@redhat.com>
7465 * linux-low.c (step_over_bkpt): Move higher up in the file.
7466 (handle_extended_wait): Don't store the stop_pc here.
7467 (get_stop_pc): Adjust comments and rename to ...
7468 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7469 stopped for a software breakpoint or hardware breakpoint.
7470 (thread_still_has_status_pending_p): New function.
7471 (status_pending_p_callback): Use
7472 thread_still_has_status_pending_p. If the event is no longer
7473 interesting, resume the LWP.
7474 (handle_tracepoints): Add assert.
7475 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7476 (wstatus_maybe_breakpoint): New function.
7477 (cancel_breakpoint): Delete function.
7478 (check_stopped_by_watchpoint): New function, factored out from
7479 linux_low_filter_event.
7480 (lp_status_maybe_breakpoint): Delete function.
7481 (linux_low_filter_event): Remove filter_ptid argument.
7482 Leave thread group exits pending here. Store the LWP's stop PC.
7483 Always leave events pending.
7484 (linux_wait_for_event_filtered): Pull all events out of the
7485 kernel, and leave them all pending.
7486 (count_events_callback, select_event_lwp_callback): Consider all
7488 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7489 (select_event_lwp): Only give preference to the stepping LWP in
7490 all-stop mode. Adjust comments.
7491 (ignore_event): New function.
7492 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7493 references to cancel_breakpoints. Adjust to renames. Also give
7494 equal priority to all LWPs that have had events in non-stop mode.
7495 If reporting a software breakpoint event, unadjust the LWP's PC.
7496 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7497 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7499 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7500 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7501 (linux_stopped_by_watchpoint): Adjust.
7502 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7503 * linux-low.h (enum lwp_stop_reason): New.
7504 (struct lwp_info) <stop_pc>: Adjust comment.
7505 <stopped_by_watchpoint>: Delete field.
7506 <stop_reason>: New field.
7507 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7508 * mem-break.c (software_breakpoint_inserted_here)
7509 (hardware_breakpoint_inserted_here): New function.
7510 * mem-break.h (software_breakpoint_inserted_here)
7511 (hardware_breakpoint_inserted_here): Declare.
7512 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7513 (cancel_breakpoints): Delete.
7514 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7515 (upload_fast_traceframes): Remove references to
7518 2015-01-09 Pedro Alves <palves@redhat.com>
7520 * thread-db.c (find_new_threads_callback): Ignore thread if the
7521 kernel thread ID is -1.
7523 2015-01-09 Pedro Alves <palves@redhat.com>
7525 * linux-low.c (linux_attach_fail_reason_string): Move to
7526 nat/linux-ptrace.c, and rename.
7527 (linux_attach_lwp): Update comment.
7528 (attach_proc_task_lwp_callback): New function.
7529 (linux_attach): Adjust to rename and use
7530 linux_proc_attach_tgid_threads.
7531 (linux_attach_fail_reason_string): Delete declaration.
7533 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7535 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7536 * server.c (gdbserver_version): Likewise.
7538 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7540 * remote-utils.c: Include ctype.h.
7541 (input_interrupt): Explicitly handle the case when the char
7542 received is the NUL byte. Improve the printing of non-ASCII
7545 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7547 * linux-low.c (linux_low_filter_event): Update call to
7548 linux_enable_event_reporting following the addition of
7549 a new parameter to that function.
7551 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7554 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7555 (AARCH64_FPCR_REGNO): Likewise.
7556 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7557 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7558 (aarch64_store_fpregset): Likewise.
7560 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7562 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7563 Remove FIXME comment about assumption about N.
7565 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7567 * configure.ac: If large-file support is disabled in GDBserver,
7568 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7569 * configure: Regenerate.
7571 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7573 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7574 warning upon ENODATA from ptrace.
7575 * linux-s390-low.c (s390_store_tdb): New.
7576 (s390_regsets): Add regset for NT_S390_TDB.
7578 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7580 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7581 without a fill_function.
7582 * linux-s390-low.c (s390_fill_last_break): Remove.
7583 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7584 (s390_arch_setup): Use regset's size instead of fill_function for
7587 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7589 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7590 the regset's store function when ptrace returned an error.
7591 * regcache.c (get_thread_regcache): Invalidate register cache
7592 before fetching inferior's registers.
7594 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7596 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7597 while-loop as for-loop.
7598 (regsets_store_inferior_registers): Likewise.
7600 2014-11-28 Yao Qi <yao@codesourcery.com>
7602 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7603 * config.in, configure: Re-generate.
7604 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7607 2014-11-21 Yao Qi <yao@codesourcery.com>
7609 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7610 (AC_CHECK_HEADERS): Remove malloc.h.
7611 * configure: Re-generated.
7612 * config.in: Re-generated.
7613 * server.h: Don't include alloca.h and malloc.h.
7614 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7615 Don't include malloc.h.
7617 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7619 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7620 corresponding ERRNO check in same block.
7622 2014-11-12 Pedro Alves <palves@redhat.com>
7624 * server.c (cont_thread): Update comment.
7625 (start_inferior, attach_inferior): No longer clear cont_thread.
7626 (handle_v_cont): No longer set cont_thread.
7627 (captured_main): Clear cont_thread each time a GDB connects.
7629 2014-11-12 Pedro Alves <palves@redhat.com>
7631 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7632 thread, and don't resume all threads if the Hc thread has exited.
7634 2014-11-12 Pedro Alves <palves@redhat.com>
7636 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7637 the process group instead of to a specific LWP.
7639 2014-10-15 Pedro Alves <palves@redhat.com>
7642 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7644 (arm_set_thread_context): Delete.
7645 (the_low_target): Adjust.
7646 * win32-i386-low.c (debug_registers_changed)
7647 (debug_registers_used): Delete.
7648 (update_debug_registers_callback): New function.
7649 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7650 needing to update their debug registers.
7651 (win32_get_current_dr): New function.
7652 (x86_dr_low_get_addr, x86_dr_low_get_control)
7653 (x86_dr_low_get_status): Fetch the debug register from the thread
7655 (i386_initial_stuff): Adjust.
7656 (i386_get_thread_context): Remove current_event parameter. Don't
7657 clear debug_registers_changed nor copy DR values to
7659 (i386_set_thread_context): Delete.
7660 (i386_prepare_to_resume): New function.
7661 (i386_thread_added): Mark the thread as needing to update irs
7663 (the_low_target): Remove i386_set_thread_context and install
7664 i386_prepare_to_resume.
7665 * win32-low.c (win32_get_thread_context): Adjust.
7666 (win32_set_thread_context): Use SetThreadContext
7668 (win32_prepare_to_resume): New function.
7669 (win32_require_context): New function, factored out from ...
7670 (thread_rec): ... this.
7671 (continue_one_thread): Call win32_prepare_to_resume on each thread
7672 we're about to continue.
7673 (win32_resume): Call win32_prepare_to_resume on the event thread.
7674 * win32-low.h (struct win32_thread_info)
7675 <debug_registers_changed>: New field.
7676 (struct win32_target_ops): Change prototype of set_thread_context,
7677 delete set_thread_context and add prepare_to_resume.
7678 (win32_require_context): New declaration.
7680 2014-10-08 Gary Benson <gbenson@redhat.com>
7682 * server.h: Do not include common-exceptions.h.
7684 2014-10-08 Gary Benson <gbenson@redhat.com>
7686 * server.h: Do not include cleanups.h.
7688 2014-09-30 James Hogan <james.hogan@imgtec.com>
7690 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7693 2014-09-23 Yao Qi <yao@codesourcery.com>
7695 * linux-low.c (lp_status_maybe_breakpoint): New function.
7696 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7697 (count_events_callback): Likewise.
7698 (select_event_lwp_callback): Likewise.
7699 (cancel_breakpoints_callback): Likewise.
7701 2014-09-19 Don Breazeal <donb@codesourcery.com>
7703 * linux-low.c (handle_extended_wait): Call
7704 linux_ptrace_get_extended_event.
7705 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7706 linux_is_extended_waitstatus.
7708 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7710 * Makefile.in (CPPFLAGS): Define.
7711 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7712 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7714 2014-09-16 Gary Benson <gbenson@redhat.com>
7716 * inferiors.h (current_inferior): Renamed as...
7717 (current_thread): New variable. All uses updated.
7718 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7719 (maybe_move_out_of_jump_pad): Likewise.
7720 (cancel_breakpoint): Likewise.
7721 (linux_low_filter_event): Likewise.
7722 (wait_for_sigstop): Likewise.
7723 (linux_resume_one_lwp): Likewise.
7724 (need_step_over_p): Likewise.
7725 (start_step_over): Likewise.
7726 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7727 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7728 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7729 and save_inferior as saved_thread.
7730 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7732 (regcache_invalidate_thread): Likewise.
7733 * remote-utils.c (prepare_resume_reply): Likewise.
7734 * thread-db.c (thread_db_get_tls_address): Likewise.
7735 (disable_thread_event_reporting): Likewise.
7736 (remove_thread_event_breakpoints): Likewise.
7737 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7739 * target.h (set_desired_inferior): Renamed as...
7740 (set_desired_thread): New declaration. All uses updated.
7741 * server.c (myresume): Updated comment to reference thread instead
7743 (handle_serial_event): Likewise.
7744 (handle_target_event): Likewise.
7746 2014-09-12 Tom Tromey <tromey@redhat.com>
7747 Gary Benson <gbenson@redhat.com>
7749 * regcache.h: Include common-regcache.h.
7750 (regcache_read_pc): Don't declare.
7751 * regcache.c (get_thread_regcache_for_ptid): New function.
7753 2014-09-11 Tom Tromey <tromey@redhat.com>
7754 Gary Benson <gbenson@redhat.com>
7756 * symbol.c: New file.
7757 * Makefile.in (SFILES): Add symbol.c.
7758 (OBS): Add symbol.o.
7760 2014-09-11 Gary Benson <gbenson@redhat.com>
7762 * target.c (target_stop_ptid, target_continue_ptid): New
7765 2014-09-11 Tom Tromey <tromey@redhat.com>
7766 Gary Benson <gbenson@redhat.com>
7768 * target.h: Include target/target.h.
7769 * target.c (target_read_memory, target_read_uint32)
7770 (target_write_memory): New functions.
7772 2014-09-11 Gary Benson <gbenson@redhat.com>
7774 * server.h (debug_hw_points): Don't declare.
7775 * server.c (debug_hw_points): Don't define. Replace all uses
7776 with show_debug_regs.
7777 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7778 all uses with show_debug_regs.
7780 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7782 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7783 endianness into account.
7784 (ppc_supply_ptrace_register): Likewise.
7786 2014-09-03 James Hogan <james.hogan@imgtec.com>
7788 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7789 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7791 2014-09-03 Gary Benson <gbenson@redhat.com>
7793 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7794 ALL_DEBUG_ADDRESS_REGISTERS.
7796 2014-09-02 Gary Benson <gbenson@redhat.com>
7798 * i386-low.h: Renamed as...
7799 * x86-low.h: New file. All type, function and variable name
7800 prefixes changed from "i386_" to "x86_". All references updated.
7801 * i386-low.c: Renamed as...
7802 * x86-low.c: New file. All type, function and variable name
7803 prefixes changed from "i386_" to "x86_". All references updated.
7805 2014-09-02 Gary Benson <gbenson@redhat.com>
7807 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7808 (x86_linux_new_thread): Likewise.
7810 2014-08-29 Gary Benson <gbenson@redhat.com>
7812 * server.h (setjmp.h): Do not include.
7813 (toplevel): Do not declare.
7814 (common-exceptions.h): Include.
7815 (cleanups.h): Likewise.
7816 * server.c (toplevel): Do not define.
7817 (exit_code): New static global.
7818 (detach_or_kill_for_exit_cleanup): New function.
7819 (main): New function. Original main renamed to...
7820 (captured_main): New function.
7821 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7823 2014-08-29 Gary Benson <gbenson@redhat.com>
7825 * Makefile.in (SFILES): Add common/common-exceptions.c.
7826 (OBS): Add common-exceptions.o.
7827 (common-exceptions.o): New rule.
7828 * utils.c (prepare_to_throw_exception): New function.
7830 2014-08-29 Gary Benson <gbenson@redhat.com>
7832 * config.in: Regenerate.
7833 * configure: Likewise.
7835 2014-08-29 Gary Benson <gbenson@redhat.com>
7837 * Makefile.in (SFILES): Add common/cleanups.c.
7839 (cleanups.o): New rule.
7841 2014-08-29 Gary Benson <gbenson@redhat.com>
7843 * utils.c (internal_vwarning): New function.
7845 2014-08-28 Gary Benson <gbenson@redhat.com>
7847 * utils.h (fatal): Remove declaration.
7848 * utils.c (fatal): Remove function.
7850 2014-08-28 Gary Benson <gbenson@redhat.com>
7852 * tracepoint.c (gdb_agent_init): Replace fatal with
7854 (initialize_tracepoint): Likewise.
7856 2014-08-28 Gary Benson <gbenson@redhat.com>
7858 * remote-utils.c (remote_prepare): Replace fatal with error.
7860 2014-08-28 Gary Benson <gbenson@redhat.com>
7862 * linux-low.c (linux_async): Replace fatal with warning.
7864 (linux_start_non_stop): Return -1 if linux_async failed.
7866 2014-08-28 Gary Benson <gbenson@redhat.com>
7868 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7870 (i386_dr_low_get_addr): Remove vague comment.
7871 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7874 2014-08-28 Gary Benson <gbenson@redhat.com>
7876 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7877 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7879 (linux_resume_one_lwp): Likewise.
7880 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7882 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7883 with internal_error.
7884 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7885 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7886 (find_register_by_name): Replace fatal with internal_error.
7887 (find_regno): Likewise.
7888 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7889 * thread-db.c (thread_db_create_event): Likewise.
7890 (thread_db_load_search): Likewise.
7891 (try_thread_db_load_1): Likewise.
7892 * tracepoint.c (get_jump_space_head): Replace fatal with
7894 (claim_trampoline_space): Likewise.
7895 (have_fast_tracepoint_trampoline_buffer): Likewise.
7896 (cmd_qtstart): Likewise.
7897 (stop_tracing): Likewise.
7898 (fast_tracepoint_collecting): Likewise.
7899 (target_malloc): Likewise.
7900 (download_tracepoint): Likewise.
7901 (download_trace_state_variables): Replace check with gdb_assert.
7902 (upload_fast_traceframes): Replace fatal with internal_error.
7904 2014-08-19 Tom Tromey <tromey@redhat.com>
7905 Gary Benson <gbenson@redhat.com>
7907 * Makefile.in (SFILES): Add common/common-debug.c.
7908 (OBS): Add common-debug.o.
7909 (common-debug.o): New rule.
7910 * debug.h (debug_printf): Don't declare.
7911 * debug.c (debug_printf): Renamed and rewritten as...
7912 (debug_vprintf): New function.
7914 2014-08-19 Gary Benson <gbenson@redhat.com>
7916 * utils.h: Do not include print-utils.h.
7918 2014-08-19 Tom Tromey <tromey@redhat.com>
7919 Gary Benson <gbenson@redhat.com>
7921 * server.h: Add static assertion.
7922 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7924 2014-08-19 Tom Tromey <tromey@redhat.com>
7925 Gary Benson <gbenson@redhat.com>
7927 * Makefile.in (SFILES): Add common/errors.c.
7928 (OBS): Add errors.o.
7929 (IPA_OBS): Add errors-ipa.o.
7930 (errors.o): New rule.
7931 (errors-ipa.o): Likewise.
7932 * utils.h (perror_with_name, error, warning): Don't declare.
7933 * utils.c (warning): Renamed and rewritten as...
7934 (vwarning): New function.
7935 (error): Renamed and rewritten as...
7936 (verror): New function.
7937 (internal_error): Renamed and rewritten as...
7938 (internal_verror): New function.
7940 2014-08-07 Gary Benson <gbenson@redhat.com>
7942 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7943 * configure: Regenerate.
7944 * config.in: Likewise.
7945 * server.h: Do not include errno.h.
7946 * event-loop.c: Likewise.
7947 * hostio-errno.c: Likewise.
7948 * linux-low.c: Likewise.
7949 * remote-utils.c: Likewise.
7950 * spu-low.c: Likewise.
7951 * utils.c: Likewise.
7952 * gdbreplay.c: Unconditionally include errno.h.
7954 2014-08-07 Gary Benson <gbenson@redhat.com>
7956 * server.h: Do not include string.h.
7957 * event-loop.c: Likewise.
7958 * linux-low.c: Likewise.
7959 * regcache.c: Likewise.
7960 * remote-utils.c: Likewise.
7961 * spu-low.c: Likewise.
7962 * utils.c: Likewise.
7964 2014-08-07 Gary Benson <gbenson@redhat.com>
7966 * server.h: Do not include gdb_assert.h.
7968 2014-08-07 Gary Benson <gbenson@redhat.com>
7970 * server.h: Do not include common-utils.h.
7972 2014-08-07 Gary Benson <gbenson@redhat.com>
7974 * server.h: Do not include ptid.h.
7975 * notif.h: Likewise.
7977 2014-08-07 Gary Benson <gbenson@redhat.com>
7979 * server.h: Do not include gdb_locale.h.
7981 2014-08-07 Gary Benson <gbenson@redhat.com>
7983 * server.h: Do not include gdb/signals.h.
7984 * win32-low.c: Likewise.
7986 2014-08-07 Gary Benson <gbenson@redhat.com>
7988 * server.h: Do not include pathmax.h.
7990 2014-08-07 Gary Benson <gbenson@redhat.com>
7992 * server.h: Do not include libiberty.h.
7993 * linux-bfin-low.c: Likewise.
7995 2014-08-07 Gary Benson <gbenson@redhat.com>
7997 * server.h: Do not include ansidecl.h.
7999 2014-08-07 Gary Benson <gbenson@redhat.com>
8001 * linux-x86-low.c: Do not include stddef.h.
8002 * lynx-ppc-low.c: Likewise.
8003 * tracepoint.c: Likewise.
8005 2014-08-07 Gary Benson <gbenson@redhat.com>
8007 * server.h: Do not include stdarg.h.
8008 * nto-low.c: Likewise.
8010 2014-08-07 Gary Benson <gbenson@redhat.com>
8012 * server.h: Do not include stdlib.h.
8013 * inferiors.c: Likewise.
8014 * linux-low.c: Likewise.
8015 * regcache.c: Likewise.
8016 * spu-low.c: Likewise.
8017 * tracepoint.c: Likewise.
8018 * utils.c: Likewise.
8020 2014-08-07 Gary Benson <gbenson@redhat.com>
8022 * server.h: Do not include stdio.h.
8023 * linux-low.c: Likewise.
8024 * remote-utils.c: Likewise.
8025 * spu-low.c: Likewise.
8026 * utils.c: Likewise.
8027 * wincecompat.c: Likewise.
8029 2014-08-06 Gary Benson <gbenson@redhat.com>
8031 * regcache.c (init_register_cache): Move conditionals inside if.
8033 2014-08-06 Gary Benson <gbenson@redhat.com>
8035 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8037 2014-07-31 Gary Benson <gbenson@redhat.com>
8039 * ax.h: Do not include server.h.
8040 * gdbthread.h: Likewise.
8041 * lynx-low.h: Likewise.
8042 * notif.h: Likewise.
8044 2014-07-30 Gary Benson <gbenson@redhat.com>
8046 * server.h: Include common-defs.h.
8047 Do not include config.h or build-gnulib-gdbserver/config.h.
8049 2014-07-30 Gary Benson <gbenson@redhat.com>
8051 * hostio-errno.c: Move server.h to top of includes list.
8052 * inferiors.c: Likewise.
8053 * linux-x86-low.c: Likewise.
8054 * notif.c: Include server.h.
8056 2014-07-24 Tom Tromey <tromey@redhat.com>
8057 Gary Benson <gbenson@redhat.com>
8059 * server.h (CORE_ADDR): Now unsigned.
8061 2014-07-16 Pedro Alves <palves@redhat.com>
8063 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8065 2014-07-15 Pedro Alves <palves@redhat.com>
8067 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8070 2014-07-11 Pedro Alves <palves@redhat.com>
8072 * linux-low.c (kill_wait_lwp): New function, based on
8073 kill_one_lwp_callback, but use my_waitpid directly.
8074 (kill_one_lwp_callback, linux_kill): Use it.
8076 2014-06-23 Pedro Alves <palves@redhat.com>
8078 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8079 before setting DR0..DR3.
8081 2014-06-20 Gary Benson <gbenson@redhat.com>
8083 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8084 * configure: Regenerated.
8085 * config.in: Likewise.
8087 2014-06-20 Gary Benson <gbenson@redhat.com>
8089 * Makefile.in (SFILES): Update locations for files moved
8091 (object file files): Reordered.
8093 2014-06-20 Gary Benson <gbenson@redhat.com>
8095 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8096 (i386_dr_low_set_addr): Likewise.
8097 (i386_dr_low_get_addr): Likewise.
8098 (i386_dr_low_can_set_control): Likewise.
8099 (i386_dr_low_set_control): Likewise.
8100 (i386_dr_low_get_control): Likewise.
8101 (i386_dr_low_get_status): Likewise.
8102 (i386_get_debug_register_length): Likewise.
8103 * linux-x86-low.c (i386_dr_low_set_addr):
8104 Changed signature. Made static.
8105 (i386_dr_low_get_addr): Likewise.
8106 (i386_dr_low_set_control): Likewise.
8107 (i386_dr_low_get_control): Likewise.
8108 (i386_dr_low_get_status): Likewise.
8109 (i386_dr_low): New global variable.
8110 * win32-i386-low.c (i386_dr_low_set_addr):
8111 Changed signature. Made static.
8112 (i386_dr_low_get_addr): Likewise.
8113 (i386_dr_low_set_control): Likewise.
8114 (i386_dr_low_get_control): Likewise.
8115 (i386_dr_low_get_status): Likewise.
8116 (i386_dr_low): New global variable.
8118 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8120 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8121 * Makefile.in (AR, AR_FLAGS): Define.
8122 * configure: Regenerate.
8124 2014-06-19 Gary Benson <gbenson@redhat.com>
8126 * Makefile.in (i386-dregs.o): New rule.
8127 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8128 * i386-low.c (target.h): Remove include.
8129 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8130 (DR_CONTROL_SHIFT): Likewise.
8131 (DR_CONTROL_SIZE): Likewise.
8132 (DR_RW_EXECUTE): Likewise.
8133 (DR_RW_WRITE): Likewise.
8134 (DR_RW_READ): Likewise.
8135 (DR_RW_IORW): Likewise.
8136 (DR_LEN_1): Likewise.
8137 (DR_LEN_2): Likewise.
8138 (DR_LEN_4): Likewise.
8139 (DR_LEN_8): Likewise.
8140 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8141 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8142 (DR_ENABLE_SIZE): Likewise.
8143 (DR_LOCAL_SLOWDOWN): Likewise.
8144 (DR_GLOBAL_SLOWDOWN): Likewise.
8145 (DR_CONTROL_RESERVED): Likewise.
8146 (I386_DR_CONTROL_MASK): Likewise.
8147 (I386_DR_VACANT): Likewise.
8148 (I386_DR_LOCAL_ENABLE): Likewise.
8149 (I386_DR_GLOBAL_ENABLE): Likewise.
8150 (I386_DR_DISABLE): Likewise.
8151 (I386_DR_SET_RW_LEN): Likewise.
8152 (I386_DR_GET_RW_LEN): Likewise.
8153 (I386_DR_WATCH_HIT): Likewise.
8154 (i386_wp_op_t): Likewise.
8155 (i386_show_dr): Likewise.
8156 (i386_length_and_rw_bits): Likewise.
8157 (i386_insert_aligned_watchpoint): Likewise.
8158 (i386_remove_aligned_watchpoint): Likewise.
8159 (i386_handle_nonaligned_watchpoint): Likewise.
8160 i386_update_inferior_debug_regs(): Likewise.
8161 (i386_dr_insert_watchpoint): Likewise.
8162 (i386_dr_remove_watchpoint): Likewise.
8163 (i386_dr_region_ok_for_watchpoint): Likewise.
8164 (i386_dr_stopped_data_address): Likewise.
8165 (i386_dr_stopped_by_watchpoint): Likewise.
8167 2014-06-19 Gary Benson <gbenson@redhat.com>
8169 * i386-low.c (i386_dr_show): Renamed to
8170 i386_show_dr and made static. All uses updated.
8171 (i386_dr_length_and_rw_bits): Renamed to
8172 i386_length_and_rw_bits and made static.
8174 (i386_dr_insert_aligned_watchpoint): Renamed to
8175 i386_insert_aligned_watchpoint and made static.
8177 (i386_dr_remove_aligned_watchpoint): Renamed to
8178 i386_remove_aligned_watchpoint and made static.
8180 (i386_dr_update_inferior_debug_regs): Renamed to
8181 i386_update_inferior_debug_regs and made static.
8184 2014-06-18 Gary Benson <gbenson@redhat.com>
8186 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8187 (i386_dr_low_can_set_control): Likewise.
8188 (i386_get_debug_register_length): Likewise.
8189 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8190 (i386_dr_low_can_set_control): Likewise.
8191 (i386_get_debug_register_length): Likewise.
8193 2014-06-17 Gary Benson <gbenson@redhat.com>
8195 * i386-low.h (i386-dregs.h): New include.
8196 (DR_FIRSTADDR): Now in i386-dregs.h.
8197 (DR_LASTADDR): Likewise.
8198 (DR_NADDR): Likewise.
8199 (DR_STATUS): Likewise.
8200 (DR_CONTROL): Likewise.
8201 (i386_debug_reg_state): Likewise.
8202 (i386_dr_insert_watchpoint): Likewise.
8203 (i386_dr_remove_watchpoint): Likewise.
8204 (i386_dr_region_ok_for_watchpoint): Likewise.
8205 (i386_dr_stopped_data_address): Likewise.
8206 (i386_dr_stopped_by_watchpoint): Likewise.
8207 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8209 2014-06-18 Gary Benson <gbenson@redhat.com>
8211 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8212 i386_dr_insert_watchpoint.
8213 (i386_low_remove_watchpoint): Renamed to
8214 i386_dr_remove_watchpoint.
8215 (i386_low_region_ok_for_watchpoint): Renamed to
8216 i386_dr_region_ok_for_watchpoint.
8217 (i386_low_stopped_data_address): Renamed to
8218 i386_dr_stopped_data_address.
8219 (i386_low_stopped_by_watchpoint): Renamed to
8220 i386_dr_stopped_by_watchpoint.
8221 * i386-low.c (i386_show_dr): Renamed to
8222 i386_dr_show and made nonstatic. All uses updated.
8223 (i386_length_and_rw_bits): Renamed to
8224 i386_dr_length_and_rw_bits and made nonstatic.
8226 (i386_insert_aligned_watchpoint): Renamed to
8227 i386_dr_insert_aligned_watchpoint and made nonstatic.
8229 (i386_remove_aligned_watchpoint): Renamed to
8230 i386_dr_remove_aligned_watchpoint and made nonstatic.
8232 (i386_update_inferior_debug_regs): Renamed to
8233 i386_dr_update_inferior_debug_regs and made nonstatic.
8235 (i386_low_insert_watchpoint): Renamed to
8236 i386_dr_insert_watchpoint. All uses updated.
8237 (i386_low_remove_watchpoint): Renamed to
8238 i386_dr_remove_watchpoint. All uses updated.
8239 (i386_low_region_ok_for_watchpoint): Renamed to
8240 i386_dr_region_ok_for_watchpoint. All uses updated.
8241 (i386_low_stopped_data_address): Renamed to
8242 i386_dr_stopped_data_address. All uses updated.
8243 (i386_low_stopped_by_watchpoint): Renamed to
8244 i386_dr_stopped_by_watchpoint. All uses updated.
8246 2014-06-18 Gary Benson <gbenson@redhat.com>
8248 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8249 (i386_dr_low_can_set_control): Likewise.
8250 (i386_insert_aligned_watchpoint): New check.
8252 2014-06-18 Gary Benson <gbenson@redhat.com>
8254 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8257 2014-06-18 Gary Benson <gbenson@redhat.com>
8259 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8260 instead of fatal and error.
8261 (i386_handle_nonaligned_watchpoint): Likewise.
8263 2014-06-18 Gary Benson <gbenson@redhat.com>
8265 * i386-low.c (i386_get_debug_register_length): New macro.
8266 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8267 (i386_show_dr): Use debug_printf instead of fprintf. Use
8268 phex to format values.
8270 2014-06-18 Gary Benson <gbenson@redhat.com>
8272 * i386-low.h: Comment changes.
8273 * i386-low.c: Likewise.
8275 2014-06-18 Gary Benson <gbenson@redhat.com>
8277 * i386-low.c: Whitespace changes.
8279 2014-06-12 Tom Tromey <tromey@redhat.com>
8281 * utils.c (freeargv): Remove.
8283 2014-06-12 Tom Tromey <tromey@redhat.com>
8285 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8286 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8287 (parse_debug_format_options): Likewise.
8288 (gdbserver_usage): Likewise.
8289 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8290 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8291 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8293 ($(LIBGNU)): Depend on libiberty.
8294 (all-lib): Recurse into all subdirs.
8295 (install-only): Invoke "install" target in subdirs.
8296 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8298 * configure: Rebuild.
8299 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8300 for vasprintf, vsnprintf, or gettimeofday.
8301 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8304 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8306 * development.sh: Delete.
8307 * Makefile.in (config.status): Adjust dependency on development.sh.
8308 * configure.ac: Adjust development.sh source call.
8309 * configure: Regenerate.
8311 2014-06-02 Pedro Alves <palves@redhat.com>
8313 * ax.c (gdb_free_agent_expr): New function.
8314 * ax.h (gdb_free_agent_expr): New declaration.
8315 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8317 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8319 (clear_breakpoint_conditions_and_commands): New function.
8320 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8321 (clear_breakpoint_conditions_and_commands): New declaration.
8323 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8325 * linux-aarch64-low.c (asm/ptrace.h): Include.
8327 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8329 Fix TLS access for -static -pthread.
8330 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8331 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8332 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8334 2014-05-20 Pedro Alves <palves@redhat.com>
8336 * linux-aarch64-low.c (aarch64_insert_point)
8337 (aarch64_remove_point): No longer check whether the type is
8338 supported here. Adjust to new interface.
8339 (the_low_target): Install aarch64_supports_z_point_type as
8340 supports_z_point_type method.
8341 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8342 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8343 instead of a Z packet char. Adjust.
8344 (arm_supports_z_point_type): New function.
8345 (arm_insert_point, arm_remove_point): Adjust to new interface.
8346 (the_low_target): Install arm_supports_z_point_type.
8347 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8348 (cris_insert_point, cris_remove_point): Adjust to new interface.
8349 Don't check whether the type is supported here.
8350 (the_low_target): Install cris_supports_z_point_type.
8351 * linux-low.c (linux_supports_z_point_type): New function.
8352 (linux_insert_point, linux_remove_point): Adjust to new interface.
8353 * linux-low.h (struct linux_target_ops) <insert_point,
8354 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8355 raw_breakpoint pointer parameter.
8356 <supports_z_point_type>: New method.
8357 * linux-mips-low.c (mips_supports_z_point_type): New function.
8358 (mips_insert_point, mips_remove_point): Adjust to new interface.
8359 Use mips_supports_z_point_type.
8360 (the_low_target): Install mips_supports_z_point_type.
8361 * linux-ppc-low.c (the_low_target): Install NULL as
8362 supports_z_point_type method.
8363 * linux-s390-low.c (the_low_target): Install NULL as
8364 supports_z_point_type method.
8365 * linux-sparc-low.c (the_low_target): Install NULL as
8366 supports_z_point_type method.
8367 * linux-x86-low.c (x86_supports_z_point_type): New function.
8368 (x86_insert_point): Adjust to new insert_point interface. Use
8369 insert_memory_breakpoint. Adjust to new
8370 i386_low_insert_watchpoint interface.
8371 (x86_remove_point): Adjust to remove_point interface. Use
8372 remove_memory_breakpoint. Adjust to new
8373 i386_low_remove_watchpoint interface.
8374 (the_low_target): Install x86_supports_z_point_type.
8375 * lynx-low.c (lynx_target_ops): Install NULL as
8376 supports_z_point_type callback.
8377 * nto-low.c (nto_supports_z_point_type): New.
8378 (nto_insert_point, nto_remove_point): Adjust to new interface.
8379 (nto_target_ops): Install nto_supports_z_point_type.
8380 * mem-break.c: Adjust intro comment.
8381 (struct raw_breakpoint) <raw_type, size>: New fields.
8382 <inserted>: Update comment.
8383 <shlib_disabled>: Delete field.
8384 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8385 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8386 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8387 (raw_bkpt_type_to_target_hw_bp_type): New function.
8388 (find_enabled_raw_code_breakpoint_at): New function.
8389 (find_raw_breakpoint_at): New type and size parameters. Use them.
8390 (insert_memory_breakpoint): New function, based off
8391 set_raw_breakpoint_at.
8392 (remove_memory_breakpoint): New function.
8393 (set_raw_breakpoint_at): Reimplement.
8394 (set_breakpoint): New, based on set_breakpoint_at.
8395 (set_breakpoint_at): Reimplement.
8396 (delete_raw_breakpoint): Go through the_target->remove_point
8397 instead of assuming memory breakpoints.
8398 (find_gdb_breakpoint_at): Delete.
8399 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8400 (find_gdb_breakpoint): New function.
8401 (set_gdb_breakpoint_at): Delete.
8402 (z_type_supported): New function.
8403 (set_gdb_breakpoint_1): New function, loosely based off
8404 set_gdb_breakpoint_at.
8405 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8406 (delete_gdb_breakpoint_at): Delete.
8407 (delete_gdb_breakpoint_1): New function, loosely based off
8408 delete_gdb_breakpoint_at.
8409 (delete_gdb_breakpoint): New function.
8410 (clear_gdb_breakpoint_conditions): Rename to ...
8411 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8413 (add_condition_to_breakpoint): Make static.
8414 (add_breakpoint_condition): Take a struct breakpoint pointer
8415 instead of an address. Adjust.
8416 (gdb_condition_true_at_breakpoint): Rename to ...
8417 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8419 (gdb_condition_true_at_breakpoint): Reimplement.
8420 (add_breakpoint_commands): Take a struct breakpoint pointer
8421 instead of an address. Adjust.
8422 (gdb_no_commands_at_breakpoint): Rename to ...
8423 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8424 parameter. Return true if no breakpoint was found. Change debug
8426 (gdb_no_commands_at_breakpoint): Reimplement.
8427 (run_breakpoint_commands): Rename to ...
8428 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8429 and change return type to boolean.
8430 (run_breakpoint_commands): New function.
8431 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8432 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8433 breakpoint. Go through the_target->remove_point instead of
8434 assuming memory breakpoint.
8435 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8436 software and hardware breakpoints.
8437 (reinsert_raw_breakpoint): Go through the_target->insert_point
8438 instead of assuming memory breakpoint.
8439 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8440 software and hardware breakpoints.
8441 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8442 Check both software and hardware breakpoints.
8443 (validate_inserted_breakpoint): Assert the breakpoint is a
8444 software breakpoint. Set the inserted flag to -1 instead of
8445 setting shlib_disabled.
8446 (delete_disabled_breakpoints): Adjust.
8447 (validate_breakpoints): Only validate software breakpoints.
8448 Adjust to inserted flag change.
8449 (check_mem_read, check_mem_write): Skip breakpoint types other
8450 than software breakpoints. Adjust to inserted flag change.
8451 * mem-break.h (enum raw_bkpt_type): New enum.
8452 (raw_breakpoint, struct process_info): Forward declare.
8453 (Z_packet_to_target_hw_bp_type): Delete declaration.
8454 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8455 (set_gdb_breakpoint, delete_gdb_breakpoint)
8456 (clear_breakpoint_conditions): New declarations.
8457 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8458 (breakpoint_inserted_here): Update comment.
8459 (add_breakpoint_condition, add_breakpoint_commands): Replace
8460 address parameter with a breakpoint pointer parameter.
8461 (gdb_breakpoint_here): Update comment.
8462 (delete_gdb_breakpoint_at): Delete.
8463 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8464 * server.c (process_point_options): Take a struct breakpoint
8465 pointer instead of an address. Adjust.
8466 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8467 delete_gdb_breakpoint.
8468 * spu-low.c (spu_target_ops): Install NULL as
8469 supports_z_point_type method.
8470 * target.h: Include mem-break.h.
8471 (struct target_ops) <prepare_to_access_memory>: Update comment.
8472 <supports_z_point_type>: New field.
8473 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8474 instead of a char. Also take a raw breakpoint pointer.
8475 * win32-arm-low.c (the_low_target): Install NULL as
8476 supports_z_point_type.
8477 * win32-i386-low.c (i386_supports_z_point_type): New function.
8478 (i386_insert_point, i386_remove_point): Adjust to new interface.
8479 (the_low_target): Install i386_supports_z_point_type.
8480 * win32-low.c (win32_supports_z_point_type): New function.
8481 (win32_insert_point, win32_remove_point): Adjust to new interface.
8482 (win32_target_ops): Install win32_supports_z_point_type.
8483 * win32-low.h (struct win32_target_ops):
8484 <supports_z_point_type>: New method.
8485 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8486 instead of a char. Also take a raw breakpoint pointer.
8488 2014-05-20 Pedro Alves <palves@redhat.com>
8490 * mem-break.h: Include break-common.h.
8491 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8492 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8493 (Z_packet_to_target_hw_bp_type): New declaration.
8494 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8495 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8496 (Z_PACKET_ACCESS_WP): Delete macros.
8497 (Z_packet_to_hw_type): Delete function.
8498 * i386-low.h: Don't include break-common.h here.
8499 (Z_packet_to_hw_type): Delete declaration.
8500 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8501 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8502 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8503 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8504 * linux-aarch64-low.c: Don't include break-common.h here.
8505 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8506 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8507 (Z_packet_to_target_hw_bp_type): Delete function.
8508 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8510 (mips_insert_point, mips_remove_point): Use
8511 Z_packet_to_target_hw_bp_type.
8513 2014-05-20 Pedro Alves <palves@redhat.com>
8515 * linux-aarch64-low.c: Include break-common.h.
8516 (enum target_point_type): Delete.
8517 (Z_packet_to_point_type): Rename to ...
8518 (Z_packet_to_target_hw_bp_type): ... this, and return a
8519 target_hw_bp_type instead.
8520 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8521 instead of an enum target_point_type.
8522 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8524 (aarch64_dr_state_insert_one_point)
8525 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8526 (aarch64_handle_aligned_watchpoint)
8527 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8528 Take an enum target_hw_bp_type instead of an enum
8530 (aarch64_supports_z_point_type): New function.
8531 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8532 use Z_packet_to_target_hw_bp_type.
8534 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8536 * configure.ac: Only use -Werror by default when DEVELOPMENT
8538 * configure: Regenerate.
8540 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8542 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8543 * linux-x86-low.c (X86_64_USER_REGS): New.
8544 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8546 2014-04-28 Yao Qi <yao@codesourcery.com>
8548 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8551 2014-04-25 Pedro Alves <palves@redhat.com>
8554 * linux-low.c (linux_attach_fail_reason_string): New function.
8555 (linux_attach_lwp): Delete.
8556 (linux_attach_lwp_1): Rename to ...
8557 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8558 argument. Remove "initial" parameter. Return int instead of
8559 void. Don't error or warn here.
8560 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8561 failure to attach to the tgid. Call warning when failing to
8563 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8564 argument. Remove "initial" parameter. Return int instead of
8565 void. Don't error or warn here.
8566 (linux_attach_fail_reason_string): New declaration.
8567 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8568 interface change. Use linux_attach_fail_reason_string.
8570 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8571 Walfred Tedeschi <walfred.tedeschi@intel.com>
8573 * Makefile.in: Added rules to handle new files
8574 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8575 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8576 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8577 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8578 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8579 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8581 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8582 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8583 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8584 i386/x32-avx512.xml.
8585 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8586 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8587 i386/x32-avx512-linux.xml.
8588 * i387-fp.c (num_avx512_k_registers): New constant for number
8590 (num_avx512_zmmh_low_registers): New constant for number of
8591 lower ZMM registers (0-15).
8592 (num_avx512_zmmh_high_registers): New constant for number of
8593 higher ZMM registers (16-31).
8594 (num_avx512_ymmh_registers): New contant for number of higher
8595 YMM registers (ymm16-31 added by avx521 on x86_64).
8596 (num_avx512_xmm_registers): New constant for number of higher
8597 XMM registers (xmm16-31 added by AVX512 on x86_64).
8598 (struct i387_xsave): Add space for AVX512 registers.
8599 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8600 Add code to handle AVX512 registers.
8601 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8602 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8603 prototypei from generated file.
8604 (tdesc_amd64_avx512_linux): Likewise.
8605 (init_registers_x32_avx512_linux): Likewise.
8606 (tdesc_x32_avx512_linux): Likewise.
8607 (init_registers_i386_avx512_linux): Likewise.
8608 (tdesc_i386_avx512_linux): Likewise.
8609 (x86_64_regmap): Add AVX512 registers.
8610 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8612 (initialize_low_arch): Add code to initialize AVX512 registers.
8614 2014-04-23 Pedro Alves <palves@redhat.com>
8616 * mem-break.c (find_gdb_breakpoint_at): Make static.
8617 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8619 2014-04-23 Pedro Alves <palves@redhat.com>
8621 * i386-low.c: Don't include break-common.h here.
8622 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8623 prototype to take target_hw_bp_type as argument instead of a Z
8625 * i386-low.h: Include break-common.h here.
8626 (Z_packet_to_hw_type): Declare.
8627 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8629 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8630 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8631 (x86_remove_point): Convert the packet number to a
8632 target_hw_bp_type before calling i386_low_remove_watchpoint.
8633 * win32-i386-low.c (i386_insert_point): Convert the packet number
8634 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8635 (i386_remove_point): Convert the packet number to a
8636 target_hw_bp_type before calling i386_low_remove_watchpoint.
8638 2014-04-23 Pedro Alves <palves@redhat.com>
8640 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8642 2014-04-10 Pedro Alves <palves@redhat.com>
8644 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8645 Check if the condition or command is NULL before checking if the
8646 breakpoint is known. On success, return true.
8647 * mem-break.h (add_breakpoint_condition): Document return.
8648 (add_breakpoint_commands): Add describing comment.
8649 * server.c (skip_to_semicolon): New function.
8650 (process_point_options): Use it.
8652 2014-04-09 Pedro Alves <palves@redhat.com>
8654 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8657 2014-02-27 Pedro Alves <palves@redhat.com>
8660 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8662 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8664 (last_thread_of_process_p): Take a PID argument instead of a
8666 (linux_wait_for_lwp): Delete.
8667 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8669 (linux_low_filter_event): New function, party factored out from
8670 linux_wait_for_event.
8671 (linux_wait_for_event): Rename to ...
8672 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8673 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8674 sigsuspend. Check for zombie leaders.
8675 (linux_wait_for_event): Reimplement as wrapper around
8676 linux_wait_for_event_filtered.
8677 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8678 a normal or signal exit is seen, it's the whole process exiting.
8679 (wait_for_sigstop): No longer a for_each_inferior callback.
8680 Rewrite on top of linux_wait_for_event_filtered.
8681 (stop_all_lwps): Call wait_for_sigstop directly.
8682 * server.c (resume, handle_target_event): Handle
8683 TARGET_WAITKIND_NO_RESUMED.
8685 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8687 * win32-low.c (psapi_get_dll_name,
8688 * win32_CreateToolhelp32Snapshot): Delete.
8689 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8690 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8692 (handle_load_dll): Add function description.
8693 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8695 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8697 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8699 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8700 base address when calling win32_add_one_solib.
8701 (handle_load_dll): Delete local variable load_addr.
8702 Remove 0x1000 offset applied to DLL base address when calling
8703 win32_add_one_solib.
8704 (handle_unload_dll): Add comment.
8706 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8708 * win32-low.c (win32_add_all_dlls): Renames
8709 win32_ensure_ntdll_loaded. Rewrite function documentation.
8710 Adjust implementation to always load all DLLs.
8711 Add 0x1000 offset to DLL base address when calling
8712 win32_add_one_solib.
8713 (child_initialization_done): New static global.
8714 (do_initial_child_stuff): Set child_initialization_done to
8715 zero during child initialization, and 1 after. Replace call
8716 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8718 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8719 (handle_unload_dll): Add function documentation.
8720 (get_child_debug_event): Ignore load and unload DLL events
8721 during child initialization.
8723 2014-02-20 Doug Evans <dje@google.com>
8725 Remove global all_lwps.
8726 * inferiors.h (ptid_of): Move here from linux-low.h.
8727 (pid_of, lwpid_of): Ditto.
8728 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8729 parameter is a struct thread_info * now.
8730 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8731 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8732 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8734 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8735 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8736 * linux-arm-low.c (update_registers_callback): Update, "entry"
8737 parameter is a struct thread_info * now.
8738 Fetch lwpid from current_inferior directly.
8739 (arm_insert_point): Pass &all_threads to find_inferior instead of
8741 (arm_remove_point): Ditto.
8742 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8743 (arm_prepare_to_resume): Fetch pid from thread.
8744 (arm_read_description): Fetch lwpid from current_inferior directly.
8745 * linux-low.c (all_lwps): Delete.
8746 (delete_lwp): Delete call to remove_inferior.
8747 (handle_extended_wait): Fetch lwpid from thread.
8748 (add_lwp): Don't set lwp->entry.id. Remove call to
8749 add_inferior_to_list.
8750 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8751 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8752 (kill_one_lwp_callback): Ditto.
8753 (linux_kill): Don't dereference NULL pointer.
8754 Fetch ptid,lwpid from thread.
8755 (get_detach_signal): Fetch ptid from thread.
8756 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8757 Simplify call to regcache_invalidate_thread.
8758 (delete_lwp_callback): Update, "entry" parameter is a
8759 struct thread_info * now. Fetch pid from thread.
8760 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8761 (status_pending_p_callback): Update, "entry" parameter is a
8762 struct thread_info * now. Fetch ptid from thread.
8763 (find_lwp_pid): Update, "entry" parameter is a
8764 struct thread_info * now.
8765 (linux_wait_for_lwp): Fetch pid from thread.
8766 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8767 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8768 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8769 (dequeue_one_deferred_signal): Ditto.
8770 (cancel_breakpoint): Fetch ptid from current_inferior.
8771 (linux_wait_for_event): Pass &all_threads to find_inferior,
8772 not &all_lwps. Fetch ptid, lwpid from thread.
8773 (count_events_callback): Update, "entry" parameter is a
8774 struct thread_info * now.
8775 (select_singlestep_lwp_callback): Ditto.
8776 (select_event_lwp_callback): Ditto.
8777 (cancel_breakpoints_callback): Ditto.
8778 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8780 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8781 (unsuspend_one_lwp): Update, "entry" parameter is a
8782 struct thread_info * now.
8783 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8785 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8786 Fetch lwpid from thread, not lwp.
8787 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8788 Pass &all_threads to find_inferior, not &all_lwps.
8789 (send_sigstop): Fetch lwpid from thread, not lwp.
8790 (send_sigstop_callback): Update, "entry" parameter is a
8791 struct thread_info * now.
8792 (suspend_and_send_sigstop_callback): Ditto.
8793 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8794 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8795 struct thread_info * now.
8796 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8798 (lwp_running): Update, "entry" parameter is a
8799 struct thread_info * now.
8800 (stop_all_lwps): Fetch ptid from thread.
8801 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8802 (linux_resume_one_lwp): Fetch lwpid from thread.
8803 (linux_set_resume_request): Update, "entry" parameter is a
8804 struct thread_info * now. Fetch pid, lwpid from thread.
8805 (resume_status_pending_p): Update, "entry" parameter is a
8806 struct thread_info * now.
8807 (need_step_over_p): Ditto. Fetch lwpid from thread.
8808 (start_step_over): Fetch lwpid from thread.
8809 (linux_resume_one_thread): Update, "entry" parameter is a
8810 struct thread_info * now. Fetch lwpid from thread.
8811 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8812 (proceed_one_lwp): Update, "entry" parameter is a
8813 struct thread_info * now. Fetch lwpid from thread.
8814 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8815 struct thread_info * now.
8816 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8817 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8818 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8820 (regsets_store_inferior_registers): Ditto.
8821 (fetch_register, store_register): Ditto.
8822 (linux_read_memory, linux_write_memory): Ditto.
8823 (linux_request_interrupt): Ditto.
8824 (linux_read_auxv): Ditto.
8825 (linux_xfer_siginfo): Ditto.
8826 (linux_qxfer_spu): Ditto.
8827 (linux_qxfer_libraries_svr4): Ditto.
8828 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8829 moved to inferiors.h.
8831 (get_thread_lwp): Update.
8832 (struct lwp_info): Delete member "entry". Simplify comment for
8835 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8836 current_inferior directly.
8837 (update_watch_registers_callback): Update, "entry" parameter is a
8838 struct thread_info * now. Fetch pid from thread.
8839 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8840 (mips_insert_point): Fetch lwpid from current_inferior.
8841 Pass &all_threads to find_inferior, not &all_lwps.
8842 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8843 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8845 (mips_stopped_data_address): Ditto.
8846 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8848 * linux-tile-low.c (tile_arch_setup): Ditto.
8849 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8850 (update_debug_registers_callback): Update, "entry" parameter is a
8851 struct thread_info * now. Fetch pid from thread.
8852 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8853 Pass &all_threads to find_inferior, not &all_lwps.
8854 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8855 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8856 Pass &all_threads to find_inferior, not &all_lwps.
8857 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8858 (i386_dr_low_get_status): Ditto.
8859 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8860 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8861 (x86_linux_read_description): Ditto.
8862 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8864 2014-02-20 Doug Evans <dje@google.com>
8866 * inferiors.c (get_first_inferior): Fix buglet.
8868 2014-02-19 Doug Evans <dje@google.com>
8870 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8871 * inferiors.c (add_thread): Change result type to struct thread_info *.
8872 All callers updated.
8873 (add_lwp): Call add_thread here instead of in callers.
8874 All callers updated.
8875 * linux-low.h (get_lwp_thread): Rewrite.
8876 (struct lwp_info): New member "thread".
8878 2014-02-19 Doug Evans <dje@google.com>
8880 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8881 All callers updated.
8883 2014-02-19 Doug Evans <dje@google.com>
8885 * inferiors.c (add_thread): Fix whitespace.
8887 2014-02-19 Doug Evans <dje@google.com>
8889 * dll.c (clear_dlls): Replace accessing list implemention details
8891 * gdbthread.h (get_first_thread): Declare.
8892 * inferiors.c (for_each_inferior_with_data): New function.
8893 (get_first_thread): New function.
8894 (find_thread_ptid): Simplify.
8895 (get_first_inferior): New function.
8896 (clear_list): Delete.
8897 (one_inferior_p): New function.
8898 (clear_inferior_list): New function.
8899 (clear_inferiors): Update.
8900 * inferiors.h (for_each_inferior_with_data): Declare.
8901 (clear_inferior_list): Declare.
8902 (one_inferior_p): Declare.
8903 (get_first_inferior): Declare.
8904 * linux-low.c (linux_wait_for_event): Replace accessing list
8905 implemention details with API function.
8906 * server.c (target_running): Ditto.
8907 (accumulate_file_name_length): New function.
8908 (emit_dll_description): New function.
8909 (handle_qxfer_libraries): Replace accessing list implemention
8910 details with API function.
8911 (handle_qxfer_threads_worker): New function.
8912 (handle_qxfer_threads_proper): Replace accessing list implemention
8913 details with API function.
8914 (handle_query): Ditto.
8915 (visit_actioned_threads_callback_ftype): New typedef.
8916 (visit_actioned_threads_data): New struct.
8917 (visit_actioned_threads): Rewrite to be find_inferior callback.
8918 (resume): Call find_inferior.
8919 (handle_status): Replace accessing list implemention
8920 details with API function.
8921 (process_serial_event): Replace accessing list implemention details
8923 * target.c (set_desired_inferior): Replace accessing list implemention
8924 details with API function.
8925 * tracepoint.c (same_process_p): New function.
8926 (gdb_agent_about_to_close): Replace accessing list implemention
8927 details with API function.
8928 * win32-low.c (child_delete_thread): Replace accessing list
8929 implemention details with API function.
8930 (match_dll_by_basename): New function.
8931 (dll_is_loaded_by_basename): New function.
8932 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8933 details call to dll_is_loaded_by_basename.
8935 2014-02-19 Doug Evans <dje@google.com>
8937 * dll.h (struct dll_info): Add comment.
8938 * gdbthread.h (struct thread_info): Add comment.
8939 (current_ptid): Simplify.
8940 * inferiors.c (add_process): Update.
8941 (remove_process): Update.
8942 * inferiors.h (struct process_info): Rename member "head" to "entry".
8943 * linux-low.c (delete_lwp): Update.
8945 (last_thread_of_process_p): Update.
8946 (kill_one_lwp_callback, linux_kill): Update.
8947 (status_pending_p_callback): Update.
8948 (wait_for_sigstop): Update. Simplify read of ptid.
8949 (start_step_over): Update.
8950 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8951 (get_lwp_thread): Update.
8952 (struct lwp_info): Rename member "head" to "entry".
8953 * regcache.h (inferior_list_entry): Delete.
8954 * server.c (kill_inferior_callback): Update.
8955 (detach_or_kill_inferior_callback): Update.
8956 (print_started_pid): Update.
8957 (print_attached_pid): Update.
8958 (process_serial_event): Simplify read of ptid.
8959 * thread-db.c (thread_db_create_event): Update.
8960 (thread_db_get_tls_address): Update.
8961 * win32-low.c (current_inferior_ptid): Simplify.
8963 2014-02-19 Tom Tromey <tromey@redhat.com>
8965 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8967 (target_supports_btrace): Update.
8969 2014-02-14 Yao Qi <yao@codesourcery.com>
8971 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8972 (rsp-low-ipa.o): New target.
8974 2014-02-12 Tom Tromey <tromey@redhat.com>
8976 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8977 convert_ascii_to_int.
8978 * regcache.c (registers_to_string): Likewise.
8979 * remote-utils.c (decode_M_packet): Likewise.
8980 * server.c (process_serial_event): Likewise.
8982 2014-02-12 Tom Tromey <tromey@redhat.com>
8984 * server.c (handle_query, handle_v_run): Use hex2bin, not
8986 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8988 2014-02-12 Tom Tromey <tromey@redhat.com>
8990 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8991 convert_int_to_ascii.
8992 * regcache.c (registers_to_string, collect_register_as_string):
8994 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8996 * server.c (process_serial_event): Likewise.
8997 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8998 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9000 2014-02-12 Tom Tromey <tromey@redhat.com>
9002 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9003 bin2hex, not hexify.
9004 * tracepoint.c (cmd_qtstatus): Likewise.
9006 2014-02-12 Tom Tromey <tromey@redhat.com>
9008 * remote-utils.c (monitor_output): Pass explicit length to
9011 2014-02-12 Tom Tromey <tromey@redhat.com>
9013 * tracepoint.c: Include rsp-low.h.
9014 * server.c: Include rsp-low.h.
9015 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9016 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9018 * remote-utils.c: Include rsp-low.h.
9019 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9020 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9021 (convert_int_to_ascii, convert_ascii_to_int): Move to
9023 * regcache.c: Include rsp-low.h.
9024 * ax.c: Include rsp-low.h.
9025 * Makefile.in (SFILES): Add common/rsp-low.c.
9026 (OBS): Add rsp-low.o.
9027 (rsp-low.o): New target.
9029 2014-02-12 Tom Tromey <tromey@redhat.com>
9031 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9032 Include print-utils.h.
9033 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9034 (plongest, thirty_two, phex_nz): Remove.
9035 * Makefile.in (SFILES): Add common/print-utils.c.
9036 (OBS): Add print-utils.o.
9037 (print-utils-ipa.o): New target.
9038 (print-utils.o): New target.
9039 (IPA_OBJS): Add print-utils-ipa.o.
9041 2014-02-06 Tom Tromey <tromey@redhat.com>
9043 * Makefile.in (SFILES): Fix indentation.
9045 2014-02-05 Doug Evans <dje@google.com>
9047 * linux-low.c (linux_wait_for_event): Improve comment.
9048 (linux_wait_1): Keep current_inferior in sync with event_child.
9050 2014-01-22 Doug Evans <dje@google.com>
9052 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9054 2014-01-22 Doug Evans <dje@google.com>
9056 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9057 * configure: Regenerate.
9058 * config.in: Regenerate.
9059 * Makefile.in (SFILES): Add debug.c.
9061 * debug.c: New file.
9062 * debug.h: New file.
9063 * linux-aarch64-low.c (*): Update all debugging printfs to use
9064 debug_printf instead of fprintf.
9065 * linux-arm-low.c (*): Ditto.
9066 * linux-cris-low.c (*): Ditto.
9067 * linux-crisv32-low.c (*): Ditto.
9068 * linux-m32r-low.c (*): Ditto.
9069 * linux-sparc-low.c (*): Ditto.
9070 * linux-x86.c (*): Ditto.
9071 * linux-low.c (*): Ditto.
9072 (linux_wait_1): Add calls to debug_enter, debug_exit.
9073 (linux_wait): Remove redundant debugging printf.
9074 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9075 (linux_resume, unstop_all_lwps): Ditto.
9076 * mem-break.c (*): Update all debugging printfs to use
9077 debug_printf instead of fprintf.
9078 * remote-utils.c (*): Ditto.
9079 * thread-db.c (*): Ditto.
9080 * server.c #include <ctype.h>, "gdb_vecs.h".
9081 (debug_threads): Moved to debug.c.
9082 (*): Update all debugging printfs to use debug_printf instead of
9084 (start_inferior): Replace call to fflush with call to debug_flush.
9085 (monitor_show_help): Mention set debug-format.
9086 (parse_debug_format_options): New function.
9087 (handle_monitor_command): Handle "monitor set debug-format".
9088 (gdbserver_usage): Mention --debug-format.
9089 (main): Parse --debug-format.
9090 * server.h (debug_threads): Declaration moved to debug.h.
9092 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9093 trace_debug_1 that uses debug_printf.
9094 (tracepoint_look_up_symbols): Update all debugging printfs to use
9095 debug_printf instead of fprintf.
9097 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9099 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9102 2014-01-17 Pedro Alves <palves@redhat.com>
9105 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9106 defined after including gdb_proc_service.h.
9108 2014-01-16 Doug Evans <dje@google.com>
9110 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9111 (match_dll): Use it.
9113 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9115 * target.h (target_ops) <read_btrace>: Change parameters and
9116 return type to allow error reporting.
9117 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9118 trace reading errors on.
9119 * linux-low.c (linux_low_read_btrace): Pass trace reading
9121 (linux_low_disable_btrace): New.
9123 2014-01-15 Doug Evans <dje@google.com>
9125 * inferiors.c (thread_id_to_gdb_id): Delete.
9126 * inferiors.h (thread_id_to_gdb_id): Delete.
9128 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9130 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9131 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9134 2014-01-08 Pedro Alves <palves@redhat.com>
9136 * server.c (handle_status): Don't discard previous queued stop
9137 replies or thread's pending status here.
9138 (main) <disconnection>: Do it here instead.
9140 2014-01-08 Pedro Alves <palves@redhat.com>
9142 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9143 * server.c (visit_actioned_threads, handle_pending_status): New
9145 (handle_v_cont): Factor out parts to ...
9146 (resume): ... this new function. If in all-stop, and a thread
9147 being resumed has a pending status, report it without actually
9149 (myresume): Adjust to use the new 'resume' function.
9150 (clear_pending_status_callback, set_pending_status_callback)
9151 (find_status_pending_thread_callback): New functions.
9152 (handle_status): Handle the case of multiple threads having
9153 interesting statuses to report. Report threads' real last signal
9154 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9155 with an interesting thread to report the status for, instead of
9156 always reporting the status of the first thread.
9158 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9160 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9161 * gdbreplay.c (gdbreplay_version): Likewise.
9163 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9165 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9166 iov.iov_len with the real length in use.
9168 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9170 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9171 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9172 for all targets that use win32-low.c.
9173 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9174 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9176 2013-12-13 Pedro Alves <palves@redhat.com>
9178 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9179 if equal to TARGET_WAITKIND_LOADED.
9180 * win32-low.c (cached_status): New static global.
9181 (win32_wait): Add declaration.
9182 (do_initial_child_stuff): Flush all initial pending debug events
9183 up to the initial breakpoint.
9184 (win32_wait): If CACHED_STATUS was set, return that instead
9185 of doing a real wait. Remove the code resuming the execution
9186 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9187 during the initial phase. Also remove the code changing
9188 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9189 TARGET_WAITKIND_STOPPED.
9191 2013-12-11 Yao Qi <yao@codesourcery.com>
9193 * notif.c (handle_notif_ack): Return 0 if no notification
9196 2013-11-20 Doug Evans <dje@google.com>
9198 * linux-low.c (linux_set_resume_request): Fix comment.
9200 2013-11-20 Doug Evans <dje@google.com>
9202 * linux-low.c (resume_status_pending_p): Tweak comment.
9204 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9206 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9207 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9208 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9209 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9210 (srv_amd64_regobj): Add amd64-mpx.o.
9211 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9212 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9213 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9214 * i387-fp.c (num_pl_bnd_register) Added constant.
9215 (num_pl_bnd_cfg_registers) Added constant.
9216 (struct i387_xsave) Added reserved area and MPX fields.
9217 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9218 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9220 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9221 (init_registers_amd64_mpx_linux): Declare new function.
9222 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9223 (x86_64_regmap): Add MPX registers.
9224 (x86_linux_read_description): Add MPX case.
9225 (initialize_low_arch): Initialize MPX targets.
9227 2013-11-18 Tom Tromey <tromey@redhat.com>
9229 * configure: Rebuild.
9230 * configure.ac: Don't check for stdlib.h.
9231 * gdbreplay.c: Unconditionally include stdlib.h.
9233 2013-11-18 Tom Tromey <tromey@redhat.com>
9235 * config.in: Rebuild.
9236 * configure: Rebuild.
9237 * configure.ac: Don't use AC_HEADER_DIRENT.
9239 2013-11-18 Tom Tromey <tromey@redhat.com>
9241 * server.h: Don't check HAVE_STRING_H.
9242 * gdbreplay.c: Don't check HAVE_STRING_H.
9243 * configure: Rebuild.
9245 2013-11-18 Tom Tromey <tromey@redhat.com>
9247 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9250 2013-11-08 Tom Tromey <tromey@redhat.com>
9252 * configure, config.in: Rebuild.
9253 * configure.ac: Remove unused configury.
9255 2013-11-08 Tom Tromey <tromey@redhat.com>
9257 * acinclude.m4: Include common.m4, codeset.m4.
9258 * configure, config.in: Rebuild.
9259 * configure.ac: Use GDB_AC_COMMON.
9261 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9263 * linux-s390-low.c (HWCAP_S390_TE): New define.
9264 (s390_arch_setup): Consider the TE field in the HWCAP for
9265 determining 'have_regset_tdb'.
9267 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9270 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9273 2013-10-02 Pedro Alves <palves@redhat.com>
9275 * server.c (process_serial_event): Don't output "GDBserver
9276 exiting" if GDB is connected through stdio.
9277 * target.c (mywait): Likewise, be silent if GDB is connected
9280 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9282 * lynx-low.c (lynx_add_threads_after_attach): New function.
9283 (lynx_attach): Remove call to add_thread. Add call to
9284 lynx_add_threads_after_attach instead.
9286 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9288 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9289 * config.in, configure: Regenerated.
9291 2013-09-18 Yao Qi <yao@codesourcery.com>
9294 * server.c (start_inferior): Clear 'resume_info'.
9296 2013-09-16 Jiong Wang <jiwang@tilera.com>
9298 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9301 2013-09-16 Jiong Wang <jiwang@tilera.com>
9303 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9304 linux-tile-low.o to srv_tgtobj.
9306 2013-09-16 Will Newton <will.newton@linaro.org>
9308 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9311 2013-09-06 Pedro Alves <palves@redhat.com>
9313 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9314 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9315 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9316 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9317 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9318 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9320 2013-09-06 Pedro Alves <palves@redhat.com>
9322 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9323 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9325 2013-09-06 Pedro Alves <palves@redhat.com>
9327 * linux-amd64-ipa.c: Include tracepoint.h.
9328 * linux-i386-ipa.c: Include tracepoint.h.
9330 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9332 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9333 (ps_get_thread_area): New function.
9335 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9337 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9338 (initialize_low_arch): Call init_registers_crisv32 rather than
9339 init_register_crisv32.
9341 2013-09-05 Pedro Alves <palves@redhat.com>
9343 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9345 * hostio.h: ... this new file.
9346 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9347 win32-low.c: Include hostio.h.
9349 2013-09-05 Pedro Alves <palves@redhat.com>
9351 * server.h (gdb_client_data, handler_func, callback_handler_func)
9352 (delete_file_handler, add_file_handler, append_callback_event)
9353 (delete_callback_event, start_event_loop, initialize_event_loop):
9354 Move to event-loop.h and include it.
9355 * event-loop.h: New file.
9357 2013-09-05 Pedro Alves <palves@redhat.com>
9359 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9360 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9361 (loaded_dll, unloaded_dll): Move to ...
9362 * dll.h: ... this new file.
9363 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9365 2013-09-05 Pedro Alves <palves@redhat.com>
9367 * server.h (current_process, get_thread_process, all_processes)
9368 (add_inferior_to_list, for_each_inferior, current_inferior)
9369 (remove_inferior, add_process, remove_process, find_process_pid)
9370 (have_started_inferiors_p, have_attached_inferiors_p)
9371 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9372 (clear_inferiors, find_inferior, find_inferior_id)
9373 (inferior_target_data, set_inferior_target_data)
9374 (inferior_regcache_data, set_inferior_regcache_data): Move to
9375 inferiors.h, and include it.
9376 * inferiors.h: New file.
9378 2013-09-05 Pedro Alves <palves@redhat.com>
9380 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9384 2013-09-05 Pedro Alves <palves@redhat.com>
9386 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9388 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9389 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9390 (handle_tracepoint_general_set, handle_tracepoint_query)
9391 (tracepoint_finished_step, tracepoint_was_hit)
9392 (release_while_stepping_state_list, current_traceframe)
9393 (in_readonly_region, traceframe_read_mem)
9394 (fetch_traceframe_registers, traceframe_read_sdata)
9395 (traceframe_read_info, struct fast_tpoint_collect_status)
9396 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9397 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9398 (supply_fast_tracepoint_registers)
9399 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9400 (ipa_tdesc, claim_trampoline_space)
9401 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9402 (agent_mem_read, agent_get_trace_state_variable_value)
9403 (agent_set_trace_state_variable_value, agent_tsv_read)
9404 (agent_mem_read_string, get_raw_reg_func_addr)
9405 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9406 * tracepoint.h: ... this new file.
9408 2013-09-05 Pedro Alves <palves@redhat.com>
9410 * server.h (perror_with_name, error, fatal, warning, paddress)
9411 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9413 * utils.h: New file.
9415 2013-09-05 Pedro Alves <palves@redhat.com>
9417 * server.h (remote_debug, noack_mode, transport_is_reliable)
9418 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9419 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9420 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9421 (write_enn, initialize_async_io, enable_async_io)
9422 (disable_async_io, check_remote_input_interrupt_request)
9423 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9424 (dead_thread_notify, prepare_resume_reply)
9425 (decode_address_to_semicolon, decode_address, decode_m_packet)
9426 (decode_M_packet, decode_X_packet, decode_xfer_write)
9427 (decode_search_memory_packet, unhexify, hexify)
9428 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9429 (look_up_one_symbol, relocate_instruction)
9430 (monitor_output): Move to remote-utils.h, and include it.
9431 * remote-utils.h: New file.
9433 2013-09-05 Pedro Alves <palves@redhat.com>
9435 * server.h (_): Delete.
9437 2013-09-02 Pedro Alves <palves@redhat.com>
9439 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9440 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9442 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9444 2013-09-02 Pierre Muller <muller@sourceware.org>
9446 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9447 or WriteProcessMemory complete successfully and handle
9448 ERROR_PARTIAL_COPY error.
9450 2013-09-02 Pedro Alves <palves@redhat.com>
9452 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9453 error instead of EIO.
9455 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9458 * linux-low.c: Include filestuff.h.
9459 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9460 * lynx-low.c: Include filestuff.h.
9461 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9462 * server.c: Include filestuff.h.
9463 (main): Call notice_open_fds.
9464 * spu-low.c: Include filestuff.h.
9465 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9467 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9469 * Makefile.in: Explain why ../target and ../nat are not
9470 listed as include file search paths.
9471 (linux-waitpid.o): New object file rule.
9472 * configure.srv (srv_native_linux_obj): New variable.
9473 Replace all occurrences of linux native object files with
9474 $srv_native_linux_obj.
9475 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9476 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9477 (linux_enable_event_reporting): Remove declaration.
9478 (my_waitpid): Moved to common/linux-waitpid.c.
9479 (linux_wait_for_event): Pass ptid when calling
9480 linux_enable_event_reporting.
9481 (linux_supports_tracefork_flag): Remove.
9482 (linux_enable_event_reporting): Likewise.
9483 (linux_tracefork_grandchild): Remove.
9484 (STACK_SIZE): Moved to common/linux-ptrace.c.
9485 (linux_tracefork_child): Remove.
9486 (linux_test_for_tracefork): Remove.
9487 (linux_look_up_symbols): Call linux_supports_traceclone.
9488 (initialize_low): Remove call to linux_test_for_tracefork.
9489 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9490 common/linux-ptrace.h.
9491 (PTRACE_TYPE_ARG4): Likewise.
9492 Include linux-ptrace.h.
9494 2013-08-21 Pedro Alves <palves@redhat.com>
9496 * config.in: Renegerate.
9498 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9500 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9501 (SFILES): Remove $(srcdir)/common/target-common.c and
9502 add $(srcdir)/target/waitstatus.c.
9503 (OBS): Remove target-common.o and add waitstatus.o.
9504 (server_h): Remove $(srcdir)/../common/target-common.h and
9505 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9506 and $(srcdir)/../target/waitstatus.h.
9507 (target-common.o): Remove.
9508 (waitstatus.o): New target object file.
9509 * target.h: Do not include target-common.h and
9510 include target/resume.h, target/wait.h and
9511 target/waitstatus.h.
9513 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9515 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9516 to PTRACE_TYPE_ARG3.
9517 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9518 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9520 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9521 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9523 2013-07-27 Jie Zhang <jie@codesourcery.com>
9524 Daniel Jacobowitz <dan@codesourcery.com>
9525 Yao Qi <yao@codesourcery.com>
9527 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9528 (mips-linux-watch.o): New rule.
9529 (mips_linux_watch_h): New variable.
9530 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9532 * linux-mips-low.c: Include mips-linux-watch.h.
9533 (struct arch_process_info, struct arch_lwp_info): New.
9534 (update_watch_registers_callback): New function.
9535 (mips_linux_new_process, mips_linux_new_thread) New functions.
9536 (mips_linux_prepare_to_resume, mips_insert_point): New
9538 (mips_remove_point, mips_stopped_by_watchpoint): New
9540 (rsp_bp_type_to_target_hw_bp_type): New function.
9541 (mips_stopped_data_address): New function.
9542 (the_low_target): Add watchpoint support functions.
9544 2013-07-27 Yao Qi <yao@codesourcery.com>
9546 * i386-low.c: Include break-common.h.
9547 (enum target_hw_bp_type): Remove.
9549 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9551 * Makefile.in (SFILES): /common/target-common.c.
9552 (OBS): Add target-common.o.
9553 (server_h): Add $(srcdir)/../common/target-common.h.
9554 (target-common.o): New target.
9555 * server.c (queue_stop_reply_callback): Free
9556 status string after use.
9557 * target.c (target_waitstatus_to_string): Remove.
9558 * target.h: Include target-common.h.
9559 (resume_kind): Likewise.
9560 (target_waitkind): Likewise.
9561 (target_waitstatus): Likewise.
9562 (TARGET_WNOHANG): Likewise.
9564 2013-07-04 Yao Qi <yao@codesourcery.com>
9566 * Makefile.in (host_alias): Use @host_noncanonical@.
9567 (target_alias): Use @target_noncanonical@.
9568 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9569 ACX_NONCANONICAL_HOST.
9570 * configure: Regenerated.
9573 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9575 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9576 * configure: Rebuild.
9577 * Makefile.in (version_host, version_target): Get from configure.
9578 (version.c): Use $(version_host) and $(version_target).
9580 2013-07-03 Pedro Alves <palves@redhat.com>
9582 * Makefile.in (config.status): Depend on development.sh.
9583 * acinclude.m4: Include libmcheck.m4.
9584 * configure: Regenerate.
9586 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9588 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9589 attribute inside the parentheses.
9590 (winapi_DebugSetProcessKillOnExit): Ditto.
9591 (winapi_DebugBreakProcess): Ditto.
9592 (winapi_GenerateConsoleCtrlEvent): Ditto.
9594 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9596 * notif.h (notif_event): Add a dummy member to avoid compiler
9599 2013-07-01 Pedro Alves <palves@redhat.com>
9601 * hostio.c (HOSTIO_PATH_MAX): Define.
9602 (require_filename, handle_open, handle_unlink, handle_readlink):
9605 2013-07-01 Pedro Alves <palves@redhat.com>
9607 * server.h: Include "pathmax.h".
9608 * linux-low.c: Don't include sys/param.h.
9609 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9611 * win32-low.c: Don't include sys/param.h.
9612 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9614 2013-07-01 Pedro Alves <palves@redhat.com>
9616 * event-loop.c: Don't check HAVE_UNISTD_H before including
9618 * gdbreplay.c: Likewise.
9619 * remote-utils.c: Likewise.
9620 * server.c: Likewise.
9621 * configure.ac: Don't check for unistd.h.
9622 * configure: Regenerate.
9624 2013-06-28 Tom Tromey <tromey@redhat.com>
9626 * Makefile.in (version.c): Use version.in, not
9629 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9631 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9632 * configure: Rebuild.
9633 * Makefile.in (version_host, version_target): Get from configure.
9634 (version.c): Use $(version_host) and $(version_target).
9636 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9638 Fix trace-status to output user name without trailing colon.
9639 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9641 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9643 Fix trace-status to output proper start-time and stop-time.
9644 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9645 output start time and stop time in hex as gdb expects.
9647 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9649 * tracepoint.c (build_traceframe_info_xml): Output trace state
9650 variables present in the trace buffer.
9652 2013-06-24 Tom Tromey <tromey@redhat.com>
9654 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9656 (version.o): Remove.
9657 * gdbreplay.c: Include version.h.
9658 (version, host_name): Don't declare.
9659 * server.h: Include version.h.
9660 (version, host_name): Don't declare.
9662 2013-06-12 Pedro Alves <palves@redhat.com>
9664 * linux-x86-low.c (linux_is_elf64): Delete global.
9665 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9666 with local linux_pid_exe_is_elf_64_file use.
9668 2013-06-11 Pedro Alves <palves@redhat.com>
9670 * linux-low.c (regset_disabled, disable_regset): New functions.
9671 (regsets_fetch_inferior_registers)
9672 (regsets_store_inferior_registers): Use them.
9673 (initialize_regsets_info); Don't allocate the disabled_regsets
9675 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9678 2013-06-11 Pedro Alves <palves@redhat.com>
9680 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9683 2013-06-11 Pedro Alves <palves@redhat.com>
9685 * linux-x86-low.c (initialize_low_arch): Call
9686 init_registers_x32_avx_linux.
9688 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9690 Fix compatibility with Android Bionic.
9691 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9694 2013-06-07 Pedro Alves <palves@redhat.com>
9697 * Makefile.in (OBS): Add tdesc.o.
9698 (IPA_OBJS): Add tdesc-ipa.o.
9699 (tdesc-ipa.o): New rule.
9700 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9702 * linux-low.c (new_inferior): Delete.
9703 (disabled_regsets, num_regsets): Delete.
9704 (linux_add_process): Adjust to set the new per-process
9706 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9707 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9708 was a stop. When calling arch_setup, switch the current inferior
9709 to the thread that got an event.
9710 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9711 (regsets_fetch_inferior_registers)
9712 (regsets_store_inferior_registers): New regsets_info parameter.
9714 (linux_register_in_regsets): New regs_info parameter. Adjust to
9716 (register_addr, fetch_register, store_register): New usrregs_info
9717 parameter. Adjust to use it.
9718 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9719 parameter regs_info. Adjust to use it.
9720 (linux_fetch_registers): Get the current inferior's regs_info, and
9722 (linux_store_registers): Ditto.
9723 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9724 (initialize_low): Don't initialize the target_regsets here. Call
9725 initialize_low_arch.
9726 * linux-low.h (target_regsets): Delete declaration.
9727 (struct regsets_info): New.
9728 (struct usrregs_info): New.
9729 (struct regs_info): New.
9730 (struct process_info_private) <new_inferior>: New field.
9731 (struct linux_target_ops): Delete the num_regs, regmap, and
9732 regset_bitmap fields. New field regs_info.
9733 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9734 * i387-fp.c (num_xmm_registers): Delete.
9735 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9736 calls to new interface.
9737 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9738 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9739 Infer the number of xmm registers from the regcache's target
9741 * i387-fp.h (num_xmm_registers): Delete.
9742 * inferiors.c (add_thread): Don't install the thread's regcache
9744 * proc-service.c (gregset_info): Fetch the current inferior's
9745 regs_info. Adjust to use it.
9746 * regcache.c: Include tdesc.h.
9747 (register_bytes, reg_defs, num_registers)
9748 (gdbserver_expedite_regs): Delete.
9749 (get_thread_regcache): If the thread doesn't have a regcache yet,
9750 create one, instead of aborting gdbserver.
9751 (regcache_invalidate_one): Rename to ...
9752 (regcache_invalidate_thread): ... this.
9753 (regcache_invalidate_one): New.
9754 (regcache_invalidate): Only invalidate registers of the current
9756 (init_register_cache): Add target_desc parameter, and use it.
9757 (new_register_cache): Ditto. Assert the target description has a
9758 non zero registers_size.
9759 (regcache_cpy): Add assertions. Adjust.
9760 (realloc_register_cache, set_register_cache): Delete.
9761 (registers_to_string, registers_from_string): Adjust.
9762 (find_register_by_name, find_regno, find_register_by_number)
9763 (register_cache_size): Add target_desc parameter, and use it.
9764 (free_register_cache_thread, free_register_cache_thread_one)
9765 (regcache_release, register_cache_size): New.
9766 (register_size): Add target_desc parameter, and use it.
9767 (register_data, supply_register, supply_register_zeroed)
9768 (supply_regblock, supply_register_by_name, collect_register)
9769 (collect_register_as_string, collect_register_by_name): Adjust.
9770 * regcache.h (struct target_desc): Forward declare.
9771 (struct regcache) <tdesc>: New field.
9772 (init_register_cache, new_register_cache): Add target_desc
9774 (regcache_invalidate_thread): Declare.
9775 (regcache_invalidate_one): Delete declaration.
9776 (regcache_release): Declare.
9777 (find_register_by_number, register_cache_size, register_size)
9778 (find_regno): Add target_desc parameter.
9779 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9781 * remote-utils.c: Include tdesc.h.
9782 (outreg, prepare_resume_reply): Adjust.
9783 * server.c: Include tdesc.h.
9784 (gdbserver_xmltarget): Delete declaration.
9785 (get_features_xml, process_serial_event): Adjust.
9786 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9788 (struct process_info) <tdesc>: New field.
9789 (ipa_tdesc): Declare.
9790 * tdesc.c: New file.
9791 * tdesc.h: New file.
9792 * tracepoint.c: Include tdesc.h.
9793 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9794 (get_context_regcache): Adjust to pass ipa_tdesc down.
9795 (do_action_at_tracepoint): Adjust to get the register cache size
9796 from the context regcache's description.
9797 (traceframe_walk_blocks): Adjust to get the register cache size
9798 from the current trace frame's description.
9799 (traceframe_get_pc): Adjust to get current trace frame's
9800 description and pass it down.
9801 (gdb_collect): Adjust to get the register cache size from the
9803 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9804 (gdbserver_xmltarget): Delete.
9805 (initialize_low_tracepoint): Set the ipa's target description.
9806 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9807 (initialize_low_tracepoint): Set the ipa's target description.
9808 * linux-x86-low.c: Include tdesc.h.
9809 [__x86_64__] (is_64bit_tdesc): New.
9810 (ps_get_thread_area, x86_get_thread_area): Use it.
9811 (i386_cannot_store_register): Rename to ...
9812 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9813 (i386_cannot_fetch_register): Rename to ...
9814 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9815 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9817 (target_regsets): Rename to ...
9818 (x86_regsets): ... this.
9819 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9821 (x86_siginfo_fixup): Use is_64bit_tdesc.
9822 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9823 (tdesc_x32_avx_linux, tdesc_x32_linux)
9824 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9826 (x86_linux_update_xmltarget): Delete.
9827 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9828 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9829 (AMD64_LINUX_USER64_CS): New.
9830 (x86_linux_read_description): New, based on
9831 x86_linux_update_xmltarget.
9832 (same_process_callback): New.
9833 (x86_arch_setup_process_callback): New.
9834 (x86_linux_update_xmltarget): New.
9835 (x86_regsets_info): New.
9836 (amd64_linux_regs_info): New.
9837 (i386_linux_usrregs_info): New.
9838 (i386_linux_regs_info): New.
9839 (x86_linux_regs_info): New.
9840 (x86_arch_setup): Reimplement.
9841 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9842 (x86_emit_ops): Ditto.
9843 (the_low_target): Adjust. Install x86_linux_regs_info,
9844 x86_cannot_fetch_register, and x86_cannot_store_register.
9845 (initialize_low_arch): New.
9846 * linux-ia64-low.c (tdesc_ia64): Declare.
9847 (ia64_fetch_register): Adjust.
9848 (ia64_usrregs_info, regs_info): New globals.
9849 (ia64_regs_info): New function.
9850 (the_low_target): Adjust.
9851 (initialize_low_arch): New function.
9852 * linux-sparc-low.c (tdesc_sparc64): Declare.
9853 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9855 (sparc_arch_setup): New function.
9856 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9857 (the_low_target): Adjust.
9858 (initialize_low_arch): New function.
9859 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9860 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9861 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9862 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9863 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9864 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9865 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9866 (tdesc_powerpc_isa205_vsx64l): Declare.
9867 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9868 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9869 (ppc_set_pc, ppc_get_hwcap): Adjust.
9870 (ppc_usrregs_info): Forward declare.
9871 (!__powerpc64__) ppc_regmap_adjusted: New global.
9872 (ppc_arch_setup): Adjust to the current process'es target
9874 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9875 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9876 (ppc_store_evrregset): Adjust.
9877 (target_regsets): Rename to ...
9878 (ppc_regsets): ... this, and make static.
9879 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9880 (ppc_regs_info): New function.
9881 (the_low_target): Adjust.
9882 (initialize_low_arch): New function.
9883 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9884 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9885 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9886 (tdesc_s390x_linux64v2): Declare.
9887 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9888 (s390_fill_gregset, s390_store_last_break): Adjust.
9889 (target_regsets): Rename to ...
9890 (s390_regsets): ... this, and make static.
9891 (s390_get_pc, s390_set_pc): Adjust.
9892 (s390_get_hwcap): New target_desc parameter, and use it.
9893 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9894 (s390_arch_setup): Adjust to set the current process'es target
9895 description. Don't adjust the regmap.
9896 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9897 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9898 (regs_info_3264): New globals.
9899 (s390_regs_info): New function.
9900 (the_low_target): Adjust.
9901 (initialize_low_arch): New function.
9902 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9903 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9904 [__mips64] (init_registers_mips_linux)
9905 (init_registers_mips_dsp_linux): Delete defines.
9906 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9907 (have_dsp): New global.
9908 (mips_read_description): New, based on mips_arch_setup.
9909 (mips_arch_setup): Reimplement.
9910 (get_usrregs_info): New function.
9911 (mips_cannot_fetch_register, mips_cannot_store_register)
9912 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9913 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9914 (target_regsets): Rename to ...
9915 (mips_regsets): ... this, and make static.
9916 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9917 (dsp_regs_info, regs_info): New globals.
9918 (mips_regs_info): New function.
9919 (the_low_target): Adjust.
9920 (initialize_low_arch): New function.
9921 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9922 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9924 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9925 (arm_read_description): New, with bits factored from
9927 (arm_arch_setup): Reimplement.
9928 (target_regsets): Rename to ...
9929 (arm_regsets): ... this, and make static.
9930 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9931 (arm_regs_info): New function.
9932 (the_low_target): Adjust.
9933 (initialize_low_arch): New function.
9934 * linux-m68k-low.c (tdesc_m68k): Declare.
9935 (target_regsets): Rename to ...
9936 (m68k_regsets): ... this, and make static.
9937 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9938 (m68k_regs_info): New function.
9939 (m68k_arch_setup): New function.
9940 (the_low_target): Adjust.
9941 (initialize_low_arch): New function.
9942 * linux-sh-low.c (tdesc_sharch): Declare.
9943 (target_regsets): Rename to ...
9944 (sh_regsets): ... this, and make static.
9945 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9946 (sh_regs_info, sh_arch_setup): New functions.
9947 (the_low_target): Adjust.
9948 (initialize_low_arch): New function.
9949 * linux-bfin-low.c (tdesc_bfin): Declare.
9950 (bfin_arch_setup): New function.
9951 (bfin_usrregs_info, regs_info): New globals.
9952 (bfin_regs_info): New function.
9953 (the_low_target): Adjust.
9954 (initialize_low_arch): New function.
9955 * linux-cris-low.c (tdesc_cris): Declare.
9956 (cris_arch_setup): New function.
9957 (cris_usrregs_info, regs_info): New globals.
9958 (cris_regs_info): New function.
9959 (the_low_target): Adjust.
9960 (initialize_low_arch): New function.
9961 * linux-cris-low.c (tdesc_crisv32): Declare.
9962 (cris_arch_setup): New function.
9963 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9964 (cris_regs_info): New function.
9965 (the_low_target): Adjust.
9966 (initialize_low_arch): New function.
9967 * linux-m32r-low.c (tdesc_m32r): Declare.
9968 (m32r_arch_setup): New function.
9969 (m32r_usrregs_info, regs_info): New globals.
9970 (m32r_regs_info): Adjust.
9971 (initialize_low_arch): New function.
9972 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9973 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9974 (tic6x_usrregs_info): Forward declare.
9975 (tic6x_read_description): New function, based on ...
9976 (tic6x_arch_setup): ... this. Reimplement.
9977 (target_regsets): Rename to ...
9978 (tic6x_regsets): ... this, and make static.
9979 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9980 (tic6x_regs_info): New function.
9981 (the_low_target): Adjust.
9982 (initialize_low_arch): New function.
9983 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9984 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9985 (target_regsets): Rename to ...
9986 (xtensa_regsets): ... this, and make static.
9987 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9989 (xtensa_arch_setup, xtensa_regs_info): New functions.
9990 (the_low_target): Adjust.
9991 (initialize_low_arch): New function.
9992 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9993 (nios2_arch_setup): Set the current process'es tdesc.
9994 (target_regsets): Rename to ...
9995 (nios2_regsets): ... this.
9996 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9997 (nios2_regs_info): New function.
9998 (the_low_target): Adjust.
9999 (initialize_low_arch): New function.
10000 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10001 (aarch64_arch_setup): Set the current process'es tdesc.
10002 (target_regsets): Rename to ...
10003 (aarch64_regsets): ... this.
10004 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10005 (aarch64_regs_info): New function.
10006 (the_low_target): Adjust.
10007 (initialize_low_arch): New function.
10008 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10010 (target_regsets): Rename to ...
10011 (tile_regsets): ... this.
10012 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10013 (tile_regs_info): New function.
10014 (tile_arch_setup): Set the current process'es tdesc.
10015 (the_low_target): Adjust.
10016 (initialize_low_arch): New function.
10017 * spu-low.c (tdesc_spu): Declare.
10018 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10019 * win32-arm-low.c (tdesc_arm): Declare.
10020 (arm_arch_setup): New function.
10021 (the_low_target): Install arm_arch_setup instead of
10022 init_registers_arm.
10023 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10024 (init_windows_x86): Rename to ...
10025 (i386_arch_setup): ... this. Set `win32_tdesc'.
10026 (the_low_target): Adjust.
10027 * win32-low.c (win32_tdesc): New global.
10028 (child_add_thread): Don't create the thread cache here.
10029 (do_initial_child_stuff): Set the new process'es tdesc.
10030 * win32-low.h (struct target_desc): Forward declare.
10031 (win32_tdesc): Declare.
10032 * lynx-i386-low.c (tdesc_i386): Declare global.
10033 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10034 * lynx-low.c (lynx_tdesc): New global.
10035 (lynx_add_process): Set the new process'es tdesc.
10036 * lynx-low.h (struct target_desc): Forward declare.
10037 (lynx_tdesc): Declare global.
10038 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10039 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10040 * nto-low.c (nto_tdesc): New global.
10041 (do_attach): Set the new process'es tdesc.
10042 * nto-low.h (struct target_desc): Forward declare.
10043 (nto_tdesc): Declare.
10044 * nto-x86-low.c (tdesc_i386): Declare.
10045 (nto_x86_arch_setup): Set `nto_tdesc'.
10047 2013-06-04 Gary Benson <gbenson@redhat.com>
10049 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10050 to qSupported response when appropriate.
10051 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10052 with nonzero-length annex.
10053 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10054 arguments supplied in annex.
10056 2013-05-31 Doug Evans <dje@google.com>
10059 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10060 64 bits in 64-cross-32 environment.
10062 2013-05-28 Pedro Alves <palves@redhat.com>
10064 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10065 (aarch64-without-fpu.c): Delete rule.
10066 * configure.srv (aarch64*-*-linux*): Remove references to
10067 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10068 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10071 2013-05-24 Pedro Alves <palves@redhat.com>
10073 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10074 instead of strchr/decode_address. Error if the range isn't split
10075 with a ','. Don't assume there's be a ':' in the action.
10077 2013-05-23 Yao Qi <yao@codesourcery.com>
10078 Pedro Alves <palves@redhat.com>
10080 * linux-low.c (lwp_in_step_range): New function.
10081 (linux_wait_1): If the thread was range stepping and stopped
10082 outside the stepping range, report the stop to GDB. Otherwise,
10083 continue stepping. Add range stepping debug output.
10084 (linux_set_resume_request): Copy the step range from the resume
10085 request to the lwp.
10086 (linux_supports_range_stepping): New.
10087 (linux_target_ops) <supports_range_stepping>: Set to
10088 linux_supports_range_stepping.
10089 * linux-low.h (struct linux_target_ops)
10090 <supports_range_stepping>: New field.
10091 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10092 * linux-x86-low.c (x86_supports_range_stepping): New.
10093 (the_low_target) <supports_range_stepping>: Set to
10094 x86_supports_range_stepping.
10095 * server.c (handle_v_cont): Handle 'r' action.
10096 (handle_v_requests): Append ";r" if the target supports range
10098 * target.h (struct thread_resume) <step_range_start,
10099 step_range_end>: New fields.
10100 (struct target_ops) <supports_range_stepping>:
10102 (target_supports_range_stepping): New macro.
10104 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10106 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10107 confusion in comment.
10109 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10111 * lynx-low.c (struct process_info_private): New type.
10112 (lynx_add_process): New function.
10113 (lynx_create_inferior, lynx_attach): Replace calls to
10114 add_process by calls to lynx_add_process.
10115 (lynx_resume): If PTID is null, then try using
10116 current_process()->private->last_wait_event_ptid.
10118 (lynx_clear_inferiors): Delete. The contents of that function
10119 has been inlined in lynx_mourn;
10120 (lynx_wait_1): Save the ptid in the process's private data.
10121 (lynx_mourn): Free the process' private data. Replace call
10122 to lynx_clear_inferiors by call to clear_inferiors.
10124 2013-05-17 Yao Qi <yao@codesourcery.com>
10126 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10129 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10131 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10132 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10133 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10134 PT_TEXT_END_ADDR guards. Update comments.
10135 (linux_target_op) <read_offsets>: Conditionally define to
10136 linux_read_offsets if the target is UCLIBC and if it defines
10137 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10139 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10140 Andrew Jenner <andrew@codesourcery.com>
10142 * Makefile.in (SFILES): Add linux-nios2-low.c.
10143 (clean): Add action to delete nios2-linux.c.
10144 (nios2-linux.c): New rule.
10145 * configure.srv: Add nios2*-*-linux*.
10146 * linux-nios2-low.c: New.
10148 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10150 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10152 2013-04-25 Hui Zhu <hui@codesourcery.com>
10155 * ax.c (ax_printf): Add fflush.
10157 2013-04-22 Tom Tromey <tromey@redhat.com>
10159 * Makefile.in (SFILES): Add filestuff.c.
10160 (OBS): Add filestuff.o.
10161 (filestuff.o): New target.
10162 * config.in, configure: Rebuild.
10163 * configure.ac: Check for fdwalk, pipe2.
10165 2013-04-17 Pedro Alves <palves@redhat.com>
10167 * configure.ac (USE_THREAD_DB): Delete variable.
10168 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10169 Don't AC_SUBST USE_THREAD_DB.
10170 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10171 * config.in, configure: Regenerate.
10173 2013-04-16 Pedro Alves <palves@redhat.com>
10175 * linux-low.h (struct lwp_info) <thread_known>: Move under
10176 the USE_THREAD_DB #ifdef.
10178 2013-04-16 Pedro Alves <palves@redhat.com>
10180 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10181 (linux-low.o): Delete rule.
10182 * linux-low.h: Always include "gdb_thread_db.h" instead of
10183 conditionally including thread_db.h.
10184 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10187 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10189 * Makefile.in (install-only): Fix make install regression.
10191 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10193 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10194 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10196 * gdbserver.1: Remove.
10198 2013-03-22 Pedro Alves <palves@redhat.com>
10200 * linux-low.c (handle_extended_wait): Don't call
10201 linux_enable_event_reporting.
10203 2013-03-15 Tony Theodore <tonyt@logyst.com>
10206 * Makefile.in (SHELL): Use @SHELL@.
10208 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10210 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10213 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10215 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10216 Remove extraneous NULL element.
10218 2013-03-13 Yao Qi <yao@codesourcery.com>
10220 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10221 'V' block in trace frame.
10223 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10225 * target.h (struct target_ops): Add btrace ops.
10226 (target_supports_btrace): New macro.
10227 (target_enable_btrace): New macro.
10228 (target_disable_btrace): New macro.
10229 (target_read_btrace): New macro.
10230 * gdbthread.h (struct thread_info): Add btrace field.
10231 * server.c: Include btrace-common.h.
10232 (handle_btrace_general_set): New function.
10233 (handle_btrace_enable): New function.
10234 (handle_btrace_disable): New function.
10235 (handle_general_set): Call handle_btrace_general_set.
10236 (handle_qxfer_btrace): New function.
10237 (struct qxfer qxfer_packets[]): Add btrace entry.
10238 * inferiors.c (remove_thread): Disable btrace.
10239 * linux-low: Include linux-btrace.h.
10240 (linux_low_enable_btrace): New function.
10241 (linux_low_read_btrace): New function.
10242 (linux_target_ops): Add btrace ops.
10243 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10244 Add srv_linux_btrace=yes.
10245 (x86_64-*-linux*): Add linux-btrace.o.
10246 Add srv_linux_btrace=yes.
10247 * configure.ac: Define HAVE_LINUX_BTRACE.
10248 * config.in: Regenerated.
10249 * configure: Regenerated.
10251 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10253 * server.c (handle_qxfer): Preserve error message if -3 is
10255 (qxfer): Document the -3 return value.
10257 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10259 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10260 (linux_btrace_h): New variable.
10261 (linux-btrace.o): New rule.
10263 2013-03-08 Stan Shebs <stan@codesourcery.com>
10264 Hafiz Abid Qadeer <abidh@codesourcery.com>
10266 * tracepoint.c (trace_buffer_size): New global.
10267 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10268 (init_trace_buffer): Change to one-argument function. Allocate
10269 trace buffer memory.
10270 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10271 handle QTBuffer:size packet.
10272 (cmd_bigqtbuffer_size): New function.
10273 (initialize_tracepoint): Call init_trace_buffer with
10274 DEFAULT_TRACE_BUFFER_SIZE.
10275 * server.c (handle_query): Add QTBuffer:size in the
10278 2013-03-07 Yao Qi <yao@codesourcery.com>
10280 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10281 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10283 (cmd_qtsp): Adjust condition. Do post increment.
10284 Set cur_action and cur_step_action back to 0.
10286 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10289 * linux-low.c (linux_write_memory): Return early success if LEN is
10292 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10294 * configure.srv: Add x86_64-*-cygwin* as target.
10296 2013-02-28 Tom Tromey <tromey@redhat.com>
10298 * configure.ac: Invoke AC_SYS_LARGEFILE.
10299 * configure, config.in: Rebuild.
10301 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10303 * win32-low.c: Throughout, fix format strings and casts of
10304 printf-like functions to avoid type related warnings on all
10306 (get_child_debug_event): Print dwDebugEventCode as hex since
10307 that's how it's usually documented.
10309 2013-02-28 Yao Qi <yao@codesourcery.com>
10311 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10314 2013-02-27 Jiong Wang <jiwang@tilera.com>
10316 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10317 (reg-tilegx32.c): New rule.
10318 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10319 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10320 different register info initializer according to elf class.
10321 (init_registers_tilgx32): New function. The tilegx32 register info
10323 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10324 (tile_store_gregset): Likewise.
10326 2013-02-27 Yao Qi <yao@codesourcery.com>
10328 * server.c (process_point_options): Print debug message when
10329 debug_threads is true.
10331 2013-02-26 Yao Qi <yao@codesourcery.com>
10333 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10335 2013-02-19 Pedro Alves <palves@redhat.com>
10336 Kai Tietz <ktietz@redhat.com>
10340 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10341 instead of strtoul to extract address from packet.
10342 (process_serial_event) <'z'>: Likewise.
10344 2013-02-18 Yao Qi <yao@codesourcery.com>
10346 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10348 2013-02-14 Pedro Alves <palves@redhat.com>
10352 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10353 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10355 2013-02-14 Pedro Alves <palves@redhat.com>
10357 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10359 2013-02-14 Pedro Alves <palves@redhat.com>
10361 * tracepoint.c (save_string): Delete.
10362 (add_tracepoint_action): Use savestring instead of save_string.
10364 2013-02-12 Pedro Alves <palves@redhat.com>
10366 * linux-xtensa-low.c: Ditto.
10367 * xtensa-xtregs.c: Ditto.
10369 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10371 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10374 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10376 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10377 aarch64_num_wp_regs and aarch64_num_bp_regs to
10378 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10380 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10382 * linux-aarch64-low.c (ps_get_thread_area): Replace
10383 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10385 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10386 Marcus Shawcroft <marcus.shawcroft@arm.com>
10387 Nigel Stephens <nigel.stephens@arm.com>
10388 Yufeng Zhang <yufeng.zhang@arm.com>
10390 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10391 (aarch64.c, aarch64-without-fpu.c): New targets.
10392 * configure.srv (aarch64*-*-linux*): New.
10393 * linux-aarch64-low.c: New file.
10395 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10397 * linux-low.c (handle_extended_wait, linux_create_inferior)
10398 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10399 (dequeue_one_deferred_signal, linux_resume_one_thread)
10400 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10401 (linux_tracefork_grandchild, linux_test_for_tracefork)
10402 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10403 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10404 where the argument is 0.
10406 2013-01-25 Yao Qi <yao@codesourcery.com>
10408 * event-loop.c: Include "queue.h".
10409 (gdb_event_p): New typedef.
10410 (struct gdb_event) <next_event>: Remove.
10411 (event_queue): Change to QUEUE(gdb_event_p).
10412 (async_queue_event): Remove.
10413 (gdb_event_xfree): New.
10414 (initialize_event_loop): New.
10415 (process_event): Use API from QUEUE.
10416 (wait_for_event): Likewise.
10417 * server.c (main): Call initialize_event_loop.
10418 * server.h (initialize_event_loop): Declare.
10420 2013-01-18 Yao Qi <yao@codesourcery.com>
10422 * ax.h (struct eval_agent_expr_context): New.
10423 (gdb_eval_agent_expr): Update declaration.
10424 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10425 TFRAME. Add new argument CTX.
10426 * server.h (struct eval_agent_expr_context): Declare.
10427 (agent_mem_read, agent_tsv_read): Update declaration.
10428 (agent_mem_read_string): Likewise.
10429 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10430 (add_traceframe_block): Add new argument TPOINT.
10431 Increase TPOINT->traceframe_usage.
10432 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10433 eval_tracepoint_agent_expr.
10434 (condition_true_at_tracepoint): Likewise.
10435 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10436 (agent_mem_read_string, agent_tsv_read): Likewise.
10438 2013-01-16 Yao Qi <yao@codesourcery.com>
10440 * linux-low.c (linux_resume_one_lwp): Don't check
10441 'lwp->bp_reinsert != 0'.
10443 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10444 Pedro Alves <palves@redhat.com>
10446 * lynx-low.c (ptrace_request_to_str): Define a temporary
10447 macro and use it to simplify this function's implementation.
10449 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10451 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10454 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10456 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10458 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10460 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10462 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10464 * lynx-low.c (lynx_resume): Use the resume_info parameter
10465 to determine the ptid for the lynx_ptrace call, unless
10466 it is equal to minus_one_ptid, in which case we use the
10467 ptid of the current_inferior.
10468 (lynx_wait_1): After having received a thread create/exit
10469 event, resume the inferior's execution using the signaling
10470 thread's ptid, rather than the old ptid.
10472 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10474 * lynx-low.c (lynx_resume): Delete variable ret.
10476 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10478 * gdbreplay.c (gdbreplay_version): Update copyright year.
10479 * server.c (gdbserver_version): Likewise.
10481 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10483 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10486 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10488 * lynx-low.c (ptrace_request_to_str): Add handling for
10489 PTRACE_GETTRACESIG.
10491 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10493 * lynx-low.c (lynx_attach): Delete variable new_process.
10495 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10497 * lynx-low.c (lynx_create_inferior): Delete variable
10500 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10502 * lynx-low.c (ptrace_request_to_str): Do not handle
10503 PTRACE_GETTHREADLIST if this macro does not exist.
10505 2012-12-15 Yao Qi <yao@codesourcery.com>
10507 * Makefile.in (OBS): Add notif.o.
10508 * notif.c, notif.h: New.
10509 * server.c: Include "notif.h".
10510 (struct vstop_notif) <next>: Remove.
10512 (queue_stop_reply): Update.
10513 (push_event, send_next_stop_reply): Remove.
10514 (discard_queued_stop_replies): Update.
10515 (notif_stop): New variable.
10516 (handle_v_stopped): Remove.
10517 (handle_v_requests): Don't call handle_v_stopped. Call
10518 handle_ack_notif instead.
10519 (queue_stop_reply_callback): Call notif_event_enque instead
10520 of queue_stop_reply.
10521 (handle_status): Don't call send_next_stop_reply, call
10522 notif_write_event instead.
10523 (kill_inferior_callback): Likewise.
10524 (detach_or_kill_inferior_callback): Likewise.
10525 (main): Call initialize_notif.
10526 (process_serial_event): Call QUEUE_is_empty.
10527 (handle_target_event): Call notif_push instead of push event.
10528 * server.h (push_event): Remove declaration.
10530 2012-12-10 Tom Tromey <tromey@redhat.com>
10532 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10533 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10536 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10537 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10538 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10539 (amd64-linux-ipa.o, ax.o): Rewrite.
10540 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10541 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10542 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10543 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10544 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10545 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10546 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10547 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10548 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10549 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10550 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10551 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10552 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10553 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10554 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10555 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10556 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10557 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10558 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10559 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10560 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10561 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10562 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10563 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10564 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10565 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10566 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10567 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10568 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10569 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10570 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10571 (reg-tilegx.o): Remove.
10572 (all_object_files): New macro.
10573 Include .deps files.
10574 * aclocal.m4, configure: Rebuild.
10575 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10576 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10577 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10579 2012-12-05 Tom Tromey <tromey@redhat.com>
10582 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10584 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10586 * configure.ac: Check for linux/perf_event.h.
10587 * config.in: Regenerated.
10588 * configure: Regenerated.
10590 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10592 * hostio.c (handle_readlink): Decrease buffer size
10593 parameter passed to readlink by one byte.
10595 2012-11-26 Yao Qi <yao@codesourcery.com>
10597 * configure.ac (build_warnings): Append '-Wempty-body'.
10598 * configure: Regenerated.
10599 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10602 2012-11-15 Pierre Muller <muller@sourceware.org>
10604 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10605 * config.in: Regenerate.
10606 * configure: Regenerate.
10607 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10608 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10609 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10610 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10612 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10613 instead of <sys/wait.h> header.
10614 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10616 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10618 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10619 (various make rules): Remove -DGDBSERVER
10621 2012-11-09 Yao Qi <yao@codesourcery.com>
10623 * spu-low.c (current_ptid): Move it to ..
10624 * gdbthread.h: ... here. New.
10625 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10626 * server.c (myresume, process_serial_event): Likewise.
10627 * thread-db.c (thread_db_find_new_threads): Likewise.
10628 * tracepoint.c (run_inferior_command): Likewise.
10630 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10632 * server.c (handle_search_memory_1): Include access length in
10635 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10637 * linux-crisv32-low.c: Fix compile errors.
10639 2012-09-04 Yao Qi <yao@codesourcery.com>
10641 * tracepoint.c (cmd_qtsv): Adjust debug message.
10642 Don't check CUR_TPOINT.
10644 2012-08-28 Yao Qi <yao@codesourcery.com>
10646 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10647 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10648 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10649 Remove declarations of xmalloc, xreallloc, xstrdup and
10651 * Makefile.in (libiberty_h): New.
10652 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10653 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10655 2012-08-23 Yao Qi <yao@codesourcery.com>
10657 * server.h: Remove declaration of 'xsnprintf'.
10659 2012-08-22 Keith Seitz <keiths@redhat.com>
10661 * server.h: Include build-gnulib-gbserver/config.h.
10662 * gdbreplay.c: Likewise.
10664 2012-08-08 Doug Evans <dje@google.com>
10666 * Makefile.in (SFILES): Add gdb_vecs.c.
10667 (OBS): Add gdb_vecs.o.
10668 (gdb_vecs_h, host_defs_h): New variables.
10669 (thread-db.o): Add $(gdb_vecs_h) dependency.
10670 (gdb_vecs.o): New rule.
10671 * thread-db.c: #include "gdb_vecs.h".
10672 (thread_db_load_search): Use a vector to iterate over path elements.
10673 Handle text appearing after "$pdir".
10675 * configure.ac: Add check for strstr.
10676 * config.in: Regenerate.
10677 * configure: Regenerate.
10679 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10681 * hostio.c (handle_pread): If pread fails, fall back to attempting
10683 (handle_pwrite): Likewise for pwrite.
10685 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10687 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10688 between unsupported TYPE and unimplementable ADDR/LEN combination.
10689 (arm_insert_point): Act on new return value.
10691 2012-07-31 Pedro Alves <palves@redhat.com>
10693 * server.c (process_point_options): Only skip tokens if we find
10694 one that is unrecognized. Don't treat 'X' specially while
10695 skipping unrecognized tokens.
10697 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10699 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10700 to 4-byte-align HW breakpoint addresses for Thumb.
10702 2012-07-27 Yao Qi <yao@codesourcery.com>
10706 * server.h: Declare gdb_agent_about_to_close.
10707 * target.c (kill_inferior): Include "agent.h".
10708 New. Send command 'kill'.
10709 * target.h (kill_inferior): Removed macro.
10710 * tracepoint.c (gdb_agent_about_to_close): New.
10711 (gdb_agent_helper_thread): Handle command 'close'.
10712 Wait endlessly until the inferior stops.
10713 Install gdb_agent_remove_socket to atexit hook.
10714 (agent_socket_name): New static variable.
10715 (gdb_agent_socket_init): Replace local variable 'name' with
10716 'agent_socket_name'.
10717 (gdb_agent_remove_socket): New.
10719 2012-07-27 Yao Qi <yao@codesourcery.com>
10721 * server.c (process_point_options): Stop at 'X' when parsing.
10723 2012-07-19 Michael Eager <eager@eagercon.com>
10725 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10727 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10728 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10729 hardware breakpoint.
10731 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10733 * gdbserver/linux-low.c (initialize_low): Call
10734 linux_ptrace_init_warnings.
10736 2012-07-02 Doug Evans <dje@google.com>
10738 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10741 2012-07-02 Stan Shebs <stan@codesourcery.com>
10743 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10744 (ax.o): Add it to build rule.
10746 (OBS): Add format.o.
10747 (IPA_OBS): Add format.o.
10748 * server.c (handle_query): Claim support for breakpoint commands.
10749 (process_point_options): Add command case.
10750 (process_serial_event): Leave running if there are printfs in
10752 * mem-break.h (any_persistent_commands): Declare.
10753 (add_breakpoint_commands): Declare.
10754 (gdb_no_commands_at_breakpoint): Declare.
10755 (run_breakpoint_commands): Declare.
10756 * mem-break.c (struct point_command_list): New struct.
10757 (struct breakpoint): New field command_list.
10758 (any_persistent_commands): New function.
10759 (add_commands_to_breakpoint): New function.
10760 (add_breakpoint_commands): New function.
10761 (gdb_no_commands_at_breakpoint): New function.
10762 (run_breakpoint_commands): New function.
10763 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10765 * ax.c: Include format.h.
10766 (ax_printf): New function.
10767 (gdb_eval_agent_expr): Add printf opcode.
10769 2012-06-13 Yao Qi <yao@codesourcery.com>
10771 * server.c (start_inferior): Remove duplicated writes to fields
10772 'last_resume_kind' and 'last_status' of 'current_inferior'.
10774 2012-06-12 Yao Qi <yao@codesourcery.com>
10775 Pedro Alves <palves@redhat.com>
10777 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10779 * server.c (handle_v_cont): Extend comment.
10781 2012-06-11 Yao Qi <yao@codesourcery.com>
10783 * linux-low.c (linux_attach): Add 'static'.
10785 2012-06-06 Yao Qi <yao@codesourcery.com>
10787 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10789 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10791 Fix gcc -flto compilation warning.
10792 * server.c (main): Make variable multi_mode and attach volatile.
10794 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10796 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10797 if the platform doesn't know about it.
10799 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10801 * Makefile.in (SFILES): Add linux-tile-low.c.
10802 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10803 * configure.srv: Handle tilegx-*-linux*.
10804 * linux-tile-low.c: New file.
10806 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10808 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10810 2012-05-24 Pedro Alves <palves@redhat.com>
10814 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10816 2012-05-24 Pedro Alves <palves@redhat.com>
10820 Replace target_signal with gdb_signal throughout.
10822 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10824 * linux-low.c (linux_store_registers): Avoid the copying sequence
10825 when no data has been retrieved by ptrace.
10827 2012-05-22 Will Deacon <will.deacon@arm.com>
10829 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10830 Include asm/ptrace.h.
10831 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10834 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10836 * linux-low.c (linux_store_registers): Don't re-retrieve data
10837 with ptrace that has already been obtained from /proc. Always
10838 copy any data retrieved with ptrace to the buffer supplied.
10840 2012-05-11 Yao Qi <yao@codesourcery.com>
10841 Pedro Alves <palves@redhat.com>
10843 * linux-low.c (enum stopping_threads_kind): New.
10844 (stopping_threads): Change type to `enum stopping_threads_kind'.
10845 (handle_extended_wait): If stopping and suspending threads, leave
10846 the new_lwp suspended too.
10847 (linux_wait_for_event): Adjust.
10848 (stop_all_lwps): Set `stopping_threads' to
10849 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10850 whether we're suspending threads or just stopping them. Assert no
10853 2012-04-29 Yao Qi <yao@codesourcery.com>
10855 * server.h: Move some code to ...
10856 * gdbthread.h: ... here. New.
10857 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10858 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10859 (nto-low.o, win32-low.o): Likewise.
10860 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10861 * regcache.c, remote-utils.c, server.c: Likewise.
10862 * target.c, tracepoint.c, win32-low.c: Likewise.
10864 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10866 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10867 (PTRACE_ARG4_TYPE): Likewise.
10868 (PTRACE_XFER_TYPE): Likewise.
10869 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10870 ptrace to PTRACE_ARG3_TYPE.
10871 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10872 (PTRACE_ARG4_TYPE): Likewise.
10873 (PTRACE_XFER_TYPE): Likewise.
10874 (linux_detach_one_lwp): Cast fourth argument of
10875 ptrace to long then PTRACE_ARG4_TYPE.
10876 (regsets_fetch_inferior_registers): Cast third argument of
10877 ptrace to long then PTRACE_ARG3_TYPE.
10878 (regsets_store_inferior_registers): Likewise.
10880 2012-04-20 Pedro Alves <palves@redhat.com>
10882 * configure: Regenerate.
10884 2012-04-19 Pedro Alves <palves@redhat.com>
10886 * Makefile.in (GNULIB_BUILDDIR): New.
10887 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10888 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10889 (all, install-only, uninstall, clean-info, all-lib, clean): No
10890 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10891 (maintainer-clean realclean distclean): Use subdir_do.
10893 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10894 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10895 * acinclude.m4: Include acx_configure_dir.m4.
10896 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10897 calls. Call AC_PROG_RANLIB. Configure gnulib using
10900 (GNULIB_STDINT_H): Adjust.
10901 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10902 * gdbreplay.c: Include build-gnulib/config.h.
10903 * server.h: Likewise.
10904 * aclocal.m4: Regenerate.
10905 * config.in: Regenerate.
10906 * configure: Regenerate.
10908 2012-04-19 Pedro Alves <palves@redhat.com>
10910 * Makefile.in (LIBGNU, INCGNU): Adjust.
10911 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10912 (all, install-only, uninstall, clean-info, all-lib, clean)
10913 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10914 * configure.ac: Adjust AC_OUTPUT output.
10915 * aclocal.m4: Regenerate.
10916 * configure: Regenerate.
10918 2012-04-19 Pedro Alves <palves@redhat.com>
10920 * Makefile.in (generated_files): New.
10921 (server_h): Remove the explicit dependency on config.h, and depend
10922 on $generated_files.
10924 2012-04-19 Pedro Alves <palves@redhat.com>
10926 * Makefile.in (INCGNU): Add -Ignulib.
10928 2012-04-19 Pedro Alves <palves@redhat.com>
10930 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10931 (INCGNU): ... this, and spell out -I here.
10932 (GNULIB_LIB): Rename to ...
10933 (LIBGNU): ... this.
10934 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10936 2012-04-19 Pedro Alves <palves@redhat.com>
10938 * config.in: Regenerate.
10940 2012-04-19 Pedro Alves <palves@redhat.com>
10942 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10943 * server.h (memmem): Remove declaration.
10944 * config.in: Regenerate.
10945 * configure: Regenerate.
10947 2012-04-19 Yao Qi <yao@codesourcery.com>
10949 * Makefile.in (SFILES): Add common/vec.c.
10953 2012-04-19 Yao Qi <yao@codesourcery.com>
10955 * remote-utils.c (prepare_resume_reply): Replace with macro
10956 target_core_of_thread.
10957 * server.c (handle_qxfer_threads_proper): Likewise.
10958 * target.h (traget_core_of_thread): New macro.
10960 2012-04-18 Pedro Alves <palves@redhat.com>
10962 * aclocal.m4: Regenerate.
10963 * configure: Regenerate.
10965 2012-04-16 Yao Qi <yao@codesourcery.com>
10967 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10968 duplicated on address.
10970 2012-04-16 Yao Qi <yao@codesourcery.com>
10972 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10973 (struct tracepoint_action_ops) <send>: New field.
10974 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10975 (agent_expr_send, x_tracepoint_action_send): New.
10976 (l_tracepoint_action_send): New.
10977 (cmd_qtdp): Download and install tracepoint
10978 according to `use_agent'.
10979 (run_inferior_command): Add one more parameter `len'.
10981 (tracepoint_send_agent): New.
10982 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10984 2012-04-16 Yao Qi <yao@codesourcery.com>
10986 * tracepoint.c (download_tracepoints): Moved to ...
10987 (cmd_qtstart): ... here.
10989 2012-04-14 Yao Qi <yao@codesourcery.com>
10991 * tracepoint.c: Include inttypes.h.
10992 (struct collect_memory_action): Use sized types.
10993 (struct tracepoint): Likewise.
10994 (cmd_qtdp, stop_tracing): Update print specifiers.
10995 (cmd_qtp, response_tracepoint): Likewise.
10996 (collect_data_at_tracepoint): Likewise.
10997 (collect_data_at_step): Likewise.
10999 2012-04-14 Yao Qi <yao@codesourcery.com>
11001 Import gnulib module inttypes.
11002 * aclocal.m4, config.in, configure: Regenerated.
11004 2012-04-14 Yao Qi <yao@codesourcery.com>
11006 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11007 Makefile and config.status at last.
11009 2012-04-13 Yao Qi <yao@codesourcery.com>
11011 * tracepoint.c: Include stdint.h unconditionally.
11013 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11015 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11016 on BFD_HAVE_SYS_PROCFS_TYPE.
11017 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11018 * configure: Regenerate.
11019 * config.in: Likewise.
11021 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11023 * Makefile.in (clean): Also remove x32.c x32-linux.c
11024 x32-avx.c x32-avx-linux.c.
11025 (x32.o): New target.
11027 (x32-linux.o): Likewise.
11028 (x32-linux.c): Likewise.
11029 (x32-avx.o): Likewise.
11030 (x32-avx.c): Likewise.
11031 (x32-avx-linux.o): Likewise.
11032 (x32-avx-linux.c): Likewise.
11034 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11035 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11036 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11037 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11038 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11039 i386/x32-avx-linux.xml.
11041 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11042 (init_registers_x32_avx_linux): Likwise.
11043 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11044 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11046 2012-04-13 Pedro Alves <palves@redhat.com>
11048 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11049 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11050 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11051 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11054 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11056 * linux-x86-low.c (compat_x32_clock_t): New.
11057 (compat_x32_siginfo_t): Likewise.
11058 (compat_x32_siginfo_from_siginfo): Likewise.
11059 (siginfo_from_compat_x32_siginfo): Likewise.
11060 (linux_is_elf64): Likewise.
11061 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11062 and siginfo_from_compat_x32_siginfo for x32.
11063 (x86_arch_setup): Set linux_is_elf64.
11065 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11068 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11070 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11071 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11072 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11073 compatible with process.
11075 2012-04-12 Yao Qi <yao@codesourcery.com>
11077 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11078 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11079 (install-only, install-info, clean): Handle sub dir gnulib.
11080 (all-lib, am--refresh): New targets.
11081 (memmem.o): Remove target.
11082 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11083 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11084 (AC_REPLACE_FUNCS): Remove memmem.
11085 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11086 (AC_OUTPUT): Generate Makefile in gnulib/.
11087 * aclocal.m4, config.in, configure: Regenerated.
11089 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11091 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11093 2012-04-05 Pedro Alves <palves@redhat.com>
11095 -Werror=strict-aliasing
11097 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11100 2012-04-04 Pedro Alves <palves@redhat.com>
11102 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11103 (sparc_store_gregset_from_stack, sparc_store_gregset)
11104 (sparc_breakpoint_at): Fix formatting.
11106 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11108 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11110 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11111 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11112 * config.in: Regenerate.
11113 * configure: Likewise.
11115 2012-03-29 Pedro Alves <palves@redhat.com>
11117 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11118 Correct ptrace arguments.
11120 2012-03-28 Pedro Alves <palves@redhat.com>
11122 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11123 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11124 (IA64_FR1_REGNUM): New defines.
11125 (ia64_fetch_register): New.
11126 (the_low_target): Install it.
11127 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11129 * linux-low.c (linux_fetch_registers): Try the
11130 the_low_target.fetch_register hook first.
11132 * linux-arm-low.c (the_low_target): Adjust.
11133 * linux-bfin-low.c (the_low_target): Adjust.
11134 * linux-cris-low.c (the_low_target): Adjust.
11135 * linux-crisv32-low.c (the_low_target): Adjust.
11136 * linux-m32r-low.c (the_low_target): Adjust.
11137 * linux-m68k-low.c (the_low_target): Adjust.
11138 * linux-mips-low.c (the_low_target): Adjust.
11139 * linux-ppc-low.c (the_low_target): Adjust.
11140 * linux-s390-low.c (the_low_target): Adjust.
11141 * linux-sh-low.c (the_low_target): Adjust.
11142 * linux-sparc-low.c (the_low_target): Adjust.
11143 * linux-tic6x-low.c (the_low_target): Adjust.
11144 * linux-x86-low.c (the_low_target): Adjust.
11145 * linux-xtensa-low.c (the_low_target): Adjust.
11147 2012-03-26 Pedro Alves <palves@redhat.com>
11149 * server.c (handle_qxfer_libraries): Don't bail early if
11150 the_target->qxfer_libraries_svr4 is not NULL.
11152 2012-03-26 Pedro Alves <palves@redhat.com>
11154 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11156 2012-03-23 Pedro Alves <palves@redhat.com>
11158 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11159 "library-list-svr4" element's start tag when the the DSO list is
11162 2012-03-23 Pedro Alves <palves@redhat.com>
11164 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11165 a variable whose type size is the same as the inferior's pointer
11168 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11170 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11172 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11173 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11174 * linux-low.h: Include <signal.h>.
11175 (struct siginfo): Remove forward declaration.
11176 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11179 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11181 * .gitignore: Ignore more files.
11183 2012-03-19 Pedro Alves <palves@redhat.com>
11184 Jan Kratochvil <jan.kratochvil@redhat.com>
11186 * server.c (cont_thread, general_thread): Add describing comments.
11187 (start_inferior): Clear `cont_thread'.
11188 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11191 2012-03-15 Yao Qi <yao@codesourcery.com>
11193 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11195 (cmd_qtdp): ... here.
11197 2012-03-15 Yao Qi <yao@codesourcery.com>
11199 * tracepoint.c (struct tracepoint_action_ops): New.
11200 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11201 (m_tracepoint_action_download): New.
11202 (r_tracepoint_action_download): New.
11203 (x_tracepoint_action_download): New.
11204 (l_tracepoint_action_download): New.
11205 (add_tracepoint_action): Install `action->ops' according type.
11206 (download_tracepoint_1): Move code `download' function pointer
11207 of various tracepoint_action_ops.
11209 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11211 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11212 linux_ptrace_attach_warnings.
11214 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11216 * Makefile.in (linux-ptrace.o): New.
11217 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11218 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11219 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11220 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11221 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11223 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11225 2012-03-08 Yao Qi <yao@codesourcery.com>
11226 Pedro Alves <palves@redhat.com>
11228 Fix PR server/13392.
11229 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11230 offset of JMP insn.
11231 * tracepoint.c (remove_tracepoint): New.
11232 (cmd_qtdp): Call remove_tracepoint when failed to install.
11234 2012-03-07 Pedro Alves <palves@redhat.com>
11236 * linux-low.c (get_detach_signal): New.
11237 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11238 Pass on pending signals to PTRACE_DETACH. Check the result of the
11240 * server.c (program_signals, program_signals_p): New.
11241 (handle_general_set): Handle QProgramSignals.
11242 * server.h (program_signals, program_signals_p): Declare.
11244 2012-03-05 Pedro Alves <palves@redhat.com>
11245 Jan Kratochvil <jan.kratochvil@redhat.com>
11247 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11250 2012-03-03 Yao Qi <yao@codesourcery.com>
11252 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11253 agent_look_up_symbols.
11255 2012-03-03 Yao Qi <yao@codesourcery.com>
11257 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11258 (linux-x86-low.o): Likewise.
11259 * server.h: Remove in_process_agent_loaded.
11260 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11264 2012-03-03 Yao Qi <yao@codesourcery.com>
11266 * tracepoint.c (gdb_agent_capability): New global.
11267 (in_process_agent_loaded_ust): Renamed to
11268 `in_process_agent_supports_ust'.
11270 (in_process_agent_supports_ust): Call agent_capability_check.
11271 (clear_installed_tracepoints): Assert that agent supports
11274 2012-03-03 Yao Qi <yao@codesourcery.com>
11276 * linux-low.c (linux_supports_agent): New.
11277 (linux_target_ops): Initialize field `supports_agent' with
11278 linux_supports_agent.
11279 * target.h (struct target_ops) <supports_agent>: New.
11280 (target_supports_agent): New macro.
11281 * server.c (handle_general_set): Handle packet 'QAgent'.
11282 (handle_query): Send `QAgent+'.
11283 * Makefile.in (server.o): Depends on agent.h.
11285 2012-03-03 Yao Qi <yao@codesourcery.com>
11287 * Makefile.in (OBS): Add agent.o.
11288 Add new rule for agent.o.
11289 Track dependence of tracepoint.c on agent.h.
11290 * tracepoint.c (run_inferior_command_1):
11291 (run_inferior_command): Call agent_run_command.
11292 (gdb_ust_connect_sync_socket): Deleted. Move it to
11294 (resume_thread, stop_thread): Likewise.
11295 (gdb_ust_socket_init): Renamed to ...
11296 (gdb_agent_socket_init): ... New.
11297 (gdb_ust_thread): Renamed to ...
11298 (gdb_agent_helper_thread): ... New.
11299 (gdb_ust_init): Move some code to ...
11300 (gdb_agent_init): ... here. New.
11301 [HAVE_UST]: Call gdb_ust_init.
11302 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11303 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11304 * config.in, configure: Regenerated.
11306 2012-03-02 Pedro Alves <palves@redhat.com>
11308 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11309 * linux-low.c (struct simple_pid_list): New.
11310 (stopped_pids): New a struct simple_pid_list pointer.
11311 (add_to_pid_list, pull_pid_from_list): New.
11312 (handle_extended_wait): Don't assume the first signal new children
11313 report is SIGSTOP. Adjust call to pull_pid_from_list.
11314 (linux_wait_for_lwp): Adjust.
11316 2012-03-02 Yao Qi <yao@codesourcery.com>
11318 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11321 2012-03-02 Yao Qi <yao@codesourcery.com>
11323 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11324 `stop_pc' and `tpoint'. Update caller.
11326 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11328 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11329 * linux-low.c (use_linux_regsets): New macro.
11330 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11331 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11332 (linux_register_in_regsets): New function.
11333 (usr_fetch_inferior_registers): Skip registers covered by
11335 (usr_store_inferior_registers): Likewise.
11336 (usr_fetch_inferior_registers): New macro.
11337 (usr_store_inferior_registers): Likewise.
11338 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11339 (linux_store_registers): Likewise.
11340 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11342 (init_registers_mips64_dsp_linux): Likewise.
11343 (init_registers_mips_linux): New macro.
11344 (init_registers_mips_dsp_linux): Likewise.
11345 (mips_dsp_num_regs): Likewise.
11346 (DSP_BASE, DSP_CONTROL): New fallback macros.
11347 (mips_base_regs): New macro.
11348 (mips_regmap): Use it. Fix the size.
11349 (mips_dsp_regmap): New variable.
11350 (mips_dsp_regset_bitmap): Likewise.
11351 (mips_arch_setup): New function.
11352 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11354 (mips_cannot_store_register): Likewise.
11355 (the_low_target): Update .arch_setup, .num_regs and .regmap
11356 initializers. Add .regset_bitmap initializer.
11357 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11359 * linux-bfin-low.c (the_low_target): Likewise.
11360 * linux-cris-low.c (the_low_target): Likewise.
11361 * linux-crisv32-low.c (the_low_target): Likewise.
11362 * linux-ia64-low.c (the_low_target): Likewise.
11363 * linux-m32r-low.c (the_low_target): Likewise.
11364 * linux-m68k-low.c (the_low_target): Likewise.
11365 * linux-ppc-low.c (the_low_target): Likewise.
11366 * linux-s390-low.c (the_low_target): Likewise.
11367 * linux-sh-low.c (the_low_target): Likewise.
11368 * linux-sparc-low.c (the_low_target): Likewise.
11369 * linux-tic6x-low.c (the_low_target): Likewise.
11370 * linux-x86-low.c (the_low_target): Likewise.
11371 * linux-xtensa-low.c (the_low_target): Likewise.
11372 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11373 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11374 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11376 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11377 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11379 2012-02-29 Yao Qi <yao@codesourcery.com>
11380 Pedro Alves <palves@redhat.com>
11382 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11383 `step_over_finished' is true.
11385 2012-02-27 Pedro Alves <palves@redhat.com>
11387 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11388 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11390 2012-02-27 Pedro Alves <palves@redhat.com>
11393 * linux-low.c (pid_is_stopped): New.
11394 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11396 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11398 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11401 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11403 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11405 2012-02-24 Luis Machado <lgustavo@codesourcery>
11407 * server.c (handle_query): Advertise support for target-side
11408 breakpoint condition evaluation.
11409 (process_point_options): New function.
11410 (process_serial_event): When inserting a breakpoint, check for
11411 a target-side condition that should be evaluated.
11413 * mem-break.c: Include regcache.h and ax.h.
11414 (point_cond_list_t): New data structure.
11415 (breakpoint) <cond_list>: New field.
11416 (find_gdb_breakpoint_at): Make non-static.
11417 (delete_gdb_breakpoint_at): Clear any target-side
11419 (clear_gdb_breakpoint_conditions): New function.
11420 (add_condition_to_breakpoint): Likewise.
11421 (add_breakpoint_condition): Likewise.
11422 (gdb_condition_true_at_breakpoint): Likewise.
11423 (gdb_breakpoint_here): Return result directly instead
11424 of going through a local variable.
11426 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11427 (clear_gdb_breakpoint_conditions): Likewise.
11428 (add_breakpoint_condition): Likewise.
11429 (gdb_condition_true_at_breakpoint): Likewise.
11431 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11432 (need_step_over_p): Take target-side breakpoint condition into
11435 2012-02-24 Luis Machado <lgustavo@codesourcery>
11437 * server.h: Include tracepoint.h.
11438 (agent_mem_read, agent_get_trace_state_variable_value,
11439 agent_set_trace_state_variable_value,
11440 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11441 get_set_tsv_func_addr): New prototypes.
11443 * ax.h: New include file.
11444 * ax.c: New source file.
11446 * tracepoint.c: Include ax.h.
11447 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11448 agent_expr, eval_result_type): Move to ax.h.
11449 (parse_agent_expr): Rename to ...
11450 (gdb_parse_agent_expr): ... this, make it non-static and move
11452 (unparse_agent_expr) Rename to ...
11453 (gdb_unparse_agent_expr): ... this, make it non-static and move
11455 (eval_agent_expr): Rename to ...
11456 (eval_tracepoint_agent_expr): ... this.
11457 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11458 forward declarations.
11459 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11460 (agent_get_trace_state_variable_value): New function.
11461 (agent_set_trace_state_variable_value): New function.
11462 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11463 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11464 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11465 (condition_true_at_tracepoint): Likewise.
11466 (parse_agent_expr): Rename to ...
11467 (gdb_parse_agent_expr): ... this and move to ax.c.
11468 (unparse_agent_expr): Rename to ...
11469 (gdb_unparse_agent_expr): ... this and move to ax.c.
11470 (gdb_agent_op_name): Move to ax.c.
11471 (eval_agent_expr): Rename to ...
11472 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11474 (eval_tracepoint_agent_expr): New function.
11475 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11477 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11479 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11480 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11481 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11482 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11483 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11484 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11485 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11486 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11487 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11488 (compile_bytecodes): Remove forward declaration.
11489 (is_goto_target): Move to ax.c.
11490 (compile_bytecodes): Move to ax.c and call
11491 agent_get_trace_state_variable_value (...) and
11492 agent_set_trace_state_variable_value (...).
11494 * Makefile.in: Update ax.c and IPA dependencies.
11496 2012-02-24 Pedro Alves <palves@redhat.com>
11498 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11499 (cmd_bigqtbuffer_circular): ... this. Only handle
11500 'QTBuffer:circular:'.
11501 (handle_tracepoint_general_set): Adjust.
11503 2012-02-16 Yao Qi <yao@codesourcery.com>
11505 * inferiors.c: Move code to ...
11506 * dll.c: .... here. New.
11507 * server.h: Declare clear_dlls.
11508 * Makefile.in (SFILES): Add dll.c.
11512 2012-02-11 Yao Qi <yao@codesourcery.com>
11514 * server.c: (handle_monitor_command): Add a new parameter
11516 (handle_query): Update caller.
11518 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11520 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11521 * configure, config.in: Regenerate.
11522 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11525 2012-02-02 Pedro Alves <palves@redhat.com>
11527 Try SIGKILL first, then PTRACE_KILL.
11528 * linux-low.c (linux_kill_one_lwp): New.
11529 (linux_kill_one_lwp): Rename to ...
11530 (kill_one_lwp_callback): ... this. Use the new
11531 linux_kill_one_lwp.
11533 2012-02-02 Pedro Alves <palves@redhat.com>
11535 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11538 2012-01-27 Pedro Alves <palves@redhat.com>
11540 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11541 (elf_64_file_p): Make static.
11542 (linux_pid_exe_is_elf_64_file): New.
11543 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11544 Delete declarations.
11545 (linux_pid_exe_is_elf_64_file): Declare.
11546 * linux-x86-low.c (x86_arch_setup): Use
11547 linux_pid_exe_is_elf_64_file.
11549 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11551 * linux-low.c (linux_wait_for_event_1): Rename to ...
11552 (linux_wait_for_event): ... here and merge it with former
11553 linux_wait_for_event - new variable wait_ptid, use it.
11554 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11556 2012-01-23 Pedro Alves <palves@redhat.com>
11558 * server.c (main): Avoid yet another case of infinite loop while
11559 detaching/killing after a longjmp.
11561 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11564 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11566 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11568 * hostio.c (handle_readlink): New function.
11569 (handle_vFile): Call it to handle "vFile:readlink" packets.
11571 2012-01-20 Pedro Alves <palves@redhat.com>
11572 Ulrich Weigand <ulrich.weigand@linaro.org>
11574 * server.c (handle_v_requests): Only support vAttach and vRun to
11575 start multiple processes when in extended protocol mode.
11577 2012-01-17 Pedro Alves <palves@redhat.com>
11579 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11580 memalign plus mprotect to allocate the scratch buffer.
11582 2012-01-13 Pedro Alves <palves@redhat.com>
11584 * server.c (attach_inferior): Clear `cont_thread'.
11586 2012-01-13 Pedro Alves <palves@redhat.com>
11588 * server.c (main): Avoid infinite loop while detaching/killing
11591 2012-01-09 Doug Evans <dje@google.com>
11593 * server.c (start_inferior): Set last_ptid in --wrapper case.
11595 2012-01-06 Yao Qi <yao@codesourcery.com>
11597 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11599 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11601 2012-01-04 Yao Qi <yao@codesourcery.com>
11603 * tracepoint.c (cmd_qtdp): Print debug message
11604 for static tracepoint.
11606 2012-01-04 Yao Qi <yao@codesourcery.com>
11608 * tracepoint.c (trace_vdebug): Differentiate debug message
11609 between gdbserver and IPA.
11611 2012-01-03 Yao Qi <yao@codesourcery.com>
11613 * tracepoint.c (tracepoint_was_hit): Don't collect for
11616 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11618 * terminal.h: Reformat copyright header.
11620 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11622 * server.c (gdbserver_version): Update copyright year.
11623 * gdbreplay.c (gdbreplay_version): Likewise.
11625 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11627 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11630 2011-12-18 Hui Zhu <teawater@gmail.com>
11631 * linux-low.c (linux_create_inferior): Save return value to ret.
11633 2011-12-18 Hui Zhu <teawater@gmail.com>
11635 * linux-low.c (linux_create_inferior): Save return value to ret.
11637 2011-12-16 Doug Evans <dje@google.com>
11639 * linux-low.c (linux_create_inferior): If stdio connection,
11640 redirect stdin from /dev/null, stdout to stderr.
11641 * remote-utils.c (remote_is_stdio): New static global.
11642 (remote_connection_is_stdio): New function.
11643 (remote_prepare): Handle stdio connection.
11644 (remote_open): Ditto.
11645 (remote_close): Don't close stdin for stdio connections.
11646 (read_prim,write_prim): New functions. Replace all calls to
11647 read/write to these.
11648 * server.c (main): Watch for "-" argument. Move call to
11649 remote_prepare before start_inferior.
11650 * server.h (STDIO_CONNECTION_NAME): New macro.
11651 (remote_connection_is_stdio): Declare.
11653 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11654 in debugging output.
11656 2011-12-15 Yao Qi <yao@codesourcery.com>
11658 * tracepoint.c: Include sys/syscall.h.
11659 (gdb_ust_thread): Remove preprocessor conditional.
11661 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11663 * linux-low.c (linux_detach_one_lwp): Call
11664 the_low_target.prepare_to_resume before detaching.
11666 2011-12-14 Yao Qi <yao@codesourcery.com>
11668 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11671 2011-12-14 Yao Qi <yao@codesourcery.com>
11673 * i386-low.c (i386_low_stopped_data_address): Initialize local
11674 variable `control'.
11676 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11680 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11681 DR_CONTROL unless necessary. Extend comments.
11682 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11683 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11685 2011-12-13 Yao Qi <yao@codesourcery.com>
11687 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11689 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11691 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11693 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11694 Print new debug message for such case.
11696 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11698 Fix overlapping memcpy.
11699 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11700 the read_inferior_memory transfer.
11701 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11702 write_inferior_memory transfer.
11703 (set_fast_tracepoint_jump): New variable buf. Use it for the
11704 read_inferior_memory and write_inferior_memory transfers.
11705 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11706 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11707 Use it for the write_inferior_memory transfer.
11708 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11711 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11713 * linux-low.c (fetch_register, store_register): Make code
11714 consistent, fix formatting.
11716 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11718 * linux-low.c (usr_store_inferior_registers): Factor out code
11719 to handle individual registers into...
11720 (store_register): ... this new function.
11722 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11724 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11725 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11726 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11727 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11728 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11729 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11730 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11731 (srv_xmlfiles): Add new XML files.
11733 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11735 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11736 (init_registers_s390_linux32v1): Add prototype.
11737 (init_registers_s390_linux32v2): Likewise.
11738 (init_registers_s390_linux64v1): Likewise.
11739 (init_registers_s390_linux64v2): Likewise.
11740 (init_registers_s390x_linux64v1): Likewise.
11741 (init_registers_s390x_linux64v2): Likewise.
11742 (s390_num_regs): Increment to 52.
11743 (s390_regmap): Add orig_r2 register.
11744 (s390_num_regs_3264): Increment to 68.
11745 (s390_regmap_3264): Add orig_r2 register.
11746 (s390_collect_ptrace_register): Handle orig_r2 register.
11747 (s390_supply_ptrace_register): Likewise.
11748 (s390_fill_last_break): New function.
11749 (s390_store_last_break): Likewise.
11750 (s390_fill_system_call): New function.
11751 (s390_store_system_call): Likewise.
11752 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11754 (s390_check_regset): New function.
11755 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11756 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11757 Update target_regsets for available register sets.
11759 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11760 Jan Kratochvil <jan.kratochvil@redhat.com>
11762 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11763 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11765 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11766 * linux-low.h (struct process_info_private): New member r_debug.
11767 * server.c (handle_qxfer_libraries): Call
11768 the_target->qxfer_libraries_svr4.
11769 (handle_qxfer_libraries_svr4): New function.
11770 (qxfer_packets): New entry "libraries-svr4".
11771 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11772 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11773 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11774 PACKET_qXfer_libraries_svr4.
11776 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11778 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11779 PSW address/mask between 8-byte and 16-byte formats.
11780 (s390_supply_ptrace_register): Likewise.
11781 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11782 basic addressing mode bit.
11784 2011-11-24 Stan Shebs <stan@codesourcery.com>
11786 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11788 2011-11-17 Stan Shebs <stan@codesourcery.com>
11790 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11791 (tracing_start_time): New global.
11792 (tracing_stop_time): New global.
11793 (tracing_user_name): New global.
11794 (tracing_notes): New global.
11795 (tracing_stop_note): New global.
11796 (cmd_qtstart): Set traceframe_usage, start_time.
11797 (stop_tracing): Set stop_time.
11798 (cmd_qtstatus): Report additional status.
11799 (cmd_qtp): New function.
11800 (handle_tracepoint_query): Call it.
11801 (cmd_qtnotes): New function.
11802 (handle_tracepoint_general_set): Call it.
11803 (get_timestamp): Rename from tsv_get_timestamp.
11805 2011-11-14 Stan Shebs <stan@codesourcery.com>
11806 Kwok Cheung Yeung <kcy@codesourcery.com>
11808 * linux-x86-low.c (small_jump_insn): New.
11809 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11810 trampoline and error message, build a trampoline and issue a small
11811 jump instruction to it.
11812 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11813 trampoline and error message.
11814 (x86_get_min_fast_tracepoint_insn_len): New.
11815 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11816 * linux-low.h (struct linux_target_ops): Add arguments to
11817 install_fast_tracepoint_jump_pad operation, add new operation.
11818 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11820 (linux_get_min_fast_tracepoint_insn_len): New function.
11821 (linux_target_op): Add new operation.
11822 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11823 (gdb_trampoline_buffer_end): Ditto.
11824 (gdb_trampoline_buffer_error): Ditto.
11825 (struct ipa_sym_addresses): Add fields for new IPA variables.
11826 (symbol_list): Add entries for new IPA variables.
11827 (struct tracepoint): Add fields to hold the address range of the
11828 trampoline used by the tracepoint.
11829 (trampoline_buffer_head): New static variable.
11830 (trampoline_buffer_tail): Ditto.
11831 (claim_trampoline_space): New function.
11832 (have_fast_tracepoint_trampoline_buffer): New function.
11833 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11835 (install_fast_tracepoint): Ditto, also add error buffer argument.
11836 (cmd_qtminftpilen): New function.
11837 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11838 (fast_tracepoint_from_trampoline_address): New function.
11839 (fast_tracepoint_collecting): Handle trampoline as part of jump
11841 (set_trampoline_buffer_space): New function.
11842 (initialize_tracepoint): Initialize new IPA variables.
11843 * target.h (struct target_ops): Add arguments to
11844 install_fast_tracepoint_jump_pad operation, add new
11845 get_min_fast_tracepoint_insn_len operation.
11846 (target_get_min_fast_tracepoint_insn_len): New.
11847 (install_fast_tracepoint_jump_pad): Add arguments.
11848 * server.h (IPA_BUFSIZ): Define.
11849 * linux-i386-ipa.c: Include extra header files.
11850 (initialize_fast_tracepoint_trampoline_buffer): New function.
11851 (initialize_low_tracepoint): Call it.
11852 * server.h (set_trampoline_buffer_space): Declare.
11853 (claim_trampoline_space): Ditto.
11854 (have_fast_tracepoint_trampoline_buffer): Ditto.
11856 2011-11-14 Yao Qi <yao@codesourcery.com>
11858 * server.c (handle_query): Handle InstallInTrace for qSupported.
11859 * tracepoint.c (add_tracepoint): Sort list.
11860 (install_tracepoint, download_tracepoint): New.
11861 (cmd_qtdp): Call them to install and download tracepoints.
11862 (sort_tracepoints): Removed.
11863 (cmd_qtstart): Update.
11865 2011-11-14 Yao Qi <yao@codesourcery.com>
11867 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11868 * mem-break.h: Declare.
11869 * tracepoint.c (cmd_qtstart): Move some code to ...
11870 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11872 (download_tracepoints): Move some code to ...
11873 (download_tracepoint_1): ... here. New.
11875 2011-11-08 Yao Qi <yao@codesourcery.com>
11877 * remote-utils.c (relocate_instruction): A comment fix.
11879 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11881 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11882 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11883 dr_status_mirror and dr_control_mirror from debug_reg_state.
11884 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11885 (i386_initial_stuff): Remove use of deleted globals.
11886 (i386_get_thread_context, i386_set_thread_context,
11887 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11888 from debug_reg_state.
11890 2011-11-05 Yao Qi <yao@codesourcery.com>
11892 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11893 address as TPOINT's.
11895 2011-11-02 Stan Shebs <stan@codesourcery.com>
11897 * tracepoint.c (agent_mem_read_string): New function.
11898 (eval_agent_expr): Call it for tracenz.
11899 * server.c (handle_query): Report support for tracenz.
11901 2011-11-02 Yao Qi <yao@codesourcery.com>
11903 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11905 2011-11-02 Yao Qi <yao@codesourcery.com>
11907 * target.h: Fix a typo in comment.
11909 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11911 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11912 clobber the breakpoints' shadows with fast tracepoint jumps.
11913 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11914 * target.c (write_inferior_memory): Also pass MYADDR down to
11917 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11919 * configure.ac: Check support for personality routine.
11920 * configure: Regenerate.
11921 * config.in: Likewise.
11922 * linux-low.c: Include <sys/personality.h>.
11923 Define ADDR_NO_RANDOMIZE if necessary.
11924 (linux_create_inferior): Disable address space randomization when
11925 forking inferior, if requested.
11926 (linux_supports_disable_randomization): New function.
11927 (linux_target_ops): Install it.
11928 * server.h (disable_randomization): Declare.
11929 * server.c (disable_randomization): New global variable.
11930 (handle_general_set): Handle QDisableRandomization.
11931 (handle_query): Likewise for qSupported.
11932 (main): Support --disable-randomization and --no-disable-randomization
11933 command line arguments.
11934 * target.h (struct target_ops): Add supports_disable_randomization.
11935 (target_supports_disable_randomization): New macro.
11937 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11939 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11941 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11942 [!PT_GETDSBT] (target_loadmap): New definition.
11943 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11944 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11945 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11946 and PT_GETDSBT to LINUX_LOADMAP.
11947 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11948 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11950 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11952 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11953 (arm_linux_hwbp_cap): New static variable.
11954 (arm_linux_get_hwbp_cap): Replace by ...
11955 (arm_linux_init_hwbp_cap): ... this new function.
11956 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11957 (arm_linux_get_hw_watchpoint_count): Likewise.
11958 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11959 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11960 (arm_prepare_to_resume): Use perror_with_name instead of error.
11962 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11964 * linux-arm-low.c: Include <signal.h>.
11965 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11966 (struct arm_linux_hwbp_cap): New data type.
11967 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11968 (struct arm_linux_hw_breakpoint): New data type.
11969 (MAX_BPTS, MAX_WPTS): Define.
11970 (struct arch_process_info, struct arch_lwp_info): New data types.
11971 (arm_linux_get_hwbp_cap): New function.
11972 (arm_linux_get_hw_breakpoint_count): Likewise.
11973 (arm_linux_get_hw_watchpoint_count): Likewise.
11974 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11975 (arm_hwbp_control_initialize): Likewise.
11976 (arm_hwbp_control_is_enabled): Likewise.
11977 (arm_hwbp_control_is_initialized): Likewise.
11978 (arm_hwbp_control_disable): Likewise.
11979 (arm_linux_hw_breakpoint_equal): Likewise.
11980 (arm_linux_hw_point_initialize): Likewise.
11981 (struct update_registers_data): New data structure.
11982 (update_registers_callback: New function.
11983 (arm_insert_point): Likewise.
11984 (arm_remove_point): Likewise.
11985 (arm_stopped_by_watchpoint): Likewise.
11986 (arm_stopped_data_address): Likewise.
11987 (arm_new_process): Likewise.
11988 (arm_new_thread): Likewise.
11989 (arm_prepare_to_resume): Likewise.
11990 (the_low_target): Register arm_insert_point, arm_remove_point,
11991 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11992 arm_new_thread, and arm_prepare_to_resume.
11994 2011-09-15 Stan Shebs <stan@codesourcery.com>
11996 * server.h (struct emit_ops): Add compare-goto fields.
11997 * tracepoint.c (gdb_agent_op_sizes): New table.
11998 (emit_eq_goto): New function.
11999 (emit_ne_goto): New function.
12000 (emit_lt_goto): New function.
12001 (emit_le_goto): New function.
12002 (emit_gt_goto): New function.
12003 (emit_ge_goto): New function.
12004 (is_goto_target): New function.
12005 (compile_bytecodes): Recognize special cases of compare-goto
12006 combinations and call specialized emitters for them.
12007 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12008 (amd64_emit_ne_goto): New function.
12009 (amd64_emit_lt_goto): New function.
12010 (amd64_emit_le_goto): New function.
12011 (amd64_emit_gt_goto): New function.
12012 (amd64_emit_ge_goto): New function.
12013 (amd64_emit_ops): Add the new functions.
12014 (i386_emit_eq_goto): New function.
12015 (i386_emit_ne_goto): New function.
12016 (i386_emit_lt_goto): New function.
12017 (i386_emit_le_goto): New function.
12018 (i386_emit_gt_goto): New function.
12019 (i386_emit_ge_goto): New function.
12020 (i386_emit_ops): Add the new functions.
12022 2011-09-08 Stan Shebs <stan@codesourcery.com>
12024 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12025 (i386_emit_epilogue): Restore %ebx.
12027 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12029 * server.c (step_thread): Remove definition.
12030 (process_serial_event): Don't handle Hs.
12031 * server.h (step_thread): Remove declaration.
12032 * target.c (set_desired_inferior): Remove use of step_thread.
12034 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12036 * linux-low.c: Include linux-procfs.h.
12037 (linux_attach_lwp_1): Update comments.
12038 (linux_attach): Scan for existing threads when attaching to a
12039 process that is the tgid.
12040 * Makefile.in: Update dependencies.
12042 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12044 * configure.srv: Add linux-procfs.o dependencies.
12046 2011-08-14 Yao Qi <yao@codesourcery.com>
12048 * target.h (struct target_ops): Fix indent.
12049 * win32-low.c (win32_target_ops): Fix comment.
12051 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12052 Yao Qi <yao@codesourcery.com>
12054 * Makefile.in (clean): Remove tic6x-*.c files.
12055 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12056 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12057 (tic6x-c64xp-linux.c): Likewise.
12058 * configure.srv: Add support for tic6x-*-uclinux.
12059 * linux-tic6x-low.c: New.
12060 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12062 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12063 Yao Qi <yao@codesourcery.com>
12065 * target.h (struct target_ops): Add read_loadmap.
12066 * linux-low.c (struct target_loadseg): New type.
12067 (struct target_loadmap): New type.
12068 (linux_read_loadmap): New function.
12069 (linux_target_ops): Add linux_read_loadmap.
12070 * server.c (handle_query): Support qXfer:fdpic:read packet.
12071 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12074 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12076 * win32-low.c: Include <stdint.h>.
12078 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12080 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12081 to the inferior here.
12082 (i386_remove_aligned_watchpoint): Ditto.
12083 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12084 fit part of the watchpoint in the debug registers.
12085 (i386_update_inferior_debug_regs): New.
12086 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12087 registers, and only update the inferior on success.
12088 (i386_low_remove_watchpoint): Ditto.
12090 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12092 * linux-low.c (compare_ints, unique, list_threads, show_process,
12093 linux_core_of_thread): Delete.
12094 (linux_target_ops): Change linux_core_of_thread to
12095 linux_common_core_of_thread.
12096 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12097 * utils.c (malloc_failure): Change type of argument.
12098 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12099 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12100 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12101 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12102 (IPA_OBJS): Add common-utils-ipa.o.
12103 (ptid_h, linux_osdata_h): New macros.
12104 (server_h): Add common/common-utils.h, common/xml-utils.h,
12105 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12107 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12108 ptid.o, buffer.o): New rules.
12109 (linux-low.o): Add common/linux-osdata.h as a dependency.
12110 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12111 * configure.ac: Add AC_HEADER_DIRENT check.
12112 * config.in: Regenerate.
12113 * configure: Regenerate.
12114 * remote-utils.c (xml_escape_text): Delete.
12115 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12116 buffer_xml_printf): Move to common/buffer.c.
12117 * server.c (main): Remove call to initialize_inferiors.
12118 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12119 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12120 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12121 internal_error, gdb_assert, gdb_assert_fail): Delete.
12122 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12123 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12125 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12126 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12127 initialize_inferiors): Delete.
12129 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12131 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12134 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12136 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12138 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12140 2011-05-26 Yao Qi <yao@codesourcery.com>
12142 * Makefile.in (thread-db.o): Track dependence to
12143 common/gdb_thread_db.h.
12144 * thread-db.c: include gdb_thread_db.h from right place.
12146 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12148 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12149 __FILE__ and __LINE__ to internal_error.
12151 2011-05-13 Doug Evans <dje@google.com>
12153 * thread-db.c (try_thread_db_load_from_sdir): New function.
12154 (try_thread_db_load_from_dir): New function.
12155 (thread_db_load_search): Handle $sdir, ignore $pdir.
12156 Remove trying of system directories if search of
12157 libthread-db-search-path fails, that is now done via $sdir.
12159 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12161 * server.c (handle_query): Add EnableDisableTracepoints to the list
12162 of supported features.
12163 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12165 (cmd_qtenable_disable): New.
12166 (cmd_qtstart): Install tracepoints even if disabled.
12167 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12168 receiving a QTEnable or QTDisable packet.
12169 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12170 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12172 (gdb_probe): Skip data collection if static tracepoint is disabled.
12174 2011-05-10 Doug Evans <dje@google.com>
12176 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12178 2011-05-04 Doug Evans <dje@google.com>
12180 * linux-low.c (linux_join): Skip process lookup.
12181 * spu-low.c (spu_join): Ditto.
12182 * server.c (join_inferiors_callback): Delete.
12183 (process_serial_event): For 'D' packet (detach) call join_inferior
12186 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12188 * README: Don't mention xscale*-*-linux*.
12189 * configure.srv (xscale*-*-linux*): Don't handle target.
12191 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12193 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12195 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12196 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12197 (i386_emit_void_call_2): Likewise.
12199 2011-04-26 Yao Qi <yao@codesourcery.com>
12201 * linux-low.c: Move common macros to linux-ptrace.h.
12202 Include linux-ptrace.h.
12203 * Makefile.in (linux_ptrace_h): New.
12204 (linux-low.o): Depends on linux-ptrace.h.
12206 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12208 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12209 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12210 (remote_prepare): New function with most of the TCP code from ...
12211 (remote_open): ... here. Detect PORT here unconditionally. Move also
12212 setting transport_is_reliable.
12213 * server.c (run_once): New variable.
12214 (gdbserver_usage): Document it.
12215 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12216 the first run if RUN_ONCE.
12217 * server.h (run_once, remote_prepare): New declarations.
12219 2011-04-19 Tom Tromey <tromey@redhat.com>
12221 * win32-low.c (handle_load_dll): Remove duplicate "the".
12223 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12225 Remove support for old Cygwin 1.5 versions.
12226 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12227 function to avoid warning.
12228 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12231 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12233 * gdbserver/server.h (Macro _): Define it if not available.
12235 2011-03-14 Michael Snyder <msnyder@vmware.com>
12237 * hostio.c (handle_close): Remove unnecessary null test.
12239 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12241 * Makefile.in (maintainer-clean realclean distclean): Remove
12242 "make ... subdir_do" command.
12244 2011-03-10 Michael Snyder <msnyder@vmware.com>
12246 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12248 * server.c (handle_v_run): Free alloced buffer on early return.
12250 2011-03-09 Yao Qi <yao@codesourcery.com>
12253 2011-03-04 Yao Qi <yao@codesourcery.com>
12255 * Makefile.in: Remove GNU make feature --directory.
12257 2011-03-05 Yao Qi <yao@codesourcery.com>
12259 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12260 (subdir_do): New make target. Copied from gdb/Makefile.
12261 (maintainer-clean, realclean, distclean, clean): Call corresponding
12262 make targets in common/Makefile.
12264 2011-02-11 Yao Qi <yao@codesourcery.com>
12266 * configure.ac: Call AC_PROG_RANLIB.
12267 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12268 * configure: Regenerate.
12270 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12272 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12274 2011-03-06 Yao Qi <yao@codesourcery.com>
12276 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12278 2011-03-05 Yao Qi <yao@codesourcery.com>
12280 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12281 (subdir_do): New make target. Copied from gdb/Makefile.
12282 (maintainer-clean, realclean, distclean, clean): Call corresponding
12283 make targets in common/Makefile.
12285 2011-03-04 Yao Qi <yao@codesourcery.com>
12287 * Makefile.in: Remove GNU make feature --directory.
12289 2011-03-04 Michael Snyder <msnyder@vmware.com>
12291 * server.c (queue_stop_reply): Call xmalloc not malloc.
12293 2011-03-02 Michael Snyder <msnyder@vmware.com>
12295 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12297 2011-02-28 Michael Snyder <msnyder@vmware.com>
12299 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12300 (cmd_qtframe): Ditto.
12301 (cmd_qtbuffer): Ditto.
12302 (cmd_bigqtbuffer): Ditto.
12304 * utils.c (decimal2str): Initialize 'width' to nine, then
12305 don't mess with it.
12307 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12309 * hostio.c (require_data): Free *data, not data.
12311 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12313 * hostio.c (require_data): Use free, not xfree.
12315 2011-02-27 Michael Snyder <msnyder@vmware.com>
12317 * server.c (handle_query): Discard unused value.
12319 * hostio.c (require_data): Free malloc memory before returning
12322 2011-02-26 Michael Snyder <msnyder@vmware.com>
12324 * linux-low.c (list_threads): Call closedir for dirent.
12326 2011-02-27 Michael Snyder <msnyder@vmware.com>
12328 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12329 a case statement falls through.
12331 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12333 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12336 2011-02-26 Michael Snyder <msnyder@vmware.com>
12338 * utils.c (decimal2str): Eliminate dead code and dead param.
12339 (pulongest): Drop dead param from call to decimal2str.
12342 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12344 Revert the following patch (not approved yet):
12345 2011-02-21 Hui Zhu <teawater@gmail.com>
12346 * tracepoint.c (tp_printf): New function.
12347 (eval_agent_expr): Handle gdb_agent_op_printf.
12349 2011-02-21 Hui Zhu <teawater@gmail.com>
12351 * tracepoint.c (tp_printf): New function.
12352 (eval_agent_expr): Handle gdb_agent_op_printf.
12354 2011-02-18 Tom Tromey <tromey@redhat.com>
12356 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12357 (tracepoint.o): Likewise.
12358 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12359 (gdb_agent_op_names): Likewise.
12361 2011-02-18 Tom Tromey <tromey@redhat.com>
12363 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12364 gdb_agent_op_rot>: New constants.
12365 (gdb_agent_op_names): Add pick and roll.
12366 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12369 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12371 * aclocal.m4: Regenerated with aclocal-1.11.1.
12373 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12375 * server.c (handle_qxfer_traceframe_info): New.
12376 (qxfer_packets): Register "traceframe-info".
12377 (handle_query): Report support for qXfer:traceframe-info:read+.
12378 * tracepoint.c (match_blocktype): New.
12379 (traceframe_find_block_type): Rename to ...
12380 (traceframe_walk_blocks): ... this. Add callback filter argument,
12382 (traceframe_find_block_type): New, reimplemented on top of
12383 traceframe_walk_blocks.
12384 (build_traceframe_info_xml): New.
12385 (traceframe_read_info): New.
12386 * server.h (traceframe_read_info): Declare.
12388 2011-02-11 Yao Qi <yao@codesourcery.com>
12390 * configure.ac: Call AC_PROG_RANLIB.
12391 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12392 * configure: Regenerate.
12394 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12396 * server.c (gdb_read_memory): Change return semantics to allow
12398 (handle_search_memory_1): Adjust.
12399 (process_serial_event) <'m' packet>: Handle partial transfers.
12400 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12402 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12404 * regcache.c (init_register_cache): Initialize
12405 regcache->register_status.
12406 (free_register_cache): Release regcache->register_status.
12407 (regcache_cpy): Copy register_status.
12408 (registers_to_string): Print 'x's for unavailable registers.
12409 (supply_register): Mark the register's status valid or
12410 unavailable, depending on whether a buffer was passed in or not.
12411 (supply_register_zeroed): New.
12412 (supply_regblock): Mark the registers' status valid or
12413 unavailable, depending on whether a buffer was passed in or not.
12414 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12415 (struct regcache): New `register_status' field.
12416 (supply_register_zeroed): Declare.
12417 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12418 supply_register_zeroed, rather than passing a NULL buffer to
12420 * tracepoint.c (fetch_traceframe_registers): Update comment.
12422 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12424 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12427 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12429 * server.h (decode_xfer_write): Change prototype.
12430 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12431 and don't extract the annex here.
12432 * server.c (decode_xfer_read): Remove `annex' parameter,
12433 and don't extract the annex here.
12434 (decode_xfer): New.
12435 (struct qxfer): New.
12436 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12437 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12438 (handle_qxfer_statictrace): New functions, abstracted out from
12439 handle_query, and made to use the struct qxfer interface.
12440 (handle_threads_qxfer_proper): Rename to ...
12441 (handle_qxfer_threads_proper): ... this.
12442 (handle_threads_qxfer): Rename to ...
12443 (handle_qxfer_threads): ... this. Adjust.
12444 (qxfer_packets): New array.
12445 (handle_qxfer): New function.
12446 (handle_query): Use handle_qxfer.
12448 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12450 * gdbreplay.c: Shorten lines of >= 80 columns.
12451 * linux-low.c: Ditto.
12452 * linux-ppc-low.c: Ditto.
12453 * linux-s390-low.c: Ditto.
12454 * linux-sparc-low.c: Ditto.
12455 * linux-x86-low.c: Ditto.
12456 * linux-xtensa-low.c: Ditto.
12457 * mem-break.c: Ditto.
12458 * nto-low.c: Ditto.
12459 * regcache.h: Ditto.
12460 * remote-utils.c: Ditto.
12463 * thread-db.c: Ditto.
12464 * tracepoint.c: Ditto.
12466 * win32-low.h: Ditto.
12468 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12470 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12473 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12475 * server.c (gdbserver_version): Update copyright year in version
12477 * gdbreplay.c (gdbreplay_version): Ditto.
12479 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12481 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12482 * linux-bfin-low.c: New file.
12483 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12484 PT_DATA_ADDR for BFIN targets.
12485 * Makefile.in (SFILES): Add linux-bfin-low.c.
12486 (clean): Remove reg-bfin.c.
12487 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12488 * README: Mention supported Blackfin targets.
12490 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12492 * .gitignore: New file.
12494 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12496 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12498 2010-10-22 Jie Zhang <jie@codesourcery.com>
12500 * Makefile.in: Add FLAGS_TO_PASS variable.
12501 (install): Remove dependency of install-only and recursively
12502 invoke make for install-only.
12504 2010-10-04 Doug Evans <dje@google.com>
12506 * Makefile.in (uninstall): Use $(DESTDIR).
12508 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12512 * linux-x86-low.c (compat_siginfo_from_siginfo)
12513 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12514 si_code is < 0. Check for si_code == SI_TIMER before checking for
12517 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12519 * lynx-i386-low.c: New file.
12520 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12522 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12524 * lynx-low.c (ptrace_request_to_str): Remove handling for
12525 request values that have been removed in LynxOS 5.x.
12527 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12529 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12532 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12534 * configure.ac: Add --enable-inprocess-agent option.
12535 * configure: Rebuilt.
12537 2010-09-06 Yao Qi <yao@codesourcery.com>
12539 * linux-low.c (linux_kill): Remove unused variable.
12540 (linux_stabilize_threads): Likewise.
12541 * server.c (start_inferior): Likewise.
12542 (queue_stop_reply_callback): Likewise.
12543 * tracepoint.c (do_action_at_tracepoint): Likewise.
12545 2010-09-06 Yao Qi <yao@codesourcery.com>
12547 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12550 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12552 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12554 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12556 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12559 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12561 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12562 gdbserver/lynx-ppc-low.c: New files.
12563 * Makefile.in (lynx_low_h): New variable.
12564 (lynx-low.o, lynx-ppc-low.o): New rules.
12565 * configure.ac: On LynxOS, link with -lnetinet.
12566 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12567 * configure: regenerate.
12569 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12571 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12572 * configure.ac: Add check for vasprintf and vsnprintf.
12573 * configure, config.in: Regenerate.
12574 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12576 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12578 * gdbreplay.c: Move include of alloca.h up, next to include of
12580 * server.h: Add include of malloc.h.
12581 * mem-break.c: Remove include of malloc.h.
12582 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12584 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12586 * Makefile.in (memmem.o): Build with -Wno-error.
12588 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12590 * utils.c (xsnprintf): Make non-static.
12591 * server.h: Add xsnprintf declaration.
12592 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12593 replace calls to snprintf by calls to xsnprintf throughout.
12595 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12597 * configure.ac: Add configure check for alloca.
12598 * configure, config.in: Regenerate.
12599 * server.h: Include alloca.h if it exists.
12600 * gdbreplay.c: Include alloca.h if it exists.
12602 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12604 * linux-low.c (__SIGRTMIN): Define if not already defined.
12605 (linux_create_inferior): Check for __ANDROID__ rather than
12607 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12608 are already deferred.
12609 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12610 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12611 stopped and already has a pending signal to report.
12612 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12613 a pending signal to report or is moving out of a jump pad.
12614 (linux_init_signals): Check for __ANDROID__ rather than
12617 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12619 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12620 debug_threads check. Avoid a linear search when not doing debug
12623 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12625 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12626 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12627 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12628 (process_event): Change local fd's type to gdb_fildes_t.
12629 (create_file_handler): Adjust prototype.
12630 (delete_file_handler): Adjust prototype.
12631 (handle_file_event): Adjust prototype. Use pfildes.
12632 (create_file_event): Adjsut prototype.
12633 * remote-utils.c (remote_desc, listen_desc): Change type to
12635 * server.h: New gdb_fildes_t typedef.
12636 [USE_WIN32API]: Include winsock2.h.
12637 (delete_file_handler, add_file_handler): Adjust prototypes.
12638 (pfildes): Declare.
12639 * utils.c (pfildes): New.
12641 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12643 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12644 * configure: Regenerate.
12646 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12648 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12649 (linux_done_accessing_memory): ... this.
12650 (linux_target_ops): Adjust.
12651 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12652 * nto-low.c (nto_target_ops): Adjust comment.
12653 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12654 * spu-low.c (spu_target_ops): Adjust comment.
12655 * target.h (target_ops): Rename unprepare_to_access_memory field
12656 to done_accessing_memory.
12657 (unprepare_to_access_memory): Rename to ...
12658 (done_accessing_memory): ... this.
12660 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12662 * linux-low.c (linux_prepare_to_access_memory): New.
12663 (linux_unprepare_to_access_memory): New.
12664 (linux_target_ops): Install them.
12665 * server.c (read_memory): Rename to ...
12666 (gdb_read_memory): ... this. Use
12667 prepare_to_access_memory/prepare_to_access_memory.
12668 (write_memory): Rename to ...
12669 (gdb_write_memory): ... this. Use
12670 prepare_to_access_memory/prepare_to_access_memory.
12671 (handle_search_memory_1): Adjust.
12672 (process_serial_event): Adjust.
12673 * target.h (struct target_ops): New fields
12674 prepare_to_access_memory and unprepare_to_access_memory.
12675 (prepare_to_access_memory, unprepare_to_access_memory): New.
12676 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12677 prepare_to_access_memory/prepare_to_access_memory.
12678 * nto-low.c (nto_target_ops): Adjust.
12679 * spu-low.c (spu_target_ops): Adjust.
12680 * win32-low.c (win32_target_ops): Adjust.
12682 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12684 * Makefile.in (WARN_CFLAGS): Get it from configure.
12685 (WERROR_CFLAGS): New.
12686 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12687 * configure.ac: Introduce --enable-werror, which adds -Werror to
12688 the compiler command line. Enabled by default. Disable with
12689 --disable-werror. Add -Wdeclaration-after-statement
12690 Wpointer-arith and -Wformat-nonliteral to warning flags.
12691 * configure: Regenerate.
12693 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12695 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12697 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12699 * gdbreplay.c (remote_error): New.
12701 (expect): Use gdbchar. Check for error reading from GDB.
12702 Clarify sync error output.
12703 (play): Check for errors writing to GDB.
12704 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12705 * remote-utils.c (getpkt): Check for errors writing to the remote
12708 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12710 * linux-low.c (linux_wait_1): Move non-debugging code out of
12711 `debug_threads' control.
12713 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12715 * linux-low.c (linux_wait_1): Don't set last_status here.
12716 * server.c (push_event, queue_stop_reply_callback): Assert we're
12717 not pushing a TARGET_WAITKIND_IGNORE event.
12718 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12719 (myresume, handle_target_event): Set the thread's last_resume_kind
12720 and last_status from the target returned status.
12722 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12726 * linux-x86-low.c (update_debug_registers_callback): New.
12727 (i386_dr_low_set_addr): Use it.
12728 (i386_dr_low_get_addr): New.
12729 (i386_dr_low_set_control): Use update_debug_registers_callback.
12730 (i386_dr_low_get_control): New.
12731 (i386_dr_low_get_status): Adjust.
12732 * linux-low.c (linux_stop_lwp): New.
12733 * linux-low.h (linux_stop_lwp): Declare.
12735 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12736 argument instead of a i386_debug_reg_state.
12737 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12738 a i386_debug_reg_state.
12739 (i386_insert_aligned_watchpoint): Adjust.
12740 (i386_remove_aligned_watchpoint): Adjust.
12741 (i386_low_stopped_data_address): Read the debug registers from the
12742 inferior instead of from the mirrors.
12743 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12744 (i386_dr_low_get_addr): Declare.
12745 (i386_dr_low_get_control): Declare.
12746 (i386_dr_low_get_status): Change prototype.
12748 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12749 (i386_dr_low_get_addr): New.
12750 (i386_dr_low_get_control): New.
12751 (i386_dr_low_get_status): Adjust prototype. Return
12753 (i386_initial_stuff): Clear dr_status_mirror and
12755 (i386_get_thread_context): Adjust.
12756 (i386_set_thread_context): Adjust.
12757 (i386_thread_added): Adjust.
12759 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12761 * linux-low.h (linux_thread_area): Delete declaration.
12763 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12765 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12766 after its termination.
12768 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12770 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12771 (gdb_wants_all_stopped): Delete.
12772 (linux_wait_1): Don't call them.
12773 * server.c (handle_v_cont): Tag all threads as want-stopped.
12774 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12775 stopped as "client-wants-stopped".
12777 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12779 * Makefile.in (signals_h): New.
12780 (server_h): Depend on it.
12781 (server.o): Don't depend on $(signals_def).
12782 (signals.o): Depend on $(signals_def).
12784 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12786 * Makefile.in (signals_def): New.
12787 (server_h): Append include/gdb/signals.h and signals_def.
12788 (server.o): Append signals_def.
12790 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12792 * server.c (handle_target_event): Use target_signal_to_host for
12793 resume_info.sig initialization.
12794 * target.h (struct thread_resume) <sig>: New comment.
12796 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12798 * server.c (handle_query): strcpy() the returned string from paddress()
12799 instead of sprintf().
12800 * utils.c (paddress): Return phex_nz().
12802 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12804 * server.c (handle_v_cont): Call mourn_inferior if process
12806 (myresume): Likewise.
12808 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12810 Static tracepoints, and integration with UST.
12812 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12813 * mem-break.c (uninsert_all_breakpoints)
12814 (reinsert_all_breakpoints): New.
12815 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12816 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12817 (gdb_agent_ust_loaded, helper_thread_id)
12818 (gdb_agent_helper_thread_id): New macros.
12819 (struct ipa_sym_addresses): Add addr_ust_loaded,
12820 addr_helper_thread_id, addr_cmd_buf.
12821 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12822 (in_process_agent_loaded_ust): New.
12823 (write_e_ust_not_loaded): New.
12824 (maybe_write_ipa_ust_not_loaded): New.
12825 (struct collect_static_trace_data_action): New.
12826 (enum tracepoint_type) <static_tracepoint>: New.
12827 (struct tracepoint) <handle>: Mention static tracepoints.
12828 (struct static_tracepoint_ctx): New.
12829 (CMD_BUF_SIZE): New.
12830 (add_tracepoint_action): Handle static tracepoint actions.
12831 (unprobe_marker_at): New.
12832 (clear_installed_tracepoints): Handle static tracepoints.
12833 (cmd_qtdp): Handle static tracepoints.
12834 (probe_marker_at): New.
12835 (cmd_qtstart): Handle static tracepoints.
12836 (response_tracepoint): Handle static tracepoints.
12837 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12838 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12839 (get_context_regcache): Handle static tracepoints.
12840 (do_action_at_tracepoint): Handle static tracepoint actions.
12841 (traceframe_find_block_type): Handle static trace data blocks.
12842 (traceframe_read_sdata): New.
12843 (download_tracepoints): Download static tracepoint actions.
12844 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12845 (GDB_PROBE_NAME): New.
12847 (GET_UST_SYM): New.
12850 (ust_marker_to_static_tracepoint): New.
12852 (collect_ust_data_at_tracepoint): New.
12853 (gdb_ust_probe): New.
12854 (UNIX_PATH_MAX, SOCK_DIR): New.
12855 (gdb_ust_connect_sync_socket): New.
12856 (resume_thread, stop_thread): New.
12857 (run_inferior_command): New.
12858 (init_named_socket): New.
12859 (gdb_ust_socket_init): New.
12860 (cstr_to_hexstr): New.
12862 (first_marker, next_marker): New.
12863 (response_ust_marker): New.
12864 (cmd_qtfstm, cmd_qtsstm): New.
12865 (unprobe_marker_at, probe_marker_at): New.
12866 (cmd_qtstmat, gdb_ust_thread): New.
12867 (gdb_ust_init): New.
12868 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12869 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12870 (ST_REGENTRY): New.
12871 (x86_64_st_collect_regmap): New.
12872 (X86_64_NUM_ST_COLLECT_GREGS): New.
12873 (AMD64_RIP_REGNUM): New.
12874 (supply_static_tracepoint_registers): New.
12875 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12876 (ST_REGENTRY): New.
12877 (i386_st_collect_regmap): New.
12878 (i386_NUM_ST_COLLECT_GREGS): New.
12879 (supply_static_tracepoint_registers): New.
12880 * server.c (handle_query): Handle qXfer:statictrace:read.
12881 <qSupported>: Report support for StaticTracepoints, and
12882 qXfer:statictrace:read features.
12883 * server.h (traceframe_read_sdata)
12884 (supply_static_tracepoint_registers): Declare.
12885 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12886 (unpack_varlen_hex): Include in IPA build.
12887 * Makefile.in (ustlibs, ustinc): New.
12888 (IPA_OBJS): Add remote-utils-ipa.o.
12889 ($(IPA_LIB)): Link -ldl and -lpthread.
12891 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12892 * config.in, configure: Regenerate.
12894 2010-06-20 Ian Lance Taylor <iant@google.com>
12895 Pedro Alves <pedro@codesourcery.com>
12897 * linux-x86-low.c (always_true): Delete.
12898 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12899 trying to fool the compiler with always_true.
12901 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12903 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12904 conditions in gdbserver.
12906 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12908 * spu-low.c (spu_read_memory): Wrap around local store limit.
12909 (spu_write_memory): Likewise.
12911 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12913 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12914 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12916 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12918 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12919 uses with LONGEST uses.
12921 2010-06-14 Stan Shebs <stan@codesourcery.com>
12922 Pedro Alves <pedro@codesourcery.com>
12926 * linux-x86-low.c: Include limits.h.
12928 (always_true): New.
12931 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12932 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12933 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12934 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12935 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12936 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12937 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12938 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12939 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12940 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12941 (amd64_emit_void_call_2): New.
12942 (amd64_emit_ops): New.
12943 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12944 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12945 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12946 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12947 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12948 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12949 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12950 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12951 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12952 (i386_emit_stack_adjust, i386_emit_int_call_1)
12953 (i386_emit_void_call_2): New.
12954 (i386_emit_ops): New.
12955 (x86_emit_ops): New.
12956 (the_low_target): Install x86_emit_ops.
12957 * server.h (struct emit_ops): New.
12958 (get_raw_reg_func_addr): Declare.
12959 (current_insn_ptr, emit_error): Declare.
12960 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12961 (set_trace_state_variable_value): New defines.
12962 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12963 addr_get_trace_state_variable_value and
12964 addr_set_trace_state_variable_value.
12965 (symbol_list): New fields for get_raw_reg,
12966 get_trace_state_variable_value and set_trace_state_variable_value.
12967 (condfn): New typedef.
12968 (struct tracepoint): New field `compiled_cond'.
12969 (do_action_at_tracepoint): Clear compiled_cond.
12970 (get_trace_state_variable_value, set_trace_state_variable_value):
12972 (condition_true_at_tracepoint): If there's a compiled condition,
12974 (current_insn_ptr, emit_error): New globals.
12975 (struct bytecode_address): New.
12976 (get_raw_reg_func_addr): New.
12977 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12978 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12979 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12980 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12981 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12982 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12983 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12984 (compile_tracepoint_condition, compile_bytecodes): New.
12985 * target.h (emit_ops): Forward declare.
12986 (struct target_ops): New field emit_ops.
12987 (target_emit_ops): New.
12988 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12989 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12990 * linux-low.c (linux_emit_ops): New.
12991 (linux_target_ops): Install it.
12992 * linux-low.h (struct linux_target_ops): New field emit_ops.
12994 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12996 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12997 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12999 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13000 Stan Shebs <stan@codesourcery.com>
13002 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13003 (all): Depend on $(extra_libraries).
13004 (install-only): Install the IPA.
13005 (IPA_OBJS, IPA_LIB): New.
13006 (clean): Remove the IPA lib.
13007 (IPAGENT_CFLAGS): New.
13008 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13009 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13010 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13011 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13012 * configure.ac: Check for atomic builtins support in the compiler.
13013 (IPA_DEPFILES, extra_libraries): Define.
13014 * configure.srv (ipa_obj): Add description.
13015 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13016 (i[34567]86-*-linux*): Set ipa_obj.
13017 (x86_64-*-linux*): Set ipa_obj.
13018 * linux-low.c (stabilizing_threads): New.
13019 (supports_fast_tracepoints): New.
13020 (linux_detach): Stabilize threads before detaching.
13021 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13022 the lwp is either not stabilizing, or is moving out of a jump pad.
13023 (linux_fast_tracepoint_collecting): New.
13024 (maybe_move_out_of_jump_pad): New.
13025 (enqueue_one_deferred_signal): New.
13026 (dequeue_one_deferred_signal): New.
13027 (linux_wait_for_event_1): If moving out of a jump pad, defer
13028 pending signals to later.
13029 (linux_stabilize_threads): New.
13030 (linux_wait_1): Check if threads need moving out of jump pads, and
13032 (stuck_in_jump_pad_callback): New.
13033 (move_out_of_jump_pad_callback): New.
13034 (lwp_running): New.
13035 (linux_resume_one_lwp): Handle moving out of jump pads.
13036 (linux_set_resume_request): Dequeue deferred signals.
13037 (need_step_over_p): Also step over fast tracepoint jumps.
13038 (start_step_over): Also uninsert fast tracepoint jumps.
13039 (finish_step_over): Also reinsert fast tracepoint jumps.
13040 (linux_install_fast_tracepoint_jump): New.
13041 (linux_target_ops): Install linux_stabilize_threads and
13042 linux_install_fast_tracepoint_jump_pad.
13043 * linux-low.h (linux_target_ops) <get_thread_area,
13044 install_fast_tracepoint_jump_pad>: New fields.
13045 (struct lwp_info) <collecting_fast_tracepoint,
13046 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13047 (linux_get_thread_area): Declare.
13048 * linux-x86-low.c (jump_insn): New.
13049 (x86_get_thread_area): New.
13050 (append_insns): New.
13051 (push_opcode): New.
13052 (amd64_install_fast_tracepoint_jump_pad): New.
13053 (i386_install_fast_tracepoint_jump_pad): New.
13054 (x86_install_fast_tracepoint_jump_pad): New.
13055 (the_low_target): Install x86_get_thread_area and
13056 x86_install_fast_tracepoint_jump_pad.
13057 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13058 (struct fast_tracepoint_jump): New.
13059 (fast_tracepoint_jump_insn): New.
13060 (fast_tracepoint_jump_shadow): New.
13061 (find_fast_tracepoint_jump_at): New.
13062 (fast_tracepoint_jump_here): New.
13063 (delete_fast_tracepoint_jump): New.
13064 (set_fast_tracepoint_jump): New.
13065 (uninsert_fast_tracepoint_jumps_at): New.
13066 (reinsert_fast_tracepoint_jumps_at): New.
13067 (set_breakpoint_at): Use write_inferior_memory.
13068 (uninsert_raw_breakpoint): Use write_inferior_memory.
13069 (check_mem_read): Mask out fast tracepoint jumps.
13070 (check_mem_write): Mask out fast tracepoint jumps.
13071 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13072 (set_fast_tracepoint_jump): Declare.
13073 (delete_fast_tracepoint_jump)
13074 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13075 (reinsert_fast_tracepoint_jumps_at): Declare.
13076 * regcache.c: Don't compile many functions when building the
13077 in-process agent library.
13078 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13079 the register buffer in the heap.
13080 (free_register_cache): If the register buffer isn't owned by the
13081 regcache, don't free it.
13082 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13083 pre-existing register caches.
13084 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13086 (convert_ascii_to_int): : Constify `from' parameter type.
13087 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13088 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13089 the needed buffer in-place.
13090 (relocate_instruction): New.
13091 * server.c (handle_query) <qSymbols>: If the target supports
13092 tracepoints, give it a chance of looking up symbols. Report
13093 support for fast tracepoints.
13094 (handle_status): Stabilize threads.
13095 (process_serial_event): Adjust.
13096 * server.h (struct fast_tracepoint_jump): Forward declare.
13097 (struct process_info) <fast_tracepoint_jumps>: New field.
13098 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13099 (decode_X_packet, decode_M_packet): Adjust.
13100 (relocate_instruction): Declare.
13101 (in_process_agent_loaded): Declare.
13102 (tracepoint_look_up_symbols): Declare.
13103 (struct fast_tpoint_collect_status): Declare.
13104 (fast_tracepoint_collecting): Declare.
13105 (force_unlock_trace_buffer): Declare.
13106 (handle_tracepoint_bkpts): Declare.
13107 (initialize_low_tracepoint)
13108 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13109 * target.h (struct target_ops) <stabilize_threads,
13110 install_fast_tracepoint_jump_pad>: New fields.
13111 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13112 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13113 [HAVE_STDINT_H]: Include stdint.h.
13114 (trace_debug_1): Rename to ...
13115 (trace_vdebug): ... this.
13116 (trace_debug): Rename to ...
13117 (trace_debug_1): ... this. Add `level' parameter.
13118 (trace_debug): New.
13119 (ATTR_USED, ATTR_NOINLINE): New.
13120 (IP_AGENT_EXPORT): New.
13121 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13122 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13123 (about_to_request_buffer_space, trace_buffer_is_full)
13124 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13125 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13126 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13127 (traceframe_write_count, traceframes_created)
13128 (trace_state_variables)
13129 New renaming defines.
13130 (struct ipa_sym_addresses): New.
13131 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13132 (symbol_list): New.
13133 (ipa_sym_addrs): New.
13134 (all_tracepoint_symbols_looked_up): New.
13135 (in_process_agent_loaded): New.
13136 (write_e_ipa_not_loaded): New.
13137 (maybe_write_ipa_not_loaded): New.
13138 (tracepoint_look_up_symbols): New.
13139 (debug_threads) [IN_PROCESS_AGENT]: New.
13140 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13141 (UNKNOWN_SIDE_EFFECTS): New.
13142 (stop_tracing): New.
13143 (flush_trace_buffer): New.
13144 (stop_tracing_bkpt): New.
13145 (flush_trace_buffer_bkpt): New.
13146 (read_inferior_integer): New.
13147 (read_inferior_uinteger): New.
13148 (read_inferior_data_pointer): New.
13149 (write_inferior_data_pointer): New.
13150 (write_inferior_integer): New.
13151 (write_inferior_uinteger): New.
13152 (struct collect_static_trace_data_action): Delete.
13153 (enum tracepoint_type): New.
13154 (struct tracepoint) <type>: New field `type'.
13155 <actions_str, step_actions, step_actions_str>: Only include in
13157 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13158 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13159 (tracepoints): Use IP_AGENT_EXPORT.
13160 (last_tracepoint): Don't include in the IPA.
13161 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13162 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13163 (alloced_trace_state_variables): New.
13164 (trace_state_variables): Use IP_AGENT_EXPORT.
13165 (traceframe_t): Delete unused variable.
13166 (circular_trace_buffer): Don't include in the IPA.
13167 (trace_buffer_start): Delete.
13168 (struct trace_buffer_control): New.
13169 (trace_buffer_free): Delete.
13170 (struct ipa_trace_buffer_control): New.
13171 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13172 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13174 (trace_buffer_ctrl): New.
13175 (TRACE_BUFFER_CTRL_CURR): New.
13176 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13177 Reimplement as macros.
13178 (trace_buffer_wrap): Delete.
13179 (traceframe_write_count, traceframe_read_count)
13180 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13181 (struct tracepoint_hit_ctx) <type>: New field.
13182 (struct fast_tracepoint_ctx): New.
13183 (memory_barrier): New.
13185 (record_tracepoint_error): Update atomically in the IPA.
13186 (clear_inferior_trace_buffer): New.
13187 (about_to_request_buffer_space): New.
13188 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13189 updating the same buffer.
13190 (add_tracepoint): Default the tracepoint's type to trap
13191 tracepoint, and orig_size to -1.
13192 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13193 internal variables.
13194 (create_trace_state_variable): New parameter `gdb'. Handle it.
13195 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13196 (cmd_qtdp): Handle fast tracepoints.
13197 (cmd_qtdv): Adjust.
13198 (max_jump_pad_size): New.
13199 (gdb_jump_pad_head): New.
13200 (get_jump_space_head): New.
13201 (claim_jump_space): New.
13202 (sort_tracepoints): New.
13203 (MAX_JUMP_SIZE): New.
13204 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13206 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13207 support. Upload fast traceframes, and delete internal IPA
13209 (stop_tracing_handler): New.
13210 (flush_trace_buffer_handler): New.
13211 (cmd_qtstop): Upload fast tracepoints.
13212 (response_tracepoint): Handle fast tracepoints.
13213 (tracepoint_finished_step): Upload fast traceframes. Set the
13214 tracepoint hit context's tracepoint type.
13215 (handle_tracepoint_bkpts): New.
13216 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13217 type. Add comment about fast tracepoints.
13218 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13219 non-existing action_str field.
13220 (get_context_regcache): Handle fast tracepoints.
13221 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13223 (fast_tracepoint_from_jump_pad_address): New.
13224 (fast_tracepoint_from_ipa_tpoint_address): New.
13225 (collecting_t): New.
13226 (force_unlock_trace_buffer): New.
13227 (fast_tracepoint_collecting): New.
13229 (gdb_collect): New.
13230 (write_inferior_data_ptr): New.
13231 (target_tp_heap): New.
13232 (target_malloc): New.
13233 (download_agent_expr): New.
13235 (download_tracepoints): New.
13236 (download_trace_state_variables): New.
13237 (upload_fast_traceframes): New.
13238 (IPA_FIRST_TRACEFRAME): New.
13239 (IPA_NEXT_TRACEFRAME_1): New.
13240 (IPA_NEXT_TRACEFRAME): New.
13241 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13242 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13243 (gdb_jump_pad_buffer_end): New.
13244 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13245 (initialize_tracepoint): Adjust.
13246 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13247 buffer. Initialize the low module.
13248 * utils.c (PREFIX, TOOLNAME): New.
13249 (malloc_failure): Use PREFIX.
13250 (error): In the IPA, an error causes an exit.
13251 (fatal, warning): Use PREFIX.
13252 (internal_error): Use TOOLNAME.
13253 (NUMCELLS): Increase to 10.
13254 * configure, config.in: Regenerate.
13256 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13258 * server.c (handle_query) <qSupported>: Do two passes over the
13259 qSupported string to avoid nesting strtok.
13261 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13263 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13265 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13266 -Wl,--dynamic-list.
13267 * configure: Regenerate.
13268 * proc-service.list: New.
13270 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13272 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13275 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13277 * gdbreplay.c (remote_open): Check error return from socket() call by
13278 its equality to -1 not by it being negative.
13279 * remote-utils.c (remote_open): Likewise.
13281 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13283 * config.h: Regenerate.
13285 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13287 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13288 doesn't provide PTRACE_GET_THREAD_AREA.
13290 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13292 * linux-m68k-low.c: Include <asm/ptrace.h>
13293 (ps_get_thread_area): Implement.
13295 2010-05-03 Doug Evans <dje@google.com>
13297 * event-loop.c (struct callback_event): New struct.
13298 (callback_list): New global.
13299 (append_callback_event, delete_callback_event): New functions.
13300 (process_callback): New function.
13301 (start_event_loop): Call it.
13302 * remote-utils.c (NOT_SCHEDULED): Define.
13303 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13304 moved out of readchar.
13305 (readchar): Rewrite. Call reschedule before returning.
13306 (reset_readchar): New function.
13307 (remote_close): Call it.
13308 (process_remaining, reschedule): New functions.
13309 * server.h (callback_handler_func): New typedef.
13310 (append_callback_event, delete_callback_event): Declare.
13312 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13314 * proc-service.c (ps_pglobal_lookup): Use
13315 thread_db_look_up_one_symbol.
13316 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13317 parameter. Use it instead of all_symbols_looked_up.
13318 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13320 (all_symbols_looked_up): Don't declare.
13321 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13322 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13324 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13325 Set all_symbols_looked_up here.
13326 (thread_db_look_up_one_symbol): New.
13327 (thread_db_get_tls_address): Adjust.
13328 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13329 thread_db object on the heap, and tentatively set it in the
13331 (thread_db_init): Don't set all_symbols_looked_up here.
13332 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13334 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13336 * linux-low.c (linux_kill, linux_detach): Adjust.
13337 (status_pending_p_callback): Remove redundant statement. Check
13338 for !TARGET_WAITIKIND_IGNORE, instead of
13339 TARGET_WAITKIND_STOPPED.
13340 (handle_tracepoints): Make sure LWP is locked. Adjust.
13341 (linux_wait_for_event_1): Adjust.
13342 (linux_cancel_breakpoints): New.
13343 (unsuspend_one_lwp): New.
13344 (unsuspend_all_lwps): New.
13345 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13346 (send_sigstop_callback): Change return type to int, add new
13347 `except' parameter and handle it.
13348 (suspend_and_send_sigstop_callback): New.
13349 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13350 pass them down. If SUSPEND, also increment the lwp's suspend
13352 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13353 (need_step_over_p): Don't consider suspended LWPs.
13354 (start_step_over): Adjust.
13355 (proceed_one_lwp): Change return type to int, add new `except'
13356 parameter and handle it.
13357 (unsuspend_and_proceed_one_lwp): New.
13358 (proceed_all_lwps): Use find_inferior instead of
13360 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13361 also decrement the suspend count of LWPs. Pass `except' down,
13362 instead of hacking its suspend count.
13363 (linux_pause_all): Add `freeze' parameter. Adjust.
13364 (linux_unpause_all): New.
13365 (linux_target_ops): Install linux_unpause_all.
13366 * server.c (handle_status): Adjust.
13367 * target.h (struct target_ops): New fields `unpause_all' and
13368 `cancel_breakpoints'. Add new parameter to `pause_all'.
13369 (pause_all): Add new `freeze' parameter.
13370 (unpause_all): New.
13371 (cancel_breakpoints): New.
13372 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13373 cancel breakpoints.
13374 (cmd_qtstart): Pause threads.
13375 (stop_tracing): Pause threads, and cancel breakpoints.
13376 * win32-low.c (win32_target_ops): Adjust.
13378 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13380 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13381 the inferior right away from here...
13382 (linux_wait_1): ... to here, and adjust to check the thread's
13383 last_resume_kind instead of the lwp's step or stop_expected flags.
13385 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13387 * README: Use consistent `GDB' and `GDBserver' spellings.
13389 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13391 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13392 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13393 (linux_detach_one_lwp): Assume the lwp is stopped.
13394 (any_thread_of): Delete.
13395 (linux_detach): Stop all lwps here. Don't blindly delete all
13397 (delete_lwp_callback): New.
13398 (linux_mourn): Delete all lwps of the process that is gone.
13399 (linux_wait_1): Don't delete the last lwp of the process here.
13400 * mem-break.h (mark_breakpoints_out): Declare.
13401 * mem-break.c (mark_breakpoints_out): New.
13402 (free_all_breakpoints): Use it.
13403 * server.c (handle_target_event): If the process is gone, mark
13405 * thread-db.c (struct thread_db) <create_bp>: New field.
13406 (thread_db_enable_reporting): Fix prototype. Store a thread event
13407 breakpoint reference in the thread_db struct.
13408 (thread_db_load_search): Clear the thread_db object.
13409 (try_thread_db_load_1): Ditto.
13410 (switch_to_process): New.
13411 (disable_thread_event_reporting): Use it.
13412 (remove_thread_event_breakpoints): New.
13413 (thread_db_detach, thread_db_mourn): Use it.
13415 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13417 * linux-low.c (linux_enable_event_reporting): New.
13418 (linux_wait_for_event_1, handle_extended_wait): Use it.
13420 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13422 * linux-low.c (linux_kill_one_lwp, linux_kill)
13423 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13424 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13425 SIGSTOP even if the LWP is stopped.
13426 (send_sigstop_callback): New.
13427 (stop_all_lwps): Use send_sigstop_callback instead.
13428 (linux_resume_one_thread): Adjust.
13429 (proceed_one_lwp): Still proceed an LWP that the client has
13430 requested to stop, if we haven't reported it as stopped yet. Make
13431 sure that LWPs the client want stopped, have a pending SIGSTOP.
13433 2010-04-26 Doug Evans <dje@google.com>
13435 * server.c (handle_general_set): Make static.
13437 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13438 Print received char after testing for error/eof instead of before.
13439 (input_interrupt): Tweak comment.
13441 2010-04-23 Doug Evans <dje@google.com>
13443 * server.c (start_inferior): Print inferior argv if --debug.
13445 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13447 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13448 * nto-x86-low.c: Include server.h
13450 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13452 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13453 be consistent with other sources of this directory.
13454 (init_registers_amd64): Correct name of source file of this function
13457 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13459 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13460 64-bit executables.
13462 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13464 * win32-i386-low.c: Add 64-bit support.
13465 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13466 (init_registers_amd64): Declare.
13467 (mappings): Add 64-bit version of array.
13468 (init_windows_x86): New function.
13469 (the_low_target): Change init_arch field to init_windows_x86.
13471 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13473 * win32-low.c: Adapt to support also 64-bit architecture.
13474 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13475 (get_image_name): Use SIZE_T type for local variable `done'.
13476 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13477 (toolhelp_get_dll_name): Idem.
13478 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13479 Use uintptr_t typecast to avoid warning.
13480 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13481 (handle_exception): Use phex_nz to avoid warning.
13482 (win32_wait): Remove unused local variable `process'.
13484 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13486 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13489 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13491 * configure.ac: Use `ws2_32' library for srv_mingw.
13492 * configure: Regenerate.
13493 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13494 * remote-utils.c: Likewise.
13496 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13498 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13499 if __x86_64__ is defined.
13501 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13503 * configure: Regenerate.
13505 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13507 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13508 * target.h (target_ops): New get_tib_address field.
13509 * win32-low.h (win32_thread_info): Add thread_local_base field.
13510 * win32-low.c (child_add_thread): Add tlb argument.
13511 Set thread_local_base field to TLB.
13512 (get_child_debug_event): Adapt to child_add_thread change.
13513 (win32_get_tib_address): New function.
13514 (win32_target_ops): Set get_tib_address field to
13515 win32_get_tib_address.
13516 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13518 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13520 * linux-low.c (linux_mourn): Also remove the process.
13521 * server.c (handle_target_event): Don't remove the process here.
13522 * nto-low.c (nto_mourn): New.
13523 (nto_target_ops): Install it.
13524 * spu-low.c (spu_mourn): New.
13525 (spu_target_ops): Install it.
13526 * win32-low.c (win32_mourn): New.
13527 (win32_target_ops): Install it.
13529 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13531 * server.h (buffer_xml_printf): Remove redundant `;'.
13533 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13535 * regcache.c (set_register_cache): Invalidate regcaches before
13536 changing the register cache layout.
13537 (regcache_invalidate_one): Allow a NULL regcache.
13538 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13539 regcaches before changing the register cache layout or the target
13542 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13544 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13545 variable warning on Linux/x86-64.
13547 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13549 GDBserver disconnected tracing support.
13551 * linux-low.c (linux_remove_process): Delete.
13552 (add_lwp): Don't set last_resume_kind here.
13553 (linux_kill): Use `mourn'.
13554 (linux_detach): Use `thread_db_detach', and `mourn'.
13555 (linux_mourn): New.
13556 (linux_attach_lwp_1): Adjust comment.
13557 (linux_attach): last_resume_kind moved the thread_info; adjust.
13558 (status_pending_p_callback): Adjust.
13559 (linux_wait_for_event_1): Adjust.
13560 (count_events_callback, select_singlestep_lwp_callback)
13561 (select_event_lwp_callback, cancel_breakpoints_callback)
13562 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13563 (proceed_one_lwp): Adjust.
13564 (linux_async): Add debug output.
13565 (linux_thread_stopped): New.
13566 (linux_pause_all): New.
13567 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13569 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13570 (thread_db_free): Delete declaration.
13571 (thread_db_detach, thread_db_mourn): Declare.
13572 * thread-db.c (thread_db_init): Use thread_db_mourn.
13573 (thread_db_free): Delete, split in two.
13574 (disable_thread_event_reporting): New.
13575 (thread_db_detach): New.
13576 (thread_db_mourn): New.
13578 * server.h (struct thread_info) <last_resume_kind>: New field.
13579 <attached>: Add comment.
13580 <gdb_detached>: New field.
13581 (handler_func): Change return type to int.
13582 (handle_serial_event, handle_target_event): Ditto.
13583 (gdb_connected): Declare.
13585 (disconnected_tracing): Declare.
13586 (stop_tracing): Declare.
13588 * server.c (handle_query) <qSupported>: Report support for
13589 disconnected tracing.
13590 (queue_stop_reply_callback): Account for running threads.
13591 (gdb_wants_thread_stopped): New.
13592 (gdb_wants_all_threads_stopped): New.
13593 (gdb_reattached_process): New.
13594 (handle_status): Clear the `gdb_detached' flag of all processes.
13595 In all-stop, stop all threads.
13596 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13597 (process_serial_event): If the remote connection breaks, or if an
13598 exit was forced with "monitor exit", force an event loop exit.
13599 Handle disconnected tracing on detach.
13600 (handle_serial_event): Adjust.
13601 (handle_target_event): If GDB isn't connected, forward events back
13602 to the inferior, unless the last process exited, in which case,
13603 exit gdbserver. Adjust interface.
13605 * remote-utils.c (remote_open): Don't block in accept. Instead
13606 register an event loop source on the listen socket file
13607 descriptor. Refactor bits into ...
13608 (listen_desc): ... this new global.
13609 (gdb_connected): ... this new function.
13610 (enable_async_notification): ... this new function.
13611 (handle_accept_event): ... this new function.
13612 (remote_close): Clear remote_desc.
13614 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13616 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13618 (mourn_inferior): Define.
13619 (target_process_qsupported): Avoid the dangling else problem.
13620 (thread_stopped): Define.
13621 (pause_all): Define.
13622 (target_waitstatus_to_string): Declare.
13623 * target.c (target_waitstatus_to_string): New.
13625 * tracepoint.c (tracing): Make extern.
13626 (disconnected_tracing): New.
13627 (stop_tracing): Make extern. Handle tracing stops due to GDB
13629 (cmd_qtdisconnected): New.
13630 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13631 (handle_tracepoint_general_set): Handle QTDisconnected.
13633 * event-loop.c (event_handler_func): Change return type to int.
13634 (process_event): Bail out if the event handler wants the event
13636 (handle_file_event): Ditto.
13637 (start_event_loop): Bail out if the event handler wants the event
13640 * nto-low.c (nto_target_ops): Adjust.
13641 * spu-low.c (spu_wait): Don't remove the process here.
13642 (spu_target_ops): Adjust.
13643 * win32-low.c (win32_wait): Don't remove the process here.
13644 (win32_target_ops): Adjust.
13646 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13648 * regcache.c (realloc_register_cache): Invalidate inferior's
13649 regcache before recreating it.
13651 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13653 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13655 2010-04-09 Stan Shebs <stan@codesourcery.com>
13656 Pedro Alves <pedro@codesourcery.com>
13658 * server.h (LONGEST): New.
13659 (struct thread_info) <while_stepping>: New field.
13660 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13662 (initialize_tracepoint, handle_tracepoint_general_set)
13663 (handle_tracepoint_query, tracepoint_finished_step)
13664 (tracepoint_was_hit, release_while_stepping_state_list):
13665 (current_traceframe): Declare.
13666 * server.c (handle_general_set): Handle tracepoint packets.
13667 (read_memory): New.
13668 (write_memory): New.
13669 (handle_search_memory_1): Use read_memory.
13670 (handle_query): Report support for conditional tracepoints, trace
13671 state variables, and tracepoint sources. Handle tracepoint
13673 (main): Initialize the tracepoints module.
13674 (process_serial_event): Handle traceframe reads/writes.
13676 * linux-low.c (handle_tracepoints): New.
13677 (linux_wait_1): Call it.
13678 (linux_resume_one_lwp): Handle while-stepping.
13679 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13680 (linux_target_ops): Install them.
13681 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13683 * linux-x86-low.c (x86_supports_tracepoints): New.
13684 (the_low_target). Install it.
13686 * mem-break.h (delete_breakpoint): Declare.
13687 * mem-break.c (delete_breakpoint): Make external.
13689 * target.h (struct target_ops): Add `supports_tracepoints',
13690 `read_pc', and `write_pc' fields.
13691 (target_supports_tracepoints): Define.
13692 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13695 * regcache.h (struct regcache) <registers_owned>: New field.
13696 (init_register_cache, regcache_cpy): Declare.
13697 (regcache_read_pc, regcache_write_pc): Declare.
13698 (register_cache_size): Declare.
13699 (supply_regblock): Declare.
13700 * regcache.c (init_register_cache): New.
13701 (new_register_cache): Use it.
13702 (regcache_cpy): New.
13703 (register_cache_size): New.
13704 (supply_regblock): New.
13705 (regcache_read_pc, regcache_write_pc): New.
13707 * tracepoint.c: New.
13709 * Makefile.in (OBS): Add tracepoint.o.
13710 (tracepoint.o): New rule.
13712 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13714 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13716 (i386-mmx.c): Likewise.
13717 (i386-mmx-linux.o): Likewise.
13718 (i386-mmx-linux.c): Likewise.
13720 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13721 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13722 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13723 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13725 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13726 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13727 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13729 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13731 * Makefile.in (clean): Updated.
13733 (i386-avx.c): Likewise.
13734 (i386-avx-linux.o): Likewise.
13735 (i386-avx-linux.c): Likewise.
13736 (amd64-avx.o): Likewise.
13737 (amd64-avx.c): Likewise.
13738 (amd64-avx-linux.o): Likewise.
13739 (amd64-avx-linux.c): Likewise.
13741 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13742 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13743 (srv_amd64_regobj): Add amd64-avx.o.
13744 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13745 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13746 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13747 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13748 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13749 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13750 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13752 * i387-fp.c: Include "i386-xstate.h".
13754 (i387_cache_to_xsave): Likewise.
13755 (i387_xsave_to_cache): Likewise.
13756 (x86_xcr0): Likewise.
13758 * i387-fp.h (i387_cache_to_xsave): Likewise.
13759 (i387_xsave_to_cache): Likewise.
13760 (x86_xcr0): Likewise.
13762 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13763 * linux-crisv32-low.c (target_regsets): Likewise.
13764 * linux-m68k-low.c (target_regsets): Likewise.
13765 * linux-mips-low.c (target_regsets): Likewise.
13766 * linux-ppc-low.c (target_regsets): Likewise.
13767 * linux-s390-low.c (target_regsets): Likewise.
13768 * linux-sh-low.c (target_regsets): Likewise.
13769 * linux-sparc-low.c (target_regsets): Likewise.
13770 * linux-xtensa-low.c (target_regsets): Likewise.
13772 * linux-low.c: Include <sys/uio.h>.
13773 (regsets_fetch_inferior_registers): Support nt_type.
13774 (regsets_store_inferior_registers): Likewise.
13775 (linux_process_qsupported): New.
13776 (linux_target_ops): Add linux_process_qsupported.
13778 * linux-low.h (regset_info): Add nt_type.
13779 (linux_target_ops): Add process_qsupported.
13781 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13783 (init_registers_i386_avx_linux): New.
13784 (init_registers_amd64_avx_linux): Likewise.
13785 (xmltarget_i386_linux_no_xml): Likewise.
13786 (xmltarget_amd64_linux_no_xml): Likewise.
13787 (PTRACE_GETREGSET): Likewise.
13788 (PTRACE_SETREGSET): Likewise.
13789 (x86_fill_xstateregset): Likewise.
13790 (x86_store_xstateregset): Likewise.
13791 (use_xml): Likewise.
13792 (x86_linux_update_xmltarget): Likewise.
13793 (x86_linux_process_qsupported): Likewise.
13794 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13795 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13796 init_registers_i386_linux here. Call
13797 x86_linux_update_xmltarget.
13798 (the_low_target): Add x86_linux_process_qsupported.
13800 * server.c (handle_query): Call target_process_qsupported.
13802 * target.h (target_ops): Add process_qsupported.
13803 (target_process_qsupported): New.
13805 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13807 * inferiors.c (add_thread): Set last_status kind to
13808 TARGET_WAITKIND_IGNORE.
13809 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13810 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13811 (linux_wait_1): Move `thread' local definition to block that uses
13812 it. Don't NULL initialize `event_child'.
13813 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13814 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13815 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13817 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13819 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13820 an extended waitstatus, or by a watchpoint.
13821 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13822 thread was stepping or has been stopped by a watchpoint.
13824 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13826 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13827 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13828 of another, then delete the previous, and validate all
13830 (validate_inserted_breakpoint): New.
13831 (delete_disabled_breakpoints): New.
13832 (validate_breakpoints): New.
13833 (check_mem_read): Validate breakpoints before trusting their
13834 shadow. Delete disabled breakpoints.
13835 (check_mem_write): Validate breakpoints before trusting they
13836 should be inserted. Delete disabled breakpoints.
13837 * mem-break.h (validate_breakpoints):
13838 * server.c (handle_query): Validate breakpoints when we see a
13841 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13843 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13844 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13845 if we could tell there's a GDB breakpoint at stop_pc.
13846 (need_step_over_p): Don't do a step over if we find a GDB
13847 breakpoint at the resume PC.
13849 * mem-break.c (struct raw_breakpoint): New.
13850 (enum bkpt_type): New type `gdb_breakpoint'.
13851 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13852 fields. New field `raw'.
13853 (find_raw_breakpoint_at): New.
13854 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13855 breakpoint instead.
13856 (set_breakpoint_at): Adjust.
13857 (delete_raw_breakpoint): New.
13858 (release_breakpoint): New.
13859 (delete_breakpoint): Rename to...
13860 (delete_breakpoint_1): ... this. Add proc parameter. Use
13861 release_breakpoint. Return ENOENT.
13862 (delete_breakpoint): Reimplement.
13863 (find_breakpoint_at): Delete.
13864 (find_gdb_breakpoint_at): New.
13865 (delete_breakpoint_at): Delete.
13866 (set_gdb_breakpoint_at): New.
13867 (delete_gdb_breakpoint_at): New.
13868 (gdb_breakpoint_here): New.
13869 (set_reinsert_breakpoint): Use release_breakpoint.
13870 (uninsert_breakpoint): Rename to ...
13871 (uninsert_raw_breakpoint): ... this.
13872 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13873 (reinsert_raw_breakpoint): Change parameter type to
13875 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13877 (check_breakpoints): Adjust. Use release_breakpoint.
13878 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13879 (breakpoint_inserted_here): Ditto.
13880 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13881 Don't trust the breakpoint's shadow if it is not inserted.
13882 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13883 (delete_all_breakpoints): Adjust.
13884 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13885 use delete_breakpoint_1.
13887 * mem-break.h (breakpoints_supported): Delete declaration.
13888 (set_gdb_breakpoint_at): Declare.
13889 (gdb_breakpoint_here): Declare.
13890 (delete_breakpoint_at): Delete.
13891 (delete_gdb_breakpoint_at): Declare.
13893 * server.h (struct raw_breakpoint): Forward declare.
13894 (struct process_info): New field `raw_breakpoints'.
13896 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13899 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13901 * linux-low.c (status_pending_p_callback): Fix comment.
13902 (linux_wait_for_event_1): Move most of the internal breakpoint
13903 handling from here...
13904 (linux_wait_1): ... to here.
13905 (count_events_callback): New.
13906 (select_singlestep_lwp_callback): New.
13907 (select_event_lwp_callback): New.
13908 (cancel_breakpoints_callback): New.
13909 (select_event_lwp): New.
13910 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13911 priority to all LWPs that have had events that should be reported
13912 to the client. Cancel breakpoints when about to reporting the
13913 event to the client, not while stopping lwps. No longer cancel
13914 finished single-steps here.
13915 (cancel_finished_single_step): Delete.
13916 (cancel_finished_single_steps): Delete.
13918 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13920 * mem-break.c (enum bkpt_type): New.
13921 (struct breakpoint): New field `type'.
13922 (set_breakpoint_at): Change return type to struct breakpoint
13923 pointer. Set type to `other_breakpoint' by default.
13924 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13925 in the breakpoint list.
13926 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13927 (reinsert_breakpoint): Rename to ...
13928 (reinsert_raw_breakpoint): ... this.
13929 (reinsert_breakpoints_at): Adjust.
13930 * mem-break.h (struct breakpoint): Declare.
13931 (set_breakpoint_at): Change return type to struct breakpoint
13934 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13936 * server.c (handle_query): Assign, not compare.
13938 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13940 Teach linux gdbserver to step-over-breakpoints.
13942 * linux-low.c (can_hardware_single_step): New.
13943 (supports_breakpoints): New.
13944 (handle_extended_wait): If stopping threads, read the stop pc of
13945 the new cloned LWP.
13947 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13948 low target doesn't support retrieving the PC.
13949 (add_lwp): Set last_resume_kind to resume_continue.
13950 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13951 (linux_attach): Don't clear stop_expected. Set the lwp's
13952 last_resume_kind to resume_stop.
13953 (linux_detach_one_lwp): Don't check for removed breakpoints.
13954 (check_removed_breakpoint): Delete.
13955 (status_pending_p): Rename to ...
13956 (status_pending_p_callback): ... this. Don't check for removed
13957 breakpoints. Don't consider threads that are stopped from GDB's
13959 (linux_wait_for_lwp): Always read the stop_pc here.
13960 (cancel_breakpoint): New.
13961 (step_over_bkpt): New global.
13962 (linux_wait_for_event_1): Implement stepping over breakpoints.
13963 (gdb_wants_lwp_stopped): New.
13964 (gdb_wants_all_stopped): New.
13965 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13966 single-step traps here. Store the thread's last reported target
13968 (send_sigstop): Don't clear stop_expected. Always set it,
13970 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13971 (cancel_finished_single_step): New.
13972 (cancel_finished_single_steps): New.
13973 (wait_for_sigstop): Don't cancel finished single-step traps here.
13974 (linux_resume_one_lwp): Don't check for removed breakpoints.
13975 Don't set `step' on non-hardware step archs.
13976 (linux_set_resume_request): Ignore resume_stop requests if already
13977 stopping or stopped. Set the lwp's last_resume_kind.
13978 (resume_status_pending_p): Don't check for removed breakpoints.
13979 (need_step_over_p): New.
13980 (start_step_over): New.
13981 (finish_step_over): New.
13982 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13983 requests. Clear the thread's last reported target waitstatus.
13984 Don't use the `suspended' flag. Don't consider pending breakpoints.
13985 (linux_resume): Start a step-over if necessary.
13986 (proceed_one_lwp): New.
13987 (proceed_all_lwps): New.
13988 (unstop_all_lwps): New.
13989 * linux-low.h (struct lwp_info): Rewrite comment for the
13990 `suspended' flag. Add the `stop_pc' field. Delete the
13991 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13992 Add `'last_resume_kind' and `need_step_over' fields.
13993 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13994 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13995 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13996 (set_raw_breakpoint_at): New.
13997 (set_breakpoint_at): Rewrite to use it.
13998 (reinsert_breakpoint_handler): Delete.
13999 (set_reinsert_breakpoint): New.
14000 (reinsert_breakpoint_by_bp): Delete.
14001 (delete_reinsert_breakpoints): New.
14002 (uninsert_breakpoint): Rewrite.
14003 (uninsert_breakpoints_at): New.
14004 (reinsert_breakpoint): Rewrite.
14005 (reinsert_breakpoints_at): New.
14006 (check_breakpoints): Rewrite.
14007 (breakpoint_here): New.
14008 (breakpoint_inserted_here): New.
14009 (check_mem_read): Adjust.
14010 * mem-break.h (breakpoints_supported, breakpoint_here)
14011 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14012 (reinsert_breakpoint_by_bp): Delete declaration.
14013 (delete_reinsert_breakpoints): Declare.
14014 (reinsert_breakpoint): Delete declaration.
14015 (reinsert_breakpoints_at): Declare.
14016 (uninsert_breakpoint): Delete declaration.
14017 (uninsert_breakpoints_at): Declare.
14018 (check_breakpoints): Adjust prototype.
14019 * server.h: Adjust include order.
14020 (struct thread_info): Declare here. Add a `last_status' field.
14022 2010-03-23 Michael Snyder <msnyder@vmware.com>
14024 * server.c (crc32): New function.
14025 (handle_query): Add handling for 'qCRC:' request.
14027 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14029 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14030 lwp had been stopped by a watchpoint.
14032 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14034 * server.h (internal_error): Declare.
14035 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14036 * utils.c (internal_error): New function.
14038 2010-03-15 Andreas Schwab <schwab@redhat.com>
14040 * configure.srv: Fix typo setting srv_regobj.
14042 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14044 * linux-low.c (fetch_register): Avoid passing a non string literal
14046 (usr_store_inferior_registers): Ditto.
14048 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14050 * linux-low.c (linux_write_memory): Bail out early if peeking
14053 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14055 * linux-low.h (struct lwp_info): New fields
14056 `stopped_by_watchpoint' and `stopped_data_address'.
14057 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14058 here, and cache them in the lwp object.
14059 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14061 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14063 (linux_stopped_by_watchpoint): Rewrite.
14064 (linux_stopped_data_address): Rewrite.
14066 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14068 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14069 switching the current inferior, not before.
14071 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14073 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14074 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14075 i386-linux.c and amd64-linux.c.
14076 (reg-i386.o): Removed.
14077 (reg-i386.c): Likewise.
14078 (reg-i386-linux.o): Likewise.
14079 (reg-i386-linux.c): Likewise.
14080 (reg-x86-64.o): Likewise.
14081 (reg-x86-64.c): Likewise.
14082 (reg-x86-64-linux.o): Likewise.
14083 (reg-x86-64-linux.c): Likewise.
14085 (i386.c): Likewise.
14086 (i386-linux.o): Likewise.
14087 (i386-linux.c): Likewise.
14088 (amd64.o): Likewise.
14089 (amd64.c): Likewise.
14090 (amd64-linux.o): Likewise.
14091 (amd64-linux.c): Likewise.
14093 * configure.srv (srv_i386_regobj): New.
14094 (srv_i386_linux_regobj): Likewise.
14095 (srv_amd64_regobj): Likewise.
14096 (srv_amd64_linux_regobj): Likewise.
14097 (srv_i386_32bit_xmlfiles): Likewise.
14098 (srv_i386_64bit_xmlfiles): Likewise.
14099 (srv_i386_xmlfiles): Likewise.
14100 (srv_amd64_xmlfiles): Likewise.
14101 (srv_i386_linux_xmlfiles): Likewise.
14102 (srv_amd64_linux_xmlfiles): Likewise.
14103 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14104 srv_xmlfiles to $srv_i386_xmlfiles.
14105 (i[34567]86-*-mingw32ce*): Likewise.
14106 (i[34567]86-*-mingw*): Likewise.
14107 (i[34567]86-*-nto*): Likewise.
14108 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14109 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14110 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14111 (x86_64-*-linux*): Likewise.
14113 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14114 (init_registers_amd64_linux): New.
14115 (x86_arch_setup): Replace init_registers_x86_64_linux with
14116 init_registers_amd64_linux.
14118 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14120 * configure.ac: Check for libdl. If it is not available link against
14121 static libthread_db.
14122 * configure: Regenerate.
14124 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14128 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14129 handing a read watchpoint.
14130 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14132 2010-02-12 Doug Evans <dje@google.com>
14134 * linux-low.c (linux_supports_tracefork_flag): Document.
14135 (linux_look_up_symbols): Add comment.
14137 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14139 * regcache.c (supply_register): Clear regcache if buf is NULL.
14141 2010-02-02 Nicolas Roche <roche@sourceware.org>
14142 Joel Brobecker <brobecker@adacore.com>
14144 * inferiors.c (find_inferior): Add function documentation.
14145 (unloaded_dll): Handle the case where the unloaded dll has not
14146 been previously registered in the dll list.
14148 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14150 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14151 (thumb2_breakpoint): New.
14152 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14154 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14156 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14157 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14160 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14162 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14164 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14166 * linux-s390-low.c (s390_collect_ptrace_register)
14167 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14169 2010-01-21 Doug Evans <dje@google.com>
14171 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14172 (PTRACE_ARG4_TYPE): New macro.
14173 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14174 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14175 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14176 (usr_store_inferior_registers): Ditto.
14177 (linux_read_memory, linux_write_memory): Ditto.
14178 (linux_test_for_tracefork): Ditto.
14180 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14181 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14183 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14185 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14188 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14190 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14191 prototype to take a regcache. Adjust.
14193 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14195 * regcache.h (struct thread_info): Forward declare.
14196 (struct regcache): New.
14197 (new_register_cache): Adjust prototype.
14198 (get_thread_regcache): Declare.
14199 (free_register_cache): Adjust prototype.
14200 (registers_to_string, registers_from_string): Ditto.
14201 (supply_register, supply_register_by_name, collect_register)
14202 (collect_register_as_string, collect_register_by_name): Ditto.
14203 * regcache.c (struct inferior_regcache_data): Delete.
14204 (get_regcache): Rename to ...
14205 (get_thread_regcache): ... this. Adjust. Switch inferior before
14206 fetching registers.
14207 (regcache_invalidate_one): Adjust.
14208 (regcache_invalidate): Fix prototype.
14209 (new_register_cache): Return the new register cache.
14210 (free_register_cache): Change prototype.
14211 (realloc_register_cache): Adjust.
14212 (registers_to_string): Change prototype to take a regcache. Adjust.
14213 (registers_from_string): Ditto.
14214 (register_data): Ditto.
14215 (supply_register): Ditto.
14216 (supply_register_by_name): Ditto.
14217 (collect_register): Ditto.
14218 (collect_register_as_string): Ditto.
14219 (collect_register_by_name): Ditto.
14220 * server.c (process_serial_event): Adjust.
14221 * linux-low.h (regset_fill_func, regset_store_func): Change
14223 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14225 * linux-low.c (get_stop_pc): Adjust.
14226 (check_removed_breakpoint): Adjust.
14227 (linux_wait_for_event): Adjust.
14228 (linux_resume_one_lwp): Adjust.
14229 (fetch_register): Add regcache parameter. Adjust.
14230 (usr_store_inferior_registers): Ditto.
14231 (regsets_fetch_inferior_registers): Ditto.
14232 (regsets_store_inferior_registers): Ditto.
14233 (linux_fetch_registers, linux_store_registers): Ditto.
14234 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14236 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14238 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14239 prototype to take a regcache.
14240 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14241 * remote-utils.c (convert_ascii_to_int, outreg)
14242 (prepare_resume_reply): Change prototype to take a regcache.
14244 * target.h (struct target_ops) <fetch_registers, store_registers>:
14245 Change prototype to take a regcache.
14246 (fetch_inferior_registers, store_inferior_registers): Change
14247 prototype to take a regcache. Adjust.
14248 * proc-service.c (ps_lgetregs): Adjust.
14249 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14250 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14251 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14252 take a regcache. Adjust.
14253 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14254 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14255 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14256 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14257 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14258 (cris_cannot_fetch_register):
14259 (cris_breakpoint_at): Change prototype to take a regcache.
14261 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14262 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14263 to take a regcache. Adjust.
14264 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14266 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14267 take a regcache. Adjust.
14268 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14269 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14270 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14271 * linux-mips-low.c (mips_get_pc):
14272 (mips_set_pc): Change prototype to take a regcache. Adjust.
14273 (mips_reinsert_addr): Adjust.
14274 (mips_collect_register): Change prototype to take a regcache.
14276 (mips_supply_register):
14277 (mips_collect_register_32bit, mips_supply_register_32bit)
14278 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14279 (mips_store_fpregset): Ditto.
14280 * linux-ppc-low.c (ppc_supply_ptrace_register)
14281 (ppc_supply_ptrace_register): Ditto.
14282 (parse_spufs_run): Adjust.
14283 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14284 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14285 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14286 take a regcache. Adjust.
14287 * linux-s390-low.c (s390_collect_ptrace_register)
14288 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14289 (s390_set_pc): Change prototype to take a regcache. Adjust.
14290 (s390_arch_setup): Adjust.
14291 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14292 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14293 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14294 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14295 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14297 (sparc_breakpoint_at): Adjust.
14298 * linux-xtensa-low.c (xtensa_fill_gregset):
14299 (xtensa_store_gregset):
14300 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14301 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14302 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14303 prototype to take a regcache. Adjust.
14304 * win32-arm-low.c (arm_fetch_inferior_register)
14305 (arm_store_inferior_register): Change prototype to take a
14307 * win32-i386-low.c (i386_fetch_inferior_register)
14308 (i386_store_inferior_register): Change prototype to take a
14310 * win32-low.c (child_fetch_inferior_registers)
14311 (child_store_inferior_registers): Change prototype to take a
14313 (win32_wait): Adjust.
14314 (win32_fetch_inferior_registers): Change prototype to take a
14316 (win32_store_inferior_registers): Adjust.
14317 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14318 store_inferior_register>: Change prototype to take a regcache.
14320 2010-01-20 Doug Evans <dje@google.com>
14322 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14324 (linux_wait_for_event1, linux_init_signals): Ditto.
14325 (W_STOPCODE): Provide definition if missing.
14327 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14329 * linux-low.c (linux_core_of_thread): New.
14330 (compare_ints, show_process, list_threads): New.
14331 (linux_qxfer_osdata): Report threads and cores.
14332 (linux_target_op): Register linux_core_of_thread.
14333 * remote-utils.c (prepare_resume_reply): Report the core.
14334 (buffer_xml_printf): Support %d specifier.
14335 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14337 (handle_query): Handle qXfer:threads. Announce availability
14339 * target.h (struct target_ops): New field core_of_thread.
14341 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14343 * Makefile.in (clean): Remove new generated files.
14344 (reg-s390.o, reg-s390.c): Remove rules.
14345 (reg-s390x.o, reg-s390x.c): Likewise.
14346 (s390-linux32.o, s390-linux32.c): Add rules.
14347 (s390-linux64.o, s390-linux64.c): Likewise.
14348 (s390x-linux64.o, s390x-linux64.c): Likewise.
14349 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14350 * linux-s390-low.c: Include <elf.h>.
14351 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14352 (init_registers_s390): Remove prototype.
14353 (init_registers_s390x): Likewise.
14354 (init_registers_s390_linux32): Add prototype.
14355 (init_registers_s390_linux64): Likewise.
14356 (init_registers_s390x_linux64): Likewise.
14357 (s390_num_regs_3264): New define.
14358 (s390_regmap_3264): New global variable.
14359 (s390_cannot_fetch_register): Remove obsolete check.
14360 (s390_cannot_store_register): Likewise.
14361 (s390_collect_ptrace_register): Handle upper/lower register halves.
14362 (s390_supply_ptrace_register): Likewise.
14363 (s390_fill_gregset): Update to register number changes.
14364 (s390_get_hwcap): New routine.
14365 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14366 Install appropriate regmap and register set.
14368 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14370 * server.c (gdbserver_version): Update copyright year to 2010.
14371 * gdbreplay.c (gdbreplay_version): Likewise.
14373 2009-12-28 Doug Evans <dje@google.com>
14375 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14376 elf/external.h. Include <elf.h> instead but only if necessary.
14378 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14380 * linux-low.c (linux_remove_process): Remove `detaching'
14381 parameter. Don't release/detach from thread_db here.
14382 (linux_kill): Release/detach from thread_db here, ...
14383 (linux_detach): ... and here, before actually detaching.
14384 (linux_wait_1): ... and here, when a process exits.
14385 * thread-db.c (any_thread_of): New.
14386 (thread_db_free): Switch the current inferior to a thread of the
14389 2009-12-21 Doug Evans <dje@google.com>
14391 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14393 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14394 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14395 warning ifndef __NR_tkill. Move setting of errno there too.
14396 Delete unnecessary resetting of errno after syscall.
14397 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14399 * configure.ac: Check for dladdr.
14400 * config.in: Regenerate.
14401 * configure: Regenerate.
14402 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14403 (try_thread_db_load): Update.
14405 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14407 2009-12-18 Doug Evans <dje@google.com>
14409 * event-loop.c: Include unistd.h if it exists.
14411 * linux-low.c (my_waitpid): Move definition away from being in
14412 between linux_tracefork_child/linux_test_for_tracefork.
14414 * gdb_proc_service.h (psaddr_t): Fix type.
14415 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14416 signature to match glibc.
14418 2009-12-16 Doug Evans <dje@google.com>
14420 * linux-low.c (linux_read_memory): Fix argument to read.
14422 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14424 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14425 events, don't leave current_inferior pointing at null.
14427 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14429 * win32-low.c (LOG): Delete.
14430 (OUTMSG): Output to stderr.
14431 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14432 on compile time LOG macro.
14433 (win32_wait): Fix debug output.
14435 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14437 * win32-low.c (win32_add_one_solib): If the dll name is
14438 "ntdll.dll", prepend the system directory to the dll path.
14440 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14442 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14444 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14445 Vladimir Prus <vladimir@codesourcery.com>
14447 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14448 * configure.ac: Check for __mcoldfire__ and set
14449 gdb_cv_m68k_is_coldfire.
14450 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14451 reg-cf.o and reg-m68k.o.
14452 * configure: Regenerated.
14454 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14456 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14457 Pass it to thread_db_free.
14458 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14459 proper `detaching' argument to linux_remove_process.
14460 * linux-low.h (thread_db_free): Add `detaching' parameter.
14461 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14463 (thread_db_free): Add `detaching' parameter. Only
14464 call td_ta_clear_event if detaching from process.
14466 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14468 * thread-db.c (thread_db_free): Fix typo.
14470 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14473 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14475 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14477 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14478 with an i686 compiler.
14479 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14481 * configure: Rebuilt.
14483 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14487 * server.c (handle_search_memory_1): Correct read_addr initialization
14488 in loop for searching subsequent chunks.
14490 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14492 * configure.ac: New --with-libthread-db option.
14493 * thread-db.c: Allow direct dependence on libthread_db.
14494 (thread_db_free): Adjust.
14495 * config.in: Regenerate.
14496 * configure: Likewise.
14498 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14501 * thread-db.c (attach_thread): New function.
14502 (maybe_attach_thread): Return success/failure.
14503 (find_new_threads_callback): Adjust.
14504 (thread_db_find_new_threads): Loop until no new threads.
14506 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14508 * proc-service.c (ps_lgetregs): Formatting.
14510 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14512 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14513 * configure.ac: Adjust.
14514 * linux-low.h (struct process_info_private): Move members to struct
14516 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14517 * linux-low.c (linux_remove_process): Adjust.
14518 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14519 * server.c (handle_query): Move code ...
14520 (handle_monitor_command): ... here. New function.
14521 * target.h (struct target_ops): New member.
14522 * thread-db.c (struct thread_db): New.
14523 (libthread_db_search_path): New variable.
14524 (thread_db_create_event, thread_db_enable_reporting)
14525 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14526 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14527 (try_thread_db_load_1, dladdr_to_soname): New functions.
14528 (try_thread_db_load, thread_db_load_search): New functions.
14529 (thread_db_init): Search for libthread_db.
14530 (thread_db_free): New function.
14531 (thread_db_handle_monitor_command): Likewise.
14532 * config.in: Regenerate.
14533 * configure: Regenerate.
14535 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14537 * spu-low.c (spu_kill): Wait for inferior to terminate.
14538 Call clear_inferiors.
14539 (spu_detach): Call clear_inferiors.
14541 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14543 * aclocal.m4: Regenerate.
14544 * config.in: Likewise.
14545 * configure: Likewise.
14547 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14549 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14550 (parse_spufs_run): New function.
14551 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14552 (ppc_breakpoint_at): Handle SPU breakpoints.
14554 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14556 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14557 (SPUFS_MAGIC): Define.
14558 (spu_enumerate_spu_ids): New function.
14559 (linux_qxfer_spu): New function.
14560 (linux_target_ops): Install linux_qxfer_spu.
14562 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14564 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14565 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14566 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14567 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14568 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14569 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14570 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14571 (init_registers_powerpc_cell32l): Add prototype.
14572 (init_registers_powerpc_cell64l): Likewise.
14573 (ppc_arch_setup): Detect Cell/B.E. architecture.
14575 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14577 * Makefile.in (datarootdir): New variable.
14579 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14581 * linux-low.c (linux_write_memory): Update debugging output.
14582 * Makefile.in (clean): Add new descriptions.
14583 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14584 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14585 * configure.srv: Add new files for arm*-*-linux*.
14586 * linux-arm-low.c: Add new declarations.
14587 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14588 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14589 (HWCAP_VFPv3D16): New.
14590 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14591 instead of __IWMMXT__.
14592 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14593 (arm_arch_setup): New.
14594 (target_regsets): Remove #ifdef. Add VFP regset.
14595 (the_low_target): Use arm_arch_setup.
14597 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14599 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14600 the main thread again.
14602 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14604 Adding Neutrino gdbserver.
14605 * configure: Regenerated.
14606 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14607 * configure.srv (i[34567]86-*-nto*): New target.
14608 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14609 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14610 (nto_comctrl) [__QNX__]: New function.
14611 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14613 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14615 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14618 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14619 Pedro Alves <pedro@codesourcery.com>
14621 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14622 don't support CONTEXT_EXTENDED_REGISTERS.
14623 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14624 (the_low_target): Install them.
14625 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14626 failing with ERROR_PIPE_NOT_CONNECTED.
14628 2009-06-30 Doug Evans <dje@google.com>
14629 Pierre Muller <muller@ics.u-strasbg.fr>
14631 Add h/w watchpoint support to x86-linux, win32-i386.
14632 * Makefile.in (SFILES): Add i386-low.c
14633 (i386_low_h): Define.
14634 (i386-low.o): Add dependencies.
14635 (linux-x86-low.o): Add i386-low.h dependency.
14636 (win32-i386-low.o): Ditto.
14637 * i386-low.c: New file.
14638 * i386-low.h: New file.
14639 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14640 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14641 * linux-low.c (linux_add_process): Initialize arch_private.
14642 (linux_remove_process): Free arch_private.
14643 (add_lwp): Initialize arch_private.
14644 (delete_lwp): Free arch_private.
14645 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14647 * linux-low.h (process_info_private): New member arch_private.
14648 (lwp_info): New member arch_private.
14649 (linux_target_ops): New members new_process, new_thread,
14651 (ptid_of): New macro.
14652 * linux-x86-low.c: Include stddef.h, i386-low.h.
14653 (arch_process_info): New struct.
14654 (arch_lwp_info): New struct.
14655 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14656 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14657 (i386_dr_low_get_status): New function.
14658 (x86_insert_point, x86_remove_point): New functions.
14659 (x86_stopped_by_watchpoint): New function.
14660 (x86_stopped_data_address): New function.
14661 (x86_linux_new_process, x86_linux_new_thread): New functions.
14662 (x86_linux_prepare_to_resume): New function.
14663 (the_low_target): Add entries for insert_point, remove_point,
14664 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14666 * server.c (debug_hw_points): New global.
14667 (monitor_show_help): Document set debug-hw-points.
14668 (handle_query): Process "set debug-hw-points".
14669 * server.h (debug_hw_points): Declare.
14670 (paddress): Declare.
14671 * utils.c (NUMCELLS, CELLSIZE): New macros.
14672 (get_sell, xsnprintf, paddress): New functions.
14673 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14674 remove_point, stopped_by_watchpoint, stopped_data_address.
14675 * win32-i386-low.c: Include i386-low.h.
14676 (debug_reg_state): Replaces dr.
14677 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14678 (i386_dr_low_get_status): New function.
14679 (i386_insert_point, i386_remove_point): New functions.
14680 (i386_stopped_by_watchpoint): New function.
14681 (i386_stopped_data_address): New function.
14682 (i386_initial_stuff): Update.
14683 (get_thread_context,set_thread_context,i386_thread_added): Update.
14684 (the_low_target): Add entries for insert_point,
14685 remove_point, stopped_by_watchpoint, stopped_data_address.
14686 * win32-low.c (win32_insert_watchpoint): New function.
14687 (win32_remove_watchpoint): New function.
14688 (win32_stopped_by_watchpoint): New function.
14689 (win32_stopped_data_address): New function.
14690 (win32_target_ops): Add entries for insert_watchpoint,
14691 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14692 * win32-low.h (win32_target_ops): New members insert_point,
14693 remove_point, stopped_by_watchpoint, stopped_data_address.
14695 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14697 * server.c (process_serial_event): Re-return unsupported, not
14698 error, if the type isn't recognized. Re-allow supporting only
14699 insert or remove packets. Also call require_running for
14700 breakpoints. Add missing break statement to default case. Tidy.
14701 * target.h (struct target_ops): Rename insert_watchpoint to
14702 insert_point, and remove_watchpoint to remove_point.
14704 * linux-low.h (struct linux_target_ops): Likewise.
14705 * linux-low.c (linux_insert_watchpoint): Rename to ...
14706 (linux_insert_point): ... this. Adjust.
14707 (linux_remove_watchpoint): Rename to ...
14708 (linux_remove_point): ... this. Adjust.
14709 (linux_target_ops): Adjust.
14710 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14711 (cris_insert_point): ... this.
14712 (cris_remove_watchpoint): Rename to ...
14713 (cris_remove_point): ... this.
14714 (the_low_target): Adjust.
14716 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14718 * server.c (handle_v_kill): Pass signal_pid to
14719 kill_inferior if multi_process is zero.
14721 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14723 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14724 * target.h (target_ops): Comment for *_watchpoint to make it clear
14725 the functions can get types '0' and '1'.
14727 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14729 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14730 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14731 * regcache.c (get_regcache): Likewise.
14732 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14733 * win32-low.c (child_fetch_inferior_registers): Remove check for
14736 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14737 Pedro Alves <pedro@codesourcery.com>
14739 * target.h (struct target_ops) <supports_multi_process>: New
14741 (target_supports_multi_process): New.
14742 * server.c (handle_query): Even if GDB reports support, only
14743 enable multi-process if the target also supports it. Report
14744 multi-process support only if the target backend supports it.
14745 * linux-low.c (linux_supports_multi_process): New function.
14746 (linux_target_ops): Install it as target_supports_multi_process
14749 2009-05-24 Doug Evans <dje@google.com>
14751 Global renaming of find_thread_pid to find_thread_ptid.
14752 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14753 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14754 All callers updated.
14756 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14757 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14760 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14761 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14762 (linux_resume_one_lwp): Ditto.
14764 2009-05-23 Doug Evans <dje@google.com>
14766 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14767 from struct inferior_list_entry * to struct lwp_info *.
14768 All callers updated.
14770 2009-05-13 Doug Evans <dje@google.com>
14772 * linux-x86-low.c: Don't include assert.h.
14773 (x86_siginfo_fixup): Use fatal, not assert.
14774 (x86_arch_setup): Fix comment.
14776 2009-05-12 Doug Evans <dje@google.com>
14778 Biarch support for i386/amd64 gdbserver.
14779 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14780 Add linux-x86-low.c.
14781 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14782 (linux-x86-low.o): Add.
14783 * linux-x86-64-low.c: Delete.
14784 * linux-i386-low.c: Delete.
14785 * linux-x86-low.c: New file.
14786 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14788 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14790 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14791 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14792 (linux_child_pid_to_exec_file): New function.
14793 (elf_64_header_p, elf_64_file_p): New functions.
14794 (siginfo_fixup): New function.
14795 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14796 give target a chance to convert layout.
14797 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14798 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14800 2009-05-07 Doug Evans <dje@google.com>
14802 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14803 (regsets_store_inferior_registers): Ditto.
14805 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14809 * linux-low.c (must_set_ptrace_flags): Delete.
14810 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14812 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14813 `lwp->must_set_ptrace_flags' instead.
14814 (linux_wait_for_event_1): Set ptrace options here.
14815 (linux_wait_1): ... not here.
14817 2009-04-30 Doug Evans <dje@google.com>
14819 * inferiors.c (started_inferior_callback): New function.
14820 (attached_inferior_callback): New function.
14821 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14822 * server.c (print_started_pid, print_attached_pid): New functions.
14823 (detach_or_kill_for_exit): New function.
14824 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14825 * server.h (have_started_inferiors_p): Declare.
14826 (have_attached_inferiors_p): Declare.
14828 * inferiors.c (remove_process): Fix memory leak, free process.
14829 * linux-low.c (linux_remove_process): New function.
14830 (linux_kill): Call it instead of remove_process.
14831 (linux_detach, linux_wait_1): Ditto.
14833 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14835 * configure.srv: Add x86 Windows CE target.
14837 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14839 * inferiors.c (get_thread_process): Make global.
14840 * server.h (get_thread_process): Add prototype.
14841 * thread-db.c (find_one_thread): Use get_thread_process
14842 instead of current_process.
14843 (thread_db_get_tls_address): Do not crash if called when
14844 thread layer is not yet initialized.
14846 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14848 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14849 * spu-low.c (current_tid): Rename to ...
14850 (current_ptid): ... this.
14851 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14852 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14853 ptid_get_lwp (current_ptid) instead of current_tid.
14854 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14855 instead of current_tid. Use find_process_pid to verify pid
14856 argument is valid. Pass proper argument to remove_process.
14857 (spu_thread_alive): Compare current_ptid instead of current_tid.
14858 (spu_resume): Likewise.
14860 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14862 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14865 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14867 Implement the multiprocess extensions, and add linux multiprocess
14870 * server.h (ULONGEST): Declare.
14871 (struct ptid, ptid_t): New.
14872 (minus_one_ptid, null_ptid): Declare.
14873 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14874 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14875 (struct inferior_list_entry): Change `id' type from unsigned from
14877 (struct sym_cache, struct breakpoint, struct
14878 process_info_private): Forward declare.
14879 (struct process_info): Declare.
14880 (current_process): Declare.
14881 (all_processes): Declare.
14882 (initialize_inferiors): Declare.
14883 (add_thread): Adjust to use ptid_t.
14884 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14885 (add_process, remove_process, find_thread_pid): Declare.
14886 (find_inferior_id): Adjust to use ptid_t.
14887 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14888 (multi_process): Declare.
14889 (push_event): Adjust to use ptid_t.
14890 (read_ptid, write_ptid): Declare.
14891 (prepare_resume_reply): Adjust to use ptid_t.
14892 (clear_symbol_cache): Declare.
14893 * inferiors.c (all_processes): New.
14894 (null_ptid, minus_one_ptid): New.
14895 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14896 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14897 (add_thread): Change unsigned long to ptid. Remove gdb_id
14899 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14900 (gdb_id_to_thread): Rename to ...
14901 (find_thread_pid): ... this. Change unsigned long to ptid.
14902 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14903 (loaded_dll, pull_pid_from_list): Adjust.
14904 (add_process, remove_process, find_process_pid)
14905 (get_thread_process, current_process, initialize_inferiors): New.
14906 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14907 (struct target_waitstatus) <related_pid>: Ditto.
14908 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14909 return type to int.
14910 (struct target_ops) <join>: Add `pid' argument.
14911 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14912 (struct target_ops) <wait>: Add `ptid' field. Change return type
14914 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14915 (mywait): Add `ptid' argument. Change return type to ptid_t.
14916 (target_pid_to_str): Declare.
14917 * target.c (set_desired_inferior): Adjust to use ptids.
14918 (mywait): Add new `ptid' argument. Adjust.
14919 (target_pid_to_str): New.
14920 * mem-break.h (free_all_breakpoints): Declare.
14921 * mem-break.c (breakpoints): Delelete.
14922 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14923 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14924 to use per-process breakpoint list.
14925 (free_all_breakpoints): New.
14926 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14927 (symbol_cache, all_symbols_looked_up): Delete.
14929 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14931 (prepare_resume_reply): Change ptid argument's type from unsigned
14932 long to ptid_t. Adjust. Implement W;process and X;process.
14933 (free_sym_cache, clear_symbol_cache): New.
14934 (look_up_one_symbol): Adjust to per-process symbol cache. *
14935 * server.c (cont_thread, general_thread, step_thread): Change type
14937 (attached): Delete.
14938 (multi_process): New.
14939 (last_ptid): Change type to ptid_t.
14940 (struct vstop_notif) <ptid>: Change type to ptid_t.
14941 (queue_stop_reply, push_event): Change `ptid' argument's type to
14943 (discard_queued_stop_replies): Add `pid' argument.
14944 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14945 changes. Don't reference the `attached' global.
14946 (attach_inferior): Adjust to mywait interface changes.
14947 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14948 features. Handle and report "multiprocess+". Handle
14950 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14952 (handle_v_kill): New.
14953 (handle_v_stopped): Adjust to use target_pid_to_str.
14954 (handle_v_requests): Allow multiple attaches and runs when
14955 multiprocess extensions are in effect. Handle "vKill".
14956 (myresume): Adjust to use ptids.
14957 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14958 (handle_status): Adjust to discard_queued_stop_replies interface
14960 (first_thread_of, kill_inferior_callback)
14961 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14962 (main): Call initialize_inferiors. Adjust to use ptids, killing
14963 and detaching from all inferiors. Handle multiprocess packet
14965 * linux-low.h: Include gdb_proc_service.h.
14966 (struct process_info_private): New.
14967 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14968 <lwpid_of>: Use ptid_get_lwp.
14969 (get_lwp_thread): Adjust.
14970 (struct lwp_info): Add `dead' member.
14971 (find_lwp_pid): Declare.
14972 * linux-low.c (thread_db_active): Delete.
14973 (new_inferior): Adjust comment.
14974 (inferior_pid): Delete.
14975 (linux_add_process): New.
14976 (handle_extended_wait): Adjust.
14977 (add_lwp): Change unsigned long to ptid.
14978 (linux_create_inferior): Add process to processes table. Adjust
14979 to use ptids. Don't set new_inferior here.
14980 (linux_attach_lwp): Rename to ...
14981 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14982 it. Adjust to use ptids.
14983 (linux_attach_lwp): New.
14984 (linux_attach): Add process to processes table. Don't set
14986 (struct counter): New.
14987 (second_thread_of_pid_p, last_thread_of_process_p): New.
14988 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14989 multiple processes.
14990 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14991 processes. Remove process from process table.
14992 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14993 to multiple processes.
14994 (any_thread_of): New.
14995 (linux_detach): Add `pid' argument, and handle it. Remove process
14996 from processes table.
14997 (linux_join): Add `pid' argument. Handle it.
14998 (linux_thread_alive): Change unsighed long argument to ptid_t.
14999 Consider dead lwps as not being alive.
15000 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15001 threads we're not interested in.
15002 (same_lwp, find_lwp_pid): New.
15003 (linux_wait_for_lwp): Change `pid' argument's type from int to
15005 (linux_wait_for_event): Rename to ...
15006 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15007 from int to ptid_t. Adjust.
15008 (linux_wait_for_event): New.
15009 (linux_wait_1): Add `ptid' argument. Change return type to
15010 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15011 that exit from the process table.
15012 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15014 (mark_lwp_dead): New.
15015 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15016 stopping all threads, mark its main lwp as dead.
15017 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15019 (fetch_register, usr_store_inferior_registers)
15020 (regsets_fetch_inferior_registers)
15021 (regsets_store_inferior_registers, linux_read_memory)
15022 (linux_write_memory): Inline `inferior_pid'.
15023 (linux_look_up_symbols): Adjust to use per-process
15024 `thread_db_active'.
15025 (linux_request_interrupt): Adjust to use ptids.
15026 (linux_read_auxv): Inline `inferior_pid'.
15027 (initialize_low): Don't reference thread_db_active.
15028 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15029 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15030 (ps_getpid): Return the pid of the current inferior.
15031 * thread-db.c (proc_handle, thread_agent): Delete.
15032 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15034 (find_one_thread): Change argument type to ptid_t. Adjust to
15036 (maybe_attach_thread): Adjust to per-process data and ptids.
15037 (thread_db_find_new_threads): Ditto.
15038 (thread_db_init): Ditto.
15039 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15040 processes table. Adjust to use ptids.
15041 (spu_kill, spu_detach): Adjust interface. Remove process from
15043 (spu_join, spu_thread_alive): Adjust interface.
15044 (spu_wait): Adjust interface. Remove process from processes
15045 table. Adjust to use ptids.
15046 * win32-low.c (current_inferior_tid): Delete.
15047 (current_inferior_ptid): New.
15048 (debug_event_ptid): New.
15049 (thread_rec): Take a ptid. Adjust.
15050 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15051 (child_delete_thread): Ditto.
15052 (do_initial_child_stuff): Add `attached' argument. Add process to
15054 (child_fetch_inferior_registers, child_store_inferior_registers):
15056 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15057 (win32_attach): Pass 1 to do_initial_child_stuff.
15058 (win32_kill): Adjust interface. Remove process from processes
15060 (win32_detach): Ditto.
15061 (win32_join): Adjust interface.
15062 (win32_thread_alive): Take a ptid.
15063 (win32_resume): Adjust to use ptids.
15064 (get_child_debug_event): Ditto.
15065 (win32_wait): Adjust interface. Remove exiting process from
15068 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15070 Non-stop mode support.
15072 * server.h (non_stop): Declare.
15073 (gdb_client_data, handler_func): Declare.
15074 (delete_file_handler, add_file_handler, start_event_loop):
15076 (handle_serial_event, handle_target_event, push_event)
15077 (putpkt_notif): Declare.
15078 * target.h (enum resume_kind): New.
15079 (struct thread_resume): Replace `step' field by `kind' field.
15080 (TARGET_WNOHANG): Define.
15081 (struct target_ops) <wait>: Add `options' argument.
15082 <supports_non_stop, async, start_non_stop>: New fields.
15083 (target_supports_non_stop, target_async): New.
15084 (start_non_stop): Declare.
15085 (mywait): Add `options' argument.
15086 * target.c (mywait): Add `options' argument. Print child exit
15087 notifications here.
15088 (start_non_stop): New.
15089 * server.c (non_stop, own_buf, mem_buf): New globals.
15090 (struct vstop_notif): New.
15091 (notif_queue): New global.
15092 (queue_stop_reply, push_event, discard_queued_stop_replies)
15093 (send_next_stop_reply): New.
15094 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15096 (attach_inferior): In non-stop mode, don't wait for the target
15098 (handle_general_set): Handle QNonStop.
15099 (handle_query): When handling qC, return the current general
15100 thread, instead of the first thread of the list.
15101 (handle_query): If the backend supports non-stop mode, include
15102 QNonStop+ in the qSupported query response.
15103 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15105 (handle_v_attach, handle_v_run): Handle non-stop mode.
15106 (handle_v_stopped): New.
15107 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15108 (myresume): Adjust to use resume_kind. Handle non-stop.
15109 (queue_stop_reply_callback): New.
15110 (handle_status): Handle non-stop mode.
15111 (main): Clear non_stop flag on reconnection. Use the event-loop.
15112 Refactor serial protocol handling from here ...
15113 (process_serial_event): ... to this new function. When GDB
15114 selects any thread, select one here. In non-stop mode, wait until
15115 GDB acks all pending events before exiting.
15116 (handle_serial_event, handle_target_event): New.
15117 * remote-utils.c (remote_open): Install remote_desc in the event
15119 (remote_close): Remove remote_desc from the event loop.
15120 (putpkt_binary): Rename to...
15121 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15122 (putpkt_binary): New as wrapper around putpkt_binary_1.
15123 (putpkt_notif): New.
15124 (prepare_resume_reply): In non-stop mode, don't change the
15126 * event-loop.c: New.
15127 * Makefile.in (OBJ): Add event-loop.o.
15128 (event-loop.o): New rule.
15130 * linux-low.h (pid_of): Moved here.
15132 (get_lwp_thread): Use lwpid_of.
15133 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15134 * linux-low.c (pid_of): Delete.
15135 (inferior_pid): Use lwpid_of.
15136 (linux_event_pipe): New.
15137 (target_is_async_p): New.
15139 (handle_extended_wait): Use lwpid_of.
15140 (add_lwp): Don't set lwpid field.
15141 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15142 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15143 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15144 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15145 first. Adjust to linux_wait_for_event interface changes. Use
15147 (linux_detach): Don't delete the main lwp here.
15148 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15149 (status_pending_p): Don't consider explicitly suspended lwps.
15150 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15151 pointer. Add OPTIONS argument. Change return type to int. Use
15152 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15153 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15154 pointer. Add status pointer argument. Return a pid instead of a
15155 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15156 changes. In non-stop mode, don't switch to a random thread.
15157 (linux_wait): Rename to...
15158 (linux_wait_1): ... this. Add target_options argument, and handle
15159 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15160 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15161 clean exit and signal exit code. Don't stop all threads in
15162 non-stop mode. In all-stop mode, only stop all threads when
15163 reporting a stop to GDB. Handle explicit thread stop requests.
15164 (async_file_flush, async_file_mark): New.
15166 (send_sigstop): Use lwpid_of.
15167 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15168 interface changes. In non-stop mode, don't switch to a random
15170 (linux_resume_one_lwp): Use lwpid_of.
15171 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15172 (linux_resume_one_thread): ... this. Handle resume_stop. In
15173 non-stop mode, don't look for pending flag in all threads.
15174 (resume_status_pending_p): Don't consider explicitly suspended
15176 (my_waitpid): Reimplement. Emulate __WALL.
15177 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15179 (sigchld_handler, linux_supports_non_stop, linux_async)
15180 (linux_start_non_stop): New.
15181 (linux_target_ops): Register linux_supports_non_stop, linux_async
15182 and linux_start_non_stop.
15183 (initialize_low): Install SIGCHLD handler.
15184 * thread-db.c (thread_db_create_event, find_one_thread)
15185 (thread_db_get_tls_address): Use lwpid_of.
15186 * win32-low.c (win32_detach): Adjust to use resume_kind.
15187 (win32_wait): Add `options' argument.
15188 * spu-low.c (spu_resume): Adjust to use resume_kind.
15189 (spu_wait): Add `options' argument.
15191 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15193 Decouple target code from remote protocol.
15195 * target.h (enum target_waitkind): New.
15196 (struct target_waitstatus): New.
15197 (struct target_ops) <wait>: Return an unsigned long. Take a
15198 target_waitstatus pointer instead of a char pointer.
15199 (mywait): Likewise.
15200 * target.c (mywait): Change prototype to return an unsigned long.
15201 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15202 * server.h (thread_from_wait, old_thread_from_wait): Delete
15204 (prepare_resume_reply): Change prototype to take a
15206 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15207 (last_status, last_ptid): New.
15208 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15209 pid instead of a signal.
15210 (attach_inferior): Remove "status" and "signal" parameters.
15212 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15214 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15215 (handle_v_requests, myresume): Remove "status" and "signal"
15216 parameters. Adjust.
15217 (handle_status): New.
15218 (main): Delete local `status'. Adjust.
15219 * remote-utils.c: Include target.h.
15220 (prepare_resume_reply): Change prototype to take a
15221 target_waitstatus. Adjust.
15223 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15225 * spu-low.c (spu_wait): Adjust.
15226 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15228 (win32_wait): Adjust.
15230 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15232 * target.h (struct thread_resume): Delete leave_stopped member.
15233 (struct target_ops): Add a `n' argument to the `resume' callback.
15234 * server.c (start_inferior): Adjust.
15235 (handle_v_cont, myresume): Adjust.
15236 * linux-low.c (check_removed_breakpoint): Adjust to resume
15237 interface change, and to removed leave_stopped field.
15238 (resume_ptr): Delete.
15239 (struct thread_resume_array): New.
15240 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15241 resume interface change.
15242 (linux_continue_one_thread, linux_queue_one_thread)
15243 (resume_status_pending_p): Check if the resume field is NULL
15244 instead of checking the leave_stopped member.
15245 (linux_resume): Adjust to the target resume interface change.
15246 * spu-low.c (spu_resume): Adjust to the target resume interface
15248 * win32-low.c (win32_detach, win32_resume): Ditto.
15250 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15252 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15254 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15256 (linux_continue_one_thread): Only preserve the stepping flag if
15257 there's a pending breakpoint.
15259 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15261 * server.c (main): After the inferior having exited, call
15262 remote_close before exiting gdbserver.
15264 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15266 Fix size of FPSCR in Power 7 processors.
15267 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15268 (PPC_FEATURE_HAS_DFP): New #define.
15269 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15272 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15274 * server.c (handle_query) Whitespace and formatting.
15276 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15278 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15279 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15280 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15281 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15282 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15283 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15284 Makefile.in, configure.ac: Fix whitespace throughout.
15285 * configure: Regenerate.
15287 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15289 * inferiors.c (find_inferior): Make it safe for the callback
15290 function to delete the currently iterated inferior.
15292 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15294 * Makefile.in (linuw_low_h): Move higher.
15295 (thread-db.o): Depend on $(linux_low_h).
15297 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15299 Rename "process" to "lwp" throughout.
15301 * linux-low.c (all_processes): Rename to...
15302 (all_lwps): ... this.
15303 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15304 (add_process): Rename to ...
15305 (add_lwp): ... this. Adjust.
15306 (linux_create_inferior): Adjust.
15307 (linux_attach_lwp): Adjust.
15308 (linux_attach): Adjust.
15309 (linux_kill_one_process): Rename to ...
15310 (linux_kill_one_lwp): ... this. Adjust.
15311 (linux_kill): Adjust.
15312 (linux_detach_one_process): Rename to ...
15313 (linux_detach_one_lwp): ... this. Adjust.
15314 (linux_detach): Adjust.
15315 (check_removed_breakpoint): Adjust.
15316 (status_pending_p): Adjust.
15317 (linux_wait_for_process): Rename to ...
15318 (linux_wait_for_lwp): ... this. Adjust.
15319 (linux_wait_for_event): Adjust.
15320 (send_sigstop): Adjust.
15321 (wait_for_sigstop): Adjust.
15322 (stop_all_processes): Rename to ...
15323 (stop_all_lwps): ... this.
15324 (linux_resume_one_process): Rename to ...
15325 (linux_resume_one_lwp): ... this. Adjust.
15326 (linux_set_resume_request, linux_continue_one_thread)
15327 (linux_queue_one_thread, resume_status_pending_p)
15328 (usr_store_inferior_registers, regsets_store_inferior_registers)
15329 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15331 * linux-low.h (get_process): Rename to ...
15332 (get_lwp): ... this. Adjust.
15333 (get_thread_process): Rename to ...
15334 (get_thread_lwp): ... this. Adjust.
15335 (get_process_thread): Rename to ...
15336 (get_lwp_thread): ... this. Adjust.
15337 (struct process_info): Rename to ...
15338 (struct lwp_info): ... this.
15339 (all_processes): Rename to ...
15340 (all_lwps): ... this.
15341 * proc-service.c (ps_lgetregs): Adjust.
15342 * thread-db.c (thread_db_create_event, find_one_thread)
15343 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15345 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15347 * server.c (handle_query): Handle "qAttached".
15349 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15351 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15352 GPLv3, update license URL.
15354 2009-03-01 Doug Evans <dje@google.com>
15356 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15357 (server_h): Add gdb_signals.h.
15358 (signals.o): Update.
15359 * server.h (target_signal_from_host,target_signal_to_host_p)
15360 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15362 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15364 * remote-utils.c (getpkt): Also generate remote-debug
15365 information if noack_mode is set.
15367 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15369 * server.c (handle_query): Report qXfer:siginfo:read and
15370 qXfer:siginfo:write as supported and handle them.
15371 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15372 * linux-low.c (linux_xfer_siginfo): New.
15373 (linux_target_ops): Set it.
15375 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15377 * server.c (gdbserver_usage): Mention --remote-debug.
15378 (main): Accept '--remote-debug' switch.
15380 2009-01-18 Doug Evans <dje@google.com>
15382 * regcache.c (new_register_cache): No need to check result of xcalloc.
15383 * server.c (handle_search_memory): Back out calls to xmalloc,
15384 result is checked and error is returned to user upon failure.
15385 (handle_query): Ditto. Add more checks for result of malloc.
15386 (handle_v_cont): Check result of malloc, report error back to
15388 (handle_v_run): Ditto. Call freeargv.
15389 * server.h (freeargv): Declare.
15390 * utils.c (freeargv): New fn.
15392 2009-01-15 Doug Evans <dje@google.com>
15394 * gdbreplay.c (perror_with_name): Make arg const char *.
15395 * server.h (target_signal_to_name): Make return type const char *.
15396 * thread-db.c (thread_db_err_str): Make return type const char *.
15397 * utils.c (perror_with_name): Make arg const char *.
15399 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15401 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15402 when handling a EXIT_PROCESS_DEBUG_EVENT.
15404 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15406 * gdbreplay.c (gdbreplay_version): Update copyright year.
15407 * server.c (gdbserver_version): Likewise.
15409 2009-01-05 Doug Evans <dje@google.com>
15411 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15412 (handle_extended_wait): Improve comment.
15414 2008-12-13 Doug Evans <dje@google.com>
15416 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15417 * server.h (ATTR_MALLOC): New macro.
15418 (xmalloc,xcalloc,xstrdup): Declare.
15419 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15420 * inferiors.c: Ditto.
15421 * linux-low.c: Ditto.
15422 * mem-break.c: Ditto.
15423 * regcache.c: Ditto.
15424 * remote-utils.c: Ditto.
15427 * win32-low.c: Ditto.
15429 2008-12-12 Doug Evans <dje@google.com>
15431 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15432 in debugging printf.
15434 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15436 2008-12-09 Doug Evans <dje@google.com>
15438 * linux-low.h (struct process_info): Delete member tid, unused.
15439 * thread-db.c (find_one_thread): Update.
15440 (maybe_attach_thread): Update.
15442 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15444 * target.h (struct target_ops): Add qxfer_osdata member.
15445 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15447 (linux_qxfer_osdata): New functions.
15448 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15450 * server.c (handle_query): Handle "qXfer:osdata:read:".
15451 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15452 (buffer_xml_printf): New functions.
15453 * server.h (struct buffer): New.
15454 (buffer_grow_str, buffer_grow_str0): New macros.
15455 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15456 (buffer_xml_printf): Declare.
15458 2008-11-24 Doug Evans <dje@google.com>
15460 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15462 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15464 * server.c (handle_v_run): Always use the supplied argument list.
15466 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15468 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15469 (xtensa_regmap_table): Add entry for scompare1.
15471 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15473 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15474 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15475 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15476 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15477 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15478 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15479 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15480 XML target descriptions.
15481 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15482 when inferior is running on an ISA 2.05 or later processor. Add
15483 special case to return offset for full 64-bit slot of FPSCR when
15486 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15488 * Makefile.in (SFILES, clean): Added sparc64 files.
15489 (reg-sparc64.o, reg-sparc64.c): New.
15490 * configure.srv (sparc*-*-linux*): New configuration.
15491 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15492 syscall arguments for SPARC.
15493 (regsets_store_inferior_registers): Likewise.
15494 * linux-sparc-low.c: New file.
15496 2008-10-21 Doug Evans <dje@google.com>
15498 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15499 (READLINE_DIR,READLINE_DEP): Delete.
15500 (INTERNAL_CFLAGS): Update.
15501 (LINTFLAGS): Update.
15503 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15505 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15506 whole argv from the last run, not just argv[0].
15508 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15510 * regcache.c (new_register_cache): Return NULL if the register
15511 cache size isn't known yet.
15512 (free_register_cache): Avoid dereferencing a NULL regcache.
15514 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15516 * configure.srv: Merge MIPS and MIPS64.
15518 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15520 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15522 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15524 * Makefile.in: Add required vsx dependencies.
15526 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15527 Declare init_registers_powerpc_vsx32l.
15528 Declare init_registers_powerpc_vsx64l.
15529 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15530 (ppc_arch_setup): Check for VSX in hwcap.
15531 (ppc_fill_vsxregset): New function.
15532 (ppc_store_vsxregset): New function.
15533 Add new VSX entry in regset_info target_regsets.
15535 * configure.srv: Add new VSX dependencies.
15537 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15539 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15540 (remote_open): Set or clear transport_is_reliable.
15541 (putpkt_binary): Don't expect acks in noack mode.
15542 (getpkt): Don't send ack/nac in noack mode.
15543 * server.c (handle_general_set): Handle QStartNoAckMode.
15544 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15546 (main): Reset noack_mode on every connection.
15547 * server.h (noack_mode): Declare.
15549 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15551 * Makefile.in (GDBREPLAY_OBS): New variable.
15552 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15554 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15555 Daniel Jacobowitz <dan@codesourcery.com>
15557 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15558 (usr_store_inferior_registers): Likewise.
15559 (regsets_store_inferior_registers): Likewise.
15561 2008-07-31 Rolf Jansen <rj@surtec.com>
15562 Pedro Alves <pedro@codesourcery.com>
15564 * configure.ac: Check for memmem declaration.
15565 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15566 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15567 (disable_packet_qfThreadInfo): Unconditionally compile.
15568 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15569 * configure, config.in: Regenerate.
15571 2008-07-28 Doug Kwan <dougkwan@google.com>
15573 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15574 (linux_write_memory): Remove declaration of errno.
15576 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15578 * linux-low.c (handle_extended_wait): Do not use "status"
15579 variable uninitialized.
15581 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15583 * server.c (handle_v_attach): Inhibit reporting dll changes.
15585 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15587 * remote-utils.c (prepare_resume_reply): If requested, don't
15588 output "thread:TID" in the T stop reply.
15590 * server.c (disable_packet_vCont, disable_packet_Tthread)
15591 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15592 (handle_query): If requested, disable support for qC, qfThreadInfo
15594 (handle_v_requests): If requested, disable support for vCont.
15595 (gdbserver_show_disableable): New.
15596 (main): Handle --disable-packet and --disable-packet=LIST.
15598 * server.h (disable_packet_vCont, disable_packet_Tthread)
15599 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15601 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15603 * server.c (gdbserver_usage): Mention --version.
15605 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15607 * Makefile.in (gdbreplay.o): New rule.
15609 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15611 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15612 message, not gdbserver.
15614 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15615 Nathan Sidwell <nathan@codesourcery.com>
15616 Joseph Myers <joseph@codesourcery.com>
15618 * acinclude.m4: Include ../../config/acx.m4.
15619 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15620 * configure, config.in: Regenerate.
15621 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15622 * server.c (gdbserver_version): Print PKGVERSION.
15623 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15624 (main): Adjust gdbserver_usage calls.
15625 * gdbreplay.c (version, host_name): Add declarations.
15626 (gdbreplay_version, gdbreplay_usage): New.
15627 (main): Accept --version and --help options.
15629 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15631 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15632 (arm_breakpoint_at): Handle Thumb.
15633 (the_low_target): Add comment.
15635 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15637 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15639 2008-05-09 Doug Evans <dje@google.com>
15641 * server.h (decode_search_memory_packet): Declare.
15642 * remote-utils.c (decode_search_memory_packet): New fn.
15643 * server.c (handle_search_memory_1): New fn.
15644 (handle_search_memory): New fn.
15645 (handle_query): Process qSearch:memory packets.
15647 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15649 * regcache.c (registers_length): Remove.
15650 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15651 full register packet.
15652 * regcache.h (registers_length): Remove prototype.
15653 * server.h (PBUFSIZ): Define to 16384.
15655 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15657 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15658 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15659 powerpc-64l.o, and powerpc-altivec64l.o.
15660 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15661 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15662 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15663 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15664 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15667 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15668 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15669 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15670 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15671 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15672 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15673 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15674 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15675 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15676 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15679 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15680 (init_registers_powerpc_32l): ... this new prototype.
15681 (init_registers_powerpc_32): Remove, replace by ...
15682 (init_registers_powerpc_altivec32l): ... this new prototype.
15683 (init_registers_powerpc_e500): Remove, replace by ...
15684 (init_registers_powerpc_e500l): ... this new prototype.
15685 (init_registers_ppc64): Remove, replace by ...
15686 (init_registers_powerpc_64l): ... this new prototype.
15687 (init_registers_powerpc_64): Remove, replace by ...
15688 (init_registers_powerpc_altivec64l): ... this new prototype.
15689 (ppc_num_regs): Set to 73.
15690 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15691 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15692 (ppc_cannot_store_register): Handle orig_r3 and trap.
15693 (ppc_arch_setup): Update init_registers_... calls.
15694 (ppc_fill_gregset): Handle orig_r3 and trap.
15696 * inferiors.c (clear_inferiors): Reset current_inferior.
15698 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15700 * acinclude.m4: Add override.m4.
15701 * configure: Regenerate.
15703 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15705 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15706 initial call to init_register_ppc64.
15708 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15710 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15711 single powerpc*-*-linux* case.
15712 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15714 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15716 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15717 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15719 * linux-ppc-low.c: Include <elf.h>.
15720 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15721 (ppc_hwcap): New global variable.
15722 (ppc_regmap): Remove __SPE__ #ifdef sections.
15723 (ppc_regmap_e500): New global variable.
15724 (ppc_cannot_store_register): Update __SPE__ special case.
15725 (ppc_get_hwcap): New function.
15726 (ppc_arch_setup): Use it to determine whether inferior supports
15727 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15728 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15729 Do not access registers if target does not support AltiVec.
15730 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15731 Do not access registers if target does not support SPE.
15732 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15734 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15736 * linux-low.c (disabled_regsets, num_regsets): New.
15737 (use_regsets_p): Delete.
15738 (linux_wait_for_process): Clear disabled_regsets.
15739 (regsets_fetch_inferior_registers): Check and set it.
15740 (regsets_store_inferior_registers): Likewise.
15741 (linux_fetch_registers, linux_store_registers): Do not use
15743 (initialize_low): Allocate disabled_regsets.
15745 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15747 * Makefile.in (LIBOBJS): New.
15748 (OBS): Use LIBOBJS.
15749 (memmem.o): New rule.
15750 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15751 * configure: Regenerated.
15753 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15755 * server.c (handle_query): Never return "unsupported" for
15756 qXfer:features:read queries.
15758 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15760 * server.c (get_features_xml): Fix inverted condition.
15761 (handle_query): Always support qXfer:feature:read.
15763 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15765 * server.c (wrapper_argv): New.
15766 (start_inferior): Handle wrapper_argv. If set, expect an extra
15768 (gdbserver_usage): Document --wrapper.
15769 (main): Parse --wrapper.
15771 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15773 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15774 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15775 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15776 (ppc_set_pc): Likewise.
15777 (ppc_arch_setup): New function.
15778 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15779 of collect_register.
15780 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15782 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15784 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15785 instead of linux-ppc64-low.o.
15786 * linux-ppc64-low.c: Remove file.
15787 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15788 (linux-ppc64-low.o): Remove rule.
15790 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15791 (init_registers_powerpc_64): Likewise.
15792 (ppc_regmap): Conditionally define depending on __powerpc64__.
15793 (ppc_cannot_store_register): Do not special-case "fpscr" when
15794 compiled on __powerpc64__.
15795 (ppc_collect_ptrace_register): New function.
15796 (ppc_supply_ptrace_register): New function.
15797 (ppc_breakpoint): Change type to "unsigned int".
15798 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15799 (the_low_target): Conditionally provide initializers for the
15800 arch_setup member depending on __powerpc64__. Install
15801 collect_ptrace_register and supply_ptrace_register members.
15803 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15805 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15806 * server.c (gdbserver_xmltarget): Define.
15807 (get_features_xml): Use it to replace "target.xml" and arch_string.
15809 * configure.srv: Remove srv_xmltarget. Add XML files that were
15810 mentioned there to srv_xmlfiles instead. Remove conditional tests
15811 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15812 srv_xmlfiles and srv_regobj to include all possible choices.
15813 * configure.ac (srv_xmltarget): Remove.
15814 (srv_xmlfiles): Do not add "target.xml".
15815 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15816 checks for supplementary target information.
15817 * configure: Regenerate.
15818 * Makefile.in (XML_TARGET): Remove.
15819 (target.xml): Remove rule.
15820 (clean): Do not clean up target.xml.
15821 (.PRECIOUS): Do not mention target.xml.
15823 * target.h (struct target_ops): Remove arch_string member.
15824 * linux-low.c (linux_arch_string): Remove.
15825 (linux_target_ops): Remove arch_string initializer.
15826 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15827 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15828 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15829 * spu-low.c (spu_arch_string): Remove.
15830 (spu_target_ops): Remove arch_string initializer.
15831 * win32-low.c (win32_arch_string): Remove.
15832 (win32_target_ops): Remove arch_string initializer.
15833 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15834 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15835 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15837 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15839 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15840 by collect_ptrace_register and supply_ptrace_register hooks.
15841 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15842 instead of checking for the_low_target.left_pad_xfer.
15843 (usr_store_inferior_registers): Use collect_ptrace_register callback
15844 instead of checking for the_low_target.left_pad_xfer.
15846 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15847 (s390_supply_ptrace_register): Likewise.
15848 (s390_fill_gregset): Call s390_collect_ptrace_register.
15849 (the_low_target): Update.
15851 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15852 (ppc_supply_ptrace_register): Likewise.
15853 (the_low_target): Update.
15855 * linux-i386-low.c (the_low_target): Update.
15856 * linux-x86-64-low.c (the_low_target): Update.
15858 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15860 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15861 reg-s390.o and reg-s390x.o.
15863 * linux-low.c (new_inferior): New global variable.
15864 (linux_create_inferior, linux_attach): Set it.
15865 (linux_wait_for_process): Call the_low_target.arch_setup after the
15866 target has stopped for the first time.
15867 (initialize_low): Do not call the_low_target.arch_setup.
15869 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15870 (s390_set_pc): Likewise.
15871 (s390_arch_setup): New function.
15872 (the_low_target): Use s390_arch_setup as arch_setup routine.
15874 * regcache.c (realloc_register_cache): New function.
15875 (set_register_cache): Call it for each existing regcache.
15877 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15879 * server.h (init_registers): Remove prototype.
15881 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15882 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15883 instead of init_registers ().
15884 * linux-arm-low.c (init_registers_arm): Add prototype.
15885 (init_registers_arm_with_iwmmxt): Likewise.
15886 (the_low_target): Add initializer for arch_setup field.
15887 * linux-cris-low.c (init_registers_cris): Add prototype.
15888 (the_low_target): Add initializer for arch_setup field.
15889 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15890 (the_low_target): Add initializer for arch_setup field.
15891 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15892 (the_low_target): Add initializer for arch_setup field.
15893 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15894 (the_low_target): Add initializer for arch_setup field.
15895 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15896 (the_low_target): Add initializer for arch_setup field.
15897 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15898 (the_low_target): Add initializer for arch_setup field.
15899 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15900 (init_registers_mips64_linux): Likewise.
15901 (the_low_target): Add initializer for arch_setup field.
15902 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15903 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15904 (the_low_target): Add initializer for arch_setup field.
15905 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15906 (init_registers_powerpc_64): Likewise.
15907 (the_low_target): Add initializer for arch_setup field.
15908 * linux-s390-low.c (init_registers_s390): Add prototype.
15909 (init_registers_s390x): Likewise.
15910 (the_low_target): Add initializer for arch_setup field.
15911 * linux-sh-low.c (init_registers_sh): Add prototype.
15912 (the_low_target): Add initializer for arch_setup field.
15913 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15914 (the_low_target): Add initializer for arch_setup field.
15915 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15916 (the_low_target): Add initializer for arch_setup field.
15918 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15919 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15920 instead of init_registers ().
15921 * win32-arm-low.c (init_registers_arm): Add prototype.
15922 (the_low_target): Add initializer for arch_setup field.
15923 * win32-i386-low.c (init_registers_i386): Add prototype.
15924 (the_low_target): Add initializer for arch_setup field.
15926 * spu-low.c (init_registers_spu): Add prototype.
15927 (initialize_low): Call initialie_registers_spu () instead of
15928 initialize_registers ().
15930 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15932 * server.c (handle_v_requests): When handling the vRun and vAttach
15933 packets, if already debugging a process, don't kill it. Return an
15936 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15938 * server.c (handle_query): Correct length check.
15940 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15942 * win32-low.c (do_initial_child_stuff): Add process handle
15943 parameter. Set current_process_handle and current_process_id from the
15944 parameters. Clear globals.
15945 (win32_create_inferior): Don't set current_process_handle and
15946 current_process_id here. Instead pass them on the call to
15947 do_initial_child_stuff.
15948 (win32_attach): Likewise.
15949 (win32_clear_inferiors): New.
15950 (win32_kill): Don't close the current process handle or the
15951 current thread handle here. Instead call win32_clear_inferiors.
15952 (win32_detach): Don't open a new handle to the process. Call
15953 win32_clear_inferiors.
15954 (win32_join): Don't rely on current_process_handle; open a new
15955 handle using the process id.
15956 (win32_wait): Call win32_clear_inferiors when the inferior process
15959 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15961 * server.c (monitor_show_help): Add "exit".
15963 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15965 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15966 (clean): Add reg-xtensa.c.
15967 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15968 * configure.srv (xtensa*-*-linux*) New target.
15969 * linux-xtensa-low.c: New.
15970 * xtensa-xtregs.c: New.
15972 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15974 * hostio.c: Don't include errno.h.
15975 (errno_to_fileio_errno): Move to hostio-errno.
15976 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15977 error number outputting to the target->hostio_last_error callback.
15978 (hostio_packet_error): Use FILEIO_EINVAL directly.
15979 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15980 calls to hostio_error.
15981 * hostio-errno.c: New.
15982 * server.h (hostio_last_error_from_errno): Declare.
15983 * target.h (target_ops): Add hostio_last_error member.
15984 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15985 as hostio_last_error handler.
15986 * spu-low.c (spu_target_ops): Likewise.
15987 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15988 (wince_hostio_last_error): New functions.
15989 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15990 as hostio_last_error handler.
15991 (win32_target_ops) [!_WIN32_WCE]: Register
15992 hostio_last_error_from_errno as hostio_last_error handler.
15993 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15994 (hostio-errno.o): New rule.
15995 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15996 * configure.srv (srv_hostio_err_objs): New variable. Default to
15998 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15999 * configure: Regenerate.
16001 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16003 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16004 (linux_kill, linux_detach): Clean up the process list.
16005 * remote-utils.c (remote_open): Improve port number parsing.
16006 (putpkt_binary, input_interrupt): Only send interrupts if the target
16008 * server.c (extended_protocol): Make static.
16009 (attached): Define earlier.
16010 (exit_requested, response_needed, program_argv): New variables.
16011 (target_running): New.
16012 (start_inferior): Clear attached here.
16013 (attach_inferior): Set attached here.
16014 (require_running): Define.
16015 (handle_query): Use require_running and target_running. Implement
16017 (handle_v_attach, handle_v_run): New.
16018 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16019 (gdbserver_usage): Update.
16020 (main): Redo argument parsing. Handle --debug and --multi. Handle
16021 --attach along with other options or after the port. Save
16022 program_argv. Support no initial program. Resynchronize
16023 communication with GDB after an error. Handle "monitor exit".
16024 Use require_running and target_running. Always allow the extended
16025 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16026 restart in extended mode.
16027 * README: Refer to the GDB manual. Update --attach usage.
16029 2007-12-20 Andreas Schwab <schwab@suse.de>
16031 * linux-low.c (STACK_SIZE): Define.
16032 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16033 (linux_test_for_tracefork): Likewise.
16035 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16037 * linux-low.c (linux_wait_for_event): Update messages. Do not
16038 reinsert auto-delete breakpoints.
16039 * mem-break.c (struct breakpoint): Change return type of handler to
16041 (set_breakpoint_at): Update handler type.
16042 (reinsert_breakpoint_handler): Return 1 instead of calling
16044 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16046 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16047 * mem-break.h (set_breakpoint_at): Update handler type.
16048 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16049 * win32-low.c (auto_delete_breakpoint): New.
16050 (get_child_debug_event): Use it.
16052 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16054 * configure.ac: Check for pread and pwrite.
16055 * hostio.c (handle_pread): Fall back to lseek and read.
16056 (handle_pwrite): Fall back to lseek and write.
16057 * config.in, configure: Regenerated.
16059 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16061 * server.c (myresume): Add own_buf argument.
16062 (main): Update calls.
16064 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16066 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16067 * remote-utils.c (remote_open): Do not call disable_async_io.
16068 (block_async_io): Delete.
16069 (unblock_async_io): Make static.
16070 (initialize_async_io): New.
16071 * server.c (handle_v_cont): Handle async I/O here.
16072 (myresume): Likewise. Move other common resume tasks here...
16073 (main): ... from here. Call initialize_async_io. Disable async
16074 I/O before the main loop.
16075 * server.h (initialize_async_io): Declare.
16076 (block_async_io, unblock_async_io): Delete prototypes.
16077 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16079 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16081 * remote-utils.c (readchar): Allow binary data in received messages.
16083 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16085 * win32-low.c (attaching): New global.
16086 (win32_create_inferior): Clear the `attaching' global.
16087 (win32_attach): Set the `attaching' global.
16088 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16089 attaching. Only set a breakpoint at the entry point if not
16092 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16094 * server.c (main): Don't report dll events on the initial
16095 connection on attaches.
16097 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16099 * server.c (main): Relax numerical bases supported for the pid of
16100 the --attach command line argument.
16102 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16104 * win32-low.c (win32_attach): Call OpenProcess before
16105 DebugActiveProcess, not after. Add last error output to error
16108 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16110 * win32-low.c (win32_get_thread_context)
16111 (win32_set_thread_context): New functions.
16112 (thread_rec): Use win32_get_thread_context.
16113 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16114 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16117 2007-12-03 Leo Zayas
16118 Pedro Alves <pedro_alves@portugalmail.pt>
16120 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16122 (child_add_thread): Minor cleanup.
16123 (child_continue): Resume artificially suspended threads before
16124 calling ContinueDebugEvent.
16125 (suspend_one_thread): New.
16126 (fake_breakpoint_event): New.
16127 (get_child_debug_event): Change return type to int. Check here if
16128 gdb sent an interrupt request. If a soft interrupt was requested,
16129 fake a breakpoint event. Return 0 if there is no event to handle,
16131 (win32_wait): Don't check here if gdb sent an interrupt request.
16132 Ensure there is a valid event to handle.
16133 (win32_request_interrupt): Add soft interruption method as last
16136 2007-12-03 Leo Zayas
16137 Pedro Alves <pedro_alves@portugalmail.pt>
16139 * win32-low.h (win32_thread_info): Add descriptions to the
16140 structure members. Replace `suspend_count' counter by a
16142 * win32-low.c (thread_rec): Update condition of when to get the
16143 context from the inferior. Rely on ContextFlags being set if it
16144 has already been retrieved. Only suspend the inferior thread if
16145 we haven't already. Warn if that fails.
16146 (continue_one_thread): s/suspend_count/suspended/. Only call
16147 ResumeThread once. Warn if that fails.
16149 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16151 * win32-low.c (win32_wait): Don't read from the inferior when it
16152 has already exited.
16154 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16156 * Makefile.in (win32_low_h): New variable.
16157 (win32-low.o): Add dependency on $(win32_low_h).
16158 (win32-arm-low.o, win32-i386-low.o): New rules.
16160 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16162 * hostio.c: Correct copyright year.
16164 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16166 * Makefile.in (OBS): Add hostio.o.
16167 (hostio.o): New rule.
16168 * server.h (handle_vFile): Declare.
16169 * hostio.c: New file.
16170 * server.c (handle_v_requests): Take packet_len and new_packet_len
16171 for binary packets. Call handle_vFile.
16172 (main): Update call to handle_v_requests.
16174 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16176 * linux-low.c: Include <sched.h>.
16178 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16180 * linux-low.c (linux_tracefork_grandchild): New.
16181 (linux_tracefork_child): Use clone.
16182 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16184 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16186 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16188 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16190 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16192 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16194 * inferiors.c (change_inferior_id): Delete.
16195 (add_pid_to_list, pull_pid_from_list): New.
16196 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16197 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16198 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16199 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16200 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16201 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16202 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16203 (using_threads): Always set to 1.
16204 (handle_extended_wait): New.
16205 (add_process): Do not set TID.
16206 (linux_create_inferior): Set must_set_ptrace_flags.
16207 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16208 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16209 (linux_thread_alive): Rename TID argument to LWPID.
16210 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16211 (linux_wait_for_event): Do not use TID or check using_threads. Update
16212 call to dead_thread_notify. Call handle_extended_wait.
16213 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16214 (send_sigstop): Delete sigstop_sent.
16215 (wait_for_sigstop): Avoid TID.
16216 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16217 (linux_test_for_tracefork): New.
16218 (linux_lookup_signals): Use thread_db_active and
16219 linux_supports_tracefork_flag.
16220 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16221 * linux-low.h (get_process_thread): Avoid TID.
16222 (struct process_ifo): Move thread_known and tid to the end. Remove
16224 (linux_attach_lwp, thread_db_init): Update prototypes.
16225 * server.h (change_inferior_id): Delete prototype.
16226 (add_pid_to_list, pull_pid_from_list): New prototypes.
16227 * thread-db.c (thread_db_use_events): New.
16228 (find_first_thread): Rename to...
16229 (find_one_thread): ...this. Update callers and messages. Do not
16230 call fatal. Check thread_db_use_events. Do not call
16231 change_inferior_id or new_thread_notify.
16232 (maybe_attach_thread): Update. Do not call new_thread_notify.
16233 (thread_db_init): Set thread_db_use_events. Check use_events.
16234 * utils.c (fatal, warning): Correct message prefix.
16236 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16238 * Makefile.in (clean): Remove new files.
16239 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16240 (powerpc-64.o, powerpc-64.c): New rules.
16241 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16242 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16244 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16246 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16247 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16248 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16249 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16250 (target_regsets): Add AltiVec and SPE register sets.
16251 * configure.ac: Check for AltiVec and SPE.
16252 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16253 (ppc_fill_vrregset, ppc_store_vrregset): New.
16254 (target_regsets): Add AltiVec register set.
16255 * configure: Regenerated.
16257 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16259 * linux-low.c (O_LARGEFILE): Define.
16260 (linux_read_memory): Use /proc/PID/mem.
16261 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16262 * configure, config.in: Regenerated.
16264 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16266 * linux-low.c (linux_wait_for_event): Do not pass signals while
16269 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16271 * win32-low.c (create_process): New.
16272 (win32_create_inferior): Use create_process instead of
16273 CreateProcess. If create_process failed retry appending an ".exe"
16274 suffix. Store the GetLastError result immediatelly after
16275 create_process calls and use it on the call to error.
16277 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16279 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16281 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16283 * configure.ac: Switch license to GPLv3.
16285 2007-08-01 Michael Snyder <msnyder@access-company.com>
16287 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16289 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16291 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16293 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16294 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16295 CloseToolhelp32Snapshot.
16296 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16297 CloseToolhelp32Snapshot.
16299 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16301 * server.c (main): Check for inferior exit before main loop.
16303 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16305 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16306 instead of on tmp_desc.
16308 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16309 Daniel Jacobowitz <dan@codesourcery.com>
16311 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16312 (add_thread): Minor cleanups.
16313 (clear_inferiors): Move lower in the file. Clear the DLL
16315 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16316 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16317 (xml_escape_text): New.
16318 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16320 (handle_v_cont): Report errors.
16321 (gdbserver_version): Update.
16322 (main): Correct size of own_buf. Do not report initial DLL events.
16323 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16324 (unloaded_dll, xml_escape_text): New.
16325 * win32-low.c (enum target_waitkind): Update comments.
16326 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16327 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16328 (win32_EnumProcessModules, win32_GetModuleInformation)
16329 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16330 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16331 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16332 (win32_Module32First, win32_Module32Next, load_toolhelp)
16333 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16334 (get_child_debug_event): Handle DLL events.
16335 (win32_wait): Likewise.
16337 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16339 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16340 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16342 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16344 * win32-low.c (handle_output_debug_string): Ignore event if not
16347 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16349 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16351 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16353 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16355 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16357 * inferiors.c (change_inferior_id): Add comment.
16358 * linux-low.c (check_removed_breakpoint): Add an early
16359 prototype. Improve debug output.
16360 (linux_attach): Doc update.
16361 (linux_detach_one_process, linux_detach): Clean up before releasing
16363 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16364 * linux-low.h (struct process_info): Doc improvement.
16365 * mem-break.c (delete_all_breakpoints): New.
16366 * mem-break.h (delete_all_breakpoints): New prototype.
16367 * thread-db.c (find_first_thread): New.
16368 (thread_db_create_event): Call it instead of
16369 thread_db_find_new_threads. Clean up unused variables.
16370 (maybe_attach_thread): Remove first thread handling.
16371 (thread_db_find_new_threads): Use find_first_thread.
16372 (thread_db_get_tls_address): Likewise.
16374 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16376 * thread-db.c (thread_db_find_new_threads): Add prototype.
16377 (thread_db_create_event): Check for the main thread before adding
16379 (maybe_attach_thread): Only enable event reporting if TID == 0.
16380 (thread_db_get_tls_address): Check for new threads.
16382 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16384 * linux-low.c (linux_create_inferior): Try execv before execvp.
16385 * spu-low.c (spu_create_inferior): Likewise.
16387 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16389 * linux-low.c (linux_create_inferior): Change execv to execvp.
16390 * spu-low.c (spu_create_inferior): Likewies.
16392 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16394 * Makefile.in (clean): Clean new files instead of deleted ones.
16395 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16396 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16398 * configure.srv: Specify XML files and new regformats for MIPS and
16400 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16401 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16402 an entry for the restart register.
16403 (mips_cannot_fetch_register, mips_cannot_store_register)
16404 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16405 register names to match the XML descriptions.
16406 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16407 restart register instead of $0.
16409 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16410 Markus Deuling <deuling@de.ibm.com>
16412 * remote-utils.c (decode_xfer_write): New function.
16413 * server.h (decode_xfer_write): Add prototype.
16414 * server.c (handle_query): Add PACKET_LEN argument. Support
16415 qXfer:spu:read and qXfer:spu:write packets.
16416 (main): Pass packet_len to handle_query.
16417 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16418 * target.h (target_ops): Add qxfer_spu.
16420 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16422 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16423 accessing non-seekable spufs files.
16425 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16427 * server.c (handle_query): Add reply for qC packet.
16429 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16430 Leo Zayas <lerele@champenstudios@com>
16432 * server.h (check_remote_input_interrupt_request): New function.
16433 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16434 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16435 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16436 (check_remote_input_interrupt_request): New function.
16437 * server.h (check_remote_input_interrupt_request): Declare.
16438 * win32-low.c (winapi_DebugBreakProcess,
16439 winapi_GenerateConsoleCtrlEvent): New typedefs.
16440 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16442 (win32_wait): Check for remote interrupt request
16443 with check_remote_input_interrupt_request.
16444 (win32_request_interrupt): New function.
16445 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16447 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16449 * win32-low.c (debug_registers_changed,
16450 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16451 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16452 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16453 (thread_rec): Get context using the low target.
16454 (child_add_thread): Call thread_added on the low target,
16455 which does the same thing.
16457 (do_initial_child_stuff): Remove debug registers references.
16458 Set context using the low target. Resume threads after
16459 setting the contexts.
16460 (child_continue): Remove dead variable. Remove debug
16461 registers references.
16462 (child_fetch_inferior_registers): Go through the low target.
16463 (do_child_store_inferior_registers): Remove.
16464 (child_store_inferior_registers): Go through the low target.
16465 (win32_resume): Remove debug registers references.
16466 Set context using the low target.
16467 (handle_exception): Change return type to void. Don't record
16468 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16469 first chance exception.
16470 (get_child_debug_event): Change return type to void. Remove
16471 goto loop. Always return after waiting for debug event.
16472 (win32_wait): Convert to switch statement. Handle spurious
16475 * win32-i386-low.c (debug_registers_changed,
16476 debug_registers_used): New.
16477 (initial_stuff): Rename to ...
16478 (i386_initial_stuff): ... this. Clear debug registers
16480 (store_debug_registers): Delete.
16481 (i386_get_thread_context): New.
16482 (load_debug_registers): Delete.
16483 (i386_set_thread_context): New.
16484 (i386_thread_added): New.
16485 (single_step): Rename to ...
16486 (i386_single_step): ... this.
16487 (do_fetch_inferior_registers): Rename to ...
16488 (i386_fetch_inferior_register): ... this.
16489 (i386_store_inferior_register): New.
16490 (the_low_target): Adapt to new interface.
16492 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16493 (arm_get_thread_context): New.
16494 (arm_set_thread_context): New.
16496 (do_fetch_inferior_registers): Rename to ...
16497 (arm_fetch_inferior_register): ... this.
16498 (arm_store_inferior_register): New.
16499 (arm_wince_breakpoint): Reimplement as unsigned long.
16500 (arm_wince_breakpoint_len): Define.
16501 (the_low_target): Adapt to new interface.
16503 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16504 load_debug_registers. Add get_thread_context, set_thread_context,
16505 thread_added and store_inferior_register. Rename
16506 fetch_inferior_registers to fetch_inferior_register.
16507 (regptr): Remove declaration.
16509 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16511 * linux-low.c (linux_detach): Change return type to int. Return 0.
16512 * spu-low.c (spu_detach): Likewise.
16514 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16516 * target.h (target_ops): Change return type of detach to int.
16518 (join_inferior): New.
16519 * server.c (main): Don't skip detach support on mingw32.
16520 If the inferior doesn't support detaching return error.
16521 Call join_inferior instead of using waitpid.
16522 * linux-low.c (linux_join): New.
16523 (linux_target_op): Add linux_join.
16524 * spu-low.c (spu_join): New.
16525 (spu_target_ops): Add spu_join.
16526 * win32-low.c (win32_detach): Adapt to new interface.
16527 Reopen current_process_handle before detaching. Issue a child
16528 resume before detaching.
16530 (win32_target_op): Add win32_join.
16532 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16534 * win32-low.c (win32-attach): Fix return value.
16535 * target.h (target_ops): Describe ATTACH return values.
16537 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16539 * win32-low.c (GETPROCADDRESS): Define.
16540 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16541 (winapi_DebugSetProcessKillOnExit): Likewise.
16542 (win32_create_inferior): Force usage of ansi CreateProcessA.
16543 (win32_attach): Use GETPROCADDRESS.
16544 (win32_detach): Likewise.
16546 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16548 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16550 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16552 * win32-low.c: Commit leftover changes from 2007-03-29.
16554 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16556 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16557 fields short instead of int. Add explicit padding.
16558 (i387_cache_to_fsave): Remove unnecessary casts.
16559 (i387_fsave_to_cache): Doc fix.
16560 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16562 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16564 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16565 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16567 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16569 * configure.srv (arm*-*-mingw32ce*): Move near the other
16572 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16574 * configure.ac: Add errno checking.
16575 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16576 sys/file.h and malloc.h.
16577 (AC_CHECK_DECLS): Add perror.
16578 (srv_mingwce): Handle.
16579 * configure.srv (i[34567]86-*-cygwin*): Add
16580 win32-i386-low.o to srv_tgtobj.
16581 (i[34567]86-*-mingw*): Likewise.
16582 (arm*-*-mingw32ce*): Add case.
16583 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16584 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16585 [__MINGW32CE__] (strerror): New function.
16586 [__MINGW32CE__] (errno): Define to GetLastError.
16587 [__MINGW32CE__] (COUNTOF): New macro.
16588 (remote_open): Remove extra close call.
16589 * mem-break.c (delete_breakpoint_at): New function.
16590 * mem-break.h (delete_breakpoint_at): Declare.
16591 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16592 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16593 [USE_WIN32API] (read, write): Add char* casts.
16594 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16595 * server.h: Include wincecompat.h on Windows CE.
16596 [HAVE_ERRNO_H]: Check.
16597 (perror): Declare if not declared.
16598 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16599 (perror_with_name): Remove errno declaration.
16600 * wincecompat.h: New.
16601 * wincecompat.c: New.
16602 * win32-low.h: New.
16603 * win32-arm-low.c: New.
16604 * win32-i386-low.c: New.
16605 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16606 (OUTMSG2): Make it safe.
16608 (COUNTOF): New macro.
16609 (NUM_REGS): Get it from the low target.
16610 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16611 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16612 (thread_rec): Let low target handle debug registers.
16613 (child_add_thread): Likewise.
16614 (child_init_thread_list): Likewise.
16615 (continue_one_thread): Likewise.
16617 (do_child_fetch_inferior_registers): Move to ...
16618 * win32-i386-low.c: ... here, and rename to ...
16619 (do_fetch_inferior_registers): ... this.
16620 * win32-low.c (child_fetch_inferior_registers):
16621 Go through the low target.
16622 (do_child_store_inferior_registers): Use regptr.
16623 (strwinerror): New function.
16624 (win32_create_inferior): Handle Windows CE.
16625 Use strwinerror instead of strerror on Windows error
16626 codes. Add program to the error output.
16627 Don't close the main thread handle on Windows CE.
16628 (win32_attach): Use coredll.dll on Windows CE.
16629 (win32_kill): Close current process and current
16631 (win32_detach): Use coredll.dll on Windows CE.
16632 (win32_resume): Let low target handle debug registers, and
16634 (handle_exception): Add/Remove initial breakpoint. Avoid
16635 non-existant WSTOPSIG on Windows CE.
16636 (win32_read_inferior_memory): Cast to remove warning.
16637 (win32_arch_string): Go through the low target.
16638 (initialize_low): Call set_breakpoint_data with the low
16639 target's breakpoint.
16640 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16641 FOP_REGNUM, mappings): Move to ...
16642 * win32-i386-low.c: ... here.
16643 * win32-low.c (win32_thread_info): Move to ...
16644 * win32-low.h: ... here.
16645 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16646 win32-arm-low.c and wincecompat.c.
16647 (all:): Add $EXEEXT.
16648 (install-only:): Likewise.
16649 (gdbserver:): Likewise.
16650 (gdbreplay:): Likewise.
16651 * config.in: Regenerate.
16652 * configure: Regenerate.
16654 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16656 * win32-low.c: Rename typedef thread_info to
16657 win32_thread_info throughout.
16659 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16661 * win32-i386-low.c: Rename to ...
16662 * win32-low.c: ... this.
16663 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16664 * Makefile.in: Likewise.
16666 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16668 * remote-utils.c (monitor_output): Constify msg parameter.
16669 * server.h (monitor_output): Likewise.
16670 * win32-i386-low.c (handle_output_debug_string): New.
16671 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16672 handle_output_debug_string.
16673 (get_child_debug_event): Likewise.
16675 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16677 * server.c (main): Correct strtoul check.
16679 2007-03-27 Jon Ringle <jon@ringle.org>
16681 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16683 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16685 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16687 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16689 * terminal.h: Check HAVE_SGTTY_H.
16691 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16693 * remote-utils.c (remote_open): Print out the assigned port number.
16695 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16697 * remote-utils.c (monitor_output): New function.
16698 * server.c (debug_threads): Define here.
16699 (monitor_show_help): New function.
16700 (handle_query): Handle qRcmd.
16701 (main): Do not handle 'd' packet.
16702 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16703 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16706 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16708 * Makefile.in (EXEEXT): New.
16709 (clean): Use $(EXEEXT).
16711 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16713 * target.h (target_ops): Rename send_signal to request_interrupt,
16714 and remove enum target_signal parameter.
16715 * linux-low.c (linux_request_interrupt): Rename from
16716 linux_send_signal, and always send SIGINT.
16717 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16718 and always send SIGINT.
16719 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16721 (input_interrupt): Likewise.
16723 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16725 * server.c (get_features_xml): Check if target implemented
16727 * win32-i386-low.c (win32_arch_string): New.
16728 (win32_target_ops): Add win32_arch_string as arch_string member.
16730 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16732 * spu-low.c (spu_arch_string): New.
16733 (spu_target_ops): Add spu_arch_string.
16735 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16737 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16738 * configure.ac: Do not check for terminal.h.
16739 * configure, config.in: Regenerated.
16741 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16743 * Makefile.in (OBS): Add $(XML_BUILTIN).
16744 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16746 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16747 (arm-with-iwmmxt.c): New.
16748 * config.in, configure: Regenerate.
16749 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16750 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16751 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16752 (arm*-*-linux*): Add iWMMXt and regset support.
16753 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16754 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16755 (arm_store_wmmxregset, target_regsets): New.
16756 * server.c (get_features_xml): Take annex argument. Check builtin
16758 (handle_query): Handle multiple annexes.
16760 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16762 * remote-utils.c [USE_WIN32API] (read, write): Define.
16763 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16766 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16768 * linux-i386-low.c (the_low_target): Set arch_string.
16769 * linux-x86-64-low.c (the_low_target): Likewise.
16770 * linux-low.c (linux_arch_string): New.
16771 (linux_target_ops): Add it.
16772 * linux-low.h (struct linux_target_ops): Add arch_string.
16773 * server.c (write_qxfer_response): Use const void * for DATA.
16774 (get_features_xml): New.
16775 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16776 * target.h (struct target_ops): Add arch_string method.
16778 2007-01-03 Denis Pilat <denis.pilat@st.com>
16779 Daniel Jacobowitz <dan@codesourcery.com>
16781 * linux-low.c (linux_kill): Handle being called with no threads.
16782 * win32-i386-low.c (win32_kill): Likewise.
16783 (get_child_debug_event): Clear current_process_handle.
16785 2006-12-30 Denis PILAT <denis.pilat@st.com>
16786 Daniel Jacobowitz <dan@codesourcery.com>
16788 * remote-utils.c (remote_open): Check the type of specified
16789 serial port devices before opening them.
16790 * server.c (main): Kill the inferior if an error occurs during
16791 the first remote_open.
16793 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16795 * README: Update supported targets.
16797 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16799 * Makefile.in (clean): Remove reg-mips64.c.
16800 (reg-mips64.c, reg-mips64.o): New rules.
16801 * configure.srv: Handle mips64. Include regset support for mips.
16802 * linux-mips-low.c (union mips_register): New.
16803 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16804 (mips_breakpoint, mips_breakpoint_at): Use int.
16805 (mips_collect_register, mips_supply_register)
16806 (mips_collect_register_32bit, mips_supply_register_32bit)
16807 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16808 (mips_store_fpregset, target_regsets): New.
16809 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16811 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16813 * configure.srv: Add target "spu*-*-*".
16814 * Makefile.in (clean): Remove reg-spu.c.
16815 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16816 * spu-low.c: New file.
16818 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16820 * configure.ac: Correct td_thr_tls_get_addr test.
16821 * configure: Regenerated.
16823 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16825 * linux-low.c (linux_wait_for_event): Reformat. Use the
16826 pass_signals array.
16827 * remote-utils.c (decode_address_to_semicolon): New.
16828 * server.c (pass_signals, handle_general_set): New.
16829 (handle_query): Mention QPassSignals for qSupported.
16830 (main): Call handle_general_set.
16831 * server.h (pass_signals, decode_address_to_semicolon): New.
16833 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16835 * server.c (handle_query): Correct error handling for read_auxv.
16837 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16839 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16840 and srv_linux_thread_db to yes.
16841 * linux-s390-low.c (s390_fill_gregset): New function.
16842 (target_regsets): Define data structure.
16844 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16846 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16847 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16848 * config.in, configure: Regenerated.
16849 * inferiors.c (gdb_id_to_thread): New function.
16850 (gdb_id_to_thread_id): Use it.
16851 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16852 * linux-low.h (struct process_info): Add th member.
16853 (thread_db_get_tls_address): New prototype.
16854 * remote-utils.c (decode_address): Make non-static.
16855 * server.c (handle_query): Handle qGetTLSAddr.
16856 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16857 * target.h (struct target_ops): Add get_tls_address.
16858 * thread-db.c (maybe_attach_thread): Save the thread handle.
16859 (thread_db_get_tls_address): New.
16861 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16863 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16864 (linux_resume_one_process): Take a siginfo_t *. Update all
16865 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16866 (struct pending_signals): Add a siginfo_t.
16867 (linux_wait_for_process): Always set last_status.
16868 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16869 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16870 * linux-low.h (struct process_info): Add last_status.
16872 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16874 * remote-utils.c (try_rle): New function.
16875 (putpkt_binary): Use it.
16877 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16879 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16880 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16881 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16882 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16883 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16886 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16888 * server.c (terminal_fd): New variable.
16889 (old_foreground_pgrp): Likewise.
16890 (restore_old_foreground_pgrp): New function.
16891 (start_inferior): Record the terminal file descriptor in terminal_fd
16892 and its original foreground group in old_foreground_pgrp. Register
16893 restore_old_foreground_pgrp with atexit().
16895 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16897 * server.c (handle_query): Correct qPart to qXfer.
16899 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16901 * configure.ac: Check for more headers which are missing on
16902 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16903 * configure.srv: Add Cygwin and mingw32.
16904 * remote-utils.c: Don't include headers unconditionally which
16905 are missing on mingw32. Include <winsock.h> for mingw32.
16906 (remote_open): Adjust for mingw32 support. Flush
16907 standard error after writing to it.
16908 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16909 (unblock_async_io, enable_async_io, disable_async_io)
16910 (readchar, getpkt): Update for Winsock support.
16911 (prepare_resume_reply): Expect a protocol signal number.
16912 * server.c: Disable <sys/wait.h> on mingw32.
16913 (start_inferior): Adjust for mingw32 support. Flush
16914 standard error after writing to it.
16915 (attach_inferior): Likewise. Use protocol signal
16917 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16919 * win32-i386-low.c: New file.
16920 * Makefile.in (XM_CLIBS): Set.
16921 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16922 (win32-i386-low.o): New dependency rule.
16923 * linux-low.c (linux_wait): Use target signal numbers.
16924 * target.h (struct target_ops): Doc fix.
16925 * server.h (target_signal_to_name): New prototype.
16926 * gdbreplay.c: Don't include headers unconditionally which
16927 are missing on mingw32. Include <winsock.h> for mingw32.
16928 (remote_close, remote_open): Adjust for Winsock support.
16929 * configure, config.in: Regenerated.
16931 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16933 * server.c (decode_xfer_read, write_qxfer_response): New.
16934 (handle_query): Take a packet length argument. Handle
16935 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16936 the qSupported response.
16937 (main): Update call to handle_query.
16939 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16941 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16942 (putpkt_binary): Renamed from putpkt and adjusted for binary
16944 (putpkt): New wrapper for putpkt_binary.
16945 (readchar): Don't mask off the high bit.
16946 (decode_X_packet): New function.
16947 * server.c (main): Call putpkt_binary if a handler sets the packet
16948 length. Save the length of the incoming packet. Handle 'X'.
16949 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16951 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16953 * server.c (handle_query): Handle qSupported.
16955 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16957 * remote-utils.c (all_symbols_looked_up): New variable.
16958 (look_up_one_symbol): Check it.
16959 * server.h (look_up_one_symbol): New declaration.
16960 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16962 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16964 * Makefile.in (linux-arm-low.o): Update dependencies.
16965 * linux-arm-low.c: Include "gdb_proc_service.h".
16966 (PTRACE_GET_THREAD_AREA): Define.
16967 (ps_get_thread_area): New function.
16969 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16971 * configure.srv (m68k*-*-uclinux*): New target.
16972 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16973 (linux_resume_one_process): Remove extraneous cast.
16974 (linux_read_offsets): New.
16975 (linux_target_op): Add linux_read_offsets on mmuless systems.
16976 * server.c (handle_query): Add qOffsets logic.
16977 * target.h (struct target_ops): Add read_offsets.
16979 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16981 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16982 (PTRACE_GET_THREAD_AREA): Define.
16983 (ps_get_thread_area): New function.
16984 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16985 (linux-x86-64-low.o): Update.
16987 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16989 * configure.ac: Remove checks for prfpregset_t.
16990 * gdb_proc_service.h: New file.
16991 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16992 new "gdb_proc_service.h".
16993 * proc-service.c: Likewise.
16994 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16995 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16996 * Makefile.in (gdb_proc_service_h): Updated.
16997 * configure, config.in: Regenerated.
16999 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17001 * remote-utils.c (prepare_resume_reply): Move declaration
17002 of gdb_id_from_wait to the top of the block.
17004 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17006 * linux-low.c (regsets_store_inferior_registers): Read the regset
17007 from the target before filling it.
17009 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17011 * server.c (attach_inferior): Return SIGTRAP for a successful
17014 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17016 * Makefile.in (OBS): Add version.o.
17017 (STAGESTUFF): Delete.
17018 (version.o): Add dependencies.
17019 (version.c): Replace rule.
17020 (clean): Remove version.c.
17021 * server.c (gdbserver_version): New.
17022 (gdbserver_usage): Use printf.
17023 (main): Handle --version and --help.
17024 * server.h (version, host_name): Add declarations.
17026 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17038 * linux-x86-64-low.c:
17040 * linux-s390-low.c:
17041 * linux-ppc64-low.c:
17043 * linux-mips-low.c:
17044 * linux-m68k-low.c:
17045 * linux-m32r-low.c:
17048 * linux-ia64-low.c:
17049 * linux-i386-low.c:
17050 * linux-crisv32-low.c:
17062 * gdbserver.1: Add (C) after Copyright. Update the FSF
17065 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17067 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17068 (arm_breakpoint_at): Recognize both breakpoints.
17069 (the_low_target): Use the correct breakpoint instruction.
17071 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17073 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17074 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17075 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17076 (the_low_target): Update.
17078 2005-10-25 Andreas Schwab <schwab@suse.de>
17080 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17082 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17083 (ia64_num_regs): Reduce to 462.
17085 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17087 * acinclude.m4: Correct quoting.
17088 * aclocal.m4: Regenerated.
17090 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17091 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17092 (thread_db_init): Call thread_db_err_str.
17093 * configure.ac: Check for TD_VERSION.
17094 * config.in, configure: Regenerated.
17096 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17098 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17100 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17102 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17103 is not available. Define HAVE_PTRACE_GETREGS if it is.
17104 * config.in, configure: Regenerated.
17105 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17106 * linux-i386-low.c, linux-m68k-low.c: Update to use
17107 HAVE_PTRACE_GETREGS.
17108 * linux-low.c (regsets_fetch_inferior_registers)
17109 (regsets_store_inferior_registers): Only return 0 if we processed
17111 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17112 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17114 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17116 * inferiors.c (struct thread_info): Add gdb_id.
17117 (add_thread): Add gdb_id argument.
17118 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17119 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17120 calls to add_thread.
17121 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17122 * server.c (handle_query): Use thread_to_gdb_id.
17123 (handle_v_cont, main): Use gdb_id_to_thread_id.
17124 * server.h (add_thread): Update prototype.
17125 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17128 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17130 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17131 left-padded registers.
17132 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17133 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17135 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17137 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17138 * configure: Regenerate.
17139 * config.in: Regenerate.
17140 * server.h (NEED_DECLARATION_STRERROR):
17141 Replace with !HAVE_DECL_STRERROR.
17143 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17145 * linux-low.c (linux_wait, linux_send_signal): Don't test
17146 an unsigned long variable for > 0 if it could be MAX_ULONG.
17147 * server.c (myresume): Likewise.
17148 * target.c (set_desired_inferior): Likewise.
17150 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17152 * configure.ac: Simplify and improve check for socklen_t.
17153 * configure, config.in: Regenerate.
17155 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17157 * acconfig.h: Remove.
17158 * configure.ac: Add a test for socklen_t. Use three-argument
17159 AC_DEFINE throughout.
17160 * config.in: Regenerated using autoheader 2.59.
17161 * configure: Regenerated.
17163 * gdbreplay.c (socklen_t): Provide a default.
17164 (remote_open): Use socklen_t.
17165 * remote-utils.c (socklen_t): Provide a default.
17166 (remote_open): Use socklen_t.
17167 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17170 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17172 * linux-low.c (linux_read_memory, linux_write_memory)
17173 (linux_read_auxv): Likewise.
17174 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17175 (check_mem_write): Likewise.
17176 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17178 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17179 (registers_from_string, register_data): Likewise.
17180 * server.c (handle_query, main): Likewise.
17181 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17182 (decode_M_packet): Likewise.
17183 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17184 * target.h (struct target_ops): Update read_memory, write_memory,
17186 (read_inferior_memory, write_inferior_memory): Update.
17187 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17188 to unsigned char *.
17189 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17190 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17191 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17192 linux-s390-low.c, linux-sh-low.c: Update for changes in
17193 read_inferior_memory and the_low_target->breakpoint.
17195 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17197 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17198 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17199 * configure.srv: Add powerpc64-*-linux*.
17200 * linux-ppc64-low.c: New file.
17202 2005-05-23 Orjan Friberg <orjanf@axis.com>
17204 * linux-cris-low.c: New file with support for CRIS.
17205 * linux-crisv32-low.c: Ditto for CRISv32.
17206 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17207 (clean): Add reg-cris.c and reg-crisv32.c.
17208 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17209 reg-crisv32.o, and reg-crisv32.c to make rules.
17210 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17211 recognized targets.
17213 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17215 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17216 of sizeof (PTRACE_XFER_TYPE).
17217 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17219 2005-05-12 Orjan Friberg <orjanf@axis.com>
17221 * target.h (struct target_ops): Add insert_watchpoint,
17222 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17223 pointers for hardware watchpoint support.
17224 * linux-low.h (struct linux_target_ops): Ditto.
17225 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17226 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17227 to linux_target_ops.
17228 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17230 * server.c (main): Recognize 'Z' and 'z' packets.
17232 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17234 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17235 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17236 (the_low_target): Add new members.
17238 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17240 * proc-service.c (ps_lgetregs): Search all_processes instead of
17243 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17245 * server.c (start_inferior): Change return type to int.
17246 (attach_inferior): Change sigptr to int *.
17247 (handle_v_cont, handle_v_requests): Change signal to int *.
17248 (main): Change signal to int.
17250 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17252 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17253 * configure.srv: Add m32r*-*-linux*.
17254 * linux-m32r-low.c: New file.
17256 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17258 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17260 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17262 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17263 Take unsigned long arguments for PIDs.
17264 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17265 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17266 (wait_for_sigstop, linux_resume_one_process)
17267 (regsets_fetch_inferior_registers, linux_send_signal)
17268 (linux_read_auxv): Likewise. Update the types of variables holding
17269 PIDs. Update format string specifiers.
17270 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17271 * remote-utils.c (prepare_resume_reply): Likewise.
17272 * server.c (cont_thread, general_thread, step_thread)
17273 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17275 (handle_query): Update format specifiers.
17276 (handle_v_cont, main): Use strtoul for thread IDs.
17277 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17278 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17279 (general_thread, step_thread, thread_from_wait)
17280 (old_thread_from_wait): Update.
17281 * target.h (struct thread_resume): Use unsigned long for THREAD.
17282 (struct target_ops): Use unsigned long for arguments to attach and
17285 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17287 * acinclude.m4: Include bfd/bfd.m4 directly.
17288 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17289 <agriffis@toolchain.org>.
17290 * aclocal.m4, configure: Regenerated.
17292 2005-01-07 Andrew Cagney <cagney@gnu.org>
17294 * configure.ac: Rename configure.in, require autoconf 2.59.
17295 * configure: Re-generate.
17297 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17299 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17300 LIBS when finished.
17301 * aclocal.m4: Regenerated.
17302 * configure: Regenerated.
17304 2004-11-21 Andreas Schwab <schwab@suse.de>
17306 * linux-m68k-low.c (m68k_num_gregs): Define.
17307 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17308 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17309 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17310 (m68k_breakpoint_at): New. Add to the_low_target.
17312 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17313 srv_linux_thread_db to yes.
17315 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17317 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17318 (ARCH_SET_FS): Likewise.
17319 (ARCH_GET_FS): Likewise.
17320 (ARCH_GET_GS): Likewise.
17322 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17324 * linux-i386-low.c (ps_get_thread_area): New.
17325 * linux-x86-64-low.c (ps_get_thread_area): New.
17326 * linux-low.c: Include <sys/syscall.h>.
17327 (linux_kill_one_process): Don't kill the first thread here.
17328 (linux_kill): Kill the first thread here.
17329 (kill_lwp): New function.
17330 (send_sigstop, linux_send_signal): Use it.
17331 * proc-service.c: Clean up #ifdefs.
17332 (fpregset_info): Delete.
17333 (ps_lgetregs): Update and enable implementation.
17334 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17336 * remote-utils.c (struct sym_cache, symbol_cache): New.
17337 (input_interrupt): Print a clearer message.
17338 (async_io_enabled): New variable.
17339 (enable_async_io, disable_async_io): Use it. Update comments.
17340 (look_up_one_symbol): Use the symbol cache.
17341 * thread-db.c (thread_db_look_up_symbols): New function.
17342 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17344 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17346 * configure.in: Test for -rdynamic.
17347 * configure: Regenerated.
17348 * Makefile (INTERNAL_LDFLAGS): New.
17349 (gdbserver, gdbreplay): Use it.
17351 2004-09-02 Andrew Cagney <cagney@gnu.org>
17353 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17355 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17357 * linux-low.c (linux_wait): Clear all_processes list also.
17359 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17361 * linux-low.c: Include <errno.h>. Remove extern declaration of
17364 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17366 * gdbreplay.c, server.h, utils.c: Update copyright years.
17368 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17370 * server.c (main): Print child status or termination signal from
17371 variable 'signal', not 'sig'.
17373 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17375 * linux-low.c (linux_read_memory): Change return type to
17376 int. Check for and return error from ptrace().
17377 * target.c (read_inferior_memory): Change return type to int. Pass
17378 back return status from the_target->read_memory().
17379 * target.h (struct target_ops): Adapt *read_memory() prototype.
17381 (read_inferior_memory): Adapt prototype.
17382 * server.c (main): Return an error packet if
17383 read_inferior_memory() returns an error.
17385 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17387 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17388 Unify with other clean targets.
17390 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17392 * server.c (handle_v_cont): Call set_desired_inferior.
17394 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17396 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17398 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17400 * linux-low.c (linux_wait): Unblock async I/O.
17401 (linux_resume): Block and enable async I/O.
17402 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17403 * server.h (block_async_io, unblock_async_io): Add prototypes.
17405 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17407 * remote-utils.c (remote_open): Print a status notice after
17408 opening a TCP port.
17409 * server.c (attach_inferior): Print a status notice after
17412 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17414 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17416 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17418 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17420 * server.c, target.h: Update copyright years.
17422 2004-02-25 Roland McGrath <roland@redhat.com>
17424 * target.h (struct target_ops): New member `read_auxv'.
17425 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17426 * linux-low.c (linux_read_auxv): New function.
17427 (linux_target_ops): Initialize `read_auxv' member to that.
17429 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17431 Committed by Jim Blandy <jimb@redhat.com>.
17433 * linux-s390-low.c (s390_num_regs): Update.
17434 (s390_regmap): Remove control registers. Use __s390x__ predefine
17435 instead of GPR_SIZE to distiguish s390 and s390x targets.
17437 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17439 * linux-low.c: Update copyright year.
17440 (check_removed_breakpoint): Clear pending_is_breakpoint.
17441 (linux_set_resume_request, linux_queue_one_thread)
17442 (resume_status_pending_p): New functions.
17443 (linux_continue_one_thread): Use process->resume.
17444 (linux_resume): Only resume threads if there are no pending events.
17445 * linux-low.h (struct process_info): Add resume request
17448 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17450 * regcache.c (new_register_cache): Clear the allocated register
17451 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17453 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17455 * linux-low.c (linux_resume): Take a struct thread_resume *
17457 (linux_wait): Update call.
17458 (resume_ptr): New static variable.
17459 (linux_continue_one_thread): Renamed from
17460 linux_continue_one_process. Use resume_ptr.
17461 (linux_resume): Use linux_continue_one_thread.
17462 * server.c (handle_v_cont, handle_v_requests): New functions.
17463 (myresume): New function.
17464 (main): Handle 'v' case.
17465 * target.h (struct thread_resume): New type.
17466 (struct target_ops): Change argument of "resume" to struct
17468 (myresume): Delete macro.
17470 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17472 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17473 (uninstall): Support DESTDIR.
17475 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17477 * configure.srv: Add xscale*linux copy of arm*linux entry.
17479 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17481 * linux-arm-low.c (arm_reinsert_addr): New function.
17482 (the_low_target): Add arm_reinsert_addr.
17484 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17486 * mem-break.c: Remove whitespace at end of file.
17488 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17490 * configure.in: Check whether we need to prototype strerror.
17491 * server.h: Optionally prototype strerror.
17492 * gdbreplay.c (perror_with_name): Use strerror.
17493 * linux-low.c (linux_attach_lwp): Use strerror.
17494 * utils.c (perror_with_name): Use strerror.
17495 * config.in, configure: Regenerated.
17497 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17499 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17500 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17502 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17504 * Makefile.in (SFILES): Update.
17505 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17506 low-sun3.c: Remove files.
17508 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17510 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17511 (linux_detach_one_process, linux_detach): New functions.
17512 (linux_target_ops): Add linux_detach.
17513 * server.c (main): Handle 'D' packet.
17514 * target.h (struct target_ops): Add "detach" member.
17515 (detach_inferior): Define.
17517 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17519 From Kelley Cook <kelleycook@wideopenwest.com>:
17520 * configure.srv: Accept i[34567]86 variants.
17522 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17524 * linux-low.c (linux_wait_for_event): Correct comment typos.
17525 (linux_resume_one_process): Call check_removed_breakpoint.
17526 (linux_send_signal): New function.
17527 (linux_target_ops): Add linux_send_signal.
17528 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17530 * target.h (struct target_ops): Add send_signal.
17532 2003-05-29 Jim Blandy <jimb@redhat.com>
17534 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17535 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17536 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17537 away part of the register's value.
17539 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17541 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17542 (linux_wait_for_event, linux_init_signals): Likewise.
17544 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17546 * configure.in: Check for stdlib.h.
17547 * configure: Regenerated.
17548 * config.in: Regenerated.
17550 2003-01-04 Andreas Schwab <schwab@suse.de>
17552 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17554 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17556 * Makefile.in: Remove obsolete code.
17558 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17560 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17561 defined(PT_FPR0_HI).
17563 2002-11-17 Stuart Hughes <seh@zee2.com>
17565 * linux-arm-low.c (arm_num_regs): Increase.
17566 (arm_regmap): Include status register.
17568 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17570 * linux-low.c (register_addr): Remove incorrect -1 check.
17572 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17574 * linux-low.c (linux_create_inferior): Call setpgid. Return
17576 (unstopped_p, linux_signal_pid): Remove.
17577 (linux_target_ops): Remove linux_signal_pid.
17578 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17579 global instead of target method.
17580 * target.h (struct target_ops): Remove signal_pid. Update comment
17581 for create_inferior.
17582 * server.c (signal_pid): New variable.
17583 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17584 gdbserver. Set the child to be the foreground process group.
17585 (attach_inferior): Set signal_pid.
17587 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17589 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17591 2002-08-20 Jim Blandy <jimb@redhat.com>
17593 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17596 2002-08-01 Andrew Cagney <cagney@redhat.com>
17598 * Makefile.in: Make chill references obsolete.
17600 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17602 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17603 * configure: Regenerate.
17604 * config.in: Regenerate.
17606 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17608 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17609 (perror_with_name, remote_close, remote_open, expect, play): Static.
17611 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17613 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17614 byte offsets instead of an array of indexes.
17615 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17617 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17619 * regcache.c: Add comment.
17621 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17623 * thread-db.c: New file.
17624 * proc-service.c: New file.
17625 * acinclude.m4: New file.
17626 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17627 proc-service.o, and thread-db.o.
17628 (linux-low.o): Add USE_THREAD_DB.
17629 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17630 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17631 * aclocal.m4: Regenerated.
17632 * config.in: Regenerated.
17633 * configure: Regenerated.
17634 * configure.in: Check for proc_service.h, sys/procfs.h,
17635 thread_db.h, and linux/elf.h headrs.
17636 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17637 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17638 Check for -lthread_db and thread support.
17639 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17640 PowerPC, and SuperH.
17641 * i387-fp.c: Constify arguments.
17642 * i387-fp.h: Likewise.
17643 * inferiors.c: (struct thread_info): Renamed from
17644 `struct inferior_info'. Remove PID member. Use generic inferior
17645 list header. All uses updated.
17646 (inferiors, signal_pid): Removed.
17647 (all_threads): New variable.
17648 (get_thread): Define.
17649 (add_inferior_to_list): New function.
17650 (for_each_inferior): New function.
17651 (change_inferior_id): New function.
17652 (add_inferior): Removed.
17653 (remove_inferior): New function.
17654 (add_thread): New function.
17655 (free_one_thread): New function.
17656 (remove_thread): New function.
17657 (clear_inferiors): Use for_each_inferior and free_one_thread.
17658 (find_inferior): New function.
17659 (find_inferior_id): New function.
17660 (inferior_target_data): Update argument type.
17661 (set_inferior_target_data): Likewise.
17662 (inferior_regcache_data): Likewise.
17663 (set_inferior_regcache_data): Likewise.
17664 * linux-low.c (linux_bp_reinsert): Remove.
17665 (all_processes, stopping_threads, using_thrads)
17666 (struct pending_signals, debug_threads, pid_of): New.
17667 (inferior_pid): Replace with macro.
17668 (struct inferior_linux_data): Remove.
17669 (get_stop_pc, add_process): New functions.
17670 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17671 Use add_process and add_thread.
17672 (linux_attach_lwp): New function, based on old linux_attach. Use
17673 add_process and add_thread. Set stop_expected for new threads.
17674 (linux_attach): New function.
17675 (linux_kill_one_process): New function.
17676 (linux_kill): Kill all LWPs.
17677 (linux_thread_alive): Use find_inferior_id.
17678 (check_removed_breakpoints, status_pending_p): New functions.
17679 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17680 Update. Use WNOHANG. Wait for cloned processes also. Update process
17681 struct for the found process.
17682 (linux_wait_for_event): New function.
17683 (linux_wait): Use it. Support LWPs.
17684 (send_sigstop, wait_for_sigstop, stop_all_processes)
17685 (linux_resume_one_process, linux_continue_one_process): New functions.
17686 (linux_resume): Support LWPs.
17687 (REGISTER_RAW_SIZE): Remove.
17688 (fetch_register): Use register_size instead. Call supply_register.
17689 (usr_store_inferior_registers): Likewise. Call collect_register.
17690 Fix recursive case.
17691 (regsets_fetch_inferior_registers): Improve error message.
17692 (regsets_store_inferior_registers): Add debugging.
17693 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17694 (unstopped_p, linux_signal_pid): New functions.
17695 (linux_target_ops): Add linux_signal_pid.
17696 (linux_init_signals): New function.
17697 (initialize_low): Call it. Initialize using_threads.
17698 * regcache.c (inferior_regcache_data): Add valid
17700 (get_regcache): Fetch registers lazily. Add fetch argument
17701 and update all callers.
17702 (regcache_invalidate_one, regcache_invalidate): New
17704 (new_register_cache): Renamed from create_register_cache.
17705 Return the new regcache.
17706 (free_register_cache): Change argument to a void *.
17707 (registers_to_string, registers_from_string): Call get_regcache
17708 with fetch flag set.
17709 (register_data): Make static. Pass fetch flag to get_regcache.
17710 (supply_register): Call get_regcache with fetch flag clear.
17711 (collect_register): Call get_regcache with fetch flag set.
17712 (collect_register_as_string): New function.
17713 * regcache.h: Update.
17714 * remote-utils.c (putpkt): Flush after debug output and use
17716 Handle input interrupts while waiting for an ACK.
17717 (input_interrupt): Use signal_pid method.
17718 (getpkt): Flush after debug output and use stderr.
17719 (outreg): Use collect_register_as_string.
17720 (new_thread_notify, dead_thread_notify): New functions.
17721 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17722 and general_thread.
17723 (look_up_one_symbol): Flush after debug output.
17724 * server.c (step_thread, server_waiting): New variables.
17725 (start_inferior): Don't use signal_pid. Update call to mywait.
17726 (attach_inferior): Update call to mywait.
17727 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17728 (main): Don't fetch/store registers explicitly. Use
17729 set_desired_inferior. Support proposed ``Hs'' packet. Update
17731 * server.h: Update.
17732 (struct inferior_list, struct_inferior_list_entry): New.
17733 * target.c (set_desired_inferior): New.
17734 (write_inferior_memory): Constify.
17735 (mywait): New function.
17736 * target.h: Update.
17737 (struct target_ops): New signal_pid method.
17738 (mywait): Removed macro, added prototype.
17740 * linux-low.h (regset_func): Removed.
17741 (regset_fill_func, regset_store_func): New.
17742 (enum regset_type): New.
17743 (struct regset_info): Add type field. Use new operation types.
17744 (struct linux_target_ops): stop_pc renamed to get_pc.
17745 Add decr_pc_after_break and breakpoint_at.
17746 (get_process, get_thread_proess, get_process_thread)
17747 (strut process_info, all_processes, linux_attach_lwp)
17748 (thread_db_init): New.
17750 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17751 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17752 (the_low_target): Add new members.
17753 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17754 (i386_store_fpxregset): Constify.
17755 (target_regsets): Add new kind identifier.
17756 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17757 (i386_set_pc): Add debugging.
17758 (i386_breakpoint_at): New function.
17759 (the_low_target): Add new members.
17760 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17761 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17762 (mips_breakpoint_at): New.
17763 (the_low_target): Add new members.
17764 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17765 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17766 (the_low_target): Add new members.
17767 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17768 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17769 (the_low_target): Add new members.
17770 * linux-x86-64-low.c (target_regsets): Add new kind
17773 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17775 From Martin Pool <mbp@samba.org>:
17776 * server.c (gdbserver_usage): New function.
17779 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17781 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17782 stop_at -> stop_pc.
17784 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17786 * Makefile.in: Remove obsolete code.
17788 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17790 * linux-low.c (regsets_fetch_inferior_registers),
17791 (regsets_store_inferior_registers): Removed cast to int from
17793 * regcache.h: Added declaration of struct inferior_info.
17795 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17797 * inferiors.c (struct inferior_info): Add regcache_data.
17798 (add_inferior): Call create_register_cache.
17799 (clear_inferiors): Call free_register_cache.
17800 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17801 * regcache.c (struct inferior_regcache_data): New.
17802 (registers): Remove.
17803 (get_regcache): New function.
17804 (create_register_cache, free_register_cache): New functions.
17805 (set_register_cache): Don't initialize the register cache here.
17806 (registers_to_string, registers_from_string, register_data): Call
17808 * regcache.h: Add prototypes.
17809 * server.h: Likewise.
17811 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17813 * mem-break.c: New file.
17814 * mem-break.h: New file.
17815 * Makefile.in: Add mem-break.o rule; update server.h
17817 * inferiors.c (struct inferior_info): Add target_data
17819 (clear_inferiors): Free target_data member if set.
17820 (inferior_target_data, set_inferior_target_data): New functions.
17821 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17822 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17823 * linux-low.c (linux_bp_reinsert): New variable.
17824 (struct inferior_linux_data): New.
17825 (linux_create_inferior): Use set_inferior_target_data.
17826 (linux_attach): Likewise. Call add_inferior.
17827 (linux_wait_for_one_inferior): New function.
17828 (linux_wait): Call it.
17829 (linux_write_memory): Add const.
17830 (initialize_low): Call set_breakpoint_data.
17831 * linux-low.h (struct linux_target_ops): Add breakpoint
17833 * server.c (attach_inferior): Remove extra add_inferior
17835 * server.h: Include mem-break.h. Update inferior.c
17837 * target.c (read_inferior_memory)
17838 (write_inferior_memory): New functions.
17839 * target.h (read_inferior_memory)
17840 (write_inferior_memory): Change macros to prototypes.
17841 (struct target_ops): Update comments. Add const to write_memory
17844 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17846 * linux-low.c (usr_store_inferior_registers): Support
17847 registers which are allowed to fail to store.
17848 * linux-low.h (linux_target_ops): Likewise.
17849 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17850 (ppc_cannot_store_register): FPSCR may not be storable.
17852 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17854 * server.h: Include <string.h> if HAVE_STRING_H.
17855 * ChangeLog: Correct paths in last ChangeLog entry.
17857 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17859 * linux-low.h: Remove obsolete prototypes.
17860 (struct linux_target_ops): New.
17861 (extern the_low_target): New.
17862 * linux-low.c (num_regs, regmap): Remove declarations.
17863 (register_addr): Use the_low_target explicitly.
17864 (fetch_register): Likewise.
17865 (usr_fetch_inferior_registers): Likewise.
17866 (usr_store_inferior_registers): Likewise.
17867 * linux-arm-low.c (num_regs): Remove.
17868 (arm_num_regs): Define.
17869 (arm_regmap): Renamed from regmap, made static.
17870 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17872 (arm_cannot_store_register): Renamed from cannot_store_register,
17874 (the_low_target): New.
17875 * linux-i386-low.c (num_regs): Remove.
17876 (i386_num_regs): Define.
17877 (i386_regmap): Renamed from regmap, made static.
17878 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17880 (i386_cannot_store_register): Renamed from cannot_store_register,
17882 (the_low_target): New.
17883 * linux-ia64-low.c (num_regs): Remove.
17884 (ia64_num_regs): Define.
17885 (ia64_regmap): Renamed from regmap, made static.
17886 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17888 (ia64_cannot_store_register): Renamed from cannot_store_register,
17890 (the_low_target): New.
17891 * linux-m68k-low.c (num_regs): Remove.
17892 (m68k_num_regs): Define.
17893 (m68k_regmap): Renamed from regmap, made static.
17894 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17896 (m68k_cannot_store_register): Renamed from cannot_store_register,
17898 (the_low_target): New.
17899 * linux-mips-low.c (num_regs): Remove.
17900 (mips_num_regs): Define.
17901 (mips_regmap): Renamed from regmap, made static.
17902 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17904 (mips_cannot_store_register): Renamed from cannot_store_register,
17906 (the_low_target): New.
17907 * linux-ppc-low.c (num_regs): Remove.
17908 (ppc_num_regs): Define.
17909 (ppc_regmap): Renamed from regmap, made static.
17910 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17912 (ppc_cannot_store_register): Renamed from cannot_store_register,
17914 (the_low_target): New.
17915 * linux-s390-low.c (num_regs): Remove.
17916 (s390_num_regs): Define.
17917 (s390_regmap): Renamed from regmap, made static.
17918 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17920 (s390_cannot_store_register): Renamed from cannot_store_register,
17922 (the_low_target): New.
17923 * linux-sh-low.c (num_regs): Remove.
17924 (sh_num_regs): Define.
17925 (sh_regmap): Renamed from regmap, made static.
17926 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17928 (sh_cannot_store_register): Renamed from cannot_store_register,
17930 (the_low_target): New.
17931 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17932 (the_low_target): New.
17934 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17936 * Makefile.in: Add stamp-h target.
17937 * configure.in: Create stamp-h.
17938 * configure: Regenerated.
17940 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17942 * inferiors.c: New file.
17943 * target.c: New file.
17944 * target.h: New file.
17945 * Makefile.in: Add target.o and inferiors.o. Update
17947 * linux-low.c (inferior_pid): New static variable,
17948 moved from server.c.
17949 (linux_create_inferior): Renamed from create_inferior.
17950 Call add_inferior. Return 0 on success instead of a PID.
17951 (linux_attach): Renamed from myattach.
17952 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17953 (linux_thread_alive): Renamed from mythread_alive.
17954 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17956 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17957 (regsets_store_inferior_registers): Correct error message.
17958 Add missing ``return 0''.
17959 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17960 (linux_store_registers): Renamed from store_inferior_registers.
17961 (linux_read_memory): Renamed from read_inferior_memory.
17962 (linux_write_memory): Renamed from write_inferior_memory.
17963 (linux_target_ops): New structure.
17964 (initialize_low): Call set_target_ops ().
17965 * remote-utils.c (unhexify): New function.
17966 (hexify): New function.
17967 (input_interrupt): Send signals to ``signal_pid''.
17968 * server.c (inferior_pid): Remove.
17969 (start_inferior): Update create_inferior call.
17970 (attach_inferior): Call add_inferior.
17971 (handle_query): New function.
17972 (main): Call handle_query for `q' packets.
17973 * server.h: Include "target.h". Remove obsolete prototypes.
17974 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17976 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17978 * Makefile.in: Add WARN_CFLAGS. Update configury
17980 * configure.in: Check for <string.h>
17981 * configure: Regenerate.
17982 * config.in: Regenerate.
17983 * gdbreplay.c: Include needed system headers.
17984 (remote_open): Remove strchr prototype.
17985 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17986 * regcache.c (supply_register): Change buf argument to const void *.
17987 (supply_register_by_name): Likewise.
17988 (collect_register): Change buf argument to void *.
17989 (collect_register_by_name): Likewise.
17990 * regcache.h: Add missing prototypes.
17991 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17992 * server.c (handle_query): New function.
17993 (attached): New static variable, moved out of main.
17994 (main): Quiet longjmp clobber warnings.
17995 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17996 * utils.c (error): Remove NORETURN.