aboutsummaryrefslogtreecommitdiff
path: root/gdb/macroscope.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/macroscope.c')
-rw-r--r--gdb/macroscope.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/macroscope.c b/gdb/macroscope.c
index c025eb7..6df86ea 100644
--- a/gdb/macroscope.c
+++ b/gdb/macroscope.c
@@ -40,14 +40,17 @@ sal_macro_scope (struct symtab_and_line sal)
{
struct macro_source_file *main_file, *inclusion;
struct macro_scope *ms;
+ struct compunit_symtab *cust;
- if (! sal.symtab
- || ! sal.symtab->macro_table)
- return 0;
+ if (sal.symtab == NULL)
+ return NULL;
+ cust = SYMTAB_COMPUNIT (sal.symtab);
+ if (COMPUNIT_MACRO_TABLE (cust) == NULL)
+ return NULL;
ms = (struct macro_scope *) xmalloc (sizeof (*ms));
- main_file = macro_main (sal.symtab->macro_table);
+ main_file = macro_main (COMPUNIT_MACRO_TABLE (cust));
inclusion = macro_lookup_inclusion (main_file, sal.symtab->filename);
if (inclusion)