summaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2007-07-31 21:56:00 +0000
committerMichael Snyder <msnyder@specifix.com>2007-07-31 21:56:00 +0000
commit98f2013c1a7c0c3970a6ca6b29c1861194c16d08 (patch)
treea7c711b1546a86f5548378d7222a716012d9d00b /gdb/f-valprint.c
parentb215e20c79ece376db48e9d38a84c28ef273b1cd (diff)
downloadgdb-98f2013c1a7c0c3970a6ca6b29c1861194c16d08.tar.gz
2007-07-31 Michael Snyder <msnyder@access-company.com>
* f-valprint.c (info_common_command): Bail out to prevent null pointer deref. Break up a long line.
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r--gdb/f-valprint.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 41a97716116..2ba10b4536f 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -671,7 +671,8 @@ info_common_command (char *comname, int from_tty)
be any minimal symbols in the middle of a function.
FIXME: (Not necessarily true. What about text labels) */
- struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (get_frame_pc (fi));
+ struct minimal_symbol *msymbol =
+ lookup_minimal_symbol_by_pc (get_frame_pc (fi));
if (msymbol != NULL
&& (SYMBOL_VALUE_ADDRESS (msymbol)
@@ -687,6 +688,8 @@ info_common_command (char *comname, int from_tty)
if (msymbol != NULL)
funname = DEPRECATED_SYMBOL_NAME (msymbol);
+ else /* Got no 'funname', code below will fail. */
+ error (_("No function found for frame."));
}
/* If comname is NULL, we assume the user wishes to see the