aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-28 10:28:57 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-04-11 10:46:07 -0400
commit60f62e2b83eb362c5063247235c111a59e13cad1 (patch)
treec74a83d20a05ab710391425f072f79e31276db5a /gdb/printcmd.c
parent4aeddc50d7a06294cc124dfd8f43992ffa0b7382 (diff)
downloadbinutils-60f62e2b83eb362c5063247235c111a59e13cad1.zip
binutils-60f62e2b83eb362c5063247235c111a59e13cad1.tar.gz
binutils-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/printcmd.c')
-rw-r--r--gdb/printcmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index e870b35..19add04 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -655,9 +655,9 @@ build_address_symbolic (struct gdbarch *gdbarch,
if (msymbol.minsym != NULL
&& MSYMBOL_HAS_SIZE (msymbol.minsym)
&& MSYMBOL_SIZE (msymbol.minsym) == 0
- && MSYMBOL_TYPE (msymbol.minsym) != mst_text
- && MSYMBOL_TYPE (msymbol.minsym) != mst_text_gnu_ifunc
- && MSYMBOL_TYPE (msymbol.minsym) != mst_file_text)
+ && msymbol.minsym->type () != mst_text
+ && msymbol.minsym->type () != mst_text_gnu_ifunc
+ && msymbol.minsym->type () != mst_file_text)
msymbol.minsym = NULL;
if (msymbol.minsym != NULL)
@@ -681,10 +681,10 @@ build_address_symbolic (struct gdbarch *gdbarch,
first instruction of a Thumb function as <function>; the
second instruction will be <function+2>, even though the
pointer is <function+3>. This matches the ISA behavior. */
- if (MSYMBOL_TYPE (msymbol.minsym) == mst_text
- || MSYMBOL_TYPE (msymbol.minsym) == mst_text_gnu_ifunc
- || MSYMBOL_TYPE (msymbol.minsym) == mst_file_text
- || MSYMBOL_TYPE (msymbol.minsym) == mst_solib_trampoline)
+ if (msymbol.minsym->type () == mst_text
+ || msymbol.minsym->type () == mst_text_gnu_ifunc
+ || msymbol.minsym->type () == mst_file_text
+ || msymbol.minsym->type () == mst_solib_trampoline)
addr = gdbarch_addr_bits_remove (gdbarch, addr);
symbol = 0;