From: Joel Brobecker <brobecker@gnat.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Unexpected automatic language switch - get_frame_language()
Date: Sat, 06 Dec 2003 00:18:00 -0000 [thread overview]
Message-ID: <20031206001815.GF716@gnat.com> (raw)
In-Reply-To: <3FD11B60.2040008@redhat.com>
> Sounds kinda like a debugging-optimized-code problem. Your function
> is tail-return optimized -- doesn't really return. That's outside
> the expected API.
Kind of, yes, but the code in question was compiled at -O0! It's a
noreturn function because the compiler could statically determine that
the exception would be unhandled.
> I think you have to do "special" things for non-returning functions.
> I've seen the same sort of thing for eg. _exit.
Do you remember how these similar problems were approached and solved?
> >So I think the correct way of doing this is to use a decremented PC
> >for any frame but the bottom one.
>
> I think that's fixing the wrong problem. And it's not really portable.
Hmm, I thought this was "portable" since I sort of remember that we are
already using this sort of technique in similar situations. I can't
remember exactly which changes, but decrementing the PC was something we
already did in other places. Maybe your objecting to the part that says
"do the decrement only for the non bottom one"?
--
Joel
next prev parent reply other threads:[~2003-12-06 0:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-05 22:48 Joel Brobecker
2003-12-05 23:57 ` Michael Snyder
2003-12-06 0:18 ` Joel Brobecker [this message]
2003-12-06 0:28 ` Andrew Cagney
2003-12-10 1:50 ` Joel Brobecker
2003-12-10 16:14 ` Andrew Cagney
2003-12-10 17:42 ` Joel Brobecker
2003-12-06 0:42 ` Michael Snyder
2003-12-10 17:47 ` Daniel Jacobowitz
2003-12-10 18:10 ` Joel Brobecker
2003-12-10 18:20 ` Daniel Jacobowitz
2003-12-10 19:16 ` Joel Brobecker
2003-12-10 19:18 ` Daniel Jacobowitz
2003-12-10 18:33 ` Ada's throw/catch; Was: " Andrew Cagney
2003-12-10 19:04 ` Joel Brobecker
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=20031206001815.GF716@gnat.com \
--to=brobecker@gnat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@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