diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2024-07-16 23:51:59 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2024-08-12 10:31:09 -0400 |
commit | 03b40f6f55bed82bd16b2a1fd94fb8c8dbf797bf (patch) | |
tree | 6cbaaed5ce62e15621e3c7f21f872459f9be0223 /gdb/mips-tdep.c | |
parent | 10ac7e80c01125d1b2754763066dae35b13e6cb0 (diff) | |
download | fsf-binutils-gdb-03b40f6f55bed82bd16b2a1fd94fb8c8dbf797bf.zip fsf-binutils-gdb-03b40f6f55bed82bd16b2a1fd94fb8c8dbf797bf.tar.gz fsf-binutils-gdb-03b40f6f55bed82bd16b2a1fd94fb8c8dbf797bf.tar.bz2 |
gdb: drop struct keyword when using bound_minimal_symbol
This is a simple find / replace from "struct bound_minimal_symbol" to
"bound_minimal_symbol", to make things shorter and more consisten
througout. In some cases, move variable declarations where first used.
Change-Id: Ica4af11c4ac528aa842bfa49a7afe8fe77a66849
Reviewed-by: Keith Seitz <keiths@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index ae58d7c..e935e26 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -490,10 +490,10 @@ mips_make_symbol_special (struct symbol *sym, struct objfile *objfile) /* We are in symbol reading so it is OK to cast away constness. */ struct block *block = (struct block *) sym->value_block (); CORE_ADDR compact_block_start; - struct bound_minimal_symbol msym; compact_block_start = block->start () | 1; - msym = lookup_minimal_symbol_by_pc (compact_block_start); + bound_minimal_symbol msym + = lookup_minimal_symbol_by_pc (compact_block_start); if (msym.minsym && !msymbol_is_mips (msym.minsym)) { block->set_start (compact_block_start); @@ -1212,13 +1212,12 @@ show_mask_address (struct ui_file *file, int from_tty, int mips_pc_is_mips (CORE_ADDR memaddr) { - 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 (make_compact_addr (memaddr)); + bound_minimal_symbol sym + = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr)); if (sym.minsym) return msymbol_is_mips (sym.minsym); else @@ -1230,13 +1229,12 @@ mips_pc_is_mips (CORE_ADDR memaddr) int mips_pc_is_mips16 (struct gdbarch *gdbarch, CORE_ADDR memaddr) { - 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 (make_compact_addr (memaddr)); + bound_minimal_symbol sym + = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr)); if (sym.minsym) return msymbol_is_mips16 (sym.minsym); else @@ -1248,14 +1246,13 @@ mips_pc_is_mips16 (struct gdbarch *gdbarch, CORE_ADDR memaddr) int mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr) { - 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 if the function is microMIPS. Otherwise if bit 0 of the address is set, then ELF file flags will tell if this is a microMIPS function. */ - sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr)); + bound_minimal_symbol sym + = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr)); if (sym.minsym) return msymbol_is_micromips (sym.minsym); else @@ -1268,14 +1265,13 @@ mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr) static enum mips_isa mips_pc_isa (struct gdbarch *gdbarch, CORE_ADDR memaddr) { - 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 this to decide if the function is MIPS16 or microMIPS or normal 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 (make_compact_addr (memaddr)); + bound_minimal_symbol sym + = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr)); if (sym.minsym) { if (msymbol_is_micromips (sym.minsym)) @@ -3841,7 +3837,6 @@ mips_stub_frame_sniffer (const struct frame_unwind *self, { gdb_byte dummy[4]; CORE_ADDR pc = get_frame_address_in_block (this_frame); - struct bound_minimal_symbol msym; /* Use the stub unwinder for unreadable code. */ if (target_read_memory (get_frame_pc (this_frame), dummy, 4) != 0) @@ -3852,7 +3847,7 @@ 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); + bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc); if (msym.minsym != NULL && msym.minsym->linkage_name () != NULL && startswith (msym.minsym->linkage_name (), ".pic.")) @@ -7824,7 +7819,6 @@ mips_skip_pic_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc) { struct gdbarch *gdbarch = get_frame_arch (frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - struct bound_minimal_symbol msym; int i; gdb_byte stub_code[16]; int32_t stub_words[4]; @@ -7832,7 +7826,7 @@ mips_skip_pic_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc) /* The stub for foo is named ".pic.foo", and is either two instructions inserted before foo or a three instruction sequence which jumps to foo. */ - msym = lookup_minimal_symbol_by_pc (pc); + bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc); if (msym.minsym == NULL || msym.value_address () != pc || msym.minsym->linkage_name () == NULL |