diff options
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r-- | gdb/infcall.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c index 20a2c2b..51cd118 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -744,7 +744,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) inferior. That way it breaks when it returns. */ { - struct breakpoint *bpt; + struct breakpoint *bpt, *longjmp_b; struct symtab_and_line sal; init_sal (&sal); /* initialize to zeroes */ @@ -760,6 +760,17 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) frame = NULL; bpt->disposition = disp_del; + gdb_assert (bpt->related_breakpoint == bpt); + + longjmp_b = set_longjmp_breakpoint_for_call_dummy (); + if (longjmp_b) + { + /* Link BPT into the chain of LONGJMP_B. */ + bpt->related_breakpoint = longjmp_b; + while (longjmp_b->related_breakpoint != bpt->related_breakpoint) + longjmp_b = longjmp_b->related_breakpoint; + longjmp_b->related_breakpoint = bpt; + } } /* Create a breakpoint in std::terminate. |