Re: [PATCH 0/7] Class-fy partial_die_info

Yao Qi
2018-01-25T14:03:13Z

On Thu, Jan 25, 2018 at 12:05 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>
> What's the advantage of turning this struct into a class?
> Is it memory management?
>
> (sorry if it's obvious from the code - C++ dummy, here)
>

I am fixing PR 22531, that is GDB should coalesce consecutive line
table entries in some cases. However, one exception here is that
GCC emits two entries to mark the end of prologue. In this case, GDB
can't coalesce them.

I wrote some unit tests to dwarf_decode_lines_1,
with an input to provide dwarf line table, and verify dwarf_decode_lines_1
can get line table correctly. In order to write unit tests, I want to easily
create the context for each unit test, like dwarf2_per_cu_data, dwarf2_cu,
line_header, etc. So I have to class-fy them, and class-fy these structs
requires class-fy other structs, it turns out that I nearly class-fy all structs
in dwarf2read.c. This patch series is just part of the whole work.

--
Yao (齐尧)