From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30303 invoked by alias); 3 Jan 2007 09:44:38 -0000 Received: (qmail 30295 invoked by uid 22791); 3 Jan 2007 09:44:37 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.175) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 03 Jan 2007 09:44:33 +0000 Received: by ug-out-1314.google.com with SMTP id 75so6293897ugb for ; Wed, 03 Jan 2007 01:44:30 -0800 (PST) Received: by 10.78.157.8 with SMTP id f8mr2155654hue.1167817470716; Wed, 03 Jan 2007 01:44:30 -0800 (PST) Received: by 10.78.122.9 with HTTP; Wed, 3 Jan 2007 01:44:30 -0800 (PST) Message-ID: Date: Wed, 03 Jan 2007 09:44:00 -0000 From: "Sandeep Joshi" To: "Sandeep Joshi" , gdb@sourceware.org Subject: Re: GDB not able to debug files(dwarf2.0) loaded using add-symbol-file In-Reply-To: <20061223212620.GC1091@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061223212620.GC1091@nevyn.them.org> 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: 2007-01/txt/msg00030.txt.bz2 Memory layout: Entry point: 0x40018000 0x40018000 - 0x40060000 is .init 0x40060000 - 0x40259644 is .text 0x40259650 - 0x40259f78 is __ex_table 0x40259f78 - 0x4025a278 is .pci_fixup 0x4025a278 - 0x4025d8f0 is __ksymtab 0x4025d8f0 - 0x4025ddf0 is __ksymtab_gpl 0x4025ddf0 - 0x40266070 is __ksymtab_strings 0x40266070 - 0x40266174 is __param 0x40268000 - 0x402b8c10 is .data 0x402b8c20 - 0x402d995c is .bss add-symbol-file ~/arm-linux-gdb/bin/test_trap4.out 0x83d8 On 12/24/06, Daniel Jacobowitz wrote: > 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 >