From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20133 invoked by alias); 30 Jun 2007 16:00:59 -0000 Received: (qmail 20123 invoked by uid 22791); 30 Jun 2007 16:00:58 -0000 X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 30 Jun 2007 16:00:56 +0000 Received: from snyder (209-204-172-156.dsl.dynamic.sonic.net [209.204.172.156]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with SMTP id l5UG0iep029648; Sat, 30 Jun 2007 09:00:44 -0700 Message-ID: <000b01c7bb2f$d88684e0$677ba8c0@sonic.net> Reply-To: "Michael Snyder" From: "Michael Snyder" To: "Eli Zaretskii" Cc: , , References: <9270.12.7.175.2.1183069663.squirrel@webmail.sonic.net> <20070628224815.GC12578@caradoc.them.org> <655C3D4066B7954481633935A40BB36F041427@ussunex02.svl.access-company.com> <20070628231153.GA14231@caradoc.them.org> <11470.12.7.175.2.1183080998.squirrel@webmail.sonic.net> <20070629113407.GA13561@caradoc.them.org> <003201c7ba8c$d6e0e840$677ba8c0@sonic.net> Subject: Re: [OB] Add cleanup, source.c Date: Sat, 30 Jun 2007 16:39:00 -0000 X-Mailer: Microsoft Outlook Express 6.00.2800.1437 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00541.txt.bz2 > > > From gdbint.texinfo: > > > > > > Your function should explicitly do or discard the cleanups it > > > creates. Failing to do this leads to non-deterministic behavior since > > > the caller will arbitrarily do or discard your functions cleanups. > > > This need leads to two common cleanup styles. > > > > Yeah, that text was written by Andrew in 2003. Before that we > > had some text written by Eli in about 2001, also saying that you > > should call do_cleanups. > > > > > > Don't mean to be a curmudgeon, but I go back way before that. ;-) > > > > Here's how version 1.1 of the document read: > > Sorry, I'm confused: where exactly is the current gdbint.texinfo text > wrong? > > Are you saying that the non-deterministic behavior mentioned in the > manual is a red herring? But the explanation it provides (the fact > that some other function further on could discard_cleanups) seems to > provide valid basis for that, doesn't it? Depends on what the "cleanups" are, I suppose. Those I'm familiar with are mostly xfrees, fcloses, etc. Doesn't really matter what order they are performed in, so long as they get done before the next command loop cycle. Can you give me an example of such non-deterministic behavior?