Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* SEGV on display /i $pc with i386 target
@ 2002-08-28 22:51 Christopher Faylor
  2002-08-29 15:40 ` Mark Kettenis
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Faylor @ 2002-08-28 22:51 UTC (permalink / raw)
  To: gdb

I just noticed a SEGV whenever I do a 'display /i $pc' on cygwin.

I tried building a gdb for linux to see what was going wrong on
cygwin but it isn't much better:

(top-gdb) display /i $pc
1: x/i $(null)  0x8072f42 <main+6>:     push   $0x6

The problem comes from the fact that, while gdb understands that
$pc == $eip, it doesn't seem to know how to rename $pc to $eip
when it is outputting the register name.  You can get the same
behavior by doing something like 'display /i $ps', too (even
if that doesn't make sense it shouldn't SEGV).

The simplest way to fix this is to extend the i386_register_names array
to include builtin register names, however, maybe the right way to fix
this is to add something to builtin-reg.c.

I noticed that i386_register_names seems to have 41 elements while
the sum of NUM_REGS + NUM_PSEUDO_REGS == 40.  Is that intentional?

cgf


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-09-02 20:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-28 22:51 SEGV on display /i $pc with i386 target Christopher Faylor
2002-08-29 15:40 ` Mark Kettenis
2002-08-29 18:05   ` Christopher Faylor
2002-08-29 20:37     ` Elena Zannoni
2002-08-29 20:53       ` Christopher Faylor
2002-09-02 13:26         ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox