diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-01 20:24:48 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-01 20:24:48 +0000 |
commit | d684ab85a385dc954fe05f3dc3de69069df31d7b (patch) | |
tree | 8f76c13b7cbf2d0cc95bcab113c88ca972241886 /gdb | |
parent | bfffb7e32fe2d116b72389400289c421e11c43a1 (diff) | |
download | gdb-d684ab85a385dc954fe05f3dc3de69069df31d7b.zip gdb-d684ab85a385dc954fe05f3dc3de69069df31d7b.tar.gz gdb-d684ab85a385dc954fe05f3dc3de69069df31d7b.tar.bz2 |
2011-03-01 Michael Snyder <msnyder@vmware.com>
* reverse.c (record_restore): Move null-check to before pointer
dereference.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/record.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 81957f4..e380be2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2011-03-01 Michael Snyder <msnyder@vmware.com> + * reverse.c (record_restore): Move null-check to before pointer + dereference. + * python/py-utils.c (gdbpy_obj_to_string): Delete unused variable. * objc-lang.c (selectors_info): Add explanitory comment. diff --git a/gdb/record.c b/gdb/record.c index 784f5fa..3567382 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -2214,12 +2214,12 @@ record_restore (void) /* Now need to find our special note section. */ osec = bfd_get_section_by_name (core_bfd, "null0"); + if (osec == NULL) + return; osec_size = bfd_section_size (core_bfd, osec); if (record_debug) fprintf_unfiltered (gdb_stdlog, "Find precord section %s.\n", osec ? "succeeded" : "failed"); - if (osec == NULL) - return; if (record_debug) fprintf_unfiltered (gdb_stdlog, "%s", bfd_section_name (core_bfd, osec)); |