Re: [RFA] Dwarf2 Producer info (dwarf2read.c)

David Lecomber
2004-07-29T10:28:37Z

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

> Apologies in advance for the wrapping of lines that Evolution will do in
> the comment..

Reposting with final suggested changes from Jim B to ChangeLog plus the
patch is now an attachment.

d.

2004-07-29 David Lecomber <dsl@sources.redhat.com>

* dwarf2read.c (read_file_scope): Set producer if attribute
present.
(struct dwarf2_cu): Added new member producer.

[-- Attachment #2: dwarf2read.c.patch --]
[-- Type: text/x-patch, Size: 1032 bytes --]

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.156
diff -c -p -r1.156 dwarf2read.c
*** dwarf2read.c 6 Jul 2004 19:29:30 -0000 1.156
--- dwarf2read.c 29 Jul 2004 10:20:20 -0000
*************** struct dwarf2_cu
*** 262,267 ****
--- 262,269 ----
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().
*************** read_file_scope (struct die_info *die, s
*** 2362,2367 ****
--- 2364,2373 ----
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