diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-11-19 16:27:56 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-11-19 16:27:56 +0000 |
commit | 667e784fcb11bf5af2900371192cc997a606b18e (patch) | |
tree | f1c1a541b3e4b3fb3ebb1989cc511fe096172edc /gdb/values.c | |
parent | 0976f6a782b7567f2ef7500b8c9ec49d7cc0686a (diff) | |
download | gdb-667e784fcb11bf5af2900371192cc997a606b18e.zip gdb-667e784fcb11bf5af2900371192cc997a606b18e.tar.gz gdb-667e784fcb11bf5af2900371192cc997a606b18e.tar.bz2 |
2003-11-19 Andrew Cagney <cagney@redhat.com>
* stack.c (return_command): Handle "void", "legacy" and "unknown
location" return values separatly.
* values.c (using_struct_return): Return 0 for a "void" return
type. Mention "register_value_being_returned".
(register_value_being_returned): Mention "using_struct_return".
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/values.c b/gdb/values.c index a8d8480..386e3bf 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1223,7 +1223,7 @@ register_value_being_returned (struct type *valtype, struct regcache *retbuf) struct value *val = allocate_value (valtype); /* If the function returns void, don't bother fetching the return - value. */ + value. See also "using_struct_return". */ if (TYPE_CODE (valtype) == TYPE_CODE_VOID) return val; @@ -1285,6 +1285,11 @@ using_struct_return (struct type *value_type, int gcc_p) if (code == TYPE_CODE_ERROR) error ("Function return type unknown."); + if (code == TYPE_CODE_VOID) + /* A void return value is never in memory. See also corresponding + code in "register_value_being_returned". */ + return 0; + if (!gdbarch_return_value_p (current_gdbarch)) { /* FIXME: cagney/2003-10-01: The below is dead. Instead an |