summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint
Commit message (Collapse)AuthorAgeFilesLines
...
* This is some groundwork for filtering the language ExceptionJim Ingham2015-04-221-0/+28
| | | | | | | | | | | | | | breakpoints, for instance on the class of the thrown object. This change doesn't actually make that work, the part where we extract the thrown object type from the throw site isn't done yet. This provides a general programmatic "precondition" that you can add to breakpoints to give them the ability to do filtering on the LLDB side before we pass the stop on to the user-provided conditions & callbacks. llvm-svn: 235538
* Generate an event when a pending breakpoint bindsIlia K2015-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This checkin sends an MI event when a module is loaded that causes a pending breakpoint to bind to it's real address in the target. This allows breakpoints to be set before the process is launched, and the target address of the BP to be discovered when the module loads, prior to the breakpoint being hit. Patch from chuckr@microsoft.com Test Plan: I ran the check-lldb target with and without this patch and saw no change. I am unsure of how to write an MI specific test for this because the new event is buried in module load events. Here is an example (the new event is in bold): ``` (gdb) -file-exec-and-symbols a.out ^done (gdb) =shlibs-added,shlib-info=[num="1",name="a.out",dyld-addr="-",reason="dyld",path="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out",loaded_addr="-",dsym-objpath="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out.dSYM/Contents/Resources/DWARF/a.out"] -break-insert -f main.cpp:15 ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"} (gdb) =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"} -exec-run ^running =thread-group-started,id="i1",pid="75620" (gdb) =thread-created,id="1",group-id="i1" =thread-selected,id="1" (gdb) =shlibs-added,shlib-info=[num="2",name="dyld",dyld-addr="0x7fff5fc00000",reason="dyld",path="/usr/lib/dyld",loaded_addr="0x7fff5fc00000"] (gdb) =shlibs-added,shlib-info=[num="3",name="dyld",dyld-addr="0x7fff5fc00000",reason="dyld",path="/usr/lib/dyld",loaded_addr="0x7fff5fc00000"] (gdb) *running,thread-id="all" (gdb) (gdb) =shlibs-added,shlib-info=[num="4",name="libc++.1.dylib",dyld-addr="0x7fff85dd0000",reason="dyld",path="/usr/lib/libc++.1.dylib",loaded_addr="0x7fff85dd0000"] (gdb) =shlibs-added,shlib-info=[num="5",name="libSystem.B.dylib",dyld-addr="0x7fff851ab000",reason="dyld",path="/usr/lib/libSystem.B.dylib",loaded_addr="0x7fff851ab000"] (gdb) =shlibs-added,shlib-info=[num="6",name="libc++abi.dylib",dyld-addr="0x7fff81be8000",reason="dyld",path="/usr/lib/libc++abi.dylib",loaded_addr="0x7fff81be8000"] (gdb) =shlibs-added,shlib-info=[num="7",name="libcache.dylib",dyld-addr="0x7fff8b975000",reason="dyld",path="/usr/lib/system/libcache.dylib",loaded_addr="0x7fff8b975000"] (gdb) =shlibs-added,shlib-info=[num="8",name="libcommonCrypto.dylib",dyld-addr="0x7fff85d14000",reason="dyld",path="/usr/lib/system/libcommonCrypto.dylib",loaded_addr="0x7fff85d14000"] (gdb) =shlibs-added,shlib-info=[num="9",name="libcompiler_rt.dylib",dyld-addr="0x7fff86154000",reason="dyld",path="/usr/lib/system/libcompiler_rt.dylib",loaded_addr="0x7fff86154000"] (gdb) =shlibs-added,shlib-info=[num="10",name="libcopyfile.dylib",dyld-addr="0x7fff81ac7000",reason="dyld",path="/usr/lib/system/libcopyfile.dylib",loaded_addr="0x7fff81ac7000"] (gdb) =shlibs-added,shlib-info=[num="11",name="libcorecrypto.dylib",dyld-addr="0x7fff87d5d000",reason="dyld",path="/usr/lib/system/libcorecrypto.dylib",loaded_addr="0x7fff87d5d000"] (gdb) =shlibs-added,shlib-info=[num="12",name="libdispatch.dylib",dyld-addr="0x7fff8ea8c000",reason="dyld",path="/usr/lib/system/libdispatch.dylib",loaded_addr="0x7fff8ea8c000"] (gdb) =shlibs-added,shlib-info=[num="13",name="libdyld.dylib",dyld-addr="0x7fff89087000",reason="dyld",path="/usr/lib/system/libdyld.dylib",loaded_addr="0x7fff89087000"] (gdb) =shlibs-added,shlib-info=[num="14",name="libkeymgr.dylib",dyld-addr="0x7fff8e818000",reason="dyld",path="/usr/lib/system/libkeymgr.dylib",loaded_addr="0x7fff8e818000"] (gdb) =shlibs-added,shlib-info=[num="15",name="liblaunch.dylib",dyld-addr="0x7fff84936000",reason="dyld",path="/usr/lib/system/liblaunch.dylib",loaded_addr="0x7fff84936000"] (gdb) =shlibs-added,shlib-info=[num="16",name="libmacho.dylib",dyld-addr="0x7fff8534e000",reason="dyld",path="/usr/lib/system/libmacho.dylib",loaded_addr="0x7fff8534e000"] (gdb) =shlibs-added,shlib-info=[num="17",name="libquarantine.dylib",dyld-addr="0x7fff90f97000",reason="dyld",path="/usr/lib/system/libquarantine.dylib",loaded_addr="0x7fff90f97000"] (gdb) =shlibs-added,shlib-info=[num="18",name="libremovefile.dylib",dyld-addr="0x7fff8ccb5000",reason="dyld",path="/usr/lib/system/libremovefile.dylib",loaded_addr="0x7fff8ccb5000"] (gdb) =shlibs-added,shlib-info=[num="19",name="libsystem_asl.dylib",dyld-addr="0x7fff8df67000",reason="dyld",path="/usr/lib/system/libsystem_asl.dylib",loaded_addr="0x7fff8df67000"] (gdb) =shlibs-added,shlib-info=[num="20",name="libsystem_blocks.dylib",dyld-addr="0x7fff8621c000",reason="dyld",path="/usr/lib/system/libsystem_blocks.dylib",loaded_addr="0x7fff8621c000"] (gdb) =shlibs-added,shlib-info=[num="21",name="libsystem_c.dylib",dyld-addr="0x7fff83c0f000",reason="dyld",path="/usr/lib/system/libsystem_c.dylib",loaded_addr="0x7fff83c0f000"] (gdb) =shlibs-added,shlib-info=[num="22",name="libsystem_configuration.dylib",dyld-addr="0x7fff8fd71000",reason="dyld",path="/usr/lib/system/libsystem_configuration.dylib",loaded_addr="0x7fff8fd71000"] (gdb) =shlibs-added,shlib-info=[num="23",name="libsystem_coreservices.dylib",dyld-addr="0x7fff8a028000",reason="dyld",path="/usr/lib/system/libsystem_coreservices.dylib",loaded_addr="0x7fff8a028000"] (gdb) =shlibs-added,shlib-info=[num="24",name="libsystem_coretls.dylib",dyld-addr="0x7fff90996000",reason="dyld",path="/usr/lib/system/libsystem_coretls.dylib",loaded_addr="0x7fff90996000"] (gdb) =shlibs-added,shlib-info=[num="25",name="libsystem_dnssd.dylib",dyld-addr="0x7fff8b71f000",reason="dyld",path="/usr/lib/system/libsystem_dnssd.dylib",loaded_addr="0x7fff8b71f000"] (gdb) =shlibs-added,shlib-info=[num="26",name="libsystem_info.dylib",dyld-addr="0x7fff8b9f2000",reason="dyld",path="/usr/lib/system/libsystem_info.dylib",loaded_addr="0x7fff8b9f2000"] (gdb) =shlibs-added,shlib-info=[num="27",name="libsystem_kernel.dylib",dyld-addr="0x7fff81ad0000",reason="dyld",path="/usr/lib/system/libsystem_kernel.dylib",loaded_addr="0x7fff81ad0000"] (gdb) =shlibs-added,shlib-info=[num="28",name="libsystem_m.dylib",dyld-addr="0x7fff84953000",reason="dyld",path="/usr/lib/system/libsystem_m.dylib",loaded_addr="0x7fff84953000"] (gdb) =shlibs-added,shlib-info=[num="29",name="libsystem_malloc.dylib",dyld-addr="0x7fff887bd000",reason="dyld",path="/usr/lib/system/libsystem_malloc.dylib",loaded_addr="0x7fff887bd000"] (gdb) =shlibs-added,shlib-info=[num="30",name="libsystem_network.dylib",dyld-addr="0x7fff88304000",reason="dyld",path="/usr/lib/system/libsystem_network.dylib",loaded_addr="0x7fff88304000"] (gdb) =shlibs-added,shlib-info=[num="31",name="libsystem_networkextension.dylib",dyld-addr="0x7fff82085000",reason="dyld",path="/usr/lib/system/libsystem_networkextension.dylib",loaded_addr="0x7fff82085000"] (gdb) =shlibs-added,shlib-info=[num="32",name="libsystem_notify.dylib",dyld-addr="0x7fff8eb69000",reason="dyld",path="/usr/lib/system/libsystem_notify.dylib",loaded_addr="0x7fff8eb69000"] (gdb) =shlibs-added,shlib-info=[num="33",name="libsystem_platform.dylib",dyld-addr="0x7fff89ac7000",reason="dyld",path="/usr/lib/system/libsystem_platform.dylib",loaded_addr="0x7fff89ac7000"] (gdb) =shlibs-added,shlib-info=[num="34",name="libsystem_pthread.dylib",dyld-addr="0x7fff83ff8000",reason="dyld",path="/usr/lib/system/libsystem_pthread.dylib",loaded_addr="0x7fff83ff8000"] (gdb) =shlibs-added,shlib-info=[num="35",name="libsystem_sandbox.dylib",dyld-addr="0x7fff89084000",reason="dyld",path="/usr/lib/system/libsystem_sandbox.dylib",loaded_addr="0x7fff89084000"] (gdb) =shlibs-added,shlib-info=[num="36",name="libsystem_secinit.dylib",dyld-addr="0x7fff8e816000",reason="dyld",path="/usr/lib/system/libsystem_secinit.dylib",loaded_addr="0x7fff8e816000"] (gdb) =shlibs-added,shlib-info=[num="37",name="libsystem_stats.dylib",dyld-addr="0x7fff89eaf000",reason="dyld",path="/usr/lib/system/libsystem_stats.dylib",loaded_addr="0x7fff89eaf000"] (gdb) =shlibs-added,shlib-info=[num="38",name="libsystem_trace.dylib",dyld-addr="0x7fff8ead4000",reason="dyld",path="/usr/lib/system/libsystem_trace.dylib",loaded_addr="0x7fff8ead4000"] (gdb) =shlibs-added,shlib-info=[num="39",name="libunc.dylib",dyld-addr="0x7fff8ab27000",reason="dyld",path="/usr/lib/system/libunc.dylib",loaded_addr="0x7fff8ab27000"] (gdb) =shlibs-added,shlib-info=[num="40",name="libunwind.dylib",dyld-addr="0x7fff85cf3000",reason="dyld",path="/usr/lib/system/libunwind.dylib",loaded_addr="0x7fff85cf3000"] (gdb) =shlibs-added,shlib-info=[num="41",name="libxpc.dylib",dyld-addr="0x7fff88896000",reason="dyld",path="/usr/lib/system/libxpc.dylib",loaded_addr="0x7fff88896000"] (gdb) =shlibs-added,shlib-info=[num="42",name="libobjc.A.dylib",dyld-addr="0x7fff84f13000",reason="dyld",path="/usr/lib/libobjc.A.dylib",loaded_addr="0x7fff84f13000"] (gdb) =shlibs-added,shlib-info=[num="43",name="libauto.dylib",dyld-addr="0x7fff85d89000",reason="dyld",path="/usr/lib/libauto.dylib",loaded_addr="0x7fff85d89000"] (gdb) =shlibs-added,shlib-info=[num="44",name="libDiagnosticMessagesClient.dylib",dyld-addr="0x7fff822e1000",reason="dyld",path="/usr/lib/libDiagnosticMessagesClient.dylib",loaded_addr="0x7fff822e1000"] ``` =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000f4d",func="main",file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15",pending=["main.cpp:15"],times="0",original-location="main.cpp:15"} ``` (gdb) =shlibs-added,shlib-info=[num="45",name="a.out",dyld-addr="0x100000000",reason="dyld",path="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out",loaded_addr="0x100000000",dsym-objpath="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/a.out.dSYM/Contents/Resources/DWARF/a.out"] =shlibs-added,shlib-info=[num="46",name="libc++.1.dylib",dyld-addr="0x7fff85dd0000",reason="dyld",path="/usr/lib/libc++.1.dylib",loaded_addr="0x7fff85dd0000"] =shlibs-added,shlib-info=[num="47",name="libSystem.B.dylib",dyld-addr="0x7fff851ab000",reason="dyld",path="/usr/lib/libSystem.B.dylib",loaded_addr="0x7fff851ab000"] =shlibs-added,shlib-info=[num="48",name="libc++abi.dylib",dyld-addr="0x7fff81be8000",reason="dyld",path="/usr/lib/libc++abi.dylib",loaded_addr="0x7fff81be8000"] =shlibs-added,shlib-info=[num="49",name="libcache.dylib",dyld-addr="0x7fff8b975000",reason="dyld",path="/usr/lib/system/libcache.dylib",loaded_addr="0x7fff8b975000"] =shlibs-added,shlib-info=[num="50",name="libcommonCrypto.dylib",dyld-addr="0x7fff85d14000",reason="dyld",path="/usr/lib/system/libcommonCrypto.dylib",loaded_addr="0x7fff85d14000"] =shlibs-added,shlib-info=[num="51",name="libcompiler_rt.dylib",dyld-addr="0x7fff86154000",reason="dyld",path="/usr/lib/system/libcompiler_rt.dylib",loaded_addr="0x7fff86154000"] =shlibs-added,shlib-info=[num="52",name="libcopyfile.dylib",dyld-addr="0x7fff81ac7000",reason="dyld",path="/usr/lib/system/libcopyfile.dylib",loaded_addr="0x7fff81ac7000"] =shlibs-added,shlib-info=[num="53",name="libcorecrypto.dylib",dyld-addr="0x7fff87d5d000",reason="dyld",path="/usr/lib/system/libcorecrypto.dylib",loaded_addr="0x7fff87d5d000"] =shlibs-added,shlib-info=[num="54",name="libdispatch.dylib",dyld-addr="0x7fff8ea8c000",reason="dyld",path="/usr/lib/system/libdispatch.dylib",loaded_addr="0x7fff8ea8c000"] =shlibs-added,shlib-info=[num="55",name="libdyld.dylib",dyld-addr="0x7fff89087000",reason="dyld",path="/usr/lib/system/libdyld.dylib",loaded_addr="0x7fff89087000"] =shlibs-added,shlib-info=[num="56",name="libkeymgr.dylib",dyld-addr="0x7fff8e818000",reason="dyld",path="/usr/lib/system/libkeymgr.dylib",loaded_addr="0x7fff8e818000"] =shlibs-added,shlib-info=[num="57",name="liblaunch.dylib",dyld-addr="0x7fff84936000",reason="dyld",path="/usr/lib/system/liblaunch.dylib",loaded_addr="0x7fff84936000"] =shlibs-added,shlib-info=[num="58",name="libmacho.dylib",dyld-addr="0x7fff8534e000",reason="dyld",path="/usr/lib/system/libmacho.dylib",loaded_addr="0x7fff8534e000"] =shlibs-added,shlib-info=[num="59",name="libquarantine.dylib",dyld-addr="0x7fff90f97000",reason="dyld",path="/usr/lib/system/libquarantine.dylib",loaded_addr="0x7fff90f97000"] =shlibs-added,shlib-info=[num="60",name="libremovefile.dylib",dyld-addr="0x7fff8ccb5000",reason="dyld",path="/usr/lib/system/libremovefile.dylib",loaded_addr="0x7fff8ccb5000"] =shlibs-added,shlib-info=[num="61",name="libsystem_asl.dylib",dyld-addr="0x7fff8df67000",reason="dyld",path="/usr/lib/system/libsystem_asl.dylib",loaded_addr="0x7fff8df67000"] =shlibs-added,shlib-info=[num="62",name="libsystem_blocks.dylib",dyld-addr="0x7fff8621c000",reason="dyld",path="/usr/lib/system/libsystem_blocks.dylib",loaded_addr="0x7fff8621c000"] =shlibs-added,shlib-info=[num="63",name="libsystem_c.dylib",dyld-addr="0x7fff83c0f000",reason="dyld",path="/usr/lib/system/libsystem_c.dylib",loaded_addr="0x7fff83c0f000"] =shlibs-added,shlib-info=[num="64",name="libsystem_configuration.dylib",dyld-addr="0x7fff8fd71000",reason="dyld",path="/usr/lib/system/libsystem_configuration.dylib",loaded_addr="0x7fff8fd71000"] =shlibs-added,shlib-info=[num="65",name="libsystem_coreservices.dylib",dyld-addr="0x7fff8a028000",reason="dyld",path="/usr/lib/system/libsystem_coreservices.dylib",loaded_addr="0x7fff8a028000"] =shlibs-added,shlib-info=[num="66",name="libsystem_coretls.dylib",dyld-addr="0x7fff90996000",reason="dyld",path="/usr/lib/system/libsystem_coretls.dylib",loaded_addr="0x7fff90996000"] =shlibs-added,shlib-info=[num="67",name="libsystem_dnssd.dylib",dyld-addr="0x7fff8b71f000",reason="dyld",path="/usr/lib/system/libsystem_dnssd.dylib",loaded_addr="0x7fff8b71f000"] =shlibs-added,shlib-info=[num="68",name="libsystem_info.dylib",dyld-addr="0x7fff8b9f2000",reason="dyld",path="/usr/lib/system/libsystem_info.dylib",loaded_addr="0x7fff8b9f2000"] =shlibs-added,shlib-info=[num="69",name="libsystem_kernel.dylib",dyld-addr="0x7fff81ad0000",reason="dyld",path="/usr/lib/system/libsystem_kernel.dylib",loaded_addr="0x7fff81ad0000"] =shlibs-added,shlib-info=[num="70",name="libsystem_m.dylib",dyld-addr="0x7fff84953000",reason="dyld",path="/usr/lib/system/libsystem_m.dylib",loaded_addr="0x7fff84953000"] =shlibs-added,shlib-info=[num="71",name="libsystem_malloc.dylib",dyld-addr="0x7fff887bd000",reason="dyld",path="/usr/lib/system/libsystem_malloc.dylib",loaded_addr="0x7fff887bd000"] =shlibs-added,shlib-info=[num="72",name="libsystem_network.dylib",dyld-addr="0x7fff88304000",reason="dyld",path="/usr/lib/system/libsystem_network.dylib",loaded_addr="0x7fff88304000"] =shlibs-added,shlib-info=[num="73",name="libsystem_networkextension.dylib",dyld-addr="0x7fff82085000",reason="dyld",path="/usr/lib/system/libsystem_networkextension.dylib",loaded_addr="0x7fff82085000"] =shlibs-added,shlib-info=[num="74",name="libsystem_notify.dylib",dyld-addr="0x7fff8eb69000",reason="dyld",path="/usr/lib/system/libsystem_notify.dylib",loaded_addr="0x7fff8eb69000"] =shlibs-added,shlib-info=[num="75",name="libsystem_platform.dylib",dyld-addr="0x7fff89ac7000",reason="dyld",path="/usr/lib/system/libsystem_platform.dylib",loaded_addr="0x7fff89ac7000"] =shlibs-added,shlib-info=[num="76",name="libsystem_pthread.dylib",dyld-addr="0x7fff83ff8000",reason="dyld",path="/usr/lib/system/libsystem_pthread.dylib",loaded_addr="0x7fff83ff8000"] =shlibs-added,shlib-info=[num="77",name="libsystem_sandbox.dylib",dyld-addr="0x7fff89084000",reason="dyld",path="/usr/lib/system/libsystem_sandbox.dylib",loaded_addr="0x7fff89084000"] =shlibs-added,shlib-info=[num="78",name="libsystem_secinit.dylib",dyld-addr="0x7fff8e816000",reason="dyld",path="/usr/lib/system/libsystem_secinit.dylib",loaded_addr="0x7fff8e816000"] =shlibs-added,shlib-info=[num="79",name="libsystem_stats.dylib",dyld-addr="0x7fff89eaf000",reason="dyld",path="/usr/lib/system/libsystem_stats.dylib",loaded_addr="0x7fff89eaf000"] =shlibs-added,shlib-info=[num="80",name="libsystem_trace.dylib",dyld-addr="0x7fff8ead4000",reason="dyld",path="/usr/lib/system/libsystem_trace.dylib",loaded_addr="0x7fff8ead4000"] =shlibs-added,shlib-info=[num="81",name="libunc.dylib",dyld-addr="0x7fff8ab27000",reason="dyld",path="/usr/lib/system/libunc.dylib",loaded_addr="0x7fff8ab27000"] =shlibs-added,shlib-info=[num="82",name="libunwind.dylib",dyld-addr="0x7fff85cf3000",reason="dyld",path="/usr/lib/system/libunwind.dylib",loaded_addr="0x7fff85cf3000"] =shlibs-added,shlib-info=[num="83",name="libxpc.dylib",dyld-addr="0x7fff88896000",reason="dyld",path="/usr/lib/system/libxpc.dylib",loaded_addr="0x7fff88896000"] =shlibs-added,shlib-info=[num="84",name="libobjc.A.dylib",dyld-addr="0x7fff84f13000",reason="dyld",path="/usr/lib/libobjc.A.dylib",loaded_addr="0x7fff84f13000"] =shlibs-added,shlib-info=[num="85",name="libauto.dylib",dyld-addr="0x7fff85d89000",reason="dyld",path="/usr/lib/libauto.dylib",loaded_addr="0x7fff85d89000"] =shlibs-added,shlib-info=[num="86",name="libDiagnosticMessagesClient.dylib",dyld-addr="0x7fff822e1000",reason="dyld",path="/usr/lib/libDiagnosticMessagesClient.dylib",loaded_addr="0x7fff822e1000"] (gdb) *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x0000000100000f4d",func="main",args=[{name="argc",value="1"},{name="argv",value="0x00007fff5fbffed8"}],file="main.cpp",fullname="/Users/chuckr/llama/llvm/tools/lldb/test/tools/lldb-mi/main.cpp",line="15"},thread-id="1",stopped-threads="all" (gdb) ``` Reviewers: abidh, clayborg, ChuckR, jingham Subscribers: ki.stfu, paulmaybee, lldb-commits Differential Revision: http://reviews.llvm.org/D8847 llvm-svn: 234483
* Work around lack of %zd printf format specifier in MSVC libs.Adrian McCarthy2015-03-301-12/+5
| | | | llvm-svn: 233569
* Move lldb-log.cpp to core/Logging.cppZachary Turner2015-03-186-6/+0
| | | | | | | | | So that we don't have to update every single #include in the entire codebase to #include this new header (which used to get included by lldb-private-log.h, we automatically #include "Logging.h" from within "Log.h". llvm-svn: 232653
* Don't #include clang headers from BreakpointLocation.hZachary Turner2015-03-043-0/+5
| | | | llvm-svn: 231263
* Don't #include FormatManager.h from Debugger.hZachary Turner2015-03-031-0/+1
| | | | | | | | Debugger.h is a huge file that gets included everywhere, and FormatManager.h brings in a ton of unnecessary stuff and doesn't even use anything from it in the header. llvm-svn: 231161
* Change the default disassembly format again. First attempt atJason Molenda2015-02-131-1/+1
| | | | | | | | | | | | | | | | changing it was in r219544 - after living on that for a few months, I wanted to take another crack at this. The disassembly-format setting still exists and the old format can be user specified with a setting like ${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}: This patch was discussed in http://reviews.llvm.org/D7578 <rdar://problem/19726421> llvm-svn: 229186
* Make sure that when a breakpoint is hit but its condition is not met,Jim Ingham2015-01-153-3/+27
| | | | | | | | | | the hit count is not updated. Also, keep the hit count for the breakpoint in the breakpoint. We were using just the sum of the location's hit counts, but that was wrong since if a shared library is unloaded, and the location goes away, the breakpoint hit count should not suddenly drop by the number of hits there were on that location. llvm-svn: 226074
* Fix initialization order to match that of the source.Eric Christopher2014-12-171-2/+2
| | | | llvm-svn: 224467
* Add the ability to tag one or more breakpoints with a name. TheseJim Ingham2014-12-164-4/+94
| | | | | | | | | names can then be used in place of breakpoint id's or breakpoint id ranges in all the commands that operate on breakpoints. <rdar://problem/10103959> llvm-svn: 224392
* Add the ability to set breakpoints with conditions, commands, etc,Jim Ingham2014-12-065-14/+63
| | | | | | | | | | | | | | in the "dummy-target". The dummy target breakpoints prime all future targets. Breakpoints set before any target is created (e.g. breakpoints in ~/.lldbinit) automatically get set in the dummy target. You can also list, add & delete breakpoints from the dummy target using the "-D" flag, which is supported by most of the breakpoint commands. This removes a long-standing wart in lldb... <rdar://problem/10881487> llvm-svn: 223565
* The breakpoint location hit counts were getting incremented inJim Ingham2014-10-223-2/+18
| | | | | | | | | | | | | | | BreakpointLocation::ShouldStop. That worked but wasn't really right, since there's nothing to guarantee that won't get called more than once. So this change moves that responsibility to the StopInfoBreakpoint directly, and then it uses the BreakpointSite to actually do the bumping. Also fix a test case that was assuming if you had many threads running some code with a breakpoint in it, the hit count when you stopped would always be 1. Many of the threads could have hit it at the same time... <rdar://problem/18577603> llvm-svn: 220358
* Add a new disassembly-format specification so that the disassemblerJason Molenda2014-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | output style can be customized. Change the built-in default to be more similar to gdb's disassembly formatting. The disassembly-format for a gdb-like output is ${addr-file-or-load} <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>: The disassembly-format for the lldb style output is {${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}: The two backticks in the lldb style formatter triggers the sub-expression evaluation in CommandInterpreter::PreprocessCommand() so you can't use that one as-is ... changing to use ' characters instead of ` would work around that. <rdar://problem/9885398> llvm-svn: 219544
* Rework how resetting breakpoints in changed modules works. Try to match up oldJim Ingham2014-09-103-46/+325
| | | | | | | | locations with new ones if possible. Next up some test cases... llvm-svn: 217551
* Fix typos.Bruce Mitchener2014-07-011-2/+2
| | | | llvm-svn: 212132
* Actually make a real scoped locker rather than constructing one that gets ↵Jim Ingham2014-06-181-9/+8
| | | | | | immediately thrown away... llvm-svn: 211242
* Add locking around the m_owners collection in the breakpoint site. If we ↵Jim Ingham2014-06-181-1/+11
| | | | | | | | | | are in the middle of "BreakpointLocation::ShouldStop" we don't want other commands (like "break disable") to mutate the owners of this breakpoint out from under us. <rdar://problem/17255589> llvm-svn: 211136
* Rename eExecution*** to eExpression*** to be consistent with the result type.Jim Ingham2014-05-051-1/+1
| | | | llvm-svn: 207945
* Make the Expression Execution result enum available to the SB API layer.Jim Ingham2014-05-051-1/+1
| | | | | | | | | Add a callback that will allow an expression to be cancelled between the expression evaluation stages (for the ClangUserExpressions.) <rdar://problem/16790467>, <rdar://problem/16573440> llvm-svn: 207944
* This function should be const.Jim Ingham2014-04-081-1/+1
| | | | llvm-svn: 205790
* sweep up -Wformat warnings from gccSaleem Abdulrasool2014-04-045-5/+5
| | | | | | | This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
* JITed functions can now have debug info and be debugged with debug and ↵Greg Clayton2014-03-241-1/+2
| | | | | | | | | | | | | | | | | | | source info: (lldb) b puts (lldb) expr -g -i0 -- (int)puts("hello") First we will stop at the entry point of the expression before it runs, then we can step over a few times and hit the breakpoint in "puts", then we can continue and finishing stepping and fininsh the expression. Main features: - New ObjectFileJIT class that can be easily created for JIT functions - debug info can now be enabled when parsing expressions - source for any function that is run throught the JIT is now saved in LLDB process specific temp directory and cleaned up on exit - "expr -g --" allows you to single step through your expression function with source code <rdar://problem/16382881> llvm-svn: 204682
* When clearing a breakpoint site, make sure the owning process still exists ↵Jim Ingham2014-03-121-1/+8
| | | | | | | | before asking it to remove the breakpoint site the rest of the way. <rdar://problem/16303500> llvm-svn: 203724
* Fix a couple of typo's in breakpoint descriptions.Jim Ingham2014-03-042-2/+2
| | | | llvm-svn: 202782
* remove useless declarations found thanks to scan-buildSylvestre Ledru2014-02-271-1/+0
| | | | llvm-svn: 202440
* Get the breakpoint setting, and the Mac OS X DYLD trampolines and expression ↵Jim Ingham2014-01-104-10/+58
| | | | | | | | | | | | | | | | | | | | | | | | evaluator to handle Indirect symbols correctly. There were a couple of pieces to this. 1) When a breakpoint location finds itself pointing to an Indirect symbol, when the site for it is created it needs to resolve the symbol and actually set the site at its target. 2) Not all breakpoints want to do this (i.e. a straight address breakpoint should always set itself on the specified address, so somem machinery was needed to specify that. 3) I added some info to the break list output for indirect symbols so you could see what was happening. Also I made it clear when we re-route through re-exported symbols. 4) I moved ResolveIndirectFunction from ProcessPosix to Process since it works the exact same way on Mac OS X and the other posix systems. If we find a platform that doesn't do it this way, they can override the call in Process. 5) Fixed one bug in RunThreadPlan, if you were trying to run a thread plan after a "running" event had been broadcast, the event coalescing would cause you to miss the ThreadPlan running event. So I added a way to override the coalescing. 6) Made DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan handle Indirect & Re-exported symbols. <rdar://problem/15280639> llvm-svn: 198976
* For logical backtrace work, lldb needs to track Module unloads etc & ↵Greg Clayton2013-12-061-0/+2
| | | | | | | | | | symoblicate an address based on a point in time <rdar://problem/15314403> This patch adds a new lldb_private::SectionLoadHistory class that tracks what shared libraries were loaded given a process stop ID. This allows us to keep a history of the sections that were loaded for a time T. Many items in history objects will rely upon the process stop ID in the future. llvm-svn: 196557
* <rdar://problem/15566148>Greg Clayton2013-12-031-8/+5
| | | | | | Fix use of std::lower_bound to check for equality if a match is found to ensure we don't return the next breakpoint with an ID greater than the break_id that was asked for. llvm-svn: 196298
* Remove the bad assumption that breakpoint locations won't get deleted in ↵Jim Ingham2013-12-031-8/+14
| | | | | | | | BreakpointLocationList::FindByID. <rdar://problem/15566148> llvm-svn: 196197
* Fixed the the breakpoint test case failures. Greg Clayton2013-11-093-20/+63
| | | | | | There were 6 on darwin. All of these were related to the recent changes for exec. llvm-svn: 194298
* This patch does a couple of things. Jim Ingham2013-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | It completes the job of using EvaluateExpressionOptions consistently throughout the inferior function calling mechanism in lldb begun in Greg's patch r194009. It removes a handful of alternate calls into the ClangUserExpression/ClangFunction/ThreadPlanCallFunction which were there for convenience. Using the EvaluateExpressionOptions removes the need for them. Using that it gets the --debug option from Greg's patch to work cleanly. It also adds another EvaluateExpressionOption to not trap exceptions when running expressions. You shouldn't use this option unless you KNOW your expression can't throw beyond itself. This is: <rdar://problem/15374885> At present this is only available through the SB API's or python. It fixes a bug where function calls would unset the ObjC & C++ exception breakpoints without checking whether they were set by somebody else already. llvm-svn: 194182
* <rdar://problem/15367122>Greg Clayton2013-11-051-2/+2
| | | | | | | | Fixed the test case for "test/functionalities/exec/TestExec.py" on Darwin. The issue was breakpoints were persisting and causing problems. When we exec, we need to clear out the process and target and start fresh with nothing and let the breakpoints populate themselves again. This patch correctly clears out the breakpoints and also flushes the process so that the objects (process/thread/frame) give out valid information. llvm-svn: 194106
* Added a "--debug" option to the "expression" command. Greg Clayton2013-11-041-8/+7
| | | | | | | | Cleaned up ClangUserExpression::Evaluate() to have only one variant that takes a "const EvaluateExpressionOptions& options" instead of taking many arguments. The "--debug" option is designed to allow you to debug your expression by stopping at the first instruction (it enables --ignore-breakpoints=true and --unwind-on-error=false) and allowing you to step through your JIT code. It needs to be more integrated with the thread plan, so I am checking this in so Jim Ingham can make it happen. llvm-svn: 194009
* Fixed breakpoints to be able to be set on eSymbolTypeReExported symbols and ↵Greg Clayton2013-10-211-1/+11
| | | | | | resolve to the correct function. This allows setting a breakpoint on "memset" for iOS simulator binaries and the correct breakpoint will be set on "__platform_memset". llvm-svn: 193114
* Report the summed hit count in the breakpoint line.Jim Ingham2013-10-121-1/+1
| | | | | | <rdar://problem/15183226> llvm-svn: 192518
* <rdar://problem/13635174>Greg Clayton2013-10-114-7/+8
| | | | | | | | Added a way to set hardware breakpoints from the "breakpoint set" command with the new "--hardware" option. Hardware breakpoints are not a request, they currently are a requirement. So when breakpoints are specified as hardware breakpoints, they might fail to be set when they are able to be resolved and should be used sparingly. This is currently hooked up for GDB remote debugging. Linux and FreeBSD should quickly enable this feature if possible, or return an error for any breakpoints that are hardware breakpoint sites in the "virtual Error Process::EnableBreakpointSite (BreakpointSite *bp_site);" function. llvm-svn: 192491
* Remove unused local variable.Michael Sartain2013-10-041-2/+0
| | | | llvm-svn: 191974
* Factor the code that was eliminating redundant breakpoint locations and movingJim Ingham2013-09-273-183/+159
| | | | | | | | line breakpoints past the prologue of functions so it can be shared between the file & line breakpoint resolver, and the source pattern breakpoint resolver, and then share it. llvm-svn: 191478
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-251-25/+25
| | | | llvm-svn: 191367
* Change the "breakpoint fuzz" algorithm from "coalesce the line ranges for a ↵Jim Ingham2013-09-101-7/+6
| | | | | | | | | | | | file & line breakpoint if they are contiguous" to "coalesce the line ranges for a file & line breakpoint to the first range in each block". We were still setting a silly number of independent breakpoints sometimes, and until we get a compiler that emits trustworthy is_stmt flags in the line table, we need to do something to reduce the noise. <rdar://problem/14920404> llvm-svn: 190380
* Fix Rendezvous breakpoint to only be set once, resolve addr in ↵Michael Sartain2013-07-161-1/+20
| | | | | | | | BreakpointLocationList::FindByAddress Differential Revision: http://llvm-reviews.chandlerc.com/D1145 llvm-svn: 186458
* Huge change to clean up types.Greg Clayton2013-07-111-2/+1
| | | | | | | | A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error. This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness. llvm-svn: 186130
* Don't check for "are there any loaded sections" before trying to resolve a ↵Jim Ingham2013-06-281-3/+0
| | | | | | | | | | breakpoint site. We've already got a process, and any breakpoints with section relative addresses won't resolve their load addresses so they will error out at that point. <rdar://problem/13900130> llvm-svn: 185170
* We set the error when a breakpoint conditionSean Callanan2013-06-241-0/+1
| | | | | | | | | | | doesn't return anything; that's great. We should probably also return rather than trying to access the nonexistent return value. <rdar://problem/14009519> llvm-svn: 184765
* Sort out a number of mismatched integer types in order to cut down the ↵Andy Gibbs2013-06-192-2/+2
| | | | | | number of compiler warnings. llvm-svn: 184333
* Be sure to print out the full file path when dumping breakpoint resolvers ↵Greg Clayton2013-06-131-1/+1
| | | | | | for file and line when the full path was specified. llvm-svn: 183932
* Huge performance improvements when one breakpoint contains many locations.Greg Clayton2013-06-122-132/+35
| | | | | | | | | | 325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote. That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly. Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed. llvm-svn: 183820
* Fixed a problem where evaluating a breakpointSean Callanan2013-06-061-1/+4
| | | | | | | | | | | condition in two different processes (with the same target) could cause crashes. Now the breakpoint condition is always evaluated (and possibly parsed) by one thread at a time. <rdar://problem/14083737> llvm-svn: 183440
* Error out if the expression for a breakpointSean Callanan2013-05-291-0/+6
| | | | | | | | | condition doesn't return a result, instead of blindly trying to use that result. <rdar://problem/14009519> llvm-svn: 182875
* Hardened LLDB against NULL conditions beingSean Callanan2013-05-102-0/+6
| | | | | | | | passed to breakpoints. <rdar://problem/13853205> llvm-svn: 181636
OpenPOWER on IntegriCloud