diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-19 22:49:01 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-02-06 15:48:19 -0500 |
commit | c61596525811d9b0fe79be8f11e5a142ade96dab (patch) | |
tree | 8bc43629e072791d0790a2264c0b1fcd7998bd3b /gdb/symmisc.c | |
parent | 10cc645b6a09c58cf1a5ce53accbe6cf3178ca12 (diff) | |
download | gdb-c61596525811d9b0fe79be8f11e5a142ade96dab.zip gdb-c61596525811d9b0fe79be8f11e5a142ade96dab.tar.gz gdb-c61596525811d9b0fe79be8f11e5a142ade96dab.tar.bz2 |
gdb: remove SYMTAB_COMPUNIT macro, add getter/setter
Add a getter and a setter for a symtab's compunit_symtab. Remove the
corresponding macro and adjust all callers.
For brevity, I chose the name "compunit" instead of "compunit_symtab"
the the field, getter and setter names. Since we are already in symtab
context, the _symtab suffix seems redundant.
Change-Id: I4b9b731c96e3594f7733e75af1e3d01bc0e4fe92
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r-- | gdb/symmisc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 6e1a4c2..d079ac4 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -329,7 +329,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) } else { - compunit_symtab *compunit = SYMTAB_COMPUNIT (symtab); + compunit_symtab *compunit = symtab->compunit (); const char *compunit_filename = symtab_to_filename_for_display (compunit->primary_filetab ()); @@ -342,7 +342,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) compunit_symtabs included by this one. */ if (is_main_symtab_of_compunit_symtab (symtab)) { - struct compunit_symtab *cust = SYMTAB_COMPUNIT (symtab); + struct compunit_symtab *cust = symtab->compunit (); if (cust->user != nullptr) { @@ -956,14 +956,14 @@ maintenance_print_one_line_table (struct symtab *symtab, void *data) struct linetable *linetable; struct objfile *objfile; - objfile = symtab->compunit_symtab->objfile (); + objfile = symtab->compunit ()->objfile (); printf_filtered (_("objfile: %ps ((struct objfile *) %s)\n"), styled_string (file_name_style.style (), objfile_name (objfile)), host_address_to_string (objfile)); printf_filtered (_("compunit_symtab: %s ((struct compunit_symtab *) %s)\n"), - symtab->compunit_symtab->name, - host_address_to_string (symtab->compunit_symtab)); + symtab->compunit ()->name, + host_address_to_string (symtab->compunit ())); printf_filtered (_("symtab: %ps ((struct symtab *) %s)\n"), styled_string (file_name_style.style (), symtab_to_fullname (symtab)), |