Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: fix bug in pieced value with offset
Date: Fri, 14 May 2010 20:02:00 -0000	[thread overview]
Message-ID: <m3d3wyqmws.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20100514192324.GA25176@host0.dyn.jankratochvil.net> (Jan	Kratochvil's message of "Fri, 14 May 2010 21:23:24 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> On Fri, 14 May 2010 19:29:33 +0200, Tom Tromey wrote:
>> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>> 
Jan> Thinking now if the BFD_ENDIAN_BIG patch by Ulrich Weigand
Jan> [rfc] Handle DWARF-2 value pieces residing in *parts* of a register
Jan> http://sourceware.org/ml/gdb-patches/2009-12/msg00305.html
Jan> should not have been applied also for DWARF_VALUE_STACK; but this
Jan> is outside of the scope of this patch.
[...]
Jan> I am sorry, s/should not have/should have/.  Does it make sense now?

Yeah.  However I think this is adequately handled by store_unsigned_integer.
Is it not?

Jan> I believe it should be instead:
Jan> # +	      reg_offset = (register_size (arch, gdb_regnum)
Jan> # +			    - this_size);

Jan> Therefore I believe we should read in 0xad, 0xbe, 0xef.
Jan> Your patch reads in 0xba, 0xad, 0xbe.

Thanks for walking me through it.

Jan> I agree with your sentence.  I do not agree your sentence describes
Jan> your code.  The comparison present in code is exactly the opposite
Jan> one.  Your sentence describes "n < c->addr_size".

Hah, true.

I thought for sure I asked about this on the DWARF list, but I can't
find the discussion.

Issuing a complaint in this code is somewhat strange.  We don't have
information about where the piece originated.  I think it would be
better to issue complaints in execute_stack_op... though even that is
not super, because they will be issued over and over again.

Tom


  reply	other threads:[~2010-05-14 19:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13 17:09 Tom Tromey
2010-05-13 20:54 ` Tom Tromey
2010-05-14 12:20 ` Jan Kratochvil
2010-05-14 17:54   ` Tom Tromey
2010-05-14 20:14     ` Jan Kratochvil
2010-05-14 20:02       ` Tom Tromey [this message]
2010-05-14 20:19         ` Jan Kratochvil
2010-05-14 21:27           ` Tom Tromey
2010-05-14 22:35             ` Jan Kratochvil
2010-05-21 19:41               ` Tom Tromey

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=m3d3wyqmws.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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