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: [RFA] fetch result of locdesc expressions as integer (not address)


> 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


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