aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-08 19:59:09 +0000
committerTom Tromey <tromey@redhat.com>2013-04-08 19:59:09 +0000
commit7cbd4a934e9cf3808e1199c62e65b4c25b24b4e5 (patch)
treef43a0ccccead27184646d90998d0054410abd6e3 /gdb/mips-tdep.c
parentf85f34ede85d0c306e689736c6694caa2f0a0f78 (diff)
downloadgdb-7cbd4a934e9cf3808e1199c62e65b4c25b24b4e5.zip
gdb-7cbd4a934e9cf3808e1199c62e65b4c25b24b4e5.tar.gz
gdb-7cbd4a934e9cf3808e1199c62e65b4c25b24b4e5.tar.bz2
* minsyms.h (struct bound_minimal_symbol): New.
(lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove objfile argument. (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. * minsyms.c (lookup_minimal_symbol_by_pc_1) (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. (in_gnu_ifunc_stub): Update. (lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove 'objfile_p' argument. (lookup_solib_trampoline_symbol_by_pc): Update. * ada-tasks.c, amd64-windows-tdep.c, arm-tdep.c, arm-wince-tdep.c, block.c, blockframe.c, breakpoint.c, btrace.c, c-valprint.c, dwarf2loc.c, elfread.c, frame.c, frv-tdep.c, glibc-tdep.c, gnu-v2-abi.c, gnu-v3-abi.c, hppa-hpux-tdep.c, i386-tdep.c, ia64-tdep.c, infcall.c, infcmd.c, jit.c, linux-fork.c, m32c-tdep.c, m68hc11-tdep.c, maint.c, mips-tdep.c, p-valprint.c, parse.c, ppc-linux-tdep.c, ppc-sysv-tdep.c, printcmd.c, rs6000-tdep.c, sh64-tdep.c, stack.c, symtab.c, tui/tui-disasm.c: Update.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index f83bc99..9d9451c 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1115,15 +1115,15 @@ show_mask_address (struct ui_file *file, int from_tty,
int
mips_pc_is_mips (CORE_ADDR memaddr)
{
- struct minimal_symbol *sym;
+ struct bound_minimal_symbol sym;
/* Flags indicating that this is a MIPS16 or microMIPS function is
stored by elfread.c in the high bit of the info field. Use this
to decide if the function is standard MIPS. Otherwise if bit 0
of the address is clear, then this is a standard MIPS function. */
sym = lookup_minimal_symbol_by_pc (memaddr);
- if (sym)
- return msymbol_is_mips (sym);
+ if (sym.minsym)
+ return msymbol_is_mips (sym.minsym);
else
return is_mips_addr (memaddr);
}
@@ -1133,15 +1133,15 @@ mips_pc_is_mips (CORE_ADDR memaddr)
int
mips_pc_is_mips16 (struct gdbarch *gdbarch, CORE_ADDR memaddr)
{
- struct minimal_symbol *sym;
+ struct bound_minimal_symbol sym;
/* A flag indicating that this is a MIPS16 function is stored by
elfread.c in the high bit of the info field. Use this to decide
if the function is MIPS16. Otherwise if bit 0 of the address is
set, then ELF file flags will tell if this is a MIPS16 function. */
sym = lookup_minimal_symbol_by_pc (memaddr);
- if (sym)
- return msymbol_is_mips16 (sym);
+ if (sym.minsym)
+ return msymbol_is_mips16 (sym.minsym);
else
return is_mips16_addr (gdbarch, memaddr);
}
@@ -1151,7 +1151,7 @@ mips_pc_is_mips16 (struct gdbarch *gdbarch, CORE_ADDR memaddr)
int
mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr)
{
- struct minimal_symbol *sym;
+ struct bound_minimal_symbol sym;
/* A flag indicating that this is a microMIPS function is stored by
elfread.c in the high bit of the info field. Use this to decide
@@ -1159,8 +1159,8 @@ mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr)
is set, then ELF file flags will tell if this is a microMIPS
function. */
sym = lookup_minimal_symbol_by_pc (memaddr);
- if (sym)
- return msymbol_is_micromips (sym);
+ if (sym.minsym)
+ return msymbol_is_micromips (sym.minsym);
else
return is_micromips_addr (gdbarch, memaddr);
}
@@ -1171,7 +1171,7 @@ mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr)
static enum mips_isa
mips_pc_isa (struct gdbarch *gdbarch, CORE_ADDR memaddr)
{
- struct minimal_symbol *sym;
+ struct bound_minimal_symbol sym;
/* A flag indicating that this is a MIPS16 or a microMIPS function
is stored by elfread.c in the high bit of the info field. Use
@@ -1179,11 +1179,11 @@ mips_pc_isa (struct gdbarch *gdbarch, CORE_ADDR memaddr)
MIPS. Otherwise if bit 0 of the address is set, then ELF file
flags will tell if this is a MIPS16 or a microMIPS function. */
sym = lookup_minimal_symbol_by_pc (memaddr);
- if (sym)
+ if (sym.minsym)
{
- if (msymbol_is_micromips (sym))
+ if (msymbol_is_micromips (sym.minsym))
return ISA_MICROMIPS;
- else if (msymbol_is_mips16 (sym))
+ else if (msymbol_is_mips16 (sym.minsym))
return ISA_MIPS16;
else
return ISA_MIPS;
@@ -3582,7 +3582,7 @@ mips_stub_frame_sniffer (const struct frame_unwind *self,
gdb_byte dummy[4];
struct obj_section *s;
CORE_ADDR pc = get_frame_address_in_block (this_frame);
- struct minimal_symbol *msym;
+ struct bound_minimal_symbol msym;
/* Use the stub unwinder for unreadable code. */
if (target_read_memory (get_frame_pc (this_frame), dummy, 4) != 0)
@@ -3602,9 +3602,9 @@ mips_stub_frame_sniffer (const struct frame_unwind *self,
/* Calling a PIC function from a non-PIC function passes through a
stub. The stub for foo is named ".pic.foo". */
msym = lookup_minimal_symbol_by_pc (pc);
- if (msym != NULL
- && SYMBOL_LINKAGE_NAME (msym) != NULL
- && strncmp (SYMBOL_LINKAGE_NAME (msym), ".pic.", 5) == 0)
+ if (msym.minsym != NULL
+ && SYMBOL_LINKAGE_NAME (msym.minsym) != NULL
+ && strncmp (SYMBOL_LINKAGE_NAME (msym.minsym), ".pic.", 5) == 0)
return 1;
return 0;
@@ -7626,7 +7626,7 @@ mips_skip_pic_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct minimal_symbol *msym;
+ struct bound_minimal_symbol msym;
int i;
gdb_byte stub_code[16];
int32_t stub_words[4];
@@ -7635,18 +7635,18 @@ mips_skip_pic_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
instructions inserted before foo or a three instruction sequence
which jumps to foo. */
msym = lookup_minimal_symbol_by_pc (pc);
- if (msym == NULL
- || SYMBOL_VALUE_ADDRESS (msym) != pc
- || SYMBOL_LINKAGE_NAME (msym) == NULL
- || strncmp (SYMBOL_LINKAGE_NAME (msym), ".pic.", 5) != 0)
+ if (msym.minsym == NULL
+ || SYMBOL_VALUE_ADDRESS (msym.minsym) != pc
+ || SYMBOL_LINKAGE_NAME (msym.minsym) == NULL
+ || strncmp (SYMBOL_LINKAGE_NAME (msym.minsym), ".pic.", 5) != 0)
return 0;
/* A two-instruction header. */
- if (MSYMBOL_SIZE (msym) == 8)
+ if (MSYMBOL_SIZE (msym.minsym) == 8)
return pc + 8;
/* A three-instruction (plus delay slot) trampoline. */
- if (MSYMBOL_SIZE (msym) == 16)
+ if (MSYMBOL_SIZE (msym.minsym) == 16)
{
if (target_read_memory (pc, stub_code, 16) != 0)
return 0;