summaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-05-10 16:43:34 +0000
committerJim Blandy <jimb@codesourcery.com>2002-05-10 16:43:34 +0000
commit1213d71a52cbfe19c58b6229c1c2295923bed7ed (patch)
treeccf79e506f5a6469352e7bcebe305691acd1af33 /gdb/Makefile.in
parent838cc20541ffbf1dec69c8c963f4ebdf8df218bf (diff)
downloadgdb-1213d71a52cbfe19c58b6229c1c2295923bed7ed.tar.gz
Expand preprocessor macros in C expressions.jimb-macro-020506-branchcvs/jimb-macro-020506-branch
* c-lang.h: #include "macroexp.h", for macro_lookup_ftype. (scan_macro_expansion, scanning_macro_expansion, finished_macro_expansion): New function declarations. (expression_macro_lookup_func, expression_macro_lookup_baton): New variable declarations. * parser-defs.h (expression_context_pc): New declaration. * parse.c (expression_context_pc): New variable. (parse_exp_1): Set expression_context_pc, as well as expression_context_block. * c-exp.y (yylex): If we're not already reading the result of a macro expansion, try to macro-expand the next token. When we're done scanning a macro expansion, switch back to the mainline text. Commas and `if's in a macro's expansion don't terminate the input. * c-lang.c: #include "macroscope.h" and "gdb_assert.h". (macro_original_text, macro_expanded_text, expression_macro_lookup_func, expression_macro_lookup_baton): New variables. (scan_macro_expansion, scanning_macro_expansion, finished_macro_expansion, scan_macro_cleanup, null_macro_lookup, c_preprocess_and_parse): New functions. (c_language_defn, cplus_language_defn, asm_language_defn): Call c_preprocess_and_parse, instead of c_parse. * Makefile.in (c_lang_h): Note that this #includes macroexp.h. (c-lang.o): Note dependency on macroscope.h and gdb_assert.h.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 26afec588db..5aa141213f7 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -599,7 +599,7 @@ bcache_h = bcache.h
builtin_regs_h = builtin-regs.h
breakpoint_h = breakpoint.h $(frame_h) $(value_h)
buildsym_h = buildsym.h
-c_lang_h = c-lang.h $(value_h)
+c_lang_h = c-lang.h $(value_h) $(macroexp_h)
call_cmds_h = call-cmds.h
cli_cmds_h = $(srcdir)/cli/cli-cmds.h
cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h)
@@ -1311,7 +1311,8 @@ builtin-regs.o: builtin-regs.c $(defs.h) $(builtin_regs_h) $(gdbtypes_h) \
$(gdb_string_h) $(value_h) $(frame_h)
c-lang.o: c-lang.c $(c_lang_h) $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(parser_defs_h) $(symtab_h)
+ $(language_h) $(parser_defs_h) $(symtab_h) $(macroscope_h) \
+ gdb_assert.h
c-typeprint.o: c-typeprint.c $(c_lang_h) $(defs_h) $(expression_h) \
$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \