* blockframe.c (frameless_look_for_prologue):
authorPeter Schauer <Peter.Schauer@mytum.de>
Sat, 18 May 1996 09:53:12 +0000 (09:53 +0000)
committerPeter Schauer <Peter.Schauer@mytum.de>
Sat, 18 May 1996 09:53:12 +0000 (09:53 +0000)
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.

gdb/ChangeLog
gdb/minsyms.c

index d864dd967faeaef9568983ee345fe75885344a9e..316f009f19b9a5ba8fbb23473dda69c0743a61ab 100644 (file)
@@ -1,3 +1,12 @@
+Sat May 18 02:43:58 1996  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
+
+       * 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.
+
 start-sanitize-gdbtk
 Fri May 17 13:54:34 1996  Fred Fish  <fnf@cygnus.com>
 
index 6c22d6cd8512774b4ce28c74a9f09c53a3440b26..11cb88f89e441edfde5c0c42641a11e0630aec76 100644 (file)
@@ -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)