Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Add language option in -gdb-show command (MI) | Ilia K | 2015-04-28 | 2 | -0/+33 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add language option in -gdb-show command + test: ``` $ bin/lldb-mi ~/p/hello [...] b main [...] r [...] (gdb) -gdb-show language ^done,value="c++" (gdb) quit ``` Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh, granata.enrico, jingham, clayborg Reviewed By: clayborg Subscribers: lldb-commits, jingham, granata.enrico, clayborg, abidh Differential Revision: http://reviews.llvm.org/D9279 llvm-svn: 235983 | |||||
* | LLDB-MI: -var-list-children with no children doesn't need a children value ↵ | Bruce Mitchener | 2015-04-28 | 1 | -6/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | in the response. Summary: When using GDB with MI, if there aren't children for a variable, it doesn't include a "children" value in the response. LLDB does and sets it to "[]" while variables with children have an unquoted list: children=[...]. This removes the children value entirely when there are no children making this match GDB in behavior. Test Plan: Ran tests on Mac OS X and they passed. Reviewers: abidh, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9320 llvm-svn: 235974 | |||||
* | Improve handling of ctrl-c with MSVC. | Hafiz Abid Qadeer | 2015-04-27 | 2 | -2/+14 | |
| | | | | | | | | | Currently hitting Ctrl-C in Windows LLDB-MI just exits MI. But according to test_lldbmi_stopped_when_interrupt() in TestMiSignal.py Ctrl-C should send a SIGINT signal to the inferior. Patch adds this functionality to Windows so SIGINT is sent on Ctrl-C. Patch from EwanCrawford. Reviewed in http://reviews.llvm.org/D9248. llvm-svn: 235887 | |||||
* | Fix double stdout/stderr output from CLI commands in MI mode (MI) | Ilia K | 2015-04-27 | 1 | -7/+0 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes stdout/stderr output that printed twice for CLI commands: was: ``` (gdb) target create ~/p/hello Current executable set to '~/p/hello' (x86_64). Current executable set to '~/p/hello' (x86_64). ^done (gdb) ``` now: ``` (gdb) target create ~/p/hello Current executable set to '~/p/hello' (x86_64). ^done (gdb) ``` Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh Reviewed By: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D9277 llvm-svn: 235857 | |||||
* | Clean the CMIDriver (MI) | Ilia K | 2015-04-26 | 1 | -5/+1 | |
| | | | | | | | | This patch does the following things: * Use CMICmnStreamStdout::TextToStdout to print (gdb) prompt in CMIDriver::InitClientIDEEclipse * Remove unnecessary inclusions llvm-svn: 235817 | |||||
* | Clean CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateSuspended (MI) | Ilia K | 2015-04-25 | 1 | -6/+4 | |
| | | | | | | | Don't call the lldb::SBProcess::GetRestartedFromEvent twice while handling the CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateSuspended. llvm-svn: 235812 | |||||
* | Fix CMIUtilThreadActiveObjBase::ThreadIsActive when a thread has died (MI) | Ilia K | 2015-04-25 | 2 | -6/+28 | |
| | | | | llvm-svn: 235811 | |||||
* | Add -gdb-set/-gdb-show aggregate-field-names option (MI) | Ilia K | 2015-04-25 | 6 | -9/+32 | |
| | | | | | | | | | | | | | | | | | | Use this option to print/skip field names (default is on): ``` -var-create var1 * complx ^done,name="var1",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var2 * complx_array ^done,name="var2",numchild="2",value="{[0] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, [1] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" -gdb-set print aggregate-field-names off ^done -var-create var3 * complx ^done,name="var3",numchild="3",value="{3,{3},0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var4 * complx_array ^done,name="var4",numchild="2",value="{{4,{4},0x[0-9a-f]+},{5,{5},0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" ``` llvm-svn: 235807 | |||||
* | Add -gdb-set/-gdb-show expand-aggregates option (MI) | Ilia K | 2015-04-25 | 5 | -2/+13 | |
| | | | | | | | | | | | | | | | | | | Use this option to expand complex types always: ``` -var-create var1 * complx ^done,name="var1",numchild="3",value="{...}",type="complex_type",thread-id="1",has_more="0" -var-create var2 * complx_array ^done,name="var2",numchild="2",value="[2]",type="complex_type [2]",thread-id="1",has_more="0" -gdb-set print expand-aggregates on ^done -var-create var3 * complx ^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}",type="complex_type",thread-id="1",has_more="0" -var-create var4 * complx_array ^done,name="var4",numchild="2",value="{[0] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, [1] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}",type="complex_type [2]",thread-id="1",has_more="0" ``` llvm-svn: 235805 | |||||
* | Add -gdb-set/-gdb-show print char-array-as-string option (MI) | Ilia K | 2015-04-25 | 9 | -5/+118 | |
| | | | | llvm-svn: 235804 | |||||
* | Fix CMICmnLLDBDebuggerHandleEvents::GetProcessStdout/GetProcessStderr to use ↵ | Ilia K | 2015-04-24 | 1 | -4/+6 | |
| | | | | | | stream-record (MI) llvm-svn: 235711 | |||||
* | Fix CMICmnMIOutOfBandRecord to accept stream-records (MI) | Ilia K | 2015-04-24 | 2 | -10/+31 | |
| | | | | | | Previously the CMICmnMIOutOfBandRecord class worked only with async-records. llvm-svn: 235709 | |||||
* | MI fix allowing multiple logging instances of lldb-mi to run simultaneously. | Ilia K | 2015-04-23 | 8 | -18/+72 | |
| | | | | | | | | | | | | | | | | | | | | Summary: Currently if two instances of lldb-mi are running with logging enabled using '--log' the log file conflicts. This produces the following error MI: Error: File Handler. Error Permission denied opening 'C:\Users\Ewan\LLVM\build\Debug\bin\lldb-mi-log.txt' Fixed in this patch by renaming lldb-mi-log.txt based on the date, e.g. lldb-mi-log.txt-20150316163631.log, and moving the file into the temp directory by using the --log-dir option. Regrading previous review comments the P_tmpdir macro is defined in Windows but always points to "\", which doesn't help much. Also when using the Windows API for GetTempPath() dynamic memory seems much more messy. Patch from ewan@codeplay.com Reviewers: abidh, EwanCrawford Subscribers: zturner, lldb-commits, deepak2427 Differential Revision: http://reviews.llvm.org/D9054 llvm-svn: 235589 | |||||
* | MI Refactor CMIUtilSystemWindows::GetExecutablesPath() | Ilia K | 2015-04-22 | 1 | -6/+4 | |
| | | | | | | | | | | | | | | | | | Summary: My understanding of the Windows API call GetLastError() is that it should only be checked when ::GetModuleFileName() returns 0 on error. Otherwise GetExecutablesPath() could return an error despite nLen being valid if GetLastError() was inconsistent. Patch updates function to only call GetOSLastError() when nLen == 0 Patch from ewan@codeplay.com Reviewers: EwanCrawford Subscribers: lldb-commits, deepak2427 Differential Revision: http://reviews.llvm.org/D9154 llvm-svn: 235515 | |||||
* | MI support for '-var-create $regname' command. | Ilia K | 2015-04-17 | 1 | -6/+16 | |
| | | | | | | | | | | | | | | | | | | Summary: This command is currently processed using expression evaluation, meaning the variable binds to the result of the expression not the register. Therefore any subsequent calls to '-var-assign' will not update the register. Fixed by detecting '$' prefix for registers according to specification. Thanks, Ewan Patch from ewan@codeplay.com Reviewers: EwanCrawford Subscribers: lldb-commits, deepak2427 Differential Revision: http://reviews.llvm.org/D8965 llvm-svn: 235195 | |||||
* | Add comments to LLDB-MI disassembly. | Ilia K | 2015-04-15 | 1 | -1/+5 | |
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the comments which are included in LLDB disassembly, but are currently missing in MI, e.g. ^done,asm_insns=[...,{address="0x00000000004004ff",func-name="main",offset="18",size="2",inst="jmp 0x40050b ; <+30> at main.c:7"}] instead of ^done,asm_insns=[...,{address="0x00000000004004ff",func-name="main",offset="18",size="2",inst="jmp 0x40050b"}] Thanks, Ewan Patch from ewan@codeplay.com Reviewers: abidh, EwanCrawford Subscribers: ted, lldb-commits, deepak2427 Differential Revision: http://reviews.llvm.org/D8964 llvm-svn: 235017 | |||||
* | Fix handling of the executable arg which contains spaces (MI) | Ilia K | 2015-04-14 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | * Don't use the CMICmdArgValFile::GetFileNamePath for the CMIDriver::m_strCmdLineArgExecuteableFileNamePath because it wraps path with spaces into quotes what is already being done in CMIDriver::LocalDebugSessionStartupExecuteCommands * Improve the MiSyntaxTestCase.test_lldbmi_specialchars test to catch this error ``` $ bin/lldb-mi "~/p/ hello" (gdb) -file-exec-and-symbols "\"~/p/ hello\"" ^error,msg="Command 'file-exec-and-symbols'. Target binary '\"~/p/ hello\"' is invalid. error: unable to find executable for '/"~/p/ hello/"'" ``` llvm-svn: 234888 | |||||
* | Fix CMICmnStreamStdout::WritePriv which causes a stack overflow (MI) | Ilia K | 2015-04-13 | 3 | -6/+2 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes: * Remove IDS_STDOUT_ERR_NOT_ALL_DATA_WRITTEN enum value * Remove IDS_STDOUT_ERR_NOT_ALL_DATA_WRITTEN mapped string in CMICmnResources::ms_pResourceId2TextData * Fix a stack overflow which happens when fputs() fails: ``` [...] frame #21153: 0x00000001045db6f0 lldb-mi`CMICmnStreamStderr::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416 frame #21154: 0x00000001045db529 lldb-mi`CMICmnStreamStderr::Write(CMIUtilString const&, bool) + 265 frame #21155: 0x00000001045c6a27 lldb-mi`CMICmnBase::SetErrorDescription(CMIUtilString const&) const + 215 frame #21156: 0x00000001045db6f0 lldb-mi`CMICmnStreamStderr::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416 frame #21157: 0x00000001045db529 lldb-mi`CMICmnStreamStderr::Write(CMIUtilString const&, bool) + 265 frame #21158: 0x00000001045c6a27 lldb-mi`CMICmnBase::SetErrorDescription(CMIUtilString const&) const + 215 frame #21159: 0x00000001045db6f0 lldb-mi`CMICmnStreamStderr::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416 frame #21160: 0x00000001045db529 lldb-mi`CMICmnStreamStderr::Write(CMIUtilString const&, bool) + 265 frame #21161: 0x00000001045c6a27 lldb-mi`CMICmnBase::SetErrorDescription(CMIUtilString const&) const + 215 frame #21162: 0x00000001045db6f0 lldb-mi`CMICmnStreamStderr::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416 frame #21163: 0x00000001045db529 lldb-mi`CMICmnStreamStderr::Write(CMIUtilString const&, bool) + 265 frame #21164: 0x00000001045c6a27 lldb-mi`CMICmnBase::SetErrorDescription(CMIUtilString const&) const + 215 frame #21165: 0x00000001045dc540 lldb-mi`CMICmnStreamStdout::WritePriv(CMIUtilString const&, CMIUtilString const&, bool) + 416 frame #21166: 0x00000001045de5fb lldb-mi`CMIDriver::DoMainLoop() + 939 frame #21167: 0x00000001045e2334 lldb-mi`CMIDriverMgr::DriverMainLoop() + 36 frame #21168: 0x00000001045e1a39 lldb-mi`main + 217 frame #21169: 0x00007fff90f395c9 libdyld.dylib`start + 1 ``` llvm-svn: 234751 | |||||
* | Generate an event when a pending breakpoint binds | Ilia K | 2015-04-09 | 1 | -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 | |||||
* | Fix MiGdbSetShowTestCase.test_lldbmi_gdb_set_ouptut_radix after r234476 | Ilia K | 2015-04-09 | 3 | -0/+30 | |
| | | | | | | | | This includes: * Add CMICmnLLDBUtilSBValue::IsIntegerType to check integer type * Improve CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted to handle veVarFormat arg llvm-svn: 234480 | |||||
* | Refactor ↵ | Ilia K | 2015-04-09 | 9 | -595/+292 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMICmnLLDBDebuggerHandleEvents/CMICmnLLDBDebugSessionInfo/CMICmnLLDBDebugSessionInfoVarObj (MI) Summary: This patch includes the following changes: # Refactor GetVariableInfo/GetValueStringFormatted/GetValue to use the same code (MI) Also it expands the variable value format for strings (aka char*): was: ``` ^done,name="v4",numchild="1",value="0x0000000100000f56",type="const char *",thread-id="1",has_more="0" ``` now: ``` ^done,name="v4",numchild="1",value="0x0000000100000f56 \"ab\"",type="const char *",thread-id="1",has_more="0" ``` # Expand the variable value format for arrays (according to GDB) For example: was: ``` ^done,name="v3",numchild="2",value="{...}",type="char [2]",thread-id="1",has_more="0" ``` now: ``` ^done,name="v3",numchild="2",value="[2]",type="char [2]",thread-id="1",has_more="0" ``` # Rename MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry_default to test_lldbmi_gdb_show_process_stopatentry (MI) # Fix a comment in MiGdbSetShowTestCase.test_lldbmi_gdb_show_process_stopatentry (MI) # Refactor CMICmnLLDBUtilSBValue ## Add CMICmnLLDBUtilSBValue::IsPointerType/IsArrayType ## Refactor CMICmnLLDBUtilSBValue::GetValue ## Fix CMICmnLLDBUtilSBValue::IsChildCharType to ignore a number of childs ## Rename CMICmnLLDBUtilSBValue::IsChildCharType to IsFirstChildCharType ## Fix CMICmnLLDBUtilSBValue::GetValueCString to accept char[] # Minor changes in CMICmnLLDBUtilSBValue::GetValue # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo family functions (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo2 ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept args # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Add vArgInfo arg to CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo ## Move CMICmnLLDBDebugSessionInfo::GetFrameInfo/MIResponseFormFrameInfo to private namespace # Refactor CMICmnLLDBDebugSessionInfo::GetThreadFrames family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::GetThreadFrames2 ## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept vnMaxDepth # Fix vnMaxDepth arg name in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo family functions (MI) ## Merge CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo functions into one # Don't modify fnName in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo3 ## Improve -CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept vnMaxDepth # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo family functions (MI) ## Remove CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo2 ## Add CMICmnLLDBDebugSessionInfo::ThreadInfoFormat_e enum to specify thread format ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo to accept veThreadInfoFormat ## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo (not needed because veThreadInfoFormat was added) # Move CMICmnLLDBDebugSessionInfo::GetThreadFrames to private namespace (MI) # Refactor CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (MI) ## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e enum to specify frame format ## Improve CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo to accept veFrameInfoFormat ## Remove vnMaxDepth arg in CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo (not needed because veFrameInfoFormat was added) # Remove duplicated level field in CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) # Refactor CMICmnLLDBUtilSBValue::GetValue (MI) ## Add CMICmnLLDBUtilSBValue::GetSimpleValue ## Use CMICmnLLDBUtilSBValue::GetSimpleValue in GetVlaue # Fix CMICmnLLDBDebugSessionInfo::GetThreadFrames (MI) ## Add CMICmnLLDBDebugSessionInfo::FrameInfoFormat_e::eFrameInfoFormat_AllArgumentsInSimpleForm which is used to get stack-args in simple form (i.e. show {...} for composite types). It can be done by calling MIResponseFormVariableInfo with vnMaxDepth=0. ## Improve CMICmnLLDBDebugSessionInfo::GetThreadFrames to accept veFrameInfoFormat ## Remove vnMaxDepth from CMICmnLLDBDebugSessionInfo::GetThreadFrames (we should use veFrameInfoFormat instead) # Refactor CMICmnLLDBUtilSBValue::GetValue to expand composite types (MI) ## Add CMICmnLLDBUtilSBValue::GetCompositeValue to expand composite types ## Add CMICmnLLDBUtilSBValue::m_pComposite to avoid multiple {...} in the code ## Improve CMICmnLLDBUtilSBValue::GetValue to accept vbExpandAggregates option (default=false) ## Clean up CMICmnLLDBDebugSessionInfo::GetVariableInfo to use CMICmnLLDBUtilSBValue::GetValue ## Remove the wrapping into {} in CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo ## Fix MiStackTestCase.test_lldbmi_stack_list_locals test to expect result without superfluous space ' ' around the '{' or '}' brackets: was: ``` {name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = { var_d = 30 }} ``` now: ``` {name=\"var_c\",value=\"{var_a = 10,var_b = 97 'a',inner_ = {var_d = 30}} ``` ## Fix vwrValue arg name in CMICmnLLDBUtilSBValue::GetSimpleValue (was vrValue) # Refactor CMICmnLLDBDebugSessionInfo::GetVariableInfo (MI) ## Remove vnMaxDepth/vbIsChildValue/vnDepth args in CMICmnLLDBDebugSessionInfo::GetVariableInfo ## Improve CMICmnLLDBDebugSessionInfo::GetVariableInfo to accept vwrStrValue ## Remove vwrMiValueList arg in CMICmnLLDBDebugSessionInfo::GetVariableInfo (we should use vwrStrValue instead) ## Fix CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo to Escape values was: ``` {name="p",value="0x0000000000000000 """} ``` now: ``` {name="p",value="0x0000000000000000 \"\""} ``` # Refactor CMICmnLLDBUtilSBValue ## Improve CMICmnLLDBUtilSBValue::GetValue to handle PrintExpandAggregates ## Improve CMICmnLLDBUtilSBValue::GetSimpleValue to handle vbHandleArrayType (use it to specify that array should be represented as simple type, i.e. value="[2]") # Add spacing between fields in CMICmnLLDBUtilSBValue::GetCompositeValue (MI) For example: was: ``` ^done,name="var3",numchild="3",value="{i = 3,inner = {l = 3},complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0" ``` now: ``` ^done,name="var3",numchild="3",value="{i = 3, inner = {l = 3}, complex_ptr = 0x00007fff5fbff848}",type="complex_type",thread-id="1",has_more="0" ``` # Fix spacing in MiStackTestCase.test_lldbmi_stack_list_locals test (MI) Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D8913 llvm-svn: 234476 | |||||
* | implement gdb-set output-radix | Ilia K | 2015-04-07 | 4 | -1/+77 | |
| | | | | | | | | | | | | | | Summary: Patch from chuckr@microsoft.com Reviewers: abidh, ChuckR Reviewed By: abidh Subscribers: paulmaybee, ki.stfu, greggm, scarroll, lldb-commits Differential Revision: http://reviews.llvm.org/D8430 llvm-svn: 234305 | |||||
* | Silence a compiler warning about "bAsyncMode" possibly being used uninitialized. | Greg Clayton | 2015-03-31 | 1 | -1/+1 | |
| | | | | llvm-svn: 233754 | |||||
* | Changed a function to static. | Hafiz Abid Qadeer | 2015-03-31 | 4 | -4/+4 | |
| | | | | | | | | A temp object was being created to call StripOffFileName. This function is not dependent on class members so I am making it static. No regression on testsuite on Linux. llvm-svn: 233703 | |||||
* | Fix infinite loop when ^D was pressed (MI) | Ilia K | 2015-03-26 | 1 | -1/+7 | |
| | | | | llvm-svn: 233278 | |||||
* | Use std::vector::iterator in ↵ | Ilia K | 2015-03-26 | 1 | -2/+2 | |
| | | | | | | CMICmnLLDBDebuggerHandleEvents::ChkForStateChanges to fix build on Linux after r233260 (MI) llvm-svn: 233265 | |||||
* | Use std::vector::const_iterator and std::vector::cbegin/cend in ↵ | Ilia K | 2015-03-26 | 1 | -3/+3 | |
| | | | | | | CMICmnLLDBDebuggerHandleEvents::ChkForStateChanges (MI) llvm-svn: 233260 | |||||
* | Fix =thread-exited message (MI) | Ilia K | 2015-03-26 | 1 | -37/+23 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch includes: # Fix invalid thread id in =thread-exited message # Remove invalid threads from cache All tests pass on OS X. Test Plan: now ``` =thread-exited,id="3",group-id="i1" =thread-exited,id="4",group-id="i1" =thread-exited,id="5",group-id="i1" ``` was ``` =thread-exited,id="4294967295",group-id="i1" =thread-exited,id="4294967295",group-id="i1" ... =thread-exited,id="4294967295",group-id="i1" =thread-exited,id="4294967295",group-id="i1" ``` Reviewers: abidh Reviewed By: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D8603 llvm-svn: 233256 | |||||
* | Fix -gdb-exit to detach if was attached or destroy otherwise (MI) | Ilia K | 2015-03-26 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | Summary: This patch fixes -gdb-exit for locally target. It includes the following changes: # Fix Process::Finalize # Use SBProcess::Destroy in -gdb-exit Reviewers: abidh, zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8298 llvm-svn: 233255 | |||||
* | Add -gdb-show and target-async option in -gdb-show command (MI) | Ilia K | 2015-03-24 | 5 | -1/+349 | |
| | | | | | | | | | | | | | | | | | | | | | Summary: This path adds -gdb-show command with 1 option: target-async. Also it adds tests for -gdb-set and -gdb-show commands. All tests pass on OS X. Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb -f MiGdbSetShowTestCase Reviewers: clayborg, abidh Reviewed By: clayborg, abidh Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8566 llvm-svn: 233114 | |||||
* | Add support for CLI commands in lldb-mi | Ilia K | 2015-03-24 | 2 | -7/+83 | |
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for CLI command in lldb-mi. It's useful ability which also was implemented in gdb. All tests pass on OS X. Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/interpreter/ Reviewers: ted, clayborg, abidh Reviewed By: clayborg, abidh Subscribers: jingham, lldb-commits, ted, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8483 llvm-svn: 233112 | |||||
* | Remove redundant code from lldb-mi. | Hafiz Abid Qadeer | 2015-03-24 | 11 | -1599/+0 | |
| | | | | | | | After removing the ability of using lldb-mi as 'lldb', a lot of code has become redundant. This commit removes some of that code. Note: Some files are being removed. The cmake file has been updated. Please update xcode project accordingly. llvm-svn: 233083 | |||||
* | Turn off 'quit' confirmation in lldb-mi | Ilia K | 2015-03-23 | 1 | -4/+8 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: # Turn off interpreter.prompt-on-quit on startup (MI) # Add CommandInterpreter::SetPromptOnQuit # Add SBCommandInterpreter::GetPromptOnQuit/SetPromptOnQuit All tests pass on OS X. Test Plan: ``` -file-exec-and-symbols ~/p/hello -break-insert -f main -exec-run -interpreter-exec console quit ``` Reviewers: abidh, clayborg Reviewed By: abidh, clayborg Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8444 llvm-svn: 233034 | |||||
* | Add target-async option in -gdb-set command (MI) | Ilia K | 2015-03-23 | 4 | -1/+48 | |
| | | | | llvm-svn: 233018 | |||||
* | Fix/Add comments in CMICmdCmdGdbSet (MI) | Ilia K | 2015-03-23 | 2 | -9/+14 | |
| | | | | llvm-svn: 233017 | |||||
* | Fix handling of CommandInterpreter's events in lldb-mi | Ilia K | 2015-03-21 | 2 | -1/+11 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously lldb-mi contains a stub for that but it didn't work and all CommanInterpreter's events were ignored. This commit adds a handling of CommandInterpreter's events in lldb-mi. Steps: # Fix CMICmnLLDBDebugger::InitSBListener # Add SBCommandInterpreter::EventIsCommandInterpreterEvent # Exit on lldb::SBCommandInterpreter::eBroadcastBitQuitCommandReceived All tests pass on OS X. In further we can remove "quit" hack in lldb-mi. Test Plan: # Create start_script file: ``` target create ~/p/hello b main r quit ``` # Run lldb-mi --interpreter # Execute start_script file by following command: ``` -interpreter-exec console "command source start_script" ``` Log: ``` $ bin/lldb-mi --interpreter (gdb) -interpreter-exec console "command source start_script" Executing commands in '/Users/IliaK/p/llvm/build_ninja/start_script'. (lldb) target create ~/p/hello Current executable set to '~/p/hello' (x86_64). (lldb) b main Breakpoint 1: where = hello`main + 29 at hello.cpp:12, address = 0x0000000100000e2d (lldb) r Process 1582 launched: '/Users/IliaK/p/hello' (x86_64) (lldb) quit ^done (gdb) =thread-created,id="1",group-id="i1" =thread-selected,id="1" (gdb) =shlibs-added,shlib-info=[num="1",name="hello",dyld-addr="-",reason="dyld",path="/Users/IliaK/p/hello",loaded_addr="-",dsym-objpath="/Users/IliaK/p/hello.dSYM/Contents/Resources/DWARF/hello"] ... =shlibs-added,shlib-info=[num="132",name="libDiagnosticMessagesClient.dylib",dyld-addr="0x7fff91705000",reason="dyld",path="/usr/lib/libDiagnosticMessagesClient.dylib",loaded_addr="0x7fff91705000"] (gdb) *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x100000e2d",func="main",args=[{name="argc",value="1"},{name="argv",value="0x00007fff5fbffc88"}],file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="12"},thread-id="1",stopped-threads="all" (gdb)<press Enter> MI: Program exited OK ``` Reviewers: abidh, clayborg Reviewed By: abidh Subscribers: jingham, lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8382 llvm-svn: 232891 | |||||
* | Remove IDE_MI_APP_EXIT_OK msg on exit (MI) | Ilia K | 2015-03-19 | 3 | -34/+0 | |
| | | | | | | | | | | | | | | Summary: Remove IDE_MI_APP_EXIT_OK msg on exit (MI) Reviewers: abidh Reviewed By: abidh Subscribers: lldb-commits, abidh Differential Revision: http://reviews.llvm.org/D8446 llvm-svn: 232738 | |||||
* | expose 64 bit addresses through MI | Ilia K | 2015-03-19 | 7 | -27/+31 | |
| | | | | | | | | | | | | | | | | | Summary: This changes all reporting of addresses from lldb-mi to be 64 bit capable. There could have been cases where a 64 bit address was getting truncated to 32 bit format. Patch from chuckr@microsoft.com Reviewers: abidh, ChuckR Reviewed By: abidh Subscribers: paulmaybee, ki.stfu, zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D8238 llvm-svn: 232736 | |||||
* | Fix memory allocating inside signal handler (MI) | Ilia K | 2015-03-19 | 3 | -6/+0 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes a memory allocating inside signal handler. This bug was found by @vharron: > Hi all, > > I noticed these thread sanitizer warnings while running lldb-mi tests on > Linux. > > WARNING: ThreadSanitizer: signal-unsafe call inside of a signal (pid=39721) > > #0 operator new(unsigned long) <null>:0 (lldb-mi-3.7.0+0x000000092b9d) > > #1 std::string::_Rep::_S_create(unsigned long, unsigned long, > std::allocator<char> const&) <null>:0 (libstdc++.so.6+0x0000000ba3b8) > > #2 CMICmnResources::GetStringFromResource(unsigned int, CMIUtilString&) > const > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp:434 > (lldb-mi-3.7.0+0x00000014ddd8) > > #3 CMICmnResources::GetString(unsigned int) const > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MICmnResources.cpp:371 > (lldb-mi-3.7.0+0x00000014db81) > > #4 sigwinch_handler(int) > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp:99 > (lldb-mi-3.7.0+0x0000001589ff) > > #5 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, int, > my_siginfo_t*, void*) tsan_interceptors.o:0 (lldb-mi-3.7.0+0x00000009f25f) > > #6 void std::this_thread::sleep_for<long, std::ratio<1l, 1000l> > >(std::chrono::duration<long, std::ratio<1l, 1000l> > const&) > /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/thread:279 > (lldb-mi-3.7.0+0x00000013243e) > > #7 CMIDriver::ReadStdinLineQueue() > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:710 > (lldb-mi-3.7.0+0x000000155e62) > > #8 CMIDriver::DoMainLoop() > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:631 > (lldb-mi-3.7.0+0x000000155d37) > > #9 non-virtual thunk to CMIDriver::DoMainLoop() > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriver.cpp:648 > (lldb-mi-3.7.0+0x000000155fbd) > > #10 CMIDriverMgr::DriverMainLoop() > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMgr.cpp:340 > (lldb-mi-3.7.0+0x000000159ee6) > > #11 main > /usr/local/google/home/vharron/ll/tot/llvm/tools/lldb/tools/lldb-mi/MIDriverMain.cpp:364 > (lldb-mi-3.7.0+0x000000158f60) Reviewers: vharron, abidh Reviewed By: abidh Subscribers: lldb-commits, abidh, vharron Differential Revision: http://reviews.llvm.org/D8256 llvm-svn: 232735 | |||||
* | Fix -break-insert for system functions (MI) | Ilia K | 2015-03-19 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: # Fix -break-insert for system functions # Fix MiExecTestCase to use -break-insert instead of CLI "b" # Improve MiBreakTestCase: now it uses printf() instead of in-house function All tests pass on OS X. Test Plan: ``` $ bin/lldb-mi --interpreter (gdb) -file-exec-and-symbols ~/p/hello ^done (gdb) =shlibs-added,shlib-info=[num="1",name="hello",dyld-addr="-",reason="dyld",path="/Users/IliaK/p/hello",loaded_addr="-",dsym-objpath="/Users/IliaK/p/hello.dSYM/Contents/Resources/DWARF/hello"] -break-insert -f printf ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffff",func="??",file="??",fullname="??/??",line="0",pending=["printf"],times="0",original-location="printf"} (gdb) =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffff",func="??",file="??",fullname="??/??",line="0",pending=["printf"],times="0",original-location="printf"} -exec-run ^running ... *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x7fff8a476910",func="printf",args=[],file="??",fullname="??",line="-1"},thread-id="1",stopped-threads="all" (gdb) ``` Reviewers: abidh, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8412 llvm-svn: 232734 | |||||
* | Fix double (gdb) prompt when command doesn't exist | Ilia K | 2015-03-19 | 1 | -8/+6 | |
| | | | | llvm-svn: 232715 | |||||
* | Fix error handling in CMIDriver::DoMainLoop after r215223 (MI) | Ilia K | 2015-03-19 | 1 | -3/+4 | |
| | | | | llvm-svn: 232713 | |||||
* | Fix comment in tools/lldb-mi/MIDriver.cpp | Ilia K | 2015-03-18 | 1 | -1/+1 | |
| | | | | llvm-svn: 232633 | |||||
* | Make lldb-mi handle only MI commands | Hafiz Abid Qadeer | 2015-03-18 | 6 | -277/+5 | |
| | | | | | | | | | | | | | | | | | | | | | Summary: Previously lldb-mi can also act as a driver like normal lldb. It needed a lot of redundant code in the lldb-mi for that. I think that if a user wants command line lldb driver then he/she should use the lldb for it. This change will cleanup the code a lot. When this change goes in, it will allow us to remove some more redundant code too. All tests pass on Linux. Did some sanity testing on command line and with eclipse. Reviewers: ki.stfu Reviewed By: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8381 llvm-svn: 232621 | |||||
* | Cleanup the MIReadMe.txt after the recent changes in lldb-mi. | Hafiz Abid Qadeer | 2015-03-17 | 1 | -224/+15 | |
| | | | | | | This commit removed the redundant and out of date stuff from the file. llvm-svn: 232477 | |||||
* | Remove redundant comments from lldb-mi source files. | Hafiz Abid Qadeer | 2015-03-16 | 153 | -1768/+2 | |
| | | | | | | | Most of lldb-mi files have comments about environement, copyright etc which were neither needed nor uptodate. This commit removes those comments. llvm-svn: 232396 | |||||
* | Check that RestartedFromEvent flag before processing the state changed event. | Hafiz Abid Qadeer | 2015-03-16 | 1 | -0/+2 | |
| | | | | | | | | | | Not checking for this flags caused lldb-mi to issue stop notification when target has started running again. It also tried to get stack when target was running and this caused randon failure. Approved in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-March/006953.html llvm-svn: 232370 | |||||
* | Add -p and -r options to lldb-mi command -file-exec-file-and-symbols to ↵ | Hafiz Abid Qadeer | 2015-03-12 | 3 | -2/+43 | |
| | | | | | | | | | | support iOS debugging on macOS. The patch adds 2 options which are not present in the GDB MI. Those have been described in MIExtensions.txt. Patch from Chuck Ries. llvm-svn: 232077 | |||||
* | Add low-frame/high-frame options to -stack-list-arguments (MI) | Ilia K | 2015-03-12 | 2 | -1/+31 | |
| | | | | | | | | | | | | | | | | | Summary: Add low-frame/high-frame options to -stack-list-arguments All tests pass on OS X. Reviewers: clayborg, abidh Reviewed By: abidh Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D8282 llvm-svn: 232048 | |||||
* | Removed an unused global variable. | Hafiz Abid Qadeer | 2015-03-12 | 1 | -5/+0 | |
| | | | | | | | | | | This variable "g_debugger_name" is not used anywhere. It also causes a warning. I was first going to change its type to fix the warning then noticed that it is not being used. So removing it. Committed as Obvious. llvm-svn: 232043 |