aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDavid Lecomber <david@lecomber.net>2004-07-30 12:22:27 +0000
committerDavid Lecomber <david@lecomber.net>2004-07-30 12:22:27 +0000
commitb0f35d58355e2c6b6083968260331ab6dece4578 (patch)
tree7e62c21eefc4b9838a20a63617cb72327e840d38 /gdb/dwarf2read.c
parent40711ff156fe2b6c9c0656ad68ee27812d97b805 (diff)
downloadgdb-b0f35d58355e2c6b6083968260331ab6dece4578.zip
gdb-b0f35d58355e2c6b6083968260331ab6dece4578.tar.gz
gdb-b0f35d58355e2c6b6083968260331ab6dece4578.tar.bz2
2004-07-30 David Lecomber <dsl@sources.redhat.com>
* dwarf2read.c (read_file_scope): Set producer if attribute present. (struct dwarf2_cu): Added new member producer.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 845672d..7d1dafa 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -262,6 +262,8 @@ struct dwarf2_cu
enum language language;
const struct language_defn *language_defn;
+ const char *producer;
+
/* The generic symbol table building routines have separate lists for
file scope symbols and all all other scopes (local scopes). So
we need to select the right one to pass to add_symbol_to_list().
@@ -2362,6 +2364,10 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
set_cu_language (DW_UNSND (attr), cu);
}
+ attr = dwarf2_attr (die, DW_AT_producer, cu);
+ if (attr)
+ cu->producer = DW_STRING (attr);
+
/* We assume that we're processing GCC output. */
processing_gcc_compilation = 2;
#if 0