X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fmacroscope.c;h=93f561acccd8b7a5e97afc3b555b44f93edbb03b;hb=e05523bd2411bac0277da73556f4d01f6c7448aa;hp=e2abdd1bdde2a1a1d1035ec8cf09403b710af065;hpb=3666a04883754298b03884222206bfe756fbc520;p=binutils-gdb.git diff --git a/gdb/macroscope.c b/gdb/macroscope.c index e2abdd1bdde..93f561acccd 100644 --- a/gdb/macroscope.c +++ b/gdb/macroscope.c @@ -1,5 +1,5 @@ /* Functions for deciding which macros are currently in scope. - Copyright (C) 2002-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2022 Free Software Foundation, Inc. Contributed by Red Hat, Inc. This file is part of GDB. @@ -43,13 +43,14 @@ sal_macro_scope (struct symtab_and_line sal) if (sal.symtab == NULL) return NULL; - cust = SYMTAB_COMPUNIT (sal.symtab); - if (COMPUNIT_MACRO_TABLE (cust) == NULL) + + cust = sal.symtab->compunit (); + if (cust->macro_table () == NULL) return NULL; gdb::unique_xmalloc_ptr ms (XNEW (struct macro_scope)); - main_file = macro_main (COMPUNIT_MACRO_TABLE (cust)); + main_file = macro_main (cust->macro_table ()); inclusion = macro_lookup_inclusion (main_file, sal.symtab->filename); if (inclusion) @@ -121,8 +122,8 @@ default_macro_scope (void) symbol files loaded, then get_current_or_default would raise an error. But `set width' shouldn't raise an error just because it can't decide which scope to macro-expand its argument in. */ - struct symtab_and_line cursal = - get_current_source_symtab_and_line (); + struct symtab_and_line cursal + = get_current_source_symtab_and_line (); sal.symtab = cursal.symtab; sal.line = cursal.line;