Re: [PATCH PR gdb/18071] TLS variables can't be resolved on aarch64-linux-gnu

Simon Marchi
2018-03-22T04:22:49Z

On 2018-03-19 15:36, Weimin Pan wrote:
> Yes, printing of a TLS fails on all platforms, not just on aarch64.
> How about changing the title to:
>
> Â Â  [PATCH PR gdb/18071] aarch64: "info" command can't resolve TLS
> variables

Maybe "info address" instead of "info"?

>> Is this code equivalent to calling lookup_minimal_symbol (name, NULL,
>> NULL) ? If
>> so, there's already lookup_bound_minimal_symbol that does the same, so
>> maybe we
>> can just drop lookup_minimal_symbol_and_objfile and use
>> lookup_bound_minimal_symbol.
>
> Yes, it turns out lookup_minimal_symbol_and_objfile(name) is equivalent
> to
> calling lookup_minimal_symbol (name, NULL, NULL). We can replace the
> call in
> info_address_command() with either lookup_minimal_symbol (name, NULL,
> NULL)
> or lookup_bound_minimal_symbol(name). Calling either one looks like a
> better fix.
>
>>
>> We could also just have lookup_minimal_symbol with parameters that
>> default to nullptr.
>> It is not clear at all to have lookup_bound_minimal_symbol and
>> lookup_minimal_symbol
>> that both return a bound_minimal_symbol, that's quite misleading.
>
> I don't know the rational behind having these two functions which get
> called in
> quite a few places. Yes, having default arguments for
> lookup_minimal_symbol()
> will be another option.
>
> Thanks very much for your comments.

Thanks for your patience :). This refactoring can be done in a separate
patch, to keep this one focused on fixing the bug.

Simon