Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Triple Yang <triple.yang@gmail.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb@sourceware.org
Subject: Re: How to skip function prologues with stabs debug infomation?
Date: Fri, 19 Aug 2011 18:15:00 -0000	[thread overview]
Message-ID: <20110819181534.GF20357@adacore.com> (raw)
In-Reply-To: <CAGxstLT41smtZ1RWrMJtR4-66KUX7DY6dm3ZsaQCjL_gKbNTMg@mail.gmail.com>

> It's well-known that people can take advantage of SAL info when to
> skip prologue with dwarf info. I wonder whether we can do the same
> thing with stabs.

I think you can achieve pretty much the same results with stabs as
with DWARF. The SAL info in DWARF is more detailed, but if you only
care about line numbers, it should be mostly OK.

You do have to realize, however, that "skipping the prologue" is
very vague in the case of optimized code, since you might have your
prologue split in multiple blocks. Perhaps you meant skip all
instructions that are associated to the prologue, even if it means
skipping some instructions that are not part of the prologue.
But, myself, I'd much rather stop at the first instruction associated
to user code, which means that sometimes, part of the prologue might
still not have been run yet. Debugging optimized code often means
losing a lot of the convenient things we have when debugging non-
optimized one.

(and, really, if you are going to debug optimized code, you're going
to have a lot of problems if you must use stabs - most of them probably
worse than simple prologue skipping)

-- 
Joel


  parent reply	other threads:[~2011-08-19 18:15 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
2011-08-19 18:15     ` Joel Brobecker [this message]
     [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=20110819181534.GF20357@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=triple.yang@gmail.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