summaryrefslogtreecommitdiff
path: root/gdb/blockframe.c
diff options
context:
space:
mode:
authorgdb-2.8 <gdb@fsf.org>1988-09-03 08:00:00 +0100
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:31 +0100
commit3bf57d210832b28e9361990830eb722a619f031b (patch)
treeba506d293bde0f6500d0cee3e643ebf8890d9cf7 /gdb/blockframe.c
parent7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5 (diff)
downloadbinutils-gdb-3bf57d210832b28e9361990830eb722a619f031b.tar.gz
gdb-2.8
Diffstat (limited to 'gdb/blockframe.c')
-rw-r--r--gdb/blockframe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index b3379009b30..4acac1e6f82 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -297,6 +297,10 @@ find_pc_misc_function (pc)
/* Note that the last thing in the vector is always _etext. */
+ /* Above statement is not *always* true - fix for case where there are */
+ /* no misc functions at all (ie no symbol table has been read). */
+ if (hi < 0) return -1; /* no misc functions recorded */
+
/* trivial reject range test */
if (pc < misc_function_vector[0].address ||
pc > misc_function_vector[hi].address)