diff options
author | Alan Hayward <alan.hayward@arm.com> | 2018-11-16 11:21:00 +0000 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2018-11-16 13:45:38 +0000 |
commit | c5ac5cbb5be91d43bd31ac0068917bdb7ab9b439 (patch) | |
tree | 95c674d261150bd96bc057c955f61f3778822ddf /gdb/gdbarch.h | |
parent | 81c688d54fdef81c5150ba64f8efa10449093e43 (diff) | |
download | binutils-gdb-c5ac5cbb5be91d43bd31ac0068917bdb7ab9b439.tar.gz |
Use enum for return method for dummy calls
In call_function_by_hand_dummy, struct_return and hidden_first_param_p
are used to represent a single concept. Replace with an enum.
gdb/ChangeLog:
* gdbarch.sh (enum function_call_return_method): Add enum.
* gdbarch.h: Regenerate.
* infcall.c (call_function_by_hand_dummy): Replace vars with enum.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 2cb69610837..e8e35fbd011 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -102,6 +102,29 @@ typedef void (iterate_over_regset_sections_cb) (const char *sect_name, int supply_size, int collect_size, const struct regset *regset, const char *human_name, void *cb_data); +/* For a function call, does the function return a value using a + normal value return or a structure return - passing a hidden + argument pointing to storage. For the latter, there are two + cases: language-mandated structure return and target ABI + structure return. */ + +enum function_call_return_method +{ + /* Standard value return. */ + return_method_normal = 0, + + /* Language ABI structure return. This is handled + by passing the return location as the first parameter to + the function, even preceding "this". */ + return_method_hidden_param, + + /* Target ABI struct return. This is target-specific; for instance, + on ia64 the first argument is passed in out0 but the hidden + structure return pointer would normally be passed in r8. */ + return_method_struct, +}; + + /* The following are pre-initialized by GDBARCH. */ |