aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-04-24 16:28:16 +0000
committerAndrew Cagney <cagney@redhat.com>2002-04-24 16:28:16 +0000
commitd7bd68ca3c7db1b7336498cb1651e9d782eb11bc (patch)
tree6009817b55b1349a8d0986d4065d106048038a64 /gdb/gdbarch.h
parentd06f167ab353b02267dc687ee4826888ce0337cc (diff)
downloadgdb-d7bd68ca3c7db1b7336498cb1651e9d782eb11bc.zip
gdb-d7bd68ca3c7db1b7336498cb1651e9d782eb11bc.tar.gz
gdb-d7bd68ca3c7db1b7336498cb1651e9d782eb11bc.tar.bz2
* arch-utils.h: Update copyright.
* gdbarch.sh (PC_IN_SIGTRAMP): Add. * gdbarch.h, gdbarch.c: Re-generate. * inferior.h (IN_SIGTRAMP): Delete definition. * arch-utils.c (legacy_pc_in_sigtramp): New function. * arch-utils.h (legacy_pc_in_sigtramp): Declare. * mips-tdep.c (mips_init_extra_frame_info): Use PC_IN_SIGTRAMP. (mips_dump_tdep): Do not print value of IN_SIGTRAMP. * hppa-tdep.c (pc_in_interrupt_handler): Use PC_IN_SIGTRAMP. (find_proc_framesize): Ditto. * alpha-tdep.c (alpha_osf_skip_sigtramp_frame): Ditto. (alpha_init_extra_frame_info): Ditto. * infrun.c (handle_inferior_event): Ditto. (handle_inferior_event): Ditto. (check_sigtramp2): Ditto. * blockframe.c (create_new_frame): Ditto. (get_prev_frame): Ditto. * ppc-linux-tdep.c: Update comments. * i386-linux-tdep.c: Update comments. * breakpoint.c (bpstat_what): Update comment. * gdbint.texinfo (Target Architecture Definition): Replace IN_SIGTRAMP with PC_IN_SIGTRAMP.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index f6a690d..0e334cf 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2268,6 +2268,44 @@ extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbar
#endif
#endif
+/* Sigtramp is a routine that the kernel calls (which then calls the
+ signal handler). On most machines it is a library routine that is
+ linked into the executable.
+
+ This macro, given a program counter value and the name of the
+ function in which that PC resides (which can be null if the name is
+ not known), returns nonzero if the PC and name show that we are in
+ sigtramp.
+
+ On most machines just see if the name is sigtramp (and if we have
+ no name, assume we are not in sigtramp).
+
+ FIXME: cagney/2002-04-21: The function find_pc_partial_function
+ calls find_pc_sect_partial_function() which calls PC_IN_SIGTRAMP.
+ This means PC_IN_SIGTRAMP function can't be implemented by doing its
+ own local NAME lookup.
+
+ FIXME: cagney/2002-04-21: PC_IN_SIGTRAMP is something of a mess.
+ Some code also depends on SIGTRAMP_START and SIGTRAMP_END but other
+ does not. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (PC_IN_SIGTRAMP)
+#define PC_IN_SIGTRAMP(pc, name) (legacy_pc_in_sigtramp (pc, name))
+#endif
+
+typedef int (gdbarch_pc_in_sigtramp_ftype) (CORE_ADDR pc, char *name);
+extern int gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
+extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
+#error "Non multi-arch definition of PC_IN_SIGTRAMP"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_SIGTRAMP)
+#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
+#endif
+#endif
+
/* A target might have problems with watchpoints as soon as the stack
frame of the current function has been destroyed. This mostly happens
as the first action in a funtion's epilogue. in_function_epilogue_p()