2009-02-09 Tristan Gingold <gingold@adacore.com>
* NEWS: Mention feature match between objdump and readelf for dumping dwarf info. * doc/binutils.texi (objdump): Document -W/--dwarf improvments to objdump. * objdump.c (usage): Update documentation for -W/--dwarf. (enum option_values): Add OPTION_DWARF. (long_options): --dwarf can accept arguments. (dump_dwarf_section): Also check enabled field. (main): Option -W can accept arguments, code moved to dwarf.c and call dwarf_select_sections_all instead. * readelf.c (process_section_headers): Remove do_debug_lines_decoded. (parse_args): Move code to... * dwarf.c (dwarf_select_sections_by_letters, dwarf_select_sections_by_names): : ...here (new functions). (do_debug_lines_decoded): Remove and replaced by ... (FLAG_DEBUG_LINES_RAW, FLAG_DEBUG_LINES_DECODED): ... new macros. (display_debug_lines): Adjust for previous change. (dwarf_select_sections_all): New function. (debug_displays): Add initializer for enabled field. * dwarf.h (do_debug_lines_decoded): Remove. Add prototypes for the new functions. (struct dwarf_section_display): Add enabled field.
This commit is contained in:
parent
5734ee8bab
commit
4cb93e3bbe
7 changed files with 247 additions and 172 deletions
|
@ -37,7 +37,7 @@ struct dwarf_section
|
|||
* input file, as determined by load_debug_section(). */
|
||||
const char *uncompressed_name;
|
||||
const char *compressed_name;
|
||||
const char* name;
|
||||
const char *name;
|
||||
unsigned char *start;
|
||||
dwarf_vma address;
|
||||
dwarf_size_type size;
|
||||
|
@ -49,6 +49,7 @@ struct dwarf_section_display
|
|||
{
|
||||
struct dwarf_section section;
|
||||
int (*display) (struct dwarf_section *, void *);
|
||||
int *enabled;
|
||||
unsigned int relocate : 1;
|
||||
unsigned int eh_frame : 1;
|
||||
};
|
||||
|
@ -102,7 +103,6 @@ extern int eh_addr_size;
|
|||
extern int do_debug_info;
|
||||
extern int do_debug_abbrevs;
|
||||
extern int do_debug_lines;
|
||||
extern int do_debug_lines_decoded;
|
||||
extern int do_debug_pubnames;
|
||||
extern int do_debug_aranges;
|
||||
extern int do_debug_ranges;
|
||||
|
@ -120,6 +120,10 @@ extern void free_debug_section (enum dwarf_section_display_enum);
|
|||
|
||||
extern void free_debug_memory (void);
|
||||
|
||||
extern void dwarf_select_sections_by_names (const char *names);
|
||||
extern void dwarf_select_sections_by_letters (const char *letters);
|
||||
extern void dwarf_select_sections_all (void);
|
||||
|
||||
void *cmalloc (size_t, size_t);
|
||||
void *xcmalloc (size_t, size_t);
|
||||
void *xcrealloc (void *, size_t, size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue