diff options
author | Tom Tromey <tromey@redhat.com> | 2012-05-16 20:31:10 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-05-16 20:31:10 +0000 |
commit | abc9d0dc6edeeabbd65fedb43cf840875156da91 (patch) | |
tree | 6af9437622479beefdff726b65ee0880edb7d549 /gdb/dwarf2read.c | |
parent | 7537bd464b5c7aaa08b67e53f38403551ef5605d (diff) | |
download | gdb-abc9d0dc6edeeabbd65fedb43cf840875156da91.zip gdb-abc9d0dc6edeeabbd65fedb43cf840875156da91.tar.gz gdb-abc9d0dc6edeeabbd65fedb43cf840875156da91.tar.bz2 |
PR macros/13205:
* macrotab.h: (macro_define_special): Declare.
(enum macro_special_kind): New.
(struct macro_definition) <argc, replacement>: Update comments.
* macrotab.c (new_macro_definition): Unconditionally set 'argc'.
(macro_define_object_internal): New function.
(macro_define_object): Use it.
(macro_define_special): New function.
(fixup_definition): New function.
(macro_lookup_definition, foreach_macro_in_scope)
(foreach_macro): Use fixup_definition.
* macroexp.h (macro_stringify): Declare.
* macroexp.c (free_buffer_return_text): New function.
(stringify): Constify "arg".
(macro_stringify): New function.
* dwarf2read.c (macro_start_file): Call macro_define_special.
testsuite
* gdb.base/macscp1.c (macscp_expr): Add comment.
* gdb.base/macscp.exp: Test __FILE__ and __LINE__.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f06dea6..f89742b 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -15572,9 +15572,12 @@ macro_start_file (int file, int line, objfile->macro_cache); if (! current_file) - /* If we have no current file, then this must be the start_file - directive for the compilation unit's main source file. */ - current_file = macro_set_main (pending_macros, full_name); + { + /* If we have no current file, then this must be the start_file + directive for the compilation unit's main source file. */ + current_file = macro_set_main (pending_macros, full_name); + macro_define_special (pending_macros); + } else current_file = macro_include (current_file, line, full_name); |