mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
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__.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user