gdb/dwarf: remove line_header parameter from dwarf2_decode_lines
The function declaration for dwarf2_decode_lines is:
void dwarf_decode_lines (struct line_header *lh, struct dwarf2_cu *cu,
unrelocated_addr lowpc, bool decode_mapping)
However, it is always the case that:
lh == cu->line_header
I propose that we simplify the dwarf_decode_lines signature by
removing the line_header parameter. The same is true for
dwarf_decode_lines_1, which is only called from dwarf_decode_lines.
I'm proposing this change because I was looking through the DWARF
code, trying to understand how symtabs are created, and this extra
complexity just makes things harder to understand: what is the
relationship between the line_header (LH) and dwarf2_cu (CU)
parameters? When would we ever want to process a line_header other
than the one attached to CU? (answer: never, and we don't). This
simplification makes things easier to understand (IMHO).
There should be no user visible changes after this commit.
Approved-By: Tom Tromey <tom@tromey.com>
3 files changed