> On Apr 2, 2015, at 10:00 AM, Ted Woodward <ted.woodw...@codeaurora.org> wrote:
> 
> When I set a breakpoint at the address of main, I get just the address back:
>  
> (lldb) break set -a `&main`
> Breakpoint 1: address = 0x00000000004004f0
>  
> When I break at main, I get the source line and the address:
>  
> (lldb) settings set target.skip-prologue false
> (lldb) b main
> Breakpoint 2: where = a.out`main at hello.c:3, address = 0x00000000004004f0
>  
> Should break set –a also print out symbol, source file and line?

The breakpoints by load address could resolve the address and show them when 
dumping, but currently do not. Feel free to add support for this if you want 
to. You can't cache any of the info and the info will always need to be looked 
up on the fly, but that is an easy lookup to do. Please do not store _any_ 
resolved things like a lldb_private::Address or any lldb_private::SymbolContext 
as when you program runs, the address in the breakpoint can change many times, 
and it might not resolve to anything at all.

Note that instead of:

(lldb) settings set target.skip-prologue false
(lldb) b main

you can simply do:

(lldb) b &main

The current "b" regex command will turn this into:

(lldb) breakpoint set --name 'main' --skip-prologue=0

So be sure to use the "--skip-prologue=0" option instead of toggling a global 
switch for individual breakpoints.

Greg


_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to