gdb parsing question
Metzger, Markus T
markus.t.metzger@intel.com
Tue May 31 09:33:01 GMT 2022
Thanks, Tom,
>> I'm debugging a fail in gdb.base/non-lazy-array-index.exp and I'm
>> wondering why, for parsing '$.f', gdb would lookup 'f' as global
>> symbol [1]?
>
>> I would have expected it to lookup the type of '$' and lookup 'f' in its members.
>
>I am not really sure, but the lexer in c-exp.y doesn't really know a
>whole lot. It often has no idea of the context, so when classifying a
>name it may do some lookup. That is, there may not be a real reason.
>
>Whether or not the result of this lookup is then used in the parser is a
>different question -- for example the field_name production seems to
>just use the underlying 'stoken', which is just the text.
The test checks that we're not doing any xfer when evaluating from the
history. When adding linker namespaces, however, we need to read the
debug base as part of svr4_iterate_over_objfiles_in_search_order(). This
may require xfers.
GDB used to cache that but all places have been changed to re-read it
every time to handle relocating it as comments suggest.
I changed the test to check for auxv accesses and treat this as XFAIL.
regards,
markus.
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