Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: mludvig@suse.cz
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC/i386newframe] Restore all registers from sigframe
Date: Sat, 31 May 2003 16:01:00 -0000	[thread overview]
Message-ID: <200305311601.h4VG1dVQ000356@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <3ED6050F.9010908@suse.cz> (message from Michal Ludvig on Thu, 29 May 2003 15:03:11 +0200)

   Date: Thu, 29 May 2003 15:03:11 +0200
   From: Michal Ludvig <mludvig@suse.cz>

   Hi,

   the attachd patch enables restoration of all registers when unwinding 
   from a signal handler. Currenty only PC and SP were restored and it's a 
   loss since all GPRs are there on the stack.
   It's even more important for AMD64 because there parameters are usually 
   passed in regs and not on the stack.

Indeed.  We defenitely need %ebp too to reliably unwind on the i386.
Might just as well go all the way.  The other registers are usefull
for local variables stored in registers too.  Floating-point registers
are a bit tricky though.  It's fine to leave them out for now though.

   I did it for amd64-linux and i386-linux as I don't know appropriate 
   offsets for other i386-targets. For this reason I kept a fallback to 
   sc_pc_offset/sc_sp_offset.

That's fine.  I killed the fallback for amd64 though.  And I added the
appropriate offsets for *BSD.

   Do you like the idea? Or would you choose a different approach?

This was more or less what I had in mind.  I made some changes to the
code though (you changed the offset of %esp on Linux :-().

Will check it in shortly.

Thanks,

Mark


  reply	other threads:[~2003-05-31 16:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-29 13:03 Michal Ludvig
2003-05-31 16:01 ` Mark Kettenis [this message]
2003-05-31 16:55   ` 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=200305311601.h4VG1dVQ000356@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mludvig@suse.cz \
    /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