On 21/7/2022 6:30 pm, Sebastian Huber wrote:
> On 21.07.22 10:27, Chris Johns wrote:
>> On 21/7/2022 6:21 pm, Sebastian Huber wrote:
>>> On 21.07.22 10:16, Chris Johns wrote:
>>>> On 21/7/2022 6:11 pm, Sebastian Huber wrote:
>>>>> On 21.07.22 10:03, Chris Johns wrote:
>>>>>> As an aside, does gdb know about TLS variables and so will `errno` be
>>>>>> visible?
>>>>> Good question, there seems to be some support missing. For example for
>>>>> arm/xilinx_zynq_a9_qemu:
>>>>>
>>>>> Breakpoint 7, Init (ignored=2118804) at
>>>>> /home/EB/sebastian_h/src/rtems/testsuites/samples/fileio/init.c:1169
>>>>> 1169      TEST_BEGIN();
>>>>> (gdb) watch _tls_errno
>>>>> Cannot find thread-local variables on this target
>>>>> (gdb) p _tls_errno
>>>>> Cannot find thread-local variables on this target
>>>> I wonder if we need to configure gdb so it understands how we handle TLS
>>>> variables?
>>> It could be a Qemu issue. In GDB there is a
>>>
>>>        /* Check for the TLS register feature.  */
>>>        feature = tdesc_find_feature (tdesc, "org.gnu.gdb.arm.tls");
>>>
>>> However, this is not provided by Qemu.
>> Is this something in the remote protocol? I would have thought the ABI would
>> define the register?
> 
> Yes, I guess this is a part of the machine description provided by the server
> (Qemu). This stuff seems to be quite new (from 2022) added by John Baldwin for
> FreeBSD.

That would only apply if qemu was providing the XML description and it is not
normally something I have seen. Most of time the built in XML is used.

The only packet I could see in a quick look at the protocol is offsets for TLS
variables for dynamically loaded object files. This is needed because the link
editor allocates the variables when relocating.

Chris
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to