diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-12-14 01:06:04 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-12-14 01:06:04 +0000 |
commit | c4093a6ab3c9ba5f830ca18d91d8b4db5b1d28ee (patch) | |
tree | 273969a6c8a28b0f0128edd803506abf025371b1 /gdb/blockframe.c | |
parent | a3a8c91d411abe91720a2ac92b8140e1bdb41282 (diff) | |
download | gdb-c4093a6ab3c9ba5f830ca18d91d8b4db5b1d28ee.zip gdb-c4093a6ab3c9ba5f830ca18d91d8b4db5b1d28ee.tar.gz gdb-c4093a6ab3c9ba5f830ca18d91d8b4db5b1d28ee.tar.bz2 |
import gdb-1999-12-13 snapshot
Diffstat (limited to 'gdb/blockframe.c')
-rw-r--r-- | gdb/blockframe.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/gdb/blockframe.c b/gdb/blockframe.c index b4f42d2..6ce753e 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -41,13 +41,12 @@ void _initialize_blockframe (void); frame is the outermost one and has no caller. */ int -default_frame_chain_valid (chain, thisframe) +file_frame_chain_valid (chain, thisframe) CORE_ADDR chain; struct frame_info *thisframe; { return ((chain) != 0 - && !inside_main_func ((thisframe)->pc) - && !inside_entry_func ((thisframe)->pc)); + && !inside_entry_file (FRAME_SAVED_PC (thisframe))); } /* Use the alternate method of avoiding running up off the end of the @@ -55,12 +54,13 @@ default_frame_chain_valid (chain, thisframe) the comments in objfiles.h. */ int -alternate_frame_chain_valid (chain, thisframe) +func_frame_chain_valid (chain, thisframe) CORE_ADDR chain; struct frame_info *thisframe; { return ((chain) != 0 - && !inside_entry_file (FRAME_SAVED_PC (thisframe))); + && !inside_main_func ((thisframe)->pc) + && !inside_entry_func ((thisframe)->pc)); } /* A very simple method of determining a valid frame */ @@ -1104,7 +1104,7 @@ pc_in_call_dummy_at_entry_point (pc, sp, frame_address) * zero, and CALL_DUMMY_LOCATION to AT_ENTRY. Then you must remember * to define PUSH_RETURN_ADDRESS, because no call instruction will be * being executed by the target. Also FRAME_CHAIN_VALID as - * generic_frame_chain_valid and FIX_CALL_DUMMY as + * generic_{file,func}_frame_chain_valid and FIX_CALL_DUMMY as * generic_fix_call_dummy. */ /* Dummy frame. This saves the processor state just prior to setting @@ -1270,7 +1270,7 @@ generic_pop_dummy_frame () and false for the CRT0 start-up frame. Purpose is to terminate backtrace */ int -generic_frame_chain_valid (fp, fi) +generic_file_frame_chain_valid (fp, fi) CORE_ADDR fp; struct frame_info *fi; { @@ -1282,6 +1282,20 @@ generic_frame_chain_valid (fp, fi) && !inside_entry_file (FRAME_SAVED_PC (fi))); } +int +generic_func_frame_chain_valid (fp, fi) + CORE_ADDR fp; + struct frame_info *fi; +{ + if (PC_IN_CALL_DUMMY ((fi)->pc, fp, fp)) + return 1; /* don't prune CALL_DUMMY frames */ + else /* fall back to default algorithm (see frame.h) */ + return (fp != 0 + && (INNER_THAN (fi->frame, fp) || fi->frame == fp) + && !inside_main_func ((fi)->pc) + && !inside_entry_func ((fi)->pc)); +} + /* Function: fix_call_dummy Stub function. Generic dumy frames typically do not need to fix the frame being created */ |