Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org, Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [RFA] fetch result of locdesc expressions as integer (not address)
Date: Wed, 05 Oct 2011 01:09:00 -0000	[thread overview]
Message-ID: <20111005010843.GN19246@adacore.com> (raw)
In-Reply-To: <201110042305.p94N5qTW011596@d06av02.portsmouth.uk.ibm.com>

> Well, maybe they should, but right now they don't, and neither does
> your patch add any such correction.  The point I was trying to make
> is that therefore, your patch as it is, while fixing one class of
> bugs on some targets, may simultaneously introduce a different class
> of bugs on other targets.  I'm not sure this is a good idea ...

I understand, but I'm just restoring the previous behavior which,
I believe was changed unintentionally. It's working fine for instance
on AVR, where the distinction makes a difference, so we're not doing
so bad.  Additionally, I tested this patch against the testsuite
which does include a test for the problem that Jan wanted to fix.

BTW: Perhaps part of the reason why it is working OK right now
     is  that we do the integer-to-address adjustment only for
     certain type codes. See value_as_address:

  if (TYPE_CODE (value_type (val)) != TYPE_CODE_PTR
      && TYPE_CODE (value_type (val)) != TYPE_CODE_REF
      && gdbarch_integer_to_address_p (gdbarch))
    return gdbarch_integer_to_address (gdbarch, value_type (val),
                                       value_contents (val));

-- 
Joel


  reply	other threads:[~2011-10-05  1:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 21:10 Joel Brobecker
2011-10-04 17:16 ` Tom Tromey
2011-10-04 19:32 ` Ulrich Weigand
2011-10-04 19:38   ` Joel Brobecker
2011-10-04 23:06     ` Ulrich Weigand
2011-10-05  1:09       ` Joel Brobecker [this message]
2011-10-05 12:30         ` Ulrich Weigand
2011-10-09 16:35 ` [patch#2] " Jan Kratochvil
2011-10-17  1:56   ` Joel Brobecker
2011-10-17  7:59     ` Tristan Gingold
2011-10-17 13:22       ` [commit] " Jan Kratochvil

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=20111005010843.GN19246@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --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