Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@gnu.org>
To: ashishm@linsyssoft.com
Cc: gdb@sources.redhat.com
Subject: Re: Possible improvement to i386 function prologue analysis.
Date: Fri, 15 Oct 2004 18:42:00 -0000	[thread overview]
Message-ID: <200410151749.i9FHnwnD000753@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <416FC732.2020609@linsyssoft.com> (message from ashish mittal on Fri, 15 Oct 2004 18:18:50 +0530)

   Date: Fri, 15 Oct 2004 18:18:50 +0530
   From: ashish mittal <ashishm@linsyssoft.com>

   Hi,

   0807a380 <captured_main>:
    807a380:       55                      push   %ebp
    807a381:       31 c0                   xor    %eax,%eax
    807a383:       89 e5                   mov    %esp,%ebp
    807a385:       57                      push   %edi
    807a386:       31 d2                   xor    %edx,%edx
    807a388:       31 c9                   xor    %ecx,%ecx
    807a38a:       56                      push   %esi
    807a38b:       53                      push   %ebx
    807a38c:       81 ec 4c 01 00 00       sub    $0x14c,%esp

   In the above instance, the function "i386_analyze_register_saves()", 
   which takes care of populating the frame cache, will fail after reading 
   the first register %edi.

Hi Ashish,

Thanks for your mail.  I agree with you analysis.  There's even a
KFAILing test in the testsuite for a very similar problem.

   Please suggest if it would be worthwhile to work on a similar check for 
   special instructions within the for loop in i386_analyze_register_saves().
   This will enable it to continue reading saved registers over such 
   occurances.

It's not as important as getting the stack frame setup right (which is
why the code in i386_analyze_frame_setup is there), but it would
certainly be nice to have it.  There a slight complication though.
The prologue analyzing stuff is also used for implementing
i386_skip_prologue().  Now i386_skip_prologue() shouldn't dwell too
far into the function.  Skipping the instructions we're talking about
here might just do that.

   I could work on a possible patch if you agree.

That'd be great.

Mark


  reply	other threads:[~2004-10-15 17:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15 14:56 ashish mittal
2004-10-15 18:42 ` Mark Kettenis [this message]
2004-10-15 22:26   ` Dave Korn
2004-10-15 22:34     ` 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=200410151749.i9FHnwnD000753@elgar.sibelius.xs4all.nl \
    --to=kettenis@gnu.org \
    --cc=ashishm@linsyssoft.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