mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-05 21:50:21 +08:00
PR macros/12999
* macrotab.h (macro_callback_fn): Add new arguments to callback. * macrotab.c (foreach_macro): Ditto. (foreach_macro_in_scope): Ditto. * macrocmd.c (print_macro_callback): New function. (info_macro_command): Move some code to print_macro_definition. (print_macro_definition): New function. (print_one_macro): Add new arguments to callback. testsuite/ * gdb.base/info-macros.c: New test sources. * gdb.base/info-macros.exp: New tests. docs/ * gdb.texinfo (Macros): Add info definitions and info macros commands. Update text and cindex entries for info macro command.
This commit is contained in:
@ -913,7 +913,8 @@ foreach_macro (splay_tree_node node, void *arg)
|
||||
struct macro_key *key = (struct macro_key *) node->key;
|
||||
struct macro_definition *def = (struct macro_definition *) node->value;
|
||||
|
||||
(*datum->fn) (key->name, def, datum->user_data);
|
||||
(*datum->fn) (key->name, def, key->start_file, key->start_line,
|
||||
datum->user_data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -945,7 +946,8 @@ foreach_macro_in_scope (splay_tree_node node, void *info)
|
||||
&& (!key->end_file
|
||||
|| compare_locations (key->end_file, key->end_line,
|
||||
datum->file, datum->line) >= 0))
|
||||
(*datum->fn) (key->name, def, datum->user_data);
|
||||
(*datum->fn) (key->name, def, key->start_file, key->start_line,
|
||||
datum->user_data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user