Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: steve@asicdesigners.com (Steve Watt)
To: Andrew Cagney <ac131313@redhat.com>,
	Steve Watt <steve@asicdesigners.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch rfc] Add NUM_REGS pseudo regs to MIPS
Date: Mon, 21 Jul 2003 22:57:00 -0000	[thread overview]
Message-ID: <200307212257.h6LMvkcA021186@oberon.asicdesigners.com> (raw)
In-Reply-To: Andrew Cagney <ac131313@redhat.com> "Re: [patch rfc] Add NUM_REGS pseudo regs to MIPS" (Jul 21, 18:07)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2381 bytes --]

On Jul 21, 18:07, Andrew Cagney wrote:
} Subject: Re: [patch rfc] Add NUM_REGS pseudo regs to MIPS
} 
} > (top-gdb) info stack
} > #0  internal_error (file=0x824e580 "../../combined/gdb/mips-tdep.c", line=5671, 
} >     string=0x824e555 "%s: Assertion `%s' failed.") at ../../combined/gdb/utils.c:807
} > #1  0x080dd45c in mips_register_sim_regno (regnum=90)
} >     at ../../combined/gdb/mips-tdep.c:5671
} > #2  0x080cb037 in gdbarch_register_sim_regno (gdbarch=0x83179d8, reg_nr=90)
} >     at ../../combined/gdb/gdbarch.c:3983
} > #3  0x08127e0f in gdbsim_fetch_register (regno=90) at ../../combined/gdb/remote-sim.c:299
} > #4  0x08094450 in legacy_read_register_gen (regnum=90, 
} >     myaddr=0xbffff0f0 "Ððÿ¿Øy1\b\030ñÿ¿\020\227\f\bØy1\bZ")
} >     at ../../combined/gdb/regcache.c:730
} > #5  0x0809453e in regcache_raw_read (regcache=0x8323000, regnum=90, buf=0xbffff0f0)
} >     at ../../combined/gdb/regcache.c:748
} > #6  0x0809499a in regcache_cooked_read (regcache=0x8323000, regnum=90, buf=0xbffff0f0)
} >     at ../../combined/gdb/regcache.c:838
} 
} It went wrong here.  It tests (regnum < ->nr_raw_registers), but for 
} legacy targets NR_RAW_REGISTERS == NUM_REGS + NUM_PSEUDO_REGS :-(
} 
} The correct fix is to just delete a heap of code, however ...
} 
}  From regcache.c:
} 
} >   if ((!gdbarch_pseudo_register_read_p (gdbarch)
} >        && !gdbarch_pseudo_register_write_p (gdbarch)
} >        && !gdbarch_register_type_p (gdbarch))
} >       || REGISTER_BYTE_P () || REGISTER_RAW_SIZE_P ())
} >     {
} >       descr->legacy_p = 1;
} >       init_legacy_regcache_descr (gdbarch, descr);
} >       return descr;
} >     }
} 
} can you try removing the two || ... clauses I added 2003-07-03?
} 
} I think my change may have fixed some legacy code but broke others :-(

Well, that fixes it.  That's my favorite kind of bug fix, but also my
favorite (not!) kind of repercussion.

At least I've got a toy I can play with again!

Thanks for the help, and good luck on the Right Fix.  Let me know if
there's something more you want checked.


Steve

-- 
Steve Watt       KD6GGD  PP-ASEL-IA       Email at  home: steve@watt.com
Chelsio Communications   http://www.chelsio.com/    work: steve@chelsio.com
510 N. Pastoria Ave                                Voice: +1 408 962 3627
Sunnyvale, CA, USA, 94085                            Fax: +1 408 730 2580


             reply	other threads:[~2003-07-21 22:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-21 22:57 Steve Watt [this message]
2003-07-27 13:50 ` [patch rfc, 6.0?] only allow raw raw registers; Was: " Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2003-07-21 18:20 Steve Watt
2003-07-21 22:38 ` Andrew Cagney
2003-07-19  0:13 Steve Watt
2003-07-21 15:26 ` Andrew Cagney
2003-07-07 20:01 Steve Watt
2003-07-18 22:20 ` Andrew Cagney
2003-06-16 15:35 Andrew Cagney
2003-06-16 15:44 ` Daniel Jacobowitz
2003-06-18  4:32 ` Kevin Buettner
2003-06-18 16:36   ` Andrew Cagney
2003-06-18 23:54     ` Kevin Buettner
2003-06-21 18:22 ` Andrew Cagney

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=200307212257.h6LMvkcA021186@oberon.asicdesigners.com \
    --to=steve@asicdesigners.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.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