Skip to content

Commit 4b7703a

Browse files
author
Joel Brobecker
committed
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.
1 parent 12c8947 commit 4b7703a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

gdb/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2010-01-09 Joel Brobecker <[email protected]>
2+
3+
GDB crash while stepping into function.
4+
* infrun.c (handle_inferior_event): Refetch the current frame
5+
after handling what.main_action, in case that pointer became
6+
dangling.
7+
18
2010-01-09 Joel Brobecker <[email protected]>
29

310
Fix build failure of solaris-hosted cross debuggers.

gdb/infrun.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4066,6 +4066,11 @@ infrun: not switching back to stepped thread, it has vanished\n");
40664066
return;
40674067
}
40684068

4069+
/* Re-fetch current thread's frame in case the code above caused
4070+
the frame cache to be re-initialized, making our FRAME variable
4071+
a dangling pointer. */
4072+
frame = get_current_frame ();
4073+
40694074
/* If stepping through a line, keep going if still within it.
40704075
40714076
Note that step_range_end is the address of the first instruction

0 commit comments

Comments
 (0)