This is the mail archive of the gdb-patches@sources.redhat.com 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: [patch/RFA] multiarch INSTRUCTION_NULLIFIED


   Date: Fri, 3 Dec 2004 16:00:18 -0800
   From: Randolph Chung <randolph@tausq.org>

   I've committed the following.

Hmm.  There is a bit of an inconsistency with signed/unsigned in the code:

    static CORE_ADDR
    hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
    {
   -  return frame_unwind_register_signed (next_frame, HPPA_PCOQ_HEAD_REGNUM) & ~3;
   +  ULONGEST ipsw;
   +  CORE_ADDR pc;
   +
   +  ipsw = frame_unwind_register_signed (next_frame, HPPA_IPSW_REGNUM);
   +  pc = frame_unwind_register_signed (next_frame, HPPA_PCOQ_HEAD_REGNUM) & ~3;

Here you declare `ipsw' as ULONGEST (which is unsigned) but then use
frame_unwind_register_signed to read it.  Also, AFAIK, addresses
aren't signed on hppa (or at least aren't sign-extended) so there one
should also use frame_unwind_register_unsigned (but that problem was
already there).

These kind of things might cause problems in certain 32x64-bit
situations.

Mark


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