aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 16d3c8c..86c3112 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1385,6 +1385,8 @@ hand_function_call (struct value *function, int nargs, struct value **args)
if (CALL_DUMMY_LOCATION == ON_STACK)
{
write_memory (start_sp, (char *) dummy1, sizeof_dummy1);
+ if (USE_GENERIC_DUMMY_FRAMES)
+ generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1);
}
if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END)
@@ -1401,6 +1403,8 @@ hand_function_call (struct value *function, int nargs, struct value **args)
sp = old_sp;
real_pc = text_end - sizeof_dummy1;
write_memory (real_pc, (char *) dummy1, sizeof_dummy1);
+ if (USE_GENERIC_DUMMY_FRAMES)
+ generic_save_call_dummy_addr (real_pc, real_pc + sizeof_dummy1);
}
if (CALL_DUMMY_LOCATION == AFTER_TEXT_END)
@@ -1412,11 +1416,18 @@ hand_function_call (struct value *function, int nargs, struct value **args)
errcode = target_write_memory (real_pc, (char *) dummy1, sizeof_dummy1);
if (errcode != 0)
error ("Cannot write text segment -- call_function failed");
+ if (USE_GENERIC_DUMMY_FRAMES)
+ generic_save_call_dummy_addr (real_pc, real_pc + sizeof_dummy1);
}
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
real_pc = funaddr;
+ if (USE_GENERIC_DUMMY_FRAMES)
+ /* NOTE: cagney/2002-04-13: The entry point is going to be
+ modified with a single breakpoint. */
+ generic_save_call_dummy_addr (CALL_DUMMY_ADDRESS (),
+ CALL_DUMMY_ADDRESS () + 1);
}
#ifdef lint