Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>
Cc: Ulrich Weigand <uweigand@de.ibm.com>, gdb-patches@sourceware.org
Subject: Re: [PING][PATCH 2/2] Involve gdbarch in taking DWARF register pieces
Date: Thu, 28 Apr 2016 22:15:00 -0000	[thread overview]
Message-ID: <2215ba7e-fc8e-37bc-3fab-bf3f134a8ab0@redhat.com> (raw)
In-Reply-To: <m38tzxvbtr.fsf@oc1027705133.ibm.com>

On 04/28/2016 07:16 PM, Andreas Arnez wrote:

>> Also, IMHO the "actual" placement of an object within a register does
>> not conceptually depend on where the register number came from.  It
>> could come from DWARF, from some other debug format, from the user, or
>> from wherever.  Adjusting the placement only for objects with a DWARF
>> location seems wrong to me.
> 
> There's another aspect I should probably mention here.  The adjustment
> of the register number in this gdbarch method is really just a
> circumvention around the register cache's inability of representing
> *partially* valid registers.  Otherwise unwinding would result in the
> first 64 bits of such a vector register being "valid" and the others
> "invalid", and then we could slice any value types from the valid bits.

Ah, when I saw your other email pointing at the ascii art, the thought
of partially valid registers crossed my mind too.

But why do you say we don't support this?

The register cache only cares about registers in the current frame
(IOW, the real current state of a thread's registers).  And in the
current frame, the whole vector register is always valid.  So I don't
think we need to worry about the register cache.

The unwinding machinery instead works with struct values, and those _do_
support being marked partially optimized out (not saved).  You do that by
calling mark_value_bits_optimized_out on the part of the value that
is not saved.

Maybe there's e.g., some value_optimized_out() checks on common code
that might need to be replaced with a more finer-grained "these bytes/bit
here are optimized-out" check, but what else would be necessary?

> In the long run maybe we want to extend the regcache in such a
> direction, but I didn't see that in the scope of this fix.

Thanks,
Pedro Alves


  reply	other threads:[~2016-04-28 22:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 10:42 [PATCH 0/2] Fixes for some s390 fails with store.exp Andreas Arnez
2016-04-15 10:43 ` [PATCH 2/2] Involve gdbarch in taking DWARF register pieces Andreas Arnez
2016-04-15 18:10   ` Ulrich Weigand
2016-04-15 18:37     ` Pedro Alves
2016-04-18 11:53       ` Andreas Arnez
2016-04-18 13:53         ` Pedro Alves
2016-04-18 15:02           ` Andreas Arnez
2016-04-18 15:55             ` Pedro Alves
2016-04-18 15:57               ` Doug Evans
2016-04-19 12:08               ` Andreas Arnez
2016-04-28 13:24                 ` [PING][PATCH " Andreas Arnez
2016-04-28 14:47                   ` Pedro Alves
2016-04-28 16:51                     ` Andreas Arnez
2016-04-28 18:16                       ` Andreas Arnez
2016-04-28 22:15                         ` Pedro Alves [this message]
2016-04-28 22:15                       ` Pedro Alves
2016-06-14 17:03                   ` Jan Kratochvil
2016-04-15 10:43 ` [PATCH 1/2] S390: Take value from sub-register if applicable Andreas Arnez
2016-04-15 18:08   ` Ulrich Weigand

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=2215ba7e-fc8e-37bc-3fab-bf3f134a8ab0@redhat.com \
    --to=palves@redhat.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /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