gdb: remove MSYMBOL_TYPE macro

Add a getter and a setter for a minimal symbol's type.  Remove the
corresponding macro and adjust all callers.

Change-Id: I89900df5ffa5687133fe1a16b2e0d4684e67a77d
This commit is contained in:
Simon Marchi
2022-01-28 10:28:57 -05:00
parent 4aeddc50d7
commit 60f62e2b83
17 changed files with 90 additions and 78 deletions

View File

@@ -647,7 +647,7 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
or "_imp_", get rid of the prefix, and search the minimal
symbol in OBJFILE. Note that 'maintenance print msymbols'
shows that type of these "_imp_XXXX" symbols is mst_data. */
if (MSYMBOL_TYPE (msym) == mst_data)
if (msym->type () == mst_data)
{
const char *name1 = NULL;
@@ -669,8 +669,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
respectively in OBJFILE. Set the type of symbol "foo"
as 'mst_solib_trampoline'. */
if (found.minsym != NULL
&& MSYMBOL_TYPE (found.minsym) == mst_text)
MSYMBOL_TYPE (found.minsym) = mst_solib_trampoline;
&& found.minsym->type () == mst_text)
found.minsym->set_type (mst_solib_trampoline);
}
}
}