Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: Christopher Faylor <cgf@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: SEGV on display /i $pc with i386 target
Date: Thu, 29 Aug 2002 15:40:00 -0000	[thread overview]
Message-ID: <86k7m9p9v9.fsf@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: Christopher Faylor's message of "Thu, 29 Aug 2002 01:51:03 -0400"

Christopher Faylor <cgf@redhat.com> writes:

> 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).

Hmm, this defenitely used to work in the past.  Does anybody have an
idea what broke it?

> 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 suspect this problem isn't i386-specific, so extending
i386_register_names seems to be the wrong approach to me.

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

Sort of.  In the current situation, Depending on whether your target
supports the SSE registers NUM_REGS will be either 32 or 41.  Since
NUM_PSEUDO_REGS is 6, and 32 + 6 = 40.

Perhaps this is a good moment to warn you about an implication of
multi-arching the i386 for Cygwin: the Cygwin targets don't support
SSE anymor, since we use the "Unknown" OS/ABI for Cygwin right now.  I
doubt whether this is what you want.  You probably want to introduce
some sort of Cygwin or Win32 OS/ABI that includes those registers.

Mark


  reply	other threads:[~2002-08-29 22:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-28 22:51 Christopher Faylor
2002-08-29 15:40 ` Mark Kettenis [this message]
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

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=86k7m9p9v9.fsf@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=cgf@redhat.com \
    --cc=gdb@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