Re: [PATCH v4 12/12] [PowerPC] Add support for HTM registers

Pedro Franco de Carvalho
2018-08-16T23:47:27Z

Pedro Franco de Carvalho <pedromfc@linux.ibm.com> writes:

> Pedro Franco de Carvalho <pedromfc@linux.ibm.com> writes:
>
>> Pedro Alves <palves@redhat.com> writes:
>>
>>> I won't pretend to understand the above fully (not an Power expert),
>>> but the question I ended up with was, after all this, will the
>>> GDB-generated files end up looking like kernel-generated cores?
>>> Or are there plans for that?
>>
>> They will end up looking different for this regset note section. This
>> really seems like a kernel bug, which I'm hoping will get fixed.
>
> Correction: the size of the regset note section for 32-bit threads seems
> like a kernel bug. The fact that the kernel includes values for
> registers that GDB doesn't include in the note section (by zeroing them)
> isn't a kernel bug, but to do this GDB would have to be aware of all
> these registers that aren't defined in the architecture.
>
> --
> Pedro Franco de Carvalho

Does this issue block the patches?

I could add the registers to GDB but it would be messy, since it would
require a linux-specific target description with these extra registers.

Alternatively, I can make GDB not generate this specific note section,
this is a simple change in the current patches. The only confusing
thing is that when reading back the core file through GDB the
checkpointed GPRs will show up as unavailable, even if the thread was in
the middle of a transaction when the core file was generated, while all
the other checkpointed registers will be available.

Thanks!!

--
Pedro Franco de Carvalho