Commit Graph

12 Commits

Author SHA1 Message Date
Ilia K 3b0494c304 MI fix allowing multiple logging instances of lldb-mi to run simultaneously.
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
2015-04-23 12:48:42 +00:00
Hafiz Abid Qadeer 112b2622df Remove redundant code from lldb-mi.
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
2015-03-24 14:07:25 +00:00
Ilia K bb7002d751 Remove IDE_MI_APP_EXIT_OK msg on exit (MI)
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
2015-03-19 17:40:15 +00:00
Hafiz Abid Qadeer 4a7baeab14 Make lldb-mi handle only MI commands
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
2015-03-18 10:07:46 +00:00
Hafiz Abid Qadeer a40780e36c Remove redundant comments from lldb-mi source files.
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
2015-03-16 18:18:18 +00:00
Hafiz Abid Qadeer 6d87a9c09e Reduce number of threads in lldb-mi.
LLDB-mi have 3 threads.

1. Wait for input.
2. Process commands.
3. Process events.
This revision merges 1 & 2. Same thread waits on input and then process the
command. This way, no synchronization is needed between first and 2nd. Also it is
easy to check when to exit.

A lot of code will redundant and will be cleaned up gradually.

All lldb-mi tests pass with gcc and clang as test compiler. Also did minimal testing
on command line and works ok. The "quit" and "-gdb-exit" command close the application
without needing any further return.

Reviewed in http://reviews.llvm.org/D7746.

llvm-svn: 230003
2015-02-20 10:20:05 +00:00
Hafiz Abid Qadeer 6a4ea636f3 Fix log file generation in lldb-mi.
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
2015-02-02 17:08:25 +00:00
Greg Clayton ee3626ec16 Added an Xcode target so we build the "lldb-mi" executable as part of the "desktop" and "desktop no xpc" targets.
Include paths were switched to be user include paths, if this breaks the linux build we will need to fix the Makefiles/cmake stuff.

<rdar://problem/19198581> 

llvm-svn: 226530
2015-01-20 00:04:26 +00:00
Zachary Turner 1d6af02e2d Reformat lldb-mi using clang-format.
Courtesy of dawn@burble.org.

llvm-svn: 222150
2014-11-17 18:06:21 +00:00
Deepak Panickal d249928b84 Add new MI commands, features and fixes to the lldb-mi driver.
- 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
2014-08-08 16:47:42 +00:00
Deepak Panickal 877569c2b8 Added support for new MI commands and bug fixes. More details in MIReadme.txt.
llvm-svn: 211607
2014-06-24 16:35:50 +00:00
Deepak Panickal 6f9c468102 Initial commit of LLDB Machine Interface Frontend.
- 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
2014-05-16 10:51:01 +00:00