Add dwarf2_section_info::read_string method
This moves a string-reading function to be a method on dwarf2_section_info, and then updates the users. gdb/ChangeLog 2020-03-26 Tom Tromey <tom@tromey.com> * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New method. * dwarf2/section.c: New method. From read_indirect_string_at_offset_from. * dwarf2/read.c (mapped_debug_names::namei_to_name): Update. (read_indirect_string_at_offset_from): Move to section.c. (read_indirect_string_at_offset): Rewrite. (read_indirect_line_string_at_offset): Remove. (read_indirect_string, read_indirect_line_string) (dwarf_decode_macro_bytes): Update.
This commit is contained in:
parent
a0194fa8f2
commit
4f44ae6c69
4 changed files with 46 additions and 49 deletions
|
@ -98,6 +98,11 @@ struct dwarf2_section_info
|
|||
buffer. */
|
||||
void overflow_complaint () const;
|
||||
|
||||
/* Return pointer to string in this section at offset STR_OFFSET
|
||||
with error reporting string FORM_NAME. */
|
||||
const char *read_string (struct objfile *objfile, LONGEST str_offset,
|
||||
const char *form_name);
|
||||
|
||||
union
|
||||
{
|
||||
/* If this is a real section, the bfd section. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue