This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 08/17/2018 12:47 AM, Pedro Franco de Carvalho wrote:
> 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.
>>
> 
> Does this issue block the patches?

Up to you guys.  I don't really understand the nuances here.  Too many
new registers.  :-)

Off hand, I'd think it better if GDB and kernel-generated cores had
the same format.  But I can't tell which is better.

> 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.

Can you clarify what do you mean by "is messy"?  Linux-specific target
descriptions are nothing something new.  There's
gdb/features/rs6000/power64-linux.xml already, for example?

> 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.
Is the only difference zeros vs <unavailable>?  If so, I think <unavailable>
is less confusing than a bogus zero.  The former tells the truth.  A fake
zero is misleading.

Or is that so that by dropping the note we would lose access to other,
relevant info as well?

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]