1 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
3 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4 (handle_exception): Set siginfo_er.
5 (win32_xfer_siginfo): New function.
7 2020-02-07 Tom Tromey <tom@tromey.com>
8 Pedro Alves <palves@redhat.com>
10 * README: Update build documentation.
11 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
13 * configure.ac: Update paths.
15 * acinclude.m4: Update paths.
16 * Makefile.in: Update include paths.
17 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
18 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
19 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
20 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
21 (%-generated.c): Update paths.
22 * Move entire directory from ../gdb/gdbserver.
24 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
26 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
28 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
30 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
31 assignment instead of srv_linux_obj.
33 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
35 * server.c (handle_qxfer_libraries): Write segment-address with
38 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
40 * Makefile.in (install-strip): New target.
41 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
42 * aclocal.m4: Regenerate.
43 * configure: Regenerate.
44 * configure.ac: Add AM_PROG_INSTALL_STRIP.
46 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
48 * Makefile.in (SFILES): Adjust paths to point to real files.
49 (OBS): Move waitstatus.o to target/waitstatus.o.
50 (TAGS): Transform paths appropriately.
52 (nat/%.o): ... this pattern rule.
54 (target/%.o): ... this pattern rule.
55 * configure.srv: Adjust paths throughout to include nat/ prefix
56 with the revant files.
57 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
58 * configure: Regenerate.
60 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
62 * Makefile.in (TAGS): Remove config files from the recipe.
64 2020-01-14 Tom Tromey <tom@tromey.com>
67 * configure.ac: Remove any checks that were added to common.m4.
68 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
71 2020-01-14 Tom Tromey <tom@tromey.com>
73 * server.h: Include config.h.
74 * gdbreplay.c: Include config.h.
76 * configure.ac: Don't source common.host.
77 * acinclude.m4: Update path.
78 * Makefile.in (INCSUPPORT): New variable.
79 (INCLUDE_CFLAGS): Add INCSUPPORT.
80 (SFILES): Update paths.
81 (version-generated.c): Update path to create-version.sh.
82 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
84 2020-01-14 Tom Tromey <tom@tromey.com>
86 * configure.ac (LIBS): Use WIN32APILIBS.
87 (USE_WIN32API): Don't define.
90 2020-01-14 Tom Tromey <tom@tromey.com>
94 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
96 * Makefile.in (%-generated.c): Remove rule for files from
99 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
101 * configure: Re-generate.
103 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
105 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
107 * tracepoint.c (stop_tracing, flush_trace_buffer,
108 about_to_request_buffer_space, get_trace_state_variable_value,
109 set_trace_state_variable_value, gdb_collect): Add declaration.
111 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
113 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
114 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
115 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
116 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
117 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
120 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
122 * inferiors.c: Include gdbsupport/common-inferior.h.
124 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
126 * hostio-errno.c: Include hostio.h.
128 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
130 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
133 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
135 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
136 * linux-arm-tdesc.h: Include arch/arm.h.
138 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
140 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
142 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
144 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
145 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
147 2020-01-10 Pedro Alves <palves@redhat.com>
149 * fork-child.c (post_fork_inferior): Pass target down to
151 * inferiors.c (switch_to_thread): Add process_stratum_target
153 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
154 * nto-low.c (nto_target_ops): Now a process_stratum_target.
155 * linux-low.c (linux_target_ops): Now a process_stratum_target.
156 * remote-utils.c (prepare_resume_reply): Pass the target to
158 * target.c (the_target): Now a process_stratum_target.
159 (done_accessing_memory): Pass the target to switch_to_thread.
160 (set_target_ops): Ajust to use process_stratum_target.
161 * target.h (struct target_ops): Rename to ...
162 (struct process_stratum_target): ... this.
163 (the_target, set_target_ops): Adjust.
164 (prepare_to_access_memory): Adjust comment.
165 * win32-low.c (child_xfer_memory): Adjust to use
166 process_stratum_target.
167 (win32_target_ops): Now a process_stratum_target.
169 2020-01-06 Eli Zaretskii <eliz@gnu.org>
170 Pedro Alves <palves@redhat.com>
172 * win32-low.c (get_child_debug_event): Extract the fatal exception
173 from the exit status and convert to the equivalent Posix signal
175 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
176 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
178 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
180 * Makefile.in: Use INSTALL_PROGRAM_ENV.
182 2020-01-01 Joel Brobecker <brobecker@adacore.com>
184 * server.c (gdbserver_version): Change copyright year to 2020.
185 * gdbreplay.c (gdbreplay_version): Likewise.
187 2019-12-19 Christian Biesinger <cbiesinger@google.com>
189 * configure: Regenerate.
190 * configure.ac: Quote variable arguments of test.
192 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
194 * Makefile.in: Fix build with GNU Make 3.81
196 2019-12-16 Tom Tromey <tromey@adacore.com>
198 * server.c (get_exec_file): Constify result.
200 2019-12-10 Christian Biesinger <cbiesinger@google.com>
202 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
203 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
204 * config.in: Regenerate.
205 * configure: Regenerate.
206 * configure.ac: Don't check for strerror.
207 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
208 Call safe_strerror instead of strerror.
209 * server.h (strerror): Remove this now-unnecessary declaration.
210 * tracepoint.c (init_named_socket): Call safe_strerror instead of
212 (gdb_agent_helper_thread): Likewise.
213 * utils.c (perror_with_name): Likewise.
215 2019-11-26 Tom Tromey <tom@tromey.com>
217 * configure, config.in: Rebuild.
219 2019-11-26 Tom Tromey <tom@tromey.com>
221 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
222 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
224 * configure, config.in: Rebuild.
226 2019-11-26 Tom Tromey <tom@tromey.com>
228 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
229 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
230 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
231 * acinclude.m4: Include ax_pthread.m4.
232 * config.in, configure: Rebuild.
234 2019-11-26 Christian Biesinger <cbiesinger@google.com>
236 * debug.c (debug_set_output): Call safe_strerror instead of
238 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
239 (linux_kill_one_lwp): Likewise.
240 (linux_detach_one_lwp): Likewise.
241 (linux_wait_for_event_filtered): Likewise.
242 (store_register): Likewise.
243 * lynx-low.c (lynx_attach): Likewise.
244 * mem-break.c (insert_memory_breakpoint): Likewise.
245 (remove_memory_breakpoint): Likewise.
246 (delete_fast_tracepoint_jump): Likewise.
247 (set_fast_tracepoint_jump): Likewise.
248 (uninsert_fast_tracepoint_jumps_at): Likewise.
249 (reinsert_fast_tracepoint_jumps_at): Likewise.
250 * nto-low.c (nto_xfer_memory): Likewise.
251 (nto_resume): Likewise.
253 2019-11-20 Luis Machado <luis.machado@linaro.org>
255 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
256 instead of register count.
257 * tdesc.c (tdesc_contains_feature): New function.
258 * tdesc.h (tdesc_contains_feature): New prototype.
260 2019-11-15 Christian Biesinger <cbiesinger@google.com>
262 * Makefile.in: Add safe-strerror.c.
263 * configure: Regenerate.
264 * configure.ac: Don't source common.host.
266 2019-11-15 Christian Biesinger <cbiesinger@google.com>
268 * config.in: Regenerate.
269 * configure: Regenerate.
271 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
273 * ax.c (ax_printf): Handle size_t_arg.
275 2019-11-06 Christian Biesinger <cbiesinger@google.com>
277 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
278 * mi/mi-main.c (output_cores): Likewise.
279 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
280 (linux_xfer_osdata_modules): Likewise.
281 * remote.c (register_remote_support_xml): Likewise.
282 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
283 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
285 2019-11-01 Christian Biesinger <cbiesinger@google.com>
287 * configure: Regenerate.
288 * configure.ac: Remove check for strerror_r.
290 2019-10-31 Christian Biesinger <cbiesinger@google.com>
292 * config.in: Regenerate.
293 * configure: Regenerate.
294 * configure.ac: Also check for strerror_r.
296 2019-10-31 Christian Biesinger <cbiesinger@google.com>
298 * ax.h (debug_agent): Remove duplicate declaration.
300 2019-10-26 Tom de Vries <tdevries@suse.de>
302 * linux-aarch64-low.c: Fix typos in comments.
303 * linux-arm-low.c: Same.
305 * linux-ppc-low.c: Same.
306 * proc-service.c: Same.
309 * tracepoint.c: Same.
312 2019-10-25 Tom Tromey <tromey@adacore.com>
314 * utils.c (xstrdup): Remove.
316 2019-10-23 Tom Tromey <tom@tromey.com>
318 * configure, config.in: Rebuild.
320 2019-10-23 Tom Tromey <tom@tromey.com>
322 * configure: Rebuild.
323 * acinclude.m4: Use m4_include, not sinclude.
325 2019-10-17 Tom Tromey <tromey@adacore.com>
327 * configure: Rebuild.
328 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
329 in AC_CONFIG_FILES invocation.
330 * Makefile.in (stamp-h, Makefile): Use new-style config.status
333 2019-10-16 Christian Biesinger <cbiesinger@google.com>
335 * server.c: Include xml-builtin.h.
336 (get_xml_features): Don't declare xml_builtins here.
338 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
340 * Makefile.in: Remove references to vec-ipa.o.
342 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
344 * Makefile.in: Remove references to vec.c.
346 2019-10-02 Christian Biesinger <cbiesinger@google.com>
348 * server.c (server_waiting): Change to bool.
349 (extended_protocol): Likewise.
350 (response_needed): Likewise.
351 (exit_requested): Likewise.
352 (run_once): Likewise.
353 (report_no_resumed): Likewise.
354 (non_stop): Likewise.
355 (disable_packet_vCont): Likewise.
356 (disable_packet_Tthread): Likewise.
357 (disable_packet_qC): Likewise.
358 (disable_packet_qfThreadInfo): Likewise.
359 (handle_general_set): Update.
360 (handle_detach): Update.
361 (handle_monitor_command): Update.
362 (handle_query): Update.
363 (captured_main): Update.
364 (process_serial_event): Update.
365 * server.h (server_waiting): Change to bool.
366 (disable_packet_vCont): Likewise.
367 (disable_packet_Tthread): Likewise.
368 (disable_packet_qC): Likewise.
369 (disable_packet_qfThreadInfo): Likewise.
370 (run_once): Likewise.
371 (non_stop): Likewise.
372 * target.c (target_stop_and_wait): Update.
374 2019-10-02 Tom Tromey <tromey@adacore.com>
376 * Makefile.in (SFILES): Add common-inferior.c.
377 (OBS): Add common-inferior.o.
378 * server.c (startup_with_shell): Don't define.
380 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
382 * linux-low.c (linux_low_read_btrace): Update for change to
385 2019-09-20 Christian Biesinger <cbiesinger@google.com>
387 * debug.c (debug_threads): Remove comment in favor of the header.
388 * debug.h (using_threads): Add declaration.
389 (debug_threads): Add comment.
390 * linux-aarch64-low.c: Include debug.h and remove declaration of
392 * nto-low.c: Likewise.
393 * remote-utils.c: Likewise.
394 * thread-db.c: Likewise.
396 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
398 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
399 and powerpc-cell64l-ipa.o.
400 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
401 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
402 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
405 * spu-low.c: Remove file.
407 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
408 (parse_spufs_run): Remove.
409 (ppc_get_pc): Remove Cell/B.E. support.
410 (ppc_set_pc): Likewise.
411 (ppc_breakpoint_at): Likewise.
412 (ppc_arch_setup): Likewise.
413 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
414 tdesc_powerpc_cell32l.
415 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
416 or init_registers_powerpc_cell32l.
417 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
418 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
419 or init_registers_powerpc_cell32l.
420 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
421 (init_registers_powerpc_cell32l): Remove prototype.
422 (init_registers_powerpc_cell64l): Likewise.
424 * target.h (struct target_ops): Remove qxfer_spu member.
425 * server.c (handle_qxfer_spu): Remove.
426 (qxfer_packets): Remove entry for "spu".
427 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
428 * linux-low.c (SPUFS_MAGIC): Remove.
429 (spu_enumerate_spu_ids): Remove.
430 (linux_qxfer_spu): Remove.
431 (linux_target_ops): Remove qxfer_spu member.
432 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
433 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
434 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
436 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
438 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
439 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
440 * config.in: Regenerate.
441 * configure: Regenerate.
443 2019-08-15 Tom Tromey <tromey@adacore.com>
445 * target.c (target_write_memory): Use gdb::byte_vector.
447 2019-08-15 Tom Tromey <tromey@adacore.com>
449 * tracepoint.c (write_inferior_data_pointer)
450 (write_inferior_integer, write_inferior_int8)
451 (write_inferior_uinteger, m_tracepoint_action_download)
452 (r_tracepoint_action_download, x_tracepoint_action_download)
453 (l_tracepoint_action_download, clear_inferior_trace_buffer)
454 (download_agent_expr, download_tracepoint_1)
455 (download_trace_state_variables, upload_fast_traceframes): Update.
456 * server.c (gdb_write_memory): Update.
457 * remote-utils.c (relocate_instruction): Update.
458 * proc-service.c (ps_pdwrite): Update.
459 * mem-break.c (remove_memory_breakpoint)
460 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
461 (uninsert_fast_tracepoint_jumps_at)
462 (reinsert_fast_tracepoint_jumps_at): Update.
463 * linux-x86-low.c (append_insns)
464 (i386_install_fast_tracepoint_jump_pad)
465 (amd64_write_goto_address, i386_write_goto_address): Update.
466 * linux-s390-low.c (append_insns, s390_write_goto_address):
468 * linux-ppc-low.c (ppc_relocate_instruction)
469 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
470 (ppc_write_goto_address): Update.
471 * linux-aarch64-low.c (append_insns): Update.
472 * target.h (struct target_ops): Update.
473 (write_inferior_memory): Don't declare.
474 * target.c (target_write_memory): Rename from
475 write_inferior_memory. Remove old target_write_memory.
477 2019-08-15 Tom Tromey <tromey@adacore.com>
479 * target.c (write_inferior_memory): Use std::vector.
481 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
484 * configure.ac: Drop enable-libmcheck support.
485 * configure, config.in: Rebuild.
486 * acinclude.m4: Don't include it.
488 2019-07-19 Alan Hayward <alan.hayward@arm.com>
490 * configure.srv: Remove Arm xml files.
492 2019-07-19 Alan Hayward <alan.hayward@arm.com>
494 * configure.srv: Add new files. Remove xml generated files.
495 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
497 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
498 * linux-aarch32-tdesc.c: New file.
499 * linux-aarch32-tdesc.h: New file.
500 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
501 * linux-arm-low.c (init_registers_arm, tdesc_arm)
502 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
503 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
504 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
505 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
506 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
507 (arm_read_description): Call arm_linux_read_description.
508 (initialize_low_arch): Don't init registers.
509 * linux-arm-tdesc.c: New file.
510 * linux-arm-tdesc.h: New file.
512 2019-07-10 Alan Hayward <alan.hayward@arm.com>
514 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
515 Move counter inside for.
516 (arm_read_description): Check ptrace earlier.
517 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
519 2019-07-09 Tom Tromey <tom@tromey.com>
521 * configure: Rebuild.
522 * configure.ac: Change common to gdbsupport.
523 * acinclude.m4: Change common to gdbsupport.
524 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
525 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
526 common to gdbsupport.
527 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
528 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
529 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
530 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
531 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
532 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
533 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
534 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
535 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
536 common to gdbsupport.
538 2019-07-04 Alan Hayward <alan.hayward@arm.com>
540 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
542 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
544 2019-07-04 Alan Hayward <alan.hayward@arm.com>
546 * configure.srv: Remove legacy xml.
547 * linux-aarch64-low.c (initialize_low_arch): Remove
548 initialize_low_tdesc call.
549 * linux-aarch64-tdesc-selftest.c: Remove file.
550 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
551 * linux-x86-low.c (initialize_low_arch): Remove
552 initialize_low_tdesc call.
553 * linux-x86-tdesc-selftest.c: Remove file.
554 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
556 2019-06-20 Tom de Vries <tdevries@suse.de>
558 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
559 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
561 2019-06-19 Tom de Vries <tdevries@suse.de>
563 * debug.h (debug_write): Change return type to ssize_t.
564 * debug.c (debug_write): Same.
566 2019-06-14 Tom Tromey <tom@tromey.com>
568 * configure.ac: Use new path to gnulib.
569 * configure: Rebuild.
570 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
573 2019-06-11 Tom Tromey <tom@tromey.com>
575 * Makefile.in (SFILES): Add alloc.c.
577 (IPA_OBJS): Add alloc-ipa.o.
578 (alloc-ipa.o): New target.
579 (%.o: ../%.c): New pattern rule.
581 2019-06-10 Tom Tromey <tromey@adacore.com>
583 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
584 end warning with a newline.
585 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
587 * thread-db.c (attach_thread): Don't end warning with a newline.
588 (thread_db_notice_clone): Likewise.
589 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
591 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
592 end warning with a newline.
594 2019-06-04 Pedro Alves <palves@redhat.com>
596 * server.c (captured_main): Use make_unique_xstrdup.
598 2019-06-02 Tom Tromey <tom@tromey.com>
600 * gdbreplay.c (fromhex): Remove.
601 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
603 2019-05-29 Tom Tromey <tromey@adacore.com>
605 * configure: Rebuild.
607 2019-05-06 Kevin Buettner <kevinb@redhat.com>
609 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
610 sign extension code on 32-bit builds.
612 2019-05-03 Eli Zaretskii <eliz@gnu.org>
615 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
617 2019-04-19 Tom Tromey <tom@tromey.com>
619 * server.c (struct vstop_notif): Derive from notif_event.
621 (queue_stop_reply): Update.
622 (remove_all_on_match_ptid): Change type. Rewrite.
623 (discard_queued_stop_replies): Rewrite.
624 (in_queued_stop_replies_ptid): Change type.
625 (in_queued_stop_replies): Rewrite.
626 (notif_stop): Update.
627 (queue_stop_reply_callback): Update.
628 (captured_main): Don't call initialize_notif.
629 (push_stop_notification): Update.
630 * notif.c (notif_write_event, handle_notif_ack)
631 (notif_event_enque, notif_push): Update.
632 (notif_event_xfree, initialize_notif): Remove.
633 * notif.h (struct notif_event): Include <list>, not
635 (struct notif_server) <queue>: Now a std::list.
636 (notif_event_p): Remove typedef.
637 (initialize_notif): Don't declare.
638 (struct notif_event): Add virtual destructor.
640 2019-04-17 Alan Hayward <alan.hayward@arm.com>
642 * ax.c (ax_vdebug): Call debug_printf.
643 * debug.c (debug_write): New function.
644 * debug.h (debug_write): New declaration.
645 * linux-low.c (sigchld_handler): Call debug_write.
647 2019-04-17 Alan Hayward <alan.hayward@arm.com>
649 * debug.c (debug_set_output): New function.
650 (debug_vprintf): Send output to debug_file.
651 (debug_flush): Likewise.
652 * debug.h (debug_set_output): New declaration.
653 * server.c (handle_monitor_command): Add debug-file option.
654 (captured_main): Likewise.
656 2019-04-17 Alan Hayward <alan.hayward@arm.com>
658 * debug.c (remote_debug): Add definition.
659 * debug.h (remote_debug): Add declaration.
660 * hostio.c (remote_debug): Remove declaration.
661 * remote-utils.c (struct ui_file): Likewise.
662 (remote_debug): Likewise.
663 * remote-utils.h (remote_debug): Likewise,
664 * server.c (remote_debug): Remove definition.
666 2019-04-10 Kevin Buettner <kevinb@redhat.com>
668 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
669 when using a 64-bit gdbserver.
671 2019-04-09 Tom Tromey <tromey@adacore.com>
673 * linux-low.c (select_event_lwp): Use find_thread_in_random.
675 2019-04-08 Tom Tromey <tom@tromey.com>
677 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
679 (linux_resume_one_lwp): Likewise.
681 2019-04-08 Tom Tromey <tom@tromey.com>
683 * gdbreplay.c: Update.
684 * linux-low.c: Update.
687 2019-04-08 Tom Tromey <tom@tromey.com>
689 * server.c: Use C++ exception handling.
690 * linux-low.c: Use C++ exception handling.
691 * gdbreplay.c: Use C++ exception handling.
693 2019-04-08 Tom Tromey <tom@tromey.com>
695 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
696 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
697 (captured_main, main): Update.
698 * gdbreplay.c (main): Update.
700 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
702 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
703 value in argument pointer, return 1 if the entry is found and 0
704 otherwise. Move comment.
705 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
706 * linux-low.h (linux_get_auxv): Declare.
707 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
709 2019-04-05 Tom Tromey <tromey@adacore.com>
711 * server.c (gdbserver_usage): Use upper-case for metasyntactic
714 2019-03-28 Alan Hayward <alan.hayward@arm.com>
716 * linux-low.c (AT_HWCAP2): Add define if not already included.
718 2019-03-26 Alan Hayward <alan.hayward@arm.com>
720 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
721 (aarch64_arch_setup): Call linux_get_hwcap.
722 * linux-arm-low.c (arm_get_hwcap): Remove function.
723 (arm_read_description): Call linux_get_hwcap.
724 * linux-low.c (linux_get_auxv): New function.
725 (linux_get_hwcap): Likewise.
726 (linux_get_hwcap2): Likewise.
727 * linux-low.h (linux_get_hwcap): New declaration.
728 (linux_get_hwcap2): Likewise.
729 * linux-ppc-low.c (ppc_get_auxv): Remove function.
730 (ppc_arch_setup): Call linux_get_hwcap.
731 * linux-s390-low.c (s390_get_hwcap): Remove function.
732 (s390_arch_setup): Call linux_get_hwcap.
734 2019-03-22 Alan Hayward <alan.hayward@arm.com>
735 Jiong Wang <jiong.wang@arm.com>
737 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
738 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
740 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
742 2019-03-22 Alan Hayward <alan.hayward@arm.com>
743 Jiong Wang <jiong.wang@arm.com>
745 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
746 (aarch64_get_hwcap): New function.
747 (aarch64_arch_setup): Read APIA hwcap.
749 2019-03-22 Alan Hayward <alan.hayward@arm.com>
750 Jiong Wang <jiong.wang@arm.com>
752 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
753 (initialize_low_tracepoint): Likewise.
754 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
755 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
756 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
757 (aarch64_linux_read_description): Likewise.
758 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
760 2019-03-12 John Baldwin <jhb@FreeBSD.org>
762 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
763 i386_create_target_description for 'segments' parameter.
764 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
765 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
766 * win32-i386-low.c (i386_arch_setup): Likewise.
768 2019-03-12 Tom Tromey <tromey@adacore.com>
770 * linux-low.c (iterate_over_lwps): Update.
772 2019-03-06 Tom Tromey <tom@tromey.com>
774 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
775 (captured_main): Use SCOPE_EXIT.
777 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
779 * configure.srv: Use '$enable_unittest' instead of '$development'
780 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
783 2019-02-27 Tom Tromey <tromey@adacore.com>
785 * gdbreplay.c (logchar): Handle \r\n.
787 2019-02-07 Alan Hayward <alan.hayward@arm.com>
789 * linux-low.c (linux_attach): Add process before lwp.
790 * server.c (attach_inferior): Check if already attached.
792 2019-02-07 Tom Tromey <tom@tromey.com>
794 * x86-tdesc.h: Rename include guard.
795 * x86-low.h: Add include guard.
796 * wincecompat.h: Rename include guard.
797 * win32-low.h: Add include guard.
798 * utils.h: Rename include guard.
799 * tracepoint.h: Rename include guard.
800 * tdesc.h: Rename include guard.
801 * target.h: Rename include guard.
802 * server.h: Rename include guard.
803 * remote-utils.h: Rename include guard.
804 * regcache.h: Rename include guard.
805 * nto-low.h: Rename include guard.
806 * notif.h: Add include guard.
807 * mem-break.h: Rename include guard.
808 * lynx-low.h: Add include guard.
809 * linux-x86-tdesc.h: Add include guard.
810 * linux-s390-tdesc.h: Add include guard.
811 * linux-ppc-tdesc-init.h: Add include guard.
812 * linux-low.h: Add include guard.
813 * linux-aarch64-tdesc.h: Add include guard.
814 * linux-aarch32-low.h: Add include guard.
815 * inferiors.h: Rename include guard.
816 * i387-fp.h: Rename include guard.
817 * hostio.h: Rename include guard.
818 * gdbthread.h: Rename include guard.
819 * gdb_proc_service.h: Rename include guard.
820 * event-loop.h: Rename include guard.
821 * dll.h: Rename include guard.
822 * debug.h: Rename include guard.
823 * ax.h: Rename include guard.
825 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
828 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
829 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
831 2019-01-25 Tom Tromey <tom@tromey.com>
833 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
835 2019-01-25 Tom Tromey <tom@tromey.com>
837 * win32-low.c: Fix common/ includes.
838 * win32-i386-low.c: Fix common/ includes.
839 * tracepoint.c: Fix common/ includes.
840 * thread-db.c: Fix common/ includes.
841 * target.h: Fix common/ includes.
842 * symbol.c: Fix common/ includes.
843 * spu-low.c: Fix common/ includes.
844 * server.h: Fix common/ includes.
845 * server.c: Fix common/ includes.
846 * remote-utils.c: Fix common/ includes.
847 * regcache.h: Fix common/ includes.
848 * regcache.c: Fix common/ includes.
849 * nto-x86-low.c: Fix common/ includes.
850 * notif.h: Fix common/ includes.
851 * mem-break.h: Fix common/ includes.
852 * lynx-low.c: Fix common/ includes.
853 * lynx-i386-low.c: Fix common/ includes.
854 * linux-x86-tdesc-selftest.c: Fix common/ includes.
855 * linux-x86-low.c: Fix common/ includes.
856 * linux-low.c: Fix common/ includes.
857 * inferiors.h: Fix common/ includes.
858 * i387-fp.c: Fix common/ includes.
859 * hostio.c: Fix common/ includes.
860 * hostio-errno.c: Fix common/ includes.
861 * gdbthread.h: Fix common/ includes.
862 * gdbreplay.c: Fix common/ includes.
863 * fork-child.c: Fix common/ includes.
864 * event-loop.c: Fix common/ includes.
866 (enum gdb_agent_op): Fix common/ includes.
868 2019-01-21 Tom Tromey <tom@tromey.com>
870 * tracepoint.c: Fix includes.
871 * remote-utils.c: Fix includes.
872 * linux-x86-low.c: Fix includes.
874 2019-01-01 Joel Brobecker <brobecker@adacore.com>
876 * gdbreplay.c (gdbreplay_version): Update copyright year in
878 * server.c (gdbserver_version): Likewise.
880 2018-12-05 Alan Hayward <alan.hayward@arm.com>
882 * linux-low.c (add_lwp): Switch ordering.
884 2018-11-29 Tom Tromey <tom@tromey.com>
886 * win32-low.c (win32_join): Take pid, not process.
887 * target.h (struct target_ops) <join>: Change argument type.
888 (join_inferior): Change argument name.
889 * spu-low.c (spu_join): Take pid, not process.
890 * server.c (handle_detach): Preserve pid before destroying
892 * lynx-low.c (lynx_join): Take pid, not process.
893 * linux-low.c (linux_join): Take pid, not process.
895 2018-11-23 Alan Hayward <alan.hayward@arm.com>
897 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
898 (aarch64_cannot_fetch_register): Likewise.
899 (struct linux_target_ops): Update references.
901 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
903 * linux-ppc-low.c: Include nat/linux-ptrace.h.
905 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
907 * configure.srv (ipa_ppc_linux_regobj): Add
908 powerpc-isa207-htm-vsx32l-ipa.o and
909 powerpc-isa207-htm-vsx64l-ipa.o.
910 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
911 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
912 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
913 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
914 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
915 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
916 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
917 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
918 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
919 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
920 (init_registers_powerpc_isa207_htm_vsx32l)
921 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
922 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
923 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
924 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
925 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
926 (ppc_store_tm_ctarregset): New functions.
927 (ppc_regsets): Add entries for HTM regsets.
928 (ppc_arch_setup): Set htm in features struct when needed. Set
929 sizes for the HTM regsets.
930 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
931 (initialize_low_arch): Call
932 init_registers_powerpc_isa207_htm_vsx32l and
933 init_registers_powerpc_isa207_htm_vsx64l.
934 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
935 PPC_TDESC_ISA207_HTM_VSX.
936 (initialize_low_tracepoint): Call
937 init_registers_powerpc_isa207_htm_vsx32l and
938 init_registers_powerpc_isa207_htm_vsx64l.
940 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
942 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
943 rs6000/power-linux-pmu.xml to srv_xmlfiles.
944 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
945 (ppc_store_pmuregset): New functions.
946 (ppc_regsets): Add entries for ebb and pmu regsets.
947 (ppc_arch_setup): Set isa207 in features struct if the ebb and
948 pmu regsets are available. Set sizes for these regsets.
950 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
952 * configure.srv (ipa_ppc_linux_regobj): Add
953 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
954 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
955 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
956 rs6000/powerpc-isa207-vsx32l.xml, and
957 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
958 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
959 <PPC_TDESC_ISA207_VSX>: New enum value.
960 (init_registers_powerpc_isa207_vsx32l): Declare.
961 (init_registers_powerpc_isa207_vsx64l): Declare.
962 * linux-ppc-low.c (ppc_fill_tarregset): New function.
963 (ppc_store_tarregset): New function.
964 (ppc_regsets): Add entry for the TAR regset.
965 (ppc_arch_setup): Set isa207 in features struct when needed. Set
966 size for the TAR regsets.
967 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
968 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
969 and init_registers_powerpc_isa207_vsx64l.
970 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
971 (initialize_low_tracepoint): Call
972 init_registers_powerpc_isa207_vsx32l and
973 init_registers_powerpc_isa207_vsx64l.
975 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
976 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
978 * configure.srv (ipa_ppc_linux_regobj): Add
979 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
980 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
981 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
982 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
983 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
984 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
985 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
986 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
987 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
988 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
989 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
990 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
991 (ppc_hwcap): Add comment.
992 (ppc_hwcap2): New global.
993 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
994 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
995 (ppc_regsets): Add entries for the DSCR and PPR regsets.
996 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
997 when needed. Set sizes for the the DSCR and PPR regsets.
998 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
999 (initialize_low_arch): Call
1000 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1001 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1002 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1003 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1004 (initialize_low_tracepoint): Call
1005 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1006 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1008 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1010 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1012 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1013 Simon Marchi <simark@simark.ca>
1015 * acinclude.m4: Include "../selftest.m4".
1016 * configure: Regenerate.
1017 * configure.ac: Use "GDB_AC_SELFTEST".
1018 * configure.srv: Use "$enable_unittests" instead of
1019 "$development" when checking whether unit tests have been
1021 * server.c (captured_main): Update message informing that
1022 selftests have been disabled.
1024 2018-10-04 Tom Tromey <tom@tromey.com>
1026 * configure: Rebuild.
1028 2018-10-04 Tom Tromey <tom@tromey.com>
1030 * server.c (handle_status): Rename inner "thread".
1031 (process_serial_event): Declare "res" in 'm' case.
1032 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1033 (iterate_over_lwps): Rename inner "thread".
1034 (linux_qxfer_libraries_svr4): Rename inner "len".
1035 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1037 2018-10-01 Gary Benson <gbenson@redhat.com>
1039 * gdb_proc_service.h: Moved common code to
1040 common/gdb_proc_service.h.
1042 2018-10-01 Gary Benson <gbenson@redhat.com>
1044 * gdb_proc_service.h: Synchronize comments and whitespace with
1045 GDB's version of this file.
1047 2018-09-25 Tom Tromey <tom@tromey.com>
1049 * configure: Rebuild.
1050 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1052 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1054 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1055 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1056 ($(IPA_LIB)): Sort IPA_OBJS.
1058 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1060 * Makefile.in: Remove references to $(ADD_DEPS).
1062 2018-09-16 Tom Tromey <tom@tromey.com>
1064 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1066 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1069 2018-09-05 Tom Tromey <tom@tromey.com>
1071 * configure: Rebuild.
1073 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1076 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1078 2018-08-27 Tom Tromey <tom@tromey.com>
1081 * configure: Rebuild.
1083 2018-08-27 Tom Tromey <tom@tromey.com>
1085 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1086 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1087 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1088 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1089 (s390x_emit_stack_adjust): Add casts to unsigned char.
1091 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1095 * server.h (struct client_state) <disable_randomization>:
1098 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1100 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1102 (mips_supply_ptrace_register): Likewise.
1104 2018-07-22 Tom Tromey <tom@tromey.com>
1106 * configure: Rebuild.
1108 2018-07-22 Tom Tromey <tom@tromey.com>
1110 * win32-low.c (win32_create_inferior): Remove unused variables.
1111 * gdbreplay.c (remote_open): Remove unused variable.
1112 * remote-utils.c (remote_prepare): Remove unused variable.
1113 * x86-tdesc.h (X86_TDESC_H): Define.
1114 (amd64_expedite_regs): Define conditionally.
1115 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1116 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1117 * remote-utils.c (readchar): Remove unused variable.
1119 2018-07-13 Pedro Alves <palves@redhat.com>
1121 * linux-low.c (linux_kill): Change parameter to process_info
1122 pointer instead of pid. Adjust.
1123 * lynx-low.c (lynx_kill): Likewise.
1124 * nto-low.c (nto_kill): Likewise.
1125 * spu-low.c (spu_kill): Likewise.
1126 * win32-low.c (win32_kill): Likewise.
1127 * server.c (handle_v_kill, kill_inferior_callback)
1128 (detach_or_kill_for_exit): Adjust.
1129 * target.c (kill_inferior): Change parameter to process_info
1130 pointer instead of pid. Adjust.
1131 * target.h (struct target_ops) <kill>: Change parameter to
1132 process_info pointer instead of pid. Adjust all implementations
1134 (kill_inferior): Likewise.
1136 2018-07-13 Pedro Alves <palves@redhat.com>
1138 * linux-low.c (linux_detach, linux_join): Change parameter to
1139 process_info pointer instead of pid. Adjust.
1140 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1141 * nto-low.c (nto_detach): Likewise.
1142 * spu-low.c (spu_detach, spu_join): Likewise.
1143 * win32-low.c (win32_detach, win32_join): Likewise.
1144 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1145 * target.h (struct target_ops) <detach, join>: Change parameter to
1146 process_info pointer instead of pid. Adjust all implementations
1148 (detach_inferior, join_inferior): Rename 'pid' parameter to
1151 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1152 Jan Kratochvil <jan.kratochvil@redhat.com>
1153 Paul Fertser <fercerpav@gmail.com>
1154 Tsutomu Seki <sekiriki@gmail.com>
1156 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1157 (OBS): Add 'common/netstuff.o'.
1158 (GDBREPLAY_OBS): Likewise.
1159 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1160 (remote_open): Implement support for IPv6
1162 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1164 (handle_accept_event): Accept connections from IPv6 sources.
1165 (remote_prepare): Handle IPv6-style hostnames; implement
1166 support for IPv6 connections.
1167 (remote_open): Implement support for printing connections from
1170 2018-07-11 Pedro Alves <palves@redhat.com>
1173 * mem-break.c (any_persistent_commands): Add process_info
1174 parameter and use it instead of relying on the current process.
1175 Change return type to bool.
1176 * mem-break.h (any_persistent_commands): Add process_info
1177 parameter and change return type to bool.
1178 * server.c (handle_detach): Remove require_running_or_return call.
1179 Look up the process_info for the process we're about to detach.
1180 If not found, return back error to GDB. Adjust
1181 any_persistent_commands call to pass down a process pointer.
1183 2018-07-11 Pedro Alves <palves@redhat.com>
1185 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1186 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1187 instead of collect_register_by_name.
1188 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1189 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1191 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1192 Pedro Alves <palves@redhat.com>
1194 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1196 2018-07-03 Tom Tromey <tom@tromey.com>
1198 * linux-low.c: Update.
1199 * lynx-low.c: Update.
1200 * mem-break.c: Update.
1201 * nto-low.c: Update.
1202 * remote-utils.c: Update.
1204 * spu-low.c: Update.
1206 * win32-low.c: Update.
1208 2018-07-03 Tom Tromey <tom@tromey.com>
1212 2018-07-03 Tom Tromey <tom@tromey.com>
1214 * linux-low.c: Update.
1216 2018-07-03 Tom Tromey <tom@tromey.com>
1220 2018-07-03 Tom Tromey <tom@tromey.com>
1222 * linux-low.c: Update.
1223 * linux-mips-low.c: Update.
1224 * lynx-low.c: Update.
1225 * nto-low.c: Update.
1226 * remote-utils.c: Update.
1228 * spu-low.c: Update.
1230 * thread-db.c: Update.
1232 2018-07-03 Tom Tromey <tom@tromey.com>
1234 * linux-low.c: Update.
1235 * linux-mips-low.c: Update.
1236 * lynx-low.c: Update.
1237 * mem-break.c: Update.
1238 * nto-low.c: Update.
1239 * remote-utils.c: Update.
1241 * spu-low.c: Update.
1243 * tracepoint.c: Update.
1245 2018-07-03 Tom Tromey <tom@tromey.com>
1247 * linux-low.c: Update.
1248 * linux-ppc-low.c: Update.
1249 * linux-x86-low.c: Update.
1250 * proc-service.c: Update.
1252 * spu-low.c: Update.
1253 * thread-db.c: Update.
1254 * win32-low.c: Update.
1256 2018-07-03 Tom Tromey <tom@tromey.com>
1258 * linux-low.c: Update.
1259 * lynx-low.c: Update.
1260 * nto-low.c: Update.
1261 * remote-utils.c: Update.
1262 * spu-low.c: Update.
1263 * thread-db.c: Update.
1264 * win32-low.c: Update.
1266 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1268 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1269 parameter in call to 'amd64_create_target_description'.
1271 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1273 * x86-tdesc.h: Remove executable permission flag.
1275 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1277 * configure.ac: Remove AC_PREREQ, add missing quoting.
1278 * configure: Re-generate.
1279 * config.in: Re-generate.
1280 * aclocal.m4: Re-generate.
1282 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1284 * tracepoint.h (current_traceframe): Remove declaration.
1286 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1288 * linux-aarch64-low.c (is_sve_tdesc): New function.
1289 (aarch64_sve_regs_copy_to_regcache): Likewise.
1290 (aarch64_sve_regs_copy_from_regcache): Likewise.
1291 (aarch64_regs_info): Add SVE checks.
1292 (initialize_low_arch): Initialize SVE.
1294 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1296 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1298 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1300 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1301 (initialize_low_tracepoint): Likewise
1302 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1303 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1305 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1307 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1309 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1311 * server.h (PBUFSIZ): Increase size
1313 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1315 * regcache.c (regcache::raw_compare): New function.
1316 * regcache.h (regcache::raw_compare): New declaration.
1318 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1320 * regcache.c (new_register_cache): Use new.
1321 (free_register_cache): Use delete.
1322 (register_data): Use const.
1323 (supply_register): Move body inside regcache.
1324 (regcache::raw_supply): New override function.
1325 (collect_register): Move body inside regcache.
1326 (regcache::raw_collect): New override function.
1327 (regcache::get_register_status): New override function.
1328 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1330 2018-06-09 Tom Tromey <tom@tromey.com>
1332 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1334 (event_queue): Use std::queue.
1335 (gdb_event_xfree): Remove.
1336 (initialize_event_loop, process_event, wait_for_event): Update.
1338 2018-06-08 Stan Cox <scox@redhat.com>
1340 * win32-low.c (win32_create_inferior): last_ptid and last_status
1341 moved to client_state.
1343 2018-06-08 Pedro Alves <palves@redhat.com>
1345 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1346 common/common-exceptions.o, common/common-utils.o,
1347 common/errors.o, common/print-utils.o and utils.o.
1348 * gdbreplay.c: Include "common-defs.h" instead of the two
1349 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1350 string.h or alloca.h.
1351 (perror_with_name): Delete.
1352 (remote_open): Use xstrdup instead of strdup.
1353 (main): Rename to ...
1354 (captured_main): ... this.
1357 2018-06-08 Tom Tromey <tom@tromey.com>
1359 * linux-low.c (linux_low_read_btrace): Update.
1361 2018-06-04 Stan Cox <scox@redhat.com>
1363 * server.h (struct client_state): New.
1364 * server.c (cont_thread, general_thread, multi_process)
1365 (report_fork_events, report_vfork_events, report_exec_events)
1366 (report_thread_events, swbreak_feature, hwbreak_feature)
1367 (vCont_supported, disable_randomization, pass_signals)
1368 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1369 Moved to client_state.
1370 * remote-utils.c (remote_debug, noack_mode)
1371 (transport_is_reliable): Moved to client_state.
1372 * tracepoint.c (current_traceframe): Moved to client_state.
1375 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1376 linux-low.c, remote-utils.h, target.c: Use client_state.
1378 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1380 * configure.srv: Add new c/h file.
1382 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1384 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1387 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1389 * gdb.arch/mips-fpregset-core.exp: New test.
1390 * gdb.arch/mips-fpregset-core.c: New test source.
1392 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1395 * hostio.c (require_int): Do not report overflow for integers
1396 between 0xfffffff and 0x7fffffff.
1398 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1400 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1401 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1402 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1404 (the_low_target): Wire them.
1406 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1408 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1409 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1410 mode. Call collect_register_by_name with vscr using
1411 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1412 (ppc_store_vrregset): Add and set vscr_offset variable as in
1413 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1416 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1418 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1419 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1420 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1422 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1424 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1425 (ppc_store_vsxregset): Likewise.
1426 (ppc_fill_vrregset): Likewise.
1427 (ppc_store_vrregset): Likewise.
1428 (ppc_fill_evrregset): Likewise.
1429 (ppc_store_evrregset): Likewise.
1430 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1431 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1434 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1436 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1437 wordsize of the inferior. Call ppc_linux_target_wordsize.
1439 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1441 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1442 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1443 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1444 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1445 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1446 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1447 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1448 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1449 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1450 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1451 (tdesc_powerpc_e500l): Remove.
1452 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1453 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1454 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1455 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1457 (ppc_arch_setup): Remove target description matching code. Fill a
1458 ppc_linux_features struct and call ppc_linux_match_description
1461 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1463 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1464 width of the requested register exceeds the width of the
1466 (mips_cannot_store_register): Likewise.
1468 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1470 * linux-mips-low.c (mips_fetch_register): New function. Update
1472 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1473 (the_low_target): Wire `mips_fetch_register'.
1475 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1477 * lynx-i386-low.c (LYNXOS_178): New macro.
1478 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1479 the layout on LynxOS-178.
1480 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1481 handle floating point registers that are not supported by
1484 2018-05-10 Tom Tromey <tom@tromey.com>
1486 * configure: Rebuild.
1488 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1491 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1492 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1493 Use it to set the expedite_regs field in the given tdesc.
1494 * x86-tdesc.h: New file.
1495 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1496 Adjust following the addition of the new expedite_regs parameter
1497 to init_target_desc.
1498 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1499 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1500 (i386_linux_read_description, amd64_linux_read_description):
1501 Adjust following the addition of the new expedite_regs parameter
1502 to init_target_desc.
1503 * lynx-i386-low.c: #include "x86-tdesc.h".
1504 (lynx_i386_arch_setup): Adjust following the addition of the new
1505 expedite_regs parameter to init_target_desc.
1506 * nto-x86-low.c: #include "x86-tdesc.h".
1507 (nto_x86_arch_setup): Adjust following the addition of the new
1508 expedite_regs parameter to init_target_desc.
1509 * win32-i386-low.c: #include "x86-tdesc.h".
1510 (i386_arch_setup): Adjust following the addition of the new
1511 expedite_regs parameter to init_target_desc.
1513 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1516 * win32-low.c (win32_create_inferior): Add call to my_wait
1517 setting last_status global.
1519 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1522 * win32-low.c (create_process): Only call gdb_tilde_expand if
1523 inferior_cwd is not NULL.
1525 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1527 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1528 registers to the cache if their values have changed.
1529 (i387_xsave_to_cache): Provide default values for x87 control
1530 registers when these features are available, but disabled.
1531 * regcache.c (supply_register_by_name_zeroed): New function.
1532 * regcache.h (supply_register_by_name_zeroed): Declare new
1535 2018-05-07 Tom Tromey <tom@tromey.com>
1537 * configure: Rebuild.
1539 2018-05-04 Tom Tromey <tom@tromey.com>
1541 * configure: Rebuild.
1543 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1544 Pedro Alves <palves@redhat.com>
1546 * linux-aarch64-low.c (aarch64_stopped_data_address):
1549 2018-04-27 Tom Tromey <tom@tromey.com>
1551 * configure: Rebuild.
1553 2018-04-23 Tom Tromey <tom@tromey.com>
1555 * configure: Rebuild.
1557 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1559 * Makefile.in (depcomp): Add "..".
1560 (all_deps_files): New and use it.
1562 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1564 * configure.srv (aarch64*-*-linux*): Don't include xml.
1565 (i[34567]86-*-cygwin*): Likewise.
1566 (i[34567]86-*-linux*): Likewise.
1567 (i[34567]86-*-lynxos*): Likewise.
1568 (i[34567]86-*-mingw32ce*): Likewise.
1569 (i[34567]86-*-mingw*): Likewise.
1570 (i[34567]86-*-nto*): Likewise.
1571 (tic6x-*-uclinux): Likewise.
1572 (x86_64-*-linux*): Likewise.
1573 (x86_64-*-mingw*): Likewise.
1574 (x86_64-*-cygwin*): Likewise.
1576 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1578 * tdesc.c: Remove xml parameter.
1580 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1582 * server.c (get_features_xml): Remove cast.
1583 * tdesc.c (void target_desc::accept): Fill in function.
1584 (tdesc_get_features_xml): Remove old xml creation.
1585 (print_xml_feature::visit_pre): Add xml vistor.
1586 * tdesc.h (struct target_desc): Make xmltarget mutable.
1587 (tdesc_get_features_xml): Remove declaration.
1589 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1591 * tdesc.c (tdesc_architecture_name): Add new function.
1592 (tdesc_osabi_name): Likewise.
1593 (tdesc_get_features_xml): Use new functions.
1595 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1597 * tdesc.c (tdesc_create_flags): Remove.
1598 (tdesc_add_flag): Likewise.
1599 (tdesc_named_type): Likewise.
1600 (tdesc_create_union): Likewise.
1601 (tdesc_create_struct): Likewise.
1602 (tdesc_create_vector): Likewise.
1603 (tdesc_add_bitfield): Likewise.
1604 (tdesc_add_field): Likewise.
1605 (tdesc_set_struct_size): Likewise.
1607 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1609 * tdesc.c (~target_desc): Remove implictly deleted items.
1610 (init_target_desc): Iterate all features.
1611 (tdesc_get_features_xml): Use vector.
1612 (tdesc_create_feature): Create feature.
1613 * tdesc.h (tdesc_feature) Remove
1614 (target_desc): Add features.
1616 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1618 * Makefile.in: Add common/tdesc.c
1619 * tdesc.c (init_target_desc): init all reg_defs from register
1621 (tdesc_create_reg): Create tdesc_reg.
1622 * tdesc.h (tdesc_feature): Add register vector.
1624 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1626 * tdesc.h (struct target_desc) <features>: Change type to
1627 std::vector<std::string>.
1628 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1630 (tdesc_get_features_xml): Likewise.
1631 (tdesc_create_feature): Likewise.
1633 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1635 * regcache.c (find_register_by_number): Return a ref.
1636 (find_regno): Use references.
1637 (register_size): Likewise.
1638 (register_data): Likewise.
1639 * tdesc.c (target_desc::~target_desc): Remove free calls.
1640 (target_desc::operator==): Use std::vector compare.
1641 (init_target_desc): Use reference.
1642 (tdesc_create_reg): Use reg constructors.
1643 * tdesc.h (struct target_desc): Replace pointer with object.
1645 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1647 * regcache.c (find_register_by_number): Make static.
1648 (find_regno): Use find_register_by_number
1649 * regcache.h (struct reg): Remove declaration.
1651 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1653 * tdesc.c (target_desc::~target_desc): Move to here.
1654 (target_desc::operator==): Likewise.
1655 * tdesc.h (target_desc::~target_desc): Move from here.
1656 (target_desc::operator==): Likewise.
1658 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1660 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1662 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1664 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1666 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1667 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1668 and init_registers_s390_gs_linux64.
1670 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1672 * linux-s390-low.c (s390_fill_gs): Remove function.
1673 (s390_fill_gsbc): Remove function.
1674 (s390_regsets): Set fill functions for the guarded storage regsets
1677 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1679 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1680 the word size. Add comment.
1681 (s390_get_wordsize): New function.
1682 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1683 pswm with it. Instead, use s390_get_wordsize to determine the
1684 word size first and derive the correct tdesc from that directly.
1686 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1688 * Makefile.in: Include silent-rules.mk.
1689 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1690 (COMPILE): Add ECHO_CXX.
1691 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1692 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1693 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1694 (version-generated.c): Add ECHO_GEN.
1695 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1696 (IPAGENT_COMPILE): Add ECHO_CXX.
1697 (%-generated.c): Add ECHO_REGDAT.
1699 2018-03-14 Tom Tromey <tom@tromey.com>
1702 * ax.c (ax_printf): Special case for NULL.
1704 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1706 * linux-low.c (linux_qxfer_libraries_svr4): Use
1707 xml_escape_text_append.
1709 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1711 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1713 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1715 * server.c (handle_general_set): Remove unnecessary xstrdup.
1717 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1719 * server.c (parse_debug_format_options): Adjust to
1720 delim_string_to_char_ptr_vec changes.
1721 * thread-db.c (thread_db_load_search): Adjust to
1722 dirnames_to_char_ptr_vec changes.
1724 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1726 * target.h (target_enable_btrace, target_disable_btrace)
1727 (target_read_btrace, target_read_btrace_conf): Turn macro into
1728 inline function. Throw error if target method is not defined.
1729 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1730 check for btrace target method. Be prepared to handle exceptions
1731 from btrace target methods.
1733 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1735 * server.c (captured_main): Change order of error message printed
1736 when the current working directory cannot be found.
1738 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1740 * server.c: Include "filenames.h" and "pathstuff.h".
1741 (program_name): Delete variable.
1742 (program_path): New anonymous class.
1743 (get_exec_wrapper): Use "program_path" instead of
1745 (handle_v_run): Likewise.
1746 (captured_main): Likewise.
1747 (process_serial_event): Likewise.
1749 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1751 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1752 (OBJS): Add "pathstuff.o".
1753 * server.c (current_directory): New global variable.
1754 (captured_main): Initialize "current_directory".
1756 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1758 * tdesc.c: Use common/tdesc.h.
1759 * tdesc.h: Likewise.
1761 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1762 Simon Marchi <simon.marchi@ericsson.com>
1764 * Makefile.in: Switch order of make rules.
1766 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1768 * Makefile.in: Add common directory in build.
1769 * configure.ac: Add common reference.
1770 * configure: Regenerate.
1772 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1774 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1775 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1776 * spu-low.c (spu_target_ops): Likewise.
1777 * win32-low.c (win32_target_ops): Likewise.
1778 * server.c (supported_btrace_packets): Report packets unconditionally.
1779 * target.h (target_ops) <supports_btrace>: Remove.
1780 (target_supports_btrace): Remove.
1782 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1784 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1785 (handle_btrace_disable): Change return type to void. Use exceptions
1787 (handle_btrace_general_set): Catch exception and copy message to
1790 2018-02-08 Tom Tromey <tom@tromey.com>
1792 * linux-low.c (install_software_single_step_breakpoints): Use
1793 make_scoped_restore.
1794 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1795 (do_restore_current_thread_cleanup): Remove.
1796 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1799 2018-02-08 Tom Tromey <tom@tromey.com>
1801 * mem-break.c (set_raw_breakpoint_at): Use
1802 gdb::unique_xmalloc_ptr.
1804 2018-01-30 Pedro Alves <palves@redhat.com>
1807 * target.c (target_terminal::terminal_state): Rename to ...
1808 (target_terminal::m_terminal_state): ... this.
1810 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1812 * linux-low.c (handle_extended_wait): Surround call to
1813 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1815 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1817 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1818 linux_ptrace_attach_fail_reason_string now returning an
1820 (linux_attach): Likewise.
1821 * thread-db.c (attach_thread): Likewise.
1823 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1826 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1827 checking for fs_base/gs_base fields in struct user_regs_struct.
1828 * configure: Regenerate.
1830 2018-01-16 Yao Qi <yao.qi@linaro.org>
1833 * linux-low.c (fetch_register): Call supply_register instead of
1836 2018-01-08 Yao Qi <yao.qi@linaro.org>
1837 Simon Marchi <simon.marchi@ericsson.com>
1839 * Makefile.in (OBS): Remove selftest.o.
1840 * configure.ac: Set srv_selftest_objs if $development is true.
1841 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1842 * configure: Re-generated.
1843 * server.c (captured_main): Wrap variable selftest_filter with
1846 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1848 * server.c (parse_debug_format_options): Return std::string.
1849 (handle_monitor_command, captured_main): Adjust.
1851 2018-01-05 Pedro Alves <palves@redhat.com>
1854 * server.c (captured_main): Pass quiet=false to
1855 save_original_signals_state.
1857 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1859 * gdbreplay.c (gdbreplay_version): Update copyright year in
1861 * server.c (gdbserver_version): Likewise.
1863 2017-12-08 Tom Tromey <tom@tromey.com>
1865 * ax.c (ax_printf): Update.
1867 2017-12-07 Yao Qi <yao.qi@linaro.org>
1869 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1870 aarch64_linux_read_description.
1871 * linux-amd64-ipa.c (idx2mask): New array.
1872 (get_ipa_tdesc): Move idx2mask out.
1873 (initialize_low_tracepoint): Initialize target descriptions.
1874 * linux-i386-ipa.c (idx2mask): New array.
1875 (get_ipa_tdesc): Move idx2mask out.
1876 (initialize_low_tracepoint): Initialize target descriptions.
1878 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1880 * tdesc.c (struct tdesc_type): Change return type.
1881 (tdesc_add_flag): Change parameter type.
1882 (tdesc_add_bitfield): Likewise.
1883 (tdesc_add_field): Likewise.
1884 (tdesc_set_struct_size): Likewise.
1886 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1888 * regcache.c (registers_to_string): Remove unused variable.
1890 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1892 * inferiors.c (for_each_inferior_with_data): Remove.
1893 * inferiors.h (for_each_inferior_with_data): Remove.
1894 * server.c (handle_qxfer_threads_worker): Change parameter type.
1895 (handle_qxfer_threads_proper): Use for_each_thread.
1897 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1899 * inferiors.c (for_each_inferior): Remove.
1900 (clear_inferiors): Use for_each_thread.
1901 * inferiors.h (for_each_inferior): Remove.
1902 * linux-low.c (linux_wait_for_event_filtered): Use
1904 (linux_stabilize_threads): Likewise.
1905 * regcache.c (regcache_release): Likewise.
1906 * server.c (gdb_wants_all_threads_stopped): Likewise.
1907 (clear_pending_status_callback): Remove.
1908 (handle_status): Use for_each_thread.
1909 (captured_main): Likewise.
1910 * win32-low.c (child_init_thread_list): Likewise.
1911 (win32_clear_inferiors): Likewise.
1912 (fake_breakpoint_event): Likewise.
1914 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1916 * inferiors.h (find_inferior): Remove.
1917 * inferiors.c (find_inferior): Remove.
1919 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1921 * linux-low.c (resume_status_pending_p): Update comment.
1922 (need_step_over_p): Update comment.
1924 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1926 * linux-low.c (proceed_one_lwp): Return void, change parameter
1928 (unsuspend_and_proceed_one_lwp): Likewise.
1929 (proceed_all_lwps): Use for_each_thread.
1930 (unstop_all_lwps): Likewise.
1932 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1934 * linux-low.c (linux_resume_one_thread): Return void, take
1936 (linux_resume): Use for_each_thread.
1938 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1940 * linux-low.c (send_sigstop_callback): Return void, change
1941 parameter type. Rename to...
1942 (send_sigstop): ... this.
1943 (suspend_and_send_sigstop_callback): Return void, change parameter
1945 (suspend_and_send_sigstop): ... this.
1946 (stop_all_lwps): Use for_each_thread.
1948 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1950 * linux-low.c (lwp_running): Return bool, remove unused
1952 (linux_stabilize_threads): Use find_thread.
1954 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1956 * linux-low.c (select_singlestep_lwp_callback): Remove.
1957 (count_events_callback): Remove.
1958 (select_event_lwp_callback): Remove.
1959 (select_event_lwp): Use find_thread/for_each_thread.
1961 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1963 * linux-low.c (not_stopped_callback): Return bool, take filter
1965 (linux_wait_for_event_filtered): Use find_thread.
1966 (linux_wait_1): Likewise.
1968 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1970 * linux-low.c (same_lwp): Remove.
1971 (find_lwp_pid): Use find_thread.
1973 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1975 * linux-low.c (delete_lwp_callback): Remove.
1976 (linux_mourn): Use for_each_thread.
1978 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1980 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1981 args parameter, don't check for pid.
1982 (linux_detach): Use for_each_thread.
1984 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1986 * linux-low.c (struct counter): Remove.
1987 (second_thread_of_pid_p): Remove.
1988 (last_thread_of_process_p): Use find_thread.
1990 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1992 * inferiors.c (find_inferior_in_random): Remove.
1993 * inferiors.h (find_inferior_in_random): Remove.
1994 * linux-low.c (status_pending_p_callback): Return bool, accept
1995 parameter ptid directly.
1996 (linux_wait_for_event_filtered): Use find_thread_in_random.
1997 (linux_wait_1): Likewise.
1999 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2001 * inferiors.c (find_inferior_id): Remove.
2002 (find_thread_ptid): Move implemention from find_inferior_id to
2004 * inferiors.h (find_inferior_id): Remove.
2005 * server.c (handle_status): Use find_thread_ptid.
2006 (process_serial_event): Likewise.
2007 * thread-db.c (find_one_thread): Likewise.
2008 (thread_db_thread_handle): Likewise.
2009 * win32-low.c (thread_rec): Likewise.
2010 (child_delete_thread): Likewise.
2011 (win32_thread_alive): Likewise.
2012 (get_child_debug_event): Likewise.
2014 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2016 * linux-mips-low.c (update_watch_registers_callback): Return
2017 void, remove pid_p parameter, don't check for pid.
2018 (mips_insert_point, mips_remove_point): Use for_each_thread.
2020 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2022 * lynx.low (lynx_delete_thread_callback): Remove.
2023 (lynx_mourn): Use for_each_thread.
2025 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2027 * regcache.c (regcache_invalidate_one): Remove.
2028 (regcache_invalidate_pid): use for_each_thread.
2030 2017-11-26 Tom Tromey <tom@tromey.com>
2032 * linux-low.c (linux_create_inferior): Update.
2034 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2036 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2038 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2040 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2041 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2042 * linux-aarch64-tdesc-selftest.c: New file.
2043 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2045 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2047 * configure.srv: Add new file.
2048 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2049 * linux-aarch64-tdesc-selftest.c: New file.
2050 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2052 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2054 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2055 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2056 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2058 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2060 * configure.srv: Add new files.
2061 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2062 aarch64_linux_read_description.
2063 * linux-aarch64-low.c (aarch64_linux_read_description):
2064 Merge with aarch64_arch_setup.
2065 (aarch64_arch_setup): Call aarch64_linux_read_description.
2066 * linux-aarch64-tdesc.c: New file.
2067 * linux-aarch64-tdesc.h: New file.
2069 2017-11-24 Yao Qi <yao.qi@linaro.org>
2071 * configure.srv: Set $srv_regobj for tic6x-linux.
2072 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2073 (tic6x_read_description): Move some code to tic6x_arch_setup.
2074 (tic6x_tdesc_test): New function.
2075 (initialize_low_arch): Call selftests::register_test.
2077 2017-11-22 Yao Qi <yao.qi@linaro.org>
2079 * remote-utils.c (prepare_resume_reply): Use memcpy.
2081 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2083 * linux-low.c (kill_one_lwp_callback): Return void, take
2084 argument directly, don't filter on pid.
2085 (linux_kill): Use for_each_thread.
2087 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2089 * linux-low.c (need_step_over_p): Return bool, remove dummy
2091 (linux_resume, proceed_all_lwps): Use find_thread.
2093 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2095 * linux-low.c (resume_status_pending_p): Return bool, remove
2097 (linux_resume): Use find_thread.
2099 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2101 * linux-low.c (struct thread_resume_array): Remove.
2102 (linux_set_resume_request): Return void, take arguments
2104 (linux_resume): Use for_each_thread.
2106 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2108 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2109 return bool, remove data argument.
2110 (linux_stabilize_threads): Use find_thread.
2112 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2114 * linux-low.c (unsuspend_one_lwp): Remove.
2115 (unsuspend_all_lwps): Use for_each_thread, inline code from
2118 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2120 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2121 * linux-low.c (struct iterate_over_lwps_args): Remove.
2122 (iterate_over_lwps_filter): Remove.
2123 (iterate_over_lwps): Use find_thread.
2125 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2127 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2128 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2129 code from reset_lwp_ptrace_options_callback.
2131 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2133 * linux-arm-low.c (struct update_registers_data): Remove.
2134 (update_registers_callback): Return void, take arguments
2135 directly, don't check thread's pid.
2136 (arm_insert_point, arm_remove_point): Use for_each_thread.
2138 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2140 * win32-low.c (continue_one_thread): Return void, take argument
2142 (child_continue): Use for_each_thread.
2144 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2146 * win32-i386-low.c (update_debug_registers_callback): Rename
2148 (update_debug_registers): ... this, return void, remove pid_p arg.
2149 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2151 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2153 * inferiors.h (struct process_info): Add constructor, initialize
2155 <syscalls_to_catch>: Change type to std::vector<int>.
2156 * inferiors.c (add_process): Allocate process_info with new.
2157 (remove_process): Free process_info with delete.
2158 * linux-low.c (handle_extended_wait): Adjust.
2159 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2160 * server.c (handle_general_set): Adjust.
2162 2017-11-16 Pedro Alves <palves@redhat.com>
2164 * remote-utils.c (remote_close): Block SIGIO signals instead of
2165 uninstalling the SIGIO handler.
2167 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2169 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2171 2017-11-16 Yao Qi <yao.qi@linaro.org>
2173 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2174 (tic6x_store_gregset): Likewise.
2175 (tic6x_usrregs_info): Move it up.
2177 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2179 * Makefile.in: Update arch rules.
2180 * configure.srv: Explicitly mark arch/ files.
2182 2017-11-13 Andreas Schwab <schwab@suse.de>
2184 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2186 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2188 2017-11-06 Pedro Alves <palves@redhat.com>
2190 * config.in, configure: Regenerate.
2192 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2194 * target.c (struct thread_search): Remove.
2195 (thread_search_callback): Remove.
2196 (prepare_to_access_memory): Use for_each_thread instead of
2197 find_inferior. Inline code from thread_search_callback.
2199 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2201 * server.c (struct visit_actioned_threads_data): Remove.
2202 (visit_actioned_threads): Change prototype to take arguments
2204 (resume): Use find_thread instead of find_inferior.
2206 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2208 * server.c (queue_stop_reply_callback): Change prototype, return
2210 (find_status_pending_thread_callback): Remove.
2211 (handle_status): Replace find_inferior with find_thread and
2214 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2216 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2218 (aarch64_store_gregset): Likewise.
2219 (aarch64_fill_fpregset): Likewise.
2220 (aarch64_store_fpregset): Likewise.
2222 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2224 * gdbthread.h (find_thread, for_each_thread): New functions.
2225 * inferiors.c (thread_of_pid): Remove.
2226 (find_any_thread_of_pid): Use find_thread.
2227 * linux-low.c (num_lwps): Use for_each_thread.
2229 2017-10-17 Yao Qi <yao.qi@linaro.org>
2231 * Makefile.in: Remove one rule.
2232 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2234 2017-10-17 Yao Qi <yao.qi@linaro.org>
2236 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2237 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2239 2017-10-17 Yao Qi <yao.qi@linaro.org>
2241 * configure.srv: Rename arm.o with arch/arm.o.
2243 2017-10-17 Yao Qi <yao.qi@linaro.org>
2245 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2246 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2247 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2248 (arch-i386.o, arch-amd64.o): Remove rules.
2249 (arch/%.o): New rule.
2250 Update POSTCOMPILE and COMPILE.pre.
2251 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2252 * configure: Re-generated.
2253 * configure.srv: Replace arch-i386.o with arch/i386.o.
2254 Replace arch-amd64.o with arch/amd64.o.
2256 2017-10-16 Yao Qi <yao.qi@linaro.org>
2258 * configure: Regenerated.
2260 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2262 * inferiors.h: (struct inferior_list): Remove.
2263 (struct inferior_list_entry); Remove.
2264 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2265 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2266 get_first_inferior): Remove.
2267 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2268 find_inferior_id, find_inferior_in_random): Change signature.
2269 * inferiors.c (all_threads): Change type to
2270 std::list<thread_info *>.
2271 (get_thread): Remove macro.
2272 (find_inferior, find_inferior_id): Change signature, implement
2274 (find_inferior_in_random): Change signature, implement using
2275 find_thread_in_random.
2276 (for_each_inferior, for_each_inferior_with_data): Change
2277 signature, implement using for_each_thread.
2278 (add_inferior_to_list, remove_inferior): Remove.
2279 (add_thread, get_first_thread, thread_of_pid,
2280 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2281 (get_first_inferior, one_inferior_p, clear_inferior_list):
2283 (clear_inferiors, get_thread_process): Update.
2284 * gdbthread.h: Include <list>.
2285 (struct thread_info) <entry>: Remove field.
2287 (all_threads): Change type to std::list<thread_info *>.
2288 (get_first_inferior): Add doc.
2289 (find_thread, for_each_thread, find_thread_in_random): New
2291 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2292 * linux-arm-low.c (update_registers_callback): Update.
2293 * linux-low.c (second_thread_of_pid_p): Update.
2294 (kill_one_lwp_callback, linux_detach_lwp_callback,
2295 delete_lwp_callback, status_pending_p_callback, same_lwp,
2296 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2297 iterate_over_lwps, not_stopped_callback,
2298 resume_stopped_resumed_lwps, count_events_callback,
2299 select_singlestep_lwp_callback, select_event_lwp_callback,
2300 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2301 suspend_and_send_sigstop_callback, wait_for_sigstop,
2302 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2303 lwp_running, linux_set_resume_request, resume_status_pending_p,
2304 need_step_over_p, start_step_over, linux_resume_one_thread,
2305 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2306 reset_lwp_ptrace_options_callback): Update.
2307 * linux-mips-low.c (update_watch_registers_callback): Update.
2308 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2310 (free_register_cache_thread_one): Remove.
2311 (regcache_release): Update.
2312 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2313 handle_qxfer_threads_worker): Update.
2314 (handle_query): Update, use list iterator.
2315 (visit_actioned_threads, handle_pending_status,
2316 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2317 clear_pending_status_callback, set_pending_status_callback,
2318 find_status_pending_thread_callback, handle_status,
2319 process_serial_event): Update.
2320 * target.c (thread_search_callback): Update.
2321 * thread-db.c (thread_db_get_tls_address): Update.
2322 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2324 * win32-i386-low.c (update_debug_registers_callback): Update.
2325 * win32-low.c (delete_thread_info, child_delete_thread,
2326 continue_one_thread, suspend_one_thread,
2327 get_child_debug_event): Adjust.
2329 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2331 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2332 * inferiors.h: Include <list>.
2333 (struct process_info) <entry>: Remove field.
2335 (pid_of): Change macro to function.
2336 (ptid_of, lwpid_of): Remove macro.
2337 (all_processes): Change type to std::list<process_info *>.
2338 (ALL_PROCESSES): Remove macro.
2339 (for_each_process, find_process): New function.
2340 * inferiors.c (all_processes): Change type to
2341 std::list<process_info *>.
2342 (find_thread_process): Adjust.
2343 (add_process): Likewise.
2344 (remove_process): Likewise.
2345 (find_process_pid): Likewise.
2346 (get_first_process): Likewise.
2347 (started_inferior_callback): Remove.
2348 (have_started_inferiors_p): Adjust.
2349 (attached_inferior_callback): Remove.
2350 (have_attached_inferiors_p): Adjust.
2351 * linux-low.c (check_zombie_leaders): Likewise.
2352 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2353 (x86_linux_update_xmltarget): Adjust.
2354 * server.c (handle_query): Likewise.
2355 (gdb_reattached_process): Remove.
2356 (handle_status): Adjust.
2357 (kill_inferior_callback): Likewise.
2358 (detach_or_kill_inferior): Remove.
2359 (print_started_pid): Likewise.
2360 (print_attached_pid): Likewise.
2361 (detach_or_kill_for_exit): Update.
2362 (process_serial_event): Likewise.
2363 * linux-arm-low.c (arm_new_fork): Likewise.
2365 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2367 * dll.h: Include <list>.
2368 (struct dll_info): Add constructor.
2369 <entry>: Remove field.
2370 (all_dlls): Change type to std::list<dll_info>.
2371 * dll.c: Include <algorithm>.
2372 (get_dll): Remove macro.
2373 (all_dlls): Change type to std::list<dll_info *>.
2374 (free_one_dll): Remove.
2375 (match_dll): Likewise.
2376 (loaded_dll): Adjust.
2377 (unloaded_dll): Adjust to all_dlls type change, use
2378 std::find_if. Inline code from match_dll.
2379 (clear_dlls): Adjust to all_dlls type change.
2380 * server.c (emit_dll_description): Remove.
2381 (handle_qxfer_libraries): Adjust to all_dlls type change,
2382 integrate emit_dll_description's functionality.
2384 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2386 * linux-low.h (struct linux_target_ops) <delete_process>: New
2388 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2389 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2390 (struct linux_target_ops): Add delete_process callback.
2391 * linux-arm-low.c (arm_delete_process): New.
2392 (struct linux_target_ops): Add delete_process callback.
2393 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2394 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2395 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2396 * linux-mips-low.c (mips_linux_delete_process): New.
2397 (struct linux_target_ops): Add delete_process callback.
2398 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2399 * linux-s390-low.c (struct linux_target_ops): Likewise.
2400 * linux-sh-low.c (struct linux_target_ops): Likewise.
2401 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2402 * linux-tile-low.c (struct linux_target_ops): Likewise.
2403 * linux-x86-low.c (x86_linux_delete_process): New.
2404 (struct linux_target_ops): Add delete_process callback.
2405 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2407 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2409 * linux-aarch64-low.c (the_low_target): Add thread delete
2411 * linux-arm-low.c (arm_delete_thread): New function.
2412 (the_low_target): Add thread delete callback.
2413 * linux-bfin-low.c (the_low_target): Likewise.
2414 * linux-crisv32-low.c (the_low_target): Likewise.
2415 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2417 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2419 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2420 * linux-mips-low.c (mips_linux_delete_thread): New function.
2421 (the_low_target): Add thread delete callback.
2422 * linux-ppc-low.c (the_low_target): Likewise.
2423 * linux-s390-low.c (the_low_target): Likewise.
2424 * linux-sh-low.c (the_low_target): Likewise.
2425 * linux-tic6x-low.c (the_low_target): Likewise.
2426 * linux-tile-low.c (the_low_target): Likewise.
2427 * linux-x86-low.c (the_low_target): Likewise.
2428 * linux-xtensa-low.c (the_low_target): Likewise.
2430 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2432 * win32-low.c: Include "common-inferior.h".
2434 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2436 * inferiors.c (set_inferior_cwd): New function.
2437 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2438 (handle_query): Inform that QSetWorkingDir is supported.
2439 * win32-low.c (create_process): Pass the inferior's cwd to
2442 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2444 * inferiors.c (current_inferior_cwd): New global variable.
2445 (get_inferior_cwd): New function.
2446 * inferiors.h (struct process_info) <cwd>: New field.
2448 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2450 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2451 (OBS): Add gdb_tilde_expand.o.
2453 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2455 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2456 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2458 2017-09-29 Pedro Alves <palves@redhat.com>
2460 * ax.c (gdb_parse_agent_expr): Constify.
2461 * ax.h (gdb_parse_agent_expr): Constify.
2462 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2464 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2465 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2466 * remote-utils.h (read_ptid): Constify.
2467 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2468 (process_point_options, process_serial_event): Constify.
2469 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2470 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2471 (cmd_qtbuffer): Constify.
2473 2017-09-29 Pedro Alves <palves@redhat.com>
2475 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2478 2017-09-29 Pedro Alves <palves@redhat.com>
2480 * linux-low.c (handle_extended_wait): Pass parent thread instead
2481 of process to thread_db_notice_clone.
2482 * linux-low.h (thread_db_notice_clone): Replace parent process
2483 parameter with parent thread parameter.
2484 * thread-db.c (find_one_thread): Add comment.
2485 (thread_db_notice_clone): Replace parent process parameter with
2486 parent thread parameter. Temporarily switch to the parent thread.
2488 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2490 * gdbthread.h: Include "common-gdbthread.h".
2491 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2492 "if" when validating the ptid.
2493 * remote-utils.c: Include "gdbthread.h".
2494 (prepare_resume_reply): Use "switch_to_thread".
2495 * target.c (done_accessing_memory): Likewise.
2497 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2499 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2500 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2501 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2502 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2503 s390x-gs-linux64-ipa.o to ipa_obj.
2504 * linux-s390-low.c (HWCAP_S390_GS): New define.
2505 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2507 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2508 (s390_arch_setup): Check for guarded-storage support and choose
2510 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2511 init_registers_s390x_gs_linux64.
2512 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2514 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2515 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2517 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2519 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2521 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2523 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2524 (thread_db_thread_handle): Declare.
2525 * linux-low.c (linux_target_ops): Initialize thread_handle.
2526 * server.c (handle_qxfer_threads_worker): Add support for
2528 * target.h (struct target_ops): Add new function pointer,
2530 (target_thread_handle): Define.
2531 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2533 (thread_db_thread_handle): New function.
2535 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2537 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2538 * linux-low.h (thread_db_notice_clone): Declare.
2539 * thread-db.c (thread_db_notice_clone): New function.
2541 2017-09-21 Pedro Alves <palves@redhat.com>
2543 * server.c (gdb_read_memory, handle_status, process_serial_event)
2544 (handle_serial_event, handle_target_event): Adjust to
2545 set_desired_thread prototype change.
2546 * target.c (set_desired_thread): Remove 'use_general' parameter
2548 * target.h (set_desired_thread): Remove 'use_general' parameter.
2550 2017-09-20 Tom Tromey <tom@tromey.com>
2552 * target.c (target_terminal::terminal_state): Define.
2553 (target_terminal::init): Rename from target_terminal_init.
2554 (target_terminal::inferior): Rename from
2555 target_terminal_inferior.
2556 (target_terminal::ours): Rename from target_terminal_ours.
2557 (target_terminal::ours_for_output, target_terminal::info): New.
2559 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2561 * server.c (accumulate_file_name_length): Remove.
2562 (emit_dll_description): Adjust to std::string change.
2563 (handle_qxfer_libraries): Use std::string to hold document.
2565 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2567 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2568 return type of xml_escape_text.
2569 * server.c (emit_dll_description): Likewise.
2571 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2573 * server.c (captured_main): Accept argument for --selftest.
2574 Update run_tests call.
2575 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2576 when registering selftests.
2578 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2580 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2581 instead of "VEC" for "target_desc.reg_defs".
2582 (regcache_cpy): Likewise.
2583 (registers_to_string): Likewise.
2584 (registers_from_string): Likewise.
2585 (find_regno): Likewise.
2586 (supply_regblock): Likewise.
2587 (regcache_raw_read_unsigned): Likewise.
2588 * tdesc.c (init_target_desc): Likewise.
2589 (tdesc_create_reg): Likewise.
2590 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2591 (struct target_desc) <reg_defs>: Convert to "std::vector".
2592 (target_desc): Do not initialize "reg_defs".
2593 (~target_desc): Update code to use "std::vector" instead of "VEC"
2594 for "target_desc.reg_defs".
2595 (operator==): Likewise.
2597 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2599 * inferiors.h (thread_to_gdb_id): Remove.
2600 * inferiors.c (thread_to_gdb_id): Remove.
2601 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2602 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2603 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2605 * nto-low.c (nto_fetch_registers, nto_store_registers,
2606 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2608 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2610 * inferiors.h (gdb_id_to_thread_id): Remove.
2611 * inferiors.c (gdb_id_to_thread_id): Remove.
2612 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2613 removal. Move pid declaration closer to where it's used.
2615 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2617 * server.c (handle_detach): New function.
2618 (process_serial_event): Move code out, call handle_detach.
2620 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2622 * server.c (require_running): Rename to ...
2623 (require_running_or_return): ... this ...
2624 (require_running_or_break): ... and this.
2625 (handle_query, process_serial_event): Adjust.
2627 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2629 * linux-low.c (linux_set_resume_request): Remove unused
2632 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2634 * server.c (first_thread_of): Remove.
2635 (process_serial_event): Replace usage of first_thread_of with
2636 find_any_thread_of_pid.
2637 * tracepoint.c (same_process_p): Remove.
2638 (gdb_agent_about_to_close): Replace usage of same_process_p with
2639 find_any_thread_of_pid.
2640 * linux-x86-low.c (same_process_callback): Remove.
2641 (x86_arch_setup_process_callback): Replace usage of
2642 same_process_callback with find_any_thread_of_pid.
2643 * thread-db.c (any_thread_of): Remove.
2644 (switch_to_process): Replace usage of any_thread_of with
2645 find_any_thread_of_pid.
2646 * inferiors.c (thread_pid_matches_callback): Remove.
2647 (find_thread_process): Adjust to use find_any_thread_of_pid.
2649 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2651 * regcache.c (get_thread_regcache): Guard calls to "memset"
2654 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2656 * linux-low.c (handle_extended_wait): Use
2657 "allocate_target_description" instead of "XNEW".
2658 * linux-x86-low.c (initialize_low_arch): Likewise.
2660 2017-09-05 Yao Qi <yao.qi@linaro.org>
2662 * configure.srv (srv_i386_regobj): Remove.
2663 (srv_amd64_regobj): Remove.
2664 (srv_regobj): Set it to "" for x86 non-linux targets.
2665 * linux-x86-tdesc.c (i386_linux_read_description):
2666 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2667 (init_registers_i386): Remove the declaration.
2668 (tdesc_i386): Remove the declaration.
2669 (lynx_i386_arch_setup): Call i386_create_target_description.
2670 * nto-x86-low.c: Likewise.
2671 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2672 [!__x86_64__]: include arch/i386.h.
2673 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2675 2017-09-05 Yao Qi <yao.qi@linaro.org>
2677 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2678 i386/amd64-XXX-linux from it.
2680 2017-09-05 Yao Qi <yao.qi@linaro.org>
2682 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2684 (ipa_amd64_linux_regobj): Remove.
2685 (ipa_x32_linux_regobj): Remove.
2687 2017-09-05 Yao Qi <yao.qi@linaro.org>
2689 * Makefile.in (arch-amd64.o): New rule.
2690 * configure.srv: Append arch-amd64.o.
2691 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2692 (get_ipa_tdesc): Call amd64_linux_read_description.
2693 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2694 and init_registers_amd64_XXX.
2695 * linux-x86-low.c (x86_linux_read_description): Call
2696 amd64_linux_read_description.
2697 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2698 (initialize_low_arch): Don't call init_registers_x32_XXX and
2699 init_registers_amd64_XXX.
2700 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2701 and tdesc_amd64_XXX.
2702 [__x86_64__] (amd64_tdesc_test): New function.
2703 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2704 and init_registers_amd64_XXX.
2705 * linux-x86-tdesc.c: Include arch/amd64.h.
2706 (xcr0_to_tdesc_idx): New function.
2707 (i386_linux_read_description): New function.
2708 (amd64_get_ipa_tdesc_idx): New function.
2709 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2710 (amd64_get_ipa_tdesc): Declare.
2712 2017-09-05 Yao Qi <yao.qi@linaro.org>
2714 * configure.srv (srv_i386_linux_xmlfiles): Remove
2715 i386/i386-XXX-linux.xml from it.
2717 2017-09-05 Yao Qi <yao.qi@linaro.org>
2719 * configure.srv: Set srv_i386_linux_regobj empty if $development
2721 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2722 initialize_low_tdesc.
2723 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2724 with #if initialize_low_tdesc.
2725 * linux-x86-tdesc-selftest.c: New file.
2726 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2728 2017-09-05 Yao Qi <yao.qi@linaro.org>
2730 * Makefile.in (arch-i386.o): New rule.
2731 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2732 (x86_64-*-linux*): Likewise.
2733 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2734 include arch/i386.h.
2735 (i386_linux_read_description): Remove code and call
2736 i386_create_target_description.
2737 * tdesc.c (allocate_target_description): New function.
2738 * tdesc.h (set_tdesc_architecture): Remove declaration.
2739 (set_tdesc_osabi): Likewise.
2741 2017-09-05 Yao Qi <yao.qi@linaro.org>
2743 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2744 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2745 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2747 * server.c (get_features_xml): Call tdesc_get_features_xml.
2748 * tdesc.c (set_tdesc_architecture): New function.
2749 (set_tdesc_osabi): New function.
2750 (tdesc_get_features_xml): New function.
2751 (tdesc_create_feature): Add an argument.
2752 * tdesc.h (struct target_desc) <features>: New field.
2753 <arch, osabi>: New field.
2754 (~target_desc): xfree features, arch, and osabi.
2755 (target_desc::oerator==): Don't compare .xmltarget.
2756 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2757 (set_tdesc_osabi): Likewise.
2758 (tdesc_get_features_xml): Likewise.
2760 2017-09-05 Yao Qi <yao.qi@linaro.org>
2762 * linux-x86-tdesc.c: Include selftest.h.
2763 (i386_tdesc_test): New function.
2764 (initialize_low_tdesc): Call selftests::register_test.
2765 * tdesc.h: Include regdef.h.
2766 (target_desc): Override operator == and !=.
2768 2017-09-05 Yao Qi <yao.qi@linaro.org>
2770 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2771 (ipa_obj): Likewise.
2772 * linux-i386-ipa.c: Include common/x86-xstate.h
2773 (get_ipa_tdesc): Call i386_linux_read_description.
2774 (initialize_low_tracepoint): Don't call init_registers_XXX
2775 functions, call initialize_low_tdesc instead.
2776 * linux-x86-low.c (x86_linux_read_description): Call
2777 i386_linux_read_description.
2778 (initialize_low_arch): Don't call init_registers_i386_XXX
2779 functions, call initialize_low_tdesc.
2780 * linux-x86-tdesc.c: New file.
2781 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2782 (i386_get_ipa_tdesc_idx): Declare.
2783 (i386_get_ipa_tdesc): Declare.
2784 (initialize_low_tdesc): Declare.
2786 2017-09-05 Yao Qi <yao.qi@linaro.org>
2788 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2791 2017-09-05 Yao Qi <yao.qi@linaro.org>
2793 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2794 * regcache.c (get_thread_regcache): Use VEC_length.
2795 (init_register_cache): Likewise.
2796 (regcache_cpy): Likewise.
2797 (registers_to_string): Iterate reg_defs via VEC_iterate.
2798 (find_regno): Likewise.
2799 (find_register_by_number): Use VEC_index.
2800 (register_size): Call find_register_by_number.
2801 (register_data): Call find_register_by_number.
2802 (supply_regblock): Use VEC_length.
2803 (regcache_raw_read_unsigned): Likewise.
2804 * tdesc.c (init_target_desc): Iterate reg_defs via
2806 (default_description): Update initializer.
2807 (copy_target_description): Don't update field num_registers.
2808 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2809 <num_registers>: Remove.
2811 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2813 * Makefile.in (.SECONDARY): Define target.
2815 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2817 * linux-low.c (linux_wait_1): Adjust.
2818 * server.c (queue_stop_reply_callback): Adjust.
2820 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2822 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2823 QEnvironmentUnset and QEnvironmentReset packets.
2824 (handle_query): Inform remote that QEnvironmentHexEncoded,
2825 QEnvironmentUnset and QEnvironmentReset are supported.
2827 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2829 * inferiors.h (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 * inferiors.c (inferior_target_data): Rename to ...
2836 (thread_target_data): ... this.
2837 (inferior_regcache_data): Rename to ...
2838 (thread_regcache_data): ... this.
2839 (set_inferior_regcache_data): Rename to ...
2840 (set_thread_regcache_data): ... this.
2841 (free_one_thread): Update.
2842 * linux-low.h (get_thread_lwp): Update.
2843 * regcache.c (get_thread_regcache): Update.
2844 (regcache_invalidate_thread): Update.
2845 (free_register_cache_thread): Update.
2846 * win32-i386-low.c (update_debug_registers_callback): Update.
2847 (win32_get_current_dr): Update.
2848 * win32-low.c (thread_rec): Update.
2849 (delete_thread_info): Update.
2850 (continue_one_thread): Update.
2851 (suspend_one_thread): Update.
2853 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2855 * inferiors.c (set_inferior_target_data): Remove.
2856 * inferiors.h (set_inferior_target_data): Remove.
2858 2017-08-18 Yao Qi <yao.qi@linaro.org>
2860 * Makefile.in (OBS): Add selftest.o.
2861 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2862 * configure, config.in: Re-generated.
2863 * server.c: Include common/sefltest.h.
2864 (captured_main): Handle option --selftest.
2866 2017-08-09 Yao Qi <yao.qi@linaro.org>
2868 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2869 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2870 i386-avx-mpx.o and i386-mmx.o.
2871 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2872 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2873 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2874 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2875 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2876 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2877 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2878 i386/amd64-avx-mpx.xml.
2880 2017-08-09 Yao Qi <yao.qi@linaro.org>
2882 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2883 and x32-avx-avx512.o.
2884 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2885 i386/x32-avx-avx512.xml.
2887 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2889 * tracepoint.h (enum class fast_tpoint_collect_result): New
2891 (fast_tracepoint_collecting): Change return type to
2892 fast_tpoint_collect_result.
2893 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2894 * linux-low.h: Include tracepoint.h.
2895 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2896 fast_tpoint_collect_result.
2897 * linux-low.c (handle_tracepoints): Adjust.
2898 (linux_fast_tracepoint_collecting): Change return type to
2899 fast_tpoint_collect_result.
2900 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2901 linux_wait_1, stuck_in_jump_pad_callback,
2902 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2903 proceed_one_lwp): Adjust to type change.
2905 2017-07-10 Yao Qi <yao.qi@linaro.org>
2907 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2909 2017-06-29 Yao Qi <yao.qi@linaro.org>
2911 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2913 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2915 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2917 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2919 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2921 * linux-low.c (linux_create_inferior): Adjust code to access the
2922 environment information via 'gdb_environ' class.
2923 * lynx-low.c (lynx_create_inferior): Likewise.
2924 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2925 (get_environ): Return a pointer to 'our_environ'.
2926 (captured_main): Initialize 'our_environ'.
2927 * server.h (get_environ): Adjust prototype.
2928 * spu-low.c (spu_create_inferior): Adjust code to access the
2929 environment information via 'gdb_environ' class.
2931 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2933 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2934 usage of "register" keyword.
2936 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2938 * configure: Re-generate.
2940 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2942 * configure: Re-generate.
2944 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2946 * Makefile.in (COMPILE.pre): Add "-x c++".
2948 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2950 * fork-child.c: Conditionally include <signal.h>.
2952 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2954 * server.c (handle_general_set): Handle new packet
2955 "QStartupWithShell".
2956 (handle_query): Add "QStartupWithShell" to the list of supported
2958 (gdbserver_usage): Add help text explaining the
2959 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2961 (captured_main): Recognize and act upon the presence of the new
2964 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2965 Pedro Alves <palves@redhat.com>
2967 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2968 * configure: Regenerate.
2969 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2971 (i[34567]86-*-lynxos*): Likewise.
2972 (spu*-*-*): Likewise.
2973 * fork-child.c: New file.
2974 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2976 (linux_ptrace_fun): New function.
2977 (linux_create_inferior): Adjust function prototype to reflect
2978 change on "target.h". Adjust function code to use
2980 (linux_request_interrupt): Delete "signal_pid".
2981 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2982 (lynx_ptrace_fun): New function.
2983 (lynx_create_inferior): Adjust function prototype to reflect
2984 change on "target.h". Adjust function code to use
2986 * nto-low.c (nto_create_inferior): Adjust function prototype and
2987 code to reflect change on "target.h". Update comments.
2988 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2989 "common-terminal.h" and "environ.h".
2990 (terminal_fd): Moved to fork-child.c.
2991 (old_foreground_pgrp): Likewise.
2992 (restore_old_foreground_pgrp): Likewise.
2993 (last_status): Make it global.
2994 (last_ptid): Likewise.
2995 (our_environ): New variable.
2996 (startup_with_shell): Likewise.
2997 (program_name): Likewise.
2998 (program_argv): Rename to...
2999 (program_args): ...this.
3000 (wrapper_argv): New variable.
3001 (start_inferior): Delete function.
3002 (get_exec_wrapper): New function.
3003 (get_exec_file): Likewise.
3004 (get_environ): Likewise.
3005 (prefork_hook): Likewise.
3006 (post_fork_inferior): Likewise.
3007 (postfork_hook): Likewise.
3008 (postfork_child_hook): Likewise.
3009 (handle_v_run): Update code to deal with arguments coming from the
3010 remote host. Update calls from "start_inferior" to
3012 (captured_main): Likewise. Initialize environment variable. Call
3014 * server.h (post_fork_inferior): New prototype.
3015 (get_environ): Likewise.
3016 (last_status): Declare.
3017 (last_ptid): Likewise.
3018 (signal_pid): Likewise.
3019 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3020 (spu_ptrace_fun): New function.
3021 (spu_create_inferior): Adjust function prototype to reflect change
3022 on "target.h". Adjust function code to use "fork_inferior".
3023 * target.c (target_terminal_init): New function.
3024 (target_terminal_inferior): Likewise.
3025 (target_terminal_ours): Likewise.
3026 * target.h: Include <vector>.
3027 (struct target_ops) <create_inferior>: Update prototype.
3028 (create_inferior): Update macro.
3029 * utils.c (gdb_flush_out_err): New function.
3030 * win32-low.c (win32_create_inferior): Adjust function prototype
3031 and code to reflect change on "target.h".
3033 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3035 * inferiors.c (switch_to_thread): New function.
3037 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3039 * Makefile.in (SFILE): Add "common/job-control.c".
3040 (OBS): Add "job-control.o".
3042 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3044 * Makefile: Remove "@host_makefile_frag@".
3046 2017-05-05 Pedro Alves <palves@redhat.com>
3048 * configure: Regenerate.
3050 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3052 * configure: Regenerate.
3054 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3056 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3057 software_single_step change of return type to
3058 std::vector<CORE_ADDR>.
3059 * linux-low.c (install_software_single_step_breakpoints):
3061 * linux-low.h (install_software_single_step_breakpoints):
3064 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3066 * remote-utils.c: Include "gdb_termios.h" instead of
3068 * terminal.h: Delete file.
3070 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3072 * server.c: Include <vector>.
3073 <program_argv, wrapper_argv>: Convert to std::vector.
3074 (start_inferior): Rewrite function to use C++.
3075 (handle_v_run): Likewise. Update code that calculates the argv
3076 based on the vRun packet; use C++.
3077 (captured_main): Likewise.
3079 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3081 * server.c (handle_v_cont): Initialize thread_resume::thread
3084 2017-04-05 Pedro Alves <palves@redhat.com>
3086 * configure: Regenerate.
3088 2017-04-05 Pedro Alves <palves@redhat.com>
3090 * gdbreplay.c (sync_error): Constify.
3091 * linux-x86-low.c (push_opcode): Constify.
3093 2017-04-05 Pedro Alves <palves@redhat.com>
3095 * win32-low.c (get_child_debug_event)
3096 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3097 Report TARGET_WAITKIND_SPURIOUS instead.
3099 2017-04-05 Pedro Alves <palves@redhat.com>
3101 * remote-utils.c (remote_prepare, remote_open): Constify.
3102 * remote-utils.h (remote_prepare, remote_open): Constify.
3103 * server.c (captured_main): Constify 'port' handling.
3105 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3107 * Makefile.in (clean): Clear .deps.
3109 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3111 * .gitignore: Remove generated files, replace with wildcard.
3112 * (clean): Replace removal of generated files with wildcard.
3113 (version.c): Replace with...
3114 (version-generated.c): ...this.
3115 (xml-builtin.c): Replace with...
3116 (xml-builtin-generated.c): ...this.
3117 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3118 (%.c: *regformats*): Replace with...
3119 (%-generated.c: *regformats*): ...this.
3121 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3123 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3124 (xtensa_fill_gregset): Call collect_register_by_name for
3126 (xtensa_store_gregset): Call supply_register_by_name for
3129 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3131 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3132 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3133 (xtensa_store_gregset): Call supply_register for all registers in
3134 a0_regnum..a0_regnum + C0_NREGS range.
3136 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3138 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3139 (ax-ipa.o: ax.c): Remove.
3140 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3141 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3142 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3143 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3144 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3146 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3148 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3149 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3150 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3151 (errors-ipa.o: ../common/errors.c): Remove.
3152 (format-ipa.o: ../common/format.c): Remove.
3153 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3155 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3157 * Makefile.in (%-ipa.o: %.c): New rule.
3158 (tracepoint-ipa.o: tracepoint.c): Remove.
3159 (utils-ipa.o: utils.c): Remove.
3160 (remote-utils-ipa.o: remote-utils.c): Remove.
3161 (regcache-ipa.o: regcache.c): Remove.
3162 (i386-linux-ipa.o: i386-linux.c): Remove.
3163 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3164 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3165 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3166 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3167 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3168 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3169 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3170 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3171 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3172 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3173 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3174 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3175 (aarch64-ipa.o: aarch64.c): Remove.
3176 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3177 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3178 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3179 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3180 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3181 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3182 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3183 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3184 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3185 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3186 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3187 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3188 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3189 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3190 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3191 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3192 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3193 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3194 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3195 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3196 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3197 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3198 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3199 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3200 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3201 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3202 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3203 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3204 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3205 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3206 (tdesc-ipa.o: tdesc.c): Remove.
3207 (x32-linux-ipa.o: x32-linux.c): Remove.
3208 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3209 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3211 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3213 * Makefile.in (%.o: ../arch/%.c): New rule.
3214 (arm.o: ../arch/arm.c): Remove.
3215 (arm-linux.o: ../arch/arm-linux.c): Remove.
3216 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3217 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3219 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3221 * Makefile.in (%.o: ../nat/%.c): New rule.
3222 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3223 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3224 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3225 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3226 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3227 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3228 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3229 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3230 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3231 (linux-personality.o: ../nat/linux-personality.c): Remove.
3232 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3233 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3234 (x86-linux.o: ../nat/x86-linux.c): Remove.
3235 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3236 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3238 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3240 * Makefile.in (%.o: ../common/%.c): New rule.
3241 (signals.o: ../common/signals.c): Remove.
3242 (print-utils.o: ../common/print-utils.c): Remove.
3243 (rsp-low.o: ../common/rsp-low.c): Remove.
3244 (common-utils.o: ../common/common-utils.c): Remove.
3245 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3246 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3247 (vec.o: ../common/vec.c): Remove.
3248 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3249 (xml-utils.o: ../common/xml-utils.c): Remove.
3250 (ptid.o: ../common/ptid.c): Remove.
3251 (buffer.o: ../common/buffer.c): Remove.
3252 (format.o: ../common/format.c): Remove.
3253 (filestuff.o: ../common/filestuff.c): Remove.
3254 (agent.o: ../common/agent.c): Remove.
3255 (errors.o: ../common/errors.c): Remove.
3256 (environ.o: ../common/environ.c): Remove.
3257 (common-debug.o: ../common/common-debug.c): Remove.
3258 (cleanups.o: ../common/cleanups.c): Remove.
3259 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3260 (fileio.o: ../common/fileio.c): Remove.
3261 (common-regcache.o: ../common/common-regcache.c): Remove.
3262 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3263 (new-op.o: ../common/new-op.c): Remove.
3264 (btrace-common.o: ../common/btrace-common.c): Remove.
3266 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3268 * Makefile.in (%.o: ../target/%.c): New rule.
3269 (waitstatus.o: ../target/waitstatus.c): Remove.
3271 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3274 (%.c: ../regformats/%.dat,
3275 (%.c: ../regformats/arm/%.dat,
3276 (%.c: ../regformats/i386/%.dat,
3277 (%.c: ../regformats/rs6000/%.dat): New rules.
3278 (aarch64.c): Remove.
3279 (reg-arm.c): Remove.
3280 (arm-with-iwmmxt.c): Remove.
3281 (arm-with-vfpv2.c): Remove.
3282 (arm-with-vfpv3.c): Remove.
3283 (arm-with-neon.c): Remove.
3284 (reg-bfin.c): Remove.
3285 (reg-cris.c): Remove.
3286 (reg-crisv32.c): Remove.
3288 (i386-linux.c): Remove.
3289 (i386-avx.c): Remove.
3290 (i386-avx-linux.c): Remove.
3291 (i386-avx-avx512.c): Remove.
3292 (i386-avx-avx512-linux.c): Remove.
3293 (i386-mpx.c): Remove.
3294 (i386-mpx-linux.c): Remove.
3295 (i386-avx-mpx-avx512-pku.c): Remove.
3296 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3297 (i386-avx-mpx.c): Remove.
3298 (i386-avx-mpx-linux.c): Remove.
3299 (i386-mmx.c): Remove.
3300 (i386-mmx-linux.c): Remove.
3301 (reg-ia64.c): Remove.
3302 (reg-m32r.c): Remove.
3303 (reg-m68k.c): Remove.
3305 (mips-linux.c): Remove.
3306 (mips-dsp-linux.c): Remove.
3307 (mips64-linux.c): Remove.
3308 (mips64-dsp-linux.c): Remove.
3309 (nios2-linux.c): Remove.
3310 (powerpc-32.c): Remove.
3311 (powerpc-32l.c): Remove.
3312 (powerpc-altivec32l.c): Remove.
3313 (powerpc-cell32l.c): Remove.
3314 (powerpc-vsx32l.c): Remove.
3315 (powerpc-isa205-32l.c): Remove.
3316 (powerpc-isa205-altivec32l.c): Remove.
3317 (powerpc-isa205-vsx32l.c): Remove.
3318 (powerpc-e500l.c): Remove.
3319 (powerpc-64l.c): Remove.
3320 (powerpc-altivec64l.c): Remove.
3321 (powerpc-cell64l.c): Remove.
3322 (powerpc-vsx64l.c): Remove.
3323 (powerpc-isa205-64l.c): Remove.
3324 (powerpc-isa205-altivec64l.c): Remove.
3325 (powerpc-isa205-vsx64l.c): Remove.
3326 (s390-linux32.c): Remove.
3327 (s390-linux32v1.c): Remove.
3328 (s390-linux32v2.c): Remove.
3329 (s390-linux64.c): Remove.
3330 (s390-linux64v1.c): Remove.
3331 (s390-linux64v2.c): Remove.
3332 (s390-te-linux64.c): Remove.
3333 (s390-vx-linux64.c): Remove.
3334 (s390-tevx-linux64.c): Remove.
3335 (s390x-linux64.c): Remove.
3336 (s390x-linux64v1.c): Remove.
3337 (s390x-linux64v2.c): Remove.
3338 (s390x-te-linux64.c): Remove.
3339 (s390x-vx-linux64.c): Remove.
3340 (s390x-tevx-linux64.c): Remove.
3341 (tic6x-c64xp-linux.c): Remove.
3342 (tic6x-c64x-linux.c): Remove.
3343 (tic6x-c62x-linux.c): Remove.
3345 (reg-sparc64.c): Remove.
3346 (reg-spu.c): Remove.
3348 (amd64-linux.c): Remove.
3349 (amd64-avx.c): Remove.
3350 (amd64-avx-linux.c): Remove.
3351 (amd64-avx-avx512.c): Remove.
3352 (amd64-avx-avx512-linux.c): Remove.
3353 (amd64-mpx.c): Remove.
3354 (amd64-mpx-linux.c): Remove.
3355 (amd64-avx-mpx-avx512-pku.c): Remove.
3356 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3357 (amd64-avx-mpx.c): Remove.
3358 (amd64-avx-mpx-linux.c): Remove.
3360 (x32-linux.c): Remove.
3361 (x32-avx.c): Remove.
3362 (x32-avx-linux.c): Remove.
3363 (x32-avx-avx512.c): Remove.
3364 (x32-avx-avx512-linux.c): Remove.
3365 (reg-xtensa.c): Remove.
3366 (reg-tilegx.c): Remove.
3367 (reg-tilegx32.c): Remove.
3369 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3371 * Makefile.in (SFILES): Add "common/environ.c".
3372 (OBJS): Add "common/environ.h".
3374 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3376 * configure.ac: Check if the fs_base and gs_base members of
3377 `struct user_regs_struct' exist.
3378 * config.in: Regenerated.
3379 * configure: Likewise.
3381 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3383 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3385 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3386 (get_next_pcs_syscall_next_pc): Likewise.
3388 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3390 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3391 * nto-x86-low.c: Likewise.
3393 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3395 * Makefile.in: Include disable-implicit-rules.mk.
3397 2016-11-23 Pedro Alves <palves@redhat.com>
3399 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3400 (debug_vprintf): Use std::chrono::steady_clock instead of
3401 gettimeofday. Use '.' instead of ':'.
3402 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3403 (get_timestamp): Use std::chrono::steady_clock instead of
3406 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3408 * Makefile.in: Fix whitespace formatting.
3410 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3412 * Makefile.in (SFILES, OBS): Flatten list and order
3415 2016-11-23 Pedro Alves <palves@redhat.com>
3417 * event-loop.c (handle_file_event): Use warning.
3418 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3419 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3422 2016-11-23 Pedro Alves <palves@redhat.com>
3424 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3426 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3427 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3428 debug_printf and debug_flush for debug output.
3429 * server.c (handle_general_set): Likewise.
3430 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3433 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3435 * Makefile.in (.c.o): Replace rule with ...
3436 (%.o: %.c): ... this one.
3438 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3440 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3441 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3443 * configure.ac: Remove checks for the make program.
3444 * configure: Re-generate.
3446 2016-10-28 Pedro Alves <palves@redhat.com>
3448 * Makefile.in (CXX_DIALECT): Get from configure.
3449 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3450 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3451 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3452 * config.in: Regenerate.
3453 * configure: Regenerate.
3455 2016-10-27 Yao Qi <yao.qi@linaro.org>
3457 * linux-low.c (linux_supports_range_stepping): Return true if
3458 can_software_single_step return true.
3460 2016-10-27 Yao Qi <yao.qi@linaro.org>
3462 * inferiors.c (find_inferior_in_random): New function.
3463 * inferiors.h (find_inferior_in_random): Declare.
3464 * linux-low.c (linux_wait_for_event_filtered): Call
3465 find_inferior_in_random instead of find_inferior.
3467 2016-10-27 Yao Qi <yao.qi@linaro.org>
3469 * linux-low.c (linux_wait_1): If single-step breakpoints are
3470 inserted, remove them.
3472 2016-10-26 Pedro Alves <palves@redhat.com>
3474 * linux-low.c (handle_extended_wait): Link parent/child fork
3476 (linux_wait_1): Unlink them.
3477 (linux_set_resume_request): Ignore resume requests for
3478 already-resumed and unhandled fork child threads.
3479 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3480 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3482 (handle_v_requests) <vCont>: Don't call require_running.
3483 * server.h (in_queued_stop_replies): New declaration.
3485 2016-10-24 Yao Qi <yao.qi@linaro.org>
3488 * linux-aarch64-low.c (append_insns): Cast the return value to
3491 2016-10-10 Yao Qi <yao.qi@linaro.org>
3493 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3495 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3497 * target.c (target_supports_multi_process): New function, moved
3499 * target.h (target_supports_multi_process): ... here. Remove
3502 2016-10-05 Tom Tromey <tom@tromey.com>
3505 * tracepoint.c (handle_tracepoint_bkpts): Check
3506 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3508 2016-10-05 Yao Qi <yao.qi@linaro.org>
3510 * configure.srv: Update the path of arm-*.xml files.
3512 2016-10-05 Terry Guo <terry.guo@arm.com>
3513 Yao Qi <yao.qi@linaro.org>
3515 * Makefile.in: Adjust the path of rules.
3516 * configure.srv: Update the path of xml files.
3517 * regformats/arm-with-iwmmxt.dat: Regenerated.
3518 * regformats/arm-with-neon.dat: Likewise.
3519 * regformats/arm-with-vfpv2.dat: Likewise.
3520 * regformats/arm-with-vfpv3.dat Likewise.
3522 2016-09-30 Yao Qi <yao.qi@linaro.org>
3525 * target.c (target_stop_and_wait): Don't call
3526 target_continue_no_signal, use resume_stop instead.
3528 2016-09-26 Yao Qi <yao.qi@linaro.org>
3530 * linux-low.c (linux_wait_1): Call debug_exit.
3532 2016-09-23 Pedro Alves <palves@redhat.com>
3534 * Makefile.in (SFILES): Add common/new-op.c.
3535 (OBS): Add common/new-op.o.
3536 (new-op.o): New rule.
3538 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3540 * .gitinore: Ignore more files.
3542 2016-09-21 Yao Qi <yao.qi@linaro.org>
3544 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3547 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3549 * server.c (start_inferior): Call target_mourn_inferior instead of
3550 mourn_inferior; pass ptid_t argument to it.
3552 (handle_target_event): Likewise.
3553 * target.c (target_mourn_inferior): New function.
3554 * target.h (mourn_inferior): Delete macro.
3556 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3558 * linux-low.c (lwp_is_stepping): New function.
3560 2016-09-06 Carl Love <cel@us.ibm.com>
3562 * server.c (start_inferior): Fixed comment, requested comment change
3563 didn't get updated correctly. Removed reference to ptrace () call as
3564 it is only true on Linux systems.
3566 2016-09-06 Carl Love <cel@us.ibm.com>
3568 * server.c (start_inferior): Do not call
3569 function target_post_create_inferior () if the
3570 inferior process has already exited.
3572 2016-09-05 Pedro Alves <palves@redhat.com>
3574 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3575 (COMPILE.pre, CC_LD): Use CXX directly.
3576 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3577 * acinclude.m4: Don't include build-with-cxx.m4.
3578 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3579 * configure: Regenerate.
3581 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3584 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3585 call writing data to own_buf.
3587 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3589 * target.c (mywait): Call target_wait instead of
3591 (target_wait): New function.
3593 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3595 * server.c (start_inferior): New variable 'ptid'. Replace calls
3596 to the_target->resume by target_continue{,_no_signal}, depending
3598 * target.c (target_stop_and_wait): Call target_continue_no_signal
3599 instead of the_target->resume.
3600 (target_continue): New function.
3602 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3604 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3606 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3609 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3611 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3612 * linux-arm-low.c (ps_get_thread_area): Likewise.
3613 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3614 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3615 * linux-mips-low.c (ps_get_thread_area): Likewise.
3616 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3617 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3618 * linux-x86-low.c (ps_get_thread_area): Likewise.
3619 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3621 2016-08-19 Pedro Alves <palves@redhat.com>
3623 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3625 2016-08-19 Pedro Alves <palves@redhat.com>
3627 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3628 comment. Use memcpy instead of casting through unsigned long.
3630 2016-08-19 Pedro Alves <palves@redhat.com>
3632 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3633 allocating around 0x80000000.
3635 2016-08-19 Pedro Alves <palves@redhat.com>
3638 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3639 (x32-avx512-linux-ipa.o): New rules.
3640 * configure.ac (x86_64-*-linux*): New x32 check.
3641 * configure.srv (ipa_x32_linux_regobj): New.
3642 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3643 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3645 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3647 * configure: Regenerate.
3649 2016-08-09 Pedro Alves <palves@redhat.com>
3652 * Makefile.in (OBS): Add signals-state-save-restore.o.
3653 (signals-state-save-restore.o): New rule.
3654 * config.in: Regenerate.
3655 * configure: Regenerate.
3656 * linux-low.c: Include "signals-state-save-restore.h".
3657 (linux_create_inferior): Call
3658 restore_original_signals_state.
3659 * server.c: Include "dispositions-save-restore.h".
3660 (captured_main): Call save_original_signals_state.
3662 2016-08-05 Pedro Alves <palves@redhat.com>
3664 * configure: Regenerate.
3666 2016-08-04 Yao Qi <yao.qi@linaro.org>
3668 * linux-low.c (regsets_fetch_inferior_registers): Check
3669 errno is ESRCH or not.
3671 2016-08-02 Yao Qi <yao.qi@linaro.org>
3673 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3674 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3675 (thread_db_load_search): Update.
3676 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3677 td_ta_set_event and td_ta_event_getmsg.
3679 2016-07-26 Pedro Alves <palves@redhat.com>
3682 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3683 of unsigned long for 64-bit registers and use uint32_t instead of
3684 unsigned int for 32-bit registers.
3686 2016-07-26 Pedro Alves <palves@redhat.com>
3688 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3691 2016-07-21 Tom Tromey <tom@tromey.com>
3693 * configure: Rebuild.
3695 2016-07-21 Yao Qi <yao.qi@linaro.org>
3697 * mem-break.c (find_gdb_breakpoint): Cast bp to
3698 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3700 2016-07-21 Yao Qi <yao.qi@linaro.org>
3702 * server.c (handle_v_requests): Support s and S actions
3703 if target_supports_software_single_step return true.
3705 2016-07-21 Yao Qi <yao.qi@linaro.org>
3707 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3708 is resume_step, call maybe_hw_step.
3709 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3711 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3713 (proceed_one_lwp): If resume request is resume_step, install
3714 reinsert breakpoints and call maybe_hw_step.
3716 2016-07-21 Yao Qi <yao.qi@linaro.org>
3718 * linux-low.c (proceed_one_lwp): Declare.
3719 (linux_resume_one_thread): Remove local variable 'step'.
3720 Lift code enqueue signal. Call proceed_one_lwp instead of
3721 linux_resume_one_lwp.
3723 2016-07-21 Yao Qi <yao.qi@linaro.org>
3725 * linux-low.c (linux_resume_one_thread): Call
3726 enqueue_pending_signal.
3728 2016-07-21 Yao Qi <yao.qi@linaro.org>
3730 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3731 * inferiors.c (do_restore_current_thread_cleanup): New function.
3732 (make_cleanup_restore_current_thread): Likewise.
3733 * linux-low.c (install_software_single_step_breakpoints): Call
3734 make_cleanup_restore_current_thread. Switch current_thread to
3737 2016-07-21 Yao Qi <yao.qi@linaro.org>
3739 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3740 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3741 (clone_one_breakpoint): Likewise.
3742 (delete_reinsert_breakpoints): Change parameter to thread.
3744 (has_reinsert_breakpoints): Likewise.
3745 (uninsert_reinsert_breakpoints): Likewise.
3746 (reinsert_reinsert_breakpoints): Likewise.
3747 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3748 (delete_reinsert_breakpoints): Likewise.
3749 (reinsert_reinsert_breakpoints): Likewise.
3750 (uninsert_reinsert_breakpoints): Likewise.
3751 (has_reinsert_breakpoints): Likewise.
3753 2016-07-21 Yao Qi <yao.qi@linaro.org>
3755 * inferiors.c (get_thread_process): Make parameter const.
3756 * inferiors.h (get_thread_process): Update declaration.
3757 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3758 Add new parameters child_thread and parent_thread. Callers
3760 * mem-break.h (clone_all_breakpoints): Update declaration.
3762 2016-07-21 Yao Qi <yao.qi@linaro.org>
3764 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3765 <command_list, handler>: Remove.
3766 (struct gdb_breakpoint): New.
3767 (struct other_breakpoint): New.
3768 (struct reinsert_breakpoint): New.
3769 (is_gdb_breakpoint): New function.
3770 (any_persistent_commands): Update command_list if
3771 is_gdb_breakpoint returns true.
3772 (set_breakpoint): Create breakpoints according to their types.
3773 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3774 (set_gdb_breakpoint_1): Likewise.
3775 (set_gdb_breakpoint): Likewise.
3776 (clear_breakpoint_conditions): Change parameter type to
3777 'struct gdb_breakpoint *'.
3778 (clear_breakpoint_commands): Likewise.
3779 (clear_breakpoint_conditions_and_commands): Likewise.
3780 (add_condition_to_breakpoint): Likewise.
3781 (add_breakpoint_condition): Likewise.
3782 (add_commands_to_breakpoint): Likewise.
3783 (check_breakpoints): Check other_breakpoint.
3784 (clone_one_breakpoint): Clone breakpopint according to its type.
3785 * mem-break.h (struct gdb_breakpoint): Declare.
3786 (set_gdb_breakpoint): Update declaration.
3787 (clear_breakpoint_conditions_and_commands): Likewise.
3788 (add_breakpoint_condition): Likewise.
3789 (add_breakpoint_commands): Likewise.
3790 * server.c (process_point_options): Change parameter type to
3791 'struct gdb_breakpoint *'.
3793 2016-07-21 Yao Qi <yao.qi@linaro.org>
3795 * mem-break.c (set_breakpoint_at): Rename it to ...
3796 (set_breakpoint_type_at): ... it.
3797 (set_breakpoint_at): Call set_breakpoint_type_at.
3798 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3799 * mem-break.h (set_breakpoint_at): Update comments.
3801 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3803 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3805 (nios2_store_gregset): Likewise.
3807 2016-07-01 Pedro Alves <palves@redhat.com>
3808 Antoine Tremblay <antoine.tremblay@ericsson.com>
3810 * linux-low.c: Change interface to take the target lwp_info
3811 pointer directly and return void. Handle detaching from a zombie
3813 (linux_detach_lwp_callback): New function.
3814 (linux_detach): Detach from the leader thread after detaching from
3817 2016-06-28 Yao Qi <yao.qi@linaro.org>
3819 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3820 for variable new_offset.
3821 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3822 (aarch64_ftrace_insn_reloc_cb): Likewise.
3823 (aarch64_ftrace_insn_reloc_tb): Likewise.
3824 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3825 PRIx64 instead of PRIx32.
3827 2016-06-28 Yao Qi <yao.qi@linaro.org>
3829 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3830 (the_low_target): Install arm_get_syscall_trapinfo.
3832 2016-06-28 Yao Qi <yao.qi@linaro.org>
3834 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3836 (the_low_target): Install aarch64_get_syscall_trapinfo.
3838 2016-06-28 Yao Qi <yao.qi@linaro.org>
3840 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3842 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3843 Remove parameter sysno.
3844 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3847 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3849 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3850 (s390_emit_ne_goto): Likewise.
3851 (s390_emit_lt_goto): Likewise.
3852 (s390_emit_le_goto): Likewise.
3853 (s390_emit_gt_goto): Likewise.
3854 (s390_emit_ge_goto): Likewise.
3855 (s390x_emit_eq_goto): Likewise.
3856 (s390x_emit_ne_goto): Likewise.
3857 (s390x_emit_lt_goto): Likewise.
3858 (s390x_emit_le_goto): Likewise.
3859 (s390x_emit_gt_goto): Likewise.
3860 (s390x_emit_ge_goto): Likewise.
3861 (s390_emit_ops_impl): Mark variable static.
3862 (s390x_emit_ops): Likewise.
3864 2016-06-17 Yao Qi <yao.qi@linaro.org>
3866 * linux-low.c (handle_extended_wait): Call
3867 uninsert_reinsert_breakpoints for the parent process. Remove
3868 reinsert breakpoints from the child process. Reinsert them to
3869 the parent process when vfork is done.
3870 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3871 (reinsert_reinsert_breakpoints): New function.
3872 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3873 (reinsert_reinsert_breakpoints): Declare.
3875 2016-06-17 Yao Qi <yao.qi@linaro.org>
3877 * linux-low.c (handle_extended_wait): If the parent is doing
3878 step-over, remove the reinsert breakpoints from the forked child.
3880 2016-06-17 Yao Qi <yao.qi@linaro.org>
3882 * linux-low.c (unsuspend_all_lwps): Declare.
3883 (linux_low_filter_event): If thread exited, call finish_step_over.
3884 If step-over is finished, unsuspend other threads.
3886 2016-06-17 Yao Qi <yao.qi@linaro.org>
3888 * linux-low.c (linux_resume_one_lwp_throw): Assert
3889 has_reinsert_breakpoints returns false.
3890 * mem-break.c (delete_disabled_breakpoints): Assert
3891 bp type isn't reinsert_breakpoint.
3893 2016-06-17 Yao Qi <yao.qi@linaro.org>
3895 * linux-low.c (maybe_hw_step): New function.
3896 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3897 (finish_step_over): Switch current_thread to lwp temporarily,
3898 and assert has_reinsert_breakpoints returns true.
3899 (proceed_one_lwp): Call maybe_hw_step.
3900 * mem-break.c (has_reinsert_breakpoints): New function.
3901 * mem-break.h (has_reinsert_breakpoints): Declare.
3903 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3905 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3907 2016-05-17 Yao Qi <yao.qi@linaro.org>
3909 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3910 instead of find_inferior.
3912 2016-05-05 Yao Qi <yao.qi@linaro.org>
3914 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3915 Initialize res to zero.
3917 2016-05-05 Yao Qi <yao.qi@linaro.org>
3919 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3922 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3924 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3925 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3926 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3928 2016-04-28 Par Olsson <par.olsson@windriver.com>
3929 Simon Marchi <simon.marchi@ericsson.com>
3931 * tracepoint.c (write_inferior_int8): New function.
3932 (cmd_qtenable_disable): Write enable flag using
3933 write_inferior_int8.
3935 2016-04-25 Yao Qi <yao.qi@linaro.org>
3937 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3938 (need_step_over_p): Return zero if the LWP has pending signals
3939 can be delivered on software single step target.
3941 2016-04-25 Yao Qi <yao.qi@linaro.org>
3943 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3944 return instead of error.
3946 2016-04-22 Yao Qi <yao.qi@linaro.org>
3948 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3951 2016-04-22 Yao Qi <yao.qi@linaro.org>
3953 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3954 signal when stepping over breakpoint with software single
3957 2016-04-21 Pedro Alves <palves@redhat.com>
3959 * linux-s390-low.c (s390_collect_ptrace_register)
3960 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3962 (s390_check_regset): Use void * instead of gdb_byte *.
3964 2016-04-20 Pedro Alves <palves@redhat.com>
3966 * configure: Renegerate.
3968 2016-04-20 Yao Qi <yao.qi@linaro.org>
3970 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3971 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3973 (arm_store_gregset): Likewise.
3975 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3977 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3978 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3979 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3980 (amd64-avx-mpx-linux.c): New rules.
3981 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3982 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3983 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3984 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3985 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3986 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3987 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3988 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3989 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3990 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3991 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3992 * linux-x86-low.c (x86_linux_read_description): Add case for
3993 X86_XSTATE_AVX_MPX_MASK.
3994 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3995 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3996 init_registers_i386_avx_mpx_linux.
3997 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3998 (initialize_low_tracepoint): Call
3999 init_registers_i386_avx_mpx_linux.
4000 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4001 (initialize_low_tracepoint): Call
4002 init_registers_amd64_avx_mpx_linux.
4003 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4004 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4005 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4008 2016-04-18 Pedro Alves <palves@redhat.com>
4010 * configure: Regenerate.
4012 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4014 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4015 (aarch64_emit_sub): Likewise.
4017 2016-04-12 Pedro Alves <palves@redhat.com>
4019 * utils.c (prepare_to_throw_exception): Delete.
4021 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4023 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4025 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4027 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4029 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4031 * linux-aarch64-ipa.c: Add <elf.h> include.
4032 * linux-ppc-ipa.c: Add <elf.h> include.
4033 * linux-s390-ipa.c: Add <elf.h> include.
4035 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4037 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4038 (get_raw_reg_ptr): Likewise.
4039 (get_trace_state_variable_value_ptr): Likewise.
4040 (set_trace_state_variable_value_ptr): Likewise.
4041 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4044 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4045 Marcin Kościelnicki <koriakin@0x04.net>
4048 * linux-ppc-low.c (emit_insns): New function.
4049 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4050 (ppc_emit_prologue): New function.
4051 (ppc_emit_epilogue): New function.
4052 (ppc_emit_add): New function.
4053 (ppc_emit_sub): New function.
4054 (ppc_emit_mul): New function.
4055 (ppc_emit_lsh): New function.
4056 (ppc_emit_rsh_signed): New function.
4057 (ppc_emit_rsh_unsigned): New function.
4058 (ppc_emit_ext): New function.
4059 (ppc_emit_zero_ext): New function.
4060 (ppc_emit_log_not): New function.
4061 (ppc_emit_bit_and): New function.
4062 (ppc_emit_bit_or): New function.
4063 (ppc_emit_bit_xor): New function.
4064 (ppc_emit_bit_not): New function.
4065 (ppc_emit_equal): New function.
4066 (ppc_emit_less_signed): New function.
4067 (ppc_emit_less_unsigned): New function.
4068 (ppc_emit_ref): New function.
4069 (ppc_emit_const): New function.
4070 (ppc_emit_reg): New function.
4071 (ppc_emit_pop): New function.
4072 (ppc_emit_stack_flush): New function.
4073 (ppc_emit_swap): New function.
4074 (ppc_emit_stack_adjust): New function.
4075 (ppc_emit_call): New function.
4076 (ppc_emit_int_call_1): New function.
4077 (ppc_emit_void_call_2): New function.
4078 (ppc_emit_if_goto): New function.
4079 (ppc_emit_goto): New function.
4080 (ppc_emit_eq_goto): New function.
4081 (ppc_emit_ne_goto): New function.
4082 (ppc_emit_lt_goto): New function.
4083 (ppc_emit_le_goto): New function.
4084 (ppc_emit_gt_goto): New function.
4085 (ppc_emit_ge_goto): New function.
4086 (ppc_write_goto_address): New function.
4087 (ppc_emit_ops_impl): New static variable.
4088 (ppc64v1_emit_prologue): New function.
4089 (ppc64v2_emit_prologue): New function.
4090 (ppc64_emit_epilogue): New function.
4091 (ppc64_emit_add): New function.
4092 (ppc64_emit_sub): New function.
4093 (ppc64_emit_mul): New function.
4094 (ppc64_emit_lsh): New function.
4095 (ppc64_emit_rsh_signed): New function.
4096 (ppc64_emit_rsh_unsigned): New function.
4097 (ppc64_emit_ext): New function.
4098 (ppc64_emit_zero_ext): New function.
4099 (ppc64_emit_log_not): New function.
4100 (ppc64_emit_bit_and): New function.
4101 (ppc64_emit_bit_or): New function.
4102 (ppc64_emit_bit_xor): New function.
4103 (ppc64_emit_bit_not): New function.
4104 (ppc64_emit_equal): New function.
4105 (ppc64_emit_less_signed): New function.
4106 (ppc64_emit_less_unsigned): New function.
4107 (ppc64_emit_ref): New function.
4108 (ppc64_emit_const): New function.
4109 (ppc64v1_emit_reg): New function.
4110 (ppc64v2_emit_reg): New function.
4111 (ppc64_emit_pop): New function.
4112 (ppc64_emit_stack_flush): New function.
4113 (ppc64_emit_swap): New function.
4114 (ppc64v1_emit_call): New function.
4115 (ppc64v2_emit_call): New function.
4116 (ppc64v1_emit_int_call_1): New function.
4117 (ppc64v2_emit_int_call_1): New function.
4118 (ppc64v1_emit_void_call_2): New function.
4119 (ppc64v2_emit_void_call_2): New function.
4120 (ppc64_emit_if_goto): New function.
4121 (ppc64_emit_eq_goto): New function.
4122 (ppc64_emit_ne_goto): New function.
4123 (ppc64_emit_lt_goto): New function.
4124 (ppc64_emit_le_goto): New function.
4125 (ppc64_emit_gt_goto): New function.
4126 (ppc64_emit_ge_goto): New function.
4127 (ppc64v1_emit_ops_impl): New static variable.
4128 (ppc64v2_emit_ops_impl): New static variable.
4129 (ppc_emit_ops): New function.
4130 (linux_low_target): Wire in ppc_emit_ops.
4132 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4133 Marcin Kościelnicki <koriakin@0x04.net>
4136 * Makefile.in: Add powerpc-*-ipa.o
4137 * configure.srv: Add ipa_obj for powerpc*-linux.
4138 * linux-ppc-ipa.c: New file.
4139 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4141 (PPC_FIELD): New macro.
4142 (PPC_SEXT): New macro.
4143 (PPC_OP6): New macro.
4144 (PPC_BO): New macro.
4145 (PPC_LI): New macro.
4146 (PPC_BD): New macro.
4147 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4148 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4149 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4150 (ppc_get_thread_area): New function.
4151 (is_elfv2_inferior): New function.
4152 (gen_ds_form): New function.
4153 (GEN_STD): New macro.
4154 (GEN_STDU): New macro.
4155 (GEN_LD): New macro.
4156 (GEN_LDU): New macro.
4157 (gen_d_form): New function.
4158 (GEN_ADDI): New macro.
4159 (GEN_ADDIS): New macro.
4160 (GEN_LI): New macro.
4161 (GEN_LIS): New macro.
4162 (GEN_ORI): New macro.
4163 (GEN_ORIS): New macro.
4164 (GEN_LWZ): New macro.
4165 (GEN_STW): New macro.
4166 (GEN_STWU): New macro.
4167 (gen_xfx_form): New function.
4168 (GEN_MFSPR): New macro.
4169 (GEN_MTSPR): New macro.
4170 (GEN_MFCR): New macro.
4171 (GEN_MTCR): New macro.
4172 (GEN_SYNC): New macro.
4173 (GEN_LWSYNC): New macro.
4174 (gen_x_form): New function.
4175 (GEN_OR): New macro.
4176 (GEN_MR): New macro.
4177 (GEN_LWARX): New macro.
4178 (GEN_STWCX): New macro.
4179 (GEN_CMPW): New macro.
4180 (gen_md_form): New function.
4181 (GEN_RLDICL): New macro.
4182 (GEN_RLDICR): New macro.
4183 (gen_i_form): New function.
4185 (GEN_BL): New macro.
4186 (gen_b_form): New function.
4187 (GEN_BNE): New macro.
4188 (GEN_LOAD): New macro.
4189 (GEN_STORE): New macro.
4190 (gen_limm): New function.
4191 (gen_atomic_xchg): New function.
4192 (gen_call): New function.
4193 (ppc_relocate_instruction): New function.
4194 (ppc_install_fast_tracepoint_jump_pad): New function.
4195 (ppc_get_min_fast_tracepoint_insn_len): New function.
4196 (ppc_get_ipa_tdesc_idx): New function.
4197 (the_low_target): Wire in the new functions.
4198 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4200 * linux-ppc-tdesc.h: New file.
4202 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4204 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4205 (alloc_jump_pad_buffer): New function.
4206 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4207 (alloc_jump_pad_buffer): New function.
4208 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4209 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4210 (alloc_jump_pad_buffer): New function.
4211 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4212 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4213 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4214 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4216 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4218 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4219 * linux-amd64-ipa.c: Likewise.
4220 * linux-i386-ipa.c: Likewise.
4221 * linux-s390-ipa.c: Likewise.
4222 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4223 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4224 set_trace_state_variable_value_ptr.
4225 (struct ipa_sym_addresses): Likewise.
4226 (symbol_list): Likewise.
4227 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4228 accessing gdb_collect directly.
4229 (gdb_collect_ptr_type): New typedef.
4230 (get_raw_reg_ptr_type): New typedef.
4231 (get_trace_state_variable_value_ptr_type): New typedef.
4232 (set_trace_state_variable_value_ptr_type): New typedef.
4233 (gdb_collect_ptr): New global.
4234 (get_raw_reg_ptr): New global.
4235 (get_trace_state_variable_value_ptr): New global.
4236 (set_trace_state_variable_value_ptr): New global.
4237 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4238 accessing get_raw_reg directly.
4239 (get_get_tsv_func_addr): Likewise for
4240 get_trace_state_variable_value_ptr.
4241 (get_set_tsv_func_addr): Likewise for
4242 set_trace_state_variable_value_ptr.
4243 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4245 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4247 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4249 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4251 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4253 (relocate_instruction): Remove own_buf.
4254 * server.c (own_buf): Make global.
4255 (handle_v_requests): Make global.
4256 * server.h (own_buf): New declaration.
4257 (handle_v_requests): New prototype.
4259 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4262 * linux-s390-low.c (add_insns): New function.
4263 (s390_emit_prologue): New function.
4264 (s390_emit_epilogue): New function.
4265 (s390_emit_add): New function.
4266 (s390_emit_sub): New function.
4267 (s390_emit_mul): New function.
4268 (s390_emit_lsh): New function.
4269 (s390_emit_rsh_signed): New function.
4270 (s390_emit_rsh_unsigned): New function.
4271 (s390_emit_ext): New function.
4272 (s390_emit_log_not): New function.
4273 (s390_emit_bit_and): New function.
4274 (s390_emit_bit_or): New function.
4275 (s390_emit_bit_xor): New function.
4276 (s390_emit_bit_not): New function.
4277 (s390_emit_equal): New function.
4278 (s390_emit_less_signed): New function.
4279 (s390_emit_less_unsigned): New function.
4280 (s390_emit_ref): New function.
4281 (s390_emit_if_goto): New function.
4282 (s390_emit_goto): New function.
4283 (s390_write_goto_address): New function.
4284 (s390_emit_litpool): New function.
4285 (s390_emit_const): New function.
4286 (s390_emit_call): New function.
4287 (s390_emit_reg): New function.
4288 (s390_emit_pop): New function.
4289 (s390_emit_stack_flush): New function.
4290 (s390_emit_zero_ext): New function.
4291 (s390_emit_swap): New function.
4292 (s390_emit_stack_adjust): New function.
4293 (s390_emit_set_r2): New function.
4294 (s390_emit_int_call_1): New function.
4295 (s390_emit_void_call_2): New function.
4296 (s390_emit_eq_goto): New function.
4297 (s390_emit_ne_goto): New function.
4298 (s390_emit_lt_goto): New function.
4299 (s390_emit_le_goto): New function.
4300 (s390_emit_gt_goto): New function.
4301 (s390_emit_ge_goto): New function.
4302 (s390x_emit_prologue): New function.
4303 (s390x_emit_epilogue): New function.
4304 (s390x_emit_add): New function.
4305 (s390x_emit_sub): New function.
4306 (s390x_emit_mul): New function.
4307 (s390x_emit_lsh): New function.
4308 (s390x_emit_rsh_signed): New function.
4309 (s390x_emit_rsh_unsigned): New function.
4310 (s390x_emit_ext): New function.
4311 (s390x_emit_log_not): New function.
4312 (s390x_emit_bit_and): New function.
4313 (s390x_emit_bit_or): New function.
4314 (s390x_emit_bit_xor): New function.
4315 (s390x_emit_bit_not): New function.
4316 (s390x_emit_equal): New function.
4317 (s390x_emit_less_signed): New function.
4318 (s390x_emit_less_unsigned): New function.
4319 (s390x_emit_ref): New function.
4320 (s390x_emit_if_goto): New function.
4321 (s390x_emit_const): New function.
4322 (s390x_emit_call): New function.
4323 (s390x_emit_reg): New function.
4324 (s390x_emit_pop): New function.
4325 (s390x_emit_stack_flush): New function.
4326 (s390x_emit_zero_ext): New function.
4327 (s390x_emit_swap): New function.
4328 (s390x_emit_stack_adjust): New function.
4329 (s390x_emit_int_call_1): New function.
4330 (s390x_emit_void_call_2): New function.
4331 (s390x_emit_eq_goto): New function.
4332 (s390x_emit_ne_goto): New function.
4333 (s390x_emit_lt_goto): New function.
4334 (s390x_emit_le_goto): New function.
4335 (s390x_emit_gt_goto): New function.
4336 (s390x_emit_ge_goto): New function.
4337 (s390_emit_ops): New function.
4338 (struct linux_target_ops): Fill in emit_ops hook.
4340 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4343 * Makefile.in: Add s390 IPA files.
4344 * configure.srv: Build IPA for s390.
4345 * linux-s390-ipa.c: New file.
4346 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4347 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4348 (tdesc_s390_linux32): Likewise.
4349 (init_registers_s390_linux32v1): Likewise.
4350 (tdesc_s390_linux32v1): Likewise.
4351 (init_registers_s390_linux32v2): Likewise.
4352 (tdesc_s390_linux32v2): Likewise.
4353 (init_registers_s390_linux64): Likewise.
4354 (tdesc_s390_linux64): Likewise.
4355 (init_registers_s390_linux64v1): Likewise.
4356 (tdesc_s390_linux64v1): Likewise.
4357 (init_registers_s390_linux64v2): Likewise.
4358 (tdesc_s390_linux64v2): Likewise.
4359 (init_registers_s390_te_linux64): Likewise.
4360 (tdesc_s390_te_linux64): Likewise.
4361 (init_registers_s390_vx_linux64): Likewise.
4362 (tdesc_s390_vx_linux64): Likewise.
4363 (init_registers_s390_tevx_linux64): Likewise.
4364 (tdesc_s390_tevx_linux64): Likewise.
4365 (init_registers_s390x_linux64): Likewise.
4366 (tdesc_s390x_linux64): Likewise.
4367 (init_registers_s390x_linux64v1): Likewise.
4368 (tdesc_s390x_linux64v1): Likewise.
4369 (init_registers_s390x_linux64v2): Likewise.
4370 (tdesc_s390x_linux64v2): Likewise.
4371 (init_registers_s390x_te_linux64): Likewise.
4372 (tdesc_s390x_te_linux64): Likewise.
4373 (init_registers_s390x_vx_linux64): Likewise.
4374 (tdesc_s390x_vx_linux64): Likewise.
4375 (init_registers_s390x_tevx_linux64): Likewise.
4376 (tdesc_s390x_tevx_linux64): Likewise.
4377 (have_hwcap_s390_vx): New static variable.
4378 (s390_arch_setup): Fill have_hwcap_s390_vx.
4379 (s390_get_thread_area): New function.
4380 (s390_ft_entry_gpr_esa): New const.
4381 (s390_ft_entry_gpr_zarch): New const.
4382 (s390_ft_entry_misc): New const.
4383 (s390_ft_entry_fr): New const.
4384 (s390_ft_entry_vr): New const.
4385 (s390_ft_main_31): New const.
4386 (s390_ft_main_64): New const.
4387 (s390_ft_exit_fr): New const.
4388 (s390_ft_exit_vr): New const.
4389 (s390_ft_exit_misc): New const.
4390 (s390_ft_exit_gpr_esa): New const.
4391 (s390_ft_exit_gpr_zarch): New const.
4392 (append_insns): New function.
4393 (s390_relocate_instruction): New function.
4394 (s390_install_fast_tracepoint_jump_pad): New function.
4395 (s390_get_min_fast_tracepoint_insn_len): New function.
4396 (s390_get_ipa_tdesc_idx): New function.
4397 (struct linux_target_ops): Wire in the above functions.
4398 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4399 * linux-s390-tdesc.h: New file.
4401 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4403 * linux-s390-low.c (s390_supports_tracepoints): New function.
4404 (struct linux_target_ops): Fill supports_tracepoints hook.
4406 2016-03-18 Yao Qi <yao.qi@linaro.org>
4408 * linux-low.c (lwp_signal_can_be_delivered): New function.
4409 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4411 2016-03-18 Yao Qi <yao.qi@linaro.org>
4413 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4414 0 if signal is enqueued. Remove 'signal' from one debugging
4415 message. Move one debugging message to some lines below.
4416 Remove code setting 'signal' to 0.
4418 2016-03-18 Yao Qi <yao.qi@linaro.org>
4420 * linux-low.c (linux_low_filter_event): Remove redundant
4421 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4423 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4425 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4426 (struct linux_target_ops): Wire in the above.
4428 2016-03-03 Yao Qi <yao.qi@linaro.org>
4430 * linux-low.c: Update comments to start_step_over.
4432 2016-03-03 Yao Qi <yao.qi@linaro.org>
4435 * linux-low.c (handle_extended_wait): Set child suspended
4436 if event_lwp->bp_reinsert isn't zero.
4438 2016-03-02 Yao Qi <yao.qi@linaro.org>
4440 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4441 enqueue_pending_signal.
4443 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4445 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4448 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4450 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4451 (s390_regmap_3264) [!__s390x__]: New global.
4452 (s390_collect_ptrace_register): Skip map entries containing -1.
4453 (s390_supply_ptrace_register): Ditto.
4454 (s390_fill_gprs_high): New function.
4455 (s390_store_gprs_high): New function.
4456 (s390_regsets): Add NT_S390_HIGH_GPRS.
4457 (s390_get_hwcap): Enable on 31-bit.
4458 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4459 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4460 Detect NT_S390_HIGH_GPRS.
4461 (s390_usrregs_info_3264): Enable on 31-bit.
4462 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4463 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4465 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4468 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4469 * configure.srv: Ditto.
4470 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4471 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4472 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4473 (init_registers_amd64_linux): Remove prototype.
4474 (tdesc_amd64_linux): Remove declaration.
4475 (get_ipa_tdesc): New function.
4476 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4477 initialize remaining tdescs.
4478 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4479 (init_registers_i386_linux): Remove prototype.
4480 (tdesc_i386_linux): Remove declaration.
4481 (get_ipa_tdesc): New function.
4482 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4483 initialize remaining tdescs.
4484 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4485 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4486 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4487 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4488 (x86_get_ipa_tdesc_idx): New function.
4489 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4490 * linux-x86-tdesc.h: New file.
4491 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4492 (target_get_ipa_tdesc_idx): New macro.
4493 * tracepoint.c (ipa_tdesc_idx): New macro.
4494 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4495 (symbol_list): Add ipa_tdesc_idx.
4496 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4497 (ipa_tdesc): Remove.
4498 (ipa_tdesc_idx): New variable.
4499 (get_context_regcache): Use get_ipa_tdesc.
4500 (gdb_collect): Ditto.
4502 * tracepoint.h (get_ipa_tdesc): New prototype.
4503 (ipa_tdesc): Remove.
4505 2016-02-24 Pedro Alves <palves@redhat.com>
4507 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4508 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4509 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4510 Factor out common code between the USE_SIGTRAP_SIGINFO and
4511 !USE_SIGTRAP_SIGINFO blocks.
4512 (linux_low_filter_event): Call save_stop_reason instead of
4513 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4515 (linux_wait_1): Update comments.
4517 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4519 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4520 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4521 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4522 ppc_insert_point, ppc_remove_point.
4524 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4526 * linux-s390-low.c (s390_supports_z_point_type): New function.
4527 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4529 2016-02-16 Yao Qi <yao.qi@linaro.org>
4531 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4532 PC. Get pc from regcache_read_pc.
4534 2016-02-12 Yao Qi <yao.qi@linaro.org>
4536 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4537 or linux_get_pc_32bit.
4538 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4540 2016-02-12 Yao Qi <yao.qi@linaro.org>
4542 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4543 arm_linux_get_next_pcs_fixup.
4545 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4547 * tracepoint.c (x_tracepoint_action_download): Change
4548 write_inferior_data_ptr to write_inferior_data_pointer.
4549 (cmd_qtstart): Likewise.
4550 (write_inferior_data_ptr): Remove.
4551 (download_agent_expr): Change write_inferior_data_ptr to
4552 write_inferior_data_pointer.
4553 (download_tracepoint_1): Likewise.
4554 (download_tracepoint): Likewise.
4555 (download_trace_state_variables): Likewise.
4557 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4558 Marcin Kościelnicki <koriakin@0x04.net>
4560 * tracepoint.c (struct tracepoint_action_ops): Remove.
4561 (struct tracepoint_action): Remove ops.
4562 (m_tracepoint_action_download, r_tracepoint_action_download)
4563 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4564 size and offset accordingly.
4565 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4566 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4567 (tracepoint_action_send, tracepoint_action_download): New functions.
4568 Helpers for trace action handlers.
4569 (add_tracepoint_action): Remove setup actions ops.
4570 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4572 2016-02-10 Yao Qi <yao.qi@linaro.org>
4574 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4576 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4578 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4580 * configure: Regenerate.
4582 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4584 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4585 void * to gdb_byte *.
4586 * linux-low.c (siginfo_fixup): Likewise.
4587 (linux_xfer_siginfo): Likewise.
4588 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4590 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4592 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4594 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4596 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4598 * linux-x86-low.c [__x86_64__]: Include
4599 "nat/amd64-linux-siginfo.h".
4600 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4601 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4602 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4603 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4604 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4605 (cpt_si_fd, si_timerid, si_overrun): Move from
4606 nat/amd64-linux-siginfo.c.
4607 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4609 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4611 * server.c (skip_to_semicolon): Remove.
4612 (process_point_options): Use strchrnul instead of
4615 2016-01-26 Yao Qi <yao.qi@linaro.org>
4617 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4618 * linux-low.c (install_software_single_step_breakpoints): Don't
4619 call regcache_read_pc.
4620 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4623 2016-01-26 Yao Qi <yao.qi@linaro.org>
4625 * linux-low.c (install_software_single_step_breakpoints): Call
4626 regcache_read_pc instead of get_pc.
4628 2016-01-26 Yao Qi <yao.qi@linaro.org>
4630 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4631 (unblock_async_io): Rename to ...
4632 (block_unblock_async_io): ... it. New function.
4633 (enable_async_io): Don't install SIGIO handler. Unblock it
4635 (disable_async_io): Don't ignore SIGIO. Block it instead.
4636 (initialize_async_io): Install SIGIO handler. Don't call
4639 2016-01-26 Yao Qi <yao.qi@linaro.org>
4641 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4642 first character is '\003', call *the_target->request_interrupt.
4644 2016-01-25 Yao Qi <yao.qi@linaro.org>
4646 * remote-utils.c (new_thread_notify): Remove.
4647 (dead_thread_notify): Likewise.
4648 * remote-utils.h (new_thread_notify): Remove declaration.
4649 (dead_thread_notify): Likewise.
4651 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4653 * gdb.trace/pending.exp: Fix expected message on continue.
4655 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4657 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4658 it works properly on big-endian machines where sizeof (CORE_ADDR)
4661 2016-01-21 Pedro Alves <palves@redhat.com>
4663 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4664 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4665 * configure: Regenerate.
4667 2016-01-21 Yao Qi <yao.qi@linaro.org>
4669 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4670 is_thumb and set it according to CPSR saved on the stack.
4671 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4672 arm_sigreturn_next_pc.
4674 2016-01-18 Yao Qi <yao.qi@linaro.org>
4676 * linux-low.c (linux_set_pc_64bit): New function.
4677 (linux_get_pc_64bit): New function.
4678 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4680 * linux-sparc-low.c (debug_threads): Remove declaration.
4681 (sparc_get_pc): Remove.
4682 (the_low_target): Use linux_get_pc_64bit instead of
4684 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4685 (the_low_target): Use linux_get_pc_64bit and
4688 2016-01-18 Yao Qi <yao.qi@linaro.org>
4690 * linux-arm-low.c (debug_threads): Remove declaration.
4691 (arm_get_pc, arm_set_pc): Remove.
4692 (the_low_target): Use linux_get_pc_32bit and
4694 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4695 (the_low_target): Use linux_get_pc_32bit and
4697 * linux-cris-low.c (debug_threads): Remove declaration.
4698 (cris_get_pc, cris_set_pc,): Remove.
4699 (the_low_target): Use linux_get_pc_32bit and
4701 * linux-crisv32-low.c (debug_threads): Remove declaration.
4702 (cris_get_pc, cris_set_pc): Remove.
4703 (the_low_target): Use linux_get_pc_32bit and
4705 * linux-low.c: Include inttypes.h.
4706 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4707 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4708 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4709 (the_low_target): Use linux_get_pc_32bit and
4711 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4712 (the_low_target): Use linux_get_pc_32bit and
4714 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4715 (the_low_target): Use linux_get_pc_32bit and
4717 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4718 (the_low_target): Use linux_get_pc_32bit and
4720 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4721 (the_low_target): Use linux_get_pc_32bit and
4724 2016-01-18 Gary Benson <gbenson@redhat.com>
4726 * configure.ac (AC_FUNC_FORK): New check.
4727 * config.in: Regenerate.
4728 * configure: Likewise.
4730 2016-01-14 Yao Qi <yao.qi@linaro.org>
4732 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4733 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4734 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4735 arm_get_next_pcs_ctor.
4737 2016-01-12 Josh Stone <jistone@redhat.com>
4738 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4740 * inferiors.h: Include "gdb_vecs.h".
4741 (struct process_info): Add syscalls_to_catch.
4742 * inferiors.c (remove_process): Free syscalls_to_catch.
4743 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4744 syscall_return stops.
4745 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4746 * server.c (handle_general_set): Handle QCatchSyscalls.
4747 (handle_query): Report support for QCatchSyscalls.
4748 * target.h (struct target_ops): Add supports_catch_syscall.
4749 (target_supports_catch_syscall): New macro.
4750 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4751 (struct lwp_info): Add syscall_state.
4752 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4753 Maintain syscall_state and syscalls_to_catch across exec.
4754 (get_syscall_trapinfo): New function, proxy to the_low_target.
4755 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4756 (linux_low_filter_event): Toggle syscall_state entry/return for
4757 syscall traps, and set it ignored for all others.
4758 (gdb_catching_syscalls_p): New function.
4759 (gdb_catch_this_syscall_p): New function.
4760 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4761 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4762 (linux_supports_catch_syscall): New function.
4763 (linux_target_ops): Install it.
4764 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4765 (the_low_target): Install it.
4767 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4769 * acinclude.m4: Include new ../warning.m4 file.
4770 * configure: Regenerated.
4771 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4773 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4775 * ax.c (is_goto_target): Mark static.
4776 * linux-low.c (register_addr): Likewise.
4777 (linux_fetch_registers, linux_store_registers): Likewise.
4778 * mem-break.c (any_persistent_commands): Fix old prototype.
4779 (add_commands_to_breakpoint): Mark static.
4780 * regcache.c (find_register_by_name): Delete unused func.
4781 * remote-utils.c (hex_or_minus_one): Mark static.
4782 * server.c (monitor_show_help): Mark static.
4783 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4784 handle_v_requests): Likewise.
4786 2016-01-12 Pedro Alves <palves@redhat.com>
4788 Remove use of the registered trademark symbol throughout.
4790 2016-01-08 Yao Qi <yao.qi@linaro.org>
4792 * remote-utils.c (getpkt): If c is '\003', call target hook
4795 2016-01-06 Yao Qi <yao.qi@linaro.org>
4797 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4798 linux-aarch32-low.c.
4799 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4800 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4801 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4802 (thumb2_breakpoint): Declare.
4803 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4804 linux-aarch32-low.h.
4805 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4806 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4807 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4809 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4811 * gdbreplay.c (gdbreplay_version): Change copyright year in
4813 * server.c (gdbserver_version): Likewise.
4815 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4817 * server.c (crc32_table): Delete.
4818 (crc32): Use libiberty's xcrc32 function.
4820 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4822 * lynx-low.c (lynx_delete_thread_callback): New function.
4823 (lynx_mourn): Properly delete our process and all of its
4824 threads. Remove call to clear_inferiors.
4826 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4828 * target.c (thread_search_callback): Add check that
4829 the thread_stopped target callback is not NULL before
4832 2015-12-21 Yao Qi <yao.qi@linaro.org>
4834 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4837 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4839 * server.c (handle_query): Call target_supports_software_single_step.
4841 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4843 * linux-low.c (single_step): New function.
4844 (linux_resume_one_lwp_throw): Call single_step.
4845 (start_step_over): Likewise.
4847 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4849 * Makefile.in (SFILES): Append arch/arm-linux.c,
4850 arch/arm-get-next-pcs.c.
4851 (arm-linux.o): New rule.
4852 (arm-get-next-pcs.o): New rule.
4853 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4855 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4856 to linux-aarch32-low.c.
4857 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4858 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4859 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4860 (thumb2_breakpoint_len): Likewise.
4861 (arm_is_thumb_mode): Make non-static.
4862 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4863 from linux-aarch32-low.c.
4864 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4865 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4866 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4867 (thumb2_breakpoint_len): Likewise.
4868 (arm_is_thumb_mode): New declaration.
4869 * linux-arm-low.c: Include arch/arm-linux.h
4870 aarch/arm-get-next-pcs.h, sys/syscall.h.
4871 (get_next_pcs_ops): New struct.
4872 (get_next_pcs_addr_bits_remove): New function.
4873 (get_next_pcs_is_thumb): New function.
4874 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4875 (arm_sigreturn_next_pc): Likewise.
4876 (get_next_pcs_syscall_next_pc): Likewise.
4877 (arm_gdbserver_get_next_pcs): Likewise.
4878 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4880 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4881 * server.h: Include gdb_vecs.h.
4883 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4885 * Makefile.in (SFILES): Append common/common-regcache.c.
4886 (OBS): Append common-regcache.o.
4887 (common-regcache.o): New rule.
4888 * regcache.c (init_register_cache): Initialize cache to
4890 (regcache_raw_read_unsigned): New function.
4891 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4892 register_status enum.
4894 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4896 * linux-aarch64-low.c (the_low_targets): Rename
4897 breakpoint_reinsert_addr to get_next_pcs.
4898 * linux-arm-low.c (the_low_targets): Likewise.
4899 * linux-bfin-low.c (the_low_targets): Likewise.
4900 * linux-cris-low.c (the_low_targets): Likewise.
4901 * linux-crisv32-low.c (the_low_targets): Likewise.
4902 * linux-low.c (can_software_single_step): Likewise.
4903 (install_software_single_step_breakpoints): New function.
4904 (start_step_over): Use install_software_single_step_breakpoints.
4905 * linux-low.h: New CORE_ADDR vector.
4906 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4908 * linux-mips-low.c (the_low_targets): Likewise.
4909 * linux-nios2-low.c (the_low_targets): Likewise.
4910 * linux-sparc-low.c (the_low_targets): Likewise.
4912 2015-12-17 Pedro Alves <palves@redhat.com>
4914 * linux-low.c (linux_kill_one_lwp): Remove references to
4916 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4918 (linux_init_signals): Delete.
4919 (initialize_low): Adjust.
4920 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4922 2015-12-16 Pedro Alves <palves@redhat.com>
4924 * configure.ac (compiler warning flags): When testing a
4925 -Wno-foo option, check whether -Wfoo works instead.
4926 * configure: Regenerate.
4928 2015-12-11 Don Breazeal <donb@codesourcery.com>
4930 * server.c (process_serial_event): Don't exit from gdbserver
4931 in remote mode if there are still active inferiors.
4933 2015-12-11 Yao Qi <yao.qi@linaro.org>
4935 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4936 arm_breakpoint_at if the process is 32-bit.
4938 2015-12-11 Yao Qi <yao.qi@linaro.org>
4940 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4943 2015-12-07 Yao Qi <yao.qi@linaro.org>
4945 * configure.srv: Append arm.o to srv_tgtobj for
4946 aarch64*-*-linux* target.
4947 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4948 from linux-arm-low.c.
4949 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4950 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4951 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4952 (thumb2_breakpoint_len): Likewise.
4953 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4954 (arm_breakpoint_kinds): Likewise.
4955 (arm_breakpoint_kind_from_pc): Likewise.
4956 (arm_sw_breakpoint_from_kind): Likewise.
4957 (arm_breakpoint_kind_from_current_state): Likewise.
4958 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4959 (arm_sw_breakpoint_from_kind): Declare.
4960 (arm_breakpoint_kind_from_current_state): Declare.
4961 (arm_breakpoint_at): Declare.
4962 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4963 arm_sw_breakpoint_from_kind if process is 32-bit.
4964 (aarch64_breakpoint_kind_from_pc): New function.
4965 (aarch64_breakpoint_kind_from_current_state): New function.
4966 (the_low_target): Initialize fields breakpoint_kind_from_pc
4967 and breakpoint_kind_from_current_state.
4968 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4969 linux-aarch32-low.c.
4970 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4971 (arm_breakpoint, arm_breakpoint_len): Likewise.
4972 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4973 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4974 (arm_is_thumb_mode): Likewise.
4975 (arm_breakpoint_at): Likewise.
4976 (arm_breakpoint_kind_from_pc): Likewise.
4977 (arm_sw_breakpoint_from_kind): Likewise.
4978 (arm_breakpoint_kind_from_current_state): Likewise.
4981 2015-08-04 Yao Qi <yao.qi@linaro.org>
4983 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4984 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4985 * server.c (extended_protocol): Remove "static".
4986 * server.h (extended_protocol): Declare it.
4988 2015-12-04 Josh Stone <jistone@redhat.com>
4990 * target.h (struct target_ops) <arch_setup>: Rename to ...
4991 (struct target_ops) <post_create_inferior>: ... this.
4992 (target_arch_setup): Rename to ...
4993 (target_post_create_inferior): ... this, calling post_create_inferior.
4994 * server.c (start_inferior): Update target_arch_setup calls to
4995 target_post_create_inferior.
4996 * linux-low.c (linux_low_ptrace_options): Forward declare.
4997 (linux_arch_setup): Update its comment for general use.
4998 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4999 (struct linux_target_ops): Use linux_post_create_inferior.
5000 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5001 to post_create_inferior.
5002 * nto-low.c (struct nto_target_ops): Likewise.
5003 * spu-low.c (struct spu_target_ops): Likewise.
5004 * win32-low.c (struct win32_target_ops): Likewise.
5006 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5008 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5010 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5012 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5013 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5014 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5015 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5016 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5017 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5018 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5019 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5020 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5021 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5022 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5023 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5025 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5027 * linux-low.c (linux_look_up_symbols): Don't call
5028 linux_supports_traceclone.
5029 * linux-low.h (thread_db_init): Remove use_events argument.
5030 * thread-db.c (thread_db_use_event): Remove global variable.
5031 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5032 (struct thread_db) <td_create_bp>: Remove field.
5033 (thread_db_create_event): Remove function.
5034 (thread_db_enable_reporting): Likewise.
5035 (find_one_thread): Don't check for thread_db_use_events.
5036 (attach_thread): Likewise.
5037 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5038 (try_thread_db_load_1): Don't check for thread_db_use_events.
5039 (thread_db_init): Remove use_events argument and thread events
5041 (remove_thread_event_breakpoints): Remove function.
5042 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5044 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5046 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5048 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5049 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5050 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5051 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5052 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5054 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5056 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5057 * linux-low.c (can_hardware_single_step): Use
5058 supports_hardware_single_step.
5059 (can_software_single_step): New function.
5060 (start_step_over): Call can_software_single_step.
5061 (linux_supports_hardware_single_step): New function.
5062 (struct target_ops) <supports_software_single_step>: Initialize.
5063 * linux-low.h (struct linux_target_ops)
5064 <supports_hardware_single_step>: Initialize.
5065 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5066 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5067 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5068 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5069 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5070 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5071 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5072 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5073 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5074 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5076 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5077 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5079 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5080 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5081 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5083 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5084 * target.h (struct target_ops): <supports_software_single_step>:
5086 (target_supports_software_single_step): New macro.
5088 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5090 * linux-low.c (linux_wait_1): Fix pc advance condition.
5091 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5092 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5094 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5096 * linux-arm-low.c (arm_is_thumb_mode): New function.
5097 (arm_breakpoint_at): Use arm_is_thumb_mode.
5098 (arm_breakpoint_kind_from_current_state): New function.
5099 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5101 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5102 (linux_breakpoint_kind_from_current_state): New function.
5103 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5104 * linux-low.h (struct linux_target_ops)
5105 <breakpoint_kind_from_current_state>: New field.
5106 * target.h (struct target_ops): Likewise.
5107 (target_breakpoint_kind_from_current_state): New macro.
5109 2015-11-30 Pedro Alves <palves@redhat.com>
5111 * linux-low.c (linux_resume): Wake up the event loop before
5114 2015-11-30 Pedro Alves <palves@redhat.com>
5116 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5118 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5120 * target.c (struct thread_search): New structure.
5121 (thread_search_callback): New function.
5122 (prev_general_thread): New global.
5123 (prepare_to_access_memory, done_accessing_memory): New functions.
5124 * target.h (prepare_to_access_memory, done_accessing_memory):
5125 Replace macros with function declarations.
5127 2015-11-30 Pedro Alves <palves@redhat.com>
5130 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5131 report TARGET_WAITKIND_NO_RESUMED.
5132 * remote-utils.c (prepare_resume_reply): Handle
5133 TARGET_WAITKIND_NO_RESUMED.
5134 * server.c (report_no_resumed): New global.
5135 (handle_query) <qSupported>: Handle "no-resumed+". Report
5136 "no-resumed+" support.
5137 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5138 return error if the client doesn't support no-resumed events.
5139 (push_stop_notification): New function.
5140 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5141 events if the client supports them.
5143 2015-11-30 Pedro Alves <palves@redhat.com>
5145 * linux-low.c (thread_still_has_status_pending_p): Don't check
5147 (lwp_resumed): New function.
5148 (status_pending_p_callback): Return early if the LWP is not
5149 supposed to be resumed.
5151 2015-11-30 Pedro Alves <palves@redhat.com>
5153 * linux-low.c (handle_extended_wait): Assert that the LWP's
5154 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5155 thread create events, leave the new child's status pending.
5156 (linux_low_filter_event): If GDB wants to hear about thread exit
5157 events, leave the LWP marked dead and don't delete it.
5158 (linux_wait_for_event_filtered): Don't check for thread exit.
5159 (filter_exit_event): New function.
5160 (linux_wait_1): Use it, when returning an exit event.
5161 (linux_resume_one_lwp_throw): Assert that the LWP's
5162 waitstatus is TARGET_WAITKIND_IGNORE.
5163 * remote-utils.c (prepare_resume_reply): Handle
5164 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5165 * server.c (report_thread_events): New global.
5166 (handle_general_set): Handle QThreadEvents.
5167 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5168 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5169 TARGET_WAITKIND_THREAD_EXITED.
5170 * server.h (report_thread_events): Declare.
5172 2015-11-30 Pedro Alves <palves@redhat.com>
5174 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5175 the thread's last_resume_kind was resume_stop.
5177 2015-11-30 Pedro Alves <palves@redhat.com>
5179 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5182 2015-11-30 Pedro Alves <palves@redhat.com>
5184 * server.c (handle_v_requests): Handle vCtrlC.
5186 2015-11-30 Pedro Alves <palves@redhat.com>
5188 * gdbthread.h (find_any_thread_of_pid): Declare.
5189 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5191 * server.c (handle_query): If current_thread is NULL, look for
5192 another thread of the selected process.
5194 2015-11-26 Daniel Colascione <dancol@dancol.org>
5195 Simon Marchi <simon.marchi@ericsson.com>
5197 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5198 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5200 * target.h (struct target_ops) <thread_name>: New field.
5201 (target_thread_name): New macro.
5203 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5205 * regcache.h (regcache_invalidate_pid): Add declaration.
5206 * regcache.c (regcache_invalidate_pid): New function, extracted
5207 from regcache_invalidate.
5208 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5209 Add trivial documentation comment.
5210 * lynx-low.c: Use regcache_invalidate_pid instead of
5211 regcache_invalidate.
5213 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5215 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5216 and Elf64_auxv_t if the target is Android.
5218 2015-11-22 Doug Evans <xdje42@gmail.com>
5220 * target.h: #include <sys/types.h>.
5222 2015-11-19 Pedro Alves <palves@redhat.com>
5224 * linux-low.c (linux_process_qsupported): Change prototype.
5226 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5228 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5229 and adjust to loop over all features.
5230 * server.c (handle_query) <qSupported>: Adjust to call
5231 target_process_qsupported once, passing it a vector of unprocessed
5233 * target.h (struct target_ops) <process_qsupported>: Change
5235 (target_process_qsupported): Adjust.
5237 2015-11-19 Pedro Alves <palves@redhat.com>
5239 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5241 * configure: Regenerate.
5243 2015-11-19 Pedro Alves <palves@redhat.com>
5245 * configure: Regenerate.
5247 2015-11-19 Yao Qi <yao.qi@linaro.org>
5249 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5252 2015-11-19 Yao Qi <yao.qi@linaro.org>
5254 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5255 (struct aarch64_operand): Move enum out.
5257 2015-11-19 Yao Qi <yao.qi@linaro.org>
5259 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5260 struct user_fpsimd_state *.
5261 (aarch64_store_fpregset): Likewise.
5263 2015-11-19 Yao Qi <yao.qi@linaro.org>
5265 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5266 struct user_pt_regs *.
5267 (aarch64_store_gregset): Likewise.
5269 2015-11-18 Pedro Alves <palves@redhat.com>
5271 * Makefile.in (all_object_files): Add $IPA_OBJS.
5273 2015-11-17 Pedro Alves <palves@redhat.com>
5275 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5276 GDB_SIGNAL_0 and gdb_signal_to_string.
5278 2015-11-17 Pedro Alves <palves@redhat.com>
5280 * win32-low.c (handle_output_debug_string): Remove parameter.
5281 (win32_kill): Remove our_status local and adjust call to
5282 handle_output_debug_string.
5283 (get_child_debug_event): Adjust call to
5284 handle_output_debug_string.
5286 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5288 * linux-mips-low.c (mips_fill_gregset): Add cast.
5289 (mips_store_gregset): Likewise.
5290 (mips_fill_fpregset): Likewise.
5291 (mips_store_fpregset): Likewise.
5293 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5295 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5298 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5300 * linux-mips-low.c (mips_linux_new_thread): Change type of
5301 watch_type to enum target_hw_bp_type.
5303 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5305 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5306 Change return type to arm_hwbp_type.
5308 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5310 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5311 (arm_store_gregset): Likewise.
5312 * linux-arm-low.c (arm_get_hwcap): Likewise.
5313 (arm_read_description): Likewise.
5315 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5317 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5319 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5321 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5322 (ppc_fill_vsxregset): Likewise.
5323 (ppc_store_vsxregset): Likewise.
5324 (ppc_fill_vrregset): Likewise.
5325 (ppc_store_vrregset): Likewise.
5326 (ppc_fill_evrregset): Likewise.
5327 (ppc_store_evrregset): Likewise.
5329 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5331 * linux-ppc-low.c (ppc_usrregs_info): Remove
5332 forward-declaration.
5333 (ppc_arch_setup): Move lower in file.
5335 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5337 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5338 (ps_pdwrite): Likewise.
5340 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5342 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5343 to after assert checks.
5345 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5347 * proc-service.c (ps_pdread): Add/adjust casts.
5348 (ps_pdwrite): Add/adjust casts.
5350 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5352 * server.c (handle_search_memory_1): Cast return value of
5355 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5357 * server.c (write_qxfer_response): Change type of data to
5360 2015-10-29 Pedro Alves <palves@redhat.com>
5362 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5364 2015-10-29 Pedro Alves <palves@redhat.com>
5366 * tracepoint.c (clear_installed_tracepoints): Add casts.
5368 2015-10-29 Pedro Alves <palves@redhat.com>
5370 * server.c (handle_v_cont, process_serial_event): Add enum
5371 gdb_signal casts to signal parsing code.
5373 2015-10-29 Pedro Alves <palves@redhat.com>
5375 * linux-low.h (NULL_REGSET): Define.
5376 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5377 * linux-arm-low.c (arm_regsets): Likewise.
5378 * linux-crisv32-low.c (cris_regsets): Likewise.
5379 * linux-m68k-low.c (m68k_regsets): Likewise.
5380 * linux-mips-low.c (mips_regsets): Likewise.
5381 * linux-nios2-low.c (nios2_regsets): Likewise.
5382 * linux-ppc-low.c (ppc_regsets): Likewise.
5383 * linux-s390-low.c (s390_regsets): Likewise.
5384 * linux-sh-low.c (sh_regsets): Likewise.
5385 * linux-sparc-low.c (sparc_regsets): Likewise.
5386 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5387 * linux-tile-low.c (tile_regsets): Likewise.
5388 * linux-x86-low.c (x86_regsets): Likewise.
5389 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5391 2015-10-29 Pedro Alves <palves@redhat.com>
5393 * linux-low.h (NULL_REGSET): Define.
5394 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5395 * linux-arm-low.c (arm_regsets): Likewise.
5396 * linux-crisv32-low.c (cris_regsets): Likewise.
5397 * linux-m68k-low.c (m68k_regsets): Likewise.
5398 * linux-mips-low.c (mips_regsets): Likewise.
5399 * linux-nios2-low.c (nios2_regsets): Likewise.
5400 * linux-ppc-low.c (ppc_regsets): Likewise.
5401 * linux-s390-low.c (s390_regsets): Likewise.
5402 * linux-sh-low.c (sh_regsets): Likewise.
5403 * linux-sparc-low.c (sparc_regsets): Likewise.
5404 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5405 * linux-tile-low.c (tile_regsets): Likewise.
5406 * linux-x86-low.c (x86_regsets): Likewise.
5407 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5409 2015-10-26 Doug Evans <dje@google.com>
5411 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5413 2015-10-26 Doug Evans <dje@google.com>
5415 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5417 2015-10-26 Doug Evans <dje@google.com>
5419 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5421 (attach_thread, find_new_threads_callback): Ditto.
5423 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5425 * mem-break.h (set_breakpoint_data): Remove.
5427 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5429 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5430 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5431 (initialize_low): Remove set_breakpoint_data call.
5432 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5433 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5434 (initialize_low): Remove set_breakpoint_data call.
5435 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5436 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5437 (initialize_low): Remove set_breakpoint_data call.
5439 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5441 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5442 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5443 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5444 * target.h (target_breakpoint_kind_from_pc): New macro.
5446 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5448 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5449 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5450 the default breakpoint kind.
5452 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5454 * linux-arm-low.c (arm_supports_z_point_type): Add software
5457 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5459 * linux-arm-low.c: Refactor breakpoint definitions.
5460 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5461 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5463 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5465 * Makefile.in: Add arm.c/o.
5466 * configure.srv: Likewise.
5467 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5468 (arm_breakpoint_kind_from_pc): New function.
5469 (arm_sw_breakpoint_from_kind): Return proper kind.
5470 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5472 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5474 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5476 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5477 (struct raw_breakpoint) <size>: Remove.
5478 (struct raw_breakpoint) <kind>: Add.
5479 (bp_size): New function.
5480 (bp_opcode): Likewise.
5481 (find_raw_breakpoint_at): Adjust for kind.
5482 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5483 (remove_memory_breakpoint): Adjust for kind call bp_size.
5484 (set_raw_breakpoint_at): Adjust for kind.
5485 (set_breakpoint): Likewise.
5486 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5487 (delete_raw_breakpoint): Adjust for kind.
5488 (delete_breakpoint): Likewise.
5489 (find_gdb_breakpoint): Likewise.
5490 (set_gdb_breakpoint_1): Likewise.
5491 (set_gdb_breakpoint): Likewise.
5492 (delete_gdb_breakpoint_1): Likewise.
5493 (delete_gdb_breakpoint): Likewise.
5494 (uninsert_raw_breakpoint): Likewise.
5495 (reinsert_raw_breakpoint): Likewise.
5496 (set_breakpoint_data): Remove.
5497 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5498 (check_mem_read): Adjust for kind call bp_size.
5499 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5500 (clone_one_breakpoint): Adjust for kind.
5501 * mem-break.h (set_gdb_breakpoint): Likewise.
5502 (delete_gdb_breakpoint): Likewise.
5503 * server.c (process_serial_event): Likewise.
5505 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5507 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5508 (struct linux_target_ops) <breakpoint>: Remove.
5509 (struct linux_target_ops) <breakpoint_len>: Remove.
5510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5512 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5513 (arm_sw_breakpoint_from_kind): New function.
5514 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5515 (struct linux_target_ops) <breakpoint>: Remove.
5516 (struct linux_target_ops) <breakpoint_len>: Remove.
5517 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5518 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5519 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5520 (struct linux_target_ops) <breakpoint>: Remove.
5521 (struct linux_target_ops) <breakpoint_len>: Remove.
5522 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5523 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5524 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5525 (struct linux_target_ops) <breakpoint>: Remove.
5526 (struct linux_target_ops) <breakpoint_len>: Remove.
5527 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5528 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5529 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5530 and sw_breakpoint_from_kind to increment the pc.
5531 (linux_breakpoint_kind_from_pc): New function.
5532 (linux_sw_breakpoint_from_kind): New function.
5533 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5534 (initialize_low): Call breakpoint_kind_from_pc and
5535 sw_breakpoint_from_kind to replace breakpoint_data/len.
5536 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5538 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5539 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5540 (struct linux_target_ops) <breakpoint>: Remove.
5541 (struct linux_target_ops) <breakpoint_len>: Remove.
5542 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5543 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5544 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5545 (struct linux_target_ops) <breakpoint>: Remove.
5546 (struct linux_target_ops) <breakpoint_len>: Remove.
5547 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5548 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5549 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5550 (struct linux_target_ops) <breakpoint>: Remove.
5551 (struct linux_target_ops) <breakpoint_len>: Remove.
5552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5553 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5554 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5555 (struct linux_target_ops) <breakpoint>: Remove.
5556 (struct linux_target_ops) <breakpoint_len>: Remove.
5557 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5558 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5559 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5560 (struct linux_target_ops) <breakpoint>: Remove.
5561 (struct linux_target_ops) <breakpoint_len>: Remove.
5562 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5563 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5564 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5565 (struct linux_target_ops) <breakpoint>: Remove.
5566 (struct linux_target_ops) <breakpoint_len>: Remove.
5567 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5568 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5569 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5570 (struct linux_target_ops) <breakpoint>: Remove.
5571 (struct linux_target_ops) <breakpoint_len>: Remove.
5572 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5573 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5574 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5575 (struct linux_target_ops) <breakpoint>: Remove.
5576 (struct linux_target_ops) <breakpoint_len>: Remove.
5577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5578 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5579 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5585 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5586 (struct linux_target_ops) <breakpoint>: Remove.
5587 (struct linux_target_ops) <breakpoint_len>: Remove.
5588 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5589 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5590 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5591 (struct linux_target_ops) <breakpoint>: Remove.
5592 (struct linux_target_ops) <breakpoint_len>: Remove.
5593 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5594 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5596 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5598 * linux-cris-low.c (cris_get_pc): Remove void arg.
5600 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5602 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5605 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5607 * inferiors.c (thread_pid_matches_callback): New function.
5608 (find_thread_process): New function.
5609 (remove_thread): Reset current_thread.
5610 (remove_process): Assert threads have been removed first.
5612 2015-10-15 Yao Qi <yao.qi@linaro.org>
5614 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5616 (aarch64_remove_point): Likewise.
5617 * regcache.c (regcache_register_size): New function.
5619 2015-10-12 Yao Qi <yao.qi@linaro.org>
5621 * linux-aarch64-low.c: Update all callers as emit_load_store
5622 is renamed to aarch64_emit_load_store.
5624 2015-10-12 Yao Qi <yao.qi@linaro.org>
5626 * linux-aarch64-low.c: Update all callers of function renaming
5627 from emit_insn to aarch64_emit_insn.
5629 2015-10-12 Yao Qi <yao.qi@linaro.org>
5631 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5632 arch/aarch64-insn.h.
5633 (struct aarch64_memory_operand): Likewise.
5635 (emit_insn): Move to arch/aarch64-insn.c.
5636 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5637 (emit_load_store): Move to arch/aarch64-insn.c.
5638 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5639 (can_encode_int32): Remove.
5641 2015-10-12 Yao Qi <yao.qi@linaro.org>
5643 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5644 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5645 (aarch64_relocate_instruction): Likewise.
5646 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5647 (struct aarch64_insn_visitor): Likewise.
5649 2015-10-12 Yao Qi <yao.qi@linaro.org>
5651 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5652 (struct aarch64_insn_visitor): New.
5653 (struct aarch64_insn_relocation_data): New.
5654 (aarch64_ftrace_insn_reloc_b): New function.
5655 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5656 (aarch64_ftrace_insn_reloc_cb): Likewise.
5657 (aarch64_ftrace_insn_reloc_tb): Likewise.
5658 (aarch64_ftrace_insn_reloc_adr): Likewise.
5659 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5660 (aarch64_ftrace_insn_reloc_others): Likewise.
5662 (aarch64_relocate_instruction): Use visitor.
5664 2015-10-12 Yao Qi <yao.qi@linaro.org>
5666 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5667 int. Add argument buf.
5668 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5669 aarch64_relocate_instruction.
5671 2015-10-12 Yao Qi <yao.qi@linaro.org>
5673 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5674 argument insn. Remove local variable insn. Don't call
5676 (aarch64_install_fast_tracepoint_jump_pad): Call
5679 2015-09-30 Yao Qi <yao.qi@linaro.org>
5681 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5682 (emit_load_store_pair): Likewise.
5684 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5686 * dll.c (match_dll): Add cast(s).
5687 (unloaded_dll): Likewise.
5688 * linux-low.c (second_thread_of_pid_p): Likewise.
5689 (delete_lwp_callback): Likewise.
5690 (count_events_callback): Likewise.
5691 (select_event_lwp_callback): Likewise.
5692 (linux_set_resume_request): Likewise.
5693 * server.c (accumulate_file_name_length): Likewise.
5694 (emit_dll_description): Likewise.
5695 (handle_qxfer_threads_worker): Likewise.
5696 (visit_actioned_threads): Likewise.
5697 * thread-db.c (any_thread_of): Likewise.
5698 * tracepoint.c (same_process_p): Likewise.
5699 (match_blocktype): Likewise.
5700 (build_traceframe_info_xml): Likewise.
5702 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5704 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5706 (gdb_unparse_agent_expr): Likewise.
5707 * hostio.c (require_data): Likewise.
5708 (handle_pread): Likewise.
5709 * linux-low.c (disable_regset): Likewise.
5710 (fetch_register): Likewise.
5711 (store_register): Likewise.
5712 (get_dynamic): Likewise.
5713 (linux_qxfer_libraries_svr4): Likewise.
5714 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5715 (set_fast_tracepoint_jump): Likewise.
5716 (uninsert_fast_tracepoint_jumps_at): Likewise.
5717 (reinsert_fast_tracepoint_jumps_at): Likewise.
5718 (validate_inserted_breakpoint): Likewise.
5719 (clone_agent_expr): Likewise.
5720 * regcache.c (init_register_cache): Likewise.
5721 * remote-utils.c (putpkt_binary_1): Likewise.
5722 (decode_M_packet): Likewise.
5723 (decode_X_packet): Likewise.
5724 (look_up_one_symbol): Likewise.
5725 (relocate_instruction): Likewise.
5726 (monitor_output): Likewise.
5727 * server.c (handle_search_memory): Likewise.
5728 (handle_qxfer_exec_file): Likewise.
5729 (handle_qxfer_libraries): Likewise.
5730 (handle_qxfer): Likewise.
5731 (handle_query): Likewise.
5732 (handle_v_cont): Likewise.
5733 (handle_v_run): Likewise.
5734 (captured_main): Likewise.
5735 * target.c (write_inferior_memory): Likewise.
5736 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5737 * tracepoint.c (init_trace_buffer): Likewise.
5738 (add_tracepoint_action): Likewise.
5739 (add_traceframe): Likewise.
5740 (add_traceframe_block): Likewise.
5741 (cmd_qtdpsrc): Likewise.
5742 (cmd_qtdv): Likewise.
5743 (cmd_qtstatus): Likewise.
5744 (response_source): Likewise.
5745 (response_tsv): Likewise.
5746 (cmd_qtnotes): Likewise.
5747 (gdb_collect): Likewise.
5748 (initialize_tracepoint): Likewise.
5750 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5752 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5753 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5754 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5756 (enum aarch64_condition_codes): New enum.
5757 (w0): New static global.
5760 (struct aarch64_memory_operand) <type>: New
5761 MEMORY_OPERAND_POSTINDEX type.
5762 (postindex_memory_operand): New helper function.
5763 (emit_ret): New function.
5764 (emit_load_store_pair): New function, factored out of emit_stp
5765 with support for MEMORY_OPERAND_POSTINDEX.
5766 (emit_stp): Rewrite using emit_load_store_pair.
5767 (emit_ldp): New function.
5768 (emit_load_store): Likewise.
5769 (emit_ldr): Mention post-index instruction in comment.
5770 (emit_ldrh): New function.
5771 (emit_ldrb): New function.
5772 (emit_ldrsw): Mention post-index instruction in comment.
5773 (emit_str): Likewise.
5774 (emit_subs): New function.
5775 (emit_cmp): Likewise.
5776 (emit_and): Likewise.
5777 (emit_orr): Likewise.
5778 (emit_orn): Likewise.
5779 (emit_eor): Likewise.
5780 (emit_mvn): Likewise.
5781 (emit_lslv): Likewise.
5782 (emit_lsrv): Likewise.
5783 (emit_asrv): Likewise.
5784 (emit_mul): Likewise.
5785 (emit_sbfm): Likewise.
5786 (emit_sbfx): Likewise.
5787 (emit_ubfm): Likewise.
5788 (emit_ubfx): Likewise.
5789 (emit_csinc): Likewise.
5790 (emit_cset): Likewise.
5791 (emit_nop): Likewise.
5792 (emit_ops_insns): New helper function.
5793 (emit_pop): Likewise.
5794 (emit_push): Likewise.
5795 (aarch64_emit_prologue): New function.
5796 (aarch64_emit_epilogue): Likewise.
5797 (aarch64_emit_add): Likewise.
5798 (aarch64_emit_sub): Likewise.
5799 (aarch64_emit_mul): Likewise.
5800 (aarch64_emit_lsh): Likewise.
5801 (aarch64_emit_rsh_signed): Likewise.
5802 (aarch64_emit_rsh_unsigned): Likewise.
5803 (aarch64_emit_ext): Likewise.
5804 (aarch64_emit_log_not): Likewise.
5805 (aarch64_emit_bit_and): Likewise.
5806 (aarch64_emit_bit_or): Likewise.
5807 (aarch64_emit_bit_xor): Likewise.
5808 (aarch64_emit_bit_not): Likewise.
5809 (aarch64_emit_equal): Likewise.
5810 (aarch64_emit_less_signed): Likewise.
5811 (aarch64_emit_less_unsigned): Likewise.
5812 (aarch64_emit_ref): Likewise.
5813 (aarch64_emit_if_goto): Likewise.
5814 (aarch64_emit_goto): Likewise.
5815 (aarch64_write_goto_address): Likewise.
5816 (aarch64_emit_const): Likewise.
5817 (aarch64_emit_call): Likewise.
5818 (aarch64_emit_reg): Likewise.
5819 (aarch64_emit_pop): Likewise.
5820 (aarch64_emit_stack_flush): Likewise.
5821 (aarch64_emit_zero_ext): Likewise.
5822 (aarch64_emit_swap): Likewise.
5823 (aarch64_emit_stack_adjust): Likewise.
5824 (aarch64_emit_int_call_1): Likewise.
5825 (aarch64_emit_void_call_2): Likewise.
5826 (aarch64_emit_eq_goto): Likewise.
5827 (aarch64_emit_ne_goto): Likewise.
5828 (aarch64_emit_lt_goto): Likewise.
5829 (aarch64_emit_le_goto): Likewise.
5830 (aarch64_emit_gt_goto): Likewise.
5831 (aarch64_emit_ge_got): Likewise.
5832 (aarch64_emit_ops_impl): New static global variable.
5833 (aarch64_emit_ops): New target function, return
5834 &aarch64_emit_ops_impl.
5835 (struct linux_target_ops): Install it.
5837 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5839 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5840 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5842 * linux-aarch64-ipa.c: New file.
5843 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5845 (aarch64_get_thread_area): New target method.
5846 (extract_signed_bitfield): New helper function.
5847 (aarch64_decode_ldr_literal): New function.
5848 (enum aarch64_opcodes): New enum.
5849 (struct aarch64_register): New struct.
5850 (struct aarch64_operand): New struct.
5851 (x0): New static global.
5860 (aarch64_register): New helper function.
5861 (register_operand): Likewise.
5862 (immediate_operand): Likewise.
5863 (struct aarch64_memory_operand): New struct.
5864 (offset_memory_operand): New helper function.
5865 (preindex_memory_operand): Likewise.
5866 (enum aarch64_system_control_registers): New enum.
5867 (ENCODE): New macro.
5868 (emit_insn): New helper function.
5869 (emit_b): New function.
5870 (emit_bcond): Likewise.
5871 (emit_cb): Likewise.
5872 (emit_tb): Likewise.
5873 (emit_blr): Likewise.
5874 (emit_stp): Likewise.
5875 (emit_ldp_q_offset): Likewise.
5876 (emit_stp_q_offset): Likewise.
5877 (emit_load_store): Likewise.
5878 (emit_ldr): Likewise.
5879 (emit_ldrsw): Likewise.
5880 (emit_str): Likewise.
5881 (emit_ldaxr): Likewise.
5882 (emit_stxr): Likewise.
5883 (emit_stlr): Likewise.
5884 (emit_data_processing_reg): Likewise.
5885 (emit_data_processing): Likewise.
5886 (emit_add): Likewise.
5887 (emit_sub): Likewise.
5888 (emit_mov): Likewise.
5889 (emit_movk): Likewise.
5890 (emit_mov_addr): Likewise.
5891 (emit_mrs): Likewise.
5892 (emit_msr): Likewise.
5893 (emit_sevl): Likewise.
5894 (emit_wfe): Likewise.
5895 (append_insns): Likewise.
5896 (can_encode_int32_in): New helper function.
5897 (aarch64_relocate_instruction): New function.
5898 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5899 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5900 (struct linux_target_ops): Install aarch64_get_thread_area,
5901 aarch64_install_fast_tracepoint_jump_pad and
5902 aarch64_get_min_fast_tracepoint_insn_len.
5904 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5906 * Makefile.in (aarch64-insn.o): New rule.
5907 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5909 2015-09-21 Yao Qi <yao.qi@linaro.org>
5911 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5913 2015-09-21 Yao Qi <yao.qi@linaro.org>
5915 * tracepoint.c (max_jump_pad_size): Remove.
5917 2015-09-18 Yao Qi <yao.qi@linaro.org>
5919 * linux-aarch64-low.c: Don't include sys/uio.h.
5920 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5922 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5924 * tracepoint.c (eval_result_type): Change prototype.
5925 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5927 2015-09-15 Pedro Alves <palves@redhat.com>
5929 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5930 Check whether to report exec events instead of checking whether
5931 multiprocess is enabled.
5933 2015-09-15 Pedro Alves <palves@redhat.com>
5936 * remote-utils.c (prepare_resume_reply): Merge
5937 TARGET_WAITKIND_VFORK_DONE switch case with the
5938 TARGET_WAITKIND_FORKED case.
5940 2015-09-15 Yao Qi <yao.qi@linaro.org>
5942 * server.c (handle_query): Check string comparison using
5943 "else if" instead of "if".
5945 2015-09-15 Yao Qi <yao.qi@linaro.org>
5947 * server.c (vCont_supported): New global variable.
5948 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5949 matches. Append ";vContSupported+" to own_buf.
5950 (handle_v_requests): Append ";s;S" to own_buf if target supports
5951 hardware single step or vCont_supported is false.
5952 (capture_main): Set vCont_supported to zero.
5954 2015-09-15 Yao Qi <yao.qi@linaro.org>
5956 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5958 (linux_supports_hardware_single_step): ... New function.
5959 (linux_target_ops): Update.
5960 * lynx-low.c (lynx_target_ops): Set field
5961 supports_hardware_single_step to target_can_do_hardware_single_step.
5962 * nto-low.c (nto_target_ops): Likewise.
5963 * spu-low.c (spu_target_ops): Likewise.
5964 * win32-low.c (win32_target_ops): Likewise.
5965 * target.c (target_can_do_hardware_single_step): New function.
5966 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5967 Remove. <supports_hardware_single_step>: New field.
5968 (target_supports_conditional_breakpoints): Remove.
5969 (target_supports_hardware_single_step): New macro.
5970 (target_can_do_hardware_single_step): Declare.
5971 * server.c (handle_query): Use target_supports_hardware_single_step
5972 instead of target_supports_conditional_breakpoints.
5974 2015-09-15 Yao Qi <yao.qi@linaro.org>
5976 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5978 (struct linux_target_ops the_low_target): Install
5979 aarch64_linux_siginfo_fixup.
5981 2015-09-11 Don Breazeal <donb@codesourcery.com>
5982 Luis Machado <lgustavo@codesourcery.com>
5984 * linux-low.c (linux_mourn): Static declaration.
5985 (linux_arch_setup): Move in front of
5986 handle_extended_wait.
5987 (linux_arch_setup_thread): New function.
5988 (handle_extended_wait): Handle exec events. Call
5989 linux_arch_setup_thread. Make event_lwp argument a
5990 pointer-to-a-pointer.
5991 (check_zombie_leaders): Do not check stopped threads.
5992 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5993 (linux_low_filter_event): Add lwp and thread for exec'ing
5994 non-leader thread if leader thread has been deleted.
5995 Refactor code into linux_arch_setup_thread and call it.
5996 Pass child lwp pointer by reference to handle_extended_wait.
5997 (linux_wait_for_event_filtered): Update comment.
5998 (linux_wait_1): Prevent clobbering exec event status.
5999 (linux_supports_exec_events): New function.
6000 (linux_target_ops) <supports_exec_events>: Initialize new member.
6001 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6003 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6004 * server.c (report_exec_events): New global variable.
6005 (handle_query): Handle qSupported query for exec-events feature.
6006 (captured_main): Initialize report_exec_events.
6007 * server.h (report_exec_events): Declare new global variable.
6008 * target.h (struct target_ops) <supports_exec_events>: New
6010 (target_supports_exec_events): New macro.
6011 * win32-low.c (win32_target_ops) <supports_exec_events>:
6012 Initialize new member.
6014 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6016 * linux-low.c (linux_low_enable_btrace): Remove.
6017 (linux_target_ops): Replace linux_low_enable_btrace with
6018 linux_enable_btrace.
6020 2015-09-03 Yao Qi <yao.qi@linaro.org>
6022 * linux-aarch64-low.c (aarch64_insert_point): Call
6023 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6026 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6028 * linux-low.c (check_stopped_by_breakpoint): Use
6029 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6031 2015-08-27 Pedro Alves <palves@redhat.com>
6033 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6035 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6037 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6038 the XNEW-family equivalent.
6039 (compile_bytecodes): Likewise.
6040 * dll.c (loaded_dll): Likewise.
6041 * event-loop.c (append_callback_event): Likewise.
6042 (create_file_handler): Likewise.
6043 (create_file_event): Likewise.
6044 * hostio.c (handle_open): Likewise.
6045 * inferiors.c (add_thread): Likewise.
6046 (add_process): Likewise.
6047 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6048 * linux-arm-low.c (arm_new_process): Likewise.
6049 (arm_new_thread): Likewise.
6050 * linux-low.c (add_to_pid_list): Likewise.
6051 (linux_add_process): Likewise.
6052 (handle_extended_wait): Likewise.
6053 (add_lwp): Likewise.
6054 (enqueue_one_deferred_signal): Likewise.
6055 (enqueue_pending_signal): Likewise.
6056 (linux_resume_one_lwp_throw): Likewise.
6057 (linux_resume_one_thread): Likewise.
6058 (linux_read_memory): Likewise.
6059 (linux_write_memory): Likewise.
6060 * linux-mips-low.c (mips_linux_new_process): Likewise.
6061 (mips_linux_new_thread): Likewise.
6062 (mips_add_watchpoint): Likewise.
6063 * linux-x86-low.c (initialize_low_arch): Likewise.
6064 * lynx-low.c (lynx_add_process): Likewise.
6065 * mem-break.c (set_raw_breakpoint_at): Likewise.
6066 (set_breakpoint): Likewise.
6067 (add_condition_to_breakpoint): Likewise.
6068 (add_commands_to_breakpoint): Likewise.
6069 (clone_agent_expr): Likewise.
6070 (clone_one_breakpoint): Likewise.
6071 * regcache.c (new_register_cache): Likewise.
6072 * remote-utils.c (look_up_one_symbol): Likewise.
6073 * server.c (queue_stop_reply): Likewise.
6074 (start_inferior): Likewise.
6075 (queue_stop_reply_callback): Likewise.
6076 (handle_target_event): Likewise.
6077 * spu-low.c (fetch_ppc_memory): Likewise.
6078 (store_ppc_memory): Likewise.
6079 * target.c (set_target_ops): Likewise.
6080 * thread-db.c (thread_db_load_search): Likewise.
6081 (try_thread_db_load_1): Likewise.
6082 * tracepoint.c (add_tracepoint): Likewise.
6083 (add_tracepoint_action): Likewise.
6084 (create_trace_state_variable): Likewise.
6085 (cmd_qtdpsrc): Likewise.
6086 (cmd_qtro): Likewise.
6087 (add_while_stepping_state): Likewise.
6088 * win32-low.c (child_add_thread): Likewise.
6089 (get_image_name): Likewise.
6091 2015-08-25 Yao Qi <yao.qi@linaro.org>
6093 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6095 2015-08-25 Yao Qi <yao.qi@linaro.org>
6097 * Makefile.in (aarch64-linux.o): New rule.
6098 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6100 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6101 (aarch64_init_debug_reg_state): Make it extern.
6102 (aarch64_linux_prepare_to_resume): Remove.
6104 2015-08-25 Yao Qi <yao.qi@linaro.org>
6106 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6107 lwp_arch_private_info and ptid_of_lwp.
6109 2015-08-25 Yao Qi <yao.qi@linaro.org>
6111 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6112 Find proc_info by find_process_pid. All callers updated.
6114 2015-08-25 Yao Qi <yao.qi@linaro.org>
6116 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6118 (debug_reg_change_callback): Remove.
6119 (aarch64_notify_debug_reg_change): Remove.
6121 2015-08-25 Yao Qi <yao.qi@linaro.org>
6123 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6124 Call current_lwp_ptid.
6126 2015-08-25 Yao Qi <yao.qi@linaro.org>
6128 * linux-aarch64-low.c (debug_reg_change_callback): Use
6131 2015-08-25 Yao Qi <yao.qi@linaro.org>
6133 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6135 2015-08-25 Yao Qi <yao.qi@linaro.org>
6137 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6139 2015-08-25 Yao Qi <yao.qi@linaro.org>
6141 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6144 2015-08-25 Yao Qi <yao.qi@linaro.org>
6146 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6148 (debug_reg_change_callback): Remove argument entry and add argument
6149 lwp. Remove local variable thread. Don't print thread id in the
6150 debugging output. Don't check whether pid of thread equals to pid.
6151 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6152 iterate_over_lwps instead find_inferior.
6154 2015-08-24 Pedro Alves <palves@redhat.com>
6156 * inferiors.c (get_first_process): New function.
6157 * inferiors.h (get_first_process): New declaration.
6158 * remote-utils.c (read_ptid): Default to the first process in the
6159 list, instead of to the current thread's process.
6161 2015-08-24 Pedro Alves <palves@redhat.com>
6163 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6164 * event-loop.c: Likewise.
6165 * remote-utils.c: Likewise.
6166 * tracepoint.c: Likewise.
6168 2015-08-24 Pedro Alves <palves@redhat.com>
6170 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6173 2015-08-21 Pedro Alves <palves@redhat.com>
6175 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6176 instead of literal 1.
6178 2015-08-21 Pedro Alves <palves@redhat.com>
6180 * tdesc.c (default_description): Explicitly zero-initialize.
6182 2015-08-21 Pedro Alves <palves@redhat.com>
6185 * inferiors.c (remove_thread): Discard any pending stop reply for
6187 * server.c (remove_all_on_match_pid): Rename to ...
6188 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6190 (discard_queued_stop_replies): Change parameter to a ptid. Now
6192 (handle_v_kill, kill_inferior_callback, captured_main)
6193 (process_serial_event): Adjust.
6194 * server.h (discard_queued_stop_replies): Declare.
6196 2015-08-21 Pedro Alves <palves@redhat.com>
6198 * linux-low.c (wait_for_sigstop): Always switch to no thread
6199 selected if the previously current thread dies.
6200 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6201 process instead of the current thread's.
6202 * remote-utils.c (input_interrupt): Don't check if there's no
6204 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6205 current thread to the general thread fails, error out.
6206 (handle_qxfer_auxv, handle_qxfer_libraries)
6207 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6208 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6209 (handle_query): Check if there's a thread selected instead of
6210 checking whether there's any thread in the thread list.
6211 (handle_qxfer_threads, handle_qxfer_btrace)
6212 (handle_qxfer_btrace_conf): Don't error out early if there's no
6213 thread in the thread list.
6214 (handle_v_cont, myresume): Don't set the current thread to the
6216 (process_serial_event) <Hg handling>: Also set thread_id if the
6217 previous general thread is still alive.
6218 (process_serial_event) <g/G handling>: If setting the current
6219 thread to the general thread fails, error out.
6220 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6221 thread's lwp instead of the current thread's.
6222 * target.c (set_desired_thread): If the desired thread was not
6223 found, leave the current thread pointing to NULL. Return an int
6224 (boolean) indicating success.
6225 * target.h (set_desired_thread): Change return type to int.
6227 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6229 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6230 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6232 (ps_get_thread_area): New function.
6234 2015-08-19 Gary Benson <gbenson@redhat.com>
6236 * hostio.c (handle_pread): Do not attempt to read more data
6237 than hostio_reply_with_data can fit in a packet.
6239 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6241 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6243 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6245 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6247 2015-08-06 Pedro Alves <palves@redhat.com>
6249 * tracepoint.c (expr_eval_result): Now an int.
6251 2015-08-06 Pedro Alves <palves@redhat.com>
6253 * gdbthread.h (struct regcache): Forward declare.
6254 (struct thread_info) <regcache_data>: Now a struct regcache
6256 * inferiors.c (inferior_regcache_data)
6257 (set_inferior_regcache_data): Now work with struct regcache
6259 * inferiors.h (struct regcache): Forward declare.
6260 (inferior_regcache_data, set_inferior_regcache_data): Now work
6261 with struct regcache pointers.
6262 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6263 (free_register_cache_thread): Remove struct regcache pointer
6266 2015-08-06 Pedro Alves <palves@redhat.com>
6268 * server.c (captured_main): On error, print the exception message
6269 to stderr, and if run_once is set, throw a quit.
6271 2015-08-06 Pedro Alves <palves@redhat.com>
6273 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6276 2015-08-06 Pedro Alves <palves@redhat.com>
6278 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6279 reading beyond the passed in buffer length.
6281 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6283 * tracepoint.c (symbol_list) <required>: Remove.
6285 2015-08-06 Pedro Alves <palves@redhat.com>
6287 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6288 count if stopping and suspending threads.
6289 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6290 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6291 (linux_detach): Complete an ongoing step-over.
6292 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6294 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6295 (linux_wait_1): If passing a signal to the inferior after
6296 finishing a step-over, unsuspend and re-resume all lwps. If we
6297 see a single-step event but the thread should be continuing, don't
6298 pass the trap to gdb.
6299 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6300 internal_error instead of gdb_assert.
6301 (enqueue_pending_signal): New function.
6302 (check_ptrace_stopped_lwp_gone): Add debug output.
6303 (start_step_over): Use internal_error instead of gdb_assert.
6304 (complete_ongoing_step_over): New function.
6305 (linux_resume_one_thread): Don't resume a suspended thread.
6306 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6309 2015-08-06 Pedro Alves <palves@redhat.com>
6311 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6312 (linux_thread_alive): Use lwp_is_marked_dead.
6313 (extended_event_reported): Delete.
6314 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6315 instead of extended_event_reported.
6316 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6318 (lwp_is_marked_dead): New function.
6319 (lwp_running): Use lwp_is_marked_dead.
6320 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6323 2015-08-06 Pedro Alves <palves@redhat.com>
6325 * linux-low.c (linux_wait_1): Move fork event output out of the
6326 !report_to_gdb check. Pass event_child->waitstatus to
6327 target_waitstatus_to_string instead of ourstatus.
6329 2015-08-04 Yao Qi <yao.qi@linaro.org>
6331 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6332 if current_thread is 32 bit.
6334 2015-08-04 Yao Qi <yao.qi@linaro.org>
6336 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6337 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6338 * server.c (extended_protocol): Remove "static".
6339 * server.h (extended_protocol): Declare it.
6341 2015-08-04 Yao Qi <yao.qi@linaro.org>
6343 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6344 both aarch64 and aarch32.
6345 (aarch64_set_pc): Likewise.
6347 2015-08-04 Yao Qi <yao.qi@linaro.org>
6349 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6350 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6351 arm-with-neon.xml to srv_xmlfiles.
6352 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6353 (is_64bit_tdesc): New function.
6354 (aarch64_linux_read_description): New function.
6355 (aarch64_arch_setup): Call aarch64_linux_read_description.
6356 (regs_info): Rename to regs_info_aarch64.
6357 (aarch64_regs_info): Return right regs_info.
6358 (initialize_low_arch): Call initialize_low_arch_aarch32.
6360 2015-08-04 Yao Qi <yao.qi@linaro.org>
6362 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6363 * linux-aarch32-low.c: New file.
6364 * linux-aarch32-low.h: New file.
6365 * linux-arm-low.c (arm_fill_gregset): Move it to
6366 linux-aarch32-low.c.
6367 (arm_store_gregset): Likewise.
6368 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6369 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6370 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6371 (regs_info): Rename to regs_info_arm.
6372 (arm_regs_info): Return regs_info_aarch32 if
6373 have_ptrace_getregset is 1 and target description is
6374 arm_with_neon or arm_with_vfpv3.
6375 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6376 Call initialize_low_arch_aarch32 instead.
6378 2015-08-04 Yao Qi <yao.qi@linaro.org>
6380 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6381 * linux-low.c: ... here.
6382 * linux-low.h (have_ptrace_getregset): Declare it.
6384 2015-08-04 Pedro Alves <palves@redhat.com>
6386 * thread-db.c (struct thread_db): Use new typedefs.
6387 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6389 (disable_thread_event_reporting): Cast result of dlsym to
6390 destination function pointer type.
6391 (thread_db_mourn): Use td_ta_delete_ftype.
6393 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6395 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6397 (CDX_BREAKPOINT): Define for R2.
6398 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6399 (the_low_target): Add comments.
6401 2015-07-30 Yao Qi <yao.qi@linaro.org>
6403 * linux-arm-low.c (arm_hwcap): Remove it.
6404 (arm_read_description): New local variable arm_hwcap. Don't
6405 set arm_hwcap to zero.
6407 2015-07-30 Yao Qi <yao.qi@linaro.org>
6409 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6410 Use regcache->tdesc instead.
6411 (arm_store_wmmxregset): Likewise.
6412 (arm_fill_vfpregset): Likewise.
6413 (arm_store_vfpregset): Likewise.
6415 2015-07-30 Yao Qi <yao.qi@linaro.org>
6417 * linux-arm-low.c: Include arch/arm.h.
6418 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6419 (arm_store_gregset): Likewise.
6421 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6423 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6424 ptrace's 4th parameter.
6426 2015-07-27 Yao Qi <yao.qi@linaro.org>
6428 * configure.srv (case aarch64*-*-linux*): Don't set
6431 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6433 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6435 * linux-arm-low.c: Likewise.
6436 * linux-cris-low.c: Likewise.
6437 * linux-crisv32-low.c: Likewise.
6438 * linux-low.c: Likewise.
6439 * linux-m68k-low.c: Likewise.
6440 * linux-mips-low.c: Likewise.
6441 * linux-nios2-low.c: Likewise.
6442 * linux-s390-low.c: Likewise.
6443 * linux-sparc-low.c: Likewise.
6444 * linux-tic6x-low.c: Likewise.
6445 * linux-tile-low.c: Likewise.
6446 * linux-x86-low.c: Likewise.
6448 2015-07-24 Pedro Alves <palves@redhat.com>
6450 * config.in: Regenerate.
6451 * configure: Regenerate.
6453 2015-07-24 Pedro Alves <palves@redhat.com>
6455 * acinclude.m4: Include ../ptrace.m4.
6456 * configure.ac: Call GDB_AC_PTRACE.
6457 * config.in, configure: Regenerate.
6459 2015-07-24 Yao Qi <yao.qi@linaro.org>
6461 * linux-low.c (linux_create_inferior): Remove setting to
6462 proc->priv->new_inferior.
6463 (linux_attach): Likewise.
6464 (linux_low_filter_event): Likewise.
6465 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6467 2015-07-24 Yao Qi <yao.qi@linaro.org>
6469 * linux-low.c (linux_arch_setup): New function.
6470 (linux_low_filter_event): If proc->tdesc is NULL and
6471 proc->attached is true, call the_low_target.arch_setup.
6472 Otherwise, keep status pending, and return.
6473 (linux_resume_one_lwp_throw): Don't call get_pc if
6474 thread->while_stepping isn't NULL. Don't call
6475 get_thread_regcache if proc->tdesc is NULL.
6476 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6477 (linux_target_ops): Install arch_setup.
6478 * server.c (start_inferior): Call the_target->arch_setup.
6479 * target.h (struct target_ops) <arch_setup>: New field.
6480 (target_arch_setup): New marco.
6481 * lynx-low.c (lynx_target_ops): Update.
6482 * nto-low.c (nto_target_ops): Update.
6483 * spu-low.c (spu_target_ops): Update.
6484 * win32-low.c (win32_target_ops): Update.
6486 2015-07-24 Yao Qi <yao.qi@linaro.org>
6488 * linux-low.c (linux_add_process): Don't set
6489 proc->priv->new_inferior.
6490 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6491 (linux_attach): Likewise.
6493 2015-07-24 Yao Qi <yao.qi@linaro.org>
6495 * server.c (start_inferior): Code refactor.
6497 2015-07-24 Yao Qi <yao.qi@linaro.org>
6499 * server.c (process_serial_event): Set general_thread.
6501 2015-07-21 Yao Qi <yao.qi@linaro.org>
6503 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6504 aarch64_linux_get_debug_reg_capacity.
6506 2015-07-17 Yao Qi <yao.qi@linaro.org>
6508 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6509 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6510 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6511 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6512 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6513 (AARCH64_HWP_ALIGNMENT): Likewise.
6514 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6515 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6516 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6517 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6518 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6519 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6520 (struct aarch64_debug_reg_state): Likewise.
6521 (struct arch_lwp_info): Likewise.
6522 (aarch64_align_watchpoint): Likewise.
6523 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6524 (aarch64_watchpoint_length): Likewise.
6525 (aarch64_point_encode_ctrl_reg): Likewise
6526 (aarch64_point_is_aligned): Likewise.
6527 (aarch64_align_watchpoint): Likewise.
6528 (aarch64_linux_set_debug_regs):
6529 (aarch64_dr_state_insert_one_point): Likewise.
6530 (aarch64_dr_state_remove_one_point): Likewise.
6531 (aarch64_handle_breakpoint): Likewise.
6532 (aarch64_handle_aligned_watchpoint): Likewise.
6533 (aarch64_handle_unaligned_watchpoint): Likewise.
6534 (aarch64_handle_watchpoint): Likewise.
6536 2015-07-17 Yao Qi <yao.qi@linaro.org>
6538 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6539 and don't aarch64_get_debug_reg_state. All callers update.
6540 (aarch64_handle_aligned_watchpoint): Likewise.
6541 (aarch64_handle_unaligned_watchpoint): Likewise.
6542 (aarch64_handle_watchpoint): Likewise.
6543 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6544 (aarch64_remove_point): Likewise.
6546 2015-07-17 Yao Qi <yao.qi@linaro.org>
6548 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6550 (aarch64_handle_unaligned_watchpoint): Likewise.
6552 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6554 Revert the previous 3 commits:
6555 Move gdb_regex* to common/
6556 Move linux_find_memory_regions_full & co.
6557 gdbserver build-id attribute generator
6559 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6560 Jan Kratochvil <jan.kratochvil@redhat.com>
6562 gdbserver build-id attribute generator.
6563 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6564 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6565 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6567 (get_dynamic): Use find_pdhr to traverse program headers.
6568 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6569 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6570 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6571 (get_hex_build_id): New.
6572 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6573 to reply XML document.
6575 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6576 Jan Kratochvil <jan.kratochvil@redhat.com>
6578 * target.c: Include target/target-utils.h and fcntl.h.
6579 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6580 (target_fileio_read_stralloc): New functions.
6582 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6584 * Makefile.in (OBS): Add gdb_regex.o.
6586 * config.in: Rebuilt.
6587 * configure: Rebuilt.
6589 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6590 Jan Kratochvil <jan.kratochvil@redhat.com>
6592 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6593 * Makefile.in (OBS): Add target-utils.o.
6594 (linux-maps.o, target-utils.o): New.
6595 * configure.srv (srv_linux_obj): Add linux-maps.o.
6597 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6599 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6601 (the_low_target): Install it.
6603 2015-07-14 Pedro Alves <palves@redhat.com>
6605 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6606 Instead, ignore ECHILD, and throw an error for other errnos.
6608 2015-07-10 Pedro Alves <palves@redhat.com>
6610 * event-loop.c (struct callback_event) <data>: Change type to
6611 gdb_client_data instance instead of gdb_client_data pointer.
6612 (append_callback_event): Adjust.
6614 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6616 * linux-aarch64-low.c: Add comments for each linux_target_ops
6617 method. Remove comments already covered in target_ops and
6618 linux_target_ops definitions.
6619 (the_low_target): Add comments for each unimplemented method.
6621 2015-07-09 Yao Qi <yao.qi@linaro.org>
6623 * linux-aarch64-low.c (aarch64_regmap): Remove.
6624 (aarch64_usrregs_info): Remove.
6625 (regs_info): Set field usrregs to NULL.
6627 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6629 * linux-low.c: Include "rsp-low.h"
6630 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6631 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6632 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6633 (handle_btrace_enable_pt): New.
6634 (handle_btrace_general_set): Support "pt".
6635 (handle_btrace_conf_general_set): Support "pt:size".
6637 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6639 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6642 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6644 * linux-aarch64-low.c: Remove comment about endianness.
6645 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6646 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6649 2015-06-24 Gary Benson <gbenson@redhat.com>
6651 * linux-i386-ipa.c (stdint.h): Do not include.
6652 * lynx-i386-low.c (stdint.h): Likewise.
6653 * lynx-ppc-low.c (stdint.h): Likewise.
6654 * mem-break.c (stdint.h): Likewise.
6655 * thread-db.c (stdint.h): Likewise.
6656 * tracepoint.c (stdint.h): Likewise.
6657 * win32-low.c (stdint.h): Likewise.
6659 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6661 * server.c (write_qxfer_response): Update call to
6662 remote_escape_output.
6664 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6665 Jan Kratochvil <jan.kratochvil@redhat.com>
6667 Merge multiple hex conversions.
6668 * gdbreplay.c (tohex): Rename to 'fromhex'.
6669 (logchar): Use fromhex.
6671 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6673 * server.c (handle_qxfer_libraries): Set `version' attribute for
6676 2015-06-10 Gary Benson <gbenson@redhat.com>
6678 * target.h (struct target_ops) <multifs_open>: New field.
6679 <multifs_unlink>: Likewise.
6680 <multifs_readlink>: Likewise.
6681 * linux-low.c (nat/linux-namespaces.h): New include.
6682 (linux_target_ops): Initialize the_target->multifs_open,
6683 the_target->multifs_unlink and the_target->multifs_readlink.
6684 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6685 * hostio.c (hostio_fs_pid): New static variable.
6686 (hostio_handle_new_gdb_connection): New function.
6687 (handle_setfs): Likewise.
6688 (handle_open): Use the_target->multifs_open as appropriate.
6689 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6690 (handle_readlink): Use the_target->multifs_readlink as
6692 (handle_vFile): Handle vFile:setfs packets.
6693 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6694 after target_handle_new_gdb_connection.
6696 2015-06-10 Gary Benson <gbenson@redhat.com>
6698 * configure.ac (AC_CHECK_FUNCS): Add setns.
6699 * config.in: Regenerate.
6700 * configure: Likewise.
6701 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6702 (linux-namespaces.o): New rule.
6703 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6705 2015-06-09 Gary Benson <gbenson@redhat.com>
6707 * hostio.c (handle_open): Process mode argument with
6708 fileio_to_host_mode.
6710 2015-06-01 Yao Qi <yao.qi@linaro.org>
6712 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6713 * linux-x86-low.c: Likewise.
6715 2015-05-28 Don Breazeal <donb@codesourcery.com>
6717 * linux-low.c (handle_extended_wait): Initialize
6718 thread_info.last_resume_kind for new fork children.
6720 2015-05-15 Pedro Alves <palves@redhat.com>
6722 * target.h (target_handle_new_gdb_connection): Rewrite using if
6723 wrapped in do/while.
6725 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6727 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6728 * configure, config.in: Regenerate.
6729 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6732 2015-05-12 Don Breazeal <donb@codesourcery.com>
6734 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6735 PTRACE_EVENT_VFORK_DONE.
6736 (linux_low_ptrace_options, extended_event_reported): Add vfork
6738 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6739 and "vforkdone" for RSP 'T' Stop Reply Packet.
6740 * server.h (report_vfork_events): Declare
6743 2015-05-12 Don Breazeal <donb@codesourcery.com>
6745 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6746 (the_low_target) <new_fork>: Initialize new member.
6747 * linux-arm-low.c (arm_new_fork): New function.
6748 (the_low_target) <new_fork>: Initialize new member.
6749 * linux-low.c (handle_extended_wait): Call new target function
6751 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6752 * linux-mips-low.c (mips_add_watchpoint): New function
6753 extracted from mips_insert_point.
6754 (the_low_target) <new_fork>: Initialize new member.
6755 (mips_linux_new_fork): New function.
6756 (mips_insert_point): Call mips_add_watchpoint.
6757 * linux-x86-low.c (x86_linux_new_fork): New function.
6758 (the_low_target) <new_fork>: Initialize new member.
6760 2015-05-12 Don Breazeal <donb@codesourcery.com>
6762 * linux-low.c (handle_extended_wait): Implement return value,
6763 rename argument 'event_child' to 'event_lwp', handle
6764 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6765 (linux_low_ptrace_options): New function.
6766 (linux_low_filter_event): Call linux_low_ptrace_options,
6767 use different argument fo linux_enable_event_reporting,
6768 use return value from handle_extended_wait.
6769 (extended_event_reported): New function.
6770 (linux_wait_1): Call extended_event_reported and set
6771 status to report fork events.
6772 (linux_write_memory): Add pid to debug message.
6773 (reset_lwp_ptrace_options_callback): New function.
6774 (linux_handle_new_gdb_connection): New function.
6775 (linux_target_ops): Initialize new structure member.
6776 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6777 * lynx-low.c: Initialize new structure member.
6778 * remote-utils.c (prepare_resume_reply): Implement stop reason
6779 "fork" for "T" stop message.
6780 * server.c (handle_query): Call handle_new_gdb_connection.
6781 * server.h (report_fork_events): Declare global flag.
6782 * target.h (struct target_ops) <handle_new_gdb_connection>:
6784 (target_handle_new_gdb_connection): New macro.
6785 * win32-low.c: Initialize new structure member.
6787 2015-05-12 Don Breazeal <donb@codesourcery.com>
6789 * mem-break.c (APPEND_TO_LIST): Define macro.
6790 (clone_agent_expr): New function.
6791 (clone_one_breakpoint): New function.
6792 (clone_all_breakpoints): New function.
6793 * mem-break.h: Declare new functions.
6795 2015-05-12 Don Breazeal <donb@codesourcery.com>
6797 * linux-low.c (linux_supports_fork_events): New function.
6798 (linux_supports_vfork_events): New function.
6799 (linux_target_ops): Initialize new structure members.
6800 (initialize_low): Call linux_check_ptrace_features.
6801 * lynx-low.c (lynx_target_ops): Initialize new structure
6803 * server.c (report_fork_events, report_vfork_events):
6805 (handle_query): Add new features to qSupported packet and
6807 (captured_main): Initialize new global variables.
6808 * target.h (struct target_ops) <supports_fork_events>:
6810 <supports_vfork_events>: New member.
6811 (target_supports_fork_events): New macro.
6812 (target_supports_vfork_events): New macro.
6813 * win32-low.c (win32_target_ops): Initialize new structure
6816 2015-05-12 Gary Benson <gbenson@redhat.com>
6818 * server.c (handle_qxfer_exec_file): Use current process
6821 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6823 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6824 Remove HAVE_PTRACE_GETREGS conditionals.
6825 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6826 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6828 2015-05-08 Yao Qi <yao.qi@linaro.org>
6830 * linux-low.c (linux_supports_conditional_breakpoints): New
6832 (linux_target_ops): Install new target method.
6833 * lynx-low.c (lynx_target_ops): Install NULL hook for
6834 supports_conditional_breakpoints.
6835 * nto-low.c (nto_target_ops): Likewise.
6836 * spu-low.c (spu_target_ops): Likewise.
6837 * win32-low.c (win32_target_ops): Likewise.
6838 * server.c (handle_query): Check
6839 target_supports_conditional_breakpoints.
6840 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6842 (target_supports_conditional_breakpoints): New macro.
6844 2015-05-06 Pedro Alves <palves@redhat.com>
6847 * server.c (start_inferior): If the process exits, mourn it.
6849 2015-04-21 Gary Benson <gbenson@redhat.com>
6851 * hostio.c (fileio_open_flags_to_host): Factored out to
6852 fileio_to_host_openflags in common/fileio.c. Single use
6855 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6857 * linux-xtensa-low.c (xtensa_fill_gregset)
6858 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6861 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6863 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6864 (regs_info): Replace usrregs pointer with NULL.
6866 2015-04-17 Gary Benson <gbenson@redhat.com>
6868 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6869 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6870 * server.c (handle_qxfer_exec_file): New function.
6871 (qxfer_packets): Add exec-file entry.
6872 (handle_query): Report qXfer:exec-file:read as supported packet.
6874 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6876 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6878 2015-04-09 Gary Benson <gbenson@redhat.com>
6880 * hostio-errno.c (errno_to_fileio_error): Remove function.
6881 Update caller to use remote_fileio_to_fio_error.
6883 2015-04-09 Yao Qi <yao.qi@linaro.org>
6885 * linux-low.c (linux_insert_point): Call
6886 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6887 (linux_remove_point): Call remove_memory_breakpoint if type is
6889 * linux-x86-low.c (x86_insert_point): Don't call
6890 insert_memory_breakpoint.
6891 (x86_remove_point): Don't call remove_memory_breakpoint.
6893 2015-04-01 Pedro Alves <palves@redhat.com>
6894 Cleber Rosa <crosa@redhat.com>
6896 * server.c (gdbserver_usage): Reorganize and extend the usage
6899 2015-03-24 Pedro Alves <palves@redhat.com>
6901 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6902 output. Also dump TRAP_TRACE.
6903 (linux_low_filter_event): In debug output, distinguish a
6904 resume_stop SIGSTOP from a delayed SIGSTOP.
6906 2015-03-24 Gary Benson <gbenson@redhat.com>
6908 * linux-x86-low.c (x86_linux_new_thread): Moved to
6910 (x86_linux_prepare_to_resume): Likewise.
6912 2015-03-24 Gary Benson <gbenson@redhat.com>
6914 * Makefile.in (x86-linux-dregs.o): New rule.
6915 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6916 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6917 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6918 (x86_linux_dr_get): Likewise.
6919 (x86_linux_dr_set): Likewise.
6920 (update_debug_registers_callback): Likewise.
6921 (x86_linux_dr_set_addr): Likewise.
6922 (x86_linux_dr_get_addr): Likewise.
6923 (x86_linux_dr_set_control): Likewise.
6924 (x86_linux_dr_get_control): Likewise.
6925 (x86_linux_dr_get_status): Likewise.
6926 (x86_linux_update_debug_registers): Likewise.
6928 2015-03-24 Gary Benson <gbenson@redhat.com>
6930 * linux-x86-low.c (x86_linux_update_debug_registers):
6931 New function, factored out from...
6932 (x86_linux_prepare_to_resume): ...this.
6934 2015-03-24 Gary Benson <gbenson@redhat.com>
6936 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6937 (x86_linux_dr_set): Likewise.
6938 (update_debug_registers_callback): Likewise.
6939 (x86_linux_dr_set_addr): Likewise.
6940 (x86_linux_dr_get_addr): Likewise.
6941 (x86_linux_dr_set_control): Likewise.
6942 (x86_linux_dr_get_control): Likewise.
6943 (x86_linux_dr_get_status): Likewise.
6944 (x86_linux_prepare_to_resume): Likewise.
6946 2015-03-24 Gary Benson <gbenson@redhat.com>
6948 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6949 Use perror_with_name. Pass string through gettext.
6950 (x86_linux_dr_set): Likewise.
6952 2015-03-24 Gary Benson <gbenson@redhat.com>
6954 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6955 (x86_linux_dr_set_addr): ...this.
6956 (x86_dr_low_get_addr): Rename to...
6957 (x86_linux_dr_get_addr): ...this.
6958 (x86_dr_low_set_control): Rename to...
6959 (x86_linux_dr_set_control): ...this.
6960 (x86_dr_low_get_control): Rename to...
6961 (x86_linux_dr_get_control): ...this.
6962 (x86_dr_low_get_status): Rename to...
6963 (x86_linux_dr_get_status): ...this.
6964 (x86_dr_low): Update with new function names.
6966 2015-03-24 Gary Benson <gbenson@redhat.com>
6968 * Makefile.in (x86-linux.o): New rule.
6969 * configure.srv: Add x86-linux.o to relevant targets.
6970 * linux-low.c (lwp_set_arch_private_info): New function.
6971 (lwp_arch_private_info): Likewise.
6972 * linux-x86-low.c: Include nat/x86-linux.h.
6973 (arch_lwp_info): Removed structure.
6974 (update_debug_registers_callback):
6975 Use lwp_set_debug_registers_changed.
6976 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6977 and lwp_set_debug_registers_changed.
6978 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6980 2015-03-24 Gary Benson <gbenson@redhat.com>
6982 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6983 * linux-arm-low.c (arm_new_thread): Likewise.
6984 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6985 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6986 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6987 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6989 2015-03-24 Gary Benson <gbenson@redhat.com>
6991 * linux-low.c (ptid_of_lwp): New function.
6992 (lwp_is_stopped): Likewise.
6993 (lwp_stop_reason): Likewise.
6994 * linux-x86-low.c (update_debug_registers_callback):
6996 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6999 2015-03-24 Gary Benson <gbenson@redhat.com>
7001 * linux-low.h (linux_stop_lwp): Remove declaration.
7003 2015-03-24 Gary Benson <gbenson@redhat.com>
7005 * linux-low.h: Include nat/linux-nat.h.
7006 * linux-low.c (iterate_over_lwps_args): New structure.
7007 (iterate_over_lwps_filter): New function.
7008 (iterate_over_lwps): Likewise.
7009 * linux-x86-low.c (update_debug_registers_callback):
7010 Update signature to what iterate_over_lwps expects.
7011 Remove PID check that iterate_over_lwps now performs.
7012 (x86_dr_low_set_addr): Use iterate_over_lwps.
7013 (x86_dr_low_set_control): Likewise.
7015 2015-03-24 Gary Benson <gbenson@redhat.com>
7017 * linux-x86-low.c (x86_debug_reg_state): New function.
7018 (x86_linux_prepare_to_resume): Use the above.
7020 2015-03-24 Gary Benson <gbenson@redhat.com>
7022 * linux-low.c (current_lwp_ptid): New function.
7023 * linux-x86-low.c: Include nat/linux-nat.h.
7024 (x86_dr_low_get_addr): Use current_lwp_ptid.
7025 (x86_dr_low_get_control): Likewise.
7026 (x86_dr_low_get_status): Likewise.
7028 2015-03-20 Pedro Alves <palves@redhat.com>
7030 * tracepoint.c (cmd_qtstatus): Make "str" const.
7032 2015-03-20 Pedro Alves <palves@redhat.com>
7034 * server.c (handle_general_set): Make "req_str" const.
7036 2015-03-19 Pedro Alves <palves@redhat.com>
7038 * linux-low.c (linux_resume_one_lwp): Rename to ...
7039 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7040 instead call perror_with_name.
7041 (check_ptrace_stopped_lwp_gone): New function.
7042 (linux_resume_one_lwp): Reimplement as wrapper around
7043 linux_resume_one_lwp_throw that swallows errors if the LWP is
7046 2015-03-19 Pedro Alves <palves@redhat.com>
7048 * linux-low.c (count_events_callback, select_event_lwp_callback):
7049 No longer check whether the thread has resume_stop as last resume
7052 2015-03-19 Pedro Alves <palves@redhat.com>
7054 * linux-low.c (count_events_callback, select_event_lwp_callback):
7055 Use the lwp's status_pending_p field, not the thread's.
7057 2015-03-19 Pedro Alves <palves@redhat.com>
7059 * linux-low.c (select_event_lwp_callback): Update comments to
7060 no longer mention SIGTRAP.
7062 2015-03-18 Gary Benson <gbenson@redhat.com>
7064 * server.c (handle_query): Do not report vFile:fstat as supported.
7066 2015-03-11 Gary Benson <gbenson@redhat.com>
7068 * hostio.c (sys/types.h): New include.
7069 (sys/stat.h): Likewise.
7070 (common-remote-fileio.h): Likewise.
7071 (handle_fstat): New function.
7072 (handle_vFile): Handle vFile:fstat packets.
7074 2015-03-11 Gary Benson <gbenson@redhat.com>
7076 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7077 struct stat.st_blocks and struct stat.st_blksize.
7078 * configure: Regenerate.
7079 * config.in: Likewise.
7080 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7081 (OBS): Add common-remote-fileio.o.
7082 (common-remote-fileio.o): New rule.
7084 2015-03-09 Pedro Alves <palves@redhat.com>
7086 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7087 'struct sockaddr' pointer in 'accept' call.
7089 2015-03-09 Pedro Alves <palves@redhat.com>
7092 2015-03-07 Pedro Alves <palves@redhat.com>
7093 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7094 or <winsock2.h> here. Instead include "gdb_socket.h".
7095 (remote_open): Use union gdb_sockaddr_u.
7096 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7097 or <winsock2.h> here. Instead include "gdb_socket.h".
7098 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7099 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7101 (init_named_socket, gdb_agent_helper_thread): Use union
7104 2015-03-07 Pedro Alves <palves@redhat.com>
7106 * configure.ac (build_warnings): Move
7107 -Wdeclaration-after-statement to the C-specific set.
7108 * configure: Regenerate.
7110 2015-03-07 Pedro Alves <palves@redhat.com>
7112 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7113 or <winsock2.h> here. Instead include "gdb_socket.h".
7114 (remote_open): Use union gdb_sockaddr_u.
7115 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7116 or <winsock2.h> here. Instead include "gdb_socket.h".
7117 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7118 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7120 (init_named_socket, gdb_agent_helper_thread): Use union
7123 2015-03-07 Pedro Alves <palves@redhat.com>
7125 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7128 2015-03-06 Yao Qi <yao.qi@linaro.org>
7130 * linux-aarch64-low.c (aarch64_insert_point): Use
7131 show_debug_regs as a boolean.
7132 (aarch64_remove_point): Likewise.
7134 2015-03-05 Pedro Alves <palves@redhat.com>
7136 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7137 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7138 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7139 * nto-low.c (nto_target_ops): Likewise.
7140 * spu-low.c (spu_target_ops): Likewise.
7141 * win32-low.c (win32_target_ops): Likewise.
7143 2015-03-04 Pedro Alves <palves@redhat.com>
7145 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7146 Decide whether a breakpoint triggered based on the SIGTRAP's
7148 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7149 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7150 (linux_low_filter_event): Check for breakpoints before checking
7152 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7154 (linux_stopped_by_sw_breakpoint)
7155 (linux_supports_stopped_by_sw_breakpoint)
7156 (linux_stopped_by_hw_breakpoint)
7157 (linux_supports_stopped_by_hw_breakpoint): New functions.
7158 (linux_target_ops): Install new target methods.
7160 2015-03-04 Pedro Alves <palves@redhat.com>
7162 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7163 * server.c (swbreak_feature, hwbreak_feature): New globals.
7164 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7165 (captured_main): Clear swbreak_feature and hwbreak_feature.
7166 * server.h (swbreak_feature, hwbreak_feature): Declare.
7167 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7168 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7169 supports_stopped_by_hw_breakpoint>: New fields.
7170 (target_supports_stopped_by_sw_breakpoint)
7171 (target_stopped_by_sw_breakpoint)
7172 (target_supports_stopped_by_hw_breakpoint)
7173 (target_stopped_by_hw_breakpoint): Declare.
7175 2015-03-04 Pedro Alves <palves@redhat.com>
7177 enum lwp_stop_reason -> enum target_stop_reason
7178 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7179 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7180 (linux_wait_1, stuck_in_jump_pad_callback)
7181 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7182 (linux_stopped_by_watchpoint):
7183 * linux-low.h (enum lwp_stop_reason): Delete.
7184 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7185 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7187 2015-03-04 Yao Qi <yao.qi@linaro.org>
7189 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7191 2015-03-03 Gary Benson <gbenson@redhat.com>
7193 * hostio.c (handle_vFile): Fix prefix lengths.
7195 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7197 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7200 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7202 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7203 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7204 (clean): Add "rm -f" for above C files.
7205 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7206 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7207 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7208 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7209 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7210 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7211 (init_registers_s390x_vx_linux64)
7212 (init_registers_s390x_tevx_linux64)
7213 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7214 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7216 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7217 (s390_store_vxrs_high): New functions.
7218 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7220 (s390_arch_setup): Add logic for selecting one of the new target
7221 descriptions. Activate the new vector regsets if applicable.
7222 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7223 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7224 and init_registers_s390x_tevx_linux64.
7226 2015-03-01 Pedro Alves <palves@redhat.com>
7228 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7231 2015-02-27 Pedro Alves <palves@redhat.com>
7233 * linux-x86-low.c (u_debugreg_offset): New function.
7234 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7236 2015-02-27 Pedro Alves <palves@redhat.com>
7238 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7239 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7240 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7241 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7242 (ps_lsetfpregs, ps_getpid)
7243 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7244 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7245 (ps_lsetxregs, ps_plog): Declare.
7247 2015-02-27 Pedro Alves <palves@redhat.com>
7249 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7250 IP_AGENT_EXPORT_FUNC.
7251 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7252 IP_AGENT_EXPORT_FUNC.
7253 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7254 (IP_AGENT_EXPORT): Delete.
7255 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7256 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7257 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7258 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7259 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7260 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7261 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7262 (traceframe_read_count, traceframe_write_count)
7263 (traceframes_created, trace_state_variables, get_raw_reg)
7264 (get_trace_state_variable_value, set_trace_state_variable_value)
7265 (ust_loaded, helper_thread_id, cmd_buf): Use
7266 IPA_SYM_EXPORTED_NAME.
7267 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7268 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7269 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7270 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7271 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7272 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7273 EXTERN_C_PUSH/EXTERN_C_POP.
7274 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7275 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7276 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7277 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7278 (traceframe_write_count, traceframe_read_count)
7279 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7280 (about_to_request_buffer_space, get_trace_state_variable_value)
7281 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7282 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7283 EXTERN_C_PUSH/EXTERN_C_POP.
7284 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7285 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7286 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7287 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7288 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7289 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7290 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7291 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7293 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7294 (IP_AGENT_EXPORT_VAR_DECL): Define.
7296 (gdb_agent_get_raw_reg): Declare.
7298 2015-02-27 Tom Tromey <tromey@redhat.com>
7299 Pedro Alves <palves@redhat.com>
7301 Rename symbols whose names are reserved C++ keywords throughout.
7303 2015-02-27 Pedro Alves <palves@redhat.com>
7305 * Makefile.in (COMPILER): New, get it from autoconf.
7306 (CXX): Get from autoconf instead.
7307 (COMPILE.pre): Use COMPILER.
7308 (CC-LD): Rename to ...
7309 (CC_LD): ... this. Use COMPILER.
7310 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7311 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7312 * acinclude.m4: Include build-with-cxx.m4.
7313 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7314 Disable -Werror by default if building in C++ mode.
7315 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7316 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7317 the C++ compiler. Save/restore CXXFLAGS too.
7318 * configure: Regenerate.
7320 2015-02-27 Pedro Alves <palves@redhat.com>
7322 * acinclude.m4: Include libiberty.m4.
7323 * configure.ac: Call libiberty_INIT.
7324 * config.in, configure: Regenerate.
7326 2015-02-26 Pedro Alves <palves@redhat.com>
7328 * linux-low.c (linux_wait_1): When incrementing the PC past a
7329 program breakpoint always use the_low_target.breakpoint_len as
7330 increment, rather than the maximum between that and
7331 the_low_target.decr_pc_after_break.
7333 2015-02-23 Pedro Alves <palves@redhat.com>
7335 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7336 thread was doing a step-over; always adjust the PC if
7337 we stepped over a permanent breakpoint.
7338 (linux_wait_1): If we stepped over breakpoint that was on top of a
7339 permanent breakpoint, manually advance the PC past it.
7341 2015-02-23 Pedro Alves <palves@redhat.com>
7343 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7345 (x86_fill_gregset, x86_store_gregset): Use it when handling
7348 2015-02-20 Pedro Alves <palves@redhat.com>
7350 * thread-db.c: Include "nat/linux-procfs.h".
7351 (thread_db_init): Skip listing new threads if the kernel supports
7352 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7354 2015-02-20 Pedro Alves <palves@redhat.com>
7356 * linux-low.c (status_pending_p_callback): Use ptid_match.
7358 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7360 PR breakpoints/16812
7361 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7362 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7363 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7365 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7367 PR breakpoints/15956
7368 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7370 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7372 * linux-low.c (linux_low_btrace_conf): Print size.
7373 * server.c (handle_btrace_conf_general_set): New.
7374 (hanle_general_set): Call handle_btrace_conf_general_set.
7375 (handle_query): Report Qbtrace-conf:bts:size as supported.
7377 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7379 * linux-low.c (linux_low_enable_btrace): Update parameters.
7380 (linux_low_btrace_conf): New.
7381 (linux_target_ops)<to_btrace_conf>: Initialize.
7382 * server.c (current_btrace_conf): New.
7383 (handle_btrace_enable): Rename to ...
7384 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7385 to target_enable_btrace. Update comment. Update users.
7386 (handle_qxfer_btrace_conf): New.
7387 (qxfer_packets): Add btrace-conf entry.
7388 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7389 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7390 (target_ops)<read_btrace_conf>: New.
7391 (target_enable_btrace): Update parameters.
7392 (target_read_btrace_conf): New.
7394 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7396 * server.c (handle_btrace_general_set): Remove call to
7397 target_supports_btrace.
7398 (supported_btrace_packets): New.
7399 (handle_query): Call supported_btrace_packets.
7400 * target.h: include btrace-common.h.
7401 (btrace_target_info): Removed.
7402 (supports_btrace, target_supports_btrace): Update parameters.
7404 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7406 * Makefile.in (SFILES): Add common/btrace-common.c.
7407 (OBS): Add common/btrace-common.o.
7408 (btrace-common.o): Add build rules.
7409 * linux-low: Include btrace-common.h.
7410 (linux_low_read_btrace): Use struct btrace_data. Call
7411 btrace_data_init and btrace_data_fini.
7413 2015-02-06 Pedro Alves <palves@redhat.com>
7415 * thread-db.c (find_new_threads_callback): Add debug output.
7417 2015-02-04 Pedro Alves <palves@redhat.com>
7419 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7420 (resume_stopped_resumed_lwps): New function.
7421 (linux_wait_for_event_filtered): Use it.
7423 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7425 * Makefile.in (SFILES): Add linux-personality.c.
7426 (linux-personality.o): New rule.
7427 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7428 list of objects to be built.
7429 * linux-low.c: Include nat/linux-personality.h.
7430 (linux_create_inferior): Remove code to disable address space
7431 randomization (moved to ../nat/linux-personality.c). Create
7432 cleanup to disable address space randomization.
7434 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7436 * Makefile.in (posix-strerror.o): New rule.
7437 (mingw-strerror.o): Likewise.
7438 * configure: Regenerated.
7439 * configure.ac: Source file ../common/common.host. Initialize new
7440 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7442 2015-01-14 Yao Qi <yao@codesourcery.com>
7444 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7445 (ppc-linux.o): New rule.
7446 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7447 * configure.ac: AC_CHECK_FUNCS(getauxval).
7448 * config.in: Re-generated.
7449 * configure: Re-generated.
7450 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7451 ppc64_64bit_inferior_p
7453 2015-01-14 Yao Qi <yao@codesourcery.com>
7455 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7456 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7457 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7458 (PT_ORIG_R3, PT_TRAP): Likewise.
7459 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7460 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7461 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7463 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7465 * i387-fp.c (i387_cache_to_xsave): In look over
7466 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7467 zmmh_low_space field by use of zmmh_high_space.
7469 2015-01-09 Pedro Alves <palves@redhat.com>
7471 * linux-low.c (step_over_bkpt): Move higher up in the file.
7472 (handle_extended_wait): Don't store the stop_pc here.
7473 (get_stop_pc): Adjust comments and rename to ...
7474 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7475 stopped for a software breakpoint or hardware breakpoint.
7476 (thread_still_has_status_pending_p): New function.
7477 (status_pending_p_callback): Use
7478 thread_still_has_status_pending_p. If the event is no longer
7479 interesting, resume the LWP.
7480 (handle_tracepoints): Add assert.
7481 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7482 (wstatus_maybe_breakpoint): New function.
7483 (cancel_breakpoint): Delete function.
7484 (check_stopped_by_watchpoint): New function, factored out from
7485 linux_low_filter_event.
7486 (lp_status_maybe_breakpoint): Delete function.
7487 (linux_low_filter_event): Remove filter_ptid argument.
7488 Leave thread group exits pending here. Store the LWP's stop PC.
7489 Always leave events pending.
7490 (linux_wait_for_event_filtered): Pull all events out of the
7491 kernel, and leave them all pending.
7492 (count_events_callback, select_event_lwp_callback): Consider all
7494 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7495 (select_event_lwp): Only give preference to the stepping LWP in
7496 all-stop mode. Adjust comments.
7497 (ignore_event): New function.
7498 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7499 references to cancel_breakpoints. Adjust to renames. Also give
7500 equal priority to all LWPs that have had events in non-stop mode.
7501 If reporting a software breakpoint event, unadjust the LWP's PC.
7502 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7503 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7505 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7506 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7507 (linux_stopped_by_watchpoint): Adjust.
7508 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7509 * linux-low.h (enum lwp_stop_reason): New.
7510 (struct lwp_info) <stop_pc>: Adjust comment.
7511 <stopped_by_watchpoint>: Delete field.
7512 <stop_reason>: New field.
7513 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7514 * mem-break.c (software_breakpoint_inserted_here)
7515 (hardware_breakpoint_inserted_here): New function.
7516 * mem-break.h (software_breakpoint_inserted_here)
7517 (hardware_breakpoint_inserted_here): Declare.
7518 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7519 (cancel_breakpoints): Delete.
7520 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7521 (upload_fast_traceframes): Remove references to
7524 2015-01-09 Pedro Alves <palves@redhat.com>
7526 * thread-db.c (find_new_threads_callback): Ignore thread if the
7527 kernel thread ID is -1.
7529 2015-01-09 Pedro Alves <palves@redhat.com>
7531 * linux-low.c (linux_attach_fail_reason_string): Move to
7532 nat/linux-ptrace.c, and rename.
7533 (linux_attach_lwp): Update comment.
7534 (attach_proc_task_lwp_callback): New function.
7535 (linux_attach): Adjust to rename and use
7536 linux_proc_attach_tgid_threads.
7537 (linux_attach_fail_reason_string): Delete declaration.
7539 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7541 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7542 * server.c (gdbserver_version): Likewise.
7544 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7546 * remote-utils.c: Include ctype.h.
7547 (input_interrupt): Explicitly handle the case when the char
7548 received is the NUL byte. Improve the printing of non-ASCII
7551 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7553 * linux-low.c (linux_low_filter_event): Update call to
7554 linux_enable_event_reporting following the addition of
7555 a new parameter to that function.
7557 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7560 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7561 (AARCH64_FPCR_REGNO): Likewise.
7562 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7563 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7564 (aarch64_store_fpregset): Likewise.
7566 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7568 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7569 Remove FIXME comment about assumption about N.
7571 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7573 * configure.ac: If large-file support is disabled in GDBserver,
7574 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7575 * configure: Regenerate.
7577 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7579 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7580 warning upon ENODATA from ptrace.
7581 * linux-s390-low.c (s390_store_tdb): New.
7582 (s390_regsets): Add regset for NT_S390_TDB.
7584 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7586 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7587 without a fill_function.
7588 * linux-s390-low.c (s390_fill_last_break): Remove.
7589 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7590 (s390_arch_setup): Use regset's size instead of fill_function for
7593 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7595 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7596 the regset's store function when ptrace returned an error.
7597 * regcache.c (get_thread_regcache): Invalidate register cache
7598 before fetching inferior's registers.
7600 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7602 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7603 while-loop as for-loop.
7604 (regsets_store_inferior_registers): Likewise.
7606 2014-11-28 Yao Qi <yao@codesourcery.com>
7608 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7609 * config.in, configure: Re-generate.
7610 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7613 2014-11-21 Yao Qi <yao@codesourcery.com>
7615 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7616 (AC_CHECK_HEADERS): Remove malloc.h.
7617 * configure: Re-generated.
7618 * config.in: Re-generated.
7619 * server.h: Don't include alloca.h and malloc.h.
7620 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7621 Don't include malloc.h.
7623 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7625 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7626 corresponding ERRNO check in same block.
7628 2014-11-12 Pedro Alves <palves@redhat.com>
7630 * server.c (cont_thread): Update comment.
7631 (start_inferior, attach_inferior): No longer clear cont_thread.
7632 (handle_v_cont): No longer set cont_thread.
7633 (captured_main): Clear cont_thread each time a GDB connects.
7635 2014-11-12 Pedro Alves <palves@redhat.com>
7637 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7638 thread, and don't resume all threads if the Hc thread has exited.
7640 2014-11-12 Pedro Alves <palves@redhat.com>
7642 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7643 the process group instead of to a specific LWP.
7645 2014-10-15 Pedro Alves <palves@redhat.com>
7648 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7650 (arm_set_thread_context): Delete.
7651 (the_low_target): Adjust.
7652 * win32-i386-low.c (debug_registers_changed)
7653 (debug_registers_used): Delete.
7654 (update_debug_registers_callback): New function.
7655 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7656 needing to update their debug registers.
7657 (win32_get_current_dr): New function.
7658 (x86_dr_low_get_addr, x86_dr_low_get_control)
7659 (x86_dr_low_get_status): Fetch the debug register from the thread
7661 (i386_initial_stuff): Adjust.
7662 (i386_get_thread_context): Remove current_event parameter. Don't
7663 clear debug_registers_changed nor copy DR values to
7665 (i386_set_thread_context): Delete.
7666 (i386_prepare_to_resume): New function.
7667 (i386_thread_added): Mark the thread as needing to update irs
7669 (the_low_target): Remove i386_set_thread_context and install
7670 i386_prepare_to_resume.
7671 * win32-low.c (win32_get_thread_context): Adjust.
7672 (win32_set_thread_context): Use SetThreadContext
7674 (win32_prepare_to_resume): New function.
7675 (win32_require_context): New function, factored out from ...
7676 (thread_rec): ... this.
7677 (continue_one_thread): Call win32_prepare_to_resume on each thread
7678 we're about to continue.
7679 (win32_resume): Call win32_prepare_to_resume on the event thread.
7680 * win32-low.h (struct win32_thread_info)
7681 <debug_registers_changed>: New field.
7682 (struct win32_target_ops): Change prototype of set_thread_context,
7683 delete set_thread_context and add prepare_to_resume.
7684 (win32_require_context): New declaration.
7686 2014-10-08 Gary Benson <gbenson@redhat.com>
7688 * server.h: Do not include common-exceptions.h.
7690 2014-10-08 Gary Benson <gbenson@redhat.com>
7692 * server.h: Do not include cleanups.h.
7694 2014-09-30 James Hogan <james.hogan@imgtec.com>
7696 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7699 2014-09-23 Yao Qi <yao@codesourcery.com>
7701 * linux-low.c (lp_status_maybe_breakpoint): New function.
7702 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7703 (count_events_callback): Likewise.
7704 (select_event_lwp_callback): Likewise.
7705 (cancel_breakpoints_callback): Likewise.
7707 2014-09-19 Don Breazeal <donb@codesourcery.com>
7709 * linux-low.c (handle_extended_wait): Call
7710 linux_ptrace_get_extended_event.
7711 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7712 linux_is_extended_waitstatus.
7714 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7716 * Makefile.in (CPPFLAGS): Define.
7717 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7718 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7720 2014-09-16 Gary Benson <gbenson@redhat.com>
7722 * inferiors.h (current_inferior): Renamed as...
7723 (current_thread): New variable. All uses updated.
7724 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7725 (maybe_move_out_of_jump_pad): Likewise.
7726 (cancel_breakpoint): Likewise.
7727 (linux_low_filter_event): Likewise.
7728 (wait_for_sigstop): Likewise.
7729 (linux_resume_one_lwp): Likewise.
7730 (need_step_over_p): Likewise.
7731 (start_step_over): Likewise.
7732 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7733 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7734 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7735 and save_inferior as saved_thread.
7736 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7738 (regcache_invalidate_thread): Likewise.
7739 * remote-utils.c (prepare_resume_reply): Likewise.
7740 * thread-db.c (thread_db_get_tls_address): Likewise.
7741 (disable_thread_event_reporting): Likewise.
7742 (remove_thread_event_breakpoints): Likewise.
7743 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7745 * target.h (set_desired_inferior): Renamed as...
7746 (set_desired_thread): New declaration. All uses updated.
7747 * server.c (myresume): Updated comment to reference thread instead
7749 (handle_serial_event): Likewise.
7750 (handle_target_event): Likewise.
7752 2014-09-12 Tom Tromey <tromey@redhat.com>
7753 Gary Benson <gbenson@redhat.com>
7755 * regcache.h: Include common-regcache.h.
7756 (regcache_read_pc): Don't declare.
7757 * regcache.c (get_thread_regcache_for_ptid): New function.
7759 2014-09-11 Tom Tromey <tromey@redhat.com>
7760 Gary Benson <gbenson@redhat.com>
7762 * symbol.c: New file.
7763 * Makefile.in (SFILES): Add symbol.c.
7764 (OBS): Add symbol.o.
7766 2014-09-11 Gary Benson <gbenson@redhat.com>
7768 * target.c (target_stop_ptid, target_continue_ptid): New
7771 2014-09-11 Tom Tromey <tromey@redhat.com>
7772 Gary Benson <gbenson@redhat.com>
7774 * target.h: Include target/target.h.
7775 * target.c (target_read_memory, target_read_uint32)
7776 (target_write_memory): New functions.
7778 2014-09-11 Gary Benson <gbenson@redhat.com>
7780 * server.h (debug_hw_points): Don't declare.
7781 * server.c (debug_hw_points): Don't define. Replace all uses
7782 with show_debug_regs.
7783 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7784 all uses with show_debug_regs.
7786 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7788 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7789 endianness into account.
7790 (ppc_supply_ptrace_register): Likewise.
7792 2014-09-03 James Hogan <james.hogan@imgtec.com>
7794 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7795 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7797 2014-09-03 Gary Benson <gbenson@redhat.com>
7799 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7800 ALL_DEBUG_ADDRESS_REGISTERS.
7802 2014-09-02 Gary Benson <gbenson@redhat.com>
7804 * i386-low.h: Renamed as...
7805 * x86-low.h: New file. All type, function and variable name
7806 prefixes changed from "i386_" to "x86_". All references updated.
7807 * i386-low.c: Renamed as...
7808 * x86-low.c: New file. All type, function and variable name
7809 prefixes changed from "i386_" to "x86_". All references updated.
7811 2014-09-02 Gary Benson <gbenson@redhat.com>
7813 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7814 (x86_linux_new_thread): Likewise.
7816 2014-08-29 Gary Benson <gbenson@redhat.com>
7818 * server.h (setjmp.h): Do not include.
7819 (toplevel): Do not declare.
7820 (common-exceptions.h): Include.
7821 (cleanups.h): Likewise.
7822 * server.c (toplevel): Do not define.
7823 (exit_code): New static global.
7824 (detach_or_kill_for_exit_cleanup): New function.
7825 (main): New function. Original main renamed to...
7826 (captured_main): New function.
7827 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7829 2014-08-29 Gary Benson <gbenson@redhat.com>
7831 * Makefile.in (SFILES): Add common/common-exceptions.c.
7832 (OBS): Add common-exceptions.o.
7833 (common-exceptions.o): New rule.
7834 * utils.c (prepare_to_throw_exception): New function.
7836 2014-08-29 Gary Benson <gbenson@redhat.com>
7838 * config.in: Regenerate.
7839 * configure: Likewise.
7841 2014-08-29 Gary Benson <gbenson@redhat.com>
7843 * Makefile.in (SFILES): Add common/cleanups.c.
7845 (cleanups.o): New rule.
7847 2014-08-29 Gary Benson <gbenson@redhat.com>
7849 * utils.c (internal_vwarning): New function.
7851 2014-08-28 Gary Benson <gbenson@redhat.com>
7853 * utils.h (fatal): Remove declaration.
7854 * utils.c (fatal): Remove function.
7856 2014-08-28 Gary Benson <gbenson@redhat.com>
7858 * tracepoint.c (gdb_agent_init): Replace fatal with
7860 (initialize_tracepoint): Likewise.
7862 2014-08-28 Gary Benson <gbenson@redhat.com>
7864 * remote-utils.c (remote_prepare): Replace fatal with error.
7866 2014-08-28 Gary Benson <gbenson@redhat.com>
7868 * linux-low.c (linux_async): Replace fatal with warning.
7870 (linux_start_non_stop): Return -1 if linux_async failed.
7872 2014-08-28 Gary Benson <gbenson@redhat.com>
7874 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7876 (i386_dr_low_get_addr): Remove vague comment.
7877 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7880 2014-08-28 Gary Benson <gbenson@redhat.com>
7882 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7883 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7885 (linux_resume_one_lwp): Likewise.
7886 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7888 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7889 with internal_error.
7890 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7891 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7892 (find_register_by_name): Replace fatal with internal_error.
7893 (find_regno): Likewise.
7894 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7895 * thread-db.c (thread_db_create_event): Likewise.
7896 (thread_db_load_search): Likewise.
7897 (try_thread_db_load_1): Likewise.
7898 * tracepoint.c (get_jump_space_head): Replace fatal with
7900 (claim_trampoline_space): Likewise.
7901 (have_fast_tracepoint_trampoline_buffer): Likewise.
7902 (cmd_qtstart): Likewise.
7903 (stop_tracing): Likewise.
7904 (fast_tracepoint_collecting): Likewise.
7905 (target_malloc): Likewise.
7906 (download_tracepoint): Likewise.
7907 (download_trace_state_variables): Replace check with gdb_assert.
7908 (upload_fast_traceframes): Replace fatal with internal_error.
7910 2014-08-19 Tom Tromey <tromey@redhat.com>
7911 Gary Benson <gbenson@redhat.com>
7913 * Makefile.in (SFILES): Add common/common-debug.c.
7914 (OBS): Add common-debug.o.
7915 (common-debug.o): New rule.
7916 * debug.h (debug_printf): Don't declare.
7917 * debug.c (debug_printf): Renamed and rewritten as...
7918 (debug_vprintf): New function.
7920 2014-08-19 Gary Benson <gbenson@redhat.com>
7922 * utils.h: Do not include print-utils.h.
7924 2014-08-19 Tom Tromey <tromey@redhat.com>
7925 Gary Benson <gbenson@redhat.com>
7927 * server.h: Add static assertion.
7928 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7930 2014-08-19 Tom Tromey <tromey@redhat.com>
7931 Gary Benson <gbenson@redhat.com>
7933 * Makefile.in (SFILES): Add common/errors.c.
7934 (OBS): Add errors.o.
7935 (IPA_OBS): Add errors-ipa.o.
7936 (errors.o): New rule.
7937 (errors-ipa.o): Likewise.
7938 * utils.h (perror_with_name, error, warning): Don't declare.
7939 * utils.c (warning): Renamed and rewritten as...
7940 (vwarning): New function.
7941 (error): Renamed and rewritten as...
7942 (verror): New function.
7943 (internal_error): Renamed and rewritten as...
7944 (internal_verror): New function.
7946 2014-08-07 Gary Benson <gbenson@redhat.com>
7948 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7949 * configure: Regenerate.
7950 * config.in: Likewise.
7951 * server.h: Do not include errno.h.
7952 * event-loop.c: Likewise.
7953 * hostio-errno.c: Likewise.
7954 * linux-low.c: Likewise.
7955 * remote-utils.c: Likewise.
7956 * spu-low.c: Likewise.
7957 * utils.c: Likewise.
7958 * gdbreplay.c: Unconditionally include errno.h.
7960 2014-08-07 Gary Benson <gbenson@redhat.com>
7962 * server.h: Do not include string.h.
7963 * event-loop.c: Likewise.
7964 * linux-low.c: Likewise.
7965 * regcache.c: Likewise.
7966 * remote-utils.c: Likewise.
7967 * spu-low.c: Likewise.
7968 * utils.c: Likewise.
7970 2014-08-07 Gary Benson <gbenson@redhat.com>
7972 * server.h: Do not include gdb_assert.h.
7974 2014-08-07 Gary Benson <gbenson@redhat.com>
7976 * server.h: Do not include common-utils.h.
7978 2014-08-07 Gary Benson <gbenson@redhat.com>
7980 * server.h: Do not include ptid.h.
7981 * notif.h: Likewise.
7983 2014-08-07 Gary Benson <gbenson@redhat.com>
7985 * server.h: Do not include gdb_locale.h.
7987 2014-08-07 Gary Benson <gbenson@redhat.com>
7989 * server.h: Do not include gdb/signals.h.
7990 * win32-low.c: Likewise.
7992 2014-08-07 Gary Benson <gbenson@redhat.com>
7994 * server.h: Do not include pathmax.h.
7996 2014-08-07 Gary Benson <gbenson@redhat.com>
7998 * server.h: Do not include libiberty.h.
7999 * linux-bfin-low.c: Likewise.
8001 2014-08-07 Gary Benson <gbenson@redhat.com>
8003 * server.h: Do not include ansidecl.h.
8005 2014-08-07 Gary Benson <gbenson@redhat.com>
8007 * linux-x86-low.c: Do not include stddef.h.
8008 * lynx-ppc-low.c: Likewise.
8009 * tracepoint.c: Likewise.
8011 2014-08-07 Gary Benson <gbenson@redhat.com>
8013 * server.h: Do not include stdarg.h.
8014 * nto-low.c: Likewise.
8016 2014-08-07 Gary Benson <gbenson@redhat.com>
8018 * server.h: Do not include stdlib.h.
8019 * inferiors.c: Likewise.
8020 * linux-low.c: Likewise.
8021 * regcache.c: Likewise.
8022 * spu-low.c: Likewise.
8023 * tracepoint.c: Likewise.
8024 * utils.c: Likewise.
8026 2014-08-07 Gary Benson <gbenson@redhat.com>
8028 * server.h: Do not include stdio.h.
8029 * linux-low.c: Likewise.
8030 * remote-utils.c: Likewise.
8031 * spu-low.c: Likewise.
8032 * utils.c: Likewise.
8033 * wincecompat.c: Likewise.
8035 2014-08-06 Gary Benson <gbenson@redhat.com>
8037 * regcache.c (init_register_cache): Move conditionals inside if.
8039 2014-08-06 Gary Benson <gbenson@redhat.com>
8041 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8043 2014-07-31 Gary Benson <gbenson@redhat.com>
8045 * ax.h: Do not include server.h.
8046 * gdbthread.h: Likewise.
8047 * lynx-low.h: Likewise.
8048 * notif.h: Likewise.
8050 2014-07-30 Gary Benson <gbenson@redhat.com>
8052 * server.h: Include common-defs.h.
8053 Do not include config.h or build-gnulib-gdbserver/config.h.
8055 2014-07-30 Gary Benson <gbenson@redhat.com>
8057 * hostio-errno.c: Move server.h to top of includes list.
8058 * inferiors.c: Likewise.
8059 * linux-x86-low.c: Likewise.
8060 * notif.c: Include server.h.
8062 2014-07-24 Tom Tromey <tromey@redhat.com>
8063 Gary Benson <gbenson@redhat.com>
8065 * server.h (CORE_ADDR): Now unsigned.
8067 2014-07-16 Pedro Alves <palves@redhat.com>
8069 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8071 2014-07-15 Pedro Alves <palves@redhat.com>
8073 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8076 2014-07-11 Pedro Alves <palves@redhat.com>
8078 * linux-low.c (kill_wait_lwp): New function, based on
8079 kill_one_lwp_callback, but use my_waitpid directly.
8080 (kill_one_lwp_callback, linux_kill): Use it.
8082 2014-06-23 Pedro Alves <palves@redhat.com>
8084 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8085 before setting DR0..DR3.
8087 2014-06-20 Gary Benson <gbenson@redhat.com>
8089 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8090 * configure: Regenerated.
8091 * config.in: Likewise.
8093 2014-06-20 Gary Benson <gbenson@redhat.com>
8095 * Makefile.in (SFILES): Update locations for files moved
8097 (object file files): Reordered.
8099 2014-06-20 Gary Benson <gbenson@redhat.com>
8101 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8102 (i386_dr_low_set_addr): Likewise.
8103 (i386_dr_low_get_addr): Likewise.
8104 (i386_dr_low_can_set_control): Likewise.
8105 (i386_dr_low_set_control): Likewise.
8106 (i386_dr_low_get_control): Likewise.
8107 (i386_dr_low_get_status): Likewise.
8108 (i386_get_debug_register_length): Likewise.
8109 * linux-x86-low.c (i386_dr_low_set_addr):
8110 Changed signature. Made static.
8111 (i386_dr_low_get_addr): Likewise.
8112 (i386_dr_low_set_control): Likewise.
8113 (i386_dr_low_get_control): Likewise.
8114 (i386_dr_low_get_status): Likewise.
8115 (i386_dr_low): New global variable.
8116 * win32-i386-low.c (i386_dr_low_set_addr):
8117 Changed signature. Made static.
8118 (i386_dr_low_get_addr): Likewise.
8119 (i386_dr_low_set_control): Likewise.
8120 (i386_dr_low_get_control): Likewise.
8121 (i386_dr_low_get_status): Likewise.
8122 (i386_dr_low): New global variable.
8124 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8126 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8127 * Makefile.in (AR, AR_FLAGS): Define.
8128 * configure: Regenerate.
8130 2014-06-19 Gary Benson <gbenson@redhat.com>
8132 * Makefile.in (i386-dregs.o): New rule.
8133 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8134 * i386-low.c (target.h): Remove include.
8135 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8136 (DR_CONTROL_SHIFT): Likewise.
8137 (DR_CONTROL_SIZE): Likewise.
8138 (DR_RW_EXECUTE): Likewise.
8139 (DR_RW_WRITE): Likewise.
8140 (DR_RW_READ): Likewise.
8141 (DR_RW_IORW): Likewise.
8142 (DR_LEN_1): Likewise.
8143 (DR_LEN_2): Likewise.
8144 (DR_LEN_4): Likewise.
8145 (DR_LEN_8): Likewise.
8146 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8147 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8148 (DR_ENABLE_SIZE): Likewise.
8149 (DR_LOCAL_SLOWDOWN): Likewise.
8150 (DR_GLOBAL_SLOWDOWN): Likewise.
8151 (DR_CONTROL_RESERVED): Likewise.
8152 (I386_DR_CONTROL_MASK): Likewise.
8153 (I386_DR_VACANT): Likewise.
8154 (I386_DR_LOCAL_ENABLE): Likewise.
8155 (I386_DR_GLOBAL_ENABLE): Likewise.
8156 (I386_DR_DISABLE): Likewise.
8157 (I386_DR_SET_RW_LEN): Likewise.
8158 (I386_DR_GET_RW_LEN): Likewise.
8159 (I386_DR_WATCH_HIT): Likewise.
8160 (i386_wp_op_t): Likewise.
8161 (i386_show_dr): Likewise.
8162 (i386_length_and_rw_bits): Likewise.
8163 (i386_insert_aligned_watchpoint): Likewise.
8164 (i386_remove_aligned_watchpoint): Likewise.
8165 (i386_handle_nonaligned_watchpoint): Likewise.
8166 i386_update_inferior_debug_regs(): Likewise.
8167 (i386_dr_insert_watchpoint): Likewise.
8168 (i386_dr_remove_watchpoint): Likewise.
8169 (i386_dr_region_ok_for_watchpoint): Likewise.
8170 (i386_dr_stopped_data_address): Likewise.
8171 (i386_dr_stopped_by_watchpoint): Likewise.
8173 2014-06-19 Gary Benson <gbenson@redhat.com>
8175 * i386-low.c (i386_dr_show): Renamed to
8176 i386_show_dr and made static. All uses updated.
8177 (i386_dr_length_and_rw_bits): Renamed to
8178 i386_length_and_rw_bits and made static.
8180 (i386_dr_insert_aligned_watchpoint): Renamed to
8181 i386_insert_aligned_watchpoint and made static.
8183 (i386_dr_remove_aligned_watchpoint): Renamed to
8184 i386_remove_aligned_watchpoint and made static.
8186 (i386_dr_update_inferior_debug_regs): Renamed to
8187 i386_update_inferior_debug_regs and made static.
8190 2014-06-18 Gary Benson <gbenson@redhat.com>
8192 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8193 (i386_dr_low_can_set_control): Likewise.
8194 (i386_get_debug_register_length): Likewise.
8195 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8196 (i386_dr_low_can_set_control): Likewise.
8197 (i386_get_debug_register_length): Likewise.
8199 2014-06-17 Gary Benson <gbenson@redhat.com>
8201 * i386-low.h (i386-dregs.h): New include.
8202 (DR_FIRSTADDR): Now in i386-dregs.h.
8203 (DR_LASTADDR): Likewise.
8204 (DR_NADDR): Likewise.
8205 (DR_STATUS): Likewise.
8206 (DR_CONTROL): Likewise.
8207 (i386_debug_reg_state): Likewise.
8208 (i386_dr_insert_watchpoint): Likewise.
8209 (i386_dr_remove_watchpoint): Likewise.
8210 (i386_dr_region_ok_for_watchpoint): Likewise.
8211 (i386_dr_stopped_data_address): Likewise.
8212 (i386_dr_stopped_by_watchpoint): Likewise.
8213 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8215 2014-06-18 Gary Benson <gbenson@redhat.com>
8217 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8218 i386_dr_insert_watchpoint.
8219 (i386_low_remove_watchpoint): Renamed to
8220 i386_dr_remove_watchpoint.
8221 (i386_low_region_ok_for_watchpoint): Renamed to
8222 i386_dr_region_ok_for_watchpoint.
8223 (i386_low_stopped_data_address): Renamed to
8224 i386_dr_stopped_data_address.
8225 (i386_low_stopped_by_watchpoint): Renamed to
8226 i386_dr_stopped_by_watchpoint.
8227 * i386-low.c (i386_show_dr): Renamed to
8228 i386_dr_show and made nonstatic. All uses updated.
8229 (i386_length_and_rw_bits): Renamed to
8230 i386_dr_length_and_rw_bits and made nonstatic.
8232 (i386_insert_aligned_watchpoint): Renamed to
8233 i386_dr_insert_aligned_watchpoint and made nonstatic.
8235 (i386_remove_aligned_watchpoint): Renamed to
8236 i386_dr_remove_aligned_watchpoint and made nonstatic.
8238 (i386_update_inferior_debug_regs): Renamed to
8239 i386_dr_update_inferior_debug_regs and made nonstatic.
8241 (i386_low_insert_watchpoint): Renamed to
8242 i386_dr_insert_watchpoint. All uses updated.
8243 (i386_low_remove_watchpoint): Renamed to
8244 i386_dr_remove_watchpoint. All uses updated.
8245 (i386_low_region_ok_for_watchpoint): Renamed to
8246 i386_dr_region_ok_for_watchpoint. All uses updated.
8247 (i386_low_stopped_data_address): Renamed to
8248 i386_dr_stopped_data_address. All uses updated.
8249 (i386_low_stopped_by_watchpoint): Renamed to
8250 i386_dr_stopped_by_watchpoint. All uses updated.
8252 2014-06-18 Gary Benson <gbenson@redhat.com>
8254 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8255 (i386_dr_low_can_set_control): Likewise.
8256 (i386_insert_aligned_watchpoint): New check.
8258 2014-06-18 Gary Benson <gbenson@redhat.com>
8260 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8263 2014-06-18 Gary Benson <gbenson@redhat.com>
8265 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8266 instead of fatal and error.
8267 (i386_handle_nonaligned_watchpoint): Likewise.
8269 2014-06-18 Gary Benson <gbenson@redhat.com>
8271 * i386-low.c (i386_get_debug_register_length): New macro.
8272 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8273 (i386_show_dr): Use debug_printf instead of fprintf. Use
8274 phex to format values.
8276 2014-06-18 Gary Benson <gbenson@redhat.com>
8278 * i386-low.h: Comment changes.
8279 * i386-low.c: Likewise.
8281 2014-06-18 Gary Benson <gbenson@redhat.com>
8283 * i386-low.c: Whitespace changes.
8285 2014-06-12 Tom Tromey <tromey@redhat.com>
8287 * utils.c (freeargv): Remove.
8289 2014-06-12 Tom Tromey <tromey@redhat.com>
8291 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8292 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8293 (parse_debug_format_options): Likewise.
8294 (gdbserver_usage): Likewise.
8295 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8296 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8297 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8299 ($(LIBGNU)): Depend on libiberty.
8300 (all-lib): Recurse into all subdirs.
8301 (install-only): Invoke "install" target in subdirs.
8302 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8304 * configure: Rebuild.
8305 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8306 for vasprintf, vsnprintf, or gettimeofday.
8307 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8310 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8312 * development.sh: Delete.
8313 * Makefile.in (config.status): Adjust dependency on development.sh.
8314 * configure.ac: Adjust development.sh source call.
8315 * configure: Regenerate.
8317 2014-06-02 Pedro Alves <palves@redhat.com>
8319 * ax.c (gdb_free_agent_expr): New function.
8320 * ax.h (gdb_free_agent_expr): New declaration.
8321 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8323 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8325 (clear_breakpoint_conditions_and_commands): New function.
8326 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8327 (clear_breakpoint_conditions_and_commands): New declaration.
8329 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8331 * linux-aarch64-low.c (asm/ptrace.h): Include.
8333 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8335 Fix TLS access for -static -pthread.
8336 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8337 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8338 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8340 2014-05-20 Pedro Alves <palves@redhat.com>
8342 * linux-aarch64-low.c (aarch64_insert_point)
8343 (aarch64_remove_point): No longer check whether the type is
8344 supported here. Adjust to new interface.
8345 (the_low_target): Install aarch64_supports_z_point_type as
8346 supports_z_point_type method.
8347 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8348 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8349 instead of a Z packet char. Adjust.
8350 (arm_supports_z_point_type): New function.
8351 (arm_insert_point, arm_remove_point): Adjust to new interface.
8352 (the_low_target): Install arm_supports_z_point_type.
8353 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8354 (cris_insert_point, cris_remove_point): Adjust to new interface.
8355 Don't check whether the type is supported here.
8356 (the_low_target): Install cris_supports_z_point_type.
8357 * linux-low.c (linux_supports_z_point_type): New function.
8358 (linux_insert_point, linux_remove_point): Adjust to new interface.
8359 * linux-low.h (struct linux_target_ops) <insert_point,
8360 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8361 raw_breakpoint pointer parameter.
8362 <supports_z_point_type>: New method.
8363 * linux-mips-low.c (mips_supports_z_point_type): New function.
8364 (mips_insert_point, mips_remove_point): Adjust to new interface.
8365 Use mips_supports_z_point_type.
8366 (the_low_target): Install mips_supports_z_point_type.
8367 * linux-ppc-low.c (the_low_target): Install NULL as
8368 supports_z_point_type method.
8369 * linux-s390-low.c (the_low_target): Install NULL as
8370 supports_z_point_type method.
8371 * linux-sparc-low.c (the_low_target): Install NULL as
8372 supports_z_point_type method.
8373 * linux-x86-low.c (x86_supports_z_point_type): New function.
8374 (x86_insert_point): Adjust to new insert_point interface. Use
8375 insert_memory_breakpoint. Adjust to new
8376 i386_low_insert_watchpoint interface.
8377 (x86_remove_point): Adjust to remove_point interface. Use
8378 remove_memory_breakpoint. Adjust to new
8379 i386_low_remove_watchpoint interface.
8380 (the_low_target): Install x86_supports_z_point_type.
8381 * lynx-low.c (lynx_target_ops): Install NULL as
8382 supports_z_point_type callback.
8383 * nto-low.c (nto_supports_z_point_type): New.
8384 (nto_insert_point, nto_remove_point): Adjust to new interface.
8385 (nto_target_ops): Install nto_supports_z_point_type.
8386 * mem-break.c: Adjust intro comment.
8387 (struct raw_breakpoint) <raw_type, size>: New fields.
8388 <inserted>: Update comment.
8389 <shlib_disabled>: Delete field.
8390 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8391 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8392 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8393 (raw_bkpt_type_to_target_hw_bp_type): New function.
8394 (find_enabled_raw_code_breakpoint_at): New function.
8395 (find_raw_breakpoint_at): New type and size parameters. Use them.
8396 (insert_memory_breakpoint): New function, based off
8397 set_raw_breakpoint_at.
8398 (remove_memory_breakpoint): New function.
8399 (set_raw_breakpoint_at): Reimplement.
8400 (set_breakpoint): New, based on set_breakpoint_at.
8401 (set_breakpoint_at): Reimplement.
8402 (delete_raw_breakpoint): Go through the_target->remove_point
8403 instead of assuming memory breakpoints.
8404 (find_gdb_breakpoint_at): Delete.
8405 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8406 (find_gdb_breakpoint): New function.
8407 (set_gdb_breakpoint_at): Delete.
8408 (z_type_supported): New function.
8409 (set_gdb_breakpoint_1): New function, loosely based off
8410 set_gdb_breakpoint_at.
8411 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8412 (delete_gdb_breakpoint_at): Delete.
8413 (delete_gdb_breakpoint_1): New function, loosely based off
8414 delete_gdb_breakpoint_at.
8415 (delete_gdb_breakpoint): New function.
8416 (clear_gdb_breakpoint_conditions): Rename to ...
8417 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8419 (add_condition_to_breakpoint): Make static.
8420 (add_breakpoint_condition): Take a struct breakpoint pointer
8421 instead of an address. Adjust.
8422 (gdb_condition_true_at_breakpoint): Rename to ...
8423 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8425 (gdb_condition_true_at_breakpoint): Reimplement.
8426 (add_breakpoint_commands): Take a struct breakpoint pointer
8427 instead of an address. Adjust.
8428 (gdb_no_commands_at_breakpoint): Rename to ...
8429 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8430 parameter. Return true if no breakpoint was found. Change debug
8432 (gdb_no_commands_at_breakpoint): Reimplement.
8433 (run_breakpoint_commands): Rename to ...
8434 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8435 and change return type to boolean.
8436 (run_breakpoint_commands): New function.
8437 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8438 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8439 breakpoint. Go through the_target->remove_point instead of
8440 assuming memory breakpoint.
8441 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8442 software and hardware breakpoints.
8443 (reinsert_raw_breakpoint): Go through the_target->insert_point
8444 instead of assuming memory breakpoint.
8445 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8446 software and hardware breakpoints.
8447 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8448 Check both software and hardware breakpoints.
8449 (validate_inserted_breakpoint): Assert the breakpoint is a
8450 software breakpoint. Set the inserted flag to -1 instead of
8451 setting shlib_disabled.
8452 (delete_disabled_breakpoints): Adjust.
8453 (validate_breakpoints): Only validate software breakpoints.
8454 Adjust to inserted flag change.
8455 (check_mem_read, check_mem_write): Skip breakpoint types other
8456 than software breakpoints. Adjust to inserted flag change.
8457 * mem-break.h (enum raw_bkpt_type): New enum.
8458 (raw_breakpoint, struct process_info): Forward declare.
8459 (Z_packet_to_target_hw_bp_type): Delete declaration.
8460 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8461 (set_gdb_breakpoint, delete_gdb_breakpoint)
8462 (clear_breakpoint_conditions): New declarations.
8463 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8464 (breakpoint_inserted_here): Update comment.
8465 (add_breakpoint_condition, add_breakpoint_commands): Replace
8466 address parameter with a breakpoint pointer parameter.
8467 (gdb_breakpoint_here): Update comment.
8468 (delete_gdb_breakpoint_at): Delete.
8469 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8470 * server.c (process_point_options): Take a struct breakpoint
8471 pointer instead of an address. Adjust.
8472 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8473 delete_gdb_breakpoint.
8474 * spu-low.c (spu_target_ops): Install NULL as
8475 supports_z_point_type method.
8476 * target.h: Include mem-break.h.
8477 (struct target_ops) <prepare_to_access_memory>: Update comment.
8478 <supports_z_point_type>: New field.
8479 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8480 instead of a char. Also take a raw breakpoint pointer.
8481 * win32-arm-low.c (the_low_target): Install NULL as
8482 supports_z_point_type.
8483 * win32-i386-low.c (i386_supports_z_point_type): New function.
8484 (i386_insert_point, i386_remove_point): Adjust to new interface.
8485 (the_low_target): Install i386_supports_z_point_type.
8486 * win32-low.c (win32_supports_z_point_type): New function.
8487 (win32_insert_point, win32_remove_point): Adjust to new interface.
8488 (win32_target_ops): Install win32_supports_z_point_type.
8489 * win32-low.h (struct win32_target_ops):
8490 <supports_z_point_type>: New method.
8491 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8492 instead of a char. Also take a raw breakpoint pointer.
8494 2014-05-20 Pedro Alves <palves@redhat.com>
8496 * mem-break.h: Include break-common.h.
8497 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8498 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8499 (Z_packet_to_target_hw_bp_type): New declaration.
8500 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8501 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8502 (Z_PACKET_ACCESS_WP): Delete macros.
8503 (Z_packet_to_hw_type): Delete function.
8504 * i386-low.h: Don't include break-common.h here.
8505 (Z_packet_to_hw_type): Delete declaration.
8506 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8507 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8508 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8509 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8510 * linux-aarch64-low.c: Don't include break-common.h here.
8511 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8512 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8513 (Z_packet_to_target_hw_bp_type): Delete function.
8514 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8516 (mips_insert_point, mips_remove_point): Use
8517 Z_packet_to_target_hw_bp_type.
8519 2014-05-20 Pedro Alves <palves@redhat.com>
8521 * linux-aarch64-low.c: Include break-common.h.
8522 (enum target_point_type): Delete.
8523 (Z_packet_to_point_type): Rename to ...
8524 (Z_packet_to_target_hw_bp_type): ... this, and return a
8525 target_hw_bp_type instead.
8526 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8527 instead of an enum target_point_type.
8528 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8530 (aarch64_dr_state_insert_one_point)
8531 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8532 (aarch64_handle_aligned_watchpoint)
8533 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8534 Take an enum target_hw_bp_type instead of an enum
8536 (aarch64_supports_z_point_type): New function.
8537 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8538 use Z_packet_to_target_hw_bp_type.
8540 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8542 * configure.ac: Only use -Werror by default when DEVELOPMENT
8544 * configure: Regenerate.
8546 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8548 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8549 * linux-x86-low.c (X86_64_USER_REGS): New.
8550 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8552 2014-04-28 Yao Qi <yao@codesourcery.com>
8554 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8557 2014-04-25 Pedro Alves <palves@redhat.com>
8560 * linux-low.c (linux_attach_fail_reason_string): New function.
8561 (linux_attach_lwp): Delete.
8562 (linux_attach_lwp_1): Rename to ...
8563 (linux_attach_lwp): ... this. 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): Adjust to call linux_attach_lwp. Call error on
8567 failure to attach to the tgid. Call warning when failing to
8569 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8570 argument. Remove "initial" parameter. Return int instead of
8571 void. Don't error or warn here.
8572 (linux_attach_fail_reason_string): New declaration.
8573 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8574 interface change. Use linux_attach_fail_reason_string.
8576 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8577 Walfred Tedeschi <walfred.tedeschi@intel.com>
8579 * Makefile.in: Added rules to handle new files
8580 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8581 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8582 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8583 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8584 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8585 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8587 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8588 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8589 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8590 i386/x32-avx512.xml.
8591 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8592 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8593 i386/x32-avx512-linux.xml.
8594 * i387-fp.c (num_avx512_k_registers): New constant for number
8596 (num_avx512_zmmh_low_registers): New constant for number of
8597 lower ZMM registers (0-15).
8598 (num_avx512_zmmh_high_registers): New constant for number of
8599 higher ZMM registers (16-31).
8600 (num_avx512_ymmh_registers): New contant for number of higher
8601 YMM registers (ymm16-31 added by avx521 on x86_64).
8602 (num_avx512_xmm_registers): New constant for number of higher
8603 XMM registers (xmm16-31 added by AVX512 on x86_64).
8604 (struct i387_xsave): Add space for AVX512 registers.
8605 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8606 Add code to handle AVX512 registers.
8607 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8608 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8609 prototypei from generated file.
8610 (tdesc_amd64_avx512_linux): Likewise.
8611 (init_registers_x32_avx512_linux): Likewise.
8612 (tdesc_x32_avx512_linux): Likewise.
8613 (init_registers_i386_avx512_linux): Likewise.
8614 (tdesc_i386_avx512_linux): Likewise.
8615 (x86_64_regmap): Add AVX512 registers.
8616 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8618 (initialize_low_arch): Add code to initialize AVX512 registers.
8620 2014-04-23 Pedro Alves <palves@redhat.com>
8622 * mem-break.c (find_gdb_breakpoint_at): Make static.
8623 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8625 2014-04-23 Pedro Alves <palves@redhat.com>
8627 * i386-low.c: Don't include break-common.h here.
8628 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8629 prototype to take target_hw_bp_type as argument instead of a Z
8631 * i386-low.h: Include break-common.h here.
8632 (Z_packet_to_hw_type): Declare.
8633 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8635 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8636 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8637 (x86_remove_point): Convert the packet number to a
8638 target_hw_bp_type before calling i386_low_remove_watchpoint.
8639 * win32-i386-low.c (i386_insert_point): Convert the packet number
8640 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8641 (i386_remove_point): Convert the packet number to a
8642 target_hw_bp_type before calling i386_low_remove_watchpoint.
8644 2014-04-23 Pedro Alves <palves@redhat.com>
8646 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8648 2014-04-10 Pedro Alves <palves@redhat.com>
8650 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8651 Check if the condition or command is NULL before checking if the
8652 breakpoint is known. On success, return true.
8653 * mem-break.h (add_breakpoint_condition): Document return.
8654 (add_breakpoint_commands): Add describing comment.
8655 * server.c (skip_to_semicolon): New function.
8656 (process_point_options): Use it.
8658 2014-04-09 Pedro Alves <palves@redhat.com>
8660 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8663 2014-02-27 Pedro Alves <palves@redhat.com>
8666 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8668 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8670 (last_thread_of_process_p): Take a PID argument instead of a
8672 (linux_wait_for_lwp): Delete.
8673 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8675 (linux_low_filter_event): New function, party factored out from
8676 linux_wait_for_event.
8677 (linux_wait_for_event): Rename to ...
8678 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8679 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8680 sigsuspend. Check for zombie leaders.
8681 (linux_wait_for_event): Reimplement as wrapper around
8682 linux_wait_for_event_filtered.
8683 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8684 a normal or signal exit is seen, it's the whole process exiting.
8685 (wait_for_sigstop): No longer a for_each_inferior callback.
8686 Rewrite on top of linux_wait_for_event_filtered.
8687 (stop_all_lwps): Call wait_for_sigstop directly.
8688 * server.c (resume, handle_target_event): Handle
8689 TARGET_WAITKIND_NO_RESUMED.
8691 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8693 * win32-low.c (psapi_get_dll_name,
8694 * win32_CreateToolhelp32Snapshot): Delete.
8695 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8696 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8698 (handle_load_dll): Add function description.
8699 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8701 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8703 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8705 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8706 base address when calling win32_add_one_solib.
8707 (handle_load_dll): Delete local variable load_addr.
8708 Remove 0x1000 offset applied to DLL base address when calling
8709 win32_add_one_solib.
8710 (handle_unload_dll): Add comment.
8712 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8714 * win32-low.c (win32_add_all_dlls): Renames
8715 win32_ensure_ntdll_loaded. Rewrite function documentation.
8716 Adjust implementation to always load all DLLs.
8717 Add 0x1000 offset to DLL base address when calling
8718 win32_add_one_solib.
8719 (child_initialization_done): New static global.
8720 (do_initial_child_stuff): Set child_initialization_done to
8721 zero during child initialization, and 1 after. Replace call
8722 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8724 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8725 (handle_unload_dll): Add function documentation.
8726 (get_child_debug_event): Ignore load and unload DLL events
8727 during child initialization.
8729 2014-02-20 Doug Evans <dje@google.com>
8731 Remove global all_lwps.
8732 * inferiors.h (ptid_of): Move here from linux-low.h.
8733 (pid_of, lwpid_of): Ditto.
8734 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8735 parameter is a struct thread_info * now.
8736 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8737 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8738 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8740 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8741 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8742 * linux-arm-low.c (update_registers_callback): Update, "entry"
8743 parameter is a struct thread_info * now.
8744 Fetch lwpid from current_inferior directly.
8745 (arm_insert_point): Pass &all_threads to find_inferior instead of
8747 (arm_remove_point): Ditto.
8748 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8749 (arm_prepare_to_resume): Fetch pid from thread.
8750 (arm_read_description): Fetch lwpid from current_inferior directly.
8751 * linux-low.c (all_lwps): Delete.
8752 (delete_lwp): Delete call to remove_inferior.
8753 (handle_extended_wait): Fetch lwpid from thread.
8754 (add_lwp): Don't set lwp->entry.id. Remove call to
8755 add_inferior_to_list.
8756 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8757 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8758 (kill_one_lwp_callback): Ditto.
8759 (linux_kill): Don't dereference NULL pointer.
8760 Fetch ptid,lwpid from thread.
8761 (get_detach_signal): Fetch ptid from thread.
8762 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8763 Simplify call to regcache_invalidate_thread.
8764 (delete_lwp_callback): Update, "entry" parameter is a
8765 struct thread_info * now. Fetch pid from thread.
8766 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8767 (status_pending_p_callback): Update, "entry" parameter is a
8768 struct thread_info * now. Fetch ptid from thread.
8769 (find_lwp_pid): Update, "entry" parameter is a
8770 struct thread_info * now.
8771 (linux_wait_for_lwp): Fetch pid from thread.
8772 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8773 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8774 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8775 (dequeue_one_deferred_signal): Ditto.
8776 (cancel_breakpoint): Fetch ptid from current_inferior.
8777 (linux_wait_for_event): Pass &all_threads to find_inferior,
8778 not &all_lwps. Fetch ptid, lwpid from thread.
8779 (count_events_callback): Update, "entry" parameter is a
8780 struct thread_info * now.
8781 (select_singlestep_lwp_callback): Ditto.
8782 (select_event_lwp_callback): Ditto.
8783 (cancel_breakpoints_callback): Ditto.
8784 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8786 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8787 (unsuspend_one_lwp): Update, "entry" parameter is a
8788 struct thread_info * now.
8789 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8791 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8792 Fetch lwpid from thread, not lwp.
8793 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8794 Pass &all_threads to find_inferior, not &all_lwps.
8795 (send_sigstop): Fetch lwpid from thread, not lwp.
8796 (send_sigstop_callback): Update, "entry" parameter is a
8797 struct thread_info * now.
8798 (suspend_and_send_sigstop_callback): Ditto.
8799 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8800 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8801 struct thread_info * now.
8802 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8804 (lwp_running): Update, "entry" parameter is a
8805 struct thread_info * now.
8806 (stop_all_lwps): Fetch ptid from thread.
8807 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8808 (linux_resume_one_lwp): Fetch lwpid from thread.
8809 (linux_set_resume_request): Update, "entry" parameter is a
8810 struct thread_info * now. Fetch pid, lwpid from thread.
8811 (resume_status_pending_p): Update, "entry" parameter is a
8812 struct thread_info * now.
8813 (need_step_over_p): Ditto. Fetch lwpid from thread.
8814 (start_step_over): Fetch lwpid from thread.
8815 (linux_resume_one_thread): Update, "entry" parameter is a
8816 struct thread_info * now. Fetch lwpid from thread.
8817 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8818 (proceed_one_lwp): Update, "entry" parameter is a
8819 struct thread_info * now. Fetch lwpid from thread.
8820 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8821 struct thread_info * now.
8822 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8823 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8824 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8826 (regsets_store_inferior_registers): Ditto.
8827 (fetch_register, store_register): Ditto.
8828 (linux_read_memory, linux_write_memory): Ditto.
8829 (linux_request_interrupt): Ditto.
8830 (linux_read_auxv): Ditto.
8831 (linux_xfer_siginfo): Ditto.
8832 (linux_qxfer_spu): Ditto.
8833 (linux_qxfer_libraries_svr4): Ditto.
8834 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8835 moved to inferiors.h.
8837 (get_thread_lwp): Update.
8838 (struct lwp_info): Delete member "entry". Simplify comment for
8841 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8842 current_inferior directly.
8843 (update_watch_registers_callback): Update, "entry" parameter is a
8844 struct thread_info * now. Fetch pid from thread.
8845 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8846 (mips_insert_point): Fetch lwpid from current_inferior.
8847 Pass &all_threads to find_inferior, not &all_lwps.
8848 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8849 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8851 (mips_stopped_data_address): Ditto.
8852 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8854 * linux-tile-low.c (tile_arch_setup): Ditto.
8855 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8856 (update_debug_registers_callback): Update, "entry" parameter is a
8857 struct thread_info * now. Fetch pid from thread.
8858 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8859 Pass &all_threads to find_inferior, not &all_lwps.
8860 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8861 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8862 Pass &all_threads to find_inferior, not &all_lwps.
8863 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8864 (i386_dr_low_get_status): Ditto.
8865 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8866 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8867 (x86_linux_read_description): Ditto.
8868 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8870 2014-02-20 Doug Evans <dje@google.com>
8872 * inferiors.c (get_first_inferior): Fix buglet.
8874 2014-02-19 Doug Evans <dje@google.com>
8876 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8877 * inferiors.c (add_thread): Change result type to struct thread_info *.
8878 All callers updated.
8879 (add_lwp): Call add_thread here instead of in callers.
8880 All callers updated.
8881 * linux-low.h (get_lwp_thread): Rewrite.
8882 (struct lwp_info): New member "thread".
8884 2014-02-19 Doug Evans <dje@google.com>
8886 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8887 All callers updated.
8889 2014-02-19 Doug Evans <dje@google.com>
8891 * inferiors.c (add_thread): Fix whitespace.
8893 2014-02-19 Doug Evans <dje@google.com>
8895 * dll.c (clear_dlls): Replace accessing list implemention details
8897 * gdbthread.h (get_first_thread): Declare.
8898 * inferiors.c (for_each_inferior_with_data): New function.
8899 (get_first_thread): New function.
8900 (find_thread_ptid): Simplify.
8901 (get_first_inferior): New function.
8902 (clear_list): Delete.
8903 (one_inferior_p): New function.
8904 (clear_inferior_list): New function.
8905 (clear_inferiors): Update.
8906 * inferiors.h (for_each_inferior_with_data): Declare.
8907 (clear_inferior_list): Declare.
8908 (one_inferior_p): Declare.
8909 (get_first_inferior): Declare.
8910 * linux-low.c (linux_wait_for_event): Replace accessing list
8911 implemention details with API function.
8912 * server.c (target_running): Ditto.
8913 (accumulate_file_name_length): New function.
8914 (emit_dll_description): New function.
8915 (handle_qxfer_libraries): Replace accessing list implemention
8916 details with API function.
8917 (handle_qxfer_threads_worker): New function.
8918 (handle_qxfer_threads_proper): Replace accessing list implemention
8919 details with API function.
8920 (handle_query): Ditto.
8921 (visit_actioned_threads_callback_ftype): New typedef.
8922 (visit_actioned_threads_data): New struct.
8923 (visit_actioned_threads): Rewrite to be find_inferior callback.
8924 (resume): Call find_inferior.
8925 (handle_status): Replace accessing list implemention
8926 details with API function.
8927 (process_serial_event): Replace accessing list implemention details
8929 * target.c (set_desired_inferior): Replace accessing list implemention
8930 details with API function.
8931 * tracepoint.c (same_process_p): New function.
8932 (gdb_agent_about_to_close): Replace accessing list implemention
8933 details with API function.
8934 * win32-low.c (child_delete_thread): Replace accessing list
8935 implemention details with API function.
8936 (match_dll_by_basename): New function.
8937 (dll_is_loaded_by_basename): New function.
8938 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8939 details call to dll_is_loaded_by_basename.
8941 2014-02-19 Doug Evans <dje@google.com>
8943 * dll.h (struct dll_info): Add comment.
8944 * gdbthread.h (struct thread_info): Add comment.
8945 (current_ptid): Simplify.
8946 * inferiors.c (add_process): Update.
8947 (remove_process): Update.
8948 * inferiors.h (struct process_info): Rename member "head" to "entry".
8949 * linux-low.c (delete_lwp): Update.
8951 (last_thread_of_process_p): Update.
8952 (kill_one_lwp_callback, linux_kill): Update.
8953 (status_pending_p_callback): Update.
8954 (wait_for_sigstop): Update. Simplify read of ptid.
8955 (start_step_over): Update.
8956 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8957 (get_lwp_thread): Update.
8958 (struct lwp_info): Rename member "head" to "entry".
8959 * regcache.h (inferior_list_entry): Delete.
8960 * server.c (kill_inferior_callback): Update.
8961 (detach_or_kill_inferior_callback): Update.
8962 (print_started_pid): Update.
8963 (print_attached_pid): Update.
8964 (process_serial_event): Simplify read of ptid.
8965 * thread-db.c (thread_db_create_event): Update.
8966 (thread_db_get_tls_address): Update.
8967 * win32-low.c (current_inferior_ptid): Simplify.
8969 2014-02-19 Tom Tromey <tromey@redhat.com>
8971 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8973 (target_supports_btrace): Update.
8975 2014-02-14 Yao Qi <yao@codesourcery.com>
8977 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8978 (rsp-low-ipa.o): New target.
8980 2014-02-12 Tom Tromey <tromey@redhat.com>
8982 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8983 convert_ascii_to_int.
8984 * regcache.c (registers_to_string): Likewise.
8985 * remote-utils.c (decode_M_packet): Likewise.
8986 * server.c (process_serial_event): Likewise.
8988 2014-02-12 Tom Tromey <tromey@redhat.com>
8990 * server.c (handle_query, handle_v_run): Use hex2bin, not
8992 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8994 2014-02-12 Tom Tromey <tromey@redhat.com>
8996 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8997 convert_int_to_ascii.
8998 * regcache.c (registers_to_string, collect_register_as_string):
9000 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9002 * server.c (process_serial_event): Likewise.
9003 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9004 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9006 2014-02-12 Tom Tromey <tromey@redhat.com>
9008 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9009 bin2hex, not hexify.
9010 * tracepoint.c (cmd_qtstatus): Likewise.
9012 2014-02-12 Tom Tromey <tromey@redhat.com>
9014 * remote-utils.c (monitor_output): Pass explicit length to
9017 2014-02-12 Tom Tromey <tromey@redhat.com>
9019 * tracepoint.c: Include rsp-low.h.
9020 * server.c: Include rsp-low.h.
9021 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9022 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9024 * remote-utils.c: Include rsp-low.h.
9025 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9026 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9027 (convert_int_to_ascii, convert_ascii_to_int): Move to
9029 * regcache.c: Include rsp-low.h.
9030 * ax.c: Include rsp-low.h.
9031 * Makefile.in (SFILES): Add common/rsp-low.c.
9032 (OBS): Add rsp-low.o.
9033 (rsp-low.o): New target.
9035 2014-02-12 Tom Tromey <tromey@redhat.com>
9037 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9038 Include print-utils.h.
9039 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9040 (plongest, thirty_two, phex_nz): Remove.
9041 * Makefile.in (SFILES): Add common/print-utils.c.
9042 (OBS): Add print-utils.o.
9043 (print-utils-ipa.o): New target.
9044 (print-utils.o): New target.
9045 (IPA_OBJS): Add print-utils-ipa.o.
9047 2014-02-06 Tom Tromey <tromey@redhat.com>
9049 * Makefile.in (SFILES): Fix indentation.
9051 2014-02-05 Doug Evans <dje@google.com>
9053 * linux-low.c (linux_wait_for_event): Improve comment.
9054 (linux_wait_1): Keep current_inferior in sync with event_child.
9056 2014-01-22 Doug Evans <dje@google.com>
9058 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9060 2014-01-22 Doug Evans <dje@google.com>
9062 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9063 * configure: Regenerate.
9064 * config.in: Regenerate.
9065 * Makefile.in (SFILES): Add debug.c.
9067 * debug.c: New file.
9068 * debug.h: New file.
9069 * linux-aarch64-low.c (*): Update all debugging printfs to use
9070 debug_printf instead of fprintf.
9071 * linux-arm-low.c (*): Ditto.
9072 * linux-cris-low.c (*): Ditto.
9073 * linux-crisv32-low.c (*): Ditto.
9074 * linux-m32r-low.c (*): Ditto.
9075 * linux-sparc-low.c (*): Ditto.
9076 * linux-x86.c (*): Ditto.
9077 * linux-low.c (*): Ditto.
9078 (linux_wait_1): Add calls to debug_enter, debug_exit.
9079 (linux_wait): Remove redundant debugging printf.
9080 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9081 (linux_resume, unstop_all_lwps): Ditto.
9082 * mem-break.c (*): Update all debugging printfs to use
9083 debug_printf instead of fprintf.
9084 * remote-utils.c (*): Ditto.
9085 * thread-db.c (*): Ditto.
9086 * server.c #include <ctype.h>, "gdb_vecs.h".
9087 (debug_threads): Moved to debug.c.
9088 (*): Update all debugging printfs to use debug_printf instead of
9090 (start_inferior): Replace call to fflush with call to debug_flush.
9091 (monitor_show_help): Mention set debug-format.
9092 (parse_debug_format_options): New function.
9093 (handle_monitor_command): Handle "monitor set debug-format".
9094 (gdbserver_usage): Mention --debug-format.
9095 (main): Parse --debug-format.
9096 * server.h (debug_threads): Declaration moved to debug.h.
9098 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9099 trace_debug_1 that uses debug_printf.
9100 (tracepoint_look_up_symbols): Update all debugging printfs to use
9101 debug_printf instead of fprintf.
9103 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9105 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9108 2014-01-17 Pedro Alves <palves@redhat.com>
9111 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9112 defined after including gdb_proc_service.h.
9114 2014-01-16 Doug Evans <dje@google.com>
9116 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9117 (match_dll): Use it.
9119 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9121 * target.h (target_ops) <read_btrace>: Change parameters and
9122 return type to allow error reporting.
9123 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9124 trace reading errors on.
9125 * linux-low.c (linux_low_read_btrace): Pass trace reading
9127 (linux_low_disable_btrace): New.
9129 2014-01-15 Doug Evans <dje@google.com>
9131 * inferiors.c (thread_id_to_gdb_id): Delete.
9132 * inferiors.h (thread_id_to_gdb_id): Delete.
9134 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9136 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9137 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9140 2014-01-08 Pedro Alves <palves@redhat.com>
9142 * server.c (handle_status): Don't discard previous queued stop
9143 replies or thread's pending status here.
9144 (main) <disconnection>: Do it here instead.
9146 2014-01-08 Pedro Alves <palves@redhat.com>
9148 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9149 * server.c (visit_actioned_threads, handle_pending_status): New
9151 (handle_v_cont): Factor out parts to ...
9152 (resume): ... this new function. If in all-stop, and a thread
9153 being resumed has a pending status, report it without actually
9155 (myresume): Adjust to use the new 'resume' function.
9156 (clear_pending_status_callback, set_pending_status_callback)
9157 (find_status_pending_thread_callback): New functions.
9158 (handle_status): Handle the case of multiple threads having
9159 interesting statuses to report. Report threads' real last signal
9160 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9161 with an interesting thread to report the status for, instead of
9162 always reporting the status of the first thread.
9164 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9166 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9167 * gdbreplay.c (gdbreplay_version): Likewise.
9169 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9171 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9172 iov.iov_len with the real length in use.
9174 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9176 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9177 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9178 for all targets that use win32-low.c.
9179 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9180 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9182 2013-12-13 Pedro Alves <palves@redhat.com>
9184 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9185 if equal to TARGET_WAITKIND_LOADED.
9186 * win32-low.c (cached_status): New static global.
9187 (win32_wait): Add declaration.
9188 (do_initial_child_stuff): Flush all initial pending debug events
9189 up to the initial breakpoint.
9190 (win32_wait): If CACHED_STATUS was set, return that instead
9191 of doing a real wait. Remove the code resuming the execution
9192 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9193 during the initial phase. Also remove the code changing
9194 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9195 TARGET_WAITKIND_STOPPED.
9197 2013-12-11 Yao Qi <yao@codesourcery.com>
9199 * notif.c (handle_notif_ack): Return 0 if no notification
9202 2013-11-20 Doug Evans <dje@google.com>
9204 * linux-low.c (linux_set_resume_request): Fix comment.
9206 2013-11-20 Doug Evans <dje@google.com>
9208 * linux-low.c (resume_status_pending_p): Tweak comment.
9210 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9212 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9213 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9214 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9215 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9216 (srv_amd64_regobj): Add amd64-mpx.o.
9217 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9218 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9219 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9220 * i387-fp.c (num_pl_bnd_register) Added constant.
9221 (num_pl_bnd_cfg_registers) Added constant.
9222 (struct i387_xsave) Added reserved area and MPX fields.
9223 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9224 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9226 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9227 (init_registers_amd64_mpx_linux): Declare new function.
9228 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9229 (x86_64_regmap): Add MPX registers.
9230 (x86_linux_read_description): Add MPX case.
9231 (initialize_low_arch): Initialize MPX targets.
9233 2013-11-18 Tom Tromey <tromey@redhat.com>
9235 * configure: Rebuild.
9236 * configure.ac: Don't check for stdlib.h.
9237 * gdbreplay.c: Unconditionally include stdlib.h.
9239 2013-11-18 Tom Tromey <tromey@redhat.com>
9241 * config.in: Rebuild.
9242 * configure: Rebuild.
9243 * configure.ac: Don't use AC_HEADER_DIRENT.
9245 2013-11-18 Tom Tromey <tromey@redhat.com>
9247 * server.h: Don't check HAVE_STRING_H.
9248 * gdbreplay.c: Don't check HAVE_STRING_H.
9249 * configure: Rebuild.
9251 2013-11-18 Tom Tromey <tromey@redhat.com>
9253 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9256 2013-11-08 Tom Tromey <tromey@redhat.com>
9258 * configure, config.in: Rebuild.
9259 * configure.ac: Remove unused configury.
9261 2013-11-08 Tom Tromey <tromey@redhat.com>
9263 * acinclude.m4: Include common.m4, codeset.m4.
9264 * configure, config.in: Rebuild.
9265 * configure.ac: Use GDB_AC_COMMON.
9267 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9269 * linux-s390-low.c (HWCAP_S390_TE): New define.
9270 (s390_arch_setup): Consider the TE field in the HWCAP for
9271 determining 'have_regset_tdb'.
9273 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9276 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9279 2013-10-02 Pedro Alves <palves@redhat.com>
9281 * server.c (process_serial_event): Don't output "GDBserver
9282 exiting" if GDB is connected through stdio.
9283 * target.c (mywait): Likewise, be silent if GDB is connected
9286 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9288 * lynx-low.c (lynx_add_threads_after_attach): New function.
9289 (lynx_attach): Remove call to add_thread. Add call to
9290 lynx_add_threads_after_attach instead.
9292 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9294 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9295 * config.in, configure: Regenerated.
9297 2013-09-18 Yao Qi <yao@codesourcery.com>
9300 * server.c (start_inferior): Clear 'resume_info'.
9302 2013-09-16 Jiong Wang <jiwang@tilera.com>
9304 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9307 2013-09-16 Jiong Wang <jiwang@tilera.com>
9309 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9310 linux-tile-low.o to srv_tgtobj.
9312 2013-09-16 Will Newton <will.newton@linaro.org>
9314 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9317 2013-09-06 Pedro Alves <palves@redhat.com>
9319 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9320 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9321 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9322 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9323 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9324 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9326 2013-09-06 Pedro Alves <palves@redhat.com>
9328 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9329 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9331 2013-09-06 Pedro Alves <palves@redhat.com>
9333 * linux-amd64-ipa.c: Include tracepoint.h.
9334 * linux-i386-ipa.c: Include tracepoint.h.
9336 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9338 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9339 (ps_get_thread_area): New function.
9341 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9343 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9344 (initialize_low_arch): Call init_registers_crisv32 rather than
9345 init_register_crisv32.
9347 2013-09-05 Pedro Alves <palves@redhat.com>
9349 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9351 * hostio.h: ... this new file.
9352 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9353 win32-low.c: Include hostio.h.
9355 2013-09-05 Pedro Alves <palves@redhat.com>
9357 * server.h (gdb_client_data, handler_func, callback_handler_func)
9358 (delete_file_handler, add_file_handler, append_callback_event)
9359 (delete_callback_event, start_event_loop, initialize_event_loop):
9360 Move to event-loop.h and include it.
9361 * event-loop.h: New file.
9363 2013-09-05 Pedro Alves <palves@redhat.com>
9365 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9366 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9367 (loaded_dll, unloaded_dll): Move to ...
9368 * dll.h: ... this new file.
9369 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9371 2013-09-05 Pedro Alves <palves@redhat.com>
9373 * server.h (current_process, get_thread_process, all_processes)
9374 (add_inferior_to_list, for_each_inferior, current_inferior)
9375 (remove_inferior, add_process, remove_process, find_process_pid)
9376 (have_started_inferiors_p, have_attached_inferiors_p)
9377 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9378 (clear_inferiors, find_inferior, find_inferior_id)
9379 (inferior_target_data, set_inferior_target_data)
9380 (inferior_regcache_data, set_inferior_regcache_data): Move to
9381 inferiors.h, and include it.
9382 * inferiors.h: New file.
9384 2013-09-05 Pedro Alves <palves@redhat.com>
9386 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9390 2013-09-05 Pedro Alves <palves@redhat.com>
9392 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9394 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9395 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9396 (handle_tracepoint_general_set, handle_tracepoint_query)
9397 (tracepoint_finished_step, tracepoint_was_hit)
9398 (release_while_stepping_state_list, current_traceframe)
9399 (in_readonly_region, traceframe_read_mem)
9400 (fetch_traceframe_registers, traceframe_read_sdata)
9401 (traceframe_read_info, struct fast_tpoint_collect_status)
9402 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9403 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9404 (supply_fast_tracepoint_registers)
9405 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9406 (ipa_tdesc, claim_trampoline_space)
9407 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9408 (agent_mem_read, agent_get_trace_state_variable_value)
9409 (agent_set_trace_state_variable_value, agent_tsv_read)
9410 (agent_mem_read_string, get_raw_reg_func_addr)
9411 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9412 * tracepoint.h: ... this new file.
9414 2013-09-05 Pedro Alves <palves@redhat.com>
9416 * server.h (perror_with_name, error, fatal, warning, paddress)
9417 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9419 * utils.h: New file.
9421 2013-09-05 Pedro Alves <palves@redhat.com>
9423 * server.h (remote_debug, noack_mode, transport_is_reliable)
9424 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9425 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9426 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9427 (write_enn, initialize_async_io, enable_async_io)
9428 (disable_async_io, check_remote_input_interrupt_request)
9429 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9430 (dead_thread_notify, prepare_resume_reply)
9431 (decode_address_to_semicolon, decode_address, decode_m_packet)
9432 (decode_M_packet, decode_X_packet, decode_xfer_write)
9433 (decode_search_memory_packet, unhexify, hexify)
9434 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9435 (look_up_one_symbol, relocate_instruction)
9436 (monitor_output): Move to remote-utils.h, and include it.
9437 * remote-utils.h: New file.
9439 2013-09-05 Pedro Alves <palves@redhat.com>
9441 * server.h (_): Delete.
9443 2013-09-02 Pedro Alves <palves@redhat.com>
9445 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9446 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9448 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9450 2013-09-02 Pierre Muller <muller@sourceware.org>
9452 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9453 or WriteProcessMemory complete successfully and handle
9454 ERROR_PARTIAL_COPY error.
9456 2013-09-02 Pedro Alves <palves@redhat.com>
9458 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9459 error instead of EIO.
9461 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9464 * linux-low.c: Include filestuff.h.
9465 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9466 * lynx-low.c: Include filestuff.h.
9467 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9468 * server.c: Include filestuff.h.
9469 (main): Call notice_open_fds.
9470 * spu-low.c: Include filestuff.h.
9471 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9473 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9475 * Makefile.in: Explain why ../target and ../nat are not
9476 listed as include file search paths.
9477 (linux-waitpid.o): New object file rule.
9478 * configure.srv (srv_native_linux_obj): New variable.
9479 Replace all occurrences of linux native object files with
9480 $srv_native_linux_obj.
9481 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9482 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9483 (linux_enable_event_reporting): Remove declaration.
9484 (my_waitpid): Moved to common/linux-waitpid.c.
9485 (linux_wait_for_event): Pass ptid when calling
9486 linux_enable_event_reporting.
9487 (linux_supports_tracefork_flag): Remove.
9488 (linux_enable_event_reporting): Likewise.
9489 (linux_tracefork_grandchild): Remove.
9490 (STACK_SIZE): Moved to common/linux-ptrace.c.
9491 (linux_tracefork_child): Remove.
9492 (linux_test_for_tracefork): Remove.
9493 (linux_look_up_symbols): Call linux_supports_traceclone.
9494 (initialize_low): Remove call to linux_test_for_tracefork.
9495 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9496 common/linux-ptrace.h.
9497 (PTRACE_TYPE_ARG4): Likewise.
9498 Include linux-ptrace.h.
9500 2013-08-21 Pedro Alves <palves@redhat.com>
9502 * config.in: Renegerate.
9504 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9506 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9507 (SFILES): Remove $(srcdir)/common/target-common.c and
9508 add $(srcdir)/target/waitstatus.c.
9509 (OBS): Remove target-common.o and add waitstatus.o.
9510 (server_h): Remove $(srcdir)/../common/target-common.h and
9511 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9512 and $(srcdir)/../target/waitstatus.h.
9513 (target-common.o): Remove.
9514 (waitstatus.o): New target object file.
9515 * target.h: Do not include target-common.h and
9516 include target/resume.h, target/wait.h and
9517 target/waitstatus.h.
9519 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9521 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9522 to PTRACE_TYPE_ARG3.
9523 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9524 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9526 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9527 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9529 2013-07-27 Jie Zhang <jie@codesourcery.com>
9530 Daniel Jacobowitz <dan@codesourcery.com>
9531 Yao Qi <yao@codesourcery.com>
9533 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9534 (mips-linux-watch.o): New rule.
9535 (mips_linux_watch_h): New variable.
9536 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9538 * linux-mips-low.c: Include mips-linux-watch.h.
9539 (struct arch_process_info, struct arch_lwp_info): New.
9540 (update_watch_registers_callback): New function.
9541 (mips_linux_new_process, mips_linux_new_thread) New functions.
9542 (mips_linux_prepare_to_resume, mips_insert_point): New
9544 (mips_remove_point, mips_stopped_by_watchpoint): New
9546 (rsp_bp_type_to_target_hw_bp_type): New function.
9547 (mips_stopped_data_address): New function.
9548 (the_low_target): Add watchpoint support functions.
9550 2013-07-27 Yao Qi <yao@codesourcery.com>
9552 * i386-low.c: Include break-common.h.
9553 (enum target_hw_bp_type): Remove.
9555 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9557 * Makefile.in (SFILES): /common/target-common.c.
9558 (OBS): Add target-common.o.
9559 (server_h): Add $(srcdir)/../common/target-common.h.
9560 (target-common.o): New target.
9561 * server.c (queue_stop_reply_callback): Free
9562 status string after use.
9563 * target.c (target_waitstatus_to_string): Remove.
9564 * target.h: Include target-common.h.
9565 (resume_kind): Likewise.
9566 (target_waitkind): Likewise.
9567 (target_waitstatus): Likewise.
9568 (TARGET_WNOHANG): Likewise.
9570 2013-07-04 Yao Qi <yao@codesourcery.com>
9572 * Makefile.in (host_alias): Use @host_noncanonical@.
9573 (target_alias): Use @target_noncanonical@.
9574 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9575 ACX_NONCANONICAL_HOST.
9576 * configure: Regenerated.
9579 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9581 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9582 * configure: Rebuild.
9583 * Makefile.in (version_host, version_target): Get from configure.
9584 (version.c): Use $(version_host) and $(version_target).
9586 2013-07-03 Pedro Alves <palves@redhat.com>
9588 * Makefile.in (config.status): Depend on development.sh.
9589 * acinclude.m4: Include libmcheck.m4.
9590 * configure: Regenerate.
9592 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9594 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9595 attribute inside the parentheses.
9596 (winapi_DebugSetProcessKillOnExit): Ditto.
9597 (winapi_DebugBreakProcess): Ditto.
9598 (winapi_GenerateConsoleCtrlEvent): Ditto.
9600 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9602 * notif.h (notif_event): Add a dummy member to avoid compiler
9605 2013-07-01 Pedro Alves <palves@redhat.com>
9607 * hostio.c (HOSTIO_PATH_MAX): Define.
9608 (require_filename, handle_open, handle_unlink, handle_readlink):
9611 2013-07-01 Pedro Alves <palves@redhat.com>
9613 * server.h: Include "pathmax.h".
9614 * linux-low.c: Don't include sys/param.h.
9615 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9617 * win32-low.c: Don't include sys/param.h.
9618 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9620 2013-07-01 Pedro Alves <palves@redhat.com>
9622 * event-loop.c: Don't check HAVE_UNISTD_H before including
9624 * gdbreplay.c: Likewise.
9625 * remote-utils.c: Likewise.
9626 * server.c: Likewise.
9627 * configure.ac: Don't check for unistd.h.
9628 * configure: Regenerate.
9630 2013-06-28 Tom Tromey <tromey@redhat.com>
9632 * Makefile.in (version.c): Use version.in, not
9635 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9637 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9638 * configure: Rebuild.
9639 * Makefile.in (version_host, version_target): Get from configure.
9640 (version.c): Use $(version_host) and $(version_target).
9642 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9644 Fix trace-status to output user name without trailing colon.
9645 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9647 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9649 Fix trace-status to output proper start-time and stop-time.
9650 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9651 output start time and stop time in hex as gdb expects.
9653 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9655 * tracepoint.c (build_traceframe_info_xml): Output trace state
9656 variables present in the trace buffer.
9658 2013-06-24 Tom Tromey <tromey@redhat.com>
9660 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9662 (version.o): Remove.
9663 * gdbreplay.c: Include version.h.
9664 (version, host_name): Don't declare.
9665 * server.h: Include version.h.
9666 (version, host_name): Don't declare.
9668 2013-06-12 Pedro Alves <palves@redhat.com>
9670 * linux-x86-low.c (linux_is_elf64): Delete global.
9671 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9672 with local linux_pid_exe_is_elf_64_file use.
9674 2013-06-11 Pedro Alves <palves@redhat.com>
9676 * linux-low.c (regset_disabled, disable_regset): New functions.
9677 (regsets_fetch_inferior_registers)
9678 (regsets_store_inferior_registers): Use them.
9679 (initialize_regsets_info); Don't allocate the disabled_regsets
9681 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9684 2013-06-11 Pedro Alves <palves@redhat.com>
9686 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9689 2013-06-11 Pedro Alves <palves@redhat.com>
9691 * linux-x86-low.c (initialize_low_arch): Call
9692 init_registers_x32_avx_linux.
9694 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9696 Fix compatibility with Android Bionic.
9697 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9700 2013-06-07 Pedro Alves <palves@redhat.com>
9703 * Makefile.in (OBS): Add tdesc.o.
9704 (IPA_OBJS): Add tdesc-ipa.o.
9705 (tdesc-ipa.o): New rule.
9706 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9708 * linux-low.c (new_inferior): Delete.
9709 (disabled_regsets, num_regsets): Delete.
9710 (linux_add_process): Adjust to set the new per-process
9712 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9713 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9714 was a stop. When calling arch_setup, switch the current inferior
9715 to the thread that got an event.
9716 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9717 (regsets_fetch_inferior_registers)
9718 (regsets_store_inferior_registers): New regsets_info parameter.
9720 (linux_register_in_regsets): New regs_info parameter. Adjust to
9722 (register_addr, fetch_register, store_register): New usrregs_info
9723 parameter. Adjust to use it.
9724 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9725 parameter regs_info. Adjust to use it.
9726 (linux_fetch_registers): Get the current inferior's regs_info, and
9728 (linux_store_registers): Ditto.
9729 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9730 (initialize_low): Don't initialize the target_regsets here. Call
9731 initialize_low_arch.
9732 * linux-low.h (target_regsets): Delete declaration.
9733 (struct regsets_info): New.
9734 (struct usrregs_info): New.
9735 (struct regs_info): New.
9736 (struct process_info_private) <new_inferior>: New field.
9737 (struct linux_target_ops): Delete the num_regs, regmap, and
9738 regset_bitmap fields. New field regs_info.
9739 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9740 * i387-fp.c (num_xmm_registers): Delete.
9741 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9742 calls to new interface.
9743 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9744 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9745 Infer the number of xmm registers from the regcache's target
9747 * i387-fp.h (num_xmm_registers): Delete.
9748 * inferiors.c (add_thread): Don't install the thread's regcache
9750 * proc-service.c (gregset_info): Fetch the current inferior's
9751 regs_info. Adjust to use it.
9752 * regcache.c: Include tdesc.h.
9753 (register_bytes, reg_defs, num_registers)
9754 (gdbserver_expedite_regs): Delete.
9755 (get_thread_regcache): If the thread doesn't have a regcache yet,
9756 create one, instead of aborting gdbserver.
9757 (regcache_invalidate_one): Rename to ...
9758 (regcache_invalidate_thread): ... this.
9759 (regcache_invalidate_one): New.
9760 (regcache_invalidate): Only invalidate registers of the current
9762 (init_register_cache): Add target_desc parameter, and use it.
9763 (new_register_cache): Ditto. Assert the target description has a
9764 non zero registers_size.
9765 (regcache_cpy): Add assertions. Adjust.
9766 (realloc_register_cache, set_register_cache): Delete.
9767 (registers_to_string, registers_from_string): Adjust.
9768 (find_register_by_name, find_regno, find_register_by_number)
9769 (register_cache_size): Add target_desc parameter, and use it.
9770 (free_register_cache_thread, free_register_cache_thread_one)
9771 (regcache_release, register_cache_size): New.
9772 (register_size): Add target_desc parameter, and use it.
9773 (register_data, supply_register, supply_register_zeroed)
9774 (supply_regblock, supply_register_by_name, collect_register)
9775 (collect_register_as_string, collect_register_by_name): Adjust.
9776 * regcache.h (struct target_desc): Forward declare.
9777 (struct regcache) <tdesc>: New field.
9778 (init_register_cache, new_register_cache): Add target_desc
9780 (regcache_invalidate_thread): Declare.
9781 (regcache_invalidate_one): Delete declaration.
9782 (regcache_release): Declare.
9783 (find_register_by_number, register_cache_size, register_size)
9784 (find_regno): Add target_desc parameter.
9785 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9787 * remote-utils.c: Include tdesc.h.
9788 (outreg, prepare_resume_reply): Adjust.
9789 * server.c: Include tdesc.h.
9790 (gdbserver_xmltarget): Delete declaration.
9791 (get_features_xml, process_serial_event): Adjust.
9792 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9794 (struct process_info) <tdesc>: New field.
9795 (ipa_tdesc): Declare.
9796 * tdesc.c: New file.
9797 * tdesc.h: New file.
9798 * tracepoint.c: Include tdesc.h.
9799 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9800 (get_context_regcache): Adjust to pass ipa_tdesc down.
9801 (do_action_at_tracepoint): Adjust to get the register cache size
9802 from the context regcache's description.
9803 (traceframe_walk_blocks): Adjust to get the register cache size
9804 from the current trace frame's description.
9805 (traceframe_get_pc): Adjust to get current trace frame's
9806 description and pass it down.
9807 (gdb_collect): Adjust to get the register cache size from the
9809 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9810 (gdbserver_xmltarget): Delete.
9811 (initialize_low_tracepoint): Set the ipa's target description.
9812 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9813 (initialize_low_tracepoint): Set the ipa's target description.
9814 * linux-x86-low.c: Include tdesc.h.
9815 [__x86_64__] (is_64bit_tdesc): New.
9816 (ps_get_thread_area, x86_get_thread_area): Use it.
9817 (i386_cannot_store_register): Rename to ...
9818 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9819 (i386_cannot_fetch_register): Rename to ...
9820 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9821 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9823 (target_regsets): Rename to ...
9824 (x86_regsets): ... this.
9825 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9827 (x86_siginfo_fixup): Use is_64bit_tdesc.
9828 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9829 (tdesc_x32_avx_linux, tdesc_x32_linux)
9830 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9832 (x86_linux_update_xmltarget): Delete.
9833 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9834 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9835 (AMD64_LINUX_USER64_CS): New.
9836 (x86_linux_read_description): New, based on
9837 x86_linux_update_xmltarget.
9838 (same_process_callback): New.
9839 (x86_arch_setup_process_callback): New.
9840 (x86_linux_update_xmltarget): New.
9841 (x86_regsets_info): New.
9842 (amd64_linux_regs_info): New.
9843 (i386_linux_usrregs_info): New.
9844 (i386_linux_regs_info): New.
9845 (x86_linux_regs_info): New.
9846 (x86_arch_setup): Reimplement.
9847 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9848 (x86_emit_ops): Ditto.
9849 (the_low_target): Adjust. Install x86_linux_regs_info,
9850 x86_cannot_fetch_register, and x86_cannot_store_register.
9851 (initialize_low_arch): New.
9852 * linux-ia64-low.c (tdesc_ia64): Declare.
9853 (ia64_fetch_register): Adjust.
9854 (ia64_usrregs_info, regs_info): New globals.
9855 (ia64_regs_info): New function.
9856 (the_low_target): Adjust.
9857 (initialize_low_arch): New function.
9858 * linux-sparc-low.c (tdesc_sparc64): Declare.
9859 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9861 (sparc_arch_setup): New function.
9862 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9863 (the_low_target): Adjust.
9864 (initialize_low_arch): New function.
9865 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9866 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9867 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9868 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9869 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9870 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9871 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9872 (tdesc_powerpc_isa205_vsx64l): Declare.
9873 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9874 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9875 (ppc_set_pc, ppc_get_hwcap): Adjust.
9876 (ppc_usrregs_info): Forward declare.
9877 (!__powerpc64__) ppc_regmap_adjusted: New global.
9878 (ppc_arch_setup): Adjust to the current process'es target
9880 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9881 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9882 (ppc_store_evrregset): Adjust.
9883 (target_regsets): Rename to ...
9884 (ppc_regsets): ... this, and make static.
9885 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9886 (ppc_regs_info): New function.
9887 (the_low_target): Adjust.
9888 (initialize_low_arch): New function.
9889 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9890 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9891 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9892 (tdesc_s390x_linux64v2): Declare.
9893 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9894 (s390_fill_gregset, s390_store_last_break): Adjust.
9895 (target_regsets): Rename to ...
9896 (s390_regsets): ... this, and make static.
9897 (s390_get_pc, s390_set_pc): Adjust.
9898 (s390_get_hwcap): New target_desc parameter, and use it.
9899 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9900 (s390_arch_setup): Adjust to set the current process'es target
9901 description. Don't adjust the regmap.
9902 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9903 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9904 (regs_info_3264): New globals.
9905 (s390_regs_info): New function.
9906 (the_low_target): Adjust.
9907 (initialize_low_arch): New function.
9908 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9909 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9910 [__mips64] (init_registers_mips_linux)
9911 (init_registers_mips_dsp_linux): Delete defines.
9912 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9913 (have_dsp): New global.
9914 (mips_read_description): New, based on mips_arch_setup.
9915 (mips_arch_setup): Reimplement.
9916 (get_usrregs_info): New function.
9917 (mips_cannot_fetch_register, mips_cannot_store_register)
9918 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9919 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9920 (target_regsets): Rename to ...
9921 (mips_regsets): ... this, and make static.
9922 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9923 (dsp_regs_info, regs_info): New globals.
9924 (mips_regs_info): New function.
9925 (the_low_target): Adjust.
9926 (initialize_low_arch): New function.
9927 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9928 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9930 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9931 (arm_read_description): New, with bits factored from
9933 (arm_arch_setup): Reimplement.
9934 (target_regsets): Rename to ...
9935 (arm_regsets): ... this, and make static.
9936 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9937 (arm_regs_info): New function.
9938 (the_low_target): Adjust.
9939 (initialize_low_arch): New function.
9940 * linux-m68k-low.c (tdesc_m68k): Declare.
9941 (target_regsets): Rename to ...
9942 (m68k_regsets): ... this, and make static.
9943 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9944 (m68k_regs_info): New function.
9945 (m68k_arch_setup): New function.
9946 (the_low_target): Adjust.
9947 (initialize_low_arch): New function.
9948 * linux-sh-low.c (tdesc_sharch): Declare.
9949 (target_regsets): Rename to ...
9950 (sh_regsets): ... this, and make static.
9951 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9952 (sh_regs_info, sh_arch_setup): New functions.
9953 (the_low_target): Adjust.
9954 (initialize_low_arch): New function.
9955 * linux-bfin-low.c (tdesc_bfin): Declare.
9956 (bfin_arch_setup): New function.
9957 (bfin_usrregs_info, regs_info): New globals.
9958 (bfin_regs_info): New function.
9959 (the_low_target): Adjust.
9960 (initialize_low_arch): New function.
9961 * linux-cris-low.c (tdesc_cris): Declare.
9962 (cris_arch_setup): New function.
9963 (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-cris-low.c (tdesc_crisv32): Declare.
9968 (cris_arch_setup): New function.
9969 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9970 (cris_regs_info): New function.
9971 (the_low_target): Adjust.
9972 (initialize_low_arch): New function.
9973 * linux-m32r-low.c (tdesc_m32r): Declare.
9974 (m32r_arch_setup): New function.
9975 (m32r_usrregs_info, regs_info): New globals.
9976 (m32r_regs_info): Adjust.
9977 (initialize_low_arch): New function.
9978 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9979 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9980 (tic6x_usrregs_info): Forward declare.
9981 (tic6x_read_description): New function, based on ...
9982 (tic6x_arch_setup): ... this. Reimplement.
9983 (target_regsets): Rename to ...
9984 (tic6x_regsets): ... this, and make static.
9985 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9986 (tic6x_regs_info): New function.
9987 (the_low_target): Adjust.
9988 (initialize_low_arch): New function.
9989 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9990 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9991 (target_regsets): Rename to ...
9992 (xtensa_regsets): ... this, and make static.
9993 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9995 (xtensa_arch_setup, xtensa_regs_info): New functions.
9996 (the_low_target): Adjust.
9997 (initialize_low_arch): New function.
9998 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9999 (nios2_arch_setup): Set the current process'es tdesc.
10000 (target_regsets): Rename to ...
10001 (nios2_regsets): ... this.
10002 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10003 (nios2_regs_info): New function.
10004 (the_low_target): Adjust.
10005 (initialize_low_arch): New function.
10006 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10007 (aarch64_arch_setup): Set the current process'es tdesc.
10008 (target_regsets): Rename to ...
10009 (aarch64_regsets): ... this.
10010 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10011 (aarch64_regs_info): New function.
10012 (the_low_target): Adjust.
10013 (initialize_low_arch): New function.
10014 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10016 (target_regsets): Rename to ...
10017 (tile_regsets): ... this.
10018 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10019 (tile_regs_info): New function.
10020 (tile_arch_setup): Set the current process'es tdesc.
10021 (the_low_target): Adjust.
10022 (initialize_low_arch): New function.
10023 * spu-low.c (tdesc_spu): Declare.
10024 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10025 * win32-arm-low.c (tdesc_arm): Declare.
10026 (arm_arch_setup): New function.
10027 (the_low_target): Install arm_arch_setup instead of
10028 init_registers_arm.
10029 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10030 (init_windows_x86): Rename to ...
10031 (i386_arch_setup): ... this. Set `win32_tdesc'.
10032 (the_low_target): Adjust.
10033 * win32-low.c (win32_tdesc): New global.
10034 (child_add_thread): Don't create the thread cache here.
10035 (do_initial_child_stuff): Set the new process'es tdesc.
10036 * win32-low.h (struct target_desc): Forward declare.
10037 (win32_tdesc): Declare.
10038 * lynx-i386-low.c (tdesc_i386): Declare global.
10039 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10040 * lynx-low.c (lynx_tdesc): New global.
10041 (lynx_add_process): Set the new process'es tdesc.
10042 * lynx-low.h (struct target_desc): Forward declare.
10043 (lynx_tdesc): Declare global.
10044 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10045 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10046 * nto-low.c (nto_tdesc): New global.
10047 (do_attach): Set the new process'es tdesc.
10048 * nto-low.h (struct target_desc): Forward declare.
10049 (nto_tdesc): Declare.
10050 * nto-x86-low.c (tdesc_i386): Declare.
10051 (nto_x86_arch_setup): Set `nto_tdesc'.
10053 2013-06-04 Gary Benson <gbenson@redhat.com>
10055 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10056 to qSupported response when appropriate.
10057 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10058 with nonzero-length annex.
10059 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10060 arguments supplied in annex.
10062 2013-05-31 Doug Evans <dje@google.com>
10065 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10066 64 bits in 64-cross-32 environment.
10068 2013-05-28 Pedro Alves <palves@redhat.com>
10070 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10071 (aarch64-without-fpu.c): Delete rule.
10072 * configure.srv (aarch64*-*-linux*): Remove references to
10073 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10074 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10077 2013-05-24 Pedro Alves <palves@redhat.com>
10079 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10080 instead of strchr/decode_address. Error if the range isn't split
10081 with a ','. Don't assume there's be a ':' in the action.
10083 2013-05-23 Yao Qi <yao@codesourcery.com>
10084 Pedro Alves <palves@redhat.com>
10086 * linux-low.c (lwp_in_step_range): New function.
10087 (linux_wait_1): If the thread was range stepping and stopped
10088 outside the stepping range, report the stop to GDB. Otherwise,
10089 continue stepping. Add range stepping debug output.
10090 (linux_set_resume_request): Copy the step range from the resume
10091 request to the lwp.
10092 (linux_supports_range_stepping): New.
10093 (linux_target_ops) <supports_range_stepping>: Set to
10094 linux_supports_range_stepping.
10095 * linux-low.h (struct linux_target_ops)
10096 <supports_range_stepping>: New field.
10097 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10098 * linux-x86-low.c (x86_supports_range_stepping): New.
10099 (the_low_target) <supports_range_stepping>: Set to
10100 x86_supports_range_stepping.
10101 * server.c (handle_v_cont): Handle 'r' action.
10102 (handle_v_requests): Append ";r" if the target supports range
10104 * target.h (struct thread_resume) <step_range_start,
10105 step_range_end>: New fields.
10106 (struct target_ops) <supports_range_stepping>:
10108 (target_supports_range_stepping): New macro.
10110 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10112 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10113 confusion in comment.
10115 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10117 * lynx-low.c (struct process_info_private): New type.
10118 (lynx_add_process): New function.
10119 (lynx_create_inferior, lynx_attach): Replace calls to
10120 add_process by calls to lynx_add_process.
10121 (lynx_resume): If PTID is null, then try using
10122 current_process()->private->last_wait_event_ptid.
10124 (lynx_clear_inferiors): Delete. The contents of that function
10125 has been inlined in lynx_mourn;
10126 (lynx_wait_1): Save the ptid in the process's private data.
10127 (lynx_mourn): Free the process' private data. Replace call
10128 to lynx_clear_inferiors by call to clear_inferiors.
10130 2013-05-17 Yao Qi <yao@codesourcery.com>
10132 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10135 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10137 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10138 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10139 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10140 PT_TEXT_END_ADDR guards. Update comments.
10141 (linux_target_op) <read_offsets>: Conditionally define to
10142 linux_read_offsets if the target is UCLIBC and if it defines
10143 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10145 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10146 Andrew Jenner <andrew@codesourcery.com>
10148 * Makefile.in (SFILES): Add linux-nios2-low.c.
10149 (clean): Add action to delete nios2-linux.c.
10150 (nios2-linux.c): New rule.
10151 * configure.srv: Add nios2*-*-linux*.
10152 * linux-nios2-low.c: New.
10154 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10156 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10158 2013-04-25 Hui Zhu <hui@codesourcery.com>
10161 * ax.c (ax_printf): Add fflush.
10163 2013-04-22 Tom Tromey <tromey@redhat.com>
10165 * Makefile.in (SFILES): Add filestuff.c.
10166 (OBS): Add filestuff.o.
10167 (filestuff.o): New target.
10168 * config.in, configure: Rebuild.
10169 * configure.ac: Check for fdwalk, pipe2.
10171 2013-04-17 Pedro Alves <palves@redhat.com>
10173 * configure.ac (USE_THREAD_DB): Delete variable.
10174 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10175 Don't AC_SUBST USE_THREAD_DB.
10176 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10177 * config.in, configure: Regenerate.
10179 2013-04-16 Pedro Alves <palves@redhat.com>
10181 * linux-low.h (struct lwp_info) <thread_known>: Move under
10182 the USE_THREAD_DB #ifdef.
10184 2013-04-16 Pedro Alves <palves@redhat.com>
10186 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10187 (linux-low.o): Delete rule.
10188 * linux-low.h: Always include "gdb_thread_db.h" instead of
10189 conditionally including thread_db.h.
10190 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10193 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10195 * Makefile.in (install-only): Fix make install regression.
10197 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10199 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10200 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10202 * gdbserver.1: Remove.
10204 2013-03-22 Pedro Alves <palves@redhat.com>
10206 * linux-low.c (handle_extended_wait): Don't call
10207 linux_enable_event_reporting.
10209 2013-03-15 Tony Theodore <tonyt@logyst.com>
10212 * Makefile.in (SHELL): Use @SHELL@.
10214 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10216 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10219 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10221 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10222 Remove extraneous NULL element.
10224 2013-03-13 Yao Qi <yao@codesourcery.com>
10226 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10227 'V' block in trace frame.
10229 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10231 * target.h (struct target_ops): Add btrace ops.
10232 (target_supports_btrace): New macro.
10233 (target_enable_btrace): New macro.
10234 (target_disable_btrace): New macro.
10235 (target_read_btrace): New macro.
10236 * gdbthread.h (struct thread_info): Add btrace field.
10237 * server.c: Include btrace-common.h.
10238 (handle_btrace_general_set): New function.
10239 (handle_btrace_enable): New function.
10240 (handle_btrace_disable): New function.
10241 (handle_general_set): Call handle_btrace_general_set.
10242 (handle_qxfer_btrace): New function.
10243 (struct qxfer qxfer_packets[]): Add btrace entry.
10244 * inferiors.c (remove_thread): Disable btrace.
10245 * linux-low: Include linux-btrace.h.
10246 (linux_low_enable_btrace): New function.
10247 (linux_low_read_btrace): New function.
10248 (linux_target_ops): Add btrace ops.
10249 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10250 Add srv_linux_btrace=yes.
10251 (x86_64-*-linux*): Add linux-btrace.o.
10252 Add srv_linux_btrace=yes.
10253 * configure.ac: Define HAVE_LINUX_BTRACE.
10254 * config.in: Regenerated.
10255 * configure: Regenerated.
10257 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10259 * server.c (handle_qxfer): Preserve error message if -3 is
10261 (qxfer): Document the -3 return value.
10263 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10265 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10266 (linux_btrace_h): New variable.
10267 (linux-btrace.o): New rule.
10269 2013-03-08 Stan Shebs <stan@codesourcery.com>
10270 Hafiz Abid Qadeer <abidh@codesourcery.com>
10272 * tracepoint.c (trace_buffer_size): New global.
10273 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10274 (init_trace_buffer): Change to one-argument function. Allocate
10275 trace buffer memory.
10276 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10277 handle QTBuffer:size packet.
10278 (cmd_bigqtbuffer_size): New function.
10279 (initialize_tracepoint): Call init_trace_buffer with
10280 DEFAULT_TRACE_BUFFER_SIZE.
10281 * server.c (handle_query): Add QTBuffer:size in the
10284 2013-03-07 Yao Qi <yao@codesourcery.com>
10286 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10287 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10289 (cmd_qtsp): Adjust condition. Do post increment.
10290 Set cur_action and cur_step_action back to 0.
10292 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10295 * linux-low.c (linux_write_memory): Return early success if LEN is
10298 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10300 * configure.srv: Add x86_64-*-cygwin* as target.
10302 2013-02-28 Tom Tromey <tromey@redhat.com>
10304 * configure.ac: Invoke AC_SYS_LARGEFILE.
10305 * configure, config.in: Rebuild.
10307 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10309 * win32-low.c: Throughout, fix format strings and casts of
10310 printf-like functions to avoid type related warnings on all
10312 (get_child_debug_event): Print dwDebugEventCode as hex since
10313 that's how it's usually documented.
10315 2013-02-28 Yao Qi <yao@codesourcery.com>
10317 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10320 2013-02-27 Jiong Wang <jiwang@tilera.com>
10322 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10323 (reg-tilegx32.c): New rule.
10324 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10325 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10326 different register info initializer according to elf class.
10327 (init_registers_tilgx32): New function. The tilegx32 register info
10329 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10330 (tile_store_gregset): Likewise.
10332 2013-02-27 Yao Qi <yao@codesourcery.com>
10334 * server.c (process_point_options): Print debug message when
10335 debug_threads is true.
10337 2013-02-26 Yao Qi <yao@codesourcery.com>
10339 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10341 2013-02-19 Pedro Alves <palves@redhat.com>
10342 Kai Tietz <ktietz@redhat.com>
10346 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10347 instead of strtoul to extract address from packet.
10348 (process_serial_event) <'z'>: Likewise.
10350 2013-02-18 Yao Qi <yao@codesourcery.com>
10352 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10354 2013-02-14 Pedro Alves <palves@redhat.com>
10358 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10359 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10361 2013-02-14 Pedro Alves <palves@redhat.com>
10363 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10365 2013-02-14 Pedro Alves <palves@redhat.com>
10367 * tracepoint.c (save_string): Delete.
10368 (add_tracepoint_action): Use savestring instead of save_string.
10370 2013-02-12 Pedro Alves <palves@redhat.com>
10372 * linux-xtensa-low.c: Ditto.
10373 * xtensa-xtregs.c: Ditto.
10375 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10377 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10380 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10382 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10383 aarch64_num_wp_regs and aarch64_num_bp_regs to
10384 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10386 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10388 * linux-aarch64-low.c (ps_get_thread_area): Replace
10389 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10391 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10392 Marcus Shawcroft <marcus.shawcroft@arm.com>
10393 Nigel Stephens <nigel.stephens@arm.com>
10394 Yufeng Zhang <yufeng.zhang@arm.com>
10396 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10397 (aarch64.c, aarch64-without-fpu.c): New targets.
10398 * configure.srv (aarch64*-*-linux*): New.
10399 * linux-aarch64-low.c: New file.
10401 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10403 * linux-low.c (handle_extended_wait, linux_create_inferior)
10404 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10405 (dequeue_one_deferred_signal, linux_resume_one_thread)
10406 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10407 (linux_tracefork_grandchild, linux_test_for_tracefork)
10408 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10409 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10410 where the argument is 0.
10412 2013-01-25 Yao Qi <yao@codesourcery.com>
10414 * event-loop.c: Include "queue.h".
10415 (gdb_event_p): New typedef.
10416 (struct gdb_event) <next_event>: Remove.
10417 (event_queue): Change to QUEUE(gdb_event_p).
10418 (async_queue_event): Remove.
10419 (gdb_event_xfree): New.
10420 (initialize_event_loop): New.
10421 (process_event): Use API from QUEUE.
10422 (wait_for_event): Likewise.
10423 * server.c (main): Call initialize_event_loop.
10424 * server.h (initialize_event_loop): Declare.
10426 2013-01-18 Yao Qi <yao@codesourcery.com>
10428 * ax.h (struct eval_agent_expr_context): New.
10429 (gdb_eval_agent_expr): Update declaration.
10430 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10431 TFRAME. Add new argument CTX.
10432 * server.h (struct eval_agent_expr_context): Declare.
10433 (agent_mem_read, agent_tsv_read): Update declaration.
10434 (agent_mem_read_string): Likewise.
10435 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10436 (add_traceframe_block): Add new argument TPOINT.
10437 Increase TPOINT->traceframe_usage.
10438 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10439 eval_tracepoint_agent_expr.
10440 (condition_true_at_tracepoint): Likewise.
10441 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10442 (agent_mem_read_string, agent_tsv_read): Likewise.
10444 2013-01-16 Yao Qi <yao@codesourcery.com>
10446 * linux-low.c (linux_resume_one_lwp): Don't check
10447 'lwp->bp_reinsert != 0'.
10449 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10450 Pedro Alves <palves@redhat.com>
10452 * lynx-low.c (ptrace_request_to_str): Define a temporary
10453 macro and use it to simplify this function's implementation.
10455 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10457 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10460 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10462 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10464 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10466 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10468 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10470 * lynx-low.c (lynx_resume): Use the resume_info parameter
10471 to determine the ptid for the lynx_ptrace call, unless
10472 it is equal to minus_one_ptid, in which case we use the
10473 ptid of the current_inferior.
10474 (lynx_wait_1): After having received a thread create/exit
10475 event, resume the inferior's execution using the signaling
10476 thread's ptid, rather than the old ptid.
10478 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10480 * lynx-low.c (lynx_resume): Delete variable ret.
10482 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10484 * gdbreplay.c (gdbreplay_version): Update copyright year.
10485 * server.c (gdbserver_version): Likewise.
10487 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10489 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10492 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10494 * lynx-low.c (ptrace_request_to_str): Add handling for
10495 PTRACE_GETTRACESIG.
10497 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10499 * lynx-low.c (lynx_attach): Delete variable new_process.
10501 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10503 * lynx-low.c (lynx_create_inferior): Delete variable
10506 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10508 * lynx-low.c (ptrace_request_to_str): Do not handle
10509 PTRACE_GETTHREADLIST if this macro does not exist.
10511 2012-12-15 Yao Qi <yao@codesourcery.com>
10513 * Makefile.in (OBS): Add notif.o.
10514 * notif.c, notif.h: New.
10515 * server.c: Include "notif.h".
10516 (struct vstop_notif) <next>: Remove.
10518 (queue_stop_reply): Update.
10519 (push_event, send_next_stop_reply): Remove.
10520 (discard_queued_stop_replies): Update.
10521 (notif_stop): New variable.
10522 (handle_v_stopped): Remove.
10523 (handle_v_requests): Don't call handle_v_stopped. Call
10524 handle_ack_notif instead.
10525 (queue_stop_reply_callback): Call notif_event_enque instead
10526 of queue_stop_reply.
10527 (handle_status): Don't call send_next_stop_reply, call
10528 notif_write_event instead.
10529 (kill_inferior_callback): Likewise.
10530 (detach_or_kill_inferior_callback): Likewise.
10531 (main): Call initialize_notif.
10532 (process_serial_event): Call QUEUE_is_empty.
10533 (handle_target_event): Call notif_push instead of push event.
10534 * server.h (push_event): Remove declaration.
10536 2012-12-10 Tom Tromey <tromey@redhat.com>
10538 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10539 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10542 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10543 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10544 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10545 (amd64-linux-ipa.o, ax.o): Rewrite.
10546 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10547 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10548 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10549 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10550 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10551 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10552 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10553 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10554 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10555 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10556 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10557 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10558 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10559 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10560 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10561 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10562 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10563 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10564 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10565 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10566 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10567 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10568 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10569 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10570 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10571 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10572 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10573 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10574 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10575 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10576 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10577 (reg-tilegx.o): Remove.
10578 (all_object_files): New macro.
10579 Include .deps files.
10580 * aclocal.m4, configure: Rebuild.
10581 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10582 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10583 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10585 2012-12-05 Tom Tromey <tromey@redhat.com>
10588 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10590 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10592 * configure.ac: Check for linux/perf_event.h.
10593 * config.in: Regenerated.
10594 * configure: Regenerated.
10596 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10598 * hostio.c (handle_readlink): Decrease buffer size
10599 parameter passed to readlink by one byte.
10601 2012-11-26 Yao Qi <yao@codesourcery.com>
10603 * configure.ac (build_warnings): Append '-Wempty-body'.
10604 * configure: Regenerated.
10605 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10608 2012-11-15 Pierre Muller <muller@sourceware.org>
10610 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10611 * config.in: Regenerate.
10612 * configure: Regenerate.
10613 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10614 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10615 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10616 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10618 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10619 instead of <sys/wait.h> header.
10620 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10622 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10624 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10625 (various make rules): Remove -DGDBSERVER
10627 2012-11-09 Yao Qi <yao@codesourcery.com>
10629 * spu-low.c (current_ptid): Move it to ..
10630 * gdbthread.h: ... here. New.
10631 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10632 * server.c (myresume, process_serial_event): Likewise.
10633 * thread-db.c (thread_db_find_new_threads): Likewise.
10634 * tracepoint.c (run_inferior_command): Likewise.
10636 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10638 * server.c (handle_search_memory_1): Include access length in
10641 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10643 * linux-crisv32-low.c: Fix compile errors.
10645 2012-09-04 Yao Qi <yao@codesourcery.com>
10647 * tracepoint.c (cmd_qtsv): Adjust debug message.
10648 Don't check CUR_TPOINT.
10650 2012-08-28 Yao Qi <yao@codesourcery.com>
10652 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10653 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10654 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10655 Remove declarations of xmalloc, xreallloc, xstrdup and
10657 * Makefile.in (libiberty_h): New.
10658 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10659 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10661 2012-08-23 Yao Qi <yao@codesourcery.com>
10663 * server.h: Remove declaration of 'xsnprintf'.
10665 2012-08-22 Keith Seitz <keiths@redhat.com>
10667 * server.h: Include build-gnulib-gbserver/config.h.
10668 * gdbreplay.c: Likewise.
10670 2012-08-08 Doug Evans <dje@google.com>
10672 * Makefile.in (SFILES): Add gdb_vecs.c.
10673 (OBS): Add gdb_vecs.o.
10674 (gdb_vecs_h, host_defs_h): New variables.
10675 (thread-db.o): Add $(gdb_vecs_h) dependency.
10676 (gdb_vecs.o): New rule.
10677 * thread-db.c: #include "gdb_vecs.h".
10678 (thread_db_load_search): Use a vector to iterate over path elements.
10679 Handle text appearing after "$pdir".
10681 * configure.ac: Add check for strstr.
10682 * config.in: Regenerate.
10683 * configure: Regenerate.
10685 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10687 * hostio.c (handle_pread): If pread fails, fall back to attempting
10689 (handle_pwrite): Likewise for pwrite.
10691 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10693 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10694 between unsupported TYPE and unimplementable ADDR/LEN combination.
10695 (arm_insert_point): Act on new return value.
10697 2012-07-31 Pedro Alves <palves@redhat.com>
10699 * server.c (process_point_options): Only skip tokens if we find
10700 one that is unrecognized. Don't treat 'X' specially while
10701 skipping unrecognized tokens.
10703 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10705 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10706 to 4-byte-align HW breakpoint addresses for Thumb.
10708 2012-07-27 Yao Qi <yao@codesourcery.com>
10712 * server.h: Declare gdb_agent_about_to_close.
10713 * target.c (kill_inferior): Include "agent.h".
10714 New. Send command 'kill'.
10715 * target.h (kill_inferior): Removed macro.
10716 * tracepoint.c (gdb_agent_about_to_close): New.
10717 (gdb_agent_helper_thread): Handle command 'close'.
10718 Wait endlessly until the inferior stops.
10719 Install gdb_agent_remove_socket to atexit hook.
10720 (agent_socket_name): New static variable.
10721 (gdb_agent_socket_init): Replace local variable 'name' with
10722 'agent_socket_name'.
10723 (gdb_agent_remove_socket): New.
10725 2012-07-27 Yao Qi <yao@codesourcery.com>
10727 * server.c (process_point_options): Stop at 'X' when parsing.
10729 2012-07-19 Michael Eager <eager@eagercon.com>
10731 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10733 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10734 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10735 hardware breakpoint.
10737 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10739 * gdbserver/linux-low.c (initialize_low): Call
10740 linux_ptrace_init_warnings.
10742 2012-07-02 Doug Evans <dje@google.com>
10744 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10747 2012-07-02 Stan Shebs <stan@codesourcery.com>
10749 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10750 (ax.o): Add it to build rule.
10752 (OBS): Add format.o.
10753 (IPA_OBS): Add format.o.
10754 * server.c (handle_query): Claim support for breakpoint commands.
10755 (process_point_options): Add command case.
10756 (process_serial_event): Leave running if there are printfs in
10758 * mem-break.h (any_persistent_commands): Declare.
10759 (add_breakpoint_commands): Declare.
10760 (gdb_no_commands_at_breakpoint): Declare.
10761 (run_breakpoint_commands): Declare.
10762 * mem-break.c (struct point_command_list): New struct.
10763 (struct breakpoint): New field command_list.
10764 (any_persistent_commands): New function.
10765 (add_commands_to_breakpoint): New function.
10766 (add_breakpoint_commands): New function.
10767 (gdb_no_commands_at_breakpoint): New function.
10768 (run_breakpoint_commands): New function.
10769 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10771 * ax.c: Include format.h.
10772 (ax_printf): New function.
10773 (gdb_eval_agent_expr): Add printf opcode.
10775 2012-06-13 Yao Qi <yao@codesourcery.com>
10777 * server.c (start_inferior): Remove duplicated writes to fields
10778 'last_resume_kind' and 'last_status' of 'current_inferior'.
10780 2012-06-12 Yao Qi <yao@codesourcery.com>
10781 Pedro Alves <palves@redhat.com>
10783 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10785 * server.c (handle_v_cont): Extend comment.
10787 2012-06-11 Yao Qi <yao@codesourcery.com>
10789 * linux-low.c (linux_attach): Add 'static'.
10791 2012-06-06 Yao Qi <yao@codesourcery.com>
10793 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10795 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10797 Fix gcc -flto compilation warning.
10798 * server.c (main): Make variable multi_mode and attach volatile.
10800 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10802 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10803 if the platform doesn't know about it.
10805 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10807 * Makefile.in (SFILES): Add linux-tile-low.c.
10808 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10809 * configure.srv: Handle tilegx-*-linux*.
10810 * linux-tile-low.c: New file.
10812 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10814 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10816 2012-05-24 Pedro Alves <palves@redhat.com>
10820 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10822 2012-05-24 Pedro Alves <palves@redhat.com>
10826 Replace target_signal with gdb_signal throughout.
10828 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10830 * linux-low.c (linux_store_registers): Avoid the copying sequence
10831 when no data has been retrieved by ptrace.
10833 2012-05-22 Will Deacon <will.deacon@arm.com>
10835 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10836 Include asm/ptrace.h.
10837 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10840 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10842 * linux-low.c (linux_store_registers): Don't re-retrieve data
10843 with ptrace that has already been obtained from /proc. Always
10844 copy any data retrieved with ptrace to the buffer supplied.
10846 2012-05-11 Yao Qi <yao@codesourcery.com>
10847 Pedro Alves <palves@redhat.com>
10849 * linux-low.c (enum stopping_threads_kind): New.
10850 (stopping_threads): Change type to `enum stopping_threads_kind'.
10851 (handle_extended_wait): If stopping and suspending threads, leave
10852 the new_lwp suspended too.
10853 (linux_wait_for_event): Adjust.
10854 (stop_all_lwps): Set `stopping_threads' to
10855 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10856 whether we're suspending threads or just stopping them. Assert no
10859 2012-04-29 Yao Qi <yao@codesourcery.com>
10861 * server.h: Move some code to ...
10862 * gdbthread.h: ... here. New.
10863 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10864 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10865 (nto-low.o, win32-low.o): Likewise.
10866 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10867 * regcache.c, remote-utils.c, server.c: Likewise.
10868 * target.c, tracepoint.c, win32-low.c: Likewise.
10870 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10872 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10873 (PTRACE_ARG4_TYPE): Likewise.
10874 (PTRACE_XFER_TYPE): Likewise.
10875 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10876 ptrace to PTRACE_ARG3_TYPE.
10877 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10878 (PTRACE_ARG4_TYPE): Likewise.
10879 (PTRACE_XFER_TYPE): Likewise.
10880 (linux_detach_one_lwp): Cast fourth argument of
10881 ptrace to long then PTRACE_ARG4_TYPE.
10882 (regsets_fetch_inferior_registers): Cast third argument of
10883 ptrace to long then PTRACE_ARG3_TYPE.
10884 (regsets_store_inferior_registers): Likewise.
10886 2012-04-20 Pedro Alves <palves@redhat.com>
10888 * configure: Regenerate.
10890 2012-04-19 Pedro Alves <palves@redhat.com>
10892 * Makefile.in (GNULIB_BUILDDIR): New.
10893 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10894 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10895 (all, install-only, uninstall, clean-info, all-lib, clean): No
10896 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10897 (maintainer-clean realclean distclean): Use subdir_do.
10899 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10900 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10901 * acinclude.m4: Include acx_configure_dir.m4.
10902 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10903 calls. Call AC_PROG_RANLIB. Configure gnulib using
10906 (GNULIB_STDINT_H): Adjust.
10907 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10908 * gdbreplay.c: Include build-gnulib/config.h.
10909 * server.h: Likewise.
10910 * aclocal.m4: Regenerate.
10911 * config.in: Regenerate.
10912 * configure: Regenerate.
10914 2012-04-19 Pedro Alves <palves@redhat.com>
10916 * Makefile.in (LIBGNU, INCGNU): Adjust.
10917 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10918 (all, install-only, uninstall, clean-info, all-lib, clean)
10919 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10920 * configure.ac: Adjust AC_OUTPUT output.
10921 * aclocal.m4: Regenerate.
10922 * configure: Regenerate.
10924 2012-04-19 Pedro Alves <palves@redhat.com>
10926 * Makefile.in (generated_files): New.
10927 (server_h): Remove the explicit dependency on config.h, and depend
10928 on $generated_files.
10930 2012-04-19 Pedro Alves <palves@redhat.com>
10932 * Makefile.in (INCGNU): Add -Ignulib.
10934 2012-04-19 Pedro Alves <palves@redhat.com>
10936 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10937 (INCGNU): ... this, and spell out -I here.
10938 (GNULIB_LIB): Rename to ...
10939 (LIBGNU): ... this.
10940 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10942 2012-04-19 Pedro Alves <palves@redhat.com>
10944 * config.in: Regenerate.
10946 2012-04-19 Pedro Alves <palves@redhat.com>
10948 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10949 * server.h (memmem): Remove declaration.
10950 * config.in: Regenerate.
10951 * configure: Regenerate.
10953 2012-04-19 Yao Qi <yao@codesourcery.com>
10955 * Makefile.in (SFILES): Add common/vec.c.
10959 2012-04-19 Yao Qi <yao@codesourcery.com>
10961 * remote-utils.c (prepare_resume_reply): Replace with macro
10962 target_core_of_thread.
10963 * server.c (handle_qxfer_threads_proper): Likewise.
10964 * target.h (traget_core_of_thread): New macro.
10966 2012-04-18 Pedro Alves <palves@redhat.com>
10968 * aclocal.m4: Regenerate.
10969 * configure: Regenerate.
10971 2012-04-16 Yao Qi <yao@codesourcery.com>
10973 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10974 duplicated on address.
10976 2012-04-16 Yao Qi <yao@codesourcery.com>
10978 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10979 (struct tracepoint_action_ops) <send>: New field.
10980 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10981 (agent_expr_send, x_tracepoint_action_send): New.
10982 (l_tracepoint_action_send): New.
10983 (cmd_qtdp): Download and install tracepoint
10984 according to `use_agent'.
10985 (run_inferior_command): Add one more parameter `len'.
10987 (tracepoint_send_agent): New.
10988 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10990 2012-04-16 Yao Qi <yao@codesourcery.com>
10992 * tracepoint.c (download_tracepoints): Moved to ...
10993 (cmd_qtstart): ... here.
10995 2012-04-14 Yao Qi <yao@codesourcery.com>
10997 * tracepoint.c: Include inttypes.h.
10998 (struct collect_memory_action): Use sized types.
10999 (struct tracepoint): Likewise.
11000 (cmd_qtdp, stop_tracing): Update print specifiers.
11001 (cmd_qtp, response_tracepoint): Likewise.
11002 (collect_data_at_tracepoint): Likewise.
11003 (collect_data_at_step): Likewise.
11005 2012-04-14 Yao Qi <yao@codesourcery.com>
11007 Import gnulib module inttypes.
11008 * aclocal.m4, config.in, configure: Regenerated.
11010 2012-04-14 Yao Qi <yao@codesourcery.com>
11012 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11013 Makefile and config.status at last.
11015 2012-04-13 Yao Qi <yao@codesourcery.com>
11017 * tracepoint.c: Include stdint.h unconditionally.
11019 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11021 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11022 on BFD_HAVE_SYS_PROCFS_TYPE.
11023 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11024 * configure: Regenerate.
11025 * config.in: Likewise.
11027 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11029 * Makefile.in (clean): Also remove x32.c x32-linux.c
11030 x32-avx.c x32-avx-linux.c.
11031 (x32.o): New target.
11033 (x32-linux.o): Likewise.
11034 (x32-linux.c): Likewise.
11035 (x32-avx.o): Likewise.
11036 (x32-avx.c): Likewise.
11037 (x32-avx-linux.o): Likewise.
11038 (x32-avx-linux.c): Likewise.
11040 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11041 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11042 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11043 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11044 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11045 i386/x32-avx-linux.xml.
11047 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11048 (init_registers_x32_avx_linux): Likwise.
11049 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11050 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11052 2012-04-13 Pedro Alves <palves@redhat.com>
11054 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11055 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11056 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11057 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11060 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11062 * linux-x86-low.c (compat_x32_clock_t): New.
11063 (compat_x32_siginfo_t): Likewise.
11064 (compat_x32_siginfo_from_siginfo): Likewise.
11065 (siginfo_from_compat_x32_siginfo): Likewise.
11066 (linux_is_elf64): Likewise.
11067 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11068 and siginfo_from_compat_x32_siginfo for x32.
11069 (x86_arch_setup): Set linux_is_elf64.
11071 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11074 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11076 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11077 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11078 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11079 compatible with process.
11081 2012-04-12 Yao Qi <yao@codesourcery.com>
11083 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11084 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11085 (install-only, install-info, clean): Handle sub dir gnulib.
11086 (all-lib, am--refresh): New targets.
11087 (memmem.o): Remove target.
11088 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11089 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11090 (AC_REPLACE_FUNCS): Remove memmem.
11091 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11092 (AC_OUTPUT): Generate Makefile in gnulib/.
11093 * aclocal.m4, config.in, configure: Regenerated.
11095 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11097 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11099 2012-04-05 Pedro Alves <palves@redhat.com>
11101 -Werror=strict-aliasing
11103 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11106 2012-04-04 Pedro Alves <palves@redhat.com>
11108 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11109 (sparc_store_gregset_from_stack, sparc_store_gregset)
11110 (sparc_breakpoint_at): Fix formatting.
11112 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11114 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11116 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11117 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11118 * config.in: Regenerate.
11119 * configure: Likewise.
11121 2012-03-29 Pedro Alves <palves@redhat.com>
11123 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11124 Correct ptrace arguments.
11126 2012-03-28 Pedro Alves <palves@redhat.com>
11128 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11129 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11130 (IA64_FR1_REGNUM): New defines.
11131 (ia64_fetch_register): New.
11132 (the_low_target): Install it.
11133 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11135 * linux-low.c (linux_fetch_registers): Try the
11136 the_low_target.fetch_register hook first.
11138 * linux-arm-low.c (the_low_target): Adjust.
11139 * linux-bfin-low.c (the_low_target): Adjust.
11140 * linux-cris-low.c (the_low_target): Adjust.
11141 * linux-crisv32-low.c (the_low_target): Adjust.
11142 * linux-m32r-low.c (the_low_target): Adjust.
11143 * linux-m68k-low.c (the_low_target): Adjust.
11144 * linux-mips-low.c (the_low_target): Adjust.
11145 * linux-ppc-low.c (the_low_target): Adjust.
11146 * linux-s390-low.c (the_low_target): Adjust.
11147 * linux-sh-low.c (the_low_target): Adjust.
11148 * linux-sparc-low.c (the_low_target): Adjust.
11149 * linux-tic6x-low.c (the_low_target): Adjust.
11150 * linux-x86-low.c (the_low_target): Adjust.
11151 * linux-xtensa-low.c (the_low_target): Adjust.
11153 2012-03-26 Pedro Alves <palves@redhat.com>
11155 * server.c (handle_qxfer_libraries): Don't bail early if
11156 the_target->qxfer_libraries_svr4 is not NULL.
11158 2012-03-26 Pedro Alves <palves@redhat.com>
11160 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11162 2012-03-23 Pedro Alves <palves@redhat.com>
11164 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11165 "library-list-svr4" element's start tag when the the DSO list is
11168 2012-03-23 Pedro Alves <palves@redhat.com>
11170 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11171 a variable whose type size is the same as the inferior's pointer
11174 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11176 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11178 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11179 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11180 * linux-low.h: Include <signal.h>.
11181 (struct siginfo): Remove forward declaration.
11182 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11185 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11187 * .gitignore: Ignore more files.
11189 2012-03-19 Pedro Alves <palves@redhat.com>
11190 Jan Kratochvil <jan.kratochvil@redhat.com>
11192 * server.c (cont_thread, general_thread): Add describing comments.
11193 (start_inferior): Clear `cont_thread'.
11194 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11197 2012-03-15 Yao Qi <yao@codesourcery.com>
11199 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11201 (cmd_qtdp): ... here.
11203 2012-03-15 Yao Qi <yao@codesourcery.com>
11205 * tracepoint.c (struct tracepoint_action_ops): New.
11206 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11207 (m_tracepoint_action_download): New.
11208 (r_tracepoint_action_download): New.
11209 (x_tracepoint_action_download): New.
11210 (l_tracepoint_action_download): New.
11211 (add_tracepoint_action): Install `action->ops' according type.
11212 (download_tracepoint_1): Move code `download' function pointer
11213 of various tracepoint_action_ops.
11215 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11217 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11218 linux_ptrace_attach_warnings.
11220 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11222 * Makefile.in (linux-ptrace.o): New.
11223 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11224 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11225 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11226 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11227 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11229 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11231 2012-03-08 Yao Qi <yao@codesourcery.com>
11232 Pedro Alves <palves@redhat.com>
11234 Fix PR server/13392.
11235 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11236 offset of JMP insn.
11237 * tracepoint.c (remove_tracepoint): New.
11238 (cmd_qtdp): Call remove_tracepoint when failed to install.
11240 2012-03-07 Pedro Alves <palves@redhat.com>
11242 * linux-low.c (get_detach_signal): New.
11243 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11244 Pass on pending signals to PTRACE_DETACH. Check the result of the
11246 * server.c (program_signals, program_signals_p): New.
11247 (handle_general_set): Handle QProgramSignals.
11248 * server.h (program_signals, program_signals_p): Declare.
11250 2012-03-05 Pedro Alves <palves@redhat.com>
11251 Jan Kratochvil <jan.kratochvil@redhat.com>
11253 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11256 2012-03-03 Yao Qi <yao@codesourcery.com>
11258 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11259 agent_look_up_symbols.
11261 2012-03-03 Yao Qi <yao@codesourcery.com>
11263 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11264 (linux-x86-low.o): Likewise.
11265 * server.h: Remove in_process_agent_loaded.
11266 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11270 2012-03-03 Yao Qi <yao@codesourcery.com>
11272 * tracepoint.c (gdb_agent_capability): New global.
11273 (in_process_agent_loaded_ust): Renamed to
11274 `in_process_agent_supports_ust'.
11276 (in_process_agent_supports_ust): Call agent_capability_check.
11277 (clear_installed_tracepoints): Assert that agent supports
11280 2012-03-03 Yao Qi <yao@codesourcery.com>
11282 * linux-low.c (linux_supports_agent): New.
11283 (linux_target_ops): Initialize field `supports_agent' with
11284 linux_supports_agent.
11285 * target.h (struct target_ops) <supports_agent>: New.
11286 (target_supports_agent): New macro.
11287 * server.c (handle_general_set): Handle packet 'QAgent'.
11288 (handle_query): Send `QAgent+'.
11289 * Makefile.in (server.o): Depends on agent.h.
11291 2012-03-03 Yao Qi <yao@codesourcery.com>
11293 * Makefile.in (OBS): Add agent.o.
11294 Add new rule for agent.o.
11295 Track dependence of tracepoint.c on agent.h.
11296 * tracepoint.c (run_inferior_command_1):
11297 (run_inferior_command): Call agent_run_command.
11298 (gdb_ust_connect_sync_socket): Deleted. Move it to
11300 (resume_thread, stop_thread): Likewise.
11301 (gdb_ust_socket_init): Renamed to ...
11302 (gdb_agent_socket_init): ... New.
11303 (gdb_ust_thread): Renamed to ...
11304 (gdb_agent_helper_thread): ... New.
11305 (gdb_ust_init): Move some code to ...
11306 (gdb_agent_init): ... here. New.
11307 [HAVE_UST]: Call gdb_ust_init.
11308 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11309 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11310 * config.in, configure: Regenerated.
11312 2012-03-02 Pedro Alves <palves@redhat.com>
11314 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11315 * linux-low.c (struct simple_pid_list): New.
11316 (stopped_pids): New a struct simple_pid_list pointer.
11317 (add_to_pid_list, pull_pid_from_list): New.
11318 (handle_extended_wait): Don't assume the first signal new children
11319 report is SIGSTOP. Adjust call to pull_pid_from_list.
11320 (linux_wait_for_lwp): Adjust.
11322 2012-03-02 Yao Qi <yao@codesourcery.com>
11324 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11327 2012-03-02 Yao Qi <yao@codesourcery.com>
11329 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11330 `stop_pc' and `tpoint'. Update caller.
11332 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11334 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11335 * linux-low.c (use_linux_regsets): New macro.
11336 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11337 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11338 (linux_register_in_regsets): New function.
11339 (usr_fetch_inferior_registers): Skip registers covered by
11341 (usr_store_inferior_registers): Likewise.
11342 (usr_fetch_inferior_registers): New macro.
11343 (usr_store_inferior_registers): Likewise.
11344 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11345 (linux_store_registers): Likewise.
11346 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11348 (init_registers_mips64_dsp_linux): Likewise.
11349 (init_registers_mips_linux): New macro.
11350 (init_registers_mips_dsp_linux): Likewise.
11351 (mips_dsp_num_regs): Likewise.
11352 (DSP_BASE, DSP_CONTROL): New fallback macros.
11353 (mips_base_regs): New macro.
11354 (mips_regmap): Use it. Fix the size.
11355 (mips_dsp_regmap): New variable.
11356 (mips_dsp_regset_bitmap): Likewise.
11357 (mips_arch_setup): New function.
11358 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11360 (mips_cannot_store_register): Likewise.
11361 (the_low_target): Update .arch_setup, .num_regs and .regmap
11362 initializers. Add .regset_bitmap initializer.
11363 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11365 * linux-bfin-low.c (the_low_target): Likewise.
11366 * linux-cris-low.c (the_low_target): Likewise.
11367 * linux-crisv32-low.c (the_low_target): Likewise.
11368 * linux-ia64-low.c (the_low_target): Likewise.
11369 * linux-m32r-low.c (the_low_target): Likewise.
11370 * linux-m68k-low.c (the_low_target): Likewise.
11371 * linux-ppc-low.c (the_low_target): Likewise.
11372 * linux-s390-low.c (the_low_target): Likewise.
11373 * linux-sh-low.c (the_low_target): Likewise.
11374 * linux-sparc-low.c (the_low_target): Likewise.
11375 * linux-tic6x-low.c (the_low_target): Likewise.
11376 * linux-x86-low.c (the_low_target): Likewise.
11377 * linux-xtensa-low.c (the_low_target): Likewise.
11378 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11379 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11380 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11382 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11383 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11385 2012-02-29 Yao Qi <yao@codesourcery.com>
11386 Pedro Alves <palves@redhat.com>
11388 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11389 `step_over_finished' is true.
11391 2012-02-27 Pedro Alves <palves@redhat.com>
11393 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11394 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11396 2012-02-27 Pedro Alves <palves@redhat.com>
11399 * linux-low.c (pid_is_stopped): New.
11400 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11402 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11404 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11407 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11409 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11411 2012-02-24 Luis Machado <lgustavo@codesourcery>
11413 * server.c (handle_query): Advertise support for target-side
11414 breakpoint condition evaluation.
11415 (process_point_options): New function.
11416 (process_serial_event): When inserting a breakpoint, check for
11417 a target-side condition that should be evaluated.
11419 * mem-break.c: Include regcache.h and ax.h.
11420 (point_cond_list_t): New data structure.
11421 (breakpoint) <cond_list>: New field.
11422 (find_gdb_breakpoint_at): Make non-static.
11423 (delete_gdb_breakpoint_at): Clear any target-side
11425 (clear_gdb_breakpoint_conditions): New function.
11426 (add_condition_to_breakpoint): Likewise.
11427 (add_breakpoint_condition): Likewise.
11428 (gdb_condition_true_at_breakpoint): Likewise.
11429 (gdb_breakpoint_here): Return result directly instead
11430 of going through a local variable.
11432 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11433 (clear_gdb_breakpoint_conditions): Likewise.
11434 (add_breakpoint_condition): Likewise.
11435 (gdb_condition_true_at_breakpoint): Likewise.
11437 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11438 (need_step_over_p): Take target-side breakpoint condition into
11441 2012-02-24 Luis Machado <lgustavo@codesourcery>
11443 * server.h: Include tracepoint.h.
11444 (agent_mem_read, agent_get_trace_state_variable_value,
11445 agent_set_trace_state_variable_value,
11446 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11447 get_set_tsv_func_addr): New prototypes.
11449 * ax.h: New include file.
11450 * ax.c: New source file.
11452 * tracepoint.c: Include ax.h.
11453 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11454 agent_expr, eval_result_type): Move to ax.h.
11455 (parse_agent_expr): Rename to ...
11456 (gdb_parse_agent_expr): ... this, make it non-static and move
11458 (unparse_agent_expr) Rename to ...
11459 (gdb_unparse_agent_expr): ... this, make it non-static and move
11461 (eval_agent_expr): Rename to ...
11462 (eval_tracepoint_agent_expr): ... this.
11463 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11464 forward declarations.
11465 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11466 (agent_get_trace_state_variable_value): New function.
11467 (agent_set_trace_state_variable_value): New function.
11468 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11469 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11470 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11471 (condition_true_at_tracepoint): Likewise.
11472 (parse_agent_expr): Rename to ...
11473 (gdb_parse_agent_expr): ... this and move to ax.c.
11474 (unparse_agent_expr): Rename to ...
11475 (gdb_unparse_agent_expr): ... this and move to ax.c.
11476 (gdb_agent_op_name): Move to ax.c.
11477 (eval_agent_expr): Rename to ...
11478 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11480 (eval_tracepoint_agent_expr): New function.
11481 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11483 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11485 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11486 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11487 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11488 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11489 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11490 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11491 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11492 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11493 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11494 (compile_bytecodes): Remove forward declaration.
11495 (is_goto_target): Move to ax.c.
11496 (compile_bytecodes): Move to ax.c and call
11497 agent_get_trace_state_variable_value (...) and
11498 agent_set_trace_state_variable_value (...).
11500 * Makefile.in: Update ax.c and IPA dependencies.
11502 2012-02-24 Pedro Alves <palves@redhat.com>
11504 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11505 (cmd_bigqtbuffer_circular): ... this. Only handle
11506 'QTBuffer:circular:'.
11507 (handle_tracepoint_general_set): Adjust.
11509 2012-02-16 Yao Qi <yao@codesourcery.com>
11511 * inferiors.c: Move code to ...
11512 * dll.c: .... here. New.
11513 * server.h: Declare clear_dlls.
11514 * Makefile.in (SFILES): Add dll.c.
11518 2012-02-11 Yao Qi <yao@codesourcery.com>
11520 * server.c: (handle_monitor_command): Add a new parameter
11522 (handle_query): Update caller.
11524 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11526 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11527 * configure, config.in: Regenerate.
11528 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11531 2012-02-02 Pedro Alves <palves@redhat.com>
11533 Try SIGKILL first, then PTRACE_KILL.
11534 * linux-low.c (linux_kill_one_lwp): New.
11535 (linux_kill_one_lwp): Rename to ...
11536 (kill_one_lwp_callback): ... this. Use the new
11537 linux_kill_one_lwp.
11539 2012-02-02 Pedro Alves <palves@redhat.com>
11541 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11544 2012-01-27 Pedro Alves <palves@redhat.com>
11546 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11547 (elf_64_file_p): Make static.
11548 (linux_pid_exe_is_elf_64_file): New.
11549 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11550 Delete declarations.
11551 (linux_pid_exe_is_elf_64_file): Declare.
11552 * linux-x86-low.c (x86_arch_setup): Use
11553 linux_pid_exe_is_elf_64_file.
11555 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11557 * linux-low.c (linux_wait_for_event_1): Rename to ...
11558 (linux_wait_for_event): ... here and merge it with former
11559 linux_wait_for_event - new variable wait_ptid, use it.
11560 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11562 2012-01-23 Pedro Alves <palves@redhat.com>
11564 * server.c (main): Avoid yet another case of infinite loop while
11565 detaching/killing after a longjmp.
11567 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11570 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11572 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11574 * hostio.c (handle_readlink): New function.
11575 (handle_vFile): Call it to handle "vFile:readlink" packets.
11577 2012-01-20 Pedro Alves <palves@redhat.com>
11578 Ulrich Weigand <ulrich.weigand@linaro.org>
11580 * server.c (handle_v_requests): Only support vAttach and vRun to
11581 start multiple processes when in extended protocol mode.
11583 2012-01-17 Pedro Alves <palves@redhat.com>
11585 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11586 memalign plus mprotect to allocate the scratch buffer.
11588 2012-01-13 Pedro Alves <palves@redhat.com>
11590 * server.c (attach_inferior): Clear `cont_thread'.
11592 2012-01-13 Pedro Alves <palves@redhat.com>
11594 * server.c (main): Avoid infinite loop while detaching/killing
11597 2012-01-09 Doug Evans <dje@google.com>
11599 * server.c (start_inferior): Set last_ptid in --wrapper case.
11601 2012-01-06 Yao Qi <yao@codesourcery.com>
11603 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11605 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11607 2012-01-04 Yao Qi <yao@codesourcery.com>
11609 * tracepoint.c (cmd_qtdp): Print debug message
11610 for static tracepoint.
11612 2012-01-04 Yao Qi <yao@codesourcery.com>
11614 * tracepoint.c (trace_vdebug): Differentiate debug message
11615 between gdbserver and IPA.
11617 2012-01-03 Yao Qi <yao@codesourcery.com>
11619 * tracepoint.c (tracepoint_was_hit): Don't collect for
11622 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11624 * terminal.h: Reformat copyright header.
11626 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11628 * server.c (gdbserver_version): Update copyright year.
11629 * gdbreplay.c (gdbreplay_version): Likewise.
11631 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11633 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11636 2011-12-18 Hui Zhu <teawater@gmail.com>
11637 * linux-low.c (linux_create_inferior): Save return value to ret.
11639 2011-12-18 Hui Zhu <teawater@gmail.com>
11641 * linux-low.c (linux_create_inferior): Save return value to ret.
11643 2011-12-16 Doug Evans <dje@google.com>
11645 * linux-low.c (linux_create_inferior): If stdio connection,
11646 redirect stdin from /dev/null, stdout to stderr.
11647 * remote-utils.c (remote_is_stdio): New static global.
11648 (remote_connection_is_stdio): New function.
11649 (remote_prepare): Handle stdio connection.
11650 (remote_open): Ditto.
11651 (remote_close): Don't close stdin for stdio connections.
11652 (read_prim,write_prim): New functions. Replace all calls to
11653 read/write to these.
11654 * server.c (main): Watch for "-" argument. Move call to
11655 remote_prepare before start_inferior.
11656 * server.h (STDIO_CONNECTION_NAME): New macro.
11657 (remote_connection_is_stdio): Declare.
11659 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11660 in debugging output.
11662 2011-12-15 Yao Qi <yao@codesourcery.com>
11664 * tracepoint.c: Include sys/syscall.h.
11665 (gdb_ust_thread): Remove preprocessor conditional.
11667 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11669 * linux-low.c (linux_detach_one_lwp): Call
11670 the_low_target.prepare_to_resume before detaching.
11672 2011-12-14 Yao Qi <yao@codesourcery.com>
11674 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11677 2011-12-14 Yao Qi <yao@codesourcery.com>
11679 * i386-low.c (i386_low_stopped_data_address): Initialize local
11680 variable `control'.
11682 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11686 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11687 DR_CONTROL unless necessary. Extend comments.
11688 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11689 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11691 2011-12-13 Yao Qi <yao@codesourcery.com>
11693 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11695 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11697 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11699 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11700 Print new debug message for such case.
11702 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11704 Fix overlapping memcpy.
11705 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11706 the read_inferior_memory transfer.
11707 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11708 write_inferior_memory transfer.
11709 (set_fast_tracepoint_jump): New variable buf. Use it for the
11710 read_inferior_memory and write_inferior_memory transfers.
11711 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11712 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11713 Use it for the write_inferior_memory transfer.
11714 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11717 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11719 * linux-low.c (fetch_register, store_register): Make code
11720 consistent, fix formatting.
11722 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11724 * linux-low.c (usr_store_inferior_registers): Factor out code
11725 to handle individual registers into...
11726 (store_register): ... this new function.
11728 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11730 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11731 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11732 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11733 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11734 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11735 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11736 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11737 (srv_xmlfiles): Add new XML files.
11739 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11741 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11742 (init_registers_s390_linux32v1): Add prototype.
11743 (init_registers_s390_linux32v2): Likewise.
11744 (init_registers_s390_linux64v1): Likewise.
11745 (init_registers_s390_linux64v2): Likewise.
11746 (init_registers_s390x_linux64v1): Likewise.
11747 (init_registers_s390x_linux64v2): Likewise.
11748 (s390_num_regs): Increment to 52.
11749 (s390_regmap): Add orig_r2 register.
11750 (s390_num_regs_3264): Increment to 68.
11751 (s390_regmap_3264): Add orig_r2 register.
11752 (s390_collect_ptrace_register): Handle orig_r2 register.
11753 (s390_supply_ptrace_register): Likewise.
11754 (s390_fill_last_break): New function.
11755 (s390_store_last_break): Likewise.
11756 (s390_fill_system_call): New function.
11757 (s390_store_system_call): Likewise.
11758 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11760 (s390_check_regset): New function.
11761 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11762 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11763 Update target_regsets for available register sets.
11765 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11766 Jan Kratochvil <jan.kratochvil@redhat.com>
11768 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11769 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11771 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11772 * linux-low.h (struct process_info_private): New member r_debug.
11773 * server.c (handle_qxfer_libraries): Call
11774 the_target->qxfer_libraries_svr4.
11775 (handle_qxfer_libraries_svr4): New function.
11776 (qxfer_packets): New entry "libraries-svr4".
11777 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11778 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11779 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11780 PACKET_qXfer_libraries_svr4.
11782 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11784 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11785 PSW address/mask between 8-byte and 16-byte formats.
11786 (s390_supply_ptrace_register): Likewise.
11787 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11788 basic addressing mode bit.
11790 2011-11-24 Stan Shebs <stan@codesourcery.com>
11792 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11794 2011-11-17 Stan Shebs <stan@codesourcery.com>
11796 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11797 (tracing_start_time): New global.
11798 (tracing_stop_time): New global.
11799 (tracing_user_name): New global.
11800 (tracing_notes): New global.
11801 (tracing_stop_note): New global.
11802 (cmd_qtstart): Set traceframe_usage, start_time.
11803 (stop_tracing): Set stop_time.
11804 (cmd_qtstatus): Report additional status.
11805 (cmd_qtp): New function.
11806 (handle_tracepoint_query): Call it.
11807 (cmd_qtnotes): New function.
11808 (handle_tracepoint_general_set): Call it.
11809 (get_timestamp): Rename from tsv_get_timestamp.
11811 2011-11-14 Stan Shebs <stan@codesourcery.com>
11812 Kwok Cheung Yeung <kcy@codesourcery.com>
11814 * linux-x86-low.c (small_jump_insn): New.
11815 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11816 trampoline and error message, build a trampoline and issue a small
11817 jump instruction to it.
11818 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11819 trampoline and error message.
11820 (x86_get_min_fast_tracepoint_insn_len): New.
11821 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11822 * linux-low.h (struct linux_target_ops): Add arguments to
11823 install_fast_tracepoint_jump_pad operation, add new operation.
11824 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11826 (linux_get_min_fast_tracepoint_insn_len): New function.
11827 (linux_target_op): Add new operation.
11828 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11829 (gdb_trampoline_buffer_end): Ditto.
11830 (gdb_trampoline_buffer_error): Ditto.
11831 (struct ipa_sym_addresses): Add fields for new IPA variables.
11832 (symbol_list): Add entries for new IPA variables.
11833 (struct tracepoint): Add fields to hold the address range of the
11834 trampoline used by the tracepoint.
11835 (trampoline_buffer_head): New static variable.
11836 (trampoline_buffer_tail): Ditto.
11837 (claim_trampoline_space): New function.
11838 (have_fast_tracepoint_trampoline_buffer): New function.
11839 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11841 (install_fast_tracepoint): Ditto, also add error buffer argument.
11842 (cmd_qtminftpilen): New function.
11843 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11844 (fast_tracepoint_from_trampoline_address): New function.
11845 (fast_tracepoint_collecting): Handle trampoline as part of jump
11847 (set_trampoline_buffer_space): New function.
11848 (initialize_tracepoint): Initialize new IPA variables.
11849 * target.h (struct target_ops): Add arguments to
11850 install_fast_tracepoint_jump_pad operation, add new
11851 get_min_fast_tracepoint_insn_len operation.
11852 (target_get_min_fast_tracepoint_insn_len): New.
11853 (install_fast_tracepoint_jump_pad): Add arguments.
11854 * server.h (IPA_BUFSIZ): Define.
11855 * linux-i386-ipa.c: Include extra header files.
11856 (initialize_fast_tracepoint_trampoline_buffer): New function.
11857 (initialize_low_tracepoint): Call it.
11858 * server.h (set_trampoline_buffer_space): Declare.
11859 (claim_trampoline_space): Ditto.
11860 (have_fast_tracepoint_trampoline_buffer): Ditto.
11862 2011-11-14 Yao Qi <yao@codesourcery.com>
11864 * server.c (handle_query): Handle InstallInTrace for qSupported.
11865 * tracepoint.c (add_tracepoint): Sort list.
11866 (install_tracepoint, download_tracepoint): New.
11867 (cmd_qtdp): Call them to install and download tracepoints.
11868 (sort_tracepoints): Removed.
11869 (cmd_qtstart): Update.
11871 2011-11-14 Yao Qi <yao@codesourcery.com>
11873 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11874 * mem-break.h: Declare.
11875 * tracepoint.c (cmd_qtstart): Move some code to ...
11876 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11878 (download_tracepoints): Move some code to ...
11879 (download_tracepoint_1): ... here. New.
11881 2011-11-08 Yao Qi <yao@codesourcery.com>
11883 * remote-utils.c (relocate_instruction): A comment fix.
11885 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11887 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11888 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11889 dr_status_mirror and dr_control_mirror from debug_reg_state.
11890 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11891 (i386_initial_stuff): Remove use of deleted globals.
11892 (i386_get_thread_context, i386_set_thread_context,
11893 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11894 from debug_reg_state.
11896 2011-11-05 Yao Qi <yao@codesourcery.com>
11898 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11899 address as TPOINT's.
11901 2011-11-02 Stan Shebs <stan@codesourcery.com>
11903 * tracepoint.c (agent_mem_read_string): New function.
11904 (eval_agent_expr): Call it for tracenz.
11905 * server.c (handle_query): Report support for tracenz.
11907 2011-11-02 Yao Qi <yao@codesourcery.com>
11909 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11911 2011-11-02 Yao Qi <yao@codesourcery.com>
11913 * target.h: Fix a typo in comment.
11915 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11917 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11918 clobber the breakpoints' shadows with fast tracepoint jumps.
11919 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11920 * target.c (write_inferior_memory): Also pass MYADDR down to
11923 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11925 * configure.ac: Check support for personality routine.
11926 * configure: Regenerate.
11927 * config.in: Likewise.
11928 * linux-low.c: Include <sys/personality.h>.
11929 Define ADDR_NO_RANDOMIZE if necessary.
11930 (linux_create_inferior): Disable address space randomization when
11931 forking inferior, if requested.
11932 (linux_supports_disable_randomization): New function.
11933 (linux_target_ops): Install it.
11934 * server.h (disable_randomization): Declare.
11935 * server.c (disable_randomization): New global variable.
11936 (handle_general_set): Handle QDisableRandomization.
11937 (handle_query): Likewise for qSupported.
11938 (main): Support --disable-randomization and --no-disable-randomization
11939 command line arguments.
11940 * target.h (struct target_ops): Add supports_disable_randomization.
11941 (target_supports_disable_randomization): New macro.
11943 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11945 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11947 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11948 [!PT_GETDSBT] (target_loadmap): New definition.
11949 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11950 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11951 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11952 and PT_GETDSBT to LINUX_LOADMAP.
11953 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11954 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11956 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11958 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11959 (arm_linux_hwbp_cap): New static variable.
11960 (arm_linux_get_hwbp_cap): Replace by ...
11961 (arm_linux_init_hwbp_cap): ... this new function.
11962 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11963 (arm_linux_get_hw_watchpoint_count): Likewise.
11964 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11965 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11966 (arm_prepare_to_resume): Use perror_with_name instead of error.
11968 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11970 * linux-arm-low.c: Include <signal.h>.
11971 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11972 (struct arm_linux_hwbp_cap): New data type.
11973 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11974 (struct arm_linux_hw_breakpoint): New data type.
11975 (MAX_BPTS, MAX_WPTS): Define.
11976 (struct arch_process_info, struct arch_lwp_info): New data types.
11977 (arm_linux_get_hwbp_cap): New function.
11978 (arm_linux_get_hw_breakpoint_count): Likewise.
11979 (arm_linux_get_hw_watchpoint_count): Likewise.
11980 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11981 (arm_hwbp_control_initialize): Likewise.
11982 (arm_hwbp_control_is_enabled): Likewise.
11983 (arm_hwbp_control_is_initialized): Likewise.
11984 (arm_hwbp_control_disable): Likewise.
11985 (arm_linux_hw_breakpoint_equal): Likewise.
11986 (arm_linux_hw_point_initialize): Likewise.
11987 (struct update_registers_data): New data structure.
11988 (update_registers_callback: New function.
11989 (arm_insert_point): Likewise.
11990 (arm_remove_point): Likewise.
11991 (arm_stopped_by_watchpoint): Likewise.
11992 (arm_stopped_data_address): Likewise.
11993 (arm_new_process): Likewise.
11994 (arm_new_thread): Likewise.
11995 (arm_prepare_to_resume): Likewise.
11996 (the_low_target): Register arm_insert_point, arm_remove_point,
11997 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11998 arm_new_thread, and arm_prepare_to_resume.
12000 2011-09-15 Stan Shebs <stan@codesourcery.com>
12002 * server.h (struct emit_ops): Add compare-goto fields.
12003 * tracepoint.c (gdb_agent_op_sizes): New table.
12004 (emit_eq_goto): New function.
12005 (emit_ne_goto): New function.
12006 (emit_lt_goto): New function.
12007 (emit_le_goto): New function.
12008 (emit_gt_goto): New function.
12009 (emit_ge_goto): New function.
12010 (is_goto_target): New function.
12011 (compile_bytecodes): Recognize special cases of compare-goto
12012 combinations and call specialized emitters for them.
12013 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12014 (amd64_emit_ne_goto): New function.
12015 (amd64_emit_lt_goto): New function.
12016 (amd64_emit_le_goto): New function.
12017 (amd64_emit_gt_goto): New function.
12018 (amd64_emit_ge_goto): New function.
12019 (amd64_emit_ops): Add the new functions.
12020 (i386_emit_eq_goto): New function.
12021 (i386_emit_ne_goto): New function.
12022 (i386_emit_lt_goto): New function.
12023 (i386_emit_le_goto): New function.
12024 (i386_emit_gt_goto): New function.
12025 (i386_emit_ge_goto): New function.
12026 (i386_emit_ops): Add the new functions.
12028 2011-09-08 Stan Shebs <stan@codesourcery.com>
12030 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12031 (i386_emit_epilogue): Restore %ebx.
12033 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12035 * server.c (step_thread): Remove definition.
12036 (process_serial_event): Don't handle Hs.
12037 * server.h (step_thread): Remove declaration.
12038 * target.c (set_desired_inferior): Remove use of step_thread.
12040 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12042 * linux-low.c: Include linux-procfs.h.
12043 (linux_attach_lwp_1): Update comments.
12044 (linux_attach): Scan for existing threads when attaching to a
12045 process that is the tgid.
12046 * Makefile.in: Update dependencies.
12048 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12050 * configure.srv: Add linux-procfs.o dependencies.
12052 2011-08-14 Yao Qi <yao@codesourcery.com>
12054 * target.h (struct target_ops): Fix indent.
12055 * win32-low.c (win32_target_ops): Fix comment.
12057 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12058 Yao Qi <yao@codesourcery.com>
12060 * Makefile.in (clean): Remove tic6x-*.c files.
12061 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12062 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12063 (tic6x-c64xp-linux.c): Likewise.
12064 * configure.srv: Add support for tic6x-*-uclinux.
12065 * linux-tic6x-low.c: New.
12066 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12068 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12069 Yao Qi <yao@codesourcery.com>
12071 * target.h (struct target_ops): Add read_loadmap.
12072 * linux-low.c (struct target_loadseg): New type.
12073 (struct target_loadmap): New type.
12074 (linux_read_loadmap): New function.
12075 (linux_target_ops): Add linux_read_loadmap.
12076 * server.c (handle_query): Support qXfer:fdpic:read packet.
12077 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12080 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12082 * win32-low.c: Include <stdint.h>.
12084 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12086 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12087 to the inferior here.
12088 (i386_remove_aligned_watchpoint): Ditto.
12089 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12090 fit part of the watchpoint in the debug registers.
12091 (i386_update_inferior_debug_regs): New.
12092 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12093 registers, and only update the inferior on success.
12094 (i386_low_remove_watchpoint): Ditto.
12096 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12098 * linux-low.c (compare_ints, unique, list_threads, show_process,
12099 linux_core_of_thread): Delete.
12100 (linux_target_ops): Change linux_core_of_thread to
12101 linux_common_core_of_thread.
12102 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12103 * utils.c (malloc_failure): Change type of argument.
12104 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12105 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12106 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12107 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12108 (IPA_OBJS): Add common-utils-ipa.o.
12109 (ptid_h, linux_osdata_h): New macros.
12110 (server_h): Add common/common-utils.h, common/xml-utils.h,
12111 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12113 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12114 ptid.o, buffer.o): New rules.
12115 (linux-low.o): Add common/linux-osdata.h as a dependency.
12116 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12117 * configure.ac: Add AC_HEADER_DIRENT check.
12118 * config.in: Regenerate.
12119 * configure: Regenerate.
12120 * remote-utils.c (xml_escape_text): Delete.
12121 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12122 buffer_xml_printf): Move to common/buffer.c.
12123 * server.c (main): Remove call to initialize_inferiors.
12124 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12125 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12126 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12127 internal_error, gdb_assert, gdb_assert_fail): Delete.
12128 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12129 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12131 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12132 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12133 initialize_inferiors): Delete.
12135 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12137 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12140 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12142 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12144 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12146 2011-05-26 Yao Qi <yao@codesourcery.com>
12148 * Makefile.in (thread-db.o): Track dependence to
12149 common/gdb_thread_db.h.
12150 * thread-db.c: include gdb_thread_db.h from right place.
12152 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12154 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12155 __FILE__ and __LINE__ to internal_error.
12157 2011-05-13 Doug Evans <dje@google.com>
12159 * thread-db.c (try_thread_db_load_from_sdir): New function.
12160 (try_thread_db_load_from_dir): New function.
12161 (thread_db_load_search): Handle $sdir, ignore $pdir.
12162 Remove trying of system directories if search of
12163 libthread-db-search-path fails, that is now done via $sdir.
12165 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12167 * server.c (handle_query): Add EnableDisableTracepoints to the list
12168 of supported features.
12169 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12171 (cmd_qtenable_disable): New.
12172 (cmd_qtstart): Install tracepoints even if disabled.
12173 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12174 receiving a QTEnable or QTDisable packet.
12175 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12176 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12178 (gdb_probe): Skip data collection if static tracepoint is disabled.
12180 2011-05-10 Doug Evans <dje@google.com>
12182 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12184 2011-05-04 Doug Evans <dje@google.com>
12186 * linux-low.c (linux_join): Skip process lookup.
12187 * spu-low.c (spu_join): Ditto.
12188 * server.c (join_inferiors_callback): Delete.
12189 (process_serial_event): For 'D' packet (detach) call join_inferior
12192 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12194 * README: Don't mention xscale*-*-linux*.
12195 * configure.srv (xscale*-*-linux*): Don't handle target.
12197 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12199 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12201 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12202 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12203 (i386_emit_void_call_2): Likewise.
12205 2011-04-26 Yao Qi <yao@codesourcery.com>
12207 * linux-low.c: Move common macros to linux-ptrace.h.
12208 Include linux-ptrace.h.
12209 * Makefile.in (linux_ptrace_h): New.
12210 (linux-low.o): Depends on linux-ptrace.h.
12212 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12214 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12215 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12216 (remote_prepare): New function with most of the TCP code from ...
12217 (remote_open): ... here. Detect PORT here unconditionally. Move also
12218 setting transport_is_reliable.
12219 * server.c (run_once): New variable.
12220 (gdbserver_usage): Document it.
12221 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12222 the first run if RUN_ONCE.
12223 * server.h (run_once, remote_prepare): New declarations.
12225 2011-04-19 Tom Tromey <tromey@redhat.com>
12227 * win32-low.c (handle_load_dll): Remove duplicate "the".
12229 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12231 Remove support for old Cygwin 1.5 versions.
12232 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12233 function to avoid warning.
12234 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12237 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12239 * gdbserver/server.h (Macro _): Define it if not available.
12241 2011-03-14 Michael Snyder <msnyder@vmware.com>
12243 * hostio.c (handle_close): Remove unnecessary null test.
12245 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12247 * Makefile.in (maintainer-clean realclean distclean): Remove
12248 "make ... subdir_do" command.
12250 2011-03-10 Michael Snyder <msnyder@vmware.com>
12252 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12254 * server.c (handle_v_run): Free alloced buffer on early return.
12256 2011-03-09 Yao Qi <yao@codesourcery.com>
12259 2011-03-04 Yao Qi <yao@codesourcery.com>
12261 * Makefile.in: Remove GNU make feature --directory.
12263 2011-03-05 Yao Qi <yao@codesourcery.com>
12265 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12266 (subdir_do): New make target. Copied from gdb/Makefile.
12267 (maintainer-clean, realclean, distclean, clean): Call corresponding
12268 make targets in common/Makefile.
12270 2011-02-11 Yao Qi <yao@codesourcery.com>
12272 * configure.ac: Call AC_PROG_RANLIB.
12273 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12274 * configure: Regenerate.
12276 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12278 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12280 2011-03-06 Yao Qi <yao@codesourcery.com>
12282 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12284 2011-03-05 Yao Qi <yao@codesourcery.com>
12286 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12287 (subdir_do): New make target. Copied from gdb/Makefile.
12288 (maintainer-clean, realclean, distclean, clean): Call corresponding
12289 make targets in common/Makefile.
12291 2011-03-04 Yao Qi <yao@codesourcery.com>
12293 * Makefile.in: Remove GNU make feature --directory.
12295 2011-03-04 Michael Snyder <msnyder@vmware.com>
12297 * server.c (queue_stop_reply): Call xmalloc not malloc.
12299 2011-03-02 Michael Snyder <msnyder@vmware.com>
12301 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12303 2011-02-28 Michael Snyder <msnyder@vmware.com>
12305 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12306 (cmd_qtframe): Ditto.
12307 (cmd_qtbuffer): Ditto.
12308 (cmd_bigqtbuffer): Ditto.
12310 * utils.c (decimal2str): Initialize 'width' to nine, then
12311 don't mess with it.
12313 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12315 * hostio.c (require_data): Free *data, not data.
12317 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12319 * hostio.c (require_data): Use free, not xfree.
12321 2011-02-27 Michael Snyder <msnyder@vmware.com>
12323 * server.c (handle_query): Discard unused value.
12325 * hostio.c (require_data): Free malloc memory before returning
12328 2011-02-26 Michael Snyder <msnyder@vmware.com>
12330 * linux-low.c (list_threads): Call closedir for dirent.
12332 2011-02-27 Michael Snyder <msnyder@vmware.com>
12334 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12335 a case statement falls through.
12337 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12339 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12342 2011-02-26 Michael Snyder <msnyder@vmware.com>
12344 * utils.c (decimal2str): Eliminate dead code and dead param.
12345 (pulongest): Drop dead param from call to decimal2str.
12348 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12350 Revert the following patch (not approved yet):
12351 2011-02-21 Hui Zhu <teawater@gmail.com>
12352 * tracepoint.c (tp_printf): New function.
12353 (eval_agent_expr): Handle gdb_agent_op_printf.
12355 2011-02-21 Hui Zhu <teawater@gmail.com>
12357 * tracepoint.c (tp_printf): New function.
12358 (eval_agent_expr): Handle gdb_agent_op_printf.
12360 2011-02-18 Tom Tromey <tromey@redhat.com>
12362 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12363 (tracepoint.o): Likewise.
12364 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12365 (gdb_agent_op_names): Likewise.
12367 2011-02-18 Tom Tromey <tromey@redhat.com>
12369 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12370 gdb_agent_op_rot>: New constants.
12371 (gdb_agent_op_names): Add pick and roll.
12372 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12375 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12377 * aclocal.m4: Regenerated with aclocal-1.11.1.
12379 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12381 * server.c (handle_qxfer_traceframe_info): New.
12382 (qxfer_packets): Register "traceframe-info".
12383 (handle_query): Report support for qXfer:traceframe-info:read+.
12384 * tracepoint.c (match_blocktype): New.
12385 (traceframe_find_block_type): Rename to ...
12386 (traceframe_walk_blocks): ... this. Add callback filter argument,
12388 (traceframe_find_block_type): New, reimplemented on top of
12389 traceframe_walk_blocks.
12390 (build_traceframe_info_xml): New.
12391 (traceframe_read_info): New.
12392 * server.h (traceframe_read_info): Declare.
12394 2011-02-11 Yao Qi <yao@codesourcery.com>
12396 * configure.ac: Call AC_PROG_RANLIB.
12397 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12398 * configure: Regenerate.
12400 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12402 * server.c (gdb_read_memory): Change return semantics to allow
12404 (handle_search_memory_1): Adjust.
12405 (process_serial_event) <'m' packet>: Handle partial transfers.
12406 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12408 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12410 * regcache.c (init_register_cache): Initialize
12411 regcache->register_status.
12412 (free_register_cache): Release regcache->register_status.
12413 (regcache_cpy): Copy register_status.
12414 (registers_to_string): Print 'x's for unavailable registers.
12415 (supply_register): Mark the register's status valid or
12416 unavailable, depending on whether a buffer was passed in or not.
12417 (supply_register_zeroed): New.
12418 (supply_regblock): Mark the registers' status valid or
12419 unavailable, depending on whether a buffer was passed in or not.
12420 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12421 (struct regcache): New `register_status' field.
12422 (supply_register_zeroed): Declare.
12423 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12424 supply_register_zeroed, rather than passing a NULL buffer to
12426 * tracepoint.c (fetch_traceframe_registers): Update comment.
12428 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12430 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12433 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12435 * server.h (decode_xfer_write): Change prototype.
12436 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12437 and don't extract the annex here.
12438 * server.c (decode_xfer_read): Remove `annex' parameter,
12439 and don't extract the annex here.
12440 (decode_xfer): New.
12441 (struct qxfer): New.
12442 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12443 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12444 (handle_qxfer_statictrace): New functions, abstracted out from
12445 handle_query, and made to use the struct qxfer interface.
12446 (handle_threads_qxfer_proper): Rename to ...
12447 (handle_qxfer_threads_proper): ... this.
12448 (handle_threads_qxfer): Rename to ...
12449 (handle_qxfer_threads): ... this. Adjust.
12450 (qxfer_packets): New array.
12451 (handle_qxfer): New function.
12452 (handle_query): Use handle_qxfer.
12454 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12456 * gdbreplay.c: Shorten lines of >= 80 columns.
12457 * linux-low.c: Ditto.
12458 * linux-ppc-low.c: Ditto.
12459 * linux-s390-low.c: Ditto.
12460 * linux-sparc-low.c: Ditto.
12461 * linux-x86-low.c: Ditto.
12462 * linux-xtensa-low.c: Ditto.
12463 * mem-break.c: Ditto.
12464 * nto-low.c: Ditto.
12465 * regcache.h: Ditto.
12466 * remote-utils.c: Ditto.
12469 * thread-db.c: Ditto.
12470 * tracepoint.c: Ditto.
12472 * win32-low.h: Ditto.
12474 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12476 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12479 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12481 * server.c (gdbserver_version): Update copyright year in version
12483 * gdbreplay.c (gdbreplay_version): Ditto.
12485 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12487 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12488 * linux-bfin-low.c: New file.
12489 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12490 PT_DATA_ADDR for BFIN targets.
12491 * Makefile.in (SFILES): Add linux-bfin-low.c.
12492 (clean): Remove reg-bfin.c.
12493 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12494 * README: Mention supported Blackfin targets.
12496 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12498 * .gitignore: New file.
12500 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12502 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12504 2010-10-22 Jie Zhang <jie@codesourcery.com>
12506 * Makefile.in: Add FLAGS_TO_PASS variable.
12507 (install): Remove dependency of install-only and recursively
12508 invoke make for install-only.
12510 2010-10-04 Doug Evans <dje@google.com>
12512 * Makefile.in (uninstall): Use $(DESTDIR).
12514 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12518 * linux-x86-low.c (compat_siginfo_from_siginfo)
12519 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12520 si_code is < 0. Check for si_code == SI_TIMER before checking for
12523 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12525 * lynx-i386-low.c: New file.
12526 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12528 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12530 * lynx-low.c (ptrace_request_to_str): Remove handling for
12531 request values that have been removed in LynxOS 5.x.
12533 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12535 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12538 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12540 * configure.ac: Add --enable-inprocess-agent option.
12541 * configure: Rebuilt.
12543 2010-09-06 Yao Qi <yao@codesourcery.com>
12545 * linux-low.c (linux_kill): Remove unused variable.
12546 (linux_stabilize_threads): Likewise.
12547 * server.c (start_inferior): Likewise.
12548 (queue_stop_reply_callback): Likewise.
12549 * tracepoint.c (do_action_at_tracepoint): Likewise.
12551 2010-09-06 Yao Qi <yao@codesourcery.com>
12553 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12556 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12558 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12560 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12562 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12565 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12567 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12568 gdbserver/lynx-ppc-low.c: New files.
12569 * Makefile.in (lynx_low_h): New variable.
12570 (lynx-low.o, lynx-ppc-low.o): New rules.
12571 * configure.ac: On LynxOS, link with -lnetinet.
12572 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12573 * configure: regenerate.
12575 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12577 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12578 * configure.ac: Add check for vasprintf and vsnprintf.
12579 * configure, config.in: Regenerate.
12580 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12582 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12584 * gdbreplay.c: Move include of alloca.h up, next to include of
12586 * server.h: Add include of malloc.h.
12587 * mem-break.c: Remove include of malloc.h.
12588 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12590 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12592 * Makefile.in (memmem.o): Build with -Wno-error.
12594 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12596 * utils.c (xsnprintf): Make non-static.
12597 * server.h: Add xsnprintf declaration.
12598 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12599 replace calls to snprintf by calls to xsnprintf throughout.
12601 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12603 * configure.ac: Add configure check for alloca.
12604 * configure, config.in: Regenerate.
12605 * server.h: Include alloca.h if it exists.
12606 * gdbreplay.c: Include alloca.h if it exists.
12608 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12610 * linux-low.c (__SIGRTMIN): Define if not already defined.
12611 (linux_create_inferior): Check for __ANDROID__ rather than
12613 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12614 are already deferred.
12615 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12616 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12617 stopped and already has a pending signal to report.
12618 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12619 a pending signal to report or is moving out of a jump pad.
12620 (linux_init_signals): Check for __ANDROID__ rather than
12623 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12625 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12626 debug_threads check. Avoid a linear search when not doing debug
12629 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12631 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12632 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12633 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12634 (process_event): Change local fd's type to gdb_fildes_t.
12635 (create_file_handler): Adjust prototype.
12636 (delete_file_handler): Adjust prototype.
12637 (handle_file_event): Adjust prototype. Use pfildes.
12638 (create_file_event): Adjsut prototype.
12639 * remote-utils.c (remote_desc, listen_desc): Change type to
12641 * server.h: New gdb_fildes_t typedef.
12642 [USE_WIN32API]: Include winsock2.h.
12643 (delete_file_handler, add_file_handler): Adjust prototypes.
12644 (pfildes): Declare.
12645 * utils.c (pfildes): New.
12647 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12649 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12650 * configure: Regenerate.
12652 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12654 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12655 (linux_done_accessing_memory): ... this.
12656 (linux_target_ops): Adjust.
12657 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12658 * nto-low.c (nto_target_ops): Adjust comment.
12659 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12660 * spu-low.c (spu_target_ops): Adjust comment.
12661 * target.h (target_ops): Rename unprepare_to_access_memory field
12662 to done_accessing_memory.
12663 (unprepare_to_access_memory): Rename to ...
12664 (done_accessing_memory): ... this.
12666 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12668 * linux-low.c (linux_prepare_to_access_memory): New.
12669 (linux_unprepare_to_access_memory): New.
12670 (linux_target_ops): Install them.
12671 * server.c (read_memory): Rename to ...
12672 (gdb_read_memory): ... this. Use
12673 prepare_to_access_memory/prepare_to_access_memory.
12674 (write_memory): Rename to ...
12675 (gdb_write_memory): ... this. Use
12676 prepare_to_access_memory/prepare_to_access_memory.
12677 (handle_search_memory_1): Adjust.
12678 (process_serial_event): Adjust.
12679 * target.h (struct target_ops): New fields
12680 prepare_to_access_memory and unprepare_to_access_memory.
12681 (prepare_to_access_memory, unprepare_to_access_memory): New.
12682 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12683 prepare_to_access_memory/prepare_to_access_memory.
12684 * nto-low.c (nto_target_ops): Adjust.
12685 * spu-low.c (spu_target_ops): Adjust.
12686 * win32-low.c (win32_target_ops): Adjust.
12688 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12690 * Makefile.in (WARN_CFLAGS): Get it from configure.
12691 (WERROR_CFLAGS): New.
12692 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12693 * configure.ac: Introduce --enable-werror, which adds -Werror to
12694 the compiler command line. Enabled by default. Disable with
12695 --disable-werror. Add -Wdeclaration-after-statement
12696 Wpointer-arith and -Wformat-nonliteral to warning flags.
12697 * configure: Regenerate.
12699 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12701 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12703 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12705 * gdbreplay.c (remote_error): New.
12707 (expect): Use gdbchar. Check for error reading from GDB.
12708 Clarify sync error output.
12709 (play): Check for errors writing to GDB.
12710 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12711 * remote-utils.c (getpkt): Check for errors writing to the remote
12714 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12716 * linux-low.c (linux_wait_1): Move non-debugging code out of
12717 `debug_threads' control.
12719 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12721 * linux-low.c (linux_wait_1): Don't set last_status here.
12722 * server.c (push_event, queue_stop_reply_callback): Assert we're
12723 not pushing a TARGET_WAITKIND_IGNORE event.
12724 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12725 (myresume, handle_target_event): Set the thread's last_resume_kind
12726 and last_status from the target returned status.
12728 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12732 * linux-x86-low.c (update_debug_registers_callback): New.
12733 (i386_dr_low_set_addr): Use it.
12734 (i386_dr_low_get_addr): New.
12735 (i386_dr_low_set_control): Use update_debug_registers_callback.
12736 (i386_dr_low_get_control): New.
12737 (i386_dr_low_get_status): Adjust.
12738 * linux-low.c (linux_stop_lwp): New.
12739 * linux-low.h (linux_stop_lwp): Declare.
12741 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12742 argument instead of a i386_debug_reg_state.
12743 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12744 a i386_debug_reg_state.
12745 (i386_insert_aligned_watchpoint): Adjust.
12746 (i386_remove_aligned_watchpoint): Adjust.
12747 (i386_low_stopped_data_address): Read the debug registers from the
12748 inferior instead of from the mirrors.
12749 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12750 (i386_dr_low_get_addr): Declare.
12751 (i386_dr_low_get_control): Declare.
12752 (i386_dr_low_get_status): Change prototype.
12754 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12755 (i386_dr_low_get_addr): New.
12756 (i386_dr_low_get_control): New.
12757 (i386_dr_low_get_status): Adjust prototype. Return
12759 (i386_initial_stuff): Clear dr_status_mirror and
12761 (i386_get_thread_context): Adjust.
12762 (i386_set_thread_context): Adjust.
12763 (i386_thread_added): Adjust.
12765 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12767 * linux-low.h (linux_thread_area): Delete declaration.
12769 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12771 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12772 after its termination.
12774 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12776 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12777 (gdb_wants_all_stopped): Delete.
12778 (linux_wait_1): Don't call them.
12779 * server.c (handle_v_cont): Tag all threads as want-stopped.
12780 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12781 stopped as "client-wants-stopped".
12783 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12785 * Makefile.in (signals_h): New.
12786 (server_h): Depend on it.
12787 (server.o): Don't depend on $(signals_def).
12788 (signals.o): Depend on $(signals_def).
12790 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12792 * Makefile.in (signals_def): New.
12793 (server_h): Append include/gdb/signals.h and signals_def.
12794 (server.o): Append signals_def.
12796 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12798 * server.c (handle_target_event): Use target_signal_to_host for
12799 resume_info.sig initialization.
12800 * target.h (struct thread_resume) <sig>: New comment.
12802 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12804 * server.c (handle_query): strcpy() the returned string from paddress()
12805 instead of sprintf().
12806 * utils.c (paddress): Return phex_nz().
12808 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12810 * server.c (handle_v_cont): Call mourn_inferior if process
12812 (myresume): Likewise.
12814 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12816 Static tracepoints, and integration with UST.
12818 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12819 * mem-break.c (uninsert_all_breakpoints)
12820 (reinsert_all_breakpoints): New.
12821 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12822 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12823 (gdb_agent_ust_loaded, helper_thread_id)
12824 (gdb_agent_helper_thread_id): New macros.
12825 (struct ipa_sym_addresses): Add addr_ust_loaded,
12826 addr_helper_thread_id, addr_cmd_buf.
12827 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12828 (in_process_agent_loaded_ust): New.
12829 (write_e_ust_not_loaded): New.
12830 (maybe_write_ipa_ust_not_loaded): New.
12831 (struct collect_static_trace_data_action): New.
12832 (enum tracepoint_type) <static_tracepoint>: New.
12833 (struct tracepoint) <handle>: Mention static tracepoints.
12834 (struct static_tracepoint_ctx): New.
12835 (CMD_BUF_SIZE): New.
12836 (add_tracepoint_action): Handle static tracepoint actions.
12837 (unprobe_marker_at): New.
12838 (clear_installed_tracepoints): Handle static tracepoints.
12839 (cmd_qtdp): Handle static tracepoints.
12840 (probe_marker_at): New.
12841 (cmd_qtstart): Handle static tracepoints.
12842 (response_tracepoint): Handle static tracepoints.
12843 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12844 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12845 (get_context_regcache): Handle static tracepoints.
12846 (do_action_at_tracepoint): Handle static tracepoint actions.
12847 (traceframe_find_block_type): Handle static trace data blocks.
12848 (traceframe_read_sdata): New.
12849 (download_tracepoints): Download static tracepoint actions.
12850 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12851 (GDB_PROBE_NAME): New.
12853 (GET_UST_SYM): New.
12856 (ust_marker_to_static_tracepoint): New.
12858 (collect_ust_data_at_tracepoint): New.
12859 (gdb_ust_probe): New.
12860 (UNIX_PATH_MAX, SOCK_DIR): New.
12861 (gdb_ust_connect_sync_socket): New.
12862 (resume_thread, stop_thread): New.
12863 (run_inferior_command): New.
12864 (init_named_socket): New.
12865 (gdb_ust_socket_init): New.
12866 (cstr_to_hexstr): New.
12868 (first_marker, next_marker): New.
12869 (response_ust_marker): New.
12870 (cmd_qtfstm, cmd_qtsstm): New.
12871 (unprobe_marker_at, probe_marker_at): New.
12872 (cmd_qtstmat, gdb_ust_thread): New.
12873 (gdb_ust_init): New.
12874 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12875 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12876 (ST_REGENTRY): New.
12877 (x86_64_st_collect_regmap): New.
12878 (X86_64_NUM_ST_COLLECT_GREGS): New.
12879 (AMD64_RIP_REGNUM): New.
12880 (supply_static_tracepoint_registers): New.
12881 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12882 (ST_REGENTRY): New.
12883 (i386_st_collect_regmap): New.
12884 (i386_NUM_ST_COLLECT_GREGS): New.
12885 (supply_static_tracepoint_registers): New.
12886 * server.c (handle_query): Handle qXfer:statictrace:read.
12887 <qSupported>: Report support for StaticTracepoints, and
12888 qXfer:statictrace:read features.
12889 * server.h (traceframe_read_sdata)
12890 (supply_static_tracepoint_registers): Declare.
12891 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12892 (unpack_varlen_hex): Include in IPA build.
12893 * Makefile.in (ustlibs, ustinc): New.
12894 (IPA_OBJS): Add remote-utils-ipa.o.
12895 ($(IPA_LIB)): Link -ldl and -lpthread.
12897 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12898 * config.in, configure: Regenerate.
12900 2010-06-20 Ian Lance Taylor <iant@google.com>
12901 Pedro Alves <pedro@codesourcery.com>
12903 * linux-x86-low.c (always_true): Delete.
12904 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12905 trying to fool the compiler with always_true.
12907 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12909 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12910 conditions in gdbserver.
12912 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12914 * spu-low.c (spu_read_memory): Wrap around local store limit.
12915 (spu_write_memory): Likewise.
12917 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12919 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12920 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12922 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12924 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12925 uses with LONGEST uses.
12927 2010-06-14 Stan Shebs <stan@codesourcery.com>
12928 Pedro Alves <pedro@codesourcery.com>
12932 * linux-x86-low.c: Include limits.h.
12934 (always_true): New.
12937 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12938 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12939 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12940 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12941 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12942 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12943 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12944 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12945 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12946 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12947 (amd64_emit_void_call_2): New.
12948 (amd64_emit_ops): New.
12949 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12950 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12951 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12952 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12953 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12954 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12955 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12956 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12957 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12958 (i386_emit_stack_adjust, i386_emit_int_call_1)
12959 (i386_emit_void_call_2): New.
12960 (i386_emit_ops): New.
12961 (x86_emit_ops): New.
12962 (the_low_target): Install x86_emit_ops.
12963 * server.h (struct emit_ops): New.
12964 (get_raw_reg_func_addr): Declare.
12965 (current_insn_ptr, emit_error): Declare.
12966 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12967 (set_trace_state_variable_value): New defines.
12968 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12969 addr_get_trace_state_variable_value and
12970 addr_set_trace_state_variable_value.
12971 (symbol_list): New fields for get_raw_reg,
12972 get_trace_state_variable_value and set_trace_state_variable_value.
12973 (condfn): New typedef.
12974 (struct tracepoint): New field `compiled_cond'.
12975 (do_action_at_tracepoint): Clear compiled_cond.
12976 (get_trace_state_variable_value, set_trace_state_variable_value):
12978 (condition_true_at_tracepoint): If there's a compiled condition,
12980 (current_insn_ptr, emit_error): New globals.
12981 (struct bytecode_address): New.
12982 (get_raw_reg_func_addr): New.
12983 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12984 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12985 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12986 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12987 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12988 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12989 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12990 (compile_tracepoint_condition, compile_bytecodes): New.
12991 * target.h (emit_ops): Forward declare.
12992 (struct target_ops): New field emit_ops.
12993 (target_emit_ops): New.
12994 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12995 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12996 * linux-low.c (linux_emit_ops): New.
12997 (linux_target_ops): Install it.
12998 * linux-low.h (struct linux_target_ops): New field emit_ops.
13000 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13002 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13003 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13005 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13006 Stan Shebs <stan@codesourcery.com>
13008 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13009 (all): Depend on $(extra_libraries).
13010 (install-only): Install the IPA.
13011 (IPA_OBJS, IPA_LIB): New.
13012 (clean): Remove the IPA lib.
13013 (IPAGENT_CFLAGS): New.
13014 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13015 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13016 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13017 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13018 * configure.ac: Check for atomic builtins support in the compiler.
13019 (IPA_DEPFILES, extra_libraries): Define.
13020 * configure.srv (ipa_obj): Add description.
13021 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13022 (i[34567]86-*-linux*): Set ipa_obj.
13023 (x86_64-*-linux*): Set ipa_obj.
13024 * linux-low.c (stabilizing_threads): New.
13025 (supports_fast_tracepoints): New.
13026 (linux_detach): Stabilize threads before detaching.
13027 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13028 the lwp is either not stabilizing, or is moving out of a jump pad.
13029 (linux_fast_tracepoint_collecting): New.
13030 (maybe_move_out_of_jump_pad): New.
13031 (enqueue_one_deferred_signal): New.
13032 (dequeue_one_deferred_signal): New.
13033 (linux_wait_for_event_1): If moving out of a jump pad, defer
13034 pending signals to later.
13035 (linux_stabilize_threads): New.
13036 (linux_wait_1): Check if threads need moving out of jump pads, and
13038 (stuck_in_jump_pad_callback): New.
13039 (move_out_of_jump_pad_callback): New.
13040 (lwp_running): New.
13041 (linux_resume_one_lwp): Handle moving out of jump pads.
13042 (linux_set_resume_request): Dequeue deferred signals.
13043 (need_step_over_p): Also step over fast tracepoint jumps.
13044 (start_step_over): Also uninsert fast tracepoint jumps.
13045 (finish_step_over): Also reinsert fast tracepoint jumps.
13046 (linux_install_fast_tracepoint_jump): New.
13047 (linux_target_ops): Install linux_stabilize_threads and
13048 linux_install_fast_tracepoint_jump_pad.
13049 * linux-low.h (linux_target_ops) <get_thread_area,
13050 install_fast_tracepoint_jump_pad>: New fields.
13051 (struct lwp_info) <collecting_fast_tracepoint,
13052 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13053 (linux_get_thread_area): Declare.
13054 * linux-x86-low.c (jump_insn): New.
13055 (x86_get_thread_area): New.
13056 (append_insns): New.
13057 (push_opcode): New.
13058 (amd64_install_fast_tracepoint_jump_pad): New.
13059 (i386_install_fast_tracepoint_jump_pad): New.
13060 (x86_install_fast_tracepoint_jump_pad): New.
13061 (the_low_target): Install x86_get_thread_area and
13062 x86_install_fast_tracepoint_jump_pad.
13063 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13064 (struct fast_tracepoint_jump): New.
13065 (fast_tracepoint_jump_insn): New.
13066 (fast_tracepoint_jump_shadow): New.
13067 (find_fast_tracepoint_jump_at): New.
13068 (fast_tracepoint_jump_here): New.
13069 (delete_fast_tracepoint_jump): New.
13070 (set_fast_tracepoint_jump): New.
13071 (uninsert_fast_tracepoint_jumps_at): New.
13072 (reinsert_fast_tracepoint_jumps_at): New.
13073 (set_breakpoint_at): Use write_inferior_memory.
13074 (uninsert_raw_breakpoint): Use write_inferior_memory.
13075 (check_mem_read): Mask out fast tracepoint jumps.
13076 (check_mem_write): Mask out fast tracepoint jumps.
13077 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13078 (set_fast_tracepoint_jump): Declare.
13079 (delete_fast_tracepoint_jump)
13080 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13081 (reinsert_fast_tracepoint_jumps_at): Declare.
13082 * regcache.c: Don't compile many functions when building the
13083 in-process agent library.
13084 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13085 the register buffer in the heap.
13086 (free_register_cache): If the register buffer isn't owned by the
13087 regcache, don't free it.
13088 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13089 pre-existing register caches.
13090 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13092 (convert_ascii_to_int): : Constify `from' parameter type.
13093 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13094 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13095 the needed buffer in-place.
13096 (relocate_instruction): New.
13097 * server.c (handle_query) <qSymbols>: If the target supports
13098 tracepoints, give it a chance of looking up symbols. Report
13099 support for fast tracepoints.
13100 (handle_status): Stabilize threads.
13101 (process_serial_event): Adjust.
13102 * server.h (struct fast_tracepoint_jump): Forward declare.
13103 (struct process_info) <fast_tracepoint_jumps>: New field.
13104 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13105 (decode_X_packet, decode_M_packet): Adjust.
13106 (relocate_instruction): Declare.
13107 (in_process_agent_loaded): Declare.
13108 (tracepoint_look_up_symbols): Declare.
13109 (struct fast_tpoint_collect_status): Declare.
13110 (fast_tracepoint_collecting): Declare.
13111 (force_unlock_trace_buffer): Declare.
13112 (handle_tracepoint_bkpts): Declare.
13113 (initialize_low_tracepoint)
13114 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13115 * target.h (struct target_ops) <stabilize_threads,
13116 install_fast_tracepoint_jump_pad>: New fields.
13117 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13118 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13119 [HAVE_STDINT_H]: Include stdint.h.
13120 (trace_debug_1): Rename to ...
13121 (trace_vdebug): ... this.
13122 (trace_debug): Rename to ...
13123 (trace_debug_1): ... this. Add `level' parameter.
13124 (trace_debug): New.
13125 (ATTR_USED, ATTR_NOINLINE): New.
13126 (IP_AGENT_EXPORT): New.
13127 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13128 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13129 (about_to_request_buffer_space, trace_buffer_is_full)
13130 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13131 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13132 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13133 (traceframe_write_count, traceframes_created)
13134 (trace_state_variables)
13135 New renaming defines.
13136 (struct ipa_sym_addresses): New.
13137 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13138 (symbol_list): New.
13139 (ipa_sym_addrs): New.
13140 (all_tracepoint_symbols_looked_up): New.
13141 (in_process_agent_loaded): New.
13142 (write_e_ipa_not_loaded): New.
13143 (maybe_write_ipa_not_loaded): New.
13144 (tracepoint_look_up_symbols): New.
13145 (debug_threads) [IN_PROCESS_AGENT]: New.
13146 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13147 (UNKNOWN_SIDE_EFFECTS): New.
13148 (stop_tracing): New.
13149 (flush_trace_buffer): New.
13150 (stop_tracing_bkpt): New.
13151 (flush_trace_buffer_bkpt): New.
13152 (read_inferior_integer): New.
13153 (read_inferior_uinteger): New.
13154 (read_inferior_data_pointer): New.
13155 (write_inferior_data_pointer): New.
13156 (write_inferior_integer): New.
13157 (write_inferior_uinteger): New.
13158 (struct collect_static_trace_data_action): Delete.
13159 (enum tracepoint_type): New.
13160 (struct tracepoint) <type>: New field `type'.
13161 <actions_str, step_actions, step_actions_str>: Only include in
13163 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13164 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13165 (tracepoints): Use IP_AGENT_EXPORT.
13166 (last_tracepoint): Don't include in the IPA.
13167 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13168 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13169 (alloced_trace_state_variables): New.
13170 (trace_state_variables): Use IP_AGENT_EXPORT.
13171 (traceframe_t): Delete unused variable.
13172 (circular_trace_buffer): Don't include in the IPA.
13173 (trace_buffer_start): Delete.
13174 (struct trace_buffer_control): New.
13175 (trace_buffer_free): Delete.
13176 (struct ipa_trace_buffer_control): New.
13177 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13178 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13180 (trace_buffer_ctrl): New.
13181 (TRACE_BUFFER_CTRL_CURR): New.
13182 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13183 Reimplement as macros.
13184 (trace_buffer_wrap): Delete.
13185 (traceframe_write_count, traceframe_read_count)
13186 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13187 (struct tracepoint_hit_ctx) <type>: New field.
13188 (struct fast_tracepoint_ctx): New.
13189 (memory_barrier): New.
13191 (record_tracepoint_error): Update atomically in the IPA.
13192 (clear_inferior_trace_buffer): New.
13193 (about_to_request_buffer_space): New.
13194 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13195 updating the same buffer.
13196 (add_tracepoint): Default the tracepoint's type to trap
13197 tracepoint, and orig_size to -1.
13198 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13199 internal variables.
13200 (create_trace_state_variable): New parameter `gdb'. Handle it.
13201 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13202 (cmd_qtdp): Handle fast tracepoints.
13203 (cmd_qtdv): Adjust.
13204 (max_jump_pad_size): New.
13205 (gdb_jump_pad_head): New.
13206 (get_jump_space_head): New.
13207 (claim_jump_space): New.
13208 (sort_tracepoints): New.
13209 (MAX_JUMP_SIZE): New.
13210 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13212 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13213 support. Upload fast traceframes, and delete internal IPA
13215 (stop_tracing_handler): New.
13216 (flush_trace_buffer_handler): New.
13217 (cmd_qtstop): Upload fast tracepoints.
13218 (response_tracepoint): Handle fast tracepoints.
13219 (tracepoint_finished_step): Upload fast traceframes. Set the
13220 tracepoint hit context's tracepoint type.
13221 (handle_tracepoint_bkpts): New.
13222 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13223 type. Add comment about fast tracepoints.
13224 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13225 non-existing action_str field.
13226 (get_context_regcache): Handle fast tracepoints.
13227 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13229 (fast_tracepoint_from_jump_pad_address): New.
13230 (fast_tracepoint_from_ipa_tpoint_address): New.
13231 (collecting_t): New.
13232 (force_unlock_trace_buffer): New.
13233 (fast_tracepoint_collecting): New.
13235 (gdb_collect): New.
13236 (write_inferior_data_ptr): New.
13237 (target_tp_heap): New.
13238 (target_malloc): New.
13239 (download_agent_expr): New.
13241 (download_tracepoints): New.
13242 (download_trace_state_variables): New.
13243 (upload_fast_traceframes): New.
13244 (IPA_FIRST_TRACEFRAME): New.
13245 (IPA_NEXT_TRACEFRAME_1): New.
13246 (IPA_NEXT_TRACEFRAME): New.
13247 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13248 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13249 (gdb_jump_pad_buffer_end): New.
13250 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13251 (initialize_tracepoint): Adjust.
13252 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13253 buffer. Initialize the low module.
13254 * utils.c (PREFIX, TOOLNAME): New.
13255 (malloc_failure): Use PREFIX.
13256 (error): In the IPA, an error causes an exit.
13257 (fatal, warning): Use PREFIX.
13258 (internal_error): Use TOOLNAME.
13259 (NUMCELLS): Increase to 10.
13260 * configure, config.in: Regenerate.
13262 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13264 * server.c (handle_query) <qSupported>: Do two passes over the
13265 qSupported string to avoid nesting strtok.
13267 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13269 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13271 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13272 -Wl,--dynamic-list.
13273 * configure: Regenerate.
13274 * proc-service.list: New.
13276 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13278 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13281 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13283 * gdbreplay.c (remote_open): Check error return from socket() call by
13284 its equality to -1 not by it being negative.
13285 * remote-utils.c (remote_open): Likewise.
13287 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13289 * config.h: Regenerate.
13291 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13293 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13294 doesn't provide PTRACE_GET_THREAD_AREA.
13296 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13298 * linux-m68k-low.c: Include <asm/ptrace.h>
13299 (ps_get_thread_area): Implement.
13301 2010-05-03 Doug Evans <dje@google.com>
13303 * event-loop.c (struct callback_event): New struct.
13304 (callback_list): New global.
13305 (append_callback_event, delete_callback_event): New functions.
13306 (process_callback): New function.
13307 (start_event_loop): Call it.
13308 * remote-utils.c (NOT_SCHEDULED): Define.
13309 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13310 moved out of readchar.
13311 (readchar): Rewrite. Call reschedule before returning.
13312 (reset_readchar): New function.
13313 (remote_close): Call it.
13314 (process_remaining, reschedule): New functions.
13315 * server.h (callback_handler_func): New typedef.
13316 (append_callback_event, delete_callback_event): Declare.
13318 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13320 * proc-service.c (ps_pglobal_lookup): Use
13321 thread_db_look_up_one_symbol.
13322 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13323 parameter. Use it instead of all_symbols_looked_up.
13324 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13326 (all_symbols_looked_up): Don't declare.
13327 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13328 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13330 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13331 Set all_symbols_looked_up here.
13332 (thread_db_look_up_one_symbol): New.
13333 (thread_db_get_tls_address): Adjust.
13334 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13335 thread_db object on the heap, and tentatively set it in the
13337 (thread_db_init): Don't set all_symbols_looked_up here.
13338 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13340 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13342 * linux-low.c (linux_kill, linux_detach): Adjust.
13343 (status_pending_p_callback): Remove redundant statement. Check
13344 for !TARGET_WAITIKIND_IGNORE, instead of
13345 TARGET_WAITKIND_STOPPED.
13346 (handle_tracepoints): Make sure LWP is locked. Adjust.
13347 (linux_wait_for_event_1): Adjust.
13348 (linux_cancel_breakpoints): New.
13349 (unsuspend_one_lwp): New.
13350 (unsuspend_all_lwps): New.
13351 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13352 (send_sigstop_callback): Change return type to int, add new
13353 `except' parameter and handle it.
13354 (suspend_and_send_sigstop_callback): New.
13355 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13356 pass them down. If SUSPEND, also increment the lwp's suspend
13358 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13359 (need_step_over_p): Don't consider suspended LWPs.
13360 (start_step_over): Adjust.
13361 (proceed_one_lwp): Change return type to int, add new `except'
13362 parameter and handle it.
13363 (unsuspend_and_proceed_one_lwp): New.
13364 (proceed_all_lwps): Use find_inferior instead of
13366 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13367 also decrement the suspend count of LWPs. Pass `except' down,
13368 instead of hacking its suspend count.
13369 (linux_pause_all): Add `freeze' parameter. Adjust.
13370 (linux_unpause_all): New.
13371 (linux_target_ops): Install linux_unpause_all.
13372 * server.c (handle_status): Adjust.
13373 * target.h (struct target_ops): New fields `unpause_all' and
13374 `cancel_breakpoints'. Add new parameter to `pause_all'.
13375 (pause_all): Add new `freeze' parameter.
13376 (unpause_all): New.
13377 (cancel_breakpoints): New.
13378 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13379 cancel breakpoints.
13380 (cmd_qtstart): Pause threads.
13381 (stop_tracing): Pause threads, and cancel breakpoints.
13382 * win32-low.c (win32_target_ops): Adjust.
13384 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13386 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13387 the inferior right away from here...
13388 (linux_wait_1): ... to here, and adjust to check the thread's
13389 last_resume_kind instead of the lwp's step or stop_expected flags.
13391 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13393 * README: Use consistent `GDB' and `GDBserver' spellings.
13395 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13397 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13398 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13399 (linux_detach_one_lwp): Assume the lwp is stopped.
13400 (any_thread_of): Delete.
13401 (linux_detach): Stop all lwps here. Don't blindly delete all
13403 (delete_lwp_callback): New.
13404 (linux_mourn): Delete all lwps of the process that is gone.
13405 (linux_wait_1): Don't delete the last lwp of the process here.
13406 * mem-break.h (mark_breakpoints_out): Declare.
13407 * mem-break.c (mark_breakpoints_out): New.
13408 (free_all_breakpoints): Use it.
13409 * server.c (handle_target_event): If the process is gone, mark
13411 * thread-db.c (struct thread_db) <create_bp>: New field.
13412 (thread_db_enable_reporting): Fix prototype. Store a thread event
13413 breakpoint reference in the thread_db struct.
13414 (thread_db_load_search): Clear the thread_db object.
13415 (try_thread_db_load_1): Ditto.
13416 (switch_to_process): New.
13417 (disable_thread_event_reporting): Use it.
13418 (remove_thread_event_breakpoints): New.
13419 (thread_db_detach, thread_db_mourn): Use it.
13421 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13423 * linux-low.c (linux_enable_event_reporting): New.
13424 (linux_wait_for_event_1, handle_extended_wait): Use it.
13426 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13428 * linux-low.c (linux_kill_one_lwp, linux_kill)
13429 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13430 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13431 SIGSTOP even if the LWP is stopped.
13432 (send_sigstop_callback): New.
13433 (stop_all_lwps): Use send_sigstop_callback instead.
13434 (linux_resume_one_thread): Adjust.
13435 (proceed_one_lwp): Still proceed an LWP that the client has
13436 requested to stop, if we haven't reported it as stopped yet. Make
13437 sure that LWPs the client want stopped, have a pending SIGSTOP.
13439 2010-04-26 Doug Evans <dje@google.com>
13441 * server.c (handle_general_set): Make static.
13443 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13444 Print received char after testing for error/eof instead of before.
13445 (input_interrupt): Tweak comment.
13447 2010-04-23 Doug Evans <dje@google.com>
13449 * server.c (start_inferior): Print inferior argv if --debug.
13451 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13453 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13454 * nto-x86-low.c: Include server.h
13456 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13458 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13459 be consistent with other sources of this directory.
13460 (init_registers_amd64): Correct name of source file of this function
13463 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13465 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13466 64-bit executables.
13468 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13470 * win32-i386-low.c: Add 64-bit support.
13471 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13472 (init_registers_amd64): Declare.
13473 (mappings): Add 64-bit version of array.
13474 (init_windows_x86): New function.
13475 (the_low_target): Change init_arch field to init_windows_x86.
13477 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13479 * win32-low.c: Adapt to support also 64-bit architecture.
13480 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13481 (get_image_name): Use SIZE_T type for local variable `done'.
13482 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13483 (toolhelp_get_dll_name): Idem.
13484 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13485 Use uintptr_t typecast to avoid warning.
13486 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13487 (handle_exception): Use phex_nz to avoid warning.
13488 (win32_wait): Remove unused local variable `process'.
13490 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13492 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13495 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13497 * configure.ac: Use `ws2_32' library for srv_mingw.
13498 * configure: Regenerate.
13499 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13500 * remote-utils.c: Likewise.
13502 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13504 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13505 if __x86_64__ is defined.
13507 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13509 * configure: Regenerate.
13511 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13513 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13514 * target.h (target_ops): New get_tib_address field.
13515 * win32-low.h (win32_thread_info): Add thread_local_base field.
13516 * win32-low.c (child_add_thread): Add tlb argument.
13517 Set thread_local_base field to TLB.
13518 (get_child_debug_event): Adapt to child_add_thread change.
13519 (win32_get_tib_address): New function.
13520 (win32_target_ops): Set get_tib_address field to
13521 win32_get_tib_address.
13522 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13524 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13526 * linux-low.c (linux_mourn): Also remove the process.
13527 * server.c (handle_target_event): Don't remove the process here.
13528 * nto-low.c (nto_mourn): New.
13529 (nto_target_ops): Install it.
13530 * spu-low.c (spu_mourn): New.
13531 (spu_target_ops): Install it.
13532 * win32-low.c (win32_mourn): New.
13533 (win32_target_ops): Install it.
13535 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13537 * server.h (buffer_xml_printf): Remove redundant `;'.
13539 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13541 * regcache.c (set_register_cache): Invalidate regcaches before
13542 changing the register cache layout.
13543 (regcache_invalidate_one): Allow a NULL regcache.
13544 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13545 regcaches before changing the register cache layout or the target
13548 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13550 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13551 variable warning on Linux/x86-64.
13553 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13555 GDBserver disconnected tracing support.
13557 * linux-low.c (linux_remove_process): Delete.
13558 (add_lwp): Don't set last_resume_kind here.
13559 (linux_kill): Use `mourn'.
13560 (linux_detach): Use `thread_db_detach', and `mourn'.
13561 (linux_mourn): New.
13562 (linux_attach_lwp_1): Adjust comment.
13563 (linux_attach): last_resume_kind moved the thread_info; adjust.
13564 (status_pending_p_callback): Adjust.
13565 (linux_wait_for_event_1): Adjust.
13566 (count_events_callback, select_singlestep_lwp_callback)
13567 (select_event_lwp_callback, cancel_breakpoints_callback)
13568 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13569 (proceed_one_lwp): Adjust.
13570 (linux_async): Add debug output.
13571 (linux_thread_stopped): New.
13572 (linux_pause_all): New.
13573 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13575 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13576 (thread_db_free): Delete declaration.
13577 (thread_db_detach, thread_db_mourn): Declare.
13578 * thread-db.c (thread_db_init): Use thread_db_mourn.
13579 (thread_db_free): Delete, split in two.
13580 (disable_thread_event_reporting): New.
13581 (thread_db_detach): New.
13582 (thread_db_mourn): New.
13584 * server.h (struct thread_info) <last_resume_kind>: New field.
13585 <attached>: Add comment.
13586 <gdb_detached>: New field.
13587 (handler_func): Change return type to int.
13588 (handle_serial_event, handle_target_event): Ditto.
13589 (gdb_connected): Declare.
13591 (disconnected_tracing): Declare.
13592 (stop_tracing): Declare.
13594 * server.c (handle_query) <qSupported>: Report support for
13595 disconnected tracing.
13596 (queue_stop_reply_callback): Account for running threads.
13597 (gdb_wants_thread_stopped): New.
13598 (gdb_wants_all_threads_stopped): New.
13599 (gdb_reattached_process): New.
13600 (handle_status): Clear the `gdb_detached' flag of all processes.
13601 In all-stop, stop all threads.
13602 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13603 (process_serial_event): If the remote connection breaks, or if an
13604 exit was forced with "monitor exit", force an event loop exit.
13605 Handle disconnected tracing on detach.
13606 (handle_serial_event): Adjust.
13607 (handle_target_event): If GDB isn't connected, forward events back
13608 to the inferior, unless the last process exited, in which case,
13609 exit gdbserver. Adjust interface.
13611 * remote-utils.c (remote_open): Don't block in accept. Instead
13612 register an event loop source on the listen socket file
13613 descriptor. Refactor bits into ...
13614 (listen_desc): ... this new global.
13615 (gdb_connected): ... this new function.
13616 (enable_async_notification): ... this new function.
13617 (handle_accept_event): ... this new function.
13618 (remote_close): Clear remote_desc.
13620 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13622 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13624 (mourn_inferior): Define.
13625 (target_process_qsupported): Avoid the dangling else problem.
13626 (thread_stopped): Define.
13627 (pause_all): Define.
13628 (target_waitstatus_to_string): Declare.
13629 * target.c (target_waitstatus_to_string): New.
13631 * tracepoint.c (tracing): Make extern.
13632 (disconnected_tracing): New.
13633 (stop_tracing): Make extern. Handle tracing stops due to GDB
13635 (cmd_qtdisconnected): New.
13636 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13637 (handle_tracepoint_general_set): Handle QTDisconnected.
13639 * event-loop.c (event_handler_func): Change return type to int.
13640 (process_event): Bail out if the event handler wants the event
13642 (handle_file_event): Ditto.
13643 (start_event_loop): Bail out if the event handler wants the event
13646 * nto-low.c (nto_target_ops): Adjust.
13647 * spu-low.c (spu_wait): Don't remove the process here.
13648 (spu_target_ops): Adjust.
13649 * win32-low.c (win32_wait): Don't remove the process here.
13650 (win32_target_ops): Adjust.
13652 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13654 * regcache.c (realloc_register_cache): Invalidate inferior's
13655 regcache before recreating it.
13657 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13659 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13661 2010-04-09 Stan Shebs <stan@codesourcery.com>
13662 Pedro Alves <pedro@codesourcery.com>
13664 * server.h (LONGEST): New.
13665 (struct thread_info) <while_stepping>: New field.
13666 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13668 (initialize_tracepoint, handle_tracepoint_general_set)
13669 (handle_tracepoint_query, tracepoint_finished_step)
13670 (tracepoint_was_hit, release_while_stepping_state_list):
13671 (current_traceframe): Declare.
13672 * server.c (handle_general_set): Handle tracepoint packets.
13673 (read_memory): New.
13674 (write_memory): New.
13675 (handle_search_memory_1): Use read_memory.
13676 (handle_query): Report support for conditional tracepoints, trace
13677 state variables, and tracepoint sources. Handle tracepoint
13679 (main): Initialize the tracepoints module.
13680 (process_serial_event): Handle traceframe reads/writes.
13682 * linux-low.c (handle_tracepoints): New.
13683 (linux_wait_1): Call it.
13684 (linux_resume_one_lwp): Handle while-stepping.
13685 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13686 (linux_target_ops): Install them.
13687 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13689 * linux-x86-low.c (x86_supports_tracepoints): New.
13690 (the_low_target). Install it.
13692 * mem-break.h (delete_breakpoint): Declare.
13693 * mem-break.c (delete_breakpoint): Make external.
13695 * target.h (struct target_ops): Add `supports_tracepoints',
13696 `read_pc', and `write_pc' fields.
13697 (target_supports_tracepoints): Define.
13698 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13701 * regcache.h (struct regcache) <registers_owned>: New field.
13702 (init_register_cache, regcache_cpy): Declare.
13703 (regcache_read_pc, regcache_write_pc): Declare.
13704 (register_cache_size): Declare.
13705 (supply_regblock): Declare.
13706 * regcache.c (init_register_cache): New.
13707 (new_register_cache): Use it.
13708 (regcache_cpy): New.
13709 (register_cache_size): New.
13710 (supply_regblock): New.
13711 (regcache_read_pc, regcache_write_pc): New.
13713 * tracepoint.c: New.
13715 * Makefile.in (OBS): Add tracepoint.o.
13716 (tracepoint.o): New rule.
13718 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13720 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13722 (i386-mmx.c): Likewise.
13723 (i386-mmx-linux.o): Likewise.
13724 (i386-mmx-linux.c): Likewise.
13726 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13727 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13728 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13729 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13731 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13732 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13733 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13735 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13737 * Makefile.in (clean): Updated.
13739 (i386-avx.c): Likewise.
13740 (i386-avx-linux.o): Likewise.
13741 (i386-avx-linux.c): Likewise.
13742 (amd64-avx.o): Likewise.
13743 (amd64-avx.c): Likewise.
13744 (amd64-avx-linux.o): Likewise.
13745 (amd64-avx-linux.c): Likewise.
13747 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13748 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13749 (srv_amd64_regobj): Add amd64-avx.o.
13750 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13751 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13752 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13753 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13754 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13755 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13756 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13758 * i387-fp.c: Include "i386-xstate.h".
13760 (i387_cache_to_xsave): Likewise.
13761 (i387_xsave_to_cache): Likewise.
13762 (x86_xcr0): Likewise.
13764 * i387-fp.h (i387_cache_to_xsave): Likewise.
13765 (i387_xsave_to_cache): Likewise.
13766 (x86_xcr0): Likewise.
13768 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13769 * linux-crisv32-low.c (target_regsets): Likewise.
13770 * linux-m68k-low.c (target_regsets): Likewise.
13771 * linux-mips-low.c (target_regsets): Likewise.
13772 * linux-ppc-low.c (target_regsets): Likewise.
13773 * linux-s390-low.c (target_regsets): Likewise.
13774 * linux-sh-low.c (target_regsets): Likewise.
13775 * linux-sparc-low.c (target_regsets): Likewise.
13776 * linux-xtensa-low.c (target_regsets): Likewise.
13778 * linux-low.c: Include <sys/uio.h>.
13779 (regsets_fetch_inferior_registers): Support nt_type.
13780 (regsets_store_inferior_registers): Likewise.
13781 (linux_process_qsupported): New.
13782 (linux_target_ops): Add linux_process_qsupported.
13784 * linux-low.h (regset_info): Add nt_type.
13785 (linux_target_ops): Add process_qsupported.
13787 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13789 (init_registers_i386_avx_linux): New.
13790 (init_registers_amd64_avx_linux): Likewise.
13791 (xmltarget_i386_linux_no_xml): Likewise.
13792 (xmltarget_amd64_linux_no_xml): Likewise.
13793 (PTRACE_GETREGSET): Likewise.
13794 (PTRACE_SETREGSET): Likewise.
13795 (x86_fill_xstateregset): Likewise.
13796 (x86_store_xstateregset): Likewise.
13797 (use_xml): Likewise.
13798 (x86_linux_update_xmltarget): Likewise.
13799 (x86_linux_process_qsupported): Likewise.
13800 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13801 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13802 init_registers_i386_linux here. Call
13803 x86_linux_update_xmltarget.
13804 (the_low_target): Add x86_linux_process_qsupported.
13806 * server.c (handle_query): Call target_process_qsupported.
13808 * target.h (target_ops): Add process_qsupported.
13809 (target_process_qsupported): New.
13811 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13813 * inferiors.c (add_thread): Set last_status kind to
13814 TARGET_WAITKIND_IGNORE.
13815 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13816 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13817 (linux_wait_1): Move `thread' local definition to block that uses
13818 it. Don't NULL initialize `event_child'.
13819 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13820 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13821 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13823 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13825 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13826 an extended waitstatus, or by a watchpoint.
13827 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13828 thread was stepping or has been stopped by a watchpoint.
13830 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13832 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13833 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13834 of another, then delete the previous, and validate all
13836 (validate_inserted_breakpoint): New.
13837 (delete_disabled_breakpoints): New.
13838 (validate_breakpoints): New.
13839 (check_mem_read): Validate breakpoints before trusting their
13840 shadow. Delete disabled breakpoints.
13841 (check_mem_write): Validate breakpoints before trusting they
13842 should be inserted. Delete disabled breakpoints.
13843 * mem-break.h (validate_breakpoints):
13844 * server.c (handle_query): Validate breakpoints when we see a
13847 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13849 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13850 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13851 if we could tell there's a GDB breakpoint at stop_pc.
13852 (need_step_over_p): Don't do a step over if we find a GDB
13853 breakpoint at the resume PC.
13855 * mem-break.c (struct raw_breakpoint): New.
13856 (enum bkpt_type): New type `gdb_breakpoint'.
13857 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13858 fields. New field `raw'.
13859 (find_raw_breakpoint_at): New.
13860 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13861 breakpoint instead.
13862 (set_breakpoint_at): Adjust.
13863 (delete_raw_breakpoint): New.
13864 (release_breakpoint): New.
13865 (delete_breakpoint): Rename to...
13866 (delete_breakpoint_1): ... this. Add proc parameter. Use
13867 release_breakpoint. Return ENOENT.
13868 (delete_breakpoint): Reimplement.
13869 (find_breakpoint_at): Delete.
13870 (find_gdb_breakpoint_at): New.
13871 (delete_breakpoint_at): Delete.
13872 (set_gdb_breakpoint_at): New.
13873 (delete_gdb_breakpoint_at): New.
13874 (gdb_breakpoint_here): New.
13875 (set_reinsert_breakpoint): Use release_breakpoint.
13876 (uninsert_breakpoint): Rename to ...
13877 (uninsert_raw_breakpoint): ... this.
13878 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13879 (reinsert_raw_breakpoint): Change parameter type to
13881 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13883 (check_breakpoints): Adjust. Use release_breakpoint.
13884 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13885 (breakpoint_inserted_here): Ditto.
13886 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13887 Don't trust the breakpoint's shadow if it is not inserted.
13888 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13889 (delete_all_breakpoints): Adjust.
13890 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13891 use delete_breakpoint_1.
13893 * mem-break.h (breakpoints_supported): Delete declaration.
13894 (set_gdb_breakpoint_at): Declare.
13895 (gdb_breakpoint_here): Declare.
13896 (delete_breakpoint_at): Delete.
13897 (delete_gdb_breakpoint_at): Declare.
13899 * server.h (struct raw_breakpoint): Forward declare.
13900 (struct process_info): New field `raw_breakpoints'.
13902 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13905 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13907 * linux-low.c (status_pending_p_callback): Fix comment.
13908 (linux_wait_for_event_1): Move most of the internal breakpoint
13909 handling from here...
13910 (linux_wait_1): ... to here.
13911 (count_events_callback): New.
13912 (select_singlestep_lwp_callback): New.
13913 (select_event_lwp_callback): New.
13914 (cancel_breakpoints_callback): New.
13915 (select_event_lwp): New.
13916 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13917 priority to all LWPs that have had events that should be reported
13918 to the client. Cancel breakpoints when about to reporting the
13919 event to the client, not while stopping lwps. No longer cancel
13920 finished single-steps here.
13921 (cancel_finished_single_step): Delete.
13922 (cancel_finished_single_steps): Delete.
13924 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13926 * mem-break.c (enum bkpt_type): New.
13927 (struct breakpoint): New field `type'.
13928 (set_breakpoint_at): Change return type to struct breakpoint
13929 pointer. Set type to `other_breakpoint' by default.
13930 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13931 in the breakpoint list.
13932 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13933 (reinsert_breakpoint): Rename to ...
13934 (reinsert_raw_breakpoint): ... this.
13935 (reinsert_breakpoints_at): Adjust.
13936 * mem-break.h (struct breakpoint): Declare.
13937 (set_breakpoint_at): Change return type to struct breakpoint
13940 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13942 * server.c (handle_query): Assign, not compare.
13944 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13946 Teach linux gdbserver to step-over-breakpoints.
13948 * linux-low.c (can_hardware_single_step): New.
13949 (supports_breakpoints): New.
13950 (handle_extended_wait): If stopping threads, read the stop pc of
13951 the new cloned LWP.
13953 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13954 low target doesn't support retrieving the PC.
13955 (add_lwp): Set last_resume_kind to resume_continue.
13956 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13957 (linux_attach): Don't clear stop_expected. Set the lwp's
13958 last_resume_kind to resume_stop.
13959 (linux_detach_one_lwp): Don't check for removed breakpoints.
13960 (check_removed_breakpoint): Delete.
13961 (status_pending_p): Rename to ...
13962 (status_pending_p_callback): ... this. Don't check for removed
13963 breakpoints. Don't consider threads that are stopped from GDB's
13965 (linux_wait_for_lwp): Always read the stop_pc here.
13966 (cancel_breakpoint): New.
13967 (step_over_bkpt): New global.
13968 (linux_wait_for_event_1): Implement stepping over breakpoints.
13969 (gdb_wants_lwp_stopped): New.
13970 (gdb_wants_all_stopped): New.
13971 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13972 single-step traps here. Store the thread's last reported target
13974 (send_sigstop): Don't clear stop_expected. Always set it,
13976 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13977 (cancel_finished_single_step): New.
13978 (cancel_finished_single_steps): New.
13979 (wait_for_sigstop): Don't cancel finished single-step traps here.
13980 (linux_resume_one_lwp): Don't check for removed breakpoints.
13981 Don't set `step' on non-hardware step archs.
13982 (linux_set_resume_request): Ignore resume_stop requests if already
13983 stopping or stopped. Set the lwp's last_resume_kind.
13984 (resume_status_pending_p): Don't check for removed breakpoints.
13985 (need_step_over_p): New.
13986 (start_step_over): New.
13987 (finish_step_over): New.
13988 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13989 requests. Clear the thread's last reported target waitstatus.
13990 Don't use the `suspended' flag. Don't consider pending breakpoints.
13991 (linux_resume): Start a step-over if necessary.
13992 (proceed_one_lwp): New.
13993 (proceed_all_lwps): New.
13994 (unstop_all_lwps): New.
13995 * linux-low.h (struct lwp_info): Rewrite comment for the
13996 `suspended' flag. Add the `stop_pc' field. Delete the
13997 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13998 Add `'last_resume_kind' and `need_step_over' fields.
13999 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14000 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14001 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14002 (set_raw_breakpoint_at): New.
14003 (set_breakpoint_at): Rewrite to use it.
14004 (reinsert_breakpoint_handler): Delete.
14005 (set_reinsert_breakpoint): New.
14006 (reinsert_breakpoint_by_bp): Delete.
14007 (delete_reinsert_breakpoints): New.
14008 (uninsert_breakpoint): Rewrite.
14009 (uninsert_breakpoints_at): New.
14010 (reinsert_breakpoint): Rewrite.
14011 (reinsert_breakpoints_at): New.
14012 (check_breakpoints): Rewrite.
14013 (breakpoint_here): New.
14014 (breakpoint_inserted_here): New.
14015 (check_mem_read): Adjust.
14016 * mem-break.h (breakpoints_supported, breakpoint_here)
14017 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14018 (reinsert_breakpoint_by_bp): Delete declaration.
14019 (delete_reinsert_breakpoints): Declare.
14020 (reinsert_breakpoint): Delete declaration.
14021 (reinsert_breakpoints_at): Declare.
14022 (uninsert_breakpoint): Delete declaration.
14023 (uninsert_breakpoints_at): Declare.
14024 (check_breakpoints): Adjust prototype.
14025 * server.h: Adjust include order.
14026 (struct thread_info): Declare here. Add a `last_status' field.
14028 2010-03-23 Michael Snyder <msnyder@vmware.com>
14030 * server.c (crc32): New function.
14031 (handle_query): Add handling for 'qCRC:' request.
14033 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14035 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14036 lwp had been stopped by a watchpoint.
14038 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14040 * server.h (internal_error): Declare.
14041 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14042 * utils.c (internal_error): New function.
14044 2010-03-15 Andreas Schwab <schwab@redhat.com>
14046 * configure.srv: Fix typo setting srv_regobj.
14048 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14050 * linux-low.c (fetch_register): Avoid passing a non string literal
14052 (usr_store_inferior_registers): Ditto.
14054 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14056 * linux-low.c (linux_write_memory): Bail out early if peeking
14059 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14061 * linux-low.h (struct lwp_info): New fields
14062 `stopped_by_watchpoint' and `stopped_data_address'.
14063 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14064 here, and cache them in the lwp object.
14065 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14067 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14069 (linux_stopped_by_watchpoint): Rewrite.
14070 (linux_stopped_data_address): Rewrite.
14072 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14074 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14075 switching the current inferior, not before.
14077 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14079 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14080 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14081 i386-linux.c and amd64-linux.c.
14082 (reg-i386.o): Removed.
14083 (reg-i386.c): Likewise.
14084 (reg-i386-linux.o): Likewise.
14085 (reg-i386-linux.c): Likewise.
14086 (reg-x86-64.o): Likewise.
14087 (reg-x86-64.c): Likewise.
14088 (reg-x86-64-linux.o): Likewise.
14089 (reg-x86-64-linux.c): Likewise.
14091 (i386.c): Likewise.
14092 (i386-linux.o): Likewise.
14093 (i386-linux.c): Likewise.
14094 (amd64.o): Likewise.
14095 (amd64.c): Likewise.
14096 (amd64-linux.o): Likewise.
14097 (amd64-linux.c): Likewise.
14099 * configure.srv (srv_i386_regobj): New.
14100 (srv_i386_linux_regobj): Likewise.
14101 (srv_amd64_regobj): Likewise.
14102 (srv_amd64_linux_regobj): Likewise.
14103 (srv_i386_32bit_xmlfiles): Likewise.
14104 (srv_i386_64bit_xmlfiles): Likewise.
14105 (srv_i386_xmlfiles): Likewise.
14106 (srv_amd64_xmlfiles): Likewise.
14107 (srv_i386_linux_xmlfiles): Likewise.
14108 (srv_amd64_linux_xmlfiles): Likewise.
14109 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14110 srv_xmlfiles to $srv_i386_xmlfiles.
14111 (i[34567]86-*-mingw32ce*): Likewise.
14112 (i[34567]86-*-mingw*): Likewise.
14113 (i[34567]86-*-nto*): Likewise.
14114 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14115 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14116 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14117 (x86_64-*-linux*): Likewise.
14119 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14120 (init_registers_amd64_linux): New.
14121 (x86_arch_setup): Replace init_registers_x86_64_linux with
14122 init_registers_amd64_linux.
14124 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14126 * configure.ac: Check for libdl. If it is not available link against
14127 static libthread_db.
14128 * configure: Regenerate.
14130 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14134 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14135 handing a read watchpoint.
14136 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14138 2010-02-12 Doug Evans <dje@google.com>
14140 * linux-low.c (linux_supports_tracefork_flag): Document.
14141 (linux_look_up_symbols): Add comment.
14143 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14145 * regcache.c (supply_register): Clear regcache if buf is NULL.
14147 2010-02-02 Nicolas Roche <roche@sourceware.org>
14148 Joel Brobecker <brobecker@adacore.com>
14150 * inferiors.c (find_inferior): Add function documentation.
14151 (unloaded_dll): Handle the case where the unloaded dll has not
14152 been previously registered in the dll list.
14154 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14156 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14157 (thumb2_breakpoint): New.
14158 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14160 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14162 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14163 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14166 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14168 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14170 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14172 * linux-s390-low.c (s390_collect_ptrace_register)
14173 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14175 2010-01-21 Doug Evans <dje@google.com>
14177 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14178 (PTRACE_ARG4_TYPE): New macro.
14179 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14180 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14181 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14182 (usr_store_inferior_registers): Ditto.
14183 (linux_read_memory, linux_write_memory): Ditto.
14184 (linux_test_for_tracefork): Ditto.
14186 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14187 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14189 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14191 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14194 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14196 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14197 prototype to take a regcache. Adjust.
14199 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14201 * regcache.h (struct thread_info): Forward declare.
14202 (struct regcache): New.
14203 (new_register_cache): Adjust prototype.
14204 (get_thread_regcache): Declare.
14205 (free_register_cache): Adjust prototype.
14206 (registers_to_string, registers_from_string): Ditto.
14207 (supply_register, supply_register_by_name, collect_register)
14208 (collect_register_as_string, collect_register_by_name): Ditto.
14209 * regcache.c (struct inferior_regcache_data): Delete.
14210 (get_regcache): Rename to ...
14211 (get_thread_regcache): ... this. Adjust. Switch inferior before
14212 fetching registers.
14213 (regcache_invalidate_one): Adjust.
14214 (regcache_invalidate): Fix prototype.
14215 (new_register_cache): Return the new register cache.
14216 (free_register_cache): Change prototype.
14217 (realloc_register_cache): Adjust.
14218 (registers_to_string): Change prototype to take a regcache. Adjust.
14219 (registers_from_string): Ditto.
14220 (register_data): Ditto.
14221 (supply_register): Ditto.
14222 (supply_register_by_name): Ditto.
14223 (collect_register): Ditto.
14224 (collect_register_as_string): Ditto.
14225 (collect_register_by_name): Ditto.
14226 * server.c (process_serial_event): Adjust.
14227 * linux-low.h (regset_fill_func, regset_store_func): Change
14229 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14231 * linux-low.c (get_stop_pc): Adjust.
14232 (check_removed_breakpoint): Adjust.
14233 (linux_wait_for_event): Adjust.
14234 (linux_resume_one_lwp): Adjust.
14235 (fetch_register): Add regcache parameter. Adjust.
14236 (usr_store_inferior_registers): Ditto.
14237 (regsets_fetch_inferior_registers): Ditto.
14238 (regsets_store_inferior_registers): Ditto.
14239 (linux_fetch_registers, linux_store_registers): Ditto.
14240 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14242 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14244 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14245 prototype to take a regcache.
14246 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14247 * remote-utils.c (convert_ascii_to_int, outreg)
14248 (prepare_resume_reply): Change prototype to take a regcache.
14250 * target.h (struct target_ops) <fetch_registers, store_registers>:
14251 Change prototype to take a regcache.
14252 (fetch_inferior_registers, store_inferior_registers): Change
14253 prototype to take a regcache. Adjust.
14254 * proc-service.c (ps_lgetregs): Adjust.
14255 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14256 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14257 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14258 take a regcache. Adjust.
14259 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14260 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14261 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14262 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14263 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14264 (cris_cannot_fetch_register):
14265 (cris_breakpoint_at): Change prototype to take a regcache.
14267 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14268 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14269 to take a regcache. Adjust.
14270 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14272 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14273 take a regcache. Adjust.
14274 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14275 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14276 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14277 * linux-mips-low.c (mips_get_pc):
14278 (mips_set_pc): Change prototype to take a regcache. Adjust.
14279 (mips_reinsert_addr): Adjust.
14280 (mips_collect_register): Change prototype to take a regcache.
14282 (mips_supply_register):
14283 (mips_collect_register_32bit, mips_supply_register_32bit)
14284 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14285 (mips_store_fpregset): Ditto.
14286 * linux-ppc-low.c (ppc_supply_ptrace_register)
14287 (ppc_supply_ptrace_register): Ditto.
14288 (parse_spufs_run): Adjust.
14289 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14290 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14291 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14292 take a regcache. Adjust.
14293 * linux-s390-low.c (s390_collect_ptrace_register)
14294 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14295 (s390_set_pc): Change prototype to take a regcache. Adjust.
14296 (s390_arch_setup): Adjust.
14297 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14298 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14299 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14300 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14301 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14303 (sparc_breakpoint_at): Adjust.
14304 * linux-xtensa-low.c (xtensa_fill_gregset):
14305 (xtensa_store_gregset):
14306 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14307 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14308 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14309 prototype to take a regcache. Adjust.
14310 * win32-arm-low.c (arm_fetch_inferior_register)
14311 (arm_store_inferior_register): Change prototype to take a
14313 * win32-i386-low.c (i386_fetch_inferior_register)
14314 (i386_store_inferior_register): Change prototype to take a
14316 * win32-low.c (child_fetch_inferior_registers)
14317 (child_store_inferior_registers): Change prototype to take a
14319 (win32_wait): Adjust.
14320 (win32_fetch_inferior_registers): Change prototype to take a
14322 (win32_store_inferior_registers): Adjust.
14323 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14324 store_inferior_register>: Change prototype to take a regcache.
14326 2010-01-20 Doug Evans <dje@google.com>
14328 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14330 (linux_wait_for_event1, linux_init_signals): Ditto.
14331 (W_STOPCODE): Provide definition if missing.
14333 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14335 * linux-low.c (linux_core_of_thread): New.
14336 (compare_ints, show_process, list_threads): New.
14337 (linux_qxfer_osdata): Report threads and cores.
14338 (linux_target_op): Register linux_core_of_thread.
14339 * remote-utils.c (prepare_resume_reply): Report the core.
14340 (buffer_xml_printf): Support %d specifier.
14341 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14343 (handle_query): Handle qXfer:threads. Announce availability
14345 * target.h (struct target_ops): New field core_of_thread.
14347 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14349 * Makefile.in (clean): Remove new generated files.
14350 (reg-s390.o, reg-s390.c): Remove rules.
14351 (reg-s390x.o, reg-s390x.c): Likewise.
14352 (s390-linux32.o, s390-linux32.c): Add rules.
14353 (s390-linux64.o, s390-linux64.c): Likewise.
14354 (s390x-linux64.o, s390x-linux64.c): Likewise.
14355 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14356 * linux-s390-low.c: Include <elf.h>.
14357 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14358 (init_registers_s390): Remove prototype.
14359 (init_registers_s390x): Likewise.
14360 (init_registers_s390_linux32): Add prototype.
14361 (init_registers_s390_linux64): Likewise.
14362 (init_registers_s390x_linux64): Likewise.
14363 (s390_num_regs_3264): New define.
14364 (s390_regmap_3264): New global variable.
14365 (s390_cannot_fetch_register): Remove obsolete check.
14366 (s390_cannot_store_register): Likewise.
14367 (s390_collect_ptrace_register): Handle upper/lower register halves.
14368 (s390_supply_ptrace_register): Likewise.
14369 (s390_fill_gregset): Update to register number changes.
14370 (s390_get_hwcap): New routine.
14371 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14372 Install appropriate regmap and register set.
14374 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14376 * server.c (gdbserver_version): Update copyright year to 2010.
14377 * gdbreplay.c (gdbreplay_version): Likewise.
14379 2009-12-28 Doug Evans <dje@google.com>
14381 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14382 elf/external.h. Include <elf.h> instead but only if necessary.
14384 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14386 * linux-low.c (linux_remove_process): Remove `detaching'
14387 parameter. Don't release/detach from thread_db here.
14388 (linux_kill): Release/detach from thread_db here, ...
14389 (linux_detach): ... and here, before actually detaching.
14390 (linux_wait_1): ... and here, when a process exits.
14391 * thread-db.c (any_thread_of): New.
14392 (thread_db_free): Switch the current inferior to a thread of the
14395 2009-12-21 Doug Evans <dje@google.com>
14397 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14399 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14400 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14401 warning ifndef __NR_tkill. Move setting of errno there too.
14402 Delete unnecessary resetting of errno after syscall.
14403 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14405 * configure.ac: Check for dladdr.
14406 * config.in: Regenerate.
14407 * configure: Regenerate.
14408 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14409 (try_thread_db_load): Update.
14411 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14413 2009-12-18 Doug Evans <dje@google.com>
14415 * event-loop.c: Include unistd.h if it exists.
14417 * linux-low.c (my_waitpid): Move definition away from being in
14418 between linux_tracefork_child/linux_test_for_tracefork.
14420 * gdb_proc_service.h (psaddr_t): Fix type.
14421 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14422 signature to match glibc.
14424 2009-12-16 Doug Evans <dje@google.com>
14426 * linux-low.c (linux_read_memory): Fix argument to read.
14428 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14430 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14431 events, don't leave current_inferior pointing at null.
14433 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14435 * win32-low.c (LOG): Delete.
14436 (OUTMSG): Output to stderr.
14437 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14438 on compile time LOG macro.
14439 (win32_wait): Fix debug output.
14441 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14443 * win32-low.c (win32_add_one_solib): If the dll name is
14444 "ntdll.dll", prepend the system directory to the dll path.
14446 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14448 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14450 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14451 Vladimir Prus <vladimir@codesourcery.com>
14453 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14454 * configure.ac: Check for __mcoldfire__ and set
14455 gdb_cv_m68k_is_coldfire.
14456 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14457 reg-cf.o and reg-m68k.o.
14458 * configure: Regenerated.
14460 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14462 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14463 Pass it to thread_db_free.
14464 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14465 proper `detaching' argument to linux_remove_process.
14466 * linux-low.h (thread_db_free): Add `detaching' parameter.
14467 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14469 (thread_db_free): Add `detaching' parameter. Only
14470 call td_ta_clear_event if detaching from process.
14472 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14474 * thread-db.c (thread_db_free): Fix typo.
14476 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14479 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14481 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14483 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14484 with an i686 compiler.
14485 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14487 * configure: Rebuilt.
14489 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14493 * server.c (handle_search_memory_1): Correct read_addr initialization
14494 in loop for searching subsequent chunks.
14496 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14498 * configure.ac: New --with-libthread-db option.
14499 * thread-db.c: Allow direct dependence on libthread_db.
14500 (thread_db_free): Adjust.
14501 * config.in: Regenerate.
14502 * configure: Likewise.
14504 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14507 * thread-db.c (attach_thread): New function.
14508 (maybe_attach_thread): Return success/failure.
14509 (find_new_threads_callback): Adjust.
14510 (thread_db_find_new_threads): Loop until no new threads.
14512 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14514 * proc-service.c (ps_lgetregs): Formatting.
14516 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14518 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14519 * configure.ac: Adjust.
14520 * linux-low.h (struct process_info_private): Move members to struct
14522 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14523 * linux-low.c (linux_remove_process): Adjust.
14524 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14525 * server.c (handle_query): Move code ...
14526 (handle_monitor_command): ... here. New function.
14527 * target.h (struct target_ops): New member.
14528 * thread-db.c (struct thread_db): New.
14529 (libthread_db_search_path): New variable.
14530 (thread_db_create_event, thread_db_enable_reporting)
14531 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14532 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14533 (try_thread_db_load_1, dladdr_to_soname): New functions.
14534 (try_thread_db_load, thread_db_load_search): New functions.
14535 (thread_db_init): Search for libthread_db.
14536 (thread_db_free): New function.
14537 (thread_db_handle_monitor_command): Likewise.
14538 * config.in: Regenerate.
14539 * configure: Regenerate.
14541 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14543 * spu-low.c (spu_kill): Wait for inferior to terminate.
14544 Call clear_inferiors.
14545 (spu_detach): Call clear_inferiors.
14547 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14549 * aclocal.m4: Regenerate.
14550 * config.in: Likewise.
14551 * configure: Likewise.
14553 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14555 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14556 (parse_spufs_run): New function.
14557 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14558 (ppc_breakpoint_at): Handle SPU breakpoints.
14560 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14562 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14563 (SPUFS_MAGIC): Define.
14564 (spu_enumerate_spu_ids): New function.
14565 (linux_qxfer_spu): New function.
14566 (linux_target_ops): Install linux_qxfer_spu.
14568 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14570 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14571 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14572 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14573 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14574 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14575 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14576 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14577 (init_registers_powerpc_cell32l): Add prototype.
14578 (init_registers_powerpc_cell64l): Likewise.
14579 (ppc_arch_setup): Detect Cell/B.E. architecture.
14581 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14583 * Makefile.in (datarootdir): New variable.
14585 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14587 * linux-low.c (linux_write_memory): Update debugging output.
14588 * Makefile.in (clean): Add new descriptions.
14589 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14590 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14591 * configure.srv: Add new files for arm*-*-linux*.
14592 * linux-arm-low.c: Add new declarations.
14593 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14594 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14595 (HWCAP_VFPv3D16): New.
14596 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14597 instead of __IWMMXT__.
14598 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14599 (arm_arch_setup): New.
14600 (target_regsets): Remove #ifdef. Add VFP regset.
14601 (the_low_target): Use arm_arch_setup.
14603 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14605 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14606 the main thread again.
14608 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14610 Adding Neutrino gdbserver.
14611 * configure: Regenerated.
14612 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14613 * configure.srv (i[34567]86-*-nto*): New target.
14614 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14615 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14616 (nto_comctrl) [__QNX__]: New function.
14617 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14619 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14621 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14624 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14625 Pedro Alves <pedro@codesourcery.com>
14627 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14628 don't support CONTEXT_EXTENDED_REGISTERS.
14629 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14630 (the_low_target): Install them.
14631 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14632 failing with ERROR_PIPE_NOT_CONNECTED.
14634 2009-06-30 Doug Evans <dje@google.com>
14635 Pierre Muller <muller@ics.u-strasbg.fr>
14637 Add h/w watchpoint support to x86-linux, win32-i386.
14638 * Makefile.in (SFILES): Add i386-low.c
14639 (i386_low_h): Define.
14640 (i386-low.o): Add dependencies.
14641 (linux-x86-low.o): Add i386-low.h dependency.
14642 (win32-i386-low.o): Ditto.
14643 * i386-low.c: New file.
14644 * i386-low.h: New file.
14645 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14646 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14647 * linux-low.c (linux_add_process): Initialize arch_private.
14648 (linux_remove_process): Free arch_private.
14649 (add_lwp): Initialize arch_private.
14650 (delete_lwp): Free arch_private.
14651 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14653 * linux-low.h (process_info_private): New member arch_private.
14654 (lwp_info): New member arch_private.
14655 (linux_target_ops): New members new_process, new_thread,
14657 (ptid_of): New macro.
14658 * linux-x86-low.c: Include stddef.h, i386-low.h.
14659 (arch_process_info): New struct.
14660 (arch_lwp_info): New struct.
14661 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14662 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14663 (i386_dr_low_get_status): New function.
14664 (x86_insert_point, x86_remove_point): New functions.
14665 (x86_stopped_by_watchpoint): New function.
14666 (x86_stopped_data_address): New function.
14667 (x86_linux_new_process, x86_linux_new_thread): New functions.
14668 (x86_linux_prepare_to_resume): New function.
14669 (the_low_target): Add entries for insert_point, remove_point,
14670 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14672 * server.c (debug_hw_points): New global.
14673 (monitor_show_help): Document set debug-hw-points.
14674 (handle_query): Process "set debug-hw-points".
14675 * server.h (debug_hw_points): Declare.
14676 (paddress): Declare.
14677 * utils.c (NUMCELLS, CELLSIZE): New macros.
14678 (get_sell, xsnprintf, paddress): New functions.
14679 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14680 remove_point, stopped_by_watchpoint, stopped_data_address.
14681 * win32-i386-low.c: Include i386-low.h.
14682 (debug_reg_state): Replaces dr.
14683 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14684 (i386_dr_low_get_status): New function.
14685 (i386_insert_point, i386_remove_point): New functions.
14686 (i386_stopped_by_watchpoint): New function.
14687 (i386_stopped_data_address): New function.
14688 (i386_initial_stuff): Update.
14689 (get_thread_context,set_thread_context,i386_thread_added): Update.
14690 (the_low_target): Add entries for insert_point,
14691 remove_point, stopped_by_watchpoint, stopped_data_address.
14692 * win32-low.c (win32_insert_watchpoint): New function.
14693 (win32_remove_watchpoint): New function.
14694 (win32_stopped_by_watchpoint): New function.
14695 (win32_stopped_data_address): New function.
14696 (win32_target_ops): Add entries for insert_watchpoint,
14697 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14698 * win32-low.h (win32_target_ops): New members insert_point,
14699 remove_point, stopped_by_watchpoint, stopped_data_address.
14701 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14703 * server.c (process_serial_event): Re-return unsupported, not
14704 error, if the type isn't recognized. Re-allow supporting only
14705 insert or remove packets. Also call require_running for
14706 breakpoints. Add missing break statement to default case. Tidy.
14707 * target.h (struct target_ops): Rename insert_watchpoint to
14708 insert_point, and remove_watchpoint to remove_point.
14710 * linux-low.h (struct linux_target_ops): Likewise.
14711 * linux-low.c (linux_insert_watchpoint): Rename to ...
14712 (linux_insert_point): ... this. Adjust.
14713 (linux_remove_watchpoint): Rename to ...
14714 (linux_remove_point): ... this. Adjust.
14715 (linux_target_ops): Adjust.
14716 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14717 (cris_insert_point): ... this.
14718 (cris_remove_watchpoint): Rename to ...
14719 (cris_remove_point): ... this.
14720 (the_low_target): Adjust.
14722 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14724 * server.c (handle_v_kill): Pass signal_pid to
14725 kill_inferior if multi_process is zero.
14727 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14729 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14730 * target.h (target_ops): Comment for *_watchpoint to make it clear
14731 the functions can get types '0' and '1'.
14733 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14735 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14736 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14737 * regcache.c (get_regcache): Likewise.
14738 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14739 * win32-low.c (child_fetch_inferior_registers): Remove check for
14742 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14743 Pedro Alves <pedro@codesourcery.com>
14745 * target.h (struct target_ops) <supports_multi_process>: New
14747 (target_supports_multi_process): New.
14748 * server.c (handle_query): Even if GDB reports support, only
14749 enable multi-process if the target also supports it. Report
14750 multi-process support only if the target backend supports it.
14751 * linux-low.c (linux_supports_multi_process): New function.
14752 (linux_target_ops): Install it as target_supports_multi_process
14755 2009-05-24 Doug Evans <dje@google.com>
14757 Global renaming of find_thread_pid to find_thread_ptid.
14758 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14759 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14760 All callers updated.
14762 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14763 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14766 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14767 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14768 (linux_resume_one_lwp): Ditto.
14770 2009-05-23 Doug Evans <dje@google.com>
14772 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14773 from struct inferior_list_entry * to struct lwp_info *.
14774 All callers updated.
14776 2009-05-13 Doug Evans <dje@google.com>
14778 * linux-x86-low.c: Don't include assert.h.
14779 (x86_siginfo_fixup): Use fatal, not assert.
14780 (x86_arch_setup): Fix comment.
14782 2009-05-12 Doug Evans <dje@google.com>
14784 Biarch support for i386/amd64 gdbserver.
14785 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14786 Add linux-x86-low.c.
14787 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14788 (linux-x86-low.o): Add.
14789 * linux-x86-64-low.c: Delete.
14790 * linux-i386-low.c: Delete.
14791 * linux-x86-low.c: New file.
14792 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14794 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14796 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14797 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14798 (linux_child_pid_to_exec_file): New function.
14799 (elf_64_header_p, elf_64_file_p): New functions.
14800 (siginfo_fixup): New function.
14801 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14802 give target a chance to convert layout.
14803 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14804 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14806 2009-05-07 Doug Evans <dje@google.com>
14808 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14809 (regsets_store_inferior_registers): Ditto.
14811 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14815 * linux-low.c (must_set_ptrace_flags): Delete.
14816 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14818 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14819 `lwp->must_set_ptrace_flags' instead.
14820 (linux_wait_for_event_1): Set ptrace options here.
14821 (linux_wait_1): ... not here.
14823 2009-04-30 Doug Evans <dje@google.com>
14825 * inferiors.c (started_inferior_callback): New function.
14826 (attached_inferior_callback): New function.
14827 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14828 * server.c (print_started_pid, print_attached_pid): New functions.
14829 (detach_or_kill_for_exit): New function.
14830 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14831 * server.h (have_started_inferiors_p): Declare.
14832 (have_attached_inferiors_p): Declare.
14834 * inferiors.c (remove_process): Fix memory leak, free process.
14835 * linux-low.c (linux_remove_process): New function.
14836 (linux_kill): Call it instead of remove_process.
14837 (linux_detach, linux_wait_1): Ditto.
14839 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14841 * configure.srv: Add x86 Windows CE target.
14843 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14845 * inferiors.c (get_thread_process): Make global.
14846 * server.h (get_thread_process): Add prototype.
14847 * thread-db.c (find_one_thread): Use get_thread_process
14848 instead of current_process.
14849 (thread_db_get_tls_address): Do not crash if called when
14850 thread layer is not yet initialized.
14852 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14854 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14855 * spu-low.c (current_tid): Rename to ...
14856 (current_ptid): ... this.
14857 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14858 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14859 ptid_get_lwp (current_ptid) instead of current_tid.
14860 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14861 instead of current_tid. Use find_process_pid to verify pid
14862 argument is valid. Pass proper argument to remove_process.
14863 (spu_thread_alive): Compare current_ptid instead of current_tid.
14864 (spu_resume): Likewise.
14866 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14868 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14871 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14873 Implement the multiprocess extensions, and add linux multiprocess
14876 * server.h (ULONGEST): Declare.
14877 (struct ptid, ptid_t): New.
14878 (minus_one_ptid, null_ptid): Declare.
14879 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14880 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14881 (struct inferior_list_entry): Change `id' type from unsigned from
14883 (struct sym_cache, struct breakpoint, struct
14884 process_info_private): Forward declare.
14885 (struct process_info): Declare.
14886 (current_process): Declare.
14887 (all_processes): Declare.
14888 (initialize_inferiors): Declare.
14889 (add_thread): Adjust to use ptid_t.
14890 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14891 (add_process, remove_process, find_thread_pid): Declare.
14892 (find_inferior_id): Adjust to use ptid_t.
14893 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14894 (multi_process): Declare.
14895 (push_event): Adjust to use ptid_t.
14896 (read_ptid, write_ptid): Declare.
14897 (prepare_resume_reply): Adjust to use ptid_t.
14898 (clear_symbol_cache): Declare.
14899 * inferiors.c (all_processes): New.
14900 (null_ptid, minus_one_ptid): New.
14901 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14902 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14903 (add_thread): Change unsigned long to ptid. Remove gdb_id
14905 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14906 (gdb_id_to_thread): Rename to ...
14907 (find_thread_pid): ... this. Change unsigned long to ptid.
14908 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14909 (loaded_dll, pull_pid_from_list): Adjust.
14910 (add_process, remove_process, find_process_pid)
14911 (get_thread_process, current_process, initialize_inferiors): New.
14912 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14913 (struct target_waitstatus) <related_pid>: Ditto.
14914 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14915 return type to int.
14916 (struct target_ops) <join>: Add `pid' argument.
14917 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14918 (struct target_ops) <wait>: Add `ptid' field. Change return type
14920 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14921 (mywait): Add `ptid' argument. Change return type to ptid_t.
14922 (target_pid_to_str): Declare.
14923 * target.c (set_desired_inferior): Adjust to use ptids.
14924 (mywait): Add new `ptid' argument. Adjust.
14925 (target_pid_to_str): New.
14926 * mem-break.h (free_all_breakpoints): Declare.
14927 * mem-break.c (breakpoints): Delelete.
14928 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14929 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14930 to use per-process breakpoint list.
14931 (free_all_breakpoints): New.
14932 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14933 (symbol_cache, all_symbols_looked_up): Delete.
14935 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14937 (prepare_resume_reply): Change ptid argument's type from unsigned
14938 long to ptid_t. Adjust. Implement W;process and X;process.
14939 (free_sym_cache, clear_symbol_cache): New.
14940 (look_up_one_symbol): Adjust to per-process symbol cache. *
14941 * server.c (cont_thread, general_thread, step_thread): Change type
14943 (attached): Delete.
14944 (multi_process): New.
14945 (last_ptid): Change type to ptid_t.
14946 (struct vstop_notif) <ptid>: Change type to ptid_t.
14947 (queue_stop_reply, push_event): Change `ptid' argument's type to
14949 (discard_queued_stop_replies): Add `pid' argument.
14950 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14951 changes. Don't reference the `attached' global.
14952 (attach_inferior): Adjust to mywait interface changes.
14953 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14954 features. Handle and report "multiprocess+". Handle
14956 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14958 (handle_v_kill): New.
14959 (handle_v_stopped): Adjust to use target_pid_to_str.
14960 (handle_v_requests): Allow multiple attaches and runs when
14961 multiprocess extensions are in effect. Handle "vKill".
14962 (myresume): Adjust to use ptids.
14963 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14964 (handle_status): Adjust to discard_queued_stop_replies interface
14966 (first_thread_of, kill_inferior_callback)
14967 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14968 (main): Call initialize_inferiors. Adjust to use ptids, killing
14969 and detaching from all inferiors. Handle multiprocess packet
14971 * linux-low.h: Include gdb_proc_service.h.
14972 (struct process_info_private): New.
14973 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14974 <lwpid_of>: Use ptid_get_lwp.
14975 (get_lwp_thread): Adjust.
14976 (struct lwp_info): Add `dead' member.
14977 (find_lwp_pid): Declare.
14978 * linux-low.c (thread_db_active): Delete.
14979 (new_inferior): Adjust comment.
14980 (inferior_pid): Delete.
14981 (linux_add_process): New.
14982 (handle_extended_wait): Adjust.
14983 (add_lwp): Change unsigned long to ptid.
14984 (linux_create_inferior): Add process to processes table. Adjust
14985 to use ptids. Don't set new_inferior here.
14986 (linux_attach_lwp): Rename to ...
14987 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14988 it. Adjust to use ptids.
14989 (linux_attach_lwp): New.
14990 (linux_attach): Add process to processes table. Don't set
14992 (struct counter): New.
14993 (second_thread_of_pid_p, last_thread_of_process_p): New.
14994 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14995 multiple processes.
14996 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14997 processes. Remove process from process table.
14998 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14999 to multiple processes.
15000 (any_thread_of): New.
15001 (linux_detach): Add `pid' argument, and handle it. Remove process
15002 from processes table.
15003 (linux_join): Add `pid' argument. Handle it.
15004 (linux_thread_alive): Change unsighed long argument to ptid_t.
15005 Consider dead lwps as not being alive.
15006 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15007 threads we're not interested in.
15008 (same_lwp, find_lwp_pid): New.
15009 (linux_wait_for_lwp): Change `pid' argument's type from int to
15011 (linux_wait_for_event): Rename to ...
15012 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15013 from int to ptid_t. Adjust.
15014 (linux_wait_for_event): New.
15015 (linux_wait_1): Add `ptid' argument. Change return type to
15016 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15017 that exit from the process table.
15018 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15020 (mark_lwp_dead): New.
15021 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15022 stopping all threads, mark its main lwp as dead.
15023 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15025 (fetch_register, usr_store_inferior_registers)
15026 (regsets_fetch_inferior_registers)
15027 (regsets_store_inferior_registers, linux_read_memory)
15028 (linux_write_memory): Inline `inferior_pid'.
15029 (linux_look_up_symbols): Adjust to use per-process
15030 `thread_db_active'.
15031 (linux_request_interrupt): Adjust to use ptids.
15032 (linux_read_auxv): Inline `inferior_pid'.
15033 (initialize_low): Don't reference thread_db_active.
15034 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15035 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15036 (ps_getpid): Return the pid of the current inferior.
15037 * thread-db.c (proc_handle, thread_agent): Delete.
15038 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15040 (find_one_thread): Change argument type to ptid_t. Adjust to
15042 (maybe_attach_thread): Adjust to per-process data and ptids.
15043 (thread_db_find_new_threads): Ditto.
15044 (thread_db_init): Ditto.
15045 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15046 processes table. Adjust to use ptids.
15047 (spu_kill, spu_detach): Adjust interface. Remove process from
15049 (spu_join, spu_thread_alive): Adjust interface.
15050 (spu_wait): Adjust interface. Remove process from processes
15051 table. Adjust to use ptids.
15052 * win32-low.c (current_inferior_tid): Delete.
15053 (current_inferior_ptid): New.
15054 (debug_event_ptid): New.
15055 (thread_rec): Take a ptid. Adjust.
15056 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15057 (child_delete_thread): Ditto.
15058 (do_initial_child_stuff): Add `attached' argument. Add process to
15060 (child_fetch_inferior_registers, child_store_inferior_registers):
15062 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15063 (win32_attach): Pass 1 to do_initial_child_stuff.
15064 (win32_kill): Adjust interface. Remove process from processes
15066 (win32_detach): Ditto.
15067 (win32_join): Adjust interface.
15068 (win32_thread_alive): Take a ptid.
15069 (win32_resume): Adjust to use ptids.
15070 (get_child_debug_event): Ditto.
15071 (win32_wait): Adjust interface. Remove exiting process from
15074 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15076 Non-stop mode support.
15078 * server.h (non_stop): Declare.
15079 (gdb_client_data, handler_func): Declare.
15080 (delete_file_handler, add_file_handler, start_event_loop):
15082 (handle_serial_event, handle_target_event, push_event)
15083 (putpkt_notif): Declare.
15084 * target.h (enum resume_kind): New.
15085 (struct thread_resume): Replace `step' field by `kind' field.
15086 (TARGET_WNOHANG): Define.
15087 (struct target_ops) <wait>: Add `options' argument.
15088 <supports_non_stop, async, start_non_stop>: New fields.
15089 (target_supports_non_stop, target_async): New.
15090 (start_non_stop): Declare.
15091 (mywait): Add `options' argument.
15092 * target.c (mywait): Add `options' argument. Print child exit
15093 notifications here.
15094 (start_non_stop): New.
15095 * server.c (non_stop, own_buf, mem_buf): New globals.
15096 (struct vstop_notif): New.
15097 (notif_queue): New global.
15098 (queue_stop_reply, push_event, discard_queued_stop_replies)
15099 (send_next_stop_reply): New.
15100 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15102 (attach_inferior): In non-stop mode, don't wait for the target
15104 (handle_general_set): Handle QNonStop.
15105 (handle_query): When handling qC, return the current general
15106 thread, instead of the first thread of the list.
15107 (handle_query): If the backend supports non-stop mode, include
15108 QNonStop+ in the qSupported query response.
15109 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15111 (handle_v_attach, handle_v_run): Handle non-stop mode.
15112 (handle_v_stopped): New.
15113 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15114 (myresume): Adjust to use resume_kind. Handle non-stop.
15115 (queue_stop_reply_callback): New.
15116 (handle_status): Handle non-stop mode.
15117 (main): Clear non_stop flag on reconnection. Use the event-loop.
15118 Refactor serial protocol handling from here ...
15119 (process_serial_event): ... to this new function. When GDB
15120 selects any thread, select one here. In non-stop mode, wait until
15121 GDB acks all pending events before exiting.
15122 (handle_serial_event, handle_target_event): New.
15123 * remote-utils.c (remote_open): Install remote_desc in the event
15125 (remote_close): Remove remote_desc from the event loop.
15126 (putpkt_binary): Rename to...
15127 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15128 (putpkt_binary): New as wrapper around putpkt_binary_1.
15129 (putpkt_notif): New.
15130 (prepare_resume_reply): In non-stop mode, don't change the
15132 * event-loop.c: New.
15133 * Makefile.in (OBJ): Add event-loop.o.
15134 (event-loop.o): New rule.
15136 * linux-low.h (pid_of): Moved here.
15138 (get_lwp_thread): Use lwpid_of.
15139 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15140 * linux-low.c (pid_of): Delete.
15141 (inferior_pid): Use lwpid_of.
15142 (linux_event_pipe): New.
15143 (target_is_async_p): New.
15145 (handle_extended_wait): Use lwpid_of.
15146 (add_lwp): Don't set lwpid field.
15147 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15148 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15149 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15150 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15151 first. Adjust to linux_wait_for_event interface changes. Use
15153 (linux_detach): Don't delete the main lwp here.
15154 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15155 (status_pending_p): Don't consider explicitly suspended lwps.
15156 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15157 pointer. Add OPTIONS argument. Change return type to int. Use
15158 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15159 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15160 pointer. Add status pointer argument. Return a pid instead of a
15161 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15162 changes. In non-stop mode, don't switch to a random thread.
15163 (linux_wait): Rename to...
15164 (linux_wait_1): ... this. Add target_options argument, and handle
15165 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15166 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15167 clean exit and signal exit code. Don't stop all threads in
15168 non-stop mode. In all-stop mode, only stop all threads when
15169 reporting a stop to GDB. Handle explicit thread stop requests.
15170 (async_file_flush, async_file_mark): New.
15172 (send_sigstop): Use lwpid_of.
15173 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15174 interface changes. In non-stop mode, don't switch to a random
15176 (linux_resume_one_lwp): Use lwpid_of.
15177 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15178 (linux_resume_one_thread): ... this. Handle resume_stop. In
15179 non-stop mode, don't look for pending flag in all threads.
15180 (resume_status_pending_p): Don't consider explicitly suspended
15182 (my_waitpid): Reimplement. Emulate __WALL.
15183 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15185 (sigchld_handler, linux_supports_non_stop, linux_async)
15186 (linux_start_non_stop): New.
15187 (linux_target_ops): Register linux_supports_non_stop, linux_async
15188 and linux_start_non_stop.
15189 (initialize_low): Install SIGCHLD handler.
15190 * thread-db.c (thread_db_create_event, find_one_thread)
15191 (thread_db_get_tls_address): Use lwpid_of.
15192 * win32-low.c (win32_detach): Adjust to use resume_kind.
15193 (win32_wait): Add `options' argument.
15194 * spu-low.c (spu_resume): Adjust to use resume_kind.
15195 (spu_wait): Add `options' argument.
15197 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15199 Decouple target code from remote protocol.
15201 * target.h (enum target_waitkind): New.
15202 (struct target_waitstatus): New.
15203 (struct target_ops) <wait>: Return an unsigned long. Take a
15204 target_waitstatus pointer instead of a char pointer.
15205 (mywait): Likewise.
15206 * target.c (mywait): Change prototype to return an unsigned long.
15207 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15208 * server.h (thread_from_wait, old_thread_from_wait): Delete
15210 (prepare_resume_reply): Change prototype to take a
15212 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15213 (last_status, last_ptid): New.
15214 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15215 pid instead of a signal.
15216 (attach_inferior): Remove "status" and "signal" parameters.
15218 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15220 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15221 (handle_v_requests, myresume): Remove "status" and "signal"
15222 parameters. Adjust.
15223 (handle_status): New.
15224 (main): Delete local `status'. Adjust.
15225 * remote-utils.c: Include target.h.
15226 (prepare_resume_reply): Change prototype to take a
15227 target_waitstatus. Adjust.
15229 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15231 * spu-low.c (spu_wait): Adjust.
15232 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15234 (win32_wait): Adjust.
15236 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15238 * target.h (struct thread_resume): Delete leave_stopped member.
15239 (struct target_ops): Add a `n' argument to the `resume' callback.
15240 * server.c (start_inferior): Adjust.
15241 (handle_v_cont, myresume): Adjust.
15242 * linux-low.c (check_removed_breakpoint): Adjust to resume
15243 interface change, and to removed leave_stopped field.
15244 (resume_ptr): Delete.
15245 (struct thread_resume_array): New.
15246 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15247 resume interface change.
15248 (linux_continue_one_thread, linux_queue_one_thread)
15249 (resume_status_pending_p): Check if the resume field is NULL
15250 instead of checking the leave_stopped member.
15251 (linux_resume): Adjust to the target resume interface change.
15252 * spu-low.c (spu_resume): Adjust to the target resume interface
15254 * win32-low.c (win32_detach, win32_resume): Ditto.
15256 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15258 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15260 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15262 (linux_continue_one_thread): Only preserve the stepping flag if
15263 there's a pending breakpoint.
15265 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15267 * server.c (main): After the inferior having exited, call
15268 remote_close before exiting gdbserver.
15270 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15272 Fix size of FPSCR in Power 7 processors.
15273 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15274 (PPC_FEATURE_HAS_DFP): New #define.
15275 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15278 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15280 * server.c (handle_query) Whitespace and formatting.
15282 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15284 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15285 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15286 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15287 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15288 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15289 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15290 Makefile.in, configure.ac: Fix whitespace throughout.
15291 * configure: Regenerate.
15293 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15295 * inferiors.c (find_inferior): Make it safe for the callback
15296 function to delete the currently iterated inferior.
15298 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15300 * Makefile.in (linuw_low_h): Move higher.
15301 (thread-db.o): Depend on $(linux_low_h).
15303 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15305 Rename "process" to "lwp" throughout.
15307 * linux-low.c (all_processes): Rename to...
15308 (all_lwps): ... this.
15309 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15310 (add_process): Rename to ...
15311 (add_lwp): ... this. Adjust.
15312 (linux_create_inferior): Adjust.
15313 (linux_attach_lwp): Adjust.
15314 (linux_attach): Adjust.
15315 (linux_kill_one_process): Rename to ...
15316 (linux_kill_one_lwp): ... this. Adjust.
15317 (linux_kill): Adjust.
15318 (linux_detach_one_process): Rename to ...
15319 (linux_detach_one_lwp): ... this. Adjust.
15320 (linux_detach): Adjust.
15321 (check_removed_breakpoint): Adjust.
15322 (status_pending_p): Adjust.
15323 (linux_wait_for_process): Rename to ...
15324 (linux_wait_for_lwp): ... this. Adjust.
15325 (linux_wait_for_event): Adjust.
15326 (send_sigstop): Adjust.
15327 (wait_for_sigstop): Adjust.
15328 (stop_all_processes): Rename to ...
15329 (stop_all_lwps): ... this.
15330 (linux_resume_one_process): Rename to ...
15331 (linux_resume_one_lwp): ... this. Adjust.
15332 (linux_set_resume_request, linux_continue_one_thread)
15333 (linux_queue_one_thread, resume_status_pending_p)
15334 (usr_store_inferior_registers, regsets_store_inferior_registers)
15335 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15337 * linux-low.h (get_process): Rename to ...
15338 (get_lwp): ... this. Adjust.
15339 (get_thread_process): Rename to ...
15340 (get_thread_lwp): ... this. Adjust.
15341 (get_process_thread): Rename to ...
15342 (get_lwp_thread): ... this. Adjust.
15343 (struct process_info): Rename to ...
15344 (struct lwp_info): ... this.
15345 (all_processes): Rename to ...
15346 (all_lwps): ... this.
15347 * proc-service.c (ps_lgetregs): Adjust.
15348 * thread-db.c (thread_db_create_event, find_one_thread)
15349 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15351 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15353 * server.c (handle_query): Handle "qAttached".
15355 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15357 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15358 GPLv3, update license URL.
15360 2009-03-01 Doug Evans <dje@google.com>
15362 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15363 (server_h): Add gdb_signals.h.
15364 (signals.o): Update.
15365 * server.h (target_signal_from_host,target_signal_to_host_p)
15366 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15368 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15370 * remote-utils.c (getpkt): Also generate remote-debug
15371 information if noack_mode is set.
15373 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15375 * server.c (handle_query): Report qXfer:siginfo:read and
15376 qXfer:siginfo:write as supported and handle them.
15377 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15378 * linux-low.c (linux_xfer_siginfo): New.
15379 (linux_target_ops): Set it.
15381 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15383 * server.c (gdbserver_usage): Mention --remote-debug.
15384 (main): Accept '--remote-debug' switch.
15386 2009-01-18 Doug Evans <dje@google.com>
15388 * regcache.c (new_register_cache): No need to check result of xcalloc.
15389 * server.c (handle_search_memory): Back out calls to xmalloc,
15390 result is checked and error is returned to user upon failure.
15391 (handle_query): Ditto. Add more checks for result of malloc.
15392 (handle_v_cont): Check result of malloc, report error back to
15394 (handle_v_run): Ditto. Call freeargv.
15395 * server.h (freeargv): Declare.
15396 * utils.c (freeargv): New fn.
15398 2009-01-15 Doug Evans <dje@google.com>
15400 * gdbreplay.c (perror_with_name): Make arg const char *.
15401 * server.h (target_signal_to_name): Make return type const char *.
15402 * thread-db.c (thread_db_err_str): Make return type const char *.
15403 * utils.c (perror_with_name): Make arg const char *.
15405 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15407 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15408 when handling a EXIT_PROCESS_DEBUG_EVENT.
15410 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15412 * gdbreplay.c (gdbreplay_version): Update copyright year.
15413 * server.c (gdbserver_version): Likewise.
15415 2009-01-05 Doug Evans <dje@google.com>
15417 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15418 (handle_extended_wait): Improve comment.
15420 2008-12-13 Doug Evans <dje@google.com>
15422 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15423 * server.h (ATTR_MALLOC): New macro.
15424 (xmalloc,xcalloc,xstrdup): Declare.
15425 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15426 * inferiors.c: Ditto.
15427 * linux-low.c: Ditto.
15428 * mem-break.c: Ditto.
15429 * regcache.c: Ditto.
15430 * remote-utils.c: Ditto.
15433 * win32-low.c: Ditto.
15435 2008-12-12 Doug Evans <dje@google.com>
15437 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15438 in debugging printf.
15440 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15442 2008-12-09 Doug Evans <dje@google.com>
15444 * linux-low.h (struct process_info): Delete member tid, unused.
15445 * thread-db.c (find_one_thread): Update.
15446 (maybe_attach_thread): Update.
15448 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15450 * target.h (struct target_ops): Add qxfer_osdata member.
15451 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15453 (linux_qxfer_osdata): New functions.
15454 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15456 * server.c (handle_query): Handle "qXfer:osdata:read:".
15457 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15458 (buffer_xml_printf): New functions.
15459 * server.h (struct buffer): New.
15460 (buffer_grow_str, buffer_grow_str0): New macros.
15461 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15462 (buffer_xml_printf): Declare.
15464 2008-11-24 Doug Evans <dje@google.com>
15466 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15468 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15470 * server.c (handle_v_run): Always use the supplied argument list.
15472 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15474 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15475 (xtensa_regmap_table): Add entry for scompare1.
15477 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15479 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15480 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15481 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15482 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15483 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15484 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15485 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15486 XML target descriptions.
15487 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15488 when inferior is running on an ISA 2.05 or later processor. Add
15489 special case to return offset for full 64-bit slot of FPSCR when
15492 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15494 * Makefile.in (SFILES, clean): Added sparc64 files.
15495 (reg-sparc64.o, reg-sparc64.c): New.
15496 * configure.srv (sparc*-*-linux*): New configuration.
15497 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15498 syscall arguments for SPARC.
15499 (regsets_store_inferior_registers): Likewise.
15500 * linux-sparc-low.c: New file.
15502 2008-10-21 Doug Evans <dje@google.com>
15504 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15505 (READLINE_DIR,READLINE_DEP): Delete.
15506 (INTERNAL_CFLAGS): Update.
15507 (LINTFLAGS): Update.
15509 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15511 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15512 whole argv from the last run, not just argv[0].
15514 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15516 * regcache.c (new_register_cache): Return NULL if the register
15517 cache size isn't known yet.
15518 (free_register_cache): Avoid dereferencing a NULL regcache.
15520 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15522 * configure.srv: Merge MIPS and MIPS64.
15524 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15526 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15528 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15530 * Makefile.in: Add required vsx dependencies.
15532 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15533 Declare init_registers_powerpc_vsx32l.
15534 Declare init_registers_powerpc_vsx64l.
15535 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15536 (ppc_arch_setup): Check for VSX in hwcap.
15537 (ppc_fill_vsxregset): New function.
15538 (ppc_store_vsxregset): New function.
15539 Add new VSX entry in regset_info target_regsets.
15541 * configure.srv: Add new VSX dependencies.
15543 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15545 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15546 (remote_open): Set or clear transport_is_reliable.
15547 (putpkt_binary): Don't expect acks in noack mode.
15548 (getpkt): Don't send ack/nac in noack mode.
15549 * server.c (handle_general_set): Handle QStartNoAckMode.
15550 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15552 (main): Reset noack_mode on every connection.
15553 * server.h (noack_mode): Declare.
15555 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15557 * Makefile.in (GDBREPLAY_OBS): New variable.
15558 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15560 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15561 Daniel Jacobowitz <dan@codesourcery.com>
15563 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15564 (usr_store_inferior_registers): Likewise.
15565 (regsets_store_inferior_registers): Likewise.
15567 2008-07-31 Rolf Jansen <rj@surtec.com>
15568 Pedro Alves <pedro@codesourcery.com>
15570 * configure.ac: Check for memmem declaration.
15571 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15572 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15573 (disable_packet_qfThreadInfo): Unconditionally compile.
15574 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15575 * configure, config.in: Regenerate.
15577 2008-07-28 Doug Kwan <dougkwan@google.com>
15579 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15580 (linux_write_memory): Remove declaration of errno.
15582 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15584 * linux-low.c (handle_extended_wait): Do not use "status"
15585 variable uninitialized.
15587 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15589 * server.c (handle_v_attach): Inhibit reporting dll changes.
15591 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15593 * remote-utils.c (prepare_resume_reply): If requested, don't
15594 output "thread:TID" in the T stop reply.
15596 * server.c (disable_packet_vCont, disable_packet_Tthread)
15597 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15598 (handle_query): If requested, disable support for qC, qfThreadInfo
15600 (handle_v_requests): If requested, disable support for vCont.
15601 (gdbserver_show_disableable): New.
15602 (main): Handle --disable-packet and --disable-packet=LIST.
15604 * server.h (disable_packet_vCont, disable_packet_Tthread)
15605 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15607 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15609 * server.c (gdbserver_usage): Mention --version.
15611 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15613 * Makefile.in (gdbreplay.o): New rule.
15615 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15617 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15618 message, not gdbserver.
15620 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15621 Nathan Sidwell <nathan@codesourcery.com>
15622 Joseph Myers <joseph@codesourcery.com>
15624 * acinclude.m4: Include ../../config/acx.m4.
15625 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15626 * configure, config.in: Regenerate.
15627 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15628 * server.c (gdbserver_version): Print PKGVERSION.
15629 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15630 (main): Adjust gdbserver_usage calls.
15631 * gdbreplay.c (version, host_name): Add declarations.
15632 (gdbreplay_version, gdbreplay_usage): New.
15633 (main): Accept --version and --help options.
15635 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15637 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15638 (arm_breakpoint_at): Handle Thumb.
15639 (the_low_target): Add comment.
15641 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15643 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15645 2008-05-09 Doug Evans <dje@google.com>
15647 * server.h (decode_search_memory_packet): Declare.
15648 * remote-utils.c (decode_search_memory_packet): New fn.
15649 * server.c (handle_search_memory_1): New fn.
15650 (handle_search_memory): New fn.
15651 (handle_query): Process qSearch:memory packets.
15653 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15655 * regcache.c (registers_length): Remove.
15656 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15657 full register packet.
15658 * regcache.h (registers_length): Remove prototype.
15659 * server.h (PBUFSIZ): Define to 16384.
15661 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15663 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15664 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15665 powerpc-64l.o, and powerpc-altivec64l.o.
15666 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15667 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15668 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15669 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15670 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15673 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15674 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15675 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15676 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15677 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15678 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15679 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15680 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15681 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15682 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15685 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15686 (init_registers_powerpc_32l): ... this new prototype.
15687 (init_registers_powerpc_32): Remove, replace by ...
15688 (init_registers_powerpc_altivec32l): ... this new prototype.
15689 (init_registers_powerpc_e500): Remove, replace by ...
15690 (init_registers_powerpc_e500l): ... this new prototype.
15691 (init_registers_ppc64): Remove, replace by ...
15692 (init_registers_powerpc_64l): ... this new prototype.
15693 (init_registers_powerpc_64): Remove, replace by ...
15694 (init_registers_powerpc_altivec64l): ... this new prototype.
15695 (ppc_num_regs): Set to 73.
15696 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15697 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15698 (ppc_cannot_store_register): Handle orig_r3 and trap.
15699 (ppc_arch_setup): Update init_registers_... calls.
15700 (ppc_fill_gregset): Handle orig_r3 and trap.
15702 * inferiors.c (clear_inferiors): Reset current_inferior.
15704 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15706 * acinclude.m4: Add override.m4.
15707 * configure: Regenerate.
15709 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15711 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15712 initial call to init_register_ppc64.
15714 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15716 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15717 single powerpc*-*-linux* case.
15718 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15720 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15722 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15723 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15725 * linux-ppc-low.c: Include <elf.h>.
15726 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15727 (ppc_hwcap): New global variable.
15728 (ppc_regmap): Remove __SPE__ #ifdef sections.
15729 (ppc_regmap_e500): New global variable.
15730 (ppc_cannot_store_register): Update __SPE__ special case.
15731 (ppc_get_hwcap): New function.
15732 (ppc_arch_setup): Use it to determine whether inferior supports
15733 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15734 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15735 Do not access registers if target does not support AltiVec.
15736 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15737 Do not access registers if target does not support SPE.
15738 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15740 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15742 * linux-low.c (disabled_regsets, num_regsets): New.
15743 (use_regsets_p): Delete.
15744 (linux_wait_for_process): Clear disabled_regsets.
15745 (regsets_fetch_inferior_registers): Check and set it.
15746 (regsets_store_inferior_registers): Likewise.
15747 (linux_fetch_registers, linux_store_registers): Do not use
15749 (initialize_low): Allocate disabled_regsets.
15751 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15753 * Makefile.in (LIBOBJS): New.
15754 (OBS): Use LIBOBJS.
15755 (memmem.o): New rule.
15756 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15757 * configure: Regenerated.
15759 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15761 * server.c (handle_query): Never return "unsupported" for
15762 qXfer:features:read queries.
15764 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15766 * server.c (get_features_xml): Fix inverted condition.
15767 (handle_query): Always support qXfer:feature:read.
15769 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15771 * server.c (wrapper_argv): New.
15772 (start_inferior): Handle wrapper_argv. If set, expect an extra
15774 (gdbserver_usage): Document --wrapper.
15775 (main): Parse --wrapper.
15777 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15779 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15780 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15781 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15782 (ppc_set_pc): Likewise.
15783 (ppc_arch_setup): New function.
15784 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15785 of collect_register.
15786 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15788 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15790 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15791 instead of linux-ppc64-low.o.
15792 * linux-ppc64-low.c: Remove file.
15793 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15794 (linux-ppc64-low.o): Remove rule.
15796 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15797 (init_registers_powerpc_64): Likewise.
15798 (ppc_regmap): Conditionally define depending on __powerpc64__.
15799 (ppc_cannot_store_register): Do not special-case "fpscr" when
15800 compiled on __powerpc64__.
15801 (ppc_collect_ptrace_register): New function.
15802 (ppc_supply_ptrace_register): New function.
15803 (ppc_breakpoint): Change type to "unsigned int".
15804 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15805 (the_low_target): Conditionally provide initializers for the
15806 arch_setup member depending on __powerpc64__. Install
15807 collect_ptrace_register and supply_ptrace_register members.
15809 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15811 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15812 * server.c (gdbserver_xmltarget): Define.
15813 (get_features_xml): Use it to replace "target.xml" and arch_string.
15815 * configure.srv: Remove srv_xmltarget. Add XML files that were
15816 mentioned there to srv_xmlfiles instead. Remove conditional tests
15817 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15818 srv_xmlfiles and srv_regobj to include all possible choices.
15819 * configure.ac (srv_xmltarget): Remove.
15820 (srv_xmlfiles): Do not add "target.xml".
15821 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15822 checks for supplementary target information.
15823 * configure: Regenerate.
15824 * Makefile.in (XML_TARGET): Remove.
15825 (target.xml): Remove rule.
15826 (clean): Do not clean up target.xml.
15827 (.PRECIOUS): Do not mention target.xml.
15829 * target.h (struct target_ops): Remove arch_string member.
15830 * linux-low.c (linux_arch_string): Remove.
15831 (linux_target_ops): Remove arch_string initializer.
15832 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15833 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15834 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15835 * spu-low.c (spu_arch_string): Remove.
15836 (spu_target_ops): Remove arch_string initializer.
15837 * win32-low.c (win32_arch_string): Remove.
15838 (win32_target_ops): Remove arch_string initializer.
15839 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15840 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15841 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15843 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15845 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15846 by collect_ptrace_register and supply_ptrace_register hooks.
15847 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15848 instead of checking for the_low_target.left_pad_xfer.
15849 (usr_store_inferior_registers): Use collect_ptrace_register callback
15850 instead of checking for the_low_target.left_pad_xfer.
15852 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15853 (s390_supply_ptrace_register): Likewise.
15854 (s390_fill_gregset): Call s390_collect_ptrace_register.
15855 (the_low_target): Update.
15857 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15858 (ppc_supply_ptrace_register): Likewise.
15859 (the_low_target): Update.
15861 * linux-i386-low.c (the_low_target): Update.
15862 * linux-x86-64-low.c (the_low_target): Update.
15864 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15866 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15867 reg-s390.o and reg-s390x.o.
15869 * linux-low.c (new_inferior): New global variable.
15870 (linux_create_inferior, linux_attach): Set it.
15871 (linux_wait_for_process): Call the_low_target.arch_setup after the
15872 target has stopped for the first time.
15873 (initialize_low): Do not call the_low_target.arch_setup.
15875 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15876 (s390_set_pc): Likewise.
15877 (s390_arch_setup): New function.
15878 (the_low_target): Use s390_arch_setup as arch_setup routine.
15880 * regcache.c (realloc_register_cache): New function.
15881 (set_register_cache): Call it for each existing regcache.
15883 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15885 * server.h (init_registers): Remove prototype.
15887 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15888 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15889 instead of init_registers ().
15890 * linux-arm-low.c (init_registers_arm): Add prototype.
15891 (init_registers_arm_with_iwmmxt): Likewise.
15892 (the_low_target): Add initializer for arch_setup field.
15893 * linux-cris-low.c (init_registers_cris): Add prototype.
15894 (the_low_target): Add initializer for arch_setup field.
15895 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15896 (the_low_target): Add initializer for arch_setup field.
15897 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15898 (the_low_target): Add initializer for arch_setup field.
15899 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15900 (the_low_target): Add initializer for arch_setup field.
15901 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15902 (the_low_target): Add initializer for arch_setup field.
15903 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15904 (the_low_target): Add initializer for arch_setup field.
15905 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15906 (init_registers_mips64_linux): Likewise.
15907 (the_low_target): Add initializer for arch_setup field.
15908 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15909 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15910 (the_low_target): Add initializer for arch_setup field.
15911 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15912 (init_registers_powerpc_64): Likewise.
15913 (the_low_target): Add initializer for arch_setup field.
15914 * linux-s390-low.c (init_registers_s390): Add prototype.
15915 (init_registers_s390x): Likewise.
15916 (the_low_target): Add initializer for arch_setup field.
15917 * linux-sh-low.c (init_registers_sh): Add prototype.
15918 (the_low_target): Add initializer for arch_setup field.
15919 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15920 (the_low_target): Add initializer for arch_setup field.
15921 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15922 (the_low_target): Add initializer for arch_setup field.
15924 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15925 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15926 instead of init_registers ().
15927 * win32-arm-low.c (init_registers_arm): Add prototype.
15928 (the_low_target): Add initializer for arch_setup field.
15929 * win32-i386-low.c (init_registers_i386): Add prototype.
15930 (the_low_target): Add initializer for arch_setup field.
15932 * spu-low.c (init_registers_spu): Add prototype.
15933 (initialize_low): Call initialie_registers_spu () instead of
15934 initialize_registers ().
15936 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15938 * server.c (handle_v_requests): When handling the vRun and vAttach
15939 packets, if already debugging a process, don't kill it. Return an
15942 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15944 * server.c (handle_query): Correct length check.
15946 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15948 * win32-low.c (do_initial_child_stuff): Add process handle
15949 parameter. Set current_process_handle and current_process_id from the
15950 parameters. Clear globals.
15951 (win32_create_inferior): Don't set current_process_handle and
15952 current_process_id here. Instead pass them on the call to
15953 do_initial_child_stuff.
15954 (win32_attach): Likewise.
15955 (win32_clear_inferiors): New.
15956 (win32_kill): Don't close the current process handle or the
15957 current thread handle here. Instead call win32_clear_inferiors.
15958 (win32_detach): Don't open a new handle to the process. Call
15959 win32_clear_inferiors.
15960 (win32_join): Don't rely on current_process_handle; open a new
15961 handle using the process id.
15962 (win32_wait): Call win32_clear_inferiors when the inferior process
15965 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15967 * server.c (monitor_show_help): Add "exit".
15969 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15971 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15972 (clean): Add reg-xtensa.c.
15973 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15974 * configure.srv (xtensa*-*-linux*) New target.
15975 * linux-xtensa-low.c: New.
15976 * xtensa-xtregs.c: New.
15978 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15980 * hostio.c: Don't include errno.h.
15981 (errno_to_fileio_errno): Move to hostio-errno.
15982 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15983 error number outputting to the target->hostio_last_error callback.
15984 (hostio_packet_error): Use FILEIO_EINVAL directly.
15985 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15986 calls to hostio_error.
15987 * hostio-errno.c: New.
15988 * server.h (hostio_last_error_from_errno): Declare.
15989 * target.h (target_ops): Add hostio_last_error member.
15990 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15991 as hostio_last_error handler.
15992 * spu-low.c (spu_target_ops): Likewise.
15993 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15994 (wince_hostio_last_error): New functions.
15995 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15996 as hostio_last_error handler.
15997 (win32_target_ops) [!_WIN32_WCE]: Register
15998 hostio_last_error_from_errno as hostio_last_error handler.
15999 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16000 (hostio-errno.o): New rule.
16001 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16002 * configure.srv (srv_hostio_err_objs): New variable. Default to
16004 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16005 * configure: Regenerate.
16007 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16009 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16010 (linux_kill, linux_detach): Clean up the process list.
16011 * remote-utils.c (remote_open): Improve port number parsing.
16012 (putpkt_binary, input_interrupt): Only send interrupts if the target
16014 * server.c (extended_protocol): Make static.
16015 (attached): Define earlier.
16016 (exit_requested, response_needed, program_argv): New variables.
16017 (target_running): New.
16018 (start_inferior): Clear attached here.
16019 (attach_inferior): Set attached here.
16020 (require_running): Define.
16021 (handle_query): Use require_running and target_running. Implement
16023 (handle_v_attach, handle_v_run): New.
16024 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16025 (gdbserver_usage): Update.
16026 (main): Redo argument parsing. Handle --debug and --multi. Handle
16027 --attach along with other options or after the port. Save
16028 program_argv. Support no initial program. Resynchronize
16029 communication with GDB after an error. Handle "monitor exit".
16030 Use require_running and target_running. Always allow the extended
16031 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16032 restart in extended mode.
16033 * README: Refer to the GDB manual. Update --attach usage.
16035 2007-12-20 Andreas Schwab <schwab@suse.de>
16037 * linux-low.c (STACK_SIZE): Define.
16038 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16039 (linux_test_for_tracefork): Likewise.
16041 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16043 * linux-low.c (linux_wait_for_event): Update messages. Do not
16044 reinsert auto-delete breakpoints.
16045 * mem-break.c (struct breakpoint): Change return type of handler to
16047 (set_breakpoint_at): Update handler type.
16048 (reinsert_breakpoint_handler): Return 1 instead of calling
16050 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16052 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16053 * mem-break.h (set_breakpoint_at): Update handler type.
16054 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16055 * win32-low.c (auto_delete_breakpoint): New.
16056 (get_child_debug_event): Use it.
16058 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16060 * configure.ac: Check for pread and pwrite.
16061 * hostio.c (handle_pread): Fall back to lseek and read.
16062 (handle_pwrite): Fall back to lseek and write.
16063 * config.in, configure: Regenerated.
16065 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16067 * server.c (myresume): Add own_buf argument.
16068 (main): Update calls.
16070 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16072 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16073 * remote-utils.c (remote_open): Do not call disable_async_io.
16074 (block_async_io): Delete.
16075 (unblock_async_io): Make static.
16076 (initialize_async_io): New.
16077 * server.c (handle_v_cont): Handle async I/O here.
16078 (myresume): Likewise. Move other common resume tasks here...
16079 (main): ... from here. Call initialize_async_io. Disable async
16080 I/O before the main loop.
16081 * server.h (initialize_async_io): Declare.
16082 (block_async_io, unblock_async_io): Delete prototypes.
16083 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16085 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16087 * remote-utils.c (readchar): Allow binary data in received messages.
16089 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16091 * win32-low.c (attaching): New global.
16092 (win32_create_inferior): Clear the `attaching' global.
16093 (win32_attach): Set the `attaching' global.
16094 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16095 attaching. Only set a breakpoint at the entry point if not
16098 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16100 * server.c (main): Don't report dll events on the initial
16101 connection on attaches.
16103 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16105 * server.c (main): Relax numerical bases supported for the pid of
16106 the --attach command line argument.
16108 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16110 * win32-low.c (win32_attach): Call OpenProcess before
16111 DebugActiveProcess, not after. Add last error output to error
16114 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16116 * win32-low.c (win32_get_thread_context)
16117 (win32_set_thread_context): New functions.
16118 (thread_rec): Use win32_get_thread_context.
16119 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16120 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16123 2007-12-03 Leo Zayas
16124 Pedro Alves <pedro_alves@portugalmail.pt>
16126 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16128 (child_add_thread): Minor cleanup.
16129 (child_continue): Resume artificially suspended threads before
16130 calling ContinueDebugEvent.
16131 (suspend_one_thread): New.
16132 (fake_breakpoint_event): New.
16133 (get_child_debug_event): Change return type to int. Check here if
16134 gdb sent an interrupt request. If a soft interrupt was requested,
16135 fake a breakpoint event. Return 0 if there is no event to handle,
16137 (win32_wait): Don't check here if gdb sent an interrupt request.
16138 Ensure there is a valid event to handle.
16139 (win32_request_interrupt): Add soft interruption method as last
16142 2007-12-03 Leo Zayas
16143 Pedro Alves <pedro_alves@portugalmail.pt>
16145 * win32-low.h (win32_thread_info): Add descriptions to the
16146 structure members. Replace `suspend_count' counter by a
16148 * win32-low.c (thread_rec): Update condition of when to get the
16149 context from the inferior. Rely on ContextFlags being set if it
16150 has already been retrieved. Only suspend the inferior thread if
16151 we haven't already. Warn if that fails.
16152 (continue_one_thread): s/suspend_count/suspended/. Only call
16153 ResumeThread once. Warn if that fails.
16155 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16157 * win32-low.c (win32_wait): Don't read from the inferior when it
16158 has already exited.
16160 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16162 * Makefile.in (win32_low_h): New variable.
16163 (win32-low.o): Add dependency on $(win32_low_h).
16164 (win32-arm-low.o, win32-i386-low.o): New rules.
16166 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16168 * hostio.c: Correct copyright year.
16170 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16172 * Makefile.in (OBS): Add hostio.o.
16173 (hostio.o): New rule.
16174 * server.h (handle_vFile): Declare.
16175 * hostio.c: New file.
16176 * server.c (handle_v_requests): Take packet_len and new_packet_len
16177 for binary packets. Call handle_vFile.
16178 (main): Update call to handle_v_requests.
16180 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16182 * linux-low.c: Include <sched.h>.
16184 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16186 * linux-low.c (linux_tracefork_grandchild): New.
16187 (linux_tracefork_child): Use clone.
16188 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16190 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16192 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16194 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16196 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16198 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16200 * inferiors.c (change_inferior_id): Delete.
16201 (add_pid_to_list, pull_pid_from_list): New.
16202 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16203 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16204 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16205 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16206 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16207 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16208 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16209 (using_threads): Always set to 1.
16210 (handle_extended_wait): New.
16211 (add_process): Do not set TID.
16212 (linux_create_inferior): Set must_set_ptrace_flags.
16213 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16214 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16215 (linux_thread_alive): Rename TID argument to LWPID.
16216 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16217 (linux_wait_for_event): Do not use TID or check using_threads. Update
16218 call to dead_thread_notify. Call handle_extended_wait.
16219 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16220 (send_sigstop): Delete sigstop_sent.
16221 (wait_for_sigstop): Avoid TID.
16222 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16223 (linux_test_for_tracefork): New.
16224 (linux_lookup_signals): Use thread_db_active and
16225 linux_supports_tracefork_flag.
16226 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16227 * linux-low.h (get_process_thread): Avoid TID.
16228 (struct process_ifo): Move thread_known and tid to the end. Remove
16230 (linux_attach_lwp, thread_db_init): Update prototypes.
16231 * server.h (change_inferior_id): Delete prototype.
16232 (add_pid_to_list, pull_pid_from_list): New prototypes.
16233 * thread-db.c (thread_db_use_events): New.
16234 (find_first_thread): Rename to...
16235 (find_one_thread): ...this. Update callers and messages. Do not
16236 call fatal. Check thread_db_use_events. Do not call
16237 change_inferior_id or new_thread_notify.
16238 (maybe_attach_thread): Update. Do not call new_thread_notify.
16239 (thread_db_init): Set thread_db_use_events. Check use_events.
16240 * utils.c (fatal, warning): Correct message prefix.
16242 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16244 * Makefile.in (clean): Remove new files.
16245 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16246 (powerpc-64.o, powerpc-64.c): New rules.
16247 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16248 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16250 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16252 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16253 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16254 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16255 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16256 (target_regsets): Add AltiVec and SPE register sets.
16257 * configure.ac: Check for AltiVec and SPE.
16258 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16259 (ppc_fill_vrregset, ppc_store_vrregset): New.
16260 (target_regsets): Add AltiVec register set.
16261 * configure: Regenerated.
16263 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16265 * linux-low.c (O_LARGEFILE): Define.
16266 (linux_read_memory): Use /proc/PID/mem.
16267 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16268 * configure, config.in: Regenerated.
16270 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16272 * linux-low.c (linux_wait_for_event): Do not pass signals while
16275 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16277 * win32-low.c (create_process): New.
16278 (win32_create_inferior): Use create_process instead of
16279 CreateProcess. If create_process failed retry appending an ".exe"
16280 suffix. Store the GetLastError result immediatelly after
16281 create_process calls and use it on the call to error.
16283 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16285 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16287 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16289 * configure.ac: Switch license to GPLv3.
16291 2007-08-01 Michael Snyder <msnyder@access-company.com>
16293 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16295 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16297 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16299 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16300 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16301 CloseToolhelp32Snapshot.
16302 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16303 CloseToolhelp32Snapshot.
16305 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16307 * server.c (main): Check for inferior exit before main loop.
16309 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16311 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16312 instead of on tmp_desc.
16314 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16315 Daniel Jacobowitz <dan@codesourcery.com>
16317 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16318 (add_thread): Minor cleanups.
16319 (clear_inferiors): Move lower in the file. Clear the DLL
16321 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16322 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16323 (xml_escape_text): New.
16324 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16326 (handle_v_cont): Report errors.
16327 (gdbserver_version): Update.
16328 (main): Correct size of own_buf. Do not report initial DLL events.
16329 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16330 (unloaded_dll, xml_escape_text): New.
16331 * win32-low.c (enum target_waitkind): Update comments.
16332 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16333 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16334 (win32_EnumProcessModules, win32_GetModuleInformation)
16335 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16336 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16337 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16338 (win32_Module32First, win32_Module32Next, load_toolhelp)
16339 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16340 (get_child_debug_event): Handle DLL events.
16341 (win32_wait): Likewise.
16343 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16345 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16346 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16348 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16350 * win32-low.c (handle_output_debug_string): Ignore event if not
16353 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16355 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16357 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16359 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16361 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16363 * inferiors.c (change_inferior_id): Add comment.
16364 * linux-low.c (check_removed_breakpoint): Add an early
16365 prototype. Improve debug output.
16366 (linux_attach): Doc update.
16367 (linux_detach_one_process, linux_detach): Clean up before releasing
16369 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16370 * linux-low.h (struct process_info): Doc improvement.
16371 * mem-break.c (delete_all_breakpoints): New.
16372 * mem-break.h (delete_all_breakpoints): New prototype.
16373 * thread-db.c (find_first_thread): New.
16374 (thread_db_create_event): Call it instead of
16375 thread_db_find_new_threads. Clean up unused variables.
16376 (maybe_attach_thread): Remove first thread handling.
16377 (thread_db_find_new_threads): Use find_first_thread.
16378 (thread_db_get_tls_address): Likewise.
16380 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16382 * thread-db.c (thread_db_find_new_threads): Add prototype.
16383 (thread_db_create_event): Check for the main thread before adding
16385 (maybe_attach_thread): Only enable event reporting if TID == 0.
16386 (thread_db_get_tls_address): Check for new threads.
16388 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16390 * linux-low.c (linux_create_inferior): Try execv before execvp.
16391 * spu-low.c (spu_create_inferior): Likewise.
16393 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16395 * linux-low.c (linux_create_inferior): Change execv to execvp.
16396 * spu-low.c (spu_create_inferior): Likewies.
16398 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16400 * Makefile.in (clean): Clean new files instead of deleted ones.
16401 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16402 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16404 * configure.srv: Specify XML files and new regformats for MIPS and
16406 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16407 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16408 an entry for the restart register.
16409 (mips_cannot_fetch_register, mips_cannot_store_register)
16410 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16411 register names to match the XML descriptions.
16412 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16413 restart register instead of $0.
16415 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16416 Markus Deuling <deuling@de.ibm.com>
16418 * remote-utils.c (decode_xfer_write): New function.
16419 * server.h (decode_xfer_write): Add prototype.
16420 * server.c (handle_query): Add PACKET_LEN argument. Support
16421 qXfer:spu:read and qXfer:spu:write packets.
16422 (main): Pass packet_len to handle_query.
16423 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16424 * target.h (target_ops): Add qxfer_spu.
16426 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16428 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16429 accessing non-seekable spufs files.
16431 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16433 * server.c (handle_query): Add reply for qC packet.
16435 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16436 Leo Zayas <lerele@champenstudios@com>
16438 * server.h (check_remote_input_interrupt_request): New function.
16439 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16440 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16441 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16442 (check_remote_input_interrupt_request): New function.
16443 * server.h (check_remote_input_interrupt_request): Declare.
16444 * win32-low.c (winapi_DebugBreakProcess,
16445 winapi_GenerateConsoleCtrlEvent): New typedefs.
16446 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16448 (win32_wait): Check for remote interrupt request
16449 with check_remote_input_interrupt_request.
16450 (win32_request_interrupt): New function.
16451 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16453 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16455 * win32-low.c (debug_registers_changed,
16456 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16457 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16458 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16459 (thread_rec): Get context using the low target.
16460 (child_add_thread): Call thread_added on the low target,
16461 which does the same thing.
16463 (do_initial_child_stuff): Remove debug registers references.
16464 Set context using the low target. Resume threads after
16465 setting the contexts.
16466 (child_continue): Remove dead variable. Remove debug
16467 registers references.
16468 (child_fetch_inferior_registers): Go through the low target.
16469 (do_child_store_inferior_registers): Remove.
16470 (child_store_inferior_registers): Go through the low target.
16471 (win32_resume): Remove debug registers references.
16472 Set context using the low target.
16473 (handle_exception): Change return type to void. Don't record
16474 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16475 first chance exception.
16476 (get_child_debug_event): Change return type to void. Remove
16477 goto loop. Always return after waiting for debug event.
16478 (win32_wait): Convert to switch statement. Handle spurious
16481 * win32-i386-low.c (debug_registers_changed,
16482 debug_registers_used): New.
16483 (initial_stuff): Rename to ...
16484 (i386_initial_stuff): ... this. Clear debug registers
16486 (store_debug_registers): Delete.
16487 (i386_get_thread_context): New.
16488 (load_debug_registers): Delete.
16489 (i386_set_thread_context): New.
16490 (i386_thread_added): New.
16491 (single_step): Rename to ...
16492 (i386_single_step): ... this.
16493 (do_fetch_inferior_registers): Rename to ...
16494 (i386_fetch_inferior_register): ... this.
16495 (i386_store_inferior_register): New.
16496 (the_low_target): Adapt to new interface.
16498 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16499 (arm_get_thread_context): New.
16500 (arm_set_thread_context): New.
16502 (do_fetch_inferior_registers): Rename to ...
16503 (arm_fetch_inferior_register): ... this.
16504 (arm_store_inferior_register): New.
16505 (arm_wince_breakpoint): Reimplement as unsigned long.
16506 (arm_wince_breakpoint_len): Define.
16507 (the_low_target): Adapt to new interface.
16509 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16510 load_debug_registers. Add get_thread_context, set_thread_context,
16511 thread_added and store_inferior_register. Rename
16512 fetch_inferior_registers to fetch_inferior_register.
16513 (regptr): Remove declaration.
16515 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16517 * linux-low.c (linux_detach): Change return type to int. Return 0.
16518 * spu-low.c (spu_detach): Likewise.
16520 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16522 * target.h (target_ops): Change return type of detach to int.
16524 (join_inferior): New.
16525 * server.c (main): Don't skip detach support on mingw32.
16526 If the inferior doesn't support detaching return error.
16527 Call join_inferior instead of using waitpid.
16528 * linux-low.c (linux_join): New.
16529 (linux_target_op): Add linux_join.
16530 * spu-low.c (spu_join): New.
16531 (spu_target_ops): Add spu_join.
16532 * win32-low.c (win32_detach): Adapt to new interface.
16533 Reopen current_process_handle before detaching. Issue a child
16534 resume before detaching.
16536 (win32_target_op): Add win32_join.
16538 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16540 * win32-low.c (win32-attach): Fix return value.
16541 * target.h (target_ops): Describe ATTACH return values.
16543 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16545 * win32-low.c (GETPROCADDRESS): Define.
16546 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16547 (winapi_DebugSetProcessKillOnExit): Likewise.
16548 (win32_create_inferior): Force usage of ansi CreateProcessA.
16549 (win32_attach): Use GETPROCADDRESS.
16550 (win32_detach): Likewise.
16552 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16554 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16556 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16558 * win32-low.c: Commit leftover changes from 2007-03-29.
16560 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16562 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16563 fields short instead of int. Add explicit padding.
16564 (i387_cache_to_fsave): Remove unnecessary casts.
16565 (i387_fsave_to_cache): Doc fix.
16566 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16568 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16570 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16571 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16573 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16575 * configure.srv (arm*-*-mingw32ce*): Move near the other
16578 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16580 * configure.ac: Add errno checking.
16581 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16582 sys/file.h and malloc.h.
16583 (AC_CHECK_DECLS): Add perror.
16584 (srv_mingwce): Handle.
16585 * configure.srv (i[34567]86-*-cygwin*): Add
16586 win32-i386-low.o to srv_tgtobj.
16587 (i[34567]86-*-mingw*): Likewise.
16588 (arm*-*-mingw32ce*): Add case.
16589 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16590 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16591 [__MINGW32CE__] (strerror): New function.
16592 [__MINGW32CE__] (errno): Define to GetLastError.
16593 [__MINGW32CE__] (COUNTOF): New macro.
16594 (remote_open): Remove extra close call.
16595 * mem-break.c (delete_breakpoint_at): New function.
16596 * mem-break.h (delete_breakpoint_at): Declare.
16597 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16598 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16599 [USE_WIN32API] (read, write): Add char* casts.
16600 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16601 * server.h: Include wincecompat.h on Windows CE.
16602 [HAVE_ERRNO_H]: Check.
16603 (perror): Declare if not declared.
16604 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16605 (perror_with_name): Remove errno declaration.
16606 * wincecompat.h: New.
16607 * wincecompat.c: New.
16608 * win32-low.h: New.
16609 * win32-arm-low.c: New.
16610 * win32-i386-low.c: New.
16611 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16612 (OUTMSG2): Make it safe.
16614 (COUNTOF): New macro.
16615 (NUM_REGS): Get it from the low target.
16616 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16617 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16618 (thread_rec): Let low target handle debug registers.
16619 (child_add_thread): Likewise.
16620 (child_init_thread_list): Likewise.
16621 (continue_one_thread): Likewise.
16623 (do_child_fetch_inferior_registers): Move to ...
16624 * win32-i386-low.c: ... here, and rename to ...
16625 (do_fetch_inferior_registers): ... this.
16626 * win32-low.c (child_fetch_inferior_registers):
16627 Go through the low target.
16628 (do_child_store_inferior_registers): Use regptr.
16629 (strwinerror): New function.
16630 (win32_create_inferior): Handle Windows CE.
16631 Use strwinerror instead of strerror on Windows error
16632 codes. Add program to the error output.
16633 Don't close the main thread handle on Windows CE.
16634 (win32_attach): Use coredll.dll on Windows CE.
16635 (win32_kill): Close current process and current
16637 (win32_detach): Use coredll.dll on Windows CE.
16638 (win32_resume): Let low target handle debug registers, and
16640 (handle_exception): Add/Remove initial breakpoint. Avoid
16641 non-existant WSTOPSIG on Windows CE.
16642 (win32_read_inferior_memory): Cast to remove warning.
16643 (win32_arch_string): Go through the low target.
16644 (initialize_low): Call set_breakpoint_data with the low
16645 target's breakpoint.
16646 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16647 FOP_REGNUM, mappings): Move to ...
16648 * win32-i386-low.c: ... here.
16649 * win32-low.c (win32_thread_info): Move to ...
16650 * win32-low.h: ... here.
16651 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16652 win32-arm-low.c and wincecompat.c.
16653 (all:): Add $EXEEXT.
16654 (install-only:): Likewise.
16655 (gdbserver:): Likewise.
16656 (gdbreplay:): Likewise.
16657 * config.in: Regenerate.
16658 * configure: Regenerate.
16660 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16662 * win32-low.c: Rename typedef thread_info to
16663 win32_thread_info throughout.
16665 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16667 * win32-i386-low.c: Rename to ...
16668 * win32-low.c: ... this.
16669 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16670 * Makefile.in: Likewise.
16672 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16674 * remote-utils.c (monitor_output): Constify msg parameter.
16675 * server.h (monitor_output): Likewise.
16676 * win32-i386-low.c (handle_output_debug_string): New.
16677 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16678 handle_output_debug_string.
16679 (get_child_debug_event): Likewise.
16681 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16683 * server.c (main): Correct strtoul check.
16685 2007-03-27 Jon Ringle <jon@ringle.org>
16687 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16689 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16691 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16693 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16695 * terminal.h: Check HAVE_SGTTY_H.
16697 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16699 * remote-utils.c (remote_open): Print out the assigned port number.
16701 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16703 * remote-utils.c (monitor_output): New function.
16704 * server.c (debug_threads): Define here.
16705 (monitor_show_help): New function.
16706 (handle_query): Handle qRcmd.
16707 (main): Do not handle 'd' packet.
16708 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16709 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16712 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16714 * Makefile.in (EXEEXT): New.
16715 (clean): Use $(EXEEXT).
16717 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16719 * target.h (target_ops): Rename send_signal to request_interrupt,
16720 and remove enum target_signal parameter.
16721 * linux-low.c (linux_request_interrupt): Rename from
16722 linux_send_signal, and always send SIGINT.
16723 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16724 and always send SIGINT.
16725 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16727 (input_interrupt): Likewise.
16729 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16731 * server.c (get_features_xml): Check if target implemented
16733 * win32-i386-low.c (win32_arch_string): New.
16734 (win32_target_ops): Add win32_arch_string as arch_string member.
16736 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16738 * spu-low.c (spu_arch_string): New.
16739 (spu_target_ops): Add spu_arch_string.
16741 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16743 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16744 * configure.ac: Do not check for terminal.h.
16745 * configure, config.in: Regenerated.
16747 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16749 * Makefile.in (OBS): Add $(XML_BUILTIN).
16750 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16752 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16753 (arm-with-iwmmxt.c): New.
16754 * config.in, configure: Regenerate.
16755 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16756 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16757 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16758 (arm*-*-linux*): Add iWMMXt and regset support.
16759 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16760 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16761 (arm_store_wmmxregset, target_regsets): New.
16762 * server.c (get_features_xml): Take annex argument. Check builtin
16764 (handle_query): Handle multiple annexes.
16766 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16768 * remote-utils.c [USE_WIN32API] (read, write): Define.
16769 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16772 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16774 * linux-i386-low.c (the_low_target): Set arch_string.
16775 * linux-x86-64-low.c (the_low_target): Likewise.
16776 * linux-low.c (linux_arch_string): New.
16777 (linux_target_ops): Add it.
16778 * linux-low.h (struct linux_target_ops): Add arch_string.
16779 * server.c (write_qxfer_response): Use const void * for DATA.
16780 (get_features_xml): New.
16781 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16782 * target.h (struct target_ops): Add arch_string method.
16784 2007-01-03 Denis Pilat <denis.pilat@st.com>
16785 Daniel Jacobowitz <dan@codesourcery.com>
16787 * linux-low.c (linux_kill): Handle being called with no threads.
16788 * win32-i386-low.c (win32_kill): Likewise.
16789 (get_child_debug_event): Clear current_process_handle.
16791 2006-12-30 Denis PILAT <denis.pilat@st.com>
16792 Daniel Jacobowitz <dan@codesourcery.com>
16794 * remote-utils.c (remote_open): Check the type of specified
16795 serial port devices before opening them.
16796 * server.c (main): Kill the inferior if an error occurs during
16797 the first remote_open.
16799 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16801 * README: Update supported targets.
16803 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16805 * Makefile.in (clean): Remove reg-mips64.c.
16806 (reg-mips64.c, reg-mips64.o): New rules.
16807 * configure.srv: Handle mips64. Include regset support for mips.
16808 * linux-mips-low.c (union mips_register): New.
16809 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16810 (mips_breakpoint, mips_breakpoint_at): Use int.
16811 (mips_collect_register, mips_supply_register)
16812 (mips_collect_register_32bit, mips_supply_register_32bit)
16813 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16814 (mips_store_fpregset, target_regsets): New.
16815 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16817 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16819 * configure.srv: Add target "spu*-*-*".
16820 * Makefile.in (clean): Remove reg-spu.c.
16821 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16822 * spu-low.c: New file.
16824 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16826 * configure.ac: Correct td_thr_tls_get_addr test.
16827 * configure: Regenerated.
16829 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16831 * linux-low.c (linux_wait_for_event): Reformat. Use the
16832 pass_signals array.
16833 * remote-utils.c (decode_address_to_semicolon): New.
16834 * server.c (pass_signals, handle_general_set): New.
16835 (handle_query): Mention QPassSignals for qSupported.
16836 (main): Call handle_general_set.
16837 * server.h (pass_signals, decode_address_to_semicolon): New.
16839 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16841 * server.c (handle_query): Correct error handling for read_auxv.
16843 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16845 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16846 and srv_linux_thread_db to yes.
16847 * linux-s390-low.c (s390_fill_gregset): New function.
16848 (target_regsets): Define data structure.
16850 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16852 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16853 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16854 * config.in, configure: Regenerated.
16855 * inferiors.c (gdb_id_to_thread): New function.
16856 (gdb_id_to_thread_id): Use it.
16857 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16858 * linux-low.h (struct process_info): Add th member.
16859 (thread_db_get_tls_address): New prototype.
16860 * remote-utils.c (decode_address): Make non-static.
16861 * server.c (handle_query): Handle qGetTLSAddr.
16862 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16863 * target.h (struct target_ops): Add get_tls_address.
16864 * thread-db.c (maybe_attach_thread): Save the thread handle.
16865 (thread_db_get_tls_address): New.
16867 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16869 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16870 (linux_resume_one_process): Take a siginfo_t *. Update all
16871 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16872 (struct pending_signals): Add a siginfo_t.
16873 (linux_wait_for_process): Always set last_status.
16874 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16875 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16876 * linux-low.h (struct process_info): Add last_status.
16878 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16880 * remote-utils.c (try_rle): New function.
16881 (putpkt_binary): Use it.
16883 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16885 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16886 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16887 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16888 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16889 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16892 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16894 * server.c (terminal_fd): New variable.
16895 (old_foreground_pgrp): Likewise.
16896 (restore_old_foreground_pgrp): New function.
16897 (start_inferior): Record the terminal file descriptor in terminal_fd
16898 and its original foreground group in old_foreground_pgrp. Register
16899 restore_old_foreground_pgrp with atexit().
16901 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16903 * server.c (handle_query): Correct qPart to qXfer.
16905 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16907 * configure.ac: Check for more headers which are missing on
16908 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16909 * configure.srv: Add Cygwin and mingw32.
16910 * remote-utils.c: Don't include headers unconditionally which
16911 are missing on mingw32. Include <winsock.h> for mingw32.
16912 (remote_open): Adjust for mingw32 support. Flush
16913 standard error after writing to it.
16914 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16915 (unblock_async_io, enable_async_io, disable_async_io)
16916 (readchar, getpkt): Update for Winsock support.
16917 (prepare_resume_reply): Expect a protocol signal number.
16918 * server.c: Disable <sys/wait.h> on mingw32.
16919 (start_inferior): Adjust for mingw32 support. Flush
16920 standard error after writing to it.
16921 (attach_inferior): Likewise. Use protocol signal
16923 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16925 * win32-i386-low.c: New file.
16926 * Makefile.in (XM_CLIBS): Set.
16927 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16928 (win32-i386-low.o): New dependency rule.
16929 * linux-low.c (linux_wait): Use target signal numbers.
16930 * target.h (struct target_ops): Doc fix.
16931 * server.h (target_signal_to_name): New prototype.
16932 * gdbreplay.c: Don't include headers unconditionally which
16933 are missing on mingw32. Include <winsock.h> for mingw32.
16934 (remote_close, remote_open): Adjust for Winsock support.
16935 * configure, config.in: Regenerated.
16937 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16939 * server.c (decode_xfer_read, write_qxfer_response): New.
16940 (handle_query): Take a packet length argument. Handle
16941 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16942 the qSupported response.
16943 (main): Update call to handle_query.
16945 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16947 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16948 (putpkt_binary): Renamed from putpkt and adjusted for binary
16950 (putpkt): New wrapper for putpkt_binary.
16951 (readchar): Don't mask off the high bit.
16952 (decode_X_packet): New function.
16953 * server.c (main): Call putpkt_binary if a handler sets the packet
16954 length. Save the length of the incoming packet. Handle 'X'.
16955 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16957 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16959 * server.c (handle_query): Handle qSupported.
16961 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16963 * remote-utils.c (all_symbols_looked_up): New variable.
16964 (look_up_one_symbol): Check it.
16965 * server.h (look_up_one_symbol): New declaration.
16966 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16968 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16970 * Makefile.in (linux-arm-low.o): Update dependencies.
16971 * linux-arm-low.c: Include "gdb_proc_service.h".
16972 (PTRACE_GET_THREAD_AREA): Define.
16973 (ps_get_thread_area): New function.
16975 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16977 * configure.srv (m68k*-*-uclinux*): New target.
16978 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16979 (linux_resume_one_process): Remove extraneous cast.
16980 (linux_read_offsets): New.
16981 (linux_target_op): Add linux_read_offsets on mmuless systems.
16982 * server.c (handle_query): Add qOffsets logic.
16983 * target.h (struct target_ops): Add read_offsets.
16985 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16987 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16988 (PTRACE_GET_THREAD_AREA): Define.
16989 (ps_get_thread_area): New function.
16990 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16991 (linux-x86-64-low.o): Update.
16993 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16995 * configure.ac: Remove checks for prfpregset_t.
16996 * gdb_proc_service.h: New file.
16997 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16998 new "gdb_proc_service.h".
16999 * proc-service.c: Likewise.
17000 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17001 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17002 * Makefile.in (gdb_proc_service_h): Updated.
17003 * configure, config.in: Regenerated.
17005 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17007 * remote-utils.c (prepare_resume_reply): Move declaration
17008 of gdb_id_from_wait to the top of the block.
17010 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17012 * linux-low.c (regsets_store_inferior_registers): Read the regset
17013 from the target before filling it.
17015 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17017 * server.c (attach_inferior): Return SIGTRAP for a successful
17020 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17022 * Makefile.in (OBS): Add version.o.
17023 (STAGESTUFF): Delete.
17024 (version.o): Add dependencies.
17025 (version.c): Replace rule.
17026 (clean): Remove version.c.
17027 * server.c (gdbserver_version): New.
17028 (gdbserver_usage): Use printf.
17029 (main): Handle --version and --help.
17030 * server.h (version, host_name): Add declarations.
17032 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17044 * linux-x86-64-low.c:
17046 * linux-s390-low.c:
17047 * linux-ppc64-low.c:
17049 * linux-mips-low.c:
17050 * linux-m68k-low.c:
17051 * linux-m32r-low.c:
17054 * linux-ia64-low.c:
17055 * linux-i386-low.c:
17056 * linux-crisv32-low.c:
17068 * gdbserver.1: Add (C) after Copyright. Update the FSF
17071 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17073 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17074 (arm_breakpoint_at): Recognize both breakpoints.
17075 (the_low_target): Use the correct breakpoint instruction.
17077 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17079 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17080 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17081 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17082 (the_low_target): Update.
17084 2005-10-25 Andreas Schwab <schwab@suse.de>
17086 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17088 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17089 (ia64_num_regs): Reduce to 462.
17091 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17093 * acinclude.m4: Correct quoting.
17094 * aclocal.m4: Regenerated.
17096 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17097 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17098 (thread_db_init): Call thread_db_err_str.
17099 * configure.ac: Check for TD_VERSION.
17100 * config.in, configure: Regenerated.
17102 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17104 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17106 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17108 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17109 is not available. Define HAVE_PTRACE_GETREGS if it is.
17110 * config.in, configure: Regenerated.
17111 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17112 * linux-i386-low.c, linux-m68k-low.c: Update to use
17113 HAVE_PTRACE_GETREGS.
17114 * linux-low.c (regsets_fetch_inferior_registers)
17115 (regsets_store_inferior_registers): Only return 0 if we processed
17117 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17118 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17120 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17122 * inferiors.c (struct thread_info): Add gdb_id.
17123 (add_thread): Add gdb_id argument.
17124 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17125 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17126 calls to add_thread.
17127 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17128 * server.c (handle_query): Use thread_to_gdb_id.
17129 (handle_v_cont, main): Use gdb_id_to_thread_id.
17130 * server.h (add_thread): Update prototype.
17131 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17134 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17136 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17137 left-padded registers.
17138 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17139 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17141 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17143 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17144 * configure: Regenerate.
17145 * config.in: Regenerate.
17146 * server.h (NEED_DECLARATION_STRERROR):
17147 Replace with !HAVE_DECL_STRERROR.
17149 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17151 * linux-low.c (linux_wait, linux_send_signal): Don't test
17152 an unsigned long variable for > 0 if it could be MAX_ULONG.
17153 * server.c (myresume): Likewise.
17154 * target.c (set_desired_inferior): Likewise.
17156 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17158 * configure.ac: Simplify and improve check for socklen_t.
17159 * configure, config.in: Regenerate.
17161 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17163 * acconfig.h: Remove.
17164 * configure.ac: Add a test for socklen_t. Use three-argument
17165 AC_DEFINE throughout.
17166 * config.in: Regenerated using autoheader 2.59.
17167 * configure: Regenerated.
17169 * gdbreplay.c (socklen_t): Provide a default.
17170 (remote_open): Use socklen_t.
17171 * remote-utils.c (socklen_t): Provide a default.
17172 (remote_open): Use socklen_t.
17173 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17176 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17178 * linux-low.c (linux_read_memory, linux_write_memory)
17179 (linux_read_auxv): Likewise.
17180 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17181 (check_mem_write): Likewise.
17182 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17184 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17185 (registers_from_string, register_data): Likewise.
17186 * server.c (handle_query, main): Likewise.
17187 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17188 (decode_M_packet): Likewise.
17189 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17190 * target.h (struct target_ops): Update read_memory, write_memory,
17192 (read_inferior_memory, write_inferior_memory): Update.
17193 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17194 to unsigned char *.
17195 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17196 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17197 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17198 linux-s390-low.c, linux-sh-low.c: Update for changes in
17199 read_inferior_memory and the_low_target->breakpoint.
17201 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17203 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17204 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17205 * configure.srv: Add powerpc64-*-linux*.
17206 * linux-ppc64-low.c: New file.
17208 2005-05-23 Orjan Friberg <orjanf@axis.com>
17210 * linux-cris-low.c: New file with support for CRIS.
17211 * linux-crisv32-low.c: Ditto for CRISv32.
17212 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17213 (clean): Add reg-cris.c and reg-crisv32.c.
17214 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17215 reg-crisv32.o, and reg-crisv32.c to make rules.
17216 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17217 recognized targets.
17219 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17221 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17222 of sizeof (PTRACE_XFER_TYPE).
17223 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17225 2005-05-12 Orjan Friberg <orjanf@axis.com>
17227 * target.h (struct target_ops): Add insert_watchpoint,
17228 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17229 pointers for hardware watchpoint support.
17230 * linux-low.h (struct linux_target_ops): Ditto.
17231 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17232 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17233 to linux_target_ops.
17234 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17236 * server.c (main): Recognize 'Z' and 'z' packets.
17238 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17240 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17241 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17242 (the_low_target): Add new members.
17244 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17246 * proc-service.c (ps_lgetregs): Search all_processes instead of
17249 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17251 * server.c (start_inferior): Change return type to int.
17252 (attach_inferior): Change sigptr to int *.
17253 (handle_v_cont, handle_v_requests): Change signal to int *.
17254 (main): Change signal to int.
17256 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17258 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17259 * configure.srv: Add m32r*-*-linux*.
17260 * linux-m32r-low.c: New file.
17262 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17264 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17266 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17268 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17269 Take unsigned long arguments for PIDs.
17270 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17271 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17272 (wait_for_sigstop, linux_resume_one_process)
17273 (regsets_fetch_inferior_registers, linux_send_signal)
17274 (linux_read_auxv): Likewise. Update the types of variables holding
17275 PIDs. Update format string specifiers.
17276 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17277 * remote-utils.c (prepare_resume_reply): Likewise.
17278 * server.c (cont_thread, general_thread, step_thread)
17279 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17281 (handle_query): Update format specifiers.
17282 (handle_v_cont, main): Use strtoul for thread IDs.
17283 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17284 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17285 (general_thread, step_thread, thread_from_wait)
17286 (old_thread_from_wait): Update.
17287 * target.h (struct thread_resume): Use unsigned long for THREAD.
17288 (struct target_ops): Use unsigned long for arguments to attach and
17291 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17293 * acinclude.m4: Include bfd/bfd.m4 directly.
17294 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17295 <agriffis@toolchain.org>.
17296 * aclocal.m4, configure: Regenerated.
17298 2005-01-07 Andrew Cagney <cagney@gnu.org>
17300 * configure.ac: Rename configure.in, require autoconf 2.59.
17301 * configure: Re-generate.
17303 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17305 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17306 LIBS when finished.
17307 * aclocal.m4: Regenerated.
17308 * configure: Regenerated.
17310 2004-11-21 Andreas Schwab <schwab@suse.de>
17312 * linux-m68k-low.c (m68k_num_gregs): Define.
17313 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17314 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17315 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17316 (m68k_breakpoint_at): New. Add to the_low_target.
17318 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17319 srv_linux_thread_db to yes.
17321 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17323 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17324 (ARCH_SET_FS): Likewise.
17325 (ARCH_GET_FS): Likewise.
17326 (ARCH_GET_GS): Likewise.
17328 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17330 * linux-i386-low.c (ps_get_thread_area): New.
17331 * linux-x86-64-low.c (ps_get_thread_area): New.
17332 * linux-low.c: Include <sys/syscall.h>.
17333 (linux_kill_one_process): Don't kill the first thread here.
17334 (linux_kill): Kill the first thread here.
17335 (kill_lwp): New function.
17336 (send_sigstop, linux_send_signal): Use it.
17337 * proc-service.c: Clean up #ifdefs.
17338 (fpregset_info): Delete.
17339 (ps_lgetregs): Update and enable implementation.
17340 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17342 * remote-utils.c (struct sym_cache, symbol_cache): New.
17343 (input_interrupt): Print a clearer message.
17344 (async_io_enabled): New variable.
17345 (enable_async_io, disable_async_io): Use it. Update comments.
17346 (look_up_one_symbol): Use the symbol cache.
17347 * thread-db.c (thread_db_look_up_symbols): New function.
17348 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17350 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17352 * configure.in: Test for -rdynamic.
17353 * configure: Regenerated.
17354 * Makefile (INTERNAL_LDFLAGS): New.
17355 (gdbserver, gdbreplay): Use it.
17357 2004-09-02 Andrew Cagney <cagney@gnu.org>
17359 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17361 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17363 * linux-low.c (linux_wait): Clear all_processes list also.
17365 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17367 * linux-low.c: Include <errno.h>. Remove extern declaration of
17370 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17372 * gdbreplay.c, server.h, utils.c: Update copyright years.
17374 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17376 * server.c (main): Print child status or termination signal from
17377 variable 'signal', not 'sig'.
17379 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17381 * linux-low.c (linux_read_memory): Change return type to
17382 int. Check for and return error from ptrace().
17383 * target.c (read_inferior_memory): Change return type to int. Pass
17384 back return status from the_target->read_memory().
17385 * target.h (struct target_ops): Adapt *read_memory() prototype.
17387 (read_inferior_memory): Adapt prototype.
17388 * server.c (main): Return an error packet if
17389 read_inferior_memory() returns an error.
17391 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17393 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17394 Unify with other clean targets.
17396 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17398 * server.c (handle_v_cont): Call set_desired_inferior.
17400 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17402 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17404 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17406 * linux-low.c (linux_wait): Unblock async I/O.
17407 (linux_resume): Block and enable async I/O.
17408 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17409 * server.h (block_async_io, unblock_async_io): Add prototypes.
17411 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17413 * remote-utils.c (remote_open): Print a status notice after
17414 opening a TCP port.
17415 * server.c (attach_inferior): Print a status notice after
17418 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17420 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17422 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17424 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17426 * server.c, target.h: Update copyright years.
17428 2004-02-25 Roland McGrath <roland@redhat.com>
17430 * target.h (struct target_ops): New member `read_auxv'.
17431 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17432 * linux-low.c (linux_read_auxv): New function.
17433 (linux_target_ops): Initialize `read_auxv' member to that.
17435 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17437 Committed by Jim Blandy <jimb@redhat.com>.
17439 * linux-s390-low.c (s390_num_regs): Update.
17440 (s390_regmap): Remove control registers. Use __s390x__ predefine
17441 instead of GPR_SIZE to distiguish s390 and s390x targets.
17443 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17445 * linux-low.c: Update copyright year.
17446 (check_removed_breakpoint): Clear pending_is_breakpoint.
17447 (linux_set_resume_request, linux_queue_one_thread)
17448 (resume_status_pending_p): New functions.
17449 (linux_continue_one_thread): Use process->resume.
17450 (linux_resume): Only resume threads if there are no pending events.
17451 * linux-low.h (struct process_info): Add resume request
17454 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17456 * regcache.c (new_register_cache): Clear the allocated register
17457 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17459 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17461 * linux-low.c (linux_resume): Take a struct thread_resume *
17463 (linux_wait): Update call.
17464 (resume_ptr): New static variable.
17465 (linux_continue_one_thread): Renamed from
17466 linux_continue_one_process. Use resume_ptr.
17467 (linux_resume): Use linux_continue_one_thread.
17468 * server.c (handle_v_cont, handle_v_requests): New functions.
17469 (myresume): New function.
17470 (main): Handle 'v' case.
17471 * target.h (struct thread_resume): New type.
17472 (struct target_ops): Change argument of "resume" to struct
17474 (myresume): Delete macro.
17476 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17478 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17479 (uninstall): Support DESTDIR.
17481 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17483 * configure.srv: Add xscale*linux copy of arm*linux entry.
17485 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17487 * linux-arm-low.c (arm_reinsert_addr): New function.
17488 (the_low_target): Add arm_reinsert_addr.
17490 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17492 * mem-break.c: Remove whitespace at end of file.
17494 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17496 * configure.in: Check whether we need to prototype strerror.
17497 * server.h: Optionally prototype strerror.
17498 * gdbreplay.c (perror_with_name): Use strerror.
17499 * linux-low.c (linux_attach_lwp): Use strerror.
17500 * utils.c (perror_with_name): Use strerror.
17501 * config.in, configure: Regenerated.
17503 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17505 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17506 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17508 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17510 * Makefile.in (SFILES): Update.
17511 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17512 low-sun3.c: Remove files.
17514 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17516 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17517 (linux_detach_one_process, linux_detach): New functions.
17518 (linux_target_ops): Add linux_detach.
17519 * server.c (main): Handle 'D' packet.
17520 * target.h (struct target_ops): Add "detach" member.
17521 (detach_inferior): Define.
17523 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17525 From Kelley Cook <kelleycook@wideopenwest.com>:
17526 * configure.srv: Accept i[34567]86 variants.
17528 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17530 * linux-low.c (linux_wait_for_event): Correct comment typos.
17531 (linux_resume_one_process): Call check_removed_breakpoint.
17532 (linux_send_signal): New function.
17533 (linux_target_ops): Add linux_send_signal.
17534 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17536 * target.h (struct target_ops): Add send_signal.
17538 2003-05-29 Jim Blandy <jimb@redhat.com>
17540 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17541 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17542 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17543 away part of the register's value.
17545 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17547 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17548 (linux_wait_for_event, linux_init_signals): Likewise.
17550 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17552 * configure.in: Check for stdlib.h.
17553 * configure: Regenerated.
17554 * config.in: Regenerated.
17556 2003-01-04 Andreas Schwab <schwab@suse.de>
17558 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17560 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17562 * Makefile.in: Remove obsolete code.
17564 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17566 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17567 defined(PT_FPR0_HI).
17569 2002-11-17 Stuart Hughes <seh@zee2.com>
17571 * linux-arm-low.c (arm_num_regs): Increase.
17572 (arm_regmap): Include status register.
17574 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17576 * linux-low.c (register_addr): Remove incorrect -1 check.
17578 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17580 * linux-low.c (linux_create_inferior): Call setpgid. Return
17582 (unstopped_p, linux_signal_pid): Remove.
17583 (linux_target_ops): Remove linux_signal_pid.
17584 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17585 global instead of target method.
17586 * target.h (struct target_ops): Remove signal_pid. Update comment
17587 for create_inferior.
17588 * server.c (signal_pid): New variable.
17589 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17590 gdbserver. Set the child to be the foreground process group.
17591 (attach_inferior): Set signal_pid.
17593 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17595 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17597 2002-08-20 Jim Blandy <jimb@redhat.com>
17599 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17602 2002-08-01 Andrew Cagney <cagney@redhat.com>
17604 * Makefile.in: Make chill references obsolete.
17606 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17608 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17609 * configure: Regenerate.
17610 * config.in: Regenerate.
17612 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17614 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17615 (perror_with_name, remote_close, remote_open, expect, play): Static.
17617 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17619 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17620 byte offsets instead of an array of indexes.
17621 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17623 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17625 * regcache.c: Add comment.
17627 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17629 * thread-db.c: New file.
17630 * proc-service.c: New file.
17631 * acinclude.m4: New file.
17632 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17633 proc-service.o, and thread-db.o.
17634 (linux-low.o): Add USE_THREAD_DB.
17635 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17636 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17637 * aclocal.m4: Regenerated.
17638 * config.in: Regenerated.
17639 * configure: Regenerated.
17640 * configure.in: Check for proc_service.h, sys/procfs.h,
17641 thread_db.h, and linux/elf.h headrs.
17642 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17643 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17644 Check for -lthread_db and thread support.
17645 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17646 PowerPC, and SuperH.
17647 * i387-fp.c: Constify arguments.
17648 * i387-fp.h: Likewise.
17649 * inferiors.c: (struct thread_info): Renamed from
17650 `struct inferior_info'. Remove PID member. Use generic inferior
17651 list header. All uses updated.
17652 (inferiors, signal_pid): Removed.
17653 (all_threads): New variable.
17654 (get_thread): Define.
17655 (add_inferior_to_list): New function.
17656 (for_each_inferior): New function.
17657 (change_inferior_id): New function.
17658 (add_inferior): Removed.
17659 (remove_inferior): New function.
17660 (add_thread): New function.
17661 (free_one_thread): New function.
17662 (remove_thread): New function.
17663 (clear_inferiors): Use for_each_inferior and free_one_thread.
17664 (find_inferior): New function.
17665 (find_inferior_id): New function.
17666 (inferior_target_data): Update argument type.
17667 (set_inferior_target_data): Likewise.
17668 (inferior_regcache_data): Likewise.
17669 (set_inferior_regcache_data): Likewise.
17670 * linux-low.c (linux_bp_reinsert): Remove.
17671 (all_processes, stopping_threads, using_thrads)
17672 (struct pending_signals, debug_threads, pid_of): New.
17673 (inferior_pid): Replace with macro.
17674 (struct inferior_linux_data): Remove.
17675 (get_stop_pc, add_process): New functions.
17676 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17677 Use add_process and add_thread.
17678 (linux_attach_lwp): New function, based on old linux_attach. Use
17679 add_process and add_thread. Set stop_expected for new threads.
17680 (linux_attach): New function.
17681 (linux_kill_one_process): New function.
17682 (linux_kill): Kill all LWPs.
17683 (linux_thread_alive): Use find_inferior_id.
17684 (check_removed_breakpoints, status_pending_p): New functions.
17685 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17686 Update. Use WNOHANG. Wait for cloned processes also. Update process
17687 struct for the found process.
17688 (linux_wait_for_event): New function.
17689 (linux_wait): Use it. Support LWPs.
17690 (send_sigstop, wait_for_sigstop, stop_all_processes)
17691 (linux_resume_one_process, linux_continue_one_process): New functions.
17692 (linux_resume): Support LWPs.
17693 (REGISTER_RAW_SIZE): Remove.
17694 (fetch_register): Use register_size instead. Call supply_register.
17695 (usr_store_inferior_registers): Likewise. Call collect_register.
17696 Fix recursive case.
17697 (regsets_fetch_inferior_registers): Improve error message.
17698 (regsets_store_inferior_registers): Add debugging.
17699 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17700 (unstopped_p, linux_signal_pid): New functions.
17701 (linux_target_ops): Add linux_signal_pid.
17702 (linux_init_signals): New function.
17703 (initialize_low): Call it. Initialize using_threads.
17704 * regcache.c (inferior_regcache_data): Add valid
17706 (get_regcache): Fetch registers lazily. Add fetch argument
17707 and update all callers.
17708 (regcache_invalidate_one, regcache_invalidate): New
17710 (new_register_cache): Renamed from create_register_cache.
17711 Return the new regcache.
17712 (free_register_cache): Change argument to a void *.
17713 (registers_to_string, registers_from_string): Call get_regcache
17714 with fetch flag set.
17715 (register_data): Make static. Pass fetch flag to get_regcache.
17716 (supply_register): Call get_regcache with fetch flag clear.
17717 (collect_register): Call get_regcache with fetch flag set.
17718 (collect_register_as_string): New function.
17719 * regcache.h: Update.
17720 * remote-utils.c (putpkt): Flush after debug output and use
17722 Handle input interrupts while waiting for an ACK.
17723 (input_interrupt): Use signal_pid method.
17724 (getpkt): Flush after debug output and use stderr.
17725 (outreg): Use collect_register_as_string.
17726 (new_thread_notify, dead_thread_notify): New functions.
17727 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17728 and general_thread.
17729 (look_up_one_symbol): Flush after debug output.
17730 * server.c (step_thread, server_waiting): New variables.
17731 (start_inferior): Don't use signal_pid. Update call to mywait.
17732 (attach_inferior): Update call to mywait.
17733 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17734 (main): Don't fetch/store registers explicitly. Use
17735 set_desired_inferior. Support proposed ``Hs'' packet. Update
17737 * server.h: Update.
17738 (struct inferior_list, struct_inferior_list_entry): New.
17739 * target.c (set_desired_inferior): New.
17740 (write_inferior_memory): Constify.
17741 (mywait): New function.
17742 * target.h: Update.
17743 (struct target_ops): New signal_pid method.
17744 (mywait): Removed macro, added prototype.
17746 * linux-low.h (regset_func): Removed.
17747 (regset_fill_func, regset_store_func): New.
17748 (enum regset_type): New.
17749 (struct regset_info): Add type field. Use new operation types.
17750 (struct linux_target_ops): stop_pc renamed to get_pc.
17751 Add decr_pc_after_break and breakpoint_at.
17752 (get_process, get_thread_proess, get_process_thread)
17753 (strut process_info, all_processes, linux_attach_lwp)
17754 (thread_db_init): New.
17756 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17757 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17758 (the_low_target): Add new members.
17759 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17760 (i386_store_fpxregset): Constify.
17761 (target_regsets): Add new kind identifier.
17762 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17763 (i386_set_pc): Add debugging.
17764 (i386_breakpoint_at): New function.
17765 (the_low_target): Add new members.
17766 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17767 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17768 (mips_breakpoint_at): New.
17769 (the_low_target): Add new members.
17770 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17771 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17772 (the_low_target): Add new members.
17773 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17774 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17775 (the_low_target): Add new members.
17776 * linux-x86-64-low.c (target_regsets): Add new kind
17779 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17781 From Martin Pool <mbp@samba.org>:
17782 * server.c (gdbserver_usage): New function.
17785 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17787 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17788 stop_at -> stop_pc.
17790 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17792 * Makefile.in: Remove obsolete code.
17794 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17796 * linux-low.c (regsets_fetch_inferior_registers),
17797 (regsets_store_inferior_registers): Removed cast to int from
17799 * regcache.h: Added declaration of struct inferior_info.
17801 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17803 * inferiors.c (struct inferior_info): Add regcache_data.
17804 (add_inferior): Call create_register_cache.
17805 (clear_inferiors): Call free_register_cache.
17806 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17807 * regcache.c (struct inferior_regcache_data): New.
17808 (registers): Remove.
17809 (get_regcache): New function.
17810 (create_register_cache, free_register_cache): New functions.
17811 (set_register_cache): Don't initialize the register cache here.
17812 (registers_to_string, registers_from_string, register_data): Call
17814 * regcache.h: Add prototypes.
17815 * server.h: Likewise.
17817 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17819 * mem-break.c: New file.
17820 * mem-break.h: New file.
17821 * Makefile.in: Add mem-break.o rule; update server.h
17823 * inferiors.c (struct inferior_info): Add target_data
17825 (clear_inferiors): Free target_data member if set.
17826 (inferior_target_data, set_inferior_target_data): New functions.
17827 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17828 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17829 * linux-low.c (linux_bp_reinsert): New variable.
17830 (struct inferior_linux_data): New.
17831 (linux_create_inferior): Use set_inferior_target_data.
17832 (linux_attach): Likewise. Call add_inferior.
17833 (linux_wait_for_one_inferior): New function.
17834 (linux_wait): Call it.
17835 (linux_write_memory): Add const.
17836 (initialize_low): Call set_breakpoint_data.
17837 * linux-low.h (struct linux_target_ops): Add breakpoint
17839 * server.c (attach_inferior): Remove extra add_inferior
17841 * server.h: Include mem-break.h. Update inferior.c
17843 * target.c (read_inferior_memory)
17844 (write_inferior_memory): New functions.
17845 * target.h (read_inferior_memory)
17846 (write_inferior_memory): Change macros to prototypes.
17847 (struct target_ops): Update comments. Add const to write_memory
17850 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17852 * linux-low.c (usr_store_inferior_registers): Support
17853 registers which are allowed to fail to store.
17854 * linux-low.h (linux_target_ops): Likewise.
17855 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17856 (ppc_cannot_store_register): FPSCR may not be storable.
17858 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17860 * server.h: Include <string.h> if HAVE_STRING_H.
17861 * ChangeLog: Correct paths in last ChangeLog entry.
17863 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17865 * linux-low.h: Remove obsolete prototypes.
17866 (struct linux_target_ops): New.
17867 (extern the_low_target): New.
17868 * linux-low.c (num_regs, regmap): Remove declarations.
17869 (register_addr): Use the_low_target explicitly.
17870 (fetch_register): Likewise.
17871 (usr_fetch_inferior_registers): Likewise.
17872 (usr_store_inferior_registers): Likewise.
17873 * linux-arm-low.c (num_regs): Remove.
17874 (arm_num_regs): Define.
17875 (arm_regmap): Renamed from regmap, made static.
17876 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17878 (arm_cannot_store_register): Renamed from cannot_store_register,
17880 (the_low_target): New.
17881 * linux-i386-low.c (num_regs): Remove.
17882 (i386_num_regs): Define.
17883 (i386_regmap): Renamed from regmap, made static.
17884 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17886 (i386_cannot_store_register): Renamed from cannot_store_register,
17888 (the_low_target): New.
17889 * linux-ia64-low.c (num_regs): Remove.
17890 (ia64_num_regs): Define.
17891 (ia64_regmap): Renamed from regmap, made static.
17892 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17894 (ia64_cannot_store_register): Renamed from cannot_store_register,
17896 (the_low_target): New.
17897 * linux-m68k-low.c (num_regs): Remove.
17898 (m68k_num_regs): Define.
17899 (m68k_regmap): Renamed from regmap, made static.
17900 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17902 (m68k_cannot_store_register): Renamed from cannot_store_register,
17904 (the_low_target): New.
17905 * linux-mips-low.c (num_regs): Remove.
17906 (mips_num_regs): Define.
17907 (mips_regmap): Renamed from regmap, made static.
17908 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17910 (mips_cannot_store_register): Renamed from cannot_store_register,
17912 (the_low_target): New.
17913 * linux-ppc-low.c (num_regs): Remove.
17914 (ppc_num_regs): Define.
17915 (ppc_regmap): Renamed from regmap, made static.
17916 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17918 (ppc_cannot_store_register): Renamed from cannot_store_register,
17920 (the_low_target): New.
17921 * linux-s390-low.c (num_regs): Remove.
17922 (s390_num_regs): Define.
17923 (s390_regmap): Renamed from regmap, made static.
17924 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17926 (s390_cannot_store_register): Renamed from cannot_store_register,
17928 (the_low_target): New.
17929 * linux-sh-low.c (num_regs): Remove.
17930 (sh_num_regs): Define.
17931 (sh_regmap): Renamed from regmap, made static.
17932 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17934 (sh_cannot_store_register): Renamed from cannot_store_register,
17936 (the_low_target): New.
17937 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17938 (the_low_target): New.
17940 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17942 * Makefile.in: Add stamp-h target.
17943 * configure.in: Create stamp-h.
17944 * configure: Regenerated.
17946 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17948 * inferiors.c: New file.
17949 * target.c: New file.
17950 * target.h: New file.
17951 * Makefile.in: Add target.o and inferiors.o. Update
17953 * linux-low.c (inferior_pid): New static variable,
17954 moved from server.c.
17955 (linux_create_inferior): Renamed from create_inferior.
17956 Call add_inferior. Return 0 on success instead of a PID.
17957 (linux_attach): Renamed from myattach.
17958 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17959 (linux_thread_alive): Renamed from mythread_alive.
17960 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17962 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17963 (regsets_store_inferior_registers): Correct error message.
17964 Add missing ``return 0''.
17965 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17966 (linux_store_registers): Renamed from store_inferior_registers.
17967 (linux_read_memory): Renamed from read_inferior_memory.
17968 (linux_write_memory): Renamed from write_inferior_memory.
17969 (linux_target_ops): New structure.
17970 (initialize_low): Call set_target_ops ().
17971 * remote-utils.c (unhexify): New function.
17972 (hexify): New function.
17973 (input_interrupt): Send signals to ``signal_pid''.
17974 * server.c (inferior_pid): Remove.
17975 (start_inferior): Update create_inferior call.
17976 (attach_inferior): Call add_inferior.
17977 (handle_query): New function.
17978 (main): Call handle_query for `q' packets.
17979 * server.h: Include "target.h". Remove obsolete prototypes.
17980 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17982 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17984 * Makefile.in: Add WARN_CFLAGS. Update configury
17986 * configure.in: Check for <string.h>
17987 * configure: Regenerate.
17988 * config.in: Regenerate.
17989 * gdbreplay.c: Include needed system headers.
17990 (remote_open): Remove strchr prototype.
17991 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17992 * regcache.c (supply_register): Change buf argument to const void *.
17993 (supply_register_by_name): Likewise.
17994 (collect_register): Change buf argument to void *.
17995 (collect_register_by_name): Likewise.
17996 * regcache.h: Add missing prototypes.
17997 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17998 * server.c (handle_query): New function.
17999 (attached): New static variable, moved out of main.
18000 (main): Quiet longjmp clobber warnings.
18001 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18002 * utils.c (error): Remove NORETURN.