From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28608 invoked by alias); 26 Oct 2011 07:41:52 -0000 Received: (qmail 28585 invoked by uid 22791); 26 Oct 2011 07:41:51 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_BD X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Oct 2011 07:41:39 +0000 From: "jan.kratochvil at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/13346] Multiple breakpoints/losing symbol table issue Date: Wed, 26 Oct 2011 07:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status CC Resolution Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2011-q4/txt/msg00137.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=13346 Jan Kratochvil changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jan.kratochvil at redhat | |dot com Resolution| |INVALID --- Comment #1 from Jan Kratochvil 2011-10-26 07:40:44 UTC --- > (gdb) add-symbol-file ./libblah.so 0x7ffff7bdb000 > add symbol table from file "./libblah.so" at > .text_addr = 0x7ffff7bdb000 > (y or n) y > # Obtained info from /proc/pid/maps ... I bet the .text section does not start at a page boundary (0x...000). See: readelf -WS ./libblah.so | grep '\.text' You need to add the "Address" field to the base address you see in /proc/pid/maps as the ".text_addr" (when the library starts at 0 - it is unprelinked. If you run prelink you moreover need to subtract the prelink address). Moreover GDB already loaded symbols for that ./libblah.so so by another "add-symbol-file" (at a different and incorrect address) you have the symbols twice there, it just cannot work. > - breakpoint is set at 2 locations (gdb/master) > http://pastebin.com/4PhDAHwW I do not think you need to use "-s" option for "add-symbol-file", a single offset should be sufficient, I am not completely sure but I am almost sure the kernel loads all .ko file seguments with the same displacement. And the .text section looks to have wrong address here as in the previous case. Also initially GDB already loaded symbols for "vmlinux" so you should remove them first (for example by "file" itself), otherwise you have the same symbol file loaded twice, at two locations, which may work in the future with Tom Tromey's ambiguous-linespec patches but they are not yet finished / checked in. Please correct the GDB usage first, I do not see any GDB bugs there now. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.