This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: remember dwarf_line_size
Andrew Cagney <ac131313@cygnus.com> writes:
> > The change I committed May 6 to dwarf2read.c introduced the new
> > function dwarf_decode_line_header. That contained a bunch of
> > consistency checks which assumed that dwarf_line_size is actually
> > preserved between the partial symbol scan and the full symbol read.
> > It isn't.
>
> BTW,
>
> > #define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer)
> > #define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size)
> > #define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer)
> > + #define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size)
> > #define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer)
> > #define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size)
> > #define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer)
>
> I'm wondering if we even need these macros.
It's true --- they're only used in contexts where one could just as
easily put PST_PRIVATE (p) in a variable and access the fields
directly. I'd welcome a patch, if you wanted.