aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-07-31 21:56:00 +0000
committerMichael Snyder <msnyder@vmware.com>2007-07-31 21:56:00 +0000
commit7c6e0d4812e589c911fd4d5f6c336f56f8ef2686 (patch)
treefee1c6d1c6184865c8a5596ba07ec51e911cd073 /gdb
parentc7b1adc9a01611d4bdc9a8e4c059189857c642a1 (diff)
downloadgdb-7c6e0d4812e589c911fd4d5f6c336f56f8ef2686.zip
gdb-7c6e0d4812e589c911fd4d5f6c336f56f8ef2686.tar.gz
gdb-7c6e0d4812e589c911fd4d5f6c336f56f8ef2686.tar.bz2
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')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/f-valprint.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4acf4e7..346f915 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
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.
+
* exec.c (xfer_memory): Remove redundant condition from 'if'.
* symfile.c (reread_separate_symbols): Free xmalloced memory.
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 41a9771..2ba10b4 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