From: Andrew Cagney Date: Wed, 16 Jul 2003 22:29:13 +0000 (+0000) Subject: 2003-07-16 Andrew Cagney X-Git-Tag: ezannoni_pie-20030916-branchpoint~742 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=336d1bba0aa5fa96bab6d7fb23317be1374ad151;p=platform%2Fupstream%2Fbinutils.git 2003-07-16 Andrew Cagney * frame-base.h (frame_base_p_ftype): Delete definition. (frame_base_append_predicate): Delete declaration. * frame-unwind.h (frame_unwind_p_ftype): Delete definition. (frame_unwind_append_predicate): Delete declaration. * frame-unwind.c (struct frame_unwind_table): Delete field "p". (append_predicate): Delete parameter "p". (frame_unwind_append_predicate): Delete function. (frame_unwind_append_sniffer): Update call to append_predicate. (frame_unwind_free): Delete function. (_initialize_frame_unwind): Pass NULL as "free" to register_gdbarch_data. (frame_unwind_init): Append the dummy_frame_sniffer. (frame_unwind_find_by_frame): Simplify. * frame-base.c (struct frame_base_table): Delete field "p". (append_predicate): Delete parameter "p". (frame_base_append_predicate): Delete function. (frame_base_append_sniffer): Update call to append_predicate. (frame_base_free): Delete function. (frame_base_find_by_frame): Simplify. (_initialize_frame_base): Pass NULL as "free" to register_gdbarch_data. * x86-64-tdep.c (x86_64_frame_sniffer): Replace "x86_64_frame_p". (x86_64_sigtramp_frame_sniffer): Replace "x86_64_sigtramp_frame_p". (x86_64_init_abi): Set the frame unwind sniffers. * m68k-tdep.c (m68k_frame_sniffer): Replace "m68k_frame_p". (m68k_sigtramp_frame_sniffer): Replace "m68k_sigtramp_frame_p" (m68k_gdbarch_init): Set the frame unwind sniffers. * i386-tdep.c (i386_sigtramp_frame_sniffer): Replace "i386_sigtramp_frame_p". (i386_frame_sniffer): Replace "i386_frame_p". (i386_gdbarch_init): Set the frame unwind sniffers. * avr-tdep.c (avr_frame_sniffer): Replace "avr_frame_sniffer". (avr_gdbarch_init): Set the frame unwind sniffers. * alpha-tdep.c (alpha_sigtramp_frame_sniffer): Replace "alpha_sigtramp_frame_p" (alpha_heuristic_frame_sniffer): Replace "alpha_heuristic_frame_p". (alpha_gdbarch_init): Set the frame unwind sniffers. (alpha_dwarf2_init_abi): Ditto. * alpha-mdebug-tdep.c (alpha_mdebug_frame_sniffer): Replace "alpha_debug_frame_p". (alpha_mdebug_frame_base_sniffer): Replace "alpha_mdebug_frame_base_p". (alpha_mdebug_init_abi): Set the frame unwind sniffers. * d10v-tdep.c (d10v_frame_sniffer): Replace "d10v_frame_p". (d10v_gdbarch_init): Set the frame unwind sniffer. * dwarf2-frame.c (dwarf2_frame_sniffer): Replace "dwarf2_frame_p". (dwarf2_frame_base_sniffer): Replace "dwarf2_frame_base_p". * dwarf2-frame.h (dwarf2_frame_sniffer): Replace "dwarf2_frame_p". (dwarf2_frame_base_sniffer): Replace "dwarf2_frame_base_p". * dummy-frame.c (dummy_frame_sniffer): Replace "dummy_frame_p". * dummy-frame.h (dummy_frame_sniffer): Replace "dummy_frame_p". --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 880eae2..2d74ba2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,59 @@ +2003-07-16 Andrew Cagney + + * frame-base.h (frame_base_p_ftype): Delete definition. + (frame_base_append_predicate): Delete declaration. + * frame-unwind.h (frame_unwind_p_ftype): Delete definition. + (frame_unwind_append_predicate): Delete declaration. + * frame-unwind.c (struct frame_unwind_table): Delete field "p". + (append_predicate): Delete parameter "p". + (frame_unwind_append_predicate): Delete function. + (frame_unwind_append_sniffer): Update call to append_predicate. + (frame_unwind_free): Delete function. + (_initialize_frame_unwind): Pass NULL as "free" to + register_gdbarch_data. + (frame_unwind_init): Append the dummy_frame_sniffer. + (frame_unwind_find_by_frame): Simplify. + * frame-base.c (struct frame_base_table): Delete field "p". + (append_predicate): Delete parameter "p". + (frame_base_append_predicate): Delete function. + (frame_base_append_sniffer): Update call to append_predicate. + (frame_base_free): Delete function. + (frame_base_find_by_frame): Simplify. + (_initialize_frame_base): Pass NULL as "free" to + register_gdbarch_data. + * x86-64-tdep.c (x86_64_frame_sniffer): Replace "x86_64_frame_p". + (x86_64_sigtramp_frame_sniffer): Replace + "x86_64_sigtramp_frame_p". + (x86_64_init_abi): Set the frame unwind sniffers. + * m68k-tdep.c (m68k_frame_sniffer): Replace "m68k_frame_p". + (m68k_sigtramp_frame_sniffer): Replace "m68k_sigtramp_frame_p" + (m68k_gdbarch_init): Set the frame unwind sniffers. + * i386-tdep.c (i386_sigtramp_frame_sniffer): Replace + "i386_sigtramp_frame_p". + (i386_frame_sniffer): Replace "i386_frame_p". + (i386_gdbarch_init): Set the frame unwind sniffers. + * avr-tdep.c (avr_frame_sniffer): Replace "avr_frame_sniffer". + (avr_gdbarch_init): Set the frame unwind sniffers. + * alpha-tdep.c (alpha_sigtramp_frame_sniffer): Replace + "alpha_sigtramp_frame_p" + (alpha_heuristic_frame_sniffer): Replace + "alpha_heuristic_frame_p". + (alpha_gdbarch_init): Set the frame unwind sniffers. + (alpha_dwarf2_init_abi): Ditto. + * alpha-mdebug-tdep.c (alpha_mdebug_frame_sniffer): Replace + "alpha_debug_frame_p". + (alpha_mdebug_frame_base_sniffer): Replace + "alpha_mdebug_frame_base_p". + (alpha_mdebug_init_abi): Set the frame unwind sniffers. + * d10v-tdep.c (d10v_frame_sniffer): Replace "d10v_frame_p". + (d10v_gdbarch_init): Set the frame unwind sniffer. + * dwarf2-frame.c (dwarf2_frame_sniffer): Replace "dwarf2_frame_p". + (dwarf2_frame_base_sniffer): Replace "dwarf2_frame_base_p". + * dwarf2-frame.h (dwarf2_frame_sniffer): Replace "dwarf2_frame_p". + (dwarf2_frame_base_sniffer): Replace "dwarf2_frame_base_p". + * dummy-frame.c (dummy_frame_sniffer): Replace "dummy_frame_p". + * dummy-frame.h (dummy_frame_sniffer): Replace "dummy_frame_p". + 2003-07-16 Michael Snyder * sh-tdep.c (sh_gdbarch_init): Fetch_registers for the sh3-dsp diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c index 9eb9c62..153ed11 100644 --- a/gdb/alpha-mdebug-tdep.c +++ b/gdb/alpha-mdebug-tdep.c @@ -304,8 +304,9 @@ static const struct frame_unwind alpha_mdebug_frame_unwind = { }; const struct frame_unwind * -alpha_mdebug_frame_p (CORE_ADDR pc) +alpha_mdebug_frame_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); alpha_extra_func_info_t proc_desc; /* If this PC does not map to a PDR, then clearly this isn't an @@ -360,8 +361,9 @@ static const struct frame_base alpha_mdebug_frame_base = { }; static const struct frame_base * -alpha_mdebug_frame_base_p (CORE_ADDR pc) +alpha_mdebug_frame_base_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); alpha_extra_func_info_t proc_desc; /* If this PC does not map to a PDR, then clearly this isn't an @@ -379,6 +381,6 @@ alpha_mdebug_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - frame_unwind_append_predicate (gdbarch, alpha_mdebug_frame_p); - frame_base_append_predicate (gdbarch, alpha_mdebug_frame_base_p); + frame_unwind_append_sniffer (gdbarch, alpha_mdebug_frame_sniffer); + frame_base_append_sniffer (gdbarch, alpha_mdebug_frame_base_sniffer); } diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 0a3185f..646b261 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -858,8 +858,9 @@ static const struct frame_unwind alpha_sigtramp_frame_unwind = { }; static const struct frame_unwind * -alpha_sigtramp_frame_p (CORE_ADDR pc) +alpha_sigtramp_frame_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); char *name; /* We shouldn't even bother to try if the OSABI didn't register @@ -1199,7 +1200,7 @@ static const struct frame_unwind alpha_heuristic_frame_unwind = { }; static const struct frame_unwind * -alpha_heuristic_frame_p (CORE_ADDR pc) +alpha_heuristic_frame_sniffer (struct frame_info *next_frame) { return &alpha_heuristic_frame_unwind; } @@ -1571,8 +1572,8 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) if (tdep->jb_pc >= 0) set_gdbarch_get_longjmp_target (gdbarch, alpha_get_longjmp_target); - frame_unwind_append_predicate (gdbarch, alpha_sigtramp_frame_p); - frame_unwind_append_predicate (gdbarch, alpha_heuristic_frame_p); + frame_unwind_append_sniffer (gdbarch, alpha_sigtramp_frame_sniffer); + frame_unwind_append_sniffer (gdbarch, alpha_heuristic_frame_sniffer); frame_base_set_default (gdbarch, &alpha_heuristic_frame_base); @@ -1582,8 +1583,8 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) void alpha_dwarf2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { - frame_unwind_append_predicate (gdbarch, dwarf2_frame_p); - frame_base_append_predicate (gdbarch, dwarf2_frame_base_p); + frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer); + frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer); set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info); } diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index b060ea6..3e3d264 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1080,7 +1080,7 @@ static const struct frame_unwind avr_frame_unwind = { }; const struct frame_unwind * -avr_frame_p (CORE_ADDR pc) +avr_frame_sniffer (struct frame_info *next_frame) { return &avr_frame_unwind; } @@ -1350,7 +1350,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); - frame_unwind_append_predicate (gdbarch, avr_frame_p); + frame_unwind_append_sniffer (gdbarch, avr_frame_sniffer); frame_base_set_default (gdbarch, &avr_frame_base); set_gdbarch_unwind_dummy_id (gdbarch, avr_unwind_dummy_id); diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index eafe0cc..ac52ab6 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -1440,7 +1440,7 @@ static const struct frame_unwind d10v_frame_unwind = { }; static const struct frame_unwind * -d10v_frame_p (CORE_ADDR pc) +d10v_frame_sniffer (struct frame_info *next_frame) { return &d10v_frame_unwind; } @@ -1580,7 +1580,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_print_registers_info (gdbarch, d10v_print_registers_info); - frame_unwind_append_predicate (gdbarch, d10v_frame_p); + frame_unwind_append_sniffer (gdbarch, d10v_frame_sniffer); frame_base_set_default (gdbarch, &d10v_frame_base); /* Methods for saving / extracting a dummy frame's ID. The ID's diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index 9870433..36c7dbb 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -408,8 +408,9 @@ static struct frame_unwind dummy_frame_unwind = }; const struct frame_unwind * -dummy_frame_p (CORE_ADDR pc) +dummy_frame_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); if (DEPRECATED_PC_IN_CALL_DUMMY_P () ? DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0) : pc_in_dummy_frame (pc)) diff --git a/gdb/dummy-frame.h b/gdb/dummy-frame.h index ae090e3..cde9eb7 100644 --- a/gdb/dummy-frame.h +++ b/gdb/dummy-frame.h @@ -48,7 +48,7 @@ struct frame_id; /* If the PC falls in a dummy frame, return a dummy frame unwinder. */ -extern const struct frame_unwind *dummy_frame_p (CORE_ADDR pc); +extern const struct frame_unwind *dummy_frame_sniffer (struct frame_info *next_frame); /* Does the PC fall in a dummy frame? diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index e0b1a05..1ddf914 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -708,8 +708,9 @@ static const struct frame_unwind dwarf2_frame_unwind = }; const struct frame_unwind * -dwarf2_frame_p (CORE_ADDR pc) +dwarf2_frame_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); /* The way GDB works, this function can be called with PC just after the last instruction of the function we're supposed to return the unwind methods for. In that case we won't find the correct FDE; @@ -748,8 +749,9 @@ static const struct frame_base dwarf2_frame_base = }; const struct frame_base * -dwarf2_frame_base_p (CORE_ADDR pc) +dwarf2_frame_base_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); if (dwarf2_frame_find_fde (&pc)) return &dwarf2_frame_base; diff --git a/gdb/dwarf2-frame.h b/gdb/dwarf2-frame.h index 4b4c1a5..9fd85bd 100644 --- a/gdb/dwarf2-frame.h +++ b/gdb/dwarf2-frame.h @@ -29,12 +29,12 @@ struct objfile; /* Return the frame unwind methods for the function that contains PC, or NULL if it can't be handled by DWARF CFI frame unwinder. */ -const struct frame_unwind *dwarf2_frame_p (CORE_ADDR pc); +const struct frame_unwind *dwarf2_frame_sniffer (struct frame_info *next_frame); /* Return the frame base methods for the function that contains PC, or NULL if it can't be handled by the DWARF CFI frame unwinder. */ -const struct frame_base *dwarf2_frame_base_p (CORE_ADDR pc); +const struct frame_base *dwarf2_frame_base_sniffer (struct frame_info *next_frame); /* Register the DWARF CFI for OBJFILE. */ diff --git a/gdb/frame-base.c b/gdb/frame-base.c index 86d955b..ad2d7b8 100644 --- a/gdb/frame-base.c +++ b/gdb/frame-base.c @@ -70,7 +70,6 @@ static struct gdbarch_data *frame_base_data; struct frame_base_table { - frame_base_p_ftype **p; frame_base_sniffer_ftype **sniffer; const struct frame_base *default_base; int nr; @@ -84,16 +83,6 @@ frame_base_init (struct gdbarch *gdbarch) return table; } -static void -frame_base_free (struct gdbarch *gdbarch, void *data) -{ - struct frame_base_table *table = - gdbarch_data (gdbarch, frame_base_data); - xfree (table->p); - xfree (table->sniffer); - xfree (table); -} - static struct frame_base_table * frame_base_table (struct gdbarch *gdbarch) { @@ -110,33 +99,22 @@ frame_base_table (struct gdbarch *gdbarch) /* Append a predicate to the end of the table. */ static void -append_predicate (struct frame_base_table *table, frame_base_p_ftype *p, +append_predicate (struct frame_base_table *table, frame_base_sniffer_ftype *sniffer) { - table->p = xrealloc (table->p, ((table->nr + 1) - * sizeof (frame_base_p_ftype *))); table->sniffer = xrealloc (table->sniffer, ((table->nr + 1) * sizeof (frame_base_sniffer_ftype *))); - table->p[table->nr] = p; table->sniffer[table->nr] = sniffer; table->nr++; } void -frame_base_append_predicate (struct gdbarch *gdbarch, - frame_base_p_ftype *p) -{ - struct frame_base_table *table = frame_base_table (gdbarch); - append_predicate (table, p, NULL); -} - -void frame_base_append_sniffer (struct gdbarch *gdbarch, frame_base_sniffer_ftype *sniffer) { struct frame_base_table *table = frame_base_table (gdbarch); - append_predicate (table, NULL, sniffer); + append_predicate (table, sniffer); } void @@ -156,10 +134,7 @@ frame_base_find_by_frame (struct frame_info *next_frame) for (i = 0; i < table->nr; i++) { const struct frame_base *desc = NULL; - if (table->p[i] != NULL) - desc = table->p[i] (frame_pc_unwind (next_frame)); - else if (table->sniffer[i] != NULL) - desc = table->sniffer[i] (next_frame); + desc = table->sniffer[i] (next_frame); if (desc != NULL) return desc; } @@ -171,6 +146,5 @@ extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-prototypes */ void _initialize_frame_base (void) { - frame_base_data = register_gdbarch_data (frame_base_init, - frame_base_free); + frame_base_data = register_gdbarch_data (frame_base_init, NULL); } diff --git a/gdb/frame-base.h b/gdb/frame-base.h index 7433c54..680e9d5 100644 --- a/gdb/frame-base.h +++ b/gdb/frame-base.h @@ -29,12 +29,6 @@ struct frame_base; struct gdbarch; struct regcache; -/* For compatibility. */ - -typedef const struct frame_base *(frame_base_p_ftype) (CORE_ADDR pc); -extern void frame_base_append_predicate (struct gdbarch *gdbarch, - frame_base_p_ftype *p); - /* Assuming the frame chain: (outer) prev <-> this <-> next (inner); and that this is a `normal frame'; use the NEXT frame, and its register unwind method, to determine the address of THIS frame's diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index ed43cb3..dda92b0 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -29,21 +29,17 @@ static struct gdbarch_data *frame_unwind_data; struct frame_unwind_table { - frame_unwind_p_ftype **p; frame_unwind_sniffer_ftype **sniffer; int nr; }; /* Append a predicate to the end of the table. */ static void -append_predicate (struct frame_unwind_table *table, frame_unwind_p_ftype *p, +append_predicate (struct frame_unwind_table *table, frame_unwind_sniffer_ftype *sniffer) { - table->p = xrealloc (table->p, ((table->nr + 1) - * sizeof (frame_unwind_p_ftype *))); table->sniffer = xrealloc (table->sniffer, ((table->nr + 1) * sizeof (frame_unwind_sniffer_ftype *))); - table->p[table->nr] = p; table->sniffer[table->nr] = sniffer; table->nr++; } @@ -52,36 +48,10 @@ static void * frame_unwind_init (struct gdbarch *gdbarch) { struct frame_unwind_table *table = XCALLOC (1, struct frame_unwind_table); - append_predicate (table, dummy_frame_p, NULL); + append_predicate (table, dummy_frame_sniffer); return table; } -static void -frame_unwind_free (struct gdbarch *gdbarch, void *data) -{ - struct frame_unwind_table *table = - gdbarch_data (gdbarch, frame_unwind_data); - xfree (table->p); - xfree (table->sniffer); - xfree (table); -} - -void -frame_unwind_append_predicate (struct gdbarch *gdbarch, - frame_unwind_p_ftype *p) -{ - struct frame_unwind_table *table = - gdbarch_data (gdbarch, frame_unwind_data); - if (table == NULL) - { - /* ULGH, called during architecture initialization. Patch - things up. */ - table = frame_unwind_init (gdbarch); - set_gdbarch_data (gdbarch, frame_unwind_data, table); - } - append_predicate (table, p, NULL); -} - void frame_unwind_append_sniffer (struct gdbarch *gdbarch, frame_unwind_sniffer_ftype *sniffer) @@ -95,7 +65,7 @@ frame_unwind_append_sniffer (struct gdbarch *gdbarch, table = frame_unwind_init (gdbarch); set_gdbarch_data (gdbarch, frame_unwind_data, table); } - append_predicate (table, NULL, sniffer); + append_predicate (table, sniffer); } const struct frame_unwind * @@ -113,12 +83,7 @@ frame_unwind_find_by_frame (struct frame_info *next_frame) for (i = 0; i < table->nr; i++) { const struct frame_unwind *desc; - if (table->p[i] != NULL) - desc = table->p[i] (frame_pc_unwind (next_frame)); - else if (table->sniffer[i] != NULL) - desc = table->sniffer[i] (next_frame); - else - internal_error (__FILE__, __LINE__, "Missing sniffer?"); + desc = table->sniffer[i] (next_frame); if (desc != NULL) return desc; } @@ -130,6 +95,5 @@ extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes * void _initialize_frame_unwind (void) { - frame_unwind_data = register_gdbarch_data (frame_unwind_init, - frame_unwind_free); + frame_unwind_data = register_gdbarch_data (frame_unwind_init, NULL); } diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h index 80ce4b6..8d17280 100644 --- a/gdb/frame-unwind.h +++ b/gdb/frame-unwind.h @@ -30,12 +30,6 @@ struct regcache; #include "frame.h" /* For enum frame_type. */ -/* For compatibility with the old frame code. See end of header for - new methods. */ -typedef const struct frame_unwind *(frame_unwind_p_ftype) (CORE_ADDR pc); -extern void frame_unwind_append_predicate (struct gdbarch *gdbarch, - frame_unwind_p_ftype *p); - /* The following unwind functions assume a chain of frames forming the sequence: (outer) prev <-> this <-> next (inner). All the functions are called with called with the next frame's `struct diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 3b98180..6674194 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -851,7 +851,7 @@ static const struct frame_unwind i386_frame_unwind = }; static const struct frame_unwind * -i386_frame_p (CORE_ADDR pc) +i386_frame_sniffer (struct frame_info *next_frame) { return &i386_frame_unwind; } @@ -929,8 +929,9 @@ static const struct frame_unwind i386_sigtramp_frame_unwind = }; static const struct frame_unwind * -i386_sigtramp_frame_p (CORE_ADDR pc) +i386_sigtramp_frame_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); char *name; /* We shouldn't even bother to try if the OSABI didn't register @@ -1811,7 +1812,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument); /* Hook in the DWARF CFI frame unwinder. */ - frame_unwind_append_predicate (gdbarch, dwarf2_frame_p); + frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer); set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info); frame_base_set_default (gdbarch, &i386_frame_base); @@ -1819,8 +1820,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); - frame_unwind_append_predicate (gdbarch, i386_sigtramp_frame_p); - frame_unwind_append_predicate (gdbarch, i386_frame_p); + frame_unwind_append_sniffer (gdbarch, i386_sigtramp_frame_sniffer); + frame_unwind_append_sniffer (gdbarch, i386_frame_sniffer); return gdbarch; } diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 97ac076..bbc14d3 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -784,7 +784,7 @@ static const struct frame_unwind m68k_frame_unwind = }; static const struct frame_unwind * -m68k_frame_p (CORE_ADDR pc) +m68k_frame_sniffer (struct frame_info *next_frame) { return &m68k_frame_unwind; } @@ -851,8 +851,9 @@ static const struct frame_unwind m68k_sigtramp_frame_unwind = }; static const struct frame_unwind * -m68k_sigtramp_frame_p (CORE_ADDR pc) +m68k_sigtramp_frame_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); char *name; /* We shouldn't even bother to try if the OSABI didn't register @@ -1162,8 +1163,8 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) if (tdep->jb_pc >= 0) set_gdbarch_get_longjmp_target (gdbarch, m68k_get_longjmp_target); - frame_unwind_append_predicate (gdbarch, m68k_sigtramp_frame_p); - frame_unwind_append_predicate (gdbarch, m68k_frame_p); + frame_unwind_append_sniffer (gdbarch, m68k_sigtramp_frame_sniffer); + frame_unwind_append_sniffer (gdbarch, m68k_frame_sniffer); return gdbarch; } diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index a93af05..a2ae631 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -1077,7 +1077,7 @@ static const struct frame_unwind x86_64_frame_unwind = }; static const struct frame_unwind * -x86_64_frame_p (CORE_ADDR pc) +x86_64_frame_sniffer (struct frame_info *next_frame) { return &x86_64_frame_unwind; } @@ -1149,8 +1149,9 @@ static const struct frame_unwind x86_64_sigtramp_frame_unwind = }; static const struct frame_unwind * -x86_64_sigtramp_frame_p (CORE_ADDR pc) +x86_64_sigtramp_frame_sniffer (struct frame_info *next_frame) { + CORE_ADDR pc = frame_pc_unwind (next_frame); char *name; find_pc_partial_function (pc, &name, NULL, NULL); @@ -1260,8 +1261,8 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) in the future. */ set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); - frame_unwind_append_predicate (gdbarch, x86_64_sigtramp_frame_p); - frame_unwind_append_predicate (gdbarch, x86_64_frame_p); + frame_unwind_append_sniffer (gdbarch, x86_64_sigtramp_frame_sniffer); + frame_unwind_append_sniffer (gdbarch, x86_64_frame_sniffer); frame_base_set_default (gdbarch, &x86_64_frame_base); }