diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-28 10:28:57 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-04-11 10:46:07 -0400 |
commit | 60f62e2b83eb362c5063247235c111a59e13cad1 (patch) | |
tree | c74a83d20a05ab710391425f072f79e31276db5a /gdb/symtab.c | |
parent | 4aeddc50d7a06294cc124dfd8f43992ffa0b7382 (diff) | |
download | gdb-60f62e2b83eb362c5063247235c111a59e13cad1.zip gdb-60f62e2b83eb362c5063247235c111a59e13cad1.tar.gz gdb-60f62e2b83eb362c5063247235c111a59e13cad1.tar.bz2 |
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
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index d15eec8..a754926 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -432,11 +432,11 @@ minimal_symbol::value_address (objfile *objfile) const bool minimal_symbol::data_p () const { - return type == mst_data - || type == mst_bss - || type == mst_abs - || type == mst_file_data - || type == mst_file_bss; + return m_type == mst_data + || m_type == mst_bss + || m_type == mst_abs + || m_type == mst_file_data + || m_type == mst_file_bss; } /* See symtab.h. */ @@ -444,12 +444,12 @@ minimal_symbol::data_p () const bool minimal_symbol::text_p () const { - return type == mst_text - || type == mst_text_gnu_ifunc - || type == mst_data_gnu_ifunc - || type == mst_slot_got_plt - || type == mst_solib_trampoline - || type == mst_file_text; + return m_type == mst_text + || m_type == mst_text_gnu_ifunc + || m_type == mst_data_gnu_ifunc + || m_type == mst_slot_got_plt + || m_type == mst_solib_trampoline + || m_type == mst_file_text; } /* See whether FILENAME matches SEARCH_NAME using the rule that we @@ -3238,7 +3238,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent) */ msymbol = lookup_minimal_symbol_by_pc (pc); if (msymbol.minsym != NULL) - if (MSYMBOL_TYPE (msymbol.minsym) == mst_solib_trampoline) + if (msymbol.minsym->type () == mst_solib_trampoline) { struct bound_minimal_symbol mfunsym = lookup_minimal_symbol_text (msymbol.minsym->linkage_name (), @@ -4751,7 +4751,7 @@ bool global_symbol_searcher::is_suitable_msymbol (const enum search_domain kind, const minimal_symbol *msymbol) { - switch (MSYMBOL_TYPE (msymbol)) + switch (msymbol->type ()) { case mst_data: case mst_bss: @@ -5767,7 +5767,7 @@ symbol_is_function_or_method (symbol *sym) bool symbol_is_function_or_method (minimal_symbol *msymbol) { - switch (MSYMBOL_TYPE (msymbol)) + switch (msymbol->type ()) { case mst_text: case mst_text_gnu_ifunc: @@ -5797,11 +5797,11 @@ find_gnu_ifunc (const symbol *sym) iterate_over_minimal_symbols (objfile, lookup_name, [&] (minimal_symbol *minsym) { - if (MSYMBOL_TYPE (minsym) == mst_text_gnu_ifunc - || MSYMBOL_TYPE (minsym) == mst_data_gnu_ifunc) + if (minsym->type () == mst_text_gnu_ifunc + || minsym->type () == mst_data_gnu_ifunc) { CORE_ADDR msym_addr = minsym->value_address (objfile); - if (MSYMBOL_TYPE (minsym) == mst_data_gnu_ifunc) + if (minsym->type () == mst_data_gnu_ifunc) { struct gdbarch *gdbarch = objfile->arch (); msym_addr = gdbarch_convert_from_func_ptr_addr |