diff options
author | Joel Brobecker <brobecker@gnat.com> | 2004-04-16 16:12:52 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2004-04-16 16:12:52 +0000 |
commit | 7867684d060b2df5ce37d76c8fc7d8d85a7a8866 (patch) | |
tree | b89507015c4a86e459b2c56a3e3b06c6e6482325 | |
parent | 72bf949259374cb90a7966df5cdd1931db5bf22f (diff) | |
download | ppe42-binutils-7867684d060b2df5ce37d76c8fc7d8d85a7a8866.tar.gz ppe42-binutils-7867684d060b2df5ce37d76c8fc7d8d85a7a8866.zip |
* dwarf2read.c: Back out my previous change, it was incorrect.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 24 |
2 files changed, 6 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 89e06c715c..92a43c532b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2004-04-16 Joel Brobecker <brobecker@gnat.com> + + * dwarf2read.c: Back out my previous change, it was incorrect. + 2004-04-16 Daniel Jacobowitz <drow@mvista.com> * dwarf2read.c: Include "hashtab.h". diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5fed47d421..acbcecebef 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -732,9 +732,6 @@ static void set_cu_language (unsigned int, struct dwarf2_cu *); static struct attribute *dwarf2_attr (struct die_info *, unsigned int, struct dwarf2_cu *); -static int dwarf2_attribute_true_p (struct die_info *die, unsigned name, - struct dwarf2_cu *cu); - static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu); static struct die_info *die_specification (struct die_info *die, @@ -5552,28 +5549,11 @@ dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu) return NULL; } -/* Return non-zero iff the attribute NAME is defined for the given DIE, - and holds a non-zero value. */ - -static int -dwarf2_attribute_true_p (struct die_info *die, unsigned name, - struct dwarf2_cu *cu) -{ - struct attribute *attr = dwarf2_attr (die, name, cu); - - return (attr && DW_UNSND (attr)); -} - static int die_is_declaration (struct die_info *die, struct dwarf2_cu *cu) { - /* A DIE is a declaration if it has a DW_AT_declaration attribute - which value is non-zero. However, we have to be careful of DIEs - with a DW_AT_specification attribute, because dwarf2_attribute_p() - follows this attribute, and therefore might cause us to find a - DW_AT_declaration attribute, but that belongs to a different DIE. */ - return (dwarf2_attribute_true_p (die, DW_AT_declaration, cu) - && ! dwarf2_attribute_true_p (die, DW_AT_specification, cu)); + return (dwarf2_attr (die, DW_AT_declaration, cu) + && ! dwarf2_attr (die, DW_AT_specification, cu)); } /* Return the die giving the specification for DIE, if there is |