From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20750 invoked by alias); 19 Nov 2009 07:17:26 -0000 Received: (qmail 20740 invoked by uid 22791); 19 Nov 2009 07:17:24 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f189.google.com (HELO mail-pz0-f189.google.com) (209.85.222.189) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Nov 2009 07:16:34 +0000 Received: by pzk27 with SMTP id 27so1352668pzk.12 for ; Wed, 18 Nov 2009 23:16:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.115.103.26 with SMTP id f26mr408732wam.198.1258614992387; Wed, 18 Nov 2009 23:16:32 -0800 (PST) In-Reply-To: <8ac60eac0911182310g6edcaf0wf1940a7aafc647f9@mail.gmail.com> References: <3b9893450911182243o2b078ac0w4e86ab1464aeaa0d@mail.gmail.com> <8ac60eac0911182310g6edcaf0wf1940a7aafc647f9@mail.gmail.com> Date: Fri, 20 Nov 2009 06:20:00 -0000 Message-ID: <3b9893450911182316g333c111fhb20572fda89da595@mail.gmail.com> Subject: Re: how to set breakpoint at a particular line in cpp file From: n179911 To: Paul Pluzhnikov Cc: gdb@sourceware.org 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: 2009-11/txt/msg00163.txt.bz2 Thank you. I followed this step (which download gdb 6.8 built for android), http://ortegaalfredo.googlepages.com/android And then I run gdb to attach a process running on android (using the command gdb -P {Process ID}) And I run (gdb) break HTMLParser.cpp:208 because I am trying to debug Webkit on android. So I can't really use the 'file command'. On Wed, Nov 18, 2009 at 11:10 PM, Paul Pluzhnikov wrote: > On Wed, Nov 18, 2009 at 10:43 PM, n179911 wrote: > >> How to set breakpoint at a particular line in cpp? >> >> I tried >> (gdb) break HTMLParser.cpp:208 > > That *is* the correct way. > >> But I get: >> No symbol table is loaded. =A0Use the "file" command. > > Yes, do that! > > > In order to set a breakpoint, GDB needs to know the address of the > first instruction on the given line. To find that address, GDB needs > to have an executable file compiled with debugging info (usually the > '-g' compiler switch). You *must* provide that executable file, or GDB > will not be able to set the breakpoint. > > The usual way to provide such file: > > =A0gdb /path/to/executable > > Alternatively: > > =A0gdb > =A0(gdb) file /path/to/executable > > Hope this helps. > > Cheers, > -- > Paul Pluzhnikov >