aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-02-14 04:37:06 +0000
committerAndrew Cagney <cagney@redhat.com>2000-02-14 04:37:06 +0000
commit3ca72b44a8acb97c3ce737011ff7c767262053be (patch)
treed37d1176baaf0a88ce6a085d5cc08cc77ecb545d /gdb
parent2920b85c635ae57dc3f6b89f073d252ac3415ce2 (diff)
downloadgdb-3ca72b44a8acb97c3ce737011ff7c767262053be.zip
gdb-3ca72b44a8acb97c3ce737011ff7c767262053be.tar.gz
gdb-3ca72b44a8acb97c3ce737011ff7c767262053be.tar.bz2
From Jason Merrill: (die_is_declaration): New fn..
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/dwarf2read.c11
2 files changed, 18 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d346911..422fe4a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+Mon Feb 14 15:20:26 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From 1999-11-24 Jason Merrill <jason@casey.cygnus.com>:
+ * dwarf2read.c: (die_is_declaration): New fn.
+ (read_structure_scope): Use it.
+
+ * dwarf2read.c: (die_is_declaration): Convert to ISO-C.
+
2000-02-10 J.T. Conklin <jtc@redback.com>
* config/i386/nbsd.mt (GDBSERVER_DEPFILES): Add low-nbsd.o
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 68c2f8e..67898e4 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -621,6 +621,8 @@ static void set_cu_language PARAMS ((unsigned int));
static struct attribute *dwarf_attr PARAMS ((struct die_info *,
unsigned int));
+static int die_is_declaration (struct die_info *);
+
static void dwarf_decode_lines PARAMS ((unsigned int, char *, bfd *));
static void dwarf2_start_subfile PARAMS ((char *, char *));
@@ -2202,7 +2204,7 @@ read_structure_scope (die, objfile)
type within the structure itself. */
die->type = type;
- if (die->has_children)
+ if (die->has_children && ! die_is_declaration (die))
{
struct field_info fi;
struct die_info *child_die;
@@ -3700,6 +3702,13 @@ dwarf_attr (die, name)
return NULL;
}
+static int
+die_is_declaration (struct die_info *die)
+{
+ return (dwarf_attr (die, DW_AT_declaration)
+ && ! dwarf_attr (die, DW_AT_specification));
+}
+
/* Decode the line number information for the compilation unit whose
line number info is at OFFSET in the .debug_line section.
The compilation directory of the file is passed in COMP_DIR. */