aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-01-09 04:36:00 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-01-09 04:36:00 +0000
commit4b7703adccf176d99bc0ee97efd40ee149762162 (patch)
tree2209327d47c8b3e404c701a91fe63d1a2fb6bb99
parent12c894746152a600f71e5a9c359bb40aac5d0853 (diff)
downloadfsf-binutils-gdb-4b7703adccf176d99bc0ee97efd40ee149762162.zip
fsf-binutils-gdb-4b7703adccf176d99bc0ee97efd40ee149762162.tar.gz
fsf-binutils-gdb-4b7703adccf176d99bc0ee97efd40ee149762162.tar.bz2
GDB crash while stepping into function.
* infrun.c (handle_inferior_event): Refetch the current frame after handling what.main_action, in case that pointer became dangling.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/infrun.c5
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0a5b4b5..108476c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2010-01-09 Joel Brobecker <brobecker@adacore.com>
+ GDB crash while stepping into function.
+ * infrun.c (handle_inferior_event): Refetch the current frame
+ after handling what.main_action, in case that pointer became
+ dangling.
+
+2010-01-09 Joel Brobecker <brobecker@adacore.com>
+
Fix build failure of solaris-hosted cross debuggers.
* ada-valprint.c, parse.c: Include defs.h before including ctype.h.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 3d6812d..426b816 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -4066,6 +4066,11 @@ infrun: not switching back to stepped thread, it has vanished\n");
return;
}
+ /* Re-fetch current thread's frame in case the code above caused
+ the frame cache to be re-initialized, making our FRAME variable
+ a dangling pointer. */
+ frame = get_current_frame ();
+
/* If stepping through a line, keep going if still within it.
Note that step_range_end is the address of the first instruction