Re: Remote query for structure layout

Simon Marchi via Gdb
2021-03-29T20:10:34Z

On 2021-03-29 4:02 p.m., Philippe Waroquiers wrote:
> On Mon, 2021-03-29 at 15:42 -0400, Simon Marchi via Gdb wrote:
>> So I would lean towards a home-grown format, but it's more work to
>> ensure it is extensible if we want to include more information in the
>> replies in the future.
>
> Wouldn't it be possible to have the target sending back some (maybe limited
> and/or partial) 'standard debug info' (such as dwarf) for these types ?
>
> I have a very limited knowledge of dwarf, so no idea if it is easy
> to have 'small scale' debug info being returned by the target
> (e.g. by having the needed dwarf entries linked as binary data
> inside the target, or generated by the target).
>
> This might allow to reuse the existing GDB dwarf parser and likely
> give a flexible enough description 'language'.

It's the other way around. In the problem at hand, GDB has all the
information and it's the target who queries GDB for symbol and types.

Simon