From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22002 invoked by alias); 25 Oct 2011 02:58:01 -0000 Received: (qmail 21991 invoked by uid 22791); 25 Oct 2011 02:58:00 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_QE X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Oct 2011 02:57:46 +0000 Received: by qadc11 with SMTP id c11so24144qad.0 for ; Mon, 24 Oct 2011 19:57:45 -0700 (PDT) Received: by 10.224.96.69 with SMTP id g5mr16718904qan.32.1319511464198; Mon, 24 Oct 2011 19:57:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.67.193 with HTTP; Mon, 24 Oct 2011 19:57:24 -0700 (PDT) In-Reply-To: References: From: Vimal Date: Wed, 26 Oct 2011 12:25:00 -0000 Message-ID: Subject: Re: Multiple breakpoint issue when debugging loadable kernel module To: gdb@sourceware.org, tromey Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-10/txt/msg00180.txt.bz2 Hi, With some suggestions from IRC folks sergiodj and SamB, I ran a git bisect on the HEAD of git://sourceware.org/git/gdb.git. It seems like the first bad commit is: 2cdbbe44126601596aad7891de05cb7fc6bb21c8, which seems pretty big ~6000lines. Quoted below is my first mail to the list, with few details about the problem. Also, here's an output from an actual run: http://pastebin.com/4PhDAHwW... Tom Tromey: is this a known issue? Thanks, -- Vimal On 23 October 2011 20:16, Vimal wrote: > Hi, > > I have a loadable kernel module, and I am facing issues when setting > breakpoints. > > I am using gdb 7.3.1 from ftp://ftp.gnu.org/gnu/gdb. > > 1. I start the kernel under qemu-kvm and load the kernel module. =A0The > kernel module was compiled with CFLAGS=3D-O0 -g > > 2. I generate the add-symbol-path command by using section address > information from /sys/module/$mod/sections/.* > > 3. I enter the add-symbol-path command into gdb, which is connected to > qemu's gdb stub via "target remote" command. > > 4. After loading the symbols, I do: "info line function" and am able > to see the function name's line number. =A0 Also, "list function" shows > the source code from the correct file. > > 5. I do "break function", I see this message: > =A0 =A0Breakpoint 1 at address (2 locations) > > After the last step, if I run "info line function", I see "No line > number information available for address..." > > When I type "info break", I see the two breakpoints inserted at > "function+4" and "function+31". > > This error does not happen in gdb-7.1. =A0 The reason I am using > gdb-7.3.1 is that I want to use gdb.Breakpoint from a python script. > > Is there a way to fix this error? =A0 Why are two breakpoints being set? > =A0This error happens across a few kernel modules that I tested. > > Thanks, > -- > Vimal > --=20 Vimal