summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2002-08-21 22:18:25 +0000
committerMichael Snyder <msnyder@specifix.com>2002-08-21 22:18:25 +0000
commit57a9b7e58f21d7601af3d940f6b8e392ad549adf (patch)
tree0f9fec9683fc5fc15ee65b22b76d524e08216a0e
parentb84d7120bde1a20f4f6c769b6e37f4ef9c9ac684 (diff)
downloadgdb-57a9b7e58f21d7601af3d940f6b8e392ad549adf.tar.gz
2002-08-21 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (MSYMBOL_IS_SPECIAL): Replace macro with function. (MSYMBOL_SIZE): Replace macro with function.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mips-tdep.c29
2 files changed, 19 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c06a825e11d..dad107f9cf4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-21 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (MSYMBOL_IS_SPECIAL): Replace macro with function.
+ (MSYMBOL_SIZE): Replace macro with function.
+
2002-08-21 Jim Blandy <jimb@redhat.com>
* valops.c (value_cast): Simplify and correct logic for doing a
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 2887473b58c..a3d2441a693 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -173,7 +173,7 @@ mips_saved_regsize (void)
return 4;
}
-/* Macros for setting and testing a bit in a minimal symbol that
+/* Functions for setting and testing a bit in a minimal symbol that
marks it as 16-bit function. The MSB of the minimal symbol's
"info" field is used for this purpose. This field is already
being used to store the symbol size, so the assumption is
@@ -187,11 +187,6 @@ mips_saved_regsize (void)
MSYMBOL_SIZE returns the size of the minimal symbol, i.e.
the "info" field with the "special" bit masked out */
-#define MSYMBOL_IS_SPECIAL(msym) \
- (((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
-#define MSYMBOL_SIZE(msym) \
- ((long) MSYMBOL_INFO (msym) & 0x7fffffff)
-
static void
mips_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
{
@@ -203,6 +198,18 @@ mips_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
}
}
+static int
+msymbol_is_special (struct minimal_symbol *msym)
+{
+ return (((long) MSYMBOL_INFO (msym) & 0x80000000) != 0);
+}
+
+static long
+msymbol_size (struct minimal_symbol *msym)
+{
+ return ((long) MSYMBOL_INFO (msym) & 0x7fffffff);
+}
+
/* XFER a value from the big/little/left end of the register.
Depending on the size of the value it might occupy the entire
register or just part of it. Make an allowance for this, aligning
@@ -745,7 +752,7 @@ pc_is_mips16 (bfd_vma memaddr)
MIPS16 or normal MIPS. */
sym = lookup_minimal_symbol_by_pc (memaddr);
if (sym)
- return MSYMBOL_IS_SPECIAL (sym);
+ return msymbol_is_special (sym);
else
return 0;
}
@@ -6137,9 +6144,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: ECOFF_REG_TO_REGNUM # %s\n",
XSTRING (ECOFF_REG_TO_REGNUM (REGNUM)));
fprintf_unfiltered (file,
- "mips_dump_tdep: ELF_MAKE_MSYMBOL_SPECIAL # %s\n",
- XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (SYM, MSYM)));
- fprintf_unfiltered (file,
"mips_dump_tdep: FCRCS_REGNUM = %d\n",
FCRCS_REGNUM);
fprintf_unfiltered (file,
@@ -6236,11 +6240,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: MIPS_SAVED_REGSIZE = %d\n",
MIPS_SAVED_REGSIZE);
fprintf_unfiltered (file,
- "mips_dump_tdep: MSYMBOL_IS_SPECIAL = function?\n");
- fprintf_unfiltered (file,
- "mips_dump_tdep: MSYMBOL_SIZE # %s\n",
- XSTRING (MSYMBOL_SIZE (MSYM)));
- fprintf_unfiltered (file,
"mips_dump_tdep: OP_LDFPR = used?\n");
fprintf_unfiltered (file,
"mips_dump_tdep: OP_LDGPR = used?\n");