From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25389 invoked by alias); 4 Apr 2002 21:11:01 -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 25375 invoked from network); 4 Apr 2002 21:10:59 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 4 Apr 2002 21:10:59 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id B8AB25EA11; Thu, 4 Apr 2002 16:10:57 -0500 (EST) To: Daniel Berlin Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Let dwarf2 CFI's execute_stack_op be used outside of CFI References: From: Jim Blandy Date: Thu, 04 Apr 2002 13:11:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00127.txt.bz2 Daniel Berlin writes: > So i'm implementing this, and want to know > ... > > /* Return the value N values down from the top of CONTEXT's stack. > > This raises an error if there aren't at least N+1 values on the stack. */ > > ADDR_TYPE dwarf_expr_fetch (struct dwarf_expr_context *context, int n); > > > > How would you like me to raise the error? > Should i add an error handling function to the dwarf_expr_context struct? > Or just call "error", under the assumption that any libdwarf library we > write would have error functions of it's own (all the libdwarf's do), and > that it'll be the typical printf arguments error function. The former. The function that initializes the context can set it to something reasonable by default.