summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2008-12-26 21:09:12 +0000
committerMichael Snyder <msnyder@specifix.com>2008-12-26 21:09:12 +0000
commit749463a9004bdc83ae556690937afbd591329132 (patch)
treebc8239af3227500fbf4bcff647d825debd04bc0f
parent0e25dbbbb058a9e433009d3e8f37e3b91aa873fa (diff)
downloadgdb-749463a9004bdc83ae556690937afbd591329132.tar.gz
2008-12-26 Michael Snyder <msnyder@vmware.com>
* Marker: adding teawater patches to branch.
-rw-r--r--gdb/ChangeLog5901
-rw-r--r--gdb/Makefile.in2342
-rw-r--r--gdb/configure.tgt8
-rw-r--r--gdb/doc/gdb.texinfo2252
-rw-r--r--gdb/gdbarch.c263
-rw-r--r--gdb/gdbarch.h52
-rwxr-xr-xgdb/gdbarch.sh43
-rw-r--r--gdb/i386-linux-tdep.c11
-rw-r--r--gdb/i386-tdep.c565
-rw-r--r--gdb/infrun.c1693
-rw-r--r--gdb/linux-record.c178
-rw-r--r--gdb/linux-record.h8
-rw-r--r--gdb/record.c328
-rw-r--r--gdb/record.h11
-rw-r--r--gdb/target.c376
-rw-r--r--gdb/target.h92
-rwxr-xr-xgdb/testsuite/configure5
-rw-r--r--gdb/testsuite/configure.ac3
-rw-r--r--gdb/testsuite/gdb.twreverse/machinestate.exp101
19 files changed, 10200 insertions, 4032 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6cc9184d907..39ecb43eb4d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,594 +1,1583 @@
-2008-10-09 Michael Snyder <msnyder@vmware.com>
+2008-12-26 Michael Snyder <msnyder@vmware.com>
- * reverse.c (exec_reverse_once): Eliminate fixed-size buffer,
- use xstrprintf.
+ * Marker: adding teawater patches to branch.
-2008-10-08 Hui Zhu <teawater@gmail.com>
+2008-12-26 Sandra Loosemore <sandra@codesourcery.com>
- * record.c (record_open): Reset after push_target.
+ * breakpoint.c (update_watchpoint): Refactor to avoid compiler
+ warning.
-2008-10-08 Michael Snyder <msnyder@vmware.com>
+2008-12-22 Tom Tromey <tromey@redhat.com>
- * infrun.c (handle_inferior_event): Typo in comment.
+ * stack.c (print_block_frame_locals): Print spaces, not tabs.
+ Update for call to print_variable_and_value.
+ (print_frame_arg_vars): Update.
+ * value.h (print_variable_and_value): Rename from
+ print_variable_value. Add 'name' and 'indent' parameters.
+ * printcmd.c (print_variable_and_value): Rename from
+ print_variable_value. Add 'name' and 'indent' parameters. Use
+ common_val_print.
+ * f-valprint.c (info_common_command): Update.
-2008-10-07 Hui Zhu <teawater@gmail.com>
+2008-12-22 Tom Tromey <tromey@redhat.com>
- * inflow.c (kill_command): Remove query special for
- process record.
+ * python/python-value.c (valpy_length): Remove #if.
-2008-10-07 Michael Snyder <msnyder@vmware.com>
+2008-12-22 Paul Pluzhnikov <ppluzhnikov@google.com>
- * target.h (to_set_exec_direction, to_get_exec_direction): Remove.
- (to_can_execute_reverse): New method.
- (enum exec_direction_kind): Move to inferior.h.
- * target.c (update_current_target): Inherit to_can_execute_reverse.
- Remove to_set_exec_direction, to_get_exec_direction.
- * inferior.h (enum exec_direction_kind): Move from target.h.
-
- * infrun.c (set_exec_direction_func): Move here from reverse.c.
- (show_exec_direction_func): Ditto.
- (proceed): Consult global execution_direction instead of
- target method.
- (handle_inferior_event): Ditto.
-
- * reverse.c (set_exec_direction_func): Move to infrun.c
- (show_exec_direction_func): Ditto.
- (exec_direction_default): Set infrun global variable.
- (exec_reverse_once): Consult infrun global direction variable.
-
- * infcmd.c (step_1): Consult infrun global direction variable.
- (step_once): Ditto.
- (until_next_command): Ditto.
- (finish_command): Ditto.
+ * python/python-internal.h (PyEval_ReleaseLock): New define.
+
+2008-12-22 Tom Tromey <tromey@redhat.com>
- * record.h (record_exec_direction): Delete.
- (RECORD_IS_REPLAY): Consult infrun global direction variable.
-
- * record.c: (record_wait_cleanups): Use infrun state variable.
- (record_wait): Ditto.
- (record_get_exec_direction, record_set_exec_direction): Remove.
- (record_can_execute_reverse): New target method.
-
- * remote.c (remote_resume): Use infrun state variable.
- (remote_get_exec_direction, remote_set_exec_direction): Remove.
- (remote_can_execute_reverse): New target method.
-
-2008-10-07 Michael Snyder <msnyder@vmware.com>
-
- * infrun.c (stepped_into_function): Rename handle_step_into_function.
- (stepped_into_function_backward):
- Rename handle_step_into_function_backward.
-
- * reverse.c: Update copyright.
- (exec_reverse_once): Add function header comment.
- (_initialize_reverse): Use i18n macros for set exec-direction.
-
-2008-10-07 Hui Zhu <teawater@gmail.com>
-
- * i386-tdep.c, inflow.c, infrun.c, linux-record.c,
- linux-record.h, record.c, record.h: Change name from
- "record and reverse target" to
- "process record and replay target".
-
-2008-10-06 Michael Snyder <msnyder@vmware.com>
-
- * record.c (displaced_step_fixup): Remove.
- (record_message_cleanups): Remove displaced step handling.
- (record_message): Remove displaced step handling.
- * infrun.c (displaced_step_ptid): Back to being static.
- (displaced_step_original, displaced_step_copy): Ditto.
-
- * breakpoint.c (breakpoint_silence): Rename to make_breakpoint_silent.
- * breakpoint.h: Ditto.
- * infcmd.c (finish_backward): Call make_breakpoint_silent
- instead of breakpoint_silence.
-
- * infcmd.c (finish_command): Reject async in reverse.
- * infcmd.c (finish_command): Use i18n macros.
- * infcmd.c: Minor function reordering.
- * infrun.c (step_into_function): Rename to stepped_into_function.
- Split into two versions (normal (forward), and reverse).
- (handle_inferior_event): Call stepped_into_function or
- stepped_into_function_backward, depending on exec_direction.
- * infrun.c (handle_inferior_event): Comment rewording.
- * remote.c (remote_get_exec_direction): Use i18n macros.
- (remote_set_exec_direction): Ditto.
- * infrun.c (handle_inferior_event, step_into_function): Formatting.
- * infrun.c (handle_inferior_event): Formatting, spelling fix.
-
-2008-10-04 Hui Zhu <teawater@gmail.com>
-
- Change from "to_prepare_to_store" to "to_store_registers".
- * record.c (record_beneath_to_prepare_to_store): Removed.
- (record_beneath_to_store_registers): New function pointer.
- Instead "record_beneath_to_prepare_to_store". Will point
- to the low strata target "to_store_registers" function.
- (record_prepare_to_store): Removed.
- (record_store_registers): New function.
- Instead "record_prepare_to_store". Record the change of
- registers from GDB.
- (init_record_ops): Change record_prepare_to_store to
- record_store_registers.
- * record.h (record_beneath_to_prepare_to_store): Removed.
- (record_beneath_to_store_registers): New extern.
- (record_regcache_raw_write_regnum): Remove.
- * target.c (update_current_target): Change
- record_beneath_to_prepare_to_store to
- record_beneath_to_store_registers.
-
-2008-10-06 Michael Snyder <msnyder@vmware.com>
-
- * regcache.c (regcache_raw_write): Remove global variable.
- No need to include "record.h" now.
- * record.c (record_regcache_raw_write_regnum): Remove.
+ * c-exp.y (ident_tokens): New global.
+ (struct token) <cxx_only>: New field.
+ (tokentab3): Update.
+ (tokentab2): Update.
+ (yylex): Use ident_tokens.
-2008-10-05 Michael Snyder <msnyder@vmware.com>
+2008-12-22 Adam Denton <adenton@yahoo.com>
- * reverse.c (exec_reverse_once): Call do_cleanups explicitly.
- (show_exec_direction_func): Don't error, just inform.
+ PR gdb/8307:
+ * environ.c (free_environ): Free e->vector.
- * target.c, target.h: Rename execdir to exec_direction.
- * record.c, record.h: Ditto.
- * reverse.c: Ditto.
- * remote.c: Ditto.
+2008-12-22 Jan Kratochvil <jan.kratochvil@redhat.com>
- * infrun.c (use_displaced_stepping): Disallow displaced
- stepping if using record/replay target.
- * infrun.c (handle_inferior_event): Fix typo in comment.
+ Fix memory double-free.
+ * completer.c (line_completion_function): Clear LIST after called xfree.
-2008-10-03 Michael Snyder <msnyder@vmware.com>
+2008-12-22 Joel Brobecker <brobecker@adacore.com>
- * linux-record.c (record_linux_system_call): Cast sizeof
- in printf calls, avoid compiler warnings on 64 bit hosts.
+ * breakpoint.c (update_watchpoint): Adjust and extend the description
+ of this function. Fix one error message accordingly.
-2008-10-04 Michael Snyder <msnyder@vmware.com>
+2008-12-21 Jan Kratochvil <jan.kratochvil@redhat.com>
- * reverse.c (show_exec_direction_func): Don't error, just inform.
+ Fix hw watchpoints created before the inferior was started.
+ * breakpoint.c (update_watchpoint): Convert the bp_watchpoint and
+ bp_hardware_watchpoint types according to the current runtime state.
-2008-10-03 Michael Snyder <msnyder@vmware.com>
+2008-12-18 Pedro Alves <pedro@codesourcery.com>
- * linux-record.c (record_linux_system_call): Cast sizeof to int
- in printf calls, avoid compiler warnings on 64 bit hosts.
+ * linux-nat.c (linux_child_follow_fork): If following the child,
+ and not detaching the parent, also add the child fork to the fork
+ list.
+ * linux-fork.c (linux_fork_context): Remove dead error call.
+ Assert that the incoming newfp argument is not null. Do not add a
+ new fork for inferior_ptid. Assert that there is one already.
+
+2008-12-16 Tristan Gingold <gingold@adacore.com>
+
+ * inflow.c: Remove old_sigio, handle_sigio, old_fcntl_flags,
+ set_sigio_trap, clear_sigio_trap definitions.
+ * inferior.h: Remove set_sigio_trap and clear_sigio_trap declarations.
+ * inf-ptrace.c (inf_ptrace_wait): Remove call to set_sigio_trap
+ and clear_sigio_trap.
+ * inf-ttrace.c (inf_ttrace_wait): Ditto.
+ * linux-nat.c (linux_nat_wait): Ditto.
+ * spu-linux-nat.c (spu_child_wait): Ditto.
+ * rs6000-nat.c (rs6000_wait): Ditto.
+ * target.c: Remove target_activity_function and target_activity_fd.
+ * target.h: Remove target_activity_function and target_activity_fd
+ declarations.
-2008-10-02 Michael Snyder <msnyder@vmware.com>
+2008-12-15 Paul Pluzhnikov <ppluzhnikov@google.com>
- * record.c (record_open): Call target_can_async_p() instead
- of relying on a global variable.
- * record.h (record_linux_async_permitted): Delete.
- * linux-nat.c (record_linux_async_permitted): Delete reference.
+ * dbxread.c (read_ofile_symtab): Sign-extend 32-bit N_LSYM and
+ N_PSYM STABS values for 64-bit GDB.
-2008-09-19 Michael Snyder <msnyder@vmware.com>
+2008-12-15 Tristan Gingold <gingold@adacore.com>
- * record.c (trivial): Fix two commas in a comment.
+ * dwarf2expr.c (execute_stack_op): Handle DW_OP_swap.
- * record.c (record_wait): On end of record log, return
- TARGET_WAITKIND_NO_HISTORY and let infrun decide what to do.
+2008-12-15 Jerome Guitton <guitton@adacore.com>
-2008-09-19 Hui Zhu <teawater@gmail.com>
+ * ada-lang.c (ada_value_slice_ptr): Rename to...
+ (ada_value_slice_from_ptr): ... this. Return a lazy value instead
+ of a reference. Update comment.
+ (ada_value_struct_elt): Ditto if arg is a pointer or a reference.
+ Update comment as well.
+ (ada_evaluate_subexp): Update use of ada_value_slice_ptr.
- * record.c (record_wait): Fix the bug of forware step after
- reverse step.
- Make debug message more clean.
- Remove variable record_list_status.
+2008-12-12 Kevin Buettner <kevinb@redhat.com>
- * i386-tdep.c (i386_record): Fix the bug of "0x80 ... 0x83".
+ * gnu-v3-abi.c (vtable_ptrdiff_type): New function.
+ (gnuv3_decode_method_ptr, gnuv3_print_method_ptr)
+ (gnuv3_method_ptr_to_value): Use a better approximation for
+ `ptrdiff_t' instead of `long'.
-2008-09-15 Michael Snyder <msnyder@vmware.com>
+2008-12-12 Kevin Buettner <kevinb@redhat.com>
- * infrun.c (proceed): No need to singlestep over a breakpoint
- when resuming in reverse.
+ * m32c-tdep.c (m32c_gdbarch_init): Call set_gdbarch_vbit_in_delta().
+ (m32c_push_dummy_call): Dereference pointer type.
+
+2008-12-12 Tom Tromey <tromey@redhat.com>
+
+ PR cli/2563:
+ * cli/cli-decode.c (delete_cmd): Add hook-related out parameters.
+ (add_cmd): Update. Install hooks into new command.
+ (add_alias_cmd): Update.
+
+2008-12-11 Tom Tromey <tromey@redhat.com>
+
+ * macroexp.c (get_pp_number): Require digit after leading ".".
+ Correctly handle suffixes.
+
+2008-12-11 Tom Tromey <tromey@redhat.com>
+
+ * macrocmd.c (macro_define_command): Skip whitespace after
+ macro name.
+ (print_one_macro): Print space after macro name.
+
+2008-12-12 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (handle_inferior_event): Correctly tag non-executing
+ threads in multi-process.
+ (normal_stop): Correctly tag stopped threads in multi-process.
+
+2008-12-12 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (extended_remote_mourn_1): Always call
+ generic_mourn_inferior.
+
+2008-12-12 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_detach_1): Don't delete the inferior here.
+ (process_stop_reply): Ditto.
+ (extended_remote_kill): Ditto.
+
+2008-12-12 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (read_ptid): If we don't know about any inferior yet,
+ use the pid of magic_null_ptid.
+ (remote_start_remote): In the non-stop mode case, don't set
+ inferior_ptid to magic_null_ptid here.
+
+2008-12-11 Daniel Jacobowitz <dan@codesourcery.com>
+ Pedro Alves <pedro@codesourcery.com>
+
+ * infcmd.c (step_1): Use step_once in the synchronous case too.
+ (step_1_continuation): Wrap line.
+ (step_once): Adjust comment. Only install the continuation in
+ async mode.
+
+2008-12-11 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (handle_inferior_event): On a TARGET_WAITKIND_EXITED or
+ TARGET_WAITKIND_SIGNALLED, switch inferior_ptid to the event ptid.
+ * linux_thread_db.c (thread_db_wait): On a TARGET_WAITKIND_EXITED
+ or TARGET_WAITKIND_SIGNALLED, return the ptid the beneath target
+ returned.
+ * inf-ptrace.c (inf_ptrace_wait): Return inferior_ptid instead of
+ minus_one_ptid if the inferior disappeared.
+ * rs6000-nat.c (rs6000_wait): Likewise.
+ * spu-linux-nat.c (spu_child_wait): Likewise.
+
+2008-12-11 Tom Tromey <tromey@redhat.com>
+
+ PR macros/2564:
+ * c-exp.y (macro_original_text, expansion_obstack,
+ expression_macro_scope): New globals.
+ (scan_macro_expansion): New function.
+ (scanning_macro_expansion): Likewise.
+ (finished_macro_expansion): Likewise.
+ (scan_macro_cleanup): Likewise.
+ (c_parse): Find macro scope. Initialize obstack.
+ * c-lang.h (scan_macro_expansion, scanning_macro_expansion,
+ finished_macro_expansion, expression_macro_lookup_func,
+ expression_macro_lookup_baton): Remove.
+ * c-lang.c (scan_macro_expansion, scanning_macro_expansion,
+ finished_macro_expansion, expression_macro_lookup_func,
+ expression_macro_lookup_baton): Remove.
+ (macro_original_text, macro_expanded_text,
+ c_preprocess_and_parse): Remove.
+ (c_language_defn, cplus_language_defn, asm_language_defn,
+ minimal_language_defn): Use c_parse.
+
+2008-12-10 Pedro Alves <pedro@codesourcery.com>
+
+ * infcmd.c (until_next_command, finish_backward): Use get_frame_pc
+ instead of read_pc.
+
+2008-12-09 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/1815:
+ * cli/cli-decode.c (delete_cmd): Forward declare.
+ (delete_cmd): Now static. Change return type. Remove command
+ from alias chain. Rewrite.
+ (add_cmd): Initialize new fields. Update cmd_pointer on all
+ aliases.
+ (add_alias_cmd): Put command on alias chain.
+ * command.h (delete_cmd): Don't declare.
+ * cli/cli-decode.h (delete_cmd): Don't declare.
+ (struct cmd_list_element) <aliases, alias_chain>: New fields.
+
+2008-12-09 Tom Tromey <tromey@redhat.com>
-2008-09-11 Hui Zhu <teawater@gmail.com>
+ * config.in, configure: Rebuild.
+ * configure.ac: Check for locale.h, setlocale. Call
+ AM_LC_MESSAGES.
+ * acinclude.m4: Include lcmessage.m4.
- * record.c (record_resume): Change
- "record_ops.beneath->to_resume" to "record_beneath_to_resume".
+2008-12-09 Jan Kratochvil <jan.kratochvil@redhat.com>
-2008-09-09 Hui Zhu <teawater@gmail.com>
+ * remote.c (remote_parse_stop_reply): Use REG only after its NULL check.
- * i386-tdep.c (i386_record): Record the memory change of FP instructions.
+2008-12-08 Joel Brobecker <brobecker@adacore.com>
-2008-09-07 Hui Zhu <teawater@gmail.com>
+ * python/python-value.c (values_in_python): Add specific initialization
+ to NULL to work-around a MacOS linker bug.
- * record.c (record_wait): Add code to deal with record_first.
+2008-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
-2008-09-06 Michael Snyder <msnyder@vmware.com>
+ Fix loc_type of `bp_location's created by update_watchpoint.
+ * breakpoint.c (allocate_bp_location): Remove the bp_type parameter.
+ Replace bp_type by bpt->type. Update prototype. All callers updated.
+ (add_location_to_breakpoint): Remove the bp_type parameter.
+ Replace bp_type by b->type. All callers updated.
+ (set_breakpoint_location_function): Replace bptype by b->type.
- * record-linux.c: Comment and message string cleanup.
- * record.c: Comment and message string cleanup.
- Add some function header comments.
+2008-12-07 Jan Kratochvil <jan.kratochvil@redhat.com>
-2008-09-04 Michael Snyder <msnyder@vmware.com>
+ * breakpoint.c (update_global_location_list): Fix the comment.
- * infrun.c (handle_inferior_event): Revert one change, in the
- context of comment "We are at the start of a different line".
- This code finds the start of the line while stepping.
+2008-12-05 Pedro Alves <pedro@codesourcery.com>
-2008-09-01 Hui Zhu <teawater@gmail.com>
+ * infcmd.c (step_1, step_once): Look up the stepping range based
+ on the current frame's PC, not on stop_pc.
- Record target will not record the memory change of
- instruction if it use segment registers.
+2008-12-05 Jan Kratochvil <jan.kratochvil@redhat.com>
- * i386-tdep.c (i386_record_lea_modrm): Make debug message
- more clear. (i386_record): Record target will not record the
- memory change of instruction if it use segment registers.
+ Fix compilation on 32-bit host configurations.
+ * ia64-tdep.c (ia64_breakpoint_from_pc): Suffix a constant by `LL'.
- Make record target not work with inferior in non-stop mode
- (non-stop).
+2008-12-05 Tristan Gingold <gingold@adacore.com>
- * record.c (record_open): If non_stop is true (in non-stop
- mode), output error.
+ * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn): New function.
+ (amd64_darwin_sstep_at_sigreturn): New function.
+ (darwin_set_sstep): The sigreturn is a special case: the trace flag
+ must be set in the mcontext structure.
- Make record target not work with GNU/Linux inferior in
- asynchronous mode (linux-async).
+2008-12-05 Pedro Alves <pedro@codesourcery.com>
- * record.c (record_linux_async_permitted): New variable.
- Record the value of linux_async_permitted.
- (record_open): If record_linux_async_permitted is true (in
- asynchronous mode), output error.
- * linux-nat.c (set_maintenance_linux_async_permitted): Set
- value of linux_async_permitted to
- record_linux_async_permitted.
+ * infcmd.c (step_once): Remove dead code.
- * linux-record.c (record_linux_system_call): Correct error of
- sys_restart_syscall.
+2008-12-04 Doug Evans <dje@google.com>
-2008-08-23 Hui Zhu <teawater@gmail.com>
+ * infcall.c (call_function_by_hand): Clean up use of local dummy_addr.
- Fix record target doesn't reset variables bug.
+2008-12-02 Doug Evans <dje@google.com>
- * record.c (record_open): Reset variables.
- (record_close): Remove some code that not need.
+ * infrun.c (handle_inferior_event): Remove redundant resetting of
+ stepping_past_singlestep_breakpoint.
- Fix record target doesn't support mourn inferior bug.
+2008-12-02 Pedro Alves <pedro@codesourcery.com>
- * record.c (record_mourn_inferior): New function. record
- target mourn inferior.
- (init_record_ops): Set "record_ops.to_mourn_inferior" point
- to "record_mourn_inferior".
+ * target.h (target_get_osdata): Describe.
+ * osdata.h (make_cleanup_osdata_free): Declare.
+ * osdata.c (osdata_item_clear): Define even if HAVE_LIBEXPAT is
+ not defined.
+ (osdata_free_cleanup): New.
+ (make_cleanup_osdata_free): New.
+ (get_osdata): Fix leak.
+ (info_osdata_command): Use make_cleanup_osdata_free.
+ (info_processes_command): Delete.
+ (_initialize_osdata): Drop undocumented "info processes" alias.
+ * mi/mi-main.c (mi_cmd_list_thread_groups): Fix leak.
- Set terminal in function "record_check_insn_num".
+2008-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
- * record.c (record_check_insn_num): If "set_terminal" is 1,
- set terminal.
- (record_message): Set argument 1 to function
- "record_check_insn_num".
- (record_registers_change): Set argument 0 to function
- "record_check_insn_num".
- (record_xfer_partial): Set argument 0 to function
- "record_check_insn_num".
+ Fix resolving external references to TLS variables.
+ * findvar.c: Include `objfiles.h'.
+ (read_var_value <LOC_UNRESOLVED>): New variable `obj_section'. Handle
+ SEC_THREAD_LOCAL variables.
+ * printcmd.c (address_info <LOC_UNRESOLVED>): Handle SEC_THREAD_LOCAL
+ variables.
+
+2008-12-02 Doug Evans <dje@google.com>
+
+ * infrun.c (handle_inferior_event): Delete unused local tp.
+
+2008-12-02 Pedro Alves <pedro@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com>
+
+ Implement -list-thread-groups --available
+
+ * Makefile.in (XMLFILES): Add osdata.dtd.
+ (SFILES): Add osdata.c.
+ (COMMON_OBS): Add osdata.o.
+ * linux-nat.c: Include pwd.h, sys/types.h, gdb_dirent.h and xml-support.h.
+ (linux_nat_xfer_osdata): New function.
+ (linux_xfer_partial): Handle TARGET_OBJECT_OSDATA.
+ * osdata.c: New file.
+ * osdata.h: New file.
+ * remote.c (PACKET_qXfer_osdata): New packet enum.
+ (remote_protocol_features): Add "qXfer:osdata:read".
+ (remote_read_qxfer): Handle TARGET_OBJECT_OSDATA.
+ (extended_remote_can_run): New.
+ (init_extended_remote_ops): Set to_can_run to
+ extended_remote_can_run.
+ (_initialize_remote): Add packet config command for
+ "qXfer:osdata:read".
+ * xml-support.c (obstack_xml_printf): New function.
+ * xml-support.h (obstack_xml_printf): Declare.
+ * target.c (target_get_osdata): New function.
+ * target.h (enum target_object): Add TARGET_OBJECT_OSDATA.
+ (target_os_data): Declare.
+ * features/osdata.dtd: New file.
+ * mi/mi-main.c (mi_list_thread_groups): Handle the --available
+ option.
+
+2008-12-01 Doug Evans <dje@google.com>
+
+ * infrun.c (proceed): Delete unused local stop_signal.
+
+2008-11-27 Tristan Gingold <gingold@adacore.com>
+
+ * NEWS: Add entry for new native configuration: Darwin.
+ * configure.host: Add Darwin host.
+ * configure.tgt: Add Darwin target.
+ * defs.h (enum gdb_osabi): Add GDB_OSABI_DARWIN.
+ * osabi.c (gdb_osabi_names): Add name for Darwin abi.
+ * i386-darwin-nat.c: New file.
+ * i386-darwin-tdep.c: New file.
+ * machoread.c: New file.
+ * darwin-nat-info.c: New file.
+ * darwin-nat.c: New file.
+ * darwin-nat.h: New file.
+ * darwin.defs: New file.
+ * config/i386/darwin.mh: New file.
+
+2008-11-26 Tristan Gingold <gingold@adacore.com>
+
+ * MAINTAINERS: Add myself for write after approval privileges.
+
+2008-11-26 Jerome Guitton <guitton@adacore.com>
+
+ * value.h (allocate_value_lazy): New function declaration.
+ (value_free): Remove macro, make it a function.
+ * value.c (value): Move actual content outside of the memory space
+ of the struct; add a pointer to this actual content.
+ (allocate_value_lazy, allocate_value_contents): New function.
+ (allocate_value): Reimplement using these two new functions.
+ (value_contents_raw, value_contents_all_raw): If no memory
+ has been allocated yet for the actual content, allocate it.
+ (value_contents_all): Resync with struct value's changes.
+ (value_free): New function.
+ (value_copy, value_primitive_field): Use new function
+ allocate_value_lazy to allocate lazy values.
+ (value_change_enclosing_type): Resync with struct value's changes.
+ As the value is not reallocated, remove the special handling for
+ the value chain (now obsolete).
+ * valops.c (value_at_lazy): Use new function allocate_value_lazy.
+ (value_fetch_lazy): Allocate value content. Use allocate_value_lazy
+ to allocate lazy values.
+ (value_slice): Use allocate_value_lazy to allocate lazy values.
+
+2008-11-25 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix automatic restoration of breakpoints memory for ia64.
+ * ia64-tdep.c: New #if check on BREAKPOINT_MAX vs. BUNDLE_LEN.
+ (ia64_memory_insert_breakpoint): New comment part for SHADOW_CONTENTS
+ content. Remove variable instr. New variable cleanup. Disable
+ automatic breakpoints restoration. PLACED_SIZE and SHADOW_LEN are now
+ set larger, to BUNDLE_LEN - 2. Variable `bundle' type update. Return
+ error if even just final target_write_memory has failed.
+ (ia64_memory_remove_breakpoint): Rename variables bundle to bundle_mem
+ and instr to instr_saved. New variables bundle_saved and
+ instr_breakpoint. Comment new reasons why we need to disable automatic
+ restoration of breakpoints. Assert PLACED_SIZE and SHADOW_LEN. New
+ check of the original memory content. Return error if even just final
+ target_write_memory has failed.
+ (ia64_breakpoint_from_pc): Implement the emulation of permanent
+ breakpoints compatible with current bp_loc_is_permanent.
+ (template_encoding_table): Make it `const'.
+ * breakpoint.c (bp_loc_is_permanent): Support unsupported software
+ breakpoints. New variables `cleanup' and `retval'.
+
+2008-11-24 Tom Tromey <tromey@redhat.com>
+
+ * ada-lang.c (value_from_contents_and_address): Move...
+ * value.c: ... here.
+ * ada-lang.h (value_from_contents_and_address): Move
+ declaration...
+ * value.h: ... here.
+
+2008-11-24 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * valprint.c (val_print_array_elements): Pass correct
+ element address to val_print.
+2008-11-24 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix access of an already freed memory.
+ * parse.c (parse_field_expression): Call xstrdup on `*name'.
+ * completer.c (expression_completer): Free fieldname.
+
+2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
+
+ PR gdb/2474
+ * remote.c (remote_read_description_p): New function.
+ (remote_start_remote): Try to fetch the target description
+ before adding shared libraries. Try again later if the
+ target is running but stopped.
+ (remote_open_1): Mark extended targets as exited by default.
+ (remote_read_description): Check target_has_execution.
+
+2008-11-24 Jerome Guitton <guitton@adacore.com>
+
+ * alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Use
+ the frame address in block instead of the return address to
+ locate the mdebug PDR of the frame.
+
+2008-11-21 Joel Brobecker <brobecker@adacore.com>
+
+ Remove the unused BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
+
+ * breakpoint.h (enum bpstat_what_main_action): Remove
+ BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
+ * breakpoint.c (bpstat_what): Delete catch_shlib_event from enum class.
+ Remove the BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK column from
+ variable table.
+ * infrun.c (wait_for_inferior): Remove handling of
+ BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK.
+
+2008-11-21 Tom Tromey <tromey@redhat.com>
+
+ * configure: Rebuild.
+ * configure.ac: Merge calls to AC_CHECK_FUNCS, AC_CHECK_HEADERS,
+ AC_CHECK_DECLS, and AC_CHECK_MEMBERS.
+
+2008-11-21 Tom Tromey <tromey@redhat.com>
+
+ * python/python-internal.h (PyGILState_Ensure): New define.
+ (PyGILState_Release): Likewise.
+ (PyEval_InitThreads): Likewise.
+ (PyThreadState_Swap): Likewise.
+ (PyEval_InitThreads): Likewise.
+ * python/python.c (_initialize_python): Initialize threads.
+ Release GIL.
+ (eval_python_from_control_command): Acquire GIL.
+ (python_command): Likewise.
+ * python/python-internal.h (make_cleanup_py_restore_gil):
+ Declare.
+ * python/python-utils.c (py_gil_restore): New function.
+ (make_cleanup_py_restore_gil): Likewise.
-2008-08-15 Hui Zhu <teawater@gmail.com>
-
- Add record instructions limit function to
- "record_prepare_to_store" and "record_xfer_partial".
-
- * record.c (record_check_insn_num): New function. Check the
- insn number. If need, query how to do.
- (record_message): Call function "record_check_insn_num" check
- the insn number.
- (record_registers_change): Call function
- "record_check_insn_num" check the insn number. Increase
- "record_insn_num" if need.
- (record_xfer_partial): Call function "record_check_insn_num"
- check the insn number. Increase "record_insn_num" if need.
-
-2008-08-10 Hui Zhu <teawater@gmail.com>
-
- Add the real beneath function pointers for record target.
-
- * Makefile.in: Add record.h to depend of target.c.
- * record.c (record_beneath_to_resume, record_beneath_to_wait,
- record_beneath_to_prepare_to_store,
- record_beneath_to_xfer_partial,
- record_beneath_to_insert_breakpoint,
- record_beneath_to_remove_breakpoint): New function pointers.
- The real beneath function pointers.
- (record_resume): Change "record_ops.beneath->to_resume" to
- "record_beneath_to_resume".
- (record_wait): Change "record_ops.beneath->to_wait" to
- "record_beneath_to_wait".
- (record_prepare_to_store): Change
- "record_ops.beneath->to_prepare_to_store" to
- "record_beneath_to_prepare_to_store".
- (record_xfer_partial): Change
- "record_ops.beneath->to_xfer_partial" to
- "record_beneath_to_xfer_partial".
- (record_insert_breakpoint): Change
- "record_ops.beneath->to_insert_breakpoint" to
- "record_beneath_to_insert_breakpoint".
- (record_remove_breakpoint): Change
- "record_ops.beneath->to_remove_breakpoint" to
- "record_beneath_to_remove_breakpoint".
- * record.h (record_beneath_to_resume,
- record_beneath_to_wait,
- record_beneath_to_prepare_to_store,
- record_beneath_to_xfer_partial,
- record_beneath_to_insert_breakpoint,
- record_beneath_to_remove_breakpoint): Extern.
- * target.c: Add include of "record.h".
- (update_current_target): Set the real beneath function
- pointers.
-
-2008-08-05 Hui Zhu <teawater@gmail.com>
-
- Support more ioctl requests in record target.
-
- * i386-linux-tdep.c (I386_RECORD_SIZE_termios,
- I386_RECORD_SIZE_termios2, I386_RECORD_SIZE_pid_t,
- I386_RECORD_SIZE_winsize, I386_RECORD_SIZE_char,
- I386_RECORD_SIZE_serial_struct,
- I386_RECORD_SIZE_serial_icounter_struct,
- I386_RECORD_SIZE_hayes_esp_config): New macros. Sizes of some
- types in I386.
- (I386_RECORD_IOCTL_TCGETS,
- I386_RECORD_IOCTL_TCSETS,
- I386_RECORD_IOCTL_TCSETSW,
- I386_RECORD_IOCTL_TCSETSF,
- I386_RECORD_IOCTL_TCGETA,
- I386_RECORD_IOCTL_TCSETA,
- I386_RECORD_IOCTL_TCSETAW,
- I386_RECORD_IOCTL_TCSETAF,
- I386_RECORD_IOCTL_TCSBRK,
- I386_RECORD_IOCTL_TCXONC,
- I386_RECORD_IOCTL_TCFLSH,
- I386_RECORD_IOCTL_TIOCEXCL,
- I386_RECORD_IOCTL_TIOCNXCL,
- I386_RECORD_IOCTL_TIOCSCTTY,
- I386_RECORD_IOCTL_TIOCGPGRP,
- I386_RECORD_IOCTL_TIOCSPGRP,
- I386_RECORD_IOCTL_TIOCOUTQ,
- I386_RECORD_IOCTL_TIOCSTI,
- I386_RECORD_IOCTL_TIOCGWINSZ,
- I386_RECORD_IOCTL_TIOCSWINSZ,
- I386_RECORD_IOCTL_TIOCMGET,
- I386_RECORD_IOCTL_TIOCMBIS,
- I386_RECORD_IOCTL_TIOCMBIC,
- I386_RECORD_IOCTL_TIOCMSET,
- I386_RECORD_IOCTL_TIOCGSOFTCAR,
- I386_RECORD_IOCTL_TIOCSSOFTCAR,
- I386_RECORD_IOCTL_FIONREAD,
- I386_RECORD_IOCTL_TIOCINQ,
- I386_RECORD_IOCTL_TIOCLINUX,
- I386_RECORD_IOCTL_TIOCCONS,
- I386_RECORD_IOCTL_TIOCGSERIAL,
- I386_RECORD_IOCTL_TIOCSSERIAL,
- I386_RECORD_IOCTL_TIOCPKT,
- I386_RECORD_IOCTL_FIONBIO,
- I386_RECORD_IOCTL_TIOCNOTTY,
- I386_RECORD_IOCTL_TIOCSETD,
- I386_RECORD_IOCTL_TIOCGETD,
- I386_RECORD_IOCTL_TCSBRKP,
- I386_RECORD_IOCTL_TIOCTTYGSTRUCT,
- I386_RECORD_IOCTL_TIOCSBRK,
- I386_RECORD_IOCTL_TIOCCBRK,
- I386_RECORD_IOCTL_TIOCGSID,
- I386_RECORD_IOCTL_TCGETS2,
- I386_RECORD_IOCTL_TCSETS2,
- I386_RECORD_IOCTL_TCSETSW2,
- I386_RECORD_IOCTL_TCSETSF2,
- I386_RECORD_IOCTL_TIOCGPTN,
- I386_RECORD_IOCTL_TIOCSPTLCK,
- I386_RECORD_IOCTL_FIONCLEX,
- I386_RECORD_IOCTL_FIOCLEX,
- I386_RECORD_IOCTL_FIOASYNC,
- I386_RECORD_IOCTL_TIOCSERCONFIG,
- I386_RECORD_IOCTL_TIOCSERGWILD,
- I386_RECORD_IOCTL_TIOCSERSWILD,
- I386_RECORD_IOCTL_TIOCGLCKTRMIOS,
- I386_RECORD_IOCTL_TIOCSLCKTRMIOS,
- I386_RECORD_IOCTL_TIOCSERGSTRUCT,
- I386_RECORD_IOCTL_TIOCSERGETLSR,
- I386_RECORD_IOCTL_TIOCSERGETMULTI,
- I386_RECORD_IOCTL_TIOCSERSETMULTI,
- I386_RECORD_IOCTL_TIOCMIWAIT,
- I386_RECORD_IOCTL_TIOCGICOUNT,
- I386_RECORD_IOCTL_TIOCGHAYESESP,
- I386_RECORD_IOCTL_TIOCSHAYESESP,
- I386_RECORD_IOCTL_FIOQSIZE): New macros. Ioctl request
- numbers in I386.
- (i386_linux_init_abi): Initialize the size of some types and
- ioctl request numbers in linux_record_tdep.
- linux-record.c (record_linux_system_call): Record more ioctl
- requests.
- linux-record.h (linux_record_tdep_s): Add size of some types
- and ioctl request numbers.
-
- Add a cleanup in function "record_wait".
-
- * record.c (record_wait_cleanups): New function. Clean for
- function "record_wait".
- (record_wait): Add a cleanup to call function
- "record_wait_cleanups".
-
- i386-tdep.c (i386_record_lea_modrm): If this is not a error,
- output warning message of "can't get the value of the segment
- register" just when record_debug is set.
-
- record.c (record_message): Change output message from "pause"
- to "stop".
-
- linux-record.c (record_linux_system_call): Change output
- message from "pause" to "stop".
-
- linux-record.c (record_linux_system_call): Make query message
- for syscall munmap more clear.
-
- record.c (_initialize_record): Fix a little bug.
-
-2008-08-01 Michael Snyder <msnyder@specifix.com>
-
- * record.c (_initialize_record): Clarify language in help strings.
- Fix up comment format (period must be followed by two spaces).
-
-2008-08-01 Michael Snyder <msnyder@specifix.com>
-
- * i386-tdep.c (i386_record_lea_modrm): Spelling fix.
-
-2008-07-29 Hui Zhu <teawater@gmail.com>
-
- Change record.c (record_list_release_next) just release "record_list".
-
- * record.c (record_list_release_next): Change it just release
- "record_list".
- (record_prepare_to_store): Remove "record_list" from
- "record_list_release_next".
- (record_xfer_partial): Remove "record_list" from
- "record_list_release_next".
- (cmd_record_delete): Remove "record_list" from
- "record_list_release_next".
-
- Add record instructions limit.
-
- * record.c (DEFAULT_RECORD_INSN_MAX_NUM): New macro. The default value
- of record instructions max number.
- (record_insn_max_mode): New static variable. Point out how to do if
- record_insn_num >= record_insn_max_num. If 0, ask user. If not 0, auto
- delete the first record_t. It can be "set" and "show" with command
- "record-auto-delete".
- (record_insn_max_num): New static variable. The record instructions max
- number. If "record_insn_max_num" is 0, record target will not limit
- record instructions number. It can be "set" and "show" with command
- "record-insn-number-max".
- (record_insn_num): New static variable. The record instructions number.
- It can be "info" with command "record-insn-number".
- (displaced_step_fixup): Extern.
- (record_list_release_first): New function. Release the first
- instruction record in "record_list".
- (record_message): If record_insn_num >= record_insn_max_num and
- record_insn_max_num is not 0, ask user how to do if
- record_insn_max_mode == 0, auto delete the first record_t if
- record_insn_max_mode != 0. "record_insn_num" add with 1 if record a new
- instruction.
- (record_open): Reset record_insn_num to 0.
- (set_record_insn_max_num): New function. After set the value of
- "record_insn_max_num", record instructions number is bigger than record
- instructions max number and record_insn_max_num is not 0. Delete the
- first record_t.
- (show_record_insn_number): New function. Output the value of
- "record_insn_num".
- (_initialize_record): Add 3 record instructions number limit commands:
- "record-auto-delete" "set" and "show" "record_insn_max_mode".
- "record-insn-number-max" "set" and "show" "record_insn_max_num".
- "record-insn-number" "info" "record_insn_num".
-
- Add a cleanup for displaced stepping in function
- "record_message_cleanups".
-
- * infrun.c (displaced_step_fixup): Remove static. record.c
- (record_message_cleanups) use it.
- * record.c (record_message_cleanups): Call funtion
- "displaced_step_fixup" to cleanup for displaced stepping.
-
-2008-07-27 Hui Zhu <teawater@gmail.com>
-
- Add a cleanup in function "record_message".
-
- * record.c (record_message_cleanups): New function. Clean for function
- "record_message".
- (record_message): Add a cleanup to call function
- "record_message_cleanups".
-
-2008-07-24 Hui Zhu <teawater@gmail.com>
-
- Add a element "to_support_record_wait" to target_ops.
-
- * target.h (target_ops): Add a element "to_support_record_wait".
- Default value is 0. Mean that this target doesn't support record wait.
- Need the help of infrun.c(handle_inferior_event). Set to 1 if this
- target support record wait.
- * target.c (add_target): Set the default value of
- "to_support_record_wait".
- * record.h (RECORD_TARGET_SUPPORT_RECORD_WAIT): New macro. It use to
- access "to_support_record_wait" of the target that is above the record
- target.
- * linux-nat.c (linux_nat_add_target): Set t->to_support_record_wait to
- 1 to point out that this target support record wait with itself.
-
- Optimize infrun.c.
-
- * infrun.c: Add some new comment.
- (handle_inferior_event): Optimize it. Change "RECORD_IS_USED" to
- "RECORD_TARGET_SUPPORT_RECORD_WAIT".
-
-2008-07-20 Hui Zhu <teawater@gmail.com>
-
- Add record target to GDB.
-
- * linux-record.c, linux-record.h: New files. Record and reverse
- target code for GNU/Linux.
- * record.c, record.h: New files. Record and reverse target.
- * Makefile.in: Add files record.c, record.h, linux-record.c and
- linux-record.h.
- * configure.tgt: Add files linux-record.c and linux-record.h.
- * gdbarch.c, gdbarch.h: Add elements "record" and "record_dasm".
- * i386-linux-tdep.c (linux_record_tdep): New static variable.
- I386 Linux record target-dependent stuff.
- (i386_linux_intx80_sysenter_record): New function. Record the
- running message of I386 Linux system call.
- (i386_linux_init_ab): Initialize the linux_record_tdep. Add
- i386_linux_intx80_sysenter_record to struct tdep.
- * i386-tdep.c (i386_record_modrm, i386_record_lea_modrm_addr,
- i386_record_lea_modrm, i386_record): New functions. Record the
- running message of I386 instruction.
- (i386_gdbarch_init): Add i386_record to struct gdbarch.
- * i386-tdep.h (gdbarch_tdep): Add elements "i386_intx80_record"
- and "i386_sysenter_record" to be the interfaces that record the
- running message of instruction "intx80" and "sysenter".
- * infcmd.c (step_prev_frame_id): New global variable. When GDB is
- in the reverse debug mode, it is used to make sure if inferior
- return to the prev function.
- (step_1, step_once, until_next_command): Set the value of variable
- "step_prev_frame_id".
- (kill_if_already_running): If record target is used, output
- special query.
- * inferior.h (step_prev_frame_id): Extern.
- * inflow.c (kill_command): If record target is used, output
- special query.
- * infrun.c (reverse_resume_need_step): New static variable. When
- the record function want inferior step before call function
- "keep_going", "reverse_resume_need_step" will be set to 1.
- (displaced_step_ptid, displaced_step_original, displaced_step_copy):
- Set them from static to global because record.c use them.
- (use_displaced_stepping): If record target is in replay mode, it
- will return false.
- (proceed): Call function "record_not_record_set" if record target
- is open.
- (handle_inferior_event): Change some Handle when execdir of target
- is reverse or record target is open to make reverse execute work
- well.
- * linux-nat.c (my_waitpid_record): New function. Call function
- "my_waitpid" and check the result with itself to make record
- target speed up.
- (linux_nat_wait): If record target is open and not the sigle step,
- call function "my_waitpid_record".
- * regcache.c (regcache_raw_write): Set regnum to
- record_regcache_raw_write_regnum.
- * target.h (strata): Add element "record_stratum".
-
-2008-07-17 Michael Snyder <msnyder@specifix.com>
- 2006-05-02 Michael Snyder <msnyder@redhat.com>
-
- * Target interface for reverse execution.
+2008-11-20 Doug Evans <dje@google.com>
+
+ * frame.c (frame_debug_got_null_frame): Remove file arg.
+ All callers updated.
+
+2008-11-20 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (resume): If following a fork, also reset regcache,
+ gdbarch and pc.
+
+2008-11-20 Doug Evans <dje@google.com>
+
+ * printcmd.c (sym_info): Don't print the offset if it's zero.
+
+2008-11-20 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (resume): If following a fork, reread the current
+ thread. Avoid dereferencing a possibly dangling pointer.
+
+2008-11-19 Doug Evans <dje@google.com>
+
+ * inferior.h (proceed_to_finish): Delete, unused.
+ (stop_registers): Tweak comment.
+ * infrun.c (stop_registers): Tweak comment.
+
+2008-11-19 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (frv_skip_main_prologue): New function.
+ (frv_gdbarch_init): Register frv_skip_main_prologue.
+ * solib-frv.c (fetch_loadmap): Return early when no segments are
+ found.
+ (frv_relocate_main_executable): Return early when both interpreter
+ and executable loadmap addresses are zero.
+
+2008-11-19 Bob Wilson <bob.wilson@acm.org>
+
+ * xtensa-config.c (rmap): Remove entries for ar32 through ar63. Add
+ threadptr, scompare1, mmid, epc5, epc6, epc7, eps5, eps6, eps7,
+ excsave5, excsave6, excsave7, cpenable, and vecbase registers.
+ (xtensa_submask0, xtensa_submask1, xtensa_submask2)
+ (xtensa_submask3, xtensa_submask4, xtensa_submask5, xtensa_submask6)
+ (xtensa_submask7, xtensa_submask8, xtensa_submask9, xtensa_submask10)
+ (xtensa_submask11, xtensa_submask12, xtensa_submask13, xtensa_submask14)
+ (xtensa_submask15): Adjust register numbers.
+ * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
+ (xtensa_regmap_table): Add entry for scompare1.
+ * regformats/reg-xtensa.dat: Remove ar32 through ar63. Add threadptr
+ and scompare1.
+
+2008-11-19 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (escape_buffer): New.
+ (putpkt_binary, read_frame, getpkt_or_notif_sane_1): Use it. Make
+ sure debug output printing a packet buffer goes through a single
+ fprintf_unfiltered call.
+ * utils.c (vfprintf_unfiltered): If outputting timestamps, end
+ output with a newline if it wasn't going to already.
+
+2008-11-18 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * maint.c (maintenance_translate_address): Fix a buglet.
+
+2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * features/Makefile (rs6000/powerpc-isa205-32l-expedite,
+ rs6000/powerpc-isa205-altivec32l-expedite,
+ powerpc-isa205-vsx32l-expedite, rs6000/powerpc-isa205-64l-expedite,
+ rs6000/powerpc-isa205-altivec64l-expedite,
+ powerpc-isa205-vsx64l-expedite): New variables.
+ * regformats/rs6000/powerpc-isa205-32l.dat: Generate.
+ * regformats/rs6000/powerpc-isa205-altivec32l.dat: Generate.
+ * regformats/rs6000/powerpc-isa205-vsx32l.dat: Generate.
+ * regformats/rs6000/powerpc-isa205-64l.dat: Generate.
+ * regformats/rs6000/powerpc-isa205-altivec64l.dat: Generate.
+ * regformats/rs6000/powerpc-isa205-vsx64l.dat: Generate.
+
+2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * ppc-linux-nat.c (ppc_register_u_addr): Add special case to return
+ offset for full 64-bit slot of FPSCR when in 32-bits.
+ (ppc_linux_read_description): Return target description with 64-bit
+ FPSCR when inferior is running on an ISA 2.05 or later processor.
+ * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Call
+ initialize_tdec_powerpc_isa205_32l,
+ initialize_tdec_powerpc_isa205_altivec32l,
+ initialize_tdec_powerpc_isa205_vsx32l,
+ initialize_tdec_powerpc_isa205_64l,
+ initialize_tdec_powerpc_isa205_altivec64l and
+ initialize_tdec_powerpc_isa205_vsx64l.
+ * ppc-linux-tdep.h: Add external declaration for
+ tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l,
+ tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_64l,
+ tdesc_powerpc_isa205_altivec64l and tdesc_powerpc_isa205_vsx64l.
+ * features/rs600/powerpc-fpu-isa205.xml: New file.
+ * features/rs600/powerpc-isa205-32l.xml: New file.
+ * features/rs600/powerpc-isa205-64l.xml: New file.
+ * features/rs600/powerpc-isa205-altivec32l.xml: New file.
+ * features/rs600/powerpc-isa205-altivec64l.xml: New file.
+ * features/rs600/powerpc-isa205-vsx32l.xml: New file.
+ * features/rs600/powerpc-isa205-vsx64l.xml: New file.
+ * features/rs600/powerpc-isa205-32l.c: Generate.
+ * features/rs600/powerpc-isa205-64l.c: Generate.
+ * features/rs600/powerpc-isa205-altivec32l.c: Generate.
+ * features/rs600/powerpc-isa205-altivec64l.c: Generate.
+ * features/rs600/powerpc-isa205-vsx32l.c: Generate.
+ * features/rs600/powerpc-isa205-vsx64l.c: Generate.
+
+2008-11-18 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * objfiles.h: New MULTI_OBJFILE_P macro.
+ * printcmd.c (sym_info): Print object name.
+ * maint.c (maintenance_translate_address): Likewise.
+
+2008-11-18 Joel Brobecker <brobecker@adacore.com>
+
+ * NEWS: Document the removal of "catch load" and "catch unload".
+
+2008-11-17 Doug Evans <dje@google.com>
+
+ * infcall.c (call_function_by_hand): Fix punctuation and capitalization
+ on error messages.
+
+2008-11-17 Ulrich Weigand <uweigand@de.ibm.com>
+
+ PR gdb/2250
+ * infrun.c (clear_proceed_status_thread): New function.
+ (clear_proceed_status_callback): New function.
+ (clear_proceed_status): In all-stop mode, clear per-thread
+ proceed status of *all* threads, not only the current.
+ (handle_inferior_event): In all-stop mode, if we're stepping
+ one thread, but got some inferior event in another thread
+ that does not cause GDB to break to the user interface,
+ ensure the interrupted stepping operation continues in the
+ original thread.
+ (currently_stepping): Move thread-related tests to ...
+ (currently_stepping_thread): ... this new function.
+ (currently_stepping_callback): New function.
+
+2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+
+ Implement =thread-selected notification.
+
+ * mi/mi-common.h (struct mi_interp): New, moved from ...
+ * mi/mi-interp.c: ...here.
+ * mi/mi-main.c (mi_execute_command): If the thread changed
+ as result of command, report that.
+
+2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+
+ Implement continue/interrupt of thread groups.
+
+ * mi/mi-main.c (proceed_thread_callback): New.
+ (mi_cmd_exec_continue): If --thread-group is specified, resume all
+ threads in that group.
+ (interrupt_thread_callback): New.
+ (mi_cmd_exec_interrupt): If --thread-group is specified, interrupt
+ all threads in that group.
+
+2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+
+ Implement '-target-detach pid'.
+
+ * infcmd.c (detach_command): Make nonstatic.
+ * inferior.h (detach_command): Declare.
+ * mi/mi-cmds.c (mi_cmds): Don't route -target-detach via CLI.
+ * mi/mi-cmds.h (mi_cmd_target_detach): Declare.
+ * mi/mi-main.c (find_thread_of_process, mi_cmd_target_detach): New.
+
+2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+
+ Include group-id in thread-created notification.
+
+ * mi/mi-interp.c (mi_new_thread, mi_thread_exit): Include
+ group id in the output.
+
+2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+
+ Notification for attach/detach.
+
+ * inferior.c: Call the process observers.
+ * mi/mi-interp.c (mi_new_inferior, mi_inferior_exit): New.
+ (mi_interpreter_init): Register the above.
+
+2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+
+ Implement -list-thread-groups.
+
+ * thread.c (print_thread_info): New parameter pid, to print
+ threads of specific process.
+ * gdbthread.h (print_thread_info): New parameter pid.
+ * mi/mi-cmds.c (mi_cmds): Register -list-thread-groups.
+ * mi/mi-cmds.h (mi_cmd_list_thread_groups): New.
+ * mi/mi-main.c (mi_cmd_thread_info): Adjust.
+ (print_one_process, mi_cmd_list_thread_groups): New.
+
+2008-11-16 Joel Brobecker <brobecker@adacore.com>
+
+ Remove some unused macros related to the old load/unload catchpoints.
+
+ * breakpoint.c (SOLIB_LOADED_LIBRARY_PATHNAME)
+ (SOLIB_UNLOADED_LIBRARY_PATHNAME, SOLIB_CREATE_CATCH_LOAD_HOOK)
+ (SOLIB_CREATE_CATCH_UNLOAD_HOOK): Delete. No longer used.
+
+2008-11-16 Joel Brobecker <brobecker@adacore.com>
+
+ Remove support for catch load and catch unload commands.
+
+ * breakpoint.h (enum bptype): Remove bp_catch_load and bp_catch_unload.
+ (struct breakpoint): Remove fields dll_pathname and
+ triggered_dll_pathname.
+ (bpstat_get_triggered_catchpoints, ep_is_shlib_catchpoint): Delete.
+ * breakpoint.c (ep_is_catchpoint): Remove handling of
+ bp_catch_load and bp_catch_unload.
+ (print_it_typical, bpstat_check_location, bpstat_what)
+ (print_one_breakpoint_location, print_one_breakpoint_location)
+ (user_settable_breakpoint, allocate_bp_location)
+ (set_raw_breakpoint_without_location, mention, delete_breakpoint,
+ (breakpoint_re_set_one, disable_command, enable_command): Likewise.
+ (ep_is_shlib_catchpoint, bpstat_get_triggered_catchpoints)
+ (catch_load_command_1, catch_unload_command_1): Delete.
+ (_initialize_breakpoint): Remove the "catch load" and "catch unload"
+ command creation.
+ * infrun.c (handle_inferior_event): Remove the handling of
+ load/unload catchpoint events.
+
+2008-11-15 Joel Brobecker <brobecker@adacore.com>
+
+ From Jerome Guitton <guitton@adacore.com>
+ * dwarf2read.c (dwarf2_debug_line_missing_end_sequence_complaint):
+ New function.
+ (dwarf_decode_lines): Detect null file numbers. Detect the end of
+ the line program sequence when no end sequence is emitted.
+
+2008-11-15 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (ada_evaluate_subexp): Improve handling of integer
+ type dereferencing.
+
+2008-11-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * NEWS: Mention sparc64-linux-gnu gdbserver support.
+
+2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
+
+ * configure.tgt (sparc64-*-linux*): Added gdbserver support.
+ * regformats/reg-sparc64.dat: New file.
+
+2008-11-14 Tom Tromey <tromey@redhat.com>
+
+ PR mi/2549:
+ * mi/mi-main.c (get_register): Use get_formatted_print_options.
+
+2008-11-13 Joel Brobecker <brobecker@adacore.com>
+
+ * printcmd.c: define PRINTF_HAS_LONG_LONG only if not yet defined.
+
+2008-11-13 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * auxv.c (fprint_target_auxv): Handle AT_BASE_PLATFORM and
+ AT_EXECFN. Re-sort AT_SECURE.
+
+2008-11-13 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * monitor.c (monitor_insert_breakpoint): Remove unused variable `bp'.
+
+2008-11-13 Joel Brobecker <brobecker@adacore.com>
+
+ * ia64-tdep.c: Remove commented out #define.
+
+2008-11-12 Joel Brobecker <brobecker@adacore.com>
+
+ From Joel Sherrill <joel.sherrill@oarcorp.com>
+ * remote-sim.c (gdbsim_mourn_inferior): Use "target" parameter
+ instead of the "gdbsim_ops" global.
+
+2008-11-11 Doug Evans <dje@google.com>
+
+ * infcall.c (call_function_by_hand): Handle inferior exit.
+
+2008-11-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * remote-sim.c (gdbsim_create_inferior, gdbsim_mourn_inferior): Add
+ missing struct target_ops argument.
+
+2008-11-11 Joel Sherrill <joel.sherrilL@oarcorp.com>
+
+ * MAINTAINERS: Add myself for write after approval privileges.
+
+2008-11-10 Tom Tromey <tromey@redhat.com>
+
+ * gdbtypes.c (copy_type_recursive): Clear new fields.
+
+2008-11-10 Tom Tromey <tromey@redhat.com>
+
+ * cli/cli-cmds.c (source_script): Clean up full_pathname. Run
+ cleanups on early return.
+
+2008-11-09 Vladimir Prus <vladimir@codesourcery.com>
+
+ Kill pthread_ops_hack
+
+ * target.h (struct target_ops): Make to_attach, to_detach,
+ to_create_inferior and to_mourn_inferior accept a pointer
+ to struct target_ops.
+ (target_attach, target_create_inferior, target_create_inferior):
+ Convert from macros to function. Find the right target to
+ invoke a method of.
+ (find_default_attach, find_default_create_inferior): New parameter
+ ops.
+ * corefile.c (core_file_command): Pass target to to_detach.
+ * corelow.c (core_detach): Add 'ops' parameter.
+ * fork-child.c (fork_inferior): Return the pid. Allow
+ init_trace_fun to be NULL.
+ * inf-ptrace (ptrace_ops_hack): Remove.
+ (inf_ptrace_him): Remove, moving all logic into....
+ (inf_ptrace_create_inferior): ... here. Push the target
+ passed as parameter.
+ (inf_ptrace_mourn_inferior, inf_ptrace_attach, inf_ptrace_detach):
+ Push/pop target passed as parameter, no ptrace_ops_hack.
+ (inf_ptrace_target): Don't remember result.
+ * inferior.h (fork_inferior): Adjust prototype.
+ * linux-nat.c (linux_nat_create_inferior, linux_nat_attach)
+ (linux_nat_detach, linux_nat_mourn_inferior): New parameter ops.
+ Pass it to linux_ops target.
+ * linux-thread-db.c (thread_db_detach, thread_db_mourn_inferior):
+ New parameter ops. Pass it to the target beneath.
+ * remote.c (remote_mourn, extended_remote_mourn, remote_detach)
+ (extended_remote_create_inferior): New parameter ops. Pass it
+ further.
+ * target.c (debug_to_attach, debug_to_detach)
+ (debug_to_mourn_inferior): New parameter ops.
+ (target_create_inferior): New.
+ (update_current_target): Do not inherit to_attach, to_detach,
+ to_create_inferiour, to_mourn_inferior. Do not default
+ to_detach and to_mourn_inferior.
+ (target_detach): Find the right target to use.
+ (target_mourn_inferior): New.
+ (find_default_attach, find_default_create_inferior): New parameter
+ ops. Pass the found target when calling its method.
+ (init_dummy_target): Provide fallback definition of to_detach.
+ (target_attach): New.
+ (debug_to_attach, debug_to_detach, debug_to_create_inferior)
+ (debug_to_mourn_inferiour): New parameter ops.
+ * aix-thread.c: Adjust.
+ * bsd-uthread.c: Adjust.
+ * gnu-nat.c: Adjust.
+ * go32-nat.c: Adjust.
+ * hpux-thread.c: Adjust.
+ * inf-ttrace.c: Ajust.
+ * monitor.c: Adjust.
+ * nto-procfs.c: Adjust.
+ * procfs.c: Adjust.
+ * remote-m32r-sdi.c: Adjust.
+ * remote-mips.c: Adjust.
+ * remote-sim.c: Adjust.
+ * rs6000-nat.c: Adjust.
+ * sol-thread.c: Adjust.
+ * win32-nat.c: Adjust.
+ * dec-thread.c: Adjust.
+
+2008-11-09 Vladimir Prus <vladimir@codesourcery.com>
+
+ * thread.c (print_thread_info): Eliminate now useless checks
+ for exited threads.
+
+2008-11-06 Pedro Alves <pedro@codesourcery.com>
+
+ * i386-dicos-tdep.c (i386_dicos_init_abi): Set decr_pc_after_break
+ to 0.
+
+2008-11-05 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (notice_new_inferiors): Add a new inferior only when
+ we're going to add a new thread.
+
+2008-11-05 Pedro Alves <pedro@codesourcery.com>
+
+ * defs.h (add_inferior_continuation)
+ (do_all_inferior_continuations)
+ (discard_all_inferior_continuations): Declare.
+ * utils.c (add_inferior_continuation)
+ (do_all_inferior_continuations)
+ (discard_all_inferior_continuations): New.
+ * inferior.h (struct inferior) <continuations>: New field.
+ * inferior.c (free_inferior): Discard all the inferior
+ continuations.
+ * inf-loop.c (inferior_event_handler): Do all current inferior
+ continuations.
+ * infcmd.c (attach_command): Register an inferior continuation
+ instead of a thread continuation.
+ * infrun.c (handle_inferior_event): If stop_soon is
+ STOP_QUIETLY_NO_SIGSTOP, also expect a TARGET_SIGNAL_0.
+
+2008-11-04 Pedro Alves <pedro@codesourcery.com>
+
+ * inf-loop.c (inferior_event_handler): On INF_ERROR and
+ INF_REG_EVENT throwing, don't call target_async or pop_target.
+ Call pop_all_targets_above.
+ * remote.c (remote_close): Call remote_terminal_ours. Don't call
+ signal or target_async.
+
+2008-11-04 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * eval.c (evaluate_subexp_standard): Assert that there is at
+ least one array dimension.
+
+2008-11-03 Vladimir Prus <vladimir@codesourcery.com>
+
+ Make attach_command exception-safe
+ * infcmd.c (attach_command): Call async_enable_stdin
+ if exception is thrown.
+
+2008-11-03 Pedro Alves <pedro@codesourcery.com>
+
+ * gdbarch.sh (has_global_solist): Mention global breakpoints.
+ * gdbarch.h: Regenerate.
+
+2008-11-03 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_start_remote): If the solib list is global,
+ fetch libraries and insert breakpoints after connecting.
+ * infcmd.c (post_create_inferior): If the solist is shared between
+ inferiors, no need to refetch it on every new inferior.
+ (detach_command): If the shared library list is shared between
+ inferiors, then don't clear it on every inferior detach.
+ * gdbarch.sh (has_global_solist): New.
+ * i386-dicos-tdep.c (i386_dicos_init_abi): Set
+ gdbarch_has_global_solist.
+ * target.c (target_pre_inferior): If the shared library list is
+ shared between inferiors, then don't clear it here, neither
+ invalidate the memory regions or clear the target description.
+ (target_detach): If the shared library list is shared between
+ inferiors, then don't remove breakpoints from the target here.
+ (target_disconnect): Comment.
+ * solib.c (update_solib_list): Check for null_ptid.
+ * breakpoint.c (insert_breakpoints, update_global_location_list):
+ If the shared library list is shared between inferiors, insert
+ breakpoints even if there's no execution.
+ (breakpoint_init_inferior): If the shared library list is shared
+ between inferiors, don't delete breakpoints or mark them
+ uninserted here.
+
+ * gdbarch.c, gdbarch.h: Regenerate.
+
+2008-10-31 Pedro Alves <pedro@codesourcery.com>
+
+ * inferior.h (inferior_ignoring_leading_exec_events): Delete
+ declaration.
+
+2008-10-31 Pedro Alves <pedro@codesourcery.com>
+
+ * inferior.h (write_inferior_status_register): Delete.
+ * infrun.c (write_inferior_status_register): Delete.
+
+2008-10-30 Tom Tromey <tromey@redhat.com>
+
+ * value.c (coerce_array): Use check_typedef.
+
+2008-10-30 Tom Tromey <tromey@redhat.com>
+
+ * cli/cli-logging.c (handle_redirections): Make a cleanup.
+ * reggroups.c (maintenance_print_reggroups): Make a cleanup.
+ * regcache.c (regcache_print): Make a cleanup.
+ * maint.c (maintenance_print_architecture): Make a cleanup.
+ * dummy-frame.c (maintenance_print_dummy_frames): Make a cleanup.
+
+2008-10-30 Tom Tromey <tromey@redhat.com>
+
+ * utils.c (make_cleanup_close): Use make_cleanup_dtor.
+ (do_close_cleanup): Don't free 'fd'.
+
+2008-10-30 Tom Tromey <tromey@redhat.com>
+
+ * source.c (symtab_to_fullname): Test 'r >= 0'.
+ (psymtab_to_fullname): Likewise.
+ (get_filename_and_charpos): Make a cleanup.
+ (forward_search_command): Likewise.
+ (reverse_search_command): Likewise.
+ * exec.c (exec_file_attach): Close scratch_chan on failure.
+ * nto-procfs.c (procfs_open): Make a cleanup.
+ (procfs_pidlist): Likewise.
+ (do_closedir_cleanup): New function.
+
+2008-10-30 Andreas Schwab <schwab@suse.de>
+
+ * infcmd.c (construct_inferior_arguments): Handle newlines
+ specially.
+
+2008-10-30 Joel Brobecker <brobecker@adacore.com>
+
+ * breakpoint.h (enum bptype): Delete bp_catch_exec.
+ * breakpoint.c (insert_catchpoint): Remove handling for
+ bp_catch_exec breakpoint kinds.
+ (insert_bp_location, update_breakpoints_after_exec, remove_breakpoint)
+ (ep_is_catchpoint, print_it_typical, bpstat_check_location),
+ (bpstat_check_location, bpstat_what, print_one_breakpoint_location)
+ (print_one_breakpoint_location, user_settable_breakpoint)
+ (breakpoint_address_is_meaningful, adjust_breakpoint_address)
+ (allocate_bp_location, mention, breakpoint_re_set_one)
+ (disable_command, enable_command): Likewise.
+ (create_exec_event_catchpoint): Delete.
+ (insert_catch_exec, remove_catch_exec, breakpoint_hit_catch_exec)
+ (print_it_catch_exec, print_one_catch_exec, print_mention_catch_exec):
+ New functions.
+ (catch_exec_breakpoint_ops): New static global.
+ (catch_exec_command_1): Use create_catchpoint instead of
+ create_exec_event_catchpoint to create the exec catchpoint.
+
+2008-10-28 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in (SUBDIR_CLI_OBS): Don't mention cli-utils.o.
+ (SUBDIR_CLI_DEPS): Don't mention cli-utils.c.
+ (HFILES_NO_SRCDIR): Don't mention cli-utils.h.
+ (cli-utils.o): Remove.
+ * cli/cli-utils.c: Remove.
+ * cli/cli-utils.h: Remove.
+
+2008-10-28 Tom Tromey <tromey@redhat.com>
+
+ * varobj.c (value_get_print_value): Include valprint.h.
+ (value_get_print_value): Use get_formatted_print_options.
+ * value.h (struct value_print_options): Declare.
+ (value_print, val_print, common_val_print, val_print_string):
+ Update.
+ * value.c: Include valprint.h.
+ (show_values): Use get_user_print_options.
+ (show_convenience): Likewise.
+ * valprint.h (prettyprint_arrays, prettyprint_structs): Don't
+ declare.
+ (struct value_print_options): New type.
+ (vtblprint, unionprint, addressprint, objectprint, print_max,
+ inspect_it, repeat_count_threshold, output_format,
+ stop_print_at_null): Don't declare.
+ (user_print_options, get_user_print_options,
+ get_raw_print_options, get_formatted_print_options): Declare.
+ (print_array_indexes_p): Don't declare.
+ (maybe_print_array_index, val_print_array_elements): Update.
+ * valprint.c (print_max): Remove.
+ (user_print_options): New global.
+ (get_user_print_options, get_raw_print_options,
+ get_formatted_print_options): New functions.
+ (print_array_indexes, repeat_count_threshold, stop_print_at_null,
+ prettyprint_structs, prettyprint_arrays, unionprint,
+ addressprint): Remove.
+ (val_print): Remove format, deref_ref, pretty arguments; add
+ options. Update.
+ (common_val_print): Likewise.
+ (print_array_indexes_p): Remove.
+ (maybe_print_array_index): Remove format, pretty arguments; add
+ options. Update.
+ (val_print_array_elements): Remove format, deref_ref, pretty
+ arguments; add options. Update.
+ (val_print_string): Add options argument. Update.
+ (_initialize_valprint): Use user_print_options.
+ (output_format): Remove.
+ (set_output_radix_1): Use user_print_options.
+ * typeprint.c: Include valprint.h.
+ (objectprint): Don't declare.
+ (whatis_exp): Use get_user_print_options.
+ * tui/tui-regs.c: Include valprint.h.
+ (tui_register_format): Use get_formatted_print_options.
+ * tracepoint.c: Include valprint.h.
+ (addressprint): Don't declare.
+ (trace_mention): Use get_user_print_options.
+ (tracepoints_info): Likewise.
+ * stack.c (print_frame_args): Use get_raw_print_options.
+ (print_frame_info): Use get_user_print_options.
+ (print_frame): Likewise.
+ * sh64-tdep.c: Include valprint.h
+ (sh64_do_register): Use get_formatted_print_options.
+ * scm-valprint.c (scm_inferior_print): Remove format, deref_ref,
+ pretty arguments; add options.
+ (scm_scmlist_print): Likewise. Update.
+ (scm_scmval_print): Likewise.
+ (scm_val_print): Likewise.
+ (scm_value_print): Remove format, pretty arguments; add options.
+ Update.
+ * scm-lang.h (scm_value_print, scm_val_print, scm_scmval_print):
+ Update.
+ * scm-lang.c (scm_printstr): Add options argument.
+ * python/python-value.c: Include valprint.h.
+ (valpy_str): Use get_user_print_options.
+ * printcmd.c: Include valprint.h.
+ (addressprint): Don't declare.
+ (inspect_it): Remove.
+ (print_formatted): Remove format option; add options. Update.
+ (print_scalar_formatted): Likewise.
+ (print_address_demangle): Use get_user_print_options.
+ (do_examine): Use get_formatted_print_options.
+ (print_command_1): Likewise.
+ (output_command): Use get_formatted_print_options.
+ (do_one_display): Likewise.
+ (print_variable_value): Use get_user_print_options.
+ * p-valprint.c (pascal_val_print): Remove format, deref_ref,
+ pretty arguments; add options. Update.
+ (pascal_value_print): Remove format, pretty arguments; add
+ options. Update.
+ (vtblprint, objectprint): Don't declare.
+ (pascal_static_field_print): Remove.
+ (pascal_object_print_value_fields): Remove format, pretty
+ arguments; add options. Update.
+ (pascal_object_print_static_field): Likewise.
+ (_initialize_pascal_valprint): Use user_print_options. Update.
+ * p-lang.h (pascal_val_print, pascal_value_print,
+ pascal_printstr, pascal_object_print_value_fields): Update.
+ (vtblprint, static_field_print): Don't declare.
+ * p-lang.c (pascal_printstr): Add options argument. Update.
+ * objc-lang.c (objc_printstr): Add options argument. Update.
+ * mt-tdep.c: Include valprint.h.
+ (mt_registers_info): Use get_raw_print_options.
+ * mips-tdep.c: Include valprint.h.
+ (mips_print_fp_register): Use get_formatted_print_options.
+ (mips_print_register): Likewise.
+ * mi/mi-main.c: Include valprint.h.
+ (get_register): Use get_user_print_options.
+ (mi_cmd_data_evaluate_expression): Likewise.
+ (mi_cmd_data_read_memory): Use get_formatted_print_options.
+ * mi/mi-cmd-stack.c: Include valprint.h.
+ (list_args_or_locals): Use get_raw_print_options.
+ * m2-valprint.c (print_function_pointer_address): Add addressprint
+ argument.
+ (m2_print_long_set): Remove format, pretty arguments.
+ (m2_print_unbounded_array): Remove format, deref_ref, pretty
+ arguments; add options. Update.
+ (print_unpacked_pointer): Remove format argument; add options.
+ Now static. Update.
+ (print_variable_at_address): Remove format, deref_ref, pretty
+ arguments; add options. Update.
+ (m2_print_array_contents): Likewise.
+ (m2_val_print): Likewise.
+ * m2-lang.h (m2_val_print): Update.
+ * m2-lang.c (m2_printstr): Add options argument. Update.
+ * language.h (struct value_print_options): Declare.
+ (struct language_defn) <la_printstr>: Add options argument.
+ <la_val_print>: Remove format, deref_ref, pretty argument; add
+ options.
+ <la_value_print>: Remove format, pretty arguments; add options.
+ <la_print_array_index>: Likewise.
+ (LA_VAL_PRINT, LA_VALUE_PRINT, LA_PRINT_STRING,
+ LA_PRINT_ARRAY_INDEX): Update.
+ (default_print_array_index): Update.
+ * language.c (default_print_array_index): Remove format, pretty
+ arguments; add options. Update.
+ (unk_lang_printstr): Add options argument.
+ (unk_lang_val_print): Remove format, deref_ref, pretty arguments;
+ add options.
+ (unk_lang_value_print): Remove format, pretty arguments; add
+ options.
+ * jv-valprint.c (java_value_print): Remove format, pretty
+ arguments; add options. Update.
+ (java_print_value_fields): Likewise.
+ (java_val_print): Remove format, deref_ref, pretty arguments; add
+ options. Update.
+ * jv-lang.h (java_val_print, java_value_print): Declare.
+ * infcmd.c: Include valprint.h.
+ (print_return_value): Use get_raw_print_options.
+ (default_print_registers_info): Use get_user_print_options,
+ get_formatted_print_options.
+ (registers_info): Use get_formatted_print_options.
+ * gdbtypes.h (struct value_print_options): Declare.
+ (print_scalar_formatted): Update.
+ * f-valprint.c (f77_print_array_1): Remove format, deref_ref,
+ pretty arguments; add options. Update.
+ (f77_print_array): Likewise.
+ (f_val_print): Likewise.
+ * f-lang.h (f_val_print): Update.
+ * f-lang.c (f_printstr): Add options argument. Update.
+ (c_value_print): Update declaration.
+ * expprint.c: Include valprint.h.
+ (print_subexp_standard): Use get_raw_print_options,
+ get_user_print_options.
+ * eval.c: Include valprint.h.
+ (objectprint): Don't declare.
+ (evaluate_subexp_standard): Use get_user_print_options.
+ * cp-valprint.c (vtblprint, objectprint, static_field_print):
+ Remove.
+ (cp_print_value_fields): Remove format, pretty arguments; add
+ options. Update.
+ (cp_print_value): Likewise.
+ (cp_print_static_field): Likewise.
+ (_initialize_cp_valprint): Use user_print_options. Update.
+ * c-valprint.c (print_function_pointer_address): Add addressprint
+ argument.
+ (c_val_print): Remove format, deref_ref, pretty arguments; add
+ options. Update.
+ (c_value_print): Add options argument. Update.
+ * c-lang.h (c_val_print, c_value_print, c_printstr): Update.
+ (vtblprint, static_field_print): Don't declare.
+ (cp_print_value_fields): Update.
+ * c-lang.c (c_printstr): Add options argument. Update.
+ * breakpoint.c: Include valprint.h.
+ (addressprint): Don't declare.
+ (watchpoint_value_print): Use get_user_print_options.
+ (print_one_breakpoint_location): Likewise.
+ (breakpoint_1, print_it_catch_fork, print_it_catch_vfork, mention,
+ print_exception_catchpoint): Likewise.
+ * auxv.c (fprint_target_auxv): Don't declare addressprint. Use
+ get_user_print_options.
+ * ada-valprint.c (struct ada_val_print_args): Remove format,
+ deref_ref, and pretty; add options.
+ (print_optional_low_bound): Add options argument.
+ (val_print_packed_array_elements): Remove format and pretty
+ arguments; add options. Update.
+ (printstr): Add options argument. Update.
+ (ada_printstr): Likewise.
+ (ada_val_print): Remove format, deref_ref, pretty arguments; add
+ options argument. Update.
+ (ada_val_print_stub): Update.
+ (ada_val_print_array): Remove format, deref_ref, pretty arguments;
+ add options. Update.
+ (ada_val_print_1): Likewise.
+ (print_variant_part): Likewise.
+ (ada_value_print): Remove format, pretty arguments; add options.
+ Update.
+ (print_record): Likewise.
+ (print_field_values): Likewise.
+ * ada-lang.h (ada_val_print, ada_value_print, ada_printstr):
+ Update.
+ * ada-lang.c (ada_print_array_index): Add options argument; remove
+ format and pretty arguments.
+ (print_one_exception): Use get_user_print_options.
+
+2008-10-28 Tom Tromey <tromey@redhat.com>
+
+ * cli/cli-script.c (do_fclose_cleanup): Remove.
+ (script_from_file): Use make_cleanup_fclose.
+ * xml-tdesc.c (do_cleanup_fclose): Remove.
+ (fetch_xml_from_file): Use make_cleanup_fclose.
+ * tracepoint.c (tracepoint_save_command): Use
+ make_cleanup_fclose. Always free pathname.
+ * source.c (print_source_lines_base): Use make_cleanup_fclose.
+ * remote.c (fclose_cleanup): Remove.
+ (remote_file_put): Use make_cleanup_fclose.
+ (remote_file_get): Likewise.
+ * linux-nat.c (linux_nat_find_memory_regions): Use
+ make_cleanup_fclose.
+ (linux_nat_info_proc_cmd): Likewise.
+ (linux_proc_pending_signals): Likewise.
+ * fbsd-nat.c (fbsd_find_memory_regions): Use make_cleanup_fclose.
+ Free file name.
+ * cli/cli-dump.c (do_fclose_cleanup): Remove.
+ (make_cleanup_fclose): Remove.
+ * defs.h (make_cleanup_fclose): Declare.
+ * utils.c (do_fclose_cleanup): New function.
+ (make_cleanup_fclose): Likewise.
+
+2008-10-27 Pedro Alves <pedro@codesourcery.com>
+
+ * inflow.c (kill_command): If the target claims there is still
+ execution, don't clear the thread list.
+
+2008-10-27 Pedro Alves <pedro@codesourcery.com>
+
+ * cp-name-parser.y: Include defs.h instead of config.h.
+ (parse_escape): Rename to ...
+ (cp_parse_escape): ... this.
+ (yylex): Update.
+ (xfree) [TEST_CPNAMES]: New.
+
+2008-10-27 Pedro Alves <pedro@codesourcery.com>
+
+ * CONTRIBUTE: Mention autoconf 2.59 and configure.ac instead of
+ 2.13 and configure.in.
+
+2008-10-27 Pedro Alves <pedro@codesourcery.com>
+
+ * target.h (struct target_ops) <to_supports_multi_process>: New
+ field.
+ (target_supports_multi_process): New define.
+ * target.c (update_current_target): Inherit and de_fault
+ to_supports_multi_process.
+ * infcmd.c (attach_command): Allow attaching to multiple processes
+ if the target supports it.
+ (detach_command): If the target claims there is still execution,
+ don't clear the thread list.
+ * remote.c (remote_supports_multi_process): New.
+ (init_remote_ops): Register remote_supports_multi_process.
+
+2008-10-27 Pedro Alves <pedro@codesourcery.com>
+
+ * Makefile.in (.y.c, .l.c): sed free to xfree.
+
+2008-10-27 Pedro Alves <pedro@codesourcery.com>
+
+ * Makefile.in (INSTALLED_LIBS, CLIBS): Remove reference to
+ $(TM_CLIBS).
+ (CDEPS): Remove reference to $(TM_CDEPS).
+
+2008-10-26 Michael Snyder <msnyder@vmware.com>
+
+ * infrun.c (handle_inferior_event): Handle dynamic symbol
+ resolution in reverse.
+
+2008-10-25 Joel Brobecker <brobecker@adacore.com>
+
+ * infrun.c: Minor comment reformatting.
+
+2008-10-25 Pedro Alves <pedro@codesourcery.com>
+
+ * ada-exp.y (write_object_renaming): Use malloc instead of
+ xmalloc.
+ * p-exp.y (pop_current_type): Use free instead of xfree.
+
+2008-10-24 Pedro Alves <pedro@codesourcery.com>
+
+ * fork-child.c (startup_inferior): Only set threads not-executing
+ after getting all the pending execs. On TARGET_WAITKIND_IGNORE,
+ keep waiting, don't resume. On all other cases but
+ TARGET_WAITKIND_SIGNALLED and TARGET_WAITKIND_EXITED, switch to
+ the event ptid.
+
+2008-10-24 Pedro Alves <pedro@codesourcery.com>
+
+ Remote non-stop mode support.
+
+ * remote.c (pending_stop_reply): New.
+ (struct remote_state) <non_stop_aware, support_vCont_t>: New
+ fields.
+ (remote_async_inferior_event_token)
+ (remote_async_get_pending_events_token): New.
+ (notice_new_inferiors): New, abstracted out from record_currthread.
+ (record_currthread): Call it.
+ (remote_threads_info): Default threads to running in non-stop
+ mode. In non-stop mode, only qfThreadInfo is supported.
+ (remote_close): Discard all pending stop_replies. Close the event
+ sources.
+ (set_stop_requested_callback): New.
+ (remote_start_remote): Implement non-stop mode startup. In
+ all-stop, don't clear the thread list here.
+ (remote_non_stop_feature): New.
+ (remote_protocol_features): Add a "QNonStop" feature.
+ (remote_open_1): Clear cached_wait_status and non_stop_aware.
+ Clear the thread list here.
+ (remote_detach_1): Discard pending stop replies of the process we
+ detached from.
+ (extended_remote_attach_1): Implement non-stop mode.
+ (remote_vcont_probe): Recognize `vCont;t'.
+ (remote_vcont_resume): Implement non-stop mode.
+ (remote_resume): Don't set waiting_for_stop_reply in non-stop
+ mode.
+ (remote_stop_ns): New.
+ (remote_stop): Rename to ...
+ (remote_stop_as): ... this. If we have a cached wait status,
+ don't bother interrupting the remote.
+ (remote_stop): Reimplement as wrapper around remote_stop_as and
+ remote_stop_ns.
+ (interrupt_query): Don't query in async mode.
+ (struct cached_reg, cahed_reg_t): New.
+ (struct stop_reply): New.
+ (stop_reply_queue): New.
+ (stop_reply_xmalloc, stop_reply_xfree)
+ (discard_pending_stop_replies, do_stop_reply_xfree)
+ (queued_stop_reply, push_stop_reply, peek_stop_reply)
+ (remote_parse_stop_reply, remote_get_pending_stop_replies)
+ (process_stop_reply): New.
+ (remote_wait_ns): New.
+ (remote_wait_as): Use remote_parse_stop_reply. Invalidate the
+ notion of current general thread is a process exit was reported.
+ (remote_wait): Call remote_wait_ns in non-stop mode.
+ (handle_notification): New.
+ (putpkt_binary): Handle notifications. Don't care for
+ waiting_for_stop_reply in non-stop mode.
+ (getpkt_sane): Rename to ...
+ (getpkt_or_notif_sane_1): ... this. Add `expecting_notif'
+ argument. Handle it. Handle notifications.
+ (getpkt_sane): Reimplement as wrapper around getpkt_or_notif_sane_1.
+ (getpkt_or_notif_sane): New.
+ (select_new_thread_callback): Check for exited state instead of
+ comparing the ptid against minus_one_ptid.
+ (extended_remote_create_inferior_1): Query the remote about the
+ current thread.
+ (remote_supports_non_stop): New.
+ (init_remote_ops): Register it.
+ (remote_async_inferior_event_handler): New.
+ (remote_async_get_pending_events_handler): New.
+
+ * infcmd.c (proceed_thread_callback): Comment.
+ (proceed_after_attach_callback, proceed_after_attach): New.
+ (attach_command_post_wait): In background attach, resume all
+ threads, but only if they are unsignalled, and not explicitly
+ stopped. In foreground attach, in non-stop mode, make sure to
+ stop all threads of the just attached to process.
+ (attach_command): In non-stop mode: If doing a background attach,
+ stop at least one thread. If a foreground attach, stop all
+ threads.
+
+2008-10-24 Pedro Alves <pedro@codesourcery.com>
+
+ * event-loop.h: Mention async_event_handlers.
+ (async_event_handler): Forward declare.
+ (async_event_handler_func): New typedef.
+ (create_async_event_handler, delete_async_event_handler)
+ (mark_async_event_handler): Declare.
+ * event-loop.c (event_data): New.
+ (event_handler_func): Take an event_data instead of an integer.
+ (struct gdb_event): Replace the integer file descriptor by a
+ generic event_data.
+ (async_event_handler): New.
+ (async_handler_ready): Delete.
+ (async_event_handler_list): New.
+ (create_event): New.
+ (create_file_event): Use it.
+ (process_event): Adjust.
+ (gdb_do_one_event): Poll from the event sources in round-robin
+ fashion across calls. Be sure to consult all sources before
+ blocking.
+ (handle_file_event): Take an event_data instead of an integer.
+ Adjust.
+ (gdb_wait_for_event): Add `block' argument. Handle it.
+ (mark_async_signal_handler): Remove unneeded cast.
+ (invoke_async_signal_handler): Rename to ...
+ (invoke_async_signal_handlres): ... this. Return true if any was
+ handled.
+ (check_async_ready): Delete
+ (create_async_event_handler): New.
+ (mark_async_event_handler): New.
+ (struct async_event_handler_data): New.
+ (invoke_async_event_handler): New.
+ (check_async_event_handlers): New.
+ (delete_async_event_handler): New.
+ (handle_timer_event): Adjust.
+
+2008-10-24 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (typename_concat): Don't segv if prefix or suffix
+ is NULL. Simplify obs == NULL case.
+
+2008-10-24 Hui Zhu <teawater@gmail.com>
+ Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (can_use_displaced_stepping): Change type to
+ const char pointer.
+ (can_use_displaced_stepping_auto): New string.
+ (can_use_displaced_stepping_on): New string.
+ (can_use_displaced_stepping_off): New string.
+ (can_use_displaced_stepping_enum): New array.
+ (show_can_use_displaced_stepping): In auto mode, also show
+ the current effect of the option.
+ (use_displaced_stepping): Return non-zero if displaced
+ stepping is auto, and can be used with GDBARCH, and in
+ non-stop mode. Return non-zero if displaced stepping is on,
+ and can be used with GDBARCH. Return zero otherwise.
+ (_initialize_infrun): Make the "set displaced-stepping"
+ command an enum command. Change its class to class_run.
+ Place it in the top level set list. Extend help to describe
+ the auto mode.
+
+2008-10-23 Pedro Alves <pedro@codesourcery.com>
+
+ * defs.h: Mention ptid_is_pid.
+ * inferior.h (ptid_is_pid): Declare.
+ * gdbthread.h (struct thread_info) <stop_requested>: New field.
+ (set_stop_requested): Declare.
+ * infcmd.c (interrupt_target_1): Call set_stop_requested.
+ * infrun.c (clear_proceed_status): Clear stop_requested.
+ (infrun_thread_stop_requested_callback,
+ infrun_thread_stop_requested): New.
+ (handle_inferior_event): If a TARGET_SIGNAL_TRAP is reported on a
+ thread that had an explicit stop request, pretend we got a
+ TARGET_SIGNAL_0. Always stop if the thread had an explicit stop
+ request.
+ (print_stop_reason): In the SIGNAL_RECEIVED case, if we're not
+ outputting to MI, and we got a TARGET_SIGNAL_0, print "# Stopped",
+ instead of mentioning signal 0.
+ (ptid_is_pid): New.
+ * thread.c (set_stop_requested): New.
+
+ * linux-nat.c (queued_waitpid): Rename to ...
+ (queued_waitpid_1): ... this. Add `peek' argument. Handle it.
+ (queued_waitpid): New, as wrapper to queued_waitpid_1.
+ (push_waitpid): Push the SIGTRAP to the local event queue, to the
+ kernel's.
+ (send_sigint_callback): Delete.
+ (linux_nat_stop_lwp): New.
+ (linux_nat_stop): Use it.
+
+2008-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * python/python-value (valpy_getitem): Fix heap corruption.
+
+2008-10-23 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * nto-procfs.c (do_attach): Form proper ptid including pid and tid.
+ (procfs_create_inferior): Fetch list of threads.
+
+2008-10-23 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * nto-procfs.c (procfs_files_info): Fix a typo.
+ (procfs_create_inferior): Make attach_flag per-inferior.
+
+2008-10-23 Tom Tromey <tromey@redhat.com>
+
+ * python/python-value.c (value_to_value_object): Initialize
+ owned_by_gdb field.
+ (valpy_new): Likewise.
+
+2008-10-23 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Joel Brobecker <brobecker@adacore.com>
+
+ * ada-tasks.c (task_states, long_task_states): Use constant N_()
+ initializer. Define the strings as const.
+ (short_task_info, info_task): Translate the strings above.
+
+2008-10-22 Joel Brobecker <brobecker@adacore.com>
+
+ * NEWS: Add entry for new feature (Ada tasking support).
+
+2008-10-22 Joel Brobecker <brobecker@adacore.com>
+
+ * configure.ac: On alpha-osf, error out if enable_tui is set to
+ "yes", and set enable_tui to "no" if previously set to "auto".
+ Check for waddstr only if TUI support was requested. Move the
+ part of the configure script that updates various Makefile
+ variables up, together with the check for waddstr.
+ * configure: Regenerate.
+
+2008-10-22 Joel brobecker <brobecker@adacore.com>
+
+ * gdbtypes.c (copy_type): New function.
+ * gdbtypes.h (copy_type): Add declaration.
+ * ada-lang.c (ada_to_fixed_type_1): If there is a parallel XVZ
+ variable, then use it.
+
+2008-10-22 Joel Brobecker <brobecker@adacore.com>
+
+ * target.h (struct target_ops): Add new field to_get_ada_task_ptid.
+ (target_get_ada_task_ptid): New macro.
+ * target.c (default_get_ada_task_ptid): New function.
+ (update_current_target): Inherit field default_get_ada_task_ptid.
+ (update_current_target): Make default_get_ada_task_ptid the default
+ value for field to_get_ada_task_ptid.
+ * ada-lang.h (struct task_control_block): Delete. Never used.
+ (struct task_ptid, task_ptid_t, struct task_entry, task_list):
+ Likewise.
+ (struct ada_task_info): New.
+ (ada_task_is_alive, ada_find_printable_frame)
+ (ada_task_list_iterator_ftype, iterate_over_live_ada_tasks): Add
+ declarations.
+ (ada_build_task_list): Update prototype.
+ (init_task_list, ada_is_exception_breakpoint): Remove prototypes.
+ * ada-lang.c (ada_find_printable_frame): Make non-static.
+ * ada-tasks.c: New file.
+ * Makefile.in (SFILES): Add ada-tasks.c.
+ (COMMON_OBS): Add ada-tasks.o.
+ * linux-thread-db.c (thread_db_find_thread_from_tid)
+ (thread_db_get_ada_task_ptid): New functions.
+ (init_thread_db_ops): Set thread_db_ops.to_get_ada_task_ptid.
+
+2008-10-22 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/2506:
+ * c-exp.y (string_exp): New production.
+ (exp): Use it.
+
+2008-10-21 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * mips-tdep.c (mips_n32n64_fp_arg_chunk_p): Update TYPE_FIELD_STATIC
+ removed before.
+
+2008-10-20 Joel Brobecker <brobecker@adacore.com>
+
+ * NEWS: Add entry mentioning thread-support on Tru64
+
+2008-10-19 Joel Brobecker <brobecker@adacore.com>
+
+ * dec-thread.c: New file.
+ * config/alpha/alpha-osf3.mh (NATDEPFILES): Add dec-thread.o.
+ (NAT_CLIBS): Define.
+
+2008-10-19 Hui Zhu <teawater@gmail.com>
+
+ * infrun.c (handle_inferior_event): Set "stop_pc" when
+ TARGET_WAITKIND_NO_HISTORY.
+
+2008-10-19 Pedro Alves <pedro@codesourcery.com>
+
+ * python/python-value.c (value_object_methods)
+ (value_object_as_number, value_object_as_mapping): Move to bottom
+ of file.
+ (valpy_dealloc, valpy_new, valpy_length, valpy_getitem)
+ (valpy_setitem, valpy_str, valpy_add, valpy_subtract)
+ (valpy_multiply, valpy_divide, valpy_remainder, valpy_power)
+ (valpy_negative, valpy_positive, valpy_absolute, valpy_nonzero)
+ (valpy_richcompare, valpy_dereference): Don't forward-declare.
+ (valpy_length) [HAVE_LIBPYTHON2_4]: Change return type to `int'.
+
+2008-10-18 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (adjust_pc_after_break): Do nothing if executing in
+ reverse.
+
+2008-10-17 Pedro Alves <pedro@codesourcery.com>
+
+ * infcmd.c (GO_USAGE): Delete.
+ (go_command): Adjust.
+
+2008-10-17 Michael Snyder <msnyder@vmware.com>
+ Target interface for reverse debugging.
* target.h (enum target_waitkind):
Add new wait event, TARGET_WAITKIND_NO_HISTORY.
- (enum exec_direction_kind): New enum.
- (struct target_ops): New methods to_set_execdir, to_get_execdir.
- * target.c (target_get_execdir): New generic method.
- (target_set_execdir): Ditto.
- * remote.c (remote_get_execdir, remote_set_execdir): New methods.
- (remote_vcont_resume): Jump out if attempting reverse execution.
- (remote_resume): Check for reverse exec direction, and send
+ (struct target_ops): New method to_can_execute_reverse.
+ (target_can_execute_reverse): New macro.
+ * target.c (update_current_target): Inherit to_can_execute_reverse.
+
+ Remote interface for reverse debugging.
+ * remote.c (remote_can_execute_reverse): New target method.
+ (remote_resume): Check for reverse exec direction, and send
appropriate command to target.
- (remote_wait): Check target response for NO_HISTORY status.
+ (remote_wait_as): Check target response for NO_HISTORY status.
Also check for empty reply (target doesn't understand "bs" or "bc).
- (_initialize_remote): Add new methods to remote target vector.
+ (remote_vcont_resume): Jump out if attempting reverse execution.
- * breakpoint.h (breakpoint_silence): Export.
- * breakpoint.c (breakpoint_silence): New function.
- * infcmd.c (finish_command): Check for reverse exec direction.
- (finish_backward): New function, handle finish cmd in reverse.
- * infrun.c (enum inferior_stop_reason): Add NO_HISTORY reason.
+ Event handling interface for reverse debugging.
+ * infrun.c (execution_direction): New state variable.
+ (enum inferior_stop_reason): Add NO_HISTORY reason.
(handle_inferior_event): Handle TARGET_WAITKIND_NO_HISTORY.
Handle stepping over a function call in reverse.
Handle stepping thru a line range in reverse.
@@ -596,21 +1585,3853 @@
Handle stepping into a function in reverse.
Handle stepping between line ranges in reverse.
(print_stop_reason): Print reason for NO_HISTORY.
+ (step_into_function): Rename to handle_step_into_function.
+ (handle_step_into_function_backward): New function.
+ (set_exec_direction_func, show_exec_direction_func): New funcs.
+ (proceed): No need to singlestep over a breakpoint
+ when resuming in reverse.
+
+ * inferior.h (enum exec_direction_kind): New enum.
+ (execution_direction): Export new execution state variable.
+
+ * breakpoint.c (make_breakpoint_silent): New function.
+ * breakpoint.h (make_breakpoint_silent): Export.
+ * infcmd.c (finish_command): Check for reverse exec direction.
+ (finish_backward): New function, handle finish cmd in reverse.
- 2006-03-31 Michael Snyder <msnyder@redhat.com>
User interface for reverse execution.
* Makefile.in (reverse.c): New file.
* reverse.c: New file. User interface for reverse execution.
- 2007-04-18 Daniel Jacobowitz <dan@codesourcery.com>
+2008-10-17 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (record_currthread): Add inferior before child threads.
+ (remote_threads_info): Check for exited threads. Mention
+ notification order.
+
+2008-10-16 Joel Brobecker <brobecker@adacore.com>
+
+ * breakpoint.h (enum bptype): New enum bp_catchpoint.
+ Delete bp_catch_fork and bp_catch_vfork.
+ (struct breakpoint_ops): Add new methods "insert", "remove"
+ and "breakpoint_hit".
+ * breakpoint.c (create_fork_vfork_event_catchpoint)
+ (create_fork_event_catchpoint, create_vfork_event_catchpoint): Remove.
+ (insert_catchpoint): Remove handling of bp_catch_fork and
+ bp_catch_vfork catchpoints, and handle them as bp_catchpoint
+ catchpoints instead.
+ (insert_bp_location, update_breakpoints_after_exec)
+ (remove_breakpoint, bpstat_check_location, bpstat_what)
+ (allocate_bp_location): Likewise.
+ (print_it_typical, print_one_breakpoint_location, mention): Remove
+ handling of bp_catch_fork and bp_catch_vfork breakpoints.
+ (ep_is_catchpoint, user_settable_breakpoint)
+ (breakpoint_address_is_meaningful, adjust_breakpoint_address)
+ (breakpoint_re_set_one, disable_command, enable_command):
+ Remove use of bp_catch_fork and bp_catch_vfork. Add handling of
+ bp_catchpoint breakpoints.
+ (insert_catch_fork, remove_catch_fork, breakpoint_hit_catch_fork)
+ (print_it_catch_fork, print_one_catch_fork, print_mention_catch_fork):
+ New functions.
+ (catch_fork_breakpoint_ops): New static constant.
+ (insert_catch_vfork, remove_catch_vfork, breakpoint_hit_catch_vfork)
+ (print_it_catch_vfork, print_one_catch_vfork)
+ (print_mention_catch_vfork): New functions.
+ (catch_vfork_breakpoint_ops): New static constant.
+ (create_catchpoint, create_fork_vfork_event_catchpoint): New functions.
+ (catch_fork_command_1): Use create_fork_vfork_event_catchpoint
+ to create the fork and vfork catchpoints.
+ (gnu_v3_exception_catchpoint_ops): Set new breakpoint_ops fields.
+ * ada-lang.c (catch_exception_breakpoint_ops): Set new breakpoint_ops
+ fields.
+ (catch_exception_unhandled_breakpoint_ops): Likewise.
+ (catch_assert_breakpoint_ops): Likewise.
+
+2008-10-16 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (set_general_process): New.
+ (remote_check_symbols): Use it.
+
+2008-10-16 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (push_remote_target): Delete.
+ * target.h (push_remote_target): Delete declaration.
+
+2008-10-15 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_close): Unregister remote_desc from the event
+ loop. Always restore the SIGINT handler. Discard all inferiors
+ here.
+ (remote_detach_1, remote_disconnect): Don't unregister the file
+ descriptor from the event loop here.
+ (interrupt_query, readchar, getpkt_sane): Pop the target instead
+ of morning the current inferior.
+ (remote_kill): Don't unregister the file descriptor from the event
+ loop here.
+ (remote_mourn_1): Don't discard inferiors here.
+
+2008-10-15 Pedro Alves <pedro@codesourcery.com>
+
+ * breakpoint.c (breakpoint_init_inferior): Clean up the moribund
+ locations list.
+ (moribund_breakpoint_here_p): Record the moribund
+ location in the moribund_locations vector.
+ * breakpoint.h (moribund_breakpoint_here_p): Declare.
+ (displaced_step_fixup): Check if the breakpoint the thread was
+ trying to step over has been removed since having been placed in
+ the displaced stepping queue.
+ (adjust_pc_after_break): In non-stop mode, check for a moribund
+ breakpoint at the stop pc.
+ (handle_inferior_event): Don't retire moribund breakpoints on
+ TARGET_WAITKIND_IGNORE.
+
+2008-10-15 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (displaced_step_prepare): Switch thread temporarily
+ while we're here.
+ (displaced_step_fixup): Make sure target_resume sees ptid as
+ inferior_ptid. Add debug output.
+
+2008-10-14 Pedro Alves <pedro@codesourcery.com>
+
+ Remove dead code.
+
+ * breakpoint.c (show_breakpoint_hit_counts): Delete.
+ (print_one_breakpoint_location): Adjust.
+ (breakpoint_clear_ignore_counts): Delete.
+ * breakpoint.h (breakpoint_clear_ignore_counts): Remove
+ declaration.
+ * target.c (generic_mourn_inferior): Don't clear ignore
+ counts (never reached).
+
+2008-10-10 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (comp_unit_head): Use unsigned int consistently
+ for dwarf section offsets and sizes.
+ (dwarf2_cu): Ditto.
+ (dwarf2_per_cu_data): Ditto.
+ (create_all_comp_units): Change offset to unsigned int.
+ (load_full_comp_unit,find_partial_die_in_comp_unit,find_partial_die,
+ dwarf2_find_containing_comp_unit,dwarf2_find_comp_unit): Ditto.
+
+ * dwarf2read.c (read_initial_length): Delete cu_header arg.
+ All callers updated.
+ (read_checked_initial_length_and_offset): New function.
+ (read_offset_1): New function.
+ (read_offset): Call it.
+ (dwarf_decode_line_header): Call read_checked_initial_length_and_offset
+ instead of read_initial_length. Call read_offset_1 instead of
+ read_offset.
+
+ * dwarf2read.c (dwarf2_get_ref_die_offset): Remove unused arg `cu'.
+ All callers updated.
+
+ * dwarf2read.c (dwarf_attr_name): Unconditionally support all
+ DW_AT_MIPS_* except DW_AT_MIPS_fde which collides with
+ DW_AT_HP_block_index.
+
+2008-10-10 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_start_remote): Always tell the stub if we're in
+ extended-remote.
+
+2008-10-09 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_wait): Rename to...
+ (remote_wait_as): ... this. Don't loop here. If the remote
+ didn't stop, return TARGET_WAITKIND_IGNORE.
+ (remote_wait): New, reimplemented on top of remote_wait_as.
+
+2008-10-09 Thomas Schwinge <tschwinge@gnu.org>
+
+ * Makefile.in (gnu-nat.o): Revert the 2008-09-10 change, as the problem
+ is fixed upstream.
+
+ * reply_mig_hack.awk: Use the `BAD_TYPECHECK' macro.
+
+ * MAINTAINERS (Write After Approval): Add myself.
+
+2008-10-09 Pedro Alves <pedro@codesourcery.com>
+
+ Make it compile without warnings.
+
+ * procfs.c (create_procinfo): Initialize `parent'.
+ (dead_procinfo): Pass a constant string as format to error.
+ (procfs_address_to_host_pointer): Add cast to gdb_type *.
+ (procfs_find_LDT_entry): Adjust format string to long int
+ ptid.tid.
+ (procfs_xfer_partial): Adjust prototype. Add gdb_byte* cast.
+ (procfs_xfer_memory): Adjust prototype.
+ (info_mappings_callback, info_proc_mappings): Adjust to not pass a
+ variable as printf_filtered format.
+ (procfs_make_note_section): Change type of auxv local to gdb_byte.
+ * Makefile.in: Remove special rule.
+
+2008-10-09 Pedro Alves <pedro@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * remote.c (remote_open_1): Move acknowledging any pending ack,
+ querying supported features, activating noack mode, finding the
+ target description, enabling extended remote, and checking remote
+ symbols from here ...
+ (remote_start_remote): ... to here.
+ (remote_open_1): Don't pop the target if it is already gone.
+ * target.c (unpush_target): Check for the dummy target.
+
+2008-10-09 Pedro Alves <pedro@codesourcery.com>
+
+ * ser-mingw.c: Include "command.h".
+ (pipe_windows_open): Declare locals at the beginning of the scope.
+
+2008-10-08 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (struct remote_state) <waiting_for_stop_reply>: New
+ field.
+ (remote_open_1): Clear waiting_for_stop_reply.
+ (remote_resume): Set waiting_for_stop_reply.
+ (remote_wait): Clear or set waiting_for_stop_reply accordingly.
+ (putpkt_binary): If we're in async mode and waiting for a stop
+ reply, bail out with an error.
+ (extended_remote_mourn_1): Clear waiting_for_stop_reply.
+
+2008-10-08 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_get_thread_info): If the remote doesn't support
+ the query, bail out.
+
+2008-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Convert static_kind into loc_kind enum.
+ * gdbtypes.h (enum field_loc_kind): New.
+ (union field_location): New field dwarf_block.
+ (struct field): Rename static_kind as loc_kind.
+ (FIELD_STATIC_KIND): Rename to ...
+ (FIELD_LOC_KIND): ... here.
+ (TYPE_FIELD_STATIC_KIND): Rename to ...
+ (TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
+ (TYPE_FIELD_STATIC_HAS_ADDR): Remove.
+ (TYPE_FIELD_STATIC): Remove.
+ (TYPE_FIELD_BITPOS): Reformat.
+ (SET_FIELD_BITPOS): New.
+ (FIELD_PHYSADDR): Rename to ...
+ (FIELD_STATIC_PHYSADDR): ... here.
+ (TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
+ (SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
+ (FIELD_PHYSNAME): Rename to ...
+ (FIELD_STATIC_PHYSNAME): ... here.
+ (TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
+ (SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
+ (FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
+ (field_is_static): New declaration.
+ * gdbtypes.c (field_is_static): New function.
+ (copy_type_recursive): Update throughout.
+ * amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
+ eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
+ p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
+
+2008-10-07 Thomas Schwinge <tschwinge@gnu.org>
+ Pedro Alves <pedro@codesourcery.com>
+
+ * gnu-nat.h: Rename `current_inferior' to `gnu_current_inf' to
+ avoid a name collision.
+ * gnu-nat.c: Likewise.
+ * i386gnu-nat.c: Likewise.
+
+2008-10-07 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (ada_evaluate_subexp) [OP_ATR_SIZE]: Add handling
+ of arguments that are references.
+
+2008-10-06 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (dwarf2_die_debug): New static global.
+ (dump_die_shallow): Renamed from dump_die, New args f, indent.
+ Print to specified file, indented by the specified amount.
+ (dump_die_for_error): New fn. Point all existing callers of
+ dump_die here.
+ (dump_die_die_1,dump_die): New fns, replaces ...
+ (dump_die_list): ... deleted.
+ (read_die_and_children_1): Old contents of read_die_and_children
+ moved here.
+ (read_die_and_children): Rewrite.
+ (read_die_and_siblings): Call read_die_and_children_1 instead of
+ read_die_and_children.
+ (_initialize_dwarf2_read): New option "debug dwarf2-die".
+ * gdbinit.in (pdie): New macro.
+
+ * dwarf2read.c (offset_in_cu_p): New function.
+ (find_partial_die,follow_die_ref): Use it.
+
+ * symmisc.c (maintenance_info_symtabs): Watch for ^c.
+ (maintenance_info_psymtabs): Ditto.
+
+2008-10-05 Michael Snyder <msnyder@vmware.com>
+
+ * infrun.c (handle_inferior_event): Fix typo in comment.
+
+2008-10-04 Vladimir Prus <vladimir@codesourcery.com>
+
+ * mi/mi-interp.c (mi_on_resume): Flush raw_stdout.
+
+2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ PR gdb/2384:
+ * gdbtypes.c (get_vptr_fieldno): baseclass and basetype may have
+ different lifetimes.
+
+2008-10-03 Joel Brobecker <brobecker@adacore.com>
+
+ * solib-osf.c: Include "solib.h".
+
+2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * utils.c, defs.h (gdb_buildargv): New fn. Wrap buildargv
+ and check for out-of-memory condition.
+ * exec.c (exec_file_command): Call it.
+ * infrun.c (handle_command, xdb_handle_command): Likewise.
+ * interps.c (interpreter_exec_cmd): Likewise.
+ * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
+ * procfs.c (info_proc_cmd): Likewise.
+ * remote-mips.c (common_open): Likewise.
+ * remote-sim.c (gdbsim_kill, gdbsim_create_inferior)
+ (gdbsim_open): Likewise.
+ * remote.c (extended_remote_run, remote_put_command)
+ (remote_get_command, remote_delete_command): Likewise.
+ * ser-mingw.c (pipe_windows_open): Likesise.
+ * source.c (add_path, show_substitute_path_command)
+ (unset_substitute_path_command, set_substitute_path_command):
+ Likewise.
+ * stack.c (backtrace_command): Likewise.
+ * symfile.c (symbol_file_command, generic_load)
+ (add_symbol_file_command): Likesise.
+ * symmisc.c (maintenance_print_symbols, maintenance_print_psymbols)
+ (maintenance_print_msymbols): Likewise.
+
+2008-10-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
+ * c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
+ (m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
+ valops.c (value_cast), varobj.c (c_number_of_children): Replace
+ TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
+ TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
+ * parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
+ * f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
+ (f77_get_upperbound): ... this function handling now only
+ TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
+ (f77_get_dynamic_lowerbound): Replace with ...
+ (f77_get_lowerbound): ... this function handling now only
+ TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
+ (f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
+ Update their callers.
+ * eval.c (evaluate_subexp_standard): Update their callers.
+ * f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
+ (f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
+ prototypes.
+ (BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
+ * f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
+ the lower_bound_was_default variable. Update the
+ f77_get_dynamic_upperbound, f77_get_upperbound and
+ TYPE_ARRAY_UPPER_BOUND_TYPE calls.
+ * gdbtypes.c (print_bound_type): Remove the function.
+ (recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
+ LOWER_BOUND_TYPE.
+ * gdbtypes.h (enum array_bound_type): Remove.
+ (struct main_type): Remove the fields upper_bound_type and
+ lower_bound_type. Comment the new overload of the field artificial.
+ (TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
+ (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
+ (TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
+ (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.
+
+2008-10-02 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in (HFILES_NO_SRCDIR): Remove gdb-events.h, gstdint.h.
+
+2008-10-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * mips-linux-tdep.c (mips_linux_in_dynsym_resolve_code): Update
+ comments.
+ (mips_linux_skip_resolver): Also use glibc_skip_solib_resolver.
+ (mips_linux_init_abi): Do not override skip_trampoline_code.
+ * configure.tgt (mips*-*-linux*): Add glibc-tdep.o.
+ * mips-tdep.c (mips32_scan_prologue): Stop scanning at branches.
+ (mips_stub_frame_sniffer): Use the stub frame sniffer for PIC stubs.
+ (mips_skip_mips16_trampoline_code): Rename from
+ mips_skip_trampoline_code.
+ (mips_skip_pic_trampoline_code, mips_skip_trampoline_code): New.
+ * infrun.c (handle_inferior_event): Do not pass zero to
+ in_solib_dynsym_resolve_code.
+
+2008-10-02 Pierre Muller <muller@ics.u-strasbg.fr>
+ Pedro Alves <pedro@codesourcery.com>
+
+ * win32-nat.c (do_initial_win32_stuff): Set inferior_ptid.
+
+
+2008-10-01 Tom Tromey <tromey@redhat.com>
+
+ * symtab.c (search_symbols): Update.
+ * symtab.h (domain_enum_tag) <METHODS_DOMAIN>: Remove.
+
+2008-10-01 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (syms_from_objfile): Update.
+ (reread_symbols): Update.
+ * objfiles.h (OBJF_SYMS): Remove.
+ (OBJF_REORDERED): Renumber.
+ (OBJF_SHARED): Likewise.
+ (OBJF_READNOW): Likewise.
+ (OBJF_USERLOADED): Likewise.
+
+2008-10-01 Tom Tromey <tromey@redhat.com>
+
+ * symtab.c (find_pc_sect_psymtab): Use MSYMBOL_TYPE.
+ (find_pc_sect_symtab): Likewise.
+ * symmisc.c (dump_msymbols): Use MSYMBOL_TYPE.
+ * solib-som.c (som_solib_desire_dynamic_linker_symbols): Use
+ MSYMBOL_TYPE, not SYMBOL_TYPE.
+ * parse.c (write_exp_msymbol): Use MSYMBOL_TYPE.
+ * objc-lang.c (find_methods): Use MSYMBOL_TYPE.
+ * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Use
+ MSYMBOL_TYPE.
+ * m2-exp.y (yylex): Use SYMBOL_CLASS.
+
+2008-10-01 Tom Tromey <tromey@redhat.com>
+
+ * xcoffread.c (RECORD_MINIMAL_SYMBOL): Update.
+ (scan_xcoff_symtab): Update.
+ * mdebugread.c (record_minimal_symbol): Update.
+ (parse_partial_symbols): Update.
+ * elfread.c (record_minimal_symbol): Update.
+ * dbxread.c (record_minimal_symbol): Update.
+ * coffread.c (record_minimal_symbol): Update.
+ * sh64-tdep.c (MSYMBOL_IS_SPECIAL): Redefine.
+ (sh64_elf_make_msymbol_special): Update.
+ * mips-tdep.c (mips_elf_make_msymbol_special): Use
+ MSYMBOL_TARGET_FLAG_1.
+ (mips_elf_make_msymbol_special): Likewise.
+ (msymbol_is_special): Likewise.
+ * minsyms.c (prim_record_minimal_symbol_and_info): Update.
+ (install_minimal_symbols): Likewise.
+ (prim_record_minimal_symbol): Update.
+ (prim_record_minimal_symbol_and_info): Remove 'info' argument.
+ * m68hc11-tdep.c (MSYMBOL_SET_RTC): Redefine.
+ (MSYMBOL_SET_RTI): Redefine.
+ (MSYMBOL_IS_RTC): Redefine.
+ (MSYMBOL_IS_RTI): Redefine.
+ * arm-tdep.c (MSYMBOL_SET_SPECIAL): Redefine.
+ (MSYMBOL_IS_SPECIAL): Redefine.
+ * symtab.h (struct minimal_symbol) <info>: Remove.
+ <target_flag_1, target_flag_2>: New fields.
+ (MSYMBOL_INFO): Remove.
+ (MSYMBOL_TARGET_FLAG_1): New macro.
+ (MSYMBOL_TARGET_FLAG_2): Likewise.
+ (prim_record_minimal_symbol_and_info): Update.
+
+2008-09-30 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (is_digits_suffix): Delete unused function.
+
+2008-09-30 Paul Hilfinger <hilfinger@adacore.com>
+
+ * ada-lang.c (ada_modulus): Correct to avoid sign problem with
+ moduli >= 2**31.
+
+2008-09-30 Paul Hilfinger <hilfinger@adacore.com>
+
+ * ada-lang.c (ada_lookup_struct_elt_type): Handle case of a "naked"
+ variant branch.
+ (empty_record): Use INIT_CPLUS_SPECIFIC, since this field is not
+ supposed to be null. Fixes debugger segfaults.
+ (is_unchecked_variant): New function.
+ (to_fixed_variant_branch_type): Modify to leave unchecked unions
+ untouched.
+ (ada_template_to_fixed_record_type_1): Fix comment.
+
+2008-09-30 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (standard_exc): New static constant.
+ (ada_exception_catchpoint_cond_string): Add special handling
+ for the predefined exceptions.
+
+2008-09-30 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (ADA_RETAIN_DOTS): Delete this dead macro. Update
+ the code accordingly.
+
+2008-09-30 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (ada_evaluate_subexp) [UNOP_IND]: Remove strange
+ treatment of expect_type. Return the correct type when dereferencing
+ an integer.
+
+2008-09-30 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/2484:
+ * symtab.c (struct add_macro_name_data): New struct.
+ (add_macro_name): New function.
+ (default_make_symbol_completion_list): Complete macro names.
+ * scm-lang.c (scm_language_defn): Update.
+ * p-lang.c (pascal_language_defn): Update.
+ * objc-lang.c (objc_language_defn): Update.
+ * macrotab.h (macro_callback_fn): Add user_data argument.
+ (macro_for_each): Likewise.
+ (macro_for_each_in_scope): Declare.
+ * macrotab.c: (struct macro_for_each_data): New struct.
+ (foreach_macro): Use it.
+ (macro_for_each): Likewise.
+ (foreach_macro_in_scope): New function.
+ (macro_for_each_in_scope): Likewise.
+ * macrocmd.c (print_one_macro): Add argument.
+ (macro_list_command): Pass NULL to macro_for_each.
+ * m2-lang.c (m2_language_defn): Update.
+ * language.h (struct language_defn) <la_macro_expansion>: New
+ field.
+ (macro_expansion): New enum.
+ * language.c (unknown_language_defn): Update. Fix order of
+ initializers.
+ (auto_language_defn): Likewise.
+ (local_language_defn): Update.
+ * jv-lang.c (java_language_defn): Update.
+ * f-lang.c (f_language_defn): Update.
+ * c-lang.c (c_language_defn): Update.
+ (cplus_language_defn): Likewise.
+ (asm_language_defn): Likewise.
+ (minimal_language_defn): Likewise.
+ * ada-lang.c (ada_language_defn): Update.
+
+2008-09-30 Joel Brobecker <brobecker@adacore.com>
+
+ * dwarf2read.c (dwarf2_get_subprogram_pc_bounds): New function.
+ (get_scope_pc_bounds): Use it.
+
+2008-09-27 Tom Tromey <tromey@redhat.com>
+
+ * NEWS: Update.
+ * macrocmd.c (extract_identifier): Add is_parameter argument.
+ (macro_define_command): Update.
+ (macro_undef_command): Likewise.
+ * macroexp.c (stringify): New function.
+ (find_parameter): Likewise.
+ (gather_arguments): Add nargs argument. Handle varargs.
+ (substitute_args): Add is_varargs and va_arg_name arguments.
+ Handle varargs, splicing, stringification. Use find_parameter.
+ (expand): Handle varargs.
+
+2008-09-27 Tom Tromey <tromey@redhat.com>
+
+ * scm-lang.c (scm_language_defn): Update.
+ * p-typeprint.c (pascal_print_typedef): New function.
+ * p-lang.h: (pascal_print_typedef): Declare.
+ * p-lang.c (pascal_language_defn): Update.
+ * objc-lang.c (objc_language_defn): Update.
+ * m2-typeprint.c (m2_print_typedef): New function.
+ * m2-lang.h (m2_print_typedef): Declare.
+ * m2-lang.c (m2_language_defn): Update.
+ * language.h (_LANG_c, _LANG_m2, _LANG_fortran, _LANG_pascal):
+ Remove.
+ (struct language_defn) <la_print_typedef>: New field.
+ (default_print_typedef): Declare.
+ (LA_PRINT_TYPEDEF): New define.
+ * language.c (unknown_language_defn): Update.
+ (auto_language_defn): Update.
+ (local_language_defn): Update.
+ * jv-lang.c (java_language_defn): Update.
+ * f-lang.c (f_language_defn): Update.
+ * c-typeprint.c (c_print_typedef): New function.
+ * c-lang.h (c_print_typedef): Declare.
+ * c-lang.c (c_language_defn): Update.
+ (cplus_language_defn): Update.
+ (asm_language_defn): Update.
+ (minimal_language_defn): Update.
+ * ada-lang.c (ada_language_defn): Update.
+ * typeprint.c (default_print_typedef): New function.
+
+2008-09-27 Tom Tromey <tromey@redhat.com>
+
+ * jv-exp.y (insert_exp): Define using ISO syntax.
+ (copy_exp): Likewise.
+ (push_expression_name): Likewise.
+ (push_fieldnames): Likewise.
+ (java_type_from_name): Likewise.
+ (yyerror): Likewise.
+ (yylex): Likewise.
+ (parse_number): Likewise.
+
+2008-09-26 Joel Brobecker <brobecker@adacore.com>
+
+ * MAINTAINERS (GLOBAL MAINTAINERS): Add Pedro Alves.
+
+2008-09-25 Stephan Springl <springl-gdb@bfw-online.de> (tiny change)
+
+ * stack.c (print_frame_args): Fix typos in comments.
+
+2008-09-25 Sérgio Durigan Júnior <sergiodj@linux.vnet.ibm.com>
+
+ * linux-nat.c (get_pending_status): Fix argument to WIFSTOPPED.
+
+2008-09-24 Vladimir Prus <vladimir@codesourcery.com>
+
+ * remote-sim.c (gdbsim_create_inferior): Fix missing parenthesis.
+
+2008-09-24 Andreas Schwab <schwab@suse.de>
+
+ * frame.c (get_frame_register_bytes): Take pseudo registers into
+ account. Avoid excessive function calls.
+
+2008-09-23 Doug Evans <dje@google.com>
+
+ * dcache.c (state_chars): New static global.
+ (ENTRY_INVALID,ENTRY_VALID): Renamed from ENTRY_BAD,ENTRY_OK.
+ All uses updated.
+ (dcache_info): Print cache state as mnemonically useful letters instead
+ of magic numbers.
+
+ * dwarf2read.c (comp_unit_head): Reorganize for better packing.
+
+2008-09-22 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (symbol_file_add_with_addrs_or_offsets): Don't use
+ printf_filtered.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (follow_exec): Don't do a generic mourn. Instead
+ inline the required bits.
+ * breakpoint.h (enum inf_context): Add inf_execd.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (handle_inferior_event): In the follow exec case,
+ context-switch before doing anything else.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ * top.c (any_thread_of, kill_or_detach): New functions.
+ (quit_target): Iterate over all inferiors, killing or detaching
+ accordingly.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ Remove the attach_flag global, and make it per-inferior.
+
+ * inferior.h (attach_flag): Delete.
+ (inferior_process): Declare.
+ * solib.c (update_solib_list): Adjust.
+ * gnu-nat.c (gnu_create_inferior, gnu_attach): Adjust.
+ * inf-ptrace.c (inf_ptrace_detach): Adjust.
+ (inf_ptrace_files_info): Get it from the current inferior.
+ * inf-ttrace.c (inf_ttrace_attach): Adjust.
+ (inf_ttrace_files_info): Get it from the current
+ inferior.
+ * inflow.c (terminal_inferior, terminal_ours_1, set_sigint_trap)
+ (clear_sigint_trap): Get it from the current process.
+ * remote.c (extended_remote_attach_1)
+ (extended_remote_create_inferior_1): Adjust.
+ * top.c (quit_confirm, quit_target): Get it from the current inferior.
+ * procfs.c (do_detach): Adjust.
+ (procfs_wait): Get it from the event inferior.
+ (procfs_files_info): Get it from the current inferior.
+ * nto-procfs.c (procfs_files_info): Likewise.
+ (procfs_attach): Adjust. Set the attach_flag here.
+ (do_attach): Don't set it here.
+ (procfs_detach): Don't clear it.
+ (procfs_mourn_inferior): Don't clear it.
+ * solib-osf.c (osf_solib_create_inferior_hook): Adjust.
+ * target.c (attach_flag): Delete.
+ (generic_mourn_inferior): Don't clear it.
+ * win32-nat.c (get_win32_debug_event): Get it from the event
+ process.
+ (do_initial_win32_stuff): Add attaching argument. Set attach_flag
+ in the inferior accordingly.
+ (win32_attach): Don't set the attach_flag here. Pass 1 to
+ do_intial_win32_stuff.
+ (win32_files_info): Get it from the current inferior.
+ (win32_create_inferior): Dont clear attach_flag here. Pass 0 to
+ do_intial_win32_stuff.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ Make the stop_soon global be per-inferior instead.
+
+ * infcmd.c (attach_command_post_wait): Adjust.
+ (attach_command): Likewise.
+
+ * inferior.h (stop_soon): Delete.
+ (struct inferior): Add stop_soon member.
+
+ * infrun.c (stop_soon): Delete.
+ (clear_proceed_status, start_remote)
+ (fetch_inferior_event, handle_inferior_event): Adjust.
+ (signal_stop_state): Don't check stop_soon here. Check in callers
+ instead.
+ (save_inferior_status, restore_inferior_status): Adjust.
+
+ * linux-nat.c (linux_nat_resume, linux_nat_wait): Always pass
+ signals to common code if starting up the inferior.
+
+ * inferior.h (struct inferior_info): Added stop_soon member.
+ * inferior.c (add_inferior) Clear stop_soon.
+
+ * mips-tdep.c (heuristic_proc_start): Adjust.
+ * nto-procfs.c (procfs_create_inferior): Adjust.
+ * solib-irix.c (irix_solib_create_inferior_hook): Adjust.
+ * solib-osf.c (osf_solib_create_inferior_hook): Adjust.
+ * solib-sunos.c (sunos_solib_create_inferior_hook): Adjust.
+ * solib-svr4.c (svr4_solib_create_inferior_hook): Adjust.
+
+ * win32-nat.c (do_initial_win32_stuff): Adjust.
+
+ * alpha-tdep.c (alpha_heuristic_proc_start): Adjust.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ Implement remote multi-process extensions.
+
+ * remote.c (struct remote_state): Add extended and
+ multi_process_aware fields.
+ (remote_multi_process_p): New.
+ (PACKET_vKill): New.
+ (record_currthread): Use thread_change_ptid. Notice new
+ inferiors.
+ (set_thread, remote_thread_alive): Use write_ptid.
+ (write_ptid, read_ptid): New.
+ (remote_current_thread, remote_threads_extra_info): Use them.
+ (remote_threads_info): Likewise. Detect new inferiors.
+ (remote_start_remote): Add inferior to inferior list.
+ (remote_multi_process_feature): New.
+ (remote_protocol_features): Add "multiprocess" feature.
+ (remote_query_supported): Pass "multiprocess+" as supported
+ features.
+ (remote_open_1): Clear multi_process_aware. Set extended
+ accordingly.
+ (remote_detach_1): Detach current process. Use extended packet
+ format for extended-remote multi-process. Detach process from the
+ inferior list. Only mourn after printing output.
+ (extended_remote_attach_1): Add process to the inferior list.
+ (remote_vcont_resume): Use write_ptid to pass the thread ids.
+ (remote_wait): Use read_ptid. Implement the extended
+ multi-process extension format of the 'W' and 'X' reply packets.
+ Remove exited inferiors from inferior list.
+ (remote_xfer_memory): Set general thread.
+ (remote_vkill): New.
+ (extended_remote_kill): New.
+ (remote_mourn_1): Discard all inferiors.
+ (select_new_thread_callback): New.
+ (extended_remote_mourn_1): If there are more processes to debug,
+ switch to a thread in another process, and don't pop the target.
+ (extended_remote_create_inferior_1): Add the new process to the
+ inferior list.
+ (remote_stopped_by_watchpoint): Indenting.
+ (remote_xfer_partial): Set the general thread.
+ (remote_pid_to_str): If the remote is multi-process aware, print
+ the process id as well as the thread id.
+ (remote_get_thread_local_address): Use write_ptid.
+ (init_extended_remote_ops): Register extended_remote_kill.
+ (_initialize_remote): Register new packets. Change
+ magic_null_ptid's, not_sent_ptid's and any_thread_ptid's pid
+ member to 42000.
+
+ * thread.c (thread_change_ptid): Also account for the inferior pid
+ changing.
+
+ * inferior.h (discard_all_inferiors): Declare.
+ * inferior.c (discard_all_inferiors): New.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ * gnu-nat.c (gnu_attach): Add process to inferiors table.
+ (gnu_detach): Remove it.
+ * go32-nat.c (go32_create_inferior): Add process to gdb's inferior
+ table.
+ * inf-ptrace.c (inf_ptrace_follow_fork): Delete and add inferiors
+ to inferior table accordingly.
+ (inf_ptrace_attach): Add new process to inferior table.
+ (inf_ptrace_detach): Remove it.
+ * inf-ttrace.c (inf_ttrace_follow_fork): Delete and add inferiors
+ to inferior table accordingly.
+ (inf_ttrace_attach): Add process to inferior table.
+ (inf_ttrace_detach): Remove it.
+ * linux-fork.c (init_fork_list): Delete any left over inferior.
+ (linux_fork_mourn_inferior, detach_fork_command): Also delete
+ processes from inferior list.
+ * monitor.c (monitor_open): Add process to inferior list.
+ (monitor_close): Remove it.
+ * nto-procfs.c (procfs_attach): Add process to inferior list.
+ Find threads after pushing the target.
+ (procfs_detach): Remove process from inferior list.
+ (procfs_create_inferior): Add process to inferior list.
+ * procfs.c (procfs_detach): Remove process from inferior list.
+ (do_attach): Add process to inferior list.
+ * remote-sim.c (sim_create_inferior): Add process to inferior list.
+ (gdbsim_close): Remove it.
+ * target.c (generic_mourn_inferior): If inferior_ptid is not
+ null_ptid, remove the corresponding inferior from inferior list.
+ * win32-nat.c (do_initial_win32_stuff): Add process to inferior list.
+ (win32_detach): Remove it.
+ * linux-nat.c (linux_child_follow_fork): Delete and add inferiors
+ to inferior list accordingly.
+ * fork-child.c (fork_inferior): Add process to inferior list.
+ * corelow.c (CORELOW_PID): Define.
+ (core_close): Remove core from inferior list.
+ (core_open): Add it.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ * inferior.h: Forward declare struct ui_out.
+ Forward declare struct private_inferior.
+ (struct inferior): New.
+ (init_inferior_list, add_inferior, add_inferior_silent)
+ (delete_inferior, delete_inferior_silent, detach_inferior)
+ (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
+ (valid_inferior_id, find_inferior_pid): New functions.
+ (inferior_callback_func): New typedef.
+ (iterate_over_inferiors, print_inferior, have_inferiors)
+ (current_inferior): New functions.
+ * inferior.c: New file.
+
+ * Makefile.in (SFILES): Add inferior.c.
+ (COMMON_OBS): Add inferior.o.
+
+2008-09-22 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * arm-tdep.c (arm_skip_prologue): Call skip_prologue_using_sal
+ instead of determining symbol and line info directly.
+ * MAINTAINERS: Update my email address.
+
+2008-09-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * symtab.c (skip_prologue_using_sal): Treat two consecutive lines
+ at the same address as a prologue marker. Do not skip an entire
+ function.
+
+2008-09-22 Andrew Stubbs <ams@codesourcery.com>
+
+ * frame.c (get_frame_register_bytes): Comment improvments.
+
+2008-09-22 Pedro Alves <pedro@codesourcery.com>
+
+ * linux-nat.c (linux_nat_wait): Only use set_ignore_sigint in
+ all-stop mode.
+
+2008-09-19 Andrew Stubbs <ams@codesourcery.com>
+
+ * MAINTAINERS: Update my email address.
+
+2008-09-19 Andrew Stubbs <ams@codesourcery.com>
+
+ * frame.c (get_frame_register_bytes): Detect bad debug info.
+
+2008-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix a crash on uninitialized ECS->EVENT_THREAD for a newly found thread.
+ * infrun.c (wait_for_inferior): Move this ECS->EVENT_THREAD
+ initialization ...
+ (fetch_inferior_event): ... and this ECS->EVENT_THREAD initialization
+ ...
+ (handle_inferior_event): ... here after the add_thread call together
+ with the local adjust_pc_after_break and reinit_frame_cache calls.
+
+2008-09-16 David Daney <ddaney@avtrex.com>
+
+ * breakpoint.c (bpstat_stop_status): Clear breakpoint_at for
+ all hardware bpstats.
+
+2008-09-16 Joel Brobecker <brobecker@adacore.com>
+
+ * gstdint.h: Delete.
+
+2008-09-15 Mark Kettenis <kettenis@gnu.org>
+
+ * infcall.c (generic_push_dummy_code): Remove.
+ (push_dummy_code): Unconditionally call gdbarch_push_dummy_code.
+
+2008-09-15 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (struct abbrev_info): Make members name, form 16 bits.
+ (struct attribute): Ditto.
+
+2008-09-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Record
+ HPPA_IPSW_REGNUM and HPPA_SAR_REGNUM values.
+
+ * hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum): Remove surrounding
+ "#if 0" "#endif". Fix mapping of DWARF DBX registers to GDB registers.
+ Correct arguments and improve comments.
+ (hppa_linux_init_abi): Call set_gdbarch_dwarf2_reg_to_regnum. Delete
+ disabled code.
+ * hppa-tdep.c (hppa64_dwarf_reg_to_regnum): Fix check for floating
+ point DBX register, change error to warning, and improve comments.
+
+2008-09-14 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (struct die_info): Make members tag, num_attrs 16 bits.
+
+2008-09-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hppa-linux-tdep.c (hppa_linux_supply_fpregset): Correct iteration.
+
+2008-09-13 Joel Brobecker <brobecker@adacore.com>
+
+ * defs.h (GCC_GENERATED_STDINT_H): Define.
+
+2008-09-13 Tom Tromey <tromey@redhat.com>
+
+ * varobj.c (varobj_set_display_format): Use xfree.
+ * tracepoint.c (stringify_collection_list): Use xfree.
+ * remote-fileio.c (remote_fileio_reset): Use xfree.
+ * mipsread.c (read_alphacoff_dynamic_symtab): Use xfree.
+ * dfp.c (decimal_from_floating): Use xfree, xstrprintf. Don't use
+ asprintf.
+ * cp-support.c (mangled_name_to_comp): Use xfree.
+
+2008-09-13 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (remove_extra_symbols): Remove stub symbols if
+ the associated complete symbol is also in the list.
+ (ada_add_local_symbols, ada_add_non_local_symbols): New functions,
+ extracted out from ada_lookup_symbol_list.
+ (ada_lookup_symbol_list): Use them. Remove the search through
+ the minimal symbols.
+
+2008-09-13 Joel Brobecker <brobecker@adacore.com>
+
+ * dwarf2read.c (add_partial_subprogram): New procedure.
+ (scan_partial_symbols): Use it.
+ (load_partial_dies): Read in children of subprogram and lexical
+ blocks for Ada compilation units.
+
+2008-09-13 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (build_id_verify): Free 'found'.
+ (find_separate_debug_file): Use xfree, not free.
+
+2008-09-12 Doug Evans <dje@google.com>
+
+ * corefile.c (write_memory): Remove unnecessary copying.
+
+ * sol-thread.c (_initialize_sol_thread): Add FIXME regarding
+ order of _initialize_* fns.
- * infcmd.c (finish_backwards): Correct check for whether to back
- up after finishing.
+ * dwarf2read.c (comp_unit_head): Rename first_die_ptr to
+ first_die_offset. All uses updated.
+ Delete unused members cu_head_ptr, next.
+ Move members base_known, base_address to ...
+ (dwarf2_cu) ... here. All uses updated.
- * arm-tdep.c (arm_scan_epilogue): New.
- (arm_make_prologue_cache): Use it.
- (arm_epilogue_unwind_sniffer): New.
- (arm_gdbarch_init): Register it.
+2008-09-12 Pedro Alves <pedro@codesourcery.com>
+
+ * Makefile.in (generated_files): Add $(NAT_GENERATED_FILES).
+ * config/i386/i386gnu.mh (NAT_GENERATED_FILES): New.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * fork-child.c (startup_inferior): Use target_wait and target_resume
+ directly instead of calling wait_for_inferior / resume.
+
+ * infcmd.c (kill_if_already_running): Do not call no_shared_libraries
+ or init_wait_for_inferior.
+ (run_command_1): Call init_wait_for_inferior.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbtypes.h (builtin_type_void_data_ptr, builtin_type_void_func_ptr,
+ builtin_type_CORE_ADDR, builtin_type_char, builtin_type_short,
+ builtin_type_int, builtin_type_long, builtin_type_signed_char,
+ builtin_type_unsigned_char, builtin_type_unsigned_short,
+ builtin_type_unsigned_int, builtin_type_unsigned_long,
+ builtin_type_float, builtin_type_double, builtin_type_long_double,
+ builtin_type_complex, builtin_type_double_complex, builtin_type_string,
+ builtin_type_bool, builtin_type_long_long,
+ builtin_type_unsigned_long_long): Remove macros.
+
+ (builtin_type_f_character, builtin_type_f_integer,
+ builtin_type_f_integer_s2, builtin_type_f_logical,
+ builtin_type_f_logical_s1, builtin_type_f_logical_s2,
+ builtin_type_f_real, builtin_type_f_real_s8, builtin_type_f_real_s16,
+ builtin_type_f_complex_s8, builtin_type_f_complex_s16,
+ builtin_type_f_complex_s32): Likewise.
+
+ (builtin_type_m2_char, builtin_type_m2_int, builtin_type_m2_card,
+ builtin_type_m2_real, builtin_type_m2_bool): Likewise.
+
+ (struct builtin_f_type, builtin_f_type): Move to f-lang.h.
+ (struct builtin_m2_type, builtin_m2_type): Move to m2-lang.h.
+
+ * f-lang.h (struct builtin_f_type, builtin_f_type): Move here.
+ * m2-lang.h (struct builtin_m2_type, builtin_m2_type): Move here.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * solib-svr4.c (LM_ADDR_FROM_LINK_MAP): Use builtin types of
+ target_gdbarch instead of builtin_type_void_data_ptr.
+ (LM_DYNAMIC_FROM_LINK_MAP, LM_NEXT, LM_NAME,
+ IGNORE_FIRST_LINK_MAP_ENTRY, scan_dyntag, elf_locate_base,
+ solib_svr4_r_map, solib_svr4_r_brk, solib_svr4_r_ldsomap,
+ open_symbol_file_object): Likewise.
+ * nto-tdep.c (LM_ADDR): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * bsd-uthread.c (bsd_uthread_read_memory_address): New function.
+ (bsd_uthread_fetch_registers, bsd_uthread_store_registers,
+ bsd_uthread_wait, bsd_uthread_find_new_threads): Use it.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * procfs.c (procfs_address_to_host_pointer): Use target_gdbarch
+ and its associated types to perform pointer conversion.
+ (procfs_can_use_hw_breakpoint): Likewise.
+ (procfs_auxv_parse): Remove unused variable.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * auxv.c (default_auxv_parse): Use gdbarch_ptr_bit (target_gdbarch)
+ instead of builtin_type_void_data_ptr.
+ * target.c (default_region_ok_for_hw_watchpoint): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * expprint.c (print_subexp_standard): Compare against builtin type
+ associated with exp->gdbarch instead of builtin_type_char.
+
+ * f-valprint.c (f_val_print): Use extract_unsigned_integer to
+ extract values of arbitrary logical type. Handle arbitrary
+ complex types.
+
+ * printcmd.c (float_type_from_length): New function.
+ (print_scalar_formatted, printf_command): Use it.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * valops.c: Include "objfiles.h" and "symtab.h".
+ (find_function_in_inferior): New argument OBJF_P. Use it to return
+ objfile where function is defined. Use per-objfile arch types
+ instead of builtin_type_ to define default return type.
+
+ * linux-fork.c (checkpoint_command): Update calls. Use per-objfile
+ architecture to define inferior call argument types.
+ * gcore.c (derive_heap_segment): Likewise.
+ * objc-lang.c (value_nsstring): Likewise.
+ * scm-lang.c (scm_lookup_name): Likewise.
+ * scm-valprint.c (scm_inferior_print): Likewise.
+ * valops.c (value_allocate_space_in_inferior): Likewise.
+
+ * eval.c (evaluate_subexp_standard): Update calls.
+ * objc-lang.c (lookup_objc_class, print_object_command): Likewise.
+
+ * linux-fork.c: Include "objfiles.h".
+ * scm-lang.c: Include "objfiles.h".
+ * scm-valprint.c: Include "objfiles.h".
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbarch.sh (name_of_malloc): Remove.
+ * gdbarch.c, gdbarch.h: Re-generate.
+ * valops.c (value_allocate_space_in_inferior): Do not call
+ gdbarch_name_of_malloc.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * valarith.c (value_x_unop): Use builtin_type_int8 as type for
+ UNOP_POSTINCREMENT/UNOP_POSTDECREMENT constant 0 argument.
+ (value_bit_index): Use extract_unsigned_integer
+ instead of unpack_long to read single byte.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * infcall.c (value_arg_coerce): Add GDBARCH parameter. Use its
+ associates types instead of builtin_type_ macros.
+ (find_function_addr): Leave output VALUE_TYPE NULL if unknown.
+ (call_function_by_hand): Use per-architecture "int" type as
+ fall-back if find_function_addr returns NULL VALUE_TYPE.
+ Update call to value_arg_coerce.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * cp-abi.h (cplus_method_ptr_size): Add TO_TYPE parameter.
+ (cplus_make_method_ptr): Add TYPE parameter.
+ * cp-abi.c (cplus_method_ptr_size): Add TO_TYPE parameter. Pass it
+ on to current_cp_abi.method_ptr_size callback.
+ (cplus_make_method_ptr): Add TYPE parameter. Pass it on to
+ current_cp_abi.make_method_ptr callback.
+
+ * gdbtypes.c (lookup_methodptr_type): Pass target type
+ argument to cplus_method_ptr_size.
+ * valops.c (value_cast): Pass type argument to cplus_make_method_ptr.
+ (value_struct_elt_for_reference): Likewise.
+
+ * gnu-v3-abi.c (get_class_arch): New function.
+ (vtable_address_point_offset): Add GDBARCH parameter. Use it
+ instead of current_gdbarch. Update all callers.
+ (gnuv3_get_vtable): Likewise.
+ (gnuv3_get_virtual_fn): Likewise.
+ (gnuv3_decode_method_ptr): Likewise.
+ (gnuv3_rtti_type): Call get_class_arch to determine architecture.
+ Use it instead of current_gdbarch.
+ (gnuv3_virtual_fn_field): Likewise.
+ (gnuv3_baseclass_offset): Likewise.
+ (gnuv3_print_method_ptr): Likewise.
+ (gnuv3_method_ptr_to_value): Likewise.
+ (gnuv3_method_ptr_size): Add TYPE parameter. Use it to determine
+ class architecture. Use architecture types instead of builtin types.
+ (gnuv3_make_method_ptr): Likewise.
+
+ * cp-valprint.c (cp_print_class_member): Expect pointer type
+ instead of class type. Use its length when extracting value.
+ * c-valprint.c (c_val_print): Update call to cp_print_class_member.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * stack.c (return_command): Use frame architecture to determine
+ default integer return type.
+
+ * f-valprint.c (f77_get_dynamic_lowerbound): Use frame architecture
+ to determine pointer types.
+ (f77_get_dynamic_upperbound): Likewise.
+
+ * objc-lang.c (OBJC_FETCH_POINTER_ARGUMENT): Remove.
+ (resolve_msgsend): Use architecture of current frame to determine
+ pointer types. Inline OBJC_FETCH_POINTER_ARGUMENT.
+ (resolve_msgsend_stret, resolve_msgsend_super,
+ resolve_msgsend_super_stret): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * alpha-tdep.c (alpha_register_type): Use builtin_type (gdbarch)
+ instead of builtin_type_ macros.
+ * amd64-tdep.c (amd64_register_type): Likewise.
+ (amd64_get_longjmp_target): Likewise.
+ * arm-tdep.c (arm_register_type): Likewise.
+ * avr-tdep.c (avr_register_type): Likewise.
+ * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
+ * frv-tdep.c (frv_register_type): Likewise.
+ * h8300-tdep.c (h8300_register_type): Likewise.
+ * hppa-tdep.c (hppa32_convert_from_func_ptr_addr,
+ hppa_skip_trampoline_code): Likewise.
+ * i386-tdep.c (i386_register_type): Likewise.
+ (i386_unwind_pc, i386_sse_type): Likewise.
+ * ia64-tdep.c (ia64_register_type): Likewise.
+ * m32r-tdep.c (m32r_register_type): Likewise.
+ * m68k-tdep.c (m68k_register_type, m68k_unwind_pc): Likewise.
+ * m88k-tdep.c (m88k_register_type): Likewise.
+ * mep-tdep.c (mep_register_type): Likewise.
+ * mips-tdep.c (mips_pseudo_register_type): Likewise.
+ * mn10300-tdep.c (mn10300_register_type): Likewise.
+ * mt-tdep.c (mt_copro_register_type): Likewise.
+ * rs6000-tdep.c (rs6000_builtin_type_vec64): Likewise.
+ (rs6000_convert_register_p, rs6000_register_to_value,
+ rs6000_value_to_register): Likewise.
+ * s390-tdep.c (s390_register_type): Likewise.
+ * sh64-tdep.c (sh64_register_type): Likewise.
+ (sh64_build_float_register_type, sh64_do_fp_register): Likewise.
+ * sh-tdep.c (sh_sh2a_register_type, sh_sh3e_register_type,
+ sh_sh4_build_float_register_type, sh_sh4_register_type,
+ sh_default_register_type): Likewise.
+ * sparc64-tdep.c (sparc64_register_type): Likewise.
+ * sparc-tdep.c (sparc32_register_type): Likewise.
+ * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
+ * v850-tdep.c (v850_register_type): Likewise.
+ * vax-tdep.c (vax_register_type): Likewise.
+ * xtensa-tdep.c (xtensa_register_type, xtensa_unwind_pc,
+ xtensa_push_dummy_call): Likewise.
+
+ * std-regs.c (value_of_builtin_frame_fp_reg,
+ value_of_builtin_frame_pc_reg): Likewise.
+ * target-descriptions.c (tdesc_register_type): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ada-lang.c (ada_coerce_to_simple_array_type): Use builtin_type_int32
+ instead of builtin_type_int as default unspecified integral type.
+ (ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
+ assign_component, to_fixed_range_type): Likewise.
+ * ada-typeprint.c (print_range, print_range_bound,
+ print_range_type_named): Likewise.
+ * ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
+ * eval.c (evaluate_subexp_standard): Likewise.
+ * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
+ * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
+ build_gdb_vtable_type): Likewise.
+ * jv-lang.c (java_array_type): Likewise.
+ * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
+ * m2-valprint.c (m2_print_long_set): Likewise.
+ * parse.c (follow_types): Likewise.
+ * p-typeprint.c (pascal_type_print_base): Likewise.
+ * valops.c (value_one, value_array, value_string,
+ value_bitstring): Likewise.
+ * value.c (allocate_repeat_value, value_from_string): Likewise.
+ * varobj.c (c_describe_child): Likewise.
+ * mt-tdep.c (mt_register_type): Likewise.
+ * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
+ * sh64-tdep.c (sh64_build_float_register_type): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * defs.h (struct gdbarch): Add forward declaration.
+ (set_next_address): Add GDBARCH argument.
+ * printcmd.c (set_next_address): Use it to find pointer type.
+ * breakpoint.c (breakpoint_1): Update call.
+ * source.c (line_info): Likewise.
+ * findcmd.c (find_command): Use current_gdbarch to find pointer type.
+
+ * breakpoint.c (set_breakpoint_count): Use platform-neutral
+ types for internal variable values.
+ * infrun.c (handle_inferior_event): Likewise.
+ * source.c (forward_search_command, reverse_search_command): Likewise.
+ * tracepoint.c (set_tracepoint_count, set_traceframe_num,
+ set_tracepoint_num, set_traceframe_context): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbtypes.h (struct builtin_type): Remove builtin_true_char
+ and builtin_true_unsigned_char.
+ (builtin_type_true_char): Remove macro, add extern declaration.
+ (builtin_type_true_unsigned_char): Add extern declaration.
+ * gdbtypes.c (builtin_type_true_char): New global variable.
+ (builtin_type_true_unsigned_char): Likewise.
+ (_initialize_gdbtypes): Initialize them.
+ (gdbtypes_post_init): Do not initialize builtin_true_char
+ and builtin_true_unsigned_char members of struct builtin_type.
+
+ * printcmd.c (print_scalar_formatted): Do not use builtin_type;
+ use builtin_type_true_unsigned_char instead.
+
+ * ada-valprint.c (ada_val_print_1): Use builtin_type_true_char
+ instead of builtin_type_char for internal string.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbtypes.h (builtin_type_void): Remove macro, add declaration.
+ (builtin_type_f_void): Remove macro.
+ * gdbtypes.c (builtin_type_void): New global variable.
+ (_initialize_gdbtypes): Initialize it.
+
+ * gnu-v3-abi.c (build_gdb_vtable_type): Do not call
+ lookup_pointer_type or lookup_function_type on builtin_type_void.
+ * printcmd.c (set_next_address): Likewise.
+ * objc-lang.c (value_nsstring): Likewise.
+ * mt-tdep.c (mt_copro_register_type): Likewise.
+ * xtensa-tdep.c (xtensa_register_type): Likewise.
+
+ * symfile.c (syms_from_objfile): Remove special handling
+ of builtin_type_void and builtin_type_char.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * eval.c (evaluate_subexp_standard): Use exp->gdbarch types instead
+ of builtin_type_ macros when handling OP_OBJC_ operations.
+ * objc-lang.c (print_object_command): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ada-valprint.c: Include "objfiles.h".
+ (ada_val_print_1): Use the gdbarch associated with the objfile whether
+ a System.Address type is defined to retrieve the proper pointer type
+ to use to print it.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ada-lang.c (value_pos_atr): Add TYPE argument. Use it as
+ result type instead of builtin_type_int.
+ (value_subscript_packed): Use pos_atr instead of value_pos_atr.
+ (ada_value_subscript): Update call to value_pos_atr.
+ (ada_value_ptr_subscript): Likewise.
+ (ada_evaluate_subexp): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ada-lang.c (cast_to_fixed): Do not cast to builtin_type_double.
+ (cast_from_fixed_to_double): Rename to ...
+ (cast_from_fixed): ... this. Add TYPE parameter. Use it instead
+ of builtin_type_double.
+ (ada_value_cast): Use cast_from_fixed instead of casting result
+ of cast_from_fixed_to_double.
+ (ada_evaluate_subexp): Update calls to cast_from_fixed_to_double.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * valops.c (value_ind): No longer allow dereferencing an
+ integer type.
+ * eval.c (evaluate_subexp_standard): Handle deferencing an
+ integer type here.
+ * ada-lang.c (ada_evaluate_subexp): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ada-valprint.c (ada_val_print_1): When implicitly dereferencing
+ a reference type, pass the reference type directly to unpack_pointer.
+ * c-valprint.c (c_val_print): Likewise.
+ * f-valprint.c (f_val_print): Likewise.
+ * m2-valprint.c (print_variable_at_address, m2_val_print): Likewise.
+ * p-valprint.c (pascal_val_print): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * eval.c (evaluate_subexp_standard): Use builtin_type_int8
+ to construct the EVAL_SKIP dummy return value.
+ * ada-lang.c (ada_evaluate_subexp): Likewise.
+ * jv-lang.c (evaluate_subexp_java): Likewise.
+ * m2-lang.c (evaluate_subexp_modula2): Likewise.
+ * scm-lang.c (evaluate_exp): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * value.h (coerce_enum, coerce_number): Remove prototypes.
+ * value.c (coerce_enum, coerce_number): Remove.
+ * valarith.c (value_x_binop): Do not call coerce_enum.
+ (value_x_unop): Likewise.
+ (value_logical_not): Call coerce_array instead of coerce_number.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ax-gdb.c: Include "language.h".
+ (gen_frame_args_address): Add GDBARCH parameter; use it
+ instead of current_gdbarch.
+ (gen_frame_locals_address): Likewise.
+ (gen_var_ref): Add GDBARCH parameter. Update calls to
+ gen_frame_args_address and gen_frame_locals_address. Use
+ pointer type from gdbarch.
+ (gen_usual_unary): Add EXP parameter. Use integer type
+ from exp->gdbarch.
+ (gen_usual_arithmetic): Likewise.
+ (gen_integral_promotions): Likewise.
+ (gen_add, gen_sub): Remove.
+ (gen_ptradd, gen_ptrsub, gen_ptrdiff): New functions.
+ (gen_logical_not): Use passed-in boolean result type
+ instead of builtin_type_int.
+ (gen_complement): Do not call gen_usual_unary or
+ gen_integral_promotions.
+ (gen_struct_ref): Call require_rvalue instead of gen_usual_unary.
+ (gen_repeat): Add EXP parameter. Update call to gen_expr.
+ Use builtin_type_int32 as internal range type.
+ (gen_sizeof): Add EXP and SIZE_TYPE parameters. Use SIZE_TYPE
+ as result type. Update call to gen_expr.
+ (gen_expr): Add EXP parameter. Update calls to gen_expr,
+ gen_repeat, gen_var_ref, gen_usual_unary, gen_usual_arithmetic,
+ and gen_integral_promotions. Call gen_ptradd, gen_ptrsub,
+ gen_ptrdiff, or gen_binop instead of gen_add or gen_sub.
+ Use exp->gdbarch instead of current_gdbarch.
+ Call language_bool_type to determine result type of UNOP_LOGICAL_NOT.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * eval.c (evaluate_subexp_standard): Add calls to binop_promote
+ and unop_promote before calling value_binop et. al.
+ * ada-lang.c (ada_evaluate_subexp): Add calls to binop_promote
+ and unop_promote before calling value_binop et. al.
+
+ * valarith.c (value_binop): Do not call binop_promote or unop_promote.
+ (value_pos): Do not call unop_promote.
+ (value_neg, value_complement): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * value.h (unop_promote, binop_promote): Add prototypes.
+ * eval.c (unop_promote, binop_promote): New functions.
+ * valarith.c (unop_result_type, binop_result_type): Remove.
+ (value_binop): Call binop_promote or unop_promote.
+ Inline remaining parts of binop_result_type. Remove special
+ code to truncate integer values for unsigned operations.
+ (value_pos): Call unop_promote. Inline remaining parts of
+ unop_result_type.
+ (value_neg, value_complement): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * value.h (value_add, value_sub): Remove.
+ (value_ptradd, value_ptrsub, value_ptrdiff): Add prototypes.
+ * valarith.c (value_add, value_sub): Remove.
+ (value_ptradd, value_ptrsub, value_ptrdiff): New functions.
+ (find_size_for_pointer_math): Add assertion. Update comment.
+ (value_binop): Update comment.
+
+ * eval.c (ptrmath_type_p): New function.
+ (evaluate_subexp_standard): Replace value_add and value_sub
+ by value_ptradd, value_ptrsub, value_ptrdiff or value_binop.
+ Use builtin_type_uint8 instead of builtin_type_char to hold
+ the increment for BINOP_{PRE,POST}{IN,DE}CREMENT operations.
+ * valarith.c (value_subscript): Replace value_add by
+ value_ptradd. Replace value_sub by value_binop.
+ * ada-lang.c (ada_value_ptr_subscript): Likewise.
+ (ada_tag_name_2): Replace value_add by value_ptradd.
+ (ada_evaluate_subexp): Replace value_add and value_sub by
+ value_binop.
+ * m2-lang.c (evaluate_subexp_modula2): Replace value_add
+ by value_ptradd.
+ * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
+ * gnu-v3-abi.c (gnuv3_method_ptr_to_value): Likewise.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * eval.c (evaluate_subexp_for_sizeof): Use builtin_int type of
+ the expression architecture instead of builtin_type_int as the
+ sizeof return type.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * expression.h (enum exp_opcode): Document OP_COMPLEX to take
+ a type parameter as expression element.
+ * eval.c (evaluate_subexp_standard) [OP_COMPLEX]: Retrieve result
+ type as expression element.
+ * f-exp.y: Pass in type when buildin OP_COMPLEX expression.
+ * parse.c (operator_length_standard): Update length of OP_COMPLEX.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * language.h (struct language_arch_info): New members
+ bool_type_default and bool_type_symbol.
+ (lang_bool_type): Remove prototype.
+ (LA_BOOL_TYPE): Remove macro.
+ (language_bool_type): Add prototype.
+ * language.c (lang_bool_type): Remove.
+ (language_bool_type): New function.
+
+ * value.h (value_in): Change return value to int.
+ * value.c (value_in): Return int instead of struct value *.
+
+ * eval.c (evaluate_subexp_standard): Call language_bool_type instead
+ of using LA_BOOL_TYPE. Update call to value_in.
+ * ada-lang.c (ada_evaluate_subexp): Call language_bool_type instead
+ of using LA_BOOL_TYPE or builtin_type_int for boolean values.
+
+ * language.c (unknown_language_arch_info): Set bool_type_default member
+ of struct language_arch_info.
+ * ada-lang.c (ada_language_arch_info): Set bool_type_symbol and
+ bool_type_default members of struct language_arch_info.
+ * c-lang.c (c_language_arch_info): Set bool_type_default member
+ of struct language_arch_info.
+ (cplus_language_arch_info): Set bool_type_symbol and bool_type_default
+ members of struct language_arch_info.
+ * f-lang.c (f_language_arch_info): Set bool_type_symbol and
+ bool_type_default members of struct language_arch_info.
+ * jv-lang.c (java_language_arch_info): Set bool_type_symbol and
+ bool_type_default members of struct language_arch_info.
+ * m2-lang.c (m2_language_arch_info): Set bool_type_symbol and
+ bool_type_default members of struct language_arch_info.
+ * p-lang.c (p_language_arch_info): Set bool_type_symbol and
+ bool_type_default members of struct language_arch_info.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * jv-lang.c (enum java_primitive_types): New type.
+ (java_language_arch_info): New function.
+ (java_language): Use it instead of c_language_arch_info.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * value.h (value_bitstring_subscript): New prototype.
+ * valarith.h (value_bitstring_subscript): New function.
+ (value_subscript): No longer handle TYPE_CODE_BITSTRING.
+ * eval.c (evaluate_subexp_standard): Call value_bitstring_subscript
+ instead of value_subscript to handle TYPE_CODE_BITSTRING.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * expression.h (struct expression): New member GDBARCH.
+ * parse.c (parse_exp_in_context): Initialize it.
+ * parser-def.h (parse_gdbarch, parse_language): New macros.
+
+ * ada-exp.y (parse_type): New macro.
+ Replace builtin_type_ macros by using parse_type.
+ Replace current_language by parse_language.
+ * ada-lex.l (processInt): Replace current_gdbarch by parse_gdbarch.
+ Replace builtin_type_ macros.
+
+ * c-exp.y (parse_type): New macro.
+ Replace builtin_type_ macros by using parse_type.
+ (parse_number): Replace current_gdbarch by parse_gdbarch.
+ (yylex): Replace current_language by parse_language.
+
+ * f-exp.y (parse_type, parse_f_type): New macros.
+ Replace builtin_type_ macros by using parse_{f_,}type.
+ (parse_number): Replace current_gdbarch by parse_gdbarch.
+ (yylex): Replace current_language by parse_language.
+
+ * jv-exp.y (parse_type): New macro.
+ (parse_number): Replace builtin_type_ macros by using parse_type.
+
+ * m2-exp.y (parse_type, parse_m2_type): New macros.
+ Replace builtin_type_ macros by using parse_{m2_,}type.
+
+ * objc-exp.y (parse_type): New macro.
+ Replace builtin_type_ macros by using parse_type.
+ (parse_number): Replace current_gdbarch by parse_gdbarch.
+ (yylex): Replace current_language by parse_language.
+
+ * p-exp.y (parse_type): New macro.
+ Replace builtin_type_ macros by using parse_type.
+ (parse_number): Replace current_gdbarch by parse_gdbarch.
+ (yylex): Replace current_language by parse_language.
+
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * parser-defs.h (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE
+ and DATA_SYMBOL_TYPE arguments.
+ * parse.c (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE and
+ DATA_SYMBOL_TYPE arguments. Replace use of builtin_type_CORE_ADDR.
+ (write_dollar_variable): Update call.
+
+ * ada-exp.y (write_var_or_type): Update call.
+ * c-exp.y: Likewise.
+ * f-exp.y: Likewise.
+ * jv-exp.y: Likewise.
+ * m2-exp.y: Likewise.
+ * objc-exp.y: Likewise.
+ * p-exp.y: Likewise.
+
+2008-09-10 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (ada_parent_type): Add handling of the case where
+ the _parent field is a pointer and/or has a parallel XVS type.
+ (ada_evaluate_subexp) [OP_VAR_VALUE]: When doing an
+ EVAL_AVOID_SIDE_EFFECTS evaluation of a tagged type, return
+ the type of the tag instead of doing forcing an EVAL_NORMAL
+ expression evaluation.
+
+2008-09-10 Paul N. Hilfinger <hilfinger@adacore.com>
+ Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (is_digits_suffix): New function.
+ (is_dot_digits_suffix): Remove.
+ (ada_lookup_symbol_list): Remove digits suffix from minimal symbols
+ before looking up in symbol table, and do not use wild matches on them.
+ (wild_match): Reimplement for speed and to allow matching of operator
+ symbols.
+ (is_valid_name_for_wild_match): Return zero for names that do not
+ follow the GNAT encoding.
+
+ (is_name_suffix): Fix typo in comment.
+ (to_record_with_fixed_variant_part): Ditto.
+
+2008-09-10 Pedro Alves <pedro@codesourcery.com>
+
+ * Makefile.in (gnu-nat.o): New rule.
+
+2008-09-10 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (ada_evaluate_subexp) [OP_ATR_SIZE]: Use
+ archecture-neutral builtin_type_int32 instead of builtin_type_int.
+
+2008-09-10 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (ada_evaluate_subexp) [BINOP_ADD, BINOP_SUB]:
+ Add special handling for pointer types.
+
+2008-09-10 Pedro Alves <pedro@codesourcery.com>
+
+ * inf-ttrace.c (inf_ttrace_follow_fork): Declare locals at the
+ right scope level.
+ (inf_ttrace_resume, inf_ttrace_wait): Typos.
+
+2008-09-10 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ada-lang.c (ada_array_length): Use builtin_type_int32 instead
+ of builtin_type_int.
+ (ada_evaluate_subexp) [UNOP_IN_RANGE]: Use operand range type
+ instead of builtin_type_int.
+
+2008-09-09 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (normal_stop): Run hook-stop last.
+
+2008-09-09 Pedro Alves <pedro@codesourcery.com>
+
+ * gnu-nat.c (gnu_pid_to_exec_file): Delete.
+ (init_gnu_ops): Don't register it.
+
+2008-09-09 Pedro Alves <pedro@codesourcery.com>
+
+ * gnu-nat.c (gnu_attach): Push target before fetching the list of
+ threads.
+
+2008-09-08 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * valops.c (value_cast_structs): Return NULL for failure.
+ (value_cast): Handle NULL from value_cast_structs.
+ (value_fetch_lazy): Call check_typedef. Remove unused variable.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * inferior.h (context_switch_to): Delete.
+ * infrun.c (context_switch): Don't save and load infrun state.
+ (context_switch_to): Delete.
+
+ * infcmd.c (proceed_thread_callback): Replace context_switch_to
+ calls by switch_to_thread calls.
+
+ * gdbthread.h (save_infrun_state, load_infrun_state): Delete.
+ * thread.c (main_thread_state, main_thread_executing): Delete.
+ (inferior_thread): Delete references to them.
+ (add_thread_silent): Fix case where we're adding a thread with the
+ same ptid as an exited thread. Remove references to
+ context-switching.
+ (load_infrun_state, save_infrun_state): Delete.
+ (thread_alive, is_thread_state, any_running, is_executing)
+ (set_executing): Remove the special handling for targets that
+ don't register any thread.
+ (restore_current_thread, thread_apply_all_command)
+ (do_captured_thread_select): Unconditionally call
+ switch_to_thread.
+
+ * mi/mi-main.c (mi_cmd_execute): Check for exited threads.
+ Call switch_to_thread instead of context_switch_to.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ Remove global continuations in favour of a per-thread
+ continuations.
+
+ * gdbthread.h (struct thread_info): Add comments around
+ continuations and intermediate_continuations.
+ (save_infrun_state, load_infrun_state): Delete continuations and
+ intermediate_continuations arguments.
+ * infrun.c (context_switch): Don't context-switch the continuations.
+ * thread.c (clear_thread_inferior_resources): Discard all
+ continuations of the thread we're clearing.
+ (save_infrun_state, load_infrun_state): Delete continuations and
+ intermediate_continuations arguments, and the code referencing
+ them.
+ * utils.c: Include "gdbthread.h".
+ (cmd_continuation, intermediate_continuation): Delete.
+ (add_continuation): Add thread_info* argument. Install the
+ continuation on it.
+ (restore_thread_cleanup): New.
+ (do_all_continuations_ptid, do_all_continuations_thread_callback):
+ New.
+ (do_all_continuations): Reimplement.
+ (discard_all_continuations_thread_callback,
+ discard_all_continuations_thread): New.
+ (discard_all_continuations): Reimplement.
+ (add_intermediate_continuation): Add thread_info* argument.
+ Install the continuation on it.
+ (do_all_intermediate_continuations_thread_callback)
+ (do_all_intermediate_continuations_thread): New.
+ (do_all_intermediate_continuations): Reimplement.
+ (discard_all_intermediate_continuations_thread_callback): New.
+ (discard_all_intermediate_continuations_thread): New.
+ (discard_all_intermediate_continuations): Reimplement.
+
+ * breakpoint.c (until_break_command): Install the continuation on
+ the current thread.
+
+ * defs.h (cmd_continuation, intermediate_continuation): Delete.
+ (struct thread_info): Forward declare.
+ (add_continuation, add_intermediate_continuation): Add
+ thread_info* argument.
+ (do_all_continuations_thread, discard_all_continuations_thread)
+ (do_all_intermediate_continuations_thread)
+ (discard_all_intermediate_continuations_thread): Declare.
+ * inf-loop.c (inferior_event_handler): In non-stop only run
+ continuations on the thread that stopped. In all-stop, run
+ continuations on all threads.
+ * infcmd.c (step_once, finish_command): Adjust.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ Remove the global stop_step in favour of a per-thread
+ stop_step.
+
+ * inferior.h (stop_step): Delete.
+
+ * gdbthread.h (struct thread_info): Add comments to stop_step.
+ (save_infrun_state, load_infrun_state): Remove stop_step argument.
+ * thread.c (load_infrun_state, save_infrun_state): Remove
+ stop_step argument, and references to it.
+
+ * infrun.c (clear_proceed_status): Clear stop_step.
+ (fetch_inferior_event): Adjust.
+ (context_switch): Don't context-switch stop_step.
+ (handle_inferior_event): Adjust.
+ (normal_stop): Adjust.
+ (save_inferior_status, restore_inferior_status): Adjust.
+
+ * infcmd.c (stop_step): Delete.
+ (step_1, step_1_continuation, step_once, until_next_command):
+ Adjust.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ Remove the global step_multi in favour of a per-thread
+ step_multi.
+
+ * inferior.h (step_multi): Delete.
+ * gdbthread.h (struct thread_info): Add comments around
+ step_multi.
+ (save_infrun_state, load_infrun_state): Remove step_multi
+ parameter.
+ * thread.c (load_infrun_state, save_infrun_state): Remove
+ step_multi argument, and references to it.
+ * infcmd.c (step_multi): Delete.
+ (step_1): Adjust.
+ (step_1_continuation, until_next_command): Adjust.
+ * infrun.c (fetch_inferior_event): Adjust.
+ (context_switch): Don't context-switch step_multi.
+ (print_stop_reason, normal_stop): Adjust.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ Remove the global stop_signal in favour of a per-thread
+ stop_signal.
+
+ * inferior.h (stop_signal): Delete.
+ * gdbthread.h (save_infrun_state, load_infrun_state): Remove
+ stop_signal argument.
+ * thread.c (load_infrun_state, save_infrun_state): Remove
+ stop_signal argument. Don't reference it.
+
+ * infcmd.c (stop_signal): Delete.
+ (program_info): Adjust.
+ * infrun.c (resume): Clear stop_signal.
+ (proceed): Adjust. Pass the last stop_signal to the thread we're
+ resuming.
+ (context_switch): Don't context-switch stop_signal.
+ (handle_inferior_event, keep_going): Adjust.
+ (save_inferior_status, restore_inferior_status): Adjust.
+
+ * fbsd-nat.c: Include "gdbthread.h".
+ (find_signalled_thread, find_stop_signal): New.
+ (fbsd_make_corefile_notes): Use it.
+ * fork-child.c (startup_inferior): Adjust.
+
+ * linux-nat.c (get_pending_status): Adjust.
+ (linux_nat_do_thread_registers): Adjust.
+ (find_signalled_thread, find_stop_signal): New.
+ (linux_nat_do_thread_registers): Add stop_signal parameter.
+ (struct linux_nat_corefile_thread_data): Add stop_signal member.
+ (linux_nat_corefile_thread_callback): Pass stop_signal.
+ (linux_nat_do_registers): Delete.
+ (linux_nat_make_corefile_notes): Use find_stop_signal. Assume
+ there's always a thread.
+
+ * procfs.c (find_signalled_thread, find_stop_signal): New.
+ (find_stop_signal): New.
+ (procfs_do_thread_registers): Add stop_signal parameter.
+ (struct procfs_corefile_thread_data): Add stop_signal member.
+ (procfs_corefile_thread_callback): Pass args->stop_signal.
+ (procfs_make_note_section): Find the last stop_signal.
+
+ * solib-irix.c: Include gdbthread.h.
+ (irix_solib_create_inferior_hook): Adjust.
+ * solib-osf.c: Include gdbthread.h.
+ (osf_solib_create_inferior_hook): Adjust.
+ * solib-sunos.c: Include gdbthread.h.
+ (sunos_solib_create_inferior_hook): Adjust.
+ * solib-svr4.c: Include gdbthread.h.
+ (svr4_solib_create_inferior_hook): Adjust.
+
+ * win32-nat.c (do_initial_win32_stuff): Adjust.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * gdbthread.h (struct thread_info): Add comments around
+ proceed_to_finish.
+ (save_infrun_state, load_infrun_state): Remove proceed_to_finish
+ argument.
+ * thread.c (load_infrun_state, save_infrun_state): Delete
+ proceed_to_finish argument and references to it.
+
+ * infcall.c (call_function_by_hand): Adjust.
+ * infcmd.c (finish_command): Adjust.
+ * infrun.c (proceed_to_finish): Delete.
+ (clear_proceed_status): Adjust.
+ (context_switch): Don't context-switch proceed_to_finish.
+ (normal_stop, save_inferior_status, restore_inferior_status):
+ Adjust.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * inferior.h (stop_bpstat): Delete.
+
+ * breakpoint.h (bpstat_do_actions): Remove bpstat* argument.
+
+ * breakpoint.c (bpstat_do_actions): Rename to ...
+ (bpstat_do_actions_1): ... this. Make static. Change return type
+ to int. Return true if a breakpoint proceeded.
+ (bpstat_do_actions): New, as wrapper around bpstat_do_actions_1.
+ (delete_breakpoint): Don't reference the global stop_bpstat; it's
+ gone.
+
+ * gdbthread.h (struct thread_info): Add stop_bpstat.
+ (save_infrun_state, load_infrun_state): Remove stop_bpstat
+ argument.
+ * thread.c (load_infrun_state, save_infrun_state): Remove
+ stop_bpstat argument, and the code referencing it.
+
+ * infcall.c: Include "gdbthread.h".
+ (call_function_by_hand): Adjust.
+ * exceptions.c: Include "gdbthread.h".
+ (throw_exception): Adjust.
+ * infcmd.c (stop_bpstat): Delete.
+ (continue_command): In all-stop, set the ignore count on the
+ thread that reported the stop. In non-stop, set it on the current
+ thread.
+ (finish_command_continuation): Adjust.
+ (program_info): Adjust.
+ * infrun.c (clear_proceed_status): Adjust.
+ (context_switch): Don't context-switch stop_bpstat.
+ (handle_inferior_event): Adjust.
+ (normal_stop): Adjust.
+ (save_inferior_status, restore_inferior_status): Adjust.
+
+ * inf-loop.c (inferior_event_handler): Remove parameter to
+ bpstat_do_actions call.
+ * top.c (command_loop): Remove parameter to bpstat_do_actions
+ call. Call it unconditionally.
+ * event-top.c (command_handler): Ditto.
+ * python/python.c (execute_gdb_command): Ditto.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * inferior.h (step_over_calls): Delete.
+
+ * gdbthread.h (save_infrun_state, load_infrun_state): Remove
+ step_over_calls argument.
+ * thread.c (save_infrun_state, load_infrun_state): Remove
+ step_over_calls argument. Adjust.
+
+ * infcmd.c (step_over_calls): Delete.
+ (step_1): Adjust.
+ * infrun.c (clear_proceed_status): Adjust.
+ (context_switch): Don't context-switch step_over_calls.
+ (handle_inferior_event, save_inferior_status)
+ (restore_inferior_status): Adjust.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ Remove context switching in favour of accessing thread_info fields
+ directly.
+
+ * infrun.c (stepping_over_breakpoint, step_resume_breakpoint):
+ Delete.
+ (struct thread_stepping_state): Delete.
+ (gtss, tss): Delete.
+ (follow_inferior_reset_breakpoints, follow_exec)
+ (resume, clear_proceed_status): Adjust.
+ (prev_pc): Delete.
+ (proceed, start_remote, init_wait_for_inferior): Adjust.
+ (struct execution_control_state): Add event_thread member.
+ (delete_step_resume_breakpoint_callback)
+ (delete_step_thread_step_resume_breakpoint)
+ (delete_step_thread_step_resume_breakpoint_cleanup)
+ (delete_step_thread_step_resume_breakpoint): New.
+ (wait_for_inferior, init_execution_control_state): Use
+ delete_step_thread_step_resume_breakpoint_cleanup.
+ (wait_for_inferior): Set the event_thread.
+ (fetch_inferior_event): Ditto. Delete the step-resume breakpoint
+ with delete_step_thread_step_resume_breakpoint.
+ (init_thread_stepping_state): Change parameter type to
+ thread_info. Adjust.
+ (context_switch): Don't context switch prev_pc,
+ stepping_over_breakpoint, step_resume_breakpoint,
+ step_range_start, step_range_end, step_frame_id,
+ tss->stepping_over_breakpoint,
+ tss->stepping_through_solib_after_catch,
+ tss->stepping_through_solib_catchpoints, tss->current_line, or
+ tss->current_symtab.
+ (adjust_pc_after_break, handle_inferior_event)
+ (currently_stepping, step_into_function)
+ (insert_step_resume_breakpoint_at_sal)
+ (insert_longjmp_resume_breakpoint, keep_going): Adjust.
+ (clear_stepping_state): New.
+ (normal_stop): Adjust.
+ (save_inferior_status, restore_inferior_status): Adjust.
+
+ * gdbthread.h (struct thread_info): Comments describing the
+ members moved here. Add step_after_step_resume_breakpoint.
+ (delete_step_resume_breakpoint): Add thread_info argument.
+ (save_infrun_state, load_infrun_state): Remove prev_pc,
+ trap_expected, step_resume_breakpoint, step_range_start,
+ step_range_end, step_frame_id, another_trap,
+ stepping_through_solib_after_catch,
+ stepping_through_solib_catchpoints, current_line and
+ current_symtab function arguments.
+ (inferior_thread): Declare.
+
+ * thread.c (inferior_thread): New.
+ (delete_step_resume_breakpoint): Add a thread_info parameter and
+ rewrite.
+ (load_infrun_state, save_infrun_state): Remove prev_pc,
+ trap_expected, step_resume_breakpoint, step_range_start,
+ step_range_end, step_frame_id, stepping_over_breakpoint,
+ stepping_through_solib_after_catch,
+ stepping_through_solib_catchpoints, current_line and
+ current_symtab args. Remove code referencing them.
+
+ * infcmd.c (step_range_start, step_range_end, step_frame_id):
+ Delete.
+ (step_1, step_once, until_next_command): Adjust.
+
+ * inferior.h (step_range_start, step_range_end, step_frame_id):
+ Delete.
+
+ * linux-nat.c (linux_child_follow_fork): If following the child,
+ move the step state to it. Adjust.
+ * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
+ * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * bsd-uthread.c (bsd_uthread_find_new_threads): Claim the main
+ thread.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * corelow.c (add_to_thread_list): If this is the first time we
+ hear about thread info, update inferior_ptid.
+ (core_open): Clear the thread list and set inferior_ptid before
+ acknowledging a new inferior. Find threads before fetching
+ register info. Give an upper target layer a chance to find and
+ claim new threads. Print core generation and stop signal info
+ after finding new threads.
+ (get_core_register_section): Look at the lwp member of
+ inferior_ptid for detecting if we have threads info, instead of
+ the pid member.
+ (core_pid_to_str): New.
+ (init_core_ops): Register core_pid_to_str.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * spu-linux-nat.c (spu_child_post_startup_inferior)
+ (spu_child_post_attach): Don't add the main thread here.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ Use ptid_t.tid to store thread ids instead of ptid_t.pid.
+
+ * gnu-nat.c (inf_validate_procs): If this is the first time we're
+ seeing a thread id, extend the main thread's ptid. If we still
+ have pending execs, don't be verbose about new threads.
+ (gnu_wait, gnu_resume, gnu_attach, gnu_thread_alive)
+ (gnu_pid_to_str, cur_thread, sig_thread_cmd): Adjust.
+ * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers):
+ Adjust.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * procfs.c (to_attach): Create a procinfo for the current lwp.
+ Add it to gdb's thread list.
+ (procfs_fetch_registers, procfs_store_registers): Assume there's
+ always an lwp.
+ (procfs_wait): Don't add the main thread here.
+ (procfs_init_inferior): Create a procinfo for the main lwp here.
+ Change main thread's ptid with thread_change_ptid.
+ (procfs_notice_thread): Check for exited threads.
+ (procfs_corefile_thread_callback): Remove check for the main
+ process.
+ (procfs_make_note_section): Assume there is always a thread.
+
+ * sol-thread.c (sol_thread_attach): Clear sol_thread_active before
+ attaching. Change the main thread ptid with thread_change_ptid.
+ (sol_thread_detach): Clear sol_thread_active.
+ (sol_thread_wait): Check for exited threads.
+ (sol_thread_create_inferior): Clear sol_thread_active before
+ creating a new inferior. Change the main thread ptid with
+ thread_change_ptid.
+ (sol_thread_mourn_inferior): Clear sol_thread_active.
+ (sol_find_new_threads_callback): Check for exited threads.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * inf-ttrace.c (inf_ttrace_wait): On TTEVT_LWP_CREATE and
+ LWP_TERMINATE, resume the caller thread. On TTEVT_LWP_CREATE,
+ TTEVT_LWP_EXIT and TTEVT_LWP_TERMINATE, don't stop the whole
+ process, and return TARGET_WAITKIND_IGNORE.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * inf-ttrace.c: Include <signal.h>
+ (inf_ttrace_delete_dead_threads_callback): New.
+ (inf_ttrace_resume_lwp): New.
+ (inf_ttrace_resume_callback, inf_ttrace_resume): Rewrite. Don't
+ delete dying threads until they are really dead.
+ (inf_ttrace_wait): After stopping the whole process, delete any
+ dying thread that is really dead by now.
+ (inf_ttrace_thread_alive): Return 1.
+ (inf_ttrace_extra_thread_info): New.
+ (inf_ttrace_target): Register inf_ttrace_extra_thread_info.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * inf-ttrace.c (inf_ttrace_follow_fork): Register the main thread
+ of the child fork.
+ (inf_ttrace_attach): Add the main thread.
+ (inf_ttrace_resume_callback): Check for exited threads. Adjust
+ for always a thread.
+ (inf_ttrace_wait): Decorate the main thread's ptid with lwp info
+ using thread_change_ptid, and set its private data. Don't add the
+ main thread here.
+ (inf_ttrace_pid_to_str): Adjust.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * bsd-uthread.c (bsd_uthread_wait): Decorate the main thread with
+ thread_change_ptid. Check for exited threads.
+ (bsd_uthread_find_new_threads): Check for exited threads.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * inf-ptrace.c: Include "gdbthread.h".
+ (inf_ptrace_attach): Add the main thread here.
+ * linux-nat.c (linux_nat_attach): Don't add the main thread here.
+ Decorate the main thread id with the lwp id.
+
+2008-09-08 Pedro Alves <pedro@codesourcery.com>
+
+ * linux-nat.c (linux_nat_wait): Update inferior_ptid's ptid with
+ thread_change_ptid. Don't add or mark the main thread as running
+ and executing here.
+ * fork-child.c (fork_inferior): Add the main thread here.
+
+2008-09-08 Jerome Guitton <guitton@adacore.com>
+
+ * rs6000-tdep.c (rs6000_fetch_instruction)
+ (rs6000_skip_stack_check): New functions.
+ (skip_prologue): Skip stack check sequence.
+
+2008-09-08 David Daney <ddaney@avtrex.com>
+
+ * dummy-frame.h (frame.h): Include it.
+ (struct frame_id): Remove declaration.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-tdep.c (spu_push_dummy_code): New function.
+ (spu_gdbarch_init): Install it.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbarch.sh (gdbarch_dump): Use core_addr_to_string_nz
+ instead of paddr_nz.
+ * gdbarch.c: Regenerate.
+
+ * target.c (target_xfer_partial, debug_print_register): Use
+ core_addr_to_string_nz instead of paddr_nz.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Setup displaced stepping
+ *before* calling gdbarch_init_osabi.
+ (rs6000_aix_init_osabi): Disable displaced stepping.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * target.c (update_current_target): Do not inherit to_open
+ or to_close.
+ (pop_target): Call target_close on target_stack instead
+ of current_target.
+ (pop_all_targets_above): Likewise.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gnu-v3-abi.c (gnuv3_decode_method_ptr): New function.
+ (gnuv3_print_method_ptr): Use it.
+ (gnuv3_method_ptr_to_value): Likewise.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * nto-tdep.h (struct nto_target_ops): Add gdbarch parameter to
+ register_area callback function.
+ * i386-nto-tdep.c (i386nto_register_area): Add gdbarch parameter.
+ Use it instead of current_gdbarch.
+ * nto-procfs.c (procfs_store_registers): Update call.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * mips-tdep.c (deprecated_mips_set_processor_regs_hack): Use
+ regcache architecture instead of current_gdbarch.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * mep-tdep.c (struct mep_prologue): Add gdbarch member.
+ (check_for_saved): Use it instead of current_gdbarch.
+ (is_arg_spill): Add gdbarch paramter. Use it instead
+ of current_gdbarch.
+ (mep_analyze_prologue): Add gdbarch parameter. Pass it
+ to is_arg_spill and check_for_saved.
+ (mep_skip_prologue, mep_analyze_frame_prologue): Update calls.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * hppa-tdep.c (internalize_unwinds): Use objfile architecture
+ instead of current_gdbarch.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * m68k-tdep.h (m68kbsd_fpreg_offset): Add gdbarch parameter.
+ * m68kbsd-tdep.c (m68kbsd_fpreg_offset): Add gdbarch paramter.
+ Use it instead of current_gdbarch.
+ (m68kbsd_supply_fpregset): Update call.
+ * m68kbsd-nat.c (m68kbsd_supply_fpregset): Likewise.
+ (m68kbsd_collect_fpregset): Likewise.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * cris-tdep.c (cris_version, cris_mode): Remove.
+ (crisv32_single_step_through_delay): Use tdep->cris_mode.
+ (cris_breakpoint_from_pc): Likewise.
+ (cris_frame_unwind_cache): Use tdep->cris_version.
+ (crisv32_scan_prologue): Likewise.
+ (cris_spec_reg_applicable): Add gdbarch argument.
+ Use tdep->cris_version.
+ (cris_register_size, cris_special_register_name): Update calls.
+ (cris_special_register_name): Add gdbarch argument.
+ (cris_register_name, crisv32_register_name): Update calls.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * m68hc11-tdep.c (gdb_print_insn_m68hc11): Use info->arch
+ instead of current_gdbarch.
+
+ * sh64-tdep.c (gdb_print_insn_sh64): Remove.
+ (sh64_gdbarch_init): Install print_insn_sh64 directly.
+ * sh-tdep.c (gdb_print_insn_sh): Remove.
+ (sh_gdbarch_init): Install print_insn_sh directly.
+
+ * mips-tdep.c (gdb_print_insn_mips): Do not check mips_abi
+ from current_gdbarch.
+ (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): New functions.
+ (mips_gdbarch_init): Install them instead of gdb_print_insn_mips
+ depending on mips_abi.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbarch.sh (addr_bits_remove): Change type to 'm'.
+ (smash_text_address): Likewise.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
+ * arch-utils.c (core_addr_identity): Add gdbarch parameter.
+ * arch-utils.h (core_addr_identity): Likewise.
+ * arm-tdep.c (arm_addr_bits_remove): Likewise.
+ (arm_smash_text_address): Likewise.
+ * hppa-tdep.c (hppa_smash_text_address): Likewise.
+ * m88k-tdep.c (m88k_addr_bits_remove): Likewise.
+ * s390-tdep.c (s390_addr_bits_remove): Likewise.
+
+ * mips-tdep.c (mips_addr_bits_remove): Add gdbarch parameter.
+ Use it instead of current_gdbarch.
+
+ * arm-tdep.c (arm_prologue_prev_register, arm_unwind_pc,
+ arm_dwarf2_prev_register): Update calls.
+ * m88k-tdep.c (m88k_unwind_pc): Update call.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * dwarf2expr.h (dwarf2_read_address): Add gdbarch argument.
+ * dwarf2expr.c (dwarf2_read_address): Add gdbarch argument.
+ Call gdbarch_integer_to_address directly instead of converting
+ to value and back. Update comment.
+ (execute_stack_op): Update call site.
+ * dwarf2loc.c (find_location_expression): Likewise.
+ (locexpr_describe_location): Update
+
+ * dwarf2expr.h (struct dwarf_expr_context): Add gdbarch member.
+ * dwarf2-frame.c (execute_stack_op): Initialize ctx->gdbarch.
+ * dwarf2loc. (dwarf2_evaluate_loc_desc): Likewise.
+ (dwarf2_loc_desc_needs_frame): Likewise.
+
+2008-09-05 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * breakpoint.h (struct bp_location): Change type of section
+ member to "struct obj_section *".
+ * tracepoint.h (struct tracepoint): Likewise.
+ * symtab.h (struct general_symbol_info): Replace bfd_section
+ member with obj_section.
+ (struct symtab_and_line): Change type of section member to
+ "struct obj_section *".
+ (SYMBOL_BFD_SECTION): Remove macro, replace by ...
+ (SYMBOL_OBJ_SECTION): ... this.
+
+ * minsym.c (prim_record_minimal_symbol_and_info): Record symbol
+ section as obj_section instead of bfd_section.
+
+ * ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
+ directly instead of looking of obj_section from bfd_section.
+
+ * objfiles.h (find_pc_sect_section): Remove.
+ * objfiles.c (find_pc_sect_section): Remove.
+ (find_pc_section): Inline find_pc_sect_section code.
+
+ * symfile.h (find_pc_overlay): Return struct obj_section *.
+ (find_pc_mapped_section): Likewise.
+ (section_is_overlay, section_is_mapped): Change type of section
+ argument to struct obj_section *.
+ (pc_in_mapped_range, pc_in_unmapped_range): Likewise.
+ (overlay_mapped_address, overlay_unmapped_address): Likewise.
+ (symbol_overlayed_address): Likewise.
+ * symtab.h (symbol_overlayed_address): Likewise.
+ * symfile.c (overlay_is_mapped): Remove.
+ (section_is_mapped): Inline overlay_is_mapped code. Update.
+ (overlay_invalidate_all): Update.
+ (section_is_overlay): Change section argument to type
+ "struct obj_section *". Use bfd_ methods.
+ (pc_in_unmapped_range): Likewise. Handle relocated sections.
+ (pc_in_mapped_range): Likewise. Handle relocated sections.
+ (sections_overlap): Likewise.
+ (overlay_unmapped_address): Likewise.
+ (overlay_mapped_address): Likewise.
+ (symbol_overlayed_address): Likewise.
+ (find_pc_overlay): Return struct obj_section *.
+ (find_pc_mapped_section): Likewise.
+ (list_overlays_command): Update.
+ (map_overlay_command, unmap_overlay_command): Update.
+ (simple_overlay_update): Update.
+
+ * block.h (blockvector_for_pc_sect): Change section argument
+ to type "struct obj_section *".
+ (block_for_pc_sect): Likewise.
+ * block.c (blockvector_for_pc_sect): Change section argument
+ to type "struct obj_section *".
+ (block_for_pc_sect): Likewise.
+ * symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
+ find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
+ lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
+ (matching_bfd_sections): Rename to ...
+ (matching_obj_sections): ... this. Update argument types.
+ * blockframe.c (find_pc_sect_function): Likewise.
+ * breakpoint.c (describe_other_breakpoints): Likewise.
+ (breakpoint_has_pc, check_duplicates_for): Likewise.
+ * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
+ (lookup_minimal_symbol_by_pc_section): Likewise.
+ * symtab.c (find_pc_sect_psymtab_closer): Likewise.
+ (find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
+ find_pc_sect_line, find_function_start_pc): Likewise.
+ (matching_bfd_sections): Rename to ...
+ (matching_obj_sections): ... this. Update argument types.
+
+ * blockframe.c (find_pc_partial_function): Update to section
+ type changes. No longer call find_pc_sect_section.
+ (cache_pc_function_section): Change to type "struct obj_section *".
+ * breakpoint.c (resolve_sal_pc): Update to section type changes.
+ * exec.c (xfer_memory): Likewise.
+ * findvar.c (read_var_value): Likewise.
+ * infcmd.c (jump_command): Likewise.
+ * linespec.c (minsym_found): Likewise.
+ * maint.c (maintenance_translate_address): Likewise.
+ * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
+ (lookup_solib_trampoline_symbol_by_pc): Likewise.
+ * parse.c (write_exp_msymbol): Likewise.
+ * printcmd.c (build_address_symbolic): Likewise.
+ (address_info, sym_info): Likewise.
+ * symmisc.c (dump_msymbols, print_symbol): Likewise.
+ * symtab.c (fixup_section): Likewise.
+ (fixup_symbol_section, fixup_psymbol_section): Likewise.
+ (find_pc_line, find_function_start_sal): Likewise.
+ * target.c (memory_xfer_partial): Likewise.
+ * hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
+ * spu-tdep.c (spu_overlay_update): Likewise.
+
+2008-09-04 Doug Evans <dje@google.com>
+
+ * defs.h (plongest,pulongest): Renamed from paddr_u,paddr_d.
+ Change argument of pulongest from CORE_ADDR to ULONGEST.
+ All callers updated.
+ * utils.c (plongest): Renamed from paddr_d.
+ (pulongest): Renamed from paddr_u, change arg type to ULONGEST.
+ * remote-mips.c (send_srec): Use paddr_nz instead of paddr_u in
+ `CORE_ADDR addr' arg of error message.
+
+2008-09-03 Angela Marie Thomas <angela@releasedominatrix.com>
+
+ * ser-tcp.c (ser_tcp_send_break): New function.
+ (_initialize_ser_tcp): Use ser_tcp_send_break.
+ * ser-tcp.h (ser_tcp_send_break): New prototype.
+
+2008-09-03 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-tdep.c (spu_push_dummy_call): Update all stack pointer slots
+ when allocating stack frame for inferior call.
+
+2008-09-03 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-tdep.c (spu_frame_unwind_cache): Do not attempt to unwind
+ SP or return address if we failed to find a valid frame.
+
+2008-09-03 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * breakpoint.c (breakpoint_init_inferior): Mark as not inserted only
+ non-permanent breakpoints.
+ (bpstat_stop_status): Change enable_state to bp_disabled only for
+ non-permanent breakpoints.
+ (bp_loc_is_permanent): New function.
+ (create_breakpoint): Check if the location points to a permanent
+ breakpoint and if it does, make breakpoint permanent.
+ (update_breakpoint_locations): Make sure new locations of permanent
+ breakpoints are properly initialized.
+ * i386-tdep.c (i386_skip_permanent_breakpoint): New function.
+ (i386_gdbarch_init): Set gdbarch_skip_permanent_breakpoint.
+
+2008-09-02 Pedro Alves <pedro@codesourcery.com>
+
+ * breakpoint.c (insert_breakpoints, update_global_location_list):
+ Check breakpoints_always_inserted_mode instead of
+ always_inserted_mode directly.
+
+2008-09-02 Andreas Schwab <schwab@suse.de>
+
+ * ia64-tdep.c (ia64_get_dyn_info_list): Use obj_section_addr.
+
+2008-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Stay compatible after the GCC PR fortran/29635 fix.
+ * dwarf2read.c (process_die <DW_TAG_imported_module>)
+ (process_die <DW_TAG_imported_module>): Do not assert anything about
+ these unsupported tags.
+
+2008-08-29 Tom Tromey <tromey@redhat.com>
+
+ * maint.c (_initialize_maint_cmds): Fix typo.
+
+2008-08-29 Tom Tromey <tromey@redhat.com>
+
+ * dwarf2read.c (dwarf2_build_psymtabs_hard): Copy dirname on
+ obstack.
+
+2008-08-27 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * remote.c: Include "gdb_stat.h".
+
+2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * dummy-frame.h (dummy_frame_pop): Add prototype.
+ * dummy-frame.c: Include "observer.h".
+ (dummy_frame_push): Do not check for stale frames.
+ (dummy_frame_pop): New function.
+ (cleanup_dummy_frames): New function.
+ (_initialize_dummy_frame): Install it as inferior_created observer.
+
+ * frame.h (struct frame_id): Update comments.
+ (frame_id_inner): Remove prototype.
+ * frame.c (frame_id_inner): Make static. Add comments.
+ (frame_find_by_id): Update frame_id_inner safety net check to avoid
+ false positives for targets using non-contiguous stack ranges.
+ (get_prev_frame_1): Update frame_id_inner safety net check.
+ (frame_pop): Call dummy_frame_pop when popping a dummy frame.
+
+ * stack.c (return_command): Directly pop the selected frame.
+ * infrun.c (handle_inferior_event): Remove dead code.
+ * i386-tdep.c (i386_push_dummy_call): Update comment.
+
+2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * breakpoint.c (remove_breakpoint): Do not fail if unable to remove
+ breakpoint from shared library.
+
+2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * solib-svr4.c (read_program_header): New function.
+ (scan_dyntag_auxv): New function.
+ (elf_locate_base): Use it if scan_dyntag fails.
+ (find_program_interpreter): New function.
+ (enable_break): Use it instead of .interp section.
+
+2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * remote.h (remote_filename_p, remote_bfd_open): Add prototypes.
+ * remote.c (remote_bfd_iovec_open, remote_bfd_iovec_close,
+ remote_bfd_iovec_pread, remote_bfd_iovec_stat, remote_filename_p,
+ remote_bfd_open): New functions.
+ (remote_hostio_send_command): Fail safely if remote connection
+ is not set up.
+
+ * solist.h (solib_open): Remove prototype.
+ (solib_bfd_open): Add prototype.
+ * solib.c: Include "remote.h".
+ (solib_open): Remove, replace by ...
+ (solib_bfd_open): ... this new function. Handle remote BFDs.
+ (solib_map_sections): Replace solib_open by solib_bfd_open.
+ * solib-frv.c: Include "exceptions.h".
+ (enable_break2): Replace solib_open by solib_bfd_open.
+ * solib-svr4.c: Include "exceptions.h".
+ (enable_break): Replace solib_open by solib_bfd_open.
+
+ * symfile.c: Include "remote.h".
+ (build_id_verify): Handle remote BFDs.
+ (separate_debug_file_exists): Use BFD to access file. Handle
+ remote BFDs.
+ (symfile_bfd_open): Handle remote BFDs.
+ (reread_symbols): Handle remote BFDs.
+
+ * NEWS: Mention "remote:" argument prefix to "set sysroot".
+
+2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbarch.sh (target_gdbarch): New global variable.
+ (deprecated_current_gdbarch_select_hack): Set it.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
+ * arch-utils.c (gdbarch_update_p): Use target_gdbarch instead
+ of current_gdbarch.
+ * target-descriptions.c (target_find_description): Likewise.
+ * arm-tdep.c (arm_update_current_architecture): Likewise.
+ (show_fp_model, arm_show_abi, arm_show_fallback_mode,
+ arm_show_force_mode): Likewise.
+ * mips-tdep.c (show_mask_address, show_mipsfpu_command,
+ show_mips_abi): Likewise.
+ * mep-tdep.c (me_module_register_set, current_me_module): Likewise.
+
+ * target.c (target_translate_tls_address): Use target_gdbarch
+ instead of current_gdbarch.
+ * remote.c (struct packet_reg): Likewise.
+ (get_remote_arch_state, packet_reg_from_regnum,
+ packet_reg_from_pnum, remote_check_symbols, remote_wait,
+ remote_address_masked, remote_insert_breakpoint,
+ remote_insert_hw_breakpoint, remote_read_description): Likewise.
+ * remote-m32r-sdi.c (m32r_resume, m32r_wait): Likewise.
+ * remote-mips.c (mips_open, mips_common_breakpoint): Likewise.
+ * cris-tdep.c (cris_can_use_hardware_watchpoint): Likewise.
+
+ * solib.c (solib_open, solib_map_sections, solib_read_symbols,
+ solib_add, info_sharedlibrary_command, solib_address,
+ solib_create_inferior_hook, in_solib_dynsym_resolve_code,
+ solib_global_lookup): Likewise.
+ * solib-frv.c (enable_break2, frv_relocate_main_executable): Likewise.
+ * solib-irix.c (irix_current_sos, irix_open_symbol_file_object):
+ Likewise.
+ * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
+ * solib-svr4.c (exec_entry_point, enable_break, svr4_free_so,
+ set_solib_svr4_fetch_link_map_offsets, svr4_fetch_link_map_offsets):
+ Likewise.
+ * nto-tdep.c (nto_find_and_open_solib, nto_init_solib_absolute_prefix,
+ nto_truncate_ptr): Likewise.
+ * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Likewise.
+
+2008-08-26 Luis Machado <luisgpm@br.ibm.com>
+
+ * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections) New structure.
+ (ppc_linux_vmx_regset_sections): New structure.
+ (ppc_linux_fp_regset_sections): New structure.
+ (ppc_linux_init_abi): Select core-file regset based on target
+ features.
+
+2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * target.c (debug_print_register): Use regcache_raw_collect
+ instead of regcache_cooked_read. Only handle raw registers.
+
+2008-08-25 Pedro Alves <pedro@codesourcery.com>
+
+ * cp-name-parser.y: Include config.h before system headers.
+
+2008-08-25 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * m88k-tdep.c: Update for unwinder changes.
+
+2008-08-24 Tom Tromey <tromey@redhat.com>
+
+ * s390-tdep.c (s390_address_class_type_flags): Use
+ TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1.
+ (s390_address_class_type_flags_to_name): Likewise.
+ (s390_address_class_name_to_type_flags): Likewise.
+
+2008-08-24 Tom Tromey <tromey@redhat.com>
+
+ * rs6000-tdep.c (rs6000_builtin_type_vec128): Don't use
+ TYPE_FLAGS.
+ * features/rs6000/powerpc-vsx32l.c
+ (initialize_tdesc_powerpc_vsx32l): Update.
+ * features/rs6000/powerpc-vsx32.c
+ (initialize_tdesc_powerpc_vsx32): Update.
+ * features/rs6000/powerpc-vsx64.c
+ (initialize_tdesc_powerpc_vsx64): Update.
+ * features/rs6000/powerpc-vsx64l.c
+ (initialize_tdesc_powerpc_vsx64l): Update.
+ * target-descriptions.c (maint_print_c_tdesc_cmd): Emit
+ TYPE_VECTOR, not TYPE_FLAGS.
+
+2008-08-24 Tom Tromey <tromey@redhat.com>
+
+ * xml-tdesc.c (tdesc_end_union): Update.
+ * stabsread.c (define_symbol): Update.
+ (read_type): Update.
+ (read_struct_type): Update.
+ (read_enum_type): Update.
+ * spu-tdep.c (spu_builtin_type_vec128): Update.
+ * sh-tdep.c (sh_push_dummy_call_fpu): Update.
+ (sh_push_dummy_call_nofpu): Update.
+ * mdebugread.c (parse_symbol): Update.
+ (parse_symbol): Update.
+ (parse_symbol): Update.
+ (upgrade_type): Update.
+ * jv-lang.c (java_lookup_class): Update.
+ * iq2000-tdep.c (iq2000_pointer_to_address): Update.
+ * i386-tdep.c (i386_mmx_type): Update.
+ (i386_sse_type): Update.
+ * gdbtypes.h (enum type_flag_value): New enum.
+ (enum type_instance_flag_value): New enum.
+ (TYPE_FLAG_UNSIGNED, TYPE_FLAG_NOSIGN, TYPE_FLAG_STUB,
+ TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC, TYPE_FLAG_PROTOTYPED,
+ TYPE_FLAG_INCOMPLETE, TYPE_FLAG_VARARGS, TYPE_FLAG_VECTOR,
+ TYPE_FLAG_FIXED_INSTANCE, TYPE_FLAG_STUB_SUPPORTED,
+ TYPE_FLAG_NOTTEXT): Now enum constants.
+ (TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_CODE_SPACE,
+ TYPE_FLAG_DATA_SPACE, TYPE_FLAG_ADDRESS_CLASS_1,
+ TYPE_FLAG_ADDRESS_CLASS_2): Remove.
+ (TYPE_INSTANCE_FLAG_CONST, TYPE_INSTANCE_FLAG_VOLATILE,
+ TYPE_INSTANCE_FLAG_CODE_SPACE, TYPE_INSTANCE_FLAG_DATA_SPACE,
+ TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1,
+ TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2): New constants.
+ (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB, TYPE_TARGET_STUB,
+ TYPE_STATIC, TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_VARARGS,
+ TYPE_VECTOR, TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED,
+ TYPE_NOTTEXT): Update.
+ (TYPE_FLAG_ADDRESS_CLASS_ALL): Remove.
+ (TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL): New define.
+ (TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE,
+ TYPE_ADDRESS_CLASS_1, TYPE_ADDRESS_CLASS_2,
+ TYPE_ADDRESS_CLASS_ALL): Update.
+ (struct main_type) <flags>: Remove.
+ <flag_unsigned, flag_nosign, flag_stub, flag_target_stub,
+ flag_static, flag_prototyped, flag_incomplete, flag_varargs,
+ flag_vector, flag_stub_supported, flag_nottext,
+ flag_fixed_instance>: New fields.
+ <nfields, vptr_fieldno>: Move earlier.
+ (TYPE_FLAGS): Remove.
+ * gdbtypes.c (make_pointer_type): Update.
+ (address_space_name_to_int): Update.
+ (address_space_int_to_name): Update.
+ (make_type_with_address_space): Update.
+ (make_cv_type): Update.
+ (create_range_type): Update.
+ (get_discrete_bounds): Update.
+ (create_set_type): Update.
+ (make_vector_type): Update.
+ (smash_to_method_type): Update.
+ (check_typedef): Update.
+ (check_stub_method): Update.
+ (init_type): Individually assign flag fields.
+ (recursive_dump_type): Don't print entire TYPE_FLAGS field. Do
+ print TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED, and TYPE_NOTTEXT.
+ (copy_type_recursive): Copy the entire main type. Don't use
+ TYPE_FLAGS.
+ * features/rs6000/powerpc-altivec64l.c
+ (initialize_tdesc_powerpc_altivec64l): Update.
+ * features/rs6000/powerpc-altivec64.c
+ (initialize_tdesc_powerpc_altivec64): Update.
+ * features/rs6000/powerpc-altivec32l.c
+ (initialize_tdesc_powerpc_altivec32l): Update.
+ * features/rs6000/powerpc-altivec32.c
+ (initialize_tdesc_powerpc_altivec32): Update.
+ * features/rs6000/powerpc-7400.c (initialize_tdesc_powerpc_7400):
+ Update.
+ * features/arm-with-iwmmxt.c (initialize_tdesc_arm_with_iwmmxt):
+ Update.
+ * dwarf2read.c (read_structure_type): Update.
+ (read_enumeration_type): Likewise.
+ (process_enumeration_scope): Likewise.
+ (read_tag_pointer_type): Likewise.
+ (read_subroutine_type): Likewise.
+ (read_subroutine_type): Likewise.
+ (read_base_type): Likewise.
+ * coffread.c (coff_read_enum_type): Update.
+ * ada-valprint.c (adjust_type_signedness): Update.
+ * ada-typeprint.c (print_record_field_types): Update.
+ * ada-lang.c (packed_array_type): Update.
+ (empty_record): Don't reset TYPE_FLAGS.
+ (ada_template_to_fixed_record_type_1): Update.
+ (ada_template_to_fixed_record_type_1): Likewise.
+ (template_to_static_fixed_type): Likewise.
+ (to_record_with_fixed_variant_part): Likewise.
+ (to_fixed_record_type): Likewise.
+ (to_fixed_array_type): Likewise.
+ (to_static_fixed_type): Likewise.
+
+2008-08-23 Jim Blandy <jimb@redhat.com>
+
+ PR macros/607:
+ * symmisc.c (print_symbol_bcache_statistics): Include statistics
+ for the macro bcache.
+
+2008-08-23 Tom Tromey <tromey@redhat.com>
+
+ * macrotab.h (struct macro_definition) <kind>: Shrink to one bit.
+ (argc): Now 31 bits.
+
+2008-08-22 Tom Tromey <tromey@redhat.com>
+
+ * NEWS: Move macro entries back under "New commands".
+
+2008-08-22 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * breakpoint.c (create_overlay_event_breakpoint): Rename to ...
+ (create_overlay_event_breakpoint_1): ... this. Add OBJFILE parameter.
+ (create_overlay_event_breakpoint): Loop over all objfiles to install
+ multiple instances of the overlay event breakpoint if present.
+
+2008-08-22 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-tdep.c (spu_overlay_new_objfile): Only consider SPU objfiles.
+ (info_spu_event_command): Command only supported on SPU architecture.
+ (info_spu_signal_command): Likewise.
+ (info_spu_mailbox_command): Likewise.
+ (info_spu_dma_command): Likewise.
+ (info_spu_proxydma_command): Likewise.
+
+2008-08-22 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * infrun.c (adjust_pc_after_break): Do not call get_thread_regcache
+ if the thread has already exited.
+
+2008-08-22 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (proceed): Move back setting previous_inferior_ptid
+ from here ...
+ (wait_for_inferior): ... to here.
+ (fetch_inferior_event): ... and here.
+
+2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * gdbarch.sh: Include "regcache.h" into gdbarch.c.
+ (deprecated_current_gdbarch_select_hack): Call registers_changed
+ instead of reinit_frame_cache.
+ * gdbarch.c: Regenerate.
+
+2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * elfread.c (elf_symtab_read): Do not relocate thread-local symbols.
+
+2008-08-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * xcoffread.c (SYMNAME_ALLOC): Correct syntax.
+
+2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * findvar.c (locate_var_value): Do not call get_frame_arch
+ with a NULL frame argument.
+
+2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * frame.h (frame_map_regnum_to_name): Remove prototype.
+ (frame_map_name_to_regnum): Remove prototype.
+ * frame.c (frame_map_regnum_to_name): Remove.
+ (frame_map_name_to_regnum): Remove.
+ (frame_unwind_register_value): Use user_reg_map_regnum_to_name
+ instead of frame_map_regnum_to_name.
+ * ax-gdb.c: Include "user-regs.h".
+ (gen_expr): Use user_reg_map_name_to_regnum instead of
+ frame_map_name_to_regnum.
+ * eval.c: Include "user-regs.h".
+ (evaluate_subexp_standard): Use user_reg_map_name_to_regnum
+ instead of frame_map_name_to_regnum.
+ * infcmd.c (registers_info): Likewise.
+ * parse.c: Include "user-regs.h".
+ (write_dollar_variable): Use user_reg_map_name_to_regnum
+ instead of frame_map_name_to_regnum.
+ * tracepoint.c: Include "user-regs.h".
+ (encode_actions): Use user_reg_map_name_to_regnum
+ instead of frame_map_name_to_regnum.
+ * valops.c: Include "user-regs.h".
+ (value_fetch_lazy): Use user_reg_map_regnum_to_name instead
+ of frame_map_regnum_to_name.
+
+2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): Read
+ and manually relocate .opd contents from BFD instead of reading
+ them from target memory.
+
+2008-08-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2read.c (processing_current_prefix): Delete static
+ variable.
+ (process_full_comp_unit): Do not set processing_current_prefix.
+ (dwarf2_full_name): New function.
+ (read_func_scope): Do not set processing_current_prefix. Use
+ determine_prefix.
+ (read_structure_type): Do not set processing_current_prefix. Remove
+ unused inner cleanup.
+ (process_structure_scope): Do not set processing_current_prefix.
+ (read_enumeration_type): Use dwarf2_full_name.
+ (determine_class_name): Return a const char *. Put the result
+ on the objfile obstack. Use dwarf2_full_name.
+ (read_namespace_type): New function.
+ (read_namespace): Do not create the type here. Use
+ determine_prefix.
+ (read_typedef): Use dwarf2_full_name. Do not pass the name
+ to init_type.
+ (read_base_type): Do not pass the name to init_type. Handle
+ TYPE_FLAG_NOSIGN.
+ (read_unspecified_type): Do not pass the name to init_type.
+ (new_symbol): Use dwarf2_full_name instead of
+ processing_current_prefix.
+ (read_type_die): Do not set processing_current_prefix. Handle
+ DW_TAG_namespace.
+ (determine_prefix): Handle specifications. Return the result
+ on the objfile obstack. Handle unions correctly.
+
+2008-08-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * buildsym.c (add_symbol_to_list): Do not call
+ cp_scan_for_anonymous_namespaces here.
+ (finish_block): Do not call cp_set_block_scope here.
+ * cp-namespace.c (processing_has_namespace_info)
+ (processing_current_prefix): Delete.
+ (cp_initialize_namespace): Do not initialize
+ processing_has_namespace_info.
+ (cp_scan_for_anonymous_namespaces): Use SYMBOL_DEMANGLED_NAME. Do
+ not check processing_has_namespace_info.
+ (cp_set_block_scope): Take prefix and namespace info flag as
+ arguments. Honor namespaces regardless of a demangled name.
+ * cp-support.h (processing_has_namespace_info)
+ (processing_current_prefix): Delete declarations.
+ (cp_set_block_scope): Update prototype.
+ * dwarf2read.c (processing_has_namespace_info)
+ (processing_current_prefix): New static variables.
+ (read_file_scope): Initialize processing_has_namespace_info.
+ (read_func_scope): Call cp_set_block_scope for C++.
+ (new_symbol): Call cp_scan_for_anonymous_namespaces for C++.
+ * symtab.c (symbol_demangled_name): Accept a const argument.
+ * symtab.h (symbol_demangled_name): Update prototype.
+
+2008-08-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * ax-gdb.c (gen_var_ref): Use SYMBOL_LINKAGE_NAME.
+ * blockframe.c (find_pc_partial_function): Likewise.
+ * buildsym.c (find_symbol_in_list): Likewise.
+ * c-valprint.c (c_val_print): Likewise.
+ * coffread.c (patch_opaque_types, process_coff_symbol): Likewise.
+ (coff_read_enum_type): Likewise. Use SYMBOL_SET_LINKAGE_NAME.
+ * cp-support.c (cp_remove_params): Renamed from remove_params and
+ made global.
+ (overload_list_add_symbol): Update call to remove_params.
+ * cp-support.h (cp_remove_params): Declare.
+ * dwarf2read.c (process_enumeration_scope): Use SYMBOL_LINKAGE_NAME.
+ (dwarf2_const_value): Use SYMBOL_PRINT_NAME.
+ * expprint.c (dump_subexp_body_standard): Likewise.
+ * f-valprint.c (info_common_command, there_is_a_visible_common_named):
+ Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME
+ for messages.
+ * findvar.c (read_var_value): Use SYMBOL_LINKAGE_NAME.
+ * gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise.
+ * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
+ (hppa_hpux_skip_trampoline_code): Use SYMBOL_LINKAGE_NAME to find
+ symbols and SYMBOL_PRINT_NAME for messages.
+ * jv-lang.c (add_class_symbol): Use SYMBOL_SET_LINKAGE_NAME.
+ * linespec.c (decode_line_2): Use SYMBOL_LINKAGE_NAME.
+ * mdebugread.c (parse_symbol): Use SYMBOL_LINKAGE_NAME and
+ SYMBOL_SET_LINKAGE_NAME.
+ (mylookup_symbol): Use SYMBOL_LINKAGE_NAME.
+ * minsyms.c (add_minsym_to_demangled_hash_table): Use
+ SYMBOL_SEARCH_NAME.
+ (lookup_minimal_symbol): Use SYMBOL_LINKAGE_NAME or
+ SYMBOL_MATCHES_SEARCH_NAME, depending on the pass.
+ * objfiles.h (ALL_OBJFILE_MSYMBOLS): Use SYMBOL_LINKAGE_NAME.
+ * printcmd.c (build_address_symbolic): Use SYMBOL_LINKAGE_NAME.
+ (address_info): Use SYMBOL_PRINT_NAME for messages and
+ SYMBOL_LINKAGE_NAME for lookups.
+ * sol-thread.c (info_cb): Use SYMBOL_PRINT_NAME for messages.
+ * stabsread.c (patch_block_stabs, define_symbol)
+ (read_type, read_enum_type, common_block_end)
+ (cleanup_undefined_types_1, scan_file_globals): Use
+ SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, ALL_OBJFILE_MSYMBOLS,
+ and SYMBOL_PRINT_NAME.
+ * stack.c (print_frame_args): Use SYMBOL_LINKAGE_NAME.
+ (print_frame, frame_info): Use SYMBOL_PRINT_NAME for output. Use
+ cp_remove_params instead of cplus_demangle.
+ (print_block_frame_labels, print_frame_arg_vars): Use
+ SYMBOL_LINKAGE_NAME.
+ * symmisc.c (dump_msymbols): Use ALL_OBJFILE_MSYMBOLS and
+ SYMBOL_LINKAGE_NAME.
+ (dump_symtab_1, print_symbol, print_partial_symbols)
+ (maintenance_check_symtabs): Use SYMBOL_LINKAGE_NAME.
+ * symtab.h (DEPRECATED_SYMBOL_NAME): Delete.
+ (SYMBOL_SET_LINKAGE_NAME): New.
+ (SYMBOL_SET_NAMES): Add a comment.
+ * tracepoint.c (set_traceframe_context, validate_actionline)
+ (collect_symbol, scope_info): Use SYMBOL_LINKAGE_NAME for
+ lookups and SYMBOL_PRINT_NAME for output.
+ * typeprint.c (typedef_print): Use SYMBOL_LINKAGE_NAME.
+ * xcoffread.c (process_xcoff_symbol): Use SYMBOL_SET_LINKAGE_NAME.
+
+2008-08-21 Pedro Alves <pedro@codesourcery.com>
+
+ * arm-tdep.c (arm_pc_is_thumb): Use obj_section_addr.
+ * hppa-hpux-tdep.c (hppa_hpux_find_dummy_bpaddr): Likewise.
+ * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Use
+ obj_section_addr and obj_section_endaddr.
+ * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Likewise.
+ * hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise.
+ * ia64-tdep.c (ia64_find_global_pointer): Likewise.
+ (find_extant_func_descr): Likewise.
+ * solib-frv.c (frv_relocate_main_executable): Use
+ obj_section_addr.
+ * xstormy16-tdep.c (xstormy16_find_jmp_table_entry): Use
+ obj_section_addr and obj_section_endaddr.
+
+2008-08-21 Paul N. Hilfinger <hilfinger@adacore.com>
+
+ * NEWS: Amplify last entry on boolean types in Ada.
+
+2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2read.c (die_specification, dwarf2_extension, follow_die_ref):
+ Make the dwarf2_cu * parameter output as well as input. Update it if
+ we follow a reference to another CU.
+ (read_func_scope, determine_class_name, namespace_name, dwarf2_attr)
+ (die_type, die_containing_type): Update calls to changed functions.
+ Use the returned CU along with the returned DIE.
+ (read_namespace): Use dwarf2_attr instead of dwarf2_extension.
+
+2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2read.c (queue_comp_unit): Take an objfile argument. Read
+ in the DIEs here.
+ (process_queue): Do not read in the DIEs here.
+ (psymtab_to_symtab_1): Update call to queue_comp_unit.
+ (read_full_die): Do not call queue_comp_unit from here.
+ (maybe_queue_comp_unit): New function.
+ (follow_die_ref): Use it.
+
+2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2read.c (struct attribute): Move earlier.
+ (struct die_info): Change attrs to a trailing array.
+ (dwarf_alloc_die): Take the number of attributes. Allocate space
+ for them.
+ (read_full_die): Update call to dwarf_alloc_die. Do not manually
+ allocate attributes.
+
+2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2read.c (REF_HASH_SIZE): Delete.
+ (struct dwarf2_cu): Replace die_ref_table with die_hash.
+ (struct die_info): Remove next_ref.
+ (store_in_ref_table): Remove offset argument. Rewrite to use
+ htab_find_slot_with_hash.
+ (die_hash, die_eq): New.
+ (read_comp_unit): Allocate the die_hash.
+ (read_die_and_children): Update call to store_die_ref.
+ (follow_die_ref): Rewrite to use htab_find_with_hash.
+
+2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2read.c (free_die_list, copy_die): Delete.
+ (dwarf_alloc_die): Take a CU argument. Allocate the new DIE
+ on the obstack.
+ (read_full_die): Update call to dwarf_alloc_die. Allocate
+ attributes on the CU obstack.
+ (free_one_comp_unit): Do not call free_die_list.
+
+2008-08-20 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2read.c (read_die_and_children): Ignore NULL DIEs.
+ (read_die_and_siblings): Likewise. Do not add padding DIEs to the
+ sibling list.
+ (read_full_die): Do not allocate DIEs for abbrev 0.
+ (follow_die_ref): Correct error message.
+
+2008-08-20 Pedro Alves <pedro@codesourcery.com>
+
+ * linespec.c (symtab_from_filename): Also throw NOT_FOUND_ERROR if
+ there are no symbols loaded, instead of throwing a generic error.
+ (decode_variable): Likewise.
+
+2008-08-20 Pedro Alves <pedro@codesourcery.com>
+
+ * objfiles.h (struct obj_section): Remove addr and endaddr fields.
+ (obj_section_offset, obj_section_addr, obj_section_endaddr): New
+ macros.
+ * objfiles.c (add_to_objfile_sections): Don't set addr, endaddr
+ and offset. Use size_t instead of unsigned long.
+ (build_objfile_section_table): Use size_t instead of unsigned
+ long.
+ (objfile_relocate): Don't relocate s->addr and s->endaddr, they're
+ gone.
+ (find_pc_sect_section): Use obj_section_addr and
+ obj_section_endaddr.
+ * symfile.c (symfile.c): Remove code that maps sections
+ offsets in "addr" to the object's sections.
+ * blockframe.c (find_pc_partial_function): Use obj_section_endaddr.
+ * gcore.c (gcore_create_callback): Use obj_section_addr and
+ obj_section_endaddr.
+ * maint.c (print_objfile_section_info): Likewise.
+ * printcmd.c (sym_info): Use obj_section_addr and
+ obj_section_endaddr.
+ * symtab.c (fixup_section): Likewise.
+
+2008-08-20 Mark Kettenis <kettenis@gnu.org>
+
+ * sparc-tdep.c: Make some comments catch up with reality.
+
+2008-08-20 Vladimir Prus <vladimir@codesourcery.com>
+
+ * NEWS: Mention 'set target-async'
+
+2008-08-19 Vladimir Prus <vladimir@codesourcery.com>
+
+ * infrun.c (resume): If the thread is placed to the deferred step
+ queue, mark it as running.
+
+2008-08-19 Vladimir Prus <vladimir@codesourcery.com>
+
+ Make sure target supports non-stop.
+ * infcmd.c (run_command_1, attach_command): If non-stop mode
+ is requested, verify the target supports it.
+ * linux-nat.c (linux_nat_supports_non_stop): New.
+ (linux_nat_add_target): Register the above.
+ * target.c (find_default_supports_non_stop)
+ (target_supports_non_stop): New.
+ (init_dummy_target): Register find_default_supports_non_stop.
+ * target.h (struct target_ops): New field to_supports_non_stop.
+ (target_supports_non_stop): New.
+
+2008-08-19 Pedro Alves <pedro@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com>
+
+ * target.c (target_async_permitted, target_async_permitted_1)
+ (set_maintenance_target_async_permitted)
+ (show_maintenance_target_async_permitted): New.
+ (initialize_targets): Register 'set target-async'.
+ * target.h (target_async_permitted): Declare.
+ * linux-nat.c (linux_nat_async_enabled)
+ (linux_nat_async_permitted, set_maintenance_linux_async_permitted)
+ (show_maintenance_linux_async_permitted): Remove.
+ (sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
+ (get_pending_events, linux_nat_async): Use target_async_permitted.
+ (linux_nat_set_async_mode): Remove, moving the only used bits
+ into...
+ (linux_nat_setup_async): This.
+ (_initialize_linux_nat): Do not register 'maint set linux-async'.
+ Use linux_nat_setup_async.
+ * remote.c (remote_async_permitted, remote_async_permitted_set)
+ (set_maintenance_remote_async_permitted)
+ (show_maintenance_remote_async_permitted): Remove.
+ (remote_open_1, remote_terminal_inferior, remote_can_async_p)
+ (remote_is_async_p): Use target_async_permitted.
+ (_initialize_remote): Don't register 'main set remote-async'.
+ * mi/mi-cmds.c (mi_cmds): Register -list-target-features.
+ * mi/mi-cmds.h (mi_cmd_list_target_features): New.
+ * mi/mi-main.c (mi_cmd_list_target_features): New.
+
+2008-08-19 Vladimir Prus <vladimir@codesourcery.com>
+
+ * target.c (maybe_kill_then_attach)
+ (maybe_kill_then_create_inferior): Remove.
+ (update_current_target): Do not default to_attach,
+ to_create_inferiour, to_is_async_p.
+
+2008-08-19 Paul N. Hilfinger <hilfinger@adacore.com>
+
+ Changes for supporting boolean types in debugging data.
+ * ada-lang.c (discrete_type_high_bound,discrete_type_low_bound): Change
+ API to return LONGEST values rather than struct values.
+ (ada_evaluate_subexp): Change to use new API of discrete_type_low_bound
+ and discrete_type_high_bound.
+ (to_fixed_range_type): Create a range type in cases where
+ argument is base type and its limits are representable as ints.
+ (ada_is_modular_type): Correct so that base type must be integral.
+ * ada-lex.l (TRUEKEYWORD,FALSEKEYWORD): Make 'true' and 'false'
+ keywords when they appear alone, since we are phasing out
+ direct representation of these identifiers in debugging data.
+ * ada-exp.y: Define 'true' and 'false' as primaries.
+ (type_boolean): New function.
+ (type_int,type_long,type_long_long,type_floattype_double)
+ (type_long_double): Remove uses of current_gdbarch for consistency
+ with type_boolean.
+ (write_int): Change comment to indicate that it might write boolean
+ constant as well.
+ * ada-typeprint.c (ada_print_type): Print '(false, true)' for boolean
+ type, since will no longer be represented as enumerated type in
+ debugging data.
+ * ada-valprint.c (print_optional_low_bound): Handle boolean case
+ as well.
+ * NEWS: Note support boolean types.
+
+2008-08-18 Pedro Alves <pedro@codesourcery.com>
+
+ * bsd-uthread.c (bsd_uthread_close): New.
+ (bsd_uthread_deactivate): Don't cleanup here, just unpush the
+ target.
+ (bsd_uthread_solib_loaded): Fix typo.
+ (bsd_uthread_target): Register bsd_uthread_close.
+
+2008-08-18 Pedro Alves <pedro@codesourcery.com>
+
+ * corelow.c (core_open): Assume there was no upper layer left
+ behind from a previous inferior.
+ * target.c (pop_all_targets): Rename to ...
+ (pop_all_targets_above): ... this. Add a target stratum
+ parameter. Use it instead of hardcoding the dummy_stratum.
+ (pop_all_targets): New, defer to pop_all_targets_above.
+ (target_preopen): Use pop_all_targets_above.
+ * target.h (pop_all_targets_above): Declare.
+
+2008-08-18 Pedro Alves <pedro@codesourcery.com>
+
+ * gdbthread.h (thread_change_ptid): Declare.
+ * infrun.c (infrun_thread_ptid_changed): New.
+ (_initialize_infrun): Attach infrun_thread_ptid_changed to the
+ thread_ptid_changed observer.
+ * regcache.c (regcache_thread_ptid_changed): New.
+ (_initialize_regcache): Attach regcache_thread_ptid_changed to the
+ thread_ptid_changed observer.
+ * thread.c (thread_change_ptid): New.
+
+2008-08-18 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (reread_symbols): Update.
+ * solib-sunos.c (allocate_rt_common_objfile): Update.
+ * objfiles.c (allocate_objfile): Update.
+ * objfiles.h (struct objfile) <md, mmfd, deprecated_obj_private>:
+ Remove.
+
+2008-08-18 Tom Tromey <tromey@redhat.com>
+
+ * gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's
+ obstack.
+
+2008-08-18 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * rs6000-tdep.c (struct rs6000_framedata): Add gpr_mask, used_bl,
+ lr_register.
+ (rs6000_in_function_epilogue_p): Check for bctr.
+ (skip_prologue): Initialize lr_register. Set lr_reg to a register
+ number. Set gpr_mask and used_bl. Continue scanning while some
+ expected registers are not saved. Set lr_register if LR is not
+ stored.
+ (rs6000_frame_cache): Handle gpr_mask and lr_register.
+
+2008-08-17 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/1535:
+ * breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): New macros.
+ (ep_find_event_name_end): Remove.
+ (catch_fork_temporary, catch_vfork_temporary,
+ catch_fork_permanent, catch_vfork_permanent): New constants.
+ (catch_vfork, catch_fork): Remove.
+ (catch_fork_command_1): Add 'command' argument. Remove
+ 'fork_kind' and 'tempflag'. Handle NULL 'arg'. Update switch for
+ all cases.
+ (catch_exec_command_1): Add 'command' argument; remove
+ 'tempflag'. Handle NULL 'arg'.
+ (catch_load_command_1): Likewise.
+ (catch_unload_command_1): Likewise.
+ (catch_ada_exception_command): Likewise.
+ (catch_assert_command): Likewise.
+ (catch_catch_command): New function.
+ (catch_throw_command): Likewise.
+ (catch_command_1): Remove.
+ (catch_command): Just call error.
+ (tcatch_command): Likewise.
+ (catch_cmdlist): New global.
+ (tcatch_cmdlist): Likewise.
+ (add_catch_command): New function.
+ (_initialize_breakpoint): Create "catch" and "tcatch" as prefix
+ commands. Create all catch sub-commands.
+
+2008-08-17 Pedro Alves <pedro@codesourcery.com>
+
+ * gdbthread.h: Add comments.
+ * stack.c (get_selected_block): Return 0 on an exited thread.
+ * top.c (execute_command): Check for is_stopped, not !is_running.
+ * event-top.c (command_handler): Likewise.
+
+2008-08-16 Pedro Alves <pedro@codesourcery.com>
+
+ * mi/mi-main.c (mi_cmd_exec_next, mi_cmd_exec_next_instruction)
+ (mi_cmd_exec_step, mi_cmd_exec_step_instruction)
+ (mi_cmd_exec_finish): Remove "return".
+
+2008-08-16 Pedro Alves <pedro@codesourcery.com>
+
+ * target.h (pop_all_targets): Declare.
+ * target.c (pop_all_targets): New.
+ * top.c (quit_target): Pop all targets instead of just closing the
+ current.
+
+2008-08-16 Vladimir Prus <vladimir@codesourcery.com>
+ Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * cli-script.c (read_next_line): Add parse_commands argument.
+ (recurse_read_control_structure): Adapt to new read_next_line
+ signature.
+ (read_command_lines): Add parse_commands argument.
+ (define_command): Adapt to new read_command_lines signature.
+ (document_command): Likewise.
+ * breakpoint.c (commands_command): Likewise.
+ * defs.h (read_command_lines): Adjust function prototype.
+
+2008-08-16 Paul N. Hilfinger <hilfinger@adacore.com>
+
+ * ada-lang.c (pos_atr): Account for the possibility that the
+ argument may be a reference.
+
+2008-08-16 Paul N. Hilfinger <hilfingr@adacore.com>
+
+ * xcoffread.c (scan_xcoff_symtab): Do not include global symbols
+ ('F' format) for @FIX names generated by the loader, retaining only
+ the minimal symbols (and no partial symbol tables) for these names.
+ Fixes warning messages about symbols that are found in partial
+ symbol tables, but not full symbol tables.
+
+2008-08-16 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (fetch_inferior_event): Only call normal_stop if not
+ stopping quietly.
+
+2008-08-15 Luis Machado <luisgpm@br.ibm.com>
+
+ * rs6000-tdep: Include "features/rs6000/powerpc-vsx32.c".
+ Include "features/rs6000/powerpc-vsx64.c".
+ (ppc_supply_vsxregset): New function.
+ (ppc_collect_vsxregset): New function.
+ (IS_VSX_PSEUDOREG): New macro.
+ (IS_EFP_PSEUDOREG): New macro.
+ (vsx_register_p): New function.
+ (ppc_vsx_support_p): New function.
+ (rs6000_builtin_type_vec128): New function.
+ (rs6000_register_name): Hide upper halves of vs0~vs31. Return
+ correct names for VSX registers and EFPR registers.
+ (rs6000_pseudo_register_type): Return correct types for VSX
+ and EFPR registers.
+ (rs6000_pseudo_register_reggroup_p): Return correct group for
+ VSX and EFPR registers.
+ (ppc_pseudo_register_read): Rename to dfp_pseudo_register_read.
+ (ppc_pseudo_register_write): Rename to dfp_pseudo_register_write.
+ (vsx_pseudo_register_read): New function.
+ (vsx_pseudo_register_write): New function.
+ (efpr_pseudo_register_read): New function.
+ (efpr_pseudo_register_write): New function.
+ (rs6000_pseudo_register_read): Call new VSX and EFPR read functions.
+ (rs6000_pseudo_register_write): Call new VSX and EFPR write functions.
+ (rs6000_gdbarch_init): Declare have_vsx.
+ Initialize new upper half VSX registers.
+ Initialize VSX-related and EFPR-related pseudo-registers variables.
+ Adjust the number of pseudo registers accordingly.
+
+ * ppc-linux-nat.c: Define PTRACE_GETVSXREGS, PTRACE_SETVSXREGS
+ and SIZEOF_VSRREGS.
+ (gdb_vsxregset_t): New type.
+ (have_ptrace_getsetvsxregs): New variable.
+ (fetch_vsx_register): New function.
+ (fetch_register): Handle VSX registers.
+ (fetch_vsx_registers): New function.
+ (fetch_ppc_registers): Handle VSX registers.
+ (store_ppc_registers): Handle VSX registers.
+ (store_vsx_register): New function.
+ (store_register): Handle VSX registers.
+ (store_vsx_registers): New function.
+ (ppc_linux_read_description): Handle VSX-enabled inferiors.
+ (gdb_vsxregset_t): New type.
+ (supply_vsxregset): New function.
+ (fill_vsxregset): New function.
+
+ * ppc-tdep.h (vsx_register_p): New prototype.
+ (vsx_support_p): New prototype.
+ (ppc_vsr0_regnum): New variable.
+ (ppc_vsr0_upper_regnum): Likewise.
+ (ppc_efpr0_regnum): Likewise.
+ (ppc_builtin_type_vec128): New type.
+ (ppc_num_vsrs): New constant.
+ (ppc_num_vshrs): New constant.
+ (ppc_num_efprs): Likewise.
+ Define POWERPC_VEC_VSX PPC_VSR0_UPPER_REGNUM and PPC_VSR31_UPPER_REGNUM.
+ (ppc_supply_vsxregset): New prototype.
+ (ppc_collect_vsxregset): New prototype.
+
+ * ppc-linux-tdep.c: Include "features/rs6000/powerpc-vsx32l.c"
+ Include "features/rs6000/powerpc-vsx64l.c".
+ (_initialize_ppc_linux_tdep): Initialize VSX-enabled targets.
+ (ppc_linux_regset_sections): Add new ".reg-ppc-vsx" field.
+ (ppc32_linux_vsxregset): New 32-bit VSX-enabled regset.
+ (ppc_linux_regset_from_core_section): Handle VSX core section.
+ (ppc_linux_core_read_description): Support VSX-enabled core files.
+
+ * ppc-linux-tdep.h: Declare *tdesc_powerpc_vsx32l
+ Declare tdesc_powerpc_vsx64l
+
+ * corelow.c (get_core_register_section): Support VSX-enabled
+ core files.
+
+ * features/rs6000/power-vsx.xml: New VSX descriptions.
+ * features/rs6000/powerpc-vsx32.xml: New file.
+ * features/rs6000/powerpc-vsx32l.xml: New file.
+ * features/rs6000/powerpc-vsx64.xml: New file.
+ * features/rs6000/powerpc-vsx64l.xml: New file.
+ * features/rs6000/powerpc-vsx32.c: New file (generated).
+ * features/rs6000/powerpc-vsx32l.c: New file (generated).
+ * features/rs6000/powerpc-vsx64.c: New file (generated).
+ * features/rs6000/powerpc-vsx64l.c: New file (generated).
+ * features/Makefile: Updated with new descriptions.
+ * regformats/rs6000/powerpc-vsx32l.dat: New file (generated).
+ * regformats/rs6000/powerpc-vsx64l.dat: New file (generated).
+
+2008-08-15 Vladimir Prus <vladimir@codesourcery.com>
+
+ * ia64-linux.nat (_initialize_ia64_linux_nat): Don't
+ call linux_target twice.
+
+2008-08-14 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * nto-tdep.c (lm_info): Updated struct lm_info definition from
+ solib-svr4.c
+ (LM_ADDR): Use l_addr if available; if not, use link map and set
+ l_addr.
+
+2008-08-14 Tom Tromey <tromey@redhat.com>
+
+ * macrocmd.c (macro_define_command): Check for NULL argument.
+ (macro_undef_command): Likewise.
+
+2008-08-14 Pedro Alves <pedro@codesourcery.com>
+
+ * infcmd.c (continue_1): Add an ERROR_NO_INFERIOR call.
+
+2008-08-13 Pedro Alves <pedro@codesourcery.com>
+
+ * breakpoint.c (always_inserted_auto, always_inserted_on)
+ (always_inserted_off, always_inserted_enums): New.
+ (always_inserted_mode): Change type to char* and point to
+ always_inserted_auto.
+ (show_always_inserted_mode): In auto mode, also show the current
+ effect of the option.
+ (breakpoints_always_inserted_mode): Adjust for the new auto mode.
+ (_initialize_breakpoint): Make the "set breakpoints
+ always-inserted" command an enum command. Extend help to describe
+ the auto mode.
+
+2008-08-13 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-tdep.c (info_spu_dma_command): Respect TSQV (tag status
+ query valid) bit. Ignore bits outside the condition field.
+ (info_spu_proxydma_command): Ignore bits outside the field.
+
+2008-08-12 Michael Snyder <msnyder@vmware.com>
+
+ * MAINTAINERS: Update my email address.
+
+2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ppc-linux-nat.c (ppc_linux_get_hwcap): Really get AT_HWCAP.
+
+2008-08-12 Pedro Alves <pedro@codesourcery.com>
+
+ Add no-ack mode to the remote protocol --- optionally stop ACKing
+ packets and responses when we have a reliable communication
+ medium.
+
+ Based on Apple's GDB, by Jason Molenda <jmolenda@apple.com>
+
+ * remote.c (struct remote_state): Add noack_mode field.
+ (PACKET_QStartNoAckMode): New.
+ (remote_start_remote): Don't any outstanding packet here.
+ (remote_open_1): Clear noack_mode. Ack any outstanding packet
+ here. Activate noack mode if requested.
+ (remote_protocol_features): Add QStartNoAckMode.
+ (remote_open_1):
+ (putpkt_binary): Don't send ack in noack mode.
+ (read_frame): Don't recompute the checksum in noack mode.
+ (getpkt_sane): Skip sending ack if in noack mode.
+ (_initialize_remote): Add set/show remote noack mode.
+ * NEWS: Note the new features.
+
+2008-08-11 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-tdep.c (BL_MASK, BL_INSTRUCTION, BL_DISPLACEMENT_MASK):
+ New macros.
+ (rs6000_skip_main_prologue): New function.
+ (rs6000_gdb_arch_init): Register rs6000_skip_main_prologue.
+
+2008-08-11 Sandra Loosemore <sandra@codesourcery.com>
+
+ * MAINTAINERS (Write After Approval): Add self.
+
+2008-08-11 Stan Shebs <stan@codesourcery.com>
+
+ ARM BE8 support.
+ * disasm.c (gdb_disassemble_info): Set endian_code.
+ * gdbarch.sh (gdbarch_info): New field byte_order_for_code.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * arch-utils.c (initialize_current_architecture): Set the
+ default byte_order_for_code.
+ (gdbarch_info_init): Ditto.
+ (gdbarch_info_fill): Ditto.
+ * arm-tdep.c (SWAP_INT, SWAP_SHORT): New macros.
+ (thumb_analyze_prologue): Swap halfword if code endianness is
+ different from general endianness.
+ (arm_skip_prologue): Similarly.
+ (arm_scan_prologue): Ditto.
+ (thumb_get_next_pc): Ditto.
+ (arm_get_next_pc): Ditto.
+ (arm_gdbarch_init): Set byte_order_for_code from BE8 flag,
+ choose correct endianness for breakpoints.
+
+2008-08-10 Pedro Alves <pedro@codesourcery.com>
+
+ * bsd-kvm.c: Include "gdbthread.h".
+ (bsd_kvm_ptid): New.
+ (bsd_kvm_open): Add a main thread.
+ (bsd_kvm_close): Delete it.
+ (bsd_kvm_thread_alive): New.
+ (bsd_kvm_pid_to_str): New.
+ (bsd_kvm_add_target): Register bsd_kvm_thread_alive and
+ bsd_kvm_pid_to_str.
+ (bsd_kvm_add_target): Initialize bsd_kvm_ptid.
+
+2008-08-09 Pedro Alves <pedro@codesourcery.com>
+
+ * buildsym.c (start_subfile): Properly cast sentinel in concat
+ call.
+ * cp-name-parser.y: Include "config.h".
+ * xml-tdesc.c (fetch_xml_from_file): Properly cast sentinel in
+ concat call.
+ * gdb_select.h: Include sys/time.h if sys/select.h is not
+ available.
+
+2008-08-09 Pedro Alves <pedro@codesourcery.com>
+
+ * go32-nat.c: Include "gdbthread.h".
+ (go32_stop, go32_kill_inferior): Delete the main thread.
+ (go32_create_inferior): Add it.
+ (go32_thread_alive, go32_pid_to_str): New.
+ (init_go32_ops): Register go32_thread_alive and go32_pid_to_str.
+
+2008-08-09 Pedro Alves <pedro@codesourcery.com>
+
+ * go32-nat.c (fetch_register, store_register): Pass the regcache
+ gdbarch to i386_fp_regnum_p and i386_fpc_regnum_p.
+ (go32_xfer_memory): Change type of myaddr parameter to gdb_byte.
+ (struct seg_descr, struct seg_descr): pack the whole struct
+ instead of each member individually.
+
+2008-08-09 Andreas Schwab <schwab@suse.de>
+
+ * python/python.c (_initialize_python): Use unabbreviated commands
+ in prefix name.
+
+2008-08-09 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.in (stamp-h): Also create .deps.
+
+2008-08-09 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in (generated_files): Add GNULIB_H.
+
+2008-08-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * solib-pa64.c (pa64_solib_create_inferior_hook): Don't set
+ DT_HP_DEBUG_PRIVATE. Add warning if DT_HP_DEBUG_PRIVATE is not set.
+ Revise comment.
+ (pa64_current_sos): Remove map private warning warning.
+ * solib-som.c: Include string.h and sys/utsname.h.
+ (get_hpux_major_release): New function.
+ (som_solib_create_inferior_hook): Read dynamic linker header. Warn
+ about shared library private mapping on HP-UX 11 and later. Only force
+ private mapping of shared libraries on HP-UX 10 and earlier.
+ (link_map_start): Delete warning.
+
+2008-08-09 Xuepeng Guo <xuepeng.guo@intel.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+ Mark Kettenis <kettenis@gnu.org>
+
+ * amd64-tdep.c (amd64_frame_cache): Add saved_sp_reg.
+ (amd64_init_frame_cache): Initialize saved_sp_reg.
+ (amd64_analyze_stack_align): New.
+ (amd64_analyze_prologue): Call it.
+ (amd64_frame_cache): Use saved_sp_reg if it is invalid. Don't set
+ %rip to 8 when halfway aligning the stack.
+
+ * amd64-tdep.h (amd64_regnum): Add AMD64_R9_REGNUM to
+ AMD64_R14_REGNUM.
+
+ * i386-tdep.c (i386_frame_cache): Remove stack_align. Add
+ saved_sp_reg.
+ (i386_alloc_frame_cache): Remove stack_align. Initialize
+ saved_sp_reg to -1.
+ (i386_analyze_stack_align): Rewrite.
+ (i386_frame_cache): Use saved_sp_reg if it is valid.
+
+2008-08-09 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * target.c: Include "solib.h".
+ (target_pre_inferior): Call no_shared_libraries.
+ * infcmd.c (run_command_1): Do not call objfile_purge_solibs
+ or clear_solib.
+ (attach_command): Do not call clear_solib.
+
+2008-08-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386obsd-nat.c (i386obsd_supply_pcb): Supply the right bytes for
+ the %eip register.
+
+2008-08-08 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in (python.o): Remove dependencies. Use COMPILE and
+ POSTCOMPILE.
+ (python-utils.o): Likewise.
+
+2008-08-08 Andreas Schwab <schwab@suse.de>
+
+ * corefile.c (_initialize_core): Remove spurious paren from set
+ gnutarget doc string.
+
+2008-08-08 Luis Machado <luisgpm@br.ibm.com>
+
+ * ppc-linux-nat.c: Include "auxv.h" and "elf/common.h".
+ Define PPC_FEATURE_BOOKE.
+ (ppc_linux_get_hwcap): New function.
+ (ppc_linux_region_ok_for_hw_watchpoint): Handle PowerPC 440
+ 4-bytes alignment restrictions.
+ (ppc_linux_insert_watchpoint): Handle PowerPC 440-specific
+ positioning of the read/write flags.
+ (ppc_linux_watchpoint_addr_within_range): Handle PowerPC 440
+ 4-bytes alignment.
+
+2008-08-08 Pedro Alves <pedro@codesourcery.com>
+
+ Use ptid_t.tid to store thread ids instead of ptid_t.pid.
+
+ * win32-nat.c (win32_add_thread): Change thread argument type to
+ ptid_t. Adjust.
+ (win32_add_thread): Adjust.
+ (win32_delete_thread): Change thread argument type to ptid_t.
+ Adjust.
+ (win32_fetch_inferior_registers, win32_store_inferior_registers)
+ (win32_resume, get_win32_debug_event, get_win32_debug_event)
+ (win32_wait, win32_pid_to_exec_file, win32_pid_to_str): Adjust.
+ (init_win32_ops): Put to_magic last.
+ (win32_win32_thread_alive): Adjust.
+
+2008-08-08 Pedro Alves <pedro@codesourcery.com>
+
+ * remote-m32r-sdi.c (m32r_thread_alive, m32r_pid_to_str): New.
+ (init_m32r_ops): Register m32r_thread_alive and m32r_pid_to_str.
+
+2008-08-08 Pedro Alves <pedro@codesourcery.com>
+
+ * remote-m32r-sdi.c: Include "gdbthread.h".
+ (remote_m32r_ptid): New.
+ (m32r_close): Delete the main thread.
+ (m32r_resume): Set inferior_ptid toA remote_m32r_ptid. Add the
+ main thread.
+ (m32r_kill, m32r_load, sdireset_command): Delete the main thread.
+ (_initialize_remote_m32r): Initialize remote_m32r_ptid.
+
+2008-08-07 Tom Tromey <tromey@redhat.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * aclocal.m4, configure: Rebuild.
+ * configure.in: Call ZW_CREATE_DEPDIR,
+ ZW_PROG_COMPILER_DEPENDENCIES, AC_PROG_MAKE_SET.
+ (MAKE, GMAKE): New substs.
+ * acinclude.m4: Include depstand.m4.
+ * Makefile.in (DEPMODE, DEPDIR, COMPILE.post, COMPILE.pre,
+ COMPILE, POSTCOMPILE, depcomp): New variables.
+ Remove all _h variables.
+ Remove many .o targets.
+ ($(srcdir)/copying.c): avoid backslash-newline after comment
+ sign (@maintainer_mode_true@).
+ (HFILES_NO_SRCDIR): Regenerate.
+ (generated_files): New variable.
+ (all_gdbtk_cflags): Likewise.
+ (.c.o): Rewrote.
+ (init.o, version.o, copying.o): Remove.
+ (distclean): Remove DEPDIR.
+ (test-cp-name-parser.o, hpux-thread.o, main.o, monitor.o,
+ printcmd.o, procfs.o, v850ice.o): Rewrite.
+ (cli-cmds.o, cli-decode.o, cli-dump.o, cli-interp.o, cli-logging.o,
+ cli-script.o, cli-setshow.o, cli-utils.o): Likewise.
+ (gdbtk.o, gdbtk-bp.o, gdbtk-cmds.o, gdbtk-hooks.o, gdbtk-interp.o,
+ gdbtk-main.o, gdbtk-register.o, gdbtk-stack.o, gdbtk-varobj.o,
+ gdbtk-wrapper.o): Likewise.
+ (mi-cmd-break.o, mi-cmd-disas.o, mi-cmd-env.o, mi-cmd-file.o,
+ mi-cmds.o, mi-cmd-stack.o, mi-cmd-target.o, mi-cmd-var.o,
+ mi-console.o, mi-getopt.o, mi-interp.o, mi-main.o, mi-out.o,
+ mi-parse.o, mi-symbol-cmds.o, mi-common.o, signals.o, tui.o,
+ tui-command.o, tui-data.o, tui-disasm.o, tui-file.o, tui-hooks.o,
+ tui-interp.o, tui-io.o, tui-layout.o, tui-main.o, tui-out.o,
+ tui-regs.o, tui-source.o, tui-stack.o, tui-win.o, tui-windata.o,
+ tui-wingeneral.o, tui-winsource.o): Likewise.
+ (all_object_files): New variable.
+ ($(all_object_files)): New target.
+ Include dependency files, when using GNU Make.
+
+2008-08-07 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-tdep.c (info_spu_dma_cmdlist): Only show entries with
+ the valid bit set. Ensure display order respects partial
+ order defined by dependency bits.
+
+2008-08-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * solib-pa64.c (read_dld_descriptor): Return zero if load map is not
+ setup.
+
+2008-08-06 Mark Kettenis <kettenis@gnu.org>
+
+ * i386obsd-nat.c (i386obsd_supply_pcb): Adjust for changes in
+ OpenBSD 4.3.
+
+2008-08-06 Vladimir Prus <vladimir@codesourcery.com>
+ Tom Tromey <tromey@redhat.com>
+ Thiago Jung Bauermann <bauerman@br.ibm.com>
+ Doug Evans <dje@google.com>
+
+ * Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
+ SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
+ PYTHON_CFLAGS): New.
+ (python_h, python_internal_h): New.
+ (cli-script.o): Depend on python.h
+ (python.o, python-utils.o): New.
+ * cli/cli-script.c (print_command_lines): Handle python_control.
+ (execute_control_command): Handle python_control.
+ (execute_control_command_untraced): New function.
+ (while_command): Call execute_control_command_untraced.
+ (if_command): Likewise.
+ (get_command_line): Remove static attribute.
+ (read_next_line): Handle "python".
+ (recurse_read_control_structure): Handle python_control.
+ (read_command_lines): Handle python_control.
+ Include python.h.
+ * cli/cli-script.h (get_command_line): Add prototype.
+ (execute_control_command_untraced): Likewise.
+ * configure.ac: Add --with-python.
+ * defs.h (enum command_control_type) <python_control>: New
+ constant.
+ * python/python-internal.h: New file.
+ * python/python.c: New file.
+ * python/python.h: New file.
+ * python/python-utils.c: New file.
+ * NEWS: Mention Python scripting support and its new commands.
+
+2008-08-06 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-tdep.c (spu_gdbarch_init): Call set_gdbarch_frame_red_zone_size.
+
+2008-08-06 Phil Muldoon <pmuldoon@redhat.com>
+
+ * MAINTAINERS (Write After Approval): Add self.
+
+2008-08-06 Phil Muldoon <pmuldoon@redhat.com>
+
+ * breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled.
+ (insert_breakpoint_locations): Likewise.
+
+2008-08-05 Phil Muldoon <pmuldoon@redhat.com>
+
+ * breakpoint.c (create_longjmp_breakpoint): Remove unused struct
+ breakpoint.
+ (set_longjmp_breakpoint): Likewise.
+
+2008-08-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR build/2490
+ * solib-pa64.c: Only compile if both HAVE_ELF_HP_H and __LP64__ are
+ defined.
+
+2008-08-05 Tom Tromey <tromey@redhat.com>
+
+ * bcache.c (deprecated_bcache_added): Initialize obstack.
+ (bcache_xmalloc): Don't initialize obstack.
+ (bcache_xfree): Conditionally free obstack.
+ (bcache_memory_used): Update.
+
+2008-08-05 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (add_psymbol_to_bcache): Return a const pointer. Use
+ bcache_full.
+ (append_psymbol_to_list): Accept a const pointer.
+ (add_psymbol_to_list): Fix const correctness.
+ * bcache.h: (deprecated_bcache_added, deprecated_bcache): Remove.
+ (bcache_full): Declare.
+ * bcache.c (bcache_data, deprecated_bcache): Remove.
+ (bcache): Use bcache_full.
+ (bcache_full): Rename from deprecated_bcache_added. Change return
+ type.
+
+2008-08-04 Stan Shebs <stan@codesourcery.com>
+
+ * solib-svr4.c (BKPT_AT_SYMBOL): Remove, always defined.
+ (bkpt_names): Remove SOLIB_BKPT_NAME, never defined.
+ (enable_break): Remove test of BKPT_AT_SYMBOL.
+
+2008-08-02 Keith Seitz <keiths@redhat.com>
+
+ * acinclude.m4: Include ../config/tcl.m4 to pick up
+ standard Tcl configury bits.
+ Remove all Tcl, Tk, Itcl, Itk, etc definitions.
+ * configure.ac: Don't check if ../itcl exists when building
+ gdbtk. It could be installed.
+ Rewrite gdbtk configury to allow for using system-supplied
+ Tcl and Tk. Gdbtk no longer requires build-time access to
+ itcl and itk.
+ * Makefile.in: Remove everything related to itcl and itk.
+ Rewrite the Tcl bits for gdbtk to correspond to rewrite of
+ configure.ac.
+ Remove v850ice.o build rule.
+ (ALL_TCL_CFLAGS): New convenience defintion. Change all
+ gdbtk sources to use it.
+ * configure: Regenerate.
+
+2008-07-31 Stan Shebs <stan@codesourcery.com>
+
+ * coffread.c (coff_symtab_read): Remove FUNCTION_EPILOGUE_SIZE.
+
+2008-07-30 Stan Shebs <stan@codesourcery.com>
+
+ * objfiles.c (TARGET_KEEP_SECTION): Remove.
+ (add_to_objfile_sections): Remove use.
+
+2008-07-29 Tom Tromey <tromey@redhat.com>
+
+ * cli/cli-decode.c (lookup_cmd_1): Use memcpy.
+ (lookup_cmd_composition): Likewise.
+
+2008-07-29 Tom Tromey <tromey@redhat.com>
+
+ * cli/cli-cmds.c (edit_command): Remove unused variables. Delete
+ dead code. Fix indentation.
+
+2008-07-29 Stan Shebs <stan@codesourcery.com>
+
+ * main.c (captured_main): Remove long-unused #if 0 blocks.
+
+2008-07-28 Tom Tromey <tromey@redhat.com>
+
+ * annotate.h (deprecated_annotate_starting_hook): Remove.
+ (deprecated_annotate_stopped_hook): Remove.
+ (deprecated_annotate_exited_hook): Remove.
+ * Makefile.in (annotate.o): Depend on observer_h.
+ * top.c (deprecated_delete_breakpoint_hook): Remove.
+ (deprecated_create_breakpoint_hook): Likewise.
+ (deprecated_modify_breakpoint_hook): Likewise.
+ * interps.c (clear_interpreter_hooks): Update for removed hooks.
+ * breakpoint.c (mention): Don't call removed hook.
+ (delete_breakpoint): Likewise.
+ (disable_breakpoint): Likewise.
+ (do_enable_breakpoint): Likewise.
+ * annotate.c: Include observer.h.
+ (breakpoint_changed): Change type of argument.
+ (_initialize_annotate): Register observers.
+ (deprecated_annotate_starting_hook): Remove.
+ (deprecated_annotate_stopped_hook): Remove.
+ (deprecated_annotate_exited_hook): Remove.
+ (annotate_starting): Update for hook removal.
+ (annotate_stopped): Likewise.
+ (annotate_exited): Likewise.
+ * defs.h (deprecated_delete_breakpoint_hook): Remove.
+ (deprecated_create_breakpoint_hook): Likewise.
+ (deprecated_modify_breakpoint_hook): Likewise.
+
+2008-07-28 Tom Tromey <tromey@redhat.com>
+
+ * main.c (captured_main): Don't use BEFORE_MAIN_LOOP_HOOK.
+
+2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.ac: Check for the GNU/Linux ptrace signature.
+ * configure: Regenerated.
+
+2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * linux-nat.c (resume_callback): Add more debugging output.
+ (linux_nat_has_pending_sigint): New function, based on
+ linux_nat_has_pending.
+ (set_ignore_sigint, maybe_clear_ignore_sigint): New functions.
+ (stop_wait_callback): Remove flush_mask handling. Honor
+ ignore_sigint. Call maybe_clear_ignore_sigint. Pass NULL
+ to recursive calls.
+ (linux_nat_has_pending, flush_callback): Remove.
+ (linux_nat_filter_event): Check for ignore_sigint.
+ (linux_nat_wait): Remove flush_mask support and call to
+ flush_callback. Use set_ignore_sigint and maybe_clear_ignore_sigint.
+ * linux-nat.h (struct lwp_info): Add ignore_sigint field.
+
+2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * linux-nat.c (count_events_callback, select_event_lwp_callback): Only
+ report events from resumed threads.
+
+2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * mips-linux-tdep.c (mips_linux_syscall_next_pc): New function.
+ (mips_linux_init_abi): Set tdep->syscall_next_pc.
+ * mips-tdep.c (enum mips_fpu_type, struct gdbarch_tdep): Move to
+ mips-tdep.h.
+ (mips32_next_pc): Handle the syscall instruction.
+ * mips-tdep.h (enum mips_fpu_type, struct gdbarch_tdep): New,
+ from mips-tdep.c. Add syscall_next_pc to gdbarch_tdep.
+
+2008-07-26 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/1158:
+ * valops.c (value_struct_elt): Treat function-valued field as a
+ static method.
+
+2008-07-26 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/1136:
+ * macroexp.c (get_punctuator) <punctuators>: Rearrange to put
+ longer tokens first.
+
+2008-07-26 Vladimir Prus <vladimir@codesourcery.com>
+
+ Kill cmd_async_ok.
+ * cli/cli-decode.h (CMD_ASYNC_OK, set_cmd_async_ok)
+ (get_cmd_async_ok): Remove.
+ * cli/cli-decode.c (set_cmd_async_ok, get_cmd_async_ok): Remove.
+ * cli/cli-cmds.c (init_cli_cmds): Don't use set_cmd_async_ok.
+ * infcmd.c (_initialize_infcmd): Likewise.
+ * thread.c (_initialize_thread): Likewise.
+
+2008-07-25 Joseph Myers <joseph@codesourcery.com>
+
+ * mips-tdep.c (mips_n32n64_push_dummy_call): Handle passing
+ 128-bit long doubles in even-odd pairs of FPRs. Do not
+ right-align float arguments for big-endian.
+ (mips_n32n64_return_value): Apply return value convention for
+ structs containing one or two floating-point values to soft-float
+ as well as hard-float. Handle 128-bit long doubles in such
+ structs.
+ (mips_o32_push_dummy_call): Only skip one integer register for a
+ float argument passed in an FPR.
+
+2008-07-25 Tom Tromey <tromey@redhat.com>
+
+ * tui/tui-hooks.c: Include observer.h.
+ (tui_event_default, tui_old_event_hooks, tui_event_hooks):
+ Remove.
+ (tui_bp_created_observer, tui_bp_deleted_observer,
+ tui_bp_modified_observer): New globals.
+ (tui_install_hooks): Use observers, not events.
+ (tui_remove_hooks): Likewise.
+ * mi/mi-cmd-break.c: Include observer.h, not gdb-events.h.
+ (mi_breakpoint_observers_installed, mi_can_breakpoint_notify): New
+ globals.
+ (breakpoint_notify): Check mi_can_breakpoint_notify.
+ (breakpoint_hooks): Remove.
+ (mi_cmd_break_insert): Attach observers. Don't use events.
+ * tracepoint.c: Include observer.h, not gdb-events.h.
+ (tracepoint_operation, trace_pass_command): Notify observer.
+ * interps.c: Don't include gdb-events.h.
+ (clear_interpreter_hooks): Don't call clear_gdb_event_hooks.
+ * gdbarch.c: Rebuild.
+ * gdbarch.sh: Emit include for observer.h, not gdb-events.h.
+ (deprecated_current_gdbarch_select_hack): Notify observer.
+ * breakpoint.h: Don't include gdb-events.h.
+ * breakpoint.c: Don't include gdb-events.h.
+ (condition_command): Notify observer.
+ (commands_command): Likewise.
+ (commands_from_control_command): Likewise.
+ (mention, delete_breakpoint, set_ignore_count): Likewise.
+ (disable_breakpoint, do_enable_breakpoint): Likewise.
+ * Makefile.in (gdb_events_h): Remove.
+ (breakpoint_h): Update.
+ (COMMON_OBS): Remove gdb-events.o.
+ (gdb-events.o): Remove.
+ (breakpoint.o, gdbarch.o, interps.o, tracepoint.o, gdbtk-bp.o,
+ gdbtk-hooks.o, mi-cmd-break.o, tui-hooks.o): Update.
+ * gdb-events.c: Remove.
+ * gdb-events.h: Remove.
+ * gdb-events.sh: Remove.
+
+2008-07-24 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_threads_extra_info): Don't query the remote
+ server about info on the internally added main thread.
+
+2008-07-24 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * nto-procfs.c (procfs_attach): Populate initial thread list.
+ (procfs_wait): Return new pid, built from the inferior status.
+
+2008-07-23 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * configure.ac (CONFIG_INITS): Delete long obsoleted variable.
+ * configure: Regenerate.
+
+2008-07-23 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * nto-procfs.c (procfs_xfer_memory): Changed signature.
+ (procfs_resume): Workaround for dereferencing type-punned pointer
+ warning.
+ * nto-tdep.c (nto_parse_redirection): Change signature to be const
+ correct.
+ * nto-tdep.h (nto_parse_redirection): Likewise.
+
+2008-07-21 Stan Shebs <stan@codesourcery.com>
+
+ Scrub remnants of IN_SOLIB_DYNSYM_RESOLVE_CODE.
+ * gdbarch.sh: Adjust comment to refer to
+ in_solib_dynsym_resolve_code().
+ * gdbarch.h, gdbarch.c: Update.
+ * solib-osf.c: Ditto.
+ * infrun.c: Ditto.
+ (handle_inferior_event): Use in_solib_dynsym_resolve_code
+ unconditionally.
+ * config/mips/nm-irix5.h: Remove undef of
+ IN_SOLIB_DYNSYM_RESOLVE_CODE.
+
+2008-07-21 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (reread_symbols): Don't pass argument to observer.
+ * exec.c (exec_file_attach): Don't pass argument to observer.
+ * ada-lang.c (ada_executable_changed_observer): Remove argument.
+ * symtab.c (symtab_observer_executable_changed): Remove argument.
+ * observer.sh: Handle functions with no arguments.
+
+2008-07-20 Sergei Poselenov <sposelenov@emcraft.com>
+ Chris Demetriou <cgd@google.com>
+
+ * elfread.c (elf_symfile_segments): Fix the check that each loadable
+ section fits within an ELF segment to handle ELF segments that hit
+ the end of the address space.
+
+2008-07-20 Chris Demetriou <cgd@google.com>
+
+ * MAINTAINERS (Write After Approval): Add self.
+
+2008-07-18 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/855:
+ * NEWS: Add entry for macro commands.
+ * Makefile.in (macrocmd.o): Add gdb_string.h.
+ * macroscope.h (user_macro_scope): Declare.
+ (default_macro_scope): Update documentation.
+ (macro_user_macros): Declare.
+ * c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
+ Use user_macro_scope.
+ (null_macro_lookup): Remove.
+ * macrotab.h (macro_callback_fn): Declare.
+ (macro_for_each): Likewise.
+ (macro_allow_redefinitions): Likewise.
+ * macrotab.c (foreach_macro): New function
+ (macro_for_each): Likewise.
+ (struct macro_table) <redef_ok>: New field.
+ (macro_allow_redefinitions): New function.
+ (new_macro_table): Update.
+ (macro_define_function): Likewise.
+ (macro_define_object): Likewise.
+ * macroscope.c (user_macro_scope): New function.
+ (default_macro_scope): Use it.
+ (macro_user_macros): New global.
+ (standard_macro_lookup): Look in macro_user_macros.
+ (_initialize_macroscope): New function.
+ * macroexp.h (macro_is_whitespace, macro_is_digit,
+ macro_is_identifier_nondigit): Declare.
+ * macroexp.c (macro_is_whitespace): Rename. No longer static.
+ (macro_is_digit): Likewise.
+ (macro_is_identifier_nondigit): Likewise.
+ (get_identifier): Update.
+ (get_pp_number): Likewise.
+ (get_token): Likewise.
+ * macrocmd.c (skip_ws): New function.
+ (extract_identifier): Likewise.
+ (free_macro_definition_ptr): Likewise.
+ (user_macros): Remove.
+ (macro_define_command): Implement.
+ (_initialize_macrocmd): Update.
+ (macro_undef_command): Implement.
+ (print_one_macro): New function.
+ (macro_list_command): Implement.
+
+2008-07-18 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
+ in BFD ELF check.
+ * configure: Regenerate.
2008-07-17 Paul Pluzhnikov <ppluzhnikov@google.com>
@@ -5052,9 +9873,9 @@
* target.c (memory_xfer_partial): Call
breakpoint_restore_shadows.
(restore_show_memory_breakpoints)
- (make_show_memory_beakpoints_cleanup): New.
+ (make_show_memory_breakpoints_cleanup): New.
(show_memory_breakpoints): New.
- * target.h (make_show_memory_beakpoints_cleanup): Declare.
+ * target.h (make_show_memory_breakpoints_cleanup): Declare.
* ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
Make sure we see memory breakpoints when checking if
breakpoint is still there.
@@ -5261,7 +10082,7 @@
val_valid.
* NEWS: Mention watchpoints on inaccessible memory.
-2007-02-29 Daniel Jacobowitz <dan@codesourcery.com>
+2008-02-29 Daniel Jacobowitz <dan@codesourcery.com>
* Makefile.in (i386-nat.o): Update.
* amd64-linux-nat.c (_initialize_amd64_linux_nat): Call
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 9552fc93cfc..0935ffe1ddb 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -83,6 +83,18 @@ CATALOGS = @CATALOGS@
# distribution will fix your include files up.
CC=@CC@
+# Dependency tracking information.
+DEPMODE = @CCDEPMODE@
+DEPDIR = @DEPDIR@
+depcomp = $(SHELL) $(srcdir)/../depcomp
+
+# Note that these are overridden by GNU make-specific code below if
+# GNU make is used. The overrides implement dependency tracking.
+COMPILE.pre = $(CC)
+COMPILE.post = -c -o $@
+COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
+POSTCOMPILE = @true
+
# Directory containing source files.
srcdir = @srcdir@
VPATH = @srcdir@
@@ -173,15 +185,14 @@ GNULIB_H = gnulib/string.h @GNULIB_STDINT_H@
#
SUBDIR_CLI_OBS = \
cli-dump.o \
- cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \
+ cli-decode.o cli-script.o cli-cmds.o cli-setshow.o \
cli-logging.o \
cli-interp.o
SUBDIR_CLI_SRCS = \
cli/cli-dump.c \
cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
cli/cli-logging.c \
- cli/cli-interp.c \
- cli/cli-utils.c
+ cli/cli-interp.c
SUBDIR_CLI_DEPS =
SUBDIR_CLI_LDFLAGS=
SUBDIR_CLI_CFLAGS=
@@ -254,6 +265,21 @@ SUBDIR_TUI_LDFLAGS=
SUBDIR_TUI_CFLAGS= \
-DTUI=1
+#
+# python sub directory definitons
+#
+SUBDIR_PYTHON_OBS = \
+ python.o \
+ python-utils.o \
+ python-value.o
+SUBDIR_PYTHON_SRCS = \
+ python/python.c \
+ python/python-utils.c \
+ python/python-value.c
+SUBDIR_PYTHON_DEPS =
+SUBDIR_PYTHON_LDFLAGS=
+SUBDIR_PYTHON_CFLAGS=
+
# Opcodes currently live in one of two places. Either they are in the
# opcode library, typically ../opcodes, or they are in a header file
@@ -274,27 +300,15 @@ SIM = @SIM@
WIN32LIBS = @WIN32LIBS@
-# Where is the TCL library? Typically in ../tcl.
-LIB_INSTALL_DIR = $(libdir)
-# This variable is needed when doing dynamic linking.
-LIB_RUNTIME_DIR = $(libdir)
-TCL = @TCL_CC_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@
-TCL_CFLAGS = @TCLHDIR@
+# Tcl et al cflags and libraries
+TCL = @TCL_LIBRARY@
+TCL_CFLAGS = @TCL_INCLUDE@
GDBTKLIBS = @GDBTKLIBS@
# Extra flags that the GDBTK files need:
GDBTK_CFLAGS = @GDBTK_CFLAGS@
-# Where is the TK library? Typically in ../tk.
-TK = @TK_BUILD_LIB_SPEC@
-TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@
-
-# Where is Itcl? Typically in ../itcl/itcl.
-ITCL_CFLAGS = @ITCLHDIR@
-ITCL = @ITCLLIB@
-
-# Where is Itk? Typically in ../itcl/itk.
-ITK_CFLAGS = @ITKHDIR@
-ITK = @ITKLIB@
+TK = @TK_LIBRARY@
+TK_CFLAGS = @TK_INCLUDE@
X11_CFLAGS = @TK_XINCLUDES@
X11_LDFLAGS =
@@ -306,6 +320,8 @@ LIBGUI = @LIBGUI@
GUI_CFLAGS_X = @GUI_CFLAGS_X@
IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
+ALL_TCL_CFLAGS = $(TCL_CFLAGS) $(TK_CFLAGS)
+
# The version of gdbtk we're building. This should be kept
# in sync with GDBTK_VERSION and friends in gdbtk.h.
GDBTK_VERSION = 1.0
@@ -325,8 +341,7 @@ SUBDIR_GDBTK_SRCS = \
gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \
gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \
gdbtk/generic/gdbtk-main.c
-SUBDIR_GDBTK_DEPS = \
- $(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TK_DEPS) $(TCL_DEPS)
+SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
SUBDIR_GDBTK_LDFLAGS=
SUBDIR_GDBTK_CFLAGS= -DGDBTK
@@ -395,13 +410,13 @@ INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_
# If you have the Cygnus libraries installed,
# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS='
INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty -ldecnumber \
- $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
+ $(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
-lintl -liberty $(LIBGNU)
CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
- $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
+ $(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
$(LIBICONV) $(LIBEXPAT) \
$(LIBIBERTY) $(WIN32LIBS) $(LIBGNU)
-CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
+CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
@@ -419,7 +434,7 @@ RUNTESTFLAGS=
# XML files to build in to GDB.
XMLFILES = $(srcdir)/features/gdb-target.dtd $(srcdir)/features/xinclude.dtd \
- $(srcdir)/features/library-list.dtd
+ $(srcdir)/features/library-list.dtd $(srcdir)/features/osdata.dtd
# This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX
# interface to the serial port. Hopefully if get ported to OS/2, VMS,
@@ -500,8 +515,7 @@ ALL_TARGET_OBS = \
xcoffread.o \
prologue-value.o \
symfile-mem.o \
- corelow.o \
- linux-record.o
+ corelow.o linux-record.o
# Host-dependent makefile fragment comes in here.
@host_makefile_frag@
@@ -596,7 +610,7 @@ TARGET_FLAGS_TO_PASS = \
# Links made at configuration time should not be specified here, since
# SFILES is used in building the distribution archive.
-SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c \
+SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
addrmap.c \
auxv.c ax-general.c ax-gdb.c \
bcache.c \
@@ -623,7 +637,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c \
macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \
mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c memory-map.c \
objc-exp.y objc-lang.c \
- objfiles.c osabi.c observer.c \
+ objfiles.c osabi.c observer.c osdata.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
prologue-value.c \
regcache.c reggroups.c remote.c remote-fileio.c reverse.c \
@@ -643,378 +657,77 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c \
valarith.c valops.c valprint.c value.c varobj.c vec.c \
wrapper.c \
xml-tdesc.c xml-support.c \
- record.c
+ inferior.c record.c
LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
-# "system" headers. Using these in dependencies is a rather personal
-# choice. (-rich, summer 1993)
-# (Why would we not want to depend on them? If one of these changes in a
-# non-binary-compatible way, it is a real pain to remake the right stuff
-# without these dependencies -kingdon, 13 Mar 1994)
-aout_aout64_h = $(INCLUDE_DIR)/aout/aout64.h
-aout_stabs_gnu_h = $(INCLUDE_DIR)/aout/stabs_gnu.h
-getopt_h = $(INCLUDE_DIR)/getopt.h
-floatformat_h = $(INCLUDE_DIR)/floatformat.h
-bfd_h = $(BFD_DIR)/bfd.h
-coff_sym_h = $(INCLUDE_DIR)/coff/sym.h
-coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h
-coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h
-coff_internal_h = $(INCLUDE_DIR)/coff/internal.h
-dis_asm_h = $(INCLUDE_DIR)/dis-asm.h $(bfd_h)
-elf_common_h = $(INCLUDE_DIR)/elf/common.h
-elf_internal_h = $(INCLUDE_DIR)/elf/internal.h
-elf_reloc_macros_h = $(INCLUDE_DIR)/elf/reloc-macros.h
-elf_sh_h = $(INCLUDE_DIR)/elf/sh.h
-elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h)
-elf_bfd_h = $(BFD_SRC)/elf-bfd.h
-elf_frv_h = $(INCLUDE_DIR)/elf/frv.h $(elf_reloc_macros_h)
-elf_m32c_h = $(INCLUDE_DIR)/elf/m32c.h $(elf_reloc_macros_h)
-elf_mep_h = $(INCLUDE_DIR)/elf/mep.h $(elf_reloc_macros_h)
-elf_ppc_h = $(INCLUDE_DIR)/elf/ppc.h $(elf_reloc_macros_h)
-libaout_h = $(BFD_SRC)/libaout.h
-libiberty_h = $(INCLUDE_DIR)/libiberty.h
-libbfd_h = $(BFD_SRC)/libbfd.h
-remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h
-demangle_h = $(INCLUDE_DIR)/demangle.h
-obstack_h = $(INCLUDE_DIR)/obstack.h
-opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h
-readline_h = $(READLINE_SRC)/readline.h
-readline_tilde_h = $(READLINE_SRC)/tilde.h
-readline_history_h = $(READLINE_SRC)/history.h
-frv_desc_h = $(OPCODES_SRC)/frv-desc.h
-mep_desc_h = $(OPCODES_SRC)/mep-desc.h
-mep_opc_h = $(OPCODES_SRC)/mep-opc.h
-sh_opc_h = $(OPCODES_SRC)/sh-opc.h
-gdb_callback_h = $(INCLUDE_DIR)/gdb/callback.h
-gdb_fileio_h = $(INCLUDE_DIR)/gdb/fileio.h
-gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h
-gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h
-gdb_sim_m32c_h = $(INCLUDE_DIR)/gdb/sim-m32c.h
-gdb_sim_ppc_h = $(INCLUDE_DIR)/gdb/sim-ppc.h
-gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h
-splay_tree_h = $(INCLUDE_DIR)/splay-tree.h
-safe_ctype_h = $(INCLUDE_DIR)/safe-ctype.h
-hashtab_h = $(INCLUDE_DIR)/hashtab.h
-filenames_h = $(INCLUDE_DIR)/filenames.h
-
-decimal128_h = $(LIBDECNUMBER_DIR)/dpd/decimal128.h
-decimal64_h = $(LIBDECNUMBER_DIR)/dpd/decimal64.h
-decimal32_h = $(LIBDECNUMBER_DIR)/dpd/decimal32.h
-
-#
-# $BUILD/ headers
-#
-
-config_h = config.h
-exc_request_U_h = exc_request_U.h
-exc_request_S_h = exc_request_S.h
-msg_reply_S_h = msg_reply_S.h
-msg_U_h = msg_U.h
-notify_S_h = notify_S.h
-observer_h = observer.h
-observer_inc = observer.inc
-process_reply_S_h = process_reply_S.h
-
-#
-# config/ headers
-#
-
-nm_h = @nm_h@
-
-#
-# gdb/ headers
-#
-
-ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) $(breakpoint_h)
-ada_lex_c = ada-lex.c $(gdb_string_h)
-addrmap_h = addrmap.h
-alphabsd_tdep_h = alphabsd-tdep.h
-alpha_tdep_h = alpha-tdep.h
-amd64_linux_tdep_h = amd64-linux-tdep.h
-amd64_nat_h = amd64-nat.h
-amd64_tdep_h = amd64-tdep.h $(i386_tdep_h)
-annotate_h = annotate.h $(symtab_h) $(gdbtypes_h)
-arch_utils_h = arch-utils.h
-arm_linux_tdep_h = arm-linux-tdep.h
-arm_tdep_h = arm-tdep.h
-auxv_h = auxv.h
-ax_gdb_h = ax-gdb.h
-ax_h = ax.h $(doublest_h)
-bcache_h = bcache.h
-bfd_target_h = bfd-target.h
-block_h = block.h
-breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h) $(vec_h)
-bsd_kvm_h = bsd-kvm.h
-bsd_uthread_h = bsd-uthread.h
-buildsym_h = buildsym.h
-call_cmds_h = call-cmds.h
-charset_h = charset.h
-c_lang_h = c-lang.h $(value_h) $(macroexp_h)
-cli_out_h = cli-out.h
-coff_pe_read_h = coff-pe-read.h
-command_h = command.h
-complaints_h = complaints.h
-completer_h = completer.h
-cp_abi_h = cp-abi.h
-cp_support_h = cp-support.h $(symtab_h)
-dcache_h = dcache.h
-# Depend on $(GNULIB_H), since generated files are created in the gnulib build.
-defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \
- $(libiberty_h) $(bfd_h) $(ui_file_h) $(nm_h) \
- $(fopen_bin_h) $(gdbarch_h) $(GNULIB_H)
-dictionary_h = dictionary.h
-disasm_h = disasm.h
-doublest_h = doublest.h $(floatformat_h)
-dummy_frame_h = dummy-frame.h
-dfp_h = dfp.h
-dwarf2expr_h = dwarf2expr.h
-dwarf2_frame_h = dwarf2-frame.h
-dwarf2loc_h = dwarf2loc.h
-environ_h = environ.h
-event_loop_h = event-loop.h
-event_top_h = event-top.h
-exceptions_h = exceptions.h $(ui_out_h)
-exec_h = exec.h $(target_h)
-expression_h = expression.h $(symtab_h) $(doublest_h)
-fbsd_nat_h = fbsd-nat.h
-f_lang_h = f-lang.h
-frame_base_h = frame-base.h
-frame_h = frame.h
-frame_unwind_h = frame-unwind.h $(frame_h)
-frv_tdep_h = frv-tdep.h
-gdbarch_h = gdbarch.h
-gdb_assert_h = gdb_assert.h
-gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h)
-gdbcore_h = gdbcore.h $(bfd_h)
-gdb_curses_h = gdb_curses.h
-gdb_dirent_h = gdb_dirent.h
-gdb_events_h = gdb-events.h
-gdb_h = gdb.h
-gdb_expat_h = gdb_expat.h
-gdb_locale_h = gdb_locale.h
-gdb_obstack_h = gdb_obstack.h $(obstack_h)
-gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
-gdb_ptrace_h = gdb_ptrace.h
-gdb_regex_h = gdb_regex.h $(xregex_h)
-gdb_select_h = gdb_select.h
-gdb_stabs_h = gdb-stabs.h
-gdb_stat_h = gdb_stat.h
-gdb_string_h = gdb_string.h
-gdb_thread_db_h = gdb_thread_db.h
-gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h) $(ui_out_h) $(inferior_h)
-gdbtypes_h = gdbtypes.h $(hashtab_h)
-gdb_vfork_h = gdb_vfork.h
-gdb_wait_h = gdb_wait.h
-glibc_tdep_h = glibc-tdep.h
-gnu_nat_h = gnu-nat.h
-gnu_v2_abi_h = gnu-v2-abi.h
-gregset_h = gregset.h
-hppa_tdep_h = hppa-tdep.h
-i386bsd_nat_h = i386bsd-nat.h
-i386_cygwin_tdep_h = i386-cygwin-tdep.h
-i386_linux_tdep_h = i386-linux-tdep.h
-i386_tdep_h = i386-tdep.h
-i387_tdep_h = i387-tdep.h
-ia64_tdep_h = ia64-tdep.h
-infcall_h = infcall.h
-inf_child_h = inf-child.h
-inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h)
-inf_loop_h = inf-loop.h
-inflow_h = inflow.h $(terminal_h)
-inf_ptrace_h = inf-ptrace.h
-inf_ttrace_h = inf-ttrace.h
-interps_h = interps.h $(exceptions_h)
-jv_lang_h = jv-lang.h
-language_h = language.h
-libunwind_frame_h = libunwind-frame.h $(libunwind_h)
-linespec_h = linespec.h
-linux_fork_h = linux-fork.h
-linux_nat_h = linux-nat.h $(target_h)
-m2_lang_h = m2-lang.h
-m32r_tdep_h = m32r-tdep.h
-m68k_tdep_h = m68k-tdep.h
-m88k_tdep_h = m88k-tdep.h
-macroexp_h = macroexp.h
-macroscope_h = macroscope.h $(macrotab_h) $(symtab_h)
-macrotab_h = macrotab.h
-main_h = main.h
-mdebugread_h = mdebugread.h $(coff_sym_h) $(coff_symconst_h)
-memattr_h = memattr.h $(vec_h)
-mips_linux_tdep_h = mips-linux-tdep.h
-mipsnbsd_tdep_h = mipsnbsd-tdep.h
-mips_tdep_h = mips-tdep.h
-memory_map_h = memory-map.h $(memattr_h)
-mn10300_tdep_h = mn10300-tdep.h
-monitor_h = monitor.h
-nbsd_nat_h = nbsd-nat.h
-nbsd_tdep_h = nbsd-tdep.h
-nto_tdep_h = nto-tdep.h $(solist_h) $(osabi_h) $(regset_h)
-objc_lang_h = objc-lang.h
-objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
-obsd_tdep_h = obsd-tdep.h
-osabi_h = osabi.h
-parser_defs_h = parser-defs.h $(doublest_h)
-p_lang_h = p-lang.h
-ppcnbsd_tdep_h = ppcnbsd-tdep.h
-ppcobsd_tdep_h = ppcobsd-tdep.h
-ppc_tdep_h = ppc-tdep.h
-ppc_linux_tdep_h = ppc-linux-tdep.h
-proc_utils_h = proc-utils.h
-prologue_value_h = prologue-value.h
-regcache_h = regcache.h
-reggroups_h = reggroups.h
-regset_h = regset.h
-remote_fileio_h = remote-fileio.h
-remote_h = remote.h
-rs6000_tdep_h = rs6000-tdep.h
-s390_tdep_h = s390-tdep.h
-scm_lang_h = scm-lang.h $(scm_tags_h)
-scm_tags_h = scm-tags.h
-score_tdep_h = score-tdep.h
-sentinel_frame_h = sentinel-frame.h
-serial_h = serial.h
-ser_base_h = ser-base.h
-ser_tcp_h = ser-tcp.h
-ser_unix_h = ser-unix.h
-shnbsd_tdep_h = shnbsd-tdep.h
-sh_tdep_h = sh-tdep.h
-sim_regno_h = sim-regno.h
-sol2_tdep_h = sol2-tdep.h
-solib_h = solib.h
-solib_irix_h = solib-irix.h
-solib_pa64_h = solib-pa64.h
-solib_som_h = solib-som.h
-solib_svr4_h = solib-svr4.h
-solib_target_h = solib-target.h
-solist_h = solist.h $(symtab_h)
-source_h = source.h
-sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h)
-sparc_nat_h = sparc-nat.h
-sparc_tdep_h = sparc-tdep.h
-spu_tdep_h = spu-tdep.h
-srec_h = srec.h
-stabsread_h = stabsread.h
-stack_h = stack.h
-symfile_h = symfile.h $(symtab_h)
-symtab_h = symtab.h
-target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) $(vec_h)
-target_descriptions_h = target-descriptions.h
-terminal_h = terminal.h
-top_h = top.h
-tracepoint_h = tracepoint.h
-trad_frame_h = trad-frame.h $(frame_h)
-tramp_frame_h = tramp-frame.h $(frame_h)
-typeprint_h = typeprint.h
-ui_file_h = ui-file.h
-ui_out_h = ui-out.h
-user_regs_h = user-regs.h
-valprint_h = valprint.h
-value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h)
-varobj_h = varobj.h $(symtab_h) $(gdbtypes_h) $(vec_h)
-vax_tdep_h = vax-tdep.h
-vec_h = vec.h $(gdb_assert_h) $(gdb_string_h)
-version_h = version.h
-wrapper_h = wrapper.h $(gdb_h)
-xcoffsolib_h = xcoffsolib.h
-xml_support_h = xml-support.h $(gdb_obstack_h) $(vec_h)
-xml_tdesc_h = xml-tdesc.h
-xtensa_tdep_h = xtensa-tdep.h
-record_h = record.h
-linux_record_h = linux-record.h
-
-#
-# gdb/cli/ headers
-#
-
-cli_cmds_h = $(srcdir)/cli/cli-cmds.h
-cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h)
-cli_dump_h = $(srcdir)/cli/cli-dump.h
-cli_script_h = $(srcdir)/cli/cli-script.h
-cli_setshow_h = $(srcdir)/cli/cli-setshow.h
-cli_utils_h = $(srcdir)/cli/cli-utils.h
-
-#
-# gdb/mi/ headers
-#
-
-mi_cmds_h = $(srcdir)/mi/mi-cmds.h
-mi_console_h = $(srcdir)/mi/mi-console.h
-mi_getopt_h = $(srcdir)/mi/mi-getopt.h
-mi_main_h = $(srcdir)/mi/mi-main.h
-mi_out_h = $(srcdir)/mi/mi-out.h
-mi_parse_h = $(srcdir)/mi/mi-parse.h
-mi_common_h = $(srcdir)/mi/mi-common.h
-
-#
-# gdb/tui/ headers
-#
-
-tui_command_h = $(srcdir)/tui/tui-command.h
-tui_data_h = $(srcdir)/tui/tui-data.h $(tui_h) $(gdb_curses_h)
-tui_disasm_h = $(srcdir)/tui/tui-disasm.h $(tui_h) $(tui_data_h)
-tui_file_h = $(srcdir)/tui/tui-file.h
-tui_h = $(srcdir)/tui/tui.h
-tui_hooks_h = $(srcdir)/tui/tui-hooks.h
-tui_io_h = $(srcdir)/tui/tui-io.h
-tui_layout_h = $(srcdir)/tui/tui-layout.h $(tui_h) $(tui_data_h)
-tui_regs_h = $(srcdir)/tui/tui-regs.h $(tui_data_h)
-tui_source_h = $(srcdir)/tui/tui-source.h $(tui_data_h)
-tui_stack_h = $(srcdir)/tui/tui-stack.h
-tui_windata_h = $(srcdir)/tui/tui-windata.h $(tui_data_h)
-tui_wingeneral_h = $(srcdir)/tui/tui-wingeneral.h
-tui_win_h = $(srcdir)/tui/tui-win.h $(tui_data_h)
-tui_winsource_h = $(srcdir)/tui/tui-winsource.h $(tui_data_h)
-
-# gdb/features preparsed descriptions
-features_headers = $(defs_h) $(gdbtypes_h) $(target_descriptions_h)
-arm_with_iwmmxt_c = $(srcdir)/features/arm-with-iwmmxt.c $(features_headers)
-mips_linux_c = $(srcdir)/features/mips-linux.c $(features_headers)
-mips64_linux_c = $(srcdir)/features/mips64-linux.c $(features_headers)
-powerpc_32_c = $(srcdir)/features/rs6000/powerpc-32.c $(features_headers)
-powerpc_32l_c = $(srcdir)/features/rs6000/powerpc-32l.c $(features_headers)
-powerpc_altivec32_c = $(srcdir)/features/rs6000/powerpc-altivec32.c $(features_headers)
-powerpc_altivec32l_c = $(srcdir)/features/rs6000/powerpc-altivec32l.c $(features_headers)
-powerpc_403_c = $(srcdir)/features/rs6000/powerpc-403.c $(features_headers)
-powerpc_403gc_c = $(srcdir)/features/rs6000/powerpc-403gc.c $(features_headers)
-powerpc_505_c = $(srcdir)/features/rs6000/powerpc-505.c $(features_headers)
-powerpc_601_c = $(srcdir)/features/rs6000/powerpc-601.c $(features_headers)
-powerpc_602_c = $(srcdir)/features/rs6000/powerpc-602.c $(features_headers)
-powerpc_603_c = $(srcdir)/features/rs6000/powerpc-603.c $(features_headers)
-powerpc_604_c = $(srcdir)/features/rs6000/powerpc-604.c $(features_headers)
-powerpc_64_c = $(srcdir)/features/rs6000/powerpc-64.c $(features_headers)
-powerpc_64l_c = $(srcdir)/features/rs6000/powerpc-64l.c $(features_headers)
-powerpc_altivec64_c = $(srcdir)/features/rs6000/powerpc-altivec64.c $(features_headers)
-powerpc_altivec64l_c = $(srcdir)/features/rs6000/powerpc-altivec64l.c $(features_headers)
-powerpc_7400_c = $(srcdir)/features/rs6000/powerpc-7400.c $(features_headers)
-powerpc_750_c = $(srcdir)/features/rs6000/powerpc-750.c $(features_headers)
-powerpc_860_c = $(srcdir)/features/rs6000/powerpc-860.c $(features_headers)
-powerpc_e500_c = $(srcdir)/features/rs6000/powerpc-e500.c $(features_headers)
-powerpc_e500l_c = $(srcdir)/features/rs6000/powerpc-e500l.c $(features_headers)
-rs6000_c = $(srcdir)/features/rs6000/rs6000.c $(features_headers)
-
# Header files that need to have srcdir added. Note that in the cases
# where we use a macro like $(gdbcmd_h), things are carefully arranged
# so that each .h file is listed exactly once (M-x tags-search works
# wrong if TAGS has files twice). Because this is tricky to get
# right, it is probably easiest just to list .h files here directly.
-HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h defs.h \
- exceptions.h \
- environ.h $(gdbcmd_h) gdb.h gdbcore.h \
- gdb-stabs.h $(inferior_h) language.h monitor.h \
- objfiles.h parser-defs.h serial.h solib.h \
- symfile.h stabsread.h target.h terminal.h typeprint.h \
- xcoffsolib.h \
- macrotab.h macroexp.h macroscope.h \
- prologue-value.h \
- ada-lang.h c-lang.h f-lang.h \
- jv-lang.h \
- m2-lang.h p-lang.h \
- complaints.h valprint.h \
- gdbthread.h \
- dcache.h top.h solib-som.h
+HFILES_NO_SRCDIR = osf-share/cma_debug_client.h \
+osf-share/HP800/cma_thread_io.h osf-share/cma_sequence.h \
+osf-share/cma_mutex.h osf-share/cma_semaphore_defs.h \
+osf-share/cma_list.h osf-share/cma_handle.h osf-share/cma_stack.h \
+osf-share/cma_util.h osf-share/RIOS/cma_thread_io.h \
+osf-share/cma_errors.h osf-share/cma_tcb_defs.h osf-share/cma_attr.h \
+osf-share/cma_stack_int.h osf-share/cma_init.h \
+osf-share/cma_deb_core.h osf-share/AT386/cma_thread_io.h \
+osf-share/cma_sched.h proc-utils.h arm-tdep.h ax-gdb.h ppcnbsd-tdep.h \
+cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h gnu-v2-abi.h \
+exec.h m32r-tdep.h osabi.h gdbcore.h solib-som.h \
+i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \
+ia64-tdep.h ada-lang.h varobj.h frv-tdep.h nto-tdep.h serial.h \
+c-lang.h frame.h event-loop.h block.h cli/cli-setshow.h \
+cli/cli-decode.h cli/cli-cmds.h cli/cli-dump.h \
+cli/cli-script.h macrotab.h symtab.h version.h gnulib/wchar.in.h \
+gnulib/string.in.h gnulib/str-two-way.h gnulib/extra/link-warning.h \
+gnulib/stdint.in.h remote.h gdb.h sparc-nat.h gdbserver/win32-low.h \
+gdbserver/i387-fp.h gdbserver/server.h gdbserver/terminal.h \
+gdbserver/mem-break.h gdbserver/wincecompat.h gdbserver/target.h \
+gdbserver/linux-low.h gdbserver/gdb_proc_service.h \
+gdbserver/regcache.h gdbthread.h dwarf2-frame.h nbsd-nat.h dcache.h \
+amd64-nat.h s390-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
+gdbarch.h bsd-uthread.h gdb_thread_db.h gdb_stat.h memory-map.h \
+mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
+ser-unix.h scm-lang.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
+f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
+objfiles.h vec.h disasm.h mips-tdep.h ser-base.h \
+gdb_curses.h bfd-target.h memattr.h inferior.h ax.h dummy-frame.h \
+inflow.h fbsd-nat.h libunwind-frame.h completer.h inf-ttrace.h \
+solib-target.h shnbsd-tdep.h gdb_vfork.h alpha-tdep.h dwarf2expr.h \
+m2-lang.h stack.h charset.h addrmap.h command.h solist.h source.h \
+target.h prologue-value.h cp-abi.h tui/tui-hooks.h tui/tui.h \
+tui/tui-file.h tui/tui-command.h tui/tui-disasm.h tui/tui-wingeneral.h \
+tui/tui-windata.h tui/tui-data.h tui/tui-win.h tui/tui-stack.h \
+tui/tui-winsource.h tui/tui-regs.h tui/tui-io.h tui/tui-layout.h \
+tui/tui-source.h xcoffsolib.h sol2-tdep.h gregset.h sh-tdep.h \
+expression.h score-tdep.h gdb_select.h ser-tcp.h buildsym.h valprint.h \
+call-cmds.h typeprint.h mi/mi-getopt.h mi/mi-parse.h mi/mi-console.h \
+mi/mi-out.h mi/mi-main.h mi/mi-common.h mi/mi-cmds.h linux-nat.h \
+complaints.h gdb_proc_service.h gdb_regex.h xtensa-tdep.h inf-loop.h \
+gdb_wait.h gdb_assert.h solib.h ppc-tdep.h cp-support.h glibc-tdep.h \
+interps.h auxv.h gdbcmd.h tramp-frame.h mipsnbsd-tdep.h \
+amd64-linux-tdep.h linespec.h i387-tdep.h mn10300-tdep.h \
+sparc64-tdep.h monitor.h ppcobsd-tdep.h srec.h solib-pa64.h \
+coff-pe-read.h parser-defs.h gdb_ptrace.h mips-linux-tdep.h \
+m68k-tdep.h spu-tdep.h jv-lang.h environ.h solib-irix.h amd64-tdep.h \
+doublest.h regset.h hppa-tdep.h ppc-linux-tdep.h rs6000-tdep.h \
+gdb_locale.h gdb_dirent.h arch-utils.h trad-frame.h gnu-nat.h \
+language.h i386-cygwin-tdep.h nbsd-tdep.h wrapper.h solib-svr4.h \
+macroexp.h ui-file.h regcache.h gdb_string.h tracepoint.h i386-tdep.h \
+inf-child.h p-lang.h event-top.h gdbtypes.h scm-tags.h user-regs.h \
+regformats/regdef.h config/alpha/nm-osf3.h config/i386/nm-cygwin.h \
+config/i386/nm-linux64.h config/i386/nm-i386gnu.h \
+config/i386/nm-fbsd.h config/i386/nm-i386sol2.h config/i386/nm-linux.h \
+config/i386/nm-i386.h config/i386/nm-go32.h config/nm-nto.h \
+config/sparc/nm-sol2.h config/nm-linux.h config/mips/nm-irix5.h \
+config/rs6000/nm-rs6000.h top.h bsd-kvm.h gdb-stabs.h reggroups.h \
+annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h \
+remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
+sentinel-frame.h bcache.h symfile.h
# Header files that already have srcdir in them, or which are in objdir.
@@ -1066,13 +779,13 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
findcmd.o \
std-regs.o \
signals.o \
- gdb-events.o \
exec.o reverse.o \
bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \
dbxread.o coffread.o coff-pe-read.o \
dwarf2read.o mipsread.o stabsread.o corefile.o \
dwarf2expr.o dwarf2loc.o dwarf2-frame.o \
ada-lang.o c-lang.o f-lang.o objc-lang.o \
+ ada-tasks.o \
ui-out.o cli-out.o \
varobj.o vec.o wrapper.o \
jv-lang.o jv-valprint.o jv-typeprint.o \
@@ -1095,7 +808,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
solib.o solib-null.o \
prologue-value.o memory-map.o xml-support.o \
target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o \
- record.o
+ inferior.o osdata.o record.o
TSOBS = inflow.o
@@ -1121,10 +834,14 @@ YYOBJ = c-exp.o \
DISTSTUFF = $(YYFILES)
-# Prevent Sun make from putting in the machine type. Setting
-# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
+
+# All generated files which can be included by another file.
+generated_files = config.h observer.h observer.inc ada-lex.c \
+ $(GNULIB_H) $(NAT_GENERATED_FILES)
+
.c.o:
- $(CC) -c $(INTERNAL_CFLAGS) $<
+ $(COMPILE) $<
+ $(POSTCOMPILE)
all: gdb$(EXEEXT) $(CONFIG_ALL)
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
@@ -1243,10 +960,9 @@ uninstall-tui:
$(DESTDIR)$(man1dir)/$$transformed_name.1
# The C++ name parser can be built standalone for testing.
-test-cp-name-parser.o: cp-name-parser.c $(safe_ctype_h) $(libiberty_h) \
- $(demangle_h)
- $(CC) -c $(INTERNAL_CFLAGS) -DTEST_CPNAMES \
- -o test-cp-name-parser.o cp-name-parser.c
+test-cp-name-parser.o: cp-name-parser.c
+ $(COMPILE) -DTEST_CPNAMES cp-name-parser.c
+ $(POSTCOMPILE)
test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY)
$(CC_LD) $(INTERNAL_LDFLAGS) -o test-cp-name-parser$(EXEEXT) \
@@ -1338,8 +1054,6 @@ init.c: $(INIT_FILES)
.PRECIOUS: init.c
-init.o: init.c $(defs_h) $(call_cmds_h)
-
# Removing the old gdb first works better if it is running, at least on SunOS.
gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
rm -f gdb$(EXEEXT)
@@ -1425,6 +1139,7 @@ distclean: clean
rm -f y.output yacc.acts yacc.tmp y.tab.h
rm -f config.log config.cache
rm -f Makefile
+ rm -rf $(DEPDIR)
maintainer-clean: local-maintainer-clean do-maintainer-clean distclean
realclean: maintainer-clean
@@ -1475,7 +1190,7 @@ gnulib/Makefile: gnulib/Makefile.in gnulib/Makefile.in config.status @frags@
config.h: stamp-h ; @true
stamp-h: config.in config.status
CONFIG_HEADERS=config.h:config.in \
- CONFIG_COMMANDS=default \
+ CONFIG_COMMANDS="default depdir" \
CONFIG_FILES= \
CONFIG_LINKS= \
$(SHELL) config.status
@@ -1503,8 +1218,7 @@ doc/gdb.info:
cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS)
# Make copying.c from COPYING
-$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ \
- $(srcdir)/../COPYING3 $(srcdir)/copying.awk
+$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copying.awk
awk -f $(srcdir)/copying.awk \
< $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp
mv $(srcdir)/copying.tmp $(srcdir)/copying.c
@@ -1516,7 +1230,6 @@ version.c: Makefile version.in
echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp
mv version.c-tmp version.c
-version.o: version.c $(version_h)
observer.h: observer.sh doc/observer.texi
${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h
@@ -1584,7 +1297,7 @@ ALLDEPFILES = \
inf-ptrace.c inf-ttrace.c \
irix5-nat.c \
libunwind-frame.c \
- linux-fork.c \
+ linux-fork.c linux-record.c \
m68hc11-tdep.c \
m32r-tdep.c \
m32r-linux-nat.c m32r-linux-tdep.c \
@@ -1631,25 +1344,20 @@ ALLDEPFILES = \
xcoffread.c xcoffsolib.c \
xstormy16-tdep.c \
xtensa-tdep.c xtensa-config.c \
- xtensa-linux-tdep.c xtensa-linux-nat.c xtensa-xtregs.c \
- linux-record.c
+ xtensa-linux-tdep.c xtensa-linux-nat.c xtensa-xtregs.c
# Some files need explicit build rules (due to -Werror problems) or due
# to sub-directory fun 'n' games.
-# Provide explicit rule/dependency - works for more makes.
-copying.o: $(srcdir)/copying.c
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c
-
hpux-thread.o: $(srcdir)/hpux-thread.c
- $(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \
- -I$(srcdir)/osf-share/HP800 -I/usr/include/dce \
- $(srcdir)/hpux-thread.c
+ $(COMPILE) -I$(srcdir)/osf-share -I$(srcdir)/osf-share/HP800 \
+ -I/usr/include/dce $(srcdir)/hpux-thread.c
+ $(POSTCOMPILE)
# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR.
-main.o: main.c
- $(CC) -c $(INTERNAL_CFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \
- -DBINDIR=\"$(bindir)\" $(srcdir)/main.c
+main.o: $(srcdir)/main.c
+ $(COMPILE) $(TARGET_SYSTEM_ROOT_DEFINE) -DBINDIR=\"$(bindir)\" $(srcdir)/main.c
+ $(POSTCOMPILE)
# FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral
# errors. It turns out that that is the least of monitor.c's
@@ -1658,24 +1366,15 @@ main.o: main.c
# definitly will not work. "monitor.c" needs to be rewritten so that
# it doesn't use format strings and instead uses callbacks.
monitor.o: $(srcdir)/monitor.c
- $(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/monitor.c
+ $(COMPILE.pre) $(INTERNAL_WARN_CFLAGS) $(COMPILE.post) $(srcdir)/monitor.c
+ $(POSTCOMPILE)
# Do not try to build "printcmd.c" with -Wformat-nonliteral. It manually
# checks format strings.
printcmd.o: $(srcdir)/printcmd.c
- $(CC) -c $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS_NO_FORMAT) \
- $(GDB_WERROR_CFLAGS) $(srcdir)/printcmd.c
-
-# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't
-# match output format strings.
-procfs.o: $(srcdir)/procfs.c
- $(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/procfs.c
-
-v850ice.o: $(srcdir)/v850ice.c
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
- $(GDBTK_CFLAGS) \
- $(srcdir)/v850ice.c
+ $(COMPILE.pre) $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS_NO_FORMAT) \
+ $(GDB_WERROR_CFLAGS) $(COMPILE.post) $(srcdir)/printcmd.c
+ $(POSTCOMPILE)
# Message files. Based on code in gcc/Makefile.in.
@@ -1762,7 +1461,7 @@ po/$(PACKAGE).pot: force
# Makefile.in, but that was a pretty big annoyance.
.SUFFIXES: .y .l
-.y.c:
+.y.c:
$(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS)
-sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
@@ -1770,6 +1469,8 @@ po/$(PACKAGE).pot: force
-e '/include.*malloc.h/d' \
-e 's/\([^x]\)malloc/\1xmalloc/g' \
-e 's/\([^x]\)realloc/\1xrealloc/g' \
+ -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
+ -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
-e '/^#line.*y.tab.c/d' \
< $@.tmp > $@.new
-rm $@.tmp
@@ -1784,6 +1485,8 @@ po/$(PACKAGE).pot: force
-e '/include.*malloc.h/d' \
-e 's/\([^x]\)malloc/\1xmalloc/g' \
-e 's/\([^x]\)realloc/\1xrealloc/g' \
+ -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
+ -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
-e 's/yy_flex_xrealloc/yyxrealloc/g' \
< $@ > $@.new && \
rm -f $@ && \
@@ -1817,1276 +1520,39 @@ stamp-xml: $(srcdir)/features/feature_to_c.sh Makefile $(XMLFILES)
.PRECIOUS: xml-builtin.c
#
-# gdb/ dependencies
-#
-
-ada-exp.o: ada-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
- $(parser_defs_h) $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(frame_h) $(block_h) $(ada_lex_c)
-ada-lang.o: ada-lang.c $(defs_h) $(gdb_string_h) $(demangle_h) \
- $(gdb_regex_h) $(frame_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) \
- $(expression_h) $(parser_defs_h) $(language_h) $(c_lang_h) \
- $(inferior_h) $(symfile_h) $(objfiles_h) $(breakpoint_h) \
- $(gdbcore_h) $(hashtab_h) $(gdb_obstack_h) $(ada_lang_h) \
- $(completer_h) $(gdb_stat_h) $(ui_out_h) $(block_h) $(infcall_h) \
- $(dictionary_h) $(exceptions_h) $(annotate_h) $(valprint_h) \
- $(source_h) $(observer_h) $(vec_h)
-ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
- $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
- $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \
- $(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h)
-ada-valprint.o: ada-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \
- $(language_h) $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h) \
- $(exceptions_h)
-addrmap.o: addrmap.c $(defs_h) $(splay_tree_h) $(gdb_obstack_h) $(addrmap_h) \
- $(gdb_assert_h)
-aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \
- $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(ppc_tdep_h) \
- $(gdb_string_h) $(observer_h)
-alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(alpha_tdep_h) $(alphabsd_tdep_h) $(inf_ptrace_h) $(gregset_h) \
- $(bsd_kvm_h)
-alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) $(alpha_tdep_h) \
- $(alphabsd_tdep_h)
-alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(osabi_h) \
- $(alpha_tdep_h) $(solib_svr4_h)
-alpha-linux-nat.o: alpha-linux-nat.c $(defs_h) $(target_h) $(regcache_h) \
- $(linux_nat_h) $(alpha_tdep_h) $(gregset_h)
-alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \
- $(gdb_string_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) $(regset_h) \
- $(regcache_h) $(alpha_tdep_h)
-alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \
- $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \
- $(block_h) $(gdb_assert_h) $(gdb_string_h) $(trad_frame_h) \
- $(alpha_tdep_h) $(mdebugread_h)
-alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
- $(gdbcore_h) $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h)
-alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(regcache_h) $(regset_h) $(value_h) $(osabi_h) $(gdb_string_h) \
- $(gdb_assert_h) $(alpha_tdep_h) $(alphabsd_tdep_h) $(nbsd_tdep_h) \
- $(solib_svr4_h) $(target_h)
-alphaobsd-tdep.o: alphaobsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(osabi_h) $(obsd_tdep_h) $(alpha_tdep_h) $(alphabsd_tdep_h) \
- $(solib_svr4_h)
-alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(value_h) $(osabi_h) $(gdb_string_h) $(objfiles_h) $(alpha_tdep_h)
-alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
- $(frame_unwind_h) $(frame_base_h) $(dwarf2_frame_h) $(inferior_h) \
- $(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \
- $(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \
- $(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \
- $(infcall_h) $(elf_bfd_h) $(alpha_tdep_h) $(trad_frame_h)
-amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(target_h) $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) \
- $(inf_ptrace_h)
-amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(target_h) $(gdb_assert_h) $(fbsd_nat_h) $(amd64_tdep_h) \
- $(amd64_nat_h) $(bsd_kvm_h)
-amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
- $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_assert_h) \
- $(gdb_string_h) $(amd64_tdep_h) $(bsd_uthread_h) $(solib_svr4_h)
-amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
- $(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \
- $(i386_linux_tdep_h) $(amd64_nat_h) $(amd64_linux_tdep_h)
-amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(regcache_h) $(osabi_h) $(symtab_h) $(gdb_string_h) $(amd64_tdep_h) \
- $(solib_svr4_h) $(gdbtypes_h) $(reggroups_h) $(amd64_linux_tdep_h)
-amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \
- $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(amd64_tdep_h)
-amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(target_h) $(gdb_assert_h) \
- $(amd64_tdep_h) $(amd64_nat_h) $(nbsd_nat_h)
-amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
- $(gdbcore_h) $(osabi_h) $(symtab_h) $(gdb_assert_h) $(amd64_tdep_h) \
- $(nbsd_tdep_h) $(solib_svr4_h)
-amd64obsd-nat.o: amd64obsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(target_h) $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) \
- $(bsd_kvm_h)
-amd64obsd-tdep.o: amd64obsd-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
- $(gdbcore_h) $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) \
- $(regset_h) $(target_h) $(trad_frame_h) $(gdb_assert_h) \
- $(gdb_string_h) $(amd64_tdep_h) $(i387_tdep_h) $(solib_svr4_h) \
- $(bsd_uthread_h)
-amd64-sol2-tdep.o: amd64-sol2-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(regcache_h) $(osabi_h) $(symtab_h) $(gdb_string_h) \
- $(sol2_tdep_h) $(amd64_tdep_h) $(solib_svr4_h)
-amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \
- $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
- $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \
- $(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \
- $(i387_tdep_h)
-annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
- $(gdbtypes_h) $(breakpoint_h)
-arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \
- $(gdbcmd_h) $(inferior_h) $(gdb_string_h) $(regcache_h) \
- $(gdb_assert_h) $(sim_regno_h) $(gdbcore_h) $(osabi_h) $(version_h) \
- $(floatformat_h) $(target_descriptions_h) $(objfiles_h)
-arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h) \
- $(target_h) $(linux_nat_h) $(gdb_proc_service_h) $(arm_linux_tdep_h) \
- $(target_descriptions_h) $(arm_with_iwmmxt_c)
-arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
- $(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \
- $(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) \
- $(regset_h) $(arm_linux_tdep_h) $(breakpoint_h) \
- $(glibc_tdep_h) $(trad_frame_h) $(tramp_frame_h) $(gdb_string_h)
-armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h) $(target_h) $(gdb_string_h) $(arm_tdep_h) $(inf_ptrace_h)
-armbsd-tdep.o: armbsd-tdep.c $(defs_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(gdb_assert_h) $(gdb_string_h) $(arm_tdep_h)
-armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
- $(arm_tdep_h) $(solib_svr4_h)
-armobsd-tdep.o: armobsd-tdep.c $(defs_h) $(osabi_h) $(trad_frame_h) \
- $(tramp_frame_h) $(gdb_string_h) $(obsd_tdep_h) $(arm_tdep_h) \
- $(solib_svr4_h)
-arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
- $(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
- $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \
- $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(arm_tdep_h) \
- $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) $(elf_arm_h) \
- $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h) $(objfiles_h) \
- $(dwarf2_frame_h) $(gdbtypes_h) $(prologue_value_h) \
- $(target_descriptions_h) $(user_regs_h) $(vec_h)
-arm-wince-tdep.o: arm-wince-tdep.c $(defs_h) $(osabi_h) \
- $(gdbcore_h) $(target_h) $(solib_h) $(solib_target_h) \
- $(gdb_string_h) $(arm_tdep_h)
-auxv.o: auxv.c $(defs_h) $(target_h) $(gdbtypes_h) $(command_h) \
- $(inferior_h) $(valprint_h) $(gdb_assert_h) $(auxv_h) \
- $(elf_common_h)
-avr-tdep.o: avr-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
- $(frame_base_h) $(trad_frame_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) $(symfile_h) $(arch_utils_h) $(regcache_h) \
- $(gdb_string_h) $(dis_asm_h) $(gdbtypes_h)
-ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
- $(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \
- $(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \
- $(regcache_h)
-ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h)
-bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h) \
- $(gdb_assert_h)
-bfd-target.o: bfd-target.c $(defs_h) $(target_h) $(bfd_target_h) \
- $(gdb_assert_h) $(gdb_string_h)
-block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h) \
- $(gdb_obstack_h) $(cp_support_h) $(addrmap_h)
-blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(objfiles_h) \
- $(frame_h) $(gdbcore_h) $(value_h) $(target_h) $(inferior_h) \
- $(annotate_h) $(regcache_h) $(gdb_assert_h) $(dummy_frame_h) \
- $(command_h) $(gdbcmd_h) $(block_h)
-breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \
- $(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \
- $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \
- $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \
- $(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \
- $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) $(solib_h) \
- $(solist_h) $(observer_h) $(exceptions_h) $(gdb_events_h) \
- $(mi_common_h) $(memattr_h) $(ada_lang_h) $(top_h) $(hashtab_h)
-bsd-kvm.o: bsd-kvm.c $(defs_h) $(cli_cmds_h) $(command_h) $(frame_h) \
- $(regcache_h) $(target_h) $(value_h) $(gdbcore_h) $(gdb_assert_h) \
- $(readline_h) $(bsd_kvm_h)
-bsd-uthread.o: bsd-uthread.c $(defs_h) $(gdbcore_h) $(gdbthread_h) \
- $(inferior_h) $(objfiles_h) $(observer_h) $(regcache_h) $(solib_h) \
- $(solist_h) $(symfile_h) $(target_h) $(gdb_assert_h) \
- $(gdb_obstack_h) $(bsd_uthread_h)
-buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \
- $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \
- $(complaints_h) $(gdb_string_h) $(expression_h) $(bcache_h) \
- $(filenames_h) $(macrotab_h) $(demangle_h) $(block_h) \
- $(cp_support_h) $(dictionary_h) $(buildsym_h) $(stabsread_h) \
- $(addrmap_h)
-c-exp.o: c-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
- $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(charset_h) $(block_h) $(cp_support_h) $(dfp_h)
-charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \
- $(gdb_string_h)
-c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \
- $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h) \
- $(demangle_h) $(cp_abi_h) $(cp_support_h)
-cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \
- $(gdb_assert_h)
-coff-pe-read.o: coff-pe-read.c $(coff_pe_read_h) $(bfd_h) $(defs_h) \
- $(gdbtypes_h) $(symtab_h) $(symfile_h) $(objfiles_h)
-coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \
- $(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \
- $(coff_internal_h) $(libcoff_h) $(objfiles_h) $(buildsym_h) \
- $(gdb_stabs_h) $(stabsread_h) $(complaints_h) $(target_h) \
- $(gdb_assert_h) $(block_h) $(dictionary_h) $(coff_pe_read_h)
-complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \
- $(command_h) $(gdbcmd_h)
-completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(filenames_h) $(language_h) $(cli_decode_h) $(gdbcmd_h) \
- $(readline_h) $(completer_h)
-copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h)
-corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \
- $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \
- $(dis_asm_h) $(gdb_stat_h) $(completer_h) $(exceptions_h)
-corelow.o: corelow.c $(defs_h) $(arch_utils_h) $(gdb_string_h) $(frame_h) \
- $(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \
- $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \
- $(exec_h) $(readline_h) $(gdb_assert_h) \
- $(exceptions_h) $(solib_h) $(filenames_h)
-core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \
- $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(gregset_h)
-cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \
- $(ui_out_h) $(gdb_string_h) $(exceptions_h)
-cp-name-parser.o: cp-name-parser.c $(safe_ctype_h) $(libiberty_h) $(demangle_h)
-cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \
- $(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h) $(objfiles_h) \
- $(gdbtypes_h) $(dictionary_h) $(command_h) $(frame_h)
-cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \
- $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \
- $(objfiles_h) $(frame_h) $(symtab_h) $(block_h) $(complaints_h) \
- $(gdbtypes_h) $(safe_ctype_h)
-cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
- $(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \
- $(cp_abi_h) $(valprint_h) $(cp_support_h) $(language_h)
-cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
- $(frame_base_h) $(trad_frame_h) $(dwarf2_frame_h) $(symtab_h) \
- $(inferior_h) $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \
- $(value_h) $(opcode_cris_h) $(arch_utils_h) $(regcache_h) \
- $(gdb_assert_h) $(objfiles_h) $(solib_h) $(solib_svr4_h) \
- $(gdb_string_h) $(dis_asm_h)
-c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
- $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \
- $(gdb_string_h)
-c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
- $(c_lang_h) $(cp_abi_h) $(target_h)
-dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
- $(serial_h) $(regcache_h) $(m68k_tdep_h)
-dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
- $(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \
- $(libaout_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
- $(gdb_stabs_h) $(demangle_h) $(complaints_h) $(cp_abi_h) \
- $(gdb_assert_h) $(gdb_string_h) $(aout_aout64_h) $(aout_stab_gnu_h)
-dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \
- $(gdbcore_h) $(target_h)
-demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \
- $(gdb_string_h)
-dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
- $(buildsym_h) $(gdb_assert_h) $(dictionary_h)
-dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
- $(serial_h) $(symfile_h) $(inferior_h) $(regcache_h)
-disasm.o: disasm.c $(defs_h) $(target_h) $(value_h) $(ui_out_h) \
- $(gdb_string_h) $(disasm_h) $(gdbcore_h) $(dis_asm_h)
-doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \
- $(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h)
-dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h) $(gdb_assert_h) \
- $(gdb_string_h)
-dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \
- $(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h) \
- $(command_h) $(gdbcmd_h) $(gdb_string_h)
-dfp.o: dfp.c $(defs_h) $(expression_h) $(gdbtypes_h) $(value_h) $(dfp_h) \
- $(decimal128_h) $(decimal64_h) $(decimal32_h)
-dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \
- $(gdbcore_h) $(elf_dwarf2_h) $(dwarf2expr_h) $(gdb_assert_h)
-dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \
- $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \
- $(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \
- $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h) \
- $(value_h)
-dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \
- $(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \
- $(regcache_h) $(objfiles_h) $(exceptions_h) $(elf_dwarf2_h) \
- $(dwarf2expr_h) $(dwarf2loc_h) $(gdb_string_h) $(gdb_assert_h)
-dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
- $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \
- $(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \
- $(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \
- $(cp_support_h) $(hashtab_h) $(command_h) $(gdbcmd_h) \
- $(addrmap_h) $(gdb_string_h) $(gdb_assert_h)
-elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \
- $(elf_mips_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
- $(stabsread_h) $(gdb_stabs_h) $(complaints_h) $(demangle_h) \
- $(elf_common_h) $(elf_internal_h)
-environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h)
-eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \
- $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h) \
- $(parser_defs_h) $(cp_support_h) $(gdb_assert_h) $(exceptions_h) \
- $(uiout_h) $(regcache_h)
-event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \
- $(gdb_string_h) $(exceptions_h) $(gdb_assert_h) $(gdb_select_h)
-event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
- $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \
- $(exceptions_h) $(cli_script_h) $(gdbcmd_h) $(readline_h) \
- $(readline_history_h) $(main_h) $(gdbthread_h)
-exceptions.o: exceptions.c $(defs_h) $(exceptions_h) $(breakpoint_h) \
- $(target_h) $(inferior_h) $(annotate_h) $(ui_out_h) $(gdb_assert_h) \
- $(gdb_string_h) $(serial_h)
-exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
- $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \
- $(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \
- $(xcoffsolib_h) $(observer_h) $(arch_utils_h)
-expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \
- $(gdb_string_h) $(block_h) $(objfiles_h) $(gdb_assert_h)
-fbsd-nat.o: fbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h) \
- $(regset_h) $(gdb_assert_h) $(gdb_string_h) $(elf_bfd_h) \
- $(fbsd_nat_h)
-f-exp.o: f-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
- $(parser_defs_h) $(language_h) $(f_lang_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(block_h)
-findcmd.o: findcmd.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) $(value_h) \
- $(target_h)
-findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \
- $(value_h) $(gdbcore_h) $(inferior_h) $(target_h) $(gdb_string_h) \
- $(gdb_assert_h) $(floatformat_h) $(symfile_h) $(regcache_h) \
- $(user_regs_h) $(block_h)
-f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \
- $(valprint_h) $(value_h)
-fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \
- $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \
- $(terminal_h) $(gdbthread_h) $(command_h) $(gdbcmd_h) $(solib_h)
-frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h) \
- $(gdb_obstack_h)
-frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
- $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \
- $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \
- $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \
- $(command_h) $(gdbcmd_h) $(observer_h) $(objfiles_h) $(exceptions_h) \
- $(gdbthread_h)
-frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \
- $(gdb_assert_h) $(dummy_frame_h) $(gdb_obstack_h) $(value_h) \
- $(regcache_h)
-frv-linux-tdep.o: frv-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \
- $(frame_h) $(osabi_h) $(regcache_h) $(elf_bfd_h) $(elf_frv_h) \
- $(frv_tdep_h) $(trad_frame_h) $(frame_unwind_h) $(regset_h) \
- $(gdb_string_h)
-frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \
- $(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \
- $(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \
- $(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) \
- $(elf_bfd_h) $(elf_frv_h) $(osabi_h) $(infcall_h) $(solib_h) \
- $(frv_tdep_h)
-f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
- $(f_lang_h) $(gdb_string_h)
-f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
- $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h)
-gcore.o: gcore.c $(defs_h) $(elf_bfd_h) $(infcall_h) $(inferior_h) \
- $(gdbcore_h) $(objfiles_h) $(symfile_h) $(cli_decode_h) \
- $(gdb_assert_h)
-gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
- $(symcat_h) $(floatformat_h) $(gdb_assert_h) $(gdb_string_h) \
- $(gdb_events_h) $(reggroups_h) $(osabi_h) $(gdb_obstack_h)
-gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h)
-gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h)
-gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
- $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \
- $(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \
- $(gdbcmd_h) $(wrapper_h) $(cp_abi_h) $(gdb_assert_h) $(hashtab_h)
-glibc-tdep.o: glibc-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
- $(objfiles_h) $(glibc_tdep_h)
-gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \
- $(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \
- $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gdb_obstack_h) \
- $(gnu_nat_h) $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \
- $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h)
-gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \
- $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h) $(cp_support_h) \
- $(gnu_v2_abi_h)
-gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(cp_support_h) \
- $(demangle_h) $(objfiles_h) $(valprint_h) \
- $(gdb_assert_h) $(gdb_string_h)
-go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \
- $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \
- $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \
- $(gdb_string_h) $(top_h)
-h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(arch_utils_h) $(regcache_h) \
- $(gdbcore_h) $(objfiles_h) $(gdb_assert_h) $(dis_asm_h) \
- $(dwarf2_frame_h) $(frame_base_h) $(frame_unwind_h)
-hppabsd-nat.o: hppabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(hppa_tdep_h) $(inf_ptrace_h)
-hppabsd-tdep.o: hppabsd-tdep.c $(defs_h) $(objfiles_h) $(target_h) \
- $(value_h) $(elf_common_h) $(hppa_tdep_h) $(solib_svr4_h)
-hppanbsd-nat.o: hppabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(target_h) $(hppa_tdep_h) $(inf_ptrace_h)
-hppanbsd-tdep.o: hppanbsd-tdep.c $(defs_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(trad_frame_h) $(tramp_frame_h) $(gdb_assert_h) $(gdb_string_h) \
- $(hppa_tdep_h)
-hppaobsd-tdep.o: hppaobsd-tdep.c $(defs_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(gdb_assert_h) $(gdb_string_h) $(hppa_tdep_h)
-hppa-hpux-nat.o: hppa-hpux-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(target_h) $(gdb_assert_h) $(hppa_tdep_h) $(inf_ptrace_h) \
- $(inf_ttrace_h)
-hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
- $(osabi_h) $(frame_h) $(frame_unwind_h) $(trad_frame_h) $(symtab_h) \
- $(objfiles_h) $(inferior_h) $(infcall_h) $(observer_h) \
- $(hppa_tdep_h) $(solib_som_h) $(solib_pa64_h) $(regset_h) \
- $(regcache_h) $(exceptions_h) $(gdb_string_h) $(hppa_tdep_h)
-hppa-linux-nat.o: hppa-linux-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(gdb_string_h) $(inferior_h) $(hppa_tdep_h) $(gregset_h) \
- $(target_h) $(linux_nat_h)
-hppa-linux-tdep.o: hppa-linux-tdep.c $(defs_h) $(gdbcore_h) $(osabi_h) \
- $(target_h) $(objfiles_h) $(solib_svr4_h) $(glibc_tdep_h) \
- $(frame_unwind_h) $(trad_frame_h) $(dwarf2_frame_h) $(value_h) \
- $(hppa_tdep_h) $(elf_common_h) $(regset_h) $(regcache_h)
-hppa-tdep.o: hppa-tdep.c $(defs_h) $(bfd_h) $(inferior_h) $(regcache_h) \
- $(completer_h) $(osabi_h) $(gdb_assert_h) \
- $(arch_utils_h) $(symtab_h) $(dis_asm_h) $(trad_frame_h) \
- $(frame_unwind_h) $(frame_base_h) $(gdbcore_h) $(gdbcmd_h) \
- $(objfiles_h) $(hppa_tdep_h) $(gdbtypes_h)
-hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
- $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) \
- $(hppa_tdep_h) $(observer_h)
-i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(gdb_assert_h) $(i386_tdep_h) $(i387_tdep_h) $(i386bsd_nat_h) \
- $(inf_ptrace_h)
-i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
- $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) $(i386_tdep_h)
-i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
- $(i386_tdep_h) $(regset_h) $(gdb_obstack_h) $(xml_support_h) \
- $(gdbcore_h) $(solib_h) $(solib_target_h) $(i386_cygwin_tdep_h)
-i386-dicos-tdep.o: i386-dicos-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
- $(solib_h) $(solib_target_h) $(inferior_h)
-i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(target_h) $(fbsd_nat_h) $(i386_tdep_h) $(i386bsd_nat_h) \
- $(bsd_kvm_h)
-i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
- $(osabi_h) $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) \
- $(i387_tdep_h) $(bsd_uthread_h) $(solib_svr4_h)
-i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
- $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) \
- $(gnu_nat_h) $(i387_tdep_h) $(gregset_h)
-i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(solib_svr4_h) \
- $(i386_tdep_h)
-i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
- $(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \
- $(gdb_proc_service_h) $(target_h)
-i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
- $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \
- $(dwarf2_frame_h) $(gdb_string_h) $(i386_tdep_h) \
- $(i386_linux_tdep_h) $(glibc_tdep_h) $(solib_svr4_h) $(symtab_h) \
- $(arch_utils_h) $(regset_h)
-i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h) \
- $(target_h)
-i386nbsd-nat.o: i386nbsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(target_h) $(i386_tdep_h) $(i386bsd_nat_h) $(nbsd_nat_h) \
- $(bsd_kvm_h)
-i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
- $(gdbcore_h) $(regcache_h) $(regset_h) $(osabi_h) $(symtab_h) \
- $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) \
- $(nbsd_tdep_h) $(solib_svr4_h) $(trad_frame_h) $(tramp_frame_h)
-i386-nto-tdep.o: i386-nto-tdep.c $(defs_h) $(frame_h) $(osabi_h) \
- $(regcache_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \
- $(i386_tdep_h) $(i387_tdep_h) $(nto_tdep_h) $(solib_h) \
- $(solib_svr4_h)
-i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(target_h) $(i386_tdep_h) $(i386bsd_nat_h) $(bsd_kvm_h)
-i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
- $(frame_unwind_h) $(gdbcore_h) $(regcache_h) $(regset_h) $(symtab_h) \
- $(objfiles_h) $(osabi_h) $(target_h) $(trad_frame_h) $(gdb_assert_h) \
- $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) \
- $(bsd_uthread_h)
-i386-sol2-nat.o: i386-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \
- $(amd64_nat_h) $(amd64_tdep_h)
-i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \
- $(gdb_string_h) $(sol2_tdep_h) $(i386_tdep_h) $(solib_svr4_h)
-i386-stub.o: i386-stub.c
-i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
- $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(gdbtypes_h) \
- $(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \
- $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \
- $(reggroups_h) $(regset_h) $(symfile_h) $(symtab_h) $(target_h) \
- $(value_h) $(dis_asm_h) $(gdb_assert_h) $(gdb_string_h) \
- $(i386_tdep_h) $(i387_tdep_h)
-i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
- $(i386_tdep_h) $(i387_tdep_h) $(gregset_h)
-i387-tdep.o: i387-tdep.c $(defs_h) $(doublest_h) $(floatformat_h) $(frame_h) \
- $(gdbcore_h) $(inferior_h) $(language_h) $(regcache_h) $(value_h) \
- $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h)
-ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
- $(target_h) $(gdbcore_h) $(regcache_h) $(ia64_tdep_h) $(gdb_wait_h) \
- $(gregset_h) $(linux_nat_h)
-ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(ia64_tdep_h) \
- $(arch_utils_h) $(gdbcore_h) $(regcache_h) $(osabi_h) $(solib_svr4_h) \
- $(symtab_h)
-ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \
- $(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \
- $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \
- $(elf_bfd_h) $(dis_asm_h) $(infcall_h) $(osabi_h) $(ia64_tdep_h) \
- $(elf_ia64_h) $(libunwind_frame_h) $(libunwind_ia64_h) \
- $(cp_abi_h) $(gdbtypes_h)
-infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \
- $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \
- $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) \
- $(dummy_frame_h) $(ada_lang_h)
-inf-child.o: inf-child.c $(defs_h) $(regcache_h) $(memattr_h) $(symtab_h) \
- $(target_h) $(inferior_h) $(gdb_string_h)
-infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \
- $(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \
- $(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \
- $(parser_defs_h) $(regcache_h) $(reggroups_h) $(block_h) \
- $(solib_h) $(gdb_assert_h) $(observer_h) $(target_descriptions_h) \
- $(user_regs_h) $(exceptions_h) $(cli_decode_h) $(gdbthread_h) \
- $(record_h)
-inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \
- $(event_top_h) $(inf_loop_h) $(remote_h) $(exceptions_h) \
- $(language_h) $(gdbthread_h)
-inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \
- $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \
- $(inflow_h) $(gdb_select_h) $(record_h)
-inf-ptrace.o: inf-ptrace.c $(defs_h) $(command_h) $(inferior_h) $(inflow_h) \
- $(gdbcore_h) $(regcache_h) $(gdb_assert_h) \
- $(gdb_string_h) $(gdb_ptrace_h) $(gdb_wait_h) $(inf_child_h)
-infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \
- $(inferior_h) $(exceptions_h) $(breakpoint_h) $(gdb_wait_h) \
- $(gdbcore_h) $(gdbcmd_h) $(cli_script_h) $(target_h) $(gdbthread_h) \
- $(annotate_h) $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) \
- $(value_h) $(observer_h) $(language_h) $(solib_h) $(gdb_assert_h) \
- $(mi_common_h) $(main_h) $(event_top_h) $(record_h)
-inf-ttrace.o: inf-ttrace.c $(defs_h) $(command_h) $(gdbcore_h) \
- $(gdbthread_h) $(inferior_h) $(target_h) \
- $(gdb_assert_h) $(gdb_string_h) $(inf_child_h) $(inf_ttrace_h)
-interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \
- $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \
- $(gdb_events_h) $(gdb_assert_h) $(top_h) $(exceptions_h)
-iq2000-tdep.o: iq2000-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
- $(frame_unwind_h) $(dwarf2_frame_h) $(gdbtypes_h) $(value_h) \
- $(dis_asm_h) $(gdb_string_h) $(arch_utils_h) $(regcache_h) \
- $(osabi_h) $(gdbcore_h)
-irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
- $(regcache_h) $(gdb_string_h) $(gregset_h) $(mips_tdep_h)
-jv-exp.o: jv-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
- $(parser_defs_h) $(language_h) $(jv_lang_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(block_h)
-jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \
- $(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \
- $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h) $(dictionary_h) \
- $(gdb_assert_h)
-jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
- $(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \
- $(c_lang_h) $(cp_abi_h)
-jv-valprint.o: jv-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
- $(gdbcore_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \
- $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h)
-language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \
- $(parser_defs_h) $(jv_lang_h) $(demangle_h)
-libunwind-frame.o: libunwind-frame.c $(defs_h) $(inferior_h) $(frame_h) \
- $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \
- $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \
- $(gdb_string_h) $(libunwind_frame_h) $(complaints_h)
-linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
- $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
- $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) $(interps_h) \
- $(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h) \
- $(mi_cmds_h) $(target_h)
-linux-fork.o: linux-fork.c $(defs_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) \
- $(infcall_h) $(gdb_assert_h) $(gdb_string_h) $(linux_fork_h) \
- $(linux_nat_h) $(gdb_wait_h) $(gdb_dirent_h)
-linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_string_h) \
- $(gdb_wait_h) $(gdb_assert_h) $(linux_nat_h) $(gdbthread_h) \
- $(gdbcmd_h) $(regcache_h) $(regset_h) $(inf_ptrace_h) $(auxv_h) \
- $(elf_bfd_h) $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(gdb_stat_h) \
- $(linux_fork_h) $(inf_loop_h) $(event_loop_h) $(event_top_h) \
- $(record_h)
-linux-thread-db.o: linux-thread-db.c $(defs_h) $(gdb_assert_h) \
- $(gdb_proc_service_h) $(gdb_thread_db_h) $(bfd_h) $(exceptions_h) \
- $(gdbthread_h) $(inferior_h) $(symfile_h) $(objfiles_h) $(target_h) \
- $(regcache_h) $(solib_svr4_h) $(gdbcore_h) $(observer_h) $(linux_nat_h)
-m2-exp.o: m2-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
- $(value_h) $(parser_defs_h) $(m2_lang_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(block_h)
-m2-lang.o: m2-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(parser_defs_h) $(language_h) $(m2_lang_h) $(c_lang_h) \
- $(valprint_h)
-m2-typeprint.o: m2-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
- $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
- $(m2_lang_h) $(target_h) $(language_h) $(demangle_h) $(c_lang_h) \
- $(typeprint_h) $(cp_abi_h) $(gdb_string_h)
-m2-valprint.o: m2-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(value_h) $(valprint_h) $(language_h) \
- $(typeprint_h) $(c_lang_h) $(m2_lang_h) $(target_h)
-m32c-tdep.o: m32c-tdep.c $(defs_h) $(gdb_assert_h) $(elf_bfd_h) \
- $(elf_m32c_h) $(gdb_sim_m32c_h) $(dis_asm_h) $(gdbtypes_h) \
- $(regcache_h) $(arch_utils_h) $(frame_h) $(frame_unwind_h) \
- $(dwarf2_frame_h) $(dwarf2expr_h) $(symtab_h) $(gdbcore_h) \
- $(value_h) $(reggroups_h) $(prologue_value_h) $(target_h)
-m32r-linux-nat.o: m32r-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \
- $(gregset_h) $(m32r_tdep_h) $(target_h)
-m32r-linux-tdep.o: m32r-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
- $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \
- $(regset_h) $(gdb_string_h) $(glibc_tdep_h) $(solib_svr4_h) \
- $(symtab_h) $(trad_frame_h) $(frame_unwind_h) $(m32r_tdep_h)
-m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(exceptions_h) \
- $(monitor_h) $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) \
- $(symfile_h) $(gdb_string_h) $(objfiles_h) $(inferior_h) \
- $(regcache_h)
-m32r-stub.o: m32r-stub.c $(syscall_h)
-m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
- $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
- $(gdb_string_h) $(value_h) $(inferior_h) $(symfile_h) $(objfiles_h) \
- $(osabi_h) $(language_h) $(arch_utils_h) $(regcache_h) \
- $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) $(m32r_tdep_h)
-m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
- $(frame_base_h) $(dwarf2_frame_h) $(trad_frame_h) $(symtab_h) \
- $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
- $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \
- $(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \
- $(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h)
-m68kbsd-nat.o: m68kbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h) $(gdb_assert_h) $(m68k_tdep_h) $(inf_ptrace_h) \
- $(bsd_kvm_h)
-m68kbsd-tdep.o: m68kbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
- $(osabi_h) $(regcache_h) $(regset_h) $(trad_frame_h) \
- $(tramp_frame_h) $(gdbtypes_h) $(gdb_assert_h) $(gdb_string_h) \
- $(m68k_tdep_h) $(solib_svr4_h)
-m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
- $(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \
- $(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \
- $(gregset_h) $(target_h) $(linux_nat_h)
-m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \
- $(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \
- $(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \
- $(m68k_tdep_h) $(trad_frame_h) $(frame_unwind_h) $(glibc_tdep_h) \
- $(solib_svr4_h) $(observer_h) $(elf_common_h) $(auxv_h)
-m68k-stub.o: m68k-stub.c
-m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \
- $(frame_base_h) $(frame_unwind_h) $(gdbtypes_h) $(symtab_h) \
- $(gdbcore_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \
- $(inferior_h) $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) \
- $(m68k_tdep_h) $(target_descriptions_h)
-m88kbsd-nat.o: m88kbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(target_h) $(m88k_tdep_h) $(inf_ptrace_h)
-m88k-tdep.o: m88k-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) $(frame_h) \
- $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \
- $(regcache_h) $(regset_h) $(symtab_h) $(trad_frame_h) $(value_h) \
- $(gdb_assert_h) $(gdb_string_h) $(m88k_tdep_h)
-macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \
- $(command_h) $(gdbcmd_h)
-macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
- $(macroexp_h) $(gdb_assert_h)
-macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(source_h) \
- $(target_h) $(frame_h) $(inferior_h) $(complaints_h)
-macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \
- $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \
- $(bcache_h) $(complaints_h)
-main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \
- $(gdbcore_h) $(exceptions_h) $(getopt_h) $(gdb_stat_h) \
- $(gdb_string_h) $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h)
-maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \
- $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \
- $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h)
-mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
- $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) $(stabsread_h) \
- $(complaints_h) $(demangle_h) $(gdb_assert_h) $(block_h) \
- $(dictionary_h) $(mdebugread_h) $(gdb_stat_h) $(gdb_string_h) \
- $(bfd_h) $(coff_ecoff_h) $(libaout_h) $(aout_aout64_h) \
- $(aout_stab_gnu_h) $(expression_h)
-memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \
- $(target_h) $(value_h) $(language_h) $(vec_h) $(gdb_string_h)
-mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
- $(target_h)
-mep-tdep.o: $(defs_h) $(frame_h) $(frame_unwind_h) $(frame_base_h) \
- $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) \
- $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \
- $(language_h) $(arch_utils_h) $(regcache_h) $(remote_h) \
- $(floatformat_h) $(sim_regno_h) $(disasm_h) $(trad_frame_h) \
- $(reggroups_h) $(elf_bfd_h) $(elf_mep_h) $(gdb_assert_h) \
- $(mep_desc_h) $(mep_opc_h) $(prologue_value_h) $(infcall_h)
-mingw-hdep.o: mingw-hdep.c $(defs_h) $(serial_h) $(event_loop_h) \
- $(gdb_assert_h) $(gdb_select_h) $(gdb_string_h) $(readline_h)
-minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
- $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h) \
- $(target_h)
-mips64obsd-nat.o: mips64obsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(target_h) $(mips_tdep_h) $(inf_ptrace_h)
-mips64obsd-tdep.o: mips64obsd-tdep.c $(defs_h) $(osabi_h) $(regcache_h) \
- $(regset_h) $(trad_frame_h) $(tramp_frame_h) $(gdb_assert_h) \
- $(gdb_string_h) $(mips_tdep_h) $(solib_svr4_h)
-mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
- $(solib_h) $(solib_irix_h) $(elf_bfd_h)
-mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) $(target_h) \
- $(regcache_h) $(linux_nat_h) $(gdb_proc_service_h) $(gregset_h) \
- $(mips_linux_tdep_h) $(inferior_h) $(target_descriptions_h) \
- $(mips_linux_c) $(mips64_linux_c)
-mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \
- $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \
- $(gdb_assert_h) $(frame_h) $(regcache_h) $(trad_frame_h) \
- $(tramp_frame_h) $(gdbtypes_h) $(solib_h) $(symtab_h) \
- $(mips_linux_tdep_h) $(solist_h) $(solib_svr4_h) \
- $(target_descriptions_h)
-mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(target_h) $(mips_tdep_h) $(mipsnbsd_tdep_h) $(inf_ptrace_h)
-mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(regset_h) $(target_h) $(value_h) $(osabi_h) $(gdb_assert_h) \
- $(gdb_string_h) $(nbsd_tdep_h) $(mipsnbsd_tdep_h) $(mips_tdep_h) \
- $(solib_svr4_h)
-mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
- $(objfiles_h) $(buildsym_h) $(stabsread_h) $(coff_sym_h) \
- $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) $(libecoff_h) \
- $(elf_common_h) $(elf_mips_h)
-mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
- $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \
- $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \
- $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \
- $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \
- $(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \
- $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(infcall_h) \
- $(floatformat_h) $(remote_h) $(target_descriptions_h) \
- $(dwarf2_frame_h) $(user_regs_h)
-memory-map.o: memory-map.c $(defs_h) $(memory_map_h) $(xml_support_h) \
- $(gdb_assert_h) $(exceptions_h) $(gdb_string_h)
-mn10300-linux-tdep.o: mn10300-linux-tdep.c $(defs_h) $(gdbcore_h) \
- $(gdb_string_h) $(regcache_h) $(mn10300_tdep_h) $(gdb_assert_h) \
- $(bfd_h) $(elf_bfd_h) $(osabi_h) $(regset_h) $(solib_svr4_h) \
- $(frame_h) $(trad_frame_h) $(tramp_frame_h)
-mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \
- $(gdbtypes_h) $(regcache_h) $(gdb_string_h) $(gdb_assert_h) \
- $(gdbcore_h) $(value_h) $(gdbtypes_h) \
- $(frame_h) $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) \
- $(symtab_h) $(dwarf2_frame_h) $(osabi_h) $(target_h) $(mn10300_tdep_h)
-monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(exceptions_h) \
- $(gdb_string_h) $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) \
- $(inferior_h) $(gdb_regex_h) $(srec_h) $(regcache_h) $(gdbthread_h)
-mt-tdep.o: mt-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) $(frame_base_h) \
- $(symtab_h) $(dis_asm_h) $(arch_utils_h) $(gdbtypes_h) \
- $(gdb_string_h) $(regcache_h) $(reggroups_h) $(gdbcore_h) \
- $(trad_frame_h) $(inferior_h) $(dwarf2_frame_h) $(infcall_h) \
- $(gdb_assert_h) $(language_h)
-nbsd-nat.o: nbsd-nat.c $(defs_h) $(nbsd_nat_h)
-nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h)
-nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(exceptions_h) \
- $(gdb_string_h) $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) \
- $(gdbthread_h) $(nto_tdep_h) $(command_h) $(regcache_h) $(solib_h)
-nto-tdep.o: nto-tdep.c $(defs_h) $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) \
- $(top_h) \
- $(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \
- $(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h) $(objfiles_h)
-objc-exp.o: objc-exp.c $(defs_h) $(gdb_string_h) $(expression_h) \
- $(objc_lang_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \
- $(bfd_h) $(symfile_h) $(objfiles_h) $(top_h) $(completer_h) \
- $(block_h)
-objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \
- $(exceptions_h) $(complaints_h) $(value_h) $(symfile_h) \
- $(objfiles_h) $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) \
- $(frame_h) $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) \
- $(valprint_h) $(gdb_assert_h)
-objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
- $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(mdebugread_h) \
- $(gdb_assert_h) $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) \
- $(hashtab_h) $(breakpoint_h) $(block_h) $(dictionary_h) $(source_h) \
- $(parser_defs_h) $(expression_h) $(addrmap_h) $(arch_utils_h) \
- $(exec_h)
-observer.o: observer.c $(defs_h) $(observer_h) $(command_h) $(gdbcmd_h) \
- $(observer_inc)
-obsd-tdep.o: obsd-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(obsd_tdep_h)
-osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \
- $(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h)
-parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \
- $(f_lang_h) $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \
- $(doublest_h) $(gdb_assert_h) $(block_h) $(source_h) $(objfiles_h) \
- $(exceptions_h)
-p-exp.o: p-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \
- $(parser_defs_h) $(language_h) $(p_lang_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(block_h)
-p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \
- $(valprint_h) $(value_h)
-posix-hdep.o: posix-hdep.c $(defs_h) $(event_loop_h) $(gdb_string_h) \
- $(gdb_select_h)
-ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
- $(serial_h) $(regcache_h)
-ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \
- $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_assert_h) \
- $(gdb_wait_h) $(gregset_h) $(ppc_tdep_h) $(ppc_linux_tdep_h) \
- $(target_h) $(linux_nat_h)
-ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
- $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
- $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(regset_h) \
- $(solib_svr4_h) $(ppc_tdep_h) $(ppc_linux_tdep_h) $(trad_frame_h) \
- $(frame_unwind_h) $(tramp_frame_h) \
- $(powerpc_32l_c) $(powerpc_altivec32l_c) $(powerpc_e500l_c) \
- $(powerpc_64l_c) $(powerpc_altivec64l_c)
-ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(gdb_assert_h) \
- $(gdbcore_h) $(regcache_h) $(bsd_kvm_h) $(ppc_tdep_h) \
- $(ppcnbsd_tdep_h) $(inf_ptrace_h)
-ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(gdb_types_h) \
- $(osabi_h) $(regcache_h) $(regset_h) $(trad_frame_h) \
- $(tramp_frame_h) $(gdb_assert_h) $(gdb_string_h) \
- $(ppc_tdep_h) $(ppcnbsd_tdep_h) $(solib_svr4_h)
-ppcobsd-nat.o: ppcobsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h) $(gdb_assert_h) $(ppc_tdep_h) $(ppcobsd_tdep_h) \
- $(bsd_kvm_h) $(inf_ptrace_h)
-ppcobsd-tdep.o: ppcobsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbtypes_h) \
- $(frame_h) $(frame_unwind_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(symtab_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \
- $(ppc_tdep_h) $(ppcobsd_tdep_h) $(solib_svr4_h)
-ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \
- $(ppc_tdep_h) $(target_h) $(objfiles_h) $(infcall_h)
-printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
- $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \
- $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \
- $(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \
- $(gdb_assert_h) $(block_h) $(disasm_h) $(tui_h)
-proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \
- $(proc_utils_h)
-proc-events.o: proc-events.c $(defs_h)
-proc-flags.o: proc-flags.c $(defs_h)
-procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
- $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(regcache_h) $(gdb_wait_h) \
- $(gdb_string_h) $(gdb_assert_h) $(inflow_h) $(auxv_h) \
- $(gdb_dirent_h) $(gdb_stat_h) $(proc_utils_h) $(gregset_h)
-proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \
- $(symtab_h) $(target_h) $(regcache_h) $(gregset_h) $(gdbcore_h)
-proc-why.o: proc-why.c $(defs_h) $(proc_utils_h)
-prologue-value.o: prologue-value.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
- $(prologue_value_h) $(regcache_h)
-p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
- $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h)
-p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
- $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \
- $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h) \
- $(cp_support_h)
-regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
- $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \
- $(gdb_string_h) $(gdbcmd_h) $(observer_h) $(record_h)
-reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \
- $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h)
-regset.o: regset.c $(defs_h) $(regset_h) $(gdb_assert_h)
-remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \
- $(symfile_h) $(exceptions_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \
- $(gdb_stabs_h) $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) \
- $(gdb_assert_h) $(event_loop_h) $(event_top_h) $(inf_loop_h) \
- $(serial_h) $(gdbcore_h) $(remote_fileio_h) $(solib_h) $(observer_h) \
- $(cli_decode_h) $(cli_setshow_h) $(memory_map_h) \
- $(target_descriptions_h) $(gdb_fileio_h)
-remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
- $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \
- $(exceptions_h) $(remote_fileio_h) $(event_loop_h)
-remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h)
-remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \
- $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(exceptions_h) \
- $(gdb_string_h) $(gdb_stat_h) $(regcache_h) \
- $(mips_tdep_h)
-remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) \
- $(gdb_string_h) $(terminal_h) $(target_h) $(gdbcore_h) \
- $(gdb_callback_h) $(gdb_remote_sim_h) $(command_h) \
- $(regcache_h) $(gdb_assert_h) $(sim_regno_h) $(arch_utils_h) \
- $(readline_h) $(gdbthread_h)
-reverse.o: reverse.c $(defs_h) $(gdb_string_h) $(target_h) $(cli_cmds_h) \
- $(cli_decode_h) $(top_h)
-rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
- $(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \
- $(exceptions_h) $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) \
- $(inf_ptrace_h) $(ppc_tdep_h) $(rs6000_tdep_h) $(exec_h) \
- $(observer_h) $(gdb_stat_h)
-rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
- $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) $(arch_utils_h) \
- $(regcache_h) $(regset_h) $(doublest_h) $(value_h) $(parser_defs_h) \
- $(osabi_h) $(infcall_h) $(sim_regno_h) $(gdb_sim_ppc_h) \
- $(reggroups_h) $(libbfd_h) $(coff_internal_h) $(libcoff_h) \
- $(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) \
- $(ppc_tdep_h) $(gdb_assert_h) $(dis_asm_h) $(trad_frame_h) \
- $(frame_unwind_h) $(frame_base_h) $(dwarf2_frame_h) \
- $(target_descriptions) $(user_regs_h) $(elf_ppc_h) \
- $(powerpc_32_c) $(powerpc_altivec32_c) $(powerpc_403_c) \
- $(powerpc_403gc_c) $(powerpc_505_c) $(powerpc_601_c) \
- $(powerpc_602_c) $(powerpc_603_c) $(powerpc_604_c) \
- $(powerpc_64_c) $(powerpc_altivec64_c) $(powerpc_7400_c) \
- $(powerpc_750_c) $(powerpc_860_c) $(powerpc_e500_c) $(rs6000_c)
-rs6000-aix-tdep.o: rs6000-aix-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert) \
- $(osabi_h) $(regcache_h) $(regset_h) $(gdbtypes_h) $(gdbcore_h) \
- $(target_h) $(value_h) $(infcall_h) $(objfiles_h) $(breakpoint_h) \
- $(rs6000_tdep_h) $(ppc_tdep_h)
-s390-nat.o: s390-nat.c $(defs_h) $(regcache_h) $(inferior_h) \
- $(s390_tdep_h) $(target_h) $(linux_nat_h)
-s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
- $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \
- $(floatformat_h) $(regcache_h) $(trad_frame_h) $(frame_base_h) \
- $(frame_unwind_h) $(dwarf2_frame_h) $(reggroups_h) $(regset_h) \
- $(value_h) $(gdb_assert_h) $(dis_asm_h) $(solib_svr4_h) \
- $(prologue_value_h) $(s390_tdep_h)
-scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \
- $(scm_tags_h)
-scm-lang.o: scm-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \
- $(scm_tags_h) $(source_h) $(gdb_string_h) $(gdbcore_h) $(infcall_h)
-scm-valprint.o: scm-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(parser_defs_h) $(language_h) $(value_h) \
- $(scm_lang_h) $(valprint_h) $(gdbcore_h) $(c_lang_h)
-score-tdep.o: score-tdep.c $(defs_h) $(gdb_assert_h) $(inferior_h) \
- $(symtab_h) $(objfiles_h) $(gdbcore_h) $(target_h) \
- $(arch_utils_h) $(regcache_h) $(dis_asm_h) $(frame_unwind_h) \
- $(frame_base_h) $(trad_frame_h) $(dwarf2_frame_h) $(score_tdep_h)
-sentinel-frame.o: sentinel-frame.c $(defs_h) $(regcache_h) \
- $(sentinel_frame_h) $(inferior_h) $(frame_unwind_h)
-ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h)
-serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h)
-ser-base.o: ser-base.c $(defs_h) $(serial_h) $(ser_base_h) $(event_loop_h) \
- $(gdb_select_h) $(gdb_string_h)
-ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_base_h) $(ser_unix_h) \
- $(gdb_vfork_h) $(gdb_string_h)
-ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_base_h) $(ser_tcp_h) \
- $(gdb_string_h)
-ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_base_h) $(ser_unix_h) \
- $(terminal_h) $(gdb_select_h) $(gdb_string_h) $(gdbcmd_h)
-ser-mingw.o: ser-mingw.c $(defs_h) $(serial_h) $(ser_base_h) \
- $(ser_tcp_h) $(gdb_assert_h) $(gdb_string_h)
-sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
- $(frame_unwind_h) $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) \
- $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) $(inferior_h) \
- $(gdb_string_h) $(gdb_assert_h) $(arch_utils_h) $(regcache_h) \
- $(osabi_h) $(elf_bfd_h) $(elf_sh_h) $(gdb_sim_sh_h) $(language_h)
-shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \
- $(shnbsd_tdep_h) $(inf_ptrace_h) $(regcache_h)
-shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(regset_h) \
- $(value_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) $(sh_tdep_h) \
- $(shnbsd_tdep_h) $(solib_svr4_h)
-sh-stub.o: sh-stub.c
-sh-linux-tdep.o: sh-linux-tdep.c $(defs_h) $(osabi_h) $(solib_svr4_h) \
- $(symtab_h) $(glibc_tdep_h)
-sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
- $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
- $(value_h) $(dis_asm_h) $(inferior_h) $(gdb_string_h) \
- $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) $(regcache_h) \
- $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \
- $(elf_sh_h) $(gdb_sim_sh_h) $(reggroups_h)
-sol2-tdep.o: sol2-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(sol2_tdep_h)
-solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(exceptions_h) $(gdbcore_h) $(command_h) $(target_h) \
- $(frame_h) $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) \
- $(gdbcmd_h) $(completer_h) $(filenames_h) $(exec_h) $(solist_h) \
- $(observer_h) $(readline_h)
-solib-frv.o: solib-frv.c $(defs_h) $(gdb_string_h) $(inferior_h) \
- $(gdbcore_h) $(solist_h) $(frv_tdep_h) $(objfiles_h) $(symtab_h) \
- $(language_h) $(command_h) $(gdbcmd_h) $(elf_frv_h) $(solib_h)
-solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) \
- $(solib_h) $(solib_irix_h)
-solib-null.o: solib-null.c $(defs_h) $(solist_h)
-solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
- $(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h)
-solib-pa64.o: solib-pa64.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(hppa_tdep_h) \
- $(solist_h) $(solib_h) $(solib_pa64_h)
-solib-som.o: solib-som.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
- $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) \
- $(hppa_tdep_h) $(solist_h) $(solib_h)
-solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
- $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \
- $(bcache_h) $(regcache_h)
-solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
- $(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
- $(gdbcore_h) $(target_h) $(inferior_h) $(gdb_assert_h) \
- $(solist_h) $(solib_h) $(solib_svr4_h) $(bfd_target_h) $(elf_bfd_h) \
- $(exec_h) $(auxv_h)
-solib-target.o: solib-target.c $(defs_h) $(objfiles_h) $(solist_h) \
- $(symtab_h) $(symfile_h) $(target_h) $(vec_h) $(xml_support_h) \
- $(solib_target_h) $(gdb_string_h)
-sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
- $(inferior_h) $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) \
- $(solib_h) $(symfile_h) $(observer_h) $(gdb_string_h) $(gregset_h)
-somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
- $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \
- $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h) \
- $(solib_som_h)
-source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \
- $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \
- $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \
- $(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \
- $(filenames_h) $(completer_h) $(ui_out_h) $(readline_h) \
- $(gdb_assert_h)
-sparc64fbsd-nat.o: sparc64fbsd-nat.c $(defs_h) $(regcache_h) $(target_h) \
- $(fbsd_nat_h) $(sparc64_tdep_h) $(sparc_nat_h) $(bsd_kvm_h)
-sparc64fbsd-tdep.o: sparc64fbsd-tdep.c $(defs_h) $(frame_h) \
- $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \
- $(sparc64_tdep_h) $(solib_svr4_h)
-sparc64-linux-nat.o: sparc64-linux-nat.c $(defs_h) $(regcache_h) \
- $(gregset_h) $(sparc64_tdep_h) $(sparc_tdep_h) \
- $(sparc_nat_h) $(inferior_h) $(target_h) $(linux_nat_h)
-sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(frame_h) \
- $(frame_unwind_h) $(dwarf2_frame_h) $(regset_h) $(regcache_h) \
- $(gdbarch_h) $(gdbcore_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) \
- $(trad_frame_h) $(tramp_frame_h) $(sparc64_tdep_h)
-sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \
- $(sparc_nat_h)
-sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
- $(target_h) $(sparc64_tdep_h) $(sparc_nat_h) $(bsd_kvm_h)
-sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \
- $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(symtab_h) $(objfiles_h) $(solib_svr4_h) $(trad_frame_h) \
- $(gdb_assert_h) $(gdb_string_h) $(sparc64_tdep_h) $(nbsd_tdep_h)
-sparc64obsd-tdep.o: sparc64obsd-tdep.c $(defs_h) $(frame_h) \
- $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(symtab_h) $(objfiles_h) $(trad_frame_h) $(gdb_assert_h) \
- $(obsd_tdep_h) $(sparc64_tdep_h) $(solib_svr4_h) $(bsd_uthread_h)
-sparc64-sol2-tdep.o: sparc64-sol2-tdep.c $(defs_h) $(frame_h) \
- $(frame_unwind_h) $(gdbarch_h) $(symtab_h) $(objfiles_h) $(osabi_h) \
- $(trad_frame_h) $(gdb_assert_h) $(sol2_tdep_h) $(sparc64_tdep_h) \
- $(solib_svr4_h)
-sparc64-tdep.o: sparc64-tdep.c $(defs_h) $(arch_utils_h) $(dwarf2_frame_h) \
- $(floatformat_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
- $(gdbcore_h) $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) \
- $(osabi_h) $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) \
- $(gdb_string_h) $(sparc64_tdep_h)
-sparc-linux-nat.o: sparc-linux-nat.c $(defs_h) $(regcache_h) $(gregset_h) \
- $(sparc_tdep_h) $(sparc_nat_h) $(inferior_h) $(target_h) \
- $(linux_nat_h)
-sparc-linux-tdep.o: sparc-linux-tdep.c $(defs_h) $(dwarf2_frame_h) \
- $(gdbtypes_h) $(frame_h) $(frame_unwind_h) $(regset_h) \
- $(gdbarch_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(solib_svr4_h) \
- $(symtab_h) $(trad_frame_h) $(tramp_frame_h) $(sparc_tdep_h)
-sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \
- $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) $(sparc_tdep_h) \
- $(sparc_nat_h) $(inf_ptrace_h)
-sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(regcache_h) $(target_h) \
- $(sparc_tdep_h) $(sparc_nat_h) $(bsd_kvm_h)
-sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
- $(gdbcore_h) $(gdbtypes_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \
- $(gdb_string_h) $(sparc_tdep_h) $(nbsd_tdep_h)
-sparcobsd-tdep.o: sparcobsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \
- $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) \
- $(symtab_h) $(trad_frame_h) $(gdb_assert_h) $(obsd_tdep_h) \
- $(sparc_tdep_h) $(solib_svr4_h) $(bsd_uthread_h)
-sparc-sol2-nat.o: sparc-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \
- $(sparc_tdep_h) $(sparc64_tdep_h)
-sparc-sol2-tdep.o: sparc-sol2-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
- $(gdbcore_h) $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) \
- $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \
- $(sol2_tdep_h) $(sparc_tdep_h) $(solib_svr4_h)
-sparc-stub.o: sparc-stub.c
-sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \
- $(dwarf2_frame_h) $(floatformat_h) $(frame_h) $(frame_base_h) \
- $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) $(inferior_h) \
- $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) $(target_h) \
- $(value_h) $(gdb_assert_h) $(gdb_string_h) $(sparc_tdep_h)
-spu-linux-nat.o: spu-linux-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h) \
- $(target_h) $(inferior_h) $(inf_ptrace_h) $(regcache_h) $(symfile_h) \
- $(gdb_wait_h) $(gdbthread_h) $(spu_tdep_h)
-spu-tdep.o: spu-tdep.c $(defs_h) $(arch_utils_h) $(gdbtypes_h) $(gdbcmd_h) \
- $(gdbcore_h) $(gdb_string_h) $(gdb_assert_h) $(frame_h) \
- $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(symtab_h) \
- $(symfile_h) $(value_h) $(inferior_h) $(dis_asm_h) $(objfiles_h) \
- $(language_h) $(regcache_h) $(reggroups_h) $(floatformat_h) \
- $(observer_h) $(spu_tdep_h)
-stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
- $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \
- $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \
- $(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \
- $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h) \
- $(gdb_assert_h)
-stack.o: stack.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) $(gdbcore_h) \
- $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) $(inferior_h) \
- $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) $(dictionary_h) \
- $(exceptions_h) $(reggroups_h) $(regcache_h) $(solib_h) \
- $(valprint_h) $(gdb_assert_h) $(gdb_string_h)
-std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \
- $(value_h) $(gdb_string_h)
-symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \
- $(gdbcore_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) \
- $(objfiles_h) $(source_h) $(gdbcmd_h) $(breakpoint_h) $(language_h) \
- $(complaints_h) $(demangle_h) $(inferior_h) $(filenames_h) \
- $(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \
- $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \
- $(gdb_string_h) $(gdb_stat_h) $(observer_h) $(exec_h) \
- $(parser_defs_h) $(varobj_h) $(elf_bfd_h) $(solib_h)
-symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \
- $(objfiles_h) $(exceptions_h) $(gdbcmd_h) $(target_h) $(value_h) \
- $(symfile_h) $(observer_h) $(auxv_h) $(elf_common_h)
-symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
- $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
- $(gdb_obstack_h) $(exceptions_h) $(language_h) $(bcache_h) \
- $(block_h) $(gdb_regex_h) $(gdb_stat_h) $(dictionary_h) \
- $(gdb_string_h) $(readline_h)
-symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
- $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
- $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \
- $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \
- $(filenames_h) $(objc_lang_h) $(ada_lang_h) $(hashtab_h) \
- $(gdb_obstack_h) $(block_h) $(dictionary_h) $(gdb_string_h) \
- $(gdb_stat_h) $(cp_abi_h) $(observer_h) $(gdb_assert_h) \
- $(solist_h) $(p_lang_h) $(addrmap_h)
-target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \
- $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
- $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) \
- $(exceptions_h) $(target_descriptions_h) $(gdbthread_h) $(record_h)
-target-descriptions.o: target-descriptions.c $(defs_h) $(arch_utils_h) \
- $(target_h) $(target_descriptions_h) $(vec_h) $(xml_tdesc_h) \
- $(gdbcmd_h) $(gdb_assert_h) $(gdbtypes_h) $(reggroups_h) \
- $(xml_support_h) $(gdb_obstack_h) $(hashtab_h)
-target-memory.o: target-memory.c $(defs_h) $(vec_h) $(target_h) \
- $(memory_map_h) $(gdb_assert_h)
-thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \
- $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(exceptions_h) \
- $(command_h) $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) \
- $(ui_out_h) $(observer_h) $(annotate_h) $(cli_decode_h)
-top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \
- $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \
- $(inferior_h) $(exceptions_h) $(target_h) $(breakpoint_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(language_h) $(terminal_h) \
- $(annotate_h) $(completer_h) $(top_h) $(version_h) $(serial_h) \
- $(doublest_h) $(gdb_assert_h) $(readline_h) $(readline_history_h) \
- $(event_top_h) $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) \
- $(cli_out_h) $(main_h) $(event_loop_h) $(gdbthread_h)
-tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \
- $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \
- $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \
- $(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \
- $(block_h) $(dictionary_h) $(ax_h) $(ax_gdb_h) $(readline_h) \
- $(readline_history_h)
-trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \
- $(regcache_h) $(frame_unwind_h) $(value_h)
-tramp-frame.o: tramp-frame.c $(defs_h) $(tramp_frame_h) $(frame_unwind_h) \
- $(gdbcore_h) $(symtab_h) $(objfiles_h) $(target_h) $(trad_frame_h) \
- $(frame_base_h) $(gdb_assert_h)
-typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
- $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \
- $(gdb_string_h)
-ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h)
-ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
- $(ui_out_h) $(gdb_assert_h)
-user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \
- $(gdb_string_h) $(gdb_assert_h) $(frame_h)
-utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \
- $(exceptions_h) $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) \
- $(target_h) $(demangle_h) $(expression_h) $(language_h) $(charset_h) \
- $(annotate_h) $(filenames_h) $(symfile_h) $(inferior_h) $(top_h) \
- $(gdb_curses_h) $(readline_h) $(gdb_obstack_h) $(gdbcore_h)
-v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(trad_frame_h) \
- $(frame_unwind_h) $(dwarf2_frame_h) $(gdbtypes_h) $(inferior_h) \
- $(gdb_string_h) $(gdb_assert_h) $(gdbcore_h) $(arch_utils_h) \
- $(regcache_h) $(dis_asm_h) $(osabi_h)
-valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \
- $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \
- $(doublest_h) $(dfp_h) $(infcall_h)
-valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \
- $(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \
- $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(block_h) $(infcall_h) \
- $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \
- $(cp_support_h) $(observer_h) $(dfp_h)
-valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \
- $(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h) \
- $(exceptions_h) $(dfp_h)
-value.o: value.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
- $(value_h) $(gdbcore_h) $(command_h) $(gdbcmd_h) $(target_h) \
- $(language_h) $(demangle_h) $(doublest_h) \
- $(gdb_assert_h) $(regcache_h) $(block_h) $(dfp_h) $(objfiles_h)
-varobj.o: varobj.c $(defs_h) $(exceptions_h) $(value_h) $(expression_h) \
- $(frame_h) $(language_h) $(wrapper_h) $(gdbcmd_h) $(block_h) \
- $(gdb_assert_h) $(gdb_string_h) $(varobj_h) $(vec_h) $(gdbthread_h) \
- $(inferior_h)
-vaxbsd-nat.o: vaxbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \
- $(vax_tdep_h) $(inf_ptrace_h) $(bsd_kvm_h)
-vax-nat.o: vax-nat.c $(defs_h) $(inferior_h) $(gdb_assert_h) $(vax_tdep_h) \
- $(inf_ptrace_h)
-vaxnbsd-tdep.o: vaxnbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
- $(vax_tdep_h) $(solib_svr4_h) $(gdb_string_h)
-vaxobsd-tdep.o: vaxobsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
- $(frame_unwind_h) $(osabi_h) $(symtab_h) $(trad_frame_h) \
- $(vax_tdep_h) $(gdb_string_h)
-vax-tdep.o: vax-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \
- $(floatformat_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
- $(gdbcore_h) $(gdbtypes_h) $(osabi_h) $(regcache_h) $(regset_h) \
- $(trad_frame_h) $(value_h) $(gdb_string_h) $(vax_tdep_h)
-vec.o: vec.c $(defs_h) $(vec_h)
-win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
- $(exceptions_h) $(gdbcore_h) $(command_h) $(completer_h) \
- $(regcache_h) $(top_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
- $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(solist_h) \
- $(solib_h) $(i386_tdep_h) $(i387_tdep_h) $(gdb_obstack_h) \
- $(xml_support_h) $(i386_cygwin_tdep_h)
-win32-termcap.o: win32-termcap.c
-wrapper.o: wrapper.c $(defs_h) $(value_h) $(exceptions_h) $(wrapper_h) \
- $(ui_out_h)
-xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
- $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \
- $(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \
- $(objfiles_h) $(buildsym_h) $(stabsread_h) $(expression_h) \
- $(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h)
-xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \
- $(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h)
-xml-tdesc.o: xml-tdesc.c $(defs_h) $(target_h) $(target_descriptions_h) \
- $(xml_tdesc_h) $(xml_support_h) $(filenames_h) $(gdb_assert_h) \
- $(gdbtypes_h)
-xml-support.o: xml-support.c $(defs_h) $(xml_support_h) $(exceptions_h) \
- $(gdbcmd_h) $(gdb_string_h) $(gdb_expat_h) $(safe_ctype_h)
-xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
- $(frame_unwind_h) $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) \
- $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) $(inferior_h) \
- $(gdb_string_h) $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) \
- $(regcache_h) $(doublest_h) $(osabi_h) $(objfiles_h)
-xtensa-linux-nat.o: xtensa-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \
- $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_assert_h) \
- $(gdb_wait_h) $(gregset_h) $(ppc_tdep_h) $(target_h) \
- $(linux_nat_h) $(xtensa_tdep_h) xtensa-xtregs.c
-xtensa-linux-tdep.o: xtensa-linux-tdep.c $(defs_h) $(osabi_h) $(solib_svr4_h) \
- $(symtab_h) $(xtensa_tdep_h)
-xtensa-tdep.o: xtensa-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
- $(frame_unwind_h) $(frame_base_h) $(inferior_h) $(symtab_h) \
- $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) $(symfile_h) \
- $(objfiles_h) $(gdb_string_h) $(linespec_h) $(regcache_h) \
- $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) $(gdb_assert_h) \
- $(elf_bfd_h) $(xtensa_tdep_h) $(dwarf2_frame_h) $(solib_svr4_h)
-xtensa-config.o: $(defs_h) $(xtensa_tdep_h)
-record.o: record.c $(defs_h) $(target_h) $(gdbcmd_h) $(regcache_h) \
- $(inferior_h) $(gdbthread_h) $(record_h)
-linux-record.o: linux-record.c $(defs_h) $(target_h) $(regcache_h) \
- $(record_h) $(linux_record_h)
-
-#
# gdb/cli/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.
-cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(readline_h) \
- $(readline_tilde_h) $(completer_h) $(target_h) $(gdb_wait_h) \
- $(gdb_regex_h) $(gdb_string_h) $(gdb_vfork_h) $(linespec_h) \
- $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \
- $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \
- $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \
- $(tui_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
-cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
- $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \
- $(cli_cmds_h) $(cli_decode_h) $(tui_h) $(gdb_assert_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c
-cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \
- $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \
- $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c
-cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \
- $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) \
- $(exceptions_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c
-cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \
- $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c
-cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \
- $(ui_out_h) $(gdb_string_h) $(exceptions_h) $(top_h) $(cli_cmds_h) \
- $(cli_decode_h) $(cli_script_h) $(gdb_assert_h) $(breakpoint_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c
-cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(readline_tilde_h) \
- $(value_h) $(gdb_string_h) $(ui_out_h) $(cli_decode_h) $(cli_cmds_h) \
- $(cli_setshow_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c
-cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c
+cli-cmds.o: $(srcdir)/cli/cli-cmds.c
+ $(COMPILE) $(srcdir)/cli/cli-cmds.c
+ $(POSTCOMPILE)
+
+cli-decode.o: $(srcdir)/cli/cli-decode.c
+ $(COMPILE) $(srcdir)/cli/cli-decode.c
+ $(POSTCOMPILE)
+
+cli-dump.o: $(srcdir)/cli/cli-dump.c
+ $(COMPILE) $(srcdir)/cli/cli-dump.c
+ $(POSTCOMPILE)
+
+cli-interp.o: $(srcdir)/cli/cli-interp.c
+ $(COMPILE) $(srcdir)/cli/cli-interp.c
+ $(POSTCOMPILE)
+
+cli-logging.o: $(srcdir)/cli/cli-logging.c
+ $(COMPILE) $(srcdir)/cli/cli-logging.c
+ $(POSTCOMPILE)
+
+cli-script.o: $(srcdir)/cli/cli-script.c
+ $(COMPILE) $(srcdir)/cli/cli-script.c
+ $(POSTCOMPILE)
+
+cli-setshow.o: $(srcdir)/cli/cli-setshow.c
+ $(COMPILE) $(srcdir)/cli/cli-setshow.c
+ $(POSTCOMPILE)
+
#
# GDBTK sub-directory
@@ -3151,93 +1617,52 @@ insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \
gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
$(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
-gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \
- $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
- $(symtab_h) $(inferior_h) $(command_h) \
- $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \
- $(tracepoint_h) $(top_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(ITK_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
- $(srcdir)/gdbtk/generic/gdbtk.c \
- -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
-
-gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \
- $(srcdir)/gdbtk/generic/gdbtk.h \
- $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
- $(defs_h) $(breakpoint_h) $(tracepoint_h) \
- $(symfile_h) $(symtab_h) $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
- $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \
- -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
- $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
- $(defs_h) $(inferior_h) $(source_h) $(symfile_h) $(objfiles_h) \
- $(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \
- $(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \
- $(dis_asm_h) $(gdbcmd_h) $(varobj_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
- $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
- -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \
- $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
- $(symtab_h) $(inferior_h) $(command_h) \
- $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \
- $(tracepoint_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
- $(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c \
- $(defs_h) $(interps_h) $(ui_out_h) $(ui_file_h) \
- $(cli_out_h) $(gdb_string_h) $(cli_cmds_h) $(cli_decode_h) \
- $(srcdir)/gdbtk/generic/gdbtk.h
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS) \
- $(srcdir)/gdbtk/generic/gdbtk-interp.c
-
-gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c $(defs_h) $(main_h) \
- $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
- $(srcdir)/gdbtk/generic/gdbtk-main.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \
- $(srcdir)/gdbtk/generic/gdbtk.h \
- $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
- $(defs_h) $(frame_h) $(value_h) $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
- $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \
- -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \
- $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
- $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
- $(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \
- $(block_h) $(dictionary_h) $(varobj_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
- $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \
- -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \
- $(srcdir)/gdbtk/generic/gdbtk.h \
- $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
- $(defs_h) $(value_h) $(varobj_h) $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
- $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
- $(srcdir)/gdbtk/generic/gdbtk-varobj.c
-
-gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \
- $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
- $(defs_h) $(frame_h) $(value_h) $(varobj_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\
- $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
+all_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+ $(ITK_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
+ $(GDBTK_CFLAGS) \
+ -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \
+ -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
+
+gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk.c
+ $(POSTCOMPILE)
+
+gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-bp.c
+ $(POSTCOMPILE)
+
+gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-cmds.c
+ $(POSTCOMPILE)
+
+gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-hooks.c
+ $(POSTCOMPILE)
+
+gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-interp.c
+ $(POSTCOMPILE)
+
+gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-main.c
+ $(POSTCOMPILE)
+
+gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-register.c
+ $(POSTCOMPILE)
+
+gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-stack.c
+ $(POSTCOMPILE)
+
+gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-varobj.c
+ $(POSTCOMPILE)
+
+gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
+ $(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
+ $(POSTCOMPILE)
+
#
# gdb/mi/ dependencies
@@ -3245,62 +1670,69 @@ gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.
-mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
- $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
- $(mi_getopt_h) $(gdb_events_h) $(gdb_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c
-mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
- $(mi_cmds_h) $(mi_getopt_h) $(gdb_string_h) $(ui_out_h) $(disasm_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
-mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
- $(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \
- $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) \
- $(gdb_stat_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
-mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \
- $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h) $(objfiles_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c
-mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \
- $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c
-mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
- $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) \
- $(stack_h) $(dictionary_h) $(gdb_string_h) $(language_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
-mi-cmd-target.o: $(srcdir)/mi/mi-cmd-target.c $(defs_h) $(mi_cmds_h) \
- $(mi_getopt_h) $(remote_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-target.c
-mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
- $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) $(mi_getopt_h) \
- $(gdbthread_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c
-mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \
- $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c
-mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \
- $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c
-mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \
- $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \
- $(exceptions_h) $(mi_main_h) $(mi_cmds_h) $(mi_out_h) \
- $(mi_console_h) $(observer_h) $(gdbthread_h) $(interps_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c
-mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \
- $(gdb_string_h) $(exceptions_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) \
- $(mi_parse_h) $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) \
- $(interps_h) $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) \
- $(regcache_h) $(gdb_h) $(frame_h) $(mi_main_h) $(language_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
-mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
-mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \
- $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c
-mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) $(mi_cmds_h) \
- $(symtab_h) $(ui_out_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-symbol-cmds.c
-mi-common.o: $(srcdir)/mi/mi-common.c $(defs_h) $(mi_common_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-common.c
+mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c
+ $(COMPILE) $(srcdir)/mi/mi-cmd-break.c
+ $(POSTCOMPILE)
+
+mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c
+ $(COMPILE) $(srcdir)/mi/mi-cmd-disas.c
+ $(POSTCOMPILE)
+
+mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c
+ $(COMPILE) $(srcdir)/mi/mi-cmd-env.c
+ $(POSTCOMPILE)
+
+mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c
+ $(COMPILE) $(srcdir)/mi/mi-cmd-file.c
+ $(POSTCOMPILE)
+
+mi-cmds.o: $(srcdir)/mi/mi-cmds.c
+ $(COMPILE) $(srcdir)/mi/mi-cmds.c
+ $(POSTCOMPILE)
+
+mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c
+ $(COMPILE) $(srcdir)/mi/mi-cmd-stack.c
+ $(POSTCOMPILE)
+
+mi-cmd-target.o: $(srcdir)/mi/mi-cmd-target.c
+ $(COMPILE) $(srcdir)/mi/mi-cmd-target.c
+ $(POSTCOMPILE)
+
+mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c
+ $(COMPILE) $(srcdir)/mi/mi-cmd-var.c
+ $(POSTCOMPILE)
+
+mi-console.o: $(srcdir)/mi/mi-console.c
+ $(COMPILE) $(srcdir)/mi/mi-console.c
+ $(POSTCOMPILE)
+
+mi-getopt.o: $(srcdir)/mi/mi-getopt.c
+ $(COMPILE) $(srcdir)/mi/mi-getopt.c
+ $(POSTCOMPILE)
+
+mi-interp.o: $(srcdir)/mi/mi-interp.c
+ $(COMPILE) $(srcdir)/mi/mi-interp.c
+ $(POSTCOMPILE)
+
+mi-main.o: $(srcdir)/mi/mi-main.c
+ $(COMPILE) $(srcdir)/mi/mi-main.c
+ $(POSTCOMPILE)
+
+mi-out.o: $(srcdir)/mi/mi-out.c
+ $(COMPILE) $(srcdir)/mi/mi-out.c
+ $(POSTCOMPILE)
+
+mi-parse.o: $(srcdir)/mi/mi-parse.c
+ $(COMPILE) $(srcdir)/mi/mi-parse.c
+ $(POSTCOMPILE)
+
+mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c
+ $(COMPILE) $(srcdir)/mi/mi-symbol-cmds.c
+ $(POSTCOMPILE)
+
+mi-common.o: $(srcdir)/mi/mi-common.c
+ $(COMPILE) $(srcdir)/mi/mi-common.c
+ $(POSTCOMPILE)
#
# gdb/signals/ dependencies
@@ -3308,9 +1740,9 @@ mi-common.o: $(srcdir)/mi/mi-common.c $(defs_h) $(mi_common_h)
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.
-signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \
- $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c
+signals.o: $(srcdir)/signals/signals.c
+ $(COMPILE) $(srcdir)/signals/signals.c
+ $(POSTCOMPILE)
#
# gdb/tui/ dependencies
@@ -3318,90 +1750,136 @@ signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.
-tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_hooks_h) \
- $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) \
- $(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \
- $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \
- $(source_h) $(gdb_curses_h) $(readline_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c
-tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \
- $(tui_win_h) $(tui_io_h) $(gdb_curses_h) $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c
-tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \
- $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c
-tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \
- $(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \
- $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \
- $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c
-tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \
- $(tui_io_h) $(tui_h) $(gdb_string_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
-tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \
- $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \
- $(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \
- $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(observer_h) \
- $(tui_h) $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \
- $(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \
- $(tui_winsource_h) $(gdb_curses_h) $(readline_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c
-tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \
- $(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \
- $(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h) \
- $(exceptions_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
-tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(target_h) \
- $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(tui_h) \
- $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \
- $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \
- $(gdb_curses_h) $(readline_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c
-tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \
- $(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \
- $(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \
- $(tui_winsource_h) $(tui_disasm_h) $(gdb_string_h) $(gdb_curses_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c
-tui-main.o: $(srcdir)/tui/tui-main.c $(defs_h) $(main_h) $(gdb_string_h) \
- $(interps_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-main.c
-tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \
- $(gdb_string_h) $(gdb_assert_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c
-tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \
- $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \
- $(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \
- $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \
- $(reggroups_h) $(gdb_curses_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c
-tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \
- $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \
- $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) $(gdb_string_h) \
- $(gdb_curses_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-source.c
-tui-stack.o: $(srcdir)/tui/tui-stack.c $(defs_h) $(symtab_h) $(breakpoint_h) \
- $(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) \
- $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_stack_h) \
- $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) \
- $(gdb_curses_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-stack.c
-tui-win.o: $(srcdir)/tui/tui-win.c $(defs_h) $(command_h) $(symtab_h) \
- $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \
- $(tui_h) $(tui_data_h) $(tui_wingeneral_h) $(tui_stack_h) \
- $(tui_regs_h) $(tui_disasm_h) $(tui_source_h) $(tui_winsource_h) \
- $(tui_windata_h) $(gdb_curses_h) $(gdb_string_h) $(readline_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-win.c
-tui-windata.o: $(srcdir)/tui/tui-windata.c $(defs_h) $(tui_h) $(tui_data_h) \
- $(tui_wingeneral_h) $(tui_regs_h) $(gdb_string_h) $(gdb_curses_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-windata.c
-tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c $(defs_h) $(tui_h) \
- $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) $(gdb_curses_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-wingeneral.c
-tui-winsource.o: $(srcdir)/tui/tui-winsource.c $(defs_h) $(symtab_h) \
- $(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \
- $(tui_data_h) $(tui_stack_h) $(tui_win_h) $(tui_wingeneral_h) \
- $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) $(gdb_string_h) \
- $(gdb_curses_h) $(gdb_assert_h)
- $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c
+tui.o: $(srcdir)/tui/tui.c
+ $(COMPILE) $(srcdir)/tui/tui.c
+ $(POSTCOMPILE)
+
+tui-command.o: $(srcdir)/tui/tui-command.c
+ $(COMPILE) $(srcdir)/tui/tui-command.c
+ $(POSTCOMPILE)
+
+tui-data.o: $(srcdir)/tui/tui-data.c
+ $(COMPILE) $(srcdir)/tui/tui-data.c
+ $(POSTCOMPILE)
+
+tui-disasm.o: $(srcdir)/tui/tui-disasm.c
+ $(COMPILE) $(srcdir)/tui/tui-disasm.c
+ $(POSTCOMPILE)
+
+tui-file.o: $(srcdir)/tui/tui-file.c
+ $(COMPILE) $(srcdir)/tui/tui-file.c
+ $(POSTCOMPILE)
+
+tui-hooks.o: $(srcdir)/tui/tui-hooks.c
+ $(COMPILE) $(srcdir)/tui/tui-hooks.c
+ $(POSTCOMPILE)
+
+tui-interp.o: $(srcdir)/tui/tui-interp.c
+ $(COMPILE) $(srcdir)/tui/tui-interp.c
+ $(POSTCOMPILE)
+
+tui-io.o: $(srcdir)/tui/tui-io.c
+ $(COMPILE) $(srcdir)/tui/tui-io.c
+ $(POSTCOMPILE)
+
+tui-layout.o: $(srcdir)/tui/tui-layout.c
+ $(COMPILE) $(srcdir)/tui/tui-layout.c
+ $(POSTCOMPILE)
+
+tui-main.o: $(srcdir)/tui/tui-main.c
+ $(COMPILE) $(srcdir)/tui/tui-main.c
+ $(POSTCOMPILE)
+
+tui-out.o: $(srcdir)/tui/tui-out.c
+ $(COMPILE) $(srcdir)/tui/tui-out.c
+ $(POSTCOMPILE)
+
+tui-regs.o: $(srcdir)/tui/tui-regs.c
+ $(COMPILE) $(srcdir)/tui/tui-regs.c
+ $(POSTCOMPILE)
+
+tui-source.o: $(srcdir)/tui/tui-source.c
+ $(COMPILE) $(srcdir)/tui/tui-source.c
+ $(POSTCOMPILE)
+
+tui-stack.o: $(srcdir)/tui/tui-stack.c
+ $(COMPILE) $(srcdir)/tui/tui-stack.c
+ $(POSTCOMPILE)
+
+tui-win.o: $(srcdir)/tui/tui-win.c
+ $(COMPILE) $(srcdir)/tui/tui-win.c
+ $(POSTCOMPILE)
+
+tui-windata.o: $(srcdir)/tui/tui-windata.c
+ $(COMPILE) $(srcdir)/tui/tui-windata.c
+ $(POSTCOMPILE)
+
+tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c
+ $(COMPILE) $(srcdir)/tui/tui-wingeneral.c
+ $(POSTCOMPILE)
+
+tui-winsource.o: $(srcdir)/tui/tui-winsource.c
+ $(COMPILE) $(srcdir)/tui/tui-winsource.c
+ $(POSTCOMPILE)
+
+#
+# gdb/python/ dependencies
+#
+# Need to explicitly specify the compile rule as make will do nothing
+# or try to compile the object file into the sub-directory.
+
+# Flags needed to compile Python code
+PYTHON_CFLAGS=@PYTHON_CFLAGS@
+
+python.o: $(srcdir)/python/python.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python.c
+ $(POSTCOMPILE)
+
+python-utils.o: $(srcdir)/python/python-utils.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-utils.c
+ $(POSTCOMPILE)
+
+python-value.o: $(srcdir)/python/python-value.c
+ $(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-value.c
+ $(POSTCOMPILE)
+
+#
+# Dependency tracking. Most of this is conditional on GNU Make being
+# found by configure; if GNU Make is not found, we fall back to a
+# simpler scheme.
+#
+
+@GMAKE_TRUE@ifeq ($(DEPMODE),depmode=gcc3)
+# Note that we put the dependencies into a .Tpo file, then move them
+# into place if the compile succeeds. We need this because gcc does
+# not atomically write the dependency output file.
+@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
+@GMAKE_TRUE@ -MF $(DEPDIR)/$(basename $(@F)).Tpo
+@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
+@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po
+@GMAKE_TRUE@else
+@GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \
+@GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
+# depcomp handles atomicity for us, so we don't need a postcompile
+# step.
+@GMAKE_TRUE@override POSTCOMPILE =
+@GMAKE_TRUE@endif
+
+# A list of all the objects we might care about in this build, for
+# dependency tracking.
+all_object_files = gdb.o tui-main.o $(LIBGDB_OBS) gdbtk-main.o \
+ test-cp-name-parser.o
+
+# Ensure that generated files are created early. Use order-only
+# dependencies if available. They require GNU make 3.80 or newer,
+# and the .VARIABLES variable was introduced at the same time.
+@GMAKE_TRUE@ifdef .VARIABLES
+@GMAKE_TRUE@$(all_object_files): | $(generated_files)
+@GMAKE_TRUE@else
+$(all_object_files) : $(generated_files)
+@GMAKE_TRUE@endif
+
+# Dependencies.
+@GMAKE_TRUE@-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
### end of the gdb Makefile.in.
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index cae692a80c7..d81cdedf602 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -145,6 +145,11 @@ hppa*-*-*)
gdb_target_obs="hppa-tdep.o"
;;
+i[34567]86-*-darwin*)
+ # Target: Darwin/i386
+ gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o \
+ i386-darwin-tdep.o"
+ ;;
i[34567]86-*-dicos*)
# Target: DICOS/i386
gdb_target_obs="i386-tdep.o i387-tdep.o \
@@ -298,7 +303,7 @@ mips*-sgi-irix6*)
;;
mips*-*-linux*)
# Target: Linux/MIPS
- gdb_target_obs="mips-tdep.o mips-linux-tdep.o \
+ gdb_target_obs="mips-tdep.o mips-linux-tdep.o glibc-tdep.o \
corelow.o solib.o solib-svr4.o symfile-mem.o"
gdb_sim=../sim/mips/libsim.a
build_gdbserver=yes
@@ -412,6 +417,7 @@ sparc64-*-linux*)
gdb_target_obs="sparc64-tdep.o sparc64-sol2-tdep.o sol2-tdep.o \
sparc64-linux-tdep.o sparc-tdep.o sparc-sol2-tdep.o \
sparc-linux-tdep.o solib.o solib-svr4.o"
+ build_gdbserver=yes
;;
sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu)
# Target: FreeBSD/sparc64
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index de1a447ca24..c7589528c71 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-@c 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008
+@c 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
@c Free Software Foundation, Inc.
@c
@c %**start of header
@@ -144,6 +144,7 @@ software in general. We will miss him.
* Running:: Running programs under @value{GDBN}
* Stopping:: Stopping and continuing
* Reverse Execution:: Running programs backward
+* Process record and replay:: Recording inferior's execution and replaying it
* Stack:: Examining the stack
* Source:: Examining source files
* Data:: Examining data
@@ -160,7 +161,7 @@ software in general. We will miss him.
* Remote Debugging:: Debugging remote programs
* Configurations:: Configuration-specific information
* Controlling GDB:: Controlling @value{GDBN}
-* Sequences:: Canned sequences of commands
+* Extending GDB:: Extending @value{GDBN}
* Interpreters:: Command Interpreters
* TUI:: @value{GDBN} Text User Interface
* Emacs:: Using @value{GDBN} under @sc{gnu} Emacs
@@ -178,6 +179,8 @@ software in general. We will miss him.
* Agent Expressions:: The GDB Agent Expression Mechanism
* Target Descriptions:: How targets can describe themselves to
@value{GDBN}
+* Operating System Information:: Getting additional information from
+ the operating system
* Copying:: GNU General Public License says
how you can copy and share GDB
* GNU Free Documentation License:: The license for this documentation
@@ -1786,6 +1789,7 @@ kill a child process.
* Attach:: Debugging an already-running process
* Kill Process:: Killing the child process
+* Inferiors:: Debugging multiple inferiors
* Threads:: Debugging programs with multiple threads
* Processes:: Debugging programs with multiple processes
* Checkpoint/Restart:: Setting a @emph{bookmark} to return to later
@@ -2355,6 +2359,52 @@ next type @code{run}, @value{GDBN} notices that the file has changed, and
reads the symbol table again (while trying to preserve your current
breakpoint settings).
+@node Inferiors
+@section Debugging Multiple Inferiors
+
+Some @value{GDBN} targets are able to run multiple processes created
+from a single executable. This can happen, for instance, with an
+embedded system reporting back several processes via the remote
+protocol.
+
+@cindex inferior
+@value{GDBN} represents the state of each program execution with an
+object called an @dfn{inferior}. An inferior typically corresponds to
+a process, but is more general and applies also to targets that do not
+have processes. Inferiors may be created before a process runs, and
+may (in future) be retained after a process exits. Each run of an
+executable creates a new inferior, as does each attachment to an
+existing process. Inferiors have unique identifiers that are
+different from process ids, and may optionally be named as well.
+Usually each inferior will also have its own distinct address space,
+although some embedded targets may have several inferiors running in
+different parts of a single space.
+
+Each inferior may in turn have multiple threads running in it.
+
+To find out what inferiors exist at any moment, use @code{info inferiors}:
+
+@table @code
+@kindex info inferiors
+@item info inferiors
+Print a list of all inferiors currently being managed by @value{GDBN}.
+
+@kindex set print inferior-events
+@cindex print messages on inferior start and exit
+@item set print inferior-events
+@itemx set print inferior-events on
+@itemx set print inferior-events off
+The @code{set print inferior-events} command allows you to enable or
+disable printing of messages when @value{GDBN} notices that new
+inferiors have started or that inferiors have exited or have been
+detached. By default, these messages will not be printed.
+
+@kindex show print inferior-events
+@item show print inferior-events
+Show whether messages will be printed when @value{GDBN} detects that
+inferiors have started, exited or have been detached.
+@end table
+
@node Threads
@section Debugging Programs with Multiple Threads
@@ -2592,15 +2642,6 @@ Show whether messages will be printed when @value{GDBN} detects that threads
have started and exited.
@end table
-@cindex automatic thread selection
-@cindex switching threads automatically
-@cindex threads, automatic switching
-Whenever @value{GDBN} stops your program, due to a breakpoint or a
-signal, it automatically selects the thread where that breakpoint or
-signal happened. @value{GDBN} alerts you to the context switch with a
-message of the form @samp{[Switching to @var{systag}]} to identify the
-thread.
-
@xref{Thread Stops,,Stopping and Starting Multi-thread Programs}, for
more information about how @value{GDBN} behaves when you stop and start
programs with multiple threads.
@@ -3323,15 +3364,23 @@ This behavior can be controlled with the following commands::
@kindex show breakpoint always-inserted
@table @code
@item set breakpoint always-inserted off
-This is the default behaviour. All breakpoints, including newly added
-by the user, are inserted in the target only when the target is
-resumed. All breakpoints are removed from the target when it stops.
+All breakpoints, including newly added by the user, are inserted in
+the target only when the target is resumed. All breakpoints are
+removed from the target when it stops.
@item set breakpoint always-inserted on
Causes all breakpoints to be inserted in the target at all times. If
the user adds a new breakpoint, or changes an existing breakpoint, the
breakpoints in the target are updated immediately. A breakpoint is
removed from the target only when breakpoint itself is removed.
+
+@cindex non-stop mode, and @code{breakpoint always-inserted}
+@item set breakpoint always-inserted auto
+This is the default mode. If @value{GDBN} is controlling the inferior
+in non-stop mode (@pxref{Non-Stop Mode}), gdb behaves as if
+@code{breakpoint always-inserted} mode is on. If @value{GDBN} is
+controlling the inferior in all-stop mode, @value{GDBN} behaves as if
+@code{breakpoint always-inserted} mode is off.
@end table
@cindex negative breakpoint numbers
@@ -3569,6 +3618,15 @@ at the end of the command (eg @code{catch exception Program_Error}),
the debugger will stop only when this specific exception is raised.
Otherwise, the debugger stops execution when any Ada exception is raised.
+When inserting an exception catchpoint on a user-defined exception whose
+name is identical to one of the exceptions defined by the language, the
+fully qualified name must be used as the exception name. Otherwise,
+@value{GDBN} will assume that it should stop on the pre-defined exception
+rather than the user-defined one. For instance, assuming an exception
+called @code{Constraint_Error} is defined in package @code{Pck}, then
+the command to use to catch such exceptions is @kbd{catch exception
+Pck.Constraint_Error}.
+
@item exception unhandled
An exception that was raised but is not handled by the program.
@@ -3588,16 +3646,6 @@ and @sc{gnu}/Linux.
A call to @code{vfork}. This is currently only available for HP-UX
and @sc{gnu}/Linux.
-@item load
-@itemx load @var{libname}
-@cindex break on load/unload of shared library
-The dynamic loading of any shared library, or the loading of the library
-@var{libname}. This is currently only available for HP-UX.
-
-@item unload
-@itemx unload @var{libname}
-The unloading of any dynamically loaded shared library, or the unloading
-of the library @var{libname}. This is currently only available for HP-UX.
@end table
@item tcatch @var{event}
@@ -4460,6 +4508,262 @@ Program a Signal}.
@node Thread Stops
@section Stopping and Starting Multi-thread Programs
+@cindex stopped threads
+@cindex threads, stopped
+
+@cindex continuing threads
+@cindex threads, continuing
+
+@value{GDBN} supports debugging programs with multiple threads
+(@pxref{Threads,, Debugging Programs with Multiple Threads}). There
+are two modes of controlling execution of your program within the
+debugger. In the default mode, referred to as @dfn{all-stop mode},
+when any thread in your program stops (for example, at a breakpoint
+or while being stepped), all other threads in the program are also stopped by
+@value{GDBN}. On some targets, @value{GDBN} also supports
+@dfn{non-stop mode}, in which other threads can continue to run freely while
+you examine the stopped thread in the debugger.
+
+@menu
+* All-Stop Mode:: All threads stop when GDB takes control
+* Non-Stop Mode:: Other threads continue to execute
+* Background Execution:: Running your program asynchronously
+* Thread-Specific Breakpoints:: Controlling breakpoints
+* Interrupted System Calls:: GDB may interfere with system calls
+@end menu
+
+@node All-Stop Mode
+@subsection All-Stop Mode
+
+@cindex all-stop mode
+
+In all-stop mode, whenever your program stops under @value{GDBN} for any reason,
+@emph{all} threads of execution stop, not just the current thread. This
+allows you to examine the overall state of the program, including
+switching between threads, without worrying that things may change
+underfoot.
+
+Conversely, whenever you restart the program, @emph{all} threads start
+executing. @emph{This is true even when single-stepping} with commands
+like @code{step} or @code{next}.
+
+In particular, @value{GDBN} cannot single-step all threads in lockstep.
+Since thread scheduling is up to your debugging target's operating
+system (not controlled by @value{GDBN}), other threads may
+execute more than one statement while the current thread completes a
+single step. Moreover, in general other threads stop in the middle of a
+statement, rather than at a clean statement boundary, when the program
+stops.
+
+You might even find your program stopped in another thread after
+continuing or even single-stepping. This happens whenever some other
+thread runs into a breakpoint, a signal, or an exception before the
+first thread completes whatever you requested.
+
+@cindex automatic thread selection
+@cindex switching threads automatically
+@cindex threads, automatic switching
+Whenever @value{GDBN} stops your program, due to a breakpoint or a
+signal, it automatically selects the thread where that breakpoint or
+signal happened. @value{GDBN} alerts you to the context switch with a
+message such as @samp{[Switching to Thread @var{n}]} to identify the
+thread.
+
+On some OSes, you can modify @value{GDBN}'s default behavior by
+locking the OS scheduler to allow only a single thread to run.
+
+@table @code
+@item set scheduler-locking @var{mode}
+@cindex scheduler locking mode
+@cindex lock scheduler
+Set the scheduler locking mode. If it is @code{off}, then there is no
+locking and any thread may run at any time. If @code{on}, then only the
+current thread may run when the inferior is resumed. The @code{step}
+mode optimizes for single-stepping; it prevents other threads
+from preempting the current thread while you are stepping, so that
+the focus of debugging does not change unexpectedly.
+Other threads only rarely (or never) get a chance to run
+when you step. They are more likely to run when you @samp{next} over a
+function call, and they are completely free to run when you use commands
+like @samp{continue}, @samp{until}, or @samp{finish}. However, unless another
+thread hits a breakpoint during its timeslice, @value{GDBN} does not change
+the current thread away from the thread that you are debugging.
+
+@item show scheduler-locking
+Display the current scheduler locking mode.
+@end table
+
+@node Non-Stop Mode
+@subsection Non-Stop Mode
+
+@cindex non-stop mode
+
+@c This section is really only a place-holder, and needs to be expanded
+@c with more details.
+
+For some multi-threaded targets, @value{GDBN} supports an optional
+mode of operation in which you can examine stopped program threads in
+the debugger while other threads continue to execute freely. This
+minimizes intrusion when debugging live systems, such as programs
+where some threads have real-time constraints or must continue to
+respond to external events. This is referred to as @dfn{non-stop} mode.
+
+In non-stop mode, when a thread stops to report a debugging event,
+@emph{only} that thread is stopped; @value{GDBN} does not stop other
+threads as well, in contrast to the all-stop mode behavior. Additionally,
+execution commands such as @code{continue} and @code{step} apply by default
+only to the current thread in non-stop mode, rather than all threads as
+in all-stop mode. This allows you to control threads explicitly in
+ways that are not possible in all-stop mode --- for example, stepping
+one thread while allowing others to run freely, stepping
+one thread while holding all others stopped, or stepping several threads
+independently and simultaneously.
+
+To enter non-stop mode, use this sequence of commands before you run
+or attach to your program:
+
+@smallexample
+# Enable the async interface.
+set target-async 1
+
+# If using the CLI, pagination breaks non-stop.
+set pagination off
+
+# Finally, turn it on!
+set non-stop on
+@end smallexample
+
+You can use these commands to manipulate the non-stop mode setting:
+
+@table @code
+@kindex set non-stop
+@item set non-stop on
+Enable selection of non-stop mode.
+@item set non-stop off
+Disable selection of non-stop mode.
+@kindex show non-stop
+@item show non-stop
+Show the current non-stop enablement setting.
+@end table
+
+Note these commands only reflect whether non-stop mode is enabled,
+not whether the currently-executing program is being run in non-stop mode.
+In particular, the @code{set non-stop} preference is only consulted when
+@value{GDBN} starts or connects to the target program, and it is generally
+not possible to switch modes once debugging has started. Furthermore,
+since not all targets support non-stop mode, even when you have enabled
+non-stop mode, @value{GDBN} may still fall back to all-stop operation by
+default.
+
+In non-stop mode, all execution commands apply only to the current thread
+by default. That is, @code{continue} only continues one thread.
+To continue all threads, issue @code{continue -a} or @code{c -a}.
+
+You can use @value{GDBN}'s background execution commands
+(@pxref{Background Execution}) to run some threads in the background
+while you continue to examine or step others from @value{GDBN}.
+The MI execution commands (@pxref{GDB/MI Program Execution}) are
+always executed asynchronously in non-stop mode.
+
+Suspending execution is done with the @code{interrupt} command when
+running in the background, or @kbd{Ctrl-c} during foreground execution.
+In all-stop mode, this stops the whole process;
+but in non-stop mode the interrupt applies only to the current thread.
+To stop the whole program, use @code{interrupt -a}.
+
+Other execution commands do not currently support the @code{-a} option.
+
+In non-stop mode, when a thread stops, @value{GDBN} doesn't automatically make
+that thread current, as it does in all-stop mode. This is because the
+thread stop notifications are asynchronous with respect to @value{GDBN}'s
+command interpreter, and it would be confusing if @value{GDBN} unexpectedly
+changed to a different thread just as you entered a command to operate on the
+previously current thread.
+
+@node Background Execution
+@subsection Background Execution
+
+@cindex foreground execution
+@cindex background execution
+@cindex asynchronous execution
+@cindex execution, foreground, background and asynchronous
+
+@value{GDBN}'s execution commands have two variants: the normal
+foreground (synchronous) behavior, and a background
+(asynchronous) behavior. In foreground execution, @value{GDBN} waits for
+the program to report that some thread has stopped before prompting for
+another command. In background execution, @value{GDBN} immediately gives
+a command prompt so that you can issue other commands while your program runs.
+
+To specify background execution, add a @code{&} to the command. For example,
+the background form of the @code{continue} command is @code{continue&}, or
+just @code{c&}. The execution commands that accept background execution
+are:
+
+@table @code
+@kindex run&
+@item run
+@xref{Starting, , Starting your Program}.
+
+@item attach
+@kindex attach&
+@xref{Attach, , Debugging an Already-running Process}.
+
+@item step
+@kindex step&
+@xref{Continuing and Stepping, step}.
+
+@item stepi
+@kindex stepi&
+@xref{Continuing and Stepping, stepi}.
+
+@item next
+@kindex next&
+@xref{Continuing and Stepping, next}.
+
+@item continue
+@kindex continue&
+@xref{Continuing and Stepping, continue}.
+
+@item finish
+@kindex finish&
+@xref{Continuing and Stepping, finish}.
+
+@item until
+@kindex until&
+@xref{Continuing and Stepping, until}.
+
+@end table
+
+Background execution is especially useful in conjunction with non-stop
+mode for debugging programs with multiple threads; see @ref{Non-Stop Mode}.
+However, you can also use these commands in the normal all-stop mode with
+the restriction that you cannot issue another execution command until the
+previous one finishes. Examples of commands that are valid in all-stop
+mode while the program is running include @code{help} and @code{info break}.
+
+You can interrupt your program while it is running in the background by
+using the @code{interrupt} command.
+
+@table @code
+@kindex interrupt
+@item interrupt
+@itemx interrupt -a
+
+Suspend execution of the running program. In all-stop mode,
+@code{interrupt} stops the whole process, but in non-stop mode, it stops
+only the current thread. To stop the whole program in non-stop mode,
+use @code{interrupt -a}.
+@end table
+
+You may need to explicitly enable async mode before you can use background
+execution commands, with the @code{set target-async 1} command. If the
+target doesn't support async mode, @value{GDBN} issues an error message
+if you attempt to use the background execution commands.
+
+@node Thread-Specific Breakpoints
+@subsection Thread-Specific Breakpoints
+
When your program has multiple threads (@pxref{Threads,, Debugging
Programs with Multiple Threads}), you can choose whether to set
breakpoints on all threads, or on a particular thread.
@@ -4494,18 +4798,14 @@ breakpoint condition, like this:
@end table
-@cindex stopped threads
-@cindex threads, stopped
-Whenever your program stops under @value{GDBN} for any reason,
-@emph{all} threads of execution stop, not just the current thread. This
-allows you to examine the overall state of the program, including
-switching between threads, without worrying that things may change
-underfoot.
+@node Interrupted System Calls
+@subsection Interrupted System Calls
@cindex thread breakpoints and system calls
@cindex system calls and thread breakpoints
@cindex premature return from system calls
-There is an unfortunate side effect. If one thread stops for a
+There is an unfortunate side effect when using @value{GDBN} to debug
+multi-threaded programs. If one thread stops for a
breakpoint, or for some other reason, and another thread is blocked in a
system call, then the system call may return prematurely. This is a
consequence of the interaction between multiple threads and the signals
@@ -4543,51 +4843,11 @@ monitor certain events such as thread creation and thread destruction.
When such an event happens, a system call in another thread may return
prematurely, even though your program does not appear to stop.
-@cindex continuing threads
-@cindex threads, continuing
-Conversely, whenever you restart the program, @emph{all} threads start
-executing. @emph{This is true even when single-stepping} with commands
-like @code{step} or @code{next}.
-
-In particular, @value{GDBN} cannot single-step all threads in lockstep.
-Since thread scheduling is up to your debugging target's operating
-system (not controlled by @value{GDBN}), other threads may
-execute more than one statement while the current thread completes a
-single step. Moreover, in general other threads stop in the middle of a
-statement, rather than at a clean statement boundary, when the program
-stops.
-
-You might even find your program stopped in another thread after
-continuing or even single-stepping. This happens whenever some other
-thread runs into a breakpoint, a signal, or an exception before the
-first thread completes whatever you requested.
-
-On some OSes, you can lock the OS scheduler and thus allow only a single
-thread to run.
-
-@table @code
-@item set scheduler-locking @var{mode}
-@cindex scheduler locking mode
-@cindex lock scheduler
-Set the scheduler locking mode. If it is @code{off}, then there is no
-locking and any thread may run at any time. If @code{on}, then only the
-current thread may run when the inferior is resumed. The @code{step}
-mode optimizes for single-stepping. It stops other threads from
-``seizing the prompt'' by preempting the current thread while you are
-stepping. Other threads will only rarely (or never) get a chance to run
-when you step. They are more likely to run when you @samp{next} over a
-function call, and they are completely free to run when you use commands
-like @samp{continue}, @samp{until}, or @samp{finish}. However, unless another
-thread hits a breakpoint during its timeslice, they will never steal the
-@value{GDBN} prompt away from the thread that you are debugging.
-
-@item show scheduler-locking
-Display the current scheduler locking mode.
-@end table
-
@node Reverse Execution
@chapter Running programs backward
+@cindex reverse execution
+@cindex running programs backward
When you are debugging a program, it is not unusual to realize that
you have gone too far, and some event of interest has already happened.
@@ -4596,7 +4856,7 @@ If the target environment supports it, @value{GDBN} can allow you to
A target environment that supports reverse execution should be able
to ``undo'' the changes in machine state that have taken place as the
-program was executing normally. Variables, registers etc. should
+program was executing normally. Variables, registers etc.@: should
revert to their previous values. Obviously this requires a great
deal of sophistication on the part of the target environment; not
all target environments can support reverse execution.
@@ -4609,9 +4869,21 @@ the values of memory and/or registers that were changed by that
instruction are reverted to their previous states. After executing
a piece of source code in reverse, all side effects of that code
should be ``undone'', and all variables should be returned to their
-prior values.
-
-Assuming you are debugging in a target environment that supports
+prior values@footnote{
+Note that some side effects are easier to undo than others. For instance,
+memory and registers are relatively easy, but device I/O is hard. Some
+targets may be able undo things like device I/O, and some may not.
+
+The contract between @value{GDBN} and the reverse executing target
+requires only that the target do something reasonable when
+@value{GDBN} tells it to execute backwards, and then report the
+results back to @value{GDBN}. Whatever the target reports back to
+@value{GDBN}, @value{GDBN} will report back to the user. @value{GDBN}
+assumes that the memory and registers that the target reports are in a
+consistant state, but @value{GDBN} accepts whatever it is given.
+}.
+
+If you are debugging in a target environment that supports
reverse execution, @value{GDBN} provides the following commands.
@table @code
@@ -4678,6 +4950,7 @@ current function returns, @code{reverse-finish} takes you to the point
where it was called. Instead of ending up at the end of the current
function invocation, you end up at the beginning.
+@kindex set exec-direction
@item set exec-direction
Set the direction of target execution.
@itemx set exec-direction reverse
@@ -4692,6 +4965,112 @@ This is the default.
@end table
+@node Process record and replay
+@chapter Recording inferior's execution and replaying it
+@cindex process record and replay
+@cindex recording inferior's execution and replaying it
+
+In a architecture environment that supports process record and replay,
+process record and replay target can record a log of the process execution,
+and replay it with both forward and reverse execute commands.
+
+When this target is in use, if the execution log includes the record for
+the next instruction, @value{GDBN} will debug in replay mode. So inferior
+will not really execute and all the execution events are taken from the
+execution log. Just the values of registers (include pc register) and
+memory of the inferior will be changed.
+
+Otherwise, @value{GDBN} will debug in record mode. So inferior will
+execute normally and @value{GDBN} will record the execution log.
+
+If you are debugging in a architecture environment that supports
+process record and replay, @value{GDBN} provides the following commands.
+
+@table @code
+@kindex target record
+@kindex record
+@kindex rec
+@item target record
+This a standard command to start process record and replay target.
+Process record and replay target can only debug a process that already
+running. Therefore you need to first start the process @code{run},
+and then start the recording @code{target record}.
+
+Both @code{record} and @code{rec} are the aliases of @code{target record}.
+
+Displaced stepping function will disable when process record and replay
+target is opened. Because process record and replay target doesn't
+support displaced stepping function.
+
+If inferior in non-stop mode (non-stop) or in asynchronous mode
+(target-async), process record and replay target can't be open because
+it doesn't support these two modes.
+
+@kindex stoprecord
+@kindex sr
+@item stoprecord
+Stop process record and replay target at once. When Process record and
+replay target stops, all the execution log will be deleted and the inferior
+will either be terminated, or remain in its final state.
+
+When you stop the process record and replay target in record mode (at the
+end of the execution log), the inferior will be stopped at the next
+instruction that would have been recorded. In other words, if you record
+for a while and then stop recording, the inferior process will be left in
+the same state as if recording never happened.
+
+On the other hand, if the process record and replay target is stopped while
+in replay mode (that is, not at the end of the execution log but at some
+earlier point), the inferior process will become ``live'' at that earlier state,
+and it will then be possible to continue debugging the process ``live'' from
+that state.
+
+When the inferior process exits, or @value{GDBN} detaches from it, process
+record and replay target will automatically stop itself.
+
+@kindex set record-insn-number-max
+@item set record-insn-number-max @var{limit}
+Set the limit of instructions to be recorded. Default value is 200000.
+
+In this case, if record instructions number is bigger than @var{limit},
+@value{GDBN} will auto delete the earliest recorded instruction execute
+log.
+
+If set to 0, @value{GDBN} will not delete the earliest recorded instruction
+execute log. Record instructions number limit function will disable.
+
+@kindex show record-insn-number-max
+@item show record-insn-number-max
+Show the value of recorded instructions limit.
+
+@kindex set record-stop-at-limit
+@item set record-stop-at-limit on
+Set the behavior when record instructions limit is reached.
+This is the default mode. Meaning that @value{GDBN} will stop ask user
+want close @code{record-stop-at-limit} or stop inferior.
+
+@item set record-stop-at-limit off
+This mean that @value{GDBN} will auto delete the oldest record to make
+room for each new one.
+
+@kindex show record-stop-at-limit
+@item show record-stop-at-limit
+Show the value of record-stop-at-limit.
+
+@kindex info record-insn-number
+@item info record-insn-number
+Show the current number of recorded instructions.
+
+@kindex delrecord
+@kindex dr
+@item delrecord
+When record target running in replay mode (``in the past''), delete the
+subsequent execution log and begin to record a new execution log starting
+from the current address. It means you will abandon the previously
+recorded ``future'' and begin recording a new ``future''.
+@end table
+
+
@node Stack
@chapter Examining the Stack
@@ -7325,6 +7704,18 @@ most appropriate form for a recognized tag, and in hexadecimal for
an unrecognized tag.
@end table
+On some targets, @value{GDBN} can access operating-system-specific information
+and display it to user, without interpretation. For remote targets,
+this functionality depends on the remote stub's support of the
+@samp{qXfer:osdata:read} packet, see @ref{qXfer osdata read}.
+
+@table @code
+@kindex info os processes
+@item info os processes
+Display the list of processes on the target. For each process,
+@value{GDBN} prints the process identifier, the name of the user, and
+the command corresponding to the process.
+@end table
@node Memory Region Attributes
@section Memory Region Attributes
@@ -7858,7 +8249,7 @@ Show the current state of data caching for remote targets.
Print the information about the data cache performance. The
information displayed includes: the dcache width and depth; and for
each cache line, how many times it was referenced, and its data and
-state (dirty, bad, ok, etc.). This command is useful for debugging
+state (invalid, dirty, valid). This command is useful for debugging
the data cache operation.
@end table
@@ -7983,10 +8374,6 @@ uses the macros in scope at that frame's source code line. Otherwise,
@value{GDBN} uses the macros in scope at the current listing location;
see @ref{List}.
-At the moment, @value{GDBN} does not support the @code{##}
-token-splicing operator, the @code{#} stringification operator, or
-variable-arity macros.
-
Whenever @value{GDBN} evaluates an expression, it always expands any
macro invocations present in the expression. @value{GDBN} also provides
the following commands for working with macros explicitly.
@@ -8030,31 +8417,29 @@ source location where that definition was established.
@cindex macros, user-defined
@item macro define @var{macro} @var{replacement-list}
@itemx macro define @var{macro}(@var{arglist}) @var{replacement-list}
-@i{(This command is not yet implemented.)} Introduce a definition for a
-preprocessor macro named @var{macro}, invocations of which are replaced
-by the tokens given in @var{replacement-list}. The first form of this
-command defines an ``object-like'' macro, which takes no arguments; the
-second form defines a ``function-like'' macro, which takes the arguments
-given in @var{arglist}.
-
-A definition introduced by this command is in scope in every expression
-evaluated in @value{GDBN}, until it is removed with the @command{macro
-undef} command, described below. The definition overrides all
-definitions for @var{macro} present in the program being debugged, as
-well as any previous user-supplied definition.
+Introduce a definition for a preprocessor macro named @var{macro},
+invocations of which are replaced by the tokens given in
+@var{replacement-list}. The first form of this command defines an
+``object-like'' macro, which takes no arguments; the second form
+defines a ``function-like'' macro, which takes the arguments given in
+@var{arglist}.
+
+A definition introduced by this command is in scope in every
+expression evaluated in @value{GDBN}, until it is removed with the
+@code{macro undef} command, described below. The definition overrides
+all definitions for @var{macro} present in the program being debugged,
+as well as any previous user-supplied definition.
@kindex macro undef
@item macro undef @var{macro}
-@i{(This command is not yet implemented.)} Remove any user-supplied
-definition for the macro named @var{macro}. This command only affects
-definitions provided with the @command{macro define} command, described
-above; it cannot remove definitions present in the program being
-debugged.
+Remove any user-supplied definition for the macro named @var{macro}.
+This command only affects definitions provided with the @code{macro
+define} command, described above; it cannot remove definitions present
+in the program being debugged.
@kindex macro list
@item macro list
-@i{(This command is not yet implemented.)} List all the macros
-defined using the @code{macro define} command.
+List all the macros defined using the @code{macro define} command.
@end table
@cindex macros, example of debugging with
@@ -8133,7 +8518,7 @@ expands to: once (M + 1)
(@value{GDBP})
@end smallexample
-In the example above, note that @command{macro expand-once} expands only
+In the example above, note that @code{macro expand-once} expands only
the macro invocation explicit in the original text --- the invocation of
@code{ADD} --- but does not expand the invocation of the macro @code{M},
which was introduced by @code{ADD}.
@@ -10941,6 +11326,8 @@ to be difficult.
* Omissions from Ada:: Restrictions on the Ada expression syntax.
* Additions to Ada:: Extensions of the Ada expression syntax.
* Stopping Before Main Program:: Debugging the program during elaboration.
+* Ada Tasks:: Listing and setting breakpoints in tasks.
+* Ada Tasks and Core Files:: Tasking Support when Debugging Core Files
* Ada Glitches:: Known peculiarities of Ada mode.
@end menu
@@ -10967,11 +11354,11 @@ are not particularly important to the @value{GDBN} user.
That brevity is important to the @value{GDBN} user.
@end itemize
-Thus, for brevity, the debugger acts as if there were
-implicit @code{with} and @code{use} clauses in effect for all user-written
-packages, making it unnecessary to fully qualify most names with
-their packages, regardless of context. Where this causes ambiguity,
-@value{GDBN} asks the user's intent.
+Thus, for brevity, the debugger acts as if all names declared in
+user-written packages are directly visible, even if they are not visible
+according to Ada rules, thus making it unnecessary to fully qualify most
+names with their packages, regardless of context. Where this causes
+ambiguity, @value{GDBN} asks the user's intent.
The debugger will start in Ada mode if it detects an Ada main program.
As for other languages, it will enter Ada mode when stopped in a program that
@@ -11054,12 +11441,12 @@ There is limited support for array and record aggregates. They are
permitted only on the right sides of assignments, as in these examples:
@smallexample
-set An_Array := (1, 2, 3, 4, 5, 6)
-set An_Array := (1, others => 0)
-set An_Array := (0|4 => 1, 1..3 => 2, 5 => 6)
-set A_2D_Array := ((1, 2, 3), (4, 5, 6), (7, 8, 9))
-set A_Record := (1, "Peter", True);
-set A_Record := (Name => "Peter", Id => 1, Alive => True)
+(@value{GDBP}) set An_Array := (1, 2, 3, 4, 5, 6)
+(@value{GDBP}) set An_Array := (1, others => 0)
+(@value{GDBP}) set An_Array := (0|4 => 1, 1..3 => 2, 5 => 6)
+(@value{GDBP}) set A_2D_Array := ((1, 2, 3), (4, 5, 6), (7, 8, 9))
+(@value{GDBP}) set A_Record := (1, "Peter", True);
+(@value{GDBP}) set A_Record := (Name => "Peter", Id => 1, Alive => True)
@end smallexample
Changing a
@@ -11081,8 +11468,8 @@ you can assign a value with a different size of @code{Vals} with two
assignments:
@smallexample
-set A_Rec.Len := 4
-set A_Rec := (Id => 42, Vals => (1, 2, 3, 4))
+(@value{GDBP}) set A_Rec.Len := 4
+(@value{GDBP}) set A_Rec := (Id => 42, Vals => (1, 2, 3, 4))
@end smallexample
As this example also illustrates, @value{GDBN} is very loose about the usual
@@ -11117,6 +11504,14 @@ formats are not supported.
@item
It is not possible to slice a packed array.
+
+@item
+The names @code{True} and @code{False}, when not part of a qualified name,
+are interpreted as if implicitly prefixed by @code{Standard}, regardless of
+context.
+Should your program
+redefine these names in a package or procedure (at best a dubious practice),
+you will have to use fully qualified names to access their new definitions.
@end itemize
@node Additions to Ada
@@ -11160,8 +11555,8 @@ The assignment statement is allowed as an expression, returning
its right-hand operand as its value. Thus, you may enter
@smallexample
-set x := y + 3
-print A(tmp := y + 1)
+(@value{GDBP}) set x := y + 3
+(@value{GDBP}) print A(tmp := y + 1)
@end smallexample
@item
@@ -11171,8 +11566,8 @@ This allows, for example,
complex conditional breaks:
@smallexample
-break f
-condition 1 (report(i); k += 1; A(k) > 100)
+(@value{GDBP}) break f
+(@value{GDBP}) condition 1 (report(i); k += 1; A(k) > 100)
@end smallexample
@item
@@ -11196,7 +11591,7 @@ The subtype used as a prefix for the attributes @t{'Pos}, @t{'Min}, and
to write
@smallexample
-print 'max(x, y)
+(@value{GDBP}) print 'max(x, y)
@end smallexample
@item
@@ -11229,7 +11624,7 @@ For the rare occasions when you actually have to look at them,
enclose them in angle brackets to avoid the lower-case mapping.
For example,
@smallexample
-@value{GDBP} print <JMPBUF_SAVE>[0]
+(@value{GDBP}) print <JMPBUF_SAVE>[0]
@end smallexample
@item
@@ -11253,6 +11648,187 @@ Manual, the elaboration code is invoked from a procedure called
elaboration, simply use the following two commands:
@code{tbreak adainit} and @code{run}.
+@node Ada Tasks
+@subsubsection Extensions for Ada Tasks
+@cindex Ada, tasking
+
+Support for Ada tasks is analogous to that for threads (@pxref{Threads}).
+@value{GDBN} provides the following task-related commands:
+
+@table @code
+@kindex info tasks
+@item info tasks
+This command shows a list of current Ada tasks, as in the following example:
+
+
+@smallexample
+@iftex
+@leftskip=0.5cm
+@end iftex
+(@value{GDBP}) info tasks
+ ID TID P-ID Pri State Name
+ 1 8088000 0 15 Child Activation Wait main_task
+ 2 80a4000 1 15 Accept Statement b
+ 3 809a800 1 15 Child Activation Wait a
+* 4 80ae800 3 15 Running c
+
+@end smallexample
+
+@noindent
+In this listing, the asterisk before the last task indicates it to be the
+task currently being inspected.
+
+@table @asis
+@item ID
+Represents @value{GDBN}'s internal task number.
+
+@item TID
+The Ada task ID.
+
+@item P-ID
+The parent's task ID (@value{GDBN}'s internal task number).
+
+@item Pri
+The base priority of the task.
+
+@item State
+Current state of the task.
+
+@table @code
+@item Unactivated
+The task has been created but has not been activated. It cannot be
+executing.
+
+@item Running
+The task currently running.
+
+@item Runnable
+The task is not blocked for any reason known to Ada. (It may be waiting
+for a mutex, though.) It is conceptually "executing" in normal mode.
+
+@item Terminated
+The task is terminated, in the sense of ARM 9.3 (5). Any dependents
+that were waiting on terminate alternatives have been awakened and have
+terminated themselves.
+
+@item Child Activation Wait
+The task is waiting for created tasks to complete activation.
+
+@item Accept Statement
+The task is waiting on an accept or selective wait statement.
+
+@item Waiting on entry call
+The task is waiting on an entry call.
+
+@item Async Select Wait
+The task is waiting to start the abortable part of an asynchronous
+select statement.
+
+@item Delay Sleep
+The task is waiting on a select statement with only a delay
+alternative open.
+
+@item Child Termination Wait
+The task is sleeping having completed a master within itself, and is
+waiting for the tasks dependent on that master to become terminated or
+waiting on a terminate Phase.
+
+@item Wait Child in Term Alt
+The task is sleeping waiting for tasks on terminate alternatives to
+finish terminating.
+
+@item Accepting RV with @var{taskno}
+The task is accepting a rendez-vous with the task @var{taskno}.
+@end table
+
+@item Name
+Name of the task in the program.
+
+@end table
+
+@kindex info task @var{taskno}
+@item info task @var{taskno}
+This command shows detailled informations on the specified task, as in
+the following example:
+@smallexample
+@iftex
+@leftskip=0.5cm
+@end iftex
+(@value{GDBP}) info tasks
+ ID TID P-ID Pri State Name
+ 1 8077880 0 15 Child Activation Wait main_task
+* 2 807c468 1 15 Running task_1
+(@value{GDBP}) info task 2
+Ada Task: 0x807c468
+Name: task_1
+Thread: 0x807f378
+Parent: 1 (main_task)
+Base Priority: 15
+State: Runnable
+@end smallexample
+
+@item task
+@kindex task@r{ (Ada)}
+@cindex current Ada task ID
+This command prints the ID of the current task.
+
+@smallexample
+@iftex
+@leftskip=0.5cm
+@end iftex
+(@value{GDBP}) info tasks
+ ID TID P-ID Pri State Name
+ 1 8077870 0 15 Child Activation Wait main_task
+* 2 807c458 1 15 Running t
+(@value{GDBP}) task
+[Current task is 2]
+@end smallexample
+
+@item task @var{taskno}
+@cindex Ada task switching
+This command is like the @code{thread @var{threadno}}
+command (@pxref{Threads}). It switches the context of debugging
+from the current task to the given task.
+
+@smallexample
+@iftex
+@leftskip=0.5cm
+@end iftex
+(@value{GDBP}) info tasks
+ ID TID P-ID Pri State Name
+ 1 8077870 0 15 Child Activation Wait main_task
+* 2 807c458 1 15 Running t
+(@value{GDBP}) task 1
+[Switching to task 1]
+#0 0x8067726 in pthread_cond_wait ()
+(@value{GDBP}) bt
+#0 0x8067726 in pthread_cond_wait ()
+#1 0x8056714 in system.os_interface.pthread_cond_wait ()
+#2 0x805cb63 in system.task_primitives.operations.sleep ()
+#3 0x806153e in system.tasking.stages.activate_tasks ()
+#4 0x804aacc in un () at un.adb:5
+@end smallexample
+
+@end table
+
+@node Ada Tasks and Core Files
+@subsubsection Tasking Support when Debugging Core Files
+@cindex Ada tasking and core file debugging
+
+When inspecting a core file, as opposed to debugging a live program,
+tasking support may be limited or even unavailable, depending on
+the platform being used.
+For instance, on x86-linux, the list of tasks is available, but task
+switching is not supported. On Tru64, however, task switching will work
+as usual.
+
+On certain platforms, including Tru64, the debugger needs to perform some
+memory writes in order to provide Ada tasking support. When inspecting
+a core file, this means that the core file must be opened with read-write
+privileges, using the command @samp{"set write on"} (@pxref{Patching}).
+Under these circumstances, you should make a backup copy of the core
+file before inspecting it with @value{GDBN}.
+
@node Ada Glitches
@subsubsection Known Peculiarities of Ada Mode
@cindex Ada, problems
@@ -11288,9 +11864,6 @@ floating-point arithmetic, and may give results that only approximate those on
the host machine.
@item
-The type of the @t{'Address} attribute may not be @code{System.Address}.
-
-@item
The GNAT compiler never generates the prefix @code{Standard} for any of
the standard symbols defined by the Ada language. @value{GDBN} knows about
this: it will strip the prefix from names when you use it, and will never
@@ -11401,6 +11974,16 @@ _initialize_vx + 396 in section .text
This is the opposite of the @code{info address} command. You can use
it to find out the name of a variable or a function given its address.
+For dynamically linked executables, the name of executable or shared
+library containing the symbol is also printed:
+
+@smallexample
+(@value{GDBP}) info symbol 0x400225
+_start + 5 in section .text of /tmp/a.out
+(@value{GDBP}) info symbol 0x2aaaac2811cf
+__read_nocancel + 6 in section .text of /usr/lib64/libc.so.6
+@end smallexample
+
@kindex whatis
@item whatis [@var{arg}]
Print the data type of @var{arg}, which can be either an expression or
@@ -12057,7 +12640,7 @@ repairs.
@item set write on
@itemx set write off
If you specify @samp{set write on}, @value{GDBN} opens executable and
-core files for both reading and writing; if you specify @samp{set write
+core files for both reading and writing; if you specify @kbd{set write
off} (the default), @value{GDBN} opens them read-only.
If you have already loaded a file, you must load it again (using the
@@ -12496,8 +13079,11 @@ library events happen.
@end table
Shared libraries are also supported in many cross or remote debugging
-configurations. A copy of the target's libraries need to be present on the
-host system; they need to be the same as the target libraries, although the
+configurations. @value{GDBN} needs to have access to the target's libraries;
+this can be accomplished either by providing copies of the libraries
+on the host system, or by asking @value{GDBN} to automatically retrieve the
+libraries from the target. If copies of the target libraries are
+provided, they need to be the same as the target libraries, although the
copies on the target can be stripped as long as the copies on the host are
not.
@@ -12521,6 +13107,16 @@ libraries, they need to be laid out in the same way that they are on
the target, with e.g.@: a @file{/lib} and @file{/usr/lib} hierarchy
under @var{path}.
+If @var{path} starts with the sequence @file{remote:}, @value{GDBN} will
+retrieve the target libraries from the remote system. This is only
+supported when using a remote target that supports the @code{remote get}
+command (@pxref{File Transfer,,Sending files to a remote system}).
+The part of @var{path} following the initial @file{remote:}
+(if present) is used as system root prefix on the remote file system.
+@footnote{If you want to specify a local system root using a directory
+that happens to be named @file{remote:}, you need to use some equivalent
+variant of the name like @file{./remote:}.}
+
The @code{set solib-absolute-prefix} command is an alias for @code{set
sysroot}.
@@ -13850,6 +14446,14 @@ are:
@item @code{hostio-unlink-packet}
@tab @code{vFile:unlink}
@tab @code{remote delete}
+
+@item @code{noack-packet}
+@tab @code{QStartNoAckMode}
+@tab Packet acknowledgment
+
+@item @code{osdata}
+@tab @code{qXfer:osdata:read}
+@tab @code{info os}
@end multitable
@node Remote Stub
@@ -14193,6 +14797,7 @@ configurations.
* Cygwin Native:: Features specific to the Cygwin port
* Hurd Native:: Features specific to @sc{gnu} Hurd
* Neutrino:: Features specific to QNX Neutrino
+* Darwin:: Features specific to Darwin
@end menu
@node HP-UX
@@ -14974,6 +15579,48 @@ Neutrino support.
Show the current state of QNX Neutrino messages.
@end table
+@node Darwin
+@subsection Darwin
+@cindex Darwin
+
+@value{GDBN} provides the following commands specific to the Darwin target:
+
+@table @code
+@item set debug darwin @var{num}
+@kindex set debug darwin
+When set to a non zero value, enables debugging messages specific to
+the Darwin support. Higher values produce more verbose output.
+
+@item show debug darwin
+@kindex show debug darwin
+Show the current state of Darwin messages.
+
+@item set debug mach-o @var{num}
+@kindex set debug mach-o
+When set to a non zero value, enables debugging messages while
+@value{GDBN} is reading Darwin object files. (@dfn{Mach-O} is the
+file format used on Darwin for object and executable files.) Higher
+values produce more verbose output. This is a command to diagnose
+problems internal to @value{GDBN} and should not be needed in normal
+usage.
+
+@item show debug mach-o
+@kindex show debug mach-o
+Show the current state of Mach-O file messages.
+
+@item set mach-exceptions on
+@itemx set mach-exceptions off
+@kindex set mach-exceptions
+On Darwin, faults are first reported as a Mach exception and are then
+mapped to a Posix signal. Use this command to turn on trapping of
+Mach exceptions in the inferior. This might be sometimes useful to
+better understand the cause of a fault. The default is off.
+
+@item show mach-exceptions
+@kindex show mach-exceptions
+Show the current state of exceptions trapping.
+@end table
+
@node Embedded OS
@section Embedded Operating Systems
@@ -15532,7 +16179,7 @@ As usual, you can inquire about the @code{mipsfpu} variable with
You can control the timeout used while waiting for a packet, in the MIPS
remote protocol, with the @code{set timeout @var{seconds}} command. The
default is 5 seconds. Similarly, you can control the timeout used while
-waiting for an acknowledgement of a packet with the @code{set
+waiting for an acknowledgment of a packet with the @code{set
retransmit-timeout @var{seconds}} command. The default is 3 seconds.
You can inspect both values with @code{show timeout} and @code{show
retransmit-timeout}. (These commands are @emph{only} available when
@@ -16319,6 +16966,9 @@ The pseudo-registers go from @code{$dl0} through @code{$dl15}, and are formed
by joining the even/odd register pairs @code{f0} and @code{f1} for @code{$dl0},
@code{f2} and @code{f3} for @code{$dl1} and so on.
+For POWER7 processors, @value{GDBN} provides a set of pseudo-registers, the 64-bit
+wide Extended Floating Point Registers (@samp{f32} through @samp{f63}).
+
@node Controlling GDB
@chapter Controlling @value{GDBN}
@@ -16838,6 +17488,13 @@ Display debugging messages about inner workings of the AIX thread
module.
@item show debug aix-thread
Show the current state of AIX thread debugging info display.
+@item set debug dwarf2-die
+@cindex DWARF2 DIEs
+Dump DWARF2 DIEs after they are read in.
+The value is the number of nesting levels to print.
+A value of zero turns off the display.
+@item show debug dwarf2-die
+Show the current state of DWARF2 DIE debugging.
@item set debug displaced
@cindex displaced stepping debugging info
Turns on or off display of @value{GDBN} debugging info for the
@@ -16954,8 +17611,21 @@ Turns on or off debugging messages for built-in XML parsers.
Displays the current state of XML debugging messages.
@end table
+@node Extending GDB
+@chapter Extending @value{GDBN}
+@cindex extending GDB
+
+@value{GDBN} provides two mechanisms for extension. The first is based
+on composition of @value{GDBN} commands, and the second is based on the
+Python scripting language.
+
+@menu
+* Sequences:: Canned Sequences of Commands
+* Python:: Scripting @value{GDBN} using Python
+@end menu
+
@node Sequences
-@chapter Canned Sequences of Commands
+@section Canned Sequences of Commands
Aside from breakpoint commands (@pxref{Break Commands, ,Breakpoint
Command Lists}), @value{GDBN} provides two ways to store sequences of
@@ -16970,7 +17640,7 @@ files.
@end menu
@node Define
-@section User-defined Commands
+@subsection User-defined Commands
@cindex user-defined command
@cindex arguments, to user-defined commands
@@ -17082,7 +17752,7 @@ commands that normally print messages to say what they are doing omit the
messages when used in a user-defined command.
@node Hooks
-@section User-defined Command Hooks
+@subsection User-defined Command Hooks
@cindex command hooks
@cindex hooks, for commands
@cindex hooks, pre-command
@@ -17163,7 +17833,7 @@ If you try to define a hook which does not match any known command, you
get a warning from the @code{define} command.
@node Command Files
-@section Command Files
+@subsection Command Files
@cindex command files
@cindex scripting commands
@@ -17267,7 +17937,7 @@ Terminate the block of commands that are the body of @code{if},
@node Output
-@section Commands for Controlled Output
+@subsection Commands for Controlled Output
During the execution of a command file or a user-defined command, normal
@value{GDBN} output is suppressed; the only output that appears is what is
@@ -17414,6 +18084,218 @@ printf "D32: %Hf - D64: %Df - D128: %DDf\n",1.2345df,1.2E10dd,1.2E1dl
@end table
+@node Python
+@section Scripting @value{GDBN} using Python
+@cindex python scripting
+@cindex scripting with python
+
+You can script @value{GDBN} using the @uref{http://www.python.org/,
+Python programming language}. This feature is available only if
+@value{GDBN} was configured using @option{--with-python}.
+
+@menu
+* Python Commands:: Accessing Python from @value{GDBN}.
+* Python API:: Accessing @value{GDBN} from Python.
+@end menu
+
+@node Python Commands
+@subsection Python Commands
+@cindex python commands
+@cindex commands to access python
+
+@value{GDBN} provides one command for accessing the Python interpreter,
+and one related setting:
+
+@table @code
+@kindex python
+@item python @r{[}@var{code}@r{]}
+The @code{python} command can be used to evaluate Python code.
+
+If given an argument, the @code{python} command will evaluate the
+argument as a Python command. For example:
+
+@smallexample
+(@value{GDBP}) python print 23
+23
+@end smallexample
+
+If you do not provide an argument to @code{python}, it will act as a
+multi-line command, like @code{define}. In this case, the Python
+script is made up of subsequent command lines, given after the
+@code{python} command. This command list is terminated using a line
+containing @code{end}. For example:
+
+@smallexample
+(@value{GDBP}) python
+Type python script
+End with a line saying just "end".
+>print 23
+>end
+23
+@end smallexample
+
+@kindex maint set python print-stack
+@item maint set python print-stack
+By default, @value{GDBN} will print a stack trace when an error occurs
+in a Python script. This can be controlled using @code{maint set
+python print-stack}: if @code{on}, the default, then Python stack
+printing is enabled; if @code{off}, then Python stack printing is
+disabled.
+@end table
+
+@node Python API
+@subsection Python API
+@cindex python api
+@cindex programming in python
+
+@cindex python stdout
+@cindex python pagination
+At startup, @value{GDBN} overrides Python's @code{sys.stdout} and
+@code{sys.stderr} to print using @value{GDBN}'s output-paging streams.
+A Python program which outputs to one of these streams may have its
+output interrupted by the user (@pxref{Screen Size}). In this
+situation, a Python @code{KeyboardInterrupt} exception is thrown.
+
+@menu
+* Basic Python:: Basic Python Functions.
+* Exception Handling::
+* Values From Inferior::
+@end menu
+
+@node Basic Python
+@subsubsection Basic Python
+
+@cindex python functions
+@cindex python module
+@cindex gdb module
+@value{GDBN} introduces a new Python module, named @code{gdb}. All
+methods and classes added by @value{GDBN} are placed in this module.
+@value{GDBN} automatically @code{import}s the @code{gdb} module for
+use in all scripts evaluated by the @code{python} command.
+
+@findex gdb.execute
+@defun execute command
+Evaluate @var{command}, a string, as a @value{GDBN} CLI command.
+If a GDB exception happens while @var{command} runs, it is
+translated as described in @ref{Exception Handling,,Exception Handling}.
+If no exceptions occur, this function returns @code{None}.
+@end defun
+
+@findex gdb.get_parameter
+@defun get_parameter parameter
+Return the value of a @value{GDBN} parameter. @var{parameter} is a
+string naming the parameter to look up; @var{parameter} may contain
+spaces if the parameter has a multi-part name. For example,
+@samp{print object} is a valid parameter name.
+
+If the named parameter does not exist, this function throws a
+@code{RuntimeError}. Otherwise, the parameter's value is converted to
+a Python value of the appropriate type, and returned.
+@end defun
+
+@findex gdb.write
+@defun write string
+Print a string to @value{GDBN}'s paginated standard output stream.
+Writing to @code{sys.stdout} or @code{sys.stderr} will automatically
+call this function.
+@end defun
+
+@findex gdb.flush
+@defun flush
+Flush @value{GDBN}'s paginated standard output stream. Flushing
+@code{sys.stdout} or @code{sys.stderr} will automatically call this
+function.
+@end defun
+
+@node Exception Handling
+@subsubsection Exception Handling
+@cindex python exceptions
+@cindex exceptions, python
+
+When executing the @code{python} command, Python exceptions
+uncaught within the Python code are translated to calls to
+@value{GDBN} error-reporting mechanism. If the command that called
+@code{python} does not handle the error, @value{GDBN} will
+terminate it and print an error message containing the Python
+exception name, the associated value, and the Python call stack
+backtrace at the point where the exception was raised. Example:
+
+@smallexample
+(@value{GDBP}) python print foo
+Traceback (most recent call last):
+ File "<string>", line 1, in <module>
+NameError: name 'foo' is not defined
+@end smallexample
+
+@value{GDBN} errors that happen in @value{GDBN} commands invoked by Python
+code are converted to Python @code{RuntimeError} exceptions. User
+interrupt (via @kbd{C-c} or by typing @kbd{q} at a pagination
+prompt) is translated to a Python @code{KeyboardInterrupt}
+exception. If you catch these exceptions in your Python code, your
+exception handler will see @code{RuntimeError} or
+@code{KeyboardInterrupt} as the exception type, the @value{GDBN} error
+message as its value, and the Python call stack backtrace at the
+Python statement closest to where the @value{GDBN} error occured as the
+traceback.
+
+@node Values From Inferior
+@subsubsection Values From Inferior
+@cindex values from inferior, with Python
+@cindex python, working with values from inferior
+
+@cindex @code{gdb.Value}
+@value{GDBN} provides values it obtains from the inferior program in
+an object of type @code{gdb.Value}. @value{GDBN} uses this object
+for its internal bookkeeping of the inferior's values, and for
+fetching values when necessary.
+
+Inferior values that are simple scalars can be used directly in
+Python expressions that are valid for the value's data type. Here's
+an example for an integer or floating-point value @code{some_val}:
+
+@smallexample
+bar = some_val + 2
+@end smallexample
+
+@noindent
+As result of this, @code{bar} will also be a @code{gdb.Value} object
+whose values are of the same type as those of @code{some_val}.
+
+Inferior values that are structures or instances of some class can
+be accessed using the Python @dfn{dictionary syntax}. For example, if
+@code{some_val} is a @code{gdb.Value} instance holding a structure, you
+can access its @code{foo} element with:
+
+@smallexample
+bar = some_val['foo']
+@end smallexample
+
+Again, @code{bar} will also be a @code{gdb.Value} object.
+
+For pointer data types, @code{gdb.Value} provides a method for
+dereferencing the pointer to obtain the object it points to.
+
+@defmethod Value dereference
+This method returns a new @code{gdb.Value} object whose contents is
+the object pointed to by the pointer. For example, if @code{foo} is
+a C pointer to an @code{int}, declared in your C program as
+
+@smallexample
+int *foo;
+@end smallexample
+
+@noindent
+then you can use the corresponding @code{gdb.Value} to access what
+@code{foo} points to like this:
+
+@smallexample
+bar = foo.dereference ()
+@end smallexample
+
+The result @code{bar} will be a @code{gdb.Value} object holding the
+value pointed to by @code{foo}.
+@end defmethod
+
@node Interpreters
@chapter Command Interpreters
@cindex command interpreters
@@ -18099,6 +18981,7 @@ may repeat one or more times.
@end ignore
@menu
+* GDB/MI General Design::
* GDB/MI Command Syntax::
* GDB/MI Compatibility with CLI::
* GDB/MI Development and Front Ends::
@@ -18126,6 +19009,181 @@ may repeat one or more times.
@end menu
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI General Design
+@section @sc{gdb/mi} General Design
+@cindex GDB/MI General Design
+
+Interaction of a @sc{GDB/MI} frontend with @value{GDBN} involves three
+parts---commands sent to @value{GDBN}, responses to those commands
+and notifications. Each command results in exactly one response,
+indicating either successful completion of the command, or an error.
+For the commands that do not resume the target, the response contains the
+requested information. For the commands that resume the target, the
+response only indicates whether the target was successfully resumed.
+Notifications is the mechanism for reporting changes in the state of the
+target, or in @value{GDBN} state, that cannot conveniently be associated with
+a command and reported as part of that command response.
+
+The important examples of notifications are:
+@itemize @bullet
+
+@item
+Exec notifications. These are used to report changes in
+target state---when a target is resumed, or stopped. It would not
+be feasible to include this information in response of resuming
+commands, because one resume commands can result in multiple events in
+different threads. Also, quite some time may pass before any event
+happens in the target, while a frontend needs to know whether the resuming
+command itself was successfully executed.
+
+@item
+Console output, and status notifications. Console output
+notifications are used to report output of CLI commands, as well as
+diagnostics for other commands. Status notifications are used to
+report the progress of a long-running operation. Naturally, including
+this information in command response would mean no output is produced
+until the command is finished, which is undesirable.
+
+@item
+General notifications. Commands may have various side effects on
+the @value{GDBN} or target state beyond their official purpose. For example,
+a command may change the selected thread. Although such changes can
+be included in command response, using notification allows for more
+orthogonal frontend design.
+
+@end itemize
+
+There's no guarantee that whenever an MI command reports an error,
+@value{GDBN} or the target are in any specific state, and especially,
+the state is not reverted to the state before the MI command was
+processed. Therefore, whenever an MI command results in an error,
+we recommend that the frontend refreshes all the information shown in
+the user interface.
+
+@subsection Context management
+
+In most cases when @value{GDBN} accesses the target, this access is
+done in context of a specific thread and frame (@pxref{Frames}).
+Often, even when accessing global data, the target requires that a thread
+be specified. The CLI interface maintains the selected thread and frame,
+and supplies them to target on each command. This is convenient,
+because a command line user would not want to specify that information
+explicitly on each command, and because user interacts with
+@value{GDBN} via a single terminal, so no confusion is possible as
+to what thread and frame are the current ones.
+
+In the case of MI, the concept of selected thread and frame is less
+useful. First, a frontend can easily remember this information
+itself. Second, a graphical frontend can have more than one window,
+each one used for debugging a different thread, and the frontend might
+want to access additional threads for internal purposes. This
+increases the risk that by relying on implicitly selected thread, the
+frontend may be operating on a wrong one. Therefore, each MI command
+should explicitly specify which thread and frame to operate on. To
+make it possible, each MI command accepts the @samp{--thread} and
+@samp{--frame} options, the value to each is @value{GDBN} identifier
+for thread and frame to operate on.
+
+Usually, each top-level window in a frontend allows the user to select
+a thread and a frame, and remembers the user selection for further
+operations. However, in some cases @value{GDBN} may suggest that the
+current thread be changed. For example, when stopping on a breakpoint
+it is reasonable to switch to the thread where breakpoint is hit. For
+another example, if the user issues the CLI @samp{thread} command via
+the frontend, it is desirable to change the frontend's selected thread to the
+one specified by user. @value{GDBN} communicates the suggestion to
+change current thread using the @samp{=thread-selected} notification.
+No such notification is available for the selected frame at the moment.
+
+Note that historically, MI shares the selected thread with CLI, so
+frontends used the @code{-thread-select} to execute commands in the
+right context. However, getting this to work right is cumbersome. The
+simplest way is for frontend to emit @code{-thread-select} command
+before every command. This doubles the number of commands that need
+to be sent. The alternative approach is to suppress @code{-thread-select}
+if the selected thread in @value{GDBN} is supposed to be identical to the
+thread the frontend wants to operate on. However, getting this
+optimization right can be tricky. In particular, if the frontend
+sends several commands to @value{GDBN}, and one of the commands changes the
+selected thread, then the behaviour of subsequent commands will
+change. So, a frontend should either wait for response from such
+problematic commands, or explicitly add @code{-thread-select} for
+all subsequent commands. No frontend is known to do this exactly
+right, so it is suggested to just always pass the @samp{--thread} and
+@samp{--frame} options.
+
+@subsection Asynchronous command execution and non-stop mode
+
+On some targets, @value{GDBN} is capable of processing MI commands
+even while the target is running. This is called @dfn{asynchronous
+command execution} (@pxref{Background Execution}). The frontend may
+specify a preferrence for asynchronous execution using the
+@code{-gdb-set target-async 1} command, which should be emitted before
+either running the executable or attaching to the target. After the
+frontend has started the executable or attached to the target, it can
+find if asynchronous execution is enabled using the
+@code{-list-target-features} command.
+
+Even if @value{GDBN} can accept a command while target is running,
+many commands that access the target do not work when the target is
+running. Therefore, asynchronous command execution is most useful
+when combined with non-stop mode (@pxref{Non-Stop Mode}). Then,
+it is possible to examine the state of one thread, while other threads
+are running.
+
+When a given thread is running, MI commands that try to access the
+target in the context of that thread may not work, or may work only on
+some targets. In particular, commands that try to operate on thread's
+stack will not work, on any target. Commands that read memory, or
+modify breakpoints, may work or not work, depending on the target. Note
+that even commands that operate on global state, such as @code{print},
+@code{set}, and breakpoint commands, still access the target in the
+context of a specific thread, so frontend should try to find a
+stopped thread and perform the operation on that thread (using the
+@samp{--thread} option).
+
+Which commands will work in the context of a running thread is
+highly target dependent. However, the two commands
+@code{-exec-interrupt}, to stop a thread, and @code{-thread-info},
+to find the state of a thread, will always work.
+
+@subsection Thread groups
+@value{GDBN} may be used to debug several processes at the same time.
+On some platfroms, @value{GDBN} may support debugging of several
+hardware systems, each one having several cores with several different
+processes running on each core. This section describes the MI
+mechanism to support such debugging scenarios.
+
+The key observation is that regardless of the structure of the
+target, MI can have a global list of threads, because most commands that
+accept the @samp{--thread} option do not need to know what process that
+thread belongs to. Therefore, it is not necessary to introduce
+neither additional @samp{--process} option, nor an notion of the
+current process in the MI interface. The only strictly new feature
+that is required is the ability to find how the threads are grouped
+into processes.
+
+To allow the user to discover such grouping, and to support arbitrary
+hierarchy of machines/cores/processes, MI introduces the concept of a
+@dfn{thread group}. Thread group is a collection of threads and other
+thread groups. A thread group always has a string identifier, a type,
+and may have additional attributes specific to the type. A new
+command, @code{-list-thread-groups}, returns the list of top-level
+thread groups, which correspond to processes that @value{GDBN} is
+debugging at the moment. By passing an identifier of a thread group
+to the @code{-list-thread-groups} command, it is possible to obtain
+the members of specific thread group.
+
+To allow the user to easily discover processes, and other objects, he
+wishes to debug, a concept of @dfn{available thread group} is
+introduced. Available thread group is an thread group that
+@value{GDBN} is not debugging, but that can be attached to, using the
+@code{-target-attach} command. The list of available top-level thread
+groups can be obtained using @samp{-list-thread-groups --available}.
+In general, the content of a thread group may be only retrieved only
+after attaching to that thread group.
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node GDB/MI Command Syntax
@section @sc{gdb/mi} Command Syntax
@@ -18428,6 +19486,7 @@ follow development on @email{gdb@@sourceware.org} and
* GDB/MI Result Records::
* GDB/MI Stream Records::
* GDB/MI Async Records::
+* GDB/MI Frame Information::
@end menu
@node GDB/MI Result Records
@@ -18520,7 +19579,7 @@ several times, either for different threads, because it cannot resume
all threads together, or even for a single thread, if the thread must
be stepped though some code before letting it run freely.
-@item *stopped,reason="@var{reason}"
+@item *stopped,reason="@var{reason}",thread-id="@var{id}",stopped-threads="@var{stopped}"
The target has stopped. The @var{reason} field can have one of the
following values:
@@ -18552,12 +19611,74 @@ The inferior exited normally.
A signal was received by the inferior.
@end table
-@item =thread-created,id="@var{id}"
-@itemx =thread-exited,id="@var{id}"
+The @var{id} field identifies the thread that directly caused the stop
+-- for example by hitting a breakpoint. Depending on whether all-stop
+mode is in effect (@pxref{All-Stop Mode}), @value{GDBN} may either
+stop all threads, or only the thread that directly triggered the stop.
+If all threads are stopped, the @var{stopped} field will have the
+value of @code{"all"}. Otherwise, the value of the @var{stopped}
+field will be a list of thread identifiers. Presently, this list will
+always include a single thread, but frontend should be prepared to see
+several threads in the list.
+
+@item =thread-group-created,id="@var{id}"
+@itemx =thread-group-exited,id="@var{id}"
+A thread thread group either was attached to, or has exited/detached
+from. The @var{id} field contains the @value{GDBN} identifier of the
+thread group.
+
+@item =thread-created,id="@var{id}",group-id="@var{gid}"
+@itemx =thread-exited,id="@var{id}",group-id="@var{gid}"
A thread either was created, or has exited. The @var{id} field
-contains the @value{GDBN} identifier of the thread.
+contains the @value{GDBN} identifier of the thread. The @var{gid}
+field identifies the thread group this thread belongs to.
+
+@item =thread-selected,id="@var{id}"
+Informs that the selected thread was changed as result of the last
+command. This notification is not emitted as result of @code{-thread-select}
+command but is emitted whenever an MI command that is not documented
+to change the selected thread actually changes it. In particular,
+invoking, directly or indirectly (via user-defined command), the CLI
+@code{thread} command, will generate this notification.
+
+We suggest that in response to this notification, front ends
+highlight the selected thread and cause subsequent commands to apply to
+that thread.
+
@end table
+@node GDB/MI Frame Information
+@subsection @sc{gdb/mi} Frame Information
+
+Response from many MI commands includes an information about stack
+frame. This information is a tuple that may have the following
+fields:
+
+@table @code
+@item level
+The level of the stack frame. The innermost frame has the level of
+zero. This field is always present.
+
+@item func
+The name of the function corresponding to the frame. This field may
+be absent if @value{GDBN} is unable to determine the function name.
+
+@item addr
+The code address for the frame. This field is always present.
+
+@item file
+The name of the source files that correspond to the frame's code
+address. This field may be absent.
+
+@item line
+The source line corresponding to the frames' code address. This field
+may be absent.
+
+@item from
+The name of the binary file (either executable or shared library) the
+corresponds to the frame's code address. This field may be absent.
+
+@end table
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -19444,14 +20565,27 @@ about all threads.
-thread-info
^done,threads=[
@{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)",
- frame=@{level="0",addr="0xffffe410",func="__kernel_vsyscall",args=[]@},
+ frame=@{level="0",addr="0xffffe410",func="__kernel_vsyscall",args=[]@},state="running"@},
@{id="1",target-id="Thread 0xb7e156b0 (LWP 21254)",
frame=@{level="0",addr="0x0804891f",func="foo",args=[@{name="i",value="10"@}],
- file="/tmp/a.c",fullname="/tmp/a.c",line="158"@}@}],
+ file="/tmp/a.c",fullname="/tmp/a.c",line="158"@},state="running"@}],
current-thread-id="1"
(gdb)
@end smallexample
+The @samp{state} field may have the following values:
+
+@table @code
+@item stopped
+The thread is stopped. Frame information is available for stopped
+threads.
+
+@item running
+The thread is running. There's no frame information for running
+threads.
+
+@end table
+
@subheading The @code{-thread-list-ids} Command
@findex -thread-list-ids
@@ -19464,6 +20598,9 @@ current-thread-id="1"
Produces a list of the currently known @value{GDBN} thread ids. At the
end of the list it also prints the total number of such threads.
+This command is retained for historical reasons, the
+@code{-thread-info} command should be used instead.
+
@subsubheading @value{GDBN} Command
Part of @samp{info threads} supplies the same information.
@@ -19503,6 +20640,9 @@ number-of-threads="3"
Make @var{threadnum} the current thread. It prints the number of the new
current thread, and the topmost frame for that thread.
+This command is deprecated in favor of explicitly using the
+@samp{--thread} option to each command.
+
@subsubheading @value{GDBN} Command
The corresponding @value{GDBN} command is @samp{thread}.
@@ -19545,11 +20685,20 @@ other cases.
@subsubheading Synopsis
@smallexample
- -exec-continue
+ -exec-continue [--all|--thread-group N]
@end smallexample
Resumes the execution of the inferior program until a breakpoint is
-encountered, or until the inferior exits.
+encountered, or until the inferior exits. In all-stop mode
+(@pxref{All-Stop Mode}), may resume only one thread, or all threads,
+depending on the value of the @samp{scheduler-locking} variable. In
+non-stop mode (@pxref{Non-Stop Mode}), if the @samp{--all} is not
+specified, only the thread specified with the @samp{--thread} option
+(or current thread, if no @samp{--thread} is provided) is resumed. If
+@samp{--all} is specified, all threads will be resumed. The
+@samp{--all} option is ignored in all-stop mode. If the
+@samp{--thread-group} options is specified, then all threads in that
+thread group are resumed.
@subsubheading @value{GDBN} Command
@@ -19621,7 +20770,7 @@ gdb-result-var="$1",return-value="0"
@subsubheading Synopsis
@smallexample
- -exec-interrupt
+ -exec-interrupt [--all|--thread-group N]
@end smallexample
Interrupts the background execution of the target. Note how the token
@@ -19630,6 +20779,16 @@ that has been interrupted. The token for the interrupt itself only
appears in the @samp{^done} output. If the user is trying to
interrupt a non-running program, an error message will be printed.
+Note that when asynchronous execution is enabled, this command is
+asynchronous just like other execution commands. That is, first the
+@samp{^done} response will be printed, and the target stop will be
+reported after that using the @samp{*stopped} notification.
+
+In non-stop mode, only the context thread is interrupted by default.
+All threads will be interrupted if the @samp{--all} option is
+specified. If the @samp{--thread-group} option is specified, all
+threads in that group will be interrupted.
+
@subsubheading @value{GDBN} Command
The corresponding @value{GDBN} command is @samp{interrupt}.
@@ -20267,6 +21426,9 @@ more detail.
Change the selected frame. Select a different frame @var{framenum} on
the stack.
+This command in deprecated in favor of passing the @samp{--frame}
+option to every command.
+
@subsubheading @value{GDBN} Command
The corresponding @value{GDBN} commands are @samp{frame}, @samp{up},
@@ -20372,6 +21534,37 @@ visible on the screen, or ``closed''. This is possible using so
called ``frozen variable objects''. Such variable objects are never
implicitly updated.
+Variable objects can be either @dfn{fixed} or @dfn{floating}. For the
+fixed variable object, the expression is parsed when the variable
+object is created, including associating identifiers to specific
+variables. The meaning of expression never changes. For a floating
+variable object the values of variables whose names appear in the
+expressions are re-evaluated every time in the context of the current
+frame. Consider this example:
+
+@smallexample
+void do_work(...)
+@{
+ struct work_state state;
+
+ if (...)
+ do_work(...);
+@}
+@end smallexample
+
+If a fixed variable object for the @code{state} variable is created in
+this function, and we enter the recursive call, the the variable
+object will report the value of @code{state} in the top-level
+@code{do_work} invocation. On the other hand, a floating variable
+object will report the value of @code{state} in the current frame.
+
+If an expression specified when creating a fixed variable object
+refers to a local variable, the variable object becomes bound to the
+thread and frame in which the variable object is created. When such
+variable object is updated, @value{GDBN} makes sure that the
+thread/frame combination the variable object is bound to still exists,
+and re-evaluates the variable object in context of that thread/frame.
+
The following is the complete set of @sc{gdb/mi} operations defined to
access this functionality:
@@ -20421,7 +21614,7 @@ how it can be used.
@smallexample
-var-create @{@var{name} | "-"@}
- @{@var{frame-addr} | "*"@} @var{expression}
+ @{@var{frame-addr} | "*" | "@@"@} @var{expression}
@end smallexample
This operation creates a variable object, which allows the monitoring of
@@ -20431,12 +21624,13 @@ register.
The @var{name} parameter is the string by which the object can be
referenced. It must be unique. If @samp{-} is specified, the varobj
system will generate a string ``varNNNNNN'' automatically. It will be
-unique provided that one does not specify @var{name} on that format.
+unique provided that one does not specify @var{name} of that format.
The command fails if a duplicate name is found.
The frame under which the expression should be evaluated can be
specified by @var{frame-addr}. A @samp{*} indicates that the current
-frame should be used.
+frame should be used. A @samp{@@} indicates that a floating variable
+object must be created.
@var{expression} is any expression valid on the current language set (must not
begin with a @samp{*}), or one of the following:
@@ -20456,10 +21650,11 @@ begin with a @samp{*}), or one of the following:
This operation returns the name, number of children and the type of the
object created. Type is returned as a string as the ones generated by
-the @value{GDBN} CLI:
+the @value{GDBN} CLI. If a fixed variable object is bound to a
+specific thread, the thread is is also printed:
@smallexample
- name="@var{name}",numchild="N",type="@var{type}"
+ name="@var{name}",numchild="@var{N}",type="@var{type}",thread-id="@var{M}"
@end smallexample
@@ -20734,6 +21929,9 @@ as for @code{-var-list-children} (@pxref{-var-list-children}). It is
recommended to use the @samp{--all-values} option, to reduce the
number of MI commands needed on each program stop.
+With the @samp{*} parameter, if a variable object is bound to a
+currently running thread, it will not be updated, without any
+diagnostic.
@subsubheading Example
@@ -21792,10 +22990,13 @@ Signal handling commands are not implemented.
@subsubheading Synopsis
@smallexample
- -target-attach @var{pid} | @var{file}
+ -target-attach @var{pid} | @var{gid} | @var{file}
@end smallexample
-Attach to a process @var{pid} or a file @var{file} outside of @value{GDBN}.
+Attach to a process @var{pid} or a file @var{file} outside of
+@value{GDBN}, or a thread group @var{gid}. If attaching to a thread
+group, the id previously returned by
+@samp{-list-thread-groups --available} must be used.
@subsubheading @value{GDBN} Command
@@ -21837,11 +23038,12 @@ N.A.
@subsubheading Synopsis
@smallexample
- -target-detach
+ -target-detach [ @var{pid} | @var{gid} ]
@end smallexample
Detach from the remote target which normally resumes its execution.
-There's no output.
+If either @var{pid} or @var{gid} is specified, detaches from either
+the specified process, or specified thread group. There's no output.
@subsubheading @value{GDBN} Command
@@ -22350,18 +23552,79 @@ Example output:
The current list of features is:
-@itemize @minus
-@item
-@samp{frozen-varobjs}---indicates presence of the
-@code{-var-set-frozen} command, as well as possible presense of the
-@code{frozen} field in the output of @code{-varobj-create}.
-@item
-@samp{pending-breakpoints}---indicates presence of the @code{-f}
-option to the @code{-break-insert} command.
-@item
-@samp{thread-info}---indicates presence of the @code{-thread-info} command.
+@table @samp
+@item frozen-varobjs
+Indicates presence of the @code{-var-set-frozen} command, as well
+as possible presense of the @code{frozen} field in the output
+of @code{-varobj-create}.
+@item pending-breakpoints
+Indicates presence of the @option{-f} option to the @code{-break-insert} command.
+@item thread-info
+Indicates presence of the @code{-thread-info} command.
+
+@end table
+
+@subheading The @code{-list-target-features} Command
+@findex -list-target-features
+
+Returns a list of particular features that are supported by the
+target. Those features affect the permitted MI commands, but
+unlike the features reported by the @code{-list-features} command, the
+features depend on which target GDB is using at the moment. Whenever
+a target can change, due to commands such as @code{-target-select},
+@code{-target-attach} or @code{-exec-run}, the list of target features
+may change, and the frontend should obtain it again.
+Example output:
-@end itemize
+@smallexample
+(gdb) -list-features
+^done,result=["async"]
+@end smallexample
+
+The current list of features is:
+
+@table @samp
+@item async
+Indicates that the target is capable of asynchronous command
+execution, which means that @value{GDBN} will accept further commands
+while the target is running.
+
+@end table
+
+@subheading The @code{-list-thread-groups} Command
+@findex -list-thread-groups
+
+@subheading Synopsis
+
+@smallexample
+-list-thread-groups [ --available ] [ @var{group} ]
+@end smallexample
+
+When used without the @var{group} parameter, lists top-level thread
+groups that are being debugged. When used with the @var{group}
+parameter, the children of the specified group are listed. The
+children can be either threads, or other groups. At present,
+@value{GDBN} will not report both threads and groups as children at
+the same time, but it may change in future.
+
+With the @samp{--available} option, instead of reporting groups that
+are been debugged, GDB will report all thread groups available on the
+target. Using the @samp{--available} option together with @var{group}
+is not allowed.
+
+@subheading Example
+
+@smallexample
+@value{GDBP}
+-list-thread-groups
+^done,groups=[@{id="17",type="process",pid="yyy",num_children="2"@}]
+-list-thread-groups 17
+^done,threads=[@{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)",
+ frame=@{level="0",addr="0xffffe410",func="__kernel_vsyscall",args=[]@},state="running"@},
+@{id="1",target-id="Thread 0xb7e156b0 (LWP 21254)",
+ frame=@{level="0",addr="0x0804891f",func="foo",args=[@{name="i",value="10"@}],
+ file="/tmp/a.c",fullname="/tmp/a.c",line="158"@},state="running"@}]]
+@end smallexample
@subheading The @code{-interpreter-exec} Command
@findex -interpreter-exec
@@ -23552,18 +24815,33 @@ Shared library events.
@end table
-@kindex maint set can-use-displaced-stepping
-@kindex maint show can-use-displaced-stepping
+@kindex set displaced-stepping
+@kindex show displaced-stepping
@cindex displaced stepping support
@cindex out-of-line single-stepping
-@item maint set can-use-displaced-stepping
-@itemx maint show can-use-displaced-stepping
+@item set displaced-stepping
+@itemx show displaced-stepping
Control whether or not @value{GDBN} will do @dfn{displaced stepping}
-if the target supports it. The default is on. Displaced stepping is
-a way to single-step over breakpoints without removing them from the
-inferior, by executing an out-of-line copy of the instruction that was
-originally at the breakpoint location. It is also known as
-out-of-line single-stepping.
+if the target supports it. Displaced stepping is a way to single-step
+over breakpoints without removing them from the inferior, by executing
+an out-of-line copy of the instruction that was originally at the
+breakpoint location. It is also known as out-of-line single-stepping.
+
+@table @code
+@item set displaced-stepping on
+If the target architecture supports it, @value{GDBN} will use
+displaced stepping to step over breakpoints.
+
+@item set displaced-stepping off
+@value{GDBN} will not use displaced stepping to step over breakpoints,
+even if such is supported by the target architecture.
+
+@cindex non-stop mode, and @samp{set displaced-stepping}
+@item set displaced-stepping auto
+This is the default mode. @value{GDBN} will use displaced stepping
+only if non-stop mode is active (@pxref{Non-Stop Mode}) and the target
+architecture supports displaced stepping.
+@end table
@kindex maint check-symtabs
@item maint check-symtabs
@@ -23792,7 +25070,8 @@ compiled with the @samp{-pg} compiler option.
@cindex asynchronous support
@item maint set linux-async
@itemx maint show linux-async
-Control the GNU/Linux native asynchronous support of @value{GDBN}.
+Control the GNU/Linux native asynchronous support
+(@pxref{Background Execution}) of @value{GDBN}.
GNU/Linux native asynchronous support will be disabled until you use
the @samp{maint set linux-async} command to enable it.
@@ -23802,7 +25081,8 @@ the @samp{maint set linux-async} command to enable it.
@cindex asynchronous support
@item maint set remote-async
@itemx maint show remote-async
-Control the remote asynchronous support of @value{GDBN}.
+Control the remote asynchronous support
+(@pxref{Background Execution}) of @value{GDBN}.
Remote asynchronous support will be disabled until you use
the @samp{maint set remote-async} command to enable it.
@@ -23847,6 +25127,10 @@ the symbol's location to the specified address. This is similar to
the @code{info address} command (@pxref{Symbols}), except that this
command also allows to find symbols in other sections.
+If section was not specified, the section in which the symbol was found
+is also printed. For dynamically linked executables, the name of
+executable or shared library containing the symbol is printed as well.
+
@end table
The following command is useful for non-interactive invocations of
@@ -23877,6 +25161,9 @@ Show the current setting of the target wait timeout.
* Tracepoint Packets::
* Host I/O Packets::
* Interrupts::
+* Notification Packets::
+* Remote Non-Stop::
+* Packet Acknowledgment::
* Examples::
* File-I/O Remote Protocol Extension::
* Library List Format::
@@ -23897,8 +25184,9 @@ transmitted and received data, respectively.
@cindex protocol, @value{GDBN} remote serial
@cindex serial protocol, @value{GDBN} remote
@cindex remote serial protocol
-All @value{GDBN} commands and responses (other than acknowledgments) are
-sent as a @var{packet}. A @var{packet} is introduced with the character
+All @value{GDBN} commands and responses (other than acknowledgments
+and notifications, see @ref{Notification Packets}) are sent as a
+@var{packet}. A @var{packet} is introduced with the character
@samp{$}, the actual @var{packet-data}, and the terminating character
@samp{#} followed by a two-digit @var{checksum}:
@@ -23926,7 +25214,6 @@ That @var{sequence-id} was appended to the acknowledgment. @value{GDBN}
has never output @var{sequence-id}s. Stubs that handle packets added
since @value{GDBN} 5.0 must not accept @var{sequence-id}.
-@cindex acknowledgment, for @value{GDBN} remote
When either the host or the target machine receives a packet, the first
response expected is an acknowledgment: either @samp{+} (to indicate
the package was received correctly) or @samp{-} (to request
@@ -23938,10 +25225,17 @@ retransmission):
@end smallexample
@noindent
+The @samp{+}/@samp{-} acknowledgments can be disabled
+once a connection is established.
+@xref{Packet Acknowledgment}, for details.
+
The host (@value{GDBN}) sends @var{command}s, and the target (the
debugging stub incorporated in your program) sends a @var{response}. In
the case of step and continue @var{command}s, the response is only sent
-when the operation has completed (the target has again stopped).
+when the operation has completed, and the target has again stopped all
+threads in all attached processes. This is the default all-stop mode
+behavior, but the remote protocol also supports @value{GDBN}'s non-stop
+execution mode; see @ref{Remote Non-Stop}, for details.
@var{packet-data} consists of a sequence of characters with the
exception of @samp{#} and @samp{$} (see @samp{X} packet for additional
@@ -24027,6 +25321,33 @@ bytes @samp{foo}, followed by a @var{bar}, followed directly by a
@samp{foo} and the @var{bar}, or between the @var{bar} and the
@var{baz}.
+@cindex @var{thread-id}, in remote protocol
+@anchor{thread-id syntax}
+Several packets and replies include a @var{thread-id} field to identify
+a thread. Normally these are positive numbers with a target-specific
+interpretation, formatted as big-endian hex strings. A @var{thread-id}
+can also be a literal @samp{-1} to indicate all threads, or @samp{0} to
+pick any thread.
+
+In addition, the remote protocol supports a multiprocess feature in
+which the @var{thread-id} syntax is extended to optionally include both
+process and thread ID fields, as @samp{p@var{pid}.@var{tid}}.
+The @var{pid} (process) and @var{tid} (thread) components each have the
+format described above: a positive number with target-specific
+interpretation formatted as a big-endian hex string, literal @samp{-1}
+to indicate all processes or threads (respectively), or @samp{0} to
+indicate an arbitrary process or thread. Specifying just a process, as
+@samp{p@var{pid}}, is equivalent to @samp{p@var{pid}.-1}. It is an
+error to specify all processes but a specific thread, such as
+@samp{p-1.@var{tid}}. Note that the @samp{p} prefix is @emph{not} used
+for those packets and replies explicitly documented to include a process
+ID, rather than a @var{thread-id}.
+
+The multiprocess @var{thread-id} syntax extensions are only used if both
+@value{GDBN} and the stub report support for the @samp{multiprocess}
+feature using @samp{qSupported}. @xref{multiprocess extensions}, for
+more information.
+
Note that all packet forms beginning with an upper- or lower-case
letter, other than those described here, are reserved for future use.
@@ -24050,7 +25371,8 @@ The remote target both supports and has enabled extended mode.
@item ?
@cindex @samp{?} packet
Indicate the reason the target halted. The reply is the same as for
-step and continue.
+step and continue. This packet has a special interpretation when the
+target is in non-stop mode; see @ref{Remote Non-Stop}.
Reply:
@xref{Stop Reply Packets}, for the reply specifications.
@@ -24092,6 +25414,22 @@ breakpoint at @var{addr}.
Don't use this packet. Use the @samp{Z} and @samp{z} packets instead
(@pxref{insert breakpoint or watchpoint packet}).
+@item bc
+@cindex @samp{bc} packet
+Backward continue. Execute the target system in reverse. No parameter.
+@xref{Reverse Execution}, for more information.
+
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
+@item bs
+@cindex @samp{bs} packet
+Backward single step. Execute one instruction in reverse. No parameter.
+@xref{Reverse Execution}, for more information.
+
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
@item c @r{[}@var{addr}@r{]}
@cindex @samp{c} packet
Continue. @var{addr} is address to resume. If @var{addr} is omitted,
@@ -24116,10 +25454,17 @@ Don't use this packet; instead, define a general set packet
(@pxref{General Query Packets}).
@item D
+@itemx D;@var{pid}
@cindex @samp{D} packet
-Detach @value{GDBN} from the remote system. Sent to the remote target
+The first form of the packet is used to detach @value{GDBN} from the
+remote system. It is sent to the remote target
before @value{GDBN} disconnects via the @code{detach} command.
+The second form, including a process ID, is used when multiprocess
+protocol extensions are enabled (@pxref{multiprocess extensions}), to
+detach only a specific process. The @var{pid} is specified as a
+big-endian hex string.
+
Reply:
@table @samp
@item OK
@@ -24165,13 +25510,13 @@ for success
for an error
@end table
-@item H @var{c} @var{t}
+@item H @var{c} @var{thread-id}
@cindex @samp{H} packet
Set thread for subsequent operations (@samp{m}, @samp{M}, @samp{g},
@samp{G}, et.al.). @var{c} depends on the operation to be performed: it
should be @samp{c} for step and continue operations, @samp{g} for other
-operations. The thread designator @var{t} may be @samp{-1}, meaning all
-the threads, a thread number, or @samp{0} which means pick any thread.
+operations. The thread designator @var{thread-id} has the format and
+interpretation described in @ref{thread-id syntax}.
Reply:
@table @samp
@@ -24329,9 +25674,9 @@ Search backwards starting at address @var{addr} for a match with pattern
@var{PP} and mask @var{MM}. @var{PP} and @var{MM} are 4 bytes.
@var{addr} must be at least 3 digits.
-@item T @var{XX}
+@item T @var{thread-id}
@cindex @samp{T} packet
-Find out if the thread XX is alive.
+Find out if the thread @var{thread-id} is alive. @xref{thread-id syntax}.
Reply:
@table @samp
@@ -24347,9 +25692,20 @@ up to the first @samp{;} or @samp{?} (or the end of the packet).
@item vAttach;@var{pid}
@cindex @samp{vAttach} packet
-Attach to a new process with the specified process ID. @var{pid} is a
-hexadecimal integer identifying the process. The attached process is
-stopped.
+Attach to a new process with the specified process ID @var{pid}.
+The process ID is a
+hexadecimal integer identifying the process. In all-stop mode, all
+threads in the attached process are stopped; in non-stop mode, it may be
+attached without being stopped if that is supported by the target.
+
+@c In non-stop mode, on a successful vAttach, the stub should set the
+@c current thread to a thread of the newly-attached process. After
+@c attaching, GDB queries for the attached process's thread ID with qC.
+@c Also note that, from a user perspective, whether or not the
+@c target is stopped on attach in non-stop mode depends on whether you
+@c use the foreground or background version of the attach command, not
+@c on what vAttach does; GDB does the right thing with respect to either
+@c stopping or restarting threads.
This packet is only available in extended mode (@pxref{extended mode}).
@@ -24358,32 +25714,51 @@ Reply:
@item E @var{nn}
for an error
@item @r{Any stop packet}
-for success (@pxref{Stop Reply Packets})
+for success in all-stop mode (@pxref{Stop Reply Packets})
+@item OK
+for success in non-stop mode (@pxref{Remote Non-Stop})
@end table
-@item vCont@r{[};@var{action}@r{[}:@var{tid}@r{]]}@dots{}
+@item vCont@r{[};@var{action}@r{[}:@var{thread-id}@r{]]}@dots{}
@cindex @samp{vCont} packet
Resume the inferior, specifying different actions for each thread.
-If an action is specified with no @var{tid}, then it is applied to any
+If an action is specified with no @var{thread-id}, then it is applied to any
threads that don't have a specific action specified; if no default action is
-specified then other threads should remain stopped. Specifying multiple
+specified then other threads should remain stopped in all-stop mode and
+in their current state in non-stop mode.
+Specifying multiple
default actions is an error; specifying no actions is also an error.
-Thread IDs are specified in hexadecimal. Currently supported actions are:
+Thread IDs are specified using the syntax described in @ref{thread-id syntax}.
+
+Currently supported actions are:
@table @samp
@item c
Continue.
@item C @var{sig}
-Continue with signal @var{sig}. @var{sig} should be two hex digits.
+Continue with signal @var{sig}. The signal @var{sig} should be two hex digits.
@item s
Step.
@item S @var{sig}
-Step with signal @var{sig}. @var{sig} should be two hex digits.
+Step with signal @var{sig}. The signal @var{sig} should be two hex digits.
+@item t
+Stop.
+@item T @var{sig}
+Stop with signal @var{sig}. The signal @var{sig} should be two hex digits.
@end table
-The optional @var{addr} argument normally associated with these packets is
+The optional argument @var{addr} normally associated with the
+@samp{c}, @samp{C}, @samp{s}, and @samp{S} packets is
not supported in @samp{vCont}.
+The @samp{t} and @samp{T} actions are only relevant in non-stop mode
+(@pxref{Remote Non-Stop}) and may be ignored by the stub otherwise.
+A stop reply should be generated for any affected thread not already stopped.
+When a thread is stopped by means of a @samp{t} action,
+the corresponding stop reply should indicate that the thread has stopped with
+signal @samp{0}, regardless of whether the target uses some other signal
+as an implementation detail.
+
Reply:
@xref{Stop Reply Packets}, for the reply specifications.
@@ -24416,6 +25791,12 @@ together, and sends a @samp{vFlashDone} request after each group; the
stub is allowed to delay erase operation until the @samp{vFlashDone}
packet is received.
+The stub must support @samp{vCont} if it reports support for
+multiprocess extensions (@pxref{multiprocess extensions}). Note that in
+this case @samp{vCont} actions can be specified to apply to all threads
+in a process by using the @samp{p@var{pid}.-1} form of the
+@var{thread-id}.
+
Reply:
@table @samp
@item OK
@@ -24457,6 +25838,21 @@ The stub is permitted to delay or batch the effects of a group of
regions of flash memory are unpredictable until the @samp{vFlashDone}
request is completed.
+@item vKill;@var{pid}
+@cindex @samp{vKill} packet
+Kill the process with the specified process ID. @var{pid} is a
+hexadecimal integer identifying the process. This packet is used in
+preference to @samp{k} when multiprocess protocol extensions are
+supported; see @ref{multiprocess extensions}.
+
+Reply:
+@table @samp
+@item E @var{nn}
+for an error
+@item OK
+for success
+@end table
+
@item vRun;@var{filename}@r{[};@var{argument}@r{]}@dots{}
@cindex @samp{vRun} packet
Run the program @var{filename}, passing it each @var{argument} on its
@@ -24465,6 +25861,8 @@ command line. The file and arguments are hex-encoded strings. If
(e.g.@: the last program run). The program is created in the stopped
state.
+@c FIXME: What about non-stop mode?
+
This packet is only available in extended mode (@pxref{extended mode}).
Reply:
@@ -24475,6 +25873,21 @@ for an error
for success (@pxref{Stop Reply Packets})
@end table
+@item vStopped
+@anchor{vStopped packet}
+@cindex @samp{vStopped} packet
+
+In non-stop mode (@pxref{Remote Non-Stop}), acknowledge a previous stop
+reply and prompt for the stub to report another one.
+
+Reply:
+@table @samp
+@item @r{Any stop packet}
+if there is another unreported stop event (@pxref{Stop Reply Packets})
+@item OK
+if there are no unreported stop events
+@end table
+
@item X @var{addr},@var{length}:@var{XX@dots{}}
@anchor{X packet}
@cindex @samp{X} packet
@@ -24614,9 +26027,10 @@ for an error
@section Stop Reply Packets
@cindex stop reply packets
-The @samp{C}, @samp{c}, @samp{S}, @samp{s} and @samp{?} packets can
-receive any of the below as a reply. In the case of the @samp{C},
-@samp{c}, @samp{S} and @samp{s} packets, that reply is only returned
+The @samp{C}, @samp{c}, @samp{S}, @samp{s}, @samp{vCont},
+@samp{vAttach}, @samp{vRun}, @samp{vStopped}, and @samp{?} packets can
+receive any of the below as a reply. Except for @samp{?}
+and @samp{vStopped}, that reply is only returned
when the target halts. In the below the exact meaning of @dfn{signal
number} is defined by the header @file{include/gdb/signals.h} in the
@value{GDBN} source code.
@@ -24650,8 +26064,8 @@ series of bytes in target byte order, with each byte given by a
two-digit hex number.
@item
-If @var{n} is @samp{thread}, then @var{r} is the thread process ID, in
-hex.
+If @var{n} is @samp{thread}, then @var{r} is the @var{thread-id} of
+the stopped thread, as specified in @ref{thread-id syntax}.
@item
If @var{n} is a recognized @dfn{stop reason}, it describes a more
@@ -24679,20 +26093,42 @@ hex.
The packet indicates that the loaded libraries have changed.
@value{GDBN} should use @samp{qXfer:libraries:read} to fetch a new
list of loaded libraries. @var{r} is ignored.
+
+@cindex replay log events, remote reply
+@item replaylog
+The packet indicates that the target cannot continue replaying
+logged execution events, because it has reached the end (or the
+beginning when executing backward) of the log. The value of @var{r}
+will be either @samp{begin} or @samp{end}. @xref{Reverse Execution},
+for more information.
+
+
@end table
@item W @var{AA}
+@itemx W @var{AA} ; process:@var{pid}
The process exited, and @var{AA} is the exit status. This is only
applicable to certain targets.
+The second form of the response, including the process ID of the exited
+process, can be used only when @value{GDBN} has reported support for
+multiprocess protocol extensions; see @ref{multiprocess extensions}.
+The @var{pid} is formatted as a big-endian hex string.
+
@item X @var{AA}
+@itemx X @var{AA} ; process:@var{pid}
The process terminated with signal @var{AA}.
+The second form of the response, including the process ID of the
+terminated process, can be used only when @value{GDBN} has reported
+support for multiprocess protocol extensions; see @ref{multiprocess
+extensions}. The @var{pid} is formatted as a big-endian hex string.
+
@item O @var{XX}@dots{}
@samp{@var{XX}@dots{}} is hex encoding of @sc{ascii} data, to be
written as the program's console output. This can happen at any time
while the program is running and the debugger should continue to wait
-for @samp{W}, @samp{T}, etc.
+for @samp{W}, @samp{T}, etc. This reply is not permitted in non-stop mode.
@item F @var{call-id},@var{parameter}@dots{}
@var{call-id} is the identifier which says which host system call should
@@ -24766,14 +26202,15 @@ Here are the currently defined query and set packets:
@item qC
@cindex current thread, remote request
@cindex @samp{qC} packet
-Return the current thread id.
+Return the current thread ID.
Reply:
@table @samp
-@item QC @var{pid}
-Where @var{pid} is an unsigned hexadecimal process id.
+@item QC @var{thread-id}
+Where @var{thread-id} is a thread ID as documented in
+@ref{thread-id syntax}.
@item @r{(anything else)}
-Any other reply implies the old pid.
+Any other reply implies the old thread ID.
@end table
@item qCRC:@var{addr},@var{length}
@@ -24793,7 +26230,7 @@ The specified memory region's checksum is @var{crc32}.
@cindex list active threads, remote request
@cindex @samp{qfThreadInfo} packet
@cindex @samp{qsThreadInfo} packet
-Obtain a list of all active thread ids from the target (OS). Since there
+Obtain a list of all active thread IDs from the target (OS). Since there
may be too many active threads to fit into one reply packet, this query
works iteratively: it may require more than one query/reply sequence to
obtain the entire list of threads. The first query of the sequence will
@@ -24804,19 +26241,21 @@ NOTE: This packet replaces the @samp{qL} query (see below).
Reply:
@table @samp
-@item m @var{id}
-A single thread id
-@item m @var{id},@var{id}@dots{}
-a comma-separated list of thread ids
+@item m @var{thread-id}
+A single thread ID
+@item m @var{thread-id},@var{thread-id}@dots{}
+a comma-separated list of thread IDs
@item l
(lower case letter @samp{L}) denotes end of list.
@end table
In response to each query, the target will reply with a list of one or
-more thread ids, in big-endian unsigned hex, separated by commas.
+more thread IDs, separated by commas.
@value{GDBN} will respond to each reply with a request for more thread
ids (using the @samp{qs} form of the query), until the target responds
-with @samp{l} (lower-case el, for @dfn{last}).
+with @samp{l} (lower-case el, for @dfn{last}).
+Refer to @ref{thread-id syntax}, for the format of the @var{thread-id}
+fields.
@item qGetTLSAddr:@var{thread-id},@var{offset},@var{lm}
@cindex get thread-local storage address, remote request
@@ -24824,8 +26263,8 @@ with @samp{l} (lower-case el, for @dfn{last}).
Fetch the address associated with thread local storage specified
by @var{thread-id}, @var{offset}, and @var{lm}.
-@var{thread-id} is the (big endian, hex encoded) thread id associated with the
-thread for which to fetch the TLS address.
+@var{thread-id} is the thread ID associated with the
+thread for which to fetch the TLS address. @xref{thread-id syntax}.
@var{offset} is the (big endian, hex encoded) offset associated with the
thread local variable. (This offset is obtained from the debug
@@ -24902,17 +26341,44 @@ as many segments as mentioned in the reply. Extra segments are
kept at fixed offsets relative to the last relocated segment.
@end table
-@item qP @var{mode} @var{threadid}
+@item qP @var{mode} @var{thread-id}
@cindex thread information, remote request
@cindex @samp{qP} packet
-Returns information on @var{threadid}. Where: @var{mode} is a hex
-encoded 32 bit mode; @var{threadid} is a hex encoded 64 bit thread ID.
+Returns information on @var{thread-id}. Where: @var{mode} is a hex
+encoded 32 bit mode; @var{thread-id} is a thread ID
+(@pxref{thread-id syntax}).
Don't use this packet; use the @samp{qThreadExtraInfo} query instead
(see below).
Reply: see @code{remote.c:remote_unpack_thread_info_response()}.
+@item QNonStop:1
+@item QNonStop:0
+@cindex non-stop mode, remote request
+@cindex @samp{QNonStop} packet
+@anchor{QNonStop}
+Enter non-stop (@samp{QNonStop:1}) or all-stop (@samp{QNonStop:0}) mode.
+@xref{Remote Non-Stop}, for more information.
+
+Reply:
+@table @samp
+@item OK
+The request succeeded.
+
+@item E @var{nn}
+An error occurred. @var{nn} are hex digits.
+
+@item
+An empty reply indicates that @samp{QNonStop} is not supported by
+the stub.
+@end table
+
+This packet is not probed by default; the remote stub must request it,
+by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}).
+Use of this packet is controlled by the @code{set non-stop} command;
+@pxref{Non-Stop Mode}.
+
@item QPassSignals: @var{signal} @r{[};@var{signal}@r{]}@dots{}
@cindex pass signals to inferior, remote request
@cindex @samp{QPassSignals} packet
@@ -24992,6 +26458,23 @@ A badly formed request or an error was encountered while searching memory.
An empty reply indicates that @samp{qSearch:memory} is not recognized.
@end table
+@item QStartNoAckMode
+@cindex @samp{QStartNoAckMode} packet
+@anchor{QStartNoAckMode}
+Request that the remote stub disable the normal @samp{+}/@samp{-}
+protocol acknowledgments (@pxref{Packet Acknowledgment}).
+
+Reply:
+@table @samp
+@item OK
+The stub has switched to no-acknowledgment mode.
+@value{GDBN} acknowledges this reponse,
+but neither the stub nor @value{GDBN} shall send or expect further
+@samp{+}/@samp{-} acknowledgments in the current connection.
+@item
+An empty reply indicates that the stub does not support no-acknowledgment mode.
+@end table
+
@item qSupported @r{[}:@var{gdbfeature} @r{[};@var{gdbfeature}@r{]}@dots{} @r{]}
@cindex supported packets, remote query
@cindex features of the remote protocol
@@ -25050,16 +26533,26 @@ request. This allows @value{GDBN} to put the stub in a known
state, even if the stub had previously been communicating with
a different version of @value{GDBN}.
-No values of @var{gdbfeature} (for the packet sent by @value{GDBN})
-are defined yet. Stubs should ignore any unknown values for
+The following values of @var{gdbfeature} (for the packet sent by @value{GDBN})
+are defined:
+
+@table @samp
+@item multiprocess
+This feature indicates whether @value{GDBN} supports multiprocess
+extensions to the remote protocol. @value{GDBN} does not use such
+extensions unless the stub also reports that it supports them by
+including @samp{multiprocess+} in its @samp{qSupported} reply.
+@xref{multiprocess extensions}, for details.
+@end table
+
+Stubs should ignore any unknown values for
@var{gdbfeature}. Any @value{GDBN} which sends a @samp{qSupported}
packet supports receiving packets of unlimited length (earlier
-versions of @value{GDBN} may reject overly long responses). Values
+versions of @value{GDBN} may reject overly long responses). Additional values
for @var{gdbfeature} may be defined in the future to let the stub take
advantage of new features in @value{GDBN}, e.g.@: incompatible
-improvements in the remote protocol---support for unlimited length
-responses would be a @var{gdbfeature} example, if it were not implied by
-the @samp{qSupported} query. The stub's reply should be independent
+improvements in the remote protocol---the @samp{multiprocess} feature is
+an example of such a feature. The stub's reply should be independent
of the @var{gdbfeature} entries sent by @value{GDBN}; first @value{GDBN}
describes all the features it supports, and then the stub replies with
all the features it supports.
@@ -25128,11 +26621,26 @@ These are the currently defined stub features and their properties:
@tab @samp{-}
@tab Yes
+@item @samp{QNonStop}
+@tab No
+@tab @samp{-}
+@tab Yes
+
@item @samp{QPassSignals}
@tab No
@tab @samp{-}
@tab Yes
+@item @samp{QStartNoAckMode}
+@tab No
+@tab @samp{-}
+@tab Yes
+
+@item @samp{multiprocess}
+@tab No
+@tab @samp{-}
+@tab No
+
@end multitable
These are the currently defined stub features, in more detail:
@@ -25173,10 +26681,35 @@ The remote stub understands the @samp{qXfer:spu:read} packet
The remote stub understands the @samp{qXfer:spu:write} packet
(@pxref{qXfer spu write}).
+@item QNonStop
+The remote stub understands the @samp{QNonStop} packet
+(@pxref{QNonStop}).
+
@item QPassSignals
The remote stub understands the @samp{QPassSignals} packet
(@pxref{QPassSignals}).
+@item QStartNoAckMode
+The remote stub understands the @samp{QStartNoAckMode} packet and
+prefers to operate in no-acknowledgment mode. @xref{Packet Acknowledgment}.
+
+@item multiprocess
+@anchor{multiprocess extensions}
+@cindex multiprocess extensions, in remote protocol
+The remote stub understands the multiprocess extensions to the remote
+protocol syntax. The multiprocess extensions affect the syntax of
+thread IDs in both packets and replies (@pxref{thread-id syntax}), and
+add process IDs to the @samp{D} packet and @samp{W} and @samp{X}
+replies. Note that reporting this feature indicates support for the
+syntactic extensions only, not that the stub necessarily supports
+debugging of more than one process at a time. The stub must not use
+multiprocess extensions in packet replies unless @value{GDBN} has also
+indicated it supports them in its @samp{qSupported} request.
+
+@item qXfer:osdata:read
+The remote stub understands the @samp{qXfer:osdata:read} packet
+((@pxref{qXfer osdata read}).
+
@end table
@item qSymbol::
@@ -25220,11 +26753,12 @@ encoded). @value{GDBN} will continue to supply the values of symbols
@itemx QTFrame
@xref{Tracepoint Packets}.
-@item qThreadExtraInfo,@var{id}
+@item qThreadExtraInfo,@var{thread-id}
@cindex thread attributes info, remote request
@cindex @samp{qThreadExtraInfo} packet
Obtain a printable string description of a thread's attributes from
-the target OS. @var{id} is a thread-id in big-endian hex. This
+the target OS. @var{thread-id} is a thread ID;
+see @ref{thread-id syntax}. This
string may contain anything that the target OS thinks is interesting
for @value{GDBN} to tell the user about the thread. The string is
displayed in @value{GDBN}'s @code{info threads} display. Some
@@ -25314,7 +26848,14 @@ in the target process, and @var{name} identifes the @code{spufs} file
in that context to be accessed.
This packet is not probed by default; the remote stub must request it,
-by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}).
+by supplying an appropriate @samp{qSupported} response
+(@pxref{qSupported}).
+
+@item qXfer:osdata:read::@var{offset},@var{length}
+@anchor{qXfer osdata read}
+Access the target's @dfn{operating system information}.
+@xref{Operating System Information}.
+
@end table
Reply:
@@ -25700,9 +27241,10 @@ control of which is specified via @value{GDBN}'s @samp{remotebreak}
setting (@pxref{set remotebreak}).
The precise meaning of @code{BREAK} is defined by the transport
-mechanism and may, in fact, be undefined. @value{GDBN} does
-not currently define a @code{BREAK} mechanism for any of the network
-interfaces.
+mechanism and may, in fact, be undefined. @value{GDBN} does not
+currently define a @code{BREAK} mechanism for any of the network
+interfaces except for TCP, in which case @value{GDBN} sends the
+@code{telnet} BREAK sequence.
@samp{Ctrl-C}, on the other hand, is defined and implemented for all
transport mechanisms. It is represented by sending the single byte
@@ -25715,11 +27257,191 @@ and does @emph{not} represent an interrupt. E.g., an @samp{X} packet
Stubs are not required to recognize these interrupt mechanisms and the
precise meaning associated with receipt of the interrupt is
-implementation defined. If the stub is successful at interrupting the
-running program, it is expected that it will send one of the Stop
-Reply Packets (@pxref{Stop Reply Packets}) to @value{GDBN} as a result
-of successfully stopping the program. Interrupts received while the
-program is stopped will be discarded.
+implementation defined. If the target supports debugging of multiple
+threads and/or processes, it should attempt to interrupt all
+currently-executing threads and processes.
+If the stub is successful at interrupting the
+running program, it should send one of the stop
+reply packets (@pxref{Stop Reply Packets}) to @value{GDBN} as a result
+of successfully stopping the program in all-stop mode, and a stop reply
+for each stopped thread in non-stop mode.
+Interrupts received while the
+program is stopped are discarded.
+
+@node Notification Packets
+@section Notification Packets
+@cindex notification packets
+@cindex packets, notification
+
+The @value{GDBN} remote serial protocol includes @dfn{notifications},
+packets that require no acknowledgment. Both the GDB and the stub
+may send notifications (although the only notifications defined at
+present are sent by the stub). Notifications carry information
+without incurring the round-trip latency of an acknowledgment, and so
+are useful for low-impact communications where occasional packet loss
+is not a problem.
+
+A notification packet has the form @samp{% @var{data} #
+@var{checksum}}, where @var{data} is the content of the notification,
+and @var{checksum} is a checksum of @var{data}, computed and formatted
+as for ordinary @value{GDBN} packets. A notification's @var{data}
+never contains @samp{$}, @samp{%} or @samp{#} characters. Upon
+receiving a notification, the recipient sends no @samp{+} or @samp{-}
+to acknowledge the notification's receipt or to report its corruption.
+
+Every notification's @var{data} begins with a name, which contains no
+colon characters, followed by a colon character.
+
+Recipients should silently ignore corrupted notifications and
+notifications they do not understand. Recipients should restart
+timeout periods on receipt of a well-formed notification, whether or
+not they understand it.
+
+Senders should only send the notifications described here when this
+protocol description specifies that they are permitted. In the
+future, we may extend the protocol to permit existing notifications in
+new contexts; this rule helps older senders avoid confusing newer
+recipients.
+
+(Older versions of @value{GDBN} ignore bytes received until they see
+the @samp{$} byte that begins an ordinary packet, so new stubs may
+transmit notifications without fear of confusing older clients. There
+are no notifications defined for @value{GDBN} to send at the moment, but we
+assume that most older stubs would ignore them, as well.)
+
+The following notification packets from the stub to @value{GDBN} are
+defined:
+
+@table @samp
+@item Stop: @var{reply}
+Report an asynchronous stop event in non-stop mode.
+The @var{reply} has the form of a stop reply, as
+described in @ref{Stop Reply Packets}. Refer to @ref{Remote Non-Stop},
+for information on how these notifications are acknowledged by
+@value{GDBN}.
+@end table
+
+@node Remote Non-Stop
+@section Remote Protocol Support for Non-Stop Mode
+
+@value{GDBN}'s remote protocol supports non-stop debugging of
+multi-threaded programs, as described in @ref{Non-Stop Mode}. If the stub
+supports non-stop mode, it should report that to @value{GDBN} by including
+@samp{QNonStop+} in its @samp{qSupported} response (@pxref{qSupported}).
+
+@value{GDBN} typically sends a @samp{QNonStop} packet only when
+establishing a new connection with the stub. Entering non-stop mode
+does not alter the state of any currently-running threads, but targets
+must stop all threads in any already-attached processes when entering
+all-stop mode. @value{GDBN} uses the @samp{?} packet as necessary to
+probe the target state after a mode change.
+
+In non-stop mode, when an attached process encounters an event that
+would otherwise be reported with a stop reply, it uses the
+asynchronous notification mechanism (@pxref{Notification Packets}) to
+inform @value{GDBN}. In contrast to all-stop mode, where all threads
+in all processes are stopped when a stop reply is sent, in non-stop
+mode only the thread reporting the stop event is stopped. That is,
+when reporting a @samp{S} or @samp{T} response to indicate completion
+of a step operation, hitting a breakpoint, or a fault, only the
+affected thread is stopped; any other still-running threads continue
+to run. When reporting a @samp{W} or @samp{X} response, all running
+threads belonging to other attached processes continue to run.
+
+Only one stop reply notification at a time may be pending; if
+additional stop events occur before @value{GDBN} has acknowledged the
+previous notification, they must be queued by the stub for later
+synchronous transmission in response to @samp{vStopped} packets from
+@value{GDBN}. Because the notification mechanism is unreliable,
+the stub is permitted to resend a stop reply notification
+if it believes @value{GDBN} may not have received it. @value{GDBN}
+ignores additional stop reply notifications received before it has
+finished processing a previous notification and the stub has completed
+sending any queued stop events.
+
+Otherwise, @value{GDBN} must be prepared to receive a stop reply
+notification at any time. Specifically, they may appear when
+@value{GDBN} is not otherwise reading input from the stub, or when
+@value{GDBN} is expecting to read a normal synchronous response or a
+@samp{+}/@samp{-} acknowledgment to a packet it has sent.
+Notification packets are distinct from any other communication from
+the stub so there is no ambiguity.
+
+After receiving a stop reply notification, @value{GDBN} shall
+acknowledge it by sending a @samp{vStopped} packet (@pxref{vStopped packet})
+as a regular, synchronous request to the stub. Such acknowledgment
+is not required to happen immediately, as @value{GDBN} is permitted to
+send other, unrelated packets to the stub first, which the stub should
+process normally.
+
+Upon receiving a @samp{vStopped} packet, if the stub has other queued
+stop events to report to @value{GDBN}, it shall respond by sending a
+normal stop reply response. @value{GDBN} shall then send another
+@samp{vStopped} packet to solicit further responses; again, it is
+permitted to send other, unrelated packets as well which the stub
+should process normally.
+
+If the stub receives a @samp{vStopped} packet and there are no
+additional stop events to report, the stub shall return an @samp{OK}
+response. At this point, if further stop events occur, the stub shall
+send a new stop reply notification, @value{GDBN} shall accept the
+notification, and the process shall be repeated.
+
+In non-stop mode, the target shall respond to the @samp{?} packet as
+follows. First, any incomplete stop reply notification/@samp{vStopped}
+sequence in progress is abandoned. The target must begin a new
+sequence reporting stop events for all stopped threads, whether or not
+it has previously reported those events to @value{GDBN}. The first
+stop reply is sent as a synchronous reply to the @samp{?} packet, and
+subsequent stop replies are sent as responses to @samp{vStopped} packets
+using the mechanism described above. The target must not send
+asynchronous stop reply notifications until the sequence is complete.
+If all threads are running when the target receives the @samp{?} packet,
+or if the target is not attached to any process, it shall respond
+@samp{OK}.
+
+@node Packet Acknowledgment
+@section Packet Acknowledgment
+
+@cindex acknowledgment, for @value{GDBN} remote
+@cindex packet acknowledgment, for @value{GDBN} remote
+By default, when either the host or the target machine receives a packet,
+the first response expected is an acknowledgment: either @samp{+} (to indicate
+the package was received correctly) or @samp{-} (to request retransmission).
+This mechanism allows the @value{GDBN} remote protocol to operate over
+unreliable transport mechanisms, such as a serial line.
+
+In cases where the transport mechanism is itself reliable (such as a pipe or
+TCP connection), the @samp{+}/@samp{-} acknowledgments are redundant.
+It may be desirable to disable them in that case to reduce communication
+overhead, or for other reasons. This can be accomplished by means of the
+@samp{QStartNoAckMode} packet; @pxref{QStartNoAckMode}.
+
+When in no-acknowledgment mode, neither the stub nor @value{GDBN} shall send or
+expect @samp{+}/@samp{-} protocol acknowledgments. The packet
+and response format still includes the normal checksum, as described in
+@ref{Overview}, but the checksum may be ignored by the receiver.
+
+If the stub supports @samp{QStartNoAckMode} and prefers to operate in
+no-acknowledgment mode, it should report that to @value{GDBN}
+by including @samp{QStartNoAckMode+} in its response to @samp{qSupported};
+@pxref{qSupported}.
+If @value{GDBN} also supports @samp{QStartNoAckMode} and it has not been
+disabled via the @code{set remote noack-packet off} command
+(@pxref{Remote Configuration}),
+@value{GDBN} may then send a @samp{QStartNoAckMode} packet to the stub.
+Only then may the stub actually turn off packet acknowledgments.
+@value{GDBN} sends a final @samp{+} acknowledgment of the stub's @samp{OK}
+response, which can be safely ignored by the stub.
+
+Note that @code{set remote noack-packet} command only affects negotiation
+between @value{GDBN} and the stub when subsequent connections are made;
+it does not affect the protocol acknowledgment state for any current
+connection.
+Since @samp{+}/@samp{-} acknowledgments are enabled by default when a
+new connection is established,
+there is also no protocol request to re-enable the acknowledgments
+for the current connection, once disabled.
@node Examples
@section Examples
@@ -25815,6 +27537,8 @@ the host file system. Character or block special devices, pipes,
named pipes, sockets or any other communication method on the host
system are not supported by this protocol.
+File I/O is not supported in non-stop mode.
+
@node Protocol Basics
@subsection Protocol Basics
@cindex protocol basics, file-i/o
@@ -27488,7 +29212,7 @@ Linux kernel to control restartable syscalls.
@itemx @samp{org.gnu.gdb.coldfire.core}
@itemx @samp{org.gnu.gdb.fido.core}
One of those features must be always present.
-The feature that is present determines which flavor of m86k is
+The feature that is present determines which flavor of m68k is
used. The feature that is present should contain registers
@samp{d0} through @samp{d7}, @samp{a0} through @samp{a5}, @samp{fp},
@samp{sp}, @samp{ps} and @samp{pc}.
@@ -27515,6 +29239,13 @@ The @samp{org.gnu.gdb.power.altivec} feature is optional. It should
contain registers @samp{vr0} through @samp{vr31}, @samp{vscr},
and @samp{vrsave}.
+The @samp{org.gnu.gdb.power.vsx} feature is optional. It should
+contain registers @samp{vs0h} through @samp{vs31h}. @value{GDBN}
+will combine these registers with the floating point registers
+(@samp{f0} through @samp{f31}) and the altivec registers (@samp{vr0}
+through @samp{vr31}) to present the 128-bit wide registers @samp{vs0}
+through @samp{vs63}, the set of vector registers for POWER7.
+
The @samp{org.gnu.gdb.power.spe} feature is optional. It should
contain registers @samp{ev0h} through @samp{ev31h}, @samp{acc}, and
@samp{spefscr}. SPE targets should provide 32-bit registers in
@@ -27523,6 +29254,55 @@ contain registers @samp{ev0h} through @samp{ev31h}, @samp{acc}, and
these to present registers @samp{ev0} through @samp{ev31} to the
user.
+@node Operating System Information
+@appendix Operating System Information
+@cindex operating system information
+
+@menu
+* Process list::
+@end menu
+
+Users of @value{GDBN} often wish to obtain information about the state of
+the operating system running on the target---for example the list of
+processes, or the list of open files. This section describes the
+mechanism that makes it possible. This mechanism is similar to the
+target features mechanism (@pxref{Target Descriptions}), but focuses
+on a different aspect of target.
+
+Operating system information is retrived from the target via the
+remote protocol, using @samp{qXfer} requests (@pxref{qXfer osdata
+read}). The object name in the request should be @samp{osdata}, and
+the @var{annex} identifies the data to be fetched.
+
+@node Process list
+@appendixsection Process list
+@cindex operating system information, process list
+
+When requesting the process list, the @var{annex} field in the
+@samp{qXfer} request should be @samp{processes}. The returned data is
+an XML document. The formal syntax of this document is defined in
+@file{gdb/features/osdata.dtd}.
+
+An example document is:
+
+@smallexample
+<?xml version="1.0"?>
+<!DOCTYPE target SYSTEM "osdata.dtd">
+<osdata type="processes">
+ <item>
+ <column name="pid">1</column>
+ <column name="user">root</column>
+ <column name="command">/sbin/init</column>
+ </item>
+</osdata>
+@end smallexample
+
+Each item should include a column whose name is @samp{pid}. The value
+of that column should identify the process on the target. The
+@samp{user} and @samp{command} columns are optional, and will be
+displayed by @value{GDBN}. Target may provide additional columns,
+which @value{GDBN} currently ignores.
+
@include gpl.texi
@raisesections
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 3f280cf4f62..de07768efac 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -44,10 +44,11 @@
#include "gdb_assert.h"
#include "gdb_string.h"
-#include "gdb-events.h"
#include "reggroups.h"
#include "osabi.h"
#include "gdb_obstack.h"
+#include "observer.h"
+#include "regcache.h"
/* Static function declarations */
@@ -90,6 +91,7 @@ struct gdbarch
/* basic architectural information */
const struct bfd_arch_info * bfd_arch_info;
int byte_order;
+ int byte_order_for_code;
enum gdb_osabi osabi;
const struct target_desc * target_desc;
@@ -213,7 +215,6 @@ struct gdbarch
gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
- const char * name_of_malloc;
int cannot_step_breakpoint;
int have_nonsteppable_watchpoint;
gdbarch_address_class_type_flags_ftype *address_class_type_flags;
@@ -236,11 +237,12 @@ struct gdbarch
gdbarch_core_read_description_ftype *core_read_description;
gdbarch_static_transform_name_ftype *static_transform_name;
int sofun_address_maybe_missing;
+ gdbarch_process_record_ftype *process_record;
+ gdbarch_process_record_dasm_ftype *process_record_dasm;
gdbarch_target_signal_from_host_ftype *target_signal_from_host;
gdbarch_target_signal_to_host_ftype *target_signal_to_host;
gdbarch_record_special_symbol_ftype *record_special_symbol;
- gdbarch_record_ftype *record;
- gdbarch_record_dasm_ftype *record_dasm;
+ int has_global_solist;
};
@@ -256,6 +258,7 @@ struct gdbarch startup_gdbarch =
/* basic architecture information */
&bfd_default_arch_struct, /* bfd_arch_info */
BFD_ENDIAN_BIG, /* byte_order */
+ BFD_ENDIAN_BIG, /* byte_order_for_code */
GDB_OSABI_UNKNOWN, /* osabi */
0, /* target_desc */
/* target specific vector and its dump routine */
@@ -334,8 +337,8 @@ struct gdbarch startup_gdbarch =
default_stabs_argument_has_addr, /* stabs_argument_has_addr */
0, /* frame_red_zone_size */
convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
- 0, /* addr_bits_remove */
- 0, /* smash_text_address */
+ core_addr_identity, /* addr_bits_remove */
+ core_addr_identity, /* smash_text_address */
0, /* software_single_step */
0, /* single_step_through_delay */
0, /* print_insn */
@@ -346,7 +349,6 @@ struct gdbarch startup_gdbarch =
construct_inferior_arguments, /* construct_inferior_arguments */
0, /* elf_make_msymbol_special */
0, /* coff_make_msymbol_special */
- "malloc", /* name_of_malloc */
0, /* cannot_step_breakpoint */
0, /* have_nonsteppable_watchpoint */
0, /* address_class_type_flags */
@@ -369,15 +371,17 @@ struct gdbarch startup_gdbarch =
0, /* core_read_description */
0, /* static_transform_name */
0, /* sofun_address_maybe_missing */
+ 0, /* process_record */
+ 0, /* process_record_dasm */
default_target_signal_from_host, /* target_signal_from_host */
default_target_signal_to_host, /* target_signal_to_host */
0, /* record_special_symbol */
- NULL, /* record_ftype */
- NULL, /* record_dasm_ftype */
+ 0, /* has_global_solist */
/* startup_gdbarch() */
};
struct gdbarch *current_gdbarch = &startup_gdbarch;
+struct gdbarch *target_gdbarch = &startup_gdbarch;
/* Create a new ``struct gdbarch'' based on information provided by
``struct gdbarch_info''. */
@@ -402,6 +406,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
gdbarch->bfd_arch_info = info->bfd_arch_info;
gdbarch->byte_order = info->byte_order;
+ gdbarch->byte_order_for_code = info->byte_order_for_code;
gdbarch->osabi = info->osabi;
gdbarch->target_desc = info->target_desc;
@@ -450,7 +455,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
gdbarch->construct_inferior_arguments = construct_inferior_arguments;
gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
- gdbarch->name_of_malloc = "malloc";
gdbarch->register_reggroup_p = default_register_reggroup_p;
gdbarch->displaced_step_fixup = NULL;
gdbarch->displaced_step_free_closure = NULL;
@@ -599,7 +603,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of construct_inferior_arguments, invalid_p == 0 */
/* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
/* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
- /* Skip verify of name_of_malloc, invalid_p == 0 */
/* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
/* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
/* Skip verify of address_class_type_flags, has predicate */
@@ -623,9 +626,12 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of core_read_description, has predicate */
/* Skip verify of static_transform_name, has predicate */
/* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
+ /* Skip verify of process_record, has predicate */
+ /* Skip verify of process_record_dasm, has predicate */
/* Skip verify of target_signal_from_host, invalid_p == 0 */
/* Skip verify of target_signal_to_host, invalid_p == 0 */
/* Skip verify of record_special_symbol, has predicate */
+ /* Skip verify of has_global_solist, invalid_p == 0 */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -650,7 +656,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
gdb_nm_file);
fprintf_unfiltered (file,
"gdbarch_dump: addr_bit = %s\n",
- paddr_d (gdbarch->addr_bit));
+ plongest (gdbarch->addr_bit));
fprintf_unfiltered (file,
"gdbarch_dump: addr_bits_remove = <0x%lx>\n",
(long) gdbarch->addr_bits_remove);
@@ -683,34 +689,37 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->adjust_breakpoint_address);
fprintf_unfiltered (file,
"gdbarch_dump: believe_pcc_promotion = %s\n",
- paddr_d (gdbarch->believe_pcc_promotion));
+ plongest (gdbarch->believe_pcc_promotion));
fprintf_unfiltered (file,
"gdbarch_dump: bfd_arch_info = %s\n",
gdbarch_bfd_arch_info (gdbarch)->printable_name);
fprintf_unfiltered (file,
"gdbarch_dump: bits_big_endian = %s\n",
- paddr_d (gdbarch->bits_big_endian));
+ plongest (gdbarch->bits_big_endian));
fprintf_unfiltered (file,
"gdbarch_dump: breakpoint_from_pc = <0x%lx>\n",
(long) gdbarch->breakpoint_from_pc);
fprintf_unfiltered (file,
"gdbarch_dump: byte_order = %s\n",
- paddr_d (gdbarch->byte_order));
+ plongest (gdbarch->byte_order));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: byte_order_for_code = %s\n",
+ plongest (gdbarch->byte_order_for_code));
fprintf_unfiltered (file,
"gdbarch_dump: call_dummy_location = %s\n",
- paddr_d (gdbarch->call_dummy_location));
+ plongest (gdbarch->call_dummy_location));
fprintf_unfiltered (file,
"gdbarch_dump: cannot_fetch_register = <0x%lx>\n",
(long) gdbarch->cannot_fetch_register);
fprintf_unfiltered (file,
"gdbarch_dump: cannot_step_breakpoint = %s\n",
- paddr_d (gdbarch->cannot_step_breakpoint));
+ plongest (gdbarch->cannot_step_breakpoint));
fprintf_unfiltered (file,
"gdbarch_dump: cannot_store_register = <0x%lx>\n",
(long) gdbarch->cannot_store_register);
fprintf_unfiltered (file,
"gdbarch_dump: char_signed = %s\n",
- paddr_d (gdbarch->char_signed));
+ plongest (gdbarch->char_signed));
fprintf_unfiltered (file,
"gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
(long) gdbarch->coff_make_msymbol_special);
@@ -739,14 +748,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: core_xfer_shared_libraries = <0x%lx>\n",
(long) gdbarch->core_xfer_shared_libraries);
fprintf_unfiltered (file,
- "gdbarch_dump: decr_pc_after_break = 0x%s\n",
- paddr_nz (gdbarch->decr_pc_after_break));
+ "gdbarch_dump: decr_pc_after_break = %s\n",
+ core_addr_to_string_nz (gdbarch->decr_pc_after_break));
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_fp_regnum = %s\n",
- paddr_d (gdbarch->deprecated_fp_regnum));
+ plongest (gdbarch->deprecated_fp_regnum));
fprintf_unfiltered (file,
- "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
- paddr_nz (gdbarch->deprecated_function_start_offset));
+ "gdbarch_dump: deprecated_function_start_offset = %s\n",
+ core_addr_to_string_nz (gdbarch->deprecated_function_start_offset));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n",
gdbarch_displaced_step_copy_insn_p (gdbarch));
@@ -767,7 +776,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->displaced_step_location);
fprintf_unfiltered (file,
"gdbarch_dump: double_bit = %s\n",
- paddr_d (gdbarch->double_bit));
+ plongest (gdbarch->double_bit));
fprintf_unfiltered (file,
"gdbarch_dump: double_format = %s\n",
pformat (gdbarch->double_format));
@@ -800,13 +809,13 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->fetch_tls_load_module_address);
fprintf_unfiltered (file,
"gdbarch_dump: float_bit = %s\n",
- paddr_d (gdbarch->float_bit));
+ plongest (gdbarch->float_bit));
fprintf_unfiltered (file,
"gdbarch_dump: float_format = %s\n",
pformat (gdbarch->float_format));
fprintf_unfiltered (file,
"gdbarch_dump: fp0_regnum = %s\n",
- paddr_d (gdbarch->fp0_regnum));
+ plongest (gdbarch->fp0_regnum));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_frame_align_p() = %d\n",
gdbarch_frame_align_p (gdbarch));
@@ -814,8 +823,8 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: frame_align = <0x%lx>\n",
(long) gdbarch->frame_align);
fprintf_unfiltered (file,
- "gdbarch_dump: frame_args_skip = 0x%s\n",
- paddr_nz (gdbarch->frame_args_skip));
+ "gdbarch_dump: frame_args_skip = %s\n",
+ core_addr_to_string_nz (gdbarch->frame_args_skip));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_frame_num_args_p() = %d\n",
gdbarch_frame_num_args_p (gdbarch));
@@ -824,7 +833,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->frame_num_args);
fprintf_unfiltered (file,
"gdbarch_dump: frame_red_zone_size = %s\n",
- paddr_d (gdbarch->frame_red_zone_size));
+ plongest (gdbarch->frame_red_zone_size));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n",
gdbarch_get_longjmp_target_p (gdbarch));
@@ -832,8 +841,11 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: get_longjmp_target = <0x%lx>\n",
(long) gdbarch->get_longjmp_target);
fprintf_unfiltered (file,
+ "gdbarch_dump: has_global_solist = %s\n",
+ plongest (gdbarch->has_global_solist));
+ fprintf_unfiltered (file,
"gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
- paddr_d (gdbarch->have_nonsteppable_watchpoint));
+ plongest (gdbarch->have_nonsteppable_watchpoint));
fprintf_unfiltered (file,
"gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
(long) gdbarch->in_function_epilogue_p);
@@ -845,7 +857,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->inner_than);
fprintf_unfiltered (file,
"gdbarch_dump: int_bit = %s\n",
- paddr_d (gdbarch->int_bit));
+ plongest (gdbarch->int_bit));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_integer_to_address_p() = %d\n",
gdbarch_integer_to_address_p (gdbarch));
@@ -854,22 +866,22 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->integer_to_address);
fprintf_unfiltered (file,
"gdbarch_dump: long_bit = %s\n",
- paddr_d (gdbarch->long_bit));
+ plongest (gdbarch->long_bit));
fprintf_unfiltered (file,
"gdbarch_dump: long_double_bit = %s\n",
- paddr_d (gdbarch->long_double_bit));
+ plongest (gdbarch->long_double_bit));
fprintf_unfiltered (file,
"gdbarch_dump: long_double_format = %s\n",
pformat (gdbarch->long_double_format));
fprintf_unfiltered (file,
"gdbarch_dump: long_long_bit = %s\n",
- paddr_d (gdbarch->long_long_bit));
+ plongest (gdbarch->long_long_bit));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
gdbarch_max_insn_length_p (gdbarch));
fprintf_unfiltered (file,
"gdbarch_dump: max_insn_length = %s\n",
- paddr_d (gdbarch->max_insn_length));
+ plongest (gdbarch->max_insn_length));
fprintf_unfiltered (file,
"gdbarch_dump: memory_insert_breakpoint = <0x%lx>\n",
(long) gdbarch->memory_insert_breakpoint);
@@ -877,17 +889,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n",
(long) gdbarch->memory_remove_breakpoint);
fprintf_unfiltered (file,
- "gdbarch_dump: name_of_malloc = %s\n",
- gdbarch->name_of_malloc);
- fprintf_unfiltered (file,
"gdbarch_dump: num_pseudo_regs = %s\n",
- paddr_d (gdbarch->num_pseudo_regs));
+ plongest (gdbarch->num_pseudo_regs));
fprintf_unfiltered (file,
"gdbarch_dump: num_regs = %s\n",
- paddr_d (gdbarch->num_regs));
+ plongest (gdbarch->num_regs));
fprintf_unfiltered (file,
"gdbarch_dump: osabi = %s\n",
- paddr_d (gdbarch->osabi));
+ plongest (gdbarch->osabi));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_overlay_update_p() = %d\n",
gdbarch_overlay_update_p (gdbarch));
@@ -896,7 +905,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->overlay_update);
fprintf_unfiltered (file,
"gdbarch_dump: pc_regnum = %s\n",
- paddr_d (gdbarch->pc_regnum));
+ plongest (gdbarch->pc_regnum));
fprintf_unfiltered (file,
"gdbarch_dump: pointer_to_address = <0x%lx>\n",
(long) gdbarch->pointer_to_address);
@@ -919,8 +928,20 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: print_vector_info = <0x%lx>\n",
(long) gdbarch->print_vector_info);
fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_process_record_p() = %d\n",
+ gdbarch_process_record_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: process_record = <0x%lx>\n",
+ (long) gdbarch->process_record);
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_process_record_dasm_p() = %d\n",
+ gdbarch_process_record_dasm_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: process_record_dasm = <0x%lx>\n",
+ (long) gdbarch->process_record_dasm);
+ fprintf_unfiltered (file,
"gdbarch_dump: ps_regnum = %s\n",
- paddr_d (gdbarch->ps_regnum));
+ plongest (gdbarch->ps_regnum));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
gdbarch_pseudo_register_read_p (gdbarch));
@@ -935,7 +956,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->pseudo_register_write);
fprintf_unfiltered (file,
"gdbarch_dump: ptr_bit = %s\n",
- paddr_d (gdbarch->ptr_bit));
+ plongest (gdbarch->ptr_bit));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
gdbarch_push_dummy_call_p (gdbarch));
@@ -998,7 +1019,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->sdb_reg_to_regnum);
fprintf_unfiltered (file,
"gdbarch_dump: short_bit = %s\n",
- paddr_d (gdbarch->short_bit));
+ plongest (gdbarch->short_bit));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
gdbarch_single_step_through_delay_p (gdbarch));
@@ -1037,10 +1058,10 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->software_single_step);
fprintf_unfiltered (file,
"gdbarch_dump: sofun_address_maybe_missing = %s\n",
- paddr_d (gdbarch->sofun_address_maybe_missing));
+ plongest (gdbarch->sofun_address_maybe_missing));
fprintf_unfiltered (file,
"gdbarch_dump: sp_regnum = %s\n",
- paddr_d (gdbarch->sp_regnum));
+ plongest (gdbarch->sp_regnum));
fprintf_unfiltered (file,
"gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
(long) gdbarch->stab_reg_to_regnum);
@@ -1055,7 +1076,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->static_transform_name);
fprintf_unfiltered (file,
"gdbarch_dump: target_desc = %s\n",
- paddr_d ((long) gdbarch->target_desc));
+ plongest ((long) gdbarch->target_desc));
fprintf_unfiltered (file,
"gdbarch_dump: target_signal_from_host = <0x%lx>\n",
(long) gdbarch->target_signal_from_host);
@@ -1082,13 +1103,13 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) gdbarch->value_to_register);
fprintf_unfiltered (file,
"gdbarch_dump: vbit_in_delta = %s\n",
- paddr_d (gdbarch->vbit_in_delta));
+ plongest (gdbarch->vbit_in_delta));
fprintf_unfiltered (file,
"gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
(long) gdbarch->virtual_frame_pointer);
fprintf_unfiltered (file,
"gdbarch_dump: vtable_function_descriptors = %s\n",
- paddr_d (gdbarch->vtable_function_descriptors));
+ plongest (gdbarch->vtable_function_descriptors));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_write_pc_p() = %d\n",
gdbarch_write_pc_p (gdbarch));
@@ -1126,6 +1147,15 @@ gdbarch_byte_order (struct gdbarch *gdbarch)
return gdbarch->byte_order;
}
+int
+gdbarch_byte_order_for_code (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n");
+ return gdbarch->byte_order_for_code;
+}
+
enum gdb_osabi
gdbarch_osabi (struct gdbarch *gdbarch)
{
@@ -2154,7 +2184,7 @@ gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
void
set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch,
- gdbarch_skip_main_prologue_ftype skip_main_prologue)
+ gdbarch_skip_main_prologue_ftype skip_main_prologue)
{
gdbarch->skip_main_prologue = skip_main_prologue;
}
@@ -2496,7 +2526,7 @@ gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
gdb_assert (gdbarch->addr_bits_remove != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
- return gdbarch->addr_bits_remove (addr);
+ return gdbarch->addr_bits_remove (gdbarch, addr);
}
void
@@ -2513,7 +2543,7 @@ gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
gdb_assert (gdbarch->smash_text_address != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
- return gdbarch->smash_text_address (addr);
+ return gdbarch->smash_text_address (gdbarch, addr);
}
void
@@ -2707,23 +2737,6 @@ set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
}
-const char *
-gdbarch_name_of_malloc (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of name_of_malloc, invalid_p == 0 */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
- return gdbarch->name_of_malloc;
-}
-
-void
-set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
- const char * name_of_malloc)
-{
- gdbarch->name_of_malloc = name_of_malloc;
-}
-
int
gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
{
@@ -3190,6 +3203,54 @@ set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
}
+int
+gdbarch_process_record_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->process_record != NULL;
+}
+
+int
+gdbarch_process_record (struct gdbarch *gdbarch, CORE_ADDR addr)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->process_record != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n");
+ return gdbarch->process_record (gdbarch, addr);
+}
+
+void
+set_gdbarch_process_record (struct gdbarch *gdbarch,
+ gdbarch_process_record_ftype process_record)
+{
+ gdbarch->process_record = process_record;
+}
+
+int
+gdbarch_process_record_dasm_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->process_record_dasm != NULL;
+}
+
+void
+gdbarch_process_record_dasm (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->process_record_dasm != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_dasm called\n");
+ gdbarch->process_record_dasm (gdbarch);
+}
+
+void
+set_gdbarch_process_record_dasm (struct gdbarch *gdbarch,
+ gdbarch_process_record_dasm_ftype process_record_dasm)
+{
+ gdbarch->process_record_dasm = process_record_dasm;
+}
+
enum target_signal
gdbarch_target_signal_from_host (struct gdbarch *gdbarch, int signo)
{
@@ -3248,6 +3309,23 @@ set_gdbarch_record_special_symbol (struct gdbarch *gdbarch,
gdbarch->record_special_symbol = record_special_symbol;
}
+int
+gdbarch_has_global_solist (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of has_global_solist, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n");
+ return gdbarch->has_global_solist;
+}
+
+void
+set_gdbarch_has_global_solist (struct gdbarch *gdbarch,
+ int has_global_solist)
+{
+ gdbarch->has_global_solist = has_global_solist;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
@@ -3654,48 +3732,9 @@ deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
gdb_assert (current_gdbarch != NULL);
gdb_assert (new_gdbarch->initialized_p);
current_gdbarch = new_gdbarch;
- architecture_changed_event ();
- reinit_frame_cache ();
-}
-
-int
-gdbarch_record_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return (gdbarch->record != NULL);
-}
-
-int
-gdbarch_record (struct gdbarch *gdbarch, CORE_ADDR addr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->record != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_record called\n");
- return (gdbarch->record (gdbarch, addr));
-}
-
-void
-set_gdbarch_record (struct gdbarch *gdbarch, gdbarch_record_ftype * record)
-{
- gdbarch->record = record;
-}
-
-void
-gdbarch_record_dasm (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->record_dasm != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_record_dasm called\n");
- gdbarch->record_dasm (gdbarch);
-}
-
-void
-set_gdbarch_record_dasm (struct gdbarch *gdbarch,
- gdbarch_record_dasm_ftype * record_dasm)
-{
- gdbarch->record_dasm = record_dasm;
+ target_gdbarch = new_gdbarch;
+ observer_notify_architecture_changed (new_gdbarch);
+ registers_changed ();
}
extern void _initialize_gdbarch (void);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 005d338d381..19b1b1f4565 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -54,6 +54,7 @@ struct displaced_step_closure;
struct core_regset_section;
extern struct gdbarch *current_gdbarch;
+extern struct gdbarch *target_gdbarch;
/* The following are pre-initialized by GDBARCH. */
@@ -64,6 +65,9 @@ extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbar
extern int gdbarch_byte_order (struct gdbarch *gdbarch);
/* set_gdbarch_byte_order() - not applicable - pre-initialized. */
+extern int gdbarch_byte_order_for_code (struct gdbarch *gdbarch);
+/* set_gdbarch_byte_order_for_code() - not applicable - pre-initialized. */
+
extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
/* set_gdbarch_osabi() - not applicable - pre-initialized. */
@@ -487,14 +491,14 @@ extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdb
sort of generic thing to handle alignment or segmentation (it's
possible it should be in TARGET_READ_PC instead). */
-typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr);
+typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr);
extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove);
/* It is not at all clear why gdbarch_smash_text_address is not folded into
gdbarch_addr_bits_remove. */
-typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr);
+typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr);
extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address);
@@ -538,7 +542,7 @@ typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (struct frame_info *frame
extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc);
extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
-/* If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER
+/* If in_solib_dynsym_resolve_code() returns true, and SKIP_SOLIB_RESOLVER
evaluates non-zero, this is the address where the debugger will place
a step-resume breakpoint to get us past the dynamic linker. */
@@ -587,9 +591,6 @@ typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_
extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
-extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch);
-extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc);
-
extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
@@ -788,6 +789,20 @@ extern void set_gdbarch_static_transform_name (struct gdbarch *gdbarch, gdbarch_
extern int gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch);
extern void set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch, int sofun_address_maybe_missing);
+/* For the process record and replay target */
+
+extern int gdbarch_process_record_p (struct gdbarch *gdbarch);
+
+typedef int (gdbarch_process_record_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
+extern int gdbarch_process_record (struct gdbarch *gdbarch, CORE_ADDR addr);
+extern void set_gdbarch_process_record (struct gdbarch *gdbarch, gdbarch_process_record_ftype *process_record);
+
+extern int gdbarch_process_record_dasm_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_process_record_dasm_ftype) (struct gdbarch *gdbarch);
+extern void gdbarch_process_record_dasm (struct gdbarch *gdbarch);
+extern void set_gdbarch_process_record_dasm (struct gdbarch *gdbarch, gdbarch_process_record_dasm_ftype *process_record_dasm);
+
/* Signal translation: translate inferior's signal (host's) number into
GDB's representation. */
@@ -810,6 +825,15 @@ typedef void (gdbarch_record_special_symbol_ftype) (struct gdbarch *gdbarch, str
extern void gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym);
extern void set_gdbarch_record_special_symbol (struct gdbarch *gdbarch, gdbarch_record_special_symbol_ftype *record_special_symbol);
+/* True if the list of shared libraries is one and only for all
+ processes, as opposed to a list of shared libraries per inferior.
+ When this property is true, GDB assumes that since shared libraries
+ are shared across processes, so is all code. Hence, GDB further
+ assumes an inserted breakpoint location is visible to all processes. */
+
+extern int gdbarch_has_global_solist (struct gdbarch *gdbarch);
+extern void set_gdbarch_has_global_solist (struct gdbarch *gdbarch, int has_global_solist);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
@@ -885,6 +909,8 @@ struct gdbarch_info
/* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */
int byte_order;
+ int byte_order_for_code;
+
/* Use default: NULL (ZERO). */
bfd *abfd;
@@ -981,20 +1007,6 @@ extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info);
extern void deprecated_current_gdbarch_select_hack (struct gdbarch *gdbarch);
-/* For the record target */
-
-extern int gdbarch_record_p (struct gdbarch *gdbarch);
-typedef int (gdbarch_record_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
-extern int gdbarch_record (struct gdbarch *gdbarch, CORE_ADDR addr);
-extern void set_gdbarch_record (struct gdbarch *gdbarch,
- gdbarch_record_ftype * record);
-
-typedef void (gdbarch_record_dasm_ftype) (struct gdbarch *gdbarch);
-extern void gdbarch_record_dasm (struct gdbarch *gdbarch);
-extern void set_gdbarch_record_dasm (struct gdbarch *gdbarch,
- gdbarch_record_dasm_ftype * record_dasm);
-
-
/* Register per-architecture data-pointer.
Reserve space for a per-architecture data-pointer. An identifier
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index d33fd7d4214..8a827f467e2 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -318,8 +318,8 @@ do
# An optional expression that convers MEMBER to a value
# suitable for formatting using %s.
- # If PRINT is empty, paddr_nz (for CORE_ADDR) or paddr_d
- # (anything else) is used.
+ # If PRINT is empty, core_addr_to_string_nz (for CORE_ADDR)
+ # or plongest (anything else) is used.
garbage_at_eol ) : ;;
@@ -339,10 +339,11 @@ function_list ()
i:const struct bfd_arch_info *:bfd_arch_info:::&bfd_default_arch_struct::::gdbarch_bfd_arch_info (gdbarch)->printable_name
#
i:int:byte_order:::BFD_ENDIAN_BIG
+i:int:byte_order_for_code:::BFD_ENDIAN_BIG
#
i:enum gdb_osabi:osabi:::GDB_OSABI_UNKNOWN
#
-i:const struct target_desc *:target_desc:::::::paddr_d ((long) gdbarch->target_desc)
+i:const struct target_desc *:target_desc:::::::plongest ((long) gdbarch->target_desc)
# The bit byte-order has to do just with numbering of bits in debugging symbols
# and such. Conceptually, it's quite separate from byte/word byte order.
@@ -528,10 +529,10 @@ m:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr, struct target_ops *targ:a
# being a few stray bits in the PC which would mislead us, not as some
# sort of generic thing to handle alignment or segmentation (it's
# possible it should be in TARGET_READ_PC instead).
-f:CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr::core_addr_identity::0
+m:CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr::core_addr_identity::0
# It is not at all clear why gdbarch_smash_text_address is not folded into
# gdbarch_addr_bits_remove.
-f:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::0
+m:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::0
# FIXME/cagney/2001-01-18: This should be split in two. A target method that
# indicates if the target needs software single step. An ISA method to
@@ -557,7 +558,7 @@ f:int:print_insn:bfd_vma vma, struct disassemble_info *info:vma, info::0:
f:CORE_ADDR:skip_trampoline_code:struct frame_info *frame, CORE_ADDR pc:frame, pc::generic_skip_trampoline_code::0
-# If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER
+# If in_solib_dynsym_resolve_code() returns true, and SKIP_SOLIB_RESOLVER
# evaluates non-zero, this is the address where the debugger will place
# a step-resume breakpoint to get us past the dynamic linker.
m:CORE_ADDR:skip_solib_resolver:CORE_ADDR pc:pc::generic_skip_solib_resolver::0
@@ -585,7 +586,6 @@ m:int:in_function_epilogue_p:CORE_ADDR addr:addr:0:generic_in_function_epilogue_
m:char *:construct_inferior_arguments:int argc, char **argv:argc, argv::construct_inferior_arguments::0
f:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym::default_elf_make_msymbol_special::0
f:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym::default_coff_make_msymbol_special::0
-v:const char *:name_of_malloc:::"malloc":"malloc"::0:gdbarch->name_of_malloc
v:int:cannot_step_breakpoint:::0:0::0
v:int:have_nonsteppable_watchpoint:::0:0::0
F:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
@@ -698,6 +698,10 @@ F:char *:static_transform_name:char *name:name
# Set if the address in N_SO or N_FUN stabs may be zero.
v:int:sofun_address_maybe_missing:::0:0::0
+# For the process record and replay target
+M:int:process_record:CORE_ADDR addr:addr
+M:void:process_record_dasm:void
+
# Signal translation: translate inferior's signal (host's) number into
# GDB's representation.
m:enum target_signal:target_signal_from_host:int signo:signo::default_target_signal_from_host::0
@@ -707,6 +711,13 @@ m:int:target_signal_to_host:enum target_signal ts:ts::default_target_signal_to_h
# Record architecture-specific information from the symbol table.
M:void:record_special_symbol:struct objfile *objfile, asymbol *sym:objfile, sym
+
+# True if the list of shared libraries is one and only for all
+# processes, as opposed to a list of shared libraries per inferior.
+# When this property is true, GDB assumes that since shared libraries
+# are shared across processes, so is all code. Hence, GDB further
+# assumes an inserted breakpoint location is visible to all processes.
+v:int:has_global_solist:::0:0::0
EOF
}
@@ -821,6 +832,7 @@ struct displaced_step_closure;
struct core_regset_section;
extern struct gdbarch *current_gdbarch;
+extern struct gdbarch *target_gdbarch;
EOF
# function typedef's
@@ -962,6 +974,8 @@ struct gdbarch_info
/* Use default: BFD_ENDIAN_UNKNOWN (NB: is not ZERO). */
int byte_order;
+ int byte_order_for_code;
+
/* Use default: NULL (ZERO). */
bfd *abfd;
@@ -1130,10 +1144,11 @@ cat <<EOF
#include "gdb_assert.h"
#include "gdb_string.h"
-#include "gdb-events.h"
#include "reggroups.h"
#include "osabi.h"
#include "gdb_obstack.h"
+#include "observer.h"
+#include "regcache.h"
/* Static function declarations */
@@ -1277,6 +1292,7 @@ cat <<EOF
};
struct gdbarch *current_gdbarch = &startup_gdbarch;
+struct gdbarch *target_gdbarch = &startup_gdbarch;
EOF
# Create a new gdbarch struct
@@ -1468,12 +1484,12 @@ do
# It is a variable
case "${print}:${returntype}" in
:CORE_ADDR )
- fmt="0x%s"
- print="paddr_nz (gdbarch->${function})"
+ fmt="%s"
+ print="core_addr_to_string_nz (gdbarch->${function})"
;;
:* )
fmt="%s"
- print="paddr_d (gdbarch->${function})"
+ print="plongest (gdbarch->${function})"
;;
* )
fmt="%s"
@@ -2018,8 +2034,9 @@ deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
gdb_assert (current_gdbarch != NULL);
gdb_assert (new_gdbarch->initialized_p);
current_gdbarch = new_gdbarch;
- architecture_changed_event ();
- reinit_frame_cache ();
+ target_gdbarch = new_gdbarch;
+ observer_notify_architecture_changed (new_gdbarch);
+ registers_changed ();
}
extern void _initialize_gdbarch (void);
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index dff70e8aae3..6b8bf9b6267 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -355,7 +355,7 @@ i386_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
values of the registers and memory that will be changed in current system
call instruction to "record_arch_list". This instruction is "int 0x80" (Linux
Kernel2.4) or "sysenter" (Linux Kernel 2.6).
- Return -1 if something wrong. */
+ Return -1 if something wrong. */
static linux_record_tdep_t linux_record_tdep;
@@ -373,7 +373,7 @@ i386_linux_intx80_sysenter_record (void)
return ret;
}
- /* Record the return of system call. */
+ /* Record the return of system call. */
if (record_arch_list_add_reg (I386_EAX_REGNUM))
{
return -1;
@@ -448,8 +448,9 @@ static int i386_linux_sc_reg_offset[] =
0 * 4 /* %gs */
};
-/* These macros are the size of the type that will be use in system call. The values of
- these macros are gotten from Linux Kernel source. */
+/* These macros are the size of the type that will be used in system
+ call. The values of these macros are gotten from Linux Kernel
+ source. */
#define I386_RECORD_SIZE__old_kernel_stat 32
#define I386_RECORD_SIZE_tms 16
#define I386_RECORD_SIZE_loff_t 8
@@ -519,7 +520,7 @@ static int i386_linux_sc_reg_offset[] =
/* These macros are the values of the second argument of system call
"sys_ioctl". The values of these macros are gotten from Linux Kernel
- source. */
+ source. */
#define I386_RECORD_IOCTL_TCGETS 0x5401
#define I386_RECORD_IOCTL_TCSETS 0x5402
#define I386_RECORD_IOCTL_TCSETSW 0x5403
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index dd90e10d223..fba6ceedad2 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -521,7 +521,7 @@ struct i386_frame_cache
/* Saved registers. */
CORE_ADDR saved_regs[I386_NUM_SAVED_REGS];
CORE_ADDR saved_sp;
- int stack_align;
+ int saved_sp_reg;
int pc_in_eax;
/* Stack space reserved for local variables. */
@@ -548,7 +548,7 @@ i386_alloc_frame_cache (void)
for (i = 0; i < I386_NUM_SAVED_REGS; i++)
cache->saved_regs[i] = -1;
cache->saved_sp = 0;
- cache->stack_align = 0;
+ cache->saved_sp_reg = -1;
cache->pc_in_eax = 0;
/* Frameless until proven otherwise. */
@@ -710,37 +710,111 @@ static CORE_ADDR
i386_analyze_stack_align (CORE_ADDR pc, CORE_ADDR current_pc,
struct i386_frame_cache *cache)
{
- /* The register used by the compiler to perform the stack re-alignment
- is, in order of preference, either %ecx, %edx, or %eax. GCC should
- never use %ebx as it always treats it as callee-saved, whereas
- the compiler can only use caller-saved registers. */
- static const gdb_byte insns_ecx[10] = {
- 0x8d, 0x4c, 0x24, 0x04, /* leal 4(%esp), %ecx */
- 0x83, 0xe4, 0xf0, /* andl $-16, %esp */
- 0xff, 0x71, 0xfc /* pushl -4(%ecx) */
+ /* There are 2 code sequences to re-align stack before the frame
+ gets set up:
+
+ 1. Use a caller-saved saved register:
+
+ leal 4(%esp), %reg
+ andl $-XXX, %esp
+ pushl -4(%reg)
+
+ 2. Use a callee-saved saved register:
+
+ pushl %reg
+ leal 8(%esp), %reg
+ andl $-XXX, %esp
+ pushl -4(%reg)
+
+ "andl $-XXX, %esp" can be either 3 bytes or 6 bytes:
+
+ 0x83 0xe4 0xf0 andl $-16, %esp
+ 0x81 0xe4 0x00 0xff 0xff 0xff andl $-256, %esp
+ */
+
+ gdb_byte buf[14];
+ int reg;
+ int offset, offset_and;
+ static int regnums[8] = {
+ I386_EAX_REGNUM, /* %eax */
+ I386_ECX_REGNUM, /* %ecx */
+ I386_EDX_REGNUM, /* %edx */
+ I386_EBX_REGNUM, /* %ebx */
+ I386_ESP_REGNUM, /* %esp */
+ I386_EBP_REGNUM, /* %ebp */
+ I386_ESI_REGNUM, /* %esi */
+ I386_EDI_REGNUM /* %edi */
};
- static const gdb_byte insns_edx[10] = {
- 0x8d, 0x54, 0x24, 0x04, /* leal 4(%esp), %edx */
- 0x83, 0xe4, 0xf0, /* andl $-16, %esp */
- 0xff, 0x72, 0xfc /* pushl -4(%edx) */
- };
- static const gdb_byte insns_eax[10] = {
- 0x8d, 0x44, 0x24, 0x04, /* leal 4(%esp), %eax */
- 0x83, 0xe4, 0xf0, /* andl $-16, %esp */
- 0xff, 0x70, 0xfc /* pushl -4(%eax) */
- };
- gdb_byte buf[10];
- if (target_read_memory (pc, buf, sizeof buf)
- || (memcmp (buf, insns_ecx, sizeof buf) != 0
- && memcmp (buf, insns_edx, sizeof buf) != 0
- && memcmp (buf, insns_eax, sizeof buf) != 0))
+ if (target_read_memory (pc, buf, sizeof buf))
+ return pc;
+
+ /* Check caller-saved saved register. The first instruction has
+ to be "leal 4(%esp), %reg". */
+ if (buf[0] == 0x8d && buf[2] == 0x24 && buf[3] == 0x4)
+ {
+ /* MOD must be binary 10 and R/M must be binary 100. */
+ if ((buf[1] & 0xc7) != 0x44)
+ return pc;
+
+ /* REG has register number. */
+ reg = (buf[1] >> 3) & 7;
+ offset = 4;
+ }
+ else
+ {
+ /* Check callee-saved saved register. The first instruction
+ has to be "pushl %reg". */
+ if ((buf[0] & 0xf8) != 0x50)
+ return pc;
+
+ /* Get register. */
+ reg = buf[0] & 0x7;
+
+ /* The next instruction has to be "leal 8(%esp), %reg". */
+ if (buf[1] != 0x8d || buf[3] != 0x24 || buf[4] != 0x8)
+ return pc;
+
+ /* MOD must be binary 10 and R/M must be binary 100. */
+ if ((buf[2] & 0xc7) != 0x44)
+ return pc;
+
+ /* REG has register number. Registers in pushl and leal have to
+ be the same. */
+ if (reg != ((buf[2] >> 3) & 7))
+ return pc;
+
+ offset = 5;
+ }
+
+ /* Rigister can't be %esp nor %ebp. */
+ if (reg == 4 || reg == 5)
+ return pc;
+
+ /* The next instruction has to be "andl $-XXX, %esp". */
+ if (buf[offset + 1] != 0xe4
+ || (buf[offset] != 0x81 && buf[offset] != 0x83))
+ return pc;
+
+ offset_and = offset;
+ offset += buf[offset] == 0x81 ? 6 : 3;
+
+ /* The next instruction has to be "pushl -4(%reg)". 8bit -4 is
+ 0xfc. REG must be binary 110 and MOD must be binary 01. */
+ if (buf[offset] != 0xff
+ || buf[offset + 2] != 0xfc
+ || (buf[offset + 1] & 0xf8) != 0x70)
+ return pc;
+
+ /* R/M has register. Registers in leal and pushl have to be the
+ same. */
+ if (reg != (buf[offset + 1] & 7))
return pc;
- if (current_pc > pc + 4)
- cache->stack_align = 1;
+ if (current_pc > pc + offset_and)
+ cache->saved_sp_reg = regnums[reg];
- return min (pc + 10, current_pc);
+ return min (pc + offset + 3, current_pc);
}
/* Maximum instruction length we need to handle. */
@@ -1204,7 +1278,7 @@ i386_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
gdb_byte buf[8];
frame_unwind_register (next_frame, gdbarch_pc_regnum (gdbarch), buf);
- return extract_typed_address (buf, builtin_type_void_func_ptr);
+ return extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_ptr);
}
@@ -1244,10 +1318,10 @@ i386_frame_cache (struct frame_info *this_frame, void **this_cache)
if (cache->pc != 0)
i386_analyze_prologue (cache->pc, get_frame_pc (this_frame), cache);
- if (cache->stack_align)
+ if (cache->saved_sp_reg != -1)
{
- /* Saved stack pointer has been saved in %ecx. */
- get_frame_register (this_frame, I386_ECX_REGNUM, buf);
+ /* Saved stack pointer has been saved. */
+ get_frame_register (this_frame, cache->saved_sp_reg, buf);
cache->saved_sp = extract_unsigned_integer(buf, 4);
}
@@ -1261,7 +1335,7 @@ i386_frame_cache (struct frame_info *this_frame, void **this_cache)
frame by looking at the stack pointer. For truly "frameless"
functions this might work too. */
- if (cache->stack_align)
+ if (cache->saved_sp_reg != -1)
{
/* We're halfway aligning the stack. */
cache->base = ((cache->saved_sp - 4) & 0xfffffff0) - 4;
@@ -1641,8 +1715,8 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
(i386_frame_this_id, i386_sigtramp_frame_this_id,
i386_dummy_id). It's there, since all frame unwinders for
a given target have to agree (within a certain margin) on the
- definition of the stack address of a frame. Otherwise
- frame_id_inner() won't work correctly. Since DWARF2/GCC uses the
+ definition of the stack address of a frame. Otherwise frame id
+ comparison might not work correctly. Since DWARF2/GCC uses the
stack address *before* the function call as a frame's CFA. On
the i386, when %ebp is used as a frame pointer, the offset
between the contents %ebp and the CFA as defined by GCC. */
@@ -1967,7 +2041,7 @@ i386_mmx_type (struct gdbarch *gdbarch)
append_composite_type_field (t, "v8_int8",
init_vector_type (builtin_type_int8, 8));
- TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+ TYPE_VECTOR (t) = 1;
TYPE_NAME (t) = "builtin_type_vec64i";
tdep->i386_mmx_type = t;
}
@@ -2000,9 +2074,11 @@ i386_sse_type (struct gdbarch *gdbarch)
t = init_composite_type ("__gdb_builtin_type_vec128i", TYPE_CODE_UNION);
append_composite_type_field (t, "v4_float",
- init_vector_type (builtin_type_float, 4));
+ init_vector_type (builtin_type (gdbarch)
+ ->builtin_float, 4));
append_composite_type_field (t, "v2_double",
- init_vector_type (builtin_type_double, 2));
+ init_vector_type (builtin_type (gdbarch)
+ ->builtin_double, 2));
append_composite_type_field (t, "v16_int8",
init_vector_type (builtin_type_int8, 16));
append_composite_type_field (t, "v8_int16",
@@ -2013,7 +2089,7 @@ i386_sse_type (struct gdbarch *gdbarch)
init_vector_type (builtin_type_int64, 2));
append_composite_type_field (t, "uint128", builtin_type_int128);
- TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+ TYPE_VECTOR (t) = 1;
TYPE_NAME (t) = "builtin_type_vec128i";
tdep->i386_sse_type = t;
}
@@ -2029,13 +2105,13 @@ static struct type *
i386_register_type (struct gdbarch *gdbarch, int regnum)
{
if (regnum == I386_EIP_REGNUM)
- return builtin_type_void_func_ptr;
+ return builtin_type (gdbarch)->builtin_func_ptr;
if (regnum == I386_EFLAGS_REGNUM)
return i386_eflags_type;
if (regnum == I386_EBP_REGNUM || regnum == I386_ESP_REGNUM)
- return builtin_type_void_data_ptr;
+ return builtin_type (gdbarch)->builtin_data_ptr;
if (i386_fp_regnum_p (gdbarch, regnum))
return builtin_type_i387_ext;
@@ -2049,7 +2125,7 @@ i386_register_type (struct gdbarch *gdbarch, int regnum)
if (regnum == I387_MXCSR_REGNUM (gdbarch_tdep (gdbarch)))
return i386_mxcsr_type;
- return builtin_type_int;
+ return builtin_type (gdbarch)->builtin_int;
}
/* Map a cooked register onto a raw register or memory. For the i386,
@@ -2553,6 +2629,18 @@ i386_fetch_pointer_argument (struct frame_info *frame, int argi,
return read_memory_unsigned_integer (sp + (4 * (argi + 1)), 4);
}
+static void
+i386_skip_permanent_breakpoint (struct regcache *regcache)
+{
+ CORE_ADDR current_pc = regcache_read_pc (regcache);
+
+ /* On i386, breakpoint is exactly 1 byte long, so we just
+ adjust the PC in the regcache. */
+ current_pc += 1;
+ regcache_write_pc (regcache, current_pc);
+}
+
+
#define PREFIX_REPZ 0x01
#define PREFIX_REPNZ 0x02
#define PREFIX_LOCK 0x04
@@ -2595,8 +2683,12 @@ i386_record_modrm (void)
{
if (target_read_memory (i386_record_pc, &modrm, 1))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 1.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc++;
@@ -2631,8 +2723,12 @@ i386_record_lea_modrm_addr (uint32_t * addr)
havesib = 1;
if (target_read_memory (i386_record_pc, &tmpu8, 1))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 1.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc++;
@@ -2649,8 +2745,12 @@ i386_record_lea_modrm_addr (uint32_t * addr)
base = 0xff;
if (target_read_memory (i386_record_pc, (gdb_byte *) addr, 4))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 4.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc += 4;
@@ -2663,8 +2763,12 @@ i386_record_lea_modrm_addr (uint32_t * addr)
case 1:
if (target_read_memory (i386_record_pc, &tmpu8, 1))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 1.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc++;
@@ -2673,8 +2777,12 @@ i386_record_lea_modrm_addr (uint32_t * addr)
case 2:
if (target_read_memory (i386_record_pc, (gdb_byte *) addr, 4))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 4.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc += 4;
@@ -2705,8 +2813,12 @@ i386_record_lea_modrm_addr (uint32_t * addr)
if (target_read_memory
(i386_record_pc, (gdb_byte *) & tmpu16, 2))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 2.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc += 2;
@@ -2722,8 +2834,12 @@ i386_record_lea_modrm_addr (uint32_t * addr)
case 1:
if (target_read_memory (i386_record_pc, &tmpu8, 1))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 1.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc++;
@@ -2732,8 +2848,12 @@ i386_record_lea_modrm_addr (uint32_t * addr)
case 2:
if (target_read_memory (i386_record_pc, (gdb_byte *) & tmpu16, 2))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 2.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc += 2;
@@ -2815,7 +2935,7 @@ i386_record_lea_modrm (void)
{
if (record_debug)
printf_unfiltered (_
- ("Process record ignores the memory change of instruction in address 0x%s because it can't get the value of the segment register.\n"),
+ ("Process record ignores the memory change of instruction at address 0x%s because it can't get the value of the segment register.\n"),
paddr_nz (i386_record_pc));
return (0);
}
@@ -2837,7 +2957,7 @@ i386_record_lea_modrm (void)
memory that will be changed in current instruction to "record_arch_list".
Return -1 if something wrong. */
static int
-i386_record (struct gdbarch *gdbarch, CORE_ADDR addr)
+i386_process_record (struct gdbarch *gdbarch, CORE_ADDR addr)
{
int prefixes = 0;
uint8_t tmpu8;
@@ -2861,8 +2981,12 @@ i386_record (struct gdbarch *gdbarch, CORE_ADDR addr)
{
if (target_read_memory (i386_record_pc, &tmpu8, 1))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 1.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc++;
@@ -2924,8 +3048,12 @@ reswitch:
case 0x0f:
if (target_read_memory (i386_record_pc, &tmpu8, 1))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 1.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc++;
@@ -2934,14 +3062,54 @@ reswitch:
break;
/* arith & logic */
- case 0x00 ... 0x05:
- case 0x08 ... 0x0d:
- case 0x10 ... 0x15:
- case 0x18 ... 0x1d:
- case 0x20 ... 0x25:
- case 0x28 ... 0x2d:
- case 0x30 ... 0x35:
- case 0x38 ... 0x3d:
+ case 0x00:
+ case 0x01:
+ case 0x02:
+ case 0x03:
+ case 0x04:
+ case 0x05:
+ case 0x08:
+ case 0x09:
+ case 0x0a:
+ case 0x0b:
+ case 0x0c:
+ case 0x0d:
+ case 0x10:
+ case 0x11:
+ case 0x12:
+ case 0x13:
+ case 0x14:
+ case 0x15:
+ case 0x18:
+ case 0x19:
+ case 0x1a:
+ case 0x1b:
+ case 0x1c:
+ case 0x1d:
+ case 0x20:
+ case 0x21:
+ case 0x22:
+ case 0x23:
+ case 0x24:
+ case 0x25:
+ case 0x28:
+ case 0x29:
+ case 0x2a:
+ case 0x2b:
+ case 0x2c:
+ case 0x2d:
+ case 0x30:
+ case 0x31:
+ case 0x32:
+ case 0x33:
+ case 0x34:
+ case 0x35:
+ case 0x38:
+ case 0x39:
+ case 0x3a:
+ case 0x3b:
+ case 0x3c:
+ case 0x3d:
if (((opcode >> 3) & 7) != OP_CMPL)
{
if ((opcode & 1) == 0)
@@ -3011,7 +3179,10 @@ reswitch:
break;
/* GRP1 */
- case 0x80 ... 0x83:
+ case 0x80:
+ case 0x81:
+ case 0x82:
+ case 0x83:
if (i386_record_modrm ())
{
return (-1);
@@ -3050,9 +3221,23 @@ reswitch:
break;
/* inv */
- case 0x40 ... 0x47:
+ case 0x40:
+ case 0x41:
+ case 0x42:
+ case 0x43:
+ case 0x44:
+ case 0x45:
+ case 0x46:
+ case 0x47:
/* dec */
- case 0x48 ... 0x4f:
+ case 0x48:
+ case 0x49:
+ case 0x4a:
+ case 0x4b:
+ case 0x4c:
+ case 0x4d:
+ case 0x4e:
+ case 0x4f:
if (record_arch_list_add_reg (opcode & 7))
{
return (-1);
@@ -3452,7 +3637,14 @@ reswitch:
break;
/* push */
- case 0x50 ... 0x57:
+ case 0x50:
+ case 0x51:
+ case 0x52:
+ case 0x53:
+ case 0x54:
+ case 0x55:
+ case 0x56:
+ case 0x57:
case 0x68:
case 0x6a:
/* push es */
@@ -3481,7 +3673,14 @@ reswitch:
break;
/* pop */
- case 0x58 ... 0x5f:
+ case 0x58:
+ case 0x59:
+ case 0x5a:
+ case 0x5b:
+ case 0x5c:
+ case 0x5d:
+ case 0x5e:
+ case 0x5f:
ot = dflag + OT_WORD;
if (record_arch_list_add_reg (I386_ESP_REGNUM))
{
@@ -3854,7 +4053,7 @@ reswitch:
{
if (record_debug)
printf_unfiltered (_
- ("Process record ignores the memory change of instruction in address 0x%s because it can't get the value of the segment register.\n"),
+ ("Process record ignores the memory change of instruction at address 0x%s because it can't get the value of the segment register.\n"),
paddr_nz (i386_record_pc));
}
else
@@ -3872,9 +4071,12 @@ reswitch:
if (target_read_memory
(i386_record_pc, (gdb_byte *) & addr, 4))
{
- printf_unfiltered (_
- ("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 4.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc += 4;
@@ -3884,9 +4086,12 @@ reswitch:
if (target_read_memory
(i386_record_pc, (gdb_byte *) & tmpu16, 4))
{
- printf_unfiltered (_
- ("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 4.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc += 2;
@@ -3901,7 +4106,14 @@ reswitch:
break;
/* mov R, Ib */
- case 0xb0 ... 0xb7:
+ case 0xb0:
+ case 0xb1:
+ case 0xb2:
+ case 0xb3:
+ case 0xb4:
+ case 0xb5:
+ case 0xb6:
+ case 0xb7:
if (record_arch_list_add_reg ((opcode & 0x7) & 0x3))
{
return (-1);
@@ -3909,7 +4121,14 @@ reswitch:
break;
/* mov R, Iv */
- case 0xb8 ... 0xbf:
+ case 0xb8:
+ case 0xb9:
+ case 0xba:
+ case 0xbb:
+ case 0xbc:
+ case 0xbd:
+ case 0xbe:
+ case 0xbf:
if (record_arch_list_add_reg (opcode & 0x7))
{
return (-1);
@@ -3917,7 +4136,13 @@ reswitch:
break;
/* xchg R, EAX */
- case 0x91 ... 0x97:
+ case 0x91:
+ case 0x92:
+ case 0x93:
+ case 0x94:
+ case 0x95:
+ case 0x96:
+ case 0x97:
if (record_arch_list_add_reg (I386_EAX_REGNUM))
{
return (-1);
@@ -4108,7 +4333,14 @@ reswitch:
/* floats */
/* It just record the memory change of instrcution. */
- case 0xd8 ... 0xdf:
+ case 0xd8:
+ case 0xd9:
+ case 0xda:
+ case 0xdb:
+ case 0xdc:
+ case 0xdd:
+ case 0xde:
+ case 0xdf:
if (i386_record_modrm ())
{
return (-1);
@@ -4125,17 +4357,54 @@ reswitch:
}
switch (reg)
{
- case 0x00 ... 0x07:
- case 0x10 ... 0x17:
- case 0x20 ... 0x27:
- case 0x30 ... 0x37:
+ case 0x00:
+ case 0x01:
+ case 0x02:
+ case 0x03:
+ case 0x04:
+ case 0x05:
+ case 0x06:
+ case 0x07:
+ case 0x10:
+ case 0x11:
+ case 0x12:
+ case 0x13:
+ case 0x14:
+ case 0x15:
+ case 0x16:
+ case 0x17:
+ case 0x20:
+ case 0x21:
+ case 0x22:
+ case 0x23:
+ case 0x24:
+ case 0x25:
+ case 0x26:
+ case 0x27:
+ case 0x30:
+ case 0x31:
+ case 0x32:
+ case 0x33:
+ case 0x34:
+ case 0x35:
+ case 0x36:
+ case 0x37:
break;
case 0x08:
case 0x0a:
case 0x0b:
- case 0x18 ... 0x1b:
- case 0x28 ... 0x2b:
- case 0x38 ... 0x3b:
+ case 0x18:
+ case 0x19:
+ case 0x1a:
+ case 0x1b:
+ case 0x28:
+ case 0x29:
+ case 0x2a:
+ case 0x2b:
+ case 0x38:
+ case 0x39:
+ case 0x3a:
+ case 0x3b:
switch (reg & 7)
{
case 0:
@@ -4306,7 +4575,7 @@ reswitch:
/* addr += ((uint32_t)read_register (I386_ES_REGNUM)) << 4; */
if (record_debug)
printf_unfiltered (_
- ("Process record ignores the memory change of instruction in address 0x%s because it can't get the value of the segment register.\n"),
+ ("Process record ignores the memory change of instruction at address 0x%s because it can't get the value of the segment register.\n"),
paddr_nz (i386_record_pc));
}
@@ -4527,13 +4796,58 @@ reswitch:
/* jmp Jb */
case 0xeb:
/* jcc Jb */
- case 0x70 ... 0x7f:
+ case 0x70:
+ case 0x71:
+ case 0x72:
+ case 0x73:
+ case 0x74:
+ case 0x75:
+ case 0x76:
+ case 0x77:
+ case 0x78:
+ case 0x79:
+ case 0x7a:
+ case 0x7b:
+ case 0x7c:
+ case 0x7d:
+ case 0x7e:
+ case 0x7f:
/* jcc Jv */
- case 0x0f80 ... 0x0f8f:
+ case 0x0f80:
+ case 0x0f81:
+ case 0x0f82:
+ case 0x0f83:
+ case 0x0f84:
+ case 0x0f85:
+ case 0x0f86:
+ case 0x0f87:
+ case 0x0f88:
+ case 0x0f89:
+ case 0x0f8a:
+ case 0x0f8b:
+ case 0x0f8c:
+ case 0x0f8d:
+ case 0x0f8e:
+ case 0x0f8f:
break;
/* setcc Gv */
- case 0x0f90 ... 0x0f9f:
+ case 0x0f90:
+ case 0x0f91:
+ case 0x0f92:
+ case 0x0f93:
+ case 0x0f94:
+ case 0x0f95:
+ case 0x0f96:
+ case 0x0f97:
+ case 0x0f98:
+ case 0x0f99:
+ case 0x0f9a:
+ case 0x0f9b:
+ case 0x0f9c:
+ case 0x0f9d:
+ case 0x0f9e:
+ case 0x0f9f:
ot = OT_BYTE;
if (i386_record_modrm ())
{
@@ -4556,7 +4870,22 @@ reswitch:
break;
/* cmov Gv, Ev */
- case 0x0f40 ... 0x0f4f:
+ case 0x0f40:
+ case 0x0f41:
+ case 0x0f42:
+ case 0x0f43:
+ case 0x0f44:
+ case 0x0f45:
+ case 0x0f46:
+ case 0x0f47:
+ case 0x0f48:
+ case 0x0f49:
+ case 0x0f4a:
+ case 0x0f4b:
+ case 0x0f4c:
+ case 0x0f4d:
+ case 0x0f4e:
+ case 0x0f4f:
if (i386_record_modrm ())
{
return (-1);
@@ -4728,7 +5057,7 @@ reswitch:
/* XXX */
case 0x9b:
printf_unfiltered (_
- ("Process record don't support instruction fwait.\n"));
+ ("Process record doesn't support instruction fwait.\n"));
i386_record_pc -= 1;
goto no_support;
break;
@@ -4749,8 +5078,12 @@ reswitch:
int ret;
if (target_read_memory (i386_record_pc, &tmpu8, 1))
{
- printf_unfiltered (_("Process record: read memeory 0x%s error.\n"),
- paddr_nz (i386_record_pc));
+ if (record_debug)
+ {
+ printf_unfiltered (_
+ ("Process record: error reading memory at addr 0x%s len = 1.\n"),
+ paddr_nz (i386_record_pc));
+ }
return (-1);
}
i386_record_pc++;
@@ -4795,7 +5128,14 @@ reswitch:
break;
/* bswap reg */
- case 0x0fc8 ... 0x0fcf:
+ case 0x0fc8:
+ case 0x0fc9:
+ case 0x0fca:
+ case 0x0fcb:
+ case 0x0fcc:
+ case 0x0fcd:
+ case 0x0fce:
+ case 0x0fcf:
if (record_arch_list_add_reg (opcode & 7))
{
return (-1);
@@ -4979,7 +5319,7 @@ reswitch:
{
if (record_debug)
printf_unfiltered (_
- ("Process record ignores the memory change of instruction in address 0x%s because it can't get the value of the segment register.\n"),
+ ("Process record ignores the memory change of instruction at address 0x%s because it can't get the value of the segment register.\n"),
paddr_nz (i386_record_pc));
error("3");
}
@@ -5030,7 +5370,7 @@ error("3");
{
if (record_debug)
printf_unfiltered (_
- ("Process record ignores the memory change of instruction in address 0x%s because it can't get the value of the segment register.\n"),
+ ("Process record ignores the memory change of instruction at address 0x%s because it can't get the value of the segment register.\n"),
paddr_nz (i386_record_pc));
}
else
@@ -5146,7 +5486,13 @@ error("3");
break;
/* nop (multi byte) */
- case 0x0f19 ... 0x0f1f:
+ case 0x0f19:
+ case 0x0f1a:
+ case 0x0f1b:
+ case 0x0f1c:
+ case 0x0f1d:
+ case 0x0f1e:
+ case 0x0f1f:
break;
/* mov reg, crN */
@@ -5442,7 +5788,10 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (tdep->mm0_regnum == 0)
tdep->mm0_regnum = gdbarch_num_regs (gdbarch);
- set_gdbarch_record (gdbarch, i386_record);
+ set_gdbarch_skip_permanent_breakpoint (gdbarch,
+ i386_skip_permanent_breakpoint);
+
+ set_gdbarch_process_record (gdbarch, i386_process_record);
return gdbarch;
}
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 09939cae005..95022a28daf 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -52,12 +52,6 @@
#include "record.h"
-/* When the record function want inferior step before call function
- "keep_going", "reverse_resume_need_step" will be set to 1. It will be set
- back to 0 in the begin of function "handle_inferior_event" because it just
- be accessed by the sub-functions of "handle_inferior_event". */
-static int reverse_resume_need_step = 0;
-
/* Prototypes for local functions */
static void signals_info (char *, int);
@@ -81,9 +75,9 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
-struct thread_stepping_state;
+static int currently_stepping (struct thread_info *tp);
-static int currently_stepping (struct thread_stepping_state *tss);
+static int currently_stepping_callback (struct thread_info *tp, void *data);
static void xdb_handle_command (char *args, int from_tty);
@@ -148,13 +142,13 @@ show_debug_infrun (struct ui_file *file, int from_tty,
past the dynamic linker, as if we were using "next" to step over a
function call.
- IN_SOLIB_DYNSYM_RESOLVE_CODE says whether we're in the dynamic
+ in_solib_dynsym_resolve_code() says whether we're in the dynamic
linker code or not. Normally, this means we single-step. However,
if SKIP_SOLIB_RESOLVER then returns non-zero, then its value is an
address where we can place a step-resume breakpoint to get past the
linker's symbol resolution function.
- IN_SOLIB_DYNSYM_RESOLVE_CODE can generally be implemented in a
+ in_solib_dynsym_resolve_code() can generally be implemented in a
pretty portable way, by comparing the PC against the address ranges
of the dynamic linker's sections.
@@ -224,31 +218,6 @@ static struct cmd_list_element *stop_command;
static struct symbol *step_start_function;
-/* Nonzero if we are presently stepping over a breakpoint.
-
- If we hit a breakpoint or watchpoint, and then continue,
- we need to single step the current thread with breakpoints
- disabled, to avoid hitting the same breakpoint or
- watchpoint again. And we should step just a single
- thread and keep other threads stopped, so that
- other threads don't miss breakpoints while they are removed.
-
- So, this variable simultaneously means that we need to single
- step the current thread, keep other threads stopped, and that
- breakpoints should be removed while we step.
-
- This variable is set either:
- - in proceed, when we resume inferior on user's explicit request
- - in keep_going, if handle_inferior_event decides we need to
- step over breakpoint.
-
- The variable is cleared in clear_proceed_status, called every
- time before we call proceed. The proceed calls wait_for_inferior,
- which calls handle_inferior_event in a loop, and until
- wait_for_inferior exits, this variable is changed only by keep_going. */
-
-static int stepping_over_breakpoint;
-
/* Nonzero if we want to give control to the user when we're notified
of shared library events by the dynamic linker. */
static int stop_on_solib_events;
@@ -265,20 +234,8 @@ show_stop_on_solib_events (struct ui_file *file, int from_tty,
int stop_after_trap;
-/* Nonzero means expecting a trap and caller will handle it themselves.
- It is used after attach, due to attaching to a process;
- when running in the shell before the child program has been exec'd;
- and when running some kinds of remote stuff (FIXME?). */
-
-enum stop_kind stop_soon;
-
-/* Nonzero if proceed is being used for a "finish" command or a similar
- situation when stop_registers should be saved. */
-
-int proceed_to_finish;
-
-/* Save register contents here when about to pop a stack dummy frame,
- if-and-only-if proceed_to_finish is set.
+/* Save register contents here when executing a "finish" command or are
+ about to pop a stack dummy frame, if-and-only-if proceed_to_finish is set.
Thus this contains the return value from the called function (assuming
values are returned in a register). */
@@ -288,34 +245,15 @@ struct regcache *stop_registers;
static int stop_print_frame;
-/* Step-resume or longjmp-resume breakpoint. */
-static struct breakpoint *step_resume_breakpoint = NULL;
-
/* This is a cached copy of the pid/waitstatus of the last event
returned by target_wait()/deprecated_target_wait_hook(). This
information is returned by get_last_target_status(). */
static ptid_t target_last_wait_ptid;
static struct target_waitstatus target_last_waitstatus;
-/* Context-switchable data. */
-struct thread_stepping_state
-{
- /* Should we step over breakpoint next time keep_going
- is called? */
- int stepping_over_breakpoint;
- int current_line;
- struct symtab *current_symtab;
- int step_after_step_resume_breakpoint;
- int stepping_through_solib_after_catch;
- bpstat stepping_through_solib_catchpoints;
-};
-
-struct thread_stepping_state gtss;
-struct thread_stepping_state *tss = &gtss;
-
static void context_switch (ptid_t ptid);
-void init_thread_stepping_state (struct thread_stepping_state *tss);
+void init_thread_stepping_state (struct thread_info *tss);
void init_infwait_state (void);
@@ -367,6 +305,8 @@ follow_fork (void)
void
follow_inferior_reset_breakpoints (void)
{
+ struct thread_info *tp = inferior_thread ();
+
/* Was there a step_resume breakpoint? (There was if the user
did a "next" at the fork() call.) If so, explicitly reset its
thread number.
@@ -378,8 +318,8 @@ follow_inferior_reset_breakpoints (void)
"threads". We must update the bp's notion of which thread
it is for, or it'll be ignored when it triggers. */
- if (step_resume_breakpoint)
- breakpoint_re_set_thread (step_resume_breakpoint);
+ if (tp->step_resume_breakpoint)
+ breakpoint_re_set_thread (tp->step_resume_breakpoint);
/* Reinsert all breakpoints in the child. The user may have set
breakpoints after catching the fork, in which case those
@@ -395,8 +335,8 @@ follow_inferior_reset_breakpoints (void)
static void
follow_exec (ptid_t pid, char *execd_pathname)
{
- ptid_t saved_pid = pid;
struct target_ops *tgt;
+ struct thread_info *th = inferior_thread ();
/* This is an exec event that we actually wish to pay attention to.
Refresh our symbol table to the newly exec'd program, remove any
@@ -422,9 +362,9 @@ follow_exec (ptid_t pid, char *execd_pathname)
/* If there was one, it's gone now. We cannot truly step-to-next
statement through an exec(). */
- step_resume_breakpoint = NULL;
- step_range_start = 0;
- step_range_end = 0;
+ th->step_resume_breakpoint = NULL;
+ th->step_range_start = 0;
+ th->step_range_end = 0;
/* What is this a.out's name? */
printf_unfiltered (_("Executing new program: %s\n"), execd_pathname);
@@ -433,9 +373,8 @@ follow_exec (ptid_t pid, char *execd_pathname)
inferior has essentially been killed & reborn. */
gdb_flush (gdb_stdout);
- generic_mourn_inferior ();
- /* Because mourn_inferior resets inferior_ptid. */
- inferior_ptid = saved_pid;
+
+ breakpoint_init_inferior (inf_execd);
if (gdb_sysroot && *gdb_sysroot)
{
@@ -618,28 +557,55 @@ static CORE_ADDR displaced_step_original, displaced_step_copy;
/* Saved contents of copy area. */
static gdb_byte *displaced_step_saved_copy;
-/* When this is non-zero, we are allowed to use displaced stepping, if
- the architecture supports it. When this is zero, we use
- traditional the hold-and-step approach. */
-int can_use_displaced_stepping = 1;
+/* Enum strings for "set|show displaced-stepping". */
+
+static const char can_use_displaced_stepping_auto[] = "auto";
+static const char can_use_displaced_stepping_on[] = "on";
+static const char can_use_displaced_stepping_off[] = "off";
+static const char *can_use_displaced_stepping_enum[] =
+{
+ can_use_displaced_stepping_auto,
+ can_use_displaced_stepping_on,
+ can_use_displaced_stepping_off,
+ NULL,
+};
+
+/* If ON, and the architecture supports it, GDB will use displaced
+ stepping to step over breakpoints. If OFF, or if the architecture
+ doesn't support it, GDB will instead use the traditional
+ hold-and-step approach. If AUTO (which is the default), GDB will
+ decide which technique to use to step over breakpoints depending on
+ which of all-stop or non-stop mode is active --- displaced stepping
+ in non-stop mode; hold-and-step in all-stop mode. */
+
+static const char *can_use_displaced_stepping =
+ can_use_displaced_stepping_auto;
+
static void
show_can_use_displaced_stepping (struct ui_file *file, int from_tty,
struct cmd_list_element *c,
const char *value)
{
- fprintf_filtered (file, _("\
-Debugger's willingness to use displaced stepping to step over "
-"breakpoints is %s.\n"), value);
+ if (can_use_displaced_stepping == can_use_displaced_stepping_auto)
+ fprintf_filtered (file, _("\
+Debugger's willingness to use displaced stepping to step over \
+breakpoints is %s (currently %s).\n"),
+ value, non_stop ? "on" : "off");
+ else
+ fprintf_filtered (file, _("\
+Debugger's willingness to use displaced stepping to step over \
+breakpoints is %s.\n"), value);
}
-/* Return non-zero if displaced stepping is enabled, and can be used
- with GDBARCH. */
-/* When GDB is working in record replay mode, it doesn't need use desplaced
- step. */
+/* Return non-zero if displaced stepping can/should be used to step
+ over breakpoints. */
+
static int
use_displaced_stepping (struct gdbarch *gdbarch)
{
- return (can_use_displaced_stepping
+ return (((can_use_displaced_stepping == can_use_displaced_stepping_auto
+ && non_stop)
+ || can_use_displaced_stepping == can_use_displaced_stepping_on)
&& gdbarch_displaced_step_copy_insn_p (gdbarch)
&& !RECORD_IS_USED);
}
@@ -697,7 +663,7 @@ displaced_step_dump_bytes (struct ui_file *file,
static int
displaced_step_prepare (ptid_t ptid)
{
- struct cleanup *old_cleanups;
+ struct cleanup *old_cleanups, *ignore_cleanups;
struct regcache *regcache = get_thread_regcache (ptid);
struct gdbarch *gdbarch = get_regcache_arch (regcache);
CORE_ADDR original, copy;
@@ -749,6 +715,9 @@ displaced_step_prepare (ptid_t ptid)
displaced_step_clear ();
+ old_cleanups = save_inferior_ptid ();
+ inferior_ptid = ptid;
+
original = regcache_read_pc (regcache);
copy = gdbarch_displaced_step_location (gdbarch);
@@ -756,8 +725,8 @@ displaced_step_prepare (ptid_t ptid)
/* Save the original contents of the copy area. */
displaced_step_saved_copy = xmalloc (len);
- old_cleanups = make_cleanup (free_current_contents,
- &displaced_step_saved_copy);
+ ignore_cleanups = make_cleanup (free_current_contents,
+ &displaced_step_saved_copy);
read_memory (copy, displaced_step_saved_copy, len);
if (debug_displaced)
{
@@ -767,7 +736,7 @@ displaced_step_prepare (ptid_t ptid)
};
closure = gdbarch_displaced_step_copy_insn (gdbarch,
- original, copy, regcache);
+ original, copy, regcache);
/* We don't support the fully-simulated case at present. */
gdb_assert (closure);
@@ -777,11 +746,13 @@ displaced_step_prepare (ptid_t ptid)
/* Resume execution at the copy. */
regcache_write_pc (regcache, copy);
- discard_cleanups (old_cleanups);
+ discard_cleanups (ignore_cleanups);
+
+ do_cleanups (old_cleanups);
if (debug_displaced)
fprintf_unfiltered (gdb_stdlog, "displaced: displaced pc to 0x%s\n",
- paddr_nz (copy));
+ paddr_nz (copy));
/* Save the information we need to fix things up if the step
succeeds. */
@@ -808,7 +779,7 @@ write_memory_ptid (ptid_t ptid, CORE_ADDR memaddr, const gdb_byte *myaddr, int l
do_cleanups (ptid_cleanup);
}
-void
+static void
displaced_step_fixup (ptid_t event_ptid, enum target_signal signal)
{
struct cleanup *old_cleanups;
@@ -852,30 +823,98 @@ displaced_step_fixup (ptid_t event_ptid, enum target_signal signal)
do_cleanups (old_cleanups);
+ displaced_step_ptid = null_ptid;
+
/* Are there any pending displaced stepping requests? If so, run
one now. */
- if (displaced_step_request_queue)
+ while (displaced_step_request_queue)
{
struct displaced_step_request *head;
ptid_t ptid;
+ CORE_ADDR actual_pc;
head = displaced_step_request_queue;
ptid = head->ptid;
displaced_step_request_queue = head->next;
xfree (head);
- if (debug_displaced)
- fprintf_unfiltered (gdb_stdlog,
- "displaced: stepping queued %s now\n",
- target_pid_to_str (ptid));
+ context_switch (ptid);
+
+ actual_pc = read_pc ();
+
+ if (breakpoint_here_p (actual_pc))
+ {
+ if (debug_displaced)
+ fprintf_unfiltered (gdb_stdlog,
+ "displaced: stepping queued %s now\n",
+ target_pid_to_str (ptid));
+
+ displaced_step_prepare (ptid);
+
+ if (debug_displaced)
+ {
+ gdb_byte buf[4];
+
+ fprintf_unfiltered (gdb_stdlog, "displaced: run 0x%s: ",
+ paddr_nz (actual_pc));
+ read_memory (actual_pc, buf, sizeof (buf));
+ displaced_step_dump_bytes (gdb_stdlog, buf, sizeof (buf));
+ }
+
+ target_resume (ptid, 1, TARGET_SIGNAL_0);
+
+ /* Done, we're stepping a thread. */
+ break;
+ }
+ else
+ {
+ int step;
+ struct thread_info *tp = inferior_thread ();
+
+ /* The breakpoint we were sitting under has since been
+ removed. */
+ tp->trap_expected = 0;
+
+ /* Go back to what we were trying to do. */
+ step = currently_stepping (tp);
+ if (debug_displaced)
+ fprintf_unfiltered (gdb_stdlog, "breakpoint is gone %s: step(%d)\n",
+ target_pid_to_str (tp->ptid), step);
- displaced_step_ptid = null_ptid;
- displaced_step_prepare (ptid);
- target_resume (ptid, 1, TARGET_SIGNAL_0);
+ target_resume (ptid, step, TARGET_SIGNAL_0);
+ tp->stop_signal = TARGET_SIGNAL_0;
+
+ /* This request was discarded. See if there's any other
+ thread waiting for its turn. */
+ }
}
}
+/* Update global variables holding ptids to hold NEW_PTID if they were
+ holding OLD_PTID. */
+static void
+infrun_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid)
+{
+ struct displaced_step_request *it;
+
+ if (ptid_equal (inferior_ptid, old_ptid))
+ inferior_ptid = new_ptid;
+
+ if (ptid_equal (singlestep_ptid, old_ptid))
+ singlestep_ptid = new_ptid;
+
+ if (ptid_equal (displaced_step_ptid, old_ptid))
+ displaced_step_ptid = new_ptid;
+
+ if (ptid_equal (deferred_step_ptid, old_ptid))
+ deferred_step_ptid = new_ptid;
+
+ for (it = displaced_step_request_queue; it; it = it->next)
+ if (ptid_equal (it->ptid, old_ptid))
+ it->ptid = new_ptid;
+}
+
/* Resuming. */
@@ -929,16 +968,20 @@ resume (int step, enum target_signal sig)
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
+
+ /* Note that these must be reset if we follow a fork below. */
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct thread_info *tp = inferior_thread ();
CORE_ADDR pc = regcache_read_pc (regcache);
+
QUIT;
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
"infrun: resume (step=%d, signal=%d), "
- "stepping_over_breakpoint=%d\n",
- step, sig, stepping_over_breakpoint);
+ "trap_expected=%d\n",
+ step, sig, tp->trap_expected);
/* Some targets (e.g. Solaris x86) have a kernel bug when stepping
over an instruction that causes a page fault without triggering
@@ -975,14 +1018,18 @@ a command like `return' or `jump' to continue execution."));
comments in the handle_inferior event for dealing with 'random
signals' explain what we do instead. */
if (use_displaced_stepping (gdbarch)
- && stepping_over_breakpoint
+ && tp->trap_expected
&& sig == TARGET_SIGNAL_0)
{
if (!displaced_step_prepare (inferior_ptid))
{
/* Got placed in displaced stepping queue. Will be resumed
later when all the currently queued displaced stepping
- requests finish. */
+ requests finish. The thread is not executing at this point,
+ and the call to set_executing will be made later. But we
+ need to call set_running here, since from frontend point of view,
+ the thread is running. */
+ set_running (inferior_ptid, 1);
discard_cleanups (old_cleanups);
return;
}
@@ -1012,6 +1059,13 @@ a command like `return' or `jump' to continue execution."));
pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
if (follow_fork ())
should_resume = 0;
+
+ /* Following a child fork will change our notion of current
+ thread. */
+ tp = inferior_thread ();
+ regcache = get_current_regcache ();
+ gdbarch = get_regcache_arch (regcache);
+ pc = regcache_read_pc (regcache);
break;
case TARGET_WAITKIND_EXECD:
@@ -1055,7 +1109,7 @@ a command like `return' or `jump' to continue execution."));
}
if ((step || singlestep_breakpoints_inserted_p)
- && stepping_over_breakpoint)
+ && tp->trap_expected)
{
/* We're allowing a thread to run past a breakpoint it has
hit, by single-stepping the thread with the breakpoint
@@ -1095,7 +1149,7 @@ a command like `return' or `jump' to continue execution."));
if (debug_displaced
&& use_displaced_stepping (gdbarch)
- && stepping_over_breakpoint)
+ && tp->trap_expected)
{
struct regcache *resume_regcache = get_thread_regcache (resume_ptid);
CORE_ADDR actual_pc = regcache_read_pc (resume_regcache);
@@ -1107,6 +1161,10 @@ a command like `return' or `jump' to continue execution."));
displaced_step_dump_bytes (gdb_stdlog, buf, sizeof (buf));
}
+ /* Avoid confusing the next resume, if the next stop/resume
+ happens to apply to another thread. */
+ tp->stop_signal = TARGET_SIGNAL_0;
+
target_resume (resume_ptid, step, sig);
}
@@ -1118,17 +1176,64 @@ a command like `return' or `jump' to continue execution."));
/* Clear out all variables saying what to do when inferior is continued.
First do this, then set the ones you want, then call `proceed'. */
+static void
+clear_proceed_status_thread (struct thread_info *tp)
+{
+ if (debug_infrun)
+ fprintf_unfiltered (gdb_stdlog,
+ "infrun: clear_proceed_status_thread (%s)\n",
+ target_pid_to_str (tp->ptid));
+
+ tp->trap_expected = 0;
+ tp->step_range_start = 0;
+ tp->step_range_end = 0;
+ tp->step_frame_id = null_frame_id;
+ tp->step_over_calls = STEP_OVER_UNDEBUGGABLE;
+ tp->stop_requested = 0;
+
+ tp->stop_step = 0;
+
+ tp->proceed_to_finish = 0;
+
+ /* Discard any remaining commands or status from previous stop. */
+ bpstat_clear (&tp->stop_bpstat);
+}
+
+static int
+clear_proceed_status_callback (struct thread_info *tp, void *data)
+{
+ if (is_exited (tp->ptid))
+ return 0;
+
+ clear_proceed_status_thread (tp);
+ return 0;
+}
+
void
clear_proceed_status (void)
{
- stepping_over_breakpoint = 0;
- step_range_start = 0;
- step_range_end = 0;
- step_frame_id = null_frame_id;
- step_over_calls = STEP_OVER_UNDEBUGGABLE;
+ if (!ptid_equal (inferior_ptid, null_ptid))
+ {
+ struct inferior *inferior;
+
+ if (non_stop)
+ {
+ /* If in non-stop mode, only delete the per-thread status
+ of the current thread. */
+ clear_proceed_status_thread (inferior_thread ());
+ }
+ else
+ {
+ /* In all-stop mode, delete the per-thread status of
+ *all* threads. */
+ iterate_over_threads (clear_proceed_status_callback, NULL);
+ }
+
+ inferior = current_inferior ();
+ inferior->stop_soon = NO_STOP_QUIETLY;
+ }
+
stop_after_trap = 0;
- stop_soon = NO_STOP_QUIETLY;
- proceed_to_finish = 0;
breakpoint_proceeded = 1; /* We're about to proceed... */
if (stop_registers)
@@ -1136,9 +1241,6 @@ clear_proceed_status (void)
regcache_xfree (stop_registers);
stop_registers = NULL;
}
-
- /* Discard any remaining commands or status from previous stop. */
- bpstat_clear (&stop_bpstat);
}
/* This should be suitable for any targets that support threads. */
@@ -1184,11 +1286,6 @@ prepare_to_proceed (int step)
return 0;
}
-/* Record the pc of the program the last time it stopped. This is
- just used internally by wait_for_inferior, but need to be preserved
- over calls to it and cleared when the inferior is started. */
-static CORE_ADDR prev_pc;
-
/* Basic routine for continuing the program in various fashions.
ADDR is the address to resume at, or -1 for resume where stopped.
@@ -1206,6 +1303,7 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
{
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct thread_info *tp;
CORE_ADDR pc = regcache_read_pc (regcache);
int oneproc = 0;
@@ -1214,9 +1312,9 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
if (step < 0)
stop_after_trap = 1;
- /* When GDB resume the inferior, process record target doesn't need to
- record the memory and register store operation of GDB. So set
- record_not_record to 1. */
+ /* When GDB resume the inferior, process record target doesn't need to
+ record the memory and register store operation of GDB. So set
+ record_not_record to 1. */
if (RECORD_IS_USED)
record_not_record_set ();
@@ -1273,9 +1371,12 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
oneproc = 1;
}
+ /* prepare_to_proceed may change the current thread. */
+ tp = inferior_thread ();
+
if (oneproc)
{
- stepping_over_breakpoint = 1;
+ tp->trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
breakpoint without hitting it, so leave all breakpoints
inserted. Otherwise we need to disable all breakpoints, step
@@ -1288,15 +1389,40 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
/* We can insert breakpoints if we're not trying to step over one,
or if we are stepping over one but we're using displaced stepping
to do so. */
- if (! stepping_over_breakpoint || use_displaced_stepping (gdbarch))
+ if (! tp->trap_expected || use_displaced_stepping (gdbarch))
insert_breakpoints ();
+ if (!non_stop)
+ {
+ /* Pass the last stop signal to the thread we're resuming,
+ irrespective of whether the current thread is the thread that
+ got the last event or not. This was historically GDB's
+ behaviour before keeping a stop_signal per thread. */
+
+ struct thread_info *last_thread;
+ ptid_t last_ptid;
+ struct target_waitstatus last_status;
+
+ get_last_target_status (&last_ptid, &last_status);
+ if (!ptid_equal (inferior_ptid, last_ptid)
+ && !ptid_equal (last_ptid, null_ptid)
+ && !ptid_equal (last_ptid, minus_one_ptid))
+ {
+ last_thread = find_thread_pid (last_ptid);
+ if (last_thread)
+ {
+ tp->stop_signal = last_thread->stop_signal;
+ last_thread->stop_signal = TARGET_SIGNAL_0;
+ }
+ }
+ }
+
if (siggnal != TARGET_SIGNAL_DEFAULT)
- stop_signal = siggnal;
+ tp->stop_signal = siggnal;
/* If this signal should not be seen by program,
give it zero. Used for debugging signals. */
- else if (!signal_program[stop_signal])
- stop_signal = TARGET_SIGNAL_0;
+ else if (!signal_program[tp->stop_signal])
+ tp->stop_signal = TARGET_SIGNAL_0;
annotate_starting ();
@@ -1326,19 +1452,16 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
are not guaranteed the inferior is stopped and so the regcache_read_pc ()
call can fail. Setting the prev_pc value here ensures the value is
updated correctly when the inferior is stopped. */
- prev_pc = regcache_read_pc (get_current_regcache ());
+ tp->prev_pc = regcache_read_pc (get_current_regcache ());
/* Fill in with reasonable starting values. */
- init_thread_stepping_state (tss);
-
- /* We'll update this if & when we switch to a new thread. */
- previous_inferior_ptid = inferior_ptid;
+ init_thread_stepping_state (tp);
/* Reset to normal state. */
init_infwait_state ();
/* Resume inferior. */
- resume (oneproc || step || bpstat_should_step (), stop_signal);
+ resume (oneproc || step || bpstat_should_step (), tp->stop_signal);
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
@@ -1357,9 +1480,11 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
void
start_remote (int from_tty)
{
+ struct inferior *inferior;
init_wait_for_inferior ();
- stop_soon = STOP_QUIETLY_REMOTE;
- stepping_over_breakpoint = 0;
+
+ inferior = current_inferior ();
+ inferior->stop_soon = STOP_QUIETLY_REMOTE;
/* Always go on waiting for the target, regardless of the mode. */
/* FIXME: cagney/1999-09-23: At present it isn't possible to
@@ -1391,13 +1516,9 @@ void
init_wait_for_inferior (void)
{
/* These are meaningless until the first time through wait_for_inferior. */
- prev_pc = 0;
breakpoint_init_inferior (inf_starting);
- /* Don't confuse first call to proceed(). */
- stop_signal = TARGET_SIGNAL_0;
-
/* The first resume is not following a fork/vfork/exec. */
pending_follow.kind = TARGET_WAITKIND_SPURIOUS; /* I.e., none. */
@@ -1408,7 +1529,6 @@ init_wait_for_inferior (void)
target_last_wait_ptid = minus_one_ptid;
- init_thread_stepping_state (tss);
previous_inferior_ptid = null_ptid;
init_infwait_state ();
@@ -1455,6 +1575,10 @@ enum infwait_states infwait_state;
struct execution_control_state
{
ptid_t ptid;
+ /* The thread that got the event, if this was a thread event; NULL
+ otherwise. */
+ struct thread_info *event_thread;
+
struct target_waitstatus ws;
int random_signal;
CORE_ADDR stop_func_start;
@@ -1482,6 +1606,147 @@ static void keep_going (struct execution_control_state *ecs);
static void print_stop_reason (enum inferior_stop_reason stop_reason,
int stop_info);
+/* Callback for iterate over threads. If the thread is stopped, but
+ the user/frontend doesn't know about that yet, go through
+ normal_stop, as if the thread had just stopped now. ARG points at
+ a ptid. If PTID is MINUS_ONE_PTID, applies to all threads. If
+ ptid_is_pid(PTID) is true, applies to all threads of the process
+ pointed at by PTID. Otherwise, apply only to the thread pointed by
+ PTID. */
+
+static int
+infrun_thread_stop_requested_callback (struct thread_info *info, void *arg)
+{
+ ptid_t ptid = * (ptid_t *) arg;
+
+ if ((ptid_equal (info->ptid, ptid)
+ || ptid_equal (minus_one_ptid, ptid)
+ || (ptid_is_pid (ptid)
+ && ptid_get_pid (ptid) == ptid_get_pid (info->ptid)))
+ && is_running (info->ptid)
+ && !is_executing (info->ptid))
+ {
+ struct cleanup *old_chain;
+ struct execution_control_state ecss;
+ struct execution_control_state *ecs = &ecss;
+
+ memset (ecs, 0, sizeof (*ecs));
+
+ old_chain = make_cleanup_restore_current_thread ();
+
+ switch_to_thread (info->ptid);
+
+ /* Go through handle_inferior_event/normal_stop, so we always
+ have consistent output as if the stop event had been
+ reported. */
+ ecs->ptid = info->ptid;
+ ecs->event_thread = find_thread_pid (info->ptid);
+ ecs->ws.kind = TARGET_WAITKIND_STOPPED;
+ ecs->ws.value.sig = TARGET_SIGNAL_0;
+
+ handle_inferior_event (ecs);
+
+ if (!ecs->wait_some_more)
+ {
+ struct thread_info *tp;
+
+ normal_stop ();
+
+ /* Finish off the continuations. The continations
+ themselves are responsible for realising the thread
+ didn't finish what it was supposed to do. */
+ tp = inferior_thread ();
+ do_all_intermediate_continuations_thread (tp);
+ do_all_continuations_thread (tp);
+ }
+
+ do_cleanups (old_chain);
+ }
+
+ return 0;
+}
+
+/* This function is attached as a "thread_stop_requested" observer.
+ Cleanup local state that assumed the PTID was to be resumed, and
+ report the stop to the frontend. */
+
+void
+infrun_thread_stop_requested (ptid_t ptid)
+{
+ struct displaced_step_request *it, *next, *prev = NULL;
+
+ /* PTID was requested to stop. Remove it from the displaced
+ stepping queue, so we don't try to resume it automatically. */
+ for (it = displaced_step_request_queue; it; it = next)
+ {
+ next = it->next;
+
+ if (ptid_equal (it->ptid, ptid)
+ || ptid_equal (minus_one_ptid, ptid)
+ || (ptid_is_pid (ptid)
+ && ptid_get_pid (ptid) == ptid_get_pid (it->ptid)))
+ {
+ if (displaced_step_request_queue == it)
+ displaced_step_request_queue = it->next;
+ else
+ prev->next = it->next;
+
+ xfree (it);
+ }
+ else
+ prev = it;
+ }
+
+ iterate_over_threads (infrun_thread_stop_requested_callback, &ptid);
+}
+
+/* Callback for iterate_over_threads. */
+
+static int
+delete_step_resume_breakpoint_callback (struct thread_info *info, void *data)
+{
+ if (is_exited (info->ptid))
+ return 0;
+
+ delete_step_resume_breakpoint (info);
+ return 0;
+}
+
+/* In all-stop, delete the step resume breakpoint of any thread that
+ had one. In non-stop, delete the step resume breakpoint of the
+ thread that just stopped. */
+
+static void
+delete_step_thread_step_resume_breakpoint (void)
+{
+ if (!target_has_execution
+ || ptid_equal (inferior_ptid, null_ptid))
+ /* If the inferior has exited, we have already deleted the step
+ resume breakpoints out of GDB's lists. */
+ return;
+
+ if (non_stop)
+ {
+ /* If in non-stop mode, only delete the step-resume or
+ longjmp-resume breakpoint of the thread that just stopped
+ stepping. */
+ struct thread_info *tp = inferior_thread ();
+ delete_step_resume_breakpoint (tp);
+ }
+ else
+ /* In all-stop mode, delete all step-resume and longjmp-resume
+ breakpoints of any thread that had them. */
+ iterate_over_threads (delete_step_resume_breakpoint_callback, NULL);
+}
+
+/* A cleanup wrapper. */
+
+static void
+delete_step_thread_step_resume_breakpoint_cleanup (void *arg)
+{
+ delete_step_thread_step_resume_breakpoint ();
+}
+
/* Wait for control to return from inferior to debugger.
If TREAT_EXEC_AS_SIGTRAP is non-zero, then handle EXEC signals
@@ -1506,14 +1771,17 @@ wait_for_inferior (int treat_exec_as_sigtrap)
(gdb_stdlog, "infrun: wait_for_inferior (treat_exec_as_sigtrap=%d)\n",
treat_exec_as_sigtrap);
- old_cleanups = make_cleanup (delete_step_resume_breakpoint,
- &step_resume_breakpoint);
+ old_cleanups =
+ make_cleanup (delete_step_thread_step_resume_breakpoint_cleanup, NULL);
ecs = &ecss;
memset (ecs, 0, sizeof (*ecs));
overlay_cache_invalid = 1;
+ /* We'll update this if & when we switch to a new thread. */
+ previous_inferior_ptid = inferior_ptid;
+
/* We have to invalidate the registers BEFORE calling target_wait
because they can be loaded from the target while in target_wait.
This makes remote debugging a bit more efficient for those
@@ -1542,6 +1810,7 @@ wait_for_inferior (int treat_exec_as_sigtrap)
if (!ecs->wait_some_more)
break;
}
+
do_cleanups (old_cleanups);
}
@@ -1566,6 +1835,13 @@ fetch_inferior_event (void *client_data)
overlay_cache_invalid = 1;
+ /* We can only rely on wait_for_more being correct before handling
+ the event in all-stop, but previous_inferior_ptid isn't used in
+ non-stop. */
+ if (!ecs->wait_some_more)
+ /* We'll update this if & when we switch to a new thread. */
+ previous_inferior_ptid = inferior_ptid;
+
if (non_stop)
/* In non-stop mode, the user/frontend should not notice a thread
switch due to internal events. Make sure we reverse to the
@@ -1601,10 +1877,19 @@ fetch_inferior_event (void *client_data)
if (!ecs->wait_some_more)
{
- delete_step_resume_breakpoint (&step_resume_breakpoint);
+ struct inferior *inf = find_inferior_pid (ptid_get_pid (ecs->ptid));
- normal_stop ();
- if (step_multi && stop_step)
+ delete_step_thread_step_resume_breakpoint ();
+
+ /* We may not find an inferior if this was a process exit. */
+ if (inf == NULL || inf->stop_soon == NO_STOP_QUIETLY)
+ normal_stop ();
+
+ if (target_has_execution
+ && ecs->ws.kind != TARGET_WAITKIND_EXITED
+ && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
+ && ecs->event_thread->step_multi
+ && ecs->event_thread->stop_step)
inferior_event_handler (INF_EXEC_CONTINUE, NULL);
else
inferior_event_handler (INF_EXEC_COMPLETE, NULL);
@@ -1631,7 +1916,7 @@ init_execution_control_state (struct execution_control_state *ecs)
/* Clear context switchable stepping state. */
void
-init_thread_stepping_state (struct thread_stepping_state *tss)
+init_thread_stepping_state (struct thread_info *tss)
{
struct symtab_and_line sal;
@@ -1640,7 +1925,7 @@ init_thread_stepping_state (struct thread_stepping_state *tss)
tss->stepping_through_solib_after_catch = 0;
tss->stepping_through_solib_catchpoints = NULL;
- sal = find_pc_line (prev_pc, 0);
+ sal = find_pc_line (tss->prev_pc, 0);
tss->current_line = sal.line;
tss->current_symtab = sal.symtab;
}
@@ -1663,17 +1948,11 @@ nullify_last_target_wait_ptid (void)
target_last_wait_ptid = minus_one_ptid;
}
-/* Switch thread contexts, maintaining "infrun state". */
+/* Switch thread contexts. */
static void
context_switch (ptid_t ptid)
{
- /* Caution: it may happen that the new thread (or the old one!)
- is not in the thread list. In this case we must not attempt
- to "switch context", or we run the risk that our context may
- be lost. This may happen as a result of the target module
- mishandling thread creation. */
-
if (debug_infrun)
{
fprintf_unfiltered (gdb_stdlog, "infrun: Switching context from %s ",
@@ -1682,72 +1961,16 @@ context_switch (ptid_t ptid)
target_pid_to_str (ptid));
}
- if (in_thread_list (inferior_ptid) && in_thread_list (ptid))
- { /* Perform infrun state context switch: */
- /* Save infrun state for the old thread. */
- save_infrun_state (inferior_ptid, prev_pc,
- stepping_over_breakpoint, step_resume_breakpoint,
- step_range_start,
- step_range_end, &step_frame_id,
- tss->stepping_over_breakpoint,
- tss->stepping_through_solib_after_catch,
- tss->stepping_through_solib_catchpoints,
- tss->current_line, tss->current_symtab,
- cmd_continuation, intermediate_continuation,
- proceed_to_finish,
- step_over_calls,
- stop_step,
- step_multi,
- stop_signal,
- stop_bpstat);
-
- /* Load infrun state for the new thread. */
- load_infrun_state (ptid, &prev_pc,
- &stepping_over_breakpoint, &step_resume_breakpoint,
- &step_range_start,
- &step_range_end, &step_frame_id,
- &tss->stepping_over_breakpoint,
- &tss->stepping_through_solib_after_catch,
- &tss->stepping_through_solib_catchpoints,
- &tss->current_line, &tss->current_symtab,
- &cmd_continuation, &intermediate_continuation,
- &proceed_to_finish,
- &step_over_calls,
- &stop_step,
- &step_multi,
- &stop_signal,
- &stop_bpstat);
- }
-
switch_to_thread (ptid);
}
-/* Context switch to thread PTID. */
-ptid_t
-context_switch_to (ptid_t ptid)
-{
- ptid_t current_ptid = inferior_ptid;
-
- /* Context switch to the new thread. */
- if (!ptid_equal (ptid, inferior_ptid))
- {
- context_switch (ptid);
- }
- return current_ptid;
-}
-
static void
adjust_pc_after_break (struct execution_control_state *ecs)
{
- struct regcache *regcache = get_thread_regcache (ecs->ptid);
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct regcache *regcache;
+ struct gdbarch *gdbarch;
CORE_ADDR breakpoint_pc;
- /* If this target does not decrement the PC after breakpoints, then
- we have nothing to do. */
- if (gdbarch_decr_pc_after_break (gdbarch) == 0)
- return;
-
/* If we've hit a breakpoint, we'll normally be stopped with SIGTRAP. If
we aren't, just return.
@@ -1775,14 +1998,57 @@ adjust_pc_after_break (struct execution_control_state *ecs)
if (ecs->ws.value.sig != TARGET_SIGNAL_TRAP)
return;
+ /* In reverse execution, when a breakpoint is hit, the instruction
+ under it has already been de-executed. The reported PC always
+ points at the breakpoint address, so adjusting it further would
+ be wrong. E.g., consider this case on a decr_pc_after_break == 1
+ architecture:
+
+ B1 0x08000000 : INSN1
+ B2 0x08000001 : INSN2
+ 0x08000002 : INSN3
+ PC -> 0x08000003 : INSN4
+
+ Say you're stopped at 0x08000003 as above. Reverse continuing
+ from that point should hit B2 as below. Reading the PC when the
+ SIGTRAP is reported should read 0x08000001 and INSN2 should have
+ been de-executed already.
+
+ B1 0x08000000 : INSN1
+ B2 PC -> 0x08000001 : INSN2
+ 0x08000002 : INSN3
+ 0x08000003 : INSN4
+
+ We can't apply the same logic as for forward execution, because
+ we would wrongly adjust the PC to 0x08000000, since there's a
+ breakpoint at PC - 1. We'd then report a hit on B1, although
+ INSN1 hadn't been de-executed yet. Doing nothing is the correct
+ behaviour. */
+ if (execution_direction == EXEC_REVERSE)
+ return;
+
+ /* If this target does not decrement the PC after breakpoints, then
+ we have nothing to do. */
+ regcache = get_thread_regcache (ecs->ptid);
+ gdbarch = get_regcache_arch (regcache);
+ if (gdbarch_decr_pc_after_break (gdbarch) == 0)
+ return;
+
/* Find the location where (if we've hit a breakpoint) the
breakpoint would be. */
breakpoint_pc = regcache_read_pc (regcache)
- gdbarch_decr_pc_after_break (gdbarch);
- /* Check whether there actually is a software breakpoint inserted
- at that location. */
- if (software_breakpoint_inserted_here_p (breakpoint_pc))
+ /* Check whether there actually is a software breakpoint inserted at
+ that location.
+
+ If in non-stop mode, a race condition is possible where we've
+ removed a breakpoint, but stop events for that breakpoint were
+ already queued and arrive later. To suppress those spurious
+ SIGTRAPs, we keep a list of such breakpoint locations for a bit,
+ and retire them after a number of stop events are reported. */
+ if (software_breakpoint_inserted_here_p (breakpoint_pc)
+ || (non_stop && moribund_breakpoint_here_p (breakpoint_pc)))
{
/* When using hardware single-step, a SIGTRAP is reported for both
a completed single-step and a software breakpoint. Need to
@@ -1804,8 +2070,8 @@ adjust_pc_after_break (struct execution_control_state *ecs)
if (singlestep_breakpoints_inserted_p
|| !ptid_equal (ecs->ptid, inferior_ptid)
- || !currently_stepping (tss)
- || prev_pc == breakpoint_pc)
+ || !currently_stepping (ecs->event_thread)
+ || ecs->event_thread->prev_pc == breakpoint_pc)
regcache_write_pc (regcache, breakpoint_pc);
}
}
@@ -1842,11 +2108,18 @@ handle_inferior_event (struct execution_control_state *ecs)
int stopped_by_watchpoint;
int stepped_after_stopped_by_watchpoint = 0;
struct symtab_and_line stop_pc_sal;
+ enum stop_kind stop_soon;
- /* Reset reverse_resume_need_step to 0. */
- reverse_resume_need_step = 0;
-
- breakpoint_retire_moribund ();
+ if (ecs->ws.kind != TARGET_WAITKIND_EXITED
+ && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
+ && ecs->ws.kind != TARGET_WAITKIND_IGNORE)
+ {
+ struct inferior *inf = find_inferior_pid (ptid_get_pid (ecs->ptid));
+ gdb_assert (inf);
+ stop_soon = inf->stop_soon;
+ }
+ else
+ stop_soon = NO_STOP_QUIETLY;
/* Cache the last pid/waitstatus. */
target_last_wait_ptid = ecs->ptid;
@@ -1855,10 +2128,6 @@ handle_inferior_event (struct execution_control_state *ecs)
/* Always clear state belonging to the previous time we stopped. */
stop_stack_dummy = 0;
- adjust_pc_after_break (ecs);
-
- reinit_frame_cache ();
-
/* If it's a new process, add it to the thread database */
ecs->new_thread_event = (!ptid_equal (ecs->ptid, inferior_ptid)
@@ -1869,15 +2138,29 @@ handle_inferior_event (struct execution_control_state *ecs)
&& ecs->ws.kind != TARGET_WAITKIND_SIGNALLED && ecs->new_thread_event)
add_thread (ecs->ptid);
+ ecs->event_thread = find_thread_pid (ecs->ptid);
+
+ /* Dependent on valid ECS->EVENT_THREAD. */
+ adjust_pc_after_break (ecs);
+
+ /* Dependent on the current PC value modified by adjust_pc_after_break. */
+ reinit_frame_cache ();
+
if (ecs->ws.kind != TARGET_WAITKIND_IGNORE)
{
- /* Mark the non-executing threads accordingly. */
- if (!non_stop
- || ecs->ws.kind == TARGET_WAITKIND_EXITED
- || ecs->ws.kind == TARGET_WAITKIND_SIGNALLED)
- set_executing (pid_to_ptid (-1), 0);
- else
- set_executing (ecs->ptid, 0);
+ breakpoint_retire_moribund ();
+
+ /* Mark the non-executing threads accordingly. In all-stop, all
+ threads of all processes are stopped when we get any event
+ reported. In non-stop mode, only the event thread stops. If
+ we're handling a process exit in non-stop mode, there's
+ nothing to do, as threads of the dead process are gone, and
+ threads of any other process were left running. */
+ if (!non_stop)
+ set_executing (minus_one_ptid, 0);
+ else if (ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
+ && ecs->ws.kind != TARGET_WAITKIND_EXITED)
+ set_executing (inferior_ptid, 0);
}
switch (infwait_state)
@@ -2001,13 +2284,14 @@ handle_inferior_event (struct execution_control_state *ecs)
case TARGET_WAITKIND_EXITED:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_EXITED\n");
+ inferior_ptid = ecs->ptid;
target_terminal_ours (); /* Must do this before mourn anyway */
print_stop_reason (EXITED, ecs->ws.value.integer);
/* Record the exit code in the convenience variable $_exitcode, so
that the user can inspect this again later. */
set_internalvar (lookup_internalvar ("_exitcode"),
- value_from_longest (builtin_type_int,
+ value_from_longest (builtin_type_int32,
(LONGEST) ecs->ws.value.integer));
gdb_flush (gdb_stdout);
target_mourn_inferior ();
@@ -2019,8 +2303,8 @@ handle_inferior_event (struct execution_control_state *ecs)
case TARGET_WAITKIND_SIGNALLED:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SIGNALLED\n");
+ inferior_ptid = ecs->ptid;
stop_print_frame = 0;
- stop_signal = ecs->ws.value.sig;
target_terminal_ours (); /* Must do this before mourn anyway */
/* Note: By definition of TARGET_WAITKIND_SIGNALLED, we shouldn't
@@ -2030,7 +2314,7 @@ handle_inferior_event (struct execution_control_state *ecs)
may be needed. */
target_mourn_inferior ();
- print_stop_reason (SIGNAL_EXITED, stop_signal);
+ print_stop_reason (SIGNAL_EXITED, ecs->ws.value.sig);
singlestep_breakpoints_inserted_p = 0;
stop_stepping (ecs);
return;
@@ -2041,7 +2325,6 @@ handle_inferior_event (struct execution_control_state *ecs)
case TARGET_WAITKIND_VFORKED:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_FORKED\n");
- stop_signal = TARGET_SIGNAL_TRAP;
pending_follow.kind = ecs->ws.kind;
pending_follow.fork_event.parent_pid = ecs->ptid;
@@ -2055,61 +2338,52 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_pc = read_pc ();
- stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
+ ecs->event_thread->stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
- ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
+ ecs->random_signal = !bpstat_explains_signal (ecs->event_thread->stop_bpstat);
/* If no catchpoint triggered for this, then keep going. */
if (ecs->random_signal)
{
- stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_0;
keep_going (ecs);
return;
}
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_TRAP;
goto process_event_stop_test;
case TARGET_WAITKIND_EXECD:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_EXECD\n");
- stop_signal = TARGET_SIGNAL_TRAP;
-
pending_follow.execd_pathname =
savestring (ecs->ws.value.execd_pathname,
strlen (ecs->ws.value.execd_pathname));
- /* This causes the eventpoints and symbol table to be reset. Must
- do this now, before trying to determine whether to stop. */
- follow_exec (inferior_ptid, pending_follow.execd_pathname);
- xfree (pending_follow.execd_pathname);
-
- stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
-
- {
- /* The breakpoints module may need to touch the inferior's
- memory. Switch to the (stopped) event ptid
- momentarily. */
- ptid_t saved_inferior_ptid = inferior_ptid;
- inferior_ptid = ecs->ptid;
-
- stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
-
- ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
- inferior_ptid = saved_inferior_ptid;
- }
-
if (!ptid_equal (ecs->ptid, inferior_ptid))
{
context_switch (ecs->ptid);
reinit_frame_cache ();
}
+ stop_pc = read_pc ();
+
+ /* This causes the eventpoints and symbol table to be reset.
+ Must do this now, before trying to determine whether to
+ stop. */
+ follow_exec (inferior_ptid, pending_follow.execd_pathname);
+ xfree (pending_follow.execd_pathname);
+
+ ecs->event_thread->stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
+ ecs->random_signal = !bpstat_explains_signal (ecs->event_thread->stop_bpstat);
+
/* If no catchpoint triggered for this, then keep going. */
if (ecs->random_signal)
{
- stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_0;
keep_going (ecs);
return;
}
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_TRAP;
goto process_event_stop_test;
/* Be careful not to try to gather much state about a thread
@@ -2136,11 +2410,12 @@ handle_inferior_event (struct execution_control_state *ecs)
case TARGET_WAITKIND_STOPPED:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_STOPPED\n");
- stop_signal = ecs->ws.value.sig;
+ ecs->event_thread->stop_signal = ecs->ws.value.sig;
break;
case TARGET_WAITKIND_NO_HISTORY:
/* Reverse execution: target ran out of history info. */
+ stop_pc = read_pc ();
print_stop_reason (NO_HISTORY, 0);
stop_stepping (ecs);
return;
@@ -2182,10 +2457,21 @@ targets should add new threads to the thread list themselves in non-stop mode.")
return;
}
- /* Do we need to clean up the state of a thread that has completed a
- displaced single-step? (Doing so usually affects the PC, so do
- it here, before we set stop_pc.) */
- displaced_step_fixup (ecs->ptid, stop_signal);
+ if (ecs->ws.kind == TARGET_WAITKIND_STOPPED)
+ {
+ /* Do we need to clean up the state of a thread that has
+ completed a displaced single-step? (Doing so usually affects
+ the PC, so do it here, before we set stop_pc.) */
+ displaced_step_fixup (ecs->ptid, ecs->event_thread->stop_signal);
+
+ /* If we either finished a single-step or hit a breakpoint, but
+ the user wanted this thread to be stopped, pretend we got a
+ SIG0 (generic unsignaled stop). */
+
+ if (ecs->event_thread->stop_requested
+ && ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP)
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_0;
+ }
stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));
@@ -2219,7 +2505,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
/* We've either finished single-stepping past the single-step
breakpoint, or stopped for some other reason. It would be nice if
we could tell, but we can't reliably. */
- if (stop_signal == TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepping_past_singlestep_breakpoint\n");
@@ -2239,8 +2525,6 @@ targets should add new threads to the thread list themselves in non-stop mode.")
}
}
- stepping_past_singlestep_breakpoint = 0;
-
if (!ptid_equal (deferred_step_ptid, null_ptid))
{
/* In non-stop mode, there's never a deferred_step_ptid set. */
@@ -2248,7 +2532,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
/* If we stopped for some other reason than single-stepping, ignore
the fact that we were supposed to switch back. */
- if (stop_signal == TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
@@ -2280,7 +2564,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
another thread. If so, then step that thread past the breakpoint,
and continue it. */
- if (stop_signal == TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP)
{
int thread_hop_needed = 0;
@@ -2334,6 +2618,8 @@ targets should add new threads to the thread list themselves in non-stop mode.")
if (new_singlestep_pc != singlestep_pc)
{
+ enum target_signal stop_signal;
+
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: unexpected thread,"
" but expected thread advanced also\n");
@@ -2342,7 +2628,11 @@ targets should add new threads to the thread list themselves in non-stop mode.")
singlestep_ptid. Don't swap here, since that's
the context we want to use. Just fudge our
state and continue. */
+ stop_signal = ecs->event_thread->stop_signal;
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_0;
ecs->ptid = singlestep_ptid;
+ ecs->event_thread = find_thread_pid (ecs->ptid);
+ ecs->event_thread->stop_signal = stop_signal;
stop_pc = new_singlestep_pc;
}
else
@@ -2402,7 +2692,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
infwait_state = infwait_thread_hop_state;
}
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->stepping_over_breakpoint = 1;
keep_going (ecs);
registers_changed ();
return;
@@ -2491,17 +2781,17 @@ targets should add new threads to the thread list themselves in non-stop mode.")
&ecs->stop_func_start, &ecs->stop_func_end);
ecs->stop_func_start
+= gdbarch_deprecated_function_start_offset (current_gdbarch);
- tss->stepping_over_breakpoint = 0;
- bpstat_clear (&stop_bpstat);
- stop_step = 0;
+ ecs->event_thread->stepping_over_breakpoint = 0;
+ bpstat_clear (&ecs->event_thread->stop_bpstat);
+ ecs->event_thread->stop_step = 0;
stop_print_frame = 1;
ecs->random_signal = 0;
stopped_by_random_signal = 0;
- if (stop_signal == TARGET_SIGNAL_TRAP
- && stepping_over_breakpoint
+ if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP
+ && ecs->event_thread->trap_expected
&& gdbarch_single_step_through_delay_p (current_gdbarch)
- && currently_stepping (tss))
+ && currently_stepping (ecs->event_thread))
{
/* We're trying to step off a breakpoint. Turns out that we're
also on an instruction that needs to be stepped multiple
@@ -2513,11 +2803,11 @@ targets should add new threads to the thread list themselves in non-stop mode.")
get_current_frame ());
if (debug_infrun && step_through_delay)
fprintf_unfiltered (gdb_stdlog, "infrun: step through delay\n");
- if (step_range_end == 0 && step_through_delay)
+ if (ecs->event_thread->step_range_end == 0 && step_through_delay)
{
/* The user issued a continue when stopped at a breakpoint.
Set up for another trap and get out of here. */
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->stepping_over_breakpoint = 1;
keep_going (ecs);
return;
}
@@ -2529,7 +2819,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
case, don't decide that here, just set
ecs->stepping_over_breakpoint, making sure we
single-step again before breakpoints are re-inserted. */
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->stepping_over_breakpoint = 1;
}
}
@@ -2537,7 +2827,7 @@ targets should add new threads to the thread list themselves in non-stop mode.")
The alternatives are:
1) stop_stepping and return; to really stop and return to the debugger,
2) keep_going and return to start up again
- (set tss->stepping_over_breakpoint to 1 to single step once)
+ (set ecs->event_thread->stepping_over_breakpoint to 1 to single step once)
3) set ecs->random_signal to 1, and the decision between 1 and 2
will be made according to the signal handling tables. */
@@ -2555,16 +2845,16 @@ targets should add new threads to the thread list themselves in non-stop mode.")
If we're doing a displaced step past a breakpoint, then the
breakpoint is always inserted at the original instruction;
non-standard signals can't be explained by the breakpoint. */
- if (stop_signal == TARGET_SIGNAL_TRAP
- || (! stepping_over_breakpoint
+ if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP
+ || (! ecs->event_thread->trap_expected
&& breakpoint_inserted_here_p (stop_pc)
- && (stop_signal == TARGET_SIGNAL_ILL
- || stop_signal == TARGET_SIGNAL_SEGV
- || stop_signal == TARGET_SIGNAL_EMT))
+ && (ecs->event_thread->stop_signal == TARGET_SIGNAL_ILL
+ || ecs->event_thread->stop_signal == TARGET_SIGNAL_SEGV
+ || ecs->event_thread->stop_signal == TARGET_SIGNAL_EMT))
|| stop_soon == STOP_QUIETLY || stop_soon == STOP_QUIETLY_NO_SIGSTOP
|| stop_soon == STOP_QUIETLY_REMOTE)
{
- if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
+ if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stopped\n");
@@ -2594,18 +2884,27 @@ targets should add new threads to the thread list themselves in non-stop mode.")
SIGTRAP. Some systems (e.g. Windows), and stubs supporting
target extended-remote report it instead of a SIGSTOP
(e.g. gdbserver). We already rely on SIGTRAP being our
- signal, so this is no exception. */
+ signal, so this is no exception.
+
+ Also consider that the attach is complete when we see a
+ TARGET_SIGNAL_0. In non-stop mode, GDB will explicitly tell
+ the target to stop all threads of the inferior, in case the
+ low level attach operation doesn't stop them implicitly. If
+ they weren't stopped implicitly, then the stub will report a
+ TARGET_SIGNAL_0, meaning: stopped for no particular reason
+ other than GDB's request. */
if (stop_soon == STOP_QUIETLY_NO_SIGSTOP
- && (stop_signal == TARGET_SIGNAL_STOP
- || stop_signal == TARGET_SIGNAL_TRAP))
+ && (ecs->event_thread->stop_signal == TARGET_SIGNAL_STOP
+ || ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP
+ || ecs->event_thread->stop_signal == TARGET_SIGNAL_0))
{
stop_stepping (ecs);
- stop_signal = TARGET_SIGNAL_0;
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_0;
return;
}
/* See if there is a breakpoint at the current PC. */
- stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
+ ecs->event_thread->stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid);
/* Following in case break condition called a
function. */
@@ -2631,24 +2930,17 @@ targets should add new threads to the thread list themselves in non-stop mode.")
be necessary for call dummies on a non-executable stack on
SPARC. */
- /* When execution direction is reverse or process record target is used,
- maybe GDB will set next resume to step. Then the next step will be
- set to random signal. It will make GDB stop the inferior. So
- When execution direction is reverse or record target is used, not set
- the random signal. */
-
- if (stop_signal == TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP)
ecs->random_signal
- = !(bpstat_explains_signal (stop_bpstat)
- || stepping_over_breakpoint
- || (step_range_end && step_resume_breakpoint == NULL)
- || (execution_direction == EXEC_REVERSE)
- || RECORD_IS_USED);
+ = !(bpstat_explains_signal (ecs->event_thread->stop_bpstat)
+ || ecs->event_thread->trap_expected
+ || (ecs->event_thread->step_range_end
+ && ecs->event_thread->step_resume_breakpoint == NULL));
else
{
- ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
+ ecs->random_signal = !bpstat_explains_signal (ecs->event_thread->stop_bpstat);
if (!ecs->random_signal)
- stop_signal = TARGET_SIGNAL_TRAP;
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_TRAP;
}
}
@@ -2669,17 +2961,23 @@ process_event_stop_test:
int printed = 0;
if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog, "infrun: random signal %d\n", stop_signal);
+ fprintf_unfiltered (gdb_stdlog, "infrun: random signal %d\n",
+ ecs->event_thread->stop_signal);
stopped_by_random_signal = 1;
- if (signal_print[stop_signal])
+ if (signal_print[ecs->event_thread->stop_signal])
{
printed = 1;
target_terminal_ours_for_output ();
- print_stop_reason (SIGNAL_RECEIVED, stop_signal);
+ print_stop_reason (SIGNAL_RECEIVED, ecs->event_thread->stop_signal);
}
- if (signal_stop_state (stop_signal))
+ /* Always stop on signals if we're either just gaining control
+ of the program, or the user explicitly requested this thread
+ to remain stopped. */
+ if (stop_soon != NO_STOP_QUIETLY
+ || ecs->event_thread->stop_requested
+ || signal_stop_state (ecs->event_thread->stop_signal))
{
stop_stepping (ecs);
return;
@@ -2690,12 +2988,12 @@ process_event_stop_test:
target_terminal_inferior ();
/* Clear the signal if it should not be passed. */
- if (signal_program[stop_signal] == 0)
- stop_signal = TARGET_SIGNAL_0;
+ if (signal_program[ecs->event_thread->stop_signal] == 0)
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_0;
- if (prev_pc == read_pc ()
- && stepping_over_breakpoint
- && step_resume_breakpoint == NULL)
+ if (ecs->event_thread->prev_pc == read_pc ()
+ && ecs->event_thread->trap_expected
+ && ecs->event_thread->step_resume_breakpoint == NULL)
{
/* We were just starting a new sequence, attempting to
single-step off of a breakpoint and expecting a SIGTRAP.
@@ -2713,17 +3011,18 @@ process_event_stop_test:
"breakpoint\n");
insert_step_resume_breakpoint_at_frame (get_current_frame ());
- tss->step_after_step_resume_breakpoint = 1;
+ ecs->event_thread->step_after_step_resume_breakpoint = 1;
keep_going (ecs);
return;
}
- if (step_range_end != 0
- && stop_signal != TARGET_SIGNAL_0
- && stop_pc >= step_range_start && stop_pc < step_range_end
+ if (ecs->event_thread->step_range_end != 0
+ && ecs->event_thread->stop_signal != TARGET_SIGNAL_0
+ && (ecs->event_thread->step_range_start <= stop_pc
+ && stop_pc < ecs->event_thread->step_range_end)
&& frame_id_eq (get_frame_id (get_current_frame ()),
- step_frame_id)
- && step_resume_breakpoint == NULL)
+ ecs->event_thread->step_frame_id)
+ && ecs->event_thread->step_resume_breakpoint == NULL)
{
/* The inferior is about to take a signal that will take it
out of the single step range. Set a breakpoint at the
@@ -2759,7 +3058,7 @@ process_event_stop_test:
CORE_ADDR jmp_buf_pc;
struct bpstat_what what;
- what = bpstat_what (stop_bpstat);
+ what = bpstat_what (ecs->event_thread->stop_bpstat);
if (what.call_dummy)
{
@@ -2777,7 +3076,7 @@ process_event_stop_test:
fprintf_unfiltered (gdb_stdlog,
"infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME\n");
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->stepping_over_breakpoint = 1;
if (!gdbarch_get_longjmp_target_p (current_gdbarch)
|| !gdbarch_get_longjmp_target (current_gdbarch,
@@ -2792,8 +3091,7 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
/* We're going to replace the current step-resume breakpoint
with a longjmp-resume breakpoint. */
- if (step_resume_breakpoint != NULL)
- delete_step_resume_breakpoint (&step_resume_breakpoint);
+ delete_step_resume_breakpoint (ecs->event_thread);
/* Insert a breakpoint at resume address. */
insert_longjmp_resume_breakpoint (jmp_buf_pc);
@@ -2806,10 +3104,10 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
fprintf_unfiltered (gdb_stdlog,
"infrun: BPSTAT_WHAT_CLEAR_LONGJMP_RESUME\n");
- gdb_assert (step_resume_breakpoint != NULL);
- delete_step_resume_breakpoint (&step_resume_breakpoint);
+ gdb_assert (ecs->event_thread->step_resume_breakpoint != NULL);
+ delete_step_resume_breakpoint (ecs->event_thread);
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
@@ -2817,7 +3115,7 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
case BPSTAT_WHAT_SINGLE:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_SINGLE\n");
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->stepping_over_breakpoint = 1;
/* Still need to check other stuff, at least the case
where we are stepping and step out of the right range. */
break;
@@ -2845,39 +3143,17 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
return;
case BPSTAT_WHAT_STEP_RESUME:
- /* This proably demands a more elegant solution, but, yeah
- right...
-
- This function's use of the simple variable
- step_resume_breakpoint doesn't seem to accomodate
- simultaneously active step-resume bp's, although the
- breakpoint list certainly can.
-
- If we reach here and step_resume_breakpoint is already
- NULL, then apparently we have multiple active
- step-resume bp's. We'll just delete the breakpoint we
- stopped at, and carry on.
-
- Correction: what the code currently does is delete a
- step-resume bp, but it makes no effort to ensure that
- the one deleted is the one currently stopped at. MVS */
-
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_STEP_RESUME\n");
- if (step_resume_breakpoint == NULL)
- {
- step_resume_breakpoint =
- bpstat_find_step_resume_breakpoint (stop_bpstat);
- }
- delete_step_resume_breakpoint (&step_resume_breakpoint);
- if (tss->step_after_step_resume_breakpoint)
+ delete_step_resume_breakpoint (ecs->event_thread);
+ if (ecs->event_thread->step_after_step_resume_breakpoint)
{
/* Back when the step-resume breakpoint was inserted, we
were trying to single-step off a breakpoint. Go back
to doing that. */
- tss->step_after_step_resume_breakpoint = 0;
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->step_after_step_resume_breakpoint = 0;
+ ecs->event_thread->stepping_over_breakpoint = 1;
keep_going (ecs);
return;
}
@@ -2888,14 +3164,13 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
just hit the step-resume breakpoint at the start
address of the function. Go back to single-stepping,
which should take us back to the function call. */
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->stepping_over_breakpoint = 1;
keep_going (ecs);
return;
}
break;
case BPSTAT_WHAT_CHECK_SHLIBS:
- case BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK:
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_CHECK_SHLIBS\n");
@@ -2936,46 +3211,10 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
stop_stepping (ecs);
return;
}
-
- /* If we stopped due to an explicit catchpoint, then the
- (see above) call to SOLIB_ADD pulled in any symbols
- from a newly-loaded library, if appropriate.
-
- We do want the inferior to stop, but not where it is
- now, which is in the dynamic linker callback. Rather,
- we would like it stop in the user's program, just after
- the call that caused this catchpoint to trigger. That
- gives the user a more useful vantage from which to
- examine their program's state. */
- else if (what.main_action
- == BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK)
- {
- /* ??rehrauer: If I could figure out how to get the
- right return PC from here, we could just set a temp
- breakpoint and resume. I'm not sure we can without
- cracking open the dld's shared libraries and sniffing
- their unwind tables and text/data ranges, and that's
- not a terribly portable notion.
-
- Until that time, we must step the inferior out of the
- dld callback, and also out of the dld itself (and any
- code or stubs in libdld.sl, such as "shl_load" and
- friends) until we reach non-dld code. At that point,
- we can stop stepping. */
- bpstat_get_triggered_catchpoints (stop_bpstat,
- &tss->
- stepping_through_solib_catchpoints);
- tss->stepping_through_solib_after_catch = 1;
-
- /* Be sure to lift all breakpoints, so the inferior does
- actually step past this point... */
- tss->stepping_over_breakpoint = 1;
- break;
- }
else
{
/* We want to step over this breakpoint, then keep going. */
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->stepping_over_breakpoint = 1;
break;
}
}
@@ -2995,10 +3234,47 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
test for stepping. But, if not stepping,
do not stop. */
+ /* In all-stop mode, if we're currently stepping but have stopped in
+ some other thread, we need to switch back to the stepped thread. */
+ if (!non_stop)
+ {
+ struct thread_info *tp;
+ tp = iterate_over_threads (currently_stepping_callback,
+ ecs->event_thread);
+ if (tp)
+ {
+ /* However, if the current thread is blocked on some internal
+ breakpoint, and we simply need to step over that breakpoint
+ to get it going again, do that first. */
+ if ((ecs->event_thread->trap_expected
+ && ecs->event_thread->stop_signal != TARGET_SIGNAL_TRAP)
+ || ecs->event_thread->stepping_over_breakpoint)
+ {
+ keep_going (ecs);
+ return;
+ }
+
+ /* Otherwise, we no longer expect a trap in the current thread.
+ Clear the trap_expected flag before switching back -- this is
+ what keep_going would do as well, if we called it. */
+ ecs->event_thread->trap_expected = 0;
+
+ if (debug_infrun)
+ fprintf_unfiltered (gdb_stdlog,
+ "infrun: switching back to stepped thread\n");
+
+ ecs->event_thread = tp;
+ ecs->ptid = tp->ptid;
+ context_switch (ecs->ptid);
+ keep_going (ecs);
+ return;
+ }
+ }
+
/* Are we stepping to get the inferior out of the dynamic linker's
hook (and possibly the dld itself) after catching a shlib
event? */
- if (tss->stepping_through_solib_after_catch)
+ if (ecs->event_thread->stepping_through_solib_after_catch)
{
#if defined(SOLIB_ADD)
/* Have we reached our destination? If not, keep going. */
@@ -3006,7 +3282,7 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepping in dynamic linker\n");
- tss->stepping_over_breakpoint = 1;
+ ecs->event_thread->stepping_over_breakpoint = 1;
keep_going (ecs);
return;
}
@@ -3015,16 +3291,17 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
fprintf_unfiltered (gdb_stdlog, "infrun: step past dynamic linker\n");
/* Else, stop and report the catchpoint(s) whose triggering
caused us to begin stepping. */
- tss->stepping_through_solib_after_catch = 0;
- bpstat_clear (&stop_bpstat);
- stop_bpstat = bpstat_copy (tss->stepping_through_solib_catchpoints);
- bpstat_clear (&tss->stepping_through_solib_catchpoints);
+ ecs->event_thread->stepping_through_solib_after_catch = 0;
+ bpstat_clear (&ecs->event_thread->stop_bpstat);
+ ecs->event_thread->stop_bpstat
+ = bpstat_copy (ecs->event_thread->stepping_through_solib_catchpoints);
+ bpstat_clear (&ecs->event_thread->stepping_through_solib_catchpoints);
stop_print_frame = 1;
stop_stepping (ecs);
return;
}
- if (step_resume_breakpoint)
+ if (ecs->event_thread->step_resume_breakpoint)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
@@ -3037,7 +3314,7 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
return;
}
- if (step_range_end == 0)
+ if (ecs->event_thread->step_range_end == 0)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: no stepping, continue\n");
@@ -3051,21 +3328,22 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
Note that step_range_end is the address of the first instruction
beyond the step range, and NOT the address of the last instruction
within it! */
- if (stop_pc >= step_range_start && stop_pc < step_range_end)
+ if (stop_pc >= ecs->event_thread->step_range_start
+ && stop_pc < ecs->event_thread->step_range_end)
{
if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog, "infrun: stepping inside range [0x%s-0x%s]\n",
- paddr_nz (step_range_start),
- paddr_nz (step_range_end));
+ fprintf_unfiltered (gdb_stdlog, "infrun: stepping inside range [0x%s-0x%s]\n",
+ paddr_nz (ecs->event_thread->step_range_start),
+ paddr_nz (ecs->event_thread->step_range_end));
/* When stepping backward, stop at beginning of line range
(unless it's the function entry point, in which case
keep going back to the call point). */
- if (stop_pc == step_range_start
+ if (stop_pc == ecs->event_thread->step_range_start
&& stop_pc != ecs->stop_func_start
&& execution_direction == EXEC_REVERSE)
{
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
}
@@ -3081,13 +3359,8 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
loader dynamic symbol resolution code, we keep on single stepping
until we exit the run time loader code and reach the callee's
address. */
- if (step_over_calls == STEP_OVER_UNDEBUGGABLE
-#ifdef IN_SOLIB_DYNSYM_RESOLVE_CODE
- && IN_SOLIB_DYNSYM_RESOLVE_CODE (stop_pc)
-#else
- && in_solib_dynsym_resolve_code (stop_pc)
-#endif
- )
+ if (ecs->event_thread->step_over_calls == STEP_OVER_UNDEBUGGABLE
+ && in_solib_dynsym_resolve_code (stop_pc))
{
CORE_ADDR pc_after_resolver =
gdbarch_skip_solib_resolver (current_gdbarch, stop_pc);
@@ -3110,9 +3383,9 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
return;
}
- if (step_range_end != 1
- && (step_over_calls == STEP_OVER_UNDEBUGGABLE
- || step_over_calls == STEP_OVER_ALL)
+ if (ecs->event_thread->step_range_end != 1
+ && (ecs->event_thread->step_over_calls == STEP_OVER_UNDEBUGGABLE
+ || ecs->event_thread->step_over_calls == STEP_OVER_ALL)
&& get_frame_type (get_current_frame ()) == SIGTRAMP_FRAME)
{
if (debug_infrun)
@@ -3134,17 +3407,21 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
NOTE: frame_id_eq will never report two invalid frame IDs as
being equal, so to get into this block, both the current and
previous frame must have valid frame IDs. */
- if (!frame_id_eq (get_frame_id (get_current_frame ()), step_frame_id)
- && frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id))
+ if (!frame_id_eq (get_frame_id (get_current_frame ()),
+ ecs->event_thread->step_frame_id)
+ && (frame_id_eq (frame_unwind_id (get_current_frame ()),
+ ecs->event_thread->step_frame_id)
+ || execution_direction == EXEC_REVERSE))
{
CORE_ADDR real_stop_pc;
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepped into subroutine\n");
- if ((step_over_calls == STEP_OVER_NONE)
- || ((step_range_end == 1)
- && in_prologue (prev_pc, ecs->stop_func_start)))
+ if ((ecs->event_thread->step_over_calls == STEP_OVER_NONE)
+ || ((ecs->event_thread->step_range_end == 1)
+ && in_prologue (ecs->event_thread->prev_pc,
+ ecs->stop_func_start)))
{
/* I presume that step_over_calls is only 0 when we're
supposed to be stepping at the assembly language level
@@ -3152,13 +3429,13 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
/* Also, maybe we just did a "nexti" inside a prolog, so we
thought it was a subroutine call but it was not. Stop as
well. FENN */
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
}
- if (step_over_calls == STEP_OVER_ALL)
+ if (ecs->event_thread->step_over_calls == STEP_OVER_ALL)
{
/* We're doing a "next".
@@ -3169,32 +3446,30 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
Reverse (backward) execution. set the step-resume
breakpoint at the start of the function that we just
stepped into (backwards), and continue to there. When we
- get there, we'll need to single-step back to the
- caller. */
+ get there, we'll need to single-step back to the caller. */
if (execution_direction == EXEC_REVERSE)
{
- if (ecs->stop_func_start == 0)
- {
- reverse_resume_need_step = 1;
- }
- else
- {
- struct symtab_and_line sr_sal;
- init_sal (&sr_sal);
- sr_sal.pc = ecs->stop_func_start;
- insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
+ struct symtab_and_line sr_sal;
+
+ if (ecs->stop_func_start == 0
+ && in_solib_dynsym_resolve_code (stop_pc))
+ {
+ /* Stepped into runtime loader dynamic symbol
+ resolution code. Since we're in reverse,
+ we have already backed up through the runtime
+ loader and the dynamic function. This is just
+ the trampoline (jump table).
+
+ Just keep stepping, we'll soon be home.
+ */
+ keep_going (ecs);
+ return;
}
- }
- /* If process record target is recording and real running target
- doesn't support record wait, Record target need execute single
- instruction for each step to call funtion "record_message" for
- each instruction. So set "reverse_resume_need_step" to execute
- single step. */
- else if (RECORD_IS_USED && !RECORD_IS_REPLAY
- && !RECORD_TARGET_SUPPORT_RECORD_WAIT)
- {
- reverse_resume_need_step = 1;
+ /* Normal (staticly linked) function call return. */
+ init_sal (&sr_sal);
+ sr_sal.pc = ecs->stop_func_start;
+ insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
}
else
insert_step_resume_breakpoint_at_caller (get_current_frame ());
@@ -3215,13 +3490,7 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
if (real_stop_pc != 0)
ecs->stop_func_start = real_stop_pc;
- if (
-#ifdef IN_SOLIB_DYNSYM_RESOLVE_CODE
- IN_SOLIB_DYNSYM_RESOLVE_CODE (ecs->stop_func_start)
-#else
- in_solib_dynsym_resolve_code (ecs->stop_func_start)
-#endif
-)
+ if (real_stop_pc != 0 && in_solib_dynsym_resolve_code (real_stop_pc))
{
struct symtab_and_line sr_sal;
init_sal (&sr_sal);
@@ -3255,9 +3524,10 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
/* If we have no line number and the step-stop-if-no-debug is
set, we stop the step so that the user has a chance to switch
in assembly mode. */
- if (step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug)
+ if (ecs->event_thread->step_over_calls == STEP_OVER_UNDEBUGGABLE
+ && step_stop_if_no_debug)
{
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
@@ -3267,27 +3537,11 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
{
/* Set a breakpoint at callee's start address.
From there we can step once and be back in the caller. */
- /* FIXME: I'm not sure we've handled the frame for recursion. */
- if (ecs->stop_func_start == 0)
- {
- reverse_resume_need_step = 1;
- }
- else
- {
- struct symtab_and_line sr_sal;
- init_sal (&sr_sal);
- sr_sal.pc = ecs->stop_func_start;
- insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
- }
+ struct symtab_and_line sr_sal;
+ init_sal (&sr_sal);
+ sr_sal.pc = ecs->stop_func_start;
+ insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
}
- /* If process record target is recording and real running target doesn't
- support record wait, process record target need execute single
- instruction for each step to call funtion "record_message" for each
- instruction. So set "reverse_resume_need_step" to execute single
- step. */
- else if (RECORD_IS_USED && !RECORD_IS_REPLAY
- && !RECORD_TARGET_SUPPORT_RECORD_WAIT)
- reverse_resume_need_step = 1;
else
/* Set a breakpoint at callee's return address (the address
at which the caller will resume). */
@@ -3337,26 +3591,13 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
/* NOTE: tausq/2004-05-24: This if block used to be done before all
the trampoline processing logic, however, there are some trampolines
that have no names, so we should do trampoline handling first. */
- if (step_over_calls == STEP_OVER_UNDEBUGGABLE
+ if (ecs->event_thread->step_over_calls == STEP_OVER_UNDEBUGGABLE
&& ecs->stop_func_name == NULL
&& stop_pc_sal.line == 0)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepped into undebuggable function\n");
- /* If process record target is recording and real running target doesn't
- support record wait, process record target need execute single
- instruction for each step to call funtion "record_message" for each
- instruction. So set "reverse_resume_need_step" to execute single
- step. */
- if (RECORD_IS_USED && !RECORD_IS_REPLAY
- && !RECORD_TARGET_SUPPORT_RECORD_WAIT)
- {
- reverse_resume_need_step = 1;
- keep_going (ecs);
- return;
- }
-
/* The inferior just stepped into, or returned to, an
undebuggable function (where there is no debugging information
and no line number corresponding to the address where the
@@ -3371,7 +3612,7 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
/* If we have no line number and the step-stop-if-no-debug
is set, we stop the step so that the user has a chance to
switch in assembly mode. */
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
@@ -3386,13 +3627,13 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
}
}
- if (step_range_end == 1)
+ if (ecs->event_thread->step_range_end == 1)
{
/* It is stepi or nexti. We always want to stop stepping after
one instruction. */
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepi/nexti\n");
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
@@ -3406,110 +3647,15 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
or can this happen as a result of a return or longjmp?). */
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: no line number info\n");
-
- if (execution_direction == EXEC_REVERSE)
- {
- /* Set a breakpoint at callee's start address.
- From there we can step once and be back in the caller. */
- /* FIXME: I'm not sure we've handled the frame for recursion. */
- if (ecs->stop_func_start == 0)
- {
- reverse_resume_need_step = 1;
- }
- else
- {
- struct symtab_and_line sr_sal;
- init_sal (&sr_sal);
- sr_sal.pc = ecs->stop_func_start;
- insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
- }
- keep_going (ecs);
- return;
- }
-
- /* If process record target is recording and real running target doesn't
- support record wait, process record target need execute single
- instruction for each step to call funtion "record_message" for each
- instruction. So set "reverse_resume_need_step" to execute single
- step. */
- if (RECORD_IS_USED && !RECORD_IS_REPLAY
- && !RECORD_TARGET_SUPPORT_RECORD_WAIT)
- {
- reverse_resume_need_step = 1;
- keep_going (ecs);
- return;
- }
-
- stop_step = 1;
- print_stop_reason (END_STEPPING_RANGE, 0);
- stop_stepping (ecs);
- return;
- }
-
- if (execution_direction == EXEC_REVERSE
- && frame_id_eq (get_frame_id (get_current_frame ()),
- step_prev_frame_id))
- {
- if (debug_infrun)
- {
- fprintf_unfiltered (gdb_stdlog,
- "infrun: return to the prev function\n");
- }
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
}
- if (!frame_id_eq (get_frame_id (get_current_frame ()), step_frame_id)
- && (execution_direction == EXEC_REVERSE
- || RECORD_IS_USED))
- {
- if (stop_pc != stop_pc_sal.pc
- && execution_direction == EXEC_REVERSE
- && step_over_calls == STEP_OVER_ALL)
- {
- if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog,
- "infrun: maybe stepped into subroutine\n");
- if (ecs->stop_func_start == 0)
- {
- reverse_resume_need_step = 1;
- }
- else
- {
- struct symtab_and_line sr_sal;
- init_sal (&sr_sal);
- sr_sal.pc = ecs->stop_func_start;
- insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
- }
- keep_going (ecs);
- return;
- }
- }
-#if 0
- if (((stop_pc == stop_pc_sal.pc
- && execution_direction != EXEC_REVERSE)
- || (stop_pc >= stop_pc_sal.pc && stop_pc < stop_pc_sal.end
- && execution_direction == EXEC_REVERSE))
- && (tss->current_line != stop_pc_sal.line
- || tss->current_symtab != stop_pc_sal.symtab))
- {
- /* We are at the start of a different line. So stop. Note that
- we don't stop if we step into the middle of a different line.
- That is said to make things like for (;;) statements work
- better. */
- if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog, "infrun: stepped to a different line\n");
- stop_step = 1;
- print_stop_reason (END_STEPPING_RANGE, 0);
- stop_stepping (ecs);
- return;
- }
-#else
if ((stop_pc == stop_pc_sal.pc)
- && (tss->current_line != stop_pc_sal.line
- || tss->current_symtab != stop_pc_sal.symtab))
+ && (ecs->event_thread->current_line != stop_pc_sal.line
+ || ecs->event_thread->current_symtab != stop_pc_sal.symtab))
{
/* We are at the start of a different line. So stop. Note that
we don't stop if we step into the middle of a different line.
@@ -3517,12 +3663,12 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
better. */
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepped to a different line\n");
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
}
-#endif
+
/* We aren't done stepping.
Optimize by setting the stepping range to the line.
@@ -3530,38 +3676,11 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
new line in mid-statement, we continue stepping. This makes
things like for(;;) statements work better.) */
- step_range_start = stop_pc_sal.pc;
- step_range_end = stop_pc_sal.end;
- step_frame_id = get_frame_id (get_current_frame ());
- tss->current_line = stop_pc_sal.line;
- tss->current_symtab = stop_pc_sal.symtab;
-
- /* In the case where we just stepped out of a function into the
- middle of a line of the caller, continue stepping, but
- step_frame_id must be modified to current frame */
-#if 0
- /* NOTE: cagney/2003-10-16: I think this frame ID inner test is too
- generous. It will trigger on things like a step into a frameless
- stackless leaf function. I think the logic should instead look
- at the unwound frame ID has that should give a more robust
- indication of what happened. */
- if (step - ID == current - ID)
- still stepping in same function;
- else if (step - ID == unwind (current - ID))
- stepped into a function;
- else
- stepped out of a function;
- /* Of course this assumes that the frame ID unwind code is robust
- and we're willing to introduce frame unwind logic into this
- function. Fortunately, those days are nearly upon us. */
-#endif
- {
- struct frame_info *frame = get_current_frame ();
- struct frame_id current_frame = get_frame_id (frame);
- if (!(frame_id_inner (get_frame_arch (frame), current_frame,
- step_frame_id)))
- step_frame_id = current_frame;
- }
+ ecs->event_thread->step_range_start = stop_pc_sal.pc;
+ ecs->event_thread->step_range_end = stop_pc_sal.end;
+ ecs->event_thread->step_frame_id = get_frame_id (get_current_frame ());
+ ecs->event_thread->current_line = stop_pc_sal.line;
+ ecs->event_thread->current_symtab = stop_pc_sal.symtab;
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: keep going\n");
@@ -3571,20 +3690,32 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
/* Are we in the middle of stepping? */
static int
-currently_stepping (struct thread_stepping_state *tss)
+currently_stepping_thread (struct thread_info *tp)
+{
+ return (tp->step_range_end && tp->step_resume_breakpoint == NULL)
+ || tp->trap_expected
+ || tp->stepping_through_solib_after_catch;
+}
+
+static int
+currently_stepping_callback (struct thread_info *tp, void *data)
{
- return (((step_range_end && step_resume_breakpoint == NULL)
- || stepping_over_breakpoint)
- || tss->stepping_through_solib_after_catch
- || bpstat_should_step ()
- || reverse_resume_need_step);
+ /* Return true if any thread *but* the one passed in "data" is
+ in the middle of stepping. */
+ return tp != data && currently_stepping_thread (tp);
+}
+
+static int
+currently_stepping (struct thread_info *tp)
+{
+ return currently_stepping_thread (tp) || bpstat_should_step ();
}
/* Inferior has stepped into a subroutine call with source code that
we should not step over. Do step to the first line of code in
it. */
-
- static void
+
+static void
handle_step_into_function (struct execution_control_state *ecs)
{
struct symtab *s;
@@ -3633,7 +3764,7 @@ handle_step_into_function (struct execution_control_state *ecs)
if (ecs->stop_func_start == stop_pc)
{
/* We are already there: stop now. */
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
return;
@@ -3651,7 +3782,7 @@ handle_step_into_function (struct execution_control_state *ecs)
insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
/* And make sure stepping stops right away then. */
- step_range_end = step_range_start;
+ ecs->event_thread->step_range_end = ecs->event_thread->step_range_start;
}
keep_going (ecs);
}
@@ -3677,7 +3808,7 @@ handle_step_into_function_backward (struct execution_control_state *ecs)
if (stop_func_sal.pc == stop_pc)
{
/* We're there already. Just stop stepping now. */
- stop_step = 1;
+ ecs->event_thread->stop_step = 1;
print_stop_reason (END_STEPPING_RANGE, 0);
stop_stepping (ecs);
}
@@ -3686,8 +3817,8 @@ handle_step_into_function_backward (struct execution_control_state *ecs)
/* Else just reset the step range and keep going.
No step-resume breakpoint, they don't work for
epilogues, which can have multiple entry paths. */
- step_range_start = stop_func_sal.pc;
- step_range_end = stop_func_sal.end;
+ ecs->event_thread->step_range_start = stop_func_sal.pc;
+ ecs->event_thread->step_range_end = stop_func_sal.end;
keep_going (ecs);
}
return;
@@ -3703,15 +3834,15 @@ insert_step_resume_breakpoint_at_sal (struct symtab_and_line sr_sal,
/* There should never be more than one step-resume or longjmp-resume
breakpoint per thread, so we should never be setting a new
step_resume_breakpoint when one is already active. */
- gdb_assert (step_resume_breakpoint == NULL);
+ gdb_assert (inferior_thread ()->step_resume_breakpoint == NULL);
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
"infrun: inserting step-resume breakpoint at 0x%s\n",
paddr_nz (sr_sal.pc));
- step_resume_breakpoint = set_momentary_breakpoint (sr_sal, sr_id,
- bp_step_resume);
+ inferior_thread ()->step_resume_breakpoint
+ = set_momentary_breakpoint (sr_sal, sr_id, bp_step_resume);
}
/* Insert a "step-resume breakpoint" at RETURN_FRAME.pc. This is used
@@ -3780,14 +3911,14 @@ insert_longjmp_resume_breakpoint (CORE_ADDR pc)
/* There should never be more than one step-resume or longjmp-resume
breakpoint per thread, so we should never be setting a new
longjmp_resume_breakpoint when one is already active. */
- gdb_assert (step_resume_breakpoint == NULL);
+ gdb_assert (inferior_thread ()->step_resume_breakpoint == NULL);
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
"infrun: inserting longjmp-resume breakpoint at 0x%s\n",
paddr_nz (pc));
- step_resume_breakpoint =
+ inferior_thread ()->step_resume_breakpoint =
set_momentary_breakpoint_at_pc (pc, bp_longjmp_resume);
}
@@ -3809,17 +3940,19 @@ static void
keep_going (struct execution_control_state *ecs)
{
/* Save the pc before execution, to compare with pc after stop. */
- prev_pc = read_pc (); /* Might have been DECR_AFTER_BREAK */
+ ecs->event_thread->prev_pc = read_pc (); /* Might have been DECR_AFTER_BREAK */
/* If we did not do break;, it means we should keep running the
inferior and not return to debugger. */
- if (stepping_over_breakpoint && stop_signal != TARGET_SIGNAL_TRAP)
+ if (ecs->event_thread->trap_expected
+ && ecs->event_thread->stop_signal != TARGET_SIGNAL_TRAP)
{
/* We took a signal (which we are supposed to pass through to
- the inferior, else we'd have done a break above) and we
- haven't yet gotten our trap. Simply continue. */
- resume (currently_stepping (tss), stop_signal);
+ the inferior, else we'd not get here) and we haven't yet
+ gotten our trap. Simply continue. */
+ resume (currently_stepping (ecs->event_thread),
+ ecs->event_thread->stop_signal);
}
else
{
@@ -3836,7 +3969,7 @@ keep_going (struct execution_control_state *ecs)
already inserted breakpoints. Therefore, we don't
care if breakpoints were already inserted, or not. */
- if (tss->stepping_over_breakpoint)
+ if (ecs->event_thread->stepping_over_breakpoint)
{
if (! use_displaced_stepping (current_gdbarch))
/* Since we can't do a displaced step, we have to remove
@@ -3860,7 +3993,7 @@ keep_going (struct execution_control_state *ecs)
}
}
- stepping_over_breakpoint = tss->stepping_over_breakpoint;
+ ecs->event_thread->trap_expected = ecs->event_thread->stepping_over_breakpoint;
/* Do not deliver SIGNAL_TRAP (except when the user explicitly
specifies that such a signal should be delivered to the
@@ -3874,11 +4007,12 @@ keep_going (struct execution_control_state *ecs)
simulator; the simulator then delivers the hardware
equivalent of a SIGNAL_TRAP to the program being debugged. */
- if (stop_signal == TARGET_SIGNAL_TRAP && !signal_program[stop_signal])
- stop_signal = TARGET_SIGNAL_0;
+ if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP
+ && !signal_program[ecs->event_thread->stop_signal])
+ ecs->event_thread->stop_signal = TARGET_SIGNAL_0;
-
- resume (currently_stepping (tss), stop_signal);
+ resume (currently_stepping (ecs->event_thread),
+ ecs->event_thread->stop_signal);
}
prepare_to_wait (ecs);
@@ -3927,7 +4061,8 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
/* For now print nothing. */
/* Print a message only if not in the middle of doing a "step n"
operation for n > 1 */
- if (!step_multi || !stop_step)
+ if (!inferior_thread ()->step_multi
+ || !inferior_thread ()->stop_step)
if (ui_out_is_mi_like_p (uiout))
ui_out_field_string
(uiout, "reason",
@@ -3978,22 +4113,36 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
return_child_result_value = stop_info;
break;
case SIGNAL_RECEIVED:
- /* Signal received. The signal table tells us to print about
- it. */
+ /* Signal received. The signal table tells us to print about
+ it. */
annotate_signal ();
- ui_out_text (uiout, "\nProgram received signal ");
- annotate_signal_name ();
- if (ui_out_is_mi_like_p (uiout))
- ui_out_field_string
- (uiout, "reason", async_reason_lookup (EXEC_ASYNC_SIGNAL_RECEIVED));
- ui_out_field_string (uiout, "signal-name",
- target_signal_to_name (stop_info));
- annotate_signal_name_end ();
- ui_out_text (uiout, ", ");
- annotate_signal_string ();
- ui_out_field_string (uiout, "signal-meaning",
- target_signal_to_string (stop_info));
- annotate_signal_string_end ();
+
+ if (stop_info == TARGET_SIGNAL_0 && !ui_out_is_mi_like_p (uiout))
+ {
+ struct thread_info *t = inferior_thread ();
+
+ ui_out_text (uiout, "\n[");
+ ui_out_field_string (uiout, "thread-name",
+ target_pid_to_str (t->ptid));
+ ui_out_field_fmt (uiout, "thread-id", "] #%d", t->num);
+ ui_out_text (uiout, " stopped");
+ }
+ else
+ {
+ ui_out_text (uiout, "\nProgram received signal ");
+ annotate_signal_name ();
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string
+ (uiout, "reason", async_reason_lookup (EXEC_ASYNC_SIGNAL_RECEIVED));
+ ui_out_field_string (uiout, "signal-name",
+ target_signal_to_name (stop_info));
+ annotate_signal_name_end ();
+ ui_out_text (uiout, ", ");
+ annotate_signal_string ();
+ ui_out_field_string (uiout, "signal-meaning",
+ target_signal_to_string (stop_info));
+ annotate_signal_string_end ();
+ }
ui_out_text (uiout, ".\n");
break;
case NO_HISTORY:
@@ -4080,7 +4229,11 @@ Further execution is probably impossible.\n"));
/* Don't print a message if in the middle of doing a "step n"
operation for n > 1 */
- if (step_multi && stop_step)
+ if (target_has_execution
+ && last.kind != TARGET_WAITKIND_SIGNALLED
+ && last.kind != TARGET_WAITKIND_EXITED
+ && inferior_thread ()->step_multi
+ && inferior_thread ()->stop_step)
goto done;
target_terminal_ours ();
@@ -4091,17 +4244,12 @@ Further execution is probably impossible.\n"));
if (target_has_stack && !stop_stack_dummy)
set_current_sal_from_frame (get_current_frame (), 1);
- /* Look up the hook_stop and run it (CLI internally handles problem
- of stop_command's pre-hook not existing). */
- if (stop_command)
- catch_errors (hook_stop_stub, stop_command,
- "Error while running hook_stop:\n", RETURN_MASK_ALL);
-
if (!target_has_stack)
- {
+ goto done;
- goto done;
- }
+ if (last.kind == TARGET_WAITKIND_SIGNALLED
+ || last.kind == TARGET_WAITKIND_EXITED)
+ goto done;
/* Select innermost stack frame - i.e., current frame is frame 0,
and current location is based on that.
@@ -4126,8 +4274,9 @@ Further execution is probably impossible.\n"));
int bpstat_ret;
int source_flag;
int do_frame_printing = 1;
+ struct thread_info *tp = inferior_thread ();
- bpstat_ret = bpstat_print (stop_bpstat);
+ bpstat_ret = bpstat_print (tp->stop_bpstat);
switch (bpstat_ret)
{
case PRINT_UNKNOWN:
@@ -4146,8 +4295,8 @@ Further execution is probably impossible.\n"));
/* FIXME: cagney/2002-12-01: Given that a frame ID does
(or should) carry around the function and does (or
should) use that when doing a frame comparison. */
- if (stop_step
- && frame_id_eq (step_frame_id,
+ if (tp->stop_step
+ && frame_id_eq (tp->step_frame_id,
get_frame_id (get_current_frame ()))
&& step_start_function == find_pc_function (stop_pc))
source_flag = SRC_LINE; /* finished step, just print source line */
@@ -4199,7 +4348,7 @@ Further execution is probably impossible.\n"));
/* Save the function value return registers, if we care.
We might be about to restore their previous contents. */
- if (proceed_to_finish)
+ if (inferior_thread ()->proceed_to_finish)
{
/* This should not be necessary. */
if (stop_registers)
@@ -4225,21 +4374,45 @@ Further execution is probably impossible.\n"));
done:
annotate_stopped ();
- if (!suppress_stop_observer && !step_multi)
- observer_notify_normal_stop (stop_bpstat);
- /* Delete the breakpoint we stopped at, if it wants to be deleted.
- Delete any breakpoint that is to be deleted at the next stop. */
- breakpoint_auto_delete (stop_bpstat);
+ if (!suppress_stop_observer
+ && !(target_has_execution
+ && last.kind != TARGET_WAITKIND_SIGNALLED
+ && last.kind != TARGET_WAITKIND_EXITED
+ && inferior_thread ()->step_multi))
+ {
+ if (!ptid_equal (inferior_ptid, null_ptid))
+ observer_notify_normal_stop (inferior_thread ()->stop_bpstat);
+ else
+ observer_notify_normal_stop (NULL);
+ }
- if (target_has_execution
- && last.kind != TARGET_WAITKIND_SIGNALLED
- && last.kind != TARGET_WAITKIND_EXITED)
+ if (target_has_execution)
{
+ if (last.kind != TARGET_WAITKIND_SIGNALLED
+ && last.kind != TARGET_WAITKIND_EXITED)
+ /* Delete the breakpoint we stopped at, if it wants to be deleted.
+ Delete any breakpoint that is to be deleted at the next stop. */
+ breakpoint_auto_delete (inferior_thread ()->stop_bpstat);
+
+ /* Mark the stopped threads accordingly. In all-stop, all
+ threads of all processes are stopped when we get any event
+ reported. In non-stop mode, only the event thread stops. If
+ we're handling a process exit in non-stop mode, there's
+ nothing to do, as threads of the dead process are gone, and
+ threads of any other process were left running. */
if (!non_stop)
- set_running (pid_to_ptid (-1), 0);
- else
+ set_running (minus_one_ptid, 0);
+ else if (last.kind != TARGET_WAITKIND_SIGNALLED
+ && last.kind != TARGET_WAITKIND_EXITED)
set_running (inferior_ptid, 0);
}
+
+ /* Look up the hook_stop and run it (CLI internally handles problem
+ of stop_command's pre-hook not existing). */
+ if (stop_command)
+ catch_errors (hook_stop_stub, stop_command,
+ "Error while running hook_stop:\n", RETURN_MASK_ALL);
+
}
static int
@@ -4252,9 +4425,7 @@ hook_stop_stub (void *cmd)
int
signal_stop_state (int signo)
{
- /* Always stop on signals if we're just gaining control of the
- program. */
- return signal_stop[signo] || stop_soon != NO_STOP_QUIETLY;
+ return signal_stop[signo];
}
int
@@ -4344,11 +4515,7 @@ handle_command (char *args, int from_tty)
/* Break the command line up into args. */
- argv = buildargv (args);
- if (argv == NULL)
- {
- nomem (0);
- }
+ argv = gdb_buildargv (args);
old_chain = make_cleanup_freeargv (argv);
/* Walk through the args, looking for signal oursigs, signal names, and
@@ -4505,13 +4672,12 @@ xdb_handle_command (char *args, int from_tty)
char **argv;
struct cleanup *old_chain;
+ if (args == NULL)
+ error_no_arg (_("xdb command"));
+
/* Break the command line up into args. */
- argv = buildargv (args);
- if (argv == NULL)
- {
- nomem (0);
- }
+ argv = gdb_buildargv (args);
old_chain = make_cleanup_freeargv (argv);
if (argv[1] != (char *) NULL)
{
@@ -4637,16 +4803,6 @@ struct inferior_status
int proceed_to_finish;
};
-void
-write_inferior_status_register (struct inferior_status *inf_status, int regno,
- LONGEST val)
-{
- int size = register_size (current_gdbarch, regno);
- void *buf = alloca (size);
- store_signed_integer (buf, size, val);
- regcache_raw_write (inf_status->registers, regno, buf);
-}
-
/* Save all of the information associated with the inferior<==>gdb
connection. INF_STATUS is a pointer to a "struct inferior_status"
(defined in inferior.h). */
@@ -4655,28 +4811,30 @@ struct inferior_status *
save_inferior_status (int restore_stack_info)
{
struct inferior_status *inf_status = XMALLOC (struct inferior_status);
+ struct thread_info *tp = inferior_thread ();
+ struct inferior *inf = current_inferior ();
- inf_status->stop_signal = stop_signal;
+ inf_status->stop_signal = tp->stop_signal;
inf_status->stop_pc = stop_pc;
- inf_status->stop_step = stop_step;
+ inf_status->stop_step = tp->stop_step;
inf_status->stop_stack_dummy = stop_stack_dummy;
inf_status->stopped_by_random_signal = stopped_by_random_signal;
- inf_status->stepping_over_breakpoint = stepping_over_breakpoint;
- inf_status->step_range_start = step_range_start;
- inf_status->step_range_end = step_range_end;
- inf_status->step_frame_id = step_frame_id;
- inf_status->step_over_calls = step_over_calls;
+ inf_status->stepping_over_breakpoint = tp->trap_expected;
+ inf_status->step_range_start = tp->step_range_start;
+ inf_status->step_range_end = tp->step_range_end;
+ inf_status->step_frame_id = tp->step_frame_id;
+ inf_status->step_over_calls = tp->step_over_calls;
inf_status->stop_after_trap = stop_after_trap;
- inf_status->stop_soon = stop_soon;
+ inf_status->stop_soon = inf->stop_soon;
/* Save original bpstat chain here; replace it with copy of chain.
If caller's caller is walking the chain, they'll be happier if we
hand them back the original chain when restore_inferior_status is
called. */
- inf_status->stop_bpstat = stop_bpstat;
- stop_bpstat = bpstat_copy (stop_bpstat);
+ inf_status->stop_bpstat = tp->stop_bpstat;
+ tp->stop_bpstat = bpstat_copy (tp->stop_bpstat);
inf_status->breakpoint_proceeded = breakpoint_proceeded;
inf_status->restore_stack_info = restore_stack_info;
- inf_status->proceed_to_finish = proceed_to_finish;
+ inf_status->proceed_to_finish = tp->proceed_to_finish;
inf_status->registers = regcache_dup (get_current_regcache ());
@@ -4708,22 +4866,25 @@ restore_selected_frame (void *args)
void
restore_inferior_status (struct inferior_status *inf_status)
{
- stop_signal = inf_status->stop_signal;
+ struct thread_info *tp = inferior_thread ();
+ struct inferior *inf = current_inferior ();
+
+ tp->stop_signal = inf_status->stop_signal;
stop_pc = inf_status->stop_pc;
- stop_step = inf_status->stop_step;
+ tp->stop_step = inf_status->stop_step;
stop_stack_dummy = inf_status->stop_stack_dummy;
stopped_by_random_signal = inf_status->stopped_by_random_signal;
- stepping_over_breakpoint = inf_status->stepping_over_breakpoint;
- step_range_start = inf_status->step_range_start;
- step_range_end = inf_status->step_range_end;
- step_frame_id = inf_status->step_frame_id;
- step_over_calls = inf_status->step_over_calls;
+ tp->trap_expected = inf_status->stepping_over_breakpoint;
+ tp->step_range_start = inf_status->step_range_start;
+ tp->step_range_end = inf_status->step_range_end;
+ tp->step_frame_id = inf_status->step_frame_id;
+ tp->step_over_calls = inf_status->step_over_calls;
stop_after_trap = inf_status->stop_after_trap;
- stop_soon = inf_status->stop_soon;
- bpstat_clear (&stop_bpstat);
- stop_bpstat = inf_status->stop_bpstat;
+ inf->stop_soon = inf_status->stop_soon;
+ bpstat_clear (&tp->stop_bpstat);
+ tp->stop_bpstat = inf_status->stop_bpstat;
breakpoint_proceeded = inf_status->breakpoint_proceeded;
- proceed_to_finish = inf_status->proceed_to_finish;
+ tp->proceed_to_finish = inf_status->proceed_to_finish;
/* The inferior can be gone if the user types "print exit(0)"
(and perhaps other times). */
@@ -4890,6 +5051,19 @@ ptid_equal (ptid_t ptid1, ptid_t ptid2)
&& ptid1.tid == ptid2.tid);
}
+/* Returns true if PTID represents a process. */
+
+int
+ptid_is_pid (ptid_t ptid)
+{
+ if (ptid_equal (minus_one_ptid, ptid))
+ return 0;
+ if (ptid_equal (null_ptid, ptid))
+ return 0;
+
+ return (ptid_get_lwp (ptid) == 0 && ptid_get_tid (ptid) == 0);
+}
+
/* restore_inferior_ptid() will be used by the cleanup machinery
to restore the inferior_ptid value saved in a call to
save_inferior_ptid(). */
@@ -5180,16 +5354,20 @@ function is skipped and the step command stops at a different source line."),
show_step_stop_if_no_debug,
&setlist, &showlist);
- add_setshow_boolean_cmd ("can-use-displaced-stepping", class_maintenance,
- &can_use_displaced_stepping, _("\
+ add_setshow_enum_cmd ("displaced-stepping", class_run,
+ can_use_displaced_stepping_enum,
+ &can_use_displaced_stepping, _("\
Set debugger's willingness to use displaced stepping."), _("\
Show debugger's willingness to use displaced stepping."), _("\
-If zero, gdb will not use displaced stepping to step over\n\
-breakpoints, even if such is supported by the target."),
- NULL,
- show_can_use_displaced_stepping,
- &maintenance_set_cmdlist,
- &maintenance_show_cmdlist);
+If on, gdb will use displaced stepping to step over breakpoints if it is\n\
+supported by the target architecture. If off, gdb will not use displaced\n\
+stepping to step over breakpoints, even if such is supported by the target\n\
+architecture. If auto (which is the default), gdb will use displaced stepping\n\
+if the target architecture supports it and non-stop mode is active, but will not\n\
+use it in all-stop mode (see help set non-stop)."),
+ NULL,
+ show_can_use_displaced_stepping,
+ &setlist, &showlist);
add_setshow_enum_cmd ("exec-direction", class_run, exec_direction_names,
&exec_direction, _("Set direction of execution.\n\
@@ -5205,4 +5383,7 @@ Options are 'forward' or 'reverse'."),
inferior_ptid = null_ptid;
target_last_wait_ptid = minus_one_ptid;
displaced_step_ptid = null_ptid;
+
+ observer_attach_thread_ptid_changed (infrun_thread_ptid_changed);
+ observer_attach_thread_stop_requested (infrun_thread_stop_requested);
}
diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index a38877863a2..b5dae5025fb 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -81,7 +81,13 @@
#define RECORD_Q_XGETQSTAT (('5'<<8)+(5))
#define RECORD_Q_XGETQUOTA (('3'<<8)+(3))
-/* Record the values of the registers and memory that will be changed in
+/* When the architecture process record get a Linux syscall instruction, it
+ will get a Linux syscall number of this architecture and convert it to the
+ Linux syscall number "num" which is internal to GDB.
+ Most Linux syscalls across architectures in Linux would be similar and
+ mostly differ by sizes of types and structures. This sizes are put
+ to "tdep".
+ Record the values of the registers and memory that will be changed in
current system call.
Return -1 if something wrong. */
@@ -103,7 +109,7 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
target_terminal_ours ();
q =
yquery (_
- ("The next instruction is syscall exit. It will make the program exit. Do you want to stop the program."));
+ ("The next instruction is syscall exit. It will make the program exit. Do you want to stop the program?"));
target_terminal_inferior ();
if (q)
{
@@ -408,13 +414,13 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
else if (tmpu32 == tdep->ioctl_TIOCSERGSTRUCT)
{
printf_unfiltered (_
- ("Record: record and reverse target doesn't support ioctl request TIOCSERGSTRUCT\n"));
+ ("Process record and replay target doesn't support ioctl request TIOCSERGSTRUCT\n"));
return (1);
}
else
{
printf_unfiltered (_
- ("Record: record and reverse target doesn't support ioctl request 0x%08x.\n"),
+ ("Process record and replay target doesn't support ioctl request 0x%08x.\n"),
tmpu32);
return (1);
}
@@ -571,22 +577,13 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
/* old_select */
case 82:
{
- /*
- struct sel_arg_struct {
- unsigned long n;
- fd_set *inp;
- fd_set *outp;
- fd_set *exp;
- struct timeval *tvp;
- };
- */
struct sel_arg_struct
{
- uint32_t n;
- uint32_t inp;
- uint32_t outp;
- uint32_t exp;
- uint32_t tvp;
+ CORE_ADDR n;
+ CORE_ADDR inp;
+ CORE_ADDR outp;
+ CORE_ADDR exp;
+ CORE_ADDR tvp;
} sel;
regcache_raw_read (record_regcache, tdep->arg1,
@@ -595,9 +592,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
{
if (target_read_memory (tmpu32, (gdb_byte *) & sel, sizeof (sel)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (tmpu32), (unsigned long) sizeof (sel));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (tmpu32), sizeof (sel));
+ }
return (-1);
}
if (record_arch_list_add_mem (sel.inp, tdep->size_fd_set))
@@ -651,7 +651,7 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
target_terminal_ours ();
q =
yquery (_
- ("The next instruction is syscall reboot. It will restart the computer. Do you want to stop the program."));
+ ("The next instruction is syscall reboot. It will restart the computer. Do you want to stop the program?"));
target_terminal_inferior ();
if (q)
{
@@ -685,7 +685,7 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
target_terminal_ours ();
q =
yquery (_
- ("The next instruction is syscall munmap. It will free the memory addr = 0x%s len = %d. It will make record target get error. Do you want to stop the program."),
+ ("The next instruction is syscall munmap. It will free the memory addr = 0x%s len = %d. It will make record target get error. Do you want to stop the program?"),
paddr_nz (tmpu32), len);
target_terminal_inferior ();
if (q)
@@ -747,9 +747,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
{
if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (tmpu32), (unsigned long) sizeof (a));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (tmpu32), sizeof (a));
+ }
return (-1);
}
if (record_arch_list_add_mem (a[1], tdep->size_sockaddr))
@@ -773,9 +776,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
{
if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (tmpu32), (unsigned long) sizeof (a));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (tmpu32), sizeof (a));
+ }
return (-1);
}
if (record_arch_list_add_mem (a[3], tdep->size_int))
@@ -797,9 +803,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
{
if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (tmpu32), (unsigned long) sizeof (a));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (tmpu32), sizeof (a));
+ }
return (-1);
}
if (a[2])
@@ -807,9 +816,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
if (target_read_memory
(a[2], (gdb_byte *) & (a[2]), sizeof (a[2])))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (a[2]), (unsigned long) sizeof (a[2]));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (a[2]), sizeof (a[2]));
+ }
return (-1);
}
if (record_arch_list_add_mem (a[1], a[2]))
@@ -829,9 +841,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
{
if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (tmpu32), (unsigned long) sizeof (a));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (tmpu32), sizeof (a));
+ }
return (-1);
}
if (a[2])
@@ -839,9 +854,13 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
if (target_read_memory
(a[2], (gdb_byte *) & (a[2]), sizeof (a[2])))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (a[2]), (unsigned long) sizeof (a[2]));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (a[2]),
+ sizeof (a[2]));
+ }
return (-1);
}
if (record_arch_list_add_mem (a[1], a[2]))
@@ -874,9 +893,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
{
if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (tmpu32), (unsigned long) sizeof (a));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (tmpu32), sizeof (a));
+ }
return (-1);
}
if (a[4])
@@ -884,9 +906,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
if (target_read_memory
(a[4], (gdb_byte *) & av, sizeof (av)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (a[4]), (unsigned long) sizeof (av));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (a[4]), sizeof (av));
+ }
return (-1);
}
if (record_arch_list_add_mem (a[3], av))
@@ -928,9 +953,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
{
if (target_read_memory (tmpu32, (gdb_byte *) a, sizeof (a)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (tmpu32), (unsigned long) sizeof (a));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (tmpu32), sizeof (a));
+ }
return (-1);
}
if (record_arch_list_add_mem (a[1], tdep->size_msghdr))
@@ -942,9 +970,13 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
if (target_read_memory
(a[1], (gdb_byte *) & rec, sizeof (rec)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (a[1]), (unsigned long) sizeof (rec));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (a[1]),
+ sizeof (rec));
+ }
return (-1);
}
if (record_arch_list_add_mem
@@ -965,10 +997,14 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
(rec.msg_iov, (gdb_byte *) & iov,
sizeof (iov)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (rec.msg_iov),
- (unsigned long) sizeof (iov));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (rec.
+ msg_iov),
+ sizeof (iov));
+ }
return (-1);
}
if (record_arch_list_add_mem
@@ -985,7 +1021,7 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
break;
default:
printf_unfiltered (_
- ("Record: record and reverse function doesn't support socketcall call 0x%08x\n"),
+ ("Process record and replay target doesn't support socketcall call 0x%08x\n"),
tmpu32);
return (-1);
break;
@@ -1333,10 +1369,13 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
if (target_read_memory
(vec, (gdb_byte *) & iov, sizeof (struct record_iovec)))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %lu error.\n",
- paddr_nz (vec),
- (unsigned long) sizeof (struct record_iovec));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (vec),
+ sizeof (struct record_iovec));
+ }
return (-1);
}
if (record_arch_list_add_mem (iov.iov_base, iov.iov_len))
@@ -1971,9 +2010,12 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
if (target_read_memory
(tmpu32, (gdb_byte *) iocbp, nr * tdep->size_int))
{
- fprintf_unfiltered (gdb_stdlog,
- "Record: read memory addr = 0x%s len = %d error.\n",
- paddr_nz (tmpu32), nr * tdep->size_int);
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (tmpu32), nr * tdep->size_int);
+ }
return (-1);
}
for (i = 0; i < nr; i++)
@@ -2008,7 +2050,7 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
target_terminal_ours ();
q =
yquery (_
- ("The next instruction is syscall exit_group. It will make the program exit. Do you want to stop the program."));
+ ("The next instruction is syscall exit_group. It will make the program exit. Do you want to stop the program?"));
target_terminal_inferior ();
if (q)
{
@@ -2455,7 +2497,7 @@ record_linux_system_call (int num, linux_record_tdep_t * tdep)
default:
printf_unfiltered (_
- ("Record: record and reverse function doesn't support syscall number 0x%08x\n"),
+ ("Process record and replay target doesn't support syscall number 0x%08x\n"),
tmpu32);
return (-1);
break;
diff --git a/gdb/linux-record.h b/gdb/linux-record.h
index d526a4fe4d9..b0dd0487d98 100644
--- a/gdb/linux-record.h
+++ b/gdb/linux-record.h
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -22,7 +22,7 @@
typedef struct linux_record_tdep_s
{
- /* The size of the type that will be use in system call. */
+ /* The size of the type that will be use in system call. */
int size__old_kernel_stat;
int size_tms;
int size_loff_t;
@@ -91,7 +91,7 @@ typedef struct linux_record_tdep_s
int size_serial_icounter_struct;
int size_hayes_esp_config;
- /* the values of the second argument of system call "sys_ioctl". */
+ /* the values of the second argument of system call "sys_ioctl". */
int ioctl_TCGETS;
int ioctl_TCSETS;
int ioctl_TCSETSW;
@@ -158,7 +158,7 @@ typedef struct linux_record_tdep_s
int ioctl_TIOCSHAYESESP;
int ioctl_FIOQSIZE;
- /* The number of the registers that use to be the arguments of system call. */
+ /* The number of the registers that use to be the arguments of system call. */
int arg1;
int arg2;
int arg3;
diff --git a/gdb/record.c b/gdb/record.c
index 9c09d3578bd..8e2d13df98d 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -37,13 +37,14 @@ record_t *record_arch_list_head = NULL;
record_t *record_arch_list_tail = NULL;
struct regcache *record_regcache = NULL;
-/* 0 ask user. 1 auto delete the last record_t. */
-static int record_insn_max_mode = 0;
+/* 1 ask user. 0 auto delete the last record_t. */
+static int record_stop_at_limit = 1;
static int record_insn_max_num = DEFAULT_RECORD_INSN_MAX_NUM;
static int record_insn_num = 0;
struct target_ops record_ops;
-int record_resume_step = 0;
+static int record_resume_step = 0;
+static enum target_signal record_resume_siggnal;
static int record_get_sig = 0;
static sigset_t record_maskall;
static int record_not_record = 0;
@@ -194,7 +195,7 @@ record_arch_list_add_reg (int num)
if (record_debug > 1)
{
fprintf_unfiltered (gdb_stdlog,
- "Process record: add register num = %d to record list.\n",
+ "Process record: add register num = %d to record list.\n",
num);
}
@@ -242,9 +243,12 @@ record_arch_list_add_mem (CORE_ADDR addr, int len)
if (target_read_memory (addr, rec->u.mem.val, len))
{
- fprintf_unfiltered (gdb_stdlog,
- "Process record: read memory addr = 0x%s len = %d error.\n",
- paddr_nz (addr), len);
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: error reading memory at addr = 0x%s len = %d.\n",
+ paddr_nz (addr), len);
+ }
xfree (rec->u.mem.val);
xfree (rec);
return (-1);
@@ -288,22 +292,22 @@ record_check_insn_num (int set_terminal)
gdb_assert (record_insn_num <= record_insn_max_num);
if (record_insn_num == record_insn_max_num)
{
- /* Ask user how to do */
- if (!record_insn_max_mode)
+ /* Ask user what to do */
+ if (record_stop_at_limit)
{
int q;
if (set_terminal)
target_terminal_ours ();
- q = yquery (_("The record instruction number (record-insn-number) is equal to record-insn-number-max. Do you want to open auto delete first record_t function (record-auto-delete)?"));
+ q = yquery (_("Do you want to auto delete previous execute log entries when record/replay buffer becomes full (record-stop-at-limit)?"));
if (set_terminal)
target_terminal_inferior ();
if (q)
{
- record_insn_max_mode = 1;
+ record_stop_at_limit = 0;
}
else
{
- error (_("Process record: record stop the program."));
+ error (_("Process record: inferior program stopped."));
}
}
}
@@ -312,9 +316,9 @@ record_check_insn_num (int set_terminal)
/* Before inferior step (when GDB record the running message, inferior
only can step), GDB will call this function to record the values to
- record_list. This function will call gdbarch_record to record the
- running message of inferior and set them to record_arch_list, and
- add it to record_list. */
+ record_list. This function will call gdbarch_process_record to
+ record the running message of inferior and set them to
+ record_arch_list, and add it to record_list. */
static void
record_message_cleanups (void *ignore)
@@ -335,15 +339,14 @@ record_message (struct gdbarch *gdbarch)
record_arch_list_head = NULL;
record_arch_list_tail = NULL;
-
record_regcache = get_current_regcache ();
- ret = gdbarch_record (gdbarch, regcache_read_pc (record_regcache));
-
+ ret = gdbarch_process_record (gdbarch,
+ regcache_read_pc (record_regcache));
if (ret > 0)
- error (_("Process record pause the program."));
+ error (_("Process record: inferior program stopped."));
if (ret < 0)
- error (_("Process record record message error."));
+ error (_("Process record: failed to record execution log."));
discard_cleanups (old_cleanups);
@@ -391,23 +394,23 @@ record_open (char *name, int from_tty)
}
if (non_stop)
{
- error (_("Process record can't debug inferior in non-stop mode (non-stop)."));
+ error (_("Process record target can't debug inferior in non-stop mode (non-stop)."));
}
- if (target_can_async_p ())
+ if (target_async_permitted)
{
- error (_("Process record can't debug the GNU/Linux inferior in asynchronous mode (linux-async)."));
+ error (_("Process record target can't debug inferior in asynchronous mode (target-async)."));
}
- if (!gdbarch_record_p (current_gdbarch))
+ if (!gdbarch_process_record_p (current_gdbarch))
{
error (_("Process record: the current architecture doesn't support record function."));
}
- /* Check if process record target is already running */
+ /* Check if record target is already running */
if (RECORD_IS_USED)
{
if (!nquery
- (_("Process record target already running, do you want delete the old record log?")))
+ (_("Process record target already running, do you want to delete the old record log?")))
{
return;
}
@@ -435,6 +438,7 @@ static void
record_resume (ptid_t ptid, int step, enum target_signal siggnal)
{
record_resume_step = step;
+ record_resume_siggnal = siggnal;
if (!RECORD_IS_REPLAY)
{
@@ -488,7 +492,121 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
if (!RECORD_IS_REPLAY)
{
- return record_beneath_to_wait (ptid, status);
+ if (record_resume_step)
+ {
+ /* This is a single step. */
+ return record_beneath_to_wait (ptid, status);
+ }
+ else
+ {
+ if (record_resume_step)
+ {
+ /* This is a single step. */
+ return record_beneath_to_wait (ptid, status);
+ }
+ else
+ {
+ /* This is not a single step. */
+ ptid_t ret;
+ int is_breakpoint = 1;
+ CORE_ADDR pc;
+ int pc_is_read = 0;
+ struct bp_location *bl;
+ struct breakpoint *b;
+
+ do
+ {
+ ret = record_beneath_to_wait (ptid, status);
+
+ if (status->kind == TARGET_WAITKIND_STOPPED
+ && status->value.sig == TARGET_SIGNAL_TRAP)
+ {
+ /* Check if there is a breakpoint. */
+ pc_is_read = 0;
+ registers_changed ();
+ for (bl = bp_location_chain; bl; bl = bl->global_next)
+ {
+ b = bl->owner;
+ gdb_assert (b);
+ if (b->enable_state != bp_enabled
+ && b->enable_state != bp_permanent)
+ continue;
+ if (!pc_is_read)
+ {
+ pc =
+ regcache_read_pc (get_thread_regcache (ret));
+ pc_is_read = 1;
+ }
+ switch (b->type)
+ {
+ default:
+ if (bl->address == pc)
+ {
+ goto breakpoint;
+ }
+ break;
+
+ case bp_watchpoint:
+ /*XXX teawater: I still not very clear how to deal with it. */
+ goto breakpoint;
+ break;
+
+ case bp_catchpoint:
+ gdb_assert (b->ops != NULL
+ && b->ops->breakpoint_hit != NULL);
+ if (b->ops->breakpoint_hit (b))
+ {
+ goto breakpoint;
+ }
+ break;
+
+ case bp_hardware_watchpoint:
+ case bp_read_watchpoint:
+ case bp_access_watchpoint:
+ if (STOPPED_BY_WATCHPOINT (0))
+ {
+ goto breakpoint;
+ }
+ break;
+ }
+ }
+
+ /* There is not a breakpoint. */
+ record_message (current_gdbarch);
+ record_beneath_to_resume (ptid, 1,
+ record_resume_siggnal);
+ continue;
+ }
+
+ is_breakpoint = 0;
+
+ breakpoint:
+ /* Add gdbarch_decr_pc_after_break to pc because pc will
+ be break at address add gdbarch_decr_pc_after_break
+ when inferior non-step execute. */
+ if (is_breakpoint)
+ {
+ CORE_ADDR decr_pc_after_break =
+ gdbarch_decr_pc_after_break (current_gdbarch);
+ if (decr_pc_after_break)
+ {
+ if (!pc_is_read)
+ {
+ pc =
+ regcache_read_pc (get_thread_regcache (ret));
+ }
+ regcache_write_pc (get_thread_regcache (ret),
+ pc + decr_pc_after_break);
+ }
+ }
+
+ break;
+ }
+ while (1);
+
+ return ret;
+ }
+ }
}
else
{
@@ -498,6 +616,33 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
int continue_flag = 1;
int first_record_end = 1;
struct cleanup *old_cleanups = make_cleanup (record_wait_cleanups, 0);
+ CORE_ADDR tmp_pc;
+
+ status->kind = TARGET_WAITKIND_STOPPED;
+
+ /* Check breakpoint when forward execute. */
+ if (execution_direction == EXEC_FORWARD)
+ {
+ tmp_pc = regcache_read_pc (regcache);
+ if (breakpoint_inserted_here_p (tmp_pc))
+ {
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: break at 0x%s.\n",
+ paddr_nz (tmp_pc));
+ }
+ if (gdbarch_decr_pc_after_break (get_regcache_arch (regcache))
+ && !record_resume_step)
+ {
+ regcache_write_pc (regcache,
+ tmp_pc +
+ gdbarch_decr_pc_after_break
+ (get_regcache_arch (regcache)));
+ }
+ goto replay_out;
+ }
+ }
record_get_sig = 0;
act.sa_handler = record_sig_handler;
@@ -505,10 +650,10 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
act.sa_flags = SA_RESTART;
if (sigaction (SIGINT, &act, &old_act))
{
- perror_with_name (_("Process record: sigaction"));
+ perror_with_name (_("Process record: sigaction failed"));
}
/* If GDB is in terminal_inferior, it will not get the signal.
- And in GDB replay mode, GDB don't need to in terminal_inferior
+ And in GDB replay mode, GDB doesn't need to in terminal_inferior
because inferior will not executed.
Then set it to terminal_ours to make GDB get the signal. */
target_terminal_ours ();
@@ -522,11 +667,10 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
/* Loop over the record_list, looking for the next place to
stop. */
- status->kind = TARGET_WAITKIND_STOPPED;
do
{
/* Check for beginning and end of log. */
- if (execution_direction == EXEC_REVERSE
+ if (execution_direction == EXEC_REVERSE
&& record_list == &record_first)
{
/* Hit beginning of record log in reverse. */
@@ -572,7 +716,7 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
if (target_read_memory
(record_list->u.mem.addr, mem, record_list->u.mem.len))
{
- error (_("Process record: read memory addr = 0x%s len = %d error."),
+ error (_("Process record: error reading memory at addr = 0x%s len = %d."),
paddr_nz (record_list->u.mem.addr),
record_list->u.mem.len);
}
@@ -581,7 +725,7 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
record_list->u.mem.len))
{
error (_
- ("Process record: write memory addr = 0x%s len = %d error."),
+ ("Process record: error writing memory at addr = 0x%s len = %d."),
paddr_nz (record_list->u.mem.addr),
record_list->u.mem.len);
}
@@ -589,10 +733,6 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
}
else
{
- CORE_ADDR tmp_pc;
- struct bp_location *bl;
- struct breakpoint *b;
-
if (record_debug > 1)
{
fprintf_unfiltered (gdb_stdlog,
@@ -607,13 +747,13 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
}
if (need_dasm)
{
- gdbarch_record_dasm (current_gdbarch);
+ gdbarch_process_record_dasm (current_gdbarch);
}
if (first_record_end && execution_direction == EXEC_REVERSE)
{
/* When reverse excute, the first record_end is the part of
- current instruction. */
+ current instruction. */
first_record_end = 0;
}
else
@@ -633,35 +773,25 @@ record_wait (ptid_t ptid, struct target_waitstatus *status)
}
/* check breakpoint */
- tmp_pc = read_pc ();
- for (bl = bp_location_chain; bl; bl = bl->global_next)
+ tmp_pc = regcache_read_pc (regcache);
+ if (breakpoint_inserted_here_p (tmp_pc))
{
- b = bl->owner;
- gdb_assert (b);
- if (b->enable_state != bp_enabled
- && b->enable_state != bp_permanent)
- continue;
-
- if (b->type == bp_watchpoint || b->type == bp_catch_fork
- || b->type == bp_catch_vfork
- || b->type == bp_catch_exec
- || b->type == bp_hardware_watchpoint
- || b->type == bp_read_watchpoint
- || b->type == bp_access_watchpoint)
- {
- continue;
- }
- if (bl->address == tmp_pc)
+ if (record_debug)
{
- if (record_debug)
- {
- fprintf_unfiltered (gdb_stdlog,
- "Process record: break at 0x%s.\n",
- paddr_nz (tmp_pc));
- }
- continue_flag = 0;
- break;
+ fprintf_unfiltered (gdb_stdlog,
+ "Process record: break at 0x%s.\n",
+ paddr_nz (tmp_pc));
}
+ if (gdbarch_decr_pc_after_break (get_regcache_arch (regcache))
+ && execution_direction == EXEC_FORWARD
+ && !record_resume_step)
+ {
+ regcache_write_pc (regcache,
+ tmp_pc +
+ gdbarch_decr_pc_after_break
+ (get_regcache_arch (regcache)));
+ }
+ continue_flag = 0;
}
}
if (execution_direction == EXEC_REVERSE)
@@ -689,9 +819,10 @@ next:
if (sigaction (SIGALRM, &old_act, NULL))
{
- perror_with_name (_("Process record: sigaction"));
+ perror_with_name (_("Process record: sigaction failed"));
}
+replay_out:
if (record_get_sig)
{
status->value.sig = TARGET_SIGNAL_INT;
@@ -719,7 +850,7 @@ record_disconnect (struct target_ops *target, char *args, int from_tty)
}
static void
-record_detach (char *args, int from_tty)
+record_detach (struct target_ops *ops, char *args, int from_tty)
{
if (record_debug)
{
@@ -730,7 +861,7 @@ record_detach (char *args, int from_tty)
}
static void
-record_mourn_inferior (void)
+record_mourn_inferior (struct target_ops *ops)
{
if (record_debug)
{
@@ -772,7 +903,7 @@ record_registers_change (struct regcache *regcache, int regnum)
if (record_arch_list_add_reg (i))
{
record_list_release (record_arch_list_tail);
- error (_("Process record: record message error."));
+ error (_("Process record: failed to record execution log."));
}
}
}
@@ -781,13 +912,13 @@ record_registers_change (struct regcache *regcache, int regnum)
if (record_arch_list_add_reg (regnum))
{
record_list_release (record_arch_list_tail);
- error (_("Process record: record message error."));
+ error (_("Process record: failed to record execution log."));
}
}
if (record_arch_list_add_end (0))
{
record_list_release (record_arch_list_tail);
- error (_("Process record: record message error."));
+ error (_("Process record: failed to record execution log."));
}
record_list->next = record_arch_list_head;
record_arch_list_head->prev = record_list;
@@ -818,13 +949,13 @@ record_store_registers (struct regcache *regcache, int regno)
{
n =
nquery (_
- ("Becuse GDB is in replay mode, changing the value of a register will destroy the record from this point forward. Change all register?"));
+ ("Becuse GDB is in replay mode, changing the value of a register will make the execute log unusable from this point onward. Change all register?"));
}
else
{
n =
nquery (_
- ("Becuse GDB is in replay mode, changing the value of a register will destroy the record from this point forward. Change register %s?"),
+ ("Becuse GDB is in replay mode, changing the value of a register will make the execute log unusable from this point onward. Change register %s?"),
gdbarch_register_name (get_regcache_arch (regcache),
regno));
}
@@ -832,7 +963,7 @@ record_store_registers (struct regcache *regcache, int regno)
if (!n)
{
/* Invalidate the value of regcache that set in function
- "regcache_raw_write". */
+ "regcache_raw_write". */
if (regno < 0)
{
int i;
@@ -848,7 +979,7 @@ record_store_registers (struct regcache *regcache, int regno)
regcache_invalidate (regcache, regno);
}
- error (_("Process record cancel the operation."));
+ error (_("Process record canceled the operation."));
}
/* Destroy the record from here forward. */
@@ -861,7 +992,7 @@ record_store_registers (struct regcache *regcache, int regno)
}
/* record_xfer_partial -- behavior is conditional on RECORD_IS_REPLAY.
- In replay mode, we cannot write memory unles we are willing to
+ In replay mode, we cannot write memory unles we are willing to
invalidate the record/replay log from this point forward. */
static LONGEST
@@ -876,7 +1007,7 @@ record_xfer_partial (struct target_ops *ops, enum target_object object,
if (RECORD_IS_REPLAY)
{
/* Let user choice if he want to write memory or not. */
- if (!nquery (_("Because GDB is in replay mode, writing to memory will destroy the record from this point forward. Write memory at address 0x%s?"),
+ if (!nquery (_("Because GDB is in replay mode, writing to memory will make the execute log unusable from this point onward. Write memory at address 0x%s?"),
paddr_nz (offset)))
{
return -1;
@@ -895,13 +1026,23 @@ record_xfer_partial (struct target_ops *ops, enum target_object object,
if (record_arch_list_add_mem (offset, len))
{
record_list_release (record_arch_list_tail);
- fprintf_unfiltered (gdb_stdlog, _("Process record: record message error."));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ _
+ ("Process record: failed to record execution log."));
+ }
return -1;
}
if (record_arch_list_add_end (0))
{
record_list_release (record_arch_list_tail);
- fprintf_unfiltered (gdb_stdlog, _("Process record: record message error."));
+ if (record_debug)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ _
+ ("Process record: failed to record execution log."));
+ }
return -1;
}
record_list->next = record_arch_list_head;
@@ -1005,14 +1146,14 @@ cmd_record_delete (char *args, int from_tty)
{
if (RECORD_IS_REPLAY)
{
- if (!from_tty || query (_("Process record: delete the log from this point forward and begin to record the running message at current PC?")))
+ if (!from_tty || query (_("Delete the log from this point forward and begin to record the running message at current PC?")))
{
record_list_release_next ();
}
}
else
{
- printf_unfiltered (_("Process record: already at end of record list.\n"));
+ printf_unfiltered (_("Already at end of record list.\n"));
}
}
@@ -1029,7 +1170,7 @@ cmd_record_stop (char *args, int from_tty)
{
if (RECORD_IS_USED)
{
- if (!record_list || !from_tty || query (_("Process record: delete recorded log and stop recording?")))
+ if (!record_list || !from_tty || query (_("Delete recorded log and stop recording?")))
{
unpush_target (&record_ops);
}
@@ -1047,7 +1188,7 @@ set_record_insn_max_num (char *args, int from_tty, struct cmd_list_element *c)
{
if (record_insn_num > record_insn_max_num && record_insn_max_num)
{
- printf_unfiltered (_("Process record: record instructions number is bigger than record instructions max number. Auto delete the first ones.\n"));
+ printf_unfiltered (_("Record instructions number is bigger than record instructions max number. Auto delete the first ones?\n"));
while (record_insn_num > record_insn_max_num)
{
@@ -1072,7 +1213,7 @@ _initialize_record (void)
/* Init record_maskall. */
if (sigfillset (&record_maskall) == -1)
{
- perror_with_name (_("Process record: sigfillset"));
+ perror_with_name (_("Process record: sigfillset failed"));
}
/* Init record_first. */
@@ -1102,26 +1243,29 @@ _initialize_record (void)
other affect to GDB such as call function "no_shared_libraries".
So I add special commands to GDB. */
add_com ("delrecord", class_obscure, cmd_record_delete,
- _("When process record target running in replay mode, delete the next running messages and begin to record the running message at current address."));
+ _("Delete the rest of execution log and start recording it anew."));
add_com_alias ("dr", "delrecord", class_obscure, 1);
add_com ("stoprecord", class_obscure, cmd_record_stop,
_("Stop the record/replay target."));
add_com_alias ("sr", "stoprecord", class_obscure, 1);
/* Record instructions number limit command. */
- add_setshow_zinteger_cmd ("record-auto-delete", no_class,
- &record_insn_max_mode,
- _("Set record/replay auto delete mode."),
- _("Show record/replay auto delete mode."), _("\
+ add_setshow_boolean_cmd ("record-stop-at-limit", no_class,
+ &record_stop_at_limit,
+ _("Set whether record/replay stop when record/replay buffer becomes full."),
+ _("Show whether record/replay stop when record/replay buffer becomes full."), _("\
+Enable is default value.\n\
When enabled, if the record/replay buffer becomes full,\n\
+ask user what to do.\n\
+When disabled, if the record/replay buffer becomes full,\n\
delete it and start new recording."), NULL, NULL, &setlist, &showlist);
add_setshow_zinteger_cmd ("record-insn-number-max", no_class,
&record_insn_max_num,
_("Set record/replay buffer limit."),
_("Show record/replay buffer limit."), _("\
Set the maximum number of instructions to be stored in the\n\
-record/replay buffer. Zero means unlimited (default 200000)."),
- set_record_insn_max_num,
+record/replay buffer. Zero means unlimited (default 200000)."),
+ set_record_insn_max_num,
NULL, &setlist, &showlist);
add_info ("record-insn-number", show_record_insn_number, _("\
Show the current number of instructions in the record/replay buffer."));
diff --git a/gdb/record.h b/gdb/record.h
index a10a9ec1412..fd692730052 100644
--- a/gdb/record.h
+++ b/gdb/record.h
@@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -20,12 +20,10 @@
#ifndef _RECORD_H_
#define _RECORD_H_
-#define RECORD_IS_USED \
+#define RECORD_IS_USED \
(current_target.beneath == &record_ops)
-#define RECORD_IS_REPLAY \
+#define RECORD_IS_REPLAY \
(record_list->next || execution_direction == EXEC_REVERSE)
-#define RECORD_TARGET_SUPPORT_RECORD_WAIT \
- (record_ops.beneath->to_support_record_wait)
typedef struct record_reg_s
{
@@ -52,7 +50,7 @@ enum record_type
("record_reg") or a part of memory ("record_mem"). And Each instruction must
has a record_t ("record_end") that point out this is the last record_t of
this instruction.
- Each record_t is linked to "record_list" by "prev" and "next".
+ Each record_t is linked to "record_list" by "prev" and "next".
*/
typedef struct record_s
{
@@ -77,7 +75,6 @@ extern record_t *record_arch_list_tail;
extern struct regcache *record_regcache;
extern struct target_ops record_ops;
-extern int record_resume_step;
extern int record_arch_list_add_reg (int num);
extern int record_arch_list_add_mem (CORE_ADDR addr, int len);
diff --git a/gdb/target.c b/gdb/target.c
index 6871e94694a..a6365985dbb 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -40,12 +40,11 @@
#include "exceptions.h"
#include "target-descriptions.h"
#include "gdbthread.h"
+#include "solib.h"
#include "record.h"
static void target_info (char *, int);
-static void maybe_kill_then_attach (char *, int);
-
static void kill_or_be_killed (int);
static void default_terminal_info (char *, int);
@@ -101,9 +100,9 @@ static void debug_to_open (char *, int);
static void debug_to_close (int);
-static void debug_to_attach (char *, int);
+static void debug_to_attach (struct target_ops *ops, char *, int);
-static void debug_to_detach (char *, int);
+static void debug_to_detach (struct target_ops *ops, char *, int);
static void debug_to_resume (ptid_t, int, enum target_signal);
@@ -158,7 +157,7 @@ static void debug_to_load (char *, int);
static int debug_to_lookup_symbol (char *, CORE_ADDR *);
-static void debug_to_mourn_inferior (void);
+static void debug_to_mourn_inferior (struct target_ops *);
static int debug_to_can_run (void);
@@ -201,11 +200,6 @@ struct target_ops current_target;
static struct cmd_list_element *targetlist = NULL;
-/* Nonzero if we are debugging an attached outside process
- rather than an inferior. */
-
-int attach_flag;
-
/* Nonzero if we should trust readonly sections from the
executable when reading memory. */
@@ -248,9 +242,6 @@ add_target (struct target_ops *t)
if (t->to_xfer_partial == NULL)
t->to_xfer_partial = default_xfer_partial;
- /* Set the default value of to_support_record_wait. */
- t->to_support_record_wait = 0;
-
if (!target_structs)
{
target_struct_allocsize = DEFAULT_ALLOCSIZE;
@@ -291,6 +282,24 @@ target_load (char *arg, int from_tty)
(*current_target.to_load) (arg, from_tty);
}
+void target_create_inferior (char *exec_file, char *args,
+ char **env, int from_tty)
+{
+ struct target_ops *t;
+ for (t = current_target.beneath; t != NULL; t = t->beneath)
+ {
+ if (t->to_create_inferior != NULL)
+ {
+ t->to_create_inferior (t, exec_file, args, env, from_tty);
+ return;
+ }
+ }
+
+ internal_error (__FILE__, __LINE__,
+ "could not find a target to create inferior");
+}
+
+
static int
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct target_ops *t)
@@ -361,19 +370,16 @@ kill_or_be_killed (int from_tty)
tcomplain ();
}
-static void
-maybe_kill_then_attach (char *args, int from_tty)
-{
- kill_or_be_killed (from_tty);
- target_attach (args, from_tty);
-}
+/* A default implementation for the to_get_ada_task_ptid target method.
-static void
-maybe_kill_then_create_inferior (char *exec, char *args, char **env,
- int from_tty)
+ This function builds the PTID by using both LWP and TID as part of
+ the PTID lwp and tid elements. The pid used is the pid of the
+ inferior_ptid. */
+
+ptid_t
+default_get_ada_task_ptid (long lwp, long tid)
{
- kill_or_be_killed (0);
- target_create_inferior (exec, args, env, from_tty);
+ return ptid_build (ptid_get_pid (inferior_ptid), lwp, tid);
}
/* Go through the target stack from top to bottom, copying over zero
@@ -411,12 +417,12 @@ update_current_target (void)
INHERIT (to_shortname, t);
INHERIT (to_longname, t);
INHERIT (to_doc, t);
- INHERIT (to_open, t);
- INHERIT (to_close, t);
- INHERIT (to_attach, t);
+ /* Do not inherit to_open. */
+ /* Do not inherit to_close. */
+ /* Do not inherit to_attach. */
INHERIT (to_post_attach, t);
INHERIT (to_attach_no_wait, t);
- INHERIT (to_detach, t);
+ /* Do not inherit to_detach. */
/* Do not inherit to_disconnect. */
INHERIT (to_resume, t);
INHERIT (to_wait, t);
@@ -447,7 +453,7 @@ update_current_target (void)
INHERIT (to_kill, t);
INHERIT (to_load, t);
INHERIT (to_lookup_symbol, t);
- INHERIT (to_create_inferior, t);
+ /* Do no inherit to_create_inferior. */
INHERIT (to_post_startup_inferior, t);
INHERIT (to_acknowledge_created_inferior, t);
INHERIT (to_insert_fork_catchpoint, t);
@@ -458,7 +464,7 @@ update_current_target (void)
INHERIT (to_insert_exec_catchpoint, t);
INHERIT (to_remove_exec_catchpoint, t);
INHERIT (to_has_exited, t);
- INHERIT (to_mourn_inferior, t);
+ /* Do no inherit to_mourn_inferiour. */
INHERIT (to_can_run, t);
INHERIT (to_notice_signals, t);
INHERIT (to_thread_alive, t);
@@ -488,13 +494,15 @@ update_current_target (void)
INHERIT (to_get_thread_local_address, t);
INHERIT (to_can_execute_reverse, t);
/* Do not inherit to_read_description. */
+ INHERIT (to_get_ada_task_ptid, t);
/* Do not inherit to_search_memory. */
+ INHERIT (to_supports_multi_process, t);
INHERIT (to_magic, t);
/* Do not inherit to_memory_map. */
/* Do not inherit to_flash_erase. */
/* Do not inherit to_flash_done. */
- /* Set the real beneath function pointers. */
+ /* Set pointers to functions in the target beneath us. */
if (t != &record_ops)
{
if (!record_beneath_to_resume)
@@ -539,14 +547,9 @@ update_current_target (void)
de_fault (to_close,
(void (*) (int))
target_ignore);
- de_fault (to_attach,
- maybe_kill_then_attach);
de_fault (to_post_attach,
(void (*) (int))
target_ignore);
- de_fault (to_detach,
- (void (*) (char *, int))
- target_ignore);
de_fault (to_resume,
(void (*) (ptid_t, int, enum target_signal))
noprocess);
@@ -623,8 +626,6 @@ update_current_target (void)
de_fault (to_lookup_symbol,
(int (*) (char *, CORE_ADDR *))
nosymbol);
- de_fault (to_create_inferior,
- maybe_kill_then_create_inferior);
de_fault (to_post_startup_inferior,
(void (*) (ptid_t))
target_ignore);
@@ -652,9 +653,6 @@ update_current_target (void)
de_fault (to_has_exited,
(int (*) (int, int, int *))
return_zero);
- de_fault (to_mourn_inferior,
- (void (*) (void))
- noprocess);
de_fault (to_can_run,
return_zero);
de_fault (to_notice_signals,
@@ -679,12 +677,6 @@ update_current_target (void)
de_fault (to_pid_to_exec_file,
(char *(*) (int))
return_zero);
- de_fault (to_can_async_p,
- (int (*) (void))
- return_zero);
- de_fault (to_is_async_p,
- (int (*) (void))
- return_zero);
de_fault (to_async,
(void (*) (void (*) (enum inferior_event_type, void*), void*))
tcomplain);
@@ -692,6 +684,12 @@ update_current_target (void)
(int (*) (int))
return_one);
current_target.to_read_description = NULL;
+ de_fault (to_get_ada_task_ptid,
+ (ptid_t (*) (long, long))
+ default_get_ada_task_ptid);
+ de_fault (to_supports_multi_process,
+ (int (*) (void))
+ return_zero);
#undef de_fault
/* Finally, position the target-stack beneath the squashed
@@ -817,6 +815,10 @@ unpush_target (struct target_ops *t)
struct target_ops **cur;
struct target_ops *tmp;
+ if (t->to_stratum == dummy_stratum)
+ internal_error (__FILE__, __LINE__,
+ "Attempt to unpush the dummy target");
+
/* Look for the specified target. Note that we assume that a target
can only occur once in the target stack. */
@@ -850,7 +852,7 @@ unpush_target (struct target_ops *t)
void
pop_target (void)
{
- target_close (&current_target, 0); /* Let it clean up */
+ target_close (target_stack, 0); /* Let it clean up */
if (unpush_target (target_stack) == 1)
return;
@@ -860,6 +862,30 @@ pop_target (void)
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
}
+void
+pop_all_targets_above (enum strata above_stratum, int quitting)
+{
+ while ((int) (current_target.to_stratum) > (int) above_stratum)
+ {
+ target_close (target_stack, quitting);
+ if (!unpush_target (target_stack))
+ {
+ fprintf_unfiltered (gdb_stderr,
+ "pop_all_targets couldn't find target %s\n",
+ target_stack->to_shortname);
+ internal_error (__FILE__, __LINE__,
+ _("failed internal consistency check"));
+ break;
+ }
+ }
+}
+
+void
+pop_all_targets (int quitting)
+{
+ pop_all_targets_above (dummy_stratum, quitting);
+}
+
/* Using the objfile specified in OBJFILE, find the address for the
current thread's thread-local storage with offset OFFSET. */
CORE_ADDR
@@ -868,7 +894,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
volatile CORE_ADDR addr = 0;
if (target_get_thread_local_address_p ()
- && gdbarch_fetch_tls_load_module_address_p (current_gdbarch))
+ && gdbarch_fetch_tls_load_module_address_p (target_gdbarch))
{
ptid_t ptid = inferior_ptid;
volatile struct gdb_exception ex;
@@ -878,7 +904,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset)
CORE_ADDR lm_addr;
/* Fetch the load module address for this objfile. */
- lm_addr = gdbarch_fetch_tls_load_module_address (current_gdbarch,
+ lm_addr = gdbarch_fetch_tls_load_module_address (target_gdbarch,
objfile);
/* If it's 0, throw the appropriate exception. */
if (lm_addr == 0)
@@ -1068,7 +1094,7 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf
/* Likewise for accesses to unmapped overlay sections. */
if (readbuf != NULL && overlay_debugging)
{
- asection *section = find_pc_overlay (memaddr);
+ struct obj_section *section = find_pc_overlay (memaddr);
if (pc_in_unmapped_range (memaddr, section))
return xfer_memory (memaddr, readbuf, len, 0, NULL, ops);
}
@@ -1210,12 +1236,13 @@ target_xfer_partial (struct target_ops *ops,
const unsigned char *myaddr = NULL;
fprintf_unfiltered (gdb_stdlog,
- "%s:target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s",
+ "%s:target_xfer_partial (%d, %s, 0x%lx, 0x%lx, %s, %s) = %s",
ops->to_shortname,
(int) object,
(annex ? annex : "(null)"),
(long) readbuf, (long) writebuf,
- paddr_nz (offset), paddr_d (len), paddr_d (retval));
+ core_addr_to_string_nz (offset),
+ plongest (len), plongest (retval));
if (readbuf)
myaddr = readbuf;
@@ -1757,9 +1784,34 @@ target_info (char *args, int from_tty)
void
target_pre_inferior (int from_tty)
{
- invalidate_target_mem_regions ();
+ /* Clear out solib state. Otherwise the solib state of the previous
+ inferior might have survived and is entirely wrong for the new
+ target. This has been observed on GNU/Linux using glibc 2.3. How
+ to reproduce:
+
+ bash$ ./foo&
+ [1] 4711
+ bash$ ./foo&
+ [1] 4712
+ bash$ gdb ./foo
+ [...]
+ (gdb) attach 4711
+ (gdb) detach
+ (gdb) attach 4712
+ Cannot access memory at address 0xdeadbeef
+ */
+
+ /* In some OSs, the shared library list is the same/global/shared
+ across inferiors. If code is shared between processes, so are
+ memory regions and features. */
+ if (!gdbarch_has_global_solist (target_gdbarch))
+ {
+ no_shared_libraries (NULL, from_tty);
- target_clear_description ();
+ invalidate_target_mem_regions ();
+
+ target_clear_description ();
+ }
}
/* This is to be called by the open routine before it does
@@ -1781,9 +1833,9 @@ target_preopen (int from_tty)
/* Calling target_kill may remove the target from the stack. But if
it doesn't (which seems like a win for UDI), remove it now. */
-
- if (target_has_execution)
- pop_target ();
+ /* Leave the exec target, though. The user may be switching from a
+ live process to a core of the same program. */
+ pop_all_targets_above (file_stratum, 0);
target_pre_inferior (from_tty);
}
@@ -1793,11 +1845,27 @@ target_preopen (int from_tty)
void
target_detach (char *args, int from_tty)
{
- /* If we're in breakpoints-always-inserted mode, have to
- remove them before detaching. */
- remove_breakpoints ();
+ struct target_ops* t;
+
+ if (gdbarch_has_global_solist (target_gdbarch))
+ /* Don't remove global breakpoints here. They're removed on
+ disconnection from the target. */
+ ;
+ else
+ /* If we're in breakpoints-always-inserted mode, have to remove
+ them before detaching. */
+ remove_breakpoints ();
+
+ for (t = current_target.beneath; t != NULL; t = t->beneath)
+ {
+ if (t->to_detach != NULL)
+ {
+ t->to_detach (t, args, from_tty);
+ return;
+ }
+ }
- (current_target.to_detach) (args, from_tty);
+ internal_error (__FILE__, __LINE__, "could not find a target to detach");
}
void
@@ -1805,8 +1873,9 @@ target_disconnect (char *args, int from_tty)
{
struct target_ops *t;
- /* If we're in breakpoints-always-inserted mode, have to
- remove them before disconnecting. */
+ /* If we're in breakpoints-always-inserted mode or if breakpoints
+ are global across processes, we have to remove them before
+ disconnecting. */
remove_breakpoints ();
for (t = current_target.beneath; t != NULL; t = t->beneath)
@@ -1855,6 +1924,23 @@ target_follow_fork (int follow_child)
"could not find a target to follow fork");
}
+void
+target_mourn_inferior (void)
+{
+ struct target_ops *t;
+ for (t = current_target.beneath; t != NULL; t = t->beneath)
+ {
+ if (t->to_mourn_inferior != NULL)
+ {
+ t->to_mourn_inferior (t);
+ return;
+ }
+ }
+
+ internal_error (__FILE__, __LINE__,
+ "could not find a target to follow mourn inferiour");
+}
+
/* Look for a target which can describe architectural features, starting
from TARGET. If we find one, return its description. */
@@ -2100,23 +2186,24 @@ find_default_run_target (char *do_mesg)
}
void
-find_default_attach (char *args, int from_tty)
+find_default_attach (struct target_ops *ops, char *args, int from_tty)
{
struct target_ops *t;
t = find_default_run_target ("attach");
- (t->to_attach) (args, from_tty);
+ (t->to_attach) (t, args, from_tty);
return;
}
void
-find_default_create_inferior (char *exec_file, char *allargs, char **env,
+find_default_create_inferior (struct target_ops *ops,
+ char *exec_file, char *allargs, char **env,
int from_tty)
{
struct target_ops *t;
t = find_default_run_target ("run");
- (t->to_create_inferior) (exec_file, allargs, env, from_tty);
+ (t->to_create_inferior) (t, exec_file, allargs, env, from_tty);
return;
}
@@ -2150,10 +2237,53 @@ find_default_is_async_p (void)
return 0;
}
+int
+find_default_supports_non_stop (void)
+{
+ struct target_ops *t;
+
+ t = find_default_run_target (NULL);
+ if (t && t->to_supports_non_stop)
+ return (t->to_supports_non_stop) ();
+ return 0;
+}
+
+int
+target_supports_non_stop ()
+{
+ struct target_ops *t;
+ for (t = &current_target; t != NULL; t = t->beneath)
+ if (t->to_supports_non_stop)
+ return t->to_supports_non_stop ();
+
+ return 0;
+}
+
+
+char *
+target_get_osdata (const char *type)
+{
+ char *document;
+ struct target_ops *t;
+
+ if (target_can_run (&current_target))
+ t = &current_target;
+ else
+ t = find_default_run_target ("get OS data");
+
+ if (!t)
+ return NULL;
+
+ document = target_read_stralloc (t,
+ TARGET_OBJECT_OSDATA,
+ type);
+ return document;
+}
+
static int
default_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
{
- return (len <= TYPE_LENGTH (builtin_type_void_data_ptr));
+ return (len <= gdbarch_ptr_bit (target_gdbarch) / TARGET_CHAR_BIT);
}
static int
@@ -2337,23 +2467,23 @@ find_target_beneath (struct target_ops *t)
void
generic_mourn_inferior (void)
{
- extern int show_breakpoint_hit_counts;
+ ptid_t ptid;
+ ptid = inferior_ptid;
inferior_ptid = null_ptid;
- attach_flag = 0;
+
+ if (!ptid_equal (ptid, null_ptid))
+ {
+ int pid = ptid_get_pid (ptid);
+ delete_inferior (pid);
+ }
+
breakpoint_init_inferior (inf_exited);
registers_changed ();
reopen_exec_file ();
reinit_frame_cache ();
- /* It is confusing to the user for ignore counts to stick around
- from previous runs of the inferior. So clear them. */
- /* However, it is more confusing for the ignore counts to disappear when
- using hit counts. So don't clear them if we're counting hits. */
- if (!show_breakpoint_hit_counts)
- breakpoint_clear_ignore_counts ();
-
if (deprecated_detach_hook)
deprecated_detach_hook ();
}
@@ -2381,10 +2511,6 @@ store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus)
}
}
-/* Returns zero to leave the inferior alone, one to interrupt it. */
-int (*target_activity_function) (void);
-int target_activity_fd;
-
/* Convert a normal process ID to a string. Returns the string in a
static buffer. */
@@ -2421,9 +2547,12 @@ init_dummy_target (void)
dummy_target.to_longname = "None";
dummy_target.to_doc = "";
dummy_target.to_attach = find_default_attach;
+ dummy_target.to_detach =
+ (void (*)(struct target_ops *, char *, int))target_ignore;
dummy_target.to_create_inferior = find_default_create_inferior;
dummy_target.to_can_async_p = find_default_can_async_p;
dummy_target.to_is_async_p = find_default_is_async_p;
+ dummy_target.to_supports_non_stop = find_default_supports_non_stop;
dummy_target.to_pid_to_str = normal_pid_to_str;
dummy_target.to_stratum = dummy_stratum;
dummy_target.to_find_memory_regions = dummy_find_memory_regions;
@@ -2456,10 +2585,28 @@ target_close (struct target_ops *targ, int quitting)
targ->to_close (quitting);
}
+void
+target_attach (char *args, int from_tty)
+{
+ struct target_ops *t;
+ for (t = current_target.beneath; t != NULL; t = t->beneath)
+ {
+ if (t->to_attach != NULL)
+ {
+ t->to_attach (t, args, from_tty);
+ return;
+ }
+ }
+
+ internal_error (__FILE__, __LINE__,
+ "could not find a target to attach");
+}
+
+
static void
-debug_to_attach (char *args, int from_tty)
+debug_to_attach (struct target_ops *ops, char *args, int from_tty)
{
- debug_target.to_attach (args, from_tty);
+ debug_target.to_attach (&debug_target, args, from_tty);
fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", args, from_tty);
}
@@ -2474,9 +2621,9 @@ debug_to_post_attach (int pid)
}
static void
-debug_to_detach (char *args, int from_tty)
+debug_to_detach (struct target_ops *ops, char *args, int from_tty)
{
- debug_target.to_detach (args, from_tty);
+ debug_target.to_detach (&debug_target, args, from_tty);
fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", args, from_tty);
}
@@ -2546,18 +2693,17 @@ debug_print_register (const char * func,
struct gdbarch *gdbarch = get_regcache_arch (regcache);
fprintf_unfiltered (gdb_stdlog, "%s ", func);
if (regno >= 0 && regno < gdbarch_num_regs (gdbarch)
- + gdbarch_num_pseudo_regs (gdbarch)
&& gdbarch_register_name (gdbarch, regno) != NULL
&& gdbarch_register_name (gdbarch, regno)[0] != '\0')
fprintf_unfiltered (gdb_stdlog, "(%s)",
gdbarch_register_name (gdbarch, regno));
else
fprintf_unfiltered (gdb_stdlog, "(%d)", regno);
- if (regno >= 0)
+ if (regno >= 0 && regno < gdbarch_num_regs (gdbarch))
{
int i, size = register_size (gdbarch, regno);
unsigned char buf[MAX_REGISTER_SIZE];
- regcache_cooked_read (regcache, regno, buf);
+ regcache_raw_collect (regcache, regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
for (i = 0; i < size; i++)
{
@@ -2566,8 +2712,8 @@ debug_print_register (const char * func,
if (size <= sizeof (LONGEST))
{
ULONGEST val = extract_unsigned_integer (buf, size);
- fprintf_unfiltered (gdb_stdlog, " 0x%s %s",
- paddr_nz (val), paddr_d (val));
+ fprintf_unfiltered (gdb_stdlog, " %s %s",
+ core_addr_to_string_nz (val), plongest (val));
}
}
fprintf_unfiltered (gdb_stdlog, "\n");
@@ -2880,10 +3026,11 @@ debug_to_lookup_symbol (char *name, CORE_ADDR *addrp)
}
static void
-debug_to_create_inferior (char *exec_file, char *args, char **env,
+debug_to_create_inferior (struct target_ops *ops,
+ char *exec_file, char *args, char **env,
int from_tty)
{
- debug_target.to_create_inferior (exec_file, args, env, from_tty);
+ debug_target.to_create_inferior (ops, exec_file, args, env, from_tty);
fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx, %d)\n",
exec_file, args, from_tty);
@@ -2987,9 +3134,9 @@ debug_to_has_exited (int pid, int wait_status, int *exit_status)
}
static void
-debug_to_mourn_inferior (void)
+debug_to_mourn_inferior (struct target_ops *ops)
{
- debug_target.to_mourn_inferior ();
+ debug_target.to_mourn_inferior (&debug_target);
fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n");
}
@@ -3157,6 +3304,35 @@ maintenance_print_target_stack (char *cmd, int from_tty)
}
}
+/* Controls if async mode is permitted. */
+int target_async_permitted = 0;
+
+/* The set command writes to this variable. If the inferior is
+ executing, linux_nat_async_permitted is *not* updated. */
+static int target_async_permitted_1 = 0;
+
+static void
+set_maintenance_target_async_permitted (char *args, int from_tty,
+ struct cmd_list_element *c)
+{
+ if (target_has_execution)
+ {
+ target_async_permitted_1 = target_async_permitted;
+ error (_("Cannot change this setting while the inferior is running."));
+ }
+
+ target_async_permitted = target_async_permitted_1;
+}
+
+static void
+show_maintenance_target_async_permitted (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c,
+ const char *value)
+{
+ fprintf_filtered (file, _("\
+Controlling the inferior in asynchronous mode is %s.\n"), value);
+}
+
void
initialize_targets (void)
{
@@ -3194,5 +3370,15 @@ result in significant performance improvement for remote targets."),
_("Print the name of each layer of the internal target stack."),
&maintenanceprintlist);
+ add_setshow_boolean_cmd ("target-async", no_class,
+ &target_async_permitted_1, _("\
+Set whether gdb controls the inferior in asynchronous mode."), _("\
+Show whether gdb controls the inferior in asynchronous mode."), _("\
+Tells gdb whether to control the inferior in asynchronous mode."),
+ set_maintenance_target_async_permitted,
+ show_maintenance_target_async_permitted,
+ &setlist,
+ &showlist);
+
target_dcache = dcache_init ();
}
diff --git a/gdb/target.h b/gdb/target.h
index 74c2a84ca56..7244f943f08 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -215,8 +215,11 @@ enum target_object
See "target-descriptions.c". ANNEX should never be empty. */
TARGET_OBJECT_AVAILABLE_FEATURES,
/* Currently loaded libraries, in XML format. */
- TARGET_OBJECT_LIBRARIES
- /* Possible future objects: TARGET_OBJECT_FILE, TARGET_OBJECT_PROC, ... */
+ TARGET_OBJECT_LIBRARIES,
+ /* Get OS specific data. The ANNEX specifies the type (running
+ processes, etc.). */
+ TARGET_OBJECT_OSDATA
+ /* Possible future objects: TARGET_OBJECT_FILE, ... */
};
/* Request that OPS transfer up to LEN 8-bit bytes of the target's
@@ -297,15 +300,6 @@ extern void get_target_memory (struct target_ops *ops, CORE_ADDR addr,
extern ULONGEST get_target_memory_unsigned (struct target_ops *ops,
CORE_ADDR addr, int len);
-
-/* If certain kinds of activity happen, target_wait should perform
- callbacks. */
-/* Right now we just call (*TARGET_ACTIVITY_FUNCTION) if I/O is possible
- on TARGET_ACTIVITY_FD. */
-extern int target_activity_fd;
-/* Returns zero to leave the inferior alone, one to interrupt it. */
-extern int (*target_activity_function) (void);
-
struct thread_info; /* fwd decl for parameter list below: */
struct target_ops
@@ -328,9 +322,9 @@ struct target_ops
to xfree everything (including the "struct target_ops"). */
void (*to_xclose) (struct target_ops *targ, int quitting);
void (*to_close) (int);
- void (*to_attach) (char *, int);
+ void (*to_attach) (struct target_ops *ops, char *, int);
void (*to_post_attach) (int);
- void (*to_detach) (char *, int);
+ void (*to_detach) (struct target_ops *ops, char *, int);
void (*to_disconnect) (struct target_ops *, char *, int);
void (*to_resume) (ptid_t, int, enum target_signal);
ptid_t (*to_wait) (ptid_t, struct target_waitstatus *);
@@ -388,7 +382,8 @@ struct target_ops
void (*to_kill) (void);
void (*to_load) (char *, int);
int (*to_lookup_symbol) (char *, CORE_ADDR *);
- void (*to_create_inferior) (char *, char *, char **, int);
+ void (*to_create_inferior) (struct target_ops *,
+ char *, char *, char **, int);
void (*to_post_startup_inferior) (ptid_t);
void (*to_acknowledge_created_inferior) (int);
void (*to_insert_fork_catchpoint) (int);
@@ -399,7 +394,7 @@ struct target_ops
void (*to_insert_exec_catchpoint) (int);
int (*to_remove_exec_catchpoint) (int);
int (*to_has_exited) (int, int, int *);
- void (*to_mourn_inferior) (void);
+ void (*to_mourn_inferior) (struct target_ops *);
int (*to_can_run) (void);
void (*to_notice_signals) (ptid_t ptid);
int (*to_thread_alive) (ptid_t ptid);
@@ -427,6 +422,7 @@ struct target_ops
int (*to_is_async_p) (void);
void (*to_async) (void (*) (enum inferior_event_type, void *), void *);
int (*to_async_mask) (int);
+ int (*to_supports_non_stop) (void);
int (*to_find_memory_regions) (int (*) (CORE_ADDR,
unsigned long,
int, int, int,
@@ -509,6 +505,12 @@ struct target_ops
was available. */
const struct target_desc *(*to_read_description) (struct target_ops *ops);
+ /* Build the PTID of the thread on which a given task is running,
+ based on LWP and THREAD. These values are extracted from the
+ task Private_Data section of the Ada Task Control Block, and
+ their interpretation depends on the target. */
+ ptid_t (*to_get_ada_task_ptid) (long lwp, long thread);
+
/* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
Return 0 if *READPTR is already at the end of the buffer.
Return -1 if there is insufficient buffer for a whole entry.
@@ -530,10 +532,9 @@ struct target_ops
/* Can target execute in reverse? */
int (*to_can_execute_reverse) ();
- /* Default value is 0. Mean that this target doesn't support record wait.
- Need the help of infrun.c(handle_inferior_event). Set to 1 if this
- target support record wait. */
- int to_support_record_wait;
+ /* Does this target support debugging multiple processes
+ simultaneously? */
+ int (*to_supports_multi_process) (void);
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
@@ -575,8 +576,7 @@ void target_close (struct target_ops *targ, int quitting);
should be ready to deliver the status of the process immediately
(without waiting) to an upcoming target_wait call. */
-#define target_attach(args, from_tty) \
- (*current_target.to_attach) (args, from_tty)
+void target_attach (char *, int);
/* Some targets don't generate traps when attaching to the inferior,
or their target_attach implementation takes care of the waiting.
@@ -646,6 +646,12 @@ extern void target_resume (ptid_t ptid, int step, enum target_signal signal);
#define target_prepare_to_store(regcache) \
(*current_target.to_prepare_to_store) (regcache)
+/* Returns true if this target can debug multiple processes
+ simultaneously. */
+
+#define target_supports_multi_process() \
+ (*current_target.to_supports_multi_process) ()
+
extern DCACHE *target_dcache;
extern int target_read_string (CORE_ADDR, char **, int, int *);
@@ -820,9 +826,8 @@ extern void target_load (char *arg, int from_tty);
ENV is the environment vector to pass. Errors reported with error().
On VxWorks and various standalone systems, we ignore exec_file. */
-#define target_create_inferior(exec_file, args, env, FROM_TTY) \
- (*current_target.to_create_inferior) (exec_file, args, env, (FROM_TTY))
-
+void target_create_inferior (char *exec_file, char *args,
+ char **env, int from_tty);
/* Some targets (such as ttrace-based HPUX) don't allow us to request
notification of inferior events such as fork and vork immediately
@@ -892,8 +897,7 @@ int target_follow_fork (int follow_child);
/* The inferior process has died. Do what is right. */
-#define target_mourn_inferior() \
- (*current_target.to_mourn_inferior) ()
+void target_mourn_inferior (void);
/* Does target have enough data to do a run or attach command? */
@@ -969,12 +973,18 @@ int target_follow_fork (int follow_child);
#define target_can_lock_scheduler \
(current_target.to_has_thread_control & tc_schedlock)
+/* Should the target enable async mode if it is supported? Temporary
+ cludge until async mode is a strict superset of sync mode. */
+extern int target_async_permitted;
+
/* Can the target support asynchronous execution? */
#define target_can_async_p() (current_target.to_can_async_p ())
/* Is the target in asynchronous execution mode? */
#define target_is_async_p() (current_target.to_is_async_p ())
+int target_supports_non_stop (void);
+
/* Put the target in async mode with the specified callback function. */
#define target_async(CALLBACK,CONTEXT) \
(current_target.to_async ((CALLBACK), (CONTEXT)))
@@ -1140,6 +1150,9 @@ extern int target_stopped_data_address_p (struct target_ops *);
extern const struct target_desc *target_read_description (struct target_ops *);
+#define target_get_ada_task_ptid(lwp, tid) \
+ (*current_target.to_get_ada_task_ptid) (lwp,tid)
+
/* Utility implementation of searching memory. */
extern int simple_search_memory (struct target_ops* ops,
CORE_ADDR start_addr,
@@ -1190,6 +1203,17 @@ extern void target_preopen (int);
extern void pop_target (void);
+/* Does whatever cleanup is required to get rid of all pushed targets.
+ QUITTING is propagated to target_close; it indicates that GDB is
+ exiting and should not get hung on an error (otherwise it is
+ important to perform clean termination, even if it takes a
+ while). */
+extern void pop_all_targets (int quitting);
+
+/* Like pop_all_targets, but pops only targets whose stratum is
+ strictly above ABOVE_STRATUM. */
+extern void pop_all_targets_above (enum strata above_stratum, int quitting);
+
extern CORE_ADDR target_translate_tls_address (struct objfile *objfile,
CORE_ADDR offset);
@@ -1238,9 +1262,10 @@ extern void noprocess (void);
extern void target_require_runnable (void);
-extern void find_default_attach (char *, int);
+extern void find_default_attach (struct target_ops *, char *, int);
-extern void find_default_create_inferior (char *, char *, char **, int);
+extern void find_default_create_inferior (struct target_ops *,
+ char *, char *, char **, int);
extern struct target_ops *find_run_target (void);
@@ -1253,6 +1278,14 @@ extern int target_resize_to_sections (struct target_ops *target,
extern void remove_target_sections (bfd *abfd);
+/* Read OS data object of type TYPE from the target, and return it in
+ XML format. The result is NUL-terminated and returned as a string,
+ allocated using xmalloc. If an error occurs or the transfer is
+ unsupported, NULL is returned. Empty objects are returned as
+ allocated but empty strings. */
+
+extern char *target_get_osdata (const char *type);
+
/* Stuff that should be shared among the various remote targets. */
@@ -1301,9 +1334,6 @@ extern int default_target_signal_to_host (struct gdbarch *,
/* Convert from a number used in a GDB command to an enum target_signal. */
extern enum target_signal target_signal_from_command (int);
-/* Any target can call this to switch to remote protocol (in remote.c). */
-extern void push_remote_target (char *name, int from_tty);
-
/* Set the show memory breakpoints mode to show, and installs a cleanup
to restore it back to the current value. */
extern struct cleanup *make_show_memory_breakpoints_cleanup (int show);
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index 92b418e29fc..1f39ba91092 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -3131,7 +3131,7 @@ done
- ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.twreverse/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.python/Makefile gdb.twreverse/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -3692,13 +3692,14 @@ do
"gdb.dwarf2/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.dwarf2/Makefile" ;;
"gdb.fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.fortran/Makefile" ;;
"gdb.server/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.server/Makefile" ;;
- "gdb.twreverse/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.twreverse/Makefile" ;;
"gdb.java/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.java/Makefile" ;;
"gdb.mi/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.mi/Makefile" ;;
"gdb.modula2/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.modula2/Makefile" ;;
"gdb.objc/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.objc/Makefile" ;;
"gdb.opt/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
"gdb.pascal/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.pascal/Makefile" ;;
+ "gdb.python/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.python/Makefile" ;;
+ "gdb.twreverse/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.twreverse/Makefile" ;;
"gdb.threads/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
"gdb.trace/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.trace/Makefile" ;;
"gdb.xml/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.xml/Makefile" ;;
diff --git a/gdb/testsuite/configure.ac b/gdb/testsuite/configure.ac
index 5be1a55abb4..4446115210b 100644
--- a/gdb/testsuite/configure.ac
+++ b/gdb/testsuite/configure.ac
@@ -114,7 +114,8 @@ AC_OUTPUT([Makefile \
gdb.ada/Makefile \
gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile \
gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
- gdb.fortran/Makefile gdb.server/Makefile gdb.twreverse/Makefile \
+ gdb.fortran/Makefile gdb.server/Makefile \
gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile \
gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
+ gdb.python/Makefile gdb.twreverse/Makefile \
gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
diff --git a/gdb/testsuite/gdb.twreverse/machinestate.exp b/gdb/testsuite/gdb.twreverse/machinestate.exp
index 3b4b0f63d3d..f27674a5ee8 100644
--- a/gdb/testsuite/gdb.twreverse/machinestate.exp
+++ b/gdb/testsuite/gdb.twreverse/machinestate.exp
@@ -35,6 +35,7 @@
# shared library variable
# heap variable (pointer)...
# overlay variables...
+# Test forward replay
#
@@ -71,7 +72,7 @@ gdb_continue_to_breakpoint "end of main" ".*/$srcfile:$endmain.*"
# Now run backward to each of several points where data is changed.
#
-# Module global variable
+# Module global variable, reverse
set breakloc [gdb_get_line_number \
"module_global_state: set breakpoint here" $srcfile]
@@ -81,12 +82,12 @@ gdb_test "reverse-continue" ".*/$srcfile:$breakloc.*" "reverse to $breakloc"
gdb_test "print aglobal" ".* = 0$newline" "module global reverse-breakpoint"
gdb_test "step" ".* module global post-change .*" ""
-gdb_test "print aglobal" ".* = 1$newline" "module global forward"
+gdb_test "print aglobal" ".* = 1$newline" "module global forward past bp"
gdb_test "reverse-step" ".*$newline$breakloc.*" ""
-gdb_test "print aglobal" ".* = 0$newline" "module global reverse-step"
+gdb_test "print aglobal" ".* = 0$newline" "module global reverse-step to bp"
-# Module static variable
+# Module static variable, reverse
set breakloc [gdb_get_line_number \
"module_static_state: set breakpoint here" $srcfile]
@@ -100,7 +101,7 @@ gdb_test "print astatic" ".* = 1$newline" "module static forward"
gdb_test "reverse-step" ".*$newline$breakloc.*" ""
gdb_test "print astatic" ".* = 0$newline" "module static reverse-step"
-# Function static variable
+# Function static variable, reverse
set breakloc [gdb_get_line_number \
"function_static_state: set breakpoint here" $srcfile]
@@ -114,7 +115,7 @@ gdb_test "print a" ".* = 1$newline" "function static forward"
gdb_test "reverse-step" ".*$newline$breakloc.*" ""
gdb_test "print a" ".* = 0$newline" "function static reverse-step"
-# Auto variable
+# Auto variable, reverse
set breakloc [gdb_get_line_number \
"auto_state: set breakpoint here" $srcfile]
@@ -128,7 +129,7 @@ gdb_test "print a" ".* = 1$newline" "auto var forward"
gdb_test "reverse-step" ".*$newline$breakloc.*" ""
gdb_test "print a" ".* = 0$newline" "auto var reverse-step"
-# Register variable
+# Register variable, reverse
set breakloc [gdb_get_line_number \
"register_state: set breakpoint here" $srcfile]
@@ -138,7 +139,89 @@ gdb_test "reverse-continue" ".*/$srcfile:$breakloc.*" "reverse to $breakloc"
gdb_test "print a" ".* = 0$newline" "register var reverse-breakpoint"
gdb_test "step" ".* register post-change .*" ""
-gdb_test "print a" ".* = 1$newline" "register var forward"
+gdb_test "print a" ".* = 1$newline" "register var step post-change"
gdb_test "reverse-step" ".*$newline$breakloc.*" ""
-gdb_test "print a" ".* = 0$newline" "register var reverse-step"
+gdb_test "print a" ".* = 0$newline" "register var reverse step-to"
+
+# Proceed to beginning of main
+
+gdb_test "tbreak $beginmain" ".*/$srcfile, line $beginmain.*" ""
+gdb_test "reverse-continue" ".*/$srcfile:$beginmain.*" "reverse to main"
+
+# Now repeat tests while replaying forward.
+
+# Register variable, forward
+
+set breakloc [gdb_get_line_number \
+ "register_state: set breakpoint here" $srcfile]
+
+gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+
+gdb_test "print a" ".* = 0$newline" "register var forward-breakpoint"
+gdb_test "reverse-step" ".*hide.*" ""
+gdb_test "step" ".*$newline$breakloc.*" ""
+gdb_test "print a" ".* = 0$newline" "register var forward step-to"
+gdb_test "step" ".* register post-change .*" ""
+gdb_test "print a" ".* = 1$newline" "register var step post-change"
+
+# Auto variable, forward
+
+set breakloc [gdb_get_line_number \
+ "auto_state: set breakpoint here" $srcfile]
+
+gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+
+gdb_test "print a" ".* = 0$newline" "auto var forward-breakpoint"
+gdb_test "reverse-step" ".*hide.*" ""
+gdb_test "step" ".*$newline$breakloc.*" ""
+gdb_test "print a" ".* = 0$newline" "auto var forward step-to"
+gdb_test "step" ".* auto post-change .*" ""
+gdb_test "print a" ".* = 1$newline" "auto var step post-change"
+
+# Function static variable, forward
+
+set breakloc [gdb_get_line_number \
+ "function_static_state: set breakpoint here" $srcfile]
+
+gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+
+gdb_test "print a" ".* = 0$newline" "function static forward-breakpoint"
+gdb_test "reverse-step" ".*hide.*" ""
+gdb_test "step" ".*$newline$breakloc.*" ""
+gdb_test "print a" ".* = 0$newline" "function static forward step-to"
+gdb_test "step" ".* function static post-change .*" ""
+gdb_test "print a" ".* = 1$newline" "function static step post-change"
+
+# Module static variable, forward
+
+set breakloc [gdb_get_line_number \
+ "module_static_state: set breakpoint here" $srcfile]
+
+gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+
+gdb_test "print astatic" ".* = 0$newline" "module static forward-breakpoint"
+gdb_test "reverse-step" ".*hide.*" ""
+gdb_test "step" ".*$newline$breakloc.*" ""
+gdb_test "print astatic" ".* = 0$newline" "module static forward step-to"
+gdb_test "step" ".* module static post-change .*" ""
+gdb_test "print astatic" ".* = 1$newline" "module static step post-change"
+
+# Module global variable, forward
+
+set breakloc [gdb_get_line_number \
+ "module_global_state: set breakpoint here" $srcfile]
+
+gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+
+gdb_test "print aglobal" ".* = 0$newline" "module global forward-breakpoint"
+gdb_test "reverse-step" ".*hide.*" ""
+gdb_test "step" ".*$newline$breakloc.*" ""
+gdb_test "print aglobal" ".* = 0$newline" "module global forward step-to"
+gdb_test "step" ".* module global post-change .*" ""
+gdb_test "print aglobal" ".* = 1$newline" "module global step post-change"