[PATCH 1/2] gdb: Allow address space qualifier parsing in C++.

Luis Machado luis.machado@linaro.org
Fri Apr 2 12:47:32 GMT 2021


Hi,

On 4/2/21 9:33 AM, Willgerodt, Felix via Gdb-patches wrote:
>> Do we have or want a test for this?
>>
>> Tom
> 
> This '@address_space_qualifier' is a bit of an undocumented and untested feature AFAIK. Even the avr tests for __flash don't test it.
> I did search the git history a bit, but couldn't really determine why it was added. Only that it was added years before the __flash patch was.
> But since it is there and since I need a language agnostic way to specify this, I plan to use it for a future target.

Just to give some context, I have used this feature multiple times for 
architectures that expose separate address classes via DWARF, none of 
which have made its way upstream (the most recent port to use this is 
the ARM Morello one, for capability types).

I think IBM's Cell BE has used it as well, but the port was removed from 
the tree a few years ago.

But yes, it is a bit undocumented and obscure. It is hard to see tests 
for this because they tend to be arch-specific. Cell BE had tests for it 
(gdb/testsuite/gdb.cell/ea-test.exp), now removed.

> 
> The only test I could currently write for this patch is something like:
> gdb_test "*(@somerandomqualifiername int *) 0x12345678" "Unknown address space specifier: \"somerandomqualifiername\""
> 
> for a C++ program on any target. If you think that is valuable, I can easily add that.
> The target I want to use this for in the end won't be ready for upstream for a while unfortunately.
> 
> Thanks,
> Felix
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
> Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
> 


More information about the Gdb-patches mailing list