From be5f18e14031b39d0e15f3b284b56a7b8a4a9e59 Mon Sep 17 00:00:00 2001 From: Peter Schauer Date: Sat, 23 May 1998 09:31:41 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 10 ++++++++++ gdb/dwarf2read.c | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1dd926ff9e..0b7ed73664 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +Sat May 23 02:23:09 1998 Peter Schauer + + * 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. + Fri May 22 10:56:36 1998 John Metzler * remote.c (_initialize_remote): Typo extended__remote diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index b6162d4bb9..298788241e 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)