[RFA] x86_64_skip_prologue

Michal Ludvig mludvig@suse.cz
Fri Mar 15 10:22:00 GMT 2002


Hi all,
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.

Is this correct? For me it seems to work...

Anyway I'm not sure, wherher the lines in linetab _must_ grow up 
monotonically (I assume so). Also perhaps there are some macros for 
those horrible long nested structures, but I don't know about them.

Index: ChangeLog
	* x86-64-tdep.c (x86_64_skip_prologue): Rewritten from scratch.

Michal Ludvig
-- 
* SuSE CR, s.r.o     * mludvig@suse.cz
* +420 2 9654 5373   * http://www.suse.cz
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: x8664-03.diff
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020315/00576395/attachment.ksh>


More information about the Gdb-patches mailing list