From 7a8829053b26d5ad89e4bb67b4e0f687512721ab Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 8 May 2004 19:03:05 +0000 Subject: [PATCH] 2004-05-08 Andrew Cagney * gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Delete. * gdbarch.h, gdbarch.c: Re-generate. * blockframe.c (legacy_frame_chain_valid): Simplify by eliminating DEPRECATED_USE_GENERIC_DUMMY_FRAMES. * infcall.c (legacy_push_dummy_code, call_function_by_hand): Ditto. * frame.c (frame_type_from_pc, legacy_get_prev_frame): Ditto. --- gdb/ChangeLog | 7 +++++++ gdb/blockframe.c | 3 +-- gdb/frame.c | 8 ++++---- gdb/gdbarch.h | 3 --- gdb/gdbarch.sh | 3 --- gdb/infcall.c | 12 ++++-------- 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 001a8d4..5995b9f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2004-05-08 Andrew Cagney + * gdbarch.sh (DEPRECATED_USE_GENERIC_DUMMY_FRAMES): Delete. + * gdbarch.h, gdbarch.c: Re-generate. + * blockframe.c (legacy_frame_chain_valid): Simplify by eliminating + DEPRECATED_USE_GENERIC_DUMMY_FRAMES. + * infcall.c (legacy_push_dummy_code, call_function_by_hand): Ditto. + * frame.c (frame_type_from_pc, legacy_get_prev_frame): Ditto. + * breakpoint.h (deprecated_frame_in_dummy): Delete declaration. (struct frame_info): Delete opaque declaration. * breakpoint.c (deprecated_frame_in_dummy): Delete function. diff --git a/gdb/blockframe.c b/gdb/blockframe.c index a4c209a..428377e 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -527,8 +527,7 @@ int legacy_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi) { /* Don't prune CALL_DUMMY frames. */ - if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES - && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0)) return 1; /* If the new frame pointer is zero, then it isn't valid. */ diff --git a/gdb/frame.c b/gdb/frame.c index bc55484..f3e94c9 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1062,8 +1062,9 @@ const struct frame_unwind *legacy_saved_regs_unwind = &legacy_saved_regs_unwinde static enum frame_type frame_type_from_pc (CORE_ADDR pc) { - if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES - && deprecated_pc_in_call_dummy (pc, 0, 0)) + /* NOTE: cagney/2004-05-08: Eliminating this function depends on all + architectures being forced to use the frame-unwind code. */ + if (deprecated_pc_in_call_dummy (pc, 0, 0)) return DUMMY_FRAME; else return NORMAL_FRAME; @@ -1581,8 +1582,7 @@ legacy_get_prev_frame (struct frame_info *this_frame) has previously set it. This is really somewhat bogus. The initialization, as seen in create_new_frame(), should occur before the INIT function has been called. */ - if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES - && deprecated_pc_in_call_dummy (get_frame_pc (prev), 0, 0)) + if (deprecated_pc_in_call_dummy (get_frame_pc (prev), 0, 0)) prev->type = DUMMY_FRAME; if (prev->type == NORMAL_FRAME) diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 9054575..4a2f697 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -52,9 +52,6 @@ struct obstack; extern struct gdbarch *current_gdbarch; -/* Always one, being eliminated. */ -#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1 - /* If any of the following are defined, the target wasn't correctly converted. */ diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 3a06776..32bcf47 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -864,9 +864,6 @@ struct obstack; extern struct gdbarch *current_gdbarch; -/* Always one, being eliminated. */ -#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1 - /* If any of the following are defined, the target wasn't correctly converted. */ diff --git a/gdb/infcall.c b/gdb/infcall.c index 41aad92..1982c96 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -292,8 +292,7 @@ legacy_push_dummy_code (struct gdbarch *gdbarch, dummy_addr. Ulgh! Blame the HP/UX target. */ (*real_pc) += DEPRECATED_CALL_DUMMY_START_OFFSET; write_memory (start_sp, (char *) dummy1, sizeof_dummy1); - if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) - generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1); + generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1); return sp; } @@ -596,10 +595,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) internal_error (__FILE__, __LINE__, "bad switch"); } - if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) - /* Save where the breakpoint is going to be inserted so that the - dummy-frame code is later able to re-identify it. */ - generic_save_call_dummy_addr (bp_addr, bp_addr + 1); + /* Save where the breakpoint is going to be inserted so that the + dummy-frame code is later able to re-identify it. */ + generic_save_call_dummy_addr (bp_addr, bp_addr + 1); if (nargs < TYPE_NFIELDS (ftype)) error ("too few arguments in function call"); @@ -833,7 +831,6 @@ You must use a pointer to function type variable. Command ignored.", arg_name); /* Sanity. The exact same SP value is returned by PUSH_DUMMY_CALL, saved as the dummy-frame TOS, and used by unwind_dummy_id to form the frame ID's stack address. */ - gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES); generic_save_dummy_frame_tos (sp); } else if (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()) @@ -861,7 +858,6 @@ You must use a pointer to function type variable. Command ignored.", arg_name); /* Sanity. The exact same SP value is returned by PUSH_DUMMY_CALL, saved as the dummy-frame TOS, and used by unwind_dummy_id to form the frame ID's stack address. */ - gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES); frame = frame_id_build (sp, sal.pc); } else -- 2.7.4