From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Stop runaway unwinding on stripped executables
Date: Fri, 16 Mar 2012 14:46:00 -0000 [thread overview]
Message-ID: <20120316144557.GA22309@host2.jankratochvil.net> (raw)
In-Reply-To: <201203161350.q2GDouZL019372@glazunov.sibelius.xs4all.nl>
On Fri, 16 Mar 2012 14:50:56 +0100, Mark Kettenis wrote:
> People need to learn that if they are debugging stripped stuff they're
> going to end up with runaway backtraces every now and then.
There is no need to teach that them.
> In this particular example you're just getting lucky that you're hitting
> __libc_start_main().
In other cases they end up in 'start_thread' and its caller 'clone' which
correctly undefines $pc and stops the unwinding.
> That probably wouldn't happen if you're somewhat deeper into the call stack
> of the (stripped) program that you're trying to debug.
I can only imagine code which does not use -fasynchronous-unwind-tables.
But normal distros use it, therefore they can numerically unwind anything as
well as with full debug info.
Sure the correct solution is to terminate unwinding in '_start' (like it is
terminated in 'clone'), thanks for refreshing this idea. Still GDB could have
this workaround for older code.
> But the implementation and actually the whole idea is *very*
> glibc-specific.
Yes, I was thinking about it, but glibc is neither arch nor OS specific.
Where to put it into GDB better?
Thanks,
Jan
next prev parent reply other threads:[~2012-03-16 14:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 12:02 Jan Kratochvil
2012-03-16 13:51 ` Mark Kettenis
2012-03-16 14:46 ` Jan Kratochvil [this message]
2012-03-16 16:14 ` Mark Kettenis
2012-03-16 16:57 ` Jan Kratochvil
2012-03-16 19:28 ` cancel: " Jan Kratochvil
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=20120316144557.GA22309@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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