mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 18:20:12 +08:00
Tighten up GDB's support for returning structs by value.
* s390-tdep.c (s390_use_struct_convention): New function. (s390_gdbarch_init): Register it as the S/390's USE_STRUCT_CONVENTION method. Register generic_cannot_extract_struct_value_address as our EXTRACT_STRUCT_VALUE_ADDRESS method. * arch-utils.c (generic_cannot_extract_struct_value_address): New function. * arch-utils.h: Add corresponding prototype.
This commit is contained in:
@ -240,6 +240,21 @@ generic_register_convertible_not (int num)
|
||||
}
|
||||
|
||||
|
||||
/* Under some ABI's that specify the `struct convention' for returning
|
||||
structures by value, by the time we've returned from the function,
|
||||
the return value is sitting there in the caller's buffer, but GDB
|
||||
has no way to find the address of that buffer.
|
||||
|
||||
On such architectures, use this function as your
|
||||
extract_struct_value_address method. When asked to a struct
|
||||
returned by value in this fashion, GDB will print a nice error
|
||||
message, instead of garbage. */
|
||||
CORE_ADDR
|
||||
generic_cannot_extract_struct_value_address (char *dummy)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
default_register_sim_regno (int num)
|
||||
{
|
||||
|
Reference in New Issue
Block a user