aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1996-05-18 09:53:12 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1996-05-18 09:53:12 +0000
commitf0c56658fa5574e3239c28b033869ca7de38b9f9 (patch)
treefbe9936ad63c6c0cd328f86f9919da7efbad3ccb /gdb/minsyms.c
parent81ae689aa3a8a714e434e494e01f34b10c02e524 (diff)
downloadgdb-f0c56658fa5574e3239c28b033869ca7de38b9f9.zip
gdb-f0c56658fa5574e3239c28b033869ca7de38b9f9.tar.gz
gdb-f0c56658fa5574e3239c28b033869ca7de38b9f9.tar.bz2
* blockframe.c (frameless_look_for_prologue):
Add FUNCTION_START_OFFSET only if func_start is non-zero. * minsyms.c (lookup_minimal_symbol_by_pc): Return NULL if pc is not in a known section. * stack.c (print_frame_info): Remove check for fi->pc in known section, now handled by lookup_minimal_symbol_by_pc.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 6c22d6c..11cb88f 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -322,6 +322,12 @@ lookup_minimal_symbol_by_pc (pc)
register struct minimal_symbol *msymbol;
register struct minimal_symbol *best_symbol = NULL;
+ /* pc has to be in a known section. This ensures that anything beyond
+ the end of the last segment doesn't appear to be part of the last
+ function in the last segment. */
+ if (find_pc_section (pc) == NULL)
+ return NULL;
+
for (objfile = object_files;
objfile != NULL;
objfile = objfile -> next)