From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1785 invoked by alias); 23 Dec 2006 21:26:28 -0000 Received: (qmail 1777 invoked by uid 22791); 23 Dec 2006 21:26:27 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 23 Dec 2006 21:26:23 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1GyENo-0000Km-Ba; Sat, 23 Dec 2006 16:26:20 -0500 Date: Sat, 23 Dec 2006 21:26:00 -0000 From: Daniel Jacobowitz To: Sandeep Joshi Cc: gdb@sourceware.org Subject: Re: GDB not able to debug files(dwarf2.0) loaded using add-symbol-file Message-ID: <20061223212620.GC1091@nevyn.them.org> Mail-Followup-To: Sandeep Joshi , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00196.txt.bz2 On Fri, Dec 22, 2006 at 09:51:20AM +0530, Sandeep Joshi wrote: > The problem is in the way GDB performs symbol lookup using PC. In > function 'find_pc_sect_psymtab' gdb is not performing symbol lookup in > all the objfiles. If it finds the PC in the range of any partial > symtab, it tries to find the partial symtab that contains a symbol > whose address is closest to the PC address in that object file only > and returns that partial symbol table. > > Now if the user puts a breakpoint in the file loaded using > add-symbol-file, then in function 'find_pc_sect_psymtab' the PC > Address might in the range of some psymtab in the first objfile > (vmlinux) and the best match in that file is returned. This is > happening because the code range of partial symtabs often overlap, > mostly if the functions are reordered. That would slow this already slow function down even further. What does your memory layout look like to create this problem? -- Daniel Jacobowitz CodeSourcery