This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: how to set breakpoint at a particular line in cpp file
On Wed, Nov 18, 2009 at 11:16 PM, n179911 <n179911@gmail.com> 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 ?(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 <PID>. If you don't know
which executable that is, try "ps -fp <PID>".
> So I can't really use the 'file command'.
Why not? Once you figure out which executable is running "inside"
process <PID>, invoke GDB like this: "gdb -p <PID>
/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,
--
Paul Pluzhnikov