diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-04-26 03:37:42 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-04-26 03:37:42 +0000 |
commit | 6096c27ac0ed55998d2c8d887254c75a19afca0d (patch) | |
tree | d431257effc3773805733fe0f21ba5598e061a2f /gdb/valops.c | |
parent | eba91044963246c0246346b7ccd1242a49bd6737 (diff) | |
download | gdb-6096c27ac0ed55998d2c8d887254c75a19afca0d.zip gdb-6096c27ac0ed55998d2c8d887254c75a19afca0d.tar.gz gdb-6096c27ac0ed55998d2c8d887254c75a19afca0d.tar.bz2 |
* valops.c (hand_function_call): Call
generic_save_call_dummy_addr.
* frame.h (generic_save_call_dummy_addr): Declare.
* blockframe.c (struct dummy_frame): Add fields call_lo and
call_hi.
(generic_find_dummy_frame): Check for PC in range call_lo to
call_hi instead of entry_point_address.
(generic_pc_in_call_dummy): Search the dummy frames for a PC in
the call_lo to call_hi range. Allow for DECR_PC_AFTER_BREAK.
(generic_save_call_dummy_addr): New function.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 11 |
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 |