* inferior.h (AT_SYMBOL): Define.
* blockframe.c (inside_entry_file): Check for AT_SYMBOL.
* infcall.c (call_function_by_hand): Add code to handle AT_SYMBOL.
* mips-tdep.c (mips_call_dummy_address): Delete function.
(mips_gdbarch_init): Set call_dummy_location to AT_SYMBOL, do not
set call_dummy_address.
+2003-08-07 Andrew Cagney <cagney@redhat.com>
+
+ * inferior.h (AT_SYMBOL): Define.
+ * blockframe.c (inside_entry_file): Check for AT_SYMBOL.
+ * infcall.c (call_function_by_hand): Add code to handle AT_SYMBOL.
+ * mips-tdep.c (mips_call_dummy_address): Delete function.
+ (mips_gdbarch_init): Set call_dummy_location to AT_SYMBOL, do not
+ set call_dummy_address.
+
2003-08-07 Andrew Cagney <cagney@redhat.com>
* language.c (op_error): Delete function.
return 1;
if (symfile_objfile == 0)
return 0;
- if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
+ if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT
+ || CALL_DUMMY_LOCATION == AT_SYMBOL)
{
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
it's address is the same as the address of the dummy. */
bp_addr = dummy_addr;
break;
+ case AT_SYMBOL:
+ /* Some executables define a symbol __CALL_DUMMY_ADDRESS whose
+ address is the location where the breakpoint should be
+ placed. Once all targets are using the overhauled frame code
+ this can be deleted - ON_STACK is a better option. */
+ {
+ struct minimal_symbol *sym;
+
+ sym = lookup_minimal_symbol ("__CALL_DUMMY_ADDRESS", NULL, NULL);
+ real_pc = funaddr;
+ if (sym)
+ dummy_addr = SYMBOL_VALUE_ADDRESS (sym);
+ else
+ dummy_addr = entry_point_address ();
+ bp_addr = dummy_addr;
+ break;
+ }
default:
internal_error (__FILE__, __LINE__, "bad switch");
}
/* Possible values for CALL_DUMMY_LOCATION. */
#define ON_STACK 1
#define AT_ENTRY_POINT 4
+#define AT_SYMBOL 5
/* FIXME: cagney/2000-04-17: gdbarch should manage this. The default
shouldn't be necessary. */
}
-/* Return a location where we can set a breakpoint that will be hit
- when an inferior function call returns. This is normally the
- program's entry point. Executables that don't have an entry
- point (e.g. programs in ROM) should define a symbol __CALL_DUMMY_ADDRESS
- whose address is the location where the breakpoint should be placed. */
-
-static CORE_ADDR
-mips_call_dummy_address (void)
-{
- struct minimal_symbol *sym;
-
- sym = lookup_minimal_symbol ("__CALL_DUMMY_ADDRESS", NULL, NULL);
- if (sym)
- return SYMBOL_VALUE_ADDRESS (sym);
- else
- return entry_point_address ();
-}
-
-
/* When debugging a 64 MIPS target running a 32 bit ABI, the size of
the register stored on the stack (32) is different to its real raw
size (64). The below ensures that registers are fetched from the
/* MIPS version of CALL_DUMMY */
- set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
+ /* NOTE: cagney/2003-08-05: Eventually call dummy location will be
+ replaced by a command, and all targets will default to on stack
+ (regardless of the stack's execute status). */
+ set_gdbarch_call_dummy_location (gdbarch, AT_SYMBOL);
set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame);
set_gdbarch_frame_align (gdbarch, mips_frame_align);
set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);