From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Move the frame zero PC check earlier
Date: Tue, 16 May 2006 22:46:00 -0000 [thread overview]
Message-ID: <20060516221837.GA15617@nevyn.them.org> (raw)
In-Reply-To: <200605162137.k4GLbZiS014187@elgar.sibelius.xs4all.nl>
On Tue, May 16, 2006 at 11:37:35PM +0200, Mark Kettenis wrote:
> So there are several conventions, and these make sense for a specific
> ISA or perhaps even a specific OS.
So... would you be happier if I set a gdbarch flag to control this?
I still think this is the wrong choice, and I would prefer not to do it
without opinions from a few of GDB's other maintainers, but a
compromise is better than nothing at all.
It's this statement in particular that I am disagreeing with:
> But the zero PC is *not* universal. Therefore it should be treated
> the same as the non-zero garbage PC.
Not every system uses it, but no one overloads it to mean anything else
during correct operation and it is unambiguous. I think that does make
it universal. And you can not draw clear target lines on where it is
and is not used; for instance, I think at least one Linux kernel
debugging stub ends backtraces this way. That might not be current
information; we made up a GDB convention for dwarf2 unwind terminators
and I've been trying to persuade the kernel developers to use it.
But even ignoring the issues of non-free operating systems (which I
have a different opinion on supporting, as you know), I think that
adapting existing runtimes to the debugger is putting the cart before
the horse, and free operating systems can use this convention too,
and there's a lot of them out there.
By the way, if you go ahead and remove that %ebp check, you're going to
introduce exactly this problem for current glibc on IA-32; suddenly
you'll get a bogus frame below thread_start after clone in every
thread.
> And this is exactly the case where I think the jagged end of the
> backtrace is important. It indicates that GDB lost track somewhere
> and that the backtrace can't be trusted.
I find that the backtrace stopping at a random function is clear
enough, personally.
> I cannot imagine that a single extra frame to be a serious annoyance.
> I can see that the extra frame looses its signalling function on
> systems where it's seen a lot in cases where the stack actually ends
> that way.
For you, or for me, it is not a serious annoyance. For users a lot
further out from the system, on top of an IDE and a development
environment, it is confusing. For the folks who have to document those
IDEs and answer customer support questions about them when their
customers get confused, it becomes a real problem. It's something ugly
and incorrect on their backtrace window that needs an apologetic
paragraph in the manual. That's my benchmark for cosmetic bugs that
are worth fixing; if I was answering "why is it that way" and the best
reason I could give would be an apology, then it needs to be fixed.
That's where the lion's share of GDB use is coming to be - on top of
GUIs like KDevelop and Eclipse and probably a dozen others, for users
with less low-level experience.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-05-16 22:19 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-10 18:03 Daniel Jacobowitz
2006-05-11 10:42 ` Andrew STUBBS
2006-05-11 22:24 ` Jim Blandy
2006-05-11 22:32 ` Daniel Jacobowitz
2006-05-12 6:21 ` Jim Blandy
2006-05-12 12:46 ` Daniel Jacobowitz
2006-05-13 10:14 ` Mark Kettenis
2006-05-13 15:17 ` Daniel Jacobowitz
2006-05-13 15:46 ` Daniel Jacobowitz
2006-05-13 17:08 ` Mark Kettenis
2006-05-13 16:49 ` Mark Kettenis
2006-05-13 18:53 ` Daniel Jacobowitz
2006-05-16 21:38 ` Daniel Jacobowitz
2006-05-16 22:19 ` Mark Kettenis
2006-05-16 22:46 ` Daniel Jacobowitz [this message]
2006-05-16 23:53 ` PAUL GILLIAM
2006-05-18 1:35 ` Joel Brobecker
2006-05-18 9:31 ` Jim Blandy
2006-05-18 10:09 ` Andrew STUBBS
2006-05-18 17:36 ` Jim Blandy
2006-05-18 18:09 ` PAUL GILLIAM
2006-05-18 20:04 ` Jim Blandy
2006-05-18 20:43 ` Mark Kettenis
2006-05-18 23:31 ` Jim Blandy
2006-05-20 22:26 ` Mark Kettenis
2006-05-21 2:12 ` Daniel Jacobowitz
2006-07-21 15:52 ` Andrew STUBBS
2006-07-22 11:23 ` Mark Kettenis
2006-07-24 19:32 ` Daniel Jacobowitz
2006-07-26 22:16 ` Mark Kettenis
2006-07-26 22:25 ` Daniel Jacobowitz
2006-05-19 3:32 ` Daniel Jacobowitz
2006-05-20 21:30 ` Mark Kettenis
2006-05-19 12:26 ` Eli Zaretskii
2006-05-19 18:12 ` Jim Blandy
2006-05-19 18:53 ` Eli Zaretskii
2006-05-22 23:15 ` Jim Blandy
2006-05-15 13:57 ` Andrew STUBBS
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=20060516221837.GA15617@nevyn.them.org \
--to=drow@false.org \
--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