From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26340 invoked by alias); 19 Nov 2009 07:30:55 -0000 Received: (qmail 26329 invoked by uid 22791); 19 Nov 2009 07:30:54 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Nov 2009 07:30:04 +0000 Received: from zps76.corp.google.com (zps76.corp.google.com [172.25.146.76]) by smtp-out.google.com with ESMTP id nAJ7U2Qb013921 for ; Wed, 18 Nov 2009 23:30:02 -0800 Received: from pzk38 (pzk38.prod.google.com [10.243.19.166]) by zps76.corp.google.com with ESMTP id nAJ7Txg5011379 for ; Wed, 18 Nov 2009 23:30:00 -0800 Received: by pzk38 with SMTP id 38so1471915pzk.9 for ; Wed, 18 Nov 2009 23:29:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.186.29 with SMTP id j29mr3353611waf.4.1258615799535; Wed, 18 Nov 2009 23:29:59 -0800 (PST) In-Reply-To: <3b9893450911182316g333c111fhb20572fda89da595@mail.gmail.com> References: <3b9893450911182243o2b078ac0w4e86ab1464aeaa0d@mail.gmail.com> <8ac60eac0911182310g6edcaf0wf1940a7aafc647f9@mail.gmail.com> <3b9893450911182316g333c111fhb20572fda89da595@mail.gmail.com> Date: Fri, 20 Nov 2009 13:56:00 -0000 Message-ID: <8ac60eac0911182329g536787f6l810303af2619ee00@mail.gmail.com> Subject: Re: how to set breakpoint at a particular line in cpp file From: Paul Pluzhnikov To: n179911 Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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/msg00164.txt.bz2 On Wed, Nov 18, 2009 at 11:16 PM, n179911 wrote: > 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 =A0(gdb) break HTMLParser.cpp:208 because I am trying to debug > Webkit on android. You still have not provided an executable. WebKit is a library, but it doesn't execute "on its own". It is loaded into *some* executable; namely the one that is running in process . If you don't know which executable that is, try "ps -fp ". > So I can't really use the 'file command'. Why not? Once you figure out which executable is running "inside" process , invoke GDB like this: "gdb -p /path/to/executable", and you should be good to go (assuming you don't run out of memory that is -- AFAIU WebKit is very large, and I believe you are quite unlikely to succeed with "native android GDB"). Cheers, --=20 Paul Pluzhnikov