From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8159 invoked by alias); 13 Feb 2004 01:29:48 -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 8147 invoked from network); 13 Feb 2004 01:29:47 -0000 Received: from unknown (HELO lakemtao02.cox.net) (68.1.17.243) by sources.redhat.com with SMTP; 13 Feb 2004 01:29:47 -0000 Received: from white ([68.9.64.121]) by lakemtao02.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040213012945.IFRA19763.lakemtao02.cox.net@white> for ; Thu, 12 Feb 2004 20:29:45 -0500 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1ArS9K-0001Bv-00 for ; Thu, 12 Feb 2004 20:29:46 -0500 Date: Fri, 13 Feb 2004 01:29:00 -0000 From: Bob Rossi To: gdb@sources.redhat.com Subject: [MI] -file-list-exec-source-files Message-ID: <20040213012946.GB4476@white> Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-SW-Source: 2004-02/txt/msg00129.txt.bz2 Hi, I have been trying to implement -file-list-exec-source-files for some time now. So far the command outputs the filename and fullname for each symtab and psymtab. The fullname part only get's output if GDB knows what it is. The problem is, I recently discovered that the fullname can only be retrieved from the symtab, it can't be retrieved with just a psymtab. The reason is because the symtab has a 'dirname' member, which is necessary in finding the absolute path to a source file. Obviously I can't read in all the symtabs just to get the fullname for each psymtab. So, I have 2 solutions, 1. Modify the psytmab to also have the 'dirname'. Which seems difficult. Although I do think this is the best solution. (Not knowing to much about psymtabs and symtabs) 2. Change -file-list-exec-source-file to receive an optional filename, which when doing this causes GDB to read in the symtab associated with the psymtab. Then the fullname can be retrieved. I believe option 2 is how the CLI works. If you do list foo.c:1 info source I am sure this reads in the symtab for foo.c and then it knows how to get the fullpath. I don't really like this solution that much, so I think it would be better to add the 'dirname' to the psymtab. Any suggestions? If your interested in poking around to see where symtab->dirname gets set, look around buildsym.c:975. Does anyone know if there would be an easy way into getting dirname set into the psymtab? Thanks, Bob Rossi