From: Pedro Alves <palves@redhat.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>,
gdb-patches@sourceware.org, Ulrich.Weigand@de.ibm.com
Subject: Re: [PATCH v3 3/3] Dynamic core regset sections support
Date: Thu, 13 Jun 2013 11:02:00 -0000 [thread overview]
Message-ID: <51B99143.3080808@redhat.com> (raw)
In-Reply-To: <871u86e5gi.fsf@br87z6lw.de.ibm.com>
On 06/13/2013 10:16 AM, Andreas Arnez wrote:
> Mark Kettenis <mark.kettenis@xs4all.nl> writes:
>
>> Sorry, but I really don't like the obfuscation that this diff brings
>> to the amd64 & i186 Linux targets.
>
> If you can point me specifically to the spot where the obfuscation
> occurs, I'll do my best to clean it up. A side-intention with the patch
> actually was to *improve* readability, mainly by avoiding copy- & pasted
> array initializers and distributed code logic. And indeed, while
> offering improved flexibility, the patch overall saves 60 lines of code:
>
> 11 files changed, 266 insertions(+), 326 deletions(-)
>
> amd64 is the only architecture that suffers from a slight code increase
> (8 lines).
>
>> Is there really no other way to this?
>
> There are always other ways ;-) I already implemented some of them, and
> the proposed patch seemed like the best approach to me.
>
>> Is it really that bad to write out the invalid TDB registers? If GDB
>> recognizes them as invalid, this shouldn't be a big issue should it?
>
> Do you mean to always write the TDB regset into the core dump, like
> without the patch? And then add some logic such that GDB recognizes
> zero values in the register note section as invalid and clears the
> regset? Or do I misinterpret your suggestion?
Not zero, but present them as unavailable/invalid. I tend to agree with
Mark. Isn't there a control register GDB can read to check whether
a transaction is in progress (useful for both core and live debugging) ?
> BTW, I wonder how transaction diagnostics works on x86. E.g., when an
> illegal instruction occurs within a hardware transaction, will the core
> dump contain the address of the violating instruction?
I haven't personally tried debugging anything with transaction support yet.
--
Pedro Alves
next prev parent reply other threads:[~2013-06-13 9:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 15:12 [RFA PATCH v3 0/3] Add TDB regset support Andreas Arnez
2013-06-12 15:12 ` [PATCH v3 1/3] S/390 regmap rework Andreas Arnez
2013-06-12 15:13 ` [PATCH v3 2/3] Add TDB regset Andreas Arnez
2013-06-12 15:23 ` [PATCH v3 3/3] Dynamic core regset sections support Andreas Arnez
2013-06-12 16:06 ` Mark Kettenis
2013-06-13 9:32 ` Andreas Arnez
2013-06-13 11:02 ` Pedro Alves [this message]
2013-06-13 12:23 ` Andreas Arnez
2013-06-13 14:44 ` Pedro Alves
2013-06-13 17:36 ` Andreas Arnez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B99143.3080808@redhat.com \
--to=palves@redhat.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox