Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Joel Brobecker'" <brobecker@adacore.com>, <kettenis@gnu.org>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFC] Improve amd64 prologue analysis
Date: Fri, 19 Nov 2010 22:50:00 -0000	[thread overview]
Message-ID: <000901cb883c$067a8860$136f9920$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20101119172011.GI2634@adacore.com>


   I think that your code does indeed catch some 
instructions that are not covered by my patch,
especially in Windows DLL.

  Concerning your pre_prologue function, I 
think that I found the explanation in
"amd64 Prolog and Epilog" description page from MSDN.

  This page states that before storing
non-volatile registers and allocating the local stack,
the register parameters should be placed into
the stack space that must be allocated anyhow 
when calling a function according to the ABI.

http://msdn.microsoft.com/en-us/library/tawsa7cb.aspx

  This means that basically only 8 patterns should
be possible:

 movq %rcx, 8(%rsp)  or movq %xmm0, 8(%rsp)
 movq %rdx, 16(%rsp) or movq %xmm1, 16(%rsp)
 movq %r8, 24(%rsp)  or movq %xmm2, 24(%rsp)
 movq %r9, 32(%rsp)  or movq %xmm3, 32(%rsp)

  But apparently KernelBase DLL
doesn't itself follow this rule,
and other registers are saved into this stack space
allocated for register parameters...
So that keeping it general makes sense.

  Mark, what should we do about those patches?

Pierre


  reply	other threads:[~2010-11-19 22:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 17:28 Pierre Muller
2010-11-18 17:22 ` Joel Brobecker
2010-11-19  8:15   ` Pierre Muller
2010-11-19 17:20     ` Joel Brobecker
2010-11-19 22:50       ` Pierre Muller [this message]
2010-12-14  7:05         ` Joel Brobecker
2010-12-14  9:58           ` Pedro Alves
2010-12-15 23:07           ` Mark Kettenis
2010-12-16  4:15             ` Joel Brobecker
2010-11-24 21:19     ` Mark Kettenis
2010-11-24 22:15       ` Joel Brobecker
2010-11-24 22:26         ` Joel Brobecker
2010-11-25 13:39           ` Mark Kettenis
2010-11-25 16:30             ` Joel Brobecker
2010-11-25 19:19               ` Kai Tietz
2010-11-24 22:17       ` Joel Brobecker

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='000901cb883c$067a8860$136f9920$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kettenis@gnu.org \
    /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