From 3df1b9b49d36c0fb42077b2deece480317978e5b Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 4 Apr 2001 15:09:46 +0000 Subject: [PATCH] * i386-tdep.c (i386_extract_return_value): Don't return the return value of a void function. (i386_store_return_value): Likewise. --- gdb/ChangeLog | 6 ++++++ gdb/i386-tdep.c | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 71cc4d353b..b9f8a50986 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-04-04 Mark Kettenis + + * i386-tdep.c (i386_extract_return_value): Don't return the return + value of a void function. + (i386_store_return_value): Likewise. + 2001-04-03 Andrew Cagney Obsolete w65-*-* target. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 1090cbef79..49cc7966d7 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -735,8 +735,10 @@ i386_extract_return_value (struct type *type, char *regbuf, char *valbuf) if (TYPE_CODE (type) == TYPE_CODE_STRUCT && TYPE_NFIELDS (type) == 1) - return i386_extract_return_value (TYPE_FIELD_TYPE (type, 0), - regbuf, valbuf); + { + i386_extract_return_value (TYPE_FIELD_TYPE (type, 0), regbuf, valbuf); + return; + } if (TYPE_CODE (type) == TYPE_CODE_FLT) { @@ -798,7 +800,10 @@ i386_store_return_value (struct type *type, char *valbuf) if (TYPE_CODE (type) == TYPE_CODE_STRUCT && TYPE_NFIELDS (type) == 1) - return i386_store_return_value (TYPE_FIELD_TYPE (type, 0), valbuf); + { + i386_store_return_value (TYPE_FIELD_TYPE (type, 0), valbuf); + return; + } if (TYPE_CODE (type) == TYPE_CODE_FLT) { -- 2.34.1