summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility
Commit message (Collapse)AuthorAgeFilesLines
...
* Add qModuleInfo request in order to get module information (uuid, triple,..) ↵Oleksiy Vyalov2015-02-252-0/+2
| | | | | | | | by module path from remote platform. http://reviews.llvm.org/D7709 llvm-svn: 230556
* Revert "Fix warnings found with clang-cl."Zachary Turner2015-02-251-3/+3
| | | | | | | SWIG doesn't like enum : unsigned. Revert this until I can fix this in a way that swig likes. llvm-svn: 230531
* Fix warnings found with clang-cl.Zachary Turner2015-02-251-3/+3
| | | | | | | | | | | Earlier this week I was able to get clang-cl on Windows to be able to self host. This opened the door to being able to get a whole new slew of warnings for the Windows build. This patch fixes all of the warnings, many of which were real bugs. llvm-svn: 230522
* Fix Mingw build.Hafiz Abid Qadeer2015-02-111-0/+1
| | | | | | | | | | | | | Following changes are done. Add missing headers. Replace _snprintf with snprintf. It is already changed to _snprintf for MSVC. Add a file in the build for autoconf. Call DynamicLoaderWindows::Terminate and DynamicLoaderWindows::Initialize only for MSVC build. Reviewed in http://reviews.llvm.org/D7536. llvm-svn: 228822
* Add JSON.cpp to CMakeLists.txtChaoren Lin2015-02-101-0/+1
| | | | llvm-svn: 228639
* Add a JSON producer to LLDB - this is a set of classes that encapsulate JSON ↵Enrico Granata2015-02-101-0/+217
| | | | | | | | objects and allow you to write them to a Stream for subsequent processing Using this JSON producer, write a little tool that expands its own command-line arguments and dumps them to stdout as a JSON array llvm-svn: 228636
* Dont' use O_CLOEXEC on Windows, since it doesn't exist.Zachary Turner2015-02-091-1/+5
| | | | llvm-svn: 228590
* Fix descriptor leak in multi-target debuggingPavel Labath2015-02-091-2/+3
| | | | | | | | | | | | | | | Summary: When debugging two targets concurrently, the pseude terminal master fd from the first one would leak into the second. This fixes the problem by setting O_CLOEXEC on the master fd. Test included. Reviewers: clayborg, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7466 llvm-svn: 228570
* Add support for SBProcess::PutSTDIN to remote processesVince Harron2015-02-062-0/+4
| | | | | | | | | | | | | | Processes running on a remote target can already send $O messages to send stdout but there is no way to send stdin to a remote inferior. This allows processes using the API to pump stdin into a remote inferior process. It fixes a hang in TestProcessIO.py when running against a remote target. llvm-svn: 228419
* UriParser - fixed potential buffer overrunVince Harron2015-01-152-7/+22
| | | | | | | Switched from ::strtoul to StringConvert::ToUInt32 Changed port output parameter to be -1 if port is unspecified llvm-svn: 226204
* Add an additional check to UnwindAssembly_x86::AugmentUnwindPlanFromCallSite Jason Molenda2015-01-131-0/+6
| | | | | | | | | | | | | | | | which will verify if the eh_frame instructions include details about the prologue or not. Both clang and gcc include prologue instructions but there's no requirement for them to do so -- and I'm sure we'll have to interoperate with a compiler that doesn't generate prologue info at some point. I don't have any compilers that omit the prologue instructions so the testing was of the "makre sure augmented unwind info is still created". With an eh_frame without prologue, this code should reject the augmentation scheme altogether and we should fall back to using assembly instruction profiling. llvm-svn: 225771
* Add RegisterNumber.cpp.Jason Molenda2015-01-101-0/+1
| | | | llvm-svn: 225585
* Hoist the RegisterNumber class out of RegisterContextLLDB and makeJason Molenda2015-01-101-0/+151
| | | | | | | | | | | | | | | it more generally available. Add checks to UnwindAssembly_x86::AugmentUnwindPlanFromCallSite() so that it won't try to augment an UnwindPlan that already describes the function epilogue. Add a test case for backtracing out of _sigtramp on Darwin systems. This could probably be adapted to test the same thing on linux/bsd but the function names of sigtramp and kill are probably platform specific and I'm not sure what they should be. llvm-svn: 225578
* Adds UriParser::Parse and unit testsVince Harron2015-01-063-0/+90
| | | | | | | | This can be used to parse URIs passed to 'platform connect' Differential Revision: http://reviews.llvm.org/D6858 llvm-svn: 225317
* Added StringExtractor::DecodeHexU8 && GetHexBytesAvailVince Harron2014-12-012-49/+63
| | | | | | | | | DecodeHexU8 returns a decoded hex character pair, returns -1 if a valid hex pair is not available. GetHexBytesAvail decodes all available hex pairs. llvm-svn: 223081
* Removed a couple of static helpers in the data formatters, replaced with new ↵Enrico Granata2014-11-141-0/+42
| | | | | | general logic in StringLexer llvm-svn: 222058
* Cleaned up the StringLexer a little bit. It turnsSean Callanan2014-11-101-25/+11
| | | | | | | | | | | out we only want to roll back text that was in the buffer to begin with, so it's not necessary to provide a pushback stack. I'm going to use this slightly cleaner API to perform lookahead for the Objective-C runtime type parser. llvm-svn: 221640
* LLGS Android target support - for Andy Chien : http://reviews.llvm.org/D6166Shawn Best2014-11-081-0/+2
| | | | llvm-svn: 221570
* Stub out 'close' call on m_master_fd for Windows.Hafiz Abid Qadeer2014-10-271-0/+4
| | | | | | | | | | | | | PseudoTerminal.cpp uses a dummy implementation of posix_openpt for Windows. This implementation just returns 0. So m_master_fd is 0. But destructor calls 'close' on m_master_fd. This 'close' calls seems un-necessary as m_master_fd was never opened in first place and calling 'close' on 0 can have other un-intended consequences. I am committing it as obvious as it is only a one-liner. Long term, we may want to refactor this class. llvm-svn: 220705
* Fix the ability of "lldb-platform" to upload files.Greg Clayton2014-09-181-6/+7
| | | | | | | | The issue was GDBRemoteCommunication::CheckForPacket() already fixes up any prefixed bytes (0x7d followed by value that is XOR'ed with 0x20). If we do this again, we cause binary packets to lose bytes. This allows lldb-platform to be able to upload binaries and debug them remotely. llvm-svn: 218002
* lldb - Register Context Linux ARM64Todd Fiala2014-08-291-1/+1
| | | | | | | | | | | | | Yet another step toward ARM64 support. With this commit, lldb-gdbserver started on ARM64 target can be accessed by lldb running on desktop PC and it can process simple commands (like 'continue'). Still ARM64 support lacks NativeRegisterContextLinux_arm64.* code which waits to be implemented. Based on similar files for Linux x86_64 and Darwin ARM64. Due to common code extraction from Darwin related files, lldb should be tested for any unexpected regression on Darwin ARM64 machines too. See the following for more details: http://reviews.llvm.org/D4580 http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140825/012670.html Change by Paul Osmialowski. llvm-svn: 216737
* I forgot to include the header file for std::find, and that's breaking the ↵Enrico Granata2014-08-231-0/+2
| | | | | | Linux build. Push a fix out. Patch suggested by Paul Osmialowski and Randy Smith llvm-svn: 216323
* Fix a couple of potential issues in the lexer where we were ignoring the ↵Enrico Granata2014-08-231-1/+7
| | | | | | putback data llvm-svn: 216304
* StringLexer: Fix CMake buildDavid Majnemer2014-08-071-0/+1
| | | | llvm-svn: 215144
* Add a StringLexer utility class that can be used when you have string data ↵Enrico Granata2014-08-071-0/+93
| | | | | | that needs to be parsed - I don't think such a general purpose facility is part of LLVM, and I am going to need this, so just add it to lldb_utility llvm-svn: 215133
* Fix typos.Bruce Mitchener2014-07-011-1/+1
| | | | llvm-svn: 212132
* This creates a valid Python API for Windows, pending some issues. The ↵Deepak Panickal2014-07-011-0/+1
| | | | | | | | | | | | | changes included are - - Ported the SWIG wrapper shell scripts to Python so that they would work on Windows too along with other platforms - Updated CMake handling to fix SWIG errors and manage sym-linking on Windows to liblldb.dll - More build fixes for Windows The pending issues are that two Python modules, termios and pexpect are not available on Windows. These are currently required for the Python command interpreter to be used from within LLDB. llvm-svn: 212111
* Add lldb-gdbserver support for Linux x86_64.Todd Fiala2014-06-304-0/+23
| | | | | | | | | | | | | | | | | | | | | This change brings in lldb-gdbserver (llgs) specifically for Linux x86_64. (More architectures coming soon). Not every debugserver option is covered yet. Currently the lldb-gdbserver command line can start unattached, start attached to a pid (process-name attach not supported yet), or accept lldb attaching and launching a process or connecting by process id. The history of this large change can be found here: https://github.com/tfiala/lldb/tree/dev-tfiala-native-protocol-linux-x86_64 Until mid/late April, I was not sharing the work and continued to rebase it off of head (developed via id tfiala@google.com). I switched over to user todd.fiala@gmail.com in the middle, and once I went to github, I did merges rather than rebasing so I could share with others. llvm-svn: 212069
* lldb: remove adhoc implementation of array_sizeofSaleem Abdulrasool2014-06-271-1/+3
| | | | | | | | Replace adhoc inline implementation of llvm::array_lengthof in favour of the implementation in LLVM. This is simply a cleanup change, no functional change intended. llvm-svn: 211868
* Added an option to turn OFF the "detach on error" behavior that was addedJim Ingham2014-06-252-0/+2
| | | | | | | | to debugserver when launching processes. <rdar://problem/16216199> llvm-svn: 211658
* Switch NULL to C++11 nullptr in source/Symbol and source/UtilityEd Maste2014-04-206-12/+12
| | | | | | Patch by Robert Matusewicz llvm-svn: 206713
* Include string.h for memset() prototype. Thanks Dmitri.Jason Molenda2014-03-291-0/+2
| | | | llvm-svn: 205115
* lldb arm64 import.Jason Molenda2014-03-294-0/+341
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* cleanup unreferenced functionsSaleem Abdulrasool2014-03-201-10/+0
| | | | | | | | | | | | | This is a mechanical cleanup of unused functions. In the case where the functions are referenced (in comment form), I've simply commented out the functions. A second pass to clean that up is warranted. The functions which are otherwise unused have been removed. Some of these were introduced in the initial commit and not in use prior to that point! NFC llvm-svn: 204310
* Extends StringExtractorGDBRemote to support debugger packets.Jean-Daniel Dupas2013-12-052-10/+196
| | | | | | | | CC: lldb-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2337 llvm-svn: 196525
* Expose SBPlatform through the public API.Greg Clayton2013-11-203-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example code: remote_platform = lldb.SBPlatform("remote-macosx"); remote_platform.SetWorkingDirectory("/private/tmp") debugger.SetSelectedPlatform(remote_platform) connect_options = lldb.SBPlatformConnectOptions("connect://localhost:1111"); err = remote_platform.ConnectRemote(connect_options) if err.Success(): print >> result, 'Connected to remote platform:' print >> result, 'hostname: %s' % (remote_platform.GetHostname()) src = lldb.SBFileSpec("/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework", False) dst = lldb.SBFileSpec() # copy src to platform working directory since "dst" is empty err = remote_platform.Install(src, dst); if err.Success(): print >> result, '%s installed successfully' % (src) else: print >> result, 'error: failed to install "%s": %s' % (src, err) Implemented many calls needed in lldb-platform to be able to install a directory that contains symlinks, file and directories. The remote lldb-platform can now launch GDB servers on the remote system so that remote debugging can be spawned through the remote platform when connected to a remote platform. The API in SBPlatform is subject to change and will be getting many new functions. llvm-svn: 195273
* <rdar://problem/15182550>Enrico Granata2013-10-181-2/+10
| | | | | | | | | | | | | | | | | | | Removing Host/Atomic.h This header file was not being copied as part of our public API headers and this in turn was causing any plugin to link against LLDB.framework, since SharingPtr.h depends on it Out of several possible options to fix this issue, the cleanest one is to revert LLDB to use std::atomic<>, as we are a C++11 project and should take advantage of it The original rationale for going from std::atomic to Host/Atomic.h was that MSVC++ fails to link in CLR mode when std::atomic is used This is a very Visual Studio/.net specific issue, which hopefully will be fixed Until them, to allow Windows development to proceed, we are going with a targeted solution where we #ifdef include the Windows specific calls, and let everyone else use the proper atomic support, as should be If there is an unavoidable need for a LLDB-specific atomic header, the right way to go at it would be to make an API/lldb-atomic.h header and #ifdef the Windows dependency there The FormatManager should not need to conditionalize use of std::atomic<>, as other parts of the LLDB internals are successfully using atomic (Address and IRExecutionUnit), so this Win-specific hack is limited to SharingPtr llvm-svn: 192993
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-251-12/+12
| | | | llvm-svn: 191367
* Use <atomic> instead of "llvm/Support/Atomic.h". Removed unused RefCounter ↵Virgile Bello2013-09-052-26/+0
| | | | | | class. llvm-svn: 190062
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-264-6/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon. Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion. Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform' Reviewers: Matt Kopec, Greg Clayton Review: http://llvm-reviews.chandlerc.com/D1493 llvm-svn: 189295
* MingW compilation (windows). Includes various refactoring to improve ↵Virgile Bello2013-08-231-0/+15
| | | | | | portability. llvm-svn: 189107
* Add new files to CMakeLists.txt to fix cmake build error.Michael Sartain2013-06-171-0/+1
| | | | llvm-svn: 184143
* <rdar://problem/14134716>Enrico Granata2013-06-171-0/+103
| | | | | | | | | | | | This is a rewrite of the command history facility of LLDB It takes the history management out of the CommandInterpreter into its own CommandHistory class It reimplements the command history command to allow more combinations of options to work correctly (e.g. com hist -c 1 -s 5) It adds a new --wipe (-w) option to command history to allow clearing the history on demand It extends the lldbtest runCmd: and expect: methods to allow adding commands to history if need be It adds a test case for the reimplemented facility llvm-svn: 184140
* Added a test case that verifies that LLDB can debug across a process ↵Greg Clayton2013-05-211-0/+6
| | | | | | | | exec'ing itself into a new program. This currently is only enabled for Darwin since we exec from 64 bit to 32 bit and vice versa for 'x86_64' targets. This can easily be adapted for linux and other platforms, but I didn't want to break any buildbots by assuming it will work. llvm-svn: 182428
* More CMake fixes for OS X.Filipe Cabecinhas2013-04-251-1/+0
| | | | llvm-svn: 180243
* Make KQueue import the header in the correct path.Filipe Cabecinhas2013-04-181-1/+1
| | | | llvm-svn: 179795
* Fix build on LinuxDaniel Malea2013-04-171-0/+18
| | | | | | | - add a workaround header to define uuid_t on platforms that need it - unbreak remote debugging of mac os x apps llvm-svn: 179710
* Various fixes for armv7 floating point/vector register support.Jason Molenda2013-03-132-14/+58
| | | | | | | | | | | | | Drop the old f registers from debugserver's register list. Add the NEON 128-bit q registers to debugserver, support reading and writing. Add the new contains / invalidates mappings for the s, d, and q registers so lldb will know what registers overlay what other registers. Change the default format of s and d registers to be floating point instead of hex. Remove some UTF-8 hyphen chars in comments in the ARM register number definition headers. <rdar://problem/13121797> llvm-svn: 176915
* Update CMake lists of sources to include files added in r175787 and r175323Daniel Malea2013-02-211-0/+3
| | | | llvm-svn: 175797
* Adding CMake build system to LLDB. Some known issues remain:Daniel Malea2013-02-211-0/+10
| | | | | | | | | | | | | | - generate-vers.pl has to be called by cmake to generate the version number - parallel builds not yet supported; dependency on clang must be explicitly specified Tested on Linux. - Building on Mac will require code-signing logic to be implemented. - Building on Windows will require OS-detection logic and some selective directory inclusion Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir who ported them to Linux! llvm-svn: 175795
OpenPOWER on IntegriCloud