From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22474 invoked by alias); 6 Dec 2003 00:18:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22466 invoked from network); 6 Dec 2003 00:18:13 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (209.53.16.177) by sources.redhat.com with SMTP; 6 Dec 2003 00:18:13 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id F070B47D61; Fri, 5 Dec 2003 16:18:15 -0800 (PST) Date: Sat, 06 Dec 2003 00:18:00 -0000 From: Joel Brobecker To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] Unexpected automatic language switch - get_frame_language() Message-ID: <20031206001815.GF716@gnat.com> References: <20031205224807.GE716@gnat.com> <3FD11B60.2040008@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3FD11B60.2040008@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2003-12/txt/msg00231.txt.bz2 > 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