From f1f58f102ee5f3dda04853582fcb6f22cc00329b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 19 Nov 2021 13:11:24 -0500 Subject: gdb: add getter/setter for compunit_symtab::objfile Rename the field to m_objfile, and add a getter and a setter. Update all users. Change-Id: If7e2f763ee3e70570140d9af9261b1b056253317 --- gdb/symfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/symfile.c') diff --git a/gdb/symfile.c b/gdb/symfile.c index 9bd4f48..a660422 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2774,7 +2774,7 @@ deduce_language_from_filename (const char *filename) struct symtab * allocate_symtab (struct compunit_symtab *cust, const char *filename) { - struct objfile *objfile = cust->objfile; + struct objfile *objfile = cust->objfile (); struct symtab *symtab = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symtab); @@ -2832,7 +2832,7 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) struct compunit_symtab); const char *saved_name; - cu->objfile = objfile; + cu->set_objfile (objfile); /* The name we record here is only for display/debugging purposes. Just save the basename to avoid path issues (too long for display, @@ -2858,8 +2858,8 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) void add_compunit_symtab_to_objfile (struct compunit_symtab *cu) { - cu->next = cu->objfile->compunit_symtabs; - cu->objfile->compunit_symtabs = cu; + cu->next = cu->objfile ()->compunit_symtabs; + cu->objfile ()->compunit_symtabs = cu; } -- cgit v1.1