diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-06-16 20:00:24 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-06-16 20:00:24 +0000 |
commit | 7824d2f224517915cf8001aaf29988a93a4b4b90 (patch) | |
tree | 7cc55b046a5fa48ab6c5307bb53904a39ee8f4d5 | |
parent | 1622c8f76475cdcba35e690db46bf48fe0238617 (diff) | |
download | gdb-7824d2f224517915cf8001aaf29988a93a4b4b90.zip gdb-7824d2f224517915cf8001aaf29988a93a4b4b90.tar.gz gdb-7824d2f224517915cf8001aaf29988a93a4b4b90.tar.bz2 |
* arch-utils.c (init_frame_pc_default): New function
* arch-utils.h (init_frame_pc_default): Declare.
* gdbarch.sh (INIT_FRAME_PC): Default to init_frame_pc_default and
not init_frame_pc_noop.
* gdbarch.h, gdbarch.c: Re-generate.
* blockframe.c (INIT_FRAME_PC): Delete macro definition.
* mips-tdep.c (mips_gdbarch_init): Set init_frame_pc to
init_frame_pc_noop.
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/arch-utils.c | 11 | ||||
-rw-r--r-- | gdb/arch-utils.h | 4 | ||||
-rw-r--r-- | gdb/blockframe.c | 6 | ||||
-rw-r--r-- | gdb/gdbarch.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch.h | 2 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 1 |
8 files changed, 29 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a5b11f7..bcd919c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2001-06-16 Andrew Cagney <ac131313@redhat.com> + * arch-utils.c (init_frame_pc_default): New function + * arch-utils.h (init_frame_pc_default): Declare. + * gdbarch.sh (INIT_FRAME_PC): Default to init_frame_pc_default and + not init_frame_pc_noop. + * gdbarch.h, gdbarch.c: Re-generate. + * blockframe.c (INIT_FRAME_PC): Delete macro definition. + * mips-tdep.c (mips_gdbarch_init): Set init_frame_pc to + init_frame_pc_noop. + +2001-06-16 Andrew Cagney <ac131313@redhat.com> + * gdbarch.c: Regenerate. Out-of-sync with gdbarch.sh. 2001-06-15 Andrew Cagney <ac131313@redhat.com> diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 24ca70f..3da3c27 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -306,6 +306,17 @@ init_frame_pc_noop (int fromleaf, struct frame_info *prev) return; } +void +init_frame_pc_default (int fromleaf, struct frame_info *prev) +{ + if (fromleaf) + prev->pc = SAVED_PC_AFTER_CALL (prev->next); + else if (prev->next != NULL) + prev->pc = FRAME_SAVED_PC (prev->next); + else + prev->pc = read_pc (); +} + int cannot_register_not (int regnum) { diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 9934bbf..071b530 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -111,10 +111,12 @@ extern int default_prepare_to_proceed (int select_it); extern int generic_prepare_to_proceed (int select_it); -/* Version of init_frame_pc() that does nothing. */ +/* Versions of init_frame_pc(). Do nothing; do the default. */ void init_frame_pc_noop (int fromleaf, struct frame_info *prev); +void init_frame_pc_default (int fromleaf, struct frame_info *prev); + /* Version of cannot_fetch_register() / cannot_store_register() that always fails. */ diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 68da4fd..34e1484 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -304,12 +304,6 @@ frameless_look_for_prologue (struct frame_info *frame) /* Default a few macros that people seldom redefine. */ -#if !defined (INIT_FRAME_PC) -#define INIT_FRAME_PC(fromleaf, prev) \ - prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \ - prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ()); -#endif - #ifndef FRAME_CHAIN_COMBINE #define FRAME_CHAIN_COMBINE(chain, thisframe) (chain) #endif diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index fc23d3e..bac36c2 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -471,7 +471,7 @@ gdbarch_alloc (const struct gdbarch_info *info, gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; gdbarch->call_dummy_stack_adjust_p = -1; gdbarch->init_frame_pc_first = init_frame_pc_noop; - gdbarch->init_frame_pc = init_frame_pc_noop; + gdbarch->init_frame_pc = init_frame_pc_default; gdbarch->coerce_float_to_double = default_coerce_float_to_double; gdbarch->register_convertible = generic_register_convertible_not; gdbarch->pointer_to_address = unsigned_pointer_to_address; diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 586f4e8..9f2d0c0 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -833,7 +833,7 @@ extern void set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, gdbarch_in /* Default (function) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (INIT_FRAME_PC) -#define INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev)) +#define INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_default (fromleaf, prev)) #endif typedef void (gdbarch_init_frame_pc_ftype) (int fromleaf, struct frame_info *prev); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 449e7d6..b2c20f1 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -447,7 +447,7 @@ v:1:CALL_DUMMY_STACK_ADJUST_P:int:call_dummy_stack_adjust_p::::0:-1:::0x%08lx v:2:CALL_DUMMY_STACK_ADJUST:int:call_dummy_stack_adjust::::0:::gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0:0x%08lx::CALL_DUMMY_STACK_ADJUST_P f:2:FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p:::0 f:2:INIT_FRAME_PC_FIRST:void:init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev:::init_frame_pc_noop::0 -f:2:INIT_FRAME_PC:void:init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev:::init_frame_pc_noop::0 +f:2:INIT_FRAME_PC:void:init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev:::init_frame_pc_default::0 # v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion::::::: v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type::::::: diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index bb7a6c4..c56d97e 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -4130,6 +4130,7 @@ mips_gdbarch_init (struct gdbarch_info info, /* There's a mess in stack frame creation. See comments in blockframe.c near reference to INIT_FRAME_PC_FIRST. */ set_gdbarch_init_frame_pc_first (gdbarch, mips_init_frame_pc_first); + set_gdbarch_init_frame_pc (gdbarch, init_frame_pc_noop); /* Map debug register numbers onto internal register numbers. */ set_gdbarch_stab_reg_to_regnum (gdbarch, mips_stab_reg_to_regnum); |