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: [rfa:i386] Add mmx registers


Date: Tue, 13 Aug 2002 10:35:37 -0400
From: Andrew Cagney <ac131313@ges.redhat.com>

> Hello,
> > This adds mmx registers to the i386.
>
Done, this is what I committed.

Ouch! This patch uncovers a problem in the new regcache code and
segfaults on my FreeBSD 4.6-STABLE system. The problem is that:
My Red Hat GNU/Linux tests didn't bat an eyelid :-(

   +  set_gdbarch_pseudo_register_read (gdbarch, i386_pseudo_register_read);
   +  set_gdbarch_pseudo_register_write (gdbarch, i386_pseudo_register_write);

changes the i386 target's register cache from "legacy" to "new".  This
means that there isn't room for the pseudo registers in
register_valid_p, yet registers_changed() tries to frob the entries
for the pseudo registers.

I don't see an obvious way to fix this.  Any bright ideas Andrew?
Hmm, yes.  It should be clearing:
	[0 .. current_regcache->descr->nr_raw_registers)

Andrew



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