Break points never hit when using LLDB

345 views
Skip to first unread message

arunoday sarkar

unread,
Aug 14, 2014, 11:07:36 AM8/14/14
to chromi...@chromium.org
Hi 

Earlier I was using gdb on older versions of OSX, with lldb things may have changed.

So I launched debug version of Chrome using following commands

lldb out/Debug/Chromium.app/Contents/MacOS/Chromium

 breakpoint set --file pdf/pdfium/pdfium_engine.cc --line 2849

run

Ideally when I launch a pdf and make a selection that particular line in the file should be run , but lldb never pauses execution.

Has any one seen something like this ? Or am I just simply doing something wrong?

Thanks

Thiago Farina

unread,
Aug 14, 2014, 12:02:34 PM8/14/14
to arunoday sarkar, chromi...@chromium.org
On Thu, Aug 14, 2014 at 12:07 PM, arunoday sarkar <a.sark...@gmail.com> wrote:
Hi 

Earlier I was using gdb on older versions of OSX, with lldb things may have changed.

So I launched debug version of Chrome using following commands

lldb out/Debug/Chromium.app/Contents/MacOS/Chromium

 breakpoint set --file pdf/pdfium/pdfium_engine.cc --line 2849

run

Did you try setting a breakpoint elsewhere (maybe in the main function), just to make sure breakpoints get hit in lldb?
 

--
Thiago Farina

Robert Sesek

unread,
Aug 14, 2014, 12:14:14 PM8/14/14
to Thiago Farina, arunoday sarkar, chromi...@chromium.org
PDF is not run in the browser process. You need to attach to the renderer process that is actually executing the Pdfium code. You can use --renderer-startup-dialog to pause the renderer before it begins running code to get the PID and attach to that instead.

rsesek / @chromium.org


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

arunoday sarkar

unread,
Aug 14, 2014, 12:30:01 PM8/14/14
to Robert Sesek, Thiago Farina, chromi...@chromium.org
Thanks for the info.

So I ran the debug build with the following option --renderer-startup-dialog

Launched xcode creating a dummy project and attached to a process by the render process id

However on the console
it still prints

Renderer (35494) paused waiting for debugger to attach. Send SIGUSR1 to unpause. and when I switch back to chrome it seems its in a paused state, pages , urls etc would open.

Thanks

Thiago Farina

unread,
Aug 14, 2014, 1:07:49 PM8/14/14
to arunoday sarkar, Robert Sesek, chromi...@chromium.org
On Thu, Aug 14, 2014 at 1:29 PM, arunoday sarkar <a.sark...@gmail.com> wrote:
Thanks for the info.

So I ran the debug build with the following option --renderer-startup-dialog

Launched xcode creating a dummy project and attached to a process by the render process id

I think you can do this, but why not open a second tab (or second window) in the Terminal and attach there? (I think you just followed http://www.chromium.org/developers/debugging-on-os-x,  Attach XCode's debugger to a renderer process after launch, right?)

 
However on the console
it still prints

Renderer (35494) paused waiting for debugger to attach. Send SIGUSR1 to unpause. and when I switch back to chrome it seems its in a paused state, pages , urls etc would open.

What I would do is:

In the first tab:
out/Debug/Chromium.app/Contents/MacOS/Chromium --renderer-startup-dialog

In the second tab:
$ lldb
(lldb) attach #pid
(lldb) send sigusr1 # I don't remember the right command right now
(lldb) breakpoint set --file pdf/pdfium/pdfium_engine.cc --line 2849
(lldb) run

Something like that...

-- 
Thiago Farina
Reply all
Reply to author
Forward
0 new messages