summaryrefslogtreecommitdiffstats
path: root/gdb/corelow.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1996-04-17 00:48:09 +0000
committerStu Grossman <grossman@cygnus>1996-04-17 00:48:09 +0000
commit8eff3c7fe69220db3075e551f6cef34271f40d4c (patch)
tree7d9a8da9c45f20f7d6a919b7452cfccc43e7ca4c /gdb/corelow.c
parent603fdf16796dd46c9b9e1ba605a3bc79fed7f552 (diff)
downloadppe42-binutils-8eff3c7fe69220db3075e551f6cef34271f40d4c.tar.gz
ppe42-binutils-8eff3c7fe69220db3075e551f6cef34271f40d4c.zip
* corelow.c (add_to_thread_list): Make sure reg_sect is non-null
before de-referencing it. Prevents deref of NULL pointer if core file lacks .reg section. * defs.h: Rename floatformat_{to from}_long_double to floatformat_{to from}_doublest. Get rid of FLOATFORMAT_{TO FROM}... macros. * findvar.c (extract_floating store_floating): Change all refs to FLOATFORMAT_{FROM TO}... to floatformat_{from to}_doublest. * utils.c: Change floatformat_{to from}_long_double to floatformat_{to from}_doublest cuz the new routines will use whatever size (double or long double) is appropriate. * config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL REGISTER_CONVERT_TO_RAW): Change FLOATFORMAT... macros to floatformat... routine calls.
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r--gdb/corelow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 48bc1843f7..f182e9c5f7 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -133,7 +133,8 @@ add_to_thread_list (abfd, asect, reg_sect_arg)
/* Warning, Will Robinson, looking at BFD private data! */
- if (asect->filepos == reg_sect->filepos) /* Did we find .reg? */
+ if (reg_sect != NULL
+ && asect->filepos == reg_sect->filepos) /* Did we find .reg? */
inferior_pid = thread_id; /* Yes, make it current */
}
OpenPOWER on IntegriCloud