/* 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.
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<struct macro_scope> 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)
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;