Add new field to disassemble_info structure: symbol_is_valid() and use it to

skip displaying arm elf mapping symbols in disassembly output.
This commit is contained in:
Nick Clifton 2003-11-14 15:12:43 +00:00
parent 22ec16a830
commit 530393d7cf
2 changed files with 28 additions and 3 deletions

View File

@ -1,3 +1,14 @@
2003-11-14 Nick Clifton <nickc@redhat.com>
* dis-asm.h (struct disassemble_info): Add new field
'symbol_is_valid' which is a function which can tell the
disassembler to skip certain symbols as they should not be
displayed to the user.
(arm_symbol_is_valid): New prototype. This is the ARM
specific function for the symbol_is_valid field.
(generic_symbol_is_valid): New prototype. This is the default
function pointed to by the symbol_is_valid field.
2003-11-06 Bruno Rohee <bruno@rohee.com> 2003-11-06 Bruno Rohee <bruno@rohee.com>
* hp-symtab.h: Fix "the the" typo. * hp-symtab.h: Fix "the the" typo.

View File

@ -130,6 +130,12 @@ typedef struct disassemble_info {
int (* symbol_at_address_func) int (* symbol_at_address_func)
(bfd_vma addr, struct disassemble_info * info); (bfd_vma addr, struct disassemble_info * info);
/* Function called to check if a SYMBOL is can be displayed to the user.
This is used by some ports that want to hide special symbols when
displaying debugging outout. */
bfd_boolean (* symbol_is_valid)
(asymbol *, struct disassemble_info * info);
/* These are for buffer_read_memory. */ /* These are for buffer_read_memory. */
bfd_byte *buffer; bfd_byte *buffer;
bfd_vma buffer_vma; bfd_vma buffer_vma;
@ -141,7 +147,7 @@ typedef struct disassemble_info {
the same value in order to get reasonable looking output. */ the same value in order to get reasonable looking output. */
int bytes_per_line; int bytes_per_line;
/* the next two variables control the way objdump displays the raw data */ /* The next two variables control the way objdump displays the raw data. */
/* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */ /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
/* output will look like this: /* output will look like this:
00: 00000000 00000000 00: 00000000 00000000
@ -251,12 +257,16 @@ extern void print_arm_disassembler_options (FILE *);
extern void parse_arm_disassembler_option (char *); extern void parse_arm_disassembler_option (char *);
extern int get_arm_regname_num_options (void); extern int get_arm_regname_num_options (void);
extern int set_arm_regname_option (int); extern int set_arm_regname_option (int);
extern int get_arm_regnames extern int get_arm_regnames (int, const char **, const char **, const char ***);
(int, const char **, const char **, const char ***); extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
/* Fetch the disassembler for a given BFD, if that support is available. */ /* Fetch the disassembler for a given BFD, if that support is available. */
extern disassembler_ftype disassembler (bfd *); extern disassembler_ftype disassembler (bfd *);
/* Amend the disassemble_info structure as necessary for the target architecture.
Should only be called after initialising the info->arch field. */
extern void disassemble_init_for_target (struct disassemble_info * info);
/* Document any target specific options available from the disassembler. */ /* Document any target specific options available from the disassembler. */
extern void disassembler_usage (FILE *); extern void disassembler_usage (FILE *);
@ -284,6 +294,10 @@ extern void generic_print_address
extern int generic_symbol_at_address extern int generic_symbol_at_address
(bfd_vma, struct disassemble_info *); (bfd_vma, struct disassemble_info *);
/* Also always true. */
extern bfd_boolean generic_symbol_is_valid
(asymbol *, struct disassemble_info *);
/* Method to initialize a disassemble_info struct. This should be /* Method to initialize a disassemble_info struct. This should be
called by all applications creating such a struct. */ called by all applications creating such a struct. */
extern void init_disassemble_info (struct disassemble_info *info, void *stream, extern void init_disassemble_info (struct disassemble_info *info, void *stream,