diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c index ed1504ec9ac..8004a38059e 100644 --- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c +++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c @@ -162,44 +162,6 @@ struct frame_info *fr; } } -CORE_ADDR -fbsd_kern_frame_chain (fr) -struct frame_info *fr; -{ - struct minimal_symbol *sym; - CORE_ADDR this_saved_pc; - enum frametype frametype; - - this_saved_pc = read_memory_integer (fr->frame + 4, 4); - sym = lookup_minimal_symbol_by_pc (this_saved_pc); - frametype = tf_normal; - if (sym != NULL) { - if (strcmp (SYMBOL_NAME(sym), "calltrap") == 0) - frametype = tf_trap; - else if (strncmp (SYMBOL_NAME(sym), "Xresume", 7) == 0) - frametype = tf_interrupt; - else if (strcmp (SYMBOL_NAME(sym), "_Xsyscall") == 0) - frametype = tf_syscall; - } - - switch (frametype) { - case tf_normal: - return (read_memory_integer (fr->frame, 4)); - -#define oEBP offsetof(struct trapframe, tf_ebp) - - case tf_trap: - return (read_memory_integer (fr->frame + 8 + oEBP, 4)); - - case tf_interrupt: - return (read_memory_integer (fr->frame + 16 + oEBP, 4)); - - case tf_syscall: - return (read_memory_integer (fr->frame + 8 + oEBP, 4)); -#undef oEBP - } -} - static CORE_ADDR ksym_lookup (name) const char *name; diff --git a/gnu/usr.bin/binutils/gdb/i386/tm.h b/gnu/usr.bin/binutils/gdb/i386/tm.h index 6f5fc9168af..39fda778633 100644 --- a/gnu/usr.bin/binutils/gdb/i386/tm.h +++ b/gnu/usr.bin/binutils/gdb/i386/tm.h @@ -35,21 +35,6 @@ extern void i386_float_info PARAMS ((void)); #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) STREQ (name, "_DYNAMIC") -/* FRAME_CHAIN takes a frame's nominal address and produces the frame's - chain-pointer. - In the case of the i386, the frame's nominal address - is the address of a 4-byte word containing the calling frame's address. */ - -extern CORE_ADDR fbsd_kern_frame_chain (struct frame_info *); -#undef FRAME_CHAIN -#define FRAME_CHAIN(thisframe) \ - (kernel_debugging ? fbsd_kern_frame_chain(thisframe) : \ - ((thisframe)->signal_handler_caller \ - ? (thisframe)->frame \ - : (!inside_entry_file ((thisframe)->pc) \ - ? read_memory_integer ((thisframe)->frame, 4) \ - : 0))) - /* Saved Pc. Get it from sigcontext if within sigtramp. */ extern CORE_ADDR fbsd_kern_frame_saved_pc (struct frame_info *); diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c index ed1504ec9ac..8004a38059e 100644 --- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c +++ b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c @@ -162,44 +162,6 @@ struct frame_info *fr; } } -CORE_ADDR -fbsd_kern_frame_chain (fr) -struct frame_info *fr; -{ - struct minimal_symbol *sym; - CORE_ADDR this_saved_pc; - enum frametype frametype; - - this_saved_pc = read_memory_integer (fr->frame + 4, 4); - sym = lookup_minimal_symbol_by_pc (this_saved_pc); - frametype = tf_normal; - if (sym != NULL) { - if (strcmp (SYMBOL_NAME(sym), "calltrap") == 0) - frametype = tf_trap; - else if (strncmp (SYMBOL_NAME(sym), "Xresume", 7) == 0) - frametype = tf_interrupt; - else if (strcmp (SYMBOL_NAME(sym), "_Xsyscall") == 0) - frametype = tf_syscall; - } - - switch (frametype) { - case tf_normal: - return (read_memory_integer (fr->frame, 4)); - -#define oEBP offsetof(struct trapframe, tf_ebp) - - case tf_trap: - return (read_memory_integer (fr->frame + 8 + oEBP, 4)); - - case tf_interrupt: - return (read_memory_integer (fr->frame + 16 + oEBP, 4)); - - case tf_syscall: - return (read_memory_integer (fr->frame + 8 + oEBP, 4)); -#undef oEBP - } -} - static CORE_ADDR ksym_lookup (name) const char *name; diff --git a/gnu/usr.bin/gdb/gdb/kvm-fbsd.c b/gnu/usr.bin/gdb/gdb/kvm-fbsd.c index ed1504ec9ac..8004a38059e 100644 --- a/gnu/usr.bin/gdb/gdb/kvm-fbsd.c +++ b/gnu/usr.bin/gdb/gdb/kvm-fbsd.c @@ -162,44 +162,6 @@ struct frame_info *fr; } } -CORE_ADDR -fbsd_kern_frame_chain (fr) -struct frame_info *fr; -{ - struct minimal_symbol *sym; - CORE_ADDR this_saved_pc; - enum frametype frametype; - - this_saved_pc = read_memory_integer (fr->frame + 4, 4); - sym = lookup_minimal_symbol_by_pc (this_saved_pc); - frametype = tf_normal; - if (sym != NULL) { - if (strcmp (SYMBOL_NAME(sym), "calltrap") == 0) - frametype = tf_trap; - else if (strncmp (SYMBOL_NAME(sym), "Xresume", 7) == 0) - frametype = tf_interrupt; - else if (strcmp (SYMBOL_NAME(sym), "_Xsyscall") == 0) - frametype = tf_syscall; - } - - switch (frametype) { - case tf_normal: - return (read_memory_integer (fr->frame, 4)); - -#define oEBP offsetof(struct trapframe, tf_ebp) - - case tf_trap: - return (read_memory_integer (fr->frame + 8 + oEBP, 4)); - - case tf_interrupt: - return (read_memory_integer (fr->frame + 16 + oEBP, 4)); - - case tf_syscall: - return (read_memory_integer (fr->frame + 8 + oEBP, 4)); -#undef oEBP - } -} - static CORE_ADDR ksym_lookup (name) const char *name; diff --git a/gnu/usr.bin/gdb/gdb/tm.h b/gnu/usr.bin/gdb/gdb/tm.h index 6f5fc9168af..39fda778633 100644 --- a/gnu/usr.bin/gdb/gdb/tm.h +++ b/gnu/usr.bin/gdb/gdb/tm.h @@ -35,21 +35,6 @@ extern void i386_float_info PARAMS ((void)); #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) STREQ (name, "_DYNAMIC") -/* FRAME_CHAIN takes a frame's nominal address and produces the frame's - chain-pointer. - In the case of the i386, the frame's nominal address - is the address of a 4-byte word containing the calling frame's address. */ - -extern CORE_ADDR fbsd_kern_frame_chain (struct frame_info *); -#undef FRAME_CHAIN -#define FRAME_CHAIN(thisframe) \ - (kernel_debugging ? fbsd_kern_frame_chain(thisframe) : \ - ((thisframe)->signal_handler_caller \ - ? (thisframe)->frame \ - : (!inside_entry_file ((thisframe)->pc) \ - ? read_memory_integer ((thisframe)->frame, 4) \ - : 0))) - /* Saved Pc. Get it from sigcontext if within sigtramp. */ extern CORE_ADDR fbsd_kern_frame_saved_pc (struct frame_info *);