aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1998-05-23 09:31:41 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1998-05-23 09:31:41 +0000
commitbe5f18e14031b39d0e15f3b284b56a7b8a4a9e59 (patch)
tree0d31301959af7f130b01d47d974fc9facf8a991f /gdb/dwarf2read.c
parentcbc6c9b2bf1ccf602b17c44776a23915419a890a (diff)
downloadgdb-be5f18e14031b39d0e15f3b284b56a7b8a4a9e59.zip
gdb-be5f18e14031b39d0e15f3b284b56a7b8a4a9e59.tar.gz
gdb-be5f18e14031b39d0e15f3b284b56a7b8a4a9e59.tar.bz2
* dwarf2read.c (read_subroutine_type): Set TYPE_FLAG_PROTOTYPED
on C++ functions. * valops.c (value_arg_coerce): Add new argument to indicate whether the function has a prototype, handle integer and float promotions accordingly. (call_function_by_hand): Always call value_arg_coerce, pass down prototype information.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index b6162d4..2987882 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1,5 +1,5 @@
/* DWARF 2 debugging format support for GDB.
- Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
Inc. with support from Florida State University (under contract
@@ -2801,8 +2801,11 @@ read_subroutine_type (die, objfile)
}
type = die_type (die, objfile);
ftype = lookup_function_type (type);
+
+ /* All functions in C++ have prototypes. */
attr = dwarf_attr (die, DW_AT_prototyped);
- if (attr && (DW_UNSND (attr) != 0))
+ if ((attr && (DW_UNSND (attr) != 0))
+ || cu_language == language_cplus)
TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED;
if (die->has_children)