From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26521 invoked by alias); 6 Dec 2003 00:28:07 -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 26512 invoked from network); 6 Dec 2003 00:28:06 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 6 Dec 2003 00:28:06 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 1A9FB2B8F; Fri, 5 Dec 2003 19:28:07 -0500 (EST) Message-ID: <3FD12296.8090809@gnu.org> Date: Sat, 06 Dec 2003 00:28:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joel Brobecker Cc: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [RFC] Unexpected automatic language switch - get_frame_language() References: <20031205224807.GE716@gnat.com> <3FD11B60.2040008@redhat.com> <20031206001815.GF716@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-12/txt/msg00233.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. Looked at frame_addr_in_block? > 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