From 4b2f86ef2a3962fdf86b9b0f266ce7180a43a6c8 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 14 Aug 2020 15:07:52 +0100 Subject: [PATCH] gdb: remove LA_ITERATE_OVER_SYMBOLS macro Replace the single use of the LA_ITERATE_OVER_SYMBOLS macro with the macro's definition, and delete the macro. There should be no user visible changes after this commit. gdb/ChangeLog: * language.h (LA_ITERATE_OVER_SYMBOLS): Delete. (iterate_over_file_blocks): Replace use of macro with the macros definition. --- gdb/ChangeLog | 6 ++++++ gdb/language.h | 3 --- gdb/linespec.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index db2d3f172ec..daa228dd6ab 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-10-23 Andrew Burgess + + * language.h (LA_ITERATE_OVER_SYMBOLS): Delete. + (iterate_over_file_blocks): Replace use of macro with the macros + definition. + 2020-10-23 Andrew Burgess * language.h (LA_PRINT_ARRAY_INDEX): Delete. diff --git a/gdb/language.h b/gdb/language.h index bffa9fddfee..9d64a4ae8e9 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -652,9 +652,6 @@ extern enum language set_language (enum language); #define LA_EMIT_CHAR(ch, type, stream, quoter) \ (current_language->emitchar (ch, type, stream, quoter)) -#define LA_ITERATE_OVER_SYMBOLS(BLOCK, NAME, DOMAIN, CALLBACK) \ - (current_language->iterate_over_symbols (BLOCK, NAME, DOMAIN, CALLBACK)) - /* Test a character to decide whether it can be printed in literal form or needs to be printed in another representation. For example, in C the literal form of the character with octal value 141 is 'a' diff --git a/gdb/linespec.c b/gdb/linespec.c index b05b8ad89a8..a5fd3af1e30 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1209,7 +1209,7 @@ iterate_over_file_blocks for (block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), STATIC_BLOCK); block != NULL; block = BLOCK_SUPERBLOCK (block)) - LA_ITERATE_OVER_SYMBOLS (block, name, domain, callback); + current_language->iterate_over_symbols (block, name, domain, callback); } /* A helper for find_method. This finds all methods in type T of -- 2.30.2