diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-04-17 20:31:43 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-04-17 20:31:43 +0000 |
commit | 51dd1ca2a07d405766686257ac1acaa300f07777 (patch) | |
tree | f48f83c19a4075b7b40dcb1903688aefcb839024 | |
parent | 02aae6f1366d627c4a9e1c106b8f8f403da60c3c (diff) | |
download | gdb-51dd1ca2a07d405766686257ac1acaa300f07777.tar.gz |
2003-04-17 Elena Zannoni <ezannoni@redhat.com>
* values.c (value_being_returned): Don't fetch the return
value if the return type is void.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/values.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f66137bd784..08cbb63adf6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-04-17 Elena Zannoni <ezannoni@redhat.com> + + * values.c (value_being_returned): Don't fetch the return + value if the return type is void. + 2003-04-17 Jeff Johnston <jjohnstn@redhat.com> * thread-db.c: Reindented. diff --git a/gdb/values.c b/gdb/values.c index 8b1d013a0e1..88c6a61037b 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1240,7 +1240,9 @@ value_being_returned (struct type *valtype, struct regcache *retbuf, val = allocate_value (valtype); CHECK_TYPEDEF (valtype); - EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val)); + /* If the function returns void, don't bother fetching the return value. */ + if (TYPE_CODE (valtype) != TYPE_CODE_VOID) + EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val)); return val; } |