1 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
3 * configure: Re-generate.
5 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
7 * configure: Re-generate.
9 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
11 * acinclude.m4: Update warning.m4 path.
13 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
15 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
16 (handle_exception): Set siginfo_er.
17 (win32_xfer_siginfo): New function.
19 2020-02-07 Tom Tromey <tom@tromey.com>
20 Pedro Alves <palves@redhat.com>
22 * README: Update build documentation.
23 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
25 * configure.ac: Update paths.
27 * acinclude.m4: Update paths.
28 * Makefile.in: Update include paths.
29 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
30 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
31 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
32 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
33 (%-generated.c): Update paths.
34 * Move entire directory from ../gdb/gdbserver.
36 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
38 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
40 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
42 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
43 assignment instead of srv_linux_obj.
45 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
47 * server.c (handle_qxfer_libraries): Write segment-address with
50 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
52 * Makefile.in (install-strip): New target.
53 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
54 * aclocal.m4: Regenerate.
55 * configure: Regenerate.
56 * configure.ac: Add AM_PROG_INSTALL_STRIP.
58 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
60 * Makefile.in (SFILES): Adjust paths to point to real files.
61 (OBS): Move waitstatus.o to target/waitstatus.o.
62 (TAGS): Transform paths appropriately.
64 (nat/%.o): ... this pattern rule.
66 (target/%.o): ... this pattern rule.
67 * configure.srv: Adjust paths throughout to include nat/ prefix
68 with the revant files.
69 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
70 * configure: Regenerate.
72 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
74 * Makefile.in (TAGS): Remove config files from the recipe.
76 2020-01-14 Tom Tromey <tom@tromey.com>
79 * configure.ac: Remove any checks that were added to common.m4.
80 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
83 2020-01-14 Tom Tromey <tom@tromey.com>
85 * server.h: Include config.h.
86 * gdbreplay.c: Include config.h.
88 * configure.ac: Don't source common.host.
89 * acinclude.m4: Update path.
90 * Makefile.in (INCSUPPORT): New variable.
91 (INCLUDE_CFLAGS): Add INCSUPPORT.
92 (SFILES): Update paths.
93 (version-generated.c): Update path to create-version.sh.
94 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
96 2020-01-14 Tom Tromey <tom@tromey.com>
98 * configure.ac (LIBS): Use WIN32APILIBS.
99 (USE_WIN32API): Don't define.
100 * configure: Rebuild.
102 2020-01-14 Tom Tromey <tom@tromey.com>
104 * configure: Rebuild.
106 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
108 * Makefile.in (%-generated.c): Remove rule for files from
111 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
113 * configure: Re-generate.
115 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
117 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
119 * tracepoint.c (stop_tracing, flush_trace_buffer,
120 about_to_request_buffer_space, get_trace_state_variable_value,
121 set_trace_state_variable_value, gdb_collect): Add declaration.
123 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
125 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
126 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
127 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
128 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
129 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
132 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
134 * inferiors.c: Include gdbsupport/common-inferior.h.
136 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
138 * hostio-errno.c: Include hostio.h.
140 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
142 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
145 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
147 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
148 * linux-arm-tdesc.h: Include arch/arm.h.
150 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
152 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
154 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
156 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
157 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
159 2020-01-10 Pedro Alves <palves@redhat.com>
161 * fork-child.c (post_fork_inferior): Pass target down to
163 * inferiors.c (switch_to_thread): Add process_stratum_target
165 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
166 * nto-low.c (nto_target_ops): Now a process_stratum_target.
167 * linux-low.c (linux_target_ops): Now a process_stratum_target.
168 * remote-utils.c (prepare_resume_reply): Pass the target to
170 * target.c (the_target): Now a process_stratum_target.
171 (done_accessing_memory): Pass the target to switch_to_thread.
172 (set_target_ops): Ajust to use process_stratum_target.
173 * target.h (struct target_ops): Rename to ...
174 (struct process_stratum_target): ... this.
175 (the_target, set_target_ops): Adjust.
176 (prepare_to_access_memory): Adjust comment.
177 * win32-low.c (child_xfer_memory): Adjust to use
178 process_stratum_target.
179 (win32_target_ops): Now a process_stratum_target.
181 2020-01-06 Eli Zaretskii <eliz@gnu.org>
182 Pedro Alves <palves@redhat.com>
184 * win32-low.c (get_child_debug_event): Extract the fatal exception
185 from the exit status and convert to the equivalent Posix signal
187 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
188 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
190 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
192 * Makefile.in: Use INSTALL_PROGRAM_ENV.
194 2020-01-01 Joel Brobecker <brobecker@adacore.com>
196 * server.c (gdbserver_version): Change copyright year to 2020.
197 * gdbreplay.c (gdbreplay_version): Likewise.
199 2019-12-19 Christian Biesinger <cbiesinger@google.com>
201 * configure: Regenerate.
202 * configure.ac: Quote variable arguments of test.
204 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
206 * Makefile.in: Fix build with GNU Make 3.81
208 2019-12-16 Tom Tromey <tromey@adacore.com>
210 * server.c (get_exec_file): Constify result.
212 2019-12-10 Christian Biesinger <cbiesinger@google.com>
214 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
215 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
216 * config.in: Regenerate.
217 * configure: Regenerate.
218 * configure.ac: Don't check for strerror.
219 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
220 Call safe_strerror instead of strerror.
221 * server.h (strerror): Remove this now-unnecessary declaration.
222 * tracepoint.c (init_named_socket): Call safe_strerror instead of
224 (gdb_agent_helper_thread): Likewise.
225 * utils.c (perror_with_name): Likewise.
227 2019-11-26 Tom Tromey <tom@tromey.com>
229 * configure, config.in: Rebuild.
231 2019-11-26 Tom Tromey <tom@tromey.com>
233 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
234 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
236 * configure, config.in: Rebuild.
238 2019-11-26 Tom Tromey <tom@tromey.com>
240 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
241 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
242 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
243 * acinclude.m4: Include ax_pthread.m4.
244 * config.in, configure: Rebuild.
246 2019-11-26 Christian Biesinger <cbiesinger@google.com>
248 * debug.c (debug_set_output): Call safe_strerror instead of
250 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
251 (linux_kill_one_lwp): Likewise.
252 (linux_detach_one_lwp): Likewise.
253 (linux_wait_for_event_filtered): Likewise.
254 (store_register): Likewise.
255 * lynx-low.c (lynx_attach): Likewise.
256 * mem-break.c (insert_memory_breakpoint): Likewise.
257 (remove_memory_breakpoint): Likewise.
258 (delete_fast_tracepoint_jump): Likewise.
259 (set_fast_tracepoint_jump): Likewise.
260 (uninsert_fast_tracepoint_jumps_at): Likewise.
261 (reinsert_fast_tracepoint_jumps_at): Likewise.
262 * nto-low.c (nto_xfer_memory): Likewise.
263 (nto_resume): Likewise.
265 2019-11-20 Luis Machado <luis.machado@linaro.org>
267 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
268 instead of register count.
269 * tdesc.c (tdesc_contains_feature): New function.
270 * tdesc.h (tdesc_contains_feature): New prototype.
272 2019-11-15 Christian Biesinger <cbiesinger@google.com>
274 * Makefile.in: Add safe-strerror.c.
275 * configure: Regenerate.
276 * configure.ac: Don't source common.host.
278 2019-11-15 Christian Biesinger <cbiesinger@google.com>
280 * config.in: Regenerate.
281 * configure: Regenerate.
283 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
285 * ax.c (ax_printf): Handle size_t_arg.
287 2019-11-06 Christian Biesinger <cbiesinger@google.com>
289 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
290 * mi/mi-main.c (output_cores): Likewise.
291 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
292 (linux_xfer_osdata_modules): Likewise.
293 * remote.c (register_remote_support_xml): Likewise.
294 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
295 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
297 2019-11-01 Christian Biesinger <cbiesinger@google.com>
299 * configure: Regenerate.
300 * configure.ac: Remove check for strerror_r.
302 2019-10-31 Christian Biesinger <cbiesinger@google.com>
304 * config.in: Regenerate.
305 * configure: Regenerate.
306 * configure.ac: Also check for strerror_r.
308 2019-10-31 Christian Biesinger <cbiesinger@google.com>
310 * ax.h (debug_agent): Remove duplicate declaration.
312 2019-10-26 Tom de Vries <tdevries@suse.de>
314 * linux-aarch64-low.c: Fix typos in comments.
315 * linux-arm-low.c: Same.
317 * linux-ppc-low.c: Same.
318 * proc-service.c: Same.
321 * tracepoint.c: Same.
324 2019-10-25 Tom Tromey <tromey@adacore.com>
326 * utils.c (xstrdup): Remove.
328 2019-10-23 Tom Tromey <tom@tromey.com>
330 * configure, config.in: Rebuild.
332 2019-10-23 Tom Tromey <tom@tromey.com>
334 * configure: Rebuild.
335 * acinclude.m4: Use m4_include, not sinclude.
337 2019-10-17 Tom Tromey <tromey@adacore.com>
339 * configure: Rebuild.
340 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
341 in AC_CONFIG_FILES invocation.
342 * Makefile.in (stamp-h, Makefile): Use new-style config.status
345 2019-10-16 Christian Biesinger <cbiesinger@google.com>
347 * server.c: Include xml-builtin.h.
348 (get_xml_features): Don't declare xml_builtins here.
350 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
352 * Makefile.in: Remove references to vec-ipa.o.
354 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
356 * Makefile.in: Remove references to vec.c.
358 2019-10-02 Christian Biesinger <cbiesinger@google.com>
360 * server.c (server_waiting): Change to bool.
361 (extended_protocol): Likewise.
362 (response_needed): Likewise.
363 (exit_requested): Likewise.
364 (run_once): Likewise.
365 (report_no_resumed): Likewise.
366 (non_stop): Likewise.
367 (disable_packet_vCont): Likewise.
368 (disable_packet_Tthread): Likewise.
369 (disable_packet_qC): Likewise.
370 (disable_packet_qfThreadInfo): Likewise.
371 (handle_general_set): Update.
372 (handle_detach): Update.
373 (handle_monitor_command): Update.
374 (handle_query): Update.
375 (captured_main): Update.
376 (process_serial_event): Update.
377 * server.h (server_waiting): Change to bool.
378 (disable_packet_vCont): Likewise.
379 (disable_packet_Tthread): Likewise.
380 (disable_packet_qC): Likewise.
381 (disable_packet_qfThreadInfo): Likewise.
382 (run_once): Likewise.
383 (non_stop): Likewise.
384 * target.c (target_stop_and_wait): Update.
386 2019-10-02 Tom Tromey <tromey@adacore.com>
388 * Makefile.in (SFILES): Add common-inferior.c.
389 (OBS): Add common-inferior.o.
390 * server.c (startup_with_shell): Don't define.
392 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
394 * linux-low.c (linux_low_read_btrace): Update for change to
397 2019-09-20 Christian Biesinger <cbiesinger@google.com>
399 * debug.c (debug_threads): Remove comment in favor of the header.
400 * debug.h (using_threads): Add declaration.
401 (debug_threads): Add comment.
402 * linux-aarch64-low.c: Include debug.h and remove declaration of
404 * nto-low.c: Likewise.
405 * remote-utils.c: Likewise.
406 * thread-db.c: Likewise.
408 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
410 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
411 and powerpc-cell64l-ipa.o.
412 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
413 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
414 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
417 * spu-low.c: Remove file.
419 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
420 (parse_spufs_run): Remove.
421 (ppc_get_pc): Remove Cell/B.E. support.
422 (ppc_set_pc): Likewise.
423 (ppc_breakpoint_at): Likewise.
424 (ppc_arch_setup): Likewise.
425 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
426 tdesc_powerpc_cell32l.
427 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
428 or init_registers_powerpc_cell32l.
429 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
430 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
431 or init_registers_powerpc_cell32l.
432 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
433 (init_registers_powerpc_cell32l): Remove prototype.
434 (init_registers_powerpc_cell64l): Likewise.
436 * target.h (struct target_ops): Remove qxfer_spu member.
437 * server.c (handle_qxfer_spu): Remove.
438 (qxfer_packets): Remove entry for "spu".
439 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
440 * linux-low.c (SPUFS_MAGIC): Remove.
441 (spu_enumerate_spu_ids): Remove.
442 (linux_qxfer_spu): Remove.
443 (linux_target_ops): Remove qxfer_spu member.
444 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
445 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
446 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
448 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
450 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
451 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
452 * config.in: Regenerate.
453 * configure: Regenerate.
455 2019-08-15 Tom Tromey <tromey@adacore.com>
457 * target.c (target_write_memory): Use gdb::byte_vector.
459 2019-08-15 Tom Tromey <tromey@adacore.com>
461 * tracepoint.c (write_inferior_data_pointer)
462 (write_inferior_integer, write_inferior_int8)
463 (write_inferior_uinteger, m_tracepoint_action_download)
464 (r_tracepoint_action_download, x_tracepoint_action_download)
465 (l_tracepoint_action_download, clear_inferior_trace_buffer)
466 (download_agent_expr, download_tracepoint_1)
467 (download_trace_state_variables, upload_fast_traceframes): Update.
468 * server.c (gdb_write_memory): Update.
469 * remote-utils.c (relocate_instruction): Update.
470 * proc-service.c (ps_pdwrite): Update.
471 * mem-break.c (remove_memory_breakpoint)
472 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
473 (uninsert_fast_tracepoint_jumps_at)
474 (reinsert_fast_tracepoint_jumps_at): Update.
475 * linux-x86-low.c (append_insns)
476 (i386_install_fast_tracepoint_jump_pad)
477 (amd64_write_goto_address, i386_write_goto_address): Update.
478 * linux-s390-low.c (append_insns, s390_write_goto_address):
480 * linux-ppc-low.c (ppc_relocate_instruction)
481 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
482 (ppc_write_goto_address): Update.
483 * linux-aarch64-low.c (append_insns): Update.
484 * target.h (struct target_ops): Update.
485 (write_inferior_memory): Don't declare.
486 * target.c (target_write_memory): Rename from
487 write_inferior_memory. Remove old target_write_memory.
489 2019-08-15 Tom Tromey <tromey@adacore.com>
491 * target.c (write_inferior_memory): Use std::vector.
493 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
496 * configure.ac: Drop enable-libmcheck support.
497 * configure, config.in: Rebuild.
498 * acinclude.m4: Don't include it.
500 2019-07-19 Alan Hayward <alan.hayward@arm.com>
502 * configure.srv: Remove Arm xml files.
504 2019-07-19 Alan Hayward <alan.hayward@arm.com>
506 * configure.srv: Add new files. Remove xml generated files.
507 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
509 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
510 * linux-aarch32-tdesc.c: New file.
511 * linux-aarch32-tdesc.h: New file.
512 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
513 * linux-arm-low.c (init_registers_arm, tdesc_arm)
514 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
515 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
516 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
517 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
518 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
519 (arm_read_description): Call arm_linux_read_description.
520 (initialize_low_arch): Don't init registers.
521 * linux-arm-tdesc.c: New file.
522 * linux-arm-tdesc.h: New file.
524 2019-07-10 Alan Hayward <alan.hayward@arm.com>
526 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
527 Move counter inside for.
528 (arm_read_description): Check ptrace earlier.
529 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
531 2019-07-09 Tom Tromey <tom@tromey.com>
533 * configure: Rebuild.
534 * configure.ac: Change common to gdbsupport.
535 * acinclude.m4: Change common to gdbsupport.
536 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
537 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
538 common to gdbsupport.
539 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
540 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
541 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
542 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
543 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
544 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
545 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
546 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
547 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
548 common to gdbsupport.
550 2019-07-04 Alan Hayward <alan.hayward@arm.com>
552 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
554 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
556 2019-07-04 Alan Hayward <alan.hayward@arm.com>
558 * configure.srv: Remove legacy xml.
559 * linux-aarch64-low.c (initialize_low_arch): Remove
560 initialize_low_tdesc call.
561 * linux-aarch64-tdesc-selftest.c: Remove file.
562 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
563 * linux-x86-low.c (initialize_low_arch): Remove
564 initialize_low_tdesc call.
565 * linux-x86-tdesc-selftest.c: Remove file.
566 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
568 2019-06-20 Tom de Vries <tdevries@suse.de>
570 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
571 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
573 2019-06-19 Tom de Vries <tdevries@suse.de>
575 * debug.h (debug_write): Change return type to ssize_t.
576 * debug.c (debug_write): Same.
578 2019-06-14 Tom Tromey <tom@tromey.com>
580 * configure.ac: Use new path to gnulib.
581 * configure: Rebuild.
582 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
585 2019-06-11 Tom Tromey <tom@tromey.com>
587 * Makefile.in (SFILES): Add alloc.c.
589 (IPA_OBJS): Add alloc-ipa.o.
590 (alloc-ipa.o): New target.
591 (%.o: ../%.c): New pattern rule.
593 2019-06-10 Tom Tromey <tromey@adacore.com>
595 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
596 end warning with a newline.
597 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
599 * thread-db.c (attach_thread): Don't end warning with a newline.
600 (thread_db_notice_clone): Likewise.
601 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
603 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
604 end warning with a newline.
606 2019-06-04 Pedro Alves <palves@redhat.com>
608 * server.c (captured_main): Use make_unique_xstrdup.
610 2019-06-02 Tom Tromey <tom@tromey.com>
612 * gdbreplay.c (fromhex): Remove.
613 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
615 2019-05-29 Tom Tromey <tromey@adacore.com>
617 * configure: Rebuild.
619 2019-05-06 Kevin Buettner <kevinb@redhat.com>
621 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
622 sign extension code on 32-bit builds.
624 2019-05-03 Eli Zaretskii <eliz@gnu.org>
627 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
629 2019-04-19 Tom Tromey <tom@tromey.com>
631 * server.c (struct vstop_notif): Derive from notif_event.
633 (queue_stop_reply): Update.
634 (remove_all_on_match_ptid): Change type. Rewrite.
635 (discard_queued_stop_replies): Rewrite.
636 (in_queued_stop_replies_ptid): Change type.
637 (in_queued_stop_replies): Rewrite.
638 (notif_stop): Update.
639 (queue_stop_reply_callback): Update.
640 (captured_main): Don't call initialize_notif.
641 (push_stop_notification): Update.
642 * notif.c (notif_write_event, handle_notif_ack)
643 (notif_event_enque, notif_push): Update.
644 (notif_event_xfree, initialize_notif): Remove.
645 * notif.h (struct notif_event): Include <list>, not
647 (struct notif_server) <queue>: Now a std::list.
648 (notif_event_p): Remove typedef.
649 (initialize_notif): Don't declare.
650 (struct notif_event): Add virtual destructor.
652 2019-04-17 Alan Hayward <alan.hayward@arm.com>
654 * ax.c (ax_vdebug): Call debug_printf.
655 * debug.c (debug_write): New function.
656 * debug.h (debug_write): New declaration.
657 * linux-low.c (sigchld_handler): Call debug_write.
659 2019-04-17 Alan Hayward <alan.hayward@arm.com>
661 * debug.c (debug_set_output): New function.
662 (debug_vprintf): Send output to debug_file.
663 (debug_flush): Likewise.
664 * debug.h (debug_set_output): New declaration.
665 * server.c (handle_monitor_command): Add debug-file option.
666 (captured_main): Likewise.
668 2019-04-17 Alan Hayward <alan.hayward@arm.com>
670 * debug.c (remote_debug): Add definition.
671 * debug.h (remote_debug): Add declaration.
672 * hostio.c (remote_debug): Remove declaration.
673 * remote-utils.c (struct ui_file): Likewise.
674 (remote_debug): Likewise.
675 * remote-utils.h (remote_debug): Likewise,
676 * server.c (remote_debug): Remove definition.
678 2019-04-10 Kevin Buettner <kevinb@redhat.com>
680 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
681 when using a 64-bit gdbserver.
683 2019-04-09 Tom Tromey <tromey@adacore.com>
685 * linux-low.c (select_event_lwp): Use find_thread_in_random.
687 2019-04-08 Tom Tromey <tom@tromey.com>
689 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
691 (linux_resume_one_lwp): Likewise.
693 2019-04-08 Tom Tromey <tom@tromey.com>
695 * gdbreplay.c: Update.
696 * linux-low.c: Update.
699 2019-04-08 Tom Tromey <tom@tromey.com>
701 * server.c: Use C++ exception handling.
702 * linux-low.c: Use C++ exception handling.
703 * gdbreplay.c: Use C++ exception handling.
705 2019-04-08 Tom Tromey <tom@tromey.com>
707 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
708 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
709 (captured_main, main): Update.
710 * gdbreplay.c (main): Update.
712 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
714 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
715 value in argument pointer, return 1 if the entry is found and 0
716 otherwise. Move comment.
717 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
718 * linux-low.h (linux_get_auxv): Declare.
719 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
721 2019-04-05 Tom Tromey <tromey@adacore.com>
723 * server.c (gdbserver_usage): Use upper-case for metasyntactic
726 2019-03-28 Alan Hayward <alan.hayward@arm.com>
728 * linux-low.c (AT_HWCAP2): Add define if not already included.
730 2019-03-26 Alan Hayward <alan.hayward@arm.com>
732 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
733 (aarch64_arch_setup): Call linux_get_hwcap.
734 * linux-arm-low.c (arm_get_hwcap): Remove function.
735 (arm_read_description): Call linux_get_hwcap.
736 * linux-low.c (linux_get_auxv): New function.
737 (linux_get_hwcap): Likewise.
738 (linux_get_hwcap2): Likewise.
739 * linux-low.h (linux_get_hwcap): New declaration.
740 (linux_get_hwcap2): Likewise.
741 * linux-ppc-low.c (ppc_get_auxv): Remove function.
742 (ppc_arch_setup): Call linux_get_hwcap.
743 * linux-s390-low.c (s390_get_hwcap): Remove function.
744 (s390_arch_setup): Call linux_get_hwcap.
746 2019-03-22 Alan Hayward <alan.hayward@arm.com>
747 Jiong Wang <jiong.wang@arm.com>
749 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
750 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
752 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
754 2019-03-22 Alan Hayward <alan.hayward@arm.com>
755 Jiong Wang <jiong.wang@arm.com>
757 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
758 (aarch64_get_hwcap): New function.
759 (aarch64_arch_setup): Read APIA hwcap.
761 2019-03-22 Alan Hayward <alan.hayward@arm.com>
762 Jiong Wang <jiong.wang@arm.com>
764 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
765 (initialize_low_tracepoint): Likewise.
766 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
767 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
768 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
769 (aarch64_linux_read_description): Likewise.
770 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
772 2019-03-12 John Baldwin <jhb@FreeBSD.org>
774 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
775 i386_create_target_description for 'segments' parameter.
776 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
777 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
778 * win32-i386-low.c (i386_arch_setup): Likewise.
780 2019-03-12 Tom Tromey <tromey@adacore.com>
782 * linux-low.c (iterate_over_lwps): Update.
784 2019-03-06 Tom Tromey <tom@tromey.com>
786 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
787 (captured_main): Use SCOPE_EXIT.
789 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
791 * configure.srv: Use '$enable_unittest' instead of '$development'
792 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
795 2019-02-27 Tom Tromey <tromey@adacore.com>
797 * gdbreplay.c (logchar): Handle \r\n.
799 2019-02-07 Alan Hayward <alan.hayward@arm.com>
801 * linux-low.c (linux_attach): Add process before lwp.
802 * server.c (attach_inferior): Check if already attached.
804 2019-02-07 Tom Tromey <tom@tromey.com>
806 * x86-tdesc.h: Rename include guard.
807 * x86-low.h: Add include guard.
808 * wincecompat.h: Rename include guard.
809 * win32-low.h: Add include guard.
810 * utils.h: Rename include guard.
811 * tracepoint.h: Rename include guard.
812 * tdesc.h: Rename include guard.
813 * target.h: Rename include guard.
814 * server.h: Rename include guard.
815 * remote-utils.h: Rename include guard.
816 * regcache.h: Rename include guard.
817 * nto-low.h: Rename include guard.
818 * notif.h: Add include guard.
819 * mem-break.h: Rename include guard.
820 * lynx-low.h: Add include guard.
821 * linux-x86-tdesc.h: Add include guard.
822 * linux-s390-tdesc.h: Add include guard.
823 * linux-ppc-tdesc-init.h: Add include guard.
824 * linux-low.h: Add include guard.
825 * linux-aarch64-tdesc.h: Add include guard.
826 * linux-aarch32-low.h: Add include guard.
827 * inferiors.h: Rename include guard.
828 * i387-fp.h: Rename include guard.
829 * hostio.h: Rename include guard.
830 * gdbthread.h: Rename include guard.
831 * gdb_proc_service.h: Rename include guard.
832 * event-loop.h: Rename include guard.
833 * dll.h: Rename include guard.
834 * debug.h: Rename include guard.
835 * ax.h: Rename include guard.
837 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
840 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
841 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
843 2019-01-25 Tom Tromey <tom@tromey.com>
845 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
847 2019-01-25 Tom Tromey <tom@tromey.com>
849 * win32-low.c: Fix common/ includes.
850 * win32-i386-low.c: Fix common/ includes.
851 * tracepoint.c: Fix common/ includes.
852 * thread-db.c: Fix common/ includes.
853 * target.h: Fix common/ includes.
854 * symbol.c: Fix common/ includes.
855 * spu-low.c: Fix common/ includes.
856 * server.h: Fix common/ includes.
857 * server.c: Fix common/ includes.
858 * remote-utils.c: Fix common/ includes.
859 * regcache.h: Fix common/ includes.
860 * regcache.c: Fix common/ includes.
861 * nto-x86-low.c: Fix common/ includes.
862 * notif.h: Fix common/ includes.
863 * mem-break.h: Fix common/ includes.
864 * lynx-low.c: Fix common/ includes.
865 * lynx-i386-low.c: Fix common/ includes.
866 * linux-x86-tdesc-selftest.c: Fix common/ includes.
867 * linux-x86-low.c: Fix common/ includes.
868 * linux-low.c: Fix common/ includes.
869 * inferiors.h: Fix common/ includes.
870 * i387-fp.c: Fix common/ includes.
871 * hostio.c: Fix common/ includes.
872 * hostio-errno.c: Fix common/ includes.
873 * gdbthread.h: Fix common/ includes.
874 * gdbreplay.c: Fix common/ includes.
875 * fork-child.c: Fix common/ includes.
876 * event-loop.c: Fix common/ includes.
878 (enum gdb_agent_op): Fix common/ includes.
880 2019-01-21 Tom Tromey <tom@tromey.com>
882 * tracepoint.c: Fix includes.
883 * remote-utils.c: Fix includes.
884 * linux-x86-low.c: Fix includes.
886 2019-01-01 Joel Brobecker <brobecker@adacore.com>
888 * gdbreplay.c (gdbreplay_version): Update copyright year in
890 * server.c (gdbserver_version): Likewise.
892 2018-12-05 Alan Hayward <alan.hayward@arm.com>
894 * linux-low.c (add_lwp): Switch ordering.
896 2018-11-29 Tom Tromey <tom@tromey.com>
898 * win32-low.c (win32_join): Take pid, not process.
899 * target.h (struct target_ops) <join>: Change argument type.
900 (join_inferior): Change argument name.
901 * spu-low.c (spu_join): Take pid, not process.
902 * server.c (handle_detach): Preserve pid before destroying
904 * lynx-low.c (lynx_join): Take pid, not process.
905 * linux-low.c (linux_join): Take pid, not process.
907 2018-11-23 Alan Hayward <alan.hayward@arm.com>
909 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
910 (aarch64_cannot_fetch_register): Likewise.
911 (struct linux_target_ops): Update references.
913 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
915 * linux-ppc-low.c: Include nat/linux-ptrace.h.
917 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
919 * configure.srv (ipa_ppc_linux_regobj): Add
920 powerpc-isa207-htm-vsx32l-ipa.o and
921 powerpc-isa207-htm-vsx64l-ipa.o.
922 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
923 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
924 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
925 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
926 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
927 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
928 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
929 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
930 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
931 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
932 (init_registers_powerpc_isa207_htm_vsx32l)
933 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
934 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
935 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
936 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
937 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
938 (ppc_store_tm_ctarregset): New functions.
939 (ppc_regsets): Add entries for HTM regsets.
940 (ppc_arch_setup): Set htm in features struct when needed. Set
941 sizes for the HTM regsets.
942 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
943 (initialize_low_arch): Call
944 init_registers_powerpc_isa207_htm_vsx32l and
945 init_registers_powerpc_isa207_htm_vsx64l.
946 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
947 PPC_TDESC_ISA207_HTM_VSX.
948 (initialize_low_tracepoint): Call
949 init_registers_powerpc_isa207_htm_vsx32l and
950 init_registers_powerpc_isa207_htm_vsx64l.
952 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
954 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
955 rs6000/power-linux-pmu.xml to srv_xmlfiles.
956 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
957 (ppc_store_pmuregset): New functions.
958 (ppc_regsets): Add entries for ebb and pmu regsets.
959 (ppc_arch_setup): Set isa207 in features struct if the ebb and
960 pmu regsets are available. Set sizes for these regsets.
962 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
964 * configure.srv (ipa_ppc_linux_regobj): Add
965 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
966 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
967 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
968 rs6000/powerpc-isa207-vsx32l.xml, and
969 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
970 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
971 <PPC_TDESC_ISA207_VSX>: New enum value.
972 (init_registers_powerpc_isa207_vsx32l): Declare.
973 (init_registers_powerpc_isa207_vsx64l): Declare.
974 * linux-ppc-low.c (ppc_fill_tarregset): New function.
975 (ppc_store_tarregset): New function.
976 (ppc_regsets): Add entry for the TAR regset.
977 (ppc_arch_setup): Set isa207 in features struct when needed. Set
978 size for the TAR regsets.
979 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
980 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
981 and init_registers_powerpc_isa207_vsx64l.
982 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
983 (initialize_low_tracepoint): Call
984 init_registers_powerpc_isa207_vsx32l and
985 init_registers_powerpc_isa207_vsx64l.
987 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
988 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
990 * configure.srv (ipa_ppc_linux_regobj): Add
991 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
992 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
993 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
994 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
995 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
996 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
997 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
998 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
999 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1000 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1001 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1002 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1003 (ppc_hwcap): Add comment.
1004 (ppc_hwcap2): New global.
1005 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1006 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1007 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1008 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1009 when needed. Set sizes for the the DSCR and PPR regsets.
1010 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1011 (initialize_low_arch): Call
1012 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1013 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1014 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1015 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1016 (initialize_low_tracepoint): Call
1017 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1018 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1020 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1022 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1024 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1025 Simon Marchi <simark@simark.ca>
1027 * acinclude.m4: Include "../selftest.m4".
1028 * configure: Regenerate.
1029 * configure.ac: Use "GDB_AC_SELFTEST".
1030 * configure.srv: Use "$enable_unittests" instead of
1031 "$development" when checking whether unit tests have been
1033 * server.c (captured_main): Update message informing that
1034 selftests have been disabled.
1036 2018-10-04 Tom Tromey <tom@tromey.com>
1038 * configure: Rebuild.
1040 2018-10-04 Tom Tromey <tom@tromey.com>
1042 * server.c (handle_status): Rename inner "thread".
1043 (process_serial_event): Declare "res" in 'm' case.
1044 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1045 (iterate_over_lwps): Rename inner "thread".
1046 (linux_qxfer_libraries_svr4): Rename inner "len".
1047 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1049 2018-10-01 Gary Benson <gbenson@redhat.com>
1051 * gdb_proc_service.h: Moved common code to
1052 common/gdb_proc_service.h.
1054 2018-10-01 Gary Benson <gbenson@redhat.com>
1056 * gdb_proc_service.h: Synchronize comments and whitespace with
1057 GDB's version of this file.
1059 2018-09-25 Tom Tromey <tom@tromey.com>
1061 * configure: Rebuild.
1062 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1064 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1066 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1067 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1068 ($(IPA_LIB)): Sort IPA_OBJS.
1070 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1072 * Makefile.in: Remove references to $(ADD_DEPS).
1074 2018-09-16 Tom Tromey <tom@tromey.com>
1076 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1078 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1081 2018-09-05 Tom Tromey <tom@tromey.com>
1083 * configure: Rebuild.
1085 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1088 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1090 2018-08-27 Tom Tromey <tom@tromey.com>
1093 * configure: Rebuild.
1095 2018-08-27 Tom Tromey <tom@tromey.com>
1097 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1098 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1099 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1100 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1101 (s390x_emit_stack_adjust): Add casts to unsigned char.
1103 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1107 * server.h (struct client_state) <disable_randomization>:
1110 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1112 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1114 (mips_supply_ptrace_register): Likewise.
1116 2018-07-22 Tom Tromey <tom@tromey.com>
1118 * configure: Rebuild.
1120 2018-07-22 Tom Tromey <tom@tromey.com>
1122 * win32-low.c (win32_create_inferior): Remove unused variables.
1123 * gdbreplay.c (remote_open): Remove unused variable.
1124 * remote-utils.c (remote_prepare): Remove unused variable.
1125 * x86-tdesc.h (X86_TDESC_H): Define.
1126 (amd64_expedite_regs): Define conditionally.
1127 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1128 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1129 * remote-utils.c (readchar): Remove unused variable.
1131 2018-07-13 Pedro Alves <palves@redhat.com>
1133 * linux-low.c (linux_kill): Change parameter to process_info
1134 pointer instead of pid. Adjust.
1135 * lynx-low.c (lynx_kill): Likewise.
1136 * nto-low.c (nto_kill): Likewise.
1137 * spu-low.c (spu_kill): Likewise.
1138 * win32-low.c (win32_kill): Likewise.
1139 * server.c (handle_v_kill, kill_inferior_callback)
1140 (detach_or_kill_for_exit): Adjust.
1141 * target.c (kill_inferior): Change parameter to process_info
1142 pointer instead of pid. Adjust.
1143 * target.h (struct target_ops) <kill>: Change parameter to
1144 process_info pointer instead of pid. Adjust all implementations
1146 (kill_inferior): Likewise.
1148 2018-07-13 Pedro Alves <palves@redhat.com>
1150 * linux-low.c (linux_detach, linux_join): Change parameter to
1151 process_info pointer instead of pid. Adjust.
1152 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1153 * nto-low.c (nto_detach): Likewise.
1154 * spu-low.c (spu_detach, spu_join): Likewise.
1155 * win32-low.c (win32_detach, win32_join): Likewise.
1156 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1157 * target.h (struct target_ops) <detach, join>: Change parameter to
1158 process_info pointer instead of pid. Adjust all implementations
1160 (detach_inferior, join_inferior): Rename 'pid' parameter to
1163 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1164 Jan Kratochvil <jan.kratochvil@redhat.com>
1165 Paul Fertser <fercerpav@gmail.com>
1166 Tsutomu Seki <sekiriki@gmail.com>
1168 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1169 (OBS): Add 'common/netstuff.o'.
1170 (GDBREPLAY_OBS): Likewise.
1171 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1172 (remote_open): Implement support for IPv6
1174 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1176 (handle_accept_event): Accept connections from IPv6 sources.
1177 (remote_prepare): Handle IPv6-style hostnames; implement
1178 support for IPv6 connections.
1179 (remote_open): Implement support for printing connections from
1182 2018-07-11 Pedro Alves <palves@redhat.com>
1185 * mem-break.c (any_persistent_commands): Add process_info
1186 parameter and use it instead of relying on the current process.
1187 Change return type to bool.
1188 * mem-break.h (any_persistent_commands): Add process_info
1189 parameter and change return type to bool.
1190 * server.c (handle_detach): Remove require_running_or_return call.
1191 Look up the process_info for the process we're about to detach.
1192 If not found, return back error to GDB. Adjust
1193 any_persistent_commands call to pass down a process pointer.
1195 2018-07-11 Pedro Alves <palves@redhat.com>
1197 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1198 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1199 instead of collect_register_by_name.
1200 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1201 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1203 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1204 Pedro Alves <palves@redhat.com>
1206 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1208 2018-07-03 Tom Tromey <tom@tromey.com>
1210 * linux-low.c: Update.
1211 * lynx-low.c: Update.
1212 * mem-break.c: Update.
1213 * nto-low.c: Update.
1214 * remote-utils.c: Update.
1216 * spu-low.c: Update.
1218 * win32-low.c: Update.
1220 2018-07-03 Tom Tromey <tom@tromey.com>
1224 2018-07-03 Tom Tromey <tom@tromey.com>
1226 * linux-low.c: Update.
1228 2018-07-03 Tom Tromey <tom@tromey.com>
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 * nto-low.c: Update.
1238 * remote-utils.c: Update.
1240 * spu-low.c: Update.
1242 * thread-db.c: Update.
1244 2018-07-03 Tom Tromey <tom@tromey.com>
1246 * linux-low.c: Update.
1247 * linux-mips-low.c: Update.
1248 * lynx-low.c: Update.
1249 * mem-break.c: Update.
1250 * nto-low.c: Update.
1251 * remote-utils.c: Update.
1253 * spu-low.c: Update.
1255 * tracepoint.c: Update.
1257 2018-07-03 Tom Tromey <tom@tromey.com>
1259 * linux-low.c: Update.
1260 * linux-ppc-low.c: Update.
1261 * linux-x86-low.c: Update.
1262 * proc-service.c: Update.
1264 * spu-low.c: Update.
1265 * thread-db.c: Update.
1266 * win32-low.c: Update.
1268 2018-07-03 Tom Tromey <tom@tromey.com>
1270 * linux-low.c: Update.
1271 * lynx-low.c: Update.
1272 * nto-low.c: Update.
1273 * remote-utils.c: Update.
1274 * spu-low.c: Update.
1275 * thread-db.c: Update.
1276 * win32-low.c: Update.
1278 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1280 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1281 parameter in call to 'amd64_create_target_description'.
1283 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1285 * x86-tdesc.h: Remove executable permission flag.
1287 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1289 * configure.ac: Remove AC_PREREQ, add missing quoting.
1290 * configure: Re-generate.
1291 * config.in: Re-generate.
1292 * aclocal.m4: Re-generate.
1294 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1296 * tracepoint.h (current_traceframe): Remove declaration.
1298 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1300 * linux-aarch64-low.c (is_sve_tdesc): New function.
1301 (aarch64_sve_regs_copy_to_regcache): Likewise.
1302 (aarch64_sve_regs_copy_from_regcache): Likewise.
1303 (aarch64_regs_info): Add SVE checks.
1304 (initialize_low_arch): Initialize SVE.
1306 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1308 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1310 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1312 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1313 (initialize_low_tracepoint): Likewise
1314 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1315 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1317 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1319 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1321 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1323 * server.h (PBUFSIZ): Increase size
1325 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1327 * regcache.c (regcache::raw_compare): New function.
1328 * regcache.h (regcache::raw_compare): New declaration.
1330 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1332 * regcache.c (new_register_cache): Use new.
1333 (free_register_cache): Use delete.
1334 (register_data): Use const.
1335 (supply_register): Move body inside regcache.
1336 (regcache::raw_supply): New override function.
1337 (collect_register): Move body inside regcache.
1338 (regcache::raw_collect): New override function.
1339 (regcache::get_register_status): New override function.
1340 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1342 2018-06-09 Tom Tromey <tom@tromey.com>
1344 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1346 (event_queue): Use std::queue.
1347 (gdb_event_xfree): Remove.
1348 (initialize_event_loop, process_event, wait_for_event): Update.
1350 2018-06-08 Stan Cox <scox@redhat.com>
1352 * win32-low.c (win32_create_inferior): last_ptid and last_status
1353 moved to client_state.
1355 2018-06-08 Pedro Alves <palves@redhat.com>
1357 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1358 common/common-exceptions.o, common/common-utils.o,
1359 common/errors.o, common/print-utils.o and utils.o.
1360 * gdbreplay.c: Include "common-defs.h" instead of the two
1361 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1362 string.h or alloca.h.
1363 (perror_with_name): Delete.
1364 (remote_open): Use xstrdup instead of strdup.
1365 (main): Rename to ...
1366 (captured_main): ... this.
1369 2018-06-08 Tom Tromey <tom@tromey.com>
1371 * linux-low.c (linux_low_read_btrace): Update.
1373 2018-06-04 Stan Cox <scox@redhat.com>
1375 * server.h (struct client_state): New.
1376 * server.c (cont_thread, general_thread, multi_process)
1377 (report_fork_events, report_vfork_events, report_exec_events)
1378 (report_thread_events, swbreak_feature, hwbreak_feature)
1379 (vCont_supported, disable_randomization, pass_signals)
1380 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1381 Moved to client_state.
1382 * remote-utils.c (remote_debug, noack_mode)
1383 (transport_is_reliable): Moved to client_state.
1384 * tracepoint.c (current_traceframe): Moved to client_state.
1387 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1388 linux-low.c, remote-utils.h, target.c: Use client_state.
1390 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1392 * configure.srv: Add new c/h file.
1394 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1396 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1399 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1401 * gdb.arch/mips-fpregset-core.exp: New test.
1402 * gdb.arch/mips-fpregset-core.c: New test source.
1404 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1407 * hostio.c (require_int): Do not report overflow for integers
1408 between 0xfffffff and 0x7fffffff.
1410 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1412 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1413 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1414 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1416 (the_low_target): Wire them.
1418 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1420 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1421 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1422 mode. Call collect_register_by_name with vscr using
1423 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1424 (ppc_store_vrregset): Add and set vscr_offset variable as in
1425 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1428 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1430 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1431 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1432 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1434 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1436 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1437 (ppc_store_vsxregset): Likewise.
1438 (ppc_fill_vrregset): Likewise.
1439 (ppc_store_vrregset): Likewise.
1440 (ppc_fill_evrregset): Likewise.
1441 (ppc_store_evrregset): Likewise.
1442 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1443 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1446 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1448 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1449 wordsize of the inferior. Call ppc_linux_target_wordsize.
1451 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1453 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1454 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1455 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1456 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1457 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1458 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1459 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1460 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1461 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1462 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1463 (tdesc_powerpc_e500l): Remove.
1464 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1465 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1466 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1467 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1469 (ppc_arch_setup): Remove target description matching code. Fill a
1470 ppc_linux_features struct and call ppc_linux_match_description
1473 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1475 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1476 width of the requested register exceeds the width of the
1478 (mips_cannot_store_register): Likewise.
1480 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1482 * linux-mips-low.c (mips_fetch_register): New function. Update
1484 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1485 (the_low_target): Wire `mips_fetch_register'.
1487 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1489 * lynx-i386-low.c (LYNXOS_178): New macro.
1490 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1491 the layout on LynxOS-178.
1492 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1493 handle floating point registers that are not supported by
1496 2018-05-10 Tom Tromey <tom@tromey.com>
1498 * configure: Rebuild.
1500 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1503 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1504 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1505 Use it to set the expedite_regs field in the given tdesc.
1506 * x86-tdesc.h: New file.
1507 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1508 Adjust following the addition of the new expedite_regs parameter
1509 to init_target_desc.
1510 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1511 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1512 (i386_linux_read_description, amd64_linux_read_description):
1513 Adjust following the addition of the new expedite_regs parameter
1514 to init_target_desc.
1515 * lynx-i386-low.c: #include "x86-tdesc.h".
1516 (lynx_i386_arch_setup): Adjust following the addition of the new
1517 expedite_regs parameter to init_target_desc.
1518 * nto-x86-low.c: #include "x86-tdesc.h".
1519 (nto_x86_arch_setup): Adjust following the addition of the new
1520 expedite_regs parameter to init_target_desc.
1521 * win32-i386-low.c: #include "x86-tdesc.h".
1522 (i386_arch_setup): Adjust following the addition of the new
1523 expedite_regs parameter to init_target_desc.
1525 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1528 * win32-low.c (win32_create_inferior): Add call to my_wait
1529 setting last_status global.
1531 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1534 * win32-low.c (create_process): Only call gdb_tilde_expand if
1535 inferior_cwd is not NULL.
1537 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1539 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1540 registers to the cache if their values have changed.
1541 (i387_xsave_to_cache): Provide default values for x87 control
1542 registers when these features are available, but disabled.
1543 * regcache.c (supply_register_by_name_zeroed): New function.
1544 * regcache.h (supply_register_by_name_zeroed): Declare new
1547 2018-05-07 Tom Tromey <tom@tromey.com>
1549 * configure: Rebuild.
1551 2018-05-04 Tom Tromey <tom@tromey.com>
1553 * configure: Rebuild.
1555 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1556 Pedro Alves <palves@redhat.com>
1558 * linux-aarch64-low.c (aarch64_stopped_data_address):
1561 2018-04-27 Tom Tromey <tom@tromey.com>
1563 * configure: Rebuild.
1565 2018-04-23 Tom Tromey <tom@tromey.com>
1567 * configure: Rebuild.
1569 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1571 * Makefile.in (depcomp): Add "..".
1572 (all_deps_files): New and use it.
1574 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1576 * configure.srv (aarch64*-*-linux*): Don't include xml.
1577 (i[34567]86-*-cygwin*): Likewise.
1578 (i[34567]86-*-linux*): Likewise.
1579 (i[34567]86-*-lynxos*): Likewise.
1580 (i[34567]86-*-mingw32ce*): Likewise.
1581 (i[34567]86-*-mingw*): Likewise.
1582 (i[34567]86-*-nto*): Likewise.
1583 (tic6x-*-uclinux): Likewise.
1584 (x86_64-*-linux*): Likewise.
1585 (x86_64-*-mingw*): Likewise.
1586 (x86_64-*-cygwin*): Likewise.
1588 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1590 * tdesc.c: Remove xml parameter.
1592 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1594 * server.c (get_features_xml): Remove cast.
1595 * tdesc.c (void target_desc::accept): Fill in function.
1596 (tdesc_get_features_xml): Remove old xml creation.
1597 (print_xml_feature::visit_pre): Add xml vistor.
1598 * tdesc.h (struct target_desc): Make xmltarget mutable.
1599 (tdesc_get_features_xml): Remove declaration.
1601 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1603 * tdesc.c (tdesc_architecture_name): Add new function.
1604 (tdesc_osabi_name): Likewise.
1605 (tdesc_get_features_xml): Use new functions.
1607 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1609 * tdesc.c (tdesc_create_flags): Remove.
1610 (tdesc_add_flag): Likewise.
1611 (tdesc_named_type): Likewise.
1612 (tdesc_create_union): Likewise.
1613 (tdesc_create_struct): Likewise.
1614 (tdesc_create_vector): Likewise.
1615 (tdesc_add_bitfield): Likewise.
1616 (tdesc_add_field): Likewise.
1617 (tdesc_set_struct_size): Likewise.
1619 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1621 * tdesc.c (~target_desc): Remove implictly deleted items.
1622 (init_target_desc): Iterate all features.
1623 (tdesc_get_features_xml): Use vector.
1624 (tdesc_create_feature): Create feature.
1625 * tdesc.h (tdesc_feature) Remove
1626 (target_desc): Add features.
1628 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1630 * Makefile.in: Add common/tdesc.c
1631 * tdesc.c (init_target_desc): init all reg_defs from register
1633 (tdesc_create_reg): Create tdesc_reg.
1634 * tdesc.h (tdesc_feature): Add register vector.
1636 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1638 * tdesc.h (struct target_desc) <features>: Change type to
1639 std::vector<std::string>.
1640 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1642 (tdesc_get_features_xml): Likewise.
1643 (tdesc_create_feature): Likewise.
1645 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1647 * regcache.c (find_register_by_number): Return a ref.
1648 (find_regno): Use references.
1649 (register_size): Likewise.
1650 (register_data): Likewise.
1651 * tdesc.c (target_desc::~target_desc): Remove free calls.
1652 (target_desc::operator==): Use std::vector compare.
1653 (init_target_desc): Use reference.
1654 (tdesc_create_reg): Use reg constructors.
1655 * tdesc.h (struct target_desc): Replace pointer with object.
1657 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1659 * regcache.c (find_register_by_number): Make static.
1660 (find_regno): Use find_register_by_number
1661 * regcache.h (struct reg): Remove declaration.
1663 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1665 * tdesc.c (target_desc::~target_desc): Move to here.
1666 (target_desc::operator==): Likewise.
1667 * tdesc.h (target_desc::~target_desc): Move from here.
1668 (target_desc::operator==): Likewise.
1670 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1672 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1674 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1676 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1678 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1679 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1680 and init_registers_s390_gs_linux64.
1682 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1684 * linux-s390-low.c (s390_fill_gs): Remove function.
1685 (s390_fill_gsbc): Remove function.
1686 (s390_regsets): Set fill functions for the guarded storage regsets
1689 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1691 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1692 the word size. Add comment.
1693 (s390_get_wordsize): New function.
1694 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1695 pswm with it. Instead, use s390_get_wordsize to determine the
1696 word size first and derive the correct tdesc from that directly.
1698 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1700 * Makefile.in: Include silent-rules.mk.
1701 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1702 (COMPILE): Add ECHO_CXX.
1703 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1704 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1705 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1706 (version-generated.c): Add ECHO_GEN.
1707 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1708 (IPAGENT_COMPILE): Add ECHO_CXX.
1709 (%-generated.c): Add ECHO_REGDAT.
1711 2018-03-14 Tom Tromey <tom@tromey.com>
1714 * ax.c (ax_printf): Special case for NULL.
1716 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1718 * linux-low.c (linux_qxfer_libraries_svr4): Use
1719 xml_escape_text_append.
1721 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1723 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1725 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1727 * server.c (handle_general_set): Remove unnecessary xstrdup.
1729 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1731 * server.c (parse_debug_format_options): Adjust to
1732 delim_string_to_char_ptr_vec changes.
1733 * thread-db.c (thread_db_load_search): Adjust to
1734 dirnames_to_char_ptr_vec changes.
1736 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1738 * target.h (target_enable_btrace, target_disable_btrace)
1739 (target_read_btrace, target_read_btrace_conf): Turn macro into
1740 inline function. Throw error if target method is not defined.
1741 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1742 check for btrace target method. Be prepared to handle exceptions
1743 from btrace target methods.
1745 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1747 * server.c (captured_main): Change order of error message printed
1748 when the current working directory cannot be found.
1750 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1752 * server.c: Include "filenames.h" and "pathstuff.h".
1753 (program_name): Delete variable.
1754 (program_path): New anonymous class.
1755 (get_exec_wrapper): Use "program_path" instead of
1757 (handle_v_run): Likewise.
1758 (captured_main): Likewise.
1759 (process_serial_event): Likewise.
1761 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1763 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1764 (OBJS): Add "pathstuff.o".
1765 * server.c (current_directory): New global variable.
1766 (captured_main): Initialize "current_directory".
1768 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1770 * tdesc.c: Use common/tdesc.h.
1771 * tdesc.h: Likewise.
1773 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1774 Simon Marchi <simon.marchi@ericsson.com>
1776 * Makefile.in: Switch order of make rules.
1778 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1780 * Makefile.in: Add common directory in build.
1781 * configure.ac: Add common reference.
1782 * configure: Regenerate.
1784 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1786 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1787 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1788 * spu-low.c (spu_target_ops): Likewise.
1789 * win32-low.c (win32_target_ops): Likewise.
1790 * server.c (supported_btrace_packets): Report packets unconditionally.
1791 * target.h (target_ops) <supports_btrace>: Remove.
1792 (target_supports_btrace): Remove.
1794 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1796 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1797 (handle_btrace_disable): Change return type to void. Use exceptions
1799 (handle_btrace_general_set): Catch exception and copy message to
1802 2018-02-08 Tom Tromey <tom@tromey.com>
1804 * linux-low.c (install_software_single_step_breakpoints): Use
1805 make_scoped_restore.
1806 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1807 (do_restore_current_thread_cleanup): Remove.
1808 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1811 2018-02-08 Tom Tromey <tom@tromey.com>
1813 * mem-break.c (set_raw_breakpoint_at): Use
1814 gdb::unique_xmalloc_ptr.
1816 2018-01-30 Pedro Alves <palves@redhat.com>
1819 * target.c (target_terminal::terminal_state): Rename to ...
1820 (target_terminal::m_terminal_state): ... this.
1822 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1824 * linux-low.c (handle_extended_wait): Surround call to
1825 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1827 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1829 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1830 linux_ptrace_attach_fail_reason_string now returning an
1832 (linux_attach): Likewise.
1833 * thread-db.c (attach_thread): Likewise.
1835 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1838 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1839 checking for fs_base/gs_base fields in struct user_regs_struct.
1840 * configure: Regenerate.
1842 2018-01-16 Yao Qi <yao.qi@linaro.org>
1845 * linux-low.c (fetch_register): Call supply_register instead of
1848 2018-01-08 Yao Qi <yao.qi@linaro.org>
1849 Simon Marchi <simon.marchi@ericsson.com>
1851 * Makefile.in (OBS): Remove selftest.o.
1852 * configure.ac: Set srv_selftest_objs if $development is true.
1853 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1854 * configure: Re-generated.
1855 * server.c (captured_main): Wrap variable selftest_filter with
1858 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1860 * server.c (parse_debug_format_options): Return std::string.
1861 (handle_monitor_command, captured_main): Adjust.
1863 2018-01-05 Pedro Alves <palves@redhat.com>
1866 * server.c (captured_main): Pass quiet=false to
1867 save_original_signals_state.
1869 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1871 * gdbreplay.c (gdbreplay_version): Update copyright year in
1873 * server.c (gdbserver_version): Likewise.
1875 2017-12-08 Tom Tromey <tom@tromey.com>
1877 * ax.c (ax_printf): Update.
1879 2017-12-07 Yao Qi <yao.qi@linaro.org>
1881 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1882 aarch64_linux_read_description.
1883 * linux-amd64-ipa.c (idx2mask): New array.
1884 (get_ipa_tdesc): Move idx2mask out.
1885 (initialize_low_tracepoint): Initialize target descriptions.
1886 * linux-i386-ipa.c (idx2mask): New array.
1887 (get_ipa_tdesc): Move idx2mask out.
1888 (initialize_low_tracepoint): Initialize target descriptions.
1890 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1892 * tdesc.c (struct tdesc_type): Change return type.
1893 (tdesc_add_flag): Change parameter type.
1894 (tdesc_add_bitfield): Likewise.
1895 (tdesc_add_field): Likewise.
1896 (tdesc_set_struct_size): Likewise.
1898 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1900 * regcache.c (registers_to_string): Remove unused variable.
1902 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1904 * inferiors.c (for_each_inferior_with_data): Remove.
1905 * inferiors.h (for_each_inferior_with_data): Remove.
1906 * server.c (handle_qxfer_threads_worker): Change parameter type.
1907 (handle_qxfer_threads_proper): Use for_each_thread.
1909 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1911 * inferiors.c (for_each_inferior): Remove.
1912 (clear_inferiors): Use for_each_thread.
1913 * inferiors.h (for_each_inferior): Remove.
1914 * linux-low.c (linux_wait_for_event_filtered): Use
1916 (linux_stabilize_threads): Likewise.
1917 * regcache.c (regcache_release): Likewise.
1918 * server.c (gdb_wants_all_threads_stopped): Likewise.
1919 (clear_pending_status_callback): Remove.
1920 (handle_status): Use for_each_thread.
1921 (captured_main): Likewise.
1922 * win32-low.c (child_init_thread_list): Likewise.
1923 (win32_clear_inferiors): Likewise.
1924 (fake_breakpoint_event): Likewise.
1926 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1928 * inferiors.h (find_inferior): Remove.
1929 * inferiors.c (find_inferior): Remove.
1931 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1933 * linux-low.c (resume_status_pending_p): Update comment.
1934 (need_step_over_p): Update comment.
1936 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1938 * linux-low.c (proceed_one_lwp): Return void, change parameter
1940 (unsuspend_and_proceed_one_lwp): Likewise.
1941 (proceed_all_lwps): Use for_each_thread.
1942 (unstop_all_lwps): Likewise.
1944 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1946 * linux-low.c (linux_resume_one_thread): Return void, take
1948 (linux_resume): Use for_each_thread.
1950 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1952 * linux-low.c (send_sigstop_callback): Return void, change
1953 parameter type. Rename to...
1954 (send_sigstop): ... this.
1955 (suspend_and_send_sigstop_callback): Return void, change parameter
1957 (suspend_and_send_sigstop): ... this.
1958 (stop_all_lwps): Use for_each_thread.
1960 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1962 * linux-low.c (lwp_running): Return bool, remove unused
1964 (linux_stabilize_threads): Use find_thread.
1966 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1968 * linux-low.c (select_singlestep_lwp_callback): Remove.
1969 (count_events_callback): Remove.
1970 (select_event_lwp_callback): Remove.
1971 (select_event_lwp): Use find_thread/for_each_thread.
1973 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1975 * linux-low.c (not_stopped_callback): Return bool, take filter
1977 (linux_wait_for_event_filtered): Use find_thread.
1978 (linux_wait_1): Likewise.
1980 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1982 * linux-low.c (same_lwp): Remove.
1983 (find_lwp_pid): Use find_thread.
1985 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1987 * linux-low.c (delete_lwp_callback): Remove.
1988 (linux_mourn): Use for_each_thread.
1990 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1992 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1993 args parameter, don't check for pid.
1994 (linux_detach): Use for_each_thread.
1996 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1998 * linux-low.c (struct counter): Remove.
1999 (second_thread_of_pid_p): Remove.
2000 (last_thread_of_process_p): Use find_thread.
2002 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2004 * inferiors.c (find_inferior_in_random): Remove.
2005 * inferiors.h (find_inferior_in_random): Remove.
2006 * linux-low.c (status_pending_p_callback): Return bool, accept
2007 parameter ptid directly.
2008 (linux_wait_for_event_filtered): Use find_thread_in_random.
2009 (linux_wait_1): Likewise.
2011 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2013 * inferiors.c (find_inferior_id): Remove.
2014 (find_thread_ptid): Move implemention from find_inferior_id to
2016 * inferiors.h (find_inferior_id): Remove.
2017 * server.c (handle_status): Use find_thread_ptid.
2018 (process_serial_event): Likewise.
2019 * thread-db.c (find_one_thread): Likewise.
2020 (thread_db_thread_handle): Likewise.
2021 * win32-low.c (thread_rec): Likewise.
2022 (child_delete_thread): Likewise.
2023 (win32_thread_alive): Likewise.
2024 (get_child_debug_event): Likewise.
2026 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2028 * linux-mips-low.c (update_watch_registers_callback): Return
2029 void, remove pid_p parameter, don't check for pid.
2030 (mips_insert_point, mips_remove_point): Use for_each_thread.
2032 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2034 * lynx.low (lynx_delete_thread_callback): Remove.
2035 (lynx_mourn): Use for_each_thread.
2037 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2039 * regcache.c (regcache_invalidate_one): Remove.
2040 (regcache_invalidate_pid): use for_each_thread.
2042 2017-11-26 Tom Tromey <tom@tromey.com>
2044 * linux-low.c (linux_create_inferior): Update.
2046 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2048 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2050 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2052 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2053 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2054 * linux-aarch64-tdesc-selftest.c: New file.
2055 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2057 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2059 * configure.srv: Add new file.
2060 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2061 * linux-aarch64-tdesc-selftest.c: New file.
2062 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2064 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2066 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2067 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2068 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2070 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2072 * configure.srv: Add new files.
2073 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2074 aarch64_linux_read_description.
2075 * linux-aarch64-low.c (aarch64_linux_read_description):
2076 Merge with aarch64_arch_setup.
2077 (aarch64_arch_setup): Call aarch64_linux_read_description.
2078 * linux-aarch64-tdesc.c: New file.
2079 * linux-aarch64-tdesc.h: New file.
2081 2017-11-24 Yao Qi <yao.qi@linaro.org>
2083 * configure.srv: Set $srv_regobj for tic6x-linux.
2084 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2085 (tic6x_read_description): Move some code to tic6x_arch_setup.
2086 (tic6x_tdesc_test): New function.
2087 (initialize_low_arch): Call selftests::register_test.
2089 2017-11-22 Yao Qi <yao.qi@linaro.org>
2091 * remote-utils.c (prepare_resume_reply): Use memcpy.
2093 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2095 * linux-low.c (kill_one_lwp_callback): Return void, take
2096 argument directly, don't filter on pid.
2097 (linux_kill): Use for_each_thread.
2099 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2101 * linux-low.c (need_step_over_p): Return bool, remove dummy
2103 (linux_resume, proceed_all_lwps): Use find_thread.
2105 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2107 * linux-low.c (resume_status_pending_p): Return bool, remove
2109 (linux_resume): Use find_thread.
2111 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2113 * linux-low.c (struct thread_resume_array): Remove.
2114 (linux_set_resume_request): Return void, take arguments
2116 (linux_resume): Use for_each_thread.
2118 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2120 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2121 return bool, remove data argument.
2122 (linux_stabilize_threads): Use find_thread.
2124 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2126 * linux-low.c (unsuspend_one_lwp): Remove.
2127 (unsuspend_all_lwps): Use for_each_thread, inline code from
2130 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2132 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2133 * linux-low.c (struct iterate_over_lwps_args): Remove.
2134 (iterate_over_lwps_filter): Remove.
2135 (iterate_over_lwps): Use find_thread.
2137 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2139 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2140 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2141 code from reset_lwp_ptrace_options_callback.
2143 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2145 * linux-arm-low.c (struct update_registers_data): Remove.
2146 (update_registers_callback): Return void, take arguments
2147 directly, don't check thread's pid.
2148 (arm_insert_point, arm_remove_point): Use for_each_thread.
2150 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2152 * win32-low.c (continue_one_thread): Return void, take argument
2154 (child_continue): Use for_each_thread.
2156 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2158 * win32-i386-low.c (update_debug_registers_callback): Rename
2160 (update_debug_registers): ... this, return void, remove pid_p arg.
2161 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2163 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2165 * inferiors.h (struct process_info): Add constructor, initialize
2167 <syscalls_to_catch>: Change type to std::vector<int>.
2168 * inferiors.c (add_process): Allocate process_info with new.
2169 (remove_process): Free process_info with delete.
2170 * linux-low.c (handle_extended_wait): Adjust.
2171 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2172 * server.c (handle_general_set): Adjust.
2174 2017-11-16 Pedro Alves <palves@redhat.com>
2176 * remote-utils.c (remote_close): Block SIGIO signals instead of
2177 uninstalling the SIGIO handler.
2179 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2181 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2183 2017-11-16 Yao Qi <yao.qi@linaro.org>
2185 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2186 (tic6x_store_gregset): Likewise.
2187 (tic6x_usrregs_info): Move it up.
2189 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2191 * Makefile.in: Update arch rules.
2192 * configure.srv: Explicitly mark arch/ files.
2194 2017-11-13 Andreas Schwab <schwab@suse.de>
2196 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2198 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2200 2017-11-06 Pedro Alves <palves@redhat.com>
2202 * config.in, configure: Regenerate.
2204 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2206 * target.c (struct thread_search): Remove.
2207 (thread_search_callback): Remove.
2208 (prepare_to_access_memory): Use for_each_thread instead of
2209 find_inferior. Inline code from thread_search_callback.
2211 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2213 * server.c (struct visit_actioned_threads_data): Remove.
2214 (visit_actioned_threads): Change prototype to take arguments
2216 (resume): Use find_thread instead of find_inferior.
2218 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2220 * server.c (queue_stop_reply_callback): Change prototype, return
2222 (find_status_pending_thread_callback): Remove.
2223 (handle_status): Replace find_inferior with find_thread and
2226 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2228 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2230 (aarch64_store_gregset): Likewise.
2231 (aarch64_fill_fpregset): Likewise.
2232 (aarch64_store_fpregset): Likewise.
2234 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2236 * gdbthread.h (find_thread, for_each_thread): New functions.
2237 * inferiors.c (thread_of_pid): Remove.
2238 (find_any_thread_of_pid): Use find_thread.
2239 * linux-low.c (num_lwps): Use for_each_thread.
2241 2017-10-17 Yao Qi <yao.qi@linaro.org>
2243 * Makefile.in: Remove one rule.
2244 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2246 2017-10-17 Yao Qi <yao.qi@linaro.org>
2248 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2249 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2251 2017-10-17 Yao Qi <yao.qi@linaro.org>
2253 * configure.srv: Rename arm.o with arch/arm.o.
2255 2017-10-17 Yao Qi <yao.qi@linaro.org>
2257 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2258 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2259 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2260 (arch-i386.o, arch-amd64.o): Remove rules.
2261 (arch/%.o): New rule.
2262 Update POSTCOMPILE and COMPILE.pre.
2263 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2264 * configure: Re-generated.
2265 * configure.srv: Replace arch-i386.o with arch/i386.o.
2266 Replace arch-amd64.o with arch/amd64.o.
2268 2017-10-16 Yao Qi <yao.qi@linaro.org>
2270 * configure: Regenerated.
2272 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2274 * inferiors.h: (struct inferior_list): Remove.
2275 (struct inferior_list_entry); Remove.
2276 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2277 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2278 get_first_inferior): Remove.
2279 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2280 find_inferior_id, find_inferior_in_random): Change signature.
2281 * inferiors.c (all_threads): Change type to
2282 std::list<thread_info *>.
2283 (get_thread): Remove macro.
2284 (find_inferior, find_inferior_id): Change signature, implement
2286 (find_inferior_in_random): Change signature, implement using
2287 find_thread_in_random.
2288 (for_each_inferior, for_each_inferior_with_data): Change
2289 signature, implement using for_each_thread.
2290 (add_inferior_to_list, remove_inferior): Remove.
2291 (add_thread, get_first_thread, thread_of_pid,
2292 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2293 (get_first_inferior, one_inferior_p, clear_inferior_list):
2295 (clear_inferiors, get_thread_process): Update.
2296 * gdbthread.h: Include <list>.
2297 (struct thread_info) <entry>: Remove field.
2299 (all_threads): Change type to std::list<thread_info *>.
2300 (get_first_inferior): Add doc.
2301 (find_thread, for_each_thread, find_thread_in_random): New
2303 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2304 * linux-arm-low.c (update_registers_callback): Update.
2305 * linux-low.c (second_thread_of_pid_p): Update.
2306 (kill_one_lwp_callback, linux_detach_lwp_callback,
2307 delete_lwp_callback, status_pending_p_callback, same_lwp,
2308 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2309 iterate_over_lwps, not_stopped_callback,
2310 resume_stopped_resumed_lwps, count_events_callback,
2311 select_singlestep_lwp_callback, select_event_lwp_callback,
2312 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2313 suspend_and_send_sigstop_callback, wait_for_sigstop,
2314 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2315 lwp_running, linux_set_resume_request, resume_status_pending_p,
2316 need_step_over_p, start_step_over, linux_resume_one_thread,
2317 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2318 reset_lwp_ptrace_options_callback): Update.
2319 * linux-mips-low.c (update_watch_registers_callback): Update.
2320 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2322 (free_register_cache_thread_one): Remove.
2323 (regcache_release): Update.
2324 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2325 handle_qxfer_threads_worker): Update.
2326 (handle_query): Update, use list iterator.
2327 (visit_actioned_threads, handle_pending_status,
2328 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2329 clear_pending_status_callback, set_pending_status_callback,
2330 find_status_pending_thread_callback, handle_status,
2331 process_serial_event): Update.
2332 * target.c (thread_search_callback): Update.
2333 * thread-db.c (thread_db_get_tls_address): Update.
2334 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2336 * win32-i386-low.c (update_debug_registers_callback): Update.
2337 * win32-low.c (delete_thread_info, child_delete_thread,
2338 continue_one_thread, suspend_one_thread,
2339 get_child_debug_event): Adjust.
2341 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2343 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2344 * inferiors.h: Include <list>.
2345 (struct process_info) <entry>: Remove field.
2347 (pid_of): Change macro to function.
2348 (ptid_of, lwpid_of): Remove macro.
2349 (all_processes): Change type to std::list<process_info *>.
2350 (ALL_PROCESSES): Remove macro.
2351 (for_each_process, find_process): New function.
2352 * inferiors.c (all_processes): Change type to
2353 std::list<process_info *>.
2354 (find_thread_process): Adjust.
2355 (add_process): Likewise.
2356 (remove_process): Likewise.
2357 (find_process_pid): Likewise.
2358 (get_first_process): Likewise.
2359 (started_inferior_callback): Remove.
2360 (have_started_inferiors_p): Adjust.
2361 (attached_inferior_callback): Remove.
2362 (have_attached_inferiors_p): Adjust.
2363 * linux-low.c (check_zombie_leaders): Likewise.
2364 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2365 (x86_linux_update_xmltarget): Adjust.
2366 * server.c (handle_query): Likewise.
2367 (gdb_reattached_process): Remove.
2368 (handle_status): Adjust.
2369 (kill_inferior_callback): Likewise.
2370 (detach_or_kill_inferior): Remove.
2371 (print_started_pid): Likewise.
2372 (print_attached_pid): Likewise.
2373 (detach_or_kill_for_exit): Update.
2374 (process_serial_event): Likewise.
2375 * linux-arm-low.c (arm_new_fork): Likewise.
2377 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2379 * dll.h: Include <list>.
2380 (struct dll_info): Add constructor.
2381 <entry>: Remove field.
2382 (all_dlls): Change type to std::list<dll_info>.
2383 * dll.c: Include <algorithm>.
2384 (get_dll): Remove macro.
2385 (all_dlls): Change type to std::list<dll_info *>.
2386 (free_one_dll): Remove.
2387 (match_dll): Likewise.
2388 (loaded_dll): Adjust.
2389 (unloaded_dll): Adjust to all_dlls type change, use
2390 std::find_if. Inline code from match_dll.
2391 (clear_dlls): Adjust to all_dlls type change.
2392 * server.c (emit_dll_description): Remove.
2393 (handle_qxfer_libraries): Adjust to all_dlls type change,
2394 integrate emit_dll_description's functionality.
2396 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2398 * linux-low.h (struct linux_target_ops) <delete_process>: New
2400 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2401 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2402 (struct linux_target_ops): Add delete_process callback.
2403 * linux-arm-low.c (arm_delete_process): New.
2404 (struct linux_target_ops): Add delete_process callback.
2405 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2406 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2407 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2408 * linux-mips-low.c (mips_linux_delete_process): New.
2409 (struct linux_target_ops): Add delete_process callback.
2410 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2411 * linux-s390-low.c (struct linux_target_ops): Likewise.
2412 * linux-sh-low.c (struct linux_target_ops): Likewise.
2413 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2414 * linux-tile-low.c (struct linux_target_ops): Likewise.
2415 * linux-x86-low.c (x86_linux_delete_process): New.
2416 (struct linux_target_ops): Add delete_process callback.
2417 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2419 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2421 * linux-aarch64-low.c (the_low_target): Add thread delete
2423 * linux-arm-low.c (arm_delete_thread): New function.
2424 (the_low_target): Add thread delete callback.
2425 * linux-bfin-low.c (the_low_target): Likewise.
2426 * linux-crisv32-low.c (the_low_target): Likewise.
2427 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2429 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2431 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2432 * linux-mips-low.c (mips_linux_delete_thread): New function.
2433 (the_low_target): Add thread delete callback.
2434 * linux-ppc-low.c (the_low_target): Likewise.
2435 * linux-s390-low.c (the_low_target): Likewise.
2436 * linux-sh-low.c (the_low_target): Likewise.
2437 * linux-tic6x-low.c (the_low_target): Likewise.
2438 * linux-tile-low.c (the_low_target): Likewise.
2439 * linux-x86-low.c (the_low_target): Likewise.
2440 * linux-xtensa-low.c (the_low_target): Likewise.
2442 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2444 * win32-low.c: Include "common-inferior.h".
2446 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2448 * inferiors.c (set_inferior_cwd): New function.
2449 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2450 (handle_query): Inform that QSetWorkingDir is supported.
2451 * win32-low.c (create_process): Pass the inferior's cwd to
2454 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2456 * inferiors.c (current_inferior_cwd): New global variable.
2457 (get_inferior_cwd): New function.
2458 * inferiors.h (struct process_info) <cwd>: New field.
2460 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2462 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2463 (OBS): Add gdb_tilde_expand.o.
2465 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2467 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2468 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2470 2017-09-29 Pedro Alves <palves@redhat.com>
2472 * ax.c (gdb_parse_agent_expr): Constify.
2473 * ax.h (gdb_parse_agent_expr): Constify.
2474 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2476 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2477 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2478 * remote-utils.h (read_ptid): Constify.
2479 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2480 (process_point_options, process_serial_event): Constify.
2481 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2482 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2483 (cmd_qtbuffer): Constify.
2485 2017-09-29 Pedro Alves <palves@redhat.com>
2487 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2490 2017-09-29 Pedro Alves <palves@redhat.com>
2492 * linux-low.c (handle_extended_wait): Pass parent thread instead
2493 of process to thread_db_notice_clone.
2494 * linux-low.h (thread_db_notice_clone): Replace parent process
2495 parameter with parent thread parameter.
2496 * thread-db.c (find_one_thread): Add comment.
2497 (thread_db_notice_clone): Replace parent process parameter with
2498 parent thread parameter. Temporarily switch to the parent thread.
2500 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2502 * gdbthread.h: Include "common-gdbthread.h".
2503 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2504 "if" when validating the ptid.
2505 * remote-utils.c: Include "gdbthread.h".
2506 (prepare_resume_reply): Use "switch_to_thread".
2507 * target.c (done_accessing_memory): Likewise.
2509 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2511 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2512 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2513 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2514 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2515 s390x-gs-linux64-ipa.o to ipa_obj.
2516 * linux-s390-low.c (HWCAP_S390_GS): New define.
2517 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2519 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2520 (s390_arch_setup): Check for guarded-storage support and choose
2522 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2523 init_registers_s390x_gs_linux64.
2524 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2526 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2527 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2529 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2531 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2533 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2535 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2536 (thread_db_thread_handle): Declare.
2537 * linux-low.c (linux_target_ops): Initialize thread_handle.
2538 * server.c (handle_qxfer_threads_worker): Add support for
2540 * target.h (struct target_ops): Add new function pointer,
2542 (target_thread_handle): Define.
2543 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2545 (thread_db_thread_handle): New function.
2547 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2549 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2550 * linux-low.h (thread_db_notice_clone): Declare.
2551 * thread-db.c (thread_db_notice_clone): New function.
2553 2017-09-21 Pedro Alves <palves@redhat.com>
2555 * server.c (gdb_read_memory, handle_status, process_serial_event)
2556 (handle_serial_event, handle_target_event): Adjust to
2557 set_desired_thread prototype change.
2558 * target.c (set_desired_thread): Remove 'use_general' parameter
2560 * target.h (set_desired_thread): Remove 'use_general' parameter.
2562 2017-09-20 Tom Tromey <tom@tromey.com>
2564 * target.c (target_terminal::terminal_state): Define.
2565 (target_terminal::init): Rename from target_terminal_init.
2566 (target_terminal::inferior): Rename from
2567 target_terminal_inferior.
2568 (target_terminal::ours): Rename from target_terminal_ours.
2569 (target_terminal::ours_for_output, target_terminal::info): New.
2571 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2573 * server.c (accumulate_file_name_length): Remove.
2574 (emit_dll_description): Adjust to std::string change.
2575 (handle_qxfer_libraries): Use std::string to hold document.
2577 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2579 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2580 return type of xml_escape_text.
2581 * server.c (emit_dll_description): Likewise.
2583 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2585 * server.c (captured_main): Accept argument for --selftest.
2586 Update run_tests call.
2587 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2588 when registering selftests.
2590 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2592 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2593 instead of "VEC" for "target_desc.reg_defs".
2594 (regcache_cpy): Likewise.
2595 (registers_to_string): Likewise.
2596 (registers_from_string): Likewise.
2597 (find_regno): Likewise.
2598 (supply_regblock): Likewise.
2599 (regcache_raw_read_unsigned): Likewise.
2600 * tdesc.c (init_target_desc): Likewise.
2601 (tdesc_create_reg): Likewise.
2602 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2603 (struct target_desc) <reg_defs>: Convert to "std::vector".
2604 (target_desc): Do not initialize "reg_defs".
2605 (~target_desc): Update code to use "std::vector" instead of "VEC"
2606 for "target_desc.reg_defs".
2607 (operator==): Likewise.
2609 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2611 * inferiors.h (thread_to_gdb_id): Remove.
2612 * inferiors.c (thread_to_gdb_id): Remove.
2613 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2614 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2615 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2617 * nto-low.c (nto_fetch_registers, nto_store_registers,
2618 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2620 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2622 * inferiors.h (gdb_id_to_thread_id): Remove.
2623 * inferiors.c (gdb_id_to_thread_id): Remove.
2624 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2625 removal. Move pid declaration closer to where it's used.
2627 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2629 * server.c (handle_detach): New function.
2630 (process_serial_event): Move code out, call handle_detach.
2632 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2634 * server.c (require_running): Rename to ...
2635 (require_running_or_return): ... this ...
2636 (require_running_or_break): ... and this.
2637 (handle_query, process_serial_event): Adjust.
2639 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2641 * linux-low.c (linux_set_resume_request): Remove unused
2644 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2646 * server.c (first_thread_of): Remove.
2647 (process_serial_event): Replace usage of first_thread_of with
2648 find_any_thread_of_pid.
2649 * tracepoint.c (same_process_p): Remove.
2650 (gdb_agent_about_to_close): Replace usage of same_process_p with
2651 find_any_thread_of_pid.
2652 * linux-x86-low.c (same_process_callback): Remove.
2653 (x86_arch_setup_process_callback): Replace usage of
2654 same_process_callback with find_any_thread_of_pid.
2655 * thread-db.c (any_thread_of): Remove.
2656 (switch_to_process): Replace usage of any_thread_of with
2657 find_any_thread_of_pid.
2658 * inferiors.c (thread_pid_matches_callback): Remove.
2659 (find_thread_process): Adjust to use find_any_thread_of_pid.
2661 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2663 * regcache.c (get_thread_regcache): Guard calls to "memset"
2666 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2668 * linux-low.c (handle_extended_wait): Use
2669 "allocate_target_description" instead of "XNEW".
2670 * linux-x86-low.c (initialize_low_arch): Likewise.
2672 2017-09-05 Yao Qi <yao.qi@linaro.org>
2674 * configure.srv (srv_i386_regobj): Remove.
2675 (srv_amd64_regobj): Remove.
2676 (srv_regobj): Set it to "" for x86 non-linux targets.
2677 * linux-x86-tdesc.c (i386_linux_read_description):
2678 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2679 (init_registers_i386): Remove the declaration.
2680 (tdesc_i386): Remove the declaration.
2681 (lynx_i386_arch_setup): Call i386_create_target_description.
2682 * nto-x86-low.c: Likewise.
2683 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2684 [!__x86_64__]: include arch/i386.h.
2685 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2687 2017-09-05 Yao Qi <yao.qi@linaro.org>
2689 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2690 i386/amd64-XXX-linux from it.
2692 2017-09-05 Yao Qi <yao.qi@linaro.org>
2694 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2696 (ipa_amd64_linux_regobj): Remove.
2697 (ipa_x32_linux_regobj): Remove.
2699 2017-09-05 Yao Qi <yao.qi@linaro.org>
2701 * Makefile.in (arch-amd64.o): New rule.
2702 * configure.srv: Append arch-amd64.o.
2703 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2704 (get_ipa_tdesc): Call amd64_linux_read_description.
2705 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2706 and init_registers_amd64_XXX.
2707 * linux-x86-low.c (x86_linux_read_description): Call
2708 amd64_linux_read_description.
2709 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2710 (initialize_low_arch): Don't call init_registers_x32_XXX and
2711 init_registers_amd64_XXX.
2712 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2713 and tdesc_amd64_XXX.
2714 [__x86_64__] (amd64_tdesc_test): New function.
2715 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2716 and init_registers_amd64_XXX.
2717 * linux-x86-tdesc.c: Include arch/amd64.h.
2718 (xcr0_to_tdesc_idx): New function.
2719 (i386_linux_read_description): New function.
2720 (amd64_get_ipa_tdesc_idx): New function.
2721 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2722 (amd64_get_ipa_tdesc): Declare.
2724 2017-09-05 Yao Qi <yao.qi@linaro.org>
2726 * configure.srv (srv_i386_linux_xmlfiles): Remove
2727 i386/i386-XXX-linux.xml from it.
2729 2017-09-05 Yao Qi <yao.qi@linaro.org>
2731 * configure.srv: Set srv_i386_linux_regobj empty if $development
2733 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2734 initialize_low_tdesc.
2735 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2736 with #if initialize_low_tdesc.
2737 * linux-x86-tdesc-selftest.c: New file.
2738 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2740 2017-09-05 Yao Qi <yao.qi@linaro.org>
2742 * Makefile.in (arch-i386.o): New rule.
2743 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2744 (x86_64-*-linux*): Likewise.
2745 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2746 include arch/i386.h.
2747 (i386_linux_read_description): Remove code and call
2748 i386_create_target_description.
2749 * tdesc.c (allocate_target_description): New function.
2750 * tdesc.h (set_tdesc_architecture): Remove declaration.
2751 (set_tdesc_osabi): Likewise.
2753 2017-09-05 Yao Qi <yao.qi@linaro.org>
2755 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2756 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2757 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2759 * server.c (get_features_xml): Call tdesc_get_features_xml.
2760 * tdesc.c (set_tdesc_architecture): New function.
2761 (set_tdesc_osabi): New function.
2762 (tdesc_get_features_xml): New function.
2763 (tdesc_create_feature): Add an argument.
2764 * tdesc.h (struct target_desc) <features>: New field.
2765 <arch, osabi>: New field.
2766 (~target_desc): xfree features, arch, and osabi.
2767 (target_desc::oerator==): Don't compare .xmltarget.
2768 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2769 (set_tdesc_osabi): Likewise.
2770 (tdesc_get_features_xml): Likewise.
2772 2017-09-05 Yao Qi <yao.qi@linaro.org>
2774 * linux-x86-tdesc.c: Include selftest.h.
2775 (i386_tdesc_test): New function.
2776 (initialize_low_tdesc): Call selftests::register_test.
2777 * tdesc.h: Include regdef.h.
2778 (target_desc): Override operator == and !=.
2780 2017-09-05 Yao Qi <yao.qi@linaro.org>
2782 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2783 (ipa_obj): Likewise.
2784 * linux-i386-ipa.c: Include common/x86-xstate.h
2785 (get_ipa_tdesc): Call i386_linux_read_description.
2786 (initialize_low_tracepoint): Don't call init_registers_XXX
2787 functions, call initialize_low_tdesc instead.
2788 * linux-x86-low.c (x86_linux_read_description): Call
2789 i386_linux_read_description.
2790 (initialize_low_arch): Don't call init_registers_i386_XXX
2791 functions, call initialize_low_tdesc.
2792 * linux-x86-tdesc.c: New file.
2793 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2794 (i386_get_ipa_tdesc_idx): Declare.
2795 (i386_get_ipa_tdesc): Declare.
2796 (initialize_low_tdesc): Declare.
2798 2017-09-05 Yao Qi <yao.qi@linaro.org>
2800 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2803 2017-09-05 Yao Qi <yao.qi@linaro.org>
2805 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2806 * regcache.c (get_thread_regcache): Use VEC_length.
2807 (init_register_cache): Likewise.
2808 (regcache_cpy): Likewise.
2809 (registers_to_string): Iterate reg_defs via VEC_iterate.
2810 (find_regno): Likewise.
2811 (find_register_by_number): Use VEC_index.
2812 (register_size): Call find_register_by_number.
2813 (register_data): Call find_register_by_number.
2814 (supply_regblock): Use VEC_length.
2815 (regcache_raw_read_unsigned): Likewise.
2816 * tdesc.c (init_target_desc): Iterate reg_defs via
2818 (default_description): Update initializer.
2819 (copy_target_description): Don't update field num_registers.
2820 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2821 <num_registers>: Remove.
2823 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2825 * Makefile.in (.SECONDARY): Define target.
2827 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2829 * linux-low.c (linux_wait_1): Adjust.
2830 * server.c (queue_stop_reply_callback): Adjust.
2832 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2834 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2835 QEnvironmentUnset and QEnvironmentReset packets.
2836 (handle_query): Inform remote that QEnvironmentHexEncoded,
2837 QEnvironmentUnset and QEnvironmentReset are supported.
2839 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2841 * inferiors.h (inferior_target_data): Rename to ...
2842 (thread_target_data): ... this.
2843 (inferior_regcache_data): Rename to ...
2844 (thread_regcache_data): ... this.
2845 (set_inferior_regcache_data): Rename to ...
2846 (set_thread_regcache_data): ... this.
2847 * inferiors.c (inferior_target_data): Rename to ...
2848 (thread_target_data): ... this.
2849 (inferior_regcache_data): Rename to ...
2850 (thread_regcache_data): ... this.
2851 (set_inferior_regcache_data): Rename to ...
2852 (set_thread_regcache_data): ... this.
2853 (free_one_thread): Update.
2854 * linux-low.h (get_thread_lwp): Update.
2855 * regcache.c (get_thread_regcache): Update.
2856 (regcache_invalidate_thread): Update.
2857 (free_register_cache_thread): Update.
2858 * win32-i386-low.c (update_debug_registers_callback): Update.
2859 (win32_get_current_dr): Update.
2860 * win32-low.c (thread_rec): Update.
2861 (delete_thread_info): Update.
2862 (continue_one_thread): Update.
2863 (suspend_one_thread): Update.
2865 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2867 * inferiors.c (set_inferior_target_data): Remove.
2868 * inferiors.h (set_inferior_target_data): Remove.
2870 2017-08-18 Yao Qi <yao.qi@linaro.org>
2872 * Makefile.in (OBS): Add selftest.o.
2873 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2874 * configure, config.in: Re-generated.
2875 * server.c: Include common/sefltest.h.
2876 (captured_main): Handle option --selftest.
2878 2017-08-09 Yao Qi <yao.qi@linaro.org>
2880 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2881 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2882 i386-avx-mpx.o and i386-mmx.o.
2883 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2884 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2885 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2886 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2887 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2888 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2889 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2890 i386/amd64-avx-mpx.xml.
2892 2017-08-09 Yao Qi <yao.qi@linaro.org>
2894 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2895 and x32-avx-avx512.o.
2896 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2897 i386/x32-avx-avx512.xml.
2899 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2901 * tracepoint.h (enum class fast_tpoint_collect_result): New
2903 (fast_tracepoint_collecting): Change return type to
2904 fast_tpoint_collect_result.
2905 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2906 * linux-low.h: Include tracepoint.h.
2907 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2908 fast_tpoint_collect_result.
2909 * linux-low.c (handle_tracepoints): Adjust.
2910 (linux_fast_tracepoint_collecting): Change return type to
2911 fast_tpoint_collect_result.
2912 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2913 linux_wait_1, stuck_in_jump_pad_callback,
2914 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2915 proceed_one_lwp): Adjust to type change.
2917 2017-07-10 Yao Qi <yao.qi@linaro.org>
2919 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2921 2017-06-29 Yao Qi <yao.qi@linaro.org>
2923 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2925 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2927 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2929 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2931 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2933 * linux-low.c (linux_create_inferior): Adjust code to access the
2934 environment information via 'gdb_environ' class.
2935 * lynx-low.c (lynx_create_inferior): Likewise.
2936 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2937 (get_environ): Return a pointer to 'our_environ'.
2938 (captured_main): Initialize 'our_environ'.
2939 * server.h (get_environ): Adjust prototype.
2940 * spu-low.c (spu_create_inferior): Adjust code to access the
2941 environment information via 'gdb_environ' class.
2943 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2945 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2946 usage of "register" keyword.
2948 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2950 * configure: Re-generate.
2952 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2954 * configure: Re-generate.
2956 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2958 * Makefile.in (COMPILE.pre): Add "-x c++".
2960 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2962 * fork-child.c: Conditionally include <signal.h>.
2964 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2966 * server.c (handle_general_set): Handle new packet
2967 "QStartupWithShell".
2968 (handle_query): Add "QStartupWithShell" to the list of supported
2970 (gdbserver_usage): Add help text explaining the
2971 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2973 (captured_main): Recognize and act upon the presence of the new
2976 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2977 Pedro Alves <palves@redhat.com>
2979 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2980 * configure: Regenerate.
2981 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2983 (i[34567]86-*-lynxos*): Likewise.
2984 (spu*-*-*): Likewise.
2985 * fork-child.c: New file.
2986 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2988 (linux_ptrace_fun): New function.
2989 (linux_create_inferior): Adjust function prototype to reflect
2990 change on "target.h". Adjust function code to use
2992 (linux_request_interrupt): Delete "signal_pid".
2993 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2994 (lynx_ptrace_fun): New function.
2995 (lynx_create_inferior): Adjust function prototype to reflect
2996 change on "target.h". Adjust function code to use
2998 * nto-low.c (nto_create_inferior): Adjust function prototype and
2999 code to reflect change on "target.h". Update comments.
3000 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3001 "common-terminal.h" and "environ.h".
3002 (terminal_fd): Moved to fork-child.c.
3003 (old_foreground_pgrp): Likewise.
3004 (restore_old_foreground_pgrp): Likewise.
3005 (last_status): Make it global.
3006 (last_ptid): Likewise.
3007 (our_environ): New variable.
3008 (startup_with_shell): Likewise.
3009 (program_name): Likewise.
3010 (program_argv): Rename to...
3011 (program_args): ...this.
3012 (wrapper_argv): New variable.
3013 (start_inferior): Delete function.
3014 (get_exec_wrapper): New function.
3015 (get_exec_file): Likewise.
3016 (get_environ): Likewise.
3017 (prefork_hook): Likewise.
3018 (post_fork_inferior): Likewise.
3019 (postfork_hook): Likewise.
3020 (postfork_child_hook): Likewise.
3021 (handle_v_run): Update code to deal with arguments coming from the
3022 remote host. Update calls from "start_inferior" to
3024 (captured_main): Likewise. Initialize environment variable. Call
3026 * server.h (post_fork_inferior): New prototype.
3027 (get_environ): Likewise.
3028 (last_status): Declare.
3029 (last_ptid): Likewise.
3030 (signal_pid): Likewise.
3031 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3032 (spu_ptrace_fun): New function.
3033 (spu_create_inferior): Adjust function prototype to reflect change
3034 on "target.h". Adjust function code to use "fork_inferior".
3035 * target.c (target_terminal_init): New function.
3036 (target_terminal_inferior): Likewise.
3037 (target_terminal_ours): Likewise.
3038 * target.h: Include <vector>.
3039 (struct target_ops) <create_inferior>: Update prototype.
3040 (create_inferior): Update macro.
3041 * utils.c (gdb_flush_out_err): New function.
3042 * win32-low.c (win32_create_inferior): Adjust function prototype
3043 and code to reflect change on "target.h".
3045 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3047 * inferiors.c (switch_to_thread): New function.
3049 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3051 * Makefile.in (SFILE): Add "common/job-control.c".
3052 (OBS): Add "job-control.o".
3054 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3056 * Makefile: Remove "@host_makefile_frag@".
3058 2017-05-05 Pedro Alves <palves@redhat.com>
3060 * configure: Regenerate.
3062 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3064 * configure: Regenerate.
3066 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3068 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3069 software_single_step change of return type to
3070 std::vector<CORE_ADDR>.
3071 * linux-low.c (install_software_single_step_breakpoints):
3073 * linux-low.h (install_software_single_step_breakpoints):
3076 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3078 * remote-utils.c: Include "gdb_termios.h" instead of
3080 * terminal.h: Delete file.
3082 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3084 * server.c: Include <vector>.
3085 <program_argv, wrapper_argv>: Convert to std::vector.
3086 (start_inferior): Rewrite function to use C++.
3087 (handle_v_run): Likewise. Update code that calculates the argv
3088 based on the vRun packet; use C++.
3089 (captured_main): Likewise.
3091 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3093 * server.c (handle_v_cont): Initialize thread_resume::thread
3096 2017-04-05 Pedro Alves <palves@redhat.com>
3098 * configure: Regenerate.
3100 2017-04-05 Pedro Alves <palves@redhat.com>
3102 * gdbreplay.c (sync_error): Constify.
3103 * linux-x86-low.c (push_opcode): Constify.
3105 2017-04-05 Pedro Alves <palves@redhat.com>
3107 * win32-low.c (get_child_debug_event)
3108 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3109 Report TARGET_WAITKIND_SPURIOUS instead.
3111 2017-04-05 Pedro Alves <palves@redhat.com>
3113 * remote-utils.c (remote_prepare, remote_open): Constify.
3114 * remote-utils.h (remote_prepare, remote_open): Constify.
3115 * server.c (captured_main): Constify 'port' handling.
3117 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3119 * Makefile.in (clean): Clear .deps.
3121 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3123 * .gitignore: Remove generated files, replace with wildcard.
3124 * (clean): Replace removal of generated files with wildcard.
3125 (version.c): Replace with...
3126 (version-generated.c): ...this.
3127 (xml-builtin.c): Replace with...
3128 (xml-builtin-generated.c): ...this.
3129 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3130 (%.c: *regformats*): Replace with...
3131 (%-generated.c: *regformats*): ...this.
3133 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3135 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3136 (xtensa_fill_gregset): Call collect_register_by_name for
3138 (xtensa_store_gregset): Call supply_register_by_name for
3141 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3143 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3144 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3145 (xtensa_store_gregset): Call supply_register for all registers in
3146 a0_regnum..a0_regnum + C0_NREGS range.
3148 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3150 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3151 (ax-ipa.o: ax.c): Remove.
3152 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3153 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3154 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3155 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3156 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3158 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3160 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3161 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3162 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3163 (errors-ipa.o: ../common/errors.c): Remove.
3164 (format-ipa.o: ../common/format.c): Remove.
3165 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3167 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3169 * Makefile.in (%-ipa.o: %.c): New rule.
3170 (tracepoint-ipa.o: tracepoint.c): Remove.
3171 (utils-ipa.o: utils.c): Remove.
3172 (remote-utils-ipa.o: remote-utils.c): Remove.
3173 (regcache-ipa.o: regcache.c): Remove.
3174 (i386-linux-ipa.o: i386-linux.c): Remove.
3175 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3176 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3177 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3178 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3179 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3180 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3181 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3182 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3183 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3184 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3185 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3186 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3187 (aarch64-ipa.o: aarch64.c): Remove.
3188 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3189 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3190 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3191 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3192 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3193 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3194 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3195 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3196 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3197 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3198 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3199 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3200 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3201 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3202 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3203 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3204 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3205 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3206 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3207 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3208 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3209 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3210 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3211 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3212 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3213 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3214 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3215 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3216 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3217 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3218 (tdesc-ipa.o: tdesc.c): Remove.
3219 (x32-linux-ipa.o: x32-linux.c): Remove.
3220 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3221 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3223 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3225 * Makefile.in (%.o: ../arch/%.c): New rule.
3226 (arm.o: ../arch/arm.c): Remove.
3227 (arm-linux.o: ../arch/arm-linux.c): Remove.
3228 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3229 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3231 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3233 * Makefile.in (%.o: ../nat/%.c): New rule.
3234 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3235 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3236 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3237 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3238 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3239 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3240 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3241 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3242 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3243 (linux-personality.o: ../nat/linux-personality.c): Remove.
3244 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3245 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3246 (x86-linux.o: ../nat/x86-linux.c): Remove.
3247 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3248 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3250 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3252 * Makefile.in (%.o: ../common/%.c): New rule.
3253 (signals.o: ../common/signals.c): Remove.
3254 (print-utils.o: ../common/print-utils.c): Remove.
3255 (rsp-low.o: ../common/rsp-low.c): Remove.
3256 (common-utils.o: ../common/common-utils.c): Remove.
3257 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3258 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3259 (vec.o: ../common/vec.c): Remove.
3260 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3261 (xml-utils.o: ../common/xml-utils.c): Remove.
3262 (ptid.o: ../common/ptid.c): Remove.
3263 (buffer.o: ../common/buffer.c): Remove.
3264 (format.o: ../common/format.c): Remove.
3265 (filestuff.o: ../common/filestuff.c): Remove.
3266 (agent.o: ../common/agent.c): Remove.
3267 (errors.o: ../common/errors.c): Remove.
3268 (environ.o: ../common/environ.c): Remove.
3269 (common-debug.o: ../common/common-debug.c): Remove.
3270 (cleanups.o: ../common/cleanups.c): Remove.
3271 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3272 (fileio.o: ../common/fileio.c): Remove.
3273 (common-regcache.o: ../common/common-regcache.c): Remove.
3274 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3275 (new-op.o: ../common/new-op.c): Remove.
3276 (btrace-common.o: ../common/btrace-common.c): Remove.
3278 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3280 * Makefile.in (%.o: ../target/%.c): New rule.
3281 (waitstatus.o: ../target/waitstatus.c): Remove.
3283 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3286 (%.c: ../regformats/%.dat,
3287 (%.c: ../regformats/arm/%.dat,
3288 (%.c: ../regformats/i386/%.dat,
3289 (%.c: ../regformats/rs6000/%.dat): New rules.
3290 (aarch64.c): Remove.
3291 (reg-arm.c): Remove.
3292 (arm-with-iwmmxt.c): Remove.
3293 (arm-with-vfpv2.c): Remove.
3294 (arm-with-vfpv3.c): Remove.
3295 (arm-with-neon.c): Remove.
3296 (reg-bfin.c): Remove.
3297 (reg-cris.c): Remove.
3298 (reg-crisv32.c): Remove.
3300 (i386-linux.c): Remove.
3301 (i386-avx.c): Remove.
3302 (i386-avx-linux.c): Remove.
3303 (i386-avx-avx512.c): Remove.
3304 (i386-avx-avx512-linux.c): Remove.
3305 (i386-mpx.c): Remove.
3306 (i386-mpx-linux.c): Remove.
3307 (i386-avx-mpx-avx512-pku.c): Remove.
3308 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3309 (i386-avx-mpx.c): Remove.
3310 (i386-avx-mpx-linux.c): Remove.
3311 (i386-mmx.c): Remove.
3312 (i386-mmx-linux.c): Remove.
3313 (reg-ia64.c): Remove.
3314 (reg-m32r.c): Remove.
3315 (reg-m68k.c): Remove.
3317 (mips-linux.c): Remove.
3318 (mips-dsp-linux.c): Remove.
3319 (mips64-linux.c): Remove.
3320 (mips64-dsp-linux.c): Remove.
3321 (nios2-linux.c): Remove.
3322 (powerpc-32.c): Remove.
3323 (powerpc-32l.c): Remove.
3324 (powerpc-altivec32l.c): Remove.
3325 (powerpc-cell32l.c): Remove.
3326 (powerpc-vsx32l.c): Remove.
3327 (powerpc-isa205-32l.c): Remove.
3328 (powerpc-isa205-altivec32l.c): Remove.
3329 (powerpc-isa205-vsx32l.c): Remove.
3330 (powerpc-e500l.c): Remove.
3331 (powerpc-64l.c): Remove.
3332 (powerpc-altivec64l.c): Remove.
3333 (powerpc-cell64l.c): Remove.
3334 (powerpc-vsx64l.c): Remove.
3335 (powerpc-isa205-64l.c): Remove.
3336 (powerpc-isa205-altivec64l.c): Remove.
3337 (powerpc-isa205-vsx64l.c): Remove.
3338 (s390-linux32.c): Remove.
3339 (s390-linux32v1.c): Remove.
3340 (s390-linux32v2.c): Remove.
3341 (s390-linux64.c): Remove.
3342 (s390-linux64v1.c): Remove.
3343 (s390-linux64v2.c): Remove.
3344 (s390-te-linux64.c): Remove.
3345 (s390-vx-linux64.c): Remove.
3346 (s390-tevx-linux64.c): Remove.
3347 (s390x-linux64.c): Remove.
3348 (s390x-linux64v1.c): Remove.
3349 (s390x-linux64v2.c): Remove.
3350 (s390x-te-linux64.c): Remove.
3351 (s390x-vx-linux64.c): Remove.
3352 (s390x-tevx-linux64.c): Remove.
3353 (tic6x-c64xp-linux.c): Remove.
3354 (tic6x-c64x-linux.c): Remove.
3355 (tic6x-c62x-linux.c): Remove.
3357 (reg-sparc64.c): Remove.
3358 (reg-spu.c): Remove.
3360 (amd64-linux.c): Remove.
3361 (amd64-avx.c): Remove.
3362 (amd64-avx-linux.c): Remove.
3363 (amd64-avx-avx512.c): Remove.
3364 (amd64-avx-avx512-linux.c): Remove.
3365 (amd64-mpx.c): Remove.
3366 (amd64-mpx-linux.c): Remove.
3367 (amd64-avx-mpx-avx512-pku.c): Remove.
3368 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3369 (amd64-avx-mpx.c): Remove.
3370 (amd64-avx-mpx-linux.c): Remove.
3372 (x32-linux.c): Remove.
3373 (x32-avx.c): Remove.
3374 (x32-avx-linux.c): Remove.
3375 (x32-avx-avx512.c): Remove.
3376 (x32-avx-avx512-linux.c): Remove.
3377 (reg-xtensa.c): Remove.
3378 (reg-tilegx.c): Remove.
3379 (reg-tilegx32.c): Remove.
3381 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3383 * Makefile.in (SFILES): Add "common/environ.c".
3384 (OBJS): Add "common/environ.h".
3386 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3388 * configure.ac: Check if the fs_base and gs_base members of
3389 `struct user_regs_struct' exist.
3390 * config.in: Regenerated.
3391 * configure: Likewise.
3393 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3395 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3397 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3398 (get_next_pcs_syscall_next_pc): Likewise.
3400 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3402 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3403 * nto-x86-low.c: Likewise.
3405 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3407 * Makefile.in: Include disable-implicit-rules.mk.
3409 2016-11-23 Pedro Alves <palves@redhat.com>
3411 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3412 (debug_vprintf): Use std::chrono::steady_clock instead of
3413 gettimeofday. Use '.' instead of ':'.
3414 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3415 (get_timestamp): Use std::chrono::steady_clock instead of
3418 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3420 * Makefile.in: Fix whitespace formatting.
3422 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3424 * Makefile.in (SFILES, OBS): Flatten list and order
3427 2016-11-23 Pedro Alves <palves@redhat.com>
3429 * event-loop.c (handle_file_event): Use warning.
3430 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3431 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3434 2016-11-23 Pedro Alves <palves@redhat.com>
3436 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3438 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3439 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3440 debug_printf and debug_flush for debug output.
3441 * server.c (handle_general_set): Likewise.
3442 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3445 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3447 * Makefile.in (.c.o): Replace rule with ...
3448 (%.o: %.c): ... this one.
3450 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3452 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3453 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3455 * configure.ac: Remove checks for the make program.
3456 * configure: Re-generate.
3458 2016-10-28 Pedro Alves <palves@redhat.com>
3460 * Makefile.in (CXX_DIALECT): Get from configure.
3461 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3462 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3463 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3464 * config.in: Regenerate.
3465 * configure: Regenerate.
3467 2016-10-27 Yao Qi <yao.qi@linaro.org>
3469 * linux-low.c (linux_supports_range_stepping): Return true if
3470 can_software_single_step return true.
3472 2016-10-27 Yao Qi <yao.qi@linaro.org>
3474 * inferiors.c (find_inferior_in_random): New function.
3475 * inferiors.h (find_inferior_in_random): Declare.
3476 * linux-low.c (linux_wait_for_event_filtered): Call
3477 find_inferior_in_random instead of find_inferior.
3479 2016-10-27 Yao Qi <yao.qi@linaro.org>
3481 * linux-low.c (linux_wait_1): If single-step breakpoints are
3482 inserted, remove them.
3484 2016-10-26 Pedro Alves <palves@redhat.com>
3486 * linux-low.c (handle_extended_wait): Link parent/child fork
3488 (linux_wait_1): Unlink them.
3489 (linux_set_resume_request): Ignore resume requests for
3490 already-resumed and unhandled fork child threads.
3491 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3492 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3494 (handle_v_requests) <vCont>: Don't call require_running.
3495 * server.h (in_queued_stop_replies): New declaration.
3497 2016-10-24 Yao Qi <yao.qi@linaro.org>
3500 * linux-aarch64-low.c (append_insns): Cast the return value to
3503 2016-10-10 Yao Qi <yao.qi@linaro.org>
3505 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3507 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3509 * target.c (target_supports_multi_process): New function, moved
3511 * target.h (target_supports_multi_process): ... here. Remove
3514 2016-10-05 Tom Tromey <tom@tromey.com>
3517 * tracepoint.c (handle_tracepoint_bkpts): Check
3518 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3520 2016-10-05 Yao Qi <yao.qi@linaro.org>
3522 * configure.srv: Update the path of arm-*.xml files.
3524 2016-10-05 Terry Guo <terry.guo@arm.com>
3525 Yao Qi <yao.qi@linaro.org>
3527 * Makefile.in: Adjust the path of rules.
3528 * configure.srv: Update the path of xml files.
3529 * regformats/arm-with-iwmmxt.dat: Regenerated.
3530 * regformats/arm-with-neon.dat: Likewise.
3531 * regformats/arm-with-vfpv2.dat: Likewise.
3532 * regformats/arm-with-vfpv3.dat Likewise.
3534 2016-09-30 Yao Qi <yao.qi@linaro.org>
3537 * target.c (target_stop_and_wait): Don't call
3538 target_continue_no_signal, use resume_stop instead.
3540 2016-09-26 Yao Qi <yao.qi@linaro.org>
3542 * linux-low.c (linux_wait_1): Call debug_exit.
3544 2016-09-23 Pedro Alves <palves@redhat.com>
3546 * Makefile.in (SFILES): Add common/new-op.c.
3547 (OBS): Add common/new-op.o.
3548 (new-op.o): New rule.
3550 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3552 * .gitinore: Ignore more files.
3554 2016-09-21 Yao Qi <yao.qi@linaro.org>
3556 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3559 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3561 * server.c (start_inferior): Call target_mourn_inferior instead of
3562 mourn_inferior; pass ptid_t argument to it.
3564 (handle_target_event): Likewise.
3565 * target.c (target_mourn_inferior): New function.
3566 * target.h (mourn_inferior): Delete macro.
3568 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3570 * linux-low.c (lwp_is_stepping): New function.
3572 2016-09-06 Carl Love <cel@us.ibm.com>
3574 * server.c (start_inferior): Fixed comment, requested comment change
3575 didn't get updated correctly. Removed reference to ptrace () call as
3576 it is only true on Linux systems.
3578 2016-09-06 Carl Love <cel@us.ibm.com>
3580 * server.c (start_inferior): Do not call
3581 function target_post_create_inferior () if the
3582 inferior process has already exited.
3584 2016-09-05 Pedro Alves <palves@redhat.com>
3586 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3587 (COMPILE.pre, CC_LD): Use CXX directly.
3588 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3589 * acinclude.m4: Don't include build-with-cxx.m4.
3590 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3591 * configure: Regenerate.
3593 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3596 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3597 call writing data to own_buf.
3599 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3601 * target.c (mywait): Call target_wait instead of
3603 (target_wait): New function.
3605 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3607 * server.c (start_inferior): New variable 'ptid'. Replace calls
3608 to the_target->resume by target_continue{,_no_signal}, depending
3610 * target.c (target_stop_and_wait): Call target_continue_no_signal
3611 instead of the_target->resume.
3612 (target_continue): New function.
3614 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3616 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3618 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3621 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3623 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3624 * linux-arm-low.c (ps_get_thread_area): Likewise.
3625 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3626 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3627 * linux-mips-low.c (ps_get_thread_area): Likewise.
3628 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3629 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3630 * linux-x86-low.c (ps_get_thread_area): Likewise.
3631 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3633 2016-08-19 Pedro Alves <palves@redhat.com>
3635 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3637 2016-08-19 Pedro Alves <palves@redhat.com>
3639 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3640 comment. Use memcpy instead of casting through unsigned long.
3642 2016-08-19 Pedro Alves <palves@redhat.com>
3644 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3645 allocating around 0x80000000.
3647 2016-08-19 Pedro Alves <palves@redhat.com>
3650 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3651 (x32-avx512-linux-ipa.o): New rules.
3652 * configure.ac (x86_64-*-linux*): New x32 check.
3653 * configure.srv (ipa_x32_linux_regobj): New.
3654 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3655 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3657 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3659 * configure: Regenerate.
3661 2016-08-09 Pedro Alves <palves@redhat.com>
3664 * Makefile.in (OBS): Add signals-state-save-restore.o.
3665 (signals-state-save-restore.o): New rule.
3666 * config.in: Regenerate.
3667 * configure: Regenerate.
3668 * linux-low.c: Include "signals-state-save-restore.h".
3669 (linux_create_inferior): Call
3670 restore_original_signals_state.
3671 * server.c: Include "dispositions-save-restore.h".
3672 (captured_main): Call save_original_signals_state.
3674 2016-08-05 Pedro Alves <palves@redhat.com>
3676 * configure: Regenerate.
3678 2016-08-04 Yao Qi <yao.qi@linaro.org>
3680 * linux-low.c (regsets_fetch_inferior_registers): Check
3681 errno is ESRCH or not.
3683 2016-08-02 Yao Qi <yao.qi@linaro.org>
3685 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3686 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3687 (thread_db_load_search): Update.
3688 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3689 td_ta_set_event and td_ta_event_getmsg.
3691 2016-07-26 Pedro Alves <palves@redhat.com>
3694 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3695 of unsigned long for 64-bit registers and use uint32_t instead of
3696 unsigned int for 32-bit registers.
3698 2016-07-26 Pedro Alves <palves@redhat.com>
3700 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3703 2016-07-21 Tom Tromey <tom@tromey.com>
3705 * configure: Rebuild.
3707 2016-07-21 Yao Qi <yao.qi@linaro.org>
3709 * mem-break.c (find_gdb_breakpoint): Cast bp to
3710 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3712 2016-07-21 Yao Qi <yao.qi@linaro.org>
3714 * server.c (handle_v_requests): Support s and S actions
3715 if target_supports_software_single_step return true.
3717 2016-07-21 Yao Qi <yao.qi@linaro.org>
3719 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3720 is resume_step, call maybe_hw_step.
3721 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3723 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3725 (proceed_one_lwp): If resume request is resume_step, install
3726 reinsert breakpoints and call maybe_hw_step.
3728 2016-07-21 Yao Qi <yao.qi@linaro.org>
3730 * linux-low.c (proceed_one_lwp): Declare.
3731 (linux_resume_one_thread): Remove local variable 'step'.
3732 Lift code enqueue signal. Call proceed_one_lwp instead of
3733 linux_resume_one_lwp.
3735 2016-07-21 Yao Qi <yao.qi@linaro.org>
3737 * linux-low.c (linux_resume_one_thread): Call
3738 enqueue_pending_signal.
3740 2016-07-21 Yao Qi <yao.qi@linaro.org>
3742 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3743 * inferiors.c (do_restore_current_thread_cleanup): New function.
3744 (make_cleanup_restore_current_thread): Likewise.
3745 * linux-low.c (install_software_single_step_breakpoints): Call
3746 make_cleanup_restore_current_thread. Switch current_thread to
3749 2016-07-21 Yao Qi <yao.qi@linaro.org>
3751 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3752 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3753 (clone_one_breakpoint): Likewise.
3754 (delete_reinsert_breakpoints): Change parameter to thread.
3756 (has_reinsert_breakpoints): Likewise.
3757 (uninsert_reinsert_breakpoints): Likewise.
3758 (reinsert_reinsert_breakpoints): Likewise.
3759 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3760 (delete_reinsert_breakpoints): Likewise.
3761 (reinsert_reinsert_breakpoints): Likewise.
3762 (uninsert_reinsert_breakpoints): Likewise.
3763 (has_reinsert_breakpoints): Likewise.
3765 2016-07-21 Yao Qi <yao.qi@linaro.org>
3767 * inferiors.c (get_thread_process): Make parameter const.
3768 * inferiors.h (get_thread_process): Update declaration.
3769 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3770 Add new parameters child_thread and parent_thread. Callers
3772 * mem-break.h (clone_all_breakpoints): Update declaration.
3774 2016-07-21 Yao Qi <yao.qi@linaro.org>
3776 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3777 <command_list, handler>: Remove.
3778 (struct gdb_breakpoint): New.
3779 (struct other_breakpoint): New.
3780 (struct reinsert_breakpoint): New.
3781 (is_gdb_breakpoint): New function.
3782 (any_persistent_commands): Update command_list if
3783 is_gdb_breakpoint returns true.
3784 (set_breakpoint): Create breakpoints according to their types.
3785 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3786 (set_gdb_breakpoint_1): Likewise.
3787 (set_gdb_breakpoint): Likewise.
3788 (clear_breakpoint_conditions): Change parameter type to
3789 'struct gdb_breakpoint *'.
3790 (clear_breakpoint_commands): Likewise.
3791 (clear_breakpoint_conditions_and_commands): Likewise.
3792 (add_condition_to_breakpoint): Likewise.
3793 (add_breakpoint_condition): Likewise.
3794 (add_commands_to_breakpoint): Likewise.
3795 (check_breakpoints): Check other_breakpoint.
3796 (clone_one_breakpoint): Clone breakpopint according to its type.
3797 * mem-break.h (struct gdb_breakpoint): Declare.
3798 (set_gdb_breakpoint): Update declaration.
3799 (clear_breakpoint_conditions_and_commands): Likewise.
3800 (add_breakpoint_condition): Likewise.
3801 (add_breakpoint_commands): Likewise.
3802 * server.c (process_point_options): Change parameter type to
3803 'struct gdb_breakpoint *'.
3805 2016-07-21 Yao Qi <yao.qi@linaro.org>
3807 * mem-break.c (set_breakpoint_at): Rename it to ...
3808 (set_breakpoint_type_at): ... it.
3809 (set_breakpoint_at): Call set_breakpoint_type_at.
3810 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3811 * mem-break.h (set_breakpoint_at): Update comments.
3813 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3815 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3817 (nios2_store_gregset): Likewise.
3819 2016-07-01 Pedro Alves <palves@redhat.com>
3820 Antoine Tremblay <antoine.tremblay@ericsson.com>
3822 * linux-low.c: Change interface to take the target lwp_info
3823 pointer directly and return void. Handle detaching from a zombie
3825 (linux_detach_lwp_callback): New function.
3826 (linux_detach): Detach from the leader thread after detaching from
3829 2016-06-28 Yao Qi <yao.qi@linaro.org>
3831 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3832 for variable new_offset.
3833 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3834 (aarch64_ftrace_insn_reloc_cb): Likewise.
3835 (aarch64_ftrace_insn_reloc_tb): Likewise.
3836 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3837 PRIx64 instead of PRIx32.
3839 2016-06-28 Yao Qi <yao.qi@linaro.org>
3841 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3842 (the_low_target): Install arm_get_syscall_trapinfo.
3844 2016-06-28 Yao Qi <yao.qi@linaro.org>
3846 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3848 (the_low_target): Install aarch64_get_syscall_trapinfo.
3850 2016-06-28 Yao Qi <yao.qi@linaro.org>
3852 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3854 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3855 Remove parameter sysno.
3856 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3859 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3861 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3862 (s390_emit_ne_goto): Likewise.
3863 (s390_emit_lt_goto): Likewise.
3864 (s390_emit_le_goto): Likewise.
3865 (s390_emit_gt_goto): Likewise.
3866 (s390_emit_ge_goto): Likewise.
3867 (s390x_emit_eq_goto): Likewise.
3868 (s390x_emit_ne_goto): Likewise.
3869 (s390x_emit_lt_goto): Likewise.
3870 (s390x_emit_le_goto): Likewise.
3871 (s390x_emit_gt_goto): Likewise.
3872 (s390x_emit_ge_goto): Likewise.
3873 (s390_emit_ops_impl): Mark variable static.
3874 (s390x_emit_ops): Likewise.
3876 2016-06-17 Yao Qi <yao.qi@linaro.org>
3878 * linux-low.c (handle_extended_wait): Call
3879 uninsert_reinsert_breakpoints for the parent process. Remove
3880 reinsert breakpoints from the child process. Reinsert them to
3881 the parent process when vfork is done.
3882 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3883 (reinsert_reinsert_breakpoints): New function.
3884 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3885 (reinsert_reinsert_breakpoints): Declare.
3887 2016-06-17 Yao Qi <yao.qi@linaro.org>
3889 * linux-low.c (handle_extended_wait): If the parent is doing
3890 step-over, remove the reinsert breakpoints from the forked child.
3892 2016-06-17 Yao Qi <yao.qi@linaro.org>
3894 * linux-low.c (unsuspend_all_lwps): Declare.
3895 (linux_low_filter_event): If thread exited, call finish_step_over.
3896 If step-over is finished, unsuspend other threads.
3898 2016-06-17 Yao Qi <yao.qi@linaro.org>
3900 * linux-low.c (linux_resume_one_lwp_throw): Assert
3901 has_reinsert_breakpoints returns false.
3902 * mem-break.c (delete_disabled_breakpoints): Assert
3903 bp type isn't reinsert_breakpoint.
3905 2016-06-17 Yao Qi <yao.qi@linaro.org>
3907 * linux-low.c (maybe_hw_step): New function.
3908 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3909 (finish_step_over): Switch current_thread to lwp temporarily,
3910 and assert has_reinsert_breakpoints returns true.
3911 (proceed_one_lwp): Call maybe_hw_step.
3912 * mem-break.c (has_reinsert_breakpoints): New function.
3913 * mem-break.h (has_reinsert_breakpoints): Declare.
3915 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3917 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3919 2016-05-17 Yao Qi <yao.qi@linaro.org>
3921 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3922 instead of find_inferior.
3924 2016-05-05 Yao Qi <yao.qi@linaro.org>
3926 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3927 Initialize res to zero.
3929 2016-05-05 Yao Qi <yao.qi@linaro.org>
3931 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3934 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3936 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3937 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3938 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3940 2016-04-28 Par Olsson <par.olsson@windriver.com>
3941 Simon Marchi <simon.marchi@ericsson.com>
3943 * tracepoint.c (write_inferior_int8): New function.
3944 (cmd_qtenable_disable): Write enable flag using
3945 write_inferior_int8.
3947 2016-04-25 Yao Qi <yao.qi@linaro.org>
3949 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3950 (need_step_over_p): Return zero if the LWP has pending signals
3951 can be delivered on software single step target.
3953 2016-04-25 Yao Qi <yao.qi@linaro.org>
3955 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3956 return instead of error.
3958 2016-04-22 Yao Qi <yao.qi@linaro.org>
3960 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3963 2016-04-22 Yao Qi <yao.qi@linaro.org>
3965 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3966 signal when stepping over breakpoint with software single
3969 2016-04-21 Pedro Alves <palves@redhat.com>
3971 * linux-s390-low.c (s390_collect_ptrace_register)
3972 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3974 (s390_check_regset): Use void * instead of gdb_byte *.
3976 2016-04-20 Pedro Alves <palves@redhat.com>
3978 * configure: Renegerate.
3980 2016-04-20 Yao Qi <yao.qi@linaro.org>
3982 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3983 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3985 (arm_store_gregset): Likewise.
3987 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3989 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3990 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3991 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3992 (amd64-avx-mpx-linux.c): New rules.
3993 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3994 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3995 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3996 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3997 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3998 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3999 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4000 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4001 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4002 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4003 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4004 * linux-x86-low.c (x86_linux_read_description): Add case for
4005 X86_XSTATE_AVX_MPX_MASK.
4006 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4007 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4008 init_registers_i386_avx_mpx_linux.
4009 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4010 (initialize_low_tracepoint): Call
4011 init_registers_i386_avx_mpx_linux.
4012 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4013 (initialize_low_tracepoint): Call
4014 init_registers_amd64_avx_mpx_linux.
4015 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4016 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4017 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4020 2016-04-18 Pedro Alves <palves@redhat.com>
4022 * configure: Regenerate.
4024 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4026 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4027 (aarch64_emit_sub): Likewise.
4029 2016-04-12 Pedro Alves <palves@redhat.com>
4031 * utils.c (prepare_to_throw_exception): Delete.
4033 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4035 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4037 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4039 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4041 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4043 * linux-aarch64-ipa.c: Add <elf.h> include.
4044 * linux-ppc-ipa.c: Add <elf.h> include.
4045 * linux-s390-ipa.c: Add <elf.h> include.
4047 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4049 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4050 (get_raw_reg_ptr): Likewise.
4051 (get_trace_state_variable_value_ptr): Likewise.
4052 (set_trace_state_variable_value_ptr): Likewise.
4053 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4056 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4057 Marcin Kościelnicki <koriakin@0x04.net>
4060 * linux-ppc-low.c (emit_insns): New function.
4061 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4062 (ppc_emit_prologue): New function.
4063 (ppc_emit_epilogue): New function.
4064 (ppc_emit_add): New function.
4065 (ppc_emit_sub): New function.
4066 (ppc_emit_mul): New function.
4067 (ppc_emit_lsh): New function.
4068 (ppc_emit_rsh_signed): New function.
4069 (ppc_emit_rsh_unsigned): New function.
4070 (ppc_emit_ext): New function.
4071 (ppc_emit_zero_ext): New function.
4072 (ppc_emit_log_not): New function.
4073 (ppc_emit_bit_and): New function.
4074 (ppc_emit_bit_or): New function.
4075 (ppc_emit_bit_xor): New function.
4076 (ppc_emit_bit_not): New function.
4077 (ppc_emit_equal): New function.
4078 (ppc_emit_less_signed): New function.
4079 (ppc_emit_less_unsigned): New function.
4080 (ppc_emit_ref): New function.
4081 (ppc_emit_const): New function.
4082 (ppc_emit_reg): New function.
4083 (ppc_emit_pop): New function.
4084 (ppc_emit_stack_flush): New function.
4085 (ppc_emit_swap): New function.
4086 (ppc_emit_stack_adjust): New function.
4087 (ppc_emit_call): New function.
4088 (ppc_emit_int_call_1): New function.
4089 (ppc_emit_void_call_2): New function.
4090 (ppc_emit_if_goto): New function.
4091 (ppc_emit_goto): New function.
4092 (ppc_emit_eq_goto): New function.
4093 (ppc_emit_ne_goto): New function.
4094 (ppc_emit_lt_goto): New function.
4095 (ppc_emit_le_goto): New function.
4096 (ppc_emit_gt_goto): New function.
4097 (ppc_emit_ge_goto): New function.
4098 (ppc_write_goto_address): New function.
4099 (ppc_emit_ops_impl): New static variable.
4100 (ppc64v1_emit_prologue): New function.
4101 (ppc64v2_emit_prologue): New function.
4102 (ppc64_emit_epilogue): New function.
4103 (ppc64_emit_add): New function.
4104 (ppc64_emit_sub): New function.
4105 (ppc64_emit_mul): New function.
4106 (ppc64_emit_lsh): New function.
4107 (ppc64_emit_rsh_signed): New function.
4108 (ppc64_emit_rsh_unsigned): New function.
4109 (ppc64_emit_ext): New function.
4110 (ppc64_emit_zero_ext): New function.
4111 (ppc64_emit_log_not): New function.
4112 (ppc64_emit_bit_and): New function.
4113 (ppc64_emit_bit_or): New function.
4114 (ppc64_emit_bit_xor): New function.
4115 (ppc64_emit_bit_not): New function.
4116 (ppc64_emit_equal): New function.
4117 (ppc64_emit_less_signed): New function.
4118 (ppc64_emit_less_unsigned): New function.
4119 (ppc64_emit_ref): New function.
4120 (ppc64_emit_const): New function.
4121 (ppc64v1_emit_reg): New function.
4122 (ppc64v2_emit_reg): New function.
4123 (ppc64_emit_pop): New function.
4124 (ppc64_emit_stack_flush): New function.
4125 (ppc64_emit_swap): New function.
4126 (ppc64v1_emit_call): New function.
4127 (ppc64v2_emit_call): New function.
4128 (ppc64v1_emit_int_call_1): New function.
4129 (ppc64v2_emit_int_call_1): New function.
4130 (ppc64v1_emit_void_call_2): New function.
4131 (ppc64v2_emit_void_call_2): New function.
4132 (ppc64_emit_if_goto): New function.
4133 (ppc64_emit_eq_goto): New function.
4134 (ppc64_emit_ne_goto): New function.
4135 (ppc64_emit_lt_goto): New function.
4136 (ppc64_emit_le_goto): New function.
4137 (ppc64_emit_gt_goto): New function.
4138 (ppc64_emit_ge_goto): New function.
4139 (ppc64v1_emit_ops_impl): New static variable.
4140 (ppc64v2_emit_ops_impl): New static variable.
4141 (ppc_emit_ops): New function.
4142 (linux_low_target): Wire in ppc_emit_ops.
4144 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4145 Marcin Kościelnicki <koriakin@0x04.net>
4148 * Makefile.in: Add powerpc-*-ipa.o
4149 * configure.srv: Add ipa_obj for powerpc*-linux.
4150 * linux-ppc-ipa.c: New file.
4151 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4153 (PPC_FIELD): New macro.
4154 (PPC_SEXT): New macro.
4155 (PPC_OP6): New macro.
4156 (PPC_BO): New macro.
4157 (PPC_LI): New macro.
4158 (PPC_BD): New macro.
4159 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4160 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4161 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4162 (ppc_get_thread_area): New function.
4163 (is_elfv2_inferior): New function.
4164 (gen_ds_form): New function.
4165 (GEN_STD): New macro.
4166 (GEN_STDU): New macro.
4167 (GEN_LD): New macro.
4168 (GEN_LDU): New macro.
4169 (gen_d_form): New function.
4170 (GEN_ADDI): New macro.
4171 (GEN_ADDIS): New macro.
4172 (GEN_LI): New macro.
4173 (GEN_LIS): New macro.
4174 (GEN_ORI): New macro.
4175 (GEN_ORIS): New macro.
4176 (GEN_LWZ): New macro.
4177 (GEN_STW): New macro.
4178 (GEN_STWU): New macro.
4179 (gen_xfx_form): New function.
4180 (GEN_MFSPR): New macro.
4181 (GEN_MTSPR): New macro.
4182 (GEN_MFCR): New macro.
4183 (GEN_MTCR): New macro.
4184 (GEN_SYNC): New macro.
4185 (GEN_LWSYNC): New macro.
4186 (gen_x_form): New function.
4187 (GEN_OR): New macro.
4188 (GEN_MR): New macro.
4189 (GEN_LWARX): New macro.
4190 (GEN_STWCX): New macro.
4191 (GEN_CMPW): New macro.
4192 (gen_md_form): New function.
4193 (GEN_RLDICL): New macro.
4194 (GEN_RLDICR): New macro.
4195 (gen_i_form): New function.
4197 (GEN_BL): New macro.
4198 (gen_b_form): New function.
4199 (GEN_BNE): New macro.
4200 (GEN_LOAD): New macro.
4201 (GEN_STORE): New macro.
4202 (gen_limm): New function.
4203 (gen_atomic_xchg): New function.
4204 (gen_call): New function.
4205 (ppc_relocate_instruction): New function.
4206 (ppc_install_fast_tracepoint_jump_pad): New function.
4207 (ppc_get_min_fast_tracepoint_insn_len): New function.
4208 (ppc_get_ipa_tdesc_idx): New function.
4209 (the_low_target): Wire in the new functions.
4210 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4212 * linux-ppc-tdesc.h: New file.
4214 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4216 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4217 (alloc_jump_pad_buffer): New function.
4218 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4219 (alloc_jump_pad_buffer): New function.
4220 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4221 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4222 (alloc_jump_pad_buffer): New function.
4223 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4224 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4225 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4226 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4228 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4230 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4231 * linux-amd64-ipa.c: Likewise.
4232 * linux-i386-ipa.c: Likewise.
4233 * linux-s390-ipa.c: Likewise.
4234 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4235 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4236 set_trace_state_variable_value_ptr.
4237 (struct ipa_sym_addresses): Likewise.
4238 (symbol_list): Likewise.
4239 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4240 accessing gdb_collect directly.
4241 (gdb_collect_ptr_type): New typedef.
4242 (get_raw_reg_ptr_type): New typedef.
4243 (get_trace_state_variable_value_ptr_type): New typedef.
4244 (set_trace_state_variable_value_ptr_type): New typedef.
4245 (gdb_collect_ptr): New global.
4246 (get_raw_reg_ptr): New global.
4247 (get_trace_state_variable_value_ptr): New global.
4248 (set_trace_state_variable_value_ptr): New global.
4249 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4250 accessing get_raw_reg directly.
4251 (get_get_tsv_func_addr): Likewise for
4252 get_trace_state_variable_value_ptr.
4253 (get_set_tsv_func_addr): Likewise for
4254 set_trace_state_variable_value_ptr.
4255 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4257 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4259 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4261 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4263 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4265 (relocate_instruction): Remove own_buf.
4266 * server.c (own_buf): Make global.
4267 (handle_v_requests): Make global.
4268 * server.h (own_buf): New declaration.
4269 (handle_v_requests): New prototype.
4271 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4274 * linux-s390-low.c (add_insns): New function.
4275 (s390_emit_prologue): New function.
4276 (s390_emit_epilogue): New function.
4277 (s390_emit_add): New function.
4278 (s390_emit_sub): New function.
4279 (s390_emit_mul): New function.
4280 (s390_emit_lsh): New function.
4281 (s390_emit_rsh_signed): New function.
4282 (s390_emit_rsh_unsigned): New function.
4283 (s390_emit_ext): New function.
4284 (s390_emit_log_not): New function.
4285 (s390_emit_bit_and): New function.
4286 (s390_emit_bit_or): New function.
4287 (s390_emit_bit_xor): New function.
4288 (s390_emit_bit_not): New function.
4289 (s390_emit_equal): New function.
4290 (s390_emit_less_signed): New function.
4291 (s390_emit_less_unsigned): New function.
4292 (s390_emit_ref): New function.
4293 (s390_emit_if_goto): New function.
4294 (s390_emit_goto): New function.
4295 (s390_write_goto_address): New function.
4296 (s390_emit_litpool): New function.
4297 (s390_emit_const): New function.
4298 (s390_emit_call): New function.
4299 (s390_emit_reg): New function.
4300 (s390_emit_pop): New function.
4301 (s390_emit_stack_flush): New function.
4302 (s390_emit_zero_ext): New function.
4303 (s390_emit_swap): New function.
4304 (s390_emit_stack_adjust): New function.
4305 (s390_emit_set_r2): New function.
4306 (s390_emit_int_call_1): New function.
4307 (s390_emit_void_call_2): New function.
4308 (s390_emit_eq_goto): New function.
4309 (s390_emit_ne_goto): New function.
4310 (s390_emit_lt_goto): New function.
4311 (s390_emit_le_goto): New function.
4312 (s390_emit_gt_goto): New function.
4313 (s390_emit_ge_goto): New function.
4314 (s390x_emit_prologue): New function.
4315 (s390x_emit_epilogue): New function.
4316 (s390x_emit_add): New function.
4317 (s390x_emit_sub): New function.
4318 (s390x_emit_mul): New function.
4319 (s390x_emit_lsh): New function.
4320 (s390x_emit_rsh_signed): New function.
4321 (s390x_emit_rsh_unsigned): New function.
4322 (s390x_emit_ext): New function.
4323 (s390x_emit_log_not): New function.
4324 (s390x_emit_bit_and): New function.
4325 (s390x_emit_bit_or): New function.
4326 (s390x_emit_bit_xor): New function.
4327 (s390x_emit_bit_not): New function.
4328 (s390x_emit_equal): New function.
4329 (s390x_emit_less_signed): New function.
4330 (s390x_emit_less_unsigned): New function.
4331 (s390x_emit_ref): New function.
4332 (s390x_emit_if_goto): New function.
4333 (s390x_emit_const): New function.
4334 (s390x_emit_call): New function.
4335 (s390x_emit_reg): New function.
4336 (s390x_emit_pop): New function.
4337 (s390x_emit_stack_flush): New function.
4338 (s390x_emit_zero_ext): New function.
4339 (s390x_emit_swap): New function.
4340 (s390x_emit_stack_adjust): New function.
4341 (s390x_emit_int_call_1): New function.
4342 (s390x_emit_void_call_2): New function.
4343 (s390x_emit_eq_goto): New function.
4344 (s390x_emit_ne_goto): New function.
4345 (s390x_emit_lt_goto): New function.
4346 (s390x_emit_le_goto): New function.
4347 (s390x_emit_gt_goto): New function.
4348 (s390x_emit_ge_goto): New function.
4349 (s390_emit_ops): New function.
4350 (struct linux_target_ops): Fill in emit_ops hook.
4352 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4355 * Makefile.in: Add s390 IPA files.
4356 * configure.srv: Build IPA for s390.
4357 * linux-s390-ipa.c: New file.
4358 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4359 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4360 (tdesc_s390_linux32): Likewise.
4361 (init_registers_s390_linux32v1): Likewise.
4362 (tdesc_s390_linux32v1): Likewise.
4363 (init_registers_s390_linux32v2): Likewise.
4364 (tdesc_s390_linux32v2): Likewise.
4365 (init_registers_s390_linux64): Likewise.
4366 (tdesc_s390_linux64): Likewise.
4367 (init_registers_s390_linux64v1): Likewise.
4368 (tdesc_s390_linux64v1): Likewise.
4369 (init_registers_s390_linux64v2): Likewise.
4370 (tdesc_s390_linux64v2): Likewise.
4371 (init_registers_s390_te_linux64): Likewise.
4372 (tdesc_s390_te_linux64): Likewise.
4373 (init_registers_s390_vx_linux64): Likewise.
4374 (tdesc_s390_vx_linux64): Likewise.
4375 (init_registers_s390_tevx_linux64): Likewise.
4376 (tdesc_s390_tevx_linux64): Likewise.
4377 (init_registers_s390x_linux64): Likewise.
4378 (tdesc_s390x_linux64): Likewise.
4379 (init_registers_s390x_linux64v1): Likewise.
4380 (tdesc_s390x_linux64v1): Likewise.
4381 (init_registers_s390x_linux64v2): Likewise.
4382 (tdesc_s390x_linux64v2): Likewise.
4383 (init_registers_s390x_te_linux64): Likewise.
4384 (tdesc_s390x_te_linux64): Likewise.
4385 (init_registers_s390x_vx_linux64): Likewise.
4386 (tdesc_s390x_vx_linux64): Likewise.
4387 (init_registers_s390x_tevx_linux64): Likewise.
4388 (tdesc_s390x_tevx_linux64): Likewise.
4389 (have_hwcap_s390_vx): New static variable.
4390 (s390_arch_setup): Fill have_hwcap_s390_vx.
4391 (s390_get_thread_area): New function.
4392 (s390_ft_entry_gpr_esa): New const.
4393 (s390_ft_entry_gpr_zarch): New const.
4394 (s390_ft_entry_misc): New const.
4395 (s390_ft_entry_fr): New const.
4396 (s390_ft_entry_vr): New const.
4397 (s390_ft_main_31): New const.
4398 (s390_ft_main_64): New const.
4399 (s390_ft_exit_fr): New const.
4400 (s390_ft_exit_vr): New const.
4401 (s390_ft_exit_misc): New const.
4402 (s390_ft_exit_gpr_esa): New const.
4403 (s390_ft_exit_gpr_zarch): New const.
4404 (append_insns): New function.
4405 (s390_relocate_instruction): New function.
4406 (s390_install_fast_tracepoint_jump_pad): New function.
4407 (s390_get_min_fast_tracepoint_insn_len): New function.
4408 (s390_get_ipa_tdesc_idx): New function.
4409 (struct linux_target_ops): Wire in the above functions.
4410 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4411 * linux-s390-tdesc.h: New file.
4413 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4415 * linux-s390-low.c (s390_supports_tracepoints): New function.
4416 (struct linux_target_ops): Fill supports_tracepoints hook.
4418 2016-03-18 Yao Qi <yao.qi@linaro.org>
4420 * linux-low.c (lwp_signal_can_be_delivered): New function.
4421 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4423 2016-03-18 Yao Qi <yao.qi@linaro.org>
4425 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4426 0 if signal is enqueued. Remove 'signal' from one debugging
4427 message. Move one debugging message to some lines below.
4428 Remove code setting 'signal' to 0.
4430 2016-03-18 Yao Qi <yao.qi@linaro.org>
4432 * linux-low.c (linux_low_filter_event): Remove redundant
4433 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4435 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4437 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4438 (struct linux_target_ops): Wire in the above.
4440 2016-03-03 Yao Qi <yao.qi@linaro.org>
4442 * linux-low.c: Update comments to start_step_over.
4444 2016-03-03 Yao Qi <yao.qi@linaro.org>
4447 * linux-low.c (handle_extended_wait): Set child suspended
4448 if event_lwp->bp_reinsert isn't zero.
4450 2016-03-02 Yao Qi <yao.qi@linaro.org>
4452 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4453 enqueue_pending_signal.
4455 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4457 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4460 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4462 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4463 (s390_regmap_3264) [!__s390x__]: New global.
4464 (s390_collect_ptrace_register): Skip map entries containing -1.
4465 (s390_supply_ptrace_register): Ditto.
4466 (s390_fill_gprs_high): New function.
4467 (s390_store_gprs_high): New function.
4468 (s390_regsets): Add NT_S390_HIGH_GPRS.
4469 (s390_get_hwcap): Enable on 31-bit.
4470 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4471 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4472 Detect NT_S390_HIGH_GPRS.
4473 (s390_usrregs_info_3264): Enable on 31-bit.
4474 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4475 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4477 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4480 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4481 * configure.srv: Ditto.
4482 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4483 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4484 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4485 (init_registers_amd64_linux): Remove prototype.
4486 (tdesc_amd64_linux): Remove declaration.
4487 (get_ipa_tdesc): New function.
4488 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4489 initialize remaining tdescs.
4490 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4491 (init_registers_i386_linux): Remove prototype.
4492 (tdesc_i386_linux): Remove declaration.
4493 (get_ipa_tdesc): New function.
4494 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4495 initialize remaining tdescs.
4496 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4497 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4498 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4499 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4500 (x86_get_ipa_tdesc_idx): New function.
4501 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4502 * linux-x86-tdesc.h: New file.
4503 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4504 (target_get_ipa_tdesc_idx): New macro.
4505 * tracepoint.c (ipa_tdesc_idx): New macro.
4506 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4507 (symbol_list): Add ipa_tdesc_idx.
4508 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4509 (ipa_tdesc): Remove.
4510 (ipa_tdesc_idx): New variable.
4511 (get_context_regcache): Use get_ipa_tdesc.
4512 (gdb_collect): Ditto.
4514 * tracepoint.h (get_ipa_tdesc): New prototype.
4515 (ipa_tdesc): Remove.
4517 2016-02-24 Pedro Alves <palves@redhat.com>
4519 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4520 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4521 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4522 Factor out common code between the USE_SIGTRAP_SIGINFO and
4523 !USE_SIGTRAP_SIGINFO blocks.
4524 (linux_low_filter_event): Call save_stop_reason instead of
4525 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4527 (linux_wait_1): Update comments.
4529 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4531 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4532 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4533 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4534 ppc_insert_point, ppc_remove_point.
4536 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4538 * linux-s390-low.c (s390_supports_z_point_type): New function.
4539 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4541 2016-02-16 Yao Qi <yao.qi@linaro.org>
4543 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4544 PC. Get pc from regcache_read_pc.
4546 2016-02-12 Yao Qi <yao.qi@linaro.org>
4548 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4549 or linux_get_pc_32bit.
4550 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4552 2016-02-12 Yao Qi <yao.qi@linaro.org>
4554 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4555 arm_linux_get_next_pcs_fixup.
4557 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4559 * tracepoint.c (x_tracepoint_action_download): Change
4560 write_inferior_data_ptr to write_inferior_data_pointer.
4561 (cmd_qtstart): Likewise.
4562 (write_inferior_data_ptr): Remove.
4563 (download_agent_expr): Change write_inferior_data_ptr to
4564 write_inferior_data_pointer.
4565 (download_tracepoint_1): Likewise.
4566 (download_tracepoint): Likewise.
4567 (download_trace_state_variables): Likewise.
4569 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4570 Marcin Kościelnicki <koriakin@0x04.net>
4572 * tracepoint.c (struct tracepoint_action_ops): Remove.
4573 (struct tracepoint_action): Remove ops.
4574 (m_tracepoint_action_download, r_tracepoint_action_download)
4575 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4576 size and offset accordingly.
4577 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4578 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4579 (tracepoint_action_send, tracepoint_action_download): New functions.
4580 Helpers for trace action handlers.
4581 (add_tracepoint_action): Remove setup actions ops.
4582 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4584 2016-02-10 Yao Qi <yao.qi@linaro.org>
4586 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4588 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4590 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4592 * configure: Regenerate.
4594 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4596 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4597 void * to gdb_byte *.
4598 * linux-low.c (siginfo_fixup): Likewise.
4599 (linux_xfer_siginfo): Likewise.
4600 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4602 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4604 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4606 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4608 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4610 * linux-x86-low.c [__x86_64__]: Include
4611 "nat/amd64-linux-siginfo.h".
4612 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4613 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4614 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4615 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4616 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4617 (cpt_si_fd, si_timerid, si_overrun): Move from
4618 nat/amd64-linux-siginfo.c.
4619 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4621 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4623 * server.c (skip_to_semicolon): Remove.
4624 (process_point_options): Use strchrnul instead of
4627 2016-01-26 Yao Qi <yao.qi@linaro.org>
4629 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4630 * linux-low.c (install_software_single_step_breakpoints): Don't
4631 call regcache_read_pc.
4632 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4635 2016-01-26 Yao Qi <yao.qi@linaro.org>
4637 * linux-low.c (install_software_single_step_breakpoints): Call
4638 regcache_read_pc instead of get_pc.
4640 2016-01-26 Yao Qi <yao.qi@linaro.org>
4642 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4643 (unblock_async_io): Rename to ...
4644 (block_unblock_async_io): ... it. New function.
4645 (enable_async_io): Don't install SIGIO handler. Unblock it
4647 (disable_async_io): Don't ignore SIGIO. Block it instead.
4648 (initialize_async_io): Install SIGIO handler. Don't call
4651 2016-01-26 Yao Qi <yao.qi@linaro.org>
4653 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4654 first character is '\003', call *the_target->request_interrupt.
4656 2016-01-25 Yao Qi <yao.qi@linaro.org>
4658 * remote-utils.c (new_thread_notify): Remove.
4659 (dead_thread_notify): Likewise.
4660 * remote-utils.h (new_thread_notify): Remove declaration.
4661 (dead_thread_notify): Likewise.
4663 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4665 * gdb.trace/pending.exp: Fix expected message on continue.
4667 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4669 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4670 it works properly on big-endian machines where sizeof (CORE_ADDR)
4673 2016-01-21 Pedro Alves <palves@redhat.com>
4675 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4676 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4677 * configure: Regenerate.
4679 2016-01-21 Yao Qi <yao.qi@linaro.org>
4681 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4682 is_thumb and set it according to CPSR saved on the stack.
4683 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4684 arm_sigreturn_next_pc.
4686 2016-01-18 Yao Qi <yao.qi@linaro.org>
4688 * linux-low.c (linux_set_pc_64bit): New function.
4689 (linux_get_pc_64bit): New function.
4690 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4692 * linux-sparc-low.c (debug_threads): Remove declaration.
4693 (sparc_get_pc): Remove.
4694 (the_low_target): Use linux_get_pc_64bit instead of
4696 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4697 (the_low_target): Use linux_get_pc_64bit and
4700 2016-01-18 Yao Qi <yao.qi@linaro.org>
4702 * linux-arm-low.c (debug_threads): Remove declaration.
4703 (arm_get_pc, arm_set_pc): Remove.
4704 (the_low_target): Use linux_get_pc_32bit and
4706 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4707 (the_low_target): Use linux_get_pc_32bit and
4709 * linux-cris-low.c (debug_threads): Remove declaration.
4710 (cris_get_pc, cris_set_pc,): Remove.
4711 (the_low_target): Use linux_get_pc_32bit and
4713 * linux-crisv32-low.c (debug_threads): Remove declaration.
4714 (cris_get_pc, cris_set_pc): Remove.
4715 (the_low_target): Use linux_get_pc_32bit and
4717 * linux-low.c: Include inttypes.h.
4718 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4719 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4720 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4721 (the_low_target): Use linux_get_pc_32bit and
4723 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4724 (the_low_target): Use linux_get_pc_32bit and
4726 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4727 (the_low_target): Use linux_get_pc_32bit and
4729 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4730 (the_low_target): Use linux_get_pc_32bit and
4732 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4733 (the_low_target): Use linux_get_pc_32bit and
4736 2016-01-18 Gary Benson <gbenson@redhat.com>
4738 * configure.ac (AC_FUNC_FORK): New check.
4739 * config.in: Regenerate.
4740 * configure: Likewise.
4742 2016-01-14 Yao Qi <yao.qi@linaro.org>
4744 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4745 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4746 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4747 arm_get_next_pcs_ctor.
4749 2016-01-12 Josh Stone <jistone@redhat.com>
4750 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4752 * inferiors.h: Include "gdb_vecs.h".
4753 (struct process_info): Add syscalls_to_catch.
4754 * inferiors.c (remove_process): Free syscalls_to_catch.
4755 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4756 syscall_return stops.
4757 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4758 * server.c (handle_general_set): Handle QCatchSyscalls.
4759 (handle_query): Report support for QCatchSyscalls.
4760 * target.h (struct target_ops): Add supports_catch_syscall.
4761 (target_supports_catch_syscall): New macro.
4762 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4763 (struct lwp_info): Add syscall_state.
4764 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4765 Maintain syscall_state and syscalls_to_catch across exec.
4766 (get_syscall_trapinfo): New function, proxy to the_low_target.
4767 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4768 (linux_low_filter_event): Toggle syscall_state entry/return for
4769 syscall traps, and set it ignored for all others.
4770 (gdb_catching_syscalls_p): New function.
4771 (gdb_catch_this_syscall_p): New function.
4772 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4773 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4774 (linux_supports_catch_syscall): New function.
4775 (linux_target_ops): Install it.
4776 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4777 (the_low_target): Install it.
4779 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4781 * acinclude.m4: Include new ../warning.m4 file.
4782 * configure: Regenerated.
4783 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4785 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4787 * ax.c (is_goto_target): Mark static.
4788 * linux-low.c (register_addr): Likewise.
4789 (linux_fetch_registers, linux_store_registers): Likewise.
4790 * mem-break.c (any_persistent_commands): Fix old prototype.
4791 (add_commands_to_breakpoint): Mark static.
4792 * regcache.c (find_register_by_name): Delete unused func.
4793 * remote-utils.c (hex_or_minus_one): Mark static.
4794 * server.c (monitor_show_help): Mark static.
4795 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4796 handle_v_requests): Likewise.
4798 2016-01-12 Pedro Alves <palves@redhat.com>
4800 Remove use of the registered trademark symbol throughout.
4802 2016-01-08 Yao Qi <yao.qi@linaro.org>
4804 * remote-utils.c (getpkt): If c is '\003', call target hook
4807 2016-01-06 Yao Qi <yao.qi@linaro.org>
4809 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4810 linux-aarch32-low.c.
4811 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4812 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4813 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4814 (thumb2_breakpoint): Declare.
4815 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4816 linux-aarch32-low.h.
4817 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4818 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4819 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4821 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4823 * gdbreplay.c (gdbreplay_version): Change copyright year in
4825 * server.c (gdbserver_version): Likewise.
4827 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4829 * server.c (crc32_table): Delete.
4830 (crc32): Use libiberty's xcrc32 function.
4832 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4834 * lynx-low.c (lynx_delete_thread_callback): New function.
4835 (lynx_mourn): Properly delete our process and all of its
4836 threads. Remove call to clear_inferiors.
4838 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4840 * target.c (thread_search_callback): Add check that
4841 the thread_stopped target callback is not NULL before
4844 2015-12-21 Yao Qi <yao.qi@linaro.org>
4846 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4849 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4851 * server.c (handle_query): Call target_supports_software_single_step.
4853 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4855 * linux-low.c (single_step): New function.
4856 (linux_resume_one_lwp_throw): Call single_step.
4857 (start_step_over): Likewise.
4859 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4861 * Makefile.in (SFILES): Append arch/arm-linux.c,
4862 arch/arm-get-next-pcs.c.
4863 (arm-linux.o): New rule.
4864 (arm-get-next-pcs.o): New rule.
4865 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4867 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4868 to linux-aarch32-low.c.
4869 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4870 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4871 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4872 (thumb2_breakpoint_len): Likewise.
4873 (arm_is_thumb_mode): Make non-static.
4874 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4875 from linux-aarch32-low.c.
4876 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4877 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4878 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4879 (thumb2_breakpoint_len): Likewise.
4880 (arm_is_thumb_mode): New declaration.
4881 * linux-arm-low.c: Include arch/arm-linux.h
4882 aarch/arm-get-next-pcs.h, sys/syscall.h.
4883 (get_next_pcs_ops): New struct.
4884 (get_next_pcs_addr_bits_remove): New function.
4885 (get_next_pcs_is_thumb): New function.
4886 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4887 (arm_sigreturn_next_pc): Likewise.
4888 (get_next_pcs_syscall_next_pc): Likewise.
4889 (arm_gdbserver_get_next_pcs): Likewise.
4890 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4892 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4893 * server.h: Include gdb_vecs.h.
4895 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4897 * Makefile.in (SFILES): Append common/common-regcache.c.
4898 (OBS): Append common-regcache.o.
4899 (common-regcache.o): New rule.
4900 * regcache.c (init_register_cache): Initialize cache to
4902 (regcache_raw_read_unsigned): New function.
4903 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4904 register_status enum.
4906 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4908 * linux-aarch64-low.c (the_low_targets): Rename
4909 breakpoint_reinsert_addr to get_next_pcs.
4910 * linux-arm-low.c (the_low_targets): Likewise.
4911 * linux-bfin-low.c (the_low_targets): Likewise.
4912 * linux-cris-low.c (the_low_targets): Likewise.
4913 * linux-crisv32-low.c (the_low_targets): Likewise.
4914 * linux-low.c (can_software_single_step): Likewise.
4915 (install_software_single_step_breakpoints): New function.
4916 (start_step_over): Use install_software_single_step_breakpoints.
4917 * linux-low.h: New CORE_ADDR vector.
4918 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4920 * linux-mips-low.c (the_low_targets): Likewise.
4921 * linux-nios2-low.c (the_low_targets): Likewise.
4922 * linux-sparc-low.c (the_low_targets): Likewise.
4924 2015-12-17 Pedro Alves <palves@redhat.com>
4926 * linux-low.c (linux_kill_one_lwp): Remove references to
4928 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4930 (linux_init_signals): Delete.
4931 (initialize_low): Adjust.
4932 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4934 2015-12-16 Pedro Alves <palves@redhat.com>
4936 * configure.ac (compiler warning flags): When testing a
4937 -Wno-foo option, check whether -Wfoo works instead.
4938 * configure: Regenerate.
4940 2015-12-11 Don Breazeal <donb@codesourcery.com>
4942 * server.c (process_serial_event): Don't exit from gdbserver
4943 in remote mode if there are still active inferiors.
4945 2015-12-11 Yao Qi <yao.qi@linaro.org>
4947 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4948 arm_breakpoint_at if the process is 32-bit.
4950 2015-12-11 Yao Qi <yao.qi@linaro.org>
4952 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4955 2015-12-07 Yao Qi <yao.qi@linaro.org>
4957 * configure.srv: Append arm.o to srv_tgtobj for
4958 aarch64*-*-linux* target.
4959 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4960 from linux-arm-low.c.
4961 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4962 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4963 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4964 (thumb2_breakpoint_len): Likewise.
4965 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4966 (arm_breakpoint_kinds): Likewise.
4967 (arm_breakpoint_kind_from_pc): Likewise.
4968 (arm_sw_breakpoint_from_kind): Likewise.
4969 (arm_breakpoint_kind_from_current_state): Likewise.
4970 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4971 (arm_sw_breakpoint_from_kind): Declare.
4972 (arm_breakpoint_kind_from_current_state): Declare.
4973 (arm_breakpoint_at): Declare.
4974 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4975 arm_sw_breakpoint_from_kind if process is 32-bit.
4976 (aarch64_breakpoint_kind_from_pc): New function.
4977 (aarch64_breakpoint_kind_from_current_state): New function.
4978 (the_low_target): Initialize fields breakpoint_kind_from_pc
4979 and breakpoint_kind_from_current_state.
4980 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4981 linux-aarch32-low.c.
4982 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4983 (arm_breakpoint, arm_breakpoint_len): Likewise.
4984 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4985 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4986 (arm_is_thumb_mode): Likewise.
4987 (arm_breakpoint_at): Likewise.
4988 (arm_breakpoint_kind_from_pc): Likewise.
4989 (arm_sw_breakpoint_from_kind): Likewise.
4990 (arm_breakpoint_kind_from_current_state): Likewise.
4993 2015-08-04 Yao Qi <yao.qi@linaro.org>
4995 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4996 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4997 * server.c (extended_protocol): Remove "static".
4998 * server.h (extended_protocol): Declare it.
5000 2015-12-04 Josh Stone <jistone@redhat.com>
5002 * target.h (struct target_ops) <arch_setup>: Rename to ...
5003 (struct target_ops) <post_create_inferior>: ... this.
5004 (target_arch_setup): Rename to ...
5005 (target_post_create_inferior): ... this, calling post_create_inferior.
5006 * server.c (start_inferior): Update target_arch_setup calls to
5007 target_post_create_inferior.
5008 * linux-low.c (linux_low_ptrace_options): Forward declare.
5009 (linux_arch_setup): Update its comment for general use.
5010 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5011 (struct linux_target_ops): Use linux_post_create_inferior.
5012 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5013 to post_create_inferior.
5014 * nto-low.c (struct nto_target_ops): Likewise.
5015 * spu-low.c (struct spu_target_ops): Likewise.
5016 * win32-low.c (struct win32_target_ops): Likewise.
5018 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5020 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5022 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5024 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5025 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5026 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5027 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5028 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5029 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5030 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5031 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5032 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5033 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5034 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5035 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5037 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5039 * linux-low.c (linux_look_up_symbols): Don't call
5040 linux_supports_traceclone.
5041 * linux-low.h (thread_db_init): Remove use_events argument.
5042 * thread-db.c (thread_db_use_event): Remove global variable.
5043 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5044 (struct thread_db) <td_create_bp>: Remove field.
5045 (thread_db_create_event): Remove function.
5046 (thread_db_enable_reporting): Likewise.
5047 (find_one_thread): Don't check for thread_db_use_events.
5048 (attach_thread): Likewise.
5049 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5050 (try_thread_db_load_1): Don't check for thread_db_use_events.
5051 (thread_db_init): Remove use_events argument and thread events
5053 (remove_thread_event_breakpoints): Remove function.
5054 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5056 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5058 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5060 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5061 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5062 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5063 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5064 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5066 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5068 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5069 * linux-low.c (can_hardware_single_step): Use
5070 supports_hardware_single_step.
5071 (can_software_single_step): New function.
5072 (start_step_over): Call can_software_single_step.
5073 (linux_supports_hardware_single_step): New function.
5074 (struct target_ops) <supports_software_single_step>: Initialize.
5075 * linux-low.h (struct linux_target_ops)
5076 <supports_hardware_single_step>: Initialize.
5077 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5078 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5079 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5080 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5081 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5082 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5083 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5084 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5085 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5086 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5088 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5089 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5091 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5092 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5093 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5095 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5096 * target.h (struct target_ops): <supports_software_single_step>:
5098 (target_supports_software_single_step): New macro.
5100 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5102 * linux-low.c (linux_wait_1): Fix pc advance condition.
5103 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5104 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5106 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5108 * linux-arm-low.c (arm_is_thumb_mode): New function.
5109 (arm_breakpoint_at): Use arm_is_thumb_mode.
5110 (arm_breakpoint_kind_from_current_state): New function.
5111 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5113 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5114 (linux_breakpoint_kind_from_current_state): New function.
5115 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5116 * linux-low.h (struct linux_target_ops)
5117 <breakpoint_kind_from_current_state>: New field.
5118 * target.h (struct target_ops): Likewise.
5119 (target_breakpoint_kind_from_current_state): New macro.
5121 2015-11-30 Pedro Alves <palves@redhat.com>
5123 * linux-low.c (linux_resume): Wake up the event loop before
5126 2015-11-30 Pedro Alves <palves@redhat.com>
5128 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5130 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5132 * target.c (struct thread_search): New structure.
5133 (thread_search_callback): New function.
5134 (prev_general_thread): New global.
5135 (prepare_to_access_memory, done_accessing_memory): New functions.
5136 * target.h (prepare_to_access_memory, done_accessing_memory):
5137 Replace macros with function declarations.
5139 2015-11-30 Pedro Alves <palves@redhat.com>
5142 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5143 report TARGET_WAITKIND_NO_RESUMED.
5144 * remote-utils.c (prepare_resume_reply): Handle
5145 TARGET_WAITKIND_NO_RESUMED.
5146 * server.c (report_no_resumed): New global.
5147 (handle_query) <qSupported>: Handle "no-resumed+". Report
5148 "no-resumed+" support.
5149 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5150 return error if the client doesn't support no-resumed events.
5151 (push_stop_notification): New function.
5152 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5153 events if the client supports them.
5155 2015-11-30 Pedro Alves <palves@redhat.com>
5157 * linux-low.c (thread_still_has_status_pending_p): Don't check
5159 (lwp_resumed): New function.
5160 (status_pending_p_callback): Return early if the LWP is not
5161 supposed to be resumed.
5163 2015-11-30 Pedro Alves <palves@redhat.com>
5165 * linux-low.c (handle_extended_wait): Assert that the LWP's
5166 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5167 thread create events, leave the new child's status pending.
5168 (linux_low_filter_event): If GDB wants to hear about thread exit
5169 events, leave the LWP marked dead and don't delete it.
5170 (linux_wait_for_event_filtered): Don't check for thread exit.
5171 (filter_exit_event): New function.
5172 (linux_wait_1): Use it, when returning an exit event.
5173 (linux_resume_one_lwp_throw): Assert that the LWP's
5174 waitstatus is TARGET_WAITKIND_IGNORE.
5175 * remote-utils.c (prepare_resume_reply): Handle
5176 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5177 * server.c (report_thread_events): New global.
5178 (handle_general_set): Handle QThreadEvents.
5179 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5180 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5181 TARGET_WAITKIND_THREAD_EXITED.
5182 * server.h (report_thread_events): Declare.
5184 2015-11-30 Pedro Alves <palves@redhat.com>
5186 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5187 the thread's last_resume_kind was resume_stop.
5189 2015-11-30 Pedro Alves <palves@redhat.com>
5191 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5194 2015-11-30 Pedro Alves <palves@redhat.com>
5196 * server.c (handle_v_requests): Handle vCtrlC.
5198 2015-11-30 Pedro Alves <palves@redhat.com>
5200 * gdbthread.h (find_any_thread_of_pid): Declare.
5201 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5203 * server.c (handle_query): If current_thread is NULL, look for
5204 another thread of the selected process.
5206 2015-11-26 Daniel Colascione <dancol@dancol.org>
5207 Simon Marchi <simon.marchi@ericsson.com>
5209 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5210 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5212 * target.h (struct target_ops) <thread_name>: New field.
5213 (target_thread_name): New macro.
5215 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5217 * regcache.h (regcache_invalidate_pid): Add declaration.
5218 * regcache.c (regcache_invalidate_pid): New function, extracted
5219 from regcache_invalidate.
5220 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5221 Add trivial documentation comment.
5222 * lynx-low.c: Use regcache_invalidate_pid instead of
5223 regcache_invalidate.
5225 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5227 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5228 and Elf64_auxv_t if the target is Android.
5230 2015-11-22 Doug Evans <xdje42@gmail.com>
5232 * target.h: #include <sys/types.h>.
5234 2015-11-19 Pedro Alves <palves@redhat.com>
5236 * linux-low.c (linux_process_qsupported): Change prototype.
5238 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5240 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5241 and adjust to loop over all features.
5242 * server.c (handle_query) <qSupported>: Adjust to call
5243 target_process_qsupported once, passing it a vector of unprocessed
5245 * target.h (struct target_ops) <process_qsupported>: Change
5247 (target_process_qsupported): Adjust.
5249 2015-11-19 Pedro Alves <palves@redhat.com>
5251 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5253 * configure: Regenerate.
5255 2015-11-19 Pedro Alves <palves@redhat.com>
5257 * configure: Regenerate.
5259 2015-11-19 Yao Qi <yao.qi@linaro.org>
5261 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5264 2015-11-19 Yao Qi <yao.qi@linaro.org>
5266 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5267 (struct aarch64_operand): Move enum out.
5269 2015-11-19 Yao Qi <yao.qi@linaro.org>
5271 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5272 struct user_fpsimd_state *.
5273 (aarch64_store_fpregset): Likewise.
5275 2015-11-19 Yao Qi <yao.qi@linaro.org>
5277 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5278 struct user_pt_regs *.
5279 (aarch64_store_gregset): Likewise.
5281 2015-11-18 Pedro Alves <palves@redhat.com>
5283 * Makefile.in (all_object_files): Add $IPA_OBJS.
5285 2015-11-17 Pedro Alves <palves@redhat.com>
5287 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5288 GDB_SIGNAL_0 and gdb_signal_to_string.
5290 2015-11-17 Pedro Alves <palves@redhat.com>
5292 * win32-low.c (handle_output_debug_string): Remove parameter.
5293 (win32_kill): Remove our_status local and adjust call to
5294 handle_output_debug_string.
5295 (get_child_debug_event): Adjust call to
5296 handle_output_debug_string.
5298 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5300 * linux-mips-low.c (mips_fill_gregset): Add cast.
5301 (mips_store_gregset): Likewise.
5302 (mips_fill_fpregset): Likewise.
5303 (mips_store_fpregset): Likewise.
5305 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5307 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5310 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5312 * linux-mips-low.c (mips_linux_new_thread): Change type of
5313 watch_type to enum target_hw_bp_type.
5315 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5317 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5318 Change return type to arm_hwbp_type.
5320 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5322 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5323 (arm_store_gregset): Likewise.
5324 * linux-arm-low.c (arm_get_hwcap): Likewise.
5325 (arm_read_description): Likewise.
5327 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5329 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5331 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5333 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5334 (ppc_fill_vsxregset): Likewise.
5335 (ppc_store_vsxregset): Likewise.
5336 (ppc_fill_vrregset): Likewise.
5337 (ppc_store_vrregset): Likewise.
5338 (ppc_fill_evrregset): Likewise.
5339 (ppc_store_evrregset): Likewise.
5341 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5343 * linux-ppc-low.c (ppc_usrregs_info): Remove
5344 forward-declaration.
5345 (ppc_arch_setup): Move lower in file.
5347 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5349 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5350 (ps_pdwrite): Likewise.
5352 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5354 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5355 to after assert checks.
5357 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5359 * proc-service.c (ps_pdread): Add/adjust casts.
5360 (ps_pdwrite): Add/adjust casts.
5362 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5364 * server.c (handle_search_memory_1): Cast return value of
5367 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5369 * server.c (write_qxfer_response): Change type of data to
5372 2015-10-29 Pedro Alves <palves@redhat.com>
5374 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5376 2015-10-29 Pedro Alves <palves@redhat.com>
5378 * tracepoint.c (clear_installed_tracepoints): Add casts.
5380 2015-10-29 Pedro Alves <palves@redhat.com>
5382 * server.c (handle_v_cont, process_serial_event): Add enum
5383 gdb_signal casts to signal parsing code.
5385 2015-10-29 Pedro Alves <palves@redhat.com>
5387 * linux-low.h (NULL_REGSET): Define.
5388 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5389 * linux-arm-low.c (arm_regsets): Likewise.
5390 * linux-crisv32-low.c (cris_regsets): Likewise.
5391 * linux-m68k-low.c (m68k_regsets): Likewise.
5392 * linux-mips-low.c (mips_regsets): Likewise.
5393 * linux-nios2-low.c (nios2_regsets): Likewise.
5394 * linux-ppc-low.c (ppc_regsets): Likewise.
5395 * linux-s390-low.c (s390_regsets): Likewise.
5396 * linux-sh-low.c (sh_regsets): Likewise.
5397 * linux-sparc-low.c (sparc_regsets): Likewise.
5398 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5399 * linux-tile-low.c (tile_regsets): Likewise.
5400 * linux-x86-low.c (x86_regsets): Likewise.
5401 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5403 2015-10-29 Pedro Alves <palves@redhat.com>
5405 * linux-low.h (NULL_REGSET): Define.
5406 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5407 * linux-arm-low.c (arm_regsets): Likewise.
5408 * linux-crisv32-low.c (cris_regsets): Likewise.
5409 * linux-m68k-low.c (m68k_regsets): Likewise.
5410 * linux-mips-low.c (mips_regsets): Likewise.
5411 * linux-nios2-low.c (nios2_regsets): Likewise.
5412 * linux-ppc-low.c (ppc_regsets): Likewise.
5413 * linux-s390-low.c (s390_regsets): Likewise.
5414 * linux-sh-low.c (sh_regsets): Likewise.
5415 * linux-sparc-low.c (sparc_regsets): Likewise.
5416 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5417 * linux-tile-low.c (tile_regsets): Likewise.
5418 * linux-x86-low.c (x86_regsets): Likewise.
5419 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5421 2015-10-26 Doug Evans <dje@google.com>
5423 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5425 2015-10-26 Doug Evans <dje@google.com>
5427 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5429 2015-10-26 Doug Evans <dje@google.com>
5431 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5433 (attach_thread, find_new_threads_callback): Ditto.
5435 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5437 * mem-break.h (set_breakpoint_data): Remove.
5439 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5441 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5442 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5443 (initialize_low): Remove set_breakpoint_data call.
5444 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5445 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5446 (initialize_low): Remove set_breakpoint_data call.
5447 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5448 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5449 (initialize_low): Remove set_breakpoint_data call.
5451 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5453 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5454 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5455 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5456 * target.h (target_breakpoint_kind_from_pc): New macro.
5458 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5460 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5461 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5462 the default breakpoint kind.
5464 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5466 * linux-arm-low.c (arm_supports_z_point_type): Add software
5469 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5471 * linux-arm-low.c: Refactor breakpoint definitions.
5472 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5473 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5475 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5477 * Makefile.in: Add arm.c/o.
5478 * configure.srv: Likewise.
5479 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5480 (arm_breakpoint_kind_from_pc): New function.
5481 (arm_sw_breakpoint_from_kind): Return proper kind.
5482 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5484 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5486 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5488 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5489 (struct raw_breakpoint) <size>: Remove.
5490 (struct raw_breakpoint) <kind>: Add.
5491 (bp_size): New function.
5492 (bp_opcode): Likewise.
5493 (find_raw_breakpoint_at): Adjust for kind.
5494 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5495 (remove_memory_breakpoint): Adjust for kind call bp_size.
5496 (set_raw_breakpoint_at): Adjust for kind.
5497 (set_breakpoint): Likewise.
5498 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5499 (delete_raw_breakpoint): Adjust for kind.
5500 (delete_breakpoint): Likewise.
5501 (find_gdb_breakpoint): Likewise.
5502 (set_gdb_breakpoint_1): Likewise.
5503 (set_gdb_breakpoint): Likewise.
5504 (delete_gdb_breakpoint_1): Likewise.
5505 (delete_gdb_breakpoint): Likewise.
5506 (uninsert_raw_breakpoint): Likewise.
5507 (reinsert_raw_breakpoint): Likewise.
5508 (set_breakpoint_data): Remove.
5509 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5510 (check_mem_read): Adjust for kind call bp_size.
5511 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5512 (clone_one_breakpoint): Adjust for kind.
5513 * mem-break.h (set_gdb_breakpoint): Likewise.
5514 (delete_gdb_breakpoint): Likewise.
5515 * server.c (process_serial_event): Likewise.
5517 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5519 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5525 (arm_sw_breakpoint_from_kind): New function.
5526 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5527 (struct linux_target_ops) <breakpoint>: Remove.
5528 (struct linux_target_ops) <breakpoint_len>: Remove.
5529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5531 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5532 (struct linux_target_ops) <breakpoint>: Remove.
5533 (struct linux_target_ops) <breakpoint_len>: Remove.
5534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5536 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5537 (struct linux_target_ops) <breakpoint>: Remove.
5538 (struct linux_target_ops) <breakpoint_len>: Remove.
5539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5541 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5542 and sw_breakpoint_from_kind to increment the pc.
5543 (linux_breakpoint_kind_from_pc): New function.
5544 (linux_sw_breakpoint_from_kind): New function.
5545 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5546 (initialize_low): Call breakpoint_kind_from_pc and
5547 sw_breakpoint_from_kind to replace breakpoint_data/len.
5548 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5550 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5551 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5552 (struct linux_target_ops) <breakpoint>: Remove.
5553 (struct linux_target_ops) <breakpoint_len>: Remove.
5554 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5555 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5556 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5557 (struct linux_target_ops) <breakpoint>: Remove.
5558 (struct linux_target_ops) <breakpoint_len>: Remove.
5559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5560 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5561 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5562 (struct linux_target_ops) <breakpoint>: Remove.
5563 (struct linux_target_ops) <breakpoint_len>: Remove.
5564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5566 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5567 (struct linux_target_ops) <breakpoint>: Remove.
5568 (struct linux_target_ops) <breakpoint_len>: Remove.
5569 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5570 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5571 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5572 (struct linux_target_ops) <breakpoint>: Remove.
5573 (struct linux_target_ops) <breakpoint_len>: Remove.
5574 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5575 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5576 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5577 (struct linux_target_ops) <breakpoint>: Remove.
5578 (struct linux_target_ops) <breakpoint_len>: Remove.
5579 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5580 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5581 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5582 (struct linux_target_ops) <breakpoint>: Remove.
5583 (struct linux_target_ops) <breakpoint_len>: Remove.
5584 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5585 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5586 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5587 (struct linux_target_ops) <breakpoint>: Remove.
5588 (struct linux_target_ops) <breakpoint_len>: Remove.
5589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5591 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5592 (struct linux_target_ops) <breakpoint>: Remove.
5593 (struct linux_target_ops) <breakpoint_len>: Remove.
5594 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5595 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5596 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5597 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5598 (struct linux_target_ops) <breakpoint>: Remove.
5599 (struct linux_target_ops) <breakpoint_len>: Remove.
5600 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5602 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5603 (struct linux_target_ops) <breakpoint>: Remove.
5604 (struct linux_target_ops) <breakpoint_len>: Remove.
5605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5608 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5610 * linux-cris-low.c (cris_get_pc): Remove void arg.
5612 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5614 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5617 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5619 * inferiors.c (thread_pid_matches_callback): New function.
5620 (find_thread_process): New function.
5621 (remove_thread): Reset current_thread.
5622 (remove_process): Assert threads have been removed first.
5624 2015-10-15 Yao Qi <yao.qi@linaro.org>
5626 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5628 (aarch64_remove_point): Likewise.
5629 * regcache.c (regcache_register_size): New function.
5631 2015-10-12 Yao Qi <yao.qi@linaro.org>
5633 * linux-aarch64-low.c: Update all callers as emit_load_store
5634 is renamed to aarch64_emit_load_store.
5636 2015-10-12 Yao Qi <yao.qi@linaro.org>
5638 * linux-aarch64-low.c: Update all callers of function renaming
5639 from emit_insn to aarch64_emit_insn.
5641 2015-10-12 Yao Qi <yao.qi@linaro.org>
5643 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5644 arch/aarch64-insn.h.
5645 (struct aarch64_memory_operand): Likewise.
5647 (emit_insn): Move to arch/aarch64-insn.c.
5648 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5649 (emit_load_store): Move to arch/aarch64-insn.c.
5650 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5651 (can_encode_int32): Remove.
5653 2015-10-12 Yao Qi <yao.qi@linaro.org>
5655 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5656 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5657 (aarch64_relocate_instruction): Likewise.
5658 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5659 (struct aarch64_insn_visitor): Likewise.
5661 2015-10-12 Yao Qi <yao.qi@linaro.org>
5663 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5664 (struct aarch64_insn_visitor): New.
5665 (struct aarch64_insn_relocation_data): New.
5666 (aarch64_ftrace_insn_reloc_b): New function.
5667 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5668 (aarch64_ftrace_insn_reloc_cb): Likewise.
5669 (aarch64_ftrace_insn_reloc_tb): Likewise.
5670 (aarch64_ftrace_insn_reloc_adr): Likewise.
5671 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5672 (aarch64_ftrace_insn_reloc_others): Likewise.
5674 (aarch64_relocate_instruction): Use visitor.
5676 2015-10-12 Yao Qi <yao.qi@linaro.org>
5678 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5679 int. Add argument buf.
5680 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5681 aarch64_relocate_instruction.
5683 2015-10-12 Yao Qi <yao.qi@linaro.org>
5685 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5686 argument insn. Remove local variable insn. Don't call
5688 (aarch64_install_fast_tracepoint_jump_pad): Call
5691 2015-09-30 Yao Qi <yao.qi@linaro.org>
5693 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5694 (emit_load_store_pair): Likewise.
5696 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5698 * dll.c (match_dll): Add cast(s).
5699 (unloaded_dll): Likewise.
5700 * linux-low.c (second_thread_of_pid_p): Likewise.
5701 (delete_lwp_callback): Likewise.
5702 (count_events_callback): Likewise.
5703 (select_event_lwp_callback): Likewise.
5704 (linux_set_resume_request): Likewise.
5705 * server.c (accumulate_file_name_length): Likewise.
5706 (emit_dll_description): Likewise.
5707 (handle_qxfer_threads_worker): Likewise.
5708 (visit_actioned_threads): Likewise.
5709 * thread-db.c (any_thread_of): Likewise.
5710 * tracepoint.c (same_process_p): Likewise.
5711 (match_blocktype): Likewise.
5712 (build_traceframe_info_xml): Likewise.
5714 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5716 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5718 (gdb_unparse_agent_expr): Likewise.
5719 * hostio.c (require_data): Likewise.
5720 (handle_pread): Likewise.
5721 * linux-low.c (disable_regset): Likewise.
5722 (fetch_register): Likewise.
5723 (store_register): Likewise.
5724 (get_dynamic): Likewise.
5725 (linux_qxfer_libraries_svr4): Likewise.
5726 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5727 (set_fast_tracepoint_jump): Likewise.
5728 (uninsert_fast_tracepoint_jumps_at): Likewise.
5729 (reinsert_fast_tracepoint_jumps_at): Likewise.
5730 (validate_inserted_breakpoint): Likewise.
5731 (clone_agent_expr): Likewise.
5732 * regcache.c (init_register_cache): Likewise.
5733 * remote-utils.c (putpkt_binary_1): Likewise.
5734 (decode_M_packet): Likewise.
5735 (decode_X_packet): Likewise.
5736 (look_up_one_symbol): Likewise.
5737 (relocate_instruction): Likewise.
5738 (monitor_output): Likewise.
5739 * server.c (handle_search_memory): Likewise.
5740 (handle_qxfer_exec_file): Likewise.
5741 (handle_qxfer_libraries): Likewise.
5742 (handle_qxfer): Likewise.
5743 (handle_query): Likewise.
5744 (handle_v_cont): Likewise.
5745 (handle_v_run): Likewise.
5746 (captured_main): Likewise.
5747 * target.c (write_inferior_memory): Likewise.
5748 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5749 * tracepoint.c (init_trace_buffer): Likewise.
5750 (add_tracepoint_action): Likewise.
5751 (add_traceframe): Likewise.
5752 (add_traceframe_block): Likewise.
5753 (cmd_qtdpsrc): Likewise.
5754 (cmd_qtdv): Likewise.
5755 (cmd_qtstatus): Likewise.
5756 (response_source): Likewise.
5757 (response_tsv): Likewise.
5758 (cmd_qtnotes): Likewise.
5759 (gdb_collect): Likewise.
5760 (initialize_tracepoint): Likewise.
5762 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5764 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5765 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5766 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5768 (enum aarch64_condition_codes): New enum.
5769 (w0): New static global.
5772 (struct aarch64_memory_operand) <type>: New
5773 MEMORY_OPERAND_POSTINDEX type.
5774 (postindex_memory_operand): New helper function.
5775 (emit_ret): New function.
5776 (emit_load_store_pair): New function, factored out of emit_stp
5777 with support for MEMORY_OPERAND_POSTINDEX.
5778 (emit_stp): Rewrite using emit_load_store_pair.
5779 (emit_ldp): New function.
5780 (emit_load_store): Likewise.
5781 (emit_ldr): Mention post-index instruction in comment.
5782 (emit_ldrh): New function.
5783 (emit_ldrb): New function.
5784 (emit_ldrsw): Mention post-index instruction in comment.
5785 (emit_str): Likewise.
5786 (emit_subs): New function.
5787 (emit_cmp): Likewise.
5788 (emit_and): Likewise.
5789 (emit_orr): Likewise.
5790 (emit_orn): Likewise.
5791 (emit_eor): Likewise.
5792 (emit_mvn): Likewise.
5793 (emit_lslv): Likewise.
5794 (emit_lsrv): Likewise.
5795 (emit_asrv): Likewise.
5796 (emit_mul): Likewise.
5797 (emit_sbfm): Likewise.
5798 (emit_sbfx): Likewise.
5799 (emit_ubfm): Likewise.
5800 (emit_ubfx): Likewise.
5801 (emit_csinc): Likewise.
5802 (emit_cset): Likewise.
5803 (emit_nop): Likewise.
5804 (emit_ops_insns): New helper function.
5805 (emit_pop): Likewise.
5806 (emit_push): Likewise.
5807 (aarch64_emit_prologue): New function.
5808 (aarch64_emit_epilogue): Likewise.
5809 (aarch64_emit_add): Likewise.
5810 (aarch64_emit_sub): Likewise.
5811 (aarch64_emit_mul): Likewise.
5812 (aarch64_emit_lsh): Likewise.
5813 (aarch64_emit_rsh_signed): Likewise.
5814 (aarch64_emit_rsh_unsigned): Likewise.
5815 (aarch64_emit_ext): Likewise.
5816 (aarch64_emit_log_not): Likewise.
5817 (aarch64_emit_bit_and): Likewise.
5818 (aarch64_emit_bit_or): Likewise.
5819 (aarch64_emit_bit_xor): Likewise.
5820 (aarch64_emit_bit_not): Likewise.
5821 (aarch64_emit_equal): Likewise.
5822 (aarch64_emit_less_signed): Likewise.
5823 (aarch64_emit_less_unsigned): Likewise.
5824 (aarch64_emit_ref): Likewise.
5825 (aarch64_emit_if_goto): Likewise.
5826 (aarch64_emit_goto): Likewise.
5827 (aarch64_write_goto_address): Likewise.
5828 (aarch64_emit_const): Likewise.
5829 (aarch64_emit_call): Likewise.
5830 (aarch64_emit_reg): Likewise.
5831 (aarch64_emit_pop): Likewise.
5832 (aarch64_emit_stack_flush): Likewise.
5833 (aarch64_emit_zero_ext): Likewise.
5834 (aarch64_emit_swap): Likewise.
5835 (aarch64_emit_stack_adjust): Likewise.
5836 (aarch64_emit_int_call_1): Likewise.
5837 (aarch64_emit_void_call_2): Likewise.
5838 (aarch64_emit_eq_goto): Likewise.
5839 (aarch64_emit_ne_goto): Likewise.
5840 (aarch64_emit_lt_goto): Likewise.
5841 (aarch64_emit_le_goto): Likewise.
5842 (aarch64_emit_gt_goto): Likewise.
5843 (aarch64_emit_ge_got): Likewise.
5844 (aarch64_emit_ops_impl): New static global variable.
5845 (aarch64_emit_ops): New target function, return
5846 &aarch64_emit_ops_impl.
5847 (struct linux_target_ops): Install it.
5849 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5851 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5852 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5854 * linux-aarch64-ipa.c: New file.
5855 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5857 (aarch64_get_thread_area): New target method.
5858 (extract_signed_bitfield): New helper function.
5859 (aarch64_decode_ldr_literal): New function.
5860 (enum aarch64_opcodes): New enum.
5861 (struct aarch64_register): New struct.
5862 (struct aarch64_operand): New struct.
5863 (x0): New static global.
5872 (aarch64_register): New helper function.
5873 (register_operand): Likewise.
5874 (immediate_operand): Likewise.
5875 (struct aarch64_memory_operand): New struct.
5876 (offset_memory_operand): New helper function.
5877 (preindex_memory_operand): Likewise.
5878 (enum aarch64_system_control_registers): New enum.
5879 (ENCODE): New macro.
5880 (emit_insn): New helper function.
5881 (emit_b): New function.
5882 (emit_bcond): Likewise.
5883 (emit_cb): Likewise.
5884 (emit_tb): Likewise.
5885 (emit_blr): Likewise.
5886 (emit_stp): Likewise.
5887 (emit_ldp_q_offset): Likewise.
5888 (emit_stp_q_offset): Likewise.
5889 (emit_load_store): Likewise.
5890 (emit_ldr): Likewise.
5891 (emit_ldrsw): Likewise.
5892 (emit_str): Likewise.
5893 (emit_ldaxr): Likewise.
5894 (emit_stxr): Likewise.
5895 (emit_stlr): Likewise.
5896 (emit_data_processing_reg): Likewise.
5897 (emit_data_processing): Likewise.
5898 (emit_add): Likewise.
5899 (emit_sub): Likewise.
5900 (emit_mov): Likewise.
5901 (emit_movk): Likewise.
5902 (emit_mov_addr): Likewise.
5903 (emit_mrs): Likewise.
5904 (emit_msr): Likewise.
5905 (emit_sevl): Likewise.
5906 (emit_wfe): Likewise.
5907 (append_insns): Likewise.
5908 (can_encode_int32_in): New helper function.
5909 (aarch64_relocate_instruction): New function.
5910 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5911 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5912 (struct linux_target_ops): Install aarch64_get_thread_area,
5913 aarch64_install_fast_tracepoint_jump_pad and
5914 aarch64_get_min_fast_tracepoint_insn_len.
5916 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5918 * Makefile.in (aarch64-insn.o): New rule.
5919 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5921 2015-09-21 Yao Qi <yao.qi@linaro.org>
5923 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5925 2015-09-21 Yao Qi <yao.qi@linaro.org>
5927 * tracepoint.c (max_jump_pad_size): Remove.
5929 2015-09-18 Yao Qi <yao.qi@linaro.org>
5931 * linux-aarch64-low.c: Don't include sys/uio.h.
5932 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5934 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5936 * tracepoint.c (eval_result_type): Change prototype.
5937 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5939 2015-09-15 Pedro Alves <palves@redhat.com>
5941 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5942 Check whether to report exec events instead of checking whether
5943 multiprocess is enabled.
5945 2015-09-15 Pedro Alves <palves@redhat.com>
5948 * remote-utils.c (prepare_resume_reply): Merge
5949 TARGET_WAITKIND_VFORK_DONE switch case with the
5950 TARGET_WAITKIND_FORKED case.
5952 2015-09-15 Yao Qi <yao.qi@linaro.org>
5954 * server.c (handle_query): Check string comparison using
5955 "else if" instead of "if".
5957 2015-09-15 Yao Qi <yao.qi@linaro.org>
5959 * server.c (vCont_supported): New global variable.
5960 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5961 matches. Append ";vContSupported+" to own_buf.
5962 (handle_v_requests): Append ";s;S" to own_buf if target supports
5963 hardware single step or vCont_supported is false.
5964 (capture_main): Set vCont_supported to zero.
5966 2015-09-15 Yao Qi <yao.qi@linaro.org>
5968 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5970 (linux_supports_hardware_single_step): ... New function.
5971 (linux_target_ops): Update.
5972 * lynx-low.c (lynx_target_ops): Set field
5973 supports_hardware_single_step to target_can_do_hardware_single_step.
5974 * nto-low.c (nto_target_ops): Likewise.
5975 * spu-low.c (spu_target_ops): Likewise.
5976 * win32-low.c (win32_target_ops): Likewise.
5977 * target.c (target_can_do_hardware_single_step): New function.
5978 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5979 Remove. <supports_hardware_single_step>: New field.
5980 (target_supports_conditional_breakpoints): Remove.
5981 (target_supports_hardware_single_step): New macro.
5982 (target_can_do_hardware_single_step): Declare.
5983 * server.c (handle_query): Use target_supports_hardware_single_step
5984 instead of target_supports_conditional_breakpoints.
5986 2015-09-15 Yao Qi <yao.qi@linaro.org>
5988 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5990 (struct linux_target_ops the_low_target): Install
5991 aarch64_linux_siginfo_fixup.
5993 2015-09-11 Don Breazeal <donb@codesourcery.com>
5994 Luis Machado <lgustavo@codesourcery.com>
5996 * linux-low.c (linux_mourn): Static declaration.
5997 (linux_arch_setup): Move in front of
5998 handle_extended_wait.
5999 (linux_arch_setup_thread): New function.
6000 (handle_extended_wait): Handle exec events. Call
6001 linux_arch_setup_thread. Make event_lwp argument a
6002 pointer-to-a-pointer.
6003 (check_zombie_leaders): Do not check stopped threads.
6004 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6005 (linux_low_filter_event): Add lwp and thread for exec'ing
6006 non-leader thread if leader thread has been deleted.
6007 Refactor code into linux_arch_setup_thread and call it.
6008 Pass child lwp pointer by reference to handle_extended_wait.
6009 (linux_wait_for_event_filtered): Update comment.
6010 (linux_wait_1): Prevent clobbering exec event status.
6011 (linux_supports_exec_events): New function.
6012 (linux_target_ops) <supports_exec_events>: Initialize new member.
6013 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6015 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6016 * server.c (report_exec_events): New global variable.
6017 (handle_query): Handle qSupported query for exec-events feature.
6018 (captured_main): Initialize report_exec_events.
6019 * server.h (report_exec_events): Declare new global variable.
6020 * target.h (struct target_ops) <supports_exec_events>: New
6022 (target_supports_exec_events): New macro.
6023 * win32-low.c (win32_target_ops) <supports_exec_events>:
6024 Initialize new member.
6026 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6028 * linux-low.c (linux_low_enable_btrace): Remove.
6029 (linux_target_ops): Replace linux_low_enable_btrace with
6030 linux_enable_btrace.
6032 2015-09-03 Yao Qi <yao.qi@linaro.org>
6034 * linux-aarch64-low.c (aarch64_insert_point): Call
6035 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6038 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6040 * linux-low.c (check_stopped_by_breakpoint): Use
6041 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6043 2015-08-27 Pedro Alves <palves@redhat.com>
6045 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6047 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6049 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6050 the XNEW-family equivalent.
6051 (compile_bytecodes): Likewise.
6052 * dll.c (loaded_dll): Likewise.
6053 * event-loop.c (append_callback_event): Likewise.
6054 (create_file_handler): Likewise.
6055 (create_file_event): Likewise.
6056 * hostio.c (handle_open): Likewise.
6057 * inferiors.c (add_thread): Likewise.
6058 (add_process): Likewise.
6059 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6060 * linux-arm-low.c (arm_new_process): Likewise.
6061 (arm_new_thread): Likewise.
6062 * linux-low.c (add_to_pid_list): Likewise.
6063 (linux_add_process): Likewise.
6064 (handle_extended_wait): Likewise.
6065 (add_lwp): Likewise.
6066 (enqueue_one_deferred_signal): Likewise.
6067 (enqueue_pending_signal): Likewise.
6068 (linux_resume_one_lwp_throw): Likewise.
6069 (linux_resume_one_thread): Likewise.
6070 (linux_read_memory): Likewise.
6071 (linux_write_memory): Likewise.
6072 * linux-mips-low.c (mips_linux_new_process): Likewise.
6073 (mips_linux_new_thread): Likewise.
6074 (mips_add_watchpoint): Likewise.
6075 * linux-x86-low.c (initialize_low_arch): Likewise.
6076 * lynx-low.c (lynx_add_process): Likewise.
6077 * mem-break.c (set_raw_breakpoint_at): Likewise.
6078 (set_breakpoint): Likewise.
6079 (add_condition_to_breakpoint): Likewise.
6080 (add_commands_to_breakpoint): Likewise.
6081 (clone_agent_expr): Likewise.
6082 (clone_one_breakpoint): Likewise.
6083 * regcache.c (new_register_cache): Likewise.
6084 * remote-utils.c (look_up_one_symbol): Likewise.
6085 * server.c (queue_stop_reply): Likewise.
6086 (start_inferior): Likewise.
6087 (queue_stop_reply_callback): Likewise.
6088 (handle_target_event): Likewise.
6089 * spu-low.c (fetch_ppc_memory): Likewise.
6090 (store_ppc_memory): Likewise.
6091 * target.c (set_target_ops): Likewise.
6092 * thread-db.c (thread_db_load_search): Likewise.
6093 (try_thread_db_load_1): Likewise.
6094 * tracepoint.c (add_tracepoint): Likewise.
6095 (add_tracepoint_action): Likewise.
6096 (create_trace_state_variable): Likewise.
6097 (cmd_qtdpsrc): Likewise.
6098 (cmd_qtro): Likewise.
6099 (add_while_stepping_state): Likewise.
6100 * win32-low.c (child_add_thread): Likewise.
6101 (get_image_name): Likewise.
6103 2015-08-25 Yao Qi <yao.qi@linaro.org>
6105 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6107 2015-08-25 Yao Qi <yao.qi@linaro.org>
6109 * Makefile.in (aarch64-linux.o): New rule.
6110 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6112 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6113 (aarch64_init_debug_reg_state): Make it extern.
6114 (aarch64_linux_prepare_to_resume): Remove.
6116 2015-08-25 Yao Qi <yao.qi@linaro.org>
6118 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6119 lwp_arch_private_info and ptid_of_lwp.
6121 2015-08-25 Yao Qi <yao.qi@linaro.org>
6123 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6124 Find proc_info by find_process_pid. All callers updated.
6126 2015-08-25 Yao Qi <yao.qi@linaro.org>
6128 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6130 (debug_reg_change_callback): Remove.
6131 (aarch64_notify_debug_reg_change): Remove.
6133 2015-08-25 Yao Qi <yao.qi@linaro.org>
6135 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6136 Call current_lwp_ptid.
6138 2015-08-25 Yao Qi <yao.qi@linaro.org>
6140 * linux-aarch64-low.c (debug_reg_change_callback): Use
6143 2015-08-25 Yao Qi <yao.qi@linaro.org>
6145 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6147 2015-08-25 Yao Qi <yao.qi@linaro.org>
6149 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6151 2015-08-25 Yao Qi <yao.qi@linaro.org>
6153 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6156 2015-08-25 Yao Qi <yao.qi@linaro.org>
6158 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6160 (debug_reg_change_callback): Remove argument entry and add argument
6161 lwp. Remove local variable thread. Don't print thread id in the
6162 debugging output. Don't check whether pid of thread equals to pid.
6163 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6164 iterate_over_lwps instead find_inferior.
6166 2015-08-24 Pedro Alves <palves@redhat.com>
6168 * inferiors.c (get_first_process): New function.
6169 * inferiors.h (get_first_process): New declaration.
6170 * remote-utils.c (read_ptid): Default to the first process in the
6171 list, instead of to the current thread's process.
6173 2015-08-24 Pedro Alves <palves@redhat.com>
6175 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6176 * event-loop.c: Likewise.
6177 * remote-utils.c: Likewise.
6178 * tracepoint.c: Likewise.
6180 2015-08-24 Pedro Alves <palves@redhat.com>
6182 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6185 2015-08-21 Pedro Alves <palves@redhat.com>
6187 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6188 instead of literal 1.
6190 2015-08-21 Pedro Alves <palves@redhat.com>
6192 * tdesc.c (default_description): Explicitly zero-initialize.
6194 2015-08-21 Pedro Alves <palves@redhat.com>
6197 * inferiors.c (remove_thread): Discard any pending stop reply for
6199 * server.c (remove_all_on_match_pid): Rename to ...
6200 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6202 (discard_queued_stop_replies): Change parameter to a ptid. Now
6204 (handle_v_kill, kill_inferior_callback, captured_main)
6205 (process_serial_event): Adjust.
6206 * server.h (discard_queued_stop_replies): Declare.
6208 2015-08-21 Pedro Alves <palves@redhat.com>
6210 * linux-low.c (wait_for_sigstop): Always switch to no thread
6211 selected if the previously current thread dies.
6212 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6213 process instead of the current thread's.
6214 * remote-utils.c (input_interrupt): Don't check if there's no
6216 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6217 current thread to the general thread fails, error out.
6218 (handle_qxfer_auxv, handle_qxfer_libraries)
6219 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6220 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6221 (handle_query): Check if there's a thread selected instead of
6222 checking whether there's any thread in the thread list.
6223 (handle_qxfer_threads, handle_qxfer_btrace)
6224 (handle_qxfer_btrace_conf): Don't error out early if there's no
6225 thread in the thread list.
6226 (handle_v_cont, myresume): Don't set the current thread to the
6228 (process_serial_event) <Hg handling>: Also set thread_id if the
6229 previous general thread is still alive.
6230 (process_serial_event) <g/G handling>: If setting the current
6231 thread to the general thread fails, error out.
6232 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6233 thread's lwp instead of the current thread's.
6234 * target.c (set_desired_thread): If the desired thread was not
6235 found, leave the current thread pointing to NULL. Return an int
6236 (boolean) indicating success.
6237 * target.h (set_desired_thread): Change return type to int.
6239 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6241 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6242 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6244 (ps_get_thread_area): New function.
6246 2015-08-19 Gary Benson <gbenson@redhat.com>
6248 * hostio.c (handle_pread): Do not attempt to read more data
6249 than hostio_reply_with_data can fit in a packet.
6251 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6253 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6255 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6257 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6259 2015-08-06 Pedro Alves <palves@redhat.com>
6261 * tracepoint.c (expr_eval_result): Now an int.
6263 2015-08-06 Pedro Alves <palves@redhat.com>
6265 * gdbthread.h (struct regcache): Forward declare.
6266 (struct thread_info) <regcache_data>: Now a struct regcache
6268 * inferiors.c (inferior_regcache_data)
6269 (set_inferior_regcache_data): Now work with struct regcache
6271 * inferiors.h (struct regcache): Forward declare.
6272 (inferior_regcache_data, set_inferior_regcache_data): Now work
6273 with struct regcache pointers.
6274 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6275 (free_register_cache_thread): Remove struct regcache pointer
6278 2015-08-06 Pedro Alves <palves@redhat.com>
6280 * server.c (captured_main): On error, print the exception message
6281 to stderr, and if run_once is set, throw a quit.
6283 2015-08-06 Pedro Alves <palves@redhat.com>
6285 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6288 2015-08-06 Pedro Alves <palves@redhat.com>
6290 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6291 reading beyond the passed in buffer length.
6293 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6295 * tracepoint.c (symbol_list) <required>: Remove.
6297 2015-08-06 Pedro Alves <palves@redhat.com>
6299 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6300 count if stopping and suspending threads.
6301 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6302 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6303 (linux_detach): Complete an ongoing step-over.
6304 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6306 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6307 (linux_wait_1): If passing a signal to the inferior after
6308 finishing a step-over, unsuspend and re-resume all lwps. If we
6309 see a single-step event but the thread should be continuing, don't
6310 pass the trap to gdb.
6311 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6312 internal_error instead of gdb_assert.
6313 (enqueue_pending_signal): New function.
6314 (check_ptrace_stopped_lwp_gone): Add debug output.
6315 (start_step_over): Use internal_error instead of gdb_assert.
6316 (complete_ongoing_step_over): New function.
6317 (linux_resume_one_thread): Don't resume a suspended thread.
6318 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6321 2015-08-06 Pedro Alves <palves@redhat.com>
6323 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6324 (linux_thread_alive): Use lwp_is_marked_dead.
6325 (extended_event_reported): Delete.
6326 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6327 instead of extended_event_reported.
6328 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6330 (lwp_is_marked_dead): New function.
6331 (lwp_running): Use lwp_is_marked_dead.
6332 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6335 2015-08-06 Pedro Alves <palves@redhat.com>
6337 * linux-low.c (linux_wait_1): Move fork event output out of the
6338 !report_to_gdb check. Pass event_child->waitstatus to
6339 target_waitstatus_to_string instead of ourstatus.
6341 2015-08-04 Yao Qi <yao.qi@linaro.org>
6343 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6344 if current_thread is 32 bit.
6346 2015-08-04 Yao Qi <yao.qi@linaro.org>
6348 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6349 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6350 * server.c (extended_protocol): Remove "static".
6351 * server.h (extended_protocol): Declare it.
6353 2015-08-04 Yao Qi <yao.qi@linaro.org>
6355 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6356 both aarch64 and aarch32.
6357 (aarch64_set_pc): Likewise.
6359 2015-08-04 Yao Qi <yao.qi@linaro.org>
6361 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6362 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6363 arm-with-neon.xml to srv_xmlfiles.
6364 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6365 (is_64bit_tdesc): New function.
6366 (aarch64_linux_read_description): New function.
6367 (aarch64_arch_setup): Call aarch64_linux_read_description.
6368 (regs_info): Rename to regs_info_aarch64.
6369 (aarch64_regs_info): Return right regs_info.
6370 (initialize_low_arch): Call initialize_low_arch_aarch32.
6372 2015-08-04 Yao Qi <yao.qi@linaro.org>
6374 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6375 * linux-aarch32-low.c: New file.
6376 * linux-aarch32-low.h: New file.
6377 * linux-arm-low.c (arm_fill_gregset): Move it to
6378 linux-aarch32-low.c.
6379 (arm_store_gregset): Likewise.
6380 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6381 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6382 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6383 (regs_info): Rename to regs_info_arm.
6384 (arm_regs_info): Return regs_info_aarch32 if
6385 have_ptrace_getregset is 1 and target description is
6386 arm_with_neon or arm_with_vfpv3.
6387 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6388 Call initialize_low_arch_aarch32 instead.
6390 2015-08-04 Yao Qi <yao.qi@linaro.org>
6392 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6393 * linux-low.c: ... here.
6394 * linux-low.h (have_ptrace_getregset): Declare it.
6396 2015-08-04 Pedro Alves <palves@redhat.com>
6398 * thread-db.c (struct thread_db): Use new typedefs.
6399 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6401 (disable_thread_event_reporting): Cast result of dlsym to
6402 destination function pointer type.
6403 (thread_db_mourn): Use td_ta_delete_ftype.
6405 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6407 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6409 (CDX_BREAKPOINT): Define for R2.
6410 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6411 (the_low_target): Add comments.
6413 2015-07-30 Yao Qi <yao.qi@linaro.org>
6415 * linux-arm-low.c (arm_hwcap): Remove it.
6416 (arm_read_description): New local variable arm_hwcap. Don't
6417 set arm_hwcap to zero.
6419 2015-07-30 Yao Qi <yao.qi@linaro.org>
6421 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6422 Use regcache->tdesc instead.
6423 (arm_store_wmmxregset): Likewise.
6424 (arm_fill_vfpregset): Likewise.
6425 (arm_store_vfpregset): Likewise.
6427 2015-07-30 Yao Qi <yao.qi@linaro.org>
6429 * linux-arm-low.c: Include arch/arm.h.
6430 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6431 (arm_store_gregset): Likewise.
6433 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6435 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6436 ptrace's 4th parameter.
6438 2015-07-27 Yao Qi <yao.qi@linaro.org>
6440 * configure.srv (case aarch64*-*-linux*): Don't set
6443 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6445 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6447 * linux-arm-low.c: Likewise.
6448 * linux-cris-low.c: Likewise.
6449 * linux-crisv32-low.c: Likewise.
6450 * linux-low.c: Likewise.
6451 * linux-m68k-low.c: Likewise.
6452 * linux-mips-low.c: Likewise.
6453 * linux-nios2-low.c: Likewise.
6454 * linux-s390-low.c: Likewise.
6455 * linux-sparc-low.c: Likewise.
6456 * linux-tic6x-low.c: Likewise.
6457 * linux-tile-low.c: Likewise.
6458 * linux-x86-low.c: Likewise.
6460 2015-07-24 Pedro Alves <palves@redhat.com>
6462 * config.in: Regenerate.
6463 * configure: Regenerate.
6465 2015-07-24 Pedro Alves <palves@redhat.com>
6467 * acinclude.m4: Include ../ptrace.m4.
6468 * configure.ac: Call GDB_AC_PTRACE.
6469 * config.in, configure: Regenerate.
6471 2015-07-24 Yao Qi <yao.qi@linaro.org>
6473 * linux-low.c (linux_create_inferior): Remove setting to
6474 proc->priv->new_inferior.
6475 (linux_attach): Likewise.
6476 (linux_low_filter_event): Likewise.
6477 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6479 2015-07-24 Yao Qi <yao.qi@linaro.org>
6481 * linux-low.c (linux_arch_setup): New function.
6482 (linux_low_filter_event): If proc->tdesc is NULL and
6483 proc->attached is true, call the_low_target.arch_setup.
6484 Otherwise, keep status pending, and return.
6485 (linux_resume_one_lwp_throw): Don't call get_pc if
6486 thread->while_stepping isn't NULL. Don't call
6487 get_thread_regcache if proc->tdesc is NULL.
6488 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6489 (linux_target_ops): Install arch_setup.
6490 * server.c (start_inferior): Call the_target->arch_setup.
6491 * target.h (struct target_ops) <arch_setup>: New field.
6492 (target_arch_setup): New marco.
6493 * lynx-low.c (lynx_target_ops): Update.
6494 * nto-low.c (nto_target_ops): Update.
6495 * spu-low.c (spu_target_ops): Update.
6496 * win32-low.c (win32_target_ops): Update.
6498 2015-07-24 Yao Qi <yao.qi@linaro.org>
6500 * linux-low.c (linux_add_process): Don't set
6501 proc->priv->new_inferior.
6502 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6503 (linux_attach): Likewise.
6505 2015-07-24 Yao Qi <yao.qi@linaro.org>
6507 * server.c (start_inferior): Code refactor.
6509 2015-07-24 Yao Qi <yao.qi@linaro.org>
6511 * server.c (process_serial_event): Set general_thread.
6513 2015-07-21 Yao Qi <yao.qi@linaro.org>
6515 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6516 aarch64_linux_get_debug_reg_capacity.
6518 2015-07-17 Yao Qi <yao.qi@linaro.org>
6520 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6521 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6522 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6523 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6524 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6525 (AARCH64_HWP_ALIGNMENT): Likewise.
6526 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6527 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6528 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6529 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6530 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6531 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6532 (struct aarch64_debug_reg_state): Likewise.
6533 (struct arch_lwp_info): Likewise.
6534 (aarch64_align_watchpoint): Likewise.
6535 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6536 (aarch64_watchpoint_length): Likewise.
6537 (aarch64_point_encode_ctrl_reg): Likewise
6538 (aarch64_point_is_aligned): Likewise.
6539 (aarch64_align_watchpoint): Likewise.
6540 (aarch64_linux_set_debug_regs):
6541 (aarch64_dr_state_insert_one_point): Likewise.
6542 (aarch64_dr_state_remove_one_point): Likewise.
6543 (aarch64_handle_breakpoint): Likewise.
6544 (aarch64_handle_aligned_watchpoint): Likewise.
6545 (aarch64_handle_unaligned_watchpoint): Likewise.
6546 (aarch64_handle_watchpoint): Likewise.
6548 2015-07-17 Yao Qi <yao.qi@linaro.org>
6550 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6551 and don't aarch64_get_debug_reg_state. All callers update.
6552 (aarch64_handle_aligned_watchpoint): Likewise.
6553 (aarch64_handle_unaligned_watchpoint): Likewise.
6554 (aarch64_handle_watchpoint): Likewise.
6555 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6556 (aarch64_remove_point): Likewise.
6558 2015-07-17 Yao Qi <yao.qi@linaro.org>
6560 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6562 (aarch64_handle_unaligned_watchpoint): Likewise.
6564 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6566 Revert the previous 3 commits:
6567 Move gdb_regex* to common/
6568 Move linux_find_memory_regions_full & co.
6569 gdbserver build-id attribute generator
6571 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6572 Jan Kratochvil <jan.kratochvil@redhat.com>
6574 gdbserver build-id attribute generator.
6575 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6576 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6577 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6579 (get_dynamic): Use find_pdhr to traverse program headers.
6580 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6581 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6582 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6583 (get_hex_build_id): New.
6584 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6585 to reply XML document.
6587 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6588 Jan Kratochvil <jan.kratochvil@redhat.com>
6590 * target.c: Include target/target-utils.h and fcntl.h.
6591 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6592 (target_fileio_read_stralloc): New functions.
6594 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6596 * Makefile.in (OBS): Add gdb_regex.o.
6598 * config.in: Rebuilt.
6599 * configure: Rebuilt.
6601 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6602 Jan Kratochvil <jan.kratochvil@redhat.com>
6604 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6605 * Makefile.in (OBS): Add target-utils.o.
6606 (linux-maps.o, target-utils.o): New.
6607 * configure.srv (srv_linux_obj): Add linux-maps.o.
6609 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6611 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6613 (the_low_target): Install it.
6615 2015-07-14 Pedro Alves <palves@redhat.com>
6617 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6618 Instead, ignore ECHILD, and throw an error for other errnos.
6620 2015-07-10 Pedro Alves <palves@redhat.com>
6622 * event-loop.c (struct callback_event) <data>: Change type to
6623 gdb_client_data instance instead of gdb_client_data pointer.
6624 (append_callback_event): Adjust.
6626 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6628 * linux-aarch64-low.c: Add comments for each linux_target_ops
6629 method. Remove comments already covered in target_ops and
6630 linux_target_ops definitions.
6631 (the_low_target): Add comments for each unimplemented method.
6633 2015-07-09 Yao Qi <yao.qi@linaro.org>
6635 * linux-aarch64-low.c (aarch64_regmap): Remove.
6636 (aarch64_usrregs_info): Remove.
6637 (regs_info): Set field usrregs to NULL.
6639 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6641 * linux-low.c: Include "rsp-low.h"
6642 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6643 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6644 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6645 (handle_btrace_enable_pt): New.
6646 (handle_btrace_general_set): Support "pt".
6647 (handle_btrace_conf_general_set): Support "pt:size".
6649 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6651 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6654 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6656 * linux-aarch64-low.c: Remove comment about endianness.
6657 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6658 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6661 2015-06-24 Gary Benson <gbenson@redhat.com>
6663 * linux-i386-ipa.c (stdint.h): Do not include.
6664 * lynx-i386-low.c (stdint.h): Likewise.
6665 * lynx-ppc-low.c (stdint.h): Likewise.
6666 * mem-break.c (stdint.h): Likewise.
6667 * thread-db.c (stdint.h): Likewise.
6668 * tracepoint.c (stdint.h): Likewise.
6669 * win32-low.c (stdint.h): Likewise.
6671 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6673 * server.c (write_qxfer_response): Update call to
6674 remote_escape_output.
6676 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6677 Jan Kratochvil <jan.kratochvil@redhat.com>
6679 Merge multiple hex conversions.
6680 * gdbreplay.c (tohex): Rename to 'fromhex'.
6681 (logchar): Use fromhex.
6683 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6685 * server.c (handle_qxfer_libraries): Set `version' attribute for
6688 2015-06-10 Gary Benson <gbenson@redhat.com>
6690 * target.h (struct target_ops) <multifs_open>: New field.
6691 <multifs_unlink>: Likewise.
6692 <multifs_readlink>: Likewise.
6693 * linux-low.c (nat/linux-namespaces.h): New include.
6694 (linux_target_ops): Initialize the_target->multifs_open,
6695 the_target->multifs_unlink and the_target->multifs_readlink.
6696 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6697 * hostio.c (hostio_fs_pid): New static variable.
6698 (hostio_handle_new_gdb_connection): New function.
6699 (handle_setfs): Likewise.
6700 (handle_open): Use the_target->multifs_open as appropriate.
6701 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6702 (handle_readlink): Use the_target->multifs_readlink as
6704 (handle_vFile): Handle vFile:setfs packets.
6705 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6706 after target_handle_new_gdb_connection.
6708 2015-06-10 Gary Benson <gbenson@redhat.com>
6710 * configure.ac (AC_CHECK_FUNCS): Add setns.
6711 * config.in: Regenerate.
6712 * configure: Likewise.
6713 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6714 (linux-namespaces.o): New rule.
6715 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6717 2015-06-09 Gary Benson <gbenson@redhat.com>
6719 * hostio.c (handle_open): Process mode argument with
6720 fileio_to_host_mode.
6722 2015-06-01 Yao Qi <yao.qi@linaro.org>
6724 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6725 * linux-x86-low.c: Likewise.
6727 2015-05-28 Don Breazeal <donb@codesourcery.com>
6729 * linux-low.c (handle_extended_wait): Initialize
6730 thread_info.last_resume_kind for new fork children.
6732 2015-05-15 Pedro Alves <palves@redhat.com>
6734 * target.h (target_handle_new_gdb_connection): Rewrite using if
6735 wrapped in do/while.
6737 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6739 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6740 * configure, config.in: Regenerate.
6741 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6744 2015-05-12 Don Breazeal <donb@codesourcery.com>
6746 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6747 PTRACE_EVENT_VFORK_DONE.
6748 (linux_low_ptrace_options, extended_event_reported): Add vfork
6750 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6751 and "vforkdone" for RSP 'T' Stop Reply Packet.
6752 * server.h (report_vfork_events): Declare
6755 2015-05-12 Don Breazeal <donb@codesourcery.com>
6757 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6758 (the_low_target) <new_fork>: Initialize new member.
6759 * linux-arm-low.c (arm_new_fork): New function.
6760 (the_low_target) <new_fork>: Initialize new member.
6761 * linux-low.c (handle_extended_wait): Call new target function
6763 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6764 * linux-mips-low.c (mips_add_watchpoint): New function
6765 extracted from mips_insert_point.
6766 (the_low_target) <new_fork>: Initialize new member.
6767 (mips_linux_new_fork): New function.
6768 (mips_insert_point): Call mips_add_watchpoint.
6769 * linux-x86-low.c (x86_linux_new_fork): New function.
6770 (the_low_target) <new_fork>: Initialize new member.
6772 2015-05-12 Don Breazeal <donb@codesourcery.com>
6774 * linux-low.c (handle_extended_wait): Implement return value,
6775 rename argument 'event_child' to 'event_lwp', handle
6776 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6777 (linux_low_ptrace_options): New function.
6778 (linux_low_filter_event): Call linux_low_ptrace_options,
6779 use different argument fo linux_enable_event_reporting,
6780 use return value from handle_extended_wait.
6781 (extended_event_reported): New function.
6782 (linux_wait_1): Call extended_event_reported and set
6783 status to report fork events.
6784 (linux_write_memory): Add pid to debug message.
6785 (reset_lwp_ptrace_options_callback): New function.
6786 (linux_handle_new_gdb_connection): New function.
6787 (linux_target_ops): Initialize new structure member.
6788 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6789 * lynx-low.c: Initialize new structure member.
6790 * remote-utils.c (prepare_resume_reply): Implement stop reason
6791 "fork" for "T" stop message.
6792 * server.c (handle_query): Call handle_new_gdb_connection.
6793 * server.h (report_fork_events): Declare global flag.
6794 * target.h (struct target_ops) <handle_new_gdb_connection>:
6796 (target_handle_new_gdb_connection): New macro.
6797 * win32-low.c: Initialize new structure member.
6799 2015-05-12 Don Breazeal <donb@codesourcery.com>
6801 * mem-break.c (APPEND_TO_LIST): Define macro.
6802 (clone_agent_expr): New function.
6803 (clone_one_breakpoint): New function.
6804 (clone_all_breakpoints): New function.
6805 * mem-break.h: Declare new functions.
6807 2015-05-12 Don Breazeal <donb@codesourcery.com>
6809 * linux-low.c (linux_supports_fork_events): New function.
6810 (linux_supports_vfork_events): New function.
6811 (linux_target_ops): Initialize new structure members.
6812 (initialize_low): Call linux_check_ptrace_features.
6813 * lynx-low.c (lynx_target_ops): Initialize new structure
6815 * server.c (report_fork_events, report_vfork_events):
6817 (handle_query): Add new features to qSupported packet and
6819 (captured_main): Initialize new global variables.
6820 * target.h (struct target_ops) <supports_fork_events>:
6822 <supports_vfork_events>: New member.
6823 (target_supports_fork_events): New macro.
6824 (target_supports_vfork_events): New macro.
6825 * win32-low.c (win32_target_ops): Initialize new structure
6828 2015-05-12 Gary Benson <gbenson@redhat.com>
6830 * server.c (handle_qxfer_exec_file): Use current process
6833 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6835 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6836 Remove HAVE_PTRACE_GETREGS conditionals.
6837 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6838 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6840 2015-05-08 Yao Qi <yao.qi@linaro.org>
6842 * linux-low.c (linux_supports_conditional_breakpoints): New
6844 (linux_target_ops): Install new target method.
6845 * lynx-low.c (lynx_target_ops): Install NULL hook for
6846 supports_conditional_breakpoints.
6847 * nto-low.c (nto_target_ops): Likewise.
6848 * spu-low.c (spu_target_ops): Likewise.
6849 * win32-low.c (win32_target_ops): Likewise.
6850 * server.c (handle_query): Check
6851 target_supports_conditional_breakpoints.
6852 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6854 (target_supports_conditional_breakpoints): New macro.
6856 2015-05-06 Pedro Alves <palves@redhat.com>
6859 * server.c (start_inferior): If the process exits, mourn it.
6861 2015-04-21 Gary Benson <gbenson@redhat.com>
6863 * hostio.c (fileio_open_flags_to_host): Factored out to
6864 fileio_to_host_openflags in common/fileio.c. Single use
6867 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6869 * linux-xtensa-low.c (xtensa_fill_gregset)
6870 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6873 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6875 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6876 (regs_info): Replace usrregs pointer with NULL.
6878 2015-04-17 Gary Benson <gbenson@redhat.com>
6880 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6881 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6882 * server.c (handle_qxfer_exec_file): New function.
6883 (qxfer_packets): Add exec-file entry.
6884 (handle_query): Report qXfer:exec-file:read as supported packet.
6886 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6888 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6890 2015-04-09 Gary Benson <gbenson@redhat.com>
6892 * hostio-errno.c (errno_to_fileio_error): Remove function.
6893 Update caller to use remote_fileio_to_fio_error.
6895 2015-04-09 Yao Qi <yao.qi@linaro.org>
6897 * linux-low.c (linux_insert_point): Call
6898 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6899 (linux_remove_point): Call remove_memory_breakpoint if type is
6901 * linux-x86-low.c (x86_insert_point): Don't call
6902 insert_memory_breakpoint.
6903 (x86_remove_point): Don't call remove_memory_breakpoint.
6905 2015-04-01 Pedro Alves <palves@redhat.com>
6906 Cleber Rosa <crosa@redhat.com>
6908 * server.c (gdbserver_usage): Reorganize and extend the usage
6911 2015-03-24 Pedro Alves <palves@redhat.com>
6913 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6914 output. Also dump TRAP_TRACE.
6915 (linux_low_filter_event): In debug output, distinguish a
6916 resume_stop SIGSTOP from a delayed SIGSTOP.
6918 2015-03-24 Gary Benson <gbenson@redhat.com>
6920 * linux-x86-low.c (x86_linux_new_thread): Moved to
6922 (x86_linux_prepare_to_resume): Likewise.
6924 2015-03-24 Gary Benson <gbenson@redhat.com>
6926 * Makefile.in (x86-linux-dregs.o): New rule.
6927 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6928 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6929 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6930 (x86_linux_dr_get): Likewise.
6931 (x86_linux_dr_set): Likewise.
6932 (update_debug_registers_callback): Likewise.
6933 (x86_linux_dr_set_addr): Likewise.
6934 (x86_linux_dr_get_addr): Likewise.
6935 (x86_linux_dr_set_control): Likewise.
6936 (x86_linux_dr_get_control): Likewise.
6937 (x86_linux_dr_get_status): Likewise.
6938 (x86_linux_update_debug_registers): Likewise.
6940 2015-03-24 Gary Benson <gbenson@redhat.com>
6942 * linux-x86-low.c (x86_linux_update_debug_registers):
6943 New function, factored out from...
6944 (x86_linux_prepare_to_resume): ...this.
6946 2015-03-24 Gary Benson <gbenson@redhat.com>
6948 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6949 (x86_linux_dr_set): Likewise.
6950 (update_debug_registers_callback): Likewise.
6951 (x86_linux_dr_set_addr): Likewise.
6952 (x86_linux_dr_get_addr): Likewise.
6953 (x86_linux_dr_set_control): Likewise.
6954 (x86_linux_dr_get_control): Likewise.
6955 (x86_linux_dr_get_status): Likewise.
6956 (x86_linux_prepare_to_resume): Likewise.
6958 2015-03-24 Gary Benson <gbenson@redhat.com>
6960 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6961 Use perror_with_name. Pass string through gettext.
6962 (x86_linux_dr_set): Likewise.
6964 2015-03-24 Gary Benson <gbenson@redhat.com>
6966 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6967 (x86_linux_dr_set_addr): ...this.
6968 (x86_dr_low_get_addr): Rename to...
6969 (x86_linux_dr_get_addr): ...this.
6970 (x86_dr_low_set_control): Rename to...
6971 (x86_linux_dr_set_control): ...this.
6972 (x86_dr_low_get_control): Rename to...
6973 (x86_linux_dr_get_control): ...this.
6974 (x86_dr_low_get_status): Rename to...
6975 (x86_linux_dr_get_status): ...this.
6976 (x86_dr_low): Update with new function names.
6978 2015-03-24 Gary Benson <gbenson@redhat.com>
6980 * Makefile.in (x86-linux.o): New rule.
6981 * configure.srv: Add x86-linux.o to relevant targets.
6982 * linux-low.c (lwp_set_arch_private_info): New function.
6983 (lwp_arch_private_info): Likewise.
6984 * linux-x86-low.c: Include nat/x86-linux.h.
6985 (arch_lwp_info): Removed structure.
6986 (update_debug_registers_callback):
6987 Use lwp_set_debug_registers_changed.
6988 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6989 and lwp_set_debug_registers_changed.
6990 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6992 2015-03-24 Gary Benson <gbenson@redhat.com>
6994 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6995 * linux-arm-low.c (arm_new_thread): Likewise.
6996 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6997 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6998 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6999 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7001 2015-03-24 Gary Benson <gbenson@redhat.com>
7003 * linux-low.c (ptid_of_lwp): New function.
7004 (lwp_is_stopped): Likewise.
7005 (lwp_stop_reason): Likewise.
7006 * linux-x86-low.c (update_debug_registers_callback):
7008 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7011 2015-03-24 Gary Benson <gbenson@redhat.com>
7013 * linux-low.h (linux_stop_lwp): Remove declaration.
7015 2015-03-24 Gary Benson <gbenson@redhat.com>
7017 * linux-low.h: Include nat/linux-nat.h.
7018 * linux-low.c (iterate_over_lwps_args): New structure.
7019 (iterate_over_lwps_filter): New function.
7020 (iterate_over_lwps): Likewise.
7021 * linux-x86-low.c (update_debug_registers_callback):
7022 Update signature to what iterate_over_lwps expects.
7023 Remove PID check that iterate_over_lwps now performs.
7024 (x86_dr_low_set_addr): Use iterate_over_lwps.
7025 (x86_dr_low_set_control): Likewise.
7027 2015-03-24 Gary Benson <gbenson@redhat.com>
7029 * linux-x86-low.c (x86_debug_reg_state): New function.
7030 (x86_linux_prepare_to_resume): Use the above.
7032 2015-03-24 Gary Benson <gbenson@redhat.com>
7034 * linux-low.c (current_lwp_ptid): New function.
7035 * linux-x86-low.c: Include nat/linux-nat.h.
7036 (x86_dr_low_get_addr): Use current_lwp_ptid.
7037 (x86_dr_low_get_control): Likewise.
7038 (x86_dr_low_get_status): Likewise.
7040 2015-03-20 Pedro Alves <palves@redhat.com>
7042 * tracepoint.c (cmd_qtstatus): Make "str" const.
7044 2015-03-20 Pedro Alves <palves@redhat.com>
7046 * server.c (handle_general_set): Make "req_str" const.
7048 2015-03-19 Pedro Alves <palves@redhat.com>
7050 * linux-low.c (linux_resume_one_lwp): Rename to ...
7051 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7052 instead call perror_with_name.
7053 (check_ptrace_stopped_lwp_gone): New function.
7054 (linux_resume_one_lwp): Reimplement as wrapper around
7055 linux_resume_one_lwp_throw that swallows errors if the LWP is
7058 2015-03-19 Pedro Alves <palves@redhat.com>
7060 * linux-low.c (count_events_callback, select_event_lwp_callback):
7061 No longer check whether the thread has resume_stop as last resume
7064 2015-03-19 Pedro Alves <palves@redhat.com>
7066 * linux-low.c (count_events_callback, select_event_lwp_callback):
7067 Use the lwp's status_pending_p field, not the thread's.
7069 2015-03-19 Pedro Alves <palves@redhat.com>
7071 * linux-low.c (select_event_lwp_callback): Update comments to
7072 no longer mention SIGTRAP.
7074 2015-03-18 Gary Benson <gbenson@redhat.com>
7076 * server.c (handle_query): Do not report vFile:fstat as supported.
7078 2015-03-11 Gary Benson <gbenson@redhat.com>
7080 * hostio.c (sys/types.h): New include.
7081 (sys/stat.h): Likewise.
7082 (common-remote-fileio.h): Likewise.
7083 (handle_fstat): New function.
7084 (handle_vFile): Handle vFile:fstat packets.
7086 2015-03-11 Gary Benson <gbenson@redhat.com>
7088 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7089 struct stat.st_blocks and struct stat.st_blksize.
7090 * configure: Regenerate.
7091 * config.in: Likewise.
7092 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7093 (OBS): Add common-remote-fileio.o.
7094 (common-remote-fileio.o): New rule.
7096 2015-03-09 Pedro Alves <palves@redhat.com>
7098 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7099 'struct sockaddr' pointer in 'accept' call.
7101 2015-03-09 Pedro Alves <palves@redhat.com>
7104 2015-03-07 Pedro Alves <palves@redhat.com>
7105 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7106 or <winsock2.h> here. Instead include "gdb_socket.h".
7107 (remote_open): Use union gdb_sockaddr_u.
7108 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7109 or <winsock2.h> here. Instead include "gdb_socket.h".
7110 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7111 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7113 (init_named_socket, gdb_agent_helper_thread): Use union
7116 2015-03-07 Pedro Alves <palves@redhat.com>
7118 * configure.ac (build_warnings): Move
7119 -Wdeclaration-after-statement to the C-specific set.
7120 * configure: Regenerate.
7122 2015-03-07 Pedro Alves <palves@redhat.com>
7124 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7125 or <winsock2.h> here. Instead include "gdb_socket.h".
7126 (remote_open): Use union gdb_sockaddr_u.
7127 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7128 or <winsock2.h> here. Instead include "gdb_socket.h".
7129 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7130 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7132 (init_named_socket, gdb_agent_helper_thread): Use union
7135 2015-03-07 Pedro Alves <palves@redhat.com>
7137 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7140 2015-03-06 Yao Qi <yao.qi@linaro.org>
7142 * linux-aarch64-low.c (aarch64_insert_point): Use
7143 show_debug_regs as a boolean.
7144 (aarch64_remove_point): Likewise.
7146 2015-03-05 Pedro Alves <palves@redhat.com>
7148 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7149 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7150 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7151 * nto-low.c (nto_target_ops): Likewise.
7152 * spu-low.c (spu_target_ops): Likewise.
7153 * win32-low.c (win32_target_ops): Likewise.
7155 2015-03-04 Pedro Alves <palves@redhat.com>
7157 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7158 Decide whether a breakpoint triggered based on the SIGTRAP's
7160 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7161 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7162 (linux_low_filter_event): Check for breakpoints before checking
7164 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7166 (linux_stopped_by_sw_breakpoint)
7167 (linux_supports_stopped_by_sw_breakpoint)
7168 (linux_stopped_by_hw_breakpoint)
7169 (linux_supports_stopped_by_hw_breakpoint): New functions.
7170 (linux_target_ops): Install new target methods.
7172 2015-03-04 Pedro Alves <palves@redhat.com>
7174 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7175 * server.c (swbreak_feature, hwbreak_feature): New globals.
7176 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7177 (captured_main): Clear swbreak_feature and hwbreak_feature.
7178 * server.h (swbreak_feature, hwbreak_feature): Declare.
7179 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7180 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7181 supports_stopped_by_hw_breakpoint>: New fields.
7182 (target_supports_stopped_by_sw_breakpoint)
7183 (target_stopped_by_sw_breakpoint)
7184 (target_supports_stopped_by_hw_breakpoint)
7185 (target_stopped_by_hw_breakpoint): Declare.
7187 2015-03-04 Pedro Alves <palves@redhat.com>
7189 enum lwp_stop_reason -> enum target_stop_reason
7190 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7191 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7192 (linux_wait_1, stuck_in_jump_pad_callback)
7193 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7194 (linux_stopped_by_watchpoint):
7195 * linux-low.h (enum lwp_stop_reason): Delete.
7196 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7197 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7199 2015-03-04 Yao Qi <yao.qi@linaro.org>
7201 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7203 2015-03-03 Gary Benson <gbenson@redhat.com>
7205 * hostio.c (handle_vFile): Fix prefix lengths.
7207 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7209 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7212 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7214 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7215 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7216 (clean): Add "rm -f" for above C files.
7217 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7218 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7219 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7220 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7221 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7222 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7223 (init_registers_s390x_vx_linux64)
7224 (init_registers_s390x_tevx_linux64)
7225 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7226 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7228 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7229 (s390_store_vxrs_high): New functions.
7230 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7232 (s390_arch_setup): Add logic for selecting one of the new target
7233 descriptions. Activate the new vector regsets if applicable.
7234 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7235 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7236 and init_registers_s390x_tevx_linux64.
7238 2015-03-01 Pedro Alves <palves@redhat.com>
7240 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7243 2015-02-27 Pedro Alves <palves@redhat.com>
7245 * linux-x86-low.c (u_debugreg_offset): New function.
7246 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7248 2015-02-27 Pedro Alves <palves@redhat.com>
7250 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7251 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7252 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7253 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7254 (ps_lsetfpregs, ps_getpid)
7255 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7256 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7257 (ps_lsetxregs, ps_plog): Declare.
7259 2015-02-27 Pedro Alves <palves@redhat.com>
7261 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7262 IP_AGENT_EXPORT_FUNC.
7263 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7264 IP_AGENT_EXPORT_FUNC.
7265 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7266 (IP_AGENT_EXPORT): Delete.
7267 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7268 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7269 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7270 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7271 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7272 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7273 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7274 (traceframe_read_count, traceframe_write_count)
7275 (traceframes_created, trace_state_variables, get_raw_reg)
7276 (get_trace_state_variable_value, set_trace_state_variable_value)
7277 (ust_loaded, helper_thread_id, cmd_buf): Use
7278 IPA_SYM_EXPORTED_NAME.
7279 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7280 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7281 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7282 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7283 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7284 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7285 EXTERN_C_PUSH/EXTERN_C_POP.
7286 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7287 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7288 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7289 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7290 (traceframe_write_count, traceframe_read_count)
7291 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7292 (about_to_request_buffer_space, get_trace_state_variable_value)
7293 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7294 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7295 EXTERN_C_PUSH/EXTERN_C_POP.
7296 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7297 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7298 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7299 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7300 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7301 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7302 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7303 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7305 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7306 (IP_AGENT_EXPORT_VAR_DECL): Define.
7308 (gdb_agent_get_raw_reg): Declare.
7310 2015-02-27 Tom Tromey <tromey@redhat.com>
7311 Pedro Alves <palves@redhat.com>
7313 Rename symbols whose names are reserved C++ keywords throughout.
7315 2015-02-27 Pedro Alves <palves@redhat.com>
7317 * Makefile.in (COMPILER): New, get it from autoconf.
7318 (CXX): Get from autoconf instead.
7319 (COMPILE.pre): Use COMPILER.
7320 (CC-LD): Rename to ...
7321 (CC_LD): ... this. Use COMPILER.
7322 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7323 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7324 * acinclude.m4: Include build-with-cxx.m4.
7325 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7326 Disable -Werror by default if building in C++ mode.
7327 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7328 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7329 the C++ compiler. Save/restore CXXFLAGS too.
7330 * configure: Regenerate.
7332 2015-02-27 Pedro Alves <palves@redhat.com>
7334 * acinclude.m4: Include libiberty.m4.
7335 * configure.ac: Call libiberty_INIT.
7336 * config.in, configure: Regenerate.
7338 2015-02-26 Pedro Alves <palves@redhat.com>
7340 * linux-low.c (linux_wait_1): When incrementing the PC past a
7341 program breakpoint always use the_low_target.breakpoint_len as
7342 increment, rather than the maximum between that and
7343 the_low_target.decr_pc_after_break.
7345 2015-02-23 Pedro Alves <palves@redhat.com>
7347 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7348 thread was doing a step-over; always adjust the PC if
7349 we stepped over a permanent breakpoint.
7350 (linux_wait_1): If we stepped over breakpoint that was on top of a
7351 permanent breakpoint, manually advance the PC past it.
7353 2015-02-23 Pedro Alves <palves@redhat.com>
7355 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7357 (x86_fill_gregset, x86_store_gregset): Use it when handling
7360 2015-02-20 Pedro Alves <palves@redhat.com>
7362 * thread-db.c: Include "nat/linux-procfs.h".
7363 (thread_db_init): Skip listing new threads if the kernel supports
7364 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7366 2015-02-20 Pedro Alves <palves@redhat.com>
7368 * linux-low.c (status_pending_p_callback): Use ptid_match.
7370 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7372 PR breakpoints/16812
7373 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7374 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7375 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7377 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7379 PR breakpoints/15956
7380 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7382 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7384 * linux-low.c (linux_low_btrace_conf): Print size.
7385 * server.c (handle_btrace_conf_general_set): New.
7386 (hanle_general_set): Call handle_btrace_conf_general_set.
7387 (handle_query): Report Qbtrace-conf:bts:size as supported.
7389 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7391 * linux-low.c (linux_low_enable_btrace): Update parameters.
7392 (linux_low_btrace_conf): New.
7393 (linux_target_ops)<to_btrace_conf>: Initialize.
7394 * server.c (current_btrace_conf): New.
7395 (handle_btrace_enable): Rename to ...
7396 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7397 to target_enable_btrace. Update comment. Update users.
7398 (handle_qxfer_btrace_conf): New.
7399 (qxfer_packets): Add btrace-conf entry.
7400 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7401 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7402 (target_ops)<read_btrace_conf>: New.
7403 (target_enable_btrace): Update parameters.
7404 (target_read_btrace_conf): New.
7406 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7408 * server.c (handle_btrace_general_set): Remove call to
7409 target_supports_btrace.
7410 (supported_btrace_packets): New.
7411 (handle_query): Call supported_btrace_packets.
7412 * target.h: include btrace-common.h.
7413 (btrace_target_info): Removed.
7414 (supports_btrace, target_supports_btrace): Update parameters.
7416 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7418 * Makefile.in (SFILES): Add common/btrace-common.c.
7419 (OBS): Add common/btrace-common.o.
7420 (btrace-common.o): Add build rules.
7421 * linux-low: Include btrace-common.h.
7422 (linux_low_read_btrace): Use struct btrace_data. Call
7423 btrace_data_init and btrace_data_fini.
7425 2015-02-06 Pedro Alves <palves@redhat.com>
7427 * thread-db.c (find_new_threads_callback): Add debug output.
7429 2015-02-04 Pedro Alves <palves@redhat.com>
7431 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7432 (resume_stopped_resumed_lwps): New function.
7433 (linux_wait_for_event_filtered): Use it.
7435 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7437 * Makefile.in (SFILES): Add linux-personality.c.
7438 (linux-personality.o): New rule.
7439 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7440 list of objects to be built.
7441 * linux-low.c: Include nat/linux-personality.h.
7442 (linux_create_inferior): Remove code to disable address space
7443 randomization (moved to ../nat/linux-personality.c). Create
7444 cleanup to disable address space randomization.
7446 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7448 * Makefile.in (posix-strerror.o): New rule.
7449 (mingw-strerror.o): Likewise.
7450 * configure: Regenerated.
7451 * configure.ac: Source file ../common/common.host. Initialize new
7452 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7454 2015-01-14 Yao Qi <yao@codesourcery.com>
7456 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7457 (ppc-linux.o): New rule.
7458 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7459 * configure.ac: AC_CHECK_FUNCS(getauxval).
7460 * config.in: Re-generated.
7461 * configure: Re-generated.
7462 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7463 ppc64_64bit_inferior_p
7465 2015-01-14 Yao Qi <yao@codesourcery.com>
7467 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7468 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7469 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7470 (PT_ORIG_R3, PT_TRAP): Likewise.
7471 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7472 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7473 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7475 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7477 * i387-fp.c (i387_cache_to_xsave): In look over
7478 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7479 zmmh_low_space field by use of zmmh_high_space.
7481 2015-01-09 Pedro Alves <palves@redhat.com>
7483 * linux-low.c (step_over_bkpt): Move higher up in the file.
7484 (handle_extended_wait): Don't store the stop_pc here.
7485 (get_stop_pc): Adjust comments and rename to ...
7486 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7487 stopped for a software breakpoint or hardware breakpoint.
7488 (thread_still_has_status_pending_p): New function.
7489 (status_pending_p_callback): Use
7490 thread_still_has_status_pending_p. If the event is no longer
7491 interesting, resume the LWP.
7492 (handle_tracepoints): Add assert.
7493 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7494 (wstatus_maybe_breakpoint): New function.
7495 (cancel_breakpoint): Delete function.
7496 (check_stopped_by_watchpoint): New function, factored out from
7497 linux_low_filter_event.
7498 (lp_status_maybe_breakpoint): Delete function.
7499 (linux_low_filter_event): Remove filter_ptid argument.
7500 Leave thread group exits pending here. Store the LWP's stop PC.
7501 Always leave events pending.
7502 (linux_wait_for_event_filtered): Pull all events out of the
7503 kernel, and leave them all pending.
7504 (count_events_callback, select_event_lwp_callback): Consider all
7506 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7507 (select_event_lwp): Only give preference to the stepping LWP in
7508 all-stop mode. Adjust comments.
7509 (ignore_event): New function.
7510 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7511 references to cancel_breakpoints. Adjust to renames. Also give
7512 equal priority to all LWPs that have had events in non-stop mode.
7513 If reporting a software breakpoint event, unadjust the LWP's PC.
7514 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7515 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7517 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7518 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7519 (linux_stopped_by_watchpoint): Adjust.
7520 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7521 * linux-low.h (enum lwp_stop_reason): New.
7522 (struct lwp_info) <stop_pc>: Adjust comment.
7523 <stopped_by_watchpoint>: Delete field.
7524 <stop_reason>: New field.
7525 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7526 * mem-break.c (software_breakpoint_inserted_here)
7527 (hardware_breakpoint_inserted_here): New function.
7528 * mem-break.h (software_breakpoint_inserted_here)
7529 (hardware_breakpoint_inserted_here): Declare.
7530 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7531 (cancel_breakpoints): Delete.
7532 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7533 (upload_fast_traceframes): Remove references to
7536 2015-01-09 Pedro Alves <palves@redhat.com>
7538 * thread-db.c (find_new_threads_callback): Ignore thread if the
7539 kernel thread ID is -1.
7541 2015-01-09 Pedro Alves <palves@redhat.com>
7543 * linux-low.c (linux_attach_fail_reason_string): Move to
7544 nat/linux-ptrace.c, and rename.
7545 (linux_attach_lwp): Update comment.
7546 (attach_proc_task_lwp_callback): New function.
7547 (linux_attach): Adjust to rename and use
7548 linux_proc_attach_tgid_threads.
7549 (linux_attach_fail_reason_string): Delete declaration.
7551 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7553 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7554 * server.c (gdbserver_version): Likewise.
7556 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7558 * remote-utils.c: Include ctype.h.
7559 (input_interrupt): Explicitly handle the case when the char
7560 received is the NUL byte. Improve the printing of non-ASCII
7563 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7565 * linux-low.c (linux_low_filter_event): Update call to
7566 linux_enable_event_reporting following the addition of
7567 a new parameter to that function.
7569 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7572 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7573 (AARCH64_FPCR_REGNO): Likewise.
7574 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7575 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7576 (aarch64_store_fpregset): Likewise.
7578 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7580 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7581 Remove FIXME comment about assumption about N.
7583 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7585 * configure.ac: If large-file support is disabled in GDBserver,
7586 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7587 * configure: Regenerate.
7589 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7591 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7592 warning upon ENODATA from ptrace.
7593 * linux-s390-low.c (s390_store_tdb): New.
7594 (s390_regsets): Add regset for NT_S390_TDB.
7596 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7598 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7599 without a fill_function.
7600 * linux-s390-low.c (s390_fill_last_break): Remove.
7601 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7602 (s390_arch_setup): Use regset's size instead of fill_function for
7605 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7607 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7608 the regset's store function when ptrace returned an error.
7609 * regcache.c (get_thread_regcache): Invalidate register cache
7610 before fetching inferior's registers.
7612 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7614 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7615 while-loop as for-loop.
7616 (regsets_store_inferior_registers): Likewise.
7618 2014-11-28 Yao Qi <yao@codesourcery.com>
7620 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7621 * config.in, configure: Re-generate.
7622 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7625 2014-11-21 Yao Qi <yao@codesourcery.com>
7627 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7628 (AC_CHECK_HEADERS): Remove malloc.h.
7629 * configure: Re-generated.
7630 * config.in: Re-generated.
7631 * server.h: Don't include alloca.h and malloc.h.
7632 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7633 Don't include malloc.h.
7635 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7637 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7638 corresponding ERRNO check in same block.
7640 2014-11-12 Pedro Alves <palves@redhat.com>
7642 * server.c (cont_thread): Update comment.
7643 (start_inferior, attach_inferior): No longer clear cont_thread.
7644 (handle_v_cont): No longer set cont_thread.
7645 (captured_main): Clear cont_thread each time a GDB connects.
7647 2014-11-12 Pedro Alves <palves@redhat.com>
7649 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7650 thread, and don't resume all threads if the Hc thread has exited.
7652 2014-11-12 Pedro Alves <palves@redhat.com>
7654 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7655 the process group instead of to a specific LWP.
7657 2014-10-15 Pedro Alves <palves@redhat.com>
7660 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7662 (arm_set_thread_context): Delete.
7663 (the_low_target): Adjust.
7664 * win32-i386-low.c (debug_registers_changed)
7665 (debug_registers_used): Delete.
7666 (update_debug_registers_callback): New function.
7667 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7668 needing to update their debug registers.
7669 (win32_get_current_dr): New function.
7670 (x86_dr_low_get_addr, x86_dr_low_get_control)
7671 (x86_dr_low_get_status): Fetch the debug register from the thread
7673 (i386_initial_stuff): Adjust.
7674 (i386_get_thread_context): Remove current_event parameter. Don't
7675 clear debug_registers_changed nor copy DR values to
7677 (i386_set_thread_context): Delete.
7678 (i386_prepare_to_resume): New function.
7679 (i386_thread_added): Mark the thread as needing to update irs
7681 (the_low_target): Remove i386_set_thread_context and install
7682 i386_prepare_to_resume.
7683 * win32-low.c (win32_get_thread_context): Adjust.
7684 (win32_set_thread_context): Use SetThreadContext
7686 (win32_prepare_to_resume): New function.
7687 (win32_require_context): New function, factored out from ...
7688 (thread_rec): ... this.
7689 (continue_one_thread): Call win32_prepare_to_resume on each thread
7690 we're about to continue.
7691 (win32_resume): Call win32_prepare_to_resume on the event thread.
7692 * win32-low.h (struct win32_thread_info)
7693 <debug_registers_changed>: New field.
7694 (struct win32_target_ops): Change prototype of set_thread_context,
7695 delete set_thread_context and add prepare_to_resume.
7696 (win32_require_context): New declaration.
7698 2014-10-08 Gary Benson <gbenson@redhat.com>
7700 * server.h: Do not include common-exceptions.h.
7702 2014-10-08 Gary Benson <gbenson@redhat.com>
7704 * server.h: Do not include cleanups.h.
7706 2014-09-30 James Hogan <james.hogan@imgtec.com>
7708 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7711 2014-09-23 Yao Qi <yao@codesourcery.com>
7713 * linux-low.c (lp_status_maybe_breakpoint): New function.
7714 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7715 (count_events_callback): Likewise.
7716 (select_event_lwp_callback): Likewise.
7717 (cancel_breakpoints_callback): Likewise.
7719 2014-09-19 Don Breazeal <donb@codesourcery.com>
7721 * linux-low.c (handle_extended_wait): Call
7722 linux_ptrace_get_extended_event.
7723 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7724 linux_is_extended_waitstatus.
7726 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7728 * Makefile.in (CPPFLAGS): Define.
7729 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7730 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7732 2014-09-16 Gary Benson <gbenson@redhat.com>
7734 * inferiors.h (current_inferior): Renamed as...
7735 (current_thread): New variable. All uses updated.
7736 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7737 (maybe_move_out_of_jump_pad): Likewise.
7738 (cancel_breakpoint): Likewise.
7739 (linux_low_filter_event): Likewise.
7740 (wait_for_sigstop): Likewise.
7741 (linux_resume_one_lwp): Likewise.
7742 (need_step_over_p): Likewise.
7743 (start_step_over): Likewise.
7744 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7745 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7746 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7747 and save_inferior as saved_thread.
7748 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7750 (regcache_invalidate_thread): Likewise.
7751 * remote-utils.c (prepare_resume_reply): Likewise.
7752 * thread-db.c (thread_db_get_tls_address): Likewise.
7753 (disable_thread_event_reporting): Likewise.
7754 (remove_thread_event_breakpoints): Likewise.
7755 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7757 * target.h (set_desired_inferior): Renamed as...
7758 (set_desired_thread): New declaration. All uses updated.
7759 * server.c (myresume): Updated comment to reference thread instead
7761 (handle_serial_event): Likewise.
7762 (handle_target_event): Likewise.
7764 2014-09-12 Tom Tromey <tromey@redhat.com>
7765 Gary Benson <gbenson@redhat.com>
7767 * regcache.h: Include common-regcache.h.
7768 (regcache_read_pc): Don't declare.
7769 * regcache.c (get_thread_regcache_for_ptid): New function.
7771 2014-09-11 Tom Tromey <tromey@redhat.com>
7772 Gary Benson <gbenson@redhat.com>
7774 * symbol.c: New file.
7775 * Makefile.in (SFILES): Add symbol.c.
7776 (OBS): Add symbol.o.
7778 2014-09-11 Gary Benson <gbenson@redhat.com>
7780 * target.c (target_stop_ptid, target_continue_ptid): New
7783 2014-09-11 Tom Tromey <tromey@redhat.com>
7784 Gary Benson <gbenson@redhat.com>
7786 * target.h: Include target/target.h.
7787 * target.c (target_read_memory, target_read_uint32)
7788 (target_write_memory): New functions.
7790 2014-09-11 Gary Benson <gbenson@redhat.com>
7792 * server.h (debug_hw_points): Don't declare.
7793 * server.c (debug_hw_points): Don't define. Replace all uses
7794 with show_debug_regs.
7795 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7796 all uses with show_debug_regs.
7798 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7800 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7801 endianness into account.
7802 (ppc_supply_ptrace_register): Likewise.
7804 2014-09-03 James Hogan <james.hogan@imgtec.com>
7806 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7807 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7809 2014-09-03 Gary Benson <gbenson@redhat.com>
7811 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7812 ALL_DEBUG_ADDRESS_REGISTERS.
7814 2014-09-02 Gary Benson <gbenson@redhat.com>
7816 * i386-low.h: Renamed as...
7817 * x86-low.h: New file. All type, function and variable name
7818 prefixes changed from "i386_" to "x86_". All references updated.
7819 * i386-low.c: Renamed as...
7820 * x86-low.c: New file. All type, function and variable name
7821 prefixes changed from "i386_" to "x86_". All references updated.
7823 2014-09-02 Gary Benson <gbenson@redhat.com>
7825 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7826 (x86_linux_new_thread): Likewise.
7828 2014-08-29 Gary Benson <gbenson@redhat.com>
7830 * server.h (setjmp.h): Do not include.
7831 (toplevel): Do not declare.
7832 (common-exceptions.h): Include.
7833 (cleanups.h): Likewise.
7834 * server.c (toplevel): Do not define.
7835 (exit_code): New static global.
7836 (detach_or_kill_for_exit_cleanup): New function.
7837 (main): New function. Original main renamed to...
7838 (captured_main): New function.
7839 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7841 2014-08-29 Gary Benson <gbenson@redhat.com>
7843 * Makefile.in (SFILES): Add common/common-exceptions.c.
7844 (OBS): Add common-exceptions.o.
7845 (common-exceptions.o): New rule.
7846 * utils.c (prepare_to_throw_exception): New function.
7848 2014-08-29 Gary Benson <gbenson@redhat.com>
7850 * config.in: Regenerate.
7851 * configure: Likewise.
7853 2014-08-29 Gary Benson <gbenson@redhat.com>
7855 * Makefile.in (SFILES): Add common/cleanups.c.
7857 (cleanups.o): New rule.
7859 2014-08-29 Gary Benson <gbenson@redhat.com>
7861 * utils.c (internal_vwarning): New function.
7863 2014-08-28 Gary Benson <gbenson@redhat.com>
7865 * utils.h (fatal): Remove declaration.
7866 * utils.c (fatal): Remove function.
7868 2014-08-28 Gary Benson <gbenson@redhat.com>
7870 * tracepoint.c (gdb_agent_init): Replace fatal with
7872 (initialize_tracepoint): Likewise.
7874 2014-08-28 Gary Benson <gbenson@redhat.com>
7876 * remote-utils.c (remote_prepare): Replace fatal with error.
7878 2014-08-28 Gary Benson <gbenson@redhat.com>
7880 * linux-low.c (linux_async): Replace fatal with warning.
7882 (linux_start_non_stop): Return -1 if linux_async failed.
7884 2014-08-28 Gary Benson <gbenson@redhat.com>
7886 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7888 (i386_dr_low_get_addr): Remove vague comment.
7889 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7892 2014-08-28 Gary Benson <gbenson@redhat.com>
7894 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7895 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7897 (linux_resume_one_lwp): Likewise.
7898 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7900 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7901 with internal_error.
7902 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7903 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7904 (find_register_by_name): Replace fatal with internal_error.
7905 (find_regno): Likewise.
7906 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7907 * thread-db.c (thread_db_create_event): Likewise.
7908 (thread_db_load_search): Likewise.
7909 (try_thread_db_load_1): Likewise.
7910 * tracepoint.c (get_jump_space_head): Replace fatal with
7912 (claim_trampoline_space): Likewise.
7913 (have_fast_tracepoint_trampoline_buffer): Likewise.
7914 (cmd_qtstart): Likewise.
7915 (stop_tracing): Likewise.
7916 (fast_tracepoint_collecting): Likewise.
7917 (target_malloc): Likewise.
7918 (download_tracepoint): Likewise.
7919 (download_trace_state_variables): Replace check with gdb_assert.
7920 (upload_fast_traceframes): Replace fatal with internal_error.
7922 2014-08-19 Tom Tromey <tromey@redhat.com>
7923 Gary Benson <gbenson@redhat.com>
7925 * Makefile.in (SFILES): Add common/common-debug.c.
7926 (OBS): Add common-debug.o.
7927 (common-debug.o): New rule.
7928 * debug.h (debug_printf): Don't declare.
7929 * debug.c (debug_printf): Renamed and rewritten as...
7930 (debug_vprintf): New function.
7932 2014-08-19 Gary Benson <gbenson@redhat.com>
7934 * utils.h: Do not include print-utils.h.
7936 2014-08-19 Tom Tromey <tromey@redhat.com>
7937 Gary Benson <gbenson@redhat.com>
7939 * server.h: Add static assertion.
7940 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7942 2014-08-19 Tom Tromey <tromey@redhat.com>
7943 Gary Benson <gbenson@redhat.com>
7945 * Makefile.in (SFILES): Add common/errors.c.
7946 (OBS): Add errors.o.
7947 (IPA_OBS): Add errors-ipa.o.
7948 (errors.o): New rule.
7949 (errors-ipa.o): Likewise.
7950 * utils.h (perror_with_name, error, warning): Don't declare.
7951 * utils.c (warning): Renamed and rewritten as...
7952 (vwarning): New function.
7953 (error): Renamed and rewritten as...
7954 (verror): New function.
7955 (internal_error): Renamed and rewritten as...
7956 (internal_verror): New function.
7958 2014-08-07 Gary Benson <gbenson@redhat.com>
7960 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7961 * configure: Regenerate.
7962 * config.in: Likewise.
7963 * server.h: Do not include errno.h.
7964 * event-loop.c: Likewise.
7965 * hostio-errno.c: Likewise.
7966 * linux-low.c: Likewise.
7967 * remote-utils.c: Likewise.
7968 * spu-low.c: Likewise.
7969 * utils.c: Likewise.
7970 * gdbreplay.c: Unconditionally include errno.h.
7972 2014-08-07 Gary Benson <gbenson@redhat.com>
7974 * server.h: Do not include string.h.
7975 * event-loop.c: Likewise.
7976 * linux-low.c: Likewise.
7977 * regcache.c: Likewise.
7978 * remote-utils.c: Likewise.
7979 * spu-low.c: Likewise.
7980 * utils.c: Likewise.
7982 2014-08-07 Gary Benson <gbenson@redhat.com>
7984 * server.h: Do not include gdb_assert.h.
7986 2014-08-07 Gary Benson <gbenson@redhat.com>
7988 * server.h: Do not include common-utils.h.
7990 2014-08-07 Gary Benson <gbenson@redhat.com>
7992 * server.h: Do not include ptid.h.
7993 * notif.h: Likewise.
7995 2014-08-07 Gary Benson <gbenson@redhat.com>
7997 * server.h: Do not include gdb_locale.h.
7999 2014-08-07 Gary Benson <gbenson@redhat.com>
8001 * server.h: Do not include gdb/signals.h.
8002 * win32-low.c: Likewise.
8004 2014-08-07 Gary Benson <gbenson@redhat.com>
8006 * server.h: Do not include pathmax.h.
8008 2014-08-07 Gary Benson <gbenson@redhat.com>
8010 * server.h: Do not include libiberty.h.
8011 * linux-bfin-low.c: Likewise.
8013 2014-08-07 Gary Benson <gbenson@redhat.com>
8015 * server.h: Do not include ansidecl.h.
8017 2014-08-07 Gary Benson <gbenson@redhat.com>
8019 * linux-x86-low.c: Do not include stddef.h.
8020 * lynx-ppc-low.c: Likewise.
8021 * tracepoint.c: Likewise.
8023 2014-08-07 Gary Benson <gbenson@redhat.com>
8025 * server.h: Do not include stdarg.h.
8026 * nto-low.c: Likewise.
8028 2014-08-07 Gary Benson <gbenson@redhat.com>
8030 * server.h: Do not include stdlib.h.
8031 * inferiors.c: Likewise.
8032 * linux-low.c: Likewise.
8033 * regcache.c: Likewise.
8034 * spu-low.c: Likewise.
8035 * tracepoint.c: Likewise.
8036 * utils.c: Likewise.
8038 2014-08-07 Gary Benson <gbenson@redhat.com>
8040 * server.h: Do not include stdio.h.
8041 * linux-low.c: Likewise.
8042 * remote-utils.c: Likewise.
8043 * spu-low.c: Likewise.
8044 * utils.c: Likewise.
8045 * wincecompat.c: Likewise.
8047 2014-08-06 Gary Benson <gbenson@redhat.com>
8049 * regcache.c (init_register_cache): Move conditionals inside if.
8051 2014-08-06 Gary Benson <gbenson@redhat.com>
8053 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8055 2014-07-31 Gary Benson <gbenson@redhat.com>
8057 * ax.h: Do not include server.h.
8058 * gdbthread.h: Likewise.
8059 * lynx-low.h: Likewise.
8060 * notif.h: Likewise.
8062 2014-07-30 Gary Benson <gbenson@redhat.com>
8064 * server.h: Include common-defs.h.
8065 Do not include config.h or build-gnulib-gdbserver/config.h.
8067 2014-07-30 Gary Benson <gbenson@redhat.com>
8069 * hostio-errno.c: Move server.h to top of includes list.
8070 * inferiors.c: Likewise.
8071 * linux-x86-low.c: Likewise.
8072 * notif.c: Include server.h.
8074 2014-07-24 Tom Tromey <tromey@redhat.com>
8075 Gary Benson <gbenson@redhat.com>
8077 * server.h (CORE_ADDR): Now unsigned.
8079 2014-07-16 Pedro Alves <palves@redhat.com>
8081 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8083 2014-07-15 Pedro Alves <palves@redhat.com>
8085 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8088 2014-07-11 Pedro Alves <palves@redhat.com>
8090 * linux-low.c (kill_wait_lwp): New function, based on
8091 kill_one_lwp_callback, but use my_waitpid directly.
8092 (kill_one_lwp_callback, linux_kill): Use it.
8094 2014-06-23 Pedro Alves <palves@redhat.com>
8096 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8097 before setting DR0..DR3.
8099 2014-06-20 Gary Benson <gbenson@redhat.com>
8101 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8102 * configure: Regenerated.
8103 * config.in: Likewise.
8105 2014-06-20 Gary Benson <gbenson@redhat.com>
8107 * Makefile.in (SFILES): Update locations for files moved
8109 (object file files): Reordered.
8111 2014-06-20 Gary Benson <gbenson@redhat.com>
8113 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8114 (i386_dr_low_set_addr): Likewise.
8115 (i386_dr_low_get_addr): Likewise.
8116 (i386_dr_low_can_set_control): Likewise.
8117 (i386_dr_low_set_control): Likewise.
8118 (i386_dr_low_get_control): Likewise.
8119 (i386_dr_low_get_status): Likewise.
8120 (i386_get_debug_register_length): Likewise.
8121 * linux-x86-low.c (i386_dr_low_set_addr):
8122 Changed signature. Made static.
8123 (i386_dr_low_get_addr): Likewise.
8124 (i386_dr_low_set_control): Likewise.
8125 (i386_dr_low_get_control): Likewise.
8126 (i386_dr_low_get_status): Likewise.
8127 (i386_dr_low): New global variable.
8128 * win32-i386-low.c (i386_dr_low_set_addr):
8129 Changed signature. Made static.
8130 (i386_dr_low_get_addr): Likewise.
8131 (i386_dr_low_set_control): Likewise.
8132 (i386_dr_low_get_control): Likewise.
8133 (i386_dr_low_get_status): Likewise.
8134 (i386_dr_low): New global variable.
8136 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8138 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8139 * Makefile.in (AR, AR_FLAGS): Define.
8140 * configure: Regenerate.
8142 2014-06-19 Gary Benson <gbenson@redhat.com>
8144 * Makefile.in (i386-dregs.o): New rule.
8145 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8146 * i386-low.c (target.h): Remove include.
8147 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8148 (DR_CONTROL_SHIFT): Likewise.
8149 (DR_CONTROL_SIZE): Likewise.
8150 (DR_RW_EXECUTE): Likewise.
8151 (DR_RW_WRITE): Likewise.
8152 (DR_RW_READ): Likewise.
8153 (DR_RW_IORW): Likewise.
8154 (DR_LEN_1): Likewise.
8155 (DR_LEN_2): Likewise.
8156 (DR_LEN_4): Likewise.
8157 (DR_LEN_8): Likewise.
8158 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8159 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8160 (DR_ENABLE_SIZE): Likewise.
8161 (DR_LOCAL_SLOWDOWN): Likewise.
8162 (DR_GLOBAL_SLOWDOWN): Likewise.
8163 (DR_CONTROL_RESERVED): Likewise.
8164 (I386_DR_CONTROL_MASK): Likewise.
8165 (I386_DR_VACANT): Likewise.
8166 (I386_DR_LOCAL_ENABLE): Likewise.
8167 (I386_DR_GLOBAL_ENABLE): Likewise.
8168 (I386_DR_DISABLE): Likewise.
8169 (I386_DR_SET_RW_LEN): Likewise.
8170 (I386_DR_GET_RW_LEN): Likewise.
8171 (I386_DR_WATCH_HIT): Likewise.
8172 (i386_wp_op_t): Likewise.
8173 (i386_show_dr): Likewise.
8174 (i386_length_and_rw_bits): Likewise.
8175 (i386_insert_aligned_watchpoint): Likewise.
8176 (i386_remove_aligned_watchpoint): Likewise.
8177 (i386_handle_nonaligned_watchpoint): Likewise.
8178 i386_update_inferior_debug_regs(): Likewise.
8179 (i386_dr_insert_watchpoint): Likewise.
8180 (i386_dr_remove_watchpoint): Likewise.
8181 (i386_dr_region_ok_for_watchpoint): Likewise.
8182 (i386_dr_stopped_data_address): Likewise.
8183 (i386_dr_stopped_by_watchpoint): Likewise.
8185 2014-06-19 Gary Benson <gbenson@redhat.com>
8187 * i386-low.c (i386_dr_show): Renamed to
8188 i386_show_dr and made static. All uses updated.
8189 (i386_dr_length_and_rw_bits): Renamed to
8190 i386_length_and_rw_bits and made static.
8192 (i386_dr_insert_aligned_watchpoint): Renamed to
8193 i386_insert_aligned_watchpoint and made static.
8195 (i386_dr_remove_aligned_watchpoint): Renamed to
8196 i386_remove_aligned_watchpoint and made static.
8198 (i386_dr_update_inferior_debug_regs): Renamed to
8199 i386_update_inferior_debug_regs and made static.
8202 2014-06-18 Gary Benson <gbenson@redhat.com>
8204 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8205 (i386_dr_low_can_set_control): Likewise.
8206 (i386_get_debug_register_length): Likewise.
8207 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8208 (i386_dr_low_can_set_control): Likewise.
8209 (i386_get_debug_register_length): Likewise.
8211 2014-06-17 Gary Benson <gbenson@redhat.com>
8213 * i386-low.h (i386-dregs.h): New include.
8214 (DR_FIRSTADDR): Now in i386-dregs.h.
8215 (DR_LASTADDR): Likewise.
8216 (DR_NADDR): Likewise.
8217 (DR_STATUS): Likewise.
8218 (DR_CONTROL): Likewise.
8219 (i386_debug_reg_state): Likewise.
8220 (i386_dr_insert_watchpoint): Likewise.
8221 (i386_dr_remove_watchpoint): Likewise.
8222 (i386_dr_region_ok_for_watchpoint): Likewise.
8223 (i386_dr_stopped_data_address): Likewise.
8224 (i386_dr_stopped_by_watchpoint): Likewise.
8225 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8227 2014-06-18 Gary Benson <gbenson@redhat.com>
8229 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8230 i386_dr_insert_watchpoint.
8231 (i386_low_remove_watchpoint): Renamed to
8232 i386_dr_remove_watchpoint.
8233 (i386_low_region_ok_for_watchpoint): Renamed to
8234 i386_dr_region_ok_for_watchpoint.
8235 (i386_low_stopped_data_address): Renamed to
8236 i386_dr_stopped_data_address.
8237 (i386_low_stopped_by_watchpoint): Renamed to
8238 i386_dr_stopped_by_watchpoint.
8239 * i386-low.c (i386_show_dr): Renamed to
8240 i386_dr_show and made nonstatic. All uses updated.
8241 (i386_length_and_rw_bits): Renamed to
8242 i386_dr_length_and_rw_bits and made nonstatic.
8244 (i386_insert_aligned_watchpoint): Renamed to
8245 i386_dr_insert_aligned_watchpoint and made nonstatic.
8247 (i386_remove_aligned_watchpoint): Renamed to
8248 i386_dr_remove_aligned_watchpoint and made nonstatic.
8250 (i386_update_inferior_debug_regs): Renamed to
8251 i386_dr_update_inferior_debug_regs and made nonstatic.
8253 (i386_low_insert_watchpoint): Renamed to
8254 i386_dr_insert_watchpoint. All uses updated.
8255 (i386_low_remove_watchpoint): Renamed to
8256 i386_dr_remove_watchpoint. All uses updated.
8257 (i386_low_region_ok_for_watchpoint): Renamed to
8258 i386_dr_region_ok_for_watchpoint. All uses updated.
8259 (i386_low_stopped_data_address): Renamed to
8260 i386_dr_stopped_data_address. All uses updated.
8261 (i386_low_stopped_by_watchpoint): Renamed to
8262 i386_dr_stopped_by_watchpoint. All uses updated.
8264 2014-06-18 Gary Benson <gbenson@redhat.com>
8266 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8267 (i386_dr_low_can_set_control): Likewise.
8268 (i386_insert_aligned_watchpoint): New check.
8270 2014-06-18 Gary Benson <gbenson@redhat.com>
8272 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8275 2014-06-18 Gary Benson <gbenson@redhat.com>
8277 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8278 instead of fatal and error.
8279 (i386_handle_nonaligned_watchpoint): Likewise.
8281 2014-06-18 Gary Benson <gbenson@redhat.com>
8283 * i386-low.c (i386_get_debug_register_length): New macro.
8284 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8285 (i386_show_dr): Use debug_printf instead of fprintf. Use
8286 phex to format values.
8288 2014-06-18 Gary Benson <gbenson@redhat.com>
8290 * i386-low.h: Comment changes.
8291 * i386-low.c: Likewise.
8293 2014-06-18 Gary Benson <gbenson@redhat.com>
8295 * i386-low.c: Whitespace changes.
8297 2014-06-12 Tom Tromey <tromey@redhat.com>
8299 * utils.c (freeargv): Remove.
8301 2014-06-12 Tom Tromey <tromey@redhat.com>
8303 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8304 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8305 (parse_debug_format_options): Likewise.
8306 (gdbserver_usage): Likewise.
8307 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8308 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8309 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8311 ($(LIBGNU)): Depend on libiberty.
8312 (all-lib): Recurse into all subdirs.
8313 (install-only): Invoke "install" target in subdirs.
8314 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8316 * configure: Rebuild.
8317 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8318 for vasprintf, vsnprintf, or gettimeofday.
8319 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8322 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8324 * development.sh: Delete.
8325 * Makefile.in (config.status): Adjust dependency on development.sh.
8326 * configure.ac: Adjust development.sh source call.
8327 * configure: Regenerate.
8329 2014-06-02 Pedro Alves <palves@redhat.com>
8331 * ax.c (gdb_free_agent_expr): New function.
8332 * ax.h (gdb_free_agent_expr): New declaration.
8333 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8335 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8337 (clear_breakpoint_conditions_and_commands): New function.
8338 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8339 (clear_breakpoint_conditions_and_commands): New declaration.
8341 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8343 * linux-aarch64-low.c (asm/ptrace.h): Include.
8345 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8347 Fix TLS access for -static -pthread.
8348 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8349 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8350 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8352 2014-05-20 Pedro Alves <palves@redhat.com>
8354 * linux-aarch64-low.c (aarch64_insert_point)
8355 (aarch64_remove_point): No longer check whether the type is
8356 supported here. Adjust to new interface.
8357 (the_low_target): Install aarch64_supports_z_point_type as
8358 supports_z_point_type method.
8359 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8360 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8361 instead of a Z packet char. Adjust.
8362 (arm_supports_z_point_type): New function.
8363 (arm_insert_point, arm_remove_point): Adjust to new interface.
8364 (the_low_target): Install arm_supports_z_point_type.
8365 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8366 (cris_insert_point, cris_remove_point): Adjust to new interface.
8367 Don't check whether the type is supported here.
8368 (the_low_target): Install cris_supports_z_point_type.
8369 * linux-low.c (linux_supports_z_point_type): New function.
8370 (linux_insert_point, linux_remove_point): Adjust to new interface.
8371 * linux-low.h (struct linux_target_ops) <insert_point,
8372 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8373 raw_breakpoint pointer parameter.
8374 <supports_z_point_type>: New method.
8375 * linux-mips-low.c (mips_supports_z_point_type): New function.
8376 (mips_insert_point, mips_remove_point): Adjust to new interface.
8377 Use mips_supports_z_point_type.
8378 (the_low_target): Install mips_supports_z_point_type.
8379 * linux-ppc-low.c (the_low_target): Install NULL as
8380 supports_z_point_type method.
8381 * linux-s390-low.c (the_low_target): Install NULL as
8382 supports_z_point_type method.
8383 * linux-sparc-low.c (the_low_target): Install NULL as
8384 supports_z_point_type method.
8385 * linux-x86-low.c (x86_supports_z_point_type): New function.
8386 (x86_insert_point): Adjust to new insert_point interface. Use
8387 insert_memory_breakpoint. Adjust to new
8388 i386_low_insert_watchpoint interface.
8389 (x86_remove_point): Adjust to remove_point interface. Use
8390 remove_memory_breakpoint. Adjust to new
8391 i386_low_remove_watchpoint interface.
8392 (the_low_target): Install x86_supports_z_point_type.
8393 * lynx-low.c (lynx_target_ops): Install NULL as
8394 supports_z_point_type callback.
8395 * nto-low.c (nto_supports_z_point_type): New.
8396 (nto_insert_point, nto_remove_point): Adjust to new interface.
8397 (nto_target_ops): Install nto_supports_z_point_type.
8398 * mem-break.c: Adjust intro comment.
8399 (struct raw_breakpoint) <raw_type, size>: New fields.
8400 <inserted>: Update comment.
8401 <shlib_disabled>: Delete field.
8402 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8403 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8404 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8405 (raw_bkpt_type_to_target_hw_bp_type): New function.
8406 (find_enabled_raw_code_breakpoint_at): New function.
8407 (find_raw_breakpoint_at): New type and size parameters. Use them.
8408 (insert_memory_breakpoint): New function, based off
8409 set_raw_breakpoint_at.
8410 (remove_memory_breakpoint): New function.
8411 (set_raw_breakpoint_at): Reimplement.
8412 (set_breakpoint): New, based on set_breakpoint_at.
8413 (set_breakpoint_at): Reimplement.
8414 (delete_raw_breakpoint): Go through the_target->remove_point
8415 instead of assuming memory breakpoints.
8416 (find_gdb_breakpoint_at): Delete.
8417 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8418 (find_gdb_breakpoint): New function.
8419 (set_gdb_breakpoint_at): Delete.
8420 (z_type_supported): New function.
8421 (set_gdb_breakpoint_1): New function, loosely based off
8422 set_gdb_breakpoint_at.
8423 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8424 (delete_gdb_breakpoint_at): Delete.
8425 (delete_gdb_breakpoint_1): New function, loosely based off
8426 delete_gdb_breakpoint_at.
8427 (delete_gdb_breakpoint): New function.
8428 (clear_gdb_breakpoint_conditions): Rename to ...
8429 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8431 (add_condition_to_breakpoint): Make static.
8432 (add_breakpoint_condition): Take a struct breakpoint pointer
8433 instead of an address. Adjust.
8434 (gdb_condition_true_at_breakpoint): Rename to ...
8435 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8437 (gdb_condition_true_at_breakpoint): Reimplement.
8438 (add_breakpoint_commands): Take a struct breakpoint pointer
8439 instead of an address. Adjust.
8440 (gdb_no_commands_at_breakpoint): Rename to ...
8441 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8442 parameter. Return true if no breakpoint was found. Change debug
8444 (gdb_no_commands_at_breakpoint): Reimplement.
8445 (run_breakpoint_commands): Rename to ...
8446 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8447 and change return type to boolean.
8448 (run_breakpoint_commands): New function.
8449 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8450 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8451 breakpoint. Go through the_target->remove_point instead of
8452 assuming memory breakpoint.
8453 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8454 software and hardware breakpoints.
8455 (reinsert_raw_breakpoint): Go through the_target->insert_point
8456 instead of assuming memory breakpoint.
8457 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8458 software and hardware breakpoints.
8459 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8460 Check both software and hardware breakpoints.
8461 (validate_inserted_breakpoint): Assert the breakpoint is a
8462 software breakpoint. Set the inserted flag to -1 instead of
8463 setting shlib_disabled.
8464 (delete_disabled_breakpoints): Adjust.
8465 (validate_breakpoints): Only validate software breakpoints.
8466 Adjust to inserted flag change.
8467 (check_mem_read, check_mem_write): Skip breakpoint types other
8468 than software breakpoints. Adjust to inserted flag change.
8469 * mem-break.h (enum raw_bkpt_type): New enum.
8470 (raw_breakpoint, struct process_info): Forward declare.
8471 (Z_packet_to_target_hw_bp_type): Delete declaration.
8472 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8473 (set_gdb_breakpoint, delete_gdb_breakpoint)
8474 (clear_breakpoint_conditions): New declarations.
8475 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8476 (breakpoint_inserted_here): Update comment.
8477 (add_breakpoint_condition, add_breakpoint_commands): Replace
8478 address parameter with a breakpoint pointer parameter.
8479 (gdb_breakpoint_here): Update comment.
8480 (delete_gdb_breakpoint_at): Delete.
8481 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8482 * server.c (process_point_options): Take a struct breakpoint
8483 pointer instead of an address. Adjust.
8484 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8485 delete_gdb_breakpoint.
8486 * spu-low.c (spu_target_ops): Install NULL as
8487 supports_z_point_type method.
8488 * target.h: Include mem-break.h.
8489 (struct target_ops) <prepare_to_access_memory>: Update comment.
8490 <supports_z_point_type>: New field.
8491 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8492 instead of a char. Also take a raw breakpoint pointer.
8493 * win32-arm-low.c (the_low_target): Install NULL as
8494 supports_z_point_type.
8495 * win32-i386-low.c (i386_supports_z_point_type): New function.
8496 (i386_insert_point, i386_remove_point): Adjust to new interface.
8497 (the_low_target): Install i386_supports_z_point_type.
8498 * win32-low.c (win32_supports_z_point_type): New function.
8499 (win32_insert_point, win32_remove_point): Adjust to new interface.
8500 (win32_target_ops): Install win32_supports_z_point_type.
8501 * win32-low.h (struct win32_target_ops):
8502 <supports_z_point_type>: New method.
8503 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8504 instead of a char. Also take a raw breakpoint pointer.
8506 2014-05-20 Pedro Alves <palves@redhat.com>
8508 * mem-break.h: Include break-common.h.
8509 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8510 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8511 (Z_packet_to_target_hw_bp_type): New declaration.
8512 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8513 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8514 (Z_PACKET_ACCESS_WP): Delete macros.
8515 (Z_packet_to_hw_type): Delete function.
8516 * i386-low.h: Don't include break-common.h here.
8517 (Z_packet_to_hw_type): Delete declaration.
8518 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8519 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8520 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8521 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8522 * linux-aarch64-low.c: Don't include break-common.h here.
8523 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8524 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8525 (Z_packet_to_target_hw_bp_type): Delete function.
8526 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8528 (mips_insert_point, mips_remove_point): Use
8529 Z_packet_to_target_hw_bp_type.
8531 2014-05-20 Pedro Alves <palves@redhat.com>
8533 * linux-aarch64-low.c: Include break-common.h.
8534 (enum target_point_type): Delete.
8535 (Z_packet_to_point_type): Rename to ...
8536 (Z_packet_to_target_hw_bp_type): ... this, and return a
8537 target_hw_bp_type instead.
8538 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8539 instead of an enum target_point_type.
8540 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8542 (aarch64_dr_state_insert_one_point)
8543 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8544 (aarch64_handle_aligned_watchpoint)
8545 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8546 Take an enum target_hw_bp_type instead of an enum
8548 (aarch64_supports_z_point_type): New function.
8549 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8550 use Z_packet_to_target_hw_bp_type.
8552 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8554 * configure.ac: Only use -Werror by default when DEVELOPMENT
8556 * configure: Regenerate.
8558 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8560 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8561 * linux-x86-low.c (X86_64_USER_REGS): New.
8562 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8564 2014-04-28 Yao Qi <yao@codesourcery.com>
8566 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8569 2014-04-25 Pedro Alves <palves@redhat.com>
8572 * linux-low.c (linux_attach_fail_reason_string): New function.
8573 (linux_attach_lwp): Delete.
8574 (linux_attach_lwp_1): Rename to ...
8575 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8576 argument. Remove "initial" parameter. Return int instead of
8577 void. Don't error or warn here.
8578 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8579 failure to attach to the tgid. Call warning when failing to
8581 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8582 argument. Remove "initial" parameter. Return int instead of
8583 void. Don't error or warn here.
8584 (linux_attach_fail_reason_string): New declaration.
8585 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8586 interface change. Use linux_attach_fail_reason_string.
8588 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8589 Walfred Tedeschi <walfred.tedeschi@intel.com>
8591 * Makefile.in: Added rules to handle new files
8592 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8593 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8594 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8595 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8596 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8597 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8599 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8600 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8601 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8602 i386/x32-avx512.xml.
8603 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8604 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8605 i386/x32-avx512-linux.xml.
8606 * i387-fp.c (num_avx512_k_registers): New constant for number
8608 (num_avx512_zmmh_low_registers): New constant for number of
8609 lower ZMM registers (0-15).
8610 (num_avx512_zmmh_high_registers): New constant for number of
8611 higher ZMM registers (16-31).
8612 (num_avx512_ymmh_registers): New contant for number of higher
8613 YMM registers (ymm16-31 added by avx521 on x86_64).
8614 (num_avx512_xmm_registers): New constant for number of higher
8615 XMM registers (xmm16-31 added by AVX512 on x86_64).
8616 (struct i387_xsave): Add space for AVX512 registers.
8617 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8618 Add code to handle AVX512 registers.
8619 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8620 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8621 prototypei from generated file.
8622 (tdesc_amd64_avx512_linux): Likewise.
8623 (init_registers_x32_avx512_linux): Likewise.
8624 (tdesc_x32_avx512_linux): Likewise.
8625 (init_registers_i386_avx512_linux): Likewise.
8626 (tdesc_i386_avx512_linux): Likewise.
8627 (x86_64_regmap): Add AVX512 registers.
8628 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8630 (initialize_low_arch): Add code to initialize AVX512 registers.
8632 2014-04-23 Pedro Alves <palves@redhat.com>
8634 * mem-break.c (find_gdb_breakpoint_at): Make static.
8635 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8637 2014-04-23 Pedro Alves <palves@redhat.com>
8639 * i386-low.c: Don't include break-common.h here.
8640 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8641 prototype to take target_hw_bp_type as argument instead of a Z
8643 * i386-low.h: Include break-common.h here.
8644 (Z_packet_to_hw_type): Declare.
8645 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8647 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8648 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8649 (x86_remove_point): Convert the packet number to a
8650 target_hw_bp_type before calling i386_low_remove_watchpoint.
8651 * win32-i386-low.c (i386_insert_point): Convert the packet number
8652 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8653 (i386_remove_point): Convert the packet number to a
8654 target_hw_bp_type before calling i386_low_remove_watchpoint.
8656 2014-04-23 Pedro Alves <palves@redhat.com>
8658 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8660 2014-04-10 Pedro Alves <palves@redhat.com>
8662 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8663 Check if the condition or command is NULL before checking if the
8664 breakpoint is known. On success, return true.
8665 * mem-break.h (add_breakpoint_condition): Document return.
8666 (add_breakpoint_commands): Add describing comment.
8667 * server.c (skip_to_semicolon): New function.
8668 (process_point_options): Use it.
8670 2014-04-09 Pedro Alves <palves@redhat.com>
8672 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8675 2014-02-27 Pedro Alves <palves@redhat.com>
8678 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8680 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8682 (last_thread_of_process_p): Take a PID argument instead of a
8684 (linux_wait_for_lwp): Delete.
8685 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8687 (linux_low_filter_event): New function, party factored out from
8688 linux_wait_for_event.
8689 (linux_wait_for_event): Rename to ...
8690 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8691 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8692 sigsuspend. Check for zombie leaders.
8693 (linux_wait_for_event): Reimplement as wrapper around
8694 linux_wait_for_event_filtered.
8695 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8696 a normal or signal exit is seen, it's the whole process exiting.
8697 (wait_for_sigstop): No longer a for_each_inferior callback.
8698 Rewrite on top of linux_wait_for_event_filtered.
8699 (stop_all_lwps): Call wait_for_sigstop directly.
8700 * server.c (resume, handle_target_event): Handle
8701 TARGET_WAITKIND_NO_RESUMED.
8703 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8705 * win32-low.c (psapi_get_dll_name,
8706 * win32_CreateToolhelp32Snapshot): Delete.
8707 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8708 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8710 (handle_load_dll): Add function description.
8711 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8713 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8715 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8717 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8718 base address when calling win32_add_one_solib.
8719 (handle_load_dll): Delete local variable load_addr.
8720 Remove 0x1000 offset applied to DLL base address when calling
8721 win32_add_one_solib.
8722 (handle_unload_dll): Add comment.
8724 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8726 * win32-low.c (win32_add_all_dlls): Renames
8727 win32_ensure_ntdll_loaded. Rewrite function documentation.
8728 Adjust implementation to always load all DLLs.
8729 Add 0x1000 offset to DLL base address when calling
8730 win32_add_one_solib.
8731 (child_initialization_done): New static global.
8732 (do_initial_child_stuff): Set child_initialization_done to
8733 zero during child initialization, and 1 after. Replace call
8734 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8736 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8737 (handle_unload_dll): Add function documentation.
8738 (get_child_debug_event): Ignore load and unload DLL events
8739 during child initialization.
8741 2014-02-20 Doug Evans <dje@google.com>
8743 Remove global all_lwps.
8744 * inferiors.h (ptid_of): Move here from linux-low.h.
8745 (pid_of, lwpid_of): Ditto.
8746 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8747 parameter is a struct thread_info * now.
8748 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8749 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8750 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8752 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8753 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8754 * linux-arm-low.c (update_registers_callback): Update, "entry"
8755 parameter is a struct thread_info * now.
8756 Fetch lwpid from current_inferior directly.
8757 (arm_insert_point): Pass &all_threads to find_inferior instead of
8759 (arm_remove_point): Ditto.
8760 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8761 (arm_prepare_to_resume): Fetch pid from thread.
8762 (arm_read_description): Fetch lwpid from current_inferior directly.
8763 * linux-low.c (all_lwps): Delete.
8764 (delete_lwp): Delete call to remove_inferior.
8765 (handle_extended_wait): Fetch lwpid from thread.
8766 (add_lwp): Don't set lwp->entry.id. Remove call to
8767 add_inferior_to_list.
8768 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8769 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8770 (kill_one_lwp_callback): Ditto.
8771 (linux_kill): Don't dereference NULL pointer.
8772 Fetch ptid,lwpid from thread.
8773 (get_detach_signal): Fetch ptid from thread.
8774 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8775 Simplify call to regcache_invalidate_thread.
8776 (delete_lwp_callback): Update, "entry" parameter is a
8777 struct thread_info * now. Fetch pid from thread.
8778 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8779 (status_pending_p_callback): Update, "entry" parameter is a
8780 struct thread_info * now. Fetch ptid from thread.
8781 (find_lwp_pid): Update, "entry" parameter is a
8782 struct thread_info * now.
8783 (linux_wait_for_lwp): Fetch pid from thread.
8784 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8785 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8786 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8787 (dequeue_one_deferred_signal): Ditto.
8788 (cancel_breakpoint): Fetch ptid from current_inferior.
8789 (linux_wait_for_event): Pass &all_threads to find_inferior,
8790 not &all_lwps. Fetch ptid, lwpid from thread.
8791 (count_events_callback): Update, "entry" parameter is a
8792 struct thread_info * now.
8793 (select_singlestep_lwp_callback): Ditto.
8794 (select_event_lwp_callback): Ditto.
8795 (cancel_breakpoints_callback): Ditto.
8796 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8798 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8799 (unsuspend_one_lwp): Update, "entry" parameter is a
8800 struct thread_info * now.
8801 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8803 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8804 Fetch lwpid from thread, not lwp.
8805 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8806 Pass &all_threads to find_inferior, not &all_lwps.
8807 (send_sigstop): Fetch lwpid from thread, not lwp.
8808 (send_sigstop_callback): Update, "entry" parameter is a
8809 struct thread_info * now.
8810 (suspend_and_send_sigstop_callback): Ditto.
8811 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8812 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8813 struct thread_info * now.
8814 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8816 (lwp_running): Update, "entry" parameter is a
8817 struct thread_info * now.
8818 (stop_all_lwps): Fetch ptid from thread.
8819 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8820 (linux_resume_one_lwp): Fetch lwpid from thread.
8821 (linux_set_resume_request): Update, "entry" parameter is a
8822 struct thread_info * now. Fetch pid, lwpid from thread.
8823 (resume_status_pending_p): Update, "entry" parameter is a
8824 struct thread_info * now.
8825 (need_step_over_p): Ditto. Fetch lwpid from thread.
8826 (start_step_over): Fetch lwpid from thread.
8827 (linux_resume_one_thread): Update, "entry" parameter is a
8828 struct thread_info * now. Fetch lwpid from thread.
8829 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8830 (proceed_one_lwp): Update, "entry" parameter is a
8831 struct thread_info * now. Fetch lwpid from thread.
8832 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8833 struct thread_info * now.
8834 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8835 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8836 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8838 (regsets_store_inferior_registers): Ditto.
8839 (fetch_register, store_register): Ditto.
8840 (linux_read_memory, linux_write_memory): Ditto.
8841 (linux_request_interrupt): Ditto.
8842 (linux_read_auxv): Ditto.
8843 (linux_xfer_siginfo): Ditto.
8844 (linux_qxfer_spu): Ditto.
8845 (linux_qxfer_libraries_svr4): Ditto.
8846 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8847 moved to inferiors.h.
8849 (get_thread_lwp): Update.
8850 (struct lwp_info): Delete member "entry". Simplify comment for
8853 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8854 current_inferior directly.
8855 (update_watch_registers_callback): Update, "entry" parameter is a
8856 struct thread_info * now. Fetch pid from thread.
8857 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8858 (mips_insert_point): Fetch lwpid from current_inferior.
8859 Pass &all_threads to find_inferior, not &all_lwps.
8860 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8861 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8863 (mips_stopped_data_address): Ditto.
8864 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8866 * linux-tile-low.c (tile_arch_setup): Ditto.
8867 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8868 (update_debug_registers_callback): Update, "entry" parameter is a
8869 struct thread_info * now. Fetch pid from thread.
8870 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8871 Pass &all_threads to find_inferior, not &all_lwps.
8872 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8873 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8874 Pass &all_threads to find_inferior, not &all_lwps.
8875 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8876 (i386_dr_low_get_status): Ditto.
8877 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8878 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8879 (x86_linux_read_description): Ditto.
8880 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8882 2014-02-20 Doug Evans <dje@google.com>
8884 * inferiors.c (get_first_inferior): Fix buglet.
8886 2014-02-19 Doug Evans <dje@google.com>
8888 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8889 * inferiors.c (add_thread): Change result type to struct thread_info *.
8890 All callers updated.
8891 (add_lwp): Call add_thread here instead of in callers.
8892 All callers updated.
8893 * linux-low.h (get_lwp_thread): Rewrite.
8894 (struct lwp_info): New member "thread".
8896 2014-02-19 Doug Evans <dje@google.com>
8898 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8899 All callers updated.
8901 2014-02-19 Doug Evans <dje@google.com>
8903 * inferiors.c (add_thread): Fix whitespace.
8905 2014-02-19 Doug Evans <dje@google.com>
8907 * dll.c (clear_dlls): Replace accessing list implemention details
8909 * gdbthread.h (get_first_thread): Declare.
8910 * inferiors.c (for_each_inferior_with_data): New function.
8911 (get_first_thread): New function.
8912 (find_thread_ptid): Simplify.
8913 (get_first_inferior): New function.
8914 (clear_list): Delete.
8915 (one_inferior_p): New function.
8916 (clear_inferior_list): New function.
8917 (clear_inferiors): Update.
8918 * inferiors.h (for_each_inferior_with_data): Declare.
8919 (clear_inferior_list): Declare.
8920 (one_inferior_p): Declare.
8921 (get_first_inferior): Declare.
8922 * linux-low.c (linux_wait_for_event): Replace accessing list
8923 implemention details with API function.
8924 * server.c (target_running): Ditto.
8925 (accumulate_file_name_length): New function.
8926 (emit_dll_description): New function.
8927 (handle_qxfer_libraries): Replace accessing list implemention
8928 details with API function.
8929 (handle_qxfer_threads_worker): New function.
8930 (handle_qxfer_threads_proper): Replace accessing list implemention
8931 details with API function.
8932 (handle_query): Ditto.
8933 (visit_actioned_threads_callback_ftype): New typedef.
8934 (visit_actioned_threads_data): New struct.
8935 (visit_actioned_threads): Rewrite to be find_inferior callback.
8936 (resume): Call find_inferior.
8937 (handle_status): Replace accessing list implemention
8938 details with API function.
8939 (process_serial_event): Replace accessing list implemention details
8941 * target.c (set_desired_inferior): Replace accessing list implemention
8942 details with API function.
8943 * tracepoint.c (same_process_p): New function.
8944 (gdb_agent_about_to_close): Replace accessing list implemention
8945 details with API function.
8946 * win32-low.c (child_delete_thread): Replace accessing list
8947 implemention details with API function.
8948 (match_dll_by_basename): New function.
8949 (dll_is_loaded_by_basename): New function.
8950 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8951 details call to dll_is_loaded_by_basename.
8953 2014-02-19 Doug Evans <dje@google.com>
8955 * dll.h (struct dll_info): Add comment.
8956 * gdbthread.h (struct thread_info): Add comment.
8957 (current_ptid): Simplify.
8958 * inferiors.c (add_process): Update.
8959 (remove_process): Update.
8960 * inferiors.h (struct process_info): Rename member "head" to "entry".
8961 * linux-low.c (delete_lwp): Update.
8963 (last_thread_of_process_p): Update.
8964 (kill_one_lwp_callback, linux_kill): Update.
8965 (status_pending_p_callback): Update.
8966 (wait_for_sigstop): Update. Simplify read of ptid.
8967 (start_step_over): Update.
8968 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8969 (get_lwp_thread): Update.
8970 (struct lwp_info): Rename member "head" to "entry".
8971 * regcache.h (inferior_list_entry): Delete.
8972 * server.c (kill_inferior_callback): Update.
8973 (detach_or_kill_inferior_callback): Update.
8974 (print_started_pid): Update.
8975 (print_attached_pid): Update.
8976 (process_serial_event): Simplify read of ptid.
8977 * thread-db.c (thread_db_create_event): Update.
8978 (thread_db_get_tls_address): Update.
8979 * win32-low.c (current_inferior_ptid): Simplify.
8981 2014-02-19 Tom Tromey <tromey@redhat.com>
8983 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8985 (target_supports_btrace): Update.
8987 2014-02-14 Yao Qi <yao@codesourcery.com>
8989 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8990 (rsp-low-ipa.o): New target.
8992 2014-02-12 Tom Tromey <tromey@redhat.com>
8994 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8995 convert_ascii_to_int.
8996 * regcache.c (registers_to_string): Likewise.
8997 * remote-utils.c (decode_M_packet): Likewise.
8998 * server.c (process_serial_event): Likewise.
9000 2014-02-12 Tom Tromey <tromey@redhat.com>
9002 * server.c (handle_query, handle_v_run): Use hex2bin, not
9004 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9006 2014-02-12 Tom Tromey <tromey@redhat.com>
9008 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9009 convert_int_to_ascii.
9010 * regcache.c (registers_to_string, collect_register_as_string):
9012 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9014 * server.c (process_serial_event): Likewise.
9015 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9016 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9018 2014-02-12 Tom Tromey <tromey@redhat.com>
9020 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9021 bin2hex, not hexify.
9022 * tracepoint.c (cmd_qtstatus): Likewise.
9024 2014-02-12 Tom Tromey <tromey@redhat.com>
9026 * remote-utils.c (monitor_output): Pass explicit length to
9029 2014-02-12 Tom Tromey <tromey@redhat.com>
9031 * tracepoint.c: Include rsp-low.h.
9032 * server.c: Include rsp-low.h.
9033 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9034 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9036 * remote-utils.c: Include rsp-low.h.
9037 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9038 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9039 (convert_int_to_ascii, convert_ascii_to_int): Move to
9041 * regcache.c: Include rsp-low.h.
9042 * ax.c: Include rsp-low.h.
9043 * Makefile.in (SFILES): Add common/rsp-low.c.
9044 (OBS): Add rsp-low.o.
9045 (rsp-low.o): New target.
9047 2014-02-12 Tom Tromey <tromey@redhat.com>
9049 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9050 Include print-utils.h.
9051 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9052 (plongest, thirty_two, phex_nz): Remove.
9053 * Makefile.in (SFILES): Add common/print-utils.c.
9054 (OBS): Add print-utils.o.
9055 (print-utils-ipa.o): New target.
9056 (print-utils.o): New target.
9057 (IPA_OBJS): Add print-utils-ipa.o.
9059 2014-02-06 Tom Tromey <tromey@redhat.com>
9061 * Makefile.in (SFILES): Fix indentation.
9063 2014-02-05 Doug Evans <dje@google.com>
9065 * linux-low.c (linux_wait_for_event): Improve comment.
9066 (linux_wait_1): Keep current_inferior in sync with event_child.
9068 2014-01-22 Doug Evans <dje@google.com>
9070 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9072 2014-01-22 Doug Evans <dje@google.com>
9074 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9075 * configure: Regenerate.
9076 * config.in: Regenerate.
9077 * Makefile.in (SFILES): Add debug.c.
9079 * debug.c: New file.
9080 * debug.h: New file.
9081 * linux-aarch64-low.c (*): Update all debugging printfs to use
9082 debug_printf instead of fprintf.
9083 * linux-arm-low.c (*): Ditto.
9084 * linux-cris-low.c (*): Ditto.
9085 * linux-crisv32-low.c (*): Ditto.
9086 * linux-m32r-low.c (*): Ditto.
9087 * linux-sparc-low.c (*): Ditto.
9088 * linux-x86.c (*): Ditto.
9089 * linux-low.c (*): Ditto.
9090 (linux_wait_1): Add calls to debug_enter, debug_exit.
9091 (linux_wait): Remove redundant debugging printf.
9092 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9093 (linux_resume, unstop_all_lwps): Ditto.
9094 * mem-break.c (*): Update all debugging printfs to use
9095 debug_printf instead of fprintf.
9096 * remote-utils.c (*): Ditto.
9097 * thread-db.c (*): Ditto.
9098 * server.c #include <ctype.h>, "gdb_vecs.h".
9099 (debug_threads): Moved to debug.c.
9100 (*): Update all debugging printfs to use debug_printf instead of
9102 (start_inferior): Replace call to fflush with call to debug_flush.
9103 (monitor_show_help): Mention set debug-format.
9104 (parse_debug_format_options): New function.
9105 (handle_monitor_command): Handle "monitor set debug-format".
9106 (gdbserver_usage): Mention --debug-format.
9107 (main): Parse --debug-format.
9108 * server.h (debug_threads): Declaration moved to debug.h.
9110 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9111 trace_debug_1 that uses debug_printf.
9112 (tracepoint_look_up_symbols): Update all debugging printfs to use
9113 debug_printf instead of fprintf.
9115 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9117 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9120 2014-01-17 Pedro Alves <palves@redhat.com>
9123 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9124 defined after including gdb_proc_service.h.
9126 2014-01-16 Doug Evans <dje@google.com>
9128 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9129 (match_dll): Use it.
9131 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9133 * target.h (target_ops) <read_btrace>: Change parameters and
9134 return type to allow error reporting.
9135 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9136 trace reading errors on.
9137 * linux-low.c (linux_low_read_btrace): Pass trace reading
9139 (linux_low_disable_btrace): New.
9141 2014-01-15 Doug Evans <dje@google.com>
9143 * inferiors.c (thread_id_to_gdb_id): Delete.
9144 * inferiors.h (thread_id_to_gdb_id): Delete.
9146 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9148 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9149 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9152 2014-01-08 Pedro Alves <palves@redhat.com>
9154 * server.c (handle_status): Don't discard previous queued stop
9155 replies or thread's pending status here.
9156 (main) <disconnection>: Do it here instead.
9158 2014-01-08 Pedro Alves <palves@redhat.com>
9160 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9161 * server.c (visit_actioned_threads, handle_pending_status): New
9163 (handle_v_cont): Factor out parts to ...
9164 (resume): ... this new function. If in all-stop, and a thread
9165 being resumed has a pending status, report it without actually
9167 (myresume): Adjust to use the new 'resume' function.
9168 (clear_pending_status_callback, set_pending_status_callback)
9169 (find_status_pending_thread_callback): New functions.
9170 (handle_status): Handle the case of multiple threads having
9171 interesting statuses to report. Report threads' real last signal
9172 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9173 with an interesting thread to report the status for, instead of
9174 always reporting the status of the first thread.
9176 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9178 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9179 * gdbreplay.c (gdbreplay_version): Likewise.
9181 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9183 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9184 iov.iov_len with the real length in use.
9186 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9188 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9189 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9190 for all targets that use win32-low.c.
9191 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9192 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9194 2013-12-13 Pedro Alves <palves@redhat.com>
9196 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9197 if equal to TARGET_WAITKIND_LOADED.
9198 * win32-low.c (cached_status): New static global.
9199 (win32_wait): Add declaration.
9200 (do_initial_child_stuff): Flush all initial pending debug events
9201 up to the initial breakpoint.
9202 (win32_wait): If CACHED_STATUS was set, return that instead
9203 of doing a real wait. Remove the code resuming the execution
9204 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9205 during the initial phase. Also remove the code changing
9206 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9207 TARGET_WAITKIND_STOPPED.
9209 2013-12-11 Yao Qi <yao@codesourcery.com>
9211 * notif.c (handle_notif_ack): Return 0 if no notification
9214 2013-11-20 Doug Evans <dje@google.com>
9216 * linux-low.c (linux_set_resume_request): Fix comment.
9218 2013-11-20 Doug Evans <dje@google.com>
9220 * linux-low.c (resume_status_pending_p): Tweak comment.
9222 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9224 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9225 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9226 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9227 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9228 (srv_amd64_regobj): Add amd64-mpx.o.
9229 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9230 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9231 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9232 * i387-fp.c (num_pl_bnd_register) Added constant.
9233 (num_pl_bnd_cfg_registers) Added constant.
9234 (struct i387_xsave) Added reserved area and MPX fields.
9235 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9236 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9238 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9239 (init_registers_amd64_mpx_linux): Declare new function.
9240 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9241 (x86_64_regmap): Add MPX registers.
9242 (x86_linux_read_description): Add MPX case.
9243 (initialize_low_arch): Initialize MPX targets.
9245 2013-11-18 Tom Tromey <tromey@redhat.com>
9247 * configure: Rebuild.
9248 * configure.ac: Don't check for stdlib.h.
9249 * gdbreplay.c: Unconditionally include stdlib.h.
9251 2013-11-18 Tom Tromey <tromey@redhat.com>
9253 * config.in: Rebuild.
9254 * configure: Rebuild.
9255 * configure.ac: Don't use AC_HEADER_DIRENT.
9257 2013-11-18 Tom Tromey <tromey@redhat.com>
9259 * server.h: Don't check HAVE_STRING_H.
9260 * gdbreplay.c: Don't check HAVE_STRING_H.
9261 * configure: Rebuild.
9263 2013-11-18 Tom Tromey <tromey@redhat.com>
9265 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9268 2013-11-08 Tom Tromey <tromey@redhat.com>
9270 * configure, config.in: Rebuild.
9271 * configure.ac: Remove unused configury.
9273 2013-11-08 Tom Tromey <tromey@redhat.com>
9275 * acinclude.m4: Include common.m4, codeset.m4.
9276 * configure, config.in: Rebuild.
9277 * configure.ac: Use GDB_AC_COMMON.
9279 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9281 * linux-s390-low.c (HWCAP_S390_TE): New define.
9282 (s390_arch_setup): Consider the TE field in the HWCAP for
9283 determining 'have_regset_tdb'.
9285 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9288 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9291 2013-10-02 Pedro Alves <palves@redhat.com>
9293 * server.c (process_serial_event): Don't output "GDBserver
9294 exiting" if GDB is connected through stdio.
9295 * target.c (mywait): Likewise, be silent if GDB is connected
9298 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9300 * lynx-low.c (lynx_add_threads_after_attach): New function.
9301 (lynx_attach): Remove call to add_thread. Add call to
9302 lynx_add_threads_after_attach instead.
9304 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9306 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9307 * config.in, configure: Regenerated.
9309 2013-09-18 Yao Qi <yao@codesourcery.com>
9312 * server.c (start_inferior): Clear 'resume_info'.
9314 2013-09-16 Jiong Wang <jiwang@tilera.com>
9316 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9319 2013-09-16 Jiong Wang <jiwang@tilera.com>
9321 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9322 linux-tile-low.o to srv_tgtobj.
9324 2013-09-16 Will Newton <will.newton@linaro.org>
9326 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9329 2013-09-06 Pedro Alves <palves@redhat.com>
9331 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9332 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9333 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9334 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9335 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9336 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9338 2013-09-06 Pedro Alves <palves@redhat.com>
9340 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9341 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9343 2013-09-06 Pedro Alves <palves@redhat.com>
9345 * linux-amd64-ipa.c: Include tracepoint.h.
9346 * linux-i386-ipa.c: Include tracepoint.h.
9348 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9350 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9351 (ps_get_thread_area): New function.
9353 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9355 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9356 (initialize_low_arch): Call init_registers_crisv32 rather than
9357 init_register_crisv32.
9359 2013-09-05 Pedro Alves <palves@redhat.com>
9361 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9363 * hostio.h: ... this new file.
9364 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9365 win32-low.c: Include hostio.h.
9367 2013-09-05 Pedro Alves <palves@redhat.com>
9369 * server.h (gdb_client_data, handler_func, callback_handler_func)
9370 (delete_file_handler, add_file_handler, append_callback_event)
9371 (delete_callback_event, start_event_loop, initialize_event_loop):
9372 Move to event-loop.h and include it.
9373 * event-loop.h: New file.
9375 2013-09-05 Pedro Alves <palves@redhat.com>
9377 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9378 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9379 (loaded_dll, unloaded_dll): Move to ...
9380 * dll.h: ... this new file.
9381 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9383 2013-09-05 Pedro Alves <palves@redhat.com>
9385 * server.h (current_process, get_thread_process, all_processes)
9386 (add_inferior_to_list, for_each_inferior, current_inferior)
9387 (remove_inferior, add_process, remove_process, find_process_pid)
9388 (have_started_inferiors_p, have_attached_inferiors_p)
9389 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9390 (clear_inferiors, find_inferior, find_inferior_id)
9391 (inferior_target_data, set_inferior_target_data)
9392 (inferior_regcache_data, set_inferior_regcache_data): Move to
9393 inferiors.h, and include it.
9394 * inferiors.h: New file.
9396 2013-09-05 Pedro Alves <palves@redhat.com>
9398 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9402 2013-09-05 Pedro Alves <palves@redhat.com>
9404 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9406 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9407 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9408 (handle_tracepoint_general_set, handle_tracepoint_query)
9409 (tracepoint_finished_step, tracepoint_was_hit)
9410 (release_while_stepping_state_list, current_traceframe)
9411 (in_readonly_region, traceframe_read_mem)
9412 (fetch_traceframe_registers, traceframe_read_sdata)
9413 (traceframe_read_info, struct fast_tpoint_collect_status)
9414 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9415 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9416 (supply_fast_tracepoint_registers)
9417 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9418 (ipa_tdesc, claim_trampoline_space)
9419 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9420 (agent_mem_read, agent_get_trace_state_variable_value)
9421 (agent_set_trace_state_variable_value, agent_tsv_read)
9422 (agent_mem_read_string, get_raw_reg_func_addr)
9423 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9424 * tracepoint.h: ... this new file.
9426 2013-09-05 Pedro Alves <palves@redhat.com>
9428 * server.h (perror_with_name, error, fatal, warning, paddress)
9429 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9431 * utils.h: New file.
9433 2013-09-05 Pedro Alves <palves@redhat.com>
9435 * server.h (remote_debug, noack_mode, transport_is_reliable)
9436 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9437 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9438 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9439 (write_enn, initialize_async_io, enable_async_io)
9440 (disable_async_io, check_remote_input_interrupt_request)
9441 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9442 (dead_thread_notify, prepare_resume_reply)
9443 (decode_address_to_semicolon, decode_address, decode_m_packet)
9444 (decode_M_packet, decode_X_packet, decode_xfer_write)
9445 (decode_search_memory_packet, unhexify, hexify)
9446 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9447 (look_up_one_symbol, relocate_instruction)
9448 (monitor_output): Move to remote-utils.h, and include it.
9449 * remote-utils.h: New file.
9451 2013-09-05 Pedro Alves <palves@redhat.com>
9453 * server.h (_): Delete.
9455 2013-09-02 Pedro Alves <palves@redhat.com>
9457 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9458 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9460 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9462 2013-09-02 Pierre Muller <muller@sourceware.org>
9464 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9465 or WriteProcessMemory complete successfully and handle
9466 ERROR_PARTIAL_COPY error.
9468 2013-09-02 Pedro Alves <palves@redhat.com>
9470 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9471 error instead of EIO.
9473 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9476 * linux-low.c: Include filestuff.h.
9477 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9478 * lynx-low.c: Include filestuff.h.
9479 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9480 * server.c: Include filestuff.h.
9481 (main): Call notice_open_fds.
9482 * spu-low.c: Include filestuff.h.
9483 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9485 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9487 * Makefile.in: Explain why ../target and ../nat are not
9488 listed as include file search paths.
9489 (linux-waitpid.o): New object file rule.
9490 * configure.srv (srv_native_linux_obj): New variable.
9491 Replace all occurrences of linux native object files with
9492 $srv_native_linux_obj.
9493 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9494 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9495 (linux_enable_event_reporting): Remove declaration.
9496 (my_waitpid): Moved to common/linux-waitpid.c.
9497 (linux_wait_for_event): Pass ptid when calling
9498 linux_enable_event_reporting.
9499 (linux_supports_tracefork_flag): Remove.
9500 (linux_enable_event_reporting): Likewise.
9501 (linux_tracefork_grandchild): Remove.
9502 (STACK_SIZE): Moved to common/linux-ptrace.c.
9503 (linux_tracefork_child): Remove.
9504 (linux_test_for_tracefork): Remove.
9505 (linux_look_up_symbols): Call linux_supports_traceclone.
9506 (initialize_low): Remove call to linux_test_for_tracefork.
9507 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9508 common/linux-ptrace.h.
9509 (PTRACE_TYPE_ARG4): Likewise.
9510 Include linux-ptrace.h.
9512 2013-08-21 Pedro Alves <palves@redhat.com>
9514 * config.in: Renegerate.
9516 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9518 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9519 (SFILES): Remove $(srcdir)/common/target-common.c and
9520 add $(srcdir)/target/waitstatus.c.
9521 (OBS): Remove target-common.o and add waitstatus.o.
9522 (server_h): Remove $(srcdir)/../common/target-common.h and
9523 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9524 and $(srcdir)/../target/waitstatus.h.
9525 (target-common.o): Remove.
9526 (waitstatus.o): New target object file.
9527 * target.h: Do not include target-common.h and
9528 include target/resume.h, target/wait.h and
9529 target/waitstatus.h.
9531 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9533 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9534 to PTRACE_TYPE_ARG3.
9535 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9536 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9538 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9539 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9541 2013-07-27 Jie Zhang <jie@codesourcery.com>
9542 Daniel Jacobowitz <dan@codesourcery.com>
9543 Yao Qi <yao@codesourcery.com>
9545 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9546 (mips-linux-watch.o): New rule.
9547 (mips_linux_watch_h): New variable.
9548 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9550 * linux-mips-low.c: Include mips-linux-watch.h.
9551 (struct arch_process_info, struct arch_lwp_info): New.
9552 (update_watch_registers_callback): New function.
9553 (mips_linux_new_process, mips_linux_new_thread) New functions.
9554 (mips_linux_prepare_to_resume, mips_insert_point): New
9556 (mips_remove_point, mips_stopped_by_watchpoint): New
9558 (rsp_bp_type_to_target_hw_bp_type): New function.
9559 (mips_stopped_data_address): New function.
9560 (the_low_target): Add watchpoint support functions.
9562 2013-07-27 Yao Qi <yao@codesourcery.com>
9564 * i386-low.c: Include break-common.h.
9565 (enum target_hw_bp_type): Remove.
9567 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9569 * Makefile.in (SFILES): /common/target-common.c.
9570 (OBS): Add target-common.o.
9571 (server_h): Add $(srcdir)/../common/target-common.h.
9572 (target-common.o): New target.
9573 * server.c (queue_stop_reply_callback): Free
9574 status string after use.
9575 * target.c (target_waitstatus_to_string): Remove.
9576 * target.h: Include target-common.h.
9577 (resume_kind): Likewise.
9578 (target_waitkind): Likewise.
9579 (target_waitstatus): Likewise.
9580 (TARGET_WNOHANG): Likewise.
9582 2013-07-04 Yao Qi <yao@codesourcery.com>
9584 * Makefile.in (host_alias): Use @host_noncanonical@.
9585 (target_alias): Use @target_noncanonical@.
9586 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9587 ACX_NONCANONICAL_HOST.
9588 * configure: Regenerated.
9591 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9593 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9594 * configure: Rebuild.
9595 * Makefile.in (version_host, version_target): Get from configure.
9596 (version.c): Use $(version_host) and $(version_target).
9598 2013-07-03 Pedro Alves <palves@redhat.com>
9600 * Makefile.in (config.status): Depend on development.sh.
9601 * acinclude.m4: Include libmcheck.m4.
9602 * configure: Regenerate.
9604 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9606 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9607 attribute inside the parentheses.
9608 (winapi_DebugSetProcessKillOnExit): Ditto.
9609 (winapi_DebugBreakProcess): Ditto.
9610 (winapi_GenerateConsoleCtrlEvent): Ditto.
9612 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9614 * notif.h (notif_event): Add a dummy member to avoid compiler
9617 2013-07-01 Pedro Alves <palves@redhat.com>
9619 * hostio.c (HOSTIO_PATH_MAX): Define.
9620 (require_filename, handle_open, handle_unlink, handle_readlink):
9623 2013-07-01 Pedro Alves <palves@redhat.com>
9625 * server.h: Include "pathmax.h".
9626 * linux-low.c: Don't include sys/param.h.
9627 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9629 * win32-low.c: Don't include sys/param.h.
9630 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9632 2013-07-01 Pedro Alves <palves@redhat.com>
9634 * event-loop.c: Don't check HAVE_UNISTD_H before including
9636 * gdbreplay.c: Likewise.
9637 * remote-utils.c: Likewise.
9638 * server.c: Likewise.
9639 * configure.ac: Don't check for unistd.h.
9640 * configure: Regenerate.
9642 2013-06-28 Tom Tromey <tromey@redhat.com>
9644 * Makefile.in (version.c): Use version.in, not
9647 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9649 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9650 * configure: Rebuild.
9651 * Makefile.in (version_host, version_target): Get from configure.
9652 (version.c): Use $(version_host) and $(version_target).
9654 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9656 Fix trace-status to output user name without trailing colon.
9657 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9659 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9661 Fix trace-status to output proper start-time and stop-time.
9662 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9663 output start time and stop time in hex as gdb expects.
9665 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9667 * tracepoint.c (build_traceframe_info_xml): Output trace state
9668 variables present in the trace buffer.
9670 2013-06-24 Tom Tromey <tromey@redhat.com>
9672 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9674 (version.o): Remove.
9675 * gdbreplay.c: Include version.h.
9676 (version, host_name): Don't declare.
9677 * server.h: Include version.h.
9678 (version, host_name): Don't declare.
9680 2013-06-12 Pedro Alves <palves@redhat.com>
9682 * linux-x86-low.c (linux_is_elf64): Delete global.
9683 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9684 with local linux_pid_exe_is_elf_64_file use.
9686 2013-06-11 Pedro Alves <palves@redhat.com>
9688 * linux-low.c (regset_disabled, disable_regset): New functions.
9689 (regsets_fetch_inferior_registers)
9690 (regsets_store_inferior_registers): Use them.
9691 (initialize_regsets_info); Don't allocate the disabled_regsets
9693 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9696 2013-06-11 Pedro Alves <palves@redhat.com>
9698 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9701 2013-06-11 Pedro Alves <palves@redhat.com>
9703 * linux-x86-low.c (initialize_low_arch): Call
9704 init_registers_x32_avx_linux.
9706 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9708 Fix compatibility with Android Bionic.
9709 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9712 2013-06-07 Pedro Alves <palves@redhat.com>
9715 * Makefile.in (OBS): Add tdesc.o.
9716 (IPA_OBJS): Add tdesc-ipa.o.
9717 (tdesc-ipa.o): New rule.
9718 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9720 * linux-low.c (new_inferior): Delete.
9721 (disabled_regsets, num_regsets): Delete.
9722 (linux_add_process): Adjust to set the new per-process
9724 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9725 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9726 was a stop. When calling arch_setup, switch the current inferior
9727 to the thread that got an event.
9728 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9729 (regsets_fetch_inferior_registers)
9730 (regsets_store_inferior_registers): New regsets_info parameter.
9732 (linux_register_in_regsets): New regs_info parameter. Adjust to
9734 (register_addr, fetch_register, store_register): New usrregs_info
9735 parameter. Adjust to use it.
9736 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9737 parameter regs_info. Adjust to use it.
9738 (linux_fetch_registers): Get the current inferior's regs_info, and
9740 (linux_store_registers): Ditto.
9741 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9742 (initialize_low): Don't initialize the target_regsets here. Call
9743 initialize_low_arch.
9744 * linux-low.h (target_regsets): Delete declaration.
9745 (struct regsets_info): New.
9746 (struct usrregs_info): New.
9747 (struct regs_info): New.
9748 (struct process_info_private) <new_inferior>: New field.
9749 (struct linux_target_ops): Delete the num_regs, regmap, and
9750 regset_bitmap fields. New field regs_info.
9751 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9752 * i387-fp.c (num_xmm_registers): Delete.
9753 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9754 calls to new interface.
9755 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9756 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9757 Infer the number of xmm registers from the regcache's target
9759 * i387-fp.h (num_xmm_registers): Delete.
9760 * inferiors.c (add_thread): Don't install the thread's regcache
9762 * proc-service.c (gregset_info): Fetch the current inferior's
9763 regs_info. Adjust to use it.
9764 * regcache.c: Include tdesc.h.
9765 (register_bytes, reg_defs, num_registers)
9766 (gdbserver_expedite_regs): Delete.
9767 (get_thread_regcache): If the thread doesn't have a regcache yet,
9768 create one, instead of aborting gdbserver.
9769 (regcache_invalidate_one): Rename to ...
9770 (regcache_invalidate_thread): ... this.
9771 (regcache_invalidate_one): New.
9772 (regcache_invalidate): Only invalidate registers of the current
9774 (init_register_cache): Add target_desc parameter, and use it.
9775 (new_register_cache): Ditto. Assert the target description has a
9776 non zero registers_size.
9777 (regcache_cpy): Add assertions. Adjust.
9778 (realloc_register_cache, set_register_cache): Delete.
9779 (registers_to_string, registers_from_string): Adjust.
9780 (find_register_by_name, find_regno, find_register_by_number)
9781 (register_cache_size): Add target_desc parameter, and use it.
9782 (free_register_cache_thread, free_register_cache_thread_one)
9783 (regcache_release, register_cache_size): New.
9784 (register_size): Add target_desc parameter, and use it.
9785 (register_data, supply_register, supply_register_zeroed)
9786 (supply_regblock, supply_register_by_name, collect_register)
9787 (collect_register_as_string, collect_register_by_name): Adjust.
9788 * regcache.h (struct target_desc): Forward declare.
9789 (struct regcache) <tdesc>: New field.
9790 (init_register_cache, new_register_cache): Add target_desc
9792 (regcache_invalidate_thread): Declare.
9793 (regcache_invalidate_one): Delete declaration.
9794 (regcache_release): Declare.
9795 (find_register_by_number, register_cache_size, register_size)
9796 (find_regno): Add target_desc parameter.
9797 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9799 * remote-utils.c: Include tdesc.h.
9800 (outreg, prepare_resume_reply): Adjust.
9801 * server.c: Include tdesc.h.
9802 (gdbserver_xmltarget): Delete declaration.
9803 (get_features_xml, process_serial_event): Adjust.
9804 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9806 (struct process_info) <tdesc>: New field.
9807 (ipa_tdesc): Declare.
9808 * tdesc.c: New file.
9809 * tdesc.h: New file.
9810 * tracepoint.c: Include tdesc.h.
9811 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9812 (get_context_regcache): Adjust to pass ipa_tdesc down.
9813 (do_action_at_tracepoint): Adjust to get the register cache size
9814 from the context regcache's description.
9815 (traceframe_walk_blocks): Adjust to get the register cache size
9816 from the current trace frame's description.
9817 (traceframe_get_pc): Adjust to get current trace frame's
9818 description and pass it down.
9819 (gdb_collect): Adjust to get the register cache size from the
9821 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9822 (gdbserver_xmltarget): Delete.
9823 (initialize_low_tracepoint): Set the ipa's target description.
9824 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9825 (initialize_low_tracepoint): Set the ipa's target description.
9826 * linux-x86-low.c: Include tdesc.h.
9827 [__x86_64__] (is_64bit_tdesc): New.
9828 (ps_get_thread_area, x86_get_thread_area): Use it.
9829 (i386_cannot_store_register): Rename to ...
9830 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9831 (i386_cannot_fetch_register): Rename to ...
9832 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9833 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9835 (target_regsets): Rename to ...
9836 (x86_regsets): ... this.
9837 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9839 (x86_siginfo_fixup): Use is_64bit_tdesc.
9840 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9841 (tdesc_x32_avx_linux, tdesc_x32_linux)
9842 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9844 (x86_linux_update_xmltarget): Delete.
9845 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9846 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9847 (AMD64_LINUX_USER64_CS): New.
9848 (x86_linux_read_description): New, based on
9849 x86_linux_update_xmltarget.
9850 (same_process_callback): New.
9851 (x86_arch_setup_process_callback): New.
9852 (x86_linux_update_xmltarget): New.
9853 (x86_regsets_info): New.
9854 (amd64_linux_regs_info): New.
9855 (i386_linux_usrregs_info): New.
9856 (i386_linux_regs_info): New.
9857 (x86_linux_regs_info): New.
9858 (x86_arch_setup): Reimplement.
9859 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9860 (x86_emit_ops): Ditto.
9861 (the_low_target): Adjust. Install x86_linux_regs_info,
9862 x86_cannot_fetch_register, and x86_cannot_store_register.
9863 (initialize_low_arch): New.
9864 * linux-ia64-low.c (tdesc_ia64): Declare.
9865 (ia64_fetch_register): Adjust.
9866 (ia64_usrregs_info, regs_info): New globals.
9867 (ia64_regs_info): New function.
9868 (the_low_target): Adjust.
9869 (initialize_low_arch): New function.
9870 * linux-sparc-low.c (tdesc_sparc64): Declare.
9871 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9873 (sparc_arch_setup): New function.
9874 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9875 (the_low_target): Adjust.
9876 (initialize_low_arch): New function.
9877 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9878 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9879 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9880 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9881 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9882 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9883 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9884 (tdesc_powerpc_isa205_vsx64l): Declare.
9885 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9886 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9887 (ppc_set_pc, ppc_get_hwcap): Adjust.
9888 (ppc_usrregs_info): Forward declare.
9889 (!__powerpc64__) ppc_regmap_adjusted: New global.
9890 (ppc_arch_setup): Adjust to the current process'es target
9892 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9893 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9894 (ppc_store_evrregset): Adjust.
9895 (target_regsets): Rename to ...
9896 (ppc_regsets): ... this, and make static.
9897 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9898 (ppc_regs_info): New function.
9899 (the_low_target): Adjust.
9900 (initialize_low_arch): New function.
9901 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9902 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9903 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9904 (tdesc_s390x_linux64v2): Declare.
9905 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9906 (s390_fill_gregset, s390_store_last_break): Adjust.
9907 (target_regsets): Rename to ...
9908 (s390_regsets): ... this, and make static.
9909 (s390_get_pc, s390_set_pc): Adjust.
9910 (s390_get_hwcap): New target_desc parameter, and use it.
9911 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9912 (s390_arch_setup): Adjust to set the current process'es target
9913 description. Don't adjust the regmap.
9914 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9915 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9916 (regs_info_3264): New globals.
9917 (s390_regs_info): New function.
9918 (the_low_target): Adjust.
9919 (initialize_low_arch): New function.
9920 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9921 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9922 [__mips64] (init_registers_mips_linux)
9923 (init_registers_mips_dsp_linux): Delete defines.
9924 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9925 (have_dsp): New global.
9926 (mips_read_description): New, based on mips_arch_setup.
9927 (mips_arch_setup): Reimplement.
9928 (get_usrregs_info): New function.
9929 (mips_cannot_fetch_register, mips_cannot_store_register)
9930 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9931 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9932 (target_regsets): Rename to ...
9933 (mips_regsets): ... this, and make static.
9934 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9935 (dsp_regs_info, regs_info): New globals.
9936 (mips_regs_info): New function.
9937 (the_low_target): Adjust.
9938 (initialize_low_arch): New function.
9939 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9940 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9942 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9943 (arm_read_description): New, with bits factored from
9945 (arm_arch_setup): Reimplement.
9946 (target_regsets): Rename to ...
9947 (arm_regsets): ... this, and make static.
9948 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9949 (arm_regs_info): New function.
9950 (the_low_target): Adjust.
9951 (initialize_low_arch): New function.
9952 * linux-m68k-low.c (tdesc_m68k): Declare.
9953 (target_regsets): Rename to ...
9954 (m68k_regsets): ... this, and make static.
9955 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9956 (m68k_regs_info): New function.
9957 (m68k_arch_setup): New function.
9958 (the_low_target): Adjust.
9959 (initialize_low_arch): New function.
9960 * linux-sh-low.c (tdesc_sharch): Declare.
9961 (target_regsets): Rename to ...
9962 (sh_regsets): ... this, and make static.
9963 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9964 (sh_regs_info, sh_arch_setup): New functions.
9965 (the_low_target): Adjust.
9966 (initialize_low_arch): New function.
9967 * linux-bfin-low.c (tdesc_bfin): Declare.
9968 (bfin_arch_setup): New function.
9969 (bfin_usrregs_info, regs_info): New globals.
9970 (bfin_regs_info): New function.
9971 (the_low_target): Adjust.
9972 (initialize_low_arch): New function.
9973 * linux-cris-low.c (tdesc_cris): Declare.
9974 (cris_arch_setup): New function.
9975 (cris_usrregs_info, regs_info): New globals.
9976 (cris_regs_info): New function.
9977 (the_low_target): Adjust.
9978 (initialize_low_arch): New function.
9979 * linux-cris-low.c (tdesc_crisv32): Declare.
9980 (cris_arch_setup): New function.
9981 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9982 (cris_regs_info): New function.
9983 (the_low_target): Adjust.
9984 (initialize_low_arch): New function.
9985 * linux-m32r-low.c (tdesc_m32r): Declare.
9986 (m32r_arch_setup): New function.
9987 (m32r_usrregs_info, regs_info): New globals.
9988 (m32r_regs_info): Adjust.
9989 (initialize_low_arch): New function.
9990 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9991 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9992 (tic6x_usrregs_info): Forward declare.
9993 (tic6x_read_description): New function, based on ...
9994 (tic6x_arch_setup): ... this. Reimplement.
9995 (target_regsets): Rename to ...
9996 (tic6x_regsets): ... this, and make static.
9997 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9998 (tic6x_regs_info): New function.
9999 (the_low_target): Adjust.
10000 (initialize_low_arch): New function.
10001 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10002 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10003 (target_regsets): Rename to ...
10004 (xtensa_regsets): ... this, and make static.
10005 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10007 (xtensa_arch_setup, xtensa_regs_info): New functions.
10008 (the_low_target): Adjust.
10009 (initialize_low_arch): New function.
10010 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10011 (nios2_arch_setup): Set the current process'es tdesc.
10012 (target_regsets): Rename to ...
10013 (nios2_regsets): ... this.
10014 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10015 (nios2_regs_info): New function.
10016 (the_low_target): Adjust.
10017 (initialize_low_arch): New function.
10018 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10019 (aarch64_arch_setup): Set the current process'es tdesc.
10020 (target_regsets): Rename to ...
10021 (aarch64_regsets): ... this.
10022 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10023 (aarch64_regs_info): New function.
10024 (the_low_target): Adjust.
10025 (initialize_low_arch): New function.
10026 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10028 (target_regsets): Rename to ...
10029 (tile_regsets): ... this.
10030 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10031 (tile_regs_info): New function.
10032 (tile_arch_setup): Set the current process'es tdesc.
10033 (the_low_target): Adjust.
10034 (initialize_low_arch): New function.
10035 * spu-low.c (tdesc_spu): Declare.
10036 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10037 * win32-arm-low.c (tdesc_arm): Declare.
10038 (arm_arch_setup): New function.
10039 (the_low_target): Install arm_arch_setup instead of
10040 init_registers_arm.
10041 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10042 (init_windows_x86): Rename to ...
10043 (i386_arch_setup): ... this. Set `win32_tdesc'.
10044 (the_low_target): Adjust.
10045 * win32-low.c (win32_tdesc): New global.
10046 (child_add_thread): Don't create the thread cache here.
10047 (do_initial_child_stuff): Set the new process'es tdesc.
10048 * win32-low.h (struct target_desc): Forward declare.
10049 (win32_tdesc): Declare.
10050 * lynx-i386-low.c (tdesc_i386): Declare global.
10051 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10052 * lynx-low.c (lynx_tdesc): New global.
10053 (lynx_add_process): Set the new process'es tdesc.
10054 * lynx-low.h (struct target_desc): Forward declare.
10055 (lynx_tdesc): Declare global.
10056 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10057 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10058 * nto-low.c (nto_tdesc): New global.
10059 (do_attach): Set the new process'es tdesc.
10060 * nto-low.h (struct target_desc): Forward declare.
10061 (nto_tdesc): Declare.
10062 * nto-x86-low.c (tdesc_i386): Declare.
10063 (nto_x86_arch_setup): Set `nto_tdesc'.
10065 2013-06-04 Gary Benson <gbenson@redhat.com>
10067 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10068 to qSupported response when appropriate.
10069 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10070 with nonzero-length annex.
10071 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10072 arguments supplied in annex.
10074 2013-05-31 Doug Evans <dje@google.com>
10077 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10078 64 bits in 64-cross-32 environment.
10080 2013-05-28 Pedro Alves <palves@redhat.com>
10082 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10083 (aarch64-without-fpu.c): Delete rule.
10084 * configure.srv (aarch64*-*-linux*): Remove references to
10085 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10086 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10089 2013-05-24 Pedro Alves <palves@redhat.com>
10091 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10092 instead of strchr/decode_address. Error if the range isn't split
10093 with a ','. Don't assume there's be a ':' in the action.
10095 2013-05-23 Yao Qi <yao@codesourcery.com>
10096 Pedro Alves <palves@redhat.com>
10098 * linux-low.c (lwp_in_step_range): New function.
10099 (linux_wait_1): If the thread was range stepping and stopped
10100 outside the stepping range, report the stop to GDB. Otherwise,
10101 continue stepping. Add range stepping debug output.
10102 (linux_set_resume_request): Copy the step range from the resume
10103 request to the lwp.
10104 (linux_supports_range_stepping): New.
10105 (linux_target_ops) <supports_range_stepping>: Set to
10106 linux_supports_range_stepping.
10107 * linux-low.h (struct linux_target_ops)
10108 <supports_range_stepping>: New field.
10109 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10110 * linux-x86-low.c (x86_supports_range_stepping): New.
10111 (the_low_target) <supports_range_stepping>: Set to
10112 x86_supports_range_stepping.
10113 * server.c (handle_v_cont): Handle 'r' action.
10114 (handle_v_requests): Append ";r" if the target supports range
10116 * target.h (struct thread_resume) <step_range_start,
10117 step_range_end>: New fields.
10118 (struct target_ops) <supports_range_stepping>:
10120 (target_supports_range_stepping): New macro.
10122 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10124 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10125 confusion in comment.
10127 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10129 * lynx-low.c (struct process_info_private): New type.
10130 (lynx_add_process): New function.
10131 (lynx_create_inferior, lynx_attach): Replace calls to
10132 add_process by calls to lynx_add_process.
10133 (lynx_resume): If PTID is null, then try using
10134 current_process()->private->last_wait_event_ptid.
10136 (lynx_clear_inferiors): Delete. The contents of that function
10137 has been inlined in lynx_mourn;
10138 (lynx_wait_1): Save the ptid in the process's private data.
10139 (lynx_mourn): Free the process' private data. Replace call
10140 to lynx_clear_inferiors by call to clear_inferiors.
10142 2013-05-17 Yao Qi <yao@codesourcery.com>
10144 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10147 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10149 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10150 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10151 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10152 PT_TEXT_END_ADDR guards. Update comments.
10153 (linux_target_op) <read_offsets>: Conditionally define to
10154 linux_read_offsets if the target is UCLIBC and if it defines
10155 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10157 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10158 Andrew Jenner <andrew@codesourcery.com>
10160 * Makefile.in (SFILES): Add linux-nios2-low.c.
10161 (clean): Add action to delete nios2-linux.c.
10162 (nios2-linux.c): New rule.
10163 * configure.srv: Add nios2*-*-linux*.
10164 * linux-nios2-low.c: New.
10166 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10168 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10170 2013-04-25 Hui Zhu <hui@codesourcery.com>
10173 * ax.c (ax_printf): Add fflush.
10175 2013-04-22 Tom Tromey <tromey@redhat.com>
10177 * Makefile.in (SFILES): Add filestuff.c.
10178 (OBS): Add filestuff.o.
10179 (filestuff.o): New target.
10180 * config.in, configure: Rebuild.
10181 * configure.ac: Check for fdwalk, pipe2.
10183 2013-04-17 Pedro Alves <palves@redhat.com>
10185 * configure.ac (USE_THREAD_DB): Delete variable.
10186 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10187 Don't AC_SUBST USE_THREAD_DB.
10188 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10189 * config.in, configure: Regenerate.
10191 2013-04-16 Pedro Alves <palves@redhat.com>
10193 * linux-low.h (struct lwp_info) <thread_known>: Move under
10194 the USE_THREAD_DB #ifdef.
10196 2013-04-16 Pedro Alves <palves@redhat.com>
10198 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10199 (linux-low.o): Delete rule.
10200 * linux-low.h: Always include "gdb_thread_db.h" instead of
10201 conditionally including thread_db.h.
10202 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10205 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10207 * Makefile.in (install-only): Fix make install regression.
10209 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10211 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10212 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10214 * gdbserver.1: Remove.
10216 2013-03-22 Pedro Alves <palves@redhat.com>
10218 * linux-low.c (handle_extended_wait): Don't call
10219 linux_enable_event_reporting.
10221 2013-03-15 Tony Theodore <tonyt@logyst.com>
10224 * Makefile.in (SHELL): Use @SHELL@.
10226 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10228 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10231 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10233 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10234 Remove extraneous NULL element.
10236 2013-03-13 Yao Qi <yao@codesourcery.com>
10238 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10239 'V' block in trace frame.
10241 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10243 * target.h (struct target_ops): Add btrace ops.
10244 (target_supports_btrace): New macro.
10245 (target_enable_btrace): New macro.
10246 (target_disable_btrace): New macro.
10247 (target_read_btrace): New macro.
10248 * gdbthread.h (struct thread_info): Add btrace field.
10249 * server.c: Include btrace-common.h.
10250 (handle_btrace_general_set): New function.
10251 (handle_btrace_enable): New function.
10252 (handle_btrace_disable): New function.
10253 (handle_general_set): Call handle_btrace_general_set.
10254 (handle_qxfer_btrace): New function.
10255 (struct qxfer qxfer_packets[]): Add btrace entry.
10256 * inferiors.c (remove_thread): Disable btrace.
10257 * linux-low: Include linux-btrace.h.
10258 (linux_low_enable_btrace): New function.
10259 (linux_low_read_btrace): New function.
10260 (linux_target_ops): Add btrace ops.
10261 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10262 Add srv_linux_btrace=yes.
10263 (x86_64-*-linux*): Add linux-btrace.o.
10264 Add srv_linux_btrace=yes.
10265 * configure.ac: Define HAVE_LINUX_BTRACE.
10266 * config.in: Regenerated.
10267 * configure: Regenerated.
10269 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10271 * server.c (handle_qxfer): Preserve error message if -3 is
10273 (qxfer): Document the -3 return value.
10275 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10277 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10278 (linux_btrace_h): New variable.
10279 (linux-btrace.o): New rule.
10281 2013-03-08 Stan Shebs <stan@codesourcery.com>
10282 Hafiz Abid Qadeer <abidh@codesourcery.com>
10284 * tracepoint.c (trace_buffer_size): New global.
10285 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10286 (init_trace_buffer): Change to one-argument function. Allocate
10287 trace buffer memory.
10288 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10289 handle QTBuffer:size packet.
10290 (cmd_bigqtbuffer_size): New function.
10291 (initialize_tracepoint): Call init_trace_buffer with
10292 DEFAULT_TRACE_BUFFER_SIZE.
10293 * server.c (handle_query): Add QTBuffer:size in the
10296 2013-03-07 Yao Qi <yao@codesourcery.com>
10298 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10299 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10301 (cmd_qtsp): Adjust condition. Do post increment.
10302 Set cur_action and cur_step_action back to 0.
10304 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10307 * linux-low.c (linux_write_memory): Return early success if LEN is
10310 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10312 * configure.srv: Add x86_64-*-cygwin* as target.
10314 2013-02-28 Tom Tromey <tromey@redhat.com>
10316 * configure.ac: Invoke AC_SYS_LARGEFILE.
10317 * configure, config.in: Rebuild.
10319 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10321 * win32-low.c: Throughout, fix format strings and casts of
10322 printf-like functions to avoid type related warnings on all
10324 (get_child_debug_event): Print dwDebugEventCode as hex since
10325 that's how it's usually documented.
10327 2013-02-28 Yao Qi <yao@codesourcery.com>
10329 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10332 2013-02-27 Jiong Wang <jiwang@tilera.com>
10334 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10335 (reg-tilegx32.c): New rule.
10336 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10337 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10338 different register info initializer according to elf class.
10339 (init_registers_tilgx32): New function. The tilegx32 register info
10341 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10342 (tile_store_gregset): Likewise.
10344 2013-02-27 Yao Qi <yao@codesourcery.com>
10346 * server.c (process_point_options): Print debug message when
10347 debug_threads is true.
10349 2013-02-26 Yao Qi <yao@codesourcery.com>
10351 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10353 2013-02-19 Pedro Alves <palves@redhat.com>
10354 Kai Tietz <ktietz@redhat.com>
10358 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10359 instead of strtoul to extract address from packet.
10360 (process_serial_event) <'z'>: Likewise.
10362 2013-02-18 Yao Qi <yao@codesourcery.com>
10364 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10366 2013-02-14 Pedro Alves <palves@redhat.com>
10370 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10371 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10373 2013-02-14 Pedro Alves <palves@redhat.com>
10375 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10377 2013-02-14 Pedro Alves <palves@redhat.com>
10379 * tracepoint.c (save_string): Delete.
10380 (add_tracepoint_action): Use savestring instead of save_string.
10382 2013-02-12 Pedro Alves <palves@redhat.com>
10384 * linux-xtensa-low.c: Ditto.
10385 * xtensa-xtregs.c: Ditto.
10387 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10389 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10392 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10394 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10395 aarch64_num_wp_regs and aarch64_num_bp_regs to
10396 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10398 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10400 * linux-aarch64-low.c (ps_get_thread_area): Replace
10401 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10403 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10404 Marcus Shawcroft <marcus.shawcroft@arm.com>
10405 Nigel Stephens <nigel.stephens@arm.com>
10406 Yufeng Zhang <yufeng.zhang@arm.com>
10408 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10409 (aarch64.c, aarch64-without-fpu.c): New targets.
10410 * configure.srv (aarch64*-*-linux*): New.
10411 * linux-aarch64-low.c: New file.
10413 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10415 * linux-low.c (handle_extended_wait, linux_create_inferior)
10416 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10417 (dequeue_one_deferred_signal, linux_resume_one_thread)
10418 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10419 (linux_tracefork_grandchild, linux_test_for_tracefork)
10420 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10421 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10422 where the argument is 0.
10424 2013-01-25 Yao Qi <yao@codesourcery.com>
10426 * event-loop.c: Include "queue.h".
10427 (gdb_event_p): New typedef.
10428 (struct gdb_event) <next_event>: Remove.
10429 (event_queue): Change to QUEUE(gdb_event_p).
10430 (async_queue_event): Remove.
10431 (gdb_event_xfree): New.
10432 (initialize_event_loop): New.
10433 (process_event): Use API from QUEUE.
10434 (wait_for_event): Likewise.
10435 * server.c (main): Call initialize_event_loop.
10436 * server.h (initialize_event_loop): Declare.
10438 2013-01-18 Yao Qi <yao@codesourcery.com>
10440 * ax.h (struct eval_agent_expr_context): New.
10441 (gdb_eval_agent_expr): Update declaration.
10442 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10443 TFRAME. Add new argument CTX.
10444 * server.h (struct eval_agent_expr_context): Declare.
10445 (agent_mem_read, agent_tsv_read): Update declaration.
10446 (agent_mem_read_string): Likewise.
10447 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10448 (add_traceframe_block): Add new argument TPOINT.
10449 Increase TPOINT->traceframe_usage.
10450 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10451 eval_tracepoint_agent_expr.
10452 (condition_true_at_tracepoint): Likewise.
10453 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10454 (agent_mem_read_string, agent_tsv_read): Likewise.
10456 2013-01-16 Yao Qi <yao@codesourcery.com>
10458 * linux-low.c (linux_resume_one_lwp): Don't check
10459 'lwp->bp_reinsert != 0'.
10461 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10462 Pedro Alves <palves@redhat.com>
10464 * lynx-low.c (ptrace_request_to_str): Define a temporary
10465 macro and use it to simplify this function's implementation.
10467 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10469 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10472 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10474 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10476 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10478 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10480 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10482 * lynx-low.c (lynx_resume): Use the resume_info parameter
10483 to determine the ptid for the lynx_ptrace call, unless
10484 it is equal to minus_one_ptid, in which case we use the
10485 ptid of the current_inferior.
10486 (lynx_wait_1): After having received a thread create/exit
10487 event, resume the inferior's execution using the signaling
10488 thread's ptid, rather than the old ptid.
10490 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10492 * lynx-low.c (lynx_resume): Delete variable ret.
10494 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10496 * gdbreplay.c (gdbreplay_version): Update copyright year.
10497 * server.c (gdbserver_version): Likewise.
10499 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10501 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10504 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10506 * lynx-low.c (ptrace_request_to_str): Add handling for
10507 PTRACE_GETTRACESIG.
10509 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10511 * lynx-low.c (lynx_attach): Delete variable new_process.
10513 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10515 * lynx-low.c (lynx_create_inferior): Delete variable
10518 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10520 * lynx-low.c (ptrace_request_to_str): Do not handle
10521 PTRACE_GETTHREADLIST if this macro does not exist.
10523 2012-12-15 Yao Qi <yao@codesourcery.com>
10525 * Makefile.in (OBS): Add notif.o.
10526 * notif.c, notif.h: New.
10527 * server.c: Include "notif.h".
10528 (struct vstop_notif) <next>: Remove.
10530 (queue_stop_reply): Update.
10531 (push_event, send_next_stop_reply): Remove.
10532 (discard_queued_stop_replies): Update.
10533 (notif_stop): New variable.
10534 (handle_v_stopped): Remove.
10535 (handle_v_requests): Don't call handle_v_stopped. Call
10536 handle_ack_notif instead.
10537 (queue_stop_reply_callback): Call notif_event_enque instead
10538 of queue_stop_reply.
10539 (handle_status): Don't call send_next_stop_reply, call
10540 notif_write_event instead.
10541 (kill_inferior_callback): Likewise.
10542 (detach_or_kill_inferior_callback): Likewise.
10543 (main): Call initialize_notif.
10544 (process_serial_event): Call QUEUE_is_empty.
10545 (handle_target_event): Call notif_push instead of push event.
10546 * server.h (push_event): Remove declaration.
10548 2012-12-10 Tom Tromey <tromey@redhat.com>
10550 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10551 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10554 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10555 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10556 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10557 (amd64-linux-ipa.o, ax.o): Rewrite.
10558 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10559 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10560 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10561 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10562 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10563 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10564 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10565 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10566 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10567 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10568 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10569 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10570 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10571 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10572 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10573 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10574 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10575 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10576 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10577 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10578 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10579 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10580 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10581 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10582 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10583 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10584 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10585 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10586 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10587 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10588 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10589 (reg-tilegx.o): Remove.
10590 (all_object_files): New macro.
10591 Include .deps files.
10592 * aclocal.m4, configure: Rebuild.
10593 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10594 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10595 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10597 2012-12-05 Tom Tromey <tromey@redhat.com>
10600 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10602 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10604 * configure.ac: Check for linux/perf_event.h.
10605 * config.in: Regenerated.
10606 * configure: Regenerated.
10608 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10610 * hostio.c (handle_readlink): Decrease buffer size
10611 parameter passed to readlink by one byte.
10613 2012-11-26 Yao Qi <yao@codesourcery.com>
10615 * configure.ac (build_warnings): Append '-Wempty-body'.
10616 * configure: Regenerated.
10617 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10620 2012-11-15 Pierre Muller <muller@sourceware.org>
10622 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10623 * config.in: Regenerate.
10624 * configure: Regenerate.
10625 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10626 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10627 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10628 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10630 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10631 instead of <sys/wait.h> header.
10632 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10634 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10636 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10637 (various make rules): Remove -DGDBSERVER
10639 2012-11-09 Yao Qi <yao@codesourcery.com>
10641 * spu-low.c (current_ptid): Move it to ..
10642 * gdbthread.h: ... here. New.
10643 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10644 * server.c (myresume, process_serial_event): Likewise.
10645 * thread-db.c (thread_db_find_new_threads): Likewise.
10646 * tracepoint.c (run_inferior_command): Likewise.
10648 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10650 * server.c (handle_search_memory_1): Include access length in
10653 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10655 * linux-crisv32-low.c: Fix compile errors.
10657 2012-09-04 Yao Qi <yao@codesourcery.com>
10659 * tracepoint.c (cmd_qtsv): Adjust debug message.
10660 Don't check CUR_TPOINT.
10662 2012-08-28 Yao Qi <yao@codesourcery.com>
10664 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10665 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10666 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10667 Remove declarations of xmalloc, xreallloc, xstrdup and
10669 * Makefile.in (libiberty_h): New.
10670 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10671 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10673 2012-08-23 Yao Qi <yao@codesourcery.com>
10675 * server.h: Remove declaration of 'xsnprintf'.
10677 2012-08-22 Keith Seitz <keiths@redhat.com>
10679 * server.h: Include build-gnulib-gbserver/config.h.
10680 * gdbreplay.c: Likewise.
10682 2012-08-08 Doug Evans <dje@google.com>
10684 * Makefile.in (SFILES): Add gdb_vecs.c.
10685 (OBS): Add gdb_vecs.o.
10686 (gdb_vecs_h, host_defs_h): New variables.
10687 (thread-db.o): Add $(gdb_vecs_h) dependency.
10688 (gdb_vecs.o): New rule.
10689 * thread-db.c: #include "gdb_vecs.h".
10690 (thread_db_load_search): Use a vector to iterate over path elements.
10691 Handle text appearing after "$pdir".
10693 * configure.ac: Add check for strstr.
10694 * config.in: Regenerate.
10695 * configure: Regenerate.
10697 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10699 * hostio.c (handle_pread): If pread fails, fall back to attempting
10701 (handle_pwrite): Likewise for pwrite.
10703 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10705 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10706 between unsupported TYPE and unimplementable ADDR/LEN combination.
10707 (arm_insert_point): Act on new return value.
10709 2012-07-31 Pedro Alves <palves@redhat.com>
10711 * server.c (process_point_options): Only skip tokens if we find
10712 one that is unrecognized. Don't treat 'X' specially while
10713 skipping unrecognized tokens.
10715 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10717 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10718 to 4-byte-align HW breakpoint addresses for Thumb.
10720 2012-07-27 Yao Qi <yao@codesourcery.com>
10724 * server.h: Declare gdb_agent_about_to_close.
10725 * target.c (kill_inferior): Include "agent.h".
10726 New. Send command 'kill'.
10727 * target.h (kill_inferior): Removed macro.
10728 * tracepoint.c (gdb_agent_about_to_close): New.
10729 (gdb_agent_helper_thread): Handle command 'close'.
10730 Wait endlessly until the inferior stops.
10731 Install gdb_agent_remove_socket to atexit hook.
10732 (agent_socket_name): New static variable.
10733 (gdb_agent_socket_init): Replace local variable 'name' with
10734 'agent_socket_name'.
10735 (gdb_agent_remove_socket): New.
10737 2012-07-27 Yao Qi <yao@codesourcery.com>
10739 * server.c (process_point_options): Stop at 'X' when parsing.
10741 2012-07-19 Michael Eager <eager@eagercon.com>
10743 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10745 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10746 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10747 hardware breakpoint.
10749 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10751 * gdbserver/linux-low.c (initialize_low): Call
10752 linux_ptrace_init_warnings.
10754 2012-07-02 Doug Evans <dje@google.com>
10756 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10759 2012-07-02 Stan Shebs <stan@codesourcery.com>
10761 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10762 (ax.o): Add it to build rule.
10764 (OBS): Add format.o.
10765 (IPA_OBS): Add format.o.
10766 * server.c (handle_query): Claim support for breakpoint commands.
10767 (process_point_options): Add command case.
10768 (process_serial_event): Leave running if there are printfs in
10770 * mem-break.h (any_persistent_commands): Declare.
10771 (add_breakpoint_commands): Declare.
10772 (gdb_no_commands_at_breakpoint): Declare.
10773 (run_breakpoint_commands): Declare.
10774 * mem-break.c (struct point_command_list): New struct.
10775 (struct breakpoint): New field command_list.
10776 (any_persistent_commands): New function.
10777 (add_commands_to_breakpoint): New function.
10778 (add_breakpoint_commands): New function.
10779 (gdb_no_commands_at_breakpoint): New function.
10780 (run_breakpoint_commands): New function.
10781 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10783 * ax.c: Include format.h.
10784 (ax_printf): New function.
10785 (gdb_eval_agent_expr): Add printf opcode.
10787 2012-06-13 Yao Qi <yao@codesourcery.com>
10789 * server.c (start_inferior): Remove duplicated writes to fields
10790 'last_resume_kind' and 'last_status' of 'current_inferior'.
10792 2012-06-12 Yao Qi <yao@codesourcery.com>
10793 Pedro Alves <palves@redhat.com>
10795 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10797 * server.c (handle_v_cont): Extend comment.
10799 2012-06-11 Yao Qi <yao@codesourcery.com>
10801 * linux-low.c (linux_attach): Add 'static'.
10803 2012-06-06 Yao Qi <yao@codesourcery.com>
10805 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10807 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10809 Fix gcc -flto compilation warning.
10810 * server.c (main): Make variable multi_mode and attach volatile.
10812 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10814 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10815 if the platform doesn't know about it.
10817 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10819 * Makefile.in (SFILES): Add linux-tile-low.c.
10820 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10821 * configure.srv: Handle tilegx-*-linux*.
10822 * linux-tile-low.c: New file.
10824 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10826 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10828 2012-05-24 Pedro Alves <palves@redhat.com>
10832 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10834 2012-05-24 Pedro Alves <palves@redhat.com>
10838 Replace target_signal with gdb_signal throughout.
10840 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10842 * linux-low.c (linux_store_registers): Avoid the copying sequence
10843 when no data has been retrieved by ptrace.
10845 2012-05-22 Will Deacon <will.deacon@arm.com>
10847 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10848 Include asm/ptrace.h.
10849 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10852 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10854 * linux-low.c (linux_store_registers): Don't re-retrieve data
10855 with ptrace that has already been obtained from /proc. Always
10856 copy any data retrieved with ptrace to the buffer supplied.
10858 2012-05-11 Yao Qi <yao@codesourcery.com>
10859 Pedro Alves <palves@redhat.com>
10861 * linux-low.c (enum stopping_threads_kind): New.
10862 (stopping_threads): Change type to `enum stopping_threads_kind'.
10863 (handle_extended_wait): If stopping and suspending threads, leave
10864 the new_lwp suspended too.
10865 (linux_wait_for_event): Adjust.
10866 (stop_all_lwps): Set `stopping_threads' to
10867 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10868 whether we're suspending threads or just stopping them. Assert no
10871 2012-04-29 Yao Qi <yao@codesourcery.com>
10873 * server.h: Move some code to ...
10874 * gdbthread.h: ... here. New.
10875 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10876 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10877 (nto-low.o, win32-low.o): Likewise.
10878 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10879 * regcache.c, remote-utils.c, server.c: Likewise.
10880 * target.c, tracepoint.c, win32-low.c: Likewise.
10882 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10884 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10885 (PTRACE_ARG4_TYPE): Likewise.
10886 (PTRACE_XFER_TYPE): Likewise.
10887 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10888 ptrace to PTRACE_ARG3_TYPE.
10889 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10890 (PTRACE_ARG4_TYPE): Likewise.
10891 (PTRACE_XFER_TYPE): Likewise.
10892 (linux_detach_one_lwp): Cast fourth argument of
10893 ptrace to long then PTRACE_ARG4_TYPE.
10894 (regsets_fetch_inferior_registers): Cast third argument of
10895 ptrace to long then PTRACE_ARG3_TYPE.
10896 (regsets_store_inferior_registers): Likewise.
10898 2012-04-20 Pedro Alves <palves@redhat.com>
10900 * configure: Regenerate.
10902 2012-04-19 Pedro Alves <palves@redhat.com>
10904 * Makefile.in (GNULIB_BUILDDIR): New.
10905 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10906 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10907 (all, install-only, uninstall, clean-info, all-lib, clean): No
10908 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10909 (maintainer-clean realclean distclean): Use subdir_do.
10911 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10912 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10913 * acinclude.m4: Include acx_configure_dir.m4.
10914 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10915 calls. Call AC_PROG_RANLIB. Configure gnulib using
10918 (GNULIB_STDINT_H): Adjust.
10919 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10920 * gdbreplay.c: Include build-gnulib/config.h.
10921 * server.h: Likewise.
10922 * aclocal.m4: Regenerate.
10923 * config.in: Regenerate.
10924 * configure: Regenerate.
10926 2012-04-19 Pedro Alves <palves@redhat.com>
10928 * Makefile.in (LIBGNU, INCGNU): Adjust.
10929 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10930 (all, install-only, uninstall, clean-info, all-lib, clean)
10931 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10932 * configure.ac: Adjust AC_OUTPUT output.
10933 * aclocal.m4: Regenerate.
10934 * configure: Regenerate.
10936 2012-04-19 Pedro Alves <palves@redhat.com>
10938 * Makefile.in (generated_files): New.
10939 (server_h): Remove the explicit dependency on config.h, and depend
10940 on $generated_files.
10942 2012-04-19 Pedro Alves <palves@redhat.com>
10944 * Makefile.in (INCGNU): Add -Ignulib.
10946 2012-04-19 Pedro Alves <palves@redhat.com>
10948 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10949 (INCGNU): ... this, and spell out -I here.
10950 (GNULIB_LIB): Rename to ...
10951 (LIBGNU): ... this.
10952 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10954 2012-04-19 Pedro Alves <palves@redhat.com>
10956 * config.in: Regenerate.
10958 2012-04-19 Pedro Alves <palves@redhat.com>
10960 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10961 * server.h (memmem): Remove declaration.
10962 * config.in: Regenerate.
10963 * configure: Regenerate.
10965 2012-04-19 Yao Qi <yao@codesourcery.com>
10967 * Makefile.in (SFILES): Add common/vec.c.
10971 2012-04-19 Yao Qi <yao@codesourcery.com>
10973 * remote-utils.c (prepare_resume_reply): Replace with macro
10974 target_core_of_thread.
10975 * server.c (handle_qxfer_threads_proper): Likewise.
10976 * target.h (traget_core_of_thread): New macro.
10978 2012-04-18 Pedro Alves <palves@redhat.com>
10980 * aclocal.m4: Regenerate.
10981 * configure: Regenerate.
10983 2012-04-16 Yao Qi <yao@codesourcery.com>
10985 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10986 duplicated on address.
10988 2012-04-16 Yao Qi <yao@codesourcery.com>
10990 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10991 (struct tracepoint_action_ops) <send>: New field.
10992 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10993 (agent_expr_send, x_tracepoint_action_send): New.
10994 (l_tracepoint_action_send): New.
10995 (cmd_qtdp): Download and install tracepoint
10996 according to `use_agent'.
10997 (run_inferior_command): Add one more parameter `len'.
10999 (tracepoint_send_agent): New.
11000 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11002 2012-04-16 Yao Qi <yao@codesourcery.com>
11004 * tracepoint.c (download_tracepoints): Moved to ...
11005 (cmd_qtstart): ... here.
11007 2012-04-14 Yao Qi <yao@codesourcery.com>
11009 * tracepoint.c: Include inttypes.h.
11010 (struct collect_memory_action): Use sized types.
11011 (struct tracepoint): Likewise.
11012 (cmd_qtdp, stop_tracing): Update print specifiers.
11013 (cmd_qtp, response_tracepoint): Likewise.
11014 (collect_data_at_tracepoint): Likewise.
11015 (collect_data_at_step): Likewise.
11017 2012-04-14 Yao Qi <yao@codesourcery.com>
11019 Import gnulib module inttypes.
11020 * aclocal.m4, config.in, configure: Regenerated.
11022 2012-04-14 Yao Qi <yao@codesourcery.com>
11024 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11025 Makefile and config.status at last.
11027 2012-04-13 Yao Qi <yao@codesourcery.com>
11029 * tracepoint.c: Include stdint.h unconditionally.
11031 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11033 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11034 on BFD_HAVE_SYS_PROCFS_TYPE.
11035 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11036 * configure: Regenerate.
11037 * config.in: Likewise.
11039 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11041 * Makefile.in (clean): Also remove x32.c x32-linux.c
11042 x32-avx.c x32-avx-linux.c.
11043 (x32.o): New target.
11045 (x32-linux.o): Likewise.
11046 (x32-linux.c): Likewise.
11047 (x32-avx.o): Likewise.
11048 (x32-avx.c): Likewise.
11049 (x32-avx-linux.o): Likewise.
11050 (x32-avx-linux.c): Likewise.
11052 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11053 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11054 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11055 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11056 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11057 i386/x32-avx-linux.xml.
11059 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11060 (init_registers_x32_avx_linux): Likwise.
11061 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11062 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11064 2012-04-13 Pedro Alves <palves@redhat.com>
11066 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11067 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11068 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11069 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11072 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11074 * linux-x86-low.c (compat_x32_clock_t): New.
11075 (compat_x32_siginfo_t): Likewise.
11076 (compat_x32_siginfo_from_siginfo): Likewise.
11077 (siginfo_from_compat_x32_siginfo): Likewise.
11078 (linux_is_elf64): Likewise.
11079 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11080 and siginfo_from_compat_x32_siginfo for x32.
11081 (x86_arch_setup): Set linux_is_elf64.
11083 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11086 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11088 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11089 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11090 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11091 compatible with process.
11093 2012-04-12 Yao Qi <yao@codesourcery.com>
11095 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11096 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11097 (install-only, install-info, clean): Handle sub dir gnulib.
11098 (all-lib, am--refresh): New targets.
11099 (memmem.o): Remove target.
11100 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11101 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11102 (AC_REPLACE_FUNCS): Remove memmem.
11103 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11104 (AC_OUTPUT): Generate Makefile in gnulib/.
11105 * aclocal.m4, config.in, configure: Regenerated.
11107 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11109 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11111 2012-04-05 Pedro Alves <palves@redhat.com>
11113 -Werror=strict-aliasing
11115 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11118 2012-04-04 Pedro Alves <palves@redhat.com>
11120 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11121 (sparc_store_gregset_from_stack, sparc_store_gregset)
11122 (sparc_breakpoint_at): Fix formatting.
11124 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11126 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11128 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11129 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11130 * config.in: Regenerate.
11131 * configure: Likewise.
11133 2012-03-29 Pedro Alves <palves@redhat.com>
11135 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11136 Correct ptrace arguments.
11138 2012-03-28 Pedro Alves <palves@redhat.com>
11140 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11141 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11142 (IA64_FR1_REGNUM): New defines.
11143 (ia64_fetch_register): New.
11144 (the_low_target): Install it.
11145 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11147 * linux-low.c (linux_fetch_registers): Try the
11148 the_low_target.fetch_register hook first.
11150 * linux-arm-low.c (the_low_target): Adjust.
11151 * linux-bfin-low.c (the_low_target): Adjust.
11152 * linux-cris-low.c (the_low_target): Adjust.
11153 * linux-crisv32-low.c (the_low_target): Adjust.
11154 * linux-m32r-low.c (the_low_target): Adjust.
11155 * linux-m68k-low.c (the_low_target): Adjust.
11156 * linux-mips-low.c (the_low_target): Adjust.
11157 * linux-ppc-low.c (the_low_target): Adjust.
11158 * linux-s390-low.c (the_low_target): Adjust.
11159 * linux-sh-low.c (the_low_target): Adjust.
11160 * linux-sparc-low.c (the_low_target): Adjust.
11161 * linux-tic6x-low.c (the_low_target): Adjust.
11162 * linux-x86-low.c (the_low_target): Adjust.
11163 * linux-xtensa-low.c (the_low_target): Adjust.
11165 2012-03-26 Pedro Alves <palves@redhat.com>
11167 * server.c (handle_qxfer_libraries): Don't bail early if
11168 the_target->qxfer_libraries_svr4 is not NULL.
11170 2012-03-26 Pedro Alves <palves@redhat.com>
11172 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11174 2012-03-23 Pedro Alves <palves@redhat.com>
11176 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11177 "library-list-svr4" element's start tag when the the DSO list is
11180 2012-03-23 Pedro Alves <palves@redhat.com>
11182 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11183 a variable whose type size is the same as the inferior's pointer
11186 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11188 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11190 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11191 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11192 * linux-low.h: Include <signal.h>.
11193 (struct siginfo): Remove forward declaration.
11194 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11197 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11199 * .gitignore: Ignore more files.
11201 2012-03-19 Pedro Alves <palves@redhat.com>
11202 Jan Kratochvil <jan.kratochvil@redhat.com>
11204 * server.c (cont_thread, general_thread): Add describing comments.
11205 (start_inferior): Clear `cont_thread'.
11206 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11209 2012-03-15 Yao Qi <yao@codesourcery.com>
11211 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11213 (cmd_qtdp): ... here.
11215 2012-03-15 Yao Qi <yao@codesourcery.com>
11217 * tracepoint.c (struct tracepoint_action_ops): New.
11218 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11219 (m_tracepoint_action_download): New.
11220 (r_tracepoint_action_download): New.
11221 (x_tracepoint_action_download): New.
11222 (l_tracepoint_action_download): New.
11223 (add_tracepoint_action): Install `action->ops' according type.
11224 (download_tracepoint_1): Move code `download' function pointer
11225 of various tracepoint_action_ops.
11227 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11229 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11230 linux_ptrace_attach_warnings.
11232 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11234 * Makefile.in (linux-ptrace.o): New.
11235 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11236 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11237 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11238 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11239 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11241 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11243 2012-03-08 Yao Qi <yao@codesourcery.com>
11244 Pedro Alves <palves@redhat.com>
11246 Fix PR server/13392.
11247 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11248 offset of JMP insn.
11249 * tracepoint.c (remove_tracepoint): New.
11250 (cmd_qtdp): Call remove_tracepoint when failed to install.
11252 2012-03-07 Pedro Alves <palves@redhat.com>
11254 * linux-low.c (get_detach_signal): New.
11255 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11256 Pass on pending signals to PTRACE_DETACH. Check the result of the
11258 * server.c (program_signals, program_signals_p): New.
11259 (handle_general_set): Handle QProgramSignals.
11260 * server.h (program_signals, program_signals_p): Declare.
11262 2012-03-05 Pedro Alves <palves@redhat.com>
11263 Jan Kratochvil <jan.kratochvil@redhat.com>
11265 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11268 2012-03-03 Yao Qi <yao@codesourcery.com>
11270 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11271 agent_look_up_symbols.
11273 2012-03-03 Yao Qi <yao@codesourcery.com>
11275 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11276 (linux-x86-low.o): Likewise.
11277 * server.h: Remove in_process_agent_loaded.
11278 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11282 2012-03-03 Yao Qi <yao@codesourcery.com>
11284 * tracepoint.c (gdb_agent_capability): New global.
11285 (in_process_agent_loaded_ust): Renamed to
11286 `in_process_agent_supports_ust'.
11288 (in_process_agent_supports_ust): Call agent_capability_check.
11289 (clear_installed_tracepoints): Assert that agent supports
11292 2012-03-03 Yao Qi <yao@codesourcery.com>
11294 * linux-low.c (linux_supports_agent): New.
11295 (linux_target_ops): Initialize field `supports_agent' with
11296 linux_supports_agent.
11297 * target.h (struct target_ops) <supports_agent>: New.
11298 (target_supports_agent): New macro.
11299 * server.c (handle_general_set): Handle packet 'QAgent'.
11300 (handle_query): Send `QAgent+'.
11301 * Makefile.in (server.o): Depends on agent.h.
11303 2012-03-03 Yao Qi <yao@codesourcery.com>
11305 * Makefile.in (OBS): Add agent.o.
11306 Add new rule for agent.o.
11307 Track dependence of tracepoint.c on agent.h.
11308 * tracepoint.c (run_inferior_command_1):
11309 (run_inferior_command): Call agent_run_command.
11310 (gdb_ust_connect_sync_socket): Deleted. Move it to
11312 (resume_thread, stop_thread): Likewise.
11313 (gdb_ust_socket_init): Renamed to ...
11314 (gdb_agent_socket_init): ... New.
11315 (gdb_ust_thread): Renamed to ...
11316 (gdb_agent_helper_thread): ... New.
11317 (gdb_ust_init): Move some code to ...
11318 (gdb_agent_init): ... here. New.
11319 [HAVE_UST]: Call gdb_ust_init.
11320 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11321 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11322 * config.in, configure: Regenerated.
11324 2012-03-02 Pedro Alves <palves@redhat.com>
11326 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11327 * linux-low.c (struct simple_pid_list): New.
11328 (stopped_pids): New a struct simple_pid_list pointer.
11329 (add_to_pid_list, pull_pid_from_list): New.
11330 (handle_extended_wait): Don't assume the first signal new children
11331 report is SIGSTOP. Adjust call to pull_pid_from_list.
11332 (linux_wait_for_lwp): Adjust.
11334 2012-03-02 Yao Qi <yao@codesourcery.com>
11336 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11339 2012-03-02 Yao Qi <yao@codesourcery.com>
11341 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11342 `stop_pc' and `tpoint'. Update caller.
11344 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11346 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11347 * linux-low.c (use_linux_regsets): New macro.
11348 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11349 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11350 (linux_register_in_regsets): New function.
11351 (usr_fetch_inferior_registers): Skip registers covered by
11353 (usr_store_inferior_registers): Likewise.
11354 (usr_fetch_inferior_registers): New macro.
11355 (usr_store_inferior_registers): Likewise.
11356 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11357 (linux_store_registers): Likewise.
11358 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11360 (init_registers_mips64_dsp_linux): Likewise.
11361 (init_registers_mips_linux): New macro.
11362 (init_registers_mips_dsp_linux): Likewise.
11363 (mips_dsp_num_regs): Likewise.
11364 (DSP_BASE, DSP_CONTROL): New fallback macros.
11365 (mips_base_regs): New macro.
11366 (mips_regmap): Use it. Fix the size.
11367 (mips_dsp_regmap): New variable.
11368 (mips_dsp_regset_bitmap): Likewise.
11369 (mips_arch_setup): New function.
11370 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11372 (mips_cannot_store_register): Likewise.
11373 (the_low_target): Update .arch_setup, .num_regs and .regmap
11374 initializers. Add .regset_bitmap initializer.
11375 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11377 * linux-bfin-low.c (the_low_target): Likewise.
11378 * linux-cris-low.c (the_low_target): Likewise.
11379 * linux-crisv32-low.c (the_low_target): Likewise.
11380 * linux-ia64-low.c (the_low_target): Likewise.
11381 * linux-m32r-low.c (the_low_target): Likewise.
11382 * linux-m68k-low.c (the_low_target): Likewise.
11383 * linux-ppc-low.c (the_low_target): Likewise.
11384 * linux-s390-low.c (the_low_target): Likewise.
11385 * linux-sh-low.c (the_low_target): Likewise.
11386 * linux-sparc-low.c (the_low_target): Likewise.
11387 * linux-tic6x-low.c (the_low_target): Likewise.
11388 * linux-x86-low.c (the_low_target): Likewise.
11389 * linux-xtensa-low.c (the_low_target): Likewise.
11390 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11391 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11392 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11394 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11395 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11397 2012-02-29 Yao Qi <yao@codesourcery.com>
11398 Pedro Alves <palves@redhat.com>
11400 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11401 `step_over_finished' is true.
11403 2012-02-27 Pedro Alves <palves@redhat.com>
11405 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11406 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11408 2012-02-27 Pedro Alves <palves@redhat.com>
11411 * linux-low.c (pid_is_stopped): New.
11412 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11414 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11416 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11419 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11421 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11423 2012-02-24 Luis Machado <lgustavo@codesourcery>
11425 * server.c (handle_query): Advertise support for target-side
11426 breakpoint condition evaluation.
11427 (process_point_options): New function.
11428 (process_serial_event): When inserting a breakpoint, check for
11429 a target-side condition that should be evaluated.
11431 * mem-break.c: Include regcache.h and ax.h.
11432 (point_cond_list_t): New data structure.
11433 (breakpoint) <cond_list>: New field.
11434 (find_gdb_breakpoint_at): Make non-static.
11435 (delete_gdb_breakpoint_at): Clear any target-side
11437 (clear_gdb_breakpoint_conditions): New function.
11438 (add_condition_to_breakpoint): Likewise.
11439 (add_breakpoint_condition): Likewise.
11440 (gdb_condition_true_at_breakpoint): Likewise.
11441 (gdb_breakpoint_here): Return result directly instead
11442 of going through a local variable.
11444 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11445 (clear_gdb_breakpoint_conditions): Likewise.
11446 (add_breakpoint_condition): Likewise.
11447 (gdb_condition_true_at_breakpoint): Likewise.
11449 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11450 (need_step_over_p): Take target-side breakpoint condition into
11453 2012-02-24 Luis Machado <lgustavo@codesourcery>
11455 * server.h: Include tracepoint.h.
11456 (agent_mem_read, agent_get_trace_state_variable_value,
11457 agent_set_trace_state_variable_value,
11458 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11459 get_set_tsv_func_addr): New prototypes.
11461 * ax.h: New include file.
11462 * ax.c: New source file.
11464 * tracepoint.c: Include ax.h.
11465 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11466 agent_expr, eval_result_type): Move to ax.h.
11467 (parse_agent_expr): Rename to ...
11468 (gdb_parse_agent_expr): ... this, make it non-static and move
11470 (unparse_agent_expr) Rename to ...
11471 (gdb_unparse_agent_expr): ... this, make it non-static and move
11473 (eval_agent_expr): Rename to ...
11474 (eval_tracepoint_agent_expr): ... this.
11475 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11476 forward declarations.
11477 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11478 (agent_get_trace_state_variable_value): New function.
11479 (agent_set_trace_state_variable_value): New function.
11480 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11481 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11482 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11483 (condition_true_at_tracepoint): Likewise.
11484 (parse_agent_expr): Rename to ...
11485 (gdb_parse_agent_expr): ... this and move to ax.c.
11486 (unparse_agent_expr): Rename to ...
11487 (gdb_unparse_agent_expr): ... this and move to ax.c.
11488 (gdb_agent_op_name): Move to ax.c.
11489 (eval_agent_expr): Rename to ...
11490 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11492 (eval_tracepoint_agent_expr): New function.
11493 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11495 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11497 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11498 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11499 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11500 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11501 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11502 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11503 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11504 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11505 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11506 (compile_bytecodes): Remove forward declaration.
11507 (is_goto_target): Move to ax.c.
11508 (compile_bytecodes): Move to ax.c and call
11509 agent_get_trace_state_variable_value (...) and
11510 agent_set_trace_state_variable_value (...).
11512 * Makefile.in: Update ax.c and IPA dependencies.
11514 2012-02-24 Pedro Alves <palves@redhat.com>
11516 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11517 (cmd_bigqtbuffer_circular): ... this. Only handle
11518 'QTBuffer:circular:'.
11519 (handle_tracepoint_general_set): Adjust.
11521 2012-02-16 Yao Qi <yao@codesourcery.com>
11523 * inferiors.c: Move code to ...
11524 * dll.c: .... here. New.
11525 * server.h: Declare clear_dlls.
11526 * Makefile.in (SFILES): Add dll.c.
11530 2012-02-11 Yao Qi <yao@codesourcery.com>
11532 * server.c: (handle_monitor_command): Add a new parameter
11534 (handle_query): Update caller.
11536 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11538 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11539 * configure, config.in: Regenerate.
11540 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11543 2012-02-02 Pedro Alves <palves@redhat.com>
11545 Try SIGKILL first, then PTRACE_KILL.
11546 * linux-low.c (linux_kill_one_lwp): New.
11547 (linux_kill_one_lwp): Rename to ...
11548 (kill_one_lwp_callback): ... this. Use the new
11549 linux_kill_one_lwp.
11551 2012-02-02 Pedro Alves <palves@redhat.com>
11553 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11556 2012-01-27 Pedro Alves <palves@redhat.com>
11558 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11559 (elf_64_file_p): Make static.
11560 (linux_pid_exe_is_elf_64_file): New.
11561 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11562 Delete declarations.
11563 (linux_pid_exe_is_elf_64_file): Declare.
11564 * linux-x86-low.c (x86_arch_setup): Use
11565 linux_pid_exe_is_elf_64_file.
11567 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11569 * linux-low.c (linux_wait_for_event_1): Rename to ...
11570 (linux_wait_for_event): ... here and merge it with former
11571 linux_wait_for_event - new variable wait_ptid, use it.
11572 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11574 2012-01-23 Pedro Alves <palves@redhat.com>
11576 * server.c (main): Avoid yet another case of infinite loop while
11577 detaching/killing after a longjmp.
11579 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11582 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11584 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11586 * hostio.c (handle_readlink): New function.
11587 (handle_vFile): Call it to handle "vFile:readlink" packets.
11589 2012-01-20 Pedro Alves <palves@redhat.com>
11590 Ulrich Weigand <ulrich.weigand@linaro.org>
11592 * server.c (handle_v_requests): Only support vAttach and vRun to
11593 start multiple processes when in extended protocol mode.
11595 2012-01-17 Pedro Alves <palves@redhat.com>
11597 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11598 memalign plus mprotect to allocate the scratch buffer.
11600 2012-01-13 Pedro Alves <palves@redhat.com>
11602 * server.c (attach_inferior): Clear `cont_thread'.
11604 2012-01-13 Pedro Alves <palves@redhat.com>
11606 * server.c (main): Avoid infinite loop while detaching/killing
11609 2012-01-09 Doug Evans <dje@google.com>
11611 * server.c (start_inferior): Set last_ptid in --wrapper case.
11613 2012-01-06 Yao Qi <yao@codesourcery.com>
11615 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11617 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11619 2012-01-04 Yao Qi <yao@codesourcery.com>
11621 * tracepoint.c (cmd_qtdp): Print debug message
11622 for static tracepoint.
11624 2012-01-04 Yao Qi <yao@codesourcery.com>
11626 * tracepoint.c (trace_vdebug): Differentiate debug message
11627 between gdbserver and IPA.
11629 2012-01-03 Yao Qi <yao@codesourcery.com>
11631 * tracepoint.c (tracepoint_was_hit): Don't collect for
11634 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11636 * terminal.h: Reformat copyright header.
11638 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11640 * server.c (gdbserver_version): Update copyright year.
11641 * gdbreplay.c (gdbreplay_version): Likewise.
11643 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11645 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11648 2011-12-18 Hui Zhu <teawater@gmail.com>
11649 * linux-low.c (linux_create_inferior): Save return value to ret.
11651 2011-12-18 Hui Zhu <teawater@gmail.com>
11653 * linux-low.c (linux_create_inferior): Save return value to ret.
11655 2011-12-16 Doug Evans <dje@google.com>
11657 * linux-low.c (linux_create_inferior): If stdio connection,
11658 redirect stdin from /dev/null, stdout to stderr.
11659 * remote-utils.c (remote_is_stdio): New static global.
11660 (remote_connection_is_stdio): New function.
11661 (remote_prepare): Handle stdio connection.
11662 (remote_open): Ditto.
11663 (remote_close): Don't close stdin for stdio connections.
11664 (read_prim,write_prim): New functions. Replace all calls to
11665 read/write to these.
11666 * server.c (main): Watch for "-" argument. Move call to
11667 remote_prepare before start_inferior.
11668 * server.h (STDIO_CONNECTION_NAME): New macro.
11669 (remote_connection_is_stdio): Declare.
11671 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11672 in debugging output.
11674 2011-12-15 Yao Qi <yao@codesourcery.com>
11676 * tracepoint.c: Include sys/syscall.h.
11677 (gdb_ust_thread): Remove preprocessor conditional.
11679 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11681 * linux-low.c (linux_detach_one_lwp): Call
11682 the_low_target.prepare_to_resume before detaching.
11684 2011-12-14 Yao Qi <yao@codesourcery.com>
11686 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11689 2011-12-14 Yao Qi <yao@codesourcery.com>
11691 * i386-low.c (i386_low_stopped_data_address): Initialize local
11692 variable `control'.
11694 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11698 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11699 DR_CONTROL unless necessary. Extend comments.
11700 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11701 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11703 2011-12-13 Yao Qi <yao@codesourcery.com>
11705 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11707 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11709 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11711 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11712 Print new debug message for such case.
11714 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11716 Fix overlapping memcpy.
11717 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11718 the read_inferior_memory transfer.
11719 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11720 write_inferior_memory transfer.
11721 (set_fast_tracepoint_jump): New variable buf. Use it for the
11722 read_inferior_memory and write_inferior_memory transfers.
11723 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11724 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11725 Use it for the write_inferior_memory transfer.
11726 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11729 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11731 * linux-low.c (fetch_register, store_register): Make code
11732 consistent, fix formatting.
11734 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11736 * linux-low.c (usr_store_inferior_registers): Factor out code
11737 to handle individual registers into...
11738 (store_register): ... this new function.
11740 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11742 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11743 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11744 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11745 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11746 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11747 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11748 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11749 (srv_xmlfiles): Add new XML files.
11751 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11753 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11754 (init_registers_s390_linux32v1): Add prototype.
11755 (init_registers_s390_linux32v2): Likewise.
11756 (init_registers_s390_linux64v1): Likewise.
11757 (init_registers_s390_linux64v2): Likewise.
11758 (init_registers_s390x_linux64v1): Likewise.
11759 (init_registers_s390x_linux64v2): Likewise.
11760 (s390_num_regs): Increment to 52.
11761 (s390_regmap): Add orig_r2 register.
11762 (s390_num_regs_3264): Increment to 68.
11763 (s390_regmap_3264): Add orig_r2 register.
11764 (s390_collect_ptrace_register): Handle orig_r2 register.
11765 (s390_supply_ptrace_register): Likewise.
11766 (s390_fill_last_break): New function.
11767 (s390_store_last_break): Likewise.
11768 (s390_fill_system_call): New function.
11769 (s390_store_system_call): Likewise.
11770 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11772 (s390_check_regset): New function.
11773 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11774 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11775 Update target_regsets for available register sets.
11777 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11778 Jan Kratochvil <jan.kratochvil@redhat.com>
11780 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11781 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11783 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11784 * linux-low.h (struct process_info_private): New member r_debug.
11785 * server.c (handle_qxfer_libraries): Call
11786 the_target->qxfer_libraries_svr4.
11787 (handle_qxfer_libraries_svr4): New function.
11788 (qxfer_packets): New entry "libraries-svr4".
11789 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11790 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11791 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11792 PACKET_qXfer_libraries_svr4.
11794 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11796 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11797 PSW address/mask between 8-byte and 16-byte formats.
11798 (s390_supply_ptrace_register): Likewise.
11799 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11800 basic addressing mode bit.
11802 2011-11-24 Stan Shebs <stan@codesourcery.com>
11804 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11806 2011-11-17 Stan Shebs <stan@codesourcery.com>
11808 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11809 (tracing_start_time): New global.
11810 (tracing_stop_time): New global.
11811 (tracing_user_name): New global.
11812 (tracing_notes): New global.
11813 (tracing_stop_note): New global.
11814 (cmd_qtstart): Set traceframe_usage, start_time.
11815 (stop_tracing): Set stop_time.
11816 (cmd_qtstatus): Report additional status.
11817 (cmd_qtp): New function.
11818 (handle_tracepoint_query): Call it.
11819 (cmd_qtnotes): New function.
11820 (handle_tracepoint_general_set): Call it.
11821 (get_timestamp): Rename from tsv_get_timestamp.
11823 2011-11-14 Stan Shebs <stan@codesourcery.com>
11824 Kwok Cheung Yeung <kcy@codesourcery.com>
11826 * linux-x86-low.c (small_jump_insn): New.
11827 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11828 trampoline and error message, build a trampoline and issue a small
11829 jump instruction to it.
11830 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11831 trampoline and error message.
11832 (x86_get_min_fast_tracepoint_insn_len): New.
11833 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11834 * linux-low.h (struct linux_target_ops): Add arguments to
11835 install_fast_tracepoint_jump_pad operation, add new operation.
11836 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11838 (linux_get_min_fast_tracepoint_insn_len): New function.
11839 (linux_target_op): Add new operation.
11840 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11841 (gdb_trampoline_buffer_end): Ditto.
11842 (gdb_trampoline_buffer_error): Ditto.
11843 (struct ipa_sym_addresses): Add fields for new IPA variables.
11844 (symbol_list): Add entries for new IPA variables.
11845 (struct tracepoint): Add fields to hold the address range of the
11846 trampoline used by the tracepoint.
11847 (trampoline_buffer_head): New static variable.
11848 (trampoline_buffer_tail): Ditto.
11849 (claim_trampoline_space): New function.
11850 (have_fast_tracepoint_trampoline_buffer): New function.
11851 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11853 (install_fast_tracepoint): Ditto, also add error buffer argument.
11854 (cmd_qtminftpilen): New function.
11855 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11856 (fast_tracepoint_from_trampoline_address): New function.
11857 (fast_tracepoint_collecting): Handle trampoline as part of jump
11859 (set_trampoline_buffer_space): New function.
11860 (initialize_tracepoint): Initialize new IPA variables.
11861 * target.h (struct target_ops): Add arguments to
11862 install_fast_tracepoint_jump_pad operation, add new
11863 get_min_fast_tracepoint_insn_len operation.
11864 (target_get_min_fast_tracepoint_insn_len): New.
11865 (install_fast_tracepoint_jump_pad): Add arguments.
11866 * server.h (IPA_BUFSIZ): Define.
11867 * linux-i386-ipa.c: Include extra header files.
11868 (initialize_fast_tracepoint_trampoline_buffer): New function.
11869 (initialize_low_tracepoint): Call it.
11870 * server.h (set_trampoline_buffer_space): Declare.
11871 (claim_trampoline_space): Ditto.
11872 (have_fast_tracepoint_trampoline_buffer): Ditto.
11874 2011-11-14 Yao Qi <yao@codesourcery.com>
11876 * server.c (handle_query): Handle InstallInTrace for qSupported.
11877 * tracepoint.c (add_tracepoint): Sort list.
11878 (install_tracepoint, download_tracepoint): New.
11879 (cmd_qtdp): Call them to install and download tracepoints.
11880 (sort_tracepoints): Removed.
11881 (cmd_qtstart): Update.
11883 2011-11-14 Yao Qi <yao@codesourcery.com>
11885 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11886 * mem-break.h: Declare.
11887 * tracepoint.c (cmd_qtstart): Move some code to ...
11888 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11890 (download_tracepoints): Move some code to ...
11891 (download_tracepoint_1): ... here. New.
11893 2011-11-08 Yao Qi <yao@codesourcery.com>
11895 * remote-utils.c (relocate_instruction): A comment fix.
11897 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11899 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11900 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11901 dr_status_mirror and dr_control_mirror from debug_reg_state.
11902 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11903 (i386_initial_stuff): Remove use of deleted globals.
11904 (i386_get_thread_context, i386_set_thread_context,
11905 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11906 from debug_reg_state.
11908 2011-11-05 Yao Qi <yao@codesourcery.com>
11910 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11911 address as TPOINT's.
11913 2011-11-02 Stan Shebs <stan@codesourcery.com>
11915 * tracepoint.c (agent_mem_read_string): New function.
11916 (eval_agent_expr): Call it for tracenz.
11917 * server.c (handle_query): Report support for tracenz.
11919 2011-11-02 Yao Qi <yao@codesourcery.com>
11921 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11923 2011-11-02 Yao Qi <yao@codesourcery.com>
11925 * target.h: Fix a typo in comment.
11927 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11929 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11930 clobber the breakpoints' shadows with fast tracepoint jumps.
11931 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11932 * target.c (write_inferior_memory): Also pass MYADDR down to
11935 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11937 * configure.ac: Check support for personality routine.
11938 * configure: Regenerate.
11939 * config.in: Likewise.
11940 * linux-low.c: Include <sys/personality.h>.
11941 Define ADDR_NO_RANDOMIZE if necessary.
11942 (linux_create_inferior): Disable address space randomization when
11943 forking inferior, if requested.
11944 (linux_supports_disable_randomization): New function.
11945 (linux_target_ops): Install it.
11946 * server.h (disable_randomization): Declare.
11947 * server.c (disable_randomization): New global variable.
11948 (handle_general_set): Handle QDisableRandomization.
11949 (handle_query): Likewise for qSupported.
11950 (main): Support --disable-randomization and --no-disable-randomization
11951 command line arguments.
11952 * target.h (struct target_ops): Add supports_disable_randomization.
11953 (target_supports_disable_randomization): New macro.
11955 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11957 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11959 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11960 [!PT_GETDSBT] (target_loadmap): New definition.
11961 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11962 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11963 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11964 and PT_GETDSBT to LINUX_LOADMAP.
11965 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11966 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11968 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11970 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11971 (arm_linux_hwbp_cap): New static variable.
11972 (arm_linux_get_hwbp_cap): Replace by ...
11973 (arm_linux_init_hwbp_cap): ... this new function.
11974 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11975 (arm_linux_get_hw_watchpoint_count): Likewise.
11976 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11977 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11978 (arm_prepare_to_resume): Use perror_with_name instead of error.
11980 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11982 * linux-arm-low.c: Include <signal.h>.
11983 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11984 (struct arm_linux_hwbp_cap): New data type.
11985 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11986 (struct arm_linux_hw_breakpoint): New data type.
11987 (MAX_BPTS, MAX_WPTS): Define.
11988 (struct arch_process_info, struct arch_lwp_info): New data types.
11989 (arm_linux_get_hwbp_cap): New function.
11990 (arm_linux_get_hw_breakpoint_count): Likewise.
11991 (arm_linux_get_hw_watchpoint_count): Likewise.
11992 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11993 (arm_hwbp_control_initialize): Likewise.
11994 (arm_hwbp_control_is_enabled): Likewise.
11995 (arm_hwbp_control_is_initialized): Likewise.
11996 (arm_hwbp_control_disable): Likewise.
11997 (arm_linux_hw_breakpoint_equal): Likewise.
11998 (arm_linux_hw_point_initialize): Likewise.
11999 (struct update_registers_data): New data structure.
12000 (update_registers_callback: New function.
12001 (arm_insert_point): Likewise.
12002 (arm_remove_point): Likewise.
12003 (arm_stopped_by_watchpoint): Likewise.
12004 (arm_stopped_data_address): Likewise.
12005 (arm_new_process): Likewise.
12006 (arm_new_thread): Likewise.
12007 (arm_prepare_to_resume): Likewise.
12008 (the_low_target): Register arm_insert_point, arm_remove_point,
12009 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12010 arm_new_thread, and arm_prepare_to_resume.
12012 2011-09-15 Stan Shebs <stan@codesourcery.com>
12014 * server.h (struct emit_ops): Add compare-goto fields.
12015 * tracepoint.c (gdb_agent_op_sizes): New table.
12016 (emit_eq_goto): New function.
12017 (emit_ne_goto): New function.
12018 (emit_lt_goto): New function.
12019 (emit_le_goto): New function.
12020 (emit_gt_goto): New function.
12021 (emit_ge_goto): New function.
12022 (is_goto_target): New function.
12023 (compile_bytecodes): Recognize special cases of compare-goto
12024 combinations and call specialized emitters for them.
12025 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12026 (amd64_emit_ne_goto): New function.
12027 (amd64_emit_lt_goto): New function.
12028 (amd64_emit_le_goto): New function.
12029 (amd64_emit_gt_goto): New function.
12030 (amd64_emit_ge_goto): New function.
12031 (amd64_emit_ops): Add the new functions.
12032 (i386_emit_eq_goto): New function.
12033 (i386_emit_ne_goto): New function.
12034 (i386_emit_lt_goto): New function.
12035 (i386_emit_le_goto): New function.
12036 (i386_emit_gt_goto): New function.
12037 (i386_emit_ge_goto): New function.
12038 (i386_emit_ops): Add the new functions.
12040 2011-09-08 Stan Shebs <stan@codesourcery.com>
12042 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12043 (i386_emit_epilogue): Restore %ebx.
12045 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12047 * server.c (step_thread): Remove definition.
12048 (process_serial_event): Don't handle Hs.
12049 * server.h (step_thread): Remove declaration.
12050 * target.c (set_desired_inferior): Remove use of step_thread.
12052 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12054 * linux-low.c: Include linux-procfs.h.
12055 (linux_attach_lwp_1): Update comments.
12056 (linux_attach): Scan for existing threads when attaching to a
12057 process that is the tgid.
12058 * Makefile.in: Update dependencies.
12060 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12062 * configure.srv: Add linux-procfs.o dependencies.
12064 2011-08-14 Yao Qi <yao@codesourcery.com>
12066 * target.h (struct target_ops): Fix indent.
12067 * win32-low.c (win32_target_ops): Fix comment.
12069 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12070 Yao Qi <yao@codesourcery.com>
12072 * Makefile.in (clean): Remove tic6x-*.c files.
12073 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12074 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12075 (tic6x-c64xp-linux.c): Likewise.
12076 * configure.srv: Add support for tic6x-*-uclinux.
12077 * linux-tic6x-low.c: New.
12078 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12080 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12081 Yao Qi <yao@codesourcery.com>
12083 * target.h (struct target_ops): Add read_loadmap.
12084 * linux-low.c (struct target_loadseg): New type.
12085 (struct target_loadmap): New type.
12086 (linux_read_loadmap): New function.
12087 (linux_target_ops): Add linux_read_loadmap.
12088 * server.c (handle_query): Support qXfer:fdpic:read packet.
12089 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12092 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12094 * win32-low.c: Include <stdint.h>.
12096 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12098 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12099 to the inferior here.
12100 (i386_remove_aligned_watchpoint): Ditto.
12101 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12102 fit part of the watchpoint in the debug registers.
12103 (i386_update_inferior_debug_regs): New.
12104 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12105 registers, and only update the inferior on success.
12106 (i386_low_remove_watchpoint): Ditto.
12108 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12110 * linux-low.c (compare_ints, unique, list_threads, show_process,
12111 linux_core_of_thread): Delete.
12112 (linux_target_ops): Change linux_core_of_thread to
12113 linux_common_core_of_thread.
12114 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12115 * utils.c (malloc_failure): Change type of argument.
12116 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12117 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12118 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12119 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12120 (IPA_OBJS): Add common-utils-ipa.o.
12121 (ptid_h, linux_osdata_h): New macros.
12122 (server_h): Add common/common-utils.h, common/xml-utils.h,
12123 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12125 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12126 ptid.o, buffer.o): New rules.
12127 (linux-low.o): Add common/linux-osdata.h as a dependency.
12128 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12129 * configure.ac: Add AC_HEADER_DIRENT check.
12130 * config.in: Regenerate.
12131 * configure: Regenerate.
12132 * remote-utils.c (xml_escape_text): Delete.
12133 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12134 buffer_xml_printf): Move to common/buffer.c.
12135 * server.c (main): Remove call to initialize_inferiors.
12136 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12137 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12138 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12139 internal_error, gdb_assert, gdb_assert_fail): Delete.
12140 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12141 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12143 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12144 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12145 initialize_inferiors): Delete.
12147 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12149 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12152 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12154 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12156 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12158 2011-05-26 Yao Qi <yao@codesourcery.com>
12160 * Makefile.in (thread-db.o): Track dependence to
12161 common/gdb_thread_db.h.
12162 * thread-db.c: include gdb_thread_db.h from right place.
12164 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12166 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12167 __FILE__ and __LINE__ to internal_error.
12169 2011-05-13 Doug Evans <dje@google.com>
12171 * thread-db.c (try_thread_db_load_from_sdir): New function.
12172 (try_thread_db_load_from_dir): New function.
12173 (thread_db_load_search): Handle $sdir, ignore $pdir.
12174 Remove trying of system directories if search of
12175 libthread-db-search-path fails, that is now done via $sdir.
12177 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12179 * server.c (handle_query): Add EnableDisableTracepoints to the list
12180 of supported features.
12181 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12183 (cmd_qtenable_disable): New.
12184 (cmd_qtstart): Install tracepoints even if disabled.
12185 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12186 receiving a QTEnable or QTDisable packet.
12187 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12188 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12190 (gdb_probe): Skip data collection if static tracepoint is disabled.
12192 2011-05-10 Doug Evans <dje@google.com>
12194 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12196 2011-05-04 Doug Evans <dje@google.com>
12198 * linux-low.c (linux_join): Skip process lookup.
12199 * spu-low.c (spu_join): Ditto.
12200 * server.c (join_inferiors_callback): Delete.
12201 (process_serial_event): For 'D' packet (detach) call join_inferior
12204 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12206 * README: Don't mention xscale*-*-linux*.
12207 * configure.srv (xscale*-*-linux*): Don't handle target.
12209 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12211 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12213 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12214 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12215 (i386_emit_void_call_2): Likewise.
12217 2011-04-26 Yao Qi <yao@codesourcery.com>
12219 * linux-low.c: Move common macros to linux-ptrace.h.
12220 Include linux-ptrace.h.
12221 * Makefile.in (linux_ptrace_h): New.
12222 (linux-low.o): Depends on linux-ptrace.h.
12224 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12226 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12227 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12228 (remote_prepare): New function with most of the TCP code from ...
12229 (remote_open): ... here. Detect PORT here unconditionally. Move also
12230 setting transport_is_reliable.
12231 * server.c (run_once): New variable.
12232 (gdbserver_usage): Document it.
12233 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12234 the first run if RUN_ONCE.
12235 * server.h (run_once, remote_prepare): New declarations.
12237 2011-04-19 Tom Tromey <tromey@redhat.com>
12239 * win32-low.c (handle_load_dll): Remove duplicate "the".
12241 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12243 Remove support for old Cygwin 1.5 versions.
12244 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12245 function to avoid warning.
12246 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12249 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12251 * gdbserver/server.h (Macro _): Define it if not available.
12253 2011-03-14 Michael Snyder <msnyder@vmware.com>
12255 * hostio.c (handle_close): Remove unnecessary null test.
12257 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12259 * Makefile.in (maintainer-clean realclean distclean): Remove
12260 "make ... subdir_do" command.
12262 2011-03-10 Michael Snyder <msnyder@vmware.com>
12264 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12266 * server.c (handle_v_run): Free alloced buffer on early return.
12268 2011-03-09 Yao Qi <yao@codesourcery.com>
12271 2011-03-04 Yao Qi <yao@codesourcery.com>
12273 * Makefile.in: Remove GNU make feature --directory.
12275 2011-03-05 Yao Qi <yao@codesourcery.com>
12277 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12278 (subdir_do): New make target. Copied from gdb/Makefile.
12279 (maintainer-clean, realclean, distclean, clean): Call corresponding
12280 make targets in common/Makefile.
12282 2011-02-11 Yao Qi <yao@codesourcery.com>
12284 * configure.ac: Call AC_PROG_RANLIB.
12285 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12286 * configure: Regenerate.
12288 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12290 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12292 2011-03-06 Yao Qi <yao@codesourcery.com>
12294 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12296 2011-03-05 Yao Qi <yao@codesourcery.com>
12298 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12299 (subdir_do): New make target. Copied from gdb/Makefile.
12300 (maintainer-clean, realclean, distclean, clean): Call corresponding
12301 make targets in common/Makefile.
12303 2011-03-04 Yao Qi <yao@codesourcery.com>
12305 * Makefile.in: Remove GNU make feature --directory.
12307 2011-03-04 Michael Snyder <msnyder@vmware.com>
12309 * server.c (queue_stop_reply): Call xmalloc not malloc.
12311 2011-03-02 Michael Snyder <msnyder@vmware.com>
12313 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12315 2011-02-28 Michael Snyder <msnyder@vmware.com>
12317 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12318 (cmd_qtframe): Ditto.
12319 (cmd_qtbuffer): Ditto.
12320 (cmd_bigqtbuffer): Ditto.
12322 * utils.c (decimal2str): Initialize 'width' to nine, then
12323 don't mess with it.
12325 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12327 * hostio.c (require_data): Free *data, not data.
12329 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12331 * hostio.c (require_data): Use free, not xfree.
12333 2011-02-27 Michael Snyder <msnyder@vmware.com>
12335 * server.c (handle_query): Discard unused value.
12337 * hostio.c (require_data): Free malloc memory before returning
12340 2011-02-26 Michael Snyder <msnyder@vmware.com>
12342 * linux-low.c (list_threads): Call closedir for dirent.
12344 2011-02-27 Michael Snyder <msnyder@vmware.com>
12346 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12347 a case statement falls through.
12349 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12351 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12354 2011-02-26 Michael Snyder <msnyder@vmware.com>
12356 * utils.c (decimal2str): Eliminate dead code and dead param.
12357 (pulongest): Drop dead param from call to decimal2str.
12360 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12362 Revert the following patch (not approved yet):
12363 2011-02-21 Hui Zhu <teawater@gmail.com>
12364 * tracepoint.c (tp_printf): New function.
12365 (eval_agent_expr): Handle gdb_agent_op_printf.
12367 2011-02-21 Hui Zhu <teawater@gmail.com>
12369 * tracepoint.c (tp_printf): New function.
12370 (eval_agent_expr): Handle gdb_agent_op_printf.
12372 2011-02-18 Tom Tromey <tromey@redhat.com>
12374 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12375 (tracepoint.o): Likewise.
12376 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12377 (gdb_agent_op_names): Likewise.
12379 2011-02-18 Tom Tromey <tromey@redhat.com>
12381 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12382 gdb_agent_op_rot>: New constants.
12383 (gdb_agent_op_names): Add pick and roll.
12384 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12387 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12389 * aclocal.m4: Regenerated with aclocal-1.11.1.
12391 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12393 * server.c (handle_qxfer_traceframe_info): New.
12394 (qxfer_packets): Register "traceframe-info".
12395 (handle_query): Report support for qXfer:traceframe-info:read+.
12396 * tracepoint.c (match_blocktype): New.
12397 (traceframe_find_block_type): Rename to ...
12398 (traceframe_walk_blocks): ... this. Add callback filter argument,
12400 (traceframe_find_block_type): New, reimplemented on top of
12401 traceframe_walk_blocks.
12402 (build_traceframe_info_xml): New.
12403 (traceframe_read_info): New.
12404 * server.h (traceframe_read_info): Declare.
12406 2011-02-11 Yao Qi <yao@codesourcery.com>
12408 * configure.ac: Call AC_PROG_RANLIB.
12409 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12410 * configure: Regenerate.
12412 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12414 * server.c (gdb_read_memory): Change return semantics to allow
12416 (handle_search_memory_1): Adjust.
12417 (process_serial_event) <'m' packet>: Handle partial transfers.
12418 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12420 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12422 * regcache.c (init_register_cache): Initialize
12423 regcache->register_status.
12424 (free_register_cache): Release regcache->register_status.
12425 (regcache_cpy): Copy register_status.
12426 (registers_to_string): Print 'x's for unavailable registers.
12427 (supply_register): Mark the register's status valid or
12428 unavailable, depending on whether a buffer was passed in or not.
12429 (supply_register_zeroed): New.
12430 (supply_regblock): Mark the registers' status valid or
12431 unavailable, depending on whether a buffer was passed in or not.
12432 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12433 (struct regcache): New `register_status' field.
12434 (supply_register_zeroed): Declare.
12435 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12436 supply_register_zeroed, rather than passing a NULL buffer to
12438 * tracepoint.c (fetch_traceframe_registers): Update comment.
12440 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12442 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12445 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12447 * server.h (decode_xfer_write): Change prototype.
12448 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12449 and don't extract the annex here.
12450 * server.c (decode_xfer_read): Remove `annex' parameter,
12451 and don't extract the annex here.
12452 (decode_xfer): New.
12453 (struct qxfer): New.
12454 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12455 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12456 (handle_qxfer_statictrace): New functions, abstracted out from
12457 handle_query, and made to use the struct qxfer interface.
12458 (handle_threads_qxfer_proper): Rename to ...
12459 (handle_qxfer_threads_proper): ... this.
12460 (handle_threads_qxfer): Rename to ...
12461 (handle_qxfer_threads): ... this. Adjust.
12462 (qxfer_packets): New array.
12463 (handle_qxfer): New function.
12464 (handle_query): Use handle_qxfer.
12466 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12468 * gdbreplay.c: Shorten lines of >= 80 columns.
12469 * linux-low.c: Ditto.
12470 * linux-ppc-low.c: Ditto.
12471 * linux-s390-low.c: Ditto.
12472 * linux-sparc-low.c: Ditto.
12473 * linux-x86-low.c: Ditto.
12474 * linux-xtensa-low.c: Ditto.
12475 * mem-break.c: Ditto.
12476 * nto-low.c: Ditto.
12477 * regcache.h: Ditto.
12478 * remote-utils.c: Ditto.
12481 * thread-db.c: Ditto.
12482 * tracepoint.c: Ditto.
12484 * win32-low.h: Ditto.
12486 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12488 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12491 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12493 * server.c (gdbserver_version): Update copyright year in version
12495 * gdbreplay.c (gdbreplay_version): Ditto.
12497 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12499 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12500 * linux-bfin-low.c: New file.
12501 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12502 PT_DATA_ADDR for BFIN targets.
12503 * Makefile.in (SFILES): Add linux-bfin-low.c.
12504 (clean): Remove reg-bfin.c.
12505 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12506 * README: Mention supported Blackfin targets.
12508 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12510 * .gitignore: New file.
12512 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12514 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12516 2010-10-22 Jie Zhang <jie@codesourcery.com>
12518 * Makefile.in: Add FLAGS_TO_PASS variable.
12519 (install): Remove dependency of install-only and recursively
12520 invoke make for install-only.
12522 2010-10-04 Doug Evans <dje@google.com>
12524 * Makefile.in (uninstall): Use $(DESTDIR).
12526 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12530 * linux-x86-low.c (compat_siginfo_from_siginfo)
12531 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12532 si_code is < 0. Check for si_code == SI_TIMER before checking for
12535 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12537 * lynx-i386-low.c: New file.
12538 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12540 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12542 * lynx-low.c (ptrace_request_to_str): Remove handling for
12543 request values that have been removed in LynxOS 5.x.
12545 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12547 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12550 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12552 * configure.ac: Add --enable-inprocess-agent option.
12553 * configure: Rebuilt.
12555 2010-09-06 Yao Qi <yao@codesourcery.com>
12557 * linux-low.c (linux_kill): Remove unused variable.
12558 (linux_stabilize_threads): Likewise.
12559 * server.c (start_inferior): Likewise.
12560 (queue_stop_reply_callback): Likewise.
12561 * tracepoint.c (do_action_at_tracepoint): Likewise.
12563 2010-09-06 Yao Qi <yao@codesourcery.com>
12565 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12568 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12570 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12572 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12574 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12577 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12579 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12580 gdbserver/lynx-ppc-low.c: New files.
12581 * Makefile.in (lynx_low_h): New variable.
12582 (lynx-low.o, lynx-ppc-low.o): New rules.
12583 * configure.ac: On LynxOS, link with -lnetinet.
12584 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12585 * configure: regenerate.
12587 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12589 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12590 * configure.ac: Add check for vasprintf and vsnprintf.
12591 * configure, config.in: Regenerate.
12592 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12594 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12596 * gdbreplay.c: Move include of alloca.h up, next to include of
12598 * server.h: Add include of malloc.h.
12599 * mem-break.c: Remove include of malloc.h.
12600 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12602 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12604 * Makefile.in (memmem.o): Build with -Wno-error.
12606 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12608 * utils.c (xsnprintf): Make non-static.
12609 * server.h: Add xsnprintf declaration.
12610 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12611 replace calls to snprintf by calls to xsnprintf throughout.
12613 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12615 * configure.ac: Add configure check for alloca.
12616 * configure, config.in: Regenerate.
12617 * server.h: Include alloca.h if it exists.
12618 * gdbreplay.c: Include alloca.h if it exists.
12620 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12622 * linux-low.c (__SIGRTMIN): Define if not already defined.
12623 (linux_create_inferior): Check for __ANDROID__ rather than
12625 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12626 are already deferred.
12627 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12628 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12629 stopped and already has a pending signal to report.
12630 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12631 a pending signal to report or is moving out of a jump pad.
12632 (linux_init_signals): Check for __ANDROID__ rather than
12635 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12637 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12638 debug_threads check. Avoid a linear search when not doing debug
12641 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12643 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12644 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12645 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12646 (process_event): Change local fd's type to gdb_fildes_t.
12647 (create_file_handler): Adjust prototype.
12648 (delete_file_handler): Adjust prototype.
12649 (handle_file_event): Adjust prototype. Use pfildes.
12650 (create_file_event): Adjsut prototype.
12651 * remote-utils.c (remote_desc, listen_desc): Change type to
12653 * server.h: New gdb_fildes_t typedef.
12654 [USE_WIN32API]: Include winsock2.h.
12655 (delete_file_handler, add_file_handler): Adjust prototypes.
12656 (pfildes): Declare.
12657 * utils.c (pfildes): New.
12659 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12661 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12662 * configure: Regenerate.
12664 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12666 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12667 (linux_done_accessing_memory): ... this.
12668 (linux_target_ops): Adjust.
12669 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12670 * nto-low.c (nto_target_ops): Adjust comment.
12671 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12672 * spu-low.c (spu_target_ops): Adjust comment.
12673 * target.h (target_ops): Rename unprepare_to_access_memory field
12674 to done_accessing_memory.
12675 (unprepare_to_access_memory): Rename to ...
12676 (done_accessing_memory): ... this.
12678 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12680 * linux-low.c (linux_prepare_to_access_memory): New.
12681 (linux_unprepare_to_access_memory): New.
12682 (linux_target_ops): Install them.
12683 * server.c (read_memory): Rename to ...
12684 (gdb_read_memory): ... this. Use
12685 prepare_to_access_memory/prepare_to_access_memory.
12686 (write_memory): Rename to ...
12687 (gdb_write_memory): ... this. Use
12688 prepare_to_access_memory/prepare_to_access_memory.
12689 (handle_search_memory_1): Adjust.
12690 (process_serial_event): Adjust.
12691 * target.h (struct target_ops): New fields
12692 prepare_to_access_memory and unprepare_to_access_memory.
12693 (prepare_to_access_memory, unprepare_to_access_memory): New.
12694 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12695 prepare_to_access_memory/prepare_to_access_memory.
12696 * nto-low.c (nto_target_ops): Adjust.
12697 * spu-low.c (spu_target_ops): Adjust.
12698 * win32-low.c (win32_target_ops): Adjust.
12700 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12702 * Makefile.in (WARN_CFLAGS): Get it from configure.
12703 (WERROR_CFLAGS): New.
12704 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12705 * configure.ac: Introduce --enable-werror, which adds -Werror to
12706 the compiler command line. Enabled by default. Disable with
12707 --disable-werror. Add -Wdeclaration-after-statement
12708 Wpointer-arith and -Wformat-nonliteral to warning flags.
12709 * configure: Regenerate.
12711 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12713 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12715 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12717 * gdbreplay.c (remote_error): New.
12719 (expect): Use gdbchar. Check for error reading from GDB.
12720 Clarify sync error output.
12721 (play): Check for errors writing to GDB.
12722 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12723 * remote-utils.c (getpkt): Check for errors writing to the remote
12726 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12728 * linux-low.c (linux_wait_1): Move non-debugging code out of
12729 `debug_threads' control.
12731 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12733 * linux-low.c (linux_wait_1): Don't set last_status here.
12734 * server.c (push_event, queue_stop_reply_callback): Assert we're
12735 not pushing a TARGET_WAITKIND_IGNORE event.
12736 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12737 (myresume, handle_target_event): Set the thread's last_resume_kind
12738 and last_status from the target returned status.
12740 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12744 * linux-x86-low.c (update_debug_registers_callback): New.
12745 (i386_dr_low_set_addr): Use it.
12746 (i386_dr_low_get_addr): New.
12747 (i386_dr_low_set_control): Use update_debug_registers_callback.
12748 (i386_dr_low_get_control): New.
12749 (i386_dr_low_get_status): Adjust.
12750 * linux-low.c (linux_stop_lwp): New.
12751 * linux-low.h (linux_stop_lwp): Declare.
12753 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12754 argument instead of a i386_debug_reg_state.
12755 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12756 a i386_debug_reg_state.
12757 (i386_insert_aligned_watchpoint): Adjust.
12758 (i386_remove_aligned_watchpoint): Adjust.
12759 (i386_low_stopped_data_address): Read the debug registers from the
12760 inferior instead of from the mirrors.
12761 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12762 (i386_dr_low_get_addr): Declare.
12763 (i386_dr_low_get_control): Declare.
12764 (i386_dr_low_get_status): Change prototype.
12766 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12767 (i386_dr_low_get_addr): New.
12768 (i386_dr_low_get_control): New.
12769 (i386_dr_low_get_status): Adjust prototype. Return
12771 (i386_initial_stuff): Clear dr_status_mirror and
12773 (i386_get_thread_context): Adjust.
12774 (i386_set_thread_context): Adjust.
12775 (i386_thread_added): Adjust.
12777 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12779 * linux-low.h (linux_thread_area): Delete declaration.
12781 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12783 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12784 after its termination.
12786 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12788 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12789 (gdb_wants_all_stopped): Delete.
12790 (linux_wait_1): Don't call them.
12791 * server.c (handle_v_cont): Tag all threads as want-stopped.
12792 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12793 stopped as "client-wants-stopped".
12795 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12797 * Makefile.in (signals_h): New.
12798 (server_h): Depend on it.
12799 (server.o): Don't depend on $(signals_def).
12800 (signals.o): Depend on $(signals_def).
12802 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12804 * Makefile.in (signals_def): New.
12805 (server_h): Append include/gdb/signals.h and signals_def.
12806 (server.o): Append signals_def.
12808 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12810 * server.c (handle_target_event): Use target_signal_to_host for
12811 resume_info.sig initialization.
12812 * target.h (struct thread_resume) <sig>: New comment.
12814 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12816 * server.c (handle_query): strcpy() the returned string from paddress()
12817 instead of sprintf().
12818 * utils.c (paddress): Return phex_nz().
12820 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12822 * server.c (handle_v_cont): Call mourn_inferior if process
12824 (myresume): Likewise.
12826 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12828 Static tracepoints, and integration with UST.
12830 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12831 * mem-break.c (uninsert_all_breakpoints)
12832 (reinsert_all_breakpoints): New.
12833 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12834 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12835 (gdb_agent_ust_loaded, helper_thread_id)
12836 (gdb_agent_helper_thread_id): New macros.
12837 (struct ipa_sym_addresses): Add addr_ust_loaded,
12838 addr_helper_thread_id, addr_cmd_buf.
12839 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12840 (in_process_agent_loaded_ust): New.
12841 (write_e_ust_not_loaded): New.
12842 (maybe_write_ipa_ust_not_loaded): New.
12843 (struct collect_static_trace_data_action): New.
12844 (enum tracepoint_type) <static_tracepoint>: New.
12845 (struct tracepoint) <handle>: Mention static tracepoints.
12846 (struct static_tracepoint_ctx): New.
12847 (CMD_BUF_SIZE): New.
12848 (add_tracepoint_action): Handle static tracepoint actions.
12849 (unprobe_marker_at): New.
12850 (clear_installed_tracepoints): Handle static tracepoints.
12851 (cmd_qtdp): Handle static tracepoints.
12852 (probe_marker_at): New.
12853 (cmd_qtstart): Handle static tracepoints.
12854 (response_tracepoint): Handle static tracepoints.
12855 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12856 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12857 (get_context_regcache): Handle static tracepoints.
12858 (do_action_at_tracepoint): Handle static tracepoint actions.
12859 (traceframe_find_block_type): Handle static trace data blocks.
12860 (traceframe_read_sdata): New.
12861 (download_tracepoints): Download static tracepoint actions.
12862 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12863 (GDB_PROBE_NAME): New.
12865 (GET_UST_SYM): New.
12868 (ust_marker_to_static_tracepoint): New.
12870 (collect_ust_data_at_tracepoint): New.
12871 (gdb_ust_probe): New.
12872 (UNIX_PATH_MAX, SOCK_DIR): New.
12873 (gdb_ust_connect_sync_socket): New.
12874 (resume_thread, stop_thread): New.
12875 (run_inferior_command): New.
12876 (init_named_socket): New.
12877 (gdb_ust_socket_init): New.
12878 (cstr_to_hexstr): New.
12880 (first_marker, next_marker): New.
12881 (response_ust_marker): New.
12882 (cmd_qtfstm, cmd_qtsstm): New.
12883 (unprobe_marker_at, probe_marker_at): New.
12884 (cmd_qtstmat, gdb_ust_thread): New.
12885 (gdb_ust_init): New.
12886 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12887 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12888 (ST_REGENTRY): New.
12889 (x86_64_st_collect_regmap): New.
12890 (X86_64_NUM_ST_COLLECT_GREGS): New.
12891 (AMD64_RIP_REGNUM): New.
12892 (supply_static_tracepoint_registers): New.
12893 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12894 (ST_REGENTRY): New.
12895 (i386_st_collect_regmap): New.
12896 (i386_NUM_ST_COLLECT_GREGS): New.
12897 (supply_static_tracepoint_registers): New.
12898 * server.c (handle_query): Handle qXfer:statictrace:read.
12899 <qSupported>: Report support for StaticTracepoints, and
12900 qXfer:statictrace:read features.
12901 * server.h (traceframe_read_sdata)
12902 (supply_static_tracepoint_registers): Declare.
12903 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12904 (unpack_varlen_hex): Include in IPA build.
12905 * Makefile.in (ustlibs, ustinc): New.
12906 (IPA_OBJS): Add remote-utils-ipa.o.
12907 ($(IPA_LIB)): Link -ldl and -lpthread.
12909 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12910 * config.in, configure: Regenerate.
12912 2010-06-20 Ian Lance Taylor <iant@google.com>
12913 Pedro Alves <pedro@codesourcery.com>
12915 * linux-x86-low.c (always_true): Delete.
12916 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12917 trying to fool the compiler with always_true.
12919 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12921 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12922 conditions in gdbserver.
12924 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12926 * spu-low.c (spu_read_memory): Wrap around local store limit.
12927 (spu_write_memory): Likewise.
12929 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12931 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12932 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12934 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12936 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12937 uses with LONGEST uses.
12939 2010-06-14 Stan Shebs <stan@codesourcery.com>
12940 Pedro Alves <pedro@codesourcery.com>
12944 * linux-x86-low.c: Include limits.h.
12946 (always_true): New.
12949 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12950 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12951 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12952 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12953 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12954 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12955 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12956 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12957 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12958 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12959 (amd64_emit_void_call_2): New.
12960 (amd64_emit_ops): New.
12961 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12962 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12963 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12964 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12965 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12966 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12967 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12968 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12969 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12970 (i386_emit_stack_adjust, i386_emit_int_call_1)
12971 (i386_emit_void_call_2): New.
12972 (i386_emit_ops): New.
12973 (x86_emit_ops): New.
12974 (the_low_target): Install x86_emit_ops.
12975 * server.h (struct emit_ops): New.
12976 (get_raw_reg_func_addr): Declare.
12977 (current_insn_ptr, emit_error): Declare.
12978 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12979 (set_trace_state_variable_value): New defines.
12980 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12981 addr_get_trace_state_variable_value and
12982 addr_set_trace_state_variable_value.
12983 (symbol_list): New fields for get_raw_reg,
12984 get_trace_state_variable_value and set_trace_state_variable_value.
12985 (condfn): New typedef.
12986 (struct tracepoint): New field `compiled_cond'.
12987 (do_action_at_tracepoint): Clear compiled_cond.
12988 (get_trace_state_variable_value, set_trace_state_variable_value):
12990 (condition_true_at_tracepoint): If there's a compiled condition,
12992 (current_insn_ptr, emit_error): New globals.
12993 (struct bytecode_address): New.
12994 (get_raw_reg_func_addr): New.
12995 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12996 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12997 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12998 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12999 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13000 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13001 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13002 (compile_tracepoint_condition, compile_bytecodes): New.
13003 * target.h (emit_ops): Forward declare.
13004 (struct target_ops): New field emit_ops.
13005 (target_emit_ops): New.
13006 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13007 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13008 * linux-low.c (linux_emit_ops): New.
13009 (linux_target_ops): Install it.
13010 * linux-low.h (struct linux_target_ops): New field emit_ops.
13012 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13014 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13015 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13017 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13018 Stan Shebs <stan@codesourcery.com>
13020 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13021 (all): Depend on $(extra_libraries).
13022 (install-only): Install the IPA.
13023 (IPA_OBJS, IPA_LIB): New.
13024 (clean): Remove the IPA lib.
13025 (IPAGENT_CFLAGS): New.
13026 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13027 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13028 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13029 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13030 * configure.ac: Check for atomic builtins support in the compiler.
13031 (IPA_DEPFILES, extra_libraries): Define.
13032 * configure.srv (ipa_obj): Add description.
13033 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13034 (i[34567]86-*-linux*): Set ipa_obj.
13035 (x86_64-*-linux*): Set ipa_obj.
13036 * linux-low.c (stabilizing_threads): New.
13037 (supports_fast_tracepoints): New.
13038 (linux_detach): Stabilize threads before detaching.
13039 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13040 the lwp is either not stabilizing, or is moving out of a jump pad.
13041 (linux_fast_tracepoint_collecting): New.
13042 (maybe_move_out_of_jump_pad): New.
13043 (enqueue_one_deferred_signal): New.
13044 (dequeue_one_deferred_signal): New.
13045 (linux_wait_for_event_1): If moving out of a jump pad, defer
13046 pending signals to later.
13047 (linux_stabilize_threads): New.
13048 (linux_wait_1): Check if threads need moving out of jump pads, and
13050 (stuck_in_jump_pad_callback): New.
13051 (move_out_of_jump_pad_callback): New.
13052 (lwp_running): New.
13053 (linux_resume_one_lwp): Handle moving out of jump pads.
13054 (linux_set_resume_request): Dequeue deferred signals.
13055 (need_step_over_p): Also step over fast tracepoint jumps.
13056 (start_step_over): Also uninsert fast tracepoint jumps.
13057 (finish_step_over): Also reinsert fast tracepoint jumps.
13058 (linux_install_fast_tracepoint_jump): New.
13059 (linux_target_ops): Install linux_stabilize_threads and
13060 linux_install_fast_tracepoint_jump_pad.
13061 * linux-low.h (linux_target_ops) <get_thread_area,
13062 install_fast_tracepoint_jump_pad>: New fields.
13063 (struct lwp_info) <collecting_fast_tracepoint,
13064 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13065 (linux_get_thread_area): Declare.
13066 * linux-x86-low.c (jump_insn): New.
13067 (x86_get_thread_area): New.
13068 (append_insns): New.
13069 (push_opcode): New.
13070 (amd64_install_fast_tracepoint_jump_pad): New.
13071 (i386_install_fast_tracepoint_jump_pad): New.
13072 (x86_install_fast_tracepoint_jump_pad): New.
13073 (the_low_target): Install x86_get_thread_area and
13074 x86_install_fast_tracepoint_jump_pad.
13075 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13076 (struct fast_tracepoint_jump): New.
13077 (fast_tracepoint_jump_insn): New.
13078 (fast_tracepoint_jump_shadow): New.
13079 (find_fast_tracepoint_jump_at): New.
13080 (fast_tracepoint_jump_here): New.
13081 (delete_fast_tracepoint_jump): New.
13082 (set_fast_tracepoint_jump): New.
13083 (uninsert_fast_tracepoint_jumps_at): New.
13084 (reinsert_fast_tracepoint_jumps_at): New.
13085 (set_breakpoint_at): Use write_inferior_memory.
13086 (uninsert_raw_breakpoint): Use write_inferior_memory.
13087 (check_mem_read): Mask out fast tracepoint jumps.
13088 (check_mem_write): Mask out fast tracepoint jumps.
13089 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13090 (set_fast_tracepoint_jump): Declare.
13091 (delete_fast_tracepoint_jump)
13092 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13093 (reinsert_fast_tracepoint_jumps_at): Declare.
13094 * regcache.c: Don't compile many functions when building the
13095 in-process agent library.
13096 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13097 the register buffer in the heap.
13098 (free_register_cache): If the register buffer isn't owned by the
13099 regcache, don't free it.
13100 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13101 pre-existing register caches.
13102 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13104 (convert_ascii_to_int): : Constify `from' parameter type.
13105 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13106 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13107 the needed buffer in-place.
13108 (relocate_instruction): New.
13109 * server.c (handle_query) <qSymbols>: If the target supports
13110 tracepoints, give it a chance of looking up symbols. Report
13111 support for fast tracepoints.
13112 (handle_status): Stabilize threads.
13113 (process_serial_event): Adjust.
13114 * server.h (struct fast_tracepoint_jump): Forward declare.
13115 (struct process_info) <fast_tracepoint_jumps>: New field.
13116 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13117 (decode_X_packet, decode_M_packet): Adjust.
13118 (relocate_instruction): Declare.
13119 (in_process_agent_loaded): Declare.
13120 (tracepoint_look_up_symbols): Declare.
13121 (struct fast_tpoint_collect_status): Declare.
13122 (fast_tracepoint_collecting): Declare.
13123 (force_unlock_trace_buffer): Declare.
13124 (handle_tracepoint_bkpts): Declare.
13125 (initialize_low_tracepoint)
13126 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13127 * target.h (struct target_ops) <stabilize_threads,
13128 install_fast_tracepoint_jump_pad>: New fields.
13129 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13130 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13131 [HAVE_STDINT_H]: Include stdint.h.
13132 (trace_debug_1): Rename to ...
13133 (trace_vdebug): ... this.
13134 (trace_debug): Rename to ...
13135 (trace_debug_1): ... this. Add `level' parameter.
13136 (trace_debug): New.
13137 (ATTR_USED, ATTR_NOINLINE): New.
13138 (IP_AGENT_EXPORT): New.
13139 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13140 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13141 (about_to_request_buffer_space, trace_buffer_is_full)
13142 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13143 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13144 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13145 (traceframe_write_count, traceframes_created)
13146 (trace_state_variables)
13147 New renaming defines.
13148 (struct ipa_sym_addresses): New.
13149 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13150 (symbol_list): New.
13151 (ipa_sym_addrs): New.
13152 (all_tracepoint_symbols_looked_up): New.
13153 (in_process_agent_loaded): New.
13154 (write_e_ipa_not_loaded): New.
13155 (maybe_write_ipa_not_loaded): New.
13156 (tracepoint_look_up_symbols): New.
13157 (debug_threads) [IN_PROCESS_AGENT]: New.
13158 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13159 (UNKNOWN_SIDE_EFFECTS): New.
13160 (stop_tracing): New.
13161 (flush_trace_buffer): New.
13162 (stop_tracing_bkpt): New.
13163 (flush_trace_buffer_bkpt): New.
13164 (read_inferior_integer): New.
13165 (read_inferior_uinteger): New.
13166 (read_inferior_data_pointer): New.
13167 (write_inferior_data_pointer): New.
13168 (write_inferior_integer): New.
13169 (write_inferior_uinteger): New.
13170 (struct collect_static_trace_data_action): Delete.
13171 (enum tracepoint_type): New.
13172 (struct tracepoint) <type>: New field `type'.
13173 <actions_str, step_actions, step_actions_str>: Only include in
13175 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13176 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13177 (tracepoints): Use IP_AGENT_EXPORT.
13178 (last_tracepoint): Don't include in the IPA.
13179 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13180 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13181 (alloced_trace_state_variables): New.
13182 (trace_state_variables): Use IP_AGENT_EXPORT.
13183 (traceframe_t): Delete unused variable.
13184 (circular_trace_buffer): Don't include in the IPA.
13185 (trace_buffer_start): Delete.
13186 (struct trace_buffer_control): New.
13187 (trace_buffer_free): Delete.
13188 (struct ipa_trace_buffer_control): New.
13189 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13190 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13192 (trace_buffer_ctrl): New.
13193 (TRACE_BUFFER_CTRL_CURR): New.
13194 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13195 Reimplement as macros.
13196 (trace_buffer_wrap): Delete.
13197 (traceframe_write_count, traceframe_read_count)
13198 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13199 (struct tracepoint_hit_ctx) <type>: New field.
13200 (struct fast_tracepoint_ctx): New.
13201 (memory_barrier): New.
13203 (record_tracepoint_error): Update atomically in the IPA.
13204 (clear_inferior_trace_buffer): New.
13205 (about_to_request_buffer_space): New.
13206 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13207 updating the same buffer.
13208 (add_tracepoint): Default the tracepoint's type to trap
13209 tracepoint, and orig_size to -1.
13210 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13211 internal variables.
13212 (create_trace_state_variable): New parameter `gdb'. Handle it.
13213 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13214 (cmd_qtdp): Handle fast tracepoints.
13215 (cmd_qtdv): Adjust.
13216 (max_jump_pad_size): New.
13217 (gdb_jump_pad_head): New.
13218 (get_jump_space_head): New.
13219 (claim_jump_space): New.
13220 (sort_tracepoints): New.
13221 (MAX_JUMP_SIZE): New.
13222 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13224 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13225 support. Upload fast traceframes, and delete internal IPA
13227 (stop_tracing_handler): New.
13228 (flush_trace_buffer_handler): New.
13229 (cmd_qtstop): Upload fast tracepoints.
13230 (response_tracepoint): Handle fast tracepoints.
13231 (tracepoint_finished_step): Upload fast traceframes. Set the
13232 tracepoint hit context's tracepoint type.
13233 (handle_tracepoint_bkpts): New.
13234 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13235 type. Add comment about fast tracepoints.
13236 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13237 non-existing action_str field.
13238 (get_context_regcache): Handle fast tracepoints.
13239 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13241 (fast_tracepoint_from_jump_pad_address): New.
13242 (fast_tracepoint_from_ipa_tpoint_address): New.
13243 (collecting_t): New.
13244 (force_unlock_trace_buffer): New.
13245 (fast_tracepoint_collecting): New.
13247 (gdb_collect): New.
13248 (write_inferior_data_ptr): New.
13249 (target_tp_heap): New.
13250 (target_malloc): New.
13251 (download_agent_expr): New.
13253 (download_tracepoints): New.
13254 (download_trace_state_variables): New.
13255 (upload_fast_traceframes): New.
13256 (IPA_FIRST_TRACEFRAME): New.
13257 (IPA_NEXT_TRACEFRAME_1): New.
13258 (IPA_NEXT_TRACEFRAME): New.
13259 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13260 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13261 (gdb_jump_pad_buffer_end): New.
13262 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13263 (initialize_tracepoint): Adjust.
13264 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13265 buffer. Initialize the low module.
13266 * utils.c (PREFIX, TOOLNAME): New.
13267 (malloc_failure): Use PREFIX.
13268 (error): In the IPA, an error causes an exit.
13269 (fatal, warning): Use PREFIX.
13270 (internal_error): Use TOOLNAME.
13271 (NUMCELLS): Increase to 10.
13272 * configure, config.in: Regenerate.
13274 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13276 * server.c (handle_query) <qSupported>: Do two passes over the
13277 qSupported string to avoid nesting strtok.
13279 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13281 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13283 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13284 -Wl,--dynamic-list.
13285 * configure: Regenerate.
13286 * proc-service.list: New.
13288 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13290 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13293 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13295 * gdbreplay.c (remote_open): Check error return from socket() call by
13296 its equality to -1 not by it being negative.
13297 * remote-utils.c (remote_open): Likewise.
13299 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13301 * config.h: Regenerate.
13303 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13305 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13306 doesn't provide PTRACE_GET_THREAD_AREA.
13308 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13310 * linux-m68k-low.c: Include <asm/ptrace.h>
13311 (ps_get_thread_area): Implement.
13313 2010-05-03 Doug Evans <dje@google.com>
13315 * event-loop.c (struct callback_event): New struct.
13316 (callback_list): New global.
13317 (append_callback_event, delete_callback_event): New functions.
13318 (process_callback): New function.
13319 (start_event_loop): Call it.
13320 * remote-utils.c (NOT_SCHEDULED): Define.
13321 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13322 moved out of readchar.
13323 (readchar): Rewrite. Call reschedule before returning.
13324 (reset_readchar): New function.
13325 (remote_close): Call it.
13326 (process_remaining, reschedule): New functions.
13327 * server.h (callback_handler_func): New typedef.
13328 (append_callback_event, delete_callback_event): Declare.
13330 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13332 * proc-service.c (ps_pglobal_lookup): Use
13333 thread_db_look_up_one_symbol.
13334 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13335 parameter. Use it instead of all_symbols_looked_up.
13336 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13338 (all_symbols_looked_up): Don't declare.
13339 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13340 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13342 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13343 Set all_symbols_looked_up here.
13344 (thread_db_look_up_one_symbol): New.
13345 (thread_db_get_tls_address): Adjust.
13346 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13347 thread_db object on the heap, and tentatively set it in the
13349 (thread_db_init): Don't set all_symbols_looked_up here.
13350 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13352 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13354 * linux-low.c (linux_kill, linux_detach): Adjust.
13355 (status_pending_p_callback): Remove redundant statement. Check
13356 for !TARGET_WAITIKIND_IGNORE, instead of
13357 TARGET_WAITKIND_STOPPED.
13358 (handle_tracepoints): Make sure LWP is locked. Adjust.
13359 (linux_wait_for_event_1): Adjust.
13360 (linux_cancel_breakpoints): New.
13361 (unsuspend_one_lwp): New.
13362 (unsuspend_all_lwps): New.
13363 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13364 (send_sigstop_callback): Change return type to int, add new
13365 `except' parameter and handle it.
13366 (suspend_and_send_sigstop_callback): New.
13367 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13368 pass them down. If SUSPEND, also increment the lwp's suspend
13370 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13371 (need_step_over_p): Don't consider suspended LWPs.
13372 (start_step_over): Adjust.
13373 (proceed_one_lwp): Change return type to int, add new `except'
13374 parameter and handle it.
13375 (unsuspend_and_proceed_one_lwp): New.
13376 (proceed_all_lwps): Use find_inferior instead of
13378 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13379 also decrement the suspend count of LWPs. Pass `except' down,
13380 instead of hacking its suspend count.
13381 (linux_pause_all): Add `freeze' parameter. Adjust.
13382 (linux_unpause_all): New.
13383 (linux_target_ops): Install linux_unpause_all.
13384 * server.c (handle_status): Adjust.
13385 * target.h (struct target_ops): New fields `unpause_all' and
13386 `cancel_breakpoints'. Add new parameter to `pause_all'.
13387 (pause_all): Add new `freeze' parameter.
13388 (unpause_all): New.
13389 (cancel_breakpoints): New.
13390 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13391 cancel breakpoints.
13392 (cmd_qtstart): Pause threads.
13393 (stop_tracing): Pause threads, and cancel breakpoints.
13394 * win32-low.c (win32_target_ops): Adjust.
13396 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13398 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13399 the inferior right away from here...
13400 (linux_wait_1): ... to here, and adjust to check the thread's
13401 last_resume_kind instead of the lwp's step or stop_expected flags.
13403 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13405 * README: Use consistent `GDB' and `GDBserver' spellings.
13407 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13409 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13410 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13411 (linux_detach_one_lwp): Assume the lwp is stopped.
13412 (any_thread_of): Delete.
13413 (linux_detach): Stop all lwps here. Don't blindly delete all
13415 (delete_lwp_callback): New.
13416 (linux_mourn): Delete all lwps of the process that is gone.
13417 (linux_wait_1): Don't delete the last lwp of the process here.
13418 * mem-break.h (mark_breakpoints_out): Declare.
13419 * mem-break.c (mark_breakpoints_out): New.
13420 (free_all_breakpoints): Use it.
13421 * server.c (handle_target_event): If the process is gone, mark
13423 * thread-db.c (struct thread_db) <create_bp>: New field.
13424 (thread_db_enable_reporting): Fix prototype. Store a thread event
13425 breakpoint reference in the thread_db struct.
13426 (thread_db_load_search): Clear the thread_db object.
13427 (try_thread_db_load_1): Ditto.
13428 (switch_to_process): New.
13429 (disable_thread_event_reporting): Use it.
13430 (remove_thread_event_breakpoints): New.
13431 (thread_db_detach, thread_db_mourn): Use it.
13433 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13435 * linux-low.c (linux_enable_event_reporting): New.
13436 (linux_wait_for_event_1, handle_extended_wait): Use it.
13438 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13440 * linux-low.c (linux_kill_one_lwp, linux_kill)
13441 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13442 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13443 SIGSTOP even if the LWP is stopped.
13444 (send_sigstop_callback): New.
13445 (stop_all_lwps): Use send_sigstop_callback instead.
13446 (linux_resume_one_thread): Adjust.
13447 (proceed_one_lwp): Still proceed an LWP that the client has
13448 requested to stop, if we haven't reported it as stopped yet. Make
13449 sure that LWPs the client want stopped, have a pending SIGSTOP.
13451 2010-04-26 Doug Evans <dje@google.com>
13453 * server.c (handle_general_set): Make static.
13455 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13456 Print received char after testing for error/eof instead of before.
13457 (input_interrupt): Tweak comment.
13459 2010-04-23 Doug Evans <dje@google.com>
13461 * server.c (start_inferior): Print inferior argv if --debug.
13463 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13465 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13466 * nto-x86-low.c: Include server.h
13468 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13470 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13471 be consistent with other sources of this directory.
13472 (init_registers_amd64): Correct name of source file of this function
13475 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13477 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13478 64-bit executables.
13480 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13482 * win32-i386-low.c: Add 64-bit support.
13483 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13484 (init_registers_amd64): Declare.
13485 (mappings): Add 64-bit version of array.
13486 (init_windows_x86): New function.
13487 (the_low_target): Change init_arch field to init_windows_x86.
13489 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13491 * win32-low.c: Adapt to support also 64-bit architecture.
13492 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13493 (get_image_name): Use SIZE_T type for local variable `done'.
13494 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13495 (toolhelp_get_dll_name): Idem.
13496 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13497 Use uintptr_t typecast to avoid warning.
13498 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13499 (handle_exception): Use phex_nz to avoid warning.
13500 (win32_wait): Remove unused local variable `process'.
13502 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13504 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13507 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13509 * configure.ac: Use `ws2_32' library for srv_mingw.
13510 * configure: Regenerate.
13511 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13512 * remote-utils.c: Likewise.
13514 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13516 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13517 if __x86_64__ is defined.
13519 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13521 * configure: Regenerate.
13523 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13525 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13526 * target.h (target_ops): New get_tib_address field.
13527 * win32-low.h (win32_thread_info): Add thread_local_base field.
13528 * win32-low.c (child_add_thread): Add tlb argument.
13529 Set thread_local_base field to TLB.
13530 (get_child_debug_event): Adapt to child_add_thread change.
13531 (win32_get_tib_address): New function.
13532 (win32_target_ops): Set get_tib_address field to
13533 win32_get_tib_address.
13534 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13536 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13538 * linux-low.c (linux_mourn): Also remove the process.
13539 * server.c (handle_target_event): Don't remove the process here.
13540 * nto-low.c (nto_mourn): New.
13541 (nto_target_ops): Install it.
13542 * spu-low.c (spu_mourn): New.
13543 (spu_target_ops): Install it.
13544 * win32-low.c (win32_mourn): New.
13545 (win32_target_ops): Install it.
13547 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13549 * server.h (buffer_xml_printf): Remove redundant `;'.
13551 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13553 * regcache.c (set_register_cache): Invalidate regcaches before
13554 changing the register cache layout.
13555 (regcache_invalidate_one): Allow a NULL regcache.
13556 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13557 regcaches before changing the register cache layout or the target
13560 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13562 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13563 variable warning on Linux/x86-64.
13565 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13567 GDBserver disconnected tracing support.
13569 * linux-low.c (linux_remove_process): Delete.
13570 (add_lwp): Don't set last_resume_kind here.
13571 (linux_kill): Use `mourn'.
13572 (linux_detach): Use `thread_db_detach', and `mourn'.
13573 (linux_mourn): New.
13574 (linux_attach_lwp_1): Adjust comment.
13575 (linux_attach): last_resume_kind moved the thread_info; adjust.
13576 (status_pending_p_callback): Adjust.
13577 (linux_wait_for_event_1): Adjust.
13578 (count_events_callback, select_singlestep_lwp_callback)
13579 (select_event_lwp_callback, cancel_breakpoints_callback)
13580 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13581 (proceed_one_lwp): Adjust.
13582 (linux_async): Add debug output.
13583 (linux_thread_stopped): New.
13584 (linux_pause_all): New.
13585 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13587 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13588 (thread_db_free): Delete declaration.
13589 (thread_db_detach, thread_db_mourn): Declare.
13590 * thread-db.c (thread_db_init): Use thread_db_mourn.
13591 (thread_db_free): Delete, split in two.
13592 (disable_thread_event_reporting): New.
13593 (thread_db_detach): New.
13594 (thread_db_mourn): New.
13596 * server.h (struct thread_info) <last_resume_kind>: New field.
13597 <attached>: Add comment.
13598 <gdb_detached>: New field.
13599 (handler_func): Change return type to int.
13600 (handle_serial_event, handle_target_event): Ditto.
13601 (gdb_connected): Declare.
13603 (disconnected_tracing): Declare.
13604 (stop_tracing): Declare.
13606 * server.c (handle_query) <qSupported>: Report support for
13607 disconnected tracing.
13608 (queue_stop_reply_callback): Account for running threads.
13609 (gdb_wants_thread_stopped): New.
13610 (gdb_wants_all_threads_stopped): New.
13611 (gdb_reattached_process): New.
13612 (handle_status): Clear the `gdb_detached' flag of all processes.
13613 In all-stop, stop all threads.
13614 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13615 (process_serial_event): If the remote connection breaks, or if an
13616 exit was forced with "monitor exit", force an event loop exit.
13617 Handle disconnected tracing on detach.
13618 (handle_serial_event): Adjust.
13619 (handle_target_event): If GDB isn't connected, forward events back
13620 to the inferior, unless the last process exited, in which case,
13621 exit gdbserver. Adjust interface.
13623 * remote-utils.c (remote_open): Don't block in accept. Instead
13624 register an event loop source on the listen socket file
13625 descriptor. Refactor bits into ...
13626 (listen_desc): ... this new global.
13627 (gdb_connected): ... this new function.
13628 (enable_async_notification): ... this new function.
13629 (handle_accept_event): ... this new function.
13630 (remote_close): Clear remote_desc.
13632 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13634 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13636 (mourn_inferior): Define.
13637 (target_process_qsupported): Avoid the dangling else problem.
13638 (thread_stopped): Define.
13639 (pause_all): Define.
13640 (target_waitstatus_to_string): Declare.
13641 * target.c (target_waitstatus_to_string): New.
13643 * tracepoint.c (tracing): Make extern.
13644 (disconnected_tracing): New.
13645 (stop_tracing): Make extern. Handle tracing stops due to GDB
13647 (cmd_qtdisconnected): New.
13648 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13649 (handle_tracepoint_general_set): Handle QTDisconnected.
13651 * event-loop.c (event_handler_func): Change return type to int.
13652 (process_event): Bail out if the event handler wants the event
13654 (handle_file_event): Ditto.
13655 (start_event_loop): Bail out if the event handler wants the event
13658 * nto-low.c (nto_target_ops): Adjust.
13659 * spu-low.c (spu_wait): Don't remove the process here.
13660 (spu_target_ops): Adjust.
13661 * win32-low.c (win32_wait): Don't remove the process here.
13662 (win32_target_ops): Adjust.
13664 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13666 * regcache.c (realloc_register_cache): Invalidate inferior's
13667 regcache before recreating it.
13669 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13671 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13673 2010-04-09 Stan Shebs <stan@codesourcery.com>
13674 Pedro Alves <pedro@codesourcery.com>
13676 * server.h (LONGEST): New.
13677 (struct thread_info) <while_stepping>: New field.
13678 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13680 (initialize_tracepoint, handle_tracepoint_general_set)
13681 (handle_tracepoint_query, tracepoint_finished_step)
13682 (tracepoint_was_hit, release_while_stepping_state_list):
13683 (current_traceframe): Declare.
13684 * server.c (handle_general_set): Handle tracepoint packets.
13685 (read_memory): New.
13686 (write_memory): New.
13687 (handle_search_memory_1): Use read_memory.
13688 (handle_query): Report support for conditional tracepoints, trace
13689 state variables, and tracepoint sources. Handle tracepoint
13691 (main): Initialize the tracepoints module.
13692 (process_serial_event): Handle traceframe reads/writes.
13694 * linux-low.c (handle_tracepoints): New.
13695 (linux_wait_1): Call it.
13696 (linux_resume_one_lwp): Handle while-stepping.
13697 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13698 (linux_target_ops): Install them.
13699 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13701 * linux-x86-low.c (x86_supports_tracepoints): New.
13702 (the_low_target). Install it.
13704 * mem-break.h (delete_breakpoint): Declare.
13705 * mem-break.c (delete_breakpoint): Make external.
13707 * target.h (struct target_ops): Add `supports_tracepoints',
13708 `read_pc', and `write_pc' fields.
13709 (target_supports_tracepoints): Define.
13710 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13713 * regcache.h (struct regcache) <registers_owned>: New field.
13714 (init_register_cache, regcache_cpy): Declare.
13715 (regcache_read_pc, regcache_write_pc): Declare.
13716 (register_cache_size): Declare.
13717 (supply_regblock): Declare.
13718 * regcache.c (init_register_cache): New.
13719 (new_register_cache): Use it.
13720 (regcache_cpy): New.
13721 (register_cache_size): New.
13722 (supply_regblock): New.
13723 (regcache_read_pc, regcache_write_pc): New.
13725 * tracepoint.c: New.
13727 * Makefile.in (OBS): Add tracepoint.o.
13728 (tracepoint.o): New rule.
13730 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13732 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13734 (i386-mmx.c): Likewise.
13735 (i386-mmx-linux.o): Likewise.
13736 (i386-mmx-linux.c): Likewise.
13738 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13739 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13740 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13741 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13743 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13744 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13745 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13747 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13749 * Makefile.in (clean): Updated.
13751 (i386-avx.c): Likewise.
13752 (i386-avx-linux.o): Likewise.
13753 (i386-avx-linux.c): Likewise.
13754 (amd64-avx.o): Likewise.
13755 (amd64-avx.c): Likewise.
13756 (amd64-avx-linux.o): Likewise.
13757 (amd64-avx-linux.c): Likewise.
13759 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13760 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13761 (srv_amd64_regobj): Add amd64-avx.o.
13762 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13763 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13764 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13765 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13766 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13767 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13768 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13770 * i387-fp.c: Include "i386-xstate.h".
13772 (i387_cache_to_xsave): Likewise.
13773 (i387_xsave_to_cache): Likewise.
13774 (x86_xcr0): Likewise.
13776 * i387-fp.h (i387_cache_to_xsave): Likewise.
13777 (i387_xsave_to_cache): Likewise.
13778 (x86_xcr0): Likewise.
13780 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13781 * linux-crisv32-low.c (target_regsets): Likewise.
13782 * linux-m68k-low.c (target_regsets): Likewise.
13783 * linux-mips-low.c (target_regsets): Likewise.
13784 * linux-ppc-low.c (target_regsets): Likewise.
13785 * linux-s390-low.c (target_regsets): Likewise.
13786 * linux-sh-low.c (target_regsets): Likewise.
13787 * linux-sparc-low.c (target_regsets): Likewise.
13788 * linux-xtensa-low.c (target_regsets): Likewise.
13790 * linux-low.c: Include <sys/uio.h>.
13791 (regsets_fetch_inferior_registers): Support nt_type.
13792 (regsets_store_inferior_registers): Likewise.
13793 (linux_process_qsupported): New.
13794 (linux_target_ops): Add linux_process_qsupported.
13796 * linux-low.h (regset_info): Add nt_type.
13797 (linux_target_ops): Add process_qsupported.
13799 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13801 (init_registers_i386_avx_linux): New.
13802 (init_registers_amd64_avx_linux): Likewise.
13803 (xmltarget_i386_linux_no_xml): Likewise.
13804 (xmltarget_amd64_linux_no_xml): Likewise.
13805 (PTRACE_GETREGSET): Likewise.
13806 (PTRACE_SETREGSET): Likewise.
13807 (x86_fill_xstateregset): Likewise.
13808 (x86_store_xstateregset): Likewise.
13809 (use_xml): Likewise.
13810 (x86_linux_update_xmltarget): Likewise.
13811 (x86_linux_process_qsupported): Likewise.
13812 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13813 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13814 init_registers_i386_linux here. Call
13815 x86_linux_update_xmltarget.
13816 (the_low_target): Add x86_linux_process_qsupported.
13818 * server.c (handle_query): Call target_process_qsupported.
13820 * target.h (target_ops): Add process_qsupported.
13821 (target_process_qsupported): New.
13823 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13825 * inferiors.c (add_thread): Set last_status kind to
13826 TARGET_WAITKIND_IGNORE.
13827 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13828 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13829 (linux_wait_1): Move `thread' local definition to block that uses
13830 it. Don't NULL initialize `event_child'.
13831 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13832 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13833 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13835 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13837 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13838 an extended waitstatus, or by a watchpoint.
13839 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13840 thread was stepping or has been stopped by a watchpoint.
13842 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13844 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13845 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13846 of another, then delete the previous, and validate all
13848 (validate_inserted_breakpoint): New.
13849 (delete_disabled_breakpoints): New.
13850 (validate_breakpoints): New.
13851 (check_mem_read): Validate breakpoints before trusting their
13852 shadow. Delete disabled breakpoints.
13853 (check_mem_write): Validate breakpoints before trusting they
13854 should be inserted. Delete disabled breakpoints.
13855 * mem-break.h (validate_breakpoints):
13856 * server.c (handle_query): Validate breakpoints when we see a
13859 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13861 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13862 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13863 if we could tell there's a GDB breakpoint at stop_pc.
13864 (need_step_over_p): Don't do a step over if we find a GDB
13865 breakpoint at the resume PC.
13867 * mem-break.c (struct raw_breakpoint): New.
13868 (enum bkpt_type): New type `gdb_breakpoint'.
13869 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13870 fields. New field `raw'.
13871 (find_raw_breakpoint_at): New.
13872 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13873 breakpoint instead.
13874 (set_breakpoint_at): Adjust.
13875 (delete_raw_breakpoint): New.
13876 (release_breakpoint): New.
13877 (delete_breakpoint): Rename to...
13878 (delete_breakpoint_1): ... this. Add proc parameter. Use
13879 release_breakpoint. Return ENOENT.
13880 (delete_breakpoint): Reimplement.
13881 (find_breakpoint_at): Delete.
13882 (find_gdb_breakpoint_at): New.
13883 (delete_breakpoint_at): Delete.
13884 (set_gdb_breakpoint_at): New.
13885 (delete_gdb_breakpoint_at): New.
13886 (gdb_breakpoint_here): New.
13887 (set_reinsert_breakpoint): Use release_breakpoint.
13888 (uninsert_breakpoint): Rename to ...
13889 (uninsert_raw_breakpoint): ... this.
13890 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13891 (reinsert_raw_breakpoint): Change parameter type to
13893 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13895 (check_breakpoints): Adjust. Use release_breakpoint.
13896 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13897 (breakpoint_inserted_here): Ditto.
13898 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13899 Don't trust the breakpoint's shadow if it is not inserted.
13900 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13901 (delete_all_breakpoints): Adjust.
13902 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13903 use delete_breakpoint_1.
13905 * mem-break.h (breakpoints_supported): Delete declaration.
13906 (set_gdb_breakpoint_at): Declare.
13907 (gdb_breakpoint_here): Declare.
13908 (delete_breakpoint_at): Delete.
13909 (delete_gdb_breakpoint_at): Declare.
13911 * server.h (struct raw_breakpoint): Forward declare.
13912 (struct process_info): New field `raw_breakpoints'.
13914 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13917 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13919 * linux-low.c (status_pending_p_callback): Fix comment.
13920 (linux_wait_for_event_1): Move most of the internal breakpoint
13921 handling from here...
13922 (linux_wait_1): ... to here.
13923 (count_events_callback): New.
13924 (select_singlestep_lwp_callback): New.
13925 (select_event_lwp_callback): New.
13926 (cancel_breakpoints_callback): New.
13927 (select_event_lwp): New.
13928 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13929 priority to all LWPs that have had events that should be reported
13930 to the client. Cancel breakpoints when about to reporting the
13931 event to the client, not while stopping lwps. No longer cancel
13932 finished single-steps here.
13933 (cancel_finished_single_step): Delete.
13934 (cancel_finished_single_steps): Delete.
13936 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13938 * mem-break.c (enum bkpt_type): New.
13939 (struct breakpoint): New field `type'.
13940 (set_breakpoint_at): Change return type to struct breakpoint
13941 pointer. Set type to `other_breakpoint' by default.
13942 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13943 in the breakpoint list.
13944 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13945 (reinsert_breakpoint): Rename to ...
13946 (reinsert_raw_breakpoint): ... this.
13947 (reinsert_breakpoints_at): Adjust.
13948 * mem-break.h (struct breakpoint): Declare.
13949 (set_breakpoint_at): Change return type to struct breakpoint
13952 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13954 * server.c (handle_query): Assign, not compare.
13956 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13958 Teach linux gdbserver to step-over-breakpoints.
13960 * linux-low.c (can_hardware_single_step): New.
13961 (supports_breakpoints): New.
13962 (handle_extended_wait): If stopping threads, read the stop pc of
13963 the new cloned LWP.
13965 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13966 low target doesn't support retrieving the PC.
13967 (add_lwp): Set last_resume_kind to resume_continue.
13968 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13969 (linux_attach): Don't clear stop_expected. Set the lwp's
13970 last_resume_kind to resume_stop.
13971 (linux_detach_one_lwp): Don't check for removed breakpoints.
13972 (check_removed_breakpoint): Delete.
13973 (status_pending_p): Rename to ...
13974 (status_pending_p_callback): ... this. Don't check for removed
13975 breakpoints. Don't consider threads that are stopped from GDB's
13977 (linux_wait_for_lwp): Always read the stop_pc here.
13978 (cancel_breakpoint): New.
13979 (step_over_bkpt): New global.
13980 (linux_wait_for_event_1): Implement stepping over breakpoints.
13981 (gdb_wants_lwp_stopped): New.
13982 (gdb_wants_all_stopped): New.
13983 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13984 single-step traps here. Store the thread's last reported target
13986 (send_sigstop): Don't clear stop_expected. Always set it,
13988 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13989 (cancel_finished_single_step): New.
13990 (cancel_finished_single_steps): New.
13991 (wait_for_sigstop): Don't cancel finished single-step traps here.
13992 (linux_resume_one_lwp): Don't check for removed breakpoints.
13993 Don't set `step' on non-hardware step archs.
13994 (linux_set_resume_request): Ignore resume_stop requests if already
13995 stopping or stopped. Set the lwp's last_resume_kind.
13996 (resume_status_pending_p): Don't check for removed breakpoints.
13997 (need_step_over_p): New.
13998 (start_step_over): New.
13999 (finish_step_over): New.
14000 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14001 requests. Clear the thread's last reported target waitstatus.
14002 Don't use the `suspended' flag. Don't consider pending breakpoints.
14003 (linux_resume): Start a step-over if necessary.
14004 (proceed_one_lwp): New.
14005 (proceed_all_lwps): New.
14006 (unstop_all_lwps): New.
14007 * linux-low.h (struct lwp_info): Rewrite comment for the
14008 `suspended' flag. Add the `stop_pc' field. Delete the
14009 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14010 Add `'last_resume_kind' and `need_step_over' fields.
14011 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14012 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14013 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14014 (set_raw_breakpoint_at): New.
14015 (set_breakpoint_at): Rewrite to use it.
14016 (reinsert_breakpoint_handler): Delete.
14017 (set_reinsert_breakpoint): New.
14018 (reinsert_breakpoint_by_bp): Delete.
14019 (delete_reinsert_breakpoints): New.
14020 (uninsert_breakpoint): Rewrite.
14021 (uninsert_breakpoints_at): New.
14022 (reinsert_breakpoint): Rewrite.
14023 (reinsert_breakpoints_at): New.
14024 (check_breakpoints): Rewrite.
14025 (breakpoint_here): New.
14026 (breakpoint_inserted_here): New.
14027 (check_mem_read): Adjust.
14028 * mem-break.h (breakpoints_supported, breakpoint_here)
14029 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14030 (reinsert_breakpoint_by_bp): Delete declaration.
14031 (delete_reinsert_breakpoints): Declare.
14032 (reinsert_breakpoint): Delete declaration.
14033 (reinsert_breakpoints_at): Declare.
14034 (uninsert_breakpoint): Delete declaration.
14035 (uninsert_breakpoints_at): Declare.
14036 (check_breakpoints): Adjust prototype.
14037 * server.h: Adjust include order.
14038 (struct thread_info): Declare here. Add a `last_status' field.
14040 2010-03-23 Michael Snyder <msnyder@vmware.com>
14042 * server.c (crc32): New function.
14043 (handle_query): Add handling for 'qCRC:' request.
14045 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14047 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14048 lwp had been stopped by a watchpoint.
14050 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14052 * server.h (internal_error): Declare.
14053 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14054 * utils.c (internal_error): New function.
14056 2010-03-15 Andreas Schwab <schwab@redhat.com>
14058 * configure.srv: Fix typo setting srv_regobj.
14060 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14062 * linux-low.c (fetch_register): Avoid passing a non string literal
14064 (usr_store_inferior_registers): Ditto.
14066 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14068 * linux-low.c (linux_write_memory): Bail out early if peeking
14071 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14073 * linux-low.h (struct lwp_info): New fields
14074 `stopped_by_watchpoint' and `stopped_data_address'.
14075 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14076 here, and cache them in the lwp object.
14077 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14079 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14081 (linux_stopped_by_watchpoint): Rewrite.
14082 (linux_stopped_data_address): Rewrite.
14084 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14086 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14087 switching the current inferior, not before.
14089 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14091 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14092 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14093 i386-linux.c and amd64-linux.c.
14094 (reg-i386.o): Removed.
14095 (reg-i386.c): Likewise.
14096 (reg-i386-linux.o): Likewise.
14097 (reg-i386-linux.c): Likewise.
14098 (reg-x86-64.o): Likewise.
14099 (reg-x86-64.c): Likewise.
14100 (reg-x86-64-linux.o): Likewise.
14101 (reg-x86-64-linux.c): Likewise.
14103 (i386.c): Likewise.
14104 (i386-linux.o): Likewise.
14105 (i386-linux.c): Likewise.
14106 (amd64.o): Likewise.
14107 (amd64.c): Likewise.
14108 (amd64-linux.o): Likewise.
14109 (amd64-linux.c): Likewise.
14111 * configure.srv (srv_i386_regobj): New.
14112 (srv_i386_linux_regobj): Likewise.
14113 (srv_amd64_regobj): Likewise.
14114 (srv_amd64_linux_regobj): Likewise.
14115 (srv_i386_32bit_xmlfiles): Likewise.
14116 (srv_i386_64bit_xmlfiles): Likewise.
14117 (srv_i386_xmlfiles): Likewise.
14118 (srv_amd64_xmlfiles): Likewise.
14119 (srv_i386_linux_xmlfiles): Likewise.
14120 (srv_amd64_linux_xmlfiles): Likewise.
14121 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14122 srv_xmlfiles to $srv_i386_xmlfiles.
14123 (i[34567]86-*-mingw32ce*): Likewise.
14124 (i[34567]86-*-mingw*): Likewise.
14125 (i[34567]86-*-nto*): Likewise.
14126 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14127 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14128 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14129 (x86_64-*-linux*): Likewise.
14131 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14132 (init_registers_amd64_linux): New.
14133 (x86_arch_setup): Replace init_registers_x86_64_linux with
14134 init_registers_amd64_linux.
14136 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14138 * configure.ac: Check for libdl. If it is not available link against
14139 static libthread_db.
14140 * configure: Regenerate.
14142 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14146 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14147 handing a read watchpoint.
14148 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14150 2010-02-12 Doug Evans <dje@google.com>
14152 * linux-low.c (linux_supports_tracefork_flag): Document.
14153 (linux_look_up_symbols): Add comment.
14155 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14157 * regcache.c (supply_register): Clear regcache if buf is NULL.
14159 2010-02-02 Nicolas Roche <roche@sourceware.org>
14160 Joel Brobecker <brobecker@adacore.com>
14162 * inferiors.c (find_inferior): Add function documentation.
14163 (unloaded_dll): Handle the case where the unloaded dll has not
14164 been previously registered in the dll list.
14166 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14168 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14169 (thumb2_breakpoint): New.
14170 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14172 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14174 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14175 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14178 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14180 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14182 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14184 * linux-s390-low.c (s390_collect_ptrace_register)
14185 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14187 2010-01-21 Doug Evans <dje@google.com>
14189 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14190 (PTRACE_ARG4_TYPE): New macro.
14191 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14192 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14193 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14194 (usr_store_inferior_registers): Ditto.
14195 (linux_read_memory, linux_write_memory): Ditto.
14196 (linux_test_for_tracefork): Ditto.
14198 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14199 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14201 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14203 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14206 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14208 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14209 prototype to take a regcache. Adjust.
14211 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14213 * regcache.h (struct thread_info): Forward declare.
14214 (struct regcache): New.
14215 (new_register_cache): Adjust prototype.
14216 (get_thread_regcache): Declare.
14217 (free_register_cache): Adjust prototype.
14218 (registers_to_string, registers_from_string): Ditto.
14219 (supply_register, supply_register_by_name, collect_register)
14220 (collect_register_as_string, collect_register_by_name): Ditto.
14221 * regcache.c (struct inferior_regcache_data): Delete.
14222 (get_regcache): Rename to ...
14223 (get_thread_regcache): ... this. Adjust. Switch inferior before
14224 fetching registers.
14225 (regcache_invalidate_one): Adjust.
14226 (regcache_invalidate): Fix prototype.
14227 (new_register_cache): Return the new register cache.
14228 (free_register_cache): Change prototype.
14229 (realloc_register_cache): Adjust.
14230 (registers_to_string): Change prototype to take a regcache. Adjust.
14231 (registers_from_string): Ditto.
14232 (register_data): Ditto.
14233 (supply_register): Ditto.
14234 (supply_register_by_name): Ditto.
14235 (collect_register): Ditto.
14236 (collect_register_as_string): Ditto.
14237 (collect_register_by_name): Ditto.
14238 * server.c (process_serial_event): Adjust.
14239 * linux-low.h (regset_fill_func, regset_store_func): Change
14241 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14243 * linux-low.c (get_stop_pc): Adjust.
14244 (check_removed_breakpoint): Adjust.
14245 (linux_wait_for_event): Adjust.
14246 (linux_resume_one_lwp): Adjust.
14247 (fetch_register): Add regcache parameter. Adjust.
14248 (usr_store_inferior_registers): Ditto.
14249 (regsets_fetch_inferior_registers): Ditto.
14250 (regsets_store_inferior_registers): Ditto.
14251 (linux_fetch_registers, linux_store_registers): Ditto.
14252 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14254 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14256 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14257 prototype to take a regcache.
14258 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14259 * remote-utils.c (convert_ascii_to_int, outreg)
14260 (prepare_resume_reply): Change prototype to take a regcache.
14262 * target.h (struct target_ops) <fetch_registers, store_registers>:
14263 Change prototype to take a regcache.
14264 (fetch_inferior_registers, store_inferior_registers): Change
14265 prototype to take a regcache. Adjust.
14266 * proc-service.c (ps_lgetregs): Adjust.
14267 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14268 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14269 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14270 take a regcache. Adjust.
14271 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14272 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14273 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14274 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14275 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14276 (cris_cannot_fetch_register):
14277 (cris_breakpoint_at): Change prototype to take a regcache.
14279 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14280 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14281 to take a regcache. Adjust.
14282 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14284 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14285 take a regcache. Adjust.
14286 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14287 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14288 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14289 * linux-mips-low.c (mips_get_pc):
14290 (mips_set_pc): Change prototype to take a regcache. Adjust.
14291 (mips_reinsert_addr): Adjust.
14292 (mips_collect_register): Change prototype to take a regcache.
14294 (mips_supply_register):
14295 (mips_collect_register_32bit, mips_supply_register_32bit)
14296 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14297 (mips_store_fpregset): Ditto.
14298 * linux-ppc-low.c (ppc_supply_ptrace_register)
14299 (ppc_supply_ptrace_register): Ditto.
14300 (parse_spufs_run): Adjust.
14301 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14302 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14303 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14304 take a regcache. Adjust.
14305 * linux-s390-low.c (s390_collect_ptrace_register)
14306 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14307 (s390_set_pc): Change prototype to take a regcache. Adjust.
14308 (s390_arch_setup): Adjust.
14309 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14310 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14311 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14312 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14313 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14315 (sparc_breakpoint_at): Adjust.
14316 * linux-xtensa-low.c (xtensa_fill_gregset):
14317 (xtensa_store_gregset):
14318 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14319 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14320 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14321 prototype to take a regcache. Adjust.
14322 * win32-arm-low.c (arm_fetch_inferior_register)
14323 (arm_store_inferior_register): Change prototype to take a
14325 * win32-i386-low.c (i386_fetch_inferior_register)
14326 (i386_store_inferior_register): Change prototype to take a
14328 * win32-low.c (child_fetch_inferior_registers)
14329 (child_store_inferior_registers): Change prototype to take a
14331 (win32_wait): Adjust.
14332 (win32_fetch_inferior_registers): Change prototype to take a
14334 (win32_store_inferior_registers): Adjust.
14335 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14336 store_inferior_register>: Change prototype to take a regcache.
14338 2010-01-20 Doug Evans <dje@google.com>
14340 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14342 (linux_wait_for_event1, linux_init_signals): Ditto.
14343 (W_STOPCODE): Provide definition if missing.
14345 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14347 * linux-low.c (linux_core_of_thread): New.
14348 (compare_ints, show_process, list_threads): New.
14349 (linux_qxfer_osdata): Report threads and cores.
14350 (linux_target_op): Register linux_core_of_thread.
14351 * remote-utils.c (prepare_resume_reply): Report the core.
14352 (buffer_xml_printf): Support %d specifier.
14353 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14355 (handle_query): Handle qXfer:threads. Announce availability
14357 * target.h (struct target_ops): New field core_of_thread.
14359 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14361 * Makefile.in (clean): Remove new generated files.
14362 (reg-s390.o, reg-s390.c): Remove rules.
14363 (reg-s390x.o, reg-s390x.c): Likewise.
14364 (s390-linux32.o, s390-linux32.c): Add rules.
14365 (s390-linux64.o, s390-linux64.c): Likewise.
14366 (s390x-linux64.o, s390x-linux64.c): Likewise.
14367 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14368 * linux-s390-low.c: Include <elf.h>.
14369 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14370 (init_registers_s390): Remove prototype.
14371 (init_registers_s390x): Likewise.
14372 (init_registers_s390_linux32): Add prototype.
14373 (init_registers_s390_linux64): Likewise.
14374 (init_registers_s390x_linux64): Likewise.
14375 (s390_num_regs_3264): New define.
14376 (s390_regmap_3264): New global variable.
14377 (s390_cannot_fetch_register): Remove obsolete check.
14378 (s390_cannot_store_register): Likewise.
14379 (s390_collect_ptrace_register): Handle upper/lower register halves.
14380 (s390_supply_ptrace_register): Likewise.
14381 (s390_fill_gregset): Update to register number changes.
14382 (s390_get_hwcap): New routine.
14383 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14384 Install appropriate regmap and register set.
14386 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14388 * server.c (gdbserver_version): Update copyright year to 2010.
14389 * gdbreplay.c (gdbreplay_version): Likewise.
14391 2009-12-28 Doug Evans <dje@google.com>
14393 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14394 elf/external.h. Include <elf.h> instead but only if necessary.
14396 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14398 * linux-low.c (linux_remove_process): Remove `detaching'
14399 parameter. Don't release/detach from thread_db here.
14400 (linux_kill): Release/detach from thread_db here, ...
14401 (linux_detach): ... and here, before actually detaching.
14402 (linux_wait_1): ... and here, when a process exits.
14403 * thread-db.c (any_thread_of): New.
14404 (thread_db_free): Switch the current inferior to a thread of the
14407 2009-12-21 Doug Evans <dje@google.com>
14409 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14411 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14412 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14413 warning ifndef __NR_tkill. Move setting of errno there too.
14414 Delete unnecessary resetting of errno after syscall.
14415 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14417 * configure.ac: Check for dladdr.
14418 * config.in: Regenerate.
14419 * configure: Regenerate.
14420 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14421 (try_thread_db_load): Update.
14423 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14425 2009-12-18 Doug Evans <dje@google.com>
14427 * event-loop.c: Include unistd.h if it exists.
14429 * linux-low.c (my_waitpid): Move definition away from being in
14430 between linux_tracefork_child/linux_test_for_tracefork.
14432 * gdb_proc_service.h (psaddr_t): Fix type.
14433 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14434 signature to match glibc.
14436 2009-12-16 Doug Evans <dje@google.com>
14438 * linux-low.c (linux_read_memory): Fix argument to read.
14440 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14442 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14443 events, don't leave current_inferior pointing at null.
14445 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14447 * win32-low.c (LOG): Delete.
14448 (OUTMSG): Output to stderr.
14449 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14450 on compile time LOG macro.
14451 (win32_wait): Fix debug output.
14453 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14455 * win32-low.c (win32_add_one_solib): If the dll name is
14456 "ntdll.dll", prepend the system directory to the dll path.
14458 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14460 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14462 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14463 Vladimir Prus <vladimir@codesourcery.com>
14465 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14466 * configure.ac: Check for __mcoldfire__ and set
14467 gdb_cv_m68k_is_coldfire.
14468 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14469 reg-cf.o and reg-m68k.o.
14470 * configure: Regenerated.
14472 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14474 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14475 Pass it to thread_db_free.
14476 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14477 proper `detaching' argument to linux_remove_process.
14478 * linux-low.h (thread_db_free): Add `detaching' parameter.
14479 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14481 (thread_db_free): Add `detaching' parameter. Only
14482 call td_ta_clear_event if detaching from process.
14484 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14486 * thread-db.c (thread_db_free): Fix typo.
14488 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14491 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14493 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14495 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14496 with an i686 compiler.
14497 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14499 * configure: Rebuilt.
14501 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14505 * server.c (handle_search_memory_1): Correct read_addr initialization
14506 in loop for searching subsequent chunks.
14508 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14510 * configure.ac: New --with-libthread-db option.
14511 * thread-db.c: Allow direct dependence on libthread_db.
14512 (thread_db_free): Adjust.
14513 * config.in: Regenerate.
14514 * configure: Likewise.
14516 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14519 * thread-db.c (attach_thread): New function.
14520 (maybe_attach_thread): Return success/failure.
14521 (find_new_threads_callback): Adjust.
14522 (thread_db_find_new_threads): Loop until no new threads.
14524 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14526 * proc-service.c (ps_lgetregs): Formatting.
14528 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14530 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14531 * configure.ac: Adjust.
14532 * linux-low.h (struct process_info_private): Move members to struct
14534 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14535 * linux-low.c (linux_remove_process): Adjust.
14536 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14537 * server.c (handle_query): Move code ...
14538 (handle_monitor_command): ... here. New function.
14539 * target.h (struct target_ops): New member.
14540 * thread-db.c (struct thread_db): New.
14541 (libthread_db_search_path): New variable.
14542 (thread_db_create_event, thread_db_enable_reporting)
14543 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14544 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14545 (try_thread_db_load_1, dladdr_to_soname): New functions.
14546 (try_thread_db_load, thread_db_load_search): New functions.
14547 (thread_db_init): Search for libthread_db.
14548 (thread_db_free): New function.
14549 (thread_db_handle_monitor_command): Likewise.
14550 * config.in: Regenerate.
14551 * configure: Regenerate.
14553 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14555 * spu-low.c (spu_kill): Wait for inferior to terminate.
14556 Call clear_inferiors.
14557 (spu_detach): Call clear_inferiors.
14559 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14561 * aclocal.m4: Regenerate.
14562 * config.in: Likewise.
14563 * configure: Likewise.
14565 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14567 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14568 (parse_spufs_run): New function.
14569 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14570 (ppc_breakpoint_at): Handle SPU breakpoints.
14572 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14574 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14575 (SPUFS_MAGIC): Define.
14576 (spu_enumerate_spu_ids): New function.
14577 (linux_qxfer_spu): New function.
14578 (linux_target_ops): Install linux_qxfer_spu.
14580 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14582 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14583 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14584 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14585 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14586 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14587 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14588 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14589 (init_registers_powerpc_cell32l): Add prototype.
14590 (init_registers_powerpc_cell64l): Likewise.
14591 (ppc_arch_setup): Detect Cell/B.E. architecture.
14593 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14595 * Makefile.in (datarootdir): New variable.
14597 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14599 * linux-low.c (linux_write_memory): Update debugging output.
14600 * Makefile.in (clean): Add new descriptions.
14601 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14602 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14603 * configure.srv: Add new files for arm*-*-linux*.
14604 * linux-arm-low.c: Add new declarations.
14605 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14606 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14607 (HWCAP_VFPv3D16): New.
14608 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14609 instead of __IWMMXT__.
14610 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14611 (arm_arch_setup): New.
14612 (target_regsets): Remove #ifdef. Add VFP regset.
14613 (the_low_target): Use arm_arch_setup.
14615 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14617 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14618 the main thread again.
14620 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14622 Adding Neutrino gdbserver.
14623 * configure: Regenerated.
14624 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14625 * configure.srv (i[34567]86-*-nto*): New target.
14626 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14627 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14628 (nto_comctrl) [__QNX__]: New function.
14629 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14631 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14633 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14636 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14637 Pedro Alves <pedro@codesourcery.com>
14639 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14640 don't support CONTEXT_EXTENDED_REGISTERS.
14641 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14642 (the_low_target): Install them.
14643 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14644 failing with ERROR_PIPE_NOT_CONNECTED.
14646 2009-06-30 Doug Evans <dje@google.com>
14647 Pierre Muller <muller@ics.u-strasbg.fr>
14649 Add h/w watchpoint support to x86-linux, win32-i386.
14650 * Makefile.in (SFILES): Add i386-low.c
14651 (i386_low_h): Define.
14652 (i386-low.o): Add dependencies.
14653 (linux-x86-low.o): Add i386-low.h dependency.
14654 (win32-i386-low.o): Ditto.
14655 * i386-low.c: New file.
14656 * i386-low.h: New file.
14657 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14658 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14659 * linux-low.c (linux_add_process): Initialize arch_private.
14660 (linux_remove_process): Free arch_private.
14661 (add_lwp): Initialize arch_private.
14662 (delete_lwp): Free arch_private.
14663 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14665 * linux-low.h (process_info_private): New member arch_private.
14666 (lwp_info): New member arch_private.
14667 (linux_target_ops): New members new_process, new_thread,
14669 (ptid_of): New macro.
14670 * linux-x86-low.c: Include stddef.h, i386-low.h.
14671 (arch_process_info): New struct.
14672 (arch_lwp_info): New struct.
14673 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14674 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14675 (i386_dr_low_get_status): New function.
14676 (x86_insert_point, x86_remove_point): New functions.
14677 (x86_stopped_by_watchpoint): New function.
14678 (x86_stopped_data_address): New function.
14679 (x86_linux_new_process, x86_linux_new_thread): New functions.
14680 (x86_linux_prepare_to_resume): New function.
14681 (the_low_target): Add entries for insert_point, remove_point,
14682 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14684 * server.c (debug_hw_points): New global.
14685 (monitor_show_help): Document set debug-hw-points.
14686 (handle_query): Process "set debug-hw-points".
14687 * server.h (debug_hw_points): Declare.
14688 (paddress): Declare.
14689 * utils.c (NUMCELLS, CELLSIZE): New macros.
14690 (get_sell, xsnprintf, paddress): New functions.
14691 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14692 remove_point, stopped_by_watchpoint, stopped_data_address.
14693 * win32-i386-low.c: Include i386-low.h.
14694 (debug_reg_state): Replaces dr.
14695 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14696 (i386_dr_low_get_status): New function.
14697 (i386_insert_point, i386_remove_point): New functions.
14698 (i386_stopped_by_watchpoint): New function.
14699 (i386_stopped_data_address): New function.
14700 (i386_initial_stuff): Update.
14701 (get_thread_context,set_thread_context,i386_thread_added): Update.
14702 (the_low_target): Add entries for insert_point,
14703 remove_point, stopped_by_watchpoint, stopped_data_address.
14704 * win32-low.c (win32_insert_watchpoint): New function.
14705 (win32_remove_watchpoint): New function.
14706 (win32_stopped_by_watchpoint): New function.
14707 (win32_stopped_data_address): New function.
14708 (win32_target_ops): Add entries for insert_watchpoint,
14709 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14710 * win32-low.h (win32_target_ops): New members insert_point,
14711 remove_point, stopped_by_watchpoint, stopped_data_address.
14713 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14715 * server.c (process_serial_event): Re-return unsupported, not
14716 error, if the type isn't recognized. Re-allow supporting only
14717 insert or remove packets. Also call require_running for
14718 breakpoints. Add missing break statement to default case. Tidy.
14719 * target.h (struct target_ops): Rename insert_watchpoint to
14720 insert_point, and remove_watchpoint to remove_point.
14722 * linux-low.h (struct linux_target_ops): Likewise.
14723 * linux-low.c (linux_insert_watchpoint): Rename to ...
14724 (linux_insert_point): ... this. Adjust.
14725 (linux_remove_watchpoint): Rename to ...
14726 (linux_remove_point): ... this. Adjust.
14727 (linux_target_ops): Adjust.
14728 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14729 (cris_insert_point): ... this.
14730 (cris_remove_watchpoint): Rename to ...
14731 (cris_remove_point): ... this.
14732 (the_low_target): Adjust.
14734 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14736 * server.c (handle_v_kill): Pass signal_pid to
14737 kill_inferior if multi_process is zero.
14739 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14741 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14742 * target.h (target_ops): Comment for *_watchpoint to make it clear
14743 the functions can get types '0' and '1'.
14745 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14747 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14748 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14749 * regcache.c (get_regcache): Likewise.
14750 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14751 * win32-low.c (child_fetch_inferior_registers): Remove check for
14754 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14755 Pedro Alves <pedro@codesourcery.com>
14757 * target.h (struct target_ops) <supports_multi_process>: New
14759 (target_supports_multi_process): New.
14760 * server.c (handle_query): Even if GDB reports support, only
14761 enable multi-process if the target also supports it. Report
14762 multi-process support only if the target backend supports it.
14763 * linux-low.c (linux_supports_multi_process): New function.
14764 (linux_target_ops): Install it as target_supports_multi_process
14767 2009-05-24 Doug Evans <dje@google.com>
14769 Global renaming of find_thread_pid to find_thread_ptid.
14770 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14771 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14772 All callers updated.
14774 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14775 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14778 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14779 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14780 (linux_resume_one_lwp): Ditto.
14782 2009-05-23 Doug Evans <dje@google.com>
14784 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14785 from struct inferior_list_entry * to struct lwp_info *.
14786 All callers updated.
14788 2009-05-13 Doug Evans <dje@google.com>
14790 * linux-x86-low.c: Don't include assert.h.
14791 (x86_siginfo_fixup): Use fatal, not assert.
14792 (x86_arch_setup): Fix comment.
14794 2009-05-12 Doug Evans <dje@google.com>
14796 Biarch support for i386/amd64 gdbserver.
14797 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14798 Add linux-x86-low.c.
14799 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14800 (linux-x86-low.o): Add.
14801 * linux-x86-64-low.c: Delete.
14802 * linux-i386-low.c: Delete.
14803 * linux-x86-low.c: New file.
14804 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14806 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14808 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14809 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14810 (linux_child_pid_to_exec_file): New function.
14811 (elf_64_header_p, elf_64_file_p): New functions.
14812 (siginfo_fixup): New function.
14813 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14814 give target a chance to convert layout.
14815 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14816 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14818 2009-05-07 Doug Evans <dje@google.com>
14820 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14821 (regsets_store_inferior_registers): Ditto.
14823 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14827 * linux-low.c (must_set_ptrace_flags): Delete.
14828 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14830 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14831 `lwp->must_set_ptrace_flags' instead.
14832 (linux_wait_for_event_1): Set ptrace options here.
14833 (linux_wait_1): ... not here.
14835 2009-04-30 Doug Evans <dje@google.com>
14837 * inferiors.c (started_inferior_callback): New function.
14838 (attached_inferior_callback): New function.
14839 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14840 * server.c (print_started_pid, print_attached_pid): New functions.
14841 (detach_or_kill_for_exit): New function.
14842 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14843 * server.h (have_started_inferiors_p): Declare.
14844 (have_attached_inferiors_p): Declare.
14846 * inferiors.c (remove_process): Fix memory leak, free process.
14847 * linux-low.c (linux_remove_process): New function.
14848 (linux_kill): Call it instead of remove_process.
14849 (linux_detach, linux_wait_1): Ditto.
14851 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14853 * configure.srv: Add x86 Windows CE target.
14855 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14857 * inferiors.c (get_thread_process): Make global.
14858 * server.h (get_thread_process): Add prototype.
14859 * thread-db.c (find_one_thread): Use get_thread_process
14860 instead of current_process.
14861 (thread_db_get_tls_address): Do not crash if called when
14862 thread layer is not yet initialized.
14864 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14866 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14867 * spu-low.c (current_tid): Rename to ...
14868 (current_ptid): ... this.
14869 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14870 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14871 ptid_get_lwp (current_ptid) instead of current_tid.
14872 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14873 instead of current_tid. Use find_process_pid to verify pid
14874 argument is valid. Pass proper argument to remove_process.
14875 (spu_thread_alive): Compare current_ptid instead of current_tid.
14876 (spu_resume): Likewise.
14878 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14880 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14883 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14885 Implement the multiprocess extensions, and add linux multiprocess
14888 * server.h (ULONGEST): Declare.
14889 (struct ptid, ptid_t): New.
14890 (minus_one_ptid, null_ptid): Declare.
14891 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14892 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14893 (struct inferior_list_entry): Change `id' type from unsigned from
14895 (struct sym_cache, struct breakpoint, struct
14896 process_info_private): Forward declare.
14897 (struct process_info): Declare.
14898 (current_process): Declare.
14899 (all_processes): Declare.
14900 (initialize_inferiors): Declare.
14901 (add_thread): Adjust to use ptid_t.
14902 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14903 (add_process, remove_process, find_thread_pid): Declare.
14904 (find_inferior_id): Adjust to use ptid_t.
14905 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14906 (multi_process): Declare.
14907 (push_event): Adjust to use ptid_t.
14908 (read_ptid, write_ptid): Declare.
14909 (prepare_resume_reply): Adjust to use ptid_t.
14910 (clear_symbol_cache): Declare.
14911 * inferiors.c (all_processes): New.
14912 (null_ptid, minus_one_ptid): New.
14913 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14914 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14915 (add_thread): Change unsigned long to ptid. Remove gdb_id
14917 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14918 (gdb_id_to_thread): Rename to ...
14919 (find_thread_pid): ... this. Change unsigned long to ptid.
14920 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14921 (loaded_dll, pull_pid_from_list): Adjust.
14922 (add_process, remove_process, find_process_pid)
14923 (get_thread_process, current_process, initialize_inferiors): New.
14924 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14925 (struct target_waitstatus) <related_pid>: Ditto.
14926 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14927 return type to int.
14928 (struct target_ops) <join>: Add `pid' argument.
14929 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14930 (struct target_ops) <wait>: Add `ptid' field. Change return type
14932 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14933 (mywait): Add `ptid' argument. Change return type to ptid_t.
14934 (target_pid_to_str): Declare.
14935 * target.c (set_desired_inferior): Adjust to use ptids.
14936 (mywait): Add new `ptid' argument. Adjust.
14937 (target_pid_to_str): New.
14938 * mem-break.h (free_all_breakpoints): Declare.
14939 * mem-break.c (breakpoints): Delelete.
14940 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14941 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14942 to use per-process breakpoint list.
14943 (free_all_breakpoints): New.
14944 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14945 (symbol_cache, all_symbols_looked_up): Delete.
14947 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14949 (prepare_resume_reply): Change ptid argument's type from unsigned
14950 long to ptid_t. Adjust. Implement W;process and X;process.
14951 (free_sym_cache, clear_symbol_cache): New.
14952 (look_up_one_symbol): Adjust to per-process symbol cache. *
14953 * server.c (cont_thread, general_thread, step_thread): Change type
14955 (attached): Delete.
14956 (multi_process): New.
14957 (last_ptid): Change type to ptid_t.
14958 (struct vstop_notif) <ptid>: Change type to ptid_t.
14959 (queue_stop_reply, push_event): Change `ptid' argument's type to
14961 (discard_queued_stop_replies): Add `pid' argument.
14962 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14963 changes. Don't reference the `attached' global.
14964 (attach_inferior): Adjust to mywait interface changes.
14965 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14966 features. Handle and report "multiprocess+". Handle
14968 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14970 (handle_v_kill): New.
14971 (handle_v_stopped): Adjust to use target_pid_to_str.
14972 (handle_v_requests): Allow multiple attaches and runs when
14973 multiprocess extensions are in effect. Handle "vKill".
14974 (myresume): Adjust to use ptids.
14975 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14976 (handle_status): Adjust to discard_queued_stop_replies interface
14978 (first_thread_of, kill_inferior_callback)
14979 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14980 (main): Call initialize_inferiors. Adjust to use ptids, killing
14981 and detaching from all inferiors. Handle multiprocess packet
14983 * linux-low.h: Include gdb_proc_service.h.
14984 (struct process_info_private): New.
14985 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14986 <lwpid_of>: Use ptid_get_lwp.
14987 (get_lwp_thread): Adjust.
14988 (struct lwp_info): Add `dead' member.
14989 (find_lwp_pid): Declare.
14990 * linux-low.c (thread_db_active): Delete.
14991 (new_inferior): Adjust comment.
14992 (inferior_pid): Delete.
14993 (linux_add_process): New.
14994 (handle_extended_wait): Adjust.
14995 (add_lwp): Change unsigned long to ptid.
14996 (linux_create_inferior): Add process to processes table. Adjust
14997 to use ptids. Don't set new_inferior here.
14998 (linux_attach_lwp): Rename to ...
14999 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15000 it. Adjust to use ptids.
15001 (linux_attach_lwp): New.
15002 (linux_attach): Add process to processes table. Don't set
15004 (struct counter): New.
15005 (second_thread_of_pid_p, last_thread_of_process_p): New.
15006 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15007 multiple processes.
15008 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15009 processes. Remove process from process table.
15010 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15011 to multiple processes.
15012 (any_thread_of): New.
15013 (linux_detach): Add `pid' argument, and handle it. Remove process
15014 from processes table.
15015 (linux_join): Add `pid' argument. Handle it.
15016 (linux_thread_alive): Change unsighed long argument to ptid_t.
15017 Consider dead lwps as not being alive.
15018 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15019 threads we're not interested in.
15020 (same_lwp, find_lwp_pid): New.
15021 (linux_wait_for_lwp): Change `pid' argument's type from int to
15023 (linux_wait_for_event): Rename to ...
15024 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15025 from int to ptid_t. Adjust.
15026 (linux_wait_for_event): New.
15027 (linux_wait_1): Add `ptid' argument. Change return type to
15028 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15029 that exit from the process table.
15030 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15032 (mark_lwp_dead): New.
15033 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15034 stopping all threads, mark its main lwp as dead.
15035 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15037 (fetch_register, usr_store_inferior_registers)
15038 (regsets_fetch_inferior_registers)
15039 (regsets_store_inferior_registers, linux_read_memory)
15040 (linux_write_memory): Inline `inferior_pid'.
15041 (linux_look_up_symbols): Adjust to use per-process
15042 `thread_db_active'.
15043 (linux_request_interrupt): Adjust to use ptids.
15044 (linux_read_auxv): Inline `inferior_pid'.
15045 (initialize_low): Don't reference thread_db_active.
15046 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15047 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15048 (ps_getpid): Return the pid of the current inferior.
15049 * thread-db.c (proc_handle, thread_agent): Delete.
15050 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15052 (find_one_thread): Change argument type to ptid_t. Adjust to
15054 (maybe_attach_thread): Adjust to per-process data and ptids.
15055 (thread_db_find_new_threads): Ditto.
15056 (thread_db_init): Ditto.
15057 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15058 processes table. Adjust to use ptids.
15059 (spu_kill, spu_detach): Adjust interface. Remove process from
15061 (spu_join, spu_thread_alive): Adjust interface.
15062 (spu_wait): Adjust interface. Remove process from processes
15063 table. Adjust to use ptids.
15064 * win32-low.c (current_inferior_tid): Delete.
15065 (current_inferior_ptid): New.
15066 (debug_event_ptid): New.
15067 (thread_rec): Take a ptid. Adjust.
15068 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15069 (child_delete_thread): Ditto.
15070 (do_initial_child_stuff): Add `attached' argument. Add process to
15072 (child_fetch_inferior_registers, child_store_inferior_registers):
15074 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15075 (win32_attach): Pass 1 to do_initial_child_stuff.
15076 (win32_kill): Adjust interface. Remove process from processes
15078 (win32_detach): Ditto.
15079 (win32_join): Adjust interface.
15080 (win32_thread_alive): Take a ptid.
15081 (win32_resume): Adjust to use ptids.
15082 (get_child_debug_event): Ditto.
15083 (win32_wait): Adjust interface. Remove exiting process from
15086 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15088 Non-stop mode support.
15090 * server.h (non_stop): Declare.
15091 (gdb_client_data, handler_func): Declare.
15092 (delete_file_handler, add_file_handler, start_event_loop):
15094 (handle_serial_event, handle_target_event, push_event)
15095 (putpkt_notif): Declare.
15096 * target.h (enum resume_kind): New.
15097 (struct thread_resume): Replace `step' field by `kind' field.
15098 (TARGET_WNOHANG): Define.
15099 (struct target_ops) <wait>: Add `options' argument.
15100 <supports_non_stop, async, start_non_stop>: New fields.
15101 (target_supports_non_stop, target_async): New.
15102 (start_non_stop): Declare.
15103 (mywait): Add `options' argument.
15104 * target.c (mywait): Add `options' argument. Print child exit
15105 notifications here.
15106 (start_non_stop): New.
15107 * server.c (non_stop, own_buf, mem_buf): New globals.
15108 (struct vstop_notif): New.
15109 (notif_queue): New global.
15110 (queue_stop_reply, push_event, discard_queued_stop_replies)
15111 (send_next_stop_reply): New.
15112 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15114 (attach_inferior): In non-stop mode, don't wait for the target
15116 (handle_general_set): Handle QNonStop.
15117 (handle_query): When handling qC, return the current general
15118 thread, instead of the first thread of the list.
15119 (handle_query): If the backend supports non-stop mode, include
15120 QNonStop+ in the qSupported query response.
15121 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15123 (handle_v_attach, handle_v_run): Handle non-stop mode.
15124 (handle_v_stopped): New.
15125 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15126 (myresume): Adjust to use resume_kind. Handle non-stop.
15127 (queue_stop_reply_callback): New.
15128 (handle_status): Handle non-stop mode.
15129 (main): Clear non_stop flag on reconnection. Use the event-loop.
15130 Refactor serial protocol handling from here ...
15131 (process_serial_event): ... to this new function. When GDB
15132 selects any thread, select one here. In non-stop mode, wait until
15133 GDB acks all pending events before exiting.
15134 (handle_serial_event, handle_target_event): New.
15135 * remote-utils.c (remote_open): Install remote_desc in the event
15137 (remote_close): Remove remote_desc from the event loop.
15138 (putpkt_binary): Rename to...
15139 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15140 (putpkt_binary): New as wrapper around putpkt_binary_1.
15141 (putpkt_notif): New.
15142 (prepare_resume_reply): In non-stop mode, don't change the
15144 * event-loop.c: New.
15145 * Makefile.in (OBJ): Add event-loop.o.
15146 (event-loop.o): New rule.
15148 * linux-low.h (pid_of): Moved here.
15150 (get_lwp_thread): Use lwpid_of.
15151 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15152 * linux-low.c (pid_of): Delete.
15153 (inferior_pid): Use lwpid_of.
15154 (linux_event_pipe): New.
15155 (target_is_async_p): New.
15157 (handle_extended_wait): Use lwpid_of.
15158 (add_lwp): Don't set lwpid field.
15159 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15160 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15161 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15162 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15163 first. Adjust to linux_wait_for_event interface changes. Use
15165 (linux_detach): Don't delete the main lwp here.
15166 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15167 (status_pending_p): Don't consider explicitly suspended lwps.
15168 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15169 pointer. Add OPTIONS argument. Change return type to int. Use
15170 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15171 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15172 pointer. Add status pointer argument. Return a pid instead of a
15173 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15174 changes. In non-stop mode, don't switch to a random thread.
15175 (linux_wait): Rename to...
15176 (linux_wait_1): ... this. Add target_options argument, and handle
15177 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15178 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15179 clean exit and signal exit code. Don't stop all threads in
15180 non-stop mode. In all-stop mode, only stop all threads when
15181 reporting a stop to GDB. Handle explicit thread stop requests.
15182 (async_file_flush, async_file_mark): New.
15184 (send_sigstop): Use lwpid_of.
15185 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15186 interface changes. In non-stop mode, don't switch to a random
15188 (linux_resume_one_lwp): Use lwpid_of.
15189 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15190 (linux_resume_one_thread): ... this. Handle resume_stop. In
15191 non-stop mode, don't look for pending flag in all threads.
15192 (resume_status_pending_p): Don't consider explicitly suspended
15194 (my_waitpid): Reimplement. Emulate __WALL.
15195 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15197 (sigchld_handler, linux_supports_non_stop, linux_async)
15198 (linux_start_non_stop): New.
15199 (linux_target_ops): Register linux_supports_non_stop, linux_async
15200 and linux_start_non_stop.
15201 (initialize_low): Install SIGCHLD handler.
15202 * thread-db.c (thread_db_create_event, find_one_thread)
15203 (thread_db_get_tls_address): Use lwpid_of.
15204 * win32-low.c (win32_detach): Adjust to use resume_kind.
15205 (win32_wait): Add `options' argument.
15206 * spu-low.c (spu_resume): Adjust to use resume_kind.
15207 (spu_wait): Add `options' argument.
15209 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15211 Decouple target code from remote protocol.
15213 * target.h (enum target_waitkind): New.
15214 (struct target_waitstatus): New.
15215 (struct target_ops) <wait>: Return an unsigned long. Take a
15216 target_waitstatus pointer instead of a char pointer.
15217 (mywait): Likewise.
15218 * target.c (mywait): Change prototype to return an unsigned long.
15219 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15220 * server.h (thread_from_wait, old_thread_from_wait): Delete
15222 (prepare_resume_reply): Change prototype to take a
15224 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15225 (last_status, last_ptid): New.
15226 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15227 pid instead of a signal.
15228 (attach_inferior): Remove "status" and "signal" parameters.
15230 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15232 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15233 (handle_v_requests, myresume): Remove "status" and "signal"
15234 parameters. Adjust.
15235 (handle_status): New.
15236 (main): Delete local `status'. Adjust.
15237 * remote-utils.c: Include target.h.
15238 (prepare_resume_reply): Change prototype to take a
15239 target_waitstatus. Adjust.
15241 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15243 * spu-low.c (spu_wait): Adjust.
15244 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15246 (win32_wait): Adjust.
15248 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15250 * target.h (struct thread_resume): Delete leave_stopped member.
15251 (struct target_ops): Add a `n' argument to the `resume' callback.
15252 * server.c (start_inferior): Adjust.
15253 (handle_v_cont, myresume): Adjust.
15254 * linux-low.c (check_removed_breakpoint): Adjust to resume
15255 interface change, and to removed leave_stopped field.
15256 (resume_ptr): Delete.
15257 (struct thread_resume_array): New.
15258 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15259 resume interface change.
15260 (linux_continue_one_thread, linux_queue_one_thread)
15261 (resume_status_pending_p): Check if the resume field is NULL
15262 instead of checking the leave_stopped member.
15263 (linux_resume): Adjust to the target resume interface change.
15264 * spu-low.c (spu_resume): Adjust to the target resume interface
15266 * win32-low.c (win32_detach, win32_resume): Ditto.
15268 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15270 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15272 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15274 (linux_continue_one_thread): Only preserve the stepping flag if
15275 there's a pending breakpoint.
15277 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15279 * server.c (main): After the inferior having exited, call
15280 remote_close before exiting gdbserver.
15282 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15284 Fix size of FPSCR in Power 7 processors.
15285 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15286 (PPC_FEATURE_HAS_DFP): New #define.
15287 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15290 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15292 * server.c (handle_query) Whitespace and formatting.
15294 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15296 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15297 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15298 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15299 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15300 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15301 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15302 Makefile.in, configure.ac: Fix whitespace throughout.
15303 * configure: Regenerate.
15305 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15307 * inferiors.c (find_inferior): Make it safe for the callback
15308 function to delete the currently iterated inferior.
15310 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15312 * Makefile.in (linuw_low_h): Move higher.
15313 (thread-db.o): Depend on $(linux_low_h).
15315 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15317 Rename "process" to "lwp" throughout.
15319 * linux-low.c (all_processes): Rename to...
15320 (all_lwps): ... this.
15321 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15322 (add_process): Rename to ...
15323 (add_lwp): ... this. Adjust.
15324 (linux_create_inferior): Adjust.
15325 (linux_attach_lwp): Adjust.
15326 (linux_attach): Adjust.
15327 (linux_kill_one_process): Rename to ...
15328 (linux_kill_one_lwp): ... this. Adjust.
15329 (linux_kill): Adjust.
15330 (linux_detach_one_process): Rename to ...
15331 (linux_detach_one_lwp): ... this. Adjust.
15332 (linux_detach): Adjust.
15333 (check_removed_breakpoint): Adjust.
15334 (status_pending_p): Adjust.
15335 (linux_wait_for_process): Rename to ...
15336 (linux_wait_for_lwp): ... this. Adjust.
15337 (linux_wait_for_event): Adjust.
15338 (send_sigstop): Adjust.
15339 (wait_for_sigstop): Adjust.
15340 (stop_all_processes): Rename to ...
15341 (stop_all_lwps): ... this.
15342 (linux_resume_one_process): Rename to ...
15343 (linux_resume_one_lwp): ... this. Adjust.
15344 (linux_set_resume_request, linux_continue_one_thread)
15345 (linux_queue_one_thread, resume_status_pending_p)
15346 (usr_store_inferior_registers, regsets_store_inferior_registers)
15347 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15349 * linux-low.h (get_process): Rename to ...
15350 (get_lwp): ... this. Adjust.
15351 (get_thread_process): Rename to ...
15352 (get_thread_lwp): ... this. Adjust.
15353 (get_process_thread): Rename to ...
15354 (get_lwp_thread): ... this. Adjust.
15355 (struct process_info): Rename to ...
15356 (struct lwp_info): ... this.
15357 (all_processes): Rename to ...
15358 (all_lwps): ... this.
15359 * proc-service.c (ps_lgetregs): Adjust.
15360 * thread-db.c (thread_db_create_event, find_one_thread)
15361 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15363 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15365 * server.c (handle_query): Handle "qAttached".
15367 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15369 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15370 GPLv3, update license URL.
15372 2009-03-01 Doug Evans <dje@google.com>
15374 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15375 (server_h): Add gdb_signals.h.
15376 (signals.o): Update.
15377 * server.h (target_signal_from_host,target_signal_to_host_p)
15378 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15380 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15382 * remote-utils.c (getpkt): Also generate remote-debug
15383 information if noack_mode is set.
15385 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15387 * server.c (handle_query): Report qXfer:siginfo:read and
15388 qXfer:siginfo:write as supported and handle them.
15389 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15390 * linux-low.c (linux_xfer_siginfo): New.
15391 (linux_target_ops): Set it.
15393 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15395 * server.c (gdbserver_usage): Mention --remote-debug.
15396 (main): Accept '--remote-debug' switch.
15398 2009-01-18 Doug Evans <dje@google.com>
15400 * regcache.c (new_register_cache): No need to check result of xcalloc.
15401 * server.c (handle_search_memory): Back out calls to xmalloc,
15402 result is checked and error is returned to user upon failure.
15403 (handle_query): Ditto. Add more checks for result of malloc.
15404 (handle_v_cont): Check result of malloc, report error back to
15406 (handle_v_run): Ditto. Call freeargv.
15407 * server.h (freeargv): Declare.
15408 * utils.c (freeargv): New fn.
15410 2009-01-15 Doug Evans <dje@google.com>
15412 * gdbreplay.c (perror_with_name): Make arg const char *.
15413 * server.h (target_signal_to_name): Make return type const char *.
15414 * thread-db.c (thread_db_err_str): Make return type const char *.
15415 * utils.c (perror_with_name): Make arg const char *.
15417 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15419 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15420 when handling a EXIT_PROCESS_DEBUG_EVENT.
15422 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15424 * gdbreplay.c (gdbreplay_version): Update copyright year.
15425 * server.c (gdbserver_version): Likewise.
15427 2009-01-05 Doug Evans <dje@google.com>
15429 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15430 (handle_extended_wait): Improve comment.
15432 2008-12-13 Doug Evans <dje@google.com>
15434 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15435 * server.h (ATTR_MALLOC): New macro.
15436 (xmalloc,xcalloc,xstrdup): Declare.
15437 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15438 * inferiors.c: Ditto.
15439 * linux-low.c: Ditto.
15440 * mem-break.c: Ditto.
15441 * regcache.c: Ditto.
15442 * remote-utils.c: Ditto.
15445 * win32-low.c: Ditto.
15447 2008-12-12 Doug Evans <dje@google.com>
15449 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15450 in debugging printf.
15452 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15454 2008-12-09 Doug Evans <dje@google.com>
15456 * linux-low.h (struct process_info): Delete member tid, unused.
15457 * thread-db.c (find_one_thread): Update.
15458 (maybe_attach_thread): Update.
15460 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15462 * target.h (struct target_ops): Add qxfer_osdata member.
15463 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15465 (linux_qxfer_osdata): New functions.
15466 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15468 * server.c (handle_query): Handle "qXfer:osdata:read:".
15469 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15470 (buffer_xml_printf): New functions.
15471 * server.h (struct buffer): New.
15472 (buffer_grow_str, buffer_grow_str0): New macros.
15473 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15474 (buffer_xml_printf): Declare.
15476 2008-11-24 Doug Evans <dje@google.com>
15478 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15480 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15482 * server.c (handle_v_run): Always use the supplied argument list.
15484 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15486 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15487 (xtensa_regmap_table): Add entry for scompare1.
15489 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15491 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15492 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15493 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15494 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15495 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15496 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15497 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15498 XML target descriptions.
15499 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15500 when inferior is running on an ISA 2.05 or later processor. Add
15501 special case to return offset for full 64-bit slot of FPSCR when
15504 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15506 * Makefile.in (SFILES, clean): Added sparc64 files.
15507 (reg-sparc64.o, reg-sparc64.c): New.
15508 * configure.srv (sparc*-*-linux*): New configuration.
15509 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15510 syscall arguments for SPARC.
15511 (regsets_store_inferior_registers): Likewise.
15512 * linux-sparc-low.c: New file.
15514 2008-10-21 Doug Evans <dje@google.com>
15516 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15517 (READLINE_DIR,READLINE_DEP): Delete.
15518 (INTERNAL_CFLAGS): Update.
15519 (LINTFLAGS): Update.
15521 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15523 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15524 whole argv from the last run, not just argv[0].
15526 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15528 * regcache.c (new_register_cache): Return NULL if the register
15529 cache size isn't known yet.
15530 (free_register_cache): Avoid dereferencing a NULL regcache.
15532 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15534 * configure.srv: Merge MIPS and MIPS64.
15536 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15538 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15540 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15542 * Makefile.in: Add required vsx dependencies.
15544 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15545 Declare init_registers_powerpc_vsx32l.
15546 Declare init_registers_powerpc_vsx64l.
15547 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15548 (ppc_arch_setup): Check for VSX in hwcap.
15549 (ppc_fill_vsxregset): New function.
15550 (ppc_store_vsxregset): New function.
15551 Add new VSX entry in regset_info target_regsets.
15553 * configure.srv: Add new VSX dependencies.
15555 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15557 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15558 (remote_open): Set or clear transport_is_reliable.
15559 (putpkt_binary): Don't expect acks in noack mode.
15560 (getpkt): Don't send ack/nac in noack mode.
15561 * server.c (handle_general_set): Handle QStartNoAckMode.
15562 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15564 (main): Reset noack_mode on every connection.
15565 * server.h (noack_mode): Declare.
15567 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15569 * Makefile.in (GDBREPLAY_OBS): New variable.
15570 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15572 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15573 Daniel Jacobowitz <dan@codesourcery.com>
15575 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15576 (usr_store_inferior_registers): Likewise.
15577 (regsets_store_inferior_registers): Likewise.
15579 2008-07-31 Rolf Jansen <rj@surtec.com>
15580 Pedro Alves <pedro@codesourcery.com>
15582 * configure.ac: Check for memmem declaration.
15583 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15584 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15585 (disable_packet_qfThreadInfo): Unconditionally compile.
15586 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15587 * configure, config.in: Regenerate.
15589 2008-07-28 Doug Kwan <dougkwan@google.com>
15591 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15592 (linux_write_memory): Remove declaration of errno.
15594 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15596 * linux-low.c (handle_extended_wait): Do not use "status"
15597 variable uninitialized.
15599 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15601 * server.c (handle_v_attach): Inhibit reporting dll changes.
15603 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15605 * remote-utils.c (prepare_resume_reply): If requested, don't
15606 output "thread:TID" in the T stop reply.
15608 * server.c (disable_packet_vCont, disable_packet_Tthread)
15609 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15610 (handle_query): If requested, disable support for qC, qfThreadInfo
15612 (handle_v_requests): If requested, disable support for vCont.
15613 (gdbserver_show_disableable): New.
15614 (main): Handle --disable-packet and --disable-packet=LIST.
15616 * server.h (disable_packet_vCont, disable_packet_Tthread)
15617 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15619 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15621 * server.c (gdbserver_usage): Mention --version.
15623 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15625 * Makefile.in (gdbreplay.o): New rule.
15627 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15629 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15630 message, not gdbserver.
15632 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15633 Nathan Sidwell <nathan@codesourcery.com>
15634 Joseph Myers <joseph@codesourcery.com>
15636 * acinclude.m4: Include ../../config/acx.m4.
15637 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15638 * configure, config.in: Regenerate.
15639 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15640 * server.c (gdbserver_version): Print PKGVERSION.
15641 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15642 (main): Adjust gdbserver_usage calls.
15643 * gdbreplay.c (version, host_name): Add declarations.
15644 (gdbreplay_version, gdbreplay_usage): New.
15645 (main): Accept --version and --help options.
15647 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15649 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15650 (arm_breakpoint_at): Handle Thumb.
15651 (the_low_target): Add comment.
15653 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15655 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15657 2008-05-09 Doug Evans <dje@google.com>
15659 * server.h (decode_search_memory_packet): Declare.
15660 * remote-utils.c (decode_search_memory_packet): New fn.
15661 * server.c (handle_search_memory_1): New fn.
15662 (handle_search_memory): New fn.
15663 (handle_query): Process qSearch:memory packets.
15665 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15667 * regcache.c (registers_length): Remove.
15668 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15669 full register packet.
15670 * regcache.h (registers_length): Remove prototype.
15671 * server.h (PBUFSIZ): Define to 16384.
15673 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15675 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15676 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15677 powerpc-64l.o, and powerpc-altivec64l.o.
15678 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15679 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15680 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15681 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15682 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15685 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15686 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15687 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15688 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15689 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15690 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15691 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15692 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15693 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15694 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15697 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15698 (init_registers_powerpc_32l): ... this new prototype.
15699 (init_registers_powerpc_32): Remove, replace by ...
15700 (init_registers_powerpc_altivec32l): ... this new prototype.
15701 (init_registers_powerpc_e500): Remove, replace by ...
15702 (init_registers_powerpc_e500l): ... this new prototype.
15703 (init_registers_ppc64): Remove, replace by ...
15704 (init_registers_powerpc_64l): ... this new prototype.
15705 (init_registers_powerpc_64): Remove, replace by ...
15706 (init_registers_powerpc_altivec64l): ... this new prototype.
15707 (ppc_num_regs): Set to 73.
15708 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15709 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15710 (ppc_cannot_store_register): Handle orig_r3 and trap.
15711 (ppc_arch_setup): Update init_registers_... calls.
15712 (ppc_fill_gregset): Handle orig_r3 and trap.
15714 * inferiors.c (clear_inferiors): Reset current_inferior.
15716 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15718 * acinclude.m4: Add override.m4.
15719 * configure: Regenerate.
15721 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15723 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15724 initial call to init_register_ppc64.
15726 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15728 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15729 single powerpc*-*-linux* case.
15730 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15732 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15734 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15735 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15737 * linux-ppc-low.c: Include <elf.h>.
15738 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15739 (ppc_hwcap): New global variable.
15740 (ppc_regmap): Remove __SPE__ #ifdef sections.
15741 (ppc_regmap_e500): New global variable.
15742 (ppc_cannot_store_register): Update __SPE__ special case.
15743 (ppc_get_hwcap): New function.
15744 (ppc_arch_setup): Use it to determine whether inferior supports
15745 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15746 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15747 Do not access registers if target does not support AltiVec.
15748 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15749 Do not access registers if target does not support SPE.
15750 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15752 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15754 * linux-low.c (disabled_regsets, num_regsets): New.
15755 (use_regsets_p): Delete.
15756 (linux_wait_for_process): Clear disabled_regsets.
15757 (regsets_fetch_inferior_registers): Check and set it.
15758 (regsets_store_inferior_registers): Likewise.
15759 (linux_fetch_registers, linux_store_registers): Do not use
15761 (initialize_low): Allocate disabled_regsets.
15763 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15765 * Makefile.in (LIBOBJS): New.
15766 (OBS): Use LIBOBJS.
15767 (memmem.o): New rule.
15768 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15769 * configure: Regenerated.
15771 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15773 * server.c (handle_query): Never return "unsupported" for
15774 qXfer:features:read queries.
15776 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15778 * server.c (get_features_xml): Fix inverted condition.
15779 (handle_query): Always support qXfer:feature:read.
15781 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15783 * server.c (wrapper_argv): New.
15784 (start_inferior): Handle wrapper_argv. If set, expect an extra
15786 (gdbserver_usage): Document --wrapper.
15787 (main): Parse --wrapper.
15789 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15791 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15792 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15793 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15794 (ppc_set_pc): Likewise.
15795 (ppc_arch_setup): New function.
15796 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15797 of collect_register.
15798 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15800 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15802 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15803 instead of linux-ppc64-low.o.
15804 * linux-ppc64-low.c: Remove file.
15805 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15806 (linux-ppc64-low.o): Remove rule.
15808 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15809 (init_registers_powerpc_64): Likewise.
15810 (ppc_regmap): Conditionally define depending on __powerpc64__.
15811 (ppc_cannot_store_register): Do not special-case "fpscr" when
15812 compiled on __powerpc64__.
15813 (ppc_collect_ptrace_register): New function.
15814 (ppc_supply_ptrace_register): New function.
15815 (ppc_breakpoint): Change type to "unsigned int".
15816 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15817 (the_low_target): Conditionally provide initializers for the
15818 arch_setup member depending on __powerpc64__. Install
15819 collect_ptrace_register and supply_ptrace_register members.
15821 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15823 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15824 * server.c (gdbserver_xmltarget): Define.
15825 (get_features_xml): Use it to replace "target.xml" and arch_string.
15827 * configure.srv: Remove srv_xmltarget. Add XML files that were
15828 mentioned there to srv_xmlfiles instead. Remove conditional tests
15829 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15830 srv_xmlfiles and srv_regobj to include all possible choices.
15831 * configure.ac (srv_xmltarget): Remove.
15832 (srv_xmlfiles): Do not add "target.xml".
15833 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15834 checks for supplementary target information.
15835 * configure: Regenerate.
15836 * Makefile.in (XML_TARGET): Remove.
15837 (target.xml): Remove rule.
15838 (clean): Do not clean up target.xml.
15839 (.PRECIOUS): Do not mention target.xml.
15841 * target.h (struct target_ops): Remove arch_string member.
15842 * linux-low.c (linux_arch_string): Remove.
15843 (linux_target_ops): Remove arch_string initializer.
15844 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15845 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15846 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15847 * spu-low.c (spu_arch_string): Remove.
15848 (spu_target_ops): Remove arch_string initializer.
15849 * win32-low.c (win32_arch_string): Remove.
15850 (win32_target_ops): Remove arch_string initializer.
15851 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15852 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15853 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15855 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15857 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15858 by collect_ptrace_register and supply_ptrace_register hooks.
15859 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15860 instead of checking for the_low_target.left_pad_xfer.
15861 (usr_store_inferior_registers): Use collect_ptrace_register callback
15862 instead of checking for the_low_target.left_pad_xfer.
15864 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15865 (s390_supply_ptrace_register): Likewise.
15866 (s390_fill_gregset): Call s390_collect_ptrace_register.
15867 (the_low_target): Update.
15869 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15870 (ppc_supply_ptrace_register): Likewise.
15871 (the_low_target): Update.
15873 * linux-i386-low.c (the_low_target): Update.
15874 * linux-x86-64-low.c (the_low_target): Update.
15876 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15878 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15879 reg-s390.o and reg-s390x.o.
15881 * linux-low.c (new_inferior): New global variable.
15882 (linux_create_inferior, linux_attach): Set it.
15883 (linux_wait_for_process): Call the_low_target.arch_setup after the
15884 target has stopped for the first time.
15885 (initialize_low): Do not call the_low_target.arch_setup.
15887 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15888 (s390_set_pc): Likewise.
15889 (s390_arch_setup): New function.
15890 (the_low_target): Use s390_arch_setup as arch_setup routine.
15892 * regcache.c (realloc_register_cache): New function.
15893 (set_register_cache): Call it for each existing regcache.
15895 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15897 * server.h (init_registers): Remove prototype.
15899 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15900 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15901 instead of init_registers ().
15902 * linux-arm-low.c (init_registers_arm): Add prototype.
15903 (init_registers_arm_with_iwmmxt): Likewise.
15904 (the_low_target): Add initializer for arch_setup field.
15905 * linux-cris-low.c (init_registers_cris): Add prototype.
15906 (the_low_target): Add initializer for arch_setup field.
15907 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15908 (the_low_target): Add initializer for arch_setup field.
15909 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15910 (the_low_target): Add initializer for arch_setup field.
15911 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15912 (the_low_target): Add initializer for arch_setup field.
15913 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15914 (the_low_target): Add initializer for arch_setup field.
15915 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15916 (the_low_target): Add initializer for arch_setup field.
15917 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15918 (init_registers_mips64_linux): Likewise.
15919 (the_low_target): Add initializer for arch_setup field.
15920 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15921 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15922 (the_low_target): Add initializer for arch_setup field.
15923 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15924 (init_registers_powerpc_64): Likewise.
15925 (the_low_target): Add initializer for arch_setup field.
15926 * linux-s390-low.c (init_registers_s390): Add prototype.
15927 (init_registers_s390x): Likewise.
15928 (the_low_target): Add initializer for arch_setup field.
15929 * linux-sh-low.c (init_registers_sh): Add prototype.
15930 (the_low_target): Add initializer for arch_setup field.
15931 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15932 (the_low_target): Add initializer for arch_setup field.
15933 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15934 (the_low_target): Add initializer for arch_setup field.
15936 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15937 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15938 instead of init_registers ().
15939 * win32-arm-low.c (init_registers_arm): Add prototype.
15940 (the_low_target): Add initializer for arch_setup field.
15941 * win32-i386-low.c (init_registers_i386): Add prototype.
15942 (the_low_target): Add initializer for arch_setup field.
15944 * spu-low.c (init_registers_spu): Add prototype.
15945 (initialize_low): Call initialie_registers_spu () instead of
15946 initialize_registers ().
15948 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15950 * server.c (handle_v_requests): When handling the vRun and vAttach
15951 packets, if already debugging a process, don't kill it. Return an
15954 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15956 * server.c (handle_query): Correct length check.
15958 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15960 * win32-low.c (do_initial_child_stuff): Add process handle
15961 parameter. Set current_process_handle and current_process_id from the
15962 parameters. Clear globals.
15963 (win32_create_inferior): Don't set current_process_handle and
15964 current_process_id here. Instead pass them on the call to
15965 do_initial_child_stuff.
15966 (win32_attach): Likewise.
15967 (win32_clear_inferiors): New.
15968 (win32_kill): Don't close the current process handle or the
15969 current thread handle here. Instead call win32_clear_inferiors.
15970 (win32_detach): Don't open a new handle to the process. Call
15971 win32_clear_inferiors.
15972 (win32_join): Don't rely on current_process_handle; open a new
15973 handle using the process id.
15974 (win32_wait): Call win32_clear_inferiors when the inferior process
15977 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15979 * server.c (monitor_show_help): Add "exit".
15981 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15983 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15984 (clean): Add reg-xtensa.c.
15985 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15986 * configure.srv (xtensa*-*-linux*) New target.
15987 * linux-xtensa-low.c: New.
15988 * xtensa-xtregs.c: New.
15990 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15992 * hostio.c: Don't include errno.h.
15993 (errno_to_fileio_errno): Move to hostio-errno.
15994 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15995 error number outputting to the target->hostio_last_error callback.
15996 (hostio_packet_error): Use FILEIO_EINVAL directly.
15997 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15998 calls to hostio_error.
15999 * hostio-errno.c: New.
16000 * server.h (hostio_last_error_from_errno): Declare.
16001 * target.h (target_ops): Add hostio_last_error member.
16002 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16003 as hostio_last_error handler.
16004 * spu-low.c (spu_target_ops): Likewise.
16005 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16006 (wince_hostio_last_error): New functions.
16007 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16008 as hostio_last_error handler.
16009 (win32_target_ops) [!_WIN32_WCE]: Register
16010 hostio_last_error_from_errno as hostio_last_error handler.
16011 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16012 (hostio-errno.o): New rule.
16013 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16014 * configure.srv (srv_hostio_err_objs): New variable. Default to
16016 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16017 * configure: Regenerate.
16019 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16021 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16022 (linux_kill, linux_detach): Clean up the process list.
16023 * remote-utils.c (remote_open): Improve port number parsing.
16024 (putpkt_binary, input_interrupt): Only send interrupts if the target
16026 * server.c (extended_protocol): Make static.
16027 (attached): Define earlier.
16028 (exit_requested, response_needed, program_argv): New variables.
16029 (target_running): New.
16030 (start_inferior): Clear attached here.
16031 (attach_inferior): Set attached here.
16032 (require_running): Define.
16033 (handle_query): Use require_running and target_running. Implement
16035 (handle_v_attach, handle_v_run): New.
16036 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16037 (gdbserver_usage): Update.
16038 (main): Redo argument parsing. Handle --debug and --multi. Handle
16039 --attach along with other options or after the port. Save
16040 program_argv. Support no initial program. Resynchronize
16041 communication with GDB after an error. Handle "monitor exit".
16042 Use require_running and target_running. Always allow the extended
16043 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16044 restart in extended mode.
16045 * README: Refer to the GDB manual. Update --attach usage.
16047 2007-12-20 Andreas Schwab <schwab@suse.de>
16049 * linux-low.c (STACK_SIZE): Define.
16050 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16051 (linux_test_for_tracefork): Likewise.
16053 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16055 * linux-low.c (linux_wait_for_event): Update messages. Do not
16056 reinsert auto-delete breakpoints.
16057 * mem-break.c (struct breakpoint): Change return type of handler to
16059 (set_breakpoint_at): Update handler type.
16060 (reinsert_breakpoint_handler): Return 1 instead of calling
16062 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16064 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16065 * mem-break.h (set_breakpoint_at): Update handler type.
16066 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16067 * win32-low.c (auto_delete_breakpoint): New.
16068 (get_child_debug_event): Use it.
16070 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16072 * configure.ac: Check for pread and pwrite.
16073 * hostio.c (handle_pread): Fall back to lseek and read.
16074 (handle_pwrite): Fall back to lseek and write.
16075 * config.in, configure: Regenerated.
16077 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16079 * server.c (myresume): Add own_buf argument.
16080 (main): Update calls.
16082 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16084 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16085 * remote-utils.c (remote_open): Do not call disable_async_io.
16086 (block_async_io): Delete.
16087 (unblock_async_io): Make static.
16088 (initialize_async_io): New.
16089 * server.c (handle_v_cont): Handle async I/O here.
16090 (myresume): Likewise. Move other common resume tasks here...
16091 (main): ... from here. Call initialize_async_io. Disable async
16092 I/O before the main loop.
16093 * server.h (initialize_async_io): Declare.
16094 (block_async_io, unblock_async_io): Delete prototypes.
16095 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16097 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16099 * remote-utils.c (readchar): Allow binary data in received messages.
16101 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16103 * win32-low.c (attaching): New global.
16104 (win32_create_inferior): Clear the `attaching' global.
16105 (win32_attach): Set the `attaching' global.
16106 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16107 attaching. Only set a breakpoint at the entry point if not
16110 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16112 * server.c (main): Don't report dll events on the initial
16113 connection on attaches.
16115 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16117 * server.c (main): Relax numerical bases supported for the pid of
16118 the --attach command line argument.
16120 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16122 * win32-low.c (win32_attach): Call OpenProcess before
16123 DebugActiveProcess, not after. Add last error output to error
16126 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16128 * win32-low.c (win32_get_thread_context)
16129 (win32_set_thread_context): New functions.
16130 (thread_rec): Use win32_get_thread_context.
16131 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16132 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16135 2007-12-03 Leo Zayas
16136 Pedro Alves <pedro_alves@portugalmail.pt>
16138 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16140 (child_add_thread): Minor cleanup.
16141 (child_continue): Resume artificially suspended threads before
16142 calling ContinueDebugEvent.
16143 (suspend_one_thread): New.
16144 (fake_breakpoint_event): New.
16145 (get_child_debug_event): Change return type to int. Check here if
16146 gdb sent an interrupt request. If a soft interrupt was requested,
16147 fake a breakpoint event. Return 0 if there is no event to handle,
16149 (win32_wait): Don't check here if gdb sent an interrupt request.
16150 Ensure there is a valid event to handle.
16151 (win32_request_interrupt): Add soft interruption method as last
16154 2007-12-03 Leo Zayas
16155 Pedro Alves <pedro_alves@portugalmail.pt>
16157 * win32-low.h (win32_thread_info): Add descriptions to the
16158 structure members. Replace `suspend_count' counter by a
16160 * win32-low.c (thread_rec): Update condition of when to get the
16161 context from the inferior. Rely on ContextFlags being set if it
16162 has already been retrieved. Only suspend the inferior thread if
16163 we haven't already. Warn if that fails.
16164 (continue_one_thread): s/suspend_count/suspended/. Only call
16165 ResumeThread once. Warn if that fails.
16167 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16169 * win32-low.c (win32_wait): Don't read from the inferior when it
16170 has already exited.
16172 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16174 * Makefile.in (win32_low_h): New variable.
16175 (win32-low.o): Add dependency on $(win32_low_h).
16176 (win32-arm-low.o, win32-i386-low.o): New rules.
16178 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16180 * hostio.c: Correct copyright year.
16182 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16184 * Makefile.in (OBS): Add hostio.o.
16185 (hostio.o): New rule.
16186 * server.h (handle_vFile): Declare.
16187 * hostio.c: New file.
16188 * server.c (handle_v_requests): Take packet_len and new_packet_len
16189 for binary packets. Call handle_vFile.
16190 (main): Update call to handle_v_requests.
16192 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16194 * linux-low.c: Include <sched.h>.
16196 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16198 * linux-low.c (linux_tracefork_grandchild): New.
16199 (linux_tracefork_child): Use clone.
16200 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16202 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16204 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16206 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16208 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16210 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16212 * inferiors.c (change_inferior_id): Delete.
16213 (add_pid_to_list, pull_pid_from_list): New.
16214 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16215 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16216 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16217 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16218 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16219 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16220 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16221 (using_threads): Always set to 1.
16222 (handle_extended_wait): New.
16223 (add_process): Do not set TID.
16224 (linux_create_inferior): Set must_set_ptrace_flags.
16225 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16226 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16227 (linux_thread_alive): Rename TID argument to LWPID.
16228 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16229 (linux_wait_for_event): Do not use TID or check using_threads. Update
16230 call to dead_thread_notify. Call handle_extended_wait.
16231 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16232 (send_sigstop): Delete sigstop_sent.
16233 (wait_for_sigstop): Avoid TID.
16234 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16235 (linux_test_for_tracefork): New.
16236 (linux_lookup_signals): Use thread_db_active and
16237 linux_supports_tracefork_flag.
16238 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16239 * linux-low.h (get_process_thread): Avoid TID.
16240 (struct process_ifo): Move thread_known and tid to the end. Remove
16242 (linux_attach_lwp, thread_db_init): Update prototypes.
16243 * server.h (change_inferior_id): Delete prototype.
16244 (add_pid_to_list, pull_pid_from_list): New prototypes.
16245 * thread-db.c (thread_db_use_events): New.
16246 (find_first_thread): Rename to...
16247 (find_one_thread): ...this. Update callers and messages. Do not
16248 call fatal. Check thread_db_use_events. Do not call
16249 change_inferior_id or new_thread_notify.
16250 (maybe_attach_thread): Update. Do not call new_thread_notify.
16251 (thread_db_init): Set thread_db_use_events. Check use_events.
16252 * utils.c (fatal, warning): Correct message prefix.
16254 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16256 * Makefile.in (clean): Remove new files.
16257 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16258 (powerpc-64.o, powerpc-64.c): New rules.
16259 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16260 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16262 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16264 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16265 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16266 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16267 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16268 (target_regsets): Add AltiVec and SPE register sets.
16269 * configure.ac: Check for AltiVec and SPE.
16270 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16271 (ppc_fill_vrregset, ppc_store_vrregset): New.
16272 (target_regsets): Add AltiVec register set.
16273 * configure: Regenerated.
16275 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16277 * linux-low.c (O_LARGEFILE): Define.
16278 (linux_read_memory): Use /proc/PID/mem.
16279 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16280 * configure, config.in: Regenerated.
16282 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16284 * linux-low.c (linux_wait_for_event): Do not pass signals while
16287 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16289 * win32-low.c (create_process): New.
16290 (win32_create_inferior): Use create_process instead of
16291 CreateProcess. If create_process failed retry appending an ".exe"
16292 suffix. Store the GetLastError result immediatelly after
16293 create_process calls and use it on the call to error.
16295 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16297 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16299 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16301 * configure.ac: Switch license to GPLv3.
16303 2007-08-01 Michael Snyder <msnyder@access-company.com>
16305 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16307 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16309 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16311 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16312 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16313 CloseToolhelp32Snapshot.
16314 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16315 CloseToolhelp32Snapshot.
16317 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16319 * server.c (main): Check for inferior exit before main loop.
16321 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16323 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16324 instead of on tmp_desc.
16326 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16327 Daniel Jacobowitz <dan@codesourcery.com>
16329 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16330 (add_thread): Minor cleanups.
16331 (clear_inferiors): Move lower in the file. Clear the DLL
16333 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16334 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16335 (xml_escape_text): New.
16336 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16338 (handle_v_cont): Report errors.
16339 (gdbserver_version): Update.
16340 (main): Correct size of own_buf. Do not report initial DLL events.
16341 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16342 (unloaded_dll, xml_escape_text): New.
16343 * win32-low.c (enum target_waitkind): Update comments.
16344 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16345 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16346 (win32_EnumProcessModules, win32_GetModuleInformation)
16347 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16348 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16349 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16350 (win32_Module32First, win32_Module32Next, load_toolhelp)
16351 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16352 (get_child_debug_event): Handle DLL events.
16353 (win32_wait): Likewise.
16355 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16357 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16358 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16360 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16362 * win32-low.c (handle_output_debug_string): Ignore event if not
16365 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16367 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16369 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16371 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16373 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16375 * inferiors.c (change_inferior_id): Add comment.
16376 * linux-low.c (check_removed_breakpoint): Add an early
16377 prototype. Improve debug output.
16378 (linux_attach): Doc update.
16379 (linux_detach_one_process, linux_detach): Clean up before releasing
16381 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16382 * linux-low.h (struct process_info): Doc improvement.
16383 * mem-break.c (delete_all_breakpoints): New.
16384 * mem-break.h (delete_all_breakpoints): New prototype.
16385 * thread-db.c (find_first_thread): New.
16386 (thread_db_create_event): Call it instead of
16387 thread_db_find_new_threads. Clean up unused variables.
16388 (maybe_attach_thread): Remove first thread handling.
16389 (thread_db_find_new_threads): Use find_first_thread.
16390 (thread_db_get_tls_address): Likewise.
16392 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16394 * thread-db.c (thread_db_find_new_threads): Add prototype.
16395 (thread_db_create_event): Check for the main thread before adding
16397 (maybe_attach_thread): Only enable event reporting if TID == 0.
16398 (thread_db_get_tls_address): Check for new threads.
16400 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16402 * linux-low.c (linux_create_inferior): Try execv before execvp.
16403 * spu-low.c (spu_create_inferior): Likewise.
16405 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16407 * linux-low.c (linux_create_inferior): Change execv to execvp.
16408 * spu-low.c (spu_create_inferior): Likewies.
16410 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16412 * Makefile.in (clean): Clean new files instead of deleted ones.
16413 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16414 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16416 * configure.srv: Specify XML files and new regformats for MIPS and
16418 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16419 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16420 an entry for the restart register.
16421 (mips_cannot_fetch_register, mips_cannot_store_register)
16422 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16423 register names to match the XML descriptions.
16424 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16425 restart register instead of $0.
16427 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16428 Markus Deuling <deuling@de.ibm.com>
16430 * remote-utils.c (decode_xfer_write): New function.
16431 * server.h (decode_xfer_write): Add prototype.
16432 * server.c (handle_query): Add PACKET_LEN argument. Support
16433 qXfer:spu:read and qXfer:spu:write packets.
16434 (main): Pass packet_len to handle_query.
16435 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16436 * target.h (target_ops): Add qxfer_spu.
16438 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16440 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16441 accessing non-seekable spufs files.
16443 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16445 * server.c (handle_query): Add reply for qC packet.
16447 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16448 Leo Zayas <lerele@champenstudios@com>
16450 * server.h (check_remote_input_interrupt_request): New function.
16451 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16452 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16453 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16454 (check_remote_input_interrupt_request): New function.
16455 * server.h (check_remote_input_interrupt_request): Declare.
16456 * win32-low.c (winapi_DebugBreakProcess,
16457 winapi_GenerateConsoleCtrlEvent): New typedefs.
16458 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16460 (win32_wait): Check for remote interrupt request
16461 with check_remote_input_interrupt_request.
16462 (win32_request_interrupt): New function.
16463 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16465 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16467 * win32-low.c (debug_registers_changed,
16468 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16469 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16470 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16471 (thread_rec): Get context using the low target.
16472 (child_add_thread): Call thread_added on the low target,
16473 which does the same thing.
16475 (do_initial_child_stuff): Remove debug registers references.
16476 Set context using the low target. Resume threads after
16477 setting the contexts.
16478 (child_continue): Remove dead variable. Remove debug
16479 registers references.
16480 (child_fetch_inferior_registers): Go through the low target.
16481 (do_child_store_inferior_registers): Remove.
16482 (child_store_inferior_registers): Go through the low target.
16483 (win32_resume): Remove debug registers references.
16484 Set context using the low target.
16485 (handle_exception): Change return type to void. Don't record
16486 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16487 first chance exception.
16488 (get_child_debug_event): Change return type to void. Remove
16489 goto loop. Always return after waiting for debug event.
16490 (win32_wait): Convert to switch statement. Handle spurious
16493 * win32-i386-low.c (debug_registers_changed,
16494 debug_registers_used): New.
16495 (initial_stuff): Rename to ...
16496 (i386_initial_stuff): ... this. Clear debug registers
16498 (store_debug_registers): Delete.
16499 (i386_get_thread_context): New.
16500 (load_debug_registers): Delete.
16501 (i386_set_thread_context): New.
16502 (i386_thread_added): New.
16503 (single_step): Rename to ...
16504 (i386_single_step): ... this.
16505 (do_fetch_inferior_registers): Rename to ...
16506 (i386_fetch_inferior_register): ... this.
16507 (i386_store_inferior_register): New.
16508 (the_low_target): Adapt to new interface.
16510 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16511 (arm_get_thread_context): New.
16512 (arm_set_thread_context): New.
16514 (do_fetch_inferior_registers): Rename to ...
16515 (arm_fetch_inferior_register): ... this.
16516 (arm_store_inferior_register): New.
16517 (arm_wince_breakpoint): Reimplement as unsigned long.
16518 (arm_wince_breakpoint_len): Define.
16519 (the_low_target): Adapt to new interface.
16521 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16522 load_debug_registers. Add get_thread_context, set_thread_context,
16523 thread_added and store_inferior_register. Rename
16524 fetch_inferior_registers to fetch_inferior_register.
16525 (regptr): Remove declaration.
16527 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16529 * linux-low.c (linux_detach): Change return type to int. Return 0.
16530 * spu-low.c (spu_detach): Likewise.
16532 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16534 * target.h (target_ops): Change return type of detach to int.
16536 (join_inferior): New.
16537 * server.c (main): Don't skip detach support on mingw32.
16538 If the inferior doesn't support detaching return error.
16539 Call join_inferior instead of using waitpid.
16540 * linux-low.c (linux_join): New.
16541 (linux_target_op): Add linux_join.
16542 * spu-low.c (spu_join): New.
16543 (spu_target_ops): Add spu_join.
16544 * win32-low.c (win32_detach): Adapt to new interface.
16545 Reopen current_process_handle before detaching. Issue a child
16546 resume before detaching.
16548 (win32_target_op): Add win32_join.
16550 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16552 * win32-low.c (win32-attach): Fix return value.
16553 * target.h (target_ops): Describe ATTACH return values.
16555 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16557 * win32-low.c (GETPROCADDRESS): Define.
16558 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16559 (winapi_DebugSetProcessKillOnExit): Likewise.
16560 (win32_create_inferior): Force usage of ansi CreateProcessA.
16561 (win32_attach): Use GETPROCADDRESS.
16562 (win32_detach): Likewise.
16564 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16566 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16568 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16570 * win32-low.c: Commit leftover changes from 2007-03-29.
16572 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16574 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16575 fields short instead of int. Add explicit padding.
16576 (i387_cache_to_fsave): Remove unnecessary casts.
16577 (i387_fsave_to_cache): Doc fix.
16578 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16580 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16582 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16583 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16585 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16587 * configure.srv (arm*-*-mingw32ce*): Move near the other
16590 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16592 * configure.ac: Add errno checking.
16593 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16594 sys/file.h and malloc.h.
16595 (AC_CHECK_DECLS): Add perror.
16596 (srv_mingwce): Handle.
16597 * configure.srv (i[34567]86-*-cygwin*): Add
16598 win32-i386-low.o to srv_tgtobj.
16599 (i[34567]86-*-mingw*): Likewise.
16600 (arm*-*-mingw32ce*): Add case.
16601 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16602 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16603 [__MINGW32CE__] (strerror): New function.
16604 [__MINGW32CE__] (errno): Define to GetLastError.
16605 [__MINGW32CE__] (COUNTOF): New macro.
16606 (remote_open): Remove extra close call.
16607 * mem-break.c (delete_breakpoint_at): New function.
16608 * mem-break.h (delete_breakpoint_at): Declare.
16609 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16610 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16611 [USE_WIN32API] (read, write): Add char* casts.
16612 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16613 * server.h: Include wincecompat.h on Windows CE.
16614 [HAVE_ERRNO_H]: Check.
16615 (perror): Declare if not declared.
16616 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16617 (perror_with_name): Remove errno declaration.
16618 * wincecompat.h: New.
16619 * wincecompat.c: New.
16620 * win32-low.h: New.
16621 * win32-arm-low.c: New.
16622 * win32-i386-low.c: New.
16623 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16624 (OUTMSG2): Make it safe.
16626 (COUNTOF): New macro.
16627 (NUM_REGS): Get it from the low target.
16628 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16629 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16630 (thread_rec): Let low target handle debug registers.
16631 (child_add_thread): Likewise.
16632 (child_init_thread_list): Likewise.
16633 (continue_one_thread): Likewise.
16635 (do_child_fetch_inferior_registers): Move to ...
16636 * win32-i386-low.c: ... here, and rename to ...
16637 (do_fetch_inferior_registers): ... this.
16638 * win32-low.c (child_fetch_inferior_registers):
16639 Go through the low target.
16640 (do_child_store_inferior_registers): Use regptr.
16641 (strwinerror): New function.
16642 (win32_create_inferior): Handle Windows CE.
16643 Use strwinerror instead of strerror on Windows error
16644 codes. Add program to the error output.
16645 Don't close the main thread handle on Windows CE.
16646 (win32_attach): Use coredll.dll on Windows CE.
16647 (win32_kill): Close current process and current
16649 (win32_detach): Use coredll.dll on Windows CE.
16650 (win32_resume): Let low target handle debug registers, and
16652 (handle_exception): Add/Remove initial breakpoint. Avoid
16653 non-existant WSTOPSIG on Windows CE.
16654 (win32_read_inferior_memory): Cast to remove warning.
16655 (win32_arch_string): Go through the low target.
16656 (initialize_low): Call set_breakpoint_data with the low
16657 target's breakpoint.
16658 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16659 FOP_REGNUM, mappings): Move to ...
16660 * win32-i386-low.c: ... here.
16661 * win32-low.c (win32_thread_info): Move to ...
16662 * win32-low.h: ... here.
16663 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16664 win32-arm-low.c and wincecompat.c.
16665 (all:): Add $EXEEXT.
16666 (install-only:): Likewise.
16667 (gdbserver:): Likewise.
16668 (gdbreplay:): Likewise.
16669 * config.in: Regenerate.
16670 * configure: Regenerate.
16672 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16674 * win32-low.c: Rename typedef thread_info to
16675 win32_thread_info throughout.
16677 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16679 * win32-i386-low.c: Rename to ...
16680 * win32-low.c: ... this.
16681 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16682 * Makefile.in: Likewise.
16684 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16686 * remote-utils.c (monitor_output): Constify msg parameter.
16687 * server.h (monitor_output): Likewise.
16688 * win32-i386-low.c (handle_output_debug_string): New.
16689 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16690 handle_output_debug_string.
16691 (get_child_debug_event): Likewise.
16693 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16695 * server.c (main): Correct strtoul check.
16697 2007-03-27 Jon Ringle <jon@ringle.org>
16699 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16701 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16703 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16705 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16707 * terminal.h: Check HAVE_SGTTY_H.
16709 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16711 * remote-utils.c (remote_open): Print out the assigned port number.
16713 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16715 * remote-utils.c (monitor_output): New function.
16716 * server.c (debug_threads): Define here.
16717 (monitor_show_help): New function.
16718 (handle_query): Handle qRcmd.
16719 (main): Do not handle 'd' packet.
16720 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16721 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16724 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16726 * Makefile.in (EXEEXT): New.
16727 (clean): Use $(EXEEXT).
16729 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16731 * target.h (target_ops): Rename send_signal to request_interrupt,
16732 and remove enum target_signal parameter.
16733 * linux-low.c (linux_request_interrupt): Rename from
16734 linux_send_signal, and always send SIGINT.
16735 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16736 and always send SIGINT.
16737 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16739 (input_interrupt): Likewise.
16741 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16743 * server.c (get_features_xml): Check if target implemented
16745 * win32-i386-low.c (win32_arch_string): New.
16746 (win32_target_ops): Add win32_arch_string as arch_string member.
16748 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16750 * spu-low.c (spu_arch_string): New.
16751 (spu_target_ops): Add spu_arch_string.
16753 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16755 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16756 * configure.ac: Do not check for terminal.h.
16757 * configure, config.in: Regenerated.
16759 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16761 * Makefile.in (OBS): Add $(XML_BUILTIN).
16762 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16764 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16765 (arm-with-iwmmxt.c): New.
16766 * config.in, configure: Regenerate.
16767 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16768 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16769 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16770 (arm*-*-linux*): Add iWMMXt and regset support.
16771 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16772 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16773 (arm_store_wmmxregset, target_regsets): New.
16774 * server.c (get_features_xml): Take annex argument. Check builtin
16776 (handle_query): Handle multiple annexes.
16778 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16780 * remote-utils.c [USE_WIN32API] (read, write): Define.
16781 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16784 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16786 * linux-i386-low.c (the_low_target): Set arch_string.
16787 * linux-x86-64-low.c (the_low_target): Likewise.
16788 * linux-low.c (linux_arch_string): New.
16789 (linux_target_ops): Add it.
16790 * linux-low.h (struct linux_target_ops): Add arch_string.
16791 * server.c (write_qxfer_response): Use const void * for DATA.
16792 (get_features_xml): New.
16793 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16794 * target.h (struct target_ops): Add arch_string method.
16796 2007-01-03 Denis Pilat <denis.pilat@st.com>
16797 Daniel Jacobowitz <dan@codesourcery.com>
16799 * linux-low.c (linux_kill): Handle being called with no threads.
16800 * win32-i386-low.c (win32_kill): Likewise.
16801 (get_child_debug_event): Clear current_process_handle.
16803 2006-12-30 Denis PILAT <denis.pilat@st.com>
16804 Daniel Jacobowitz <dan@codesourcery.com>
16806 * remote-utils.c (remote_open): Check the type of specified
16807 serial port devices before opening them.
16808 * server.c (main): Kill the inferior if an error occurs during
16809 the first remote_open.
16811 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16813 * README: Update supported targets.
16815 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16817 * Makefile.in (clean): Remove reg-mips64.c.
16818 (reg-mips64.c, reg-mips64.o): New rules.
16819 * configure.srv: Handle mips64. Include regset support for mips.
16820 * linux-mips-low.c (union mips_register): New.
16821 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16822 (mips_breakpoint, mips_breakpoint_at): Use int.
16823 (mips_collect_register, mips_supply_register)
16824 (mips_collect_register_32bit, mips_supply_register_32bit)
16825 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16826 (mips_store_fpregset, target_regsets): New.
16827 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16829 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16831 * configure.srv: Add target "spu*-*-*".
16832 * Makefile.in (clean): Remove reg-spu.c.
16833 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16834 * spu-low.c: New file.
16836 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16838 * configure.ac: Correct td_thr_tls_get_addr test.
16839 * configure: Regenerated.
16841 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16843 * linux-low.c (linux_wait_for_event): Reformat. Use the
16844 pass_signals array.
16845 * remote-utils.c (decode_address_to_semicolon): New.
16846 * server.c (pass_signals, handle_general_set): New.
16847 (handle_query): Mention QPassSignals for qSupported.
16848 (main): Call handle_general_set.
16849 * server.h (pass_signals, decode_address_to_semicolon): New.
16851 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16853 * server.c (handle_query): Correct error handling for read_auxv.
16855 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16857 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16858 and srv_linux_thread_db to yes.
16859 * linux-s390-low.c (s390_fill_gregset): New function.
16860 (target_regsets): Define data structure.
16862 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16864 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16865 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16866 * config.in, configure: Regenerated.
16867 * inferiors.c (gdb_id_to_thread): New function.
16868 (gdb_id_to_thread_id): Use it.
16869 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16870 * linux-low.h (struct process_info): Add th member.
16871 (thread_db_get_tls_address): New prototype.
16872 * remote-utils.c (decode_address): Make non-static.
16873 * server.c (handle_query): Handle qGetTLSAddr.
16874 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16875 * target.h (struct target_ops): Add get_tls_address.
16876 * thread-db.c (maybe_attach_thread): Save the thread handle.
16877 (thread_db_get_tls_address): New.
16879 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16881 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16882 (linux_resume_one_process): Take a siginfo_t *. Update all
16883 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16884 (struct pending_signals): Add a siginfo_t.
16885 (linux_wait_for_process): Always set last_status.
16886 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16887 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16888 * linux-low.h (struct process_info): Add last_status.
16890 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16892 * remote-utils.c (try_rle): New function.
16893 (putpkt_binary): Use it.
16895 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16897 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16898 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16899 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16900 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16901 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16904 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16906 * server.c (terminal_fd): New variable.
16907 (old_foreground_pgrp): Likewise.
16908 (restore_old_foreground_pgrp): New function.
16909 (start_inferior): Record the terminal file descriptor in terminal_fd
16910 and its original foreground group in old_foreground_pgrp. Register
16911 restore_old_foreground_pgrp with atexit().
16913 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16915 * server.c (handle_query): Correct qPart to qXfer.
16917 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16919 * configure.ac: Check for more headers which are missing on
16920 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16921 * configure.srv: Add Cygwin and mingw32.
16922 * remote-utils.c: Don't include headers unconditionally which
16923 are missing on mingw32. Include <winsock.h> for mingw32.
16924 (remote_open): Adjust for mingw32 support. Flush
16925 standard error after writing to it.
16926 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16927 (unblock_async_io, enable_async_io, disable_async_io)
16928 (readchar, getpkt): Update for Winsock support.
16929 (prepare_resume_reply): Expect a protocol signal number.
16930 * server.c: Disable <sys/wait.h> on mingw32.
16931 (start_inferior): Adjust for mingw32 support. Flush
16932 standard error after writing to it.
16933 (attach_inferior): Likewise. Use protocol signal
16935 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16937 * win32-i386-low.c: New file.
16938 * Makefile.in (XM_CLIBS): Set.
16939 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16940 (win32-i386-low.o): New dependency rule.
16941 * linux-low.c (linux_wait): Use target signal numbers.
16942 * target.h (struct target_ops): Doc fix.
16943 * server.h (target_signal_to_name): New prototype.
16944 * gdbreplay.c: Don't include headers unconditionally which
16945 are missing on mingw32. Include <winsock.h> for mingw32.
16946 (remote_close, remote_open): Adjust for Winsock support.
16947 * configure, config.in: Regenerated.
16949 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16951 * server.c (decode_xfer_read, write_qxfer_response): New.
16952 (handle_query): Take a packet length argument. Handle
16953 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16954 the qSupported response.
16955 (main): Update call to handle_query.
16957 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16959 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16960 (putpkt_binary): Renamed from putpkt and adjusted for binary
16962 (putpkt): New wrapper for putpkt_binary.
16963 (readchar): Don't mask off the high bit.
16964 (decode_X_packet): New function.
16965 * server.c (main): Call putpkt_binary if a handler sets the packet
16966 length. Save the length of the incoming packet. Handle 'X'.
16967 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16969 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16971 * server.c (handle_query): Handle qSupported.
16973 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16975 * remote-utils.c (all_symbols_looked_up): New variable.
16976 (look_up_one_symbol): Check it.
16977 * server.h (look_up_one_symbol): New declaration.
16978 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16980 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16982 * Makefile.in (linux-arm-low.o): Update dependencies.
16983 * linux-arm-low.c: Include "gdb_proc_service.h".
16984 (PTRACE_GET_THREAD_AREA): Define.
16985 (ps_get_thread_area): New function.
16987 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16989 * configure.srv (m68k*-*-uclinux*): New target.
16990 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16991 (linux_resume_one_process): Remove extraneous cast.
16992 (linux_read_offsets): New.
16993 (linux_target_op): Add linux_read_offsets on mmuless systems.
16994 * server.c (handle_query): Add qOffsets logic.
16995 * target.h (struct target_ops): Add read_offsets.
16997 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16999 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17000 (PTRACE_GET_THREAD_AREA): Define.
17001 (ps_get_thread_area): New function.
17002 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17003 (linux-x86-64-low.o): Update.
17005 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17007 * configure.ac: Remove checks for prfpregset_t.
17008 * gdb_proc_service.h: New file.
17009 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17010 new "gdb_proc_service.h".
17011 * proc-service.c: Likewise.
17012 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17013 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17014 * Makefile.in (gdb_proc_service_h): Updated.
17015 * configure, config.in: Regenerated.
17017 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17019 * remote-utils.c (prepare_resume_reply): Move declaration
17020 of gdb_id_from_wait to the top of the block.
17022 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17024 * linux-low.c (regsets_store_inferior_registers): Read the regset
17025 from the target before filling it.
17027 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17029 * server.c (attach_inferior): Return SIGTRAP for a successful
17032 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17034 * Makefile.in (OBS): Add version.o.
17035 (STAGESTUFF): Delete.
17036 (version.o): Add dependencies.
17037 (version.c): Replace rule.
17038 (clean): Remove version.c.
17039 * server.c (gdbserver_version): New.
17040 (gdbserver_usage): Use printf.
17041 (main): Handle --version and --help.
17042 * server.h (version, host_name): Add declarations.
17044 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17056 * linux-x86-64-low.c:
17058 * linux-s390-low.c:
17059 * linux-ppc64-low.c:
17061 * linux-mips-low.c:
17062 * linux-m68k-low.c:
17063 * linux-m32r-low.c:
17066 * linux-ia64-low.c:
17067 * linux-i386-low.c:
17068 * linux-crisv32-low.c:
17080 * gdbserver.1: Add (C) after Copyright. Update the FSF
17083 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17085 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17086 (arm_breakpoint_at): Recognize both breakpoints.
17087 (the_low_target): Use the correct breakpoint instruction.
17089 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17091 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17092 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17093 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17094 (the_low_target): Update.
17096 2005-10-25 Andreas Schwab <schwab@suse.de>
17098 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17100 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17101 (ia64_num_regs): Reduce to 462.
17103 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17105 * acinclude.m4: Correct quoting.
17106 * aclocal.m4: Regenerated.
17108 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17109 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17110 (thread_db_init): Call thread_db_err_str.
17111 * configure.ac: Check for TD_VERSION.
17112 * config.in, configure: Regenerated.
17114 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17116 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17118 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17120 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17121 is not available. Define HAVE_PTRACE_GETREGS if it is.
17122 * config.in, configure: Regenerated.
17123 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17124 * linux-i386-low.c, linux-m68k-low.c: Update to use
17125 HAVE_PTRACE_GETREGS.
17126 * linux-low.c (regsets_fetch_inferior_registers)
17127 (regsets_store_inferior_registers): Only return 0 if we processed
17129 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17130 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17132 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17134 * inferiors.c (struct thread_info): Add gdb_id.
17135 (add_thread): Add gdb_id argument.
17136 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17137 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17138 calls to add_thread.
17139 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17140 * server.c (handle_query): Use thread_to_gdb_id.
17141 (handle_v_cont, main): Use gdb_id_to_thread_id.
17142 * server.h (add_thread): Update prototype.
17143 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17146 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17148 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17149 left-padded registers.
17150 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17151 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17153 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17155 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17156 * configure: Regenerate.
17157 * config.in: Regenerate.
17158 * server.h (NEED_DECLARATION_STRERROR):
17159 Replace with !HAVE_DECL_STRERROR.
17161 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17163 * linux-low.c (linux_wait, linux_send_signal): Don't test
17164 an unsigned long variable for > 0 if it could be MAX_ULONG.
17165 * server.c (myresume): Likewise.
17166 * target.c (set_desired_inferior): Likewise.
17168 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17170 * configure.ac: Simplify and improve check for socklen_t.
17171 * configure, config.in: Regenerate.
17173 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17175 * acconfig.h: Remove.
17176 * configure.ac: Add a test for socklen_t. Use three-argument
17177 AC_DEFINE throughout.
17178 * config.in: Regenerated using autoheader 2.59.
17179 * configure: Regenerated.
17181 * gdbreplay.c (socklen_t): Provide a default.
17182 (remote_open): Use socklen_t.
17183 * remote-utils.c (socklen_t): Provide a default.
17184 (remote_open): Use socklen_t.
17185 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17188 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17190 * linux-low.c (linux_read_memory, linux_write_memory)
17191 (linux_read_auxv): Likewise.
17192 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17193 (check_mem_write): Likewise.
17194 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17196 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17197 (registers_from_string, register_data): Likewise.
17198 * server.c (handle_query, main): Likewise.
17199 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17200 (decode_M_packet): Likewise.
17201 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17202 * target.h (struct target_ops): Update read_memory, write_memory,
17204 (read_inferior_memory, write_inferior_memory): Update.
17205 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17206 to unsigned char *.
17207 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17208 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17209 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17210 linux-s390-low.c, linux-sh-low.c: Update for changes in
17211 read_inferior_memory and the_low_target->breakpoint.
17213 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17215 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17216 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17217 * configure.srv: Add powerpc64-*-linux*.
17218 * linux-ppc64-low.c: New file.
17220 2005-05-23 Orjan Friberg <orjanf@axis.com>
17222 * linux-cris-low.c: New file with support for CRIS.
17223 * linux-crisv32-low.c: Ditto for CRISv32.
17224 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17225 (clean): Add reg-cris.c and reg-crisv32.c.
17226 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17227 reg-crisv32.o, and reg-crisv32.c to make rules.
17228 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17229 recognized targets.
17231 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17233 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17234 of sizeof (PTRACE_XFER_TYPE).
17235 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17237 2005-05-12 Orjan Friberg <orjanf@axis.com>
17239 * target.h (struct target_ops): Add insert_watchpoint,
17240 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17241 pointers for hardware watchpoint support.
17242 * linux-low.h (struct linux_target_ops): Ditto.
17243 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17244 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17245 to linux_target_ops.
17246 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17248 * server.c (main): Recognize 'Z' and 'z' packets.
17250 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17252 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17253 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17254 (the_low_target): Add new members.
17256 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17258 * proc-service.c (ps_lgetregs): Search all_processes instead of
17261 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17263 * server.c (start_inferior): Change return type to int.
17264 (attach_inferior): Change sigptr to int *.
17265 (handle_v_cont, handle_v_requests): Change signal to int *.
17266 (main): Change signal to int.
17268 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17270 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17271 * configure.srv: Add m32r*-*-linux*.
17272 * linux-m32r-low.c: New file.
17274 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17276 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17278 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17280 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17281 Take unsigned long arguments for PIDs.
17282 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17283 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17284 (wait_for_sigstop, linux_resume_one_process)
17285 (regsets_fetch_inferior_registers, linux_send_signal)
17286 (linux_read_auxv): Likewise. Update the types of variables holding
17287 PIDs. Update format string specifiers.
17288 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17289 * remote-utils.c (prepare_resume_reply): Likewise.
17290 * server.c (cont_thread, general_thread, step_thread)
17291 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17293 (handle_query): Update format specifiers.
17294 (handle_v_cont, main): Use strtoul for thread IDs.
17295 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17296 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17297 (general_thread, step_thread, thread_from_wait)
17298 (old_thread_from_wait): Update.
17299 * target.h (struct thread_resume): Use unsigned long for THREAD.
17300 (struct target_ops): Use unsigned long for arguments to attach and
17303 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17305 * acinclude.m4: Include bfd/bfd.m4 directly.
17306 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17307 <agriffis@toolchain.org>.
17308 * aclocal.m4, configure: Regenerated.
17310 2005-01-07 Andrew Cagney <cagney@gnu.org>
17312 * configure.ac: Rename configure.in, require autoconf 2.59.
17313 * configure: Re-generate.
17315 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17317 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17318 LIBS when finished.
17319 * aclocal.m4: Regenerated.
17320 * configure: Regenerated.
17322 2004-11-21 Andreas Schwab <schwab@suse.de>
17324 * linux-m68k-low.c (m68k_num_gregs): Define.
17325 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17326 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17327 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17328 (m68k_breakpoint_at): New. Add to the_low_target.
17330 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17331 srv_linux_thread_db to yes.
17333 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17335 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17336 (ARCH_SET_FS): Likewise.
17337 (ARCH_GET_FS): Likewise.
17338 (ARCH_GET_GS): Likewise.
17340 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17342 * linux-i386-low.c (ps_get_thread_area): New.
17343 * linux-x86-64-low.c (ps_get_thread_area): New.
17344 * linux-low.c: Include <sys/syscall.h>.
17345 (linux_kill_one_process): Don't kill the first thread here.
17346 (linux_kill): Kill the first thread here.
17347 (kill_lwp): New function.
17348 (send_sigstop, linux_send_signal): Use it.
17349 * proc-service.c: Clean up #ifdefs.
17350 (fpregset_info): Delete.
17351 (ps_lgetregs): Update and enable implementation.
17352 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17354 * remote-utils.c (struct sym_cache, symbol_cache): New.
17355 (input_interrupt): Print a clearer message.
17356 (async_io_enabled): New variable.
17357 (enable_async_io, disable_async_io): Use it. Update comments.
17358 (look_up_one_symbol): Use the symbol cache.
17359 * thread-db.c (thread_db_look_up_symbols): New function.
17360 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17362 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17364 * configure.in: Test for -rdynamic.
17365 * configure: Regenerated.
17366 * Makefile (INTERNAL_LDFLAGS): New.
17367 (gdbserver, gdbreplay): Use it.
17369 2004-09-02 Andrew Cagney <cagney@gnu.org>
17371 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17373 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17375 * linux-low.c (linux_wait): Clear all_processes list also.
17377 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17379 * linux-low.c: Include <errno.h>. Remove extern declaration of
17382 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17384 * gdbreplay.c, server.h, utils.c: Update copyright years.
17386 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17388 * server.c (main): Print child status or termination signal from
17389 variable 'signal', not 'sig'.
17391 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17393 * linux-low.c (linux_read_memory): Change return type to
17394 int. Check for and return error from ptrace().
17395 * target.c (read_inferior_memory): Change return type to int. Pass
17396 back return status from the_target->read_memory().
17397 * target.h (struct target_ops): Adapt *read_memory() prototype.
17399 (read_inferior_memory): Adapt prototype.
17400 * server.c (main): Return an error packet if
17401 read_inferior_memory() returns an error.
17403 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17405 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17406 Unify with other clean targets.
17408 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17410 * server.c (handle_v_cont): Call set_desired_inferior.
17412 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17414 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17416 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17418 * linux-low.c (linux_wait): Unblock async I/O.
17419 (linux_resume): Block and enable async I/O.
17420 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17421 * server.h (block_async_io, unblock_async_io): Add prototypes.
17423 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17425 * remote-utils.c (remote_open): Print a status notice after
17426 opening a TCP port.
17427 * server.c (attach_inferior): Print a status notice after
17430 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17432 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17434 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17436 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17438 * server.c, target.h: Update copyright years.
17440 2004-02-25 Roland McGrath <roland@redhat.com>
17442 * target.h (struct target_ops): New member `read_auxv'.
17443 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17444 * linux-low.c (linux_read_auxv): New function.
17445 (linux_target_ops): Initialize `read_auxv' member to that.
17447 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17449 Committed by Jim Blandy <jimb@redhat.com>.
17451 * linux-s390-low.c (s390_num_regs): Update.
17452 (s390_regmap): Remove control registers. Use __s390x__ predefine
17453 instead of GPR_SIZE to distiguish s390 and s390x targets.
17455 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17457 * linux-low.c: Update copyright year.
17458 (check_removed_breakpoint): Clear pending_is_breakpoint.
17459 (linux_set_resume_request, linux_queue_one_thread)
17460 (resume_status_pending_p): New functions.
17461 (linux_continue_one_thread): Use process->resume.
17462 (linux_resume): Only resume threads if there are no pending events.
17463 * linux-low.h (struct process_info): Add resume request
17466 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17468 * regcache.c (new_register_cache): Clear the allocated register
17469 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17471 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17473 * linux-low.c (linux_resume): Take a struct thread_resume *
17475 (linux_wait): Update call.
17476 (resume_ptr): New static variable.
17477 (linux_continue_one_thread): Renamed from
17478 linux_continue_one_process. Use resume_ptr.
17479 (linux_resume): Use linux_continue_one_thread.
17480 * server.c (handle_v_cont, handle_v_requests): New functions.
17481 (myresume): New function.
17482 (main): Handle 'v' case.
17483 * target.h (struct thread_resume): New type.
17484 (struct target_ops): Change argument of "resume" to struct
17486 (myresume): Delete macro.
17488 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17490 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17491 (uninstall): Support DESTDIR.
17493 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17495 * configure.srv: Add xscale*linux copy of arm*linux entry.
17497 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17499 * linux-arm-low.c (arm_reinsert_addr): New function.
17500 (the_low_target): Add arm_reinsert_addr.
17502 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17504 * mem-break.c: Remove whitespace at end of file.
17506 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17508 * configure.in: Check whether we need to prototype strerror.
17509 * server.h: Optionally prototype strerror.
17510 * gdbreplay.c (perror_with_name): Use strerror.
17511 * linux-low.c (linux_attach_lwp): Use strerror.
17512 * utils.c (perror_with_name): Use strerror.
17513 * config.in, configure: Regenerated.
17515 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17517 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17518 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17520 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17522 * Makefile.in (SFILES): Update.
17523 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17524 low-sun3.c: Remove files.
17526 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17528 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17529 (linux_detach_one_process, linux_detach): New functions.
17530 (linux_target_ops): Add linux_detach.
17531 * server.c (main): Handle 'D' packet.
17532 * target.h (struct target_ops): Add "detach" member.
17533 (detach_inferior): Define.
17535 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17537 From Kelley Cook <kelleycook@wideopenwest.com>:
17538 * configure.srv: Accept i[34567]86 variants.
17540 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17542 * linux-low.c (linux_wait_for_event): Correct comment typos.
17543 (linux_resume_one_process): Call check_removed_breakpoint.
17544 (linux_send_signal): New function.
17545 (linux_target_ops): Add linux_send_signal.
17546 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17548 * target.h (struct target_ops): Add send_signal.
17550 2003-05-29 Jim Blandy <jimb@redhat.com>
17552 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17553 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17554 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17555 away part of the register's value.
17557 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17559 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17560 (linux_wait_for_event, linux_init_signals): Likewise.
17562 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17564 * configure.in: Check for stdlib.h.
17565 * configure: Regenerated.
17566 * config.in: Regenerated.
17568 2003-01-04 Andreas Schwab <schwab@suse.de>
17570 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17572 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17574 * Makefile.in: Remove obsolete code.
17576 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17578 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17579 defined(PT_FPR0_HI).
17581 2002-11-17 Stuart Hughes <seh@zee2.com>
17583 * linux-arm-low.c (arm_num_regs): Increase.
17584 (arm_regmap): Include status register.
17586 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17588 * linux-low.c (register_addr): Remove incorrect -1 check.
17590 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17592 * linux-low.c (linux_create_inferior): Call setpgid. Return
17594 (unstopped_p, linux_signal_pid): Remove.
17595 (linux_target_ops): Remove linux_signal_pid.
17596 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17597 global instead of target method.
17598 * target.h (struct target_ops): Remove signal_pid. Update comment
17599 for create_inferior.
17600 * server.c (signal_pid): New variable.
17601 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17602 gdbserver. Set the child to be the foreground process group.
17603 (attach_inferior): Set signal_pid.
17605 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17607 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17609 2002-08-20 Jim Blandy <jimb@redhat.com>
17611 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17614 2002-08-01 Andrew Cagney <cagney@redhat.com>
17616 * Makefile.in: Make chill references obsolete.
17618 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17620 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17621 * configure: Regenerate.
17622 * config.in: Regenerate.
17624 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17626 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17627 (perror_with_name, remote_close, remote_open, expect, play): Static.
17629 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17631 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17632 byte offsets instead of an array of indexes.
17633 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17635 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17637 * regcache.c: Add comment.
17639 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17641 * thread-db.c: New file.
17642 * proc-service.c: New file.
17643 * acinclude.m4: New file.
17644 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17645 proc-service.o, and thread-db.o.
17646 (linux-low.o): Add USE_THREAD_DB.
17647 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17648 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17649 * aclocal.m4: Regenerated.
17650 * config.in: Regenerated.
17651 * configure: Regenerated.
17652 * configure.in: Check for proc_service.h, sys/procfs.h,
17653 thread_db.h, and linux/elf.h headrs.
17654 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17655 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17656 Check for -lthread_db and thread support.
17657 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17658 PowerPC, and SuperH.
17659 * i387-fp.c: Constify arguments.
17660 * i387-fp.h: Likewise.
17661 * inferiors.c: (struct thread_info): Renamed from
17662 `struct inferior_info'. Remove PID member. Use generic inferior
17663 list header. All uses updated.
17664 (inferiors, signal_pid): Removed.
17665 (all_threads): New variable.
17666 (get_thread): Define.
17667 (add_inferior_to_list): New function.
17668 (for_each_inferior): New function.
17669 (change_inferior_id): New function.
17670 (add_inferior): Removed.
17671 (remove_inferior): New function.
17672 (add_thread): New function.
17673 (free_one_thread): New function.
17674 (remove_thread): New function.
17675 (clear_inferiors): Use for_each_inferior and free_one_thread.
17676 (find_inferior): New function.
17677 (find_inferior_id): New function.
17678 (inferior_target_data): Update argument type.
17679 (set_inferior_target_data): Likewise.
17680 (inferior_regcache_data): Likewise.
17681 (set_inferior_regcache_data): Likewise.
17682 * linux-low.c (linux_bp_reinsert): Remove.
17683 (all_processes, stopping_threads, using_thrads)
17684 (struct pending_signals, debug_threads, pid_of): New.
17685 (inferior_pid): Replace with macro.
17686 (struct inferior_linux_data): Remove.
17687 (get_stop_pc, add_process): New functions.
17688 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17689 Use add_process and add_thread.
17690 (linux_attach_lwp): New function, based on old linux_attach. Use
17691 add_process and add_thread. Set stop_expected for new threads.
17692 (linux_attach): New function.
17693 (linux_kill_one_process): New function.
17694 (linux_kill): Kill all LWPs.
17695 (linux_thread_alive): Use find_inferior_id.
17696 (check_removed_breakpoints, status_pending_p): New functions.
17697 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17698 Update. Use WNOHANG. Wait for cloned processes also. Update process
17699 struct for the found process.
17700 (linux_wait_for_event): New function.
17701 (linux_wait): Use it. Support LWPs.
17702 (send_sigstop, wait_for_sigstop, stop_all_processes)
17703 (linux_resume_one_process, linux_continue_one_process): New functions.
17704 (linux_resume): Support LWPs.
17705 (REGISTER_RAW_SIZE): Remove.
17706 (fetch_register): Use register_size instead. Call supply_register.
17707 (usr_store_inferior_registers): Likewise. Call collect_register.
17708 Fix recursive case.
17709 (regsets_fetch_inferior_registers): Improve error message.
17710 (regsets_store_inferior_registers): Add debugging.
17711 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17712 (unstopped_p, linux_signal_pid): New functions.
17713 (linux_target_ops): Add linux_signal_pid.
17714 (linux_init_signals): New function.
17715 (initialize_low): Call it. Initialize using_threads.
17716 * regcache.c (inferior_regcache_data): Add valid
17718 (get_regcache): Fetch registers lazily. Add fetch argument
17719 and update all callers.
17720 (regcache_invalidate_one, regcache_invalidate): New
17722 (new_register_cache): Renamed from create_register_cache.
17723 Return the new regcache.
17724 (free_register_cache): Change argument to a void *.
17725 (registers_to_string, registers_from_string): Call get_regcache
17726 with fetch flag set.
17727 (register_data): Make static. Pass fetch flag to get_regcache.
17728 (supply_register): Call get_regcache with fetch flag clear.
17729 (collect_register): Call get_regcache with fetch flag set.
17730 (collect_register_as_string): New function.
17731 * regcache.h: Update.
17732 * remote-utils.c (putpkt): Flush after debug output and use
17734 Handle input interrupts while waiting for an ACK.
17735 (input_interrupt): Use signal_pid method.
17736 (getpkt): Flush after debug output and use stderr.
17737 (outreg): Use collect_register_as_string.
17738 (new_thread_notify, dead_thread_notify): New functions.
17739 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17740 and general_thread.
17741 (look_up_one_symbol): Flush after debug output.
17742 * server.c (step_thread, server_waiting): New variables.
17743 (start_inferior): Don't use signal_pid. Update call to mywait.
17744 (attach_inferior): Update call to mywait.
17745 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17746 (main): Don't fetch/store registers explicitly. Use
17747 set_desired_inferior. Support proposed ``Hs'' packet. Update
17749 * server.h: Update.
17750 (struct inferior_list, struct_inferior_list_entry): New.
17751 * target.c (set_desired_inferior): New.
17752 (write_inferior_memory): Constify.
17753 (mywait): New function.
17754 * target.h: Update.
17755 (struct target_ops): New signal_pid method.
17756 (mywait): Removed macro, added prototype.
17758 * linux-low.h (regset_func): Removed.
17759 (regset_fill_func, regset_store_func): New.
17760 (enum regset_type): New.
17761 (struct regset_info): Add type field. Use new operation types.
17762 (struct linux_target_ops): stop_pc renamed to get_pc.
17763 Add decr_pc_after_break and breakpoint_at.
17764 (get_process, get_thread_proess, get_process_thread)
17765 (strut process_info, all_processes, linux_attach_lwp)
17766 (thread_db_init): New.
17768 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17769 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17770 (the_low_target): Add new members.
17771 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17772 (i386_store_fpxregset): Constify.
17773 (target_regsets): Add new kind identifier.
17774 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17775 (i386_set_pc): Add debugging.
17776 (i386_breakpoint_at): New function.
17777 (the_low_target): Add new members.
17778 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17779 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17780 (mips_breakpoint_at): New.
17781 (the_low_target): Add new members.
17782 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17783 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17784 (the_low_target): Add new members.
17785 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17786 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17787 (the_low_target): Add new members.
17788 * linux-x86-64-low.c (target_regsets): Add new kind
17791 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17793 From Martin Pool <mbp@samba.org>:
17794 * server.c (gdbserver_usage): New function.
17797 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17799 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17800 stop_at -> stop_pc.
17802 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17804 * Makefile.in: Remove obsolete code.
17806 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17808 * linux-low.c (regsets_fetch_inferior_registers),
17809 (regsets_store_inferior_registers): Removed cast to int from
17811 * regcache.h: Added declaration of struct inferior_info.
17813 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17815 * inferiors.c (struct inferior_info): Add regcache_data.
17816 (add_inferior): Call create_register_cache.
17817 (clear_inferiors): Call free_register_cache.
17818 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17819 * regcache.c (struct inferior_regcache_data): New.
17820 (registers): Remove.
17821 (get_regcache): New function.
17822 (create_register_cache, free_register_cache): New functions.
17823 (set_register_cache): Don't initialize the register cache here.
17824 (registers_to_string, registers_from_string, register_data): Call
17826 * regcache.h: Add prototypes.
17827 * server.h: Likewise.
17829 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17831 * mem-break.c: New file.
17832 * mem-break.h: New file.
17833 * Makefile.in: Add mem-break.o rule; update server.h
17835 * inferiors.c (struct inferior_info): Add target_data
17837 (clear_inferiors): Free target_data member if set.
17838 (inferior_target_data, set_inferior_target_data): New functions.
17839 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17840 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17841 * linux-low.c (linux_bp_reinsert): New variable.
17842 (struct inferior_linux_data): New.
17843 (linux_create_inferior): Use set_inferior_target_data.
17844 (linux_attach): Likewise. Call add_inferior.
17845 (linux_wait_for_one_inferior): New function.
17846 (linux_wait): Call it.
17847 (linux_write_memory): Add const.
17848 (initialize_low): Call set_breakpoint_data.
17849 * linux-low.h (struct linux_target_ops): Add breakpoint
17851 * server.c (attach_inferior): Remove extra add_inferior
17853 * server.h: Include mem-break.h. Update inferior.c
17855 * target.c (read_inferior_memory)
17856 (write_inferior_memory): New functions.
17857 * target.h (read_inferior_memory)
17858 (write_inferior_memory): Change macros to prototypes.
17859 (struct target_ops): Update comments. Add const to write_memory
17862 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17864 * linux-low.c (usr_store_inferior_registers): Support
17865 registers which are allowed to fail to store.
17866 * linux-low.h (linux_target_ops): Likewise.
17867 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17868 (ppc_cannot_store_register): FPSCR may not be storable.
17870 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17872 * server.h: Include <string.h> if HAVE_STRING_H.
17873 * ChangeLog: Correct paths in last ChangeLog entry.
17875 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17877 * linux-low.h: Remove obsolete prototypes.
17878 (struct linux_target_ops): New.
17879 (extern the_low_target): New.
17880 * linux-low.c (num_regs, regmap): Remove declarations.
17881 (register_addr): Use the_low_target explicitly.
17882 (fetch_register): Likewise.
17883 (usr_fetch_inferior_registers): Likewise.
17884 (usr_store_inferior_registers): Likewise.
17885 * linux-arm-low.c (num_regs): Remove.
17886 (arm_num_regs): Define.
17887 (arm_regmap): Renamed from regmap, made static.
17888 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17890 (arm_cannot_store_register): Renamed from cannot_store_register,
17892 (the_low_target): New.
17893 * linux-i386-low.c (num_regs): Remove.
17894 (i386_num_regs): Define.
17895 (i386_regmap): Renamed from regmap, made static.
17896 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17898 (i386_cannot_store_register): Renamed from cannot_store_register,
17900 (the_low_target): New.
17901 * linux-ia64-low.c (num_regs): Remove.
17902 (ia64_num_regs): Define.
17903 (ia64_regmap): Renamed from regmap, made static.
17904 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17906 (ia64_cannot_store_register): Renamed from cannot_store_register,
17908 (the_low_target): New.
17909 * linux-m68k-low.c (num_regs): Remove.
17910 (m68k_num_regs): Define.
17911 (m68k_regmap): Renamed from regmap, made static.
17912 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17914 (m68k_cannot_store_register): Renamed from cannot_store_register,
17916 (the_low_target): New.
17917 * linux-mips-low.c (num_regs): Remove.
17918 (mips_num_regs): Define.
17919 (mips_regmap): Renamed from regmap, made static.
17920 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17922 (mips_cannot_store_register): Renamed from cannot_store_register,
17924 (the_low_target): New.
17925 * linux-ppc-low.c (num_regs): Remove.
17926 (ppc_num_regs): Define.
17927 (ppc_regmap): Renamed from regmap, made static.
17928 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17930 (ppc_cannot_store_register): Renamed from cannot_store_register,
17932 (the_low_target): New.
17933 * linux-s390-low.c (num_regs): Remove.
17934 (s390_num_regs): Define.
17935 (s390_regmap): Renamed from regmap, made static.
17936 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17938 (s390_cannot_store_register): Renamed from cannot_store_register,
17940 (the_low_target): New.
17941 * linux-sh-low.c (num_regs): Remove.
17942 (sh_num_regs): Define.
17943 (sh_regmap): Renamed from regmap, made static.
17944 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17946 (sh_cannot_store_register): Renamed from cannot_store_register,
17948 (the_low_target): New.
17949 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17950 (the_low_target): New.
17952 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17954 * Makefile.in: Add stamp-h target.
17955 * configure.in: Create stamp-h.
17956 * configure: Regenerated.
17958 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17960 * inferiors.c: New file.
17961 * target.c: New file.
17962 * target.h: New file.
17963 * Makefile.in: Add target.o and inferiors.o. Update
17965 * linux-low.c (inferior_pid): New static variable,
17966 moved from server.c.
17967 (linux_create_inferior): Renamed from create_inferior.
17968 Call add_inferior. Return 0 on success instead of a PID.
17969 (linux_attach): Renamed from myattach.
17970 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17971 (linux_thread_alive): Renamed from mythread_alive.
17972 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17974 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17975 (regsets_store_inferior_registers): Correct error message.
17976 Add missing ``return 0''.
17977 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17978 (linux_store_registers): Renamed from store_inferior_registers.
17979 (linux_read_memory): Renamed from read_inferior_memory.
17980 (linux_write_memory): Renamed from write_inferior_memory.
17981 (linux_target_ops): New structure.
17982 (initialize_low): Call set_target_ops ().
17983 * remote-utils.c (unhexify): New function.
17984 (hexify): New function.
17985 (input_interrupt): Send signals to ``signal_pid''.
17986 * server.c (inferior_pid): Remove.
17987 (start_inferior): Update create_inferior call.
17988 (attach_inferior): Call add_inferior.
17989 (handle_query): New function.
17990 (main): Call handle_query for `q' packets.
17991 * server.h: Include "target.h". Remove obsolete prototypes.
17992 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17994 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17996 * Makefile.in: Add WARN_CFLAGS. Update configury
17998 * configure.in: Check for <string.h>
17999 * configure: Regenerate.
18000 * config.in: Regenerate.
18001 * gdbreplay.c: Include needed system headers.
18002 (remote_open): Remove strchr prototype.
18003 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18004 * regcache.c (supply_register): Change buf argument to const void *.
18005 (supply_register_by_name): Likewise.
18006 (collect_register): Change buf argument to void *.
18007 (collect_register_by_name): Likewise.
18008 * regcache.h: Add missing prototypes.
18009 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18010 * server.c (handle_query): New function.
18011 (attached): New static variable, moved out of main.
18012 (main): Quiet longjmp clobber warnings.
18013 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18014 * utils.c (error): Remove NORETURN.