From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14003 invoked by alias); 15 Feb 2002 20:47:53 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13890 invoked from network); 15 Feb 2002 20:47:49 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 15 Feb 2002 20:47:49 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 163AC5E9DE; Fri, 15 Feb 2002 15:49:25 -0500 (EST) To: Daniel Berlin Cc: Petr Sorfa , Daniel Jacobowitz , Subject: Re: Upcoming DWARF 3 and FORTRAN95 patches for 5.1.1 or 5.2? References: From: Jim Blandy Date: Fri, 15 Feb 2002 12:47: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-02/txt/msg00216.txt.bz2 Daniel Berlin writes: > > /* Write to STREAM a natural-language description of the location of > > the object described by BATON. */ > > int (*describe_location) (void *baton, struct ui_file *stream); > > I assume natural language is a codeword for "meant for user only, don't > try to parse it"? Well, that function is just there for the `info address' command: (gdb) info addr argc Symbol "argc" is an argument at offset 8. (gdb) So its job is to be comprehensible to the user, and accurate enough to be useful to people hacking on GDB; it doesn't have many technical constraints on what it says. > > /* Tracepoint support. > > Append bytecodes to the tracepoint agent expression AX that push > > the address of the object described by BATON. Set VALUE > > appropriately. Note --- for objects in registers, this needn't > > emit any code; as long as it sets VALUE properly, then the caller > > will generate the right code in the process of treating this as > > an lvalue or rvalue. */ > > Is this always possible without a current address? > IE can the agent bytecode support the fact that for location lists, we > need to know where we are before we can tell you where the variable is. > One could encode this as a bunch of if's and comparisons if the agent > bytecode supports them, i guess. Oh, you're right --- yes, you need a sal in order to decide what bytecode to emit. A tracepoint's bytecode gets run when we hit a tracepoint, so GDB can generate bytecode specific to that PC. > > void (*tracepoint_var_ref) (void *baton, > > struct agent_expr *ax, > > struct axs_value *value); So that should be: /* Tracepoint support. Append bytecodes to the tracepoint agent expression AX that push the address of the object described by BATON, at the point in the code given by tracepoint_pos. Set VALUE appropriately. Note --- for objects in registers, this needn't emit any code; as long as it sets VALUE properly, then the caller will generate the right code in the process of treating this as an lvalue or rvalue. */ void (*tracepoint_var_ref) (void *baton, struct symtabs_and_lines *tracepoint_pos, struct agent_expr *ax, struct axs_value *value);