diff options
author | Eric Blake <ebb9@byu.net> | 2008-05-08 20:39:16 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-05-08 20:39:16 -0600 |
commit | b9738adbaaf9c8f02c97c6179b9e595a0d28121c (patch) | |
tree | f2b04622145b0050611f1e4c5431329f33ae4475 /src | |
parent | d74cecd6377345903ba25c9d9b82729324fbbcf8 (diff) | |
download | m4-b9738adbaaf9c8f02c97c6179b9e595a0d28121c.tar.gz |
Stage 23: allow tracing of indirect macro calls.
* m4/m4module.h (m4_input_block): Remove.
(m4_call_info): New opaque type.
(m4_trace_prepare, m4_arg_info): New prototypes.
(m4_macro_call, m4_push_string_finish, m4_input_print): Change
prototypes.
* m4/m4private.h (struct m4_macro_args): Add info field.
(struct m4_call_info): New structure.
(m4_arg_info): New accessor.
* m4/input.c (m4_input_block): Make typedef local.
(m4_push_string_init): Initialize length.
(m4_push_string_finish, m4_input_print): Change signature, so that
printing can be done before finalization.
(struct input_funcs): Add parameter to print_func.
(file_print, string_print, composite_print): Adjust accordingly.
* m4/macro.c (trace_header, trace_flush, trace_pre, trace_post):
Change signatures for stacked trace messages, and for using call
context.
(trace_prepre): Export and rename...
(m4_trace_prepare): ...to this, for use by indir. Alter signature
to use call context.
(collect_arguments): Alter signature, to manage new field.
(expand_macro): Change call context management. Move tracing...
(m4_macro_call): ...here. Remove redundant parameter.
(m4_arg_argc): New function.
(m4_make_argv_ref): Replace unused skip parameter with new trace
parameter; manage new field.
* modules/gnu.c (builtin, indir): Adjust callers.
* src/main.c (usage): Update debugmode flag summary.
* tests/null.m4: Enhance test.
* tests/null.err: Update expected output.
* tests/macros.at (Tracing Hanoi Towers): Likewise.
* doc/m4.texinfo (Trace): Mention more about trace formatting.
(Debugmode): Enhance description of 'c' and 'x'. Enhance test to
cover line numbering details in traces.
(Debuglen): Enhance test to cover indir tracing.
* NEWS: Mention these changes.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -156,7 +156,7 @@ Debugging:\n\ fputs (_("\ FLAGS is any of:\n\ a show actual arguments in trace\n\ - c show definition line in trace\n\ + c show collection line in trace\n\ e show expansion in trace\n\ f include current input file name in trace and debug\n\ i show changes in input files in debug\n\ @@ -165,9 +165,9 @@ FLAGS is any of:\n\ fputs (_("\ m show module information in trace, debug, and dumpdef\n\ p show results of path searches in debug\n\ - q quote values as necessary in dumpdef and trace, useful with a or e\n\ + q quote values in dumpdef and trace, useful with a or e\n\ s show full stack of pushdef values in dumpdef\n\ - t trace all macro calls, regardless of named traceon state\n\ + t trace all macro calls, regardless of per-macro traceon state\n\ x include unique macro call id in trace, useful with c\n\ V shorthand for all of the above flags\n\ "), stdout); |