From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18001 invoked by alias); 12 Jan 2005 21:20:10 -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 17937 invoked from network); 12 Jan 2005 21:20:03 -0000 Received: from unknown (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 12 Jan 2005 21:20:03 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j0CLK1e8023258; Wed, 12 Jan 2005 22:20:01 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id j0CLK08Z017488; Wed, 12 Jan 2005 22:20:00 +0100 (CET) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id j0CLJuDF017482; Wed, 12 Jan 2005 22:19:56 +0100 (CET) Date: Wed, 12 Jan 2005 21:20:00 -0000 Message-Id: <200501122119.j0CLJuDF017482@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: cagney@gnu.org CC: gdb-patches@sources.redhat.com In-reply-to: <41E57768.906@gnu.org> (message from Andrew Cagney on Wed, 12 Jan 2005 14:15:52 -0500) Subject: Re: [commit] Re-implement exceptions.c using a state m/c References: <41E57768.906@gnu.org> X-SW-Source: 2005-01/txt/msg00093.txt.bz2 Date: Wed, 12 Jan 2005 14:15:52 -0500 From: Andrew Cagney Hello, This rewrites the throw / catch code to use a state machine and a linked list of catchers (instead of stack-local variables). There are no external interface changes. Hmm, on my i386-unknown-freebsd4.7 system I'm getting: gcc -c -g -O2 -I. -I../../src/gdb -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../intl -I../../src/gdb/../intl -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral -Werror ../../src/gdb/exceptions.c cc1: warnings being treated as errors ../../src/gdb/exceptions.c: In function `catch_exceptions_with_msg': ../../src/gdb/exceptions.c:315: warning: variable `val' might be clobbered by `longjmp' or `vfork' ../../src/gdb/exceptions.c: In function `catch_errors': ../../src/gdb/exceptions.c:333: warning: variable `val' might be clobbered by `longjmp' or `vfork' gmake[1]: *** [exceptions.o] Error 1 gmake[1]: Leaving directory `/home/kettenis/sandbox/gdb/obj/gdb' gmake: *** [all-gdb] Error 2 This is with gcc 2.95.4. I can't say I blame the compiler for losing track here; I can't establish for myself whether there's an actual problem here or not. Andrew, can you please rwerite the code such that it becomes a bit easier to follow? Thanks, Mark