Enable async mode in the target in attach_cmd.
[binutils-gdb.git] / gdb / macroscope.c
index e2abdd1bdde2a1a1d1035ec8cf09403b710af065..93f561acccd8b7a5e97afc3b555b44f93edbb03b 100644 (file)
@@ -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<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)
@@ -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;