Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Michal Ludvig <mludvig@suse.cz>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] x86_64_skip_prologue
Date: Fri, 15 Mar 2002 10:41:00 -0000	[thread overview]
Message-ID: <1020315184051.ZM27571@localhost.localdomain> (raw)
In-Reply-To: Michal Ludvig <mludvig@suse.cz> "[RFA] x86_64_skip_prologue" (Mar 15,  7:22pm)

On Mar 15,  7:22pm, Michal Ludvig wrote:

> I have written a new x86_64_skip_prologue() function. The approach is,
> 1) Detect, wherher the function seems to have a prolog (ie. starts with 
> instructions push %rbp and mov %rsp,%rbp). If not, return pc and exit.
> 2) Try to get debuginfo. If not, just return pc.
> 3) Now pc points to the first line of the sourcecode of the function 
> (usually opening '{'). If the next line with debuginfo has pc within 
> bounds of this function, we will return this pc instead.

You might want to take a look at some of the other prologue analyzers.
In particular, you might want to consider calling find_pc_line() instead
of accessing the data structures directly.

> Anyway I'm not sure, wherher the lines in linetab _must_ grow up 
> monotonically (I assume so).

I believe it can be non-monotonic for optimized code.

BTW, you might want to run your code through indent.

Kevin


  reply	other threads:[~2002-03-15 18:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-15 10:22 Michal Ludvig
2002-03-15 10:41 ` Kevin Buettner [this message]
2002-03-19  8:01   ` Michal Ludvig
2002-03-22  2:57     ` Michal Ludvig
2002-03-23 11:01     ` 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=1020315184051.ZM27571@localhost.localdomain \
    --to=kevinb@redhat.com \
    --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