forked from Imagelibrary/binutils-gdb
gdb: remove MSYMBOL_TARGET_FLAG_{1,2} macros
Replace with equivalent getter/setter macros. Change-Id: I1042564dd47347337374762bd64ec31b5c573ee2
This commit is contained in:
@@ -82,10 +82,10 @@ static bool arm_debug;
|
||||
MSYMBOL_IS_SPECIAL Tests the "special" bit in a minimal symbol. */
|
||||
|
||||
#define MSYMBOL_SET_SPECIAL(msym) \
|
||||
MSYMBOL_TARGET_FLAG_1 (msym) = 1
|
||||
(msym)->set_target_flag_1 (true)
|
||||
|
||||
#define MSYMBOL_IS_SPECIAL(msym) \
|
||||
MSYMBOL_TARGET_FLAG_1 (msym)
|
||||
(msym)->target_flag_1 ()
|
||||
|
||||
struct arm_mapping_symbol
|
||||
{
|
||||
|
||||
@@ -58,16 +58,16 @@
|
||||
MSYMBOL_IS_RTI Tests the "RTC" bit in a minimal symbol. */
|
||||
|
||||
#define MSYMBOL_SET_RTC(msym) \
|
||||
MSYMBOL_TARGET_FLAG_1 (msym) = 1
|
||||
(msym)->set_target_flag_1 (true)
|
||||
|
||||
#define MSYMBOL_SET_RTI(msym) \
|
||||
MSYMBOL_TARGET_FLAG_2 (msym) = 1
|
||||
(msym)->set_target_flag_2 (true)
|
||||
|
||||
#define MSYMBOL_IS_RTC(msym) \
|
||||
MSYMBOL_TARGET_FLAG_1 (msym)
|
||||
(msym)->target_flag_1 ()
|
||||
|
||||
#define MSYMBOL_IS_RTI(msym) \
|
||||
MSYMBOL_TARGET_FLAG_2 (msym)
|
||||
(msym)->target_flag_2 ()
|
||||
|
||||
enum insn_return_kind {
|
||||
RETURN_RTS,
|
||||
|
||||
@@ -435,12 +435,12 @@ mips_elf_make_msymbol_special (asymbol * sym, struct minimal_symbol *msym)
|
||||
|
||||
if (ELF_ST_IS_MICROMIPS (st_other))
|
||||
{
|
||||
MSYMBOL_TARGET_FLAG_MICROMIPS (msym) = 1;
|
||||
SET_MSYMBOL_TARGET_FLAG_MICROMIPS (msym);
|
||||
msym->set_value_address (msym->value_raw_address () | 1);
|
||||
}
|
||||
else if (ELF_ST_IS_MIPS16 (st_other))
|
||||
{
|
||||
MSYMBOL_TARGET_FLAG_MIPS16 (msym) = 1;
|
||||
SET_MSYMBOL_TARGET_FLAG_MIPS16 (msym);
|
||||
msym->set_value_address (msym->value_raw_address () | 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,17 @@ enum mips_isa
|
||||
};
|
||||
|
||||
/* Corresponding MSYMBOL_TARGET_FLAG aliases. */
|
||||
#define MSYMBOL_TARGET_FLAG_MIPS16 MSYMBOL_TARGET_FLAG_1
|
||||
#define MSYMBOL_TARGET_FLAG_MICROMIPS MSYMBOL_TARGET_FLAG_2
|
||||
#define MSYMBOL_TARGET_FLAG_MIPS16(sym) \
|
||||
(sym)->target_flag_1 ()
|
||||
|
||||
#define SET_MSYMBOL_TARGET_FLAG_MIPS16(sym) \
|
||||
(sym)->set_target_flag_1 (true)
|
||||
|
||||
#define MSYMBOL_TARGET_FLAG_MICROMIPS(sym) \
|
||||
(sym)->target_flag_2 ()
|
||||
|
||||
#define SET_MSYMBOL_TARGET_FLAG_MICROMIPS(sym) \
|
||||
(sym)->set_target_flag_2 (true)
|
||||
|
||||
/* Return the MIPS ISA's register size. Just a short cut to the BFD
|
||||
architecture's word size. */
|
||||
|
||||
@@ -1639,7 +1639,7 @@ ppc_elfv2_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
|
||||
default:
|
||||
break;
|
||||
case 8:
|
||||
MSYMBOL_TARGET_FLAG_1 (msym) = 1;
|
||||
msym->set_target_flag_1 (true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1659,7 +1659,7 @@ ppc_elfv2_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
|
||||
/* See ppc_elfv2_elf_make_msymbol_special for how local entry point
|
||||
offset values are encoded. */
|
||||
if (MSYMBOL_TARGET_FLAG_1 (fun.minsym))
|
||||
if (fun.minsym->target_flag_1 ())
|
||||
local_entry_offset = 8;
|
||||
|
||||
if (fun.value_address () <= pc
|
||||
|
||||
35
gdb/symtab.h
35
gdb/symtab.h
@@ -735,6 +735,34 @@ struct minimal_symbol : public general_symbol_info
|
||||
return m_has_size;
|
||||
}
|
||||
|
||||
/* Return this minimal symbol's first target-specific flag. */
|
||||
|
||||
bool target_flag_1 () const
|
||||
{
|
||||
return m_target_flag_1;
|
||||
}
|
||||
|
||||
/* Set this minimal symbol's first target-specific flag. */
|
||||
|
||||
void set_target_flag_1 (bool target_flag_1)
|
||||
{
|
||||
m_target_flag_1 = target_flag_1;
|
||||
}
|
||||
|
||||
/* Return this minimal symbol's second target-specific flag. */
|
||||
|
||||
bool target_flag_2 () const
|
||||
{
|
||||
return m_target_flag_2;
|
||||
}
|
||||
|
||||
/* Set this minimal symbol's second target-specific flag. */
|
||||
|
||||
void set_target_flag_2 (bool target_flag_2)
|
||||
{
|
||||
m_target_flag_2 = target_flag_2;
|
||||
}
|
||||
|
||||
/* Size of this symbol. dbx_end_psymtab in dbxread.c uses this
|
||||
information to calculate the end of the partial symtab based on the
|
||||
address of the last symbol plus the size of the last symbol. */
|
||||
@@ -753,8 +781,8 @@ struct minimal_symbol : public general_symbol_info
|
||||
unsigned int created_by_gdb : 1;
|
||||
|
||||
/* Two flag bits provided for the use of the target. */
|
||||
unsigned int target_flag_1 : 1;
|
||||
unsigned int target_flag_2 : 1;
|
||||
unsigned int m_target_flag_1 : 1;
|
||||
unsigned int m_target_flag_2 : 1;
|
||||
|
||||
/* Nonzero iff the size of the minimal symbol has been set.
|
||||
Symbol size information can sometimes not be determined, because
|
||||
@@ -792,9 +820,6 @@ struct minimal_symbol : public general_symbol_info
|
||||
bool text_p () const;
|
||||
};
|
||||
|
||||
#define MSYMBOL_TARGET_FLAG_1(msymbol) (msymbol)->target_flag_1
|
||||
#define MSYMBOL_TARGET_FLAG_2(msymbol) (msymbol)->target_flag_2
|
||||
|
||||
#include "minsyms.h"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user