From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25000 invoked by alias); 1 Mar 2003 00:34:00 -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 24987 invoked from network); 1 Mar 2003 00:33:59 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by 172.16.49.205 with SMTP; 1 Mar 2003 00:33:59 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id E347FD34B6; Fri, 28 Feb 2003 16:33:58 -0800 (PST) Date: Sat, 01 Mar 2003 00:34:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: [RFC] Add new command to spit out the linetable for a given file Message-ID: <20030301003358.GB11181@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-03/txt/msg00000.txt.bz2 The GVD developpers have brought to my attention an issue regarding mostly performance: GVD has a feature were it is capable of telling whether a given line of a source file contains any code. In order to do this, they use the "info line" command on every single line of the file. Obviously, this causes a lot of communication between GDB and GVD, so they managed to improve a bit the performance by doing this operation as a background task for the lines that are not currently displayed in the editor (that is, without blocking the user from doing anything else). In an effort to continue improving the performance even more, they asked me if it was possible to add a new command that would print all in one go the list of lines containing some code. In parallel, I know that GVD also provides an assembly view of the current line of code. In order to get the addresses of the instructions corresponding to the current line of code, the also use "info line". So the idea that I came up with was to add a new function that would essentially dump the linetable for the symtab of the file in question. Roughly, from the user's perspective, it would be a new info command (names can be improved): (gdb) info sloc 0x1234 1 0x1238 2 0x1239 1 0x123d 3 ... This shouldn't be too hard to implement, and should help GVD a lot. What do you think? Any other idea, or is there any command I don't know about that would give us this information? -- Joel