summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmnResources.h
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] Remove lldb-miJonas Devlieghere2019-07-181-339/+0
| | | | | | | | | | | | | | As discussed on the mailing list [1], this patch removes the lldb-mi tool and its tests from the LLDB repository. We moved lldb-mi into a separate repository on GitHub [2] for downstream users or maintainers to build and package. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-July/015103.html [2] https://github.com/lldb-tools/lldb-mi Differential revision: https://reviews.llvm.org/D64255 llvm-svn: 366465
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [lldb-mi] Implement -gdb-set breakpoint pending on/offMarc-Andre Laperle2018-10-301-0/+3
| | | | | | | | | | | | | | | | | | Summary: This allows creating pending breakpoint automatically when a location is not found. This is used by some front-ends instead of doing "-break-insert -f" every time. See also https://sourceware.org/gdb/onlinedocs/gdb/Set-Breaks.html Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com> Subscribers: MaskRay, llvm-commits, lldb-commits, ki.stfu Tags: #lldb Differential Revision: https://reviews.llvm.org/D52953 llvm-svn: 345563
* Add a --synchronous option to lldb-mi to facilitate reliable testing.Adrian Prantl2018-05-231-0/+1
| | | | | | | | Patch by Alexander Polyakov! Differential Revision: https://reviews.llvm.org/D47110 llvm-svn: 333140
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-305/+303
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* [lldb-mi] Simplify CMICmnLLDBDebugSessionInfo::Shutdown.Bruce Mitchener2015-09-151-1/+0
| | | | | | | | | | | | | | | Summary: * SharedDataDestroy couldn't fail, so no need to return a status. * No need for status, so can remove error message. The error message wasn't displayed or used anywhere anyway. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12879 llvm-svn: 247673
* [lldb-mi] Remove MIUtilSystem*.Bruce Mitchener2015-09-111-1/+0
| | | | | | | | | | | | | | | | | | Summary: This platform-specific code wasn't fully implemented and wasn't actually needed. There was one call for the log file path and that has been addressed. This lets us also remove an error message from MICmnLogMediumFile as it is no longer used. Reviewers: ki.stfu, domipheus, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12764 llvm-svn: 247388
* [lldb-mi] Use empty arg lists instead of (void).Bruce Mitchener2015-08-041-5/+5
| | | | | | | | | | | | Summary: This brings the code more in line with the usual LLDB style. NFC. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11746 llvm-svn: 243967
* [lldb-mi] Remove unwanted comment blocks.Bruce Mitchener2015-07-231-3/+0
| | | | | | | | | | | | | | | Summary: This removes Authors:, Gotchas:, Changes: and Copyright:. It leaves a couple of Gotcha: blocks that were not empty. Reviewers: abidh, ki.stfu, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11452 llvm-svn: 242996
* [lldb-mi] Spell resource string name correctly.Bruce Mitchener2015-07-071-1/+1
| | | | | | | | | | | | | | Broardcaster -> Broadcaster Summary: [lldb-mi] Spell resource string name correctly. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10993 llvm-svn: 241591
* [lldb-mi] Use 'override' on overridden virtual methods.Bruce Mitchener2015-07-061-3/+3
| | | | | | | | | | | | Summary: [lldb-mi] Use 'override' on overridden virtual methods. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10959 llvm-svn: 241457
* Remove typedefs for MIchar, MIschar, MIuchar.Bruce Mitchener2015-07-031-3/+3
| | | | | | | | | | | | | | | | Summary: This is a start on bringing lldb-mi more in line with the typical LLDB coding style. This just removes the usage of the typedefs and doesn't yet clean up any logic or other issues. (This is to keep the review simple.) Reviewers: abidh, ki.stfu, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10917 llvm-svn: 241349
* Fix a variety of typos.Bruce Mitchener2015-06-181-1/+1
| | | | | | No functional change. llvm-svn: 239995
* Add help for lldb-mi --source/-s option (MI)Dawn Perchik2015-06-171-0/+1
| | | | | | | | Test Plan: lldb-mi --interpreter --help Reviewed By: clayborg, abidh Differential Revision: http://reviews.llvm.org/D10489 llvm-svn: 239975
* [LLDB-MI] Properly detect missing mandatory arguments to MI commandsBruce Mitchener2015-06-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously if an MI command had **X** mandatory and **Y** optional arguments you could provide **X** or more optional arguments without providing any of the mandatory arguments, and the argument validation code wouldn't complain. For example this would pass argument validation even though the mandatory **address** and **count** arguments are missing: -data-read-memory-bytes --thread 1 --frame 0 Part of the problem was that an empty string was considered a valid value for a mandatory argument, which didn't make much sense. Patch by Vadim Macagon. Thanks! Test Plan: ./dotest.py -A x86_64 -C clang --executable $BUILDDIR/bin/lldb tools/lldb-mi/ No unexpected failures on my Ubuntu 14.10 64bit Virtualbox VM. Reviewers: domipheus, ki.stfu, abidh Reviewed By: ki.stfu, abidh Subscribers: brucem, lldb-commits Differential Revision: http://reviews.llvm.org/D10299 llvm-svn: 239297
* Fix -break-insert without -f to cause an error if BP not resolved (MI)Ilia K2015-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | For example: was: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/Ilia hello.cpp",line="14",pending=["main"],times="0",original-location="main"} ``` now: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert main ^error,msg="Command 'break-insert'. Breakpoint location 'main' not found" ``` llvm-svn: 236832
* Fix -var-list-children command (MI)Ilia K2015-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch incldues the following: # Add from/to arguments in -var-list-children command (MI) ## Handle from and to args ## Don't print children=[] if numchild is 0 ## A bit refactoring ## Add MiVarTestCase.test_lldbmi_var_list_children test # Refactor -var-list-children (MI) ## Remove CMICmdCmdVarListChildren::VecMIValueResult_t ## Add CMICmdCmdVarListChildren::m_miValueList ## Remove CMICmdCmdVarListChildren::m_vecMiValueResult (use CMICmdCmdVarListChildren::m_miValueList instead) ## Print error message if value is invalid: ``` ^error,msg="variable invalid" ``` ## Refactor CMICmdCmdVarListChildren::Acknowledge and remove duplicated code ## Don't print children=[] if numchild is 0 ## Add error checking ## Use CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e for print-values ## Add few more empty-range test cases in MiVarTestCase.test_lldbmi_var_list_children #Improve MiVarTestCase.test_lldbmi_var_list_children test (MI) llvm-svn: 236820
* Implement -target-attach and -target-detachIlia K2015-05-071-1/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This changes add -target-attach and -target-detach. -target-attach allows lldb-mi to attach to an existing process by it's process id, matching gdb mi's syntax of '-target-attach <pid'. Additionally, support has been added for attaching to a process by name using '-target-attach -n <name>'. Combining this with --waitfor will allow lldb mi to attach to a process by name when the process starts. -target-detach simply detaches from the current process Patch from chuckr@microsoft.com Test Plan: I have added three tests, one each for -target-attach <pid>, -target-attach -n <name>, and -target-attach -n <name> --waitfor Reviewers: paulmaybee, abidh, ChuckR Subscribers: greggm, lldb-commits Differential Revision: http://reviews.llvm.org/D9484 llvm-svn: 236705
* Fix LLDB-MI -data-read-memory-bytes command to comply with GDB/MI specBruce Mitchener2015-05-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: - The address argument can now be an expression (e.g. &array), it's no longer restricted to being just a number literal. - The -o (offset) option is now properly handled, not just silently ignored. - The --thread option is now properly handled. - A new --frame option has been added for consistency with GDB. - Added a new test to verify old and new functionality. Patch by Vadim Macagon. Thanks! Test Plan: ./dotest.py -A x86_64 -C clang --executable $BUILDDIR/bin/lldb tools/lldb-mi/data Reviewers: domipheus, abidh, ki.stfu Reviewed By: abidh, ki.stfu Subscribers: brucem, lldb-commits Differential Revision: http://reviews.llvm.org/D9470 llvm-svn: 236694
* Add -data-info-line command (MI)Ilia K2015-04-301-0/+1
| | | | | | | | | | | | | | | | Summary: Add -data-info-line command + test 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/D9276 llvm-svn: 236208
* Add -gdb-set/-gdb-show print char-array-as-string option (MI)Ilia K2015-04-251-1/+5
| | | | llvm-svn: 235804
* MI fix allowing multiple logging instances of lldb-mi to run simultaneously.Ilia K2015-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | 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
* Fix CMICmnStreamStdout::WritePriv which causes a stack overflow (MI)Ilia K2015-04-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add target-async option in -gdb-set command (MI)Ilia K2015-03-231-0/+1
| | | | llvm-svn: 233018
* Remove IDE_MI_APP_EXIT_OK msg on exit (MI)Ilia K2015-03-191-4/+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
* Fix memory allocating inside signal handler (MI)Ilia K2015-03-191-2/+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
* Remove redundant comments from lldb-mi source files.Hafiz Abid Qadeer2015-03-161-12/+0
| | | | | | | 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
* Add -exec-abort command (MI); Don't exit on eStateExitedIlia K2015-02-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add -exec-abort command + test. Also, I had fixed an error, when lldb-mi exits on eStateExited. With current patch we can re-run target: ``` -file-exec-and-symbols hello ^done -exec-run ^running *stopped,reason="breakpoint-hit"... -exec-abort ^done *stopped,reason="exited-normally"... <- program exits -exec-run <- run again ^running *stopped,reason="breakpoint-hit"... ``` All tests pass on OS X. Reviewers: zturner, emaste, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: lldb-commits, emaste, zturner, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7794 llvm-svn: 230321
* Fix -stack-list-locals and -stack-list-arguments (MI)Ilia K2015-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | Summary: These changes include: * Add eVariableInfoFormat argument for MIResponseFormVariableInfo{,2,3} and GetVariableInfo{,2} functions * Fix -stack-list-locals and -stack-list-arguments: they ingored print-values * Enable MiStackTestCase tests for -stack-list-xxx commands All test pass on OS X. Reviewers: abidh, clayborg Reviewed By: abidh Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7462 llvm-svn: 228412
* Fix log file generation in lldb-mi.Hafiz Abid Qadeer2015-02-021-1/+1
| | | | | | | | | | | | | | | | | | When it runs, lldb-mi creates a log file. There is an option --noLog to disable the creation but it does not work and you end up with log file. This happens as log is enabled in a few places in the code although it has been disabled by this option. This commit tried to fix the problem in the following way. Log file generation is disabled by default. You can enable it by giving --log option. It is the only way to enable it. Rest of the call have been removed. So the code basically remove the calls that enable the log unconditionally and changes the option --noLog to --log. llvm-svn: 227810
* Reformat lldb-mi using clang-format.Zachary Turner2014-11-171-313/+310
| | | | | | Courtesy of dawn@burble.org. llvm-svn: 222150
* Add new MI commands, features and fixes to the lldb-mi driver.Deepak Panickal2014-08-081-32/+45
| | | | | | | | | | - Can now load an executable directly as an argument. - Fixes towards supporting local debugging. - Fixes for stack-list-arguments, data-evaluate-expression, environment-cd, stack-list-locals, interpreter-exec. - Fix breakpoint event handling. - Support dynamic loading of libraries using the search paths provided by Eclipse. llvm-svn: 215223
* Added support for new MI commands and bug fixes. More details in MIReadme.txt.Deepak Panickal2014-06-241-9/+44
| | | | llvm-svn: 211607
* Initial commit of LLDB Machine Interface Frontend.Deepak Panickal2014-05-161-0/+303
- Tested with Eclipse, likely to work with other GDB/MI compatible GUIs. - Some but not all MI commands have been implemented. See MIReadme.txt for more info. - Written from scratch, no GPL code, based on LLDB Public API. - Built for Linux, Windows and OSX. Tested on Linux and Windows. - GDB/MI Command Reference, https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html llvm-svn: 208972
OpenPOWER on IntegriCloud