From: Triple Yang <triple.yang@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: How to skip function prologues with stabs debug infomation?
Date: Sat, 20 Aug 2011 14:49:00 -0000 [thread overview]
Message-ID: <CAGxstLQdL3nDk=c6P=UwCj5iZE5WOTpX5h=gOVEb1L5YNLFRDA@mail.gmail.com> (raw)
In-Reply-To: <20110820133235.GA16583@host1.jankratochvil.net>
Thanks a lot. I will check skip_prologue_sal to find out what it does
and returns.
Best regards.
2011/8/20 Jan Kratochvil <jan.kratochvil@redhat.com>:
> On Sat, 20 Aug 2011 15:06:44 +0200, Triple Yang wrote:
>> I will give a C-like pseudocode to describe what I plan to do in
>> function XXX_skip_prologue(), here XXX represents my architecture
>> name.
>>
>> line = get_line_number(func_addr);
>>
>> next_line = find_next_statement_line_number(line); // take
>> advantage of debug info
>>
>> addr = get_addr(nexe_line);
>>
>> Here, if func_addr is the start address of a function, we actually
>> skip the function prologue. (But I am not sure this idea is proper.)
>
> Yes, it is rought what GDB already does for all the arches.
>
> gdbarch_skip_prologue is there for the case you have no debug info (neither
> DWARF nor STABS, no -g). So it is good to implement gdbarch_skip_prologue but
> it should be only based on instructions decoding in such case.
>
>
>> And I guess gdb does the similar thing to step a source code line,
>> which is of course arch-independent. But I don't know where those
>> codes are placed. GDBing a gdb to locate them is time-consuming and
>> tiring. I will be very grateful if you or someone else point it out.
>
> I already stated here the GDB function is skip_prologue_sal.
>
>
> Thanks,
> Jan
>
--
Yang Yong-Yong
next prev parent reply other threads:[~2011-08-20 14:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 16:09 Triple Yang
2011-08-19 16:28 ` Jan Kratochvil
2011-08-19 17:57 ` Triple Yang
2011-08-19 18:04 ` Jan Kratochvil
2011-08-20 3:45 ` Triple Yang
2011-08-20 11:40 ` Jan Kratochvil
2011-08-20 13:07 ` Triple Yang
2011-08-20 13:33 ` Jan Kratochvil
2011-08-20 14:49 ` Triple Yang [this message]
2011-08-19 18:15 ` Joel Brobecker
[not found] ` <CAEG7qUwkM32O1MEoKFNrb5Hk7+npizsWE7hXCeXJvEmGbL-HQA@mail.gmail.com>
2011-08-20 3:18 ` Triple Yang
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='CAGxstLQdL3nDk=c6P=UwCj5iZE5WOTpX5h=gOVEb1L5YNLFRDA@mail.gmail.com' \
--to=triple.yang@gmail.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@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