diff options
author | Jim Blandy <jimb@codesourcery.com> | 1997-11-22 00:50:09 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 1997-11-22 00:50:09 +0000 |
commit | 345bcdcc4df0efef26323da0511eed238089487e (patch) | |
tree | 920014d4d462ee48536c7d092b449201ac41a906 /gdb | |
parent | d627a67430a8ec1f27994abb5d8775db0c02d355 (diff) | |
download | gdb-345bcdcc4df0efef26323da0511eed238089487e.zip gdb-345bcdcc4df0efef26323da0511eed238089487e.tar.gz gdb-345bcdcc4df0efef26323da0511eed238089487e.tar.bz2 |
* valops.c (call_function_by_hand): If the function has a
prototype, convert its arguments as if by assignment. Otherwise,
do the usual promotions.
* stabsread.c (define_symbol): Set the TYPE_FLAG_PROTOTYPED flag
on functions' types when we can; all C++ functions should get it,
and if the Sun-style prototype notation is in the stabs, we can
notice that.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/stabsread.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 62c3359..e32afd8 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -1607,6 +1607,11 @@ define_symbol (valu, string, desc, type, objfile) in GDB. E.g. "int" is converted to "function returning int". */ if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_FUNC) SYMBOL_TYPE (sym) = lookup_function_type (SYMBOL_TYPE (sym)); + + /* All functions in C++ have prototypes. */ + if (SYMBOL_LANGUAGE (sym) == language_cplus) + TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED; + /* fall into process_prototype_types */ process_prototype_types: @@ -1614,10 +1619,15 @@ define_symbol (valu, string, desc, type, objfile) about their actual types (FIXME -- we should remember the whole function prototype), but the list may define some new types that we have to remember, so we must scan it now. */ - while (*p == ';') { - p++; - read_type (&p, objfile); - } + if (*p == ';') + { + TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED; + + while (*p == ';') { + p++; + read_type (&p, objfile); + } + } break; case 'F': |