summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility
Commit message (Collapse)AuthorAgeFilesLines
* Remote Non-Stop SupportEwan Crawford2015-05-132-0/+5
| | | | | | | | | | | | | | | | | | | | Summary: This patch is the beginnings of support for Non-stop mode in the remote protocol. Letting a user examine stopped threads, while other threads execute freely. Non-stop mode is enabled using the setting target.non-stop-mode, which sends a QNonStop packet when establishing the remote connection. Changes are also made to treat the '?' stop reply packet differently in non-stop mode, according to spec https://sourceware.org/gdb/current/onlinedocs/gdb/Remote-Non_002dStop.html#Remote-Non_002dStop. A setting for querying the remote for default thread on setup is also included. Handling of '%' async notification packets will be added next. Reviewers: clayborg Subscribers: lldb-commits, ADodds, ted, deepak2427 Differential Revision: http://reviews.llvm.org/D9656 llvm-svn: 237239
* Get lldb-server building on android-9Vince Harron2015-05-121-0/+1
| | | | | | Build lldb-server with an android-9 sysroot. llvm-svn: 237078
* Use hard links to link sysroot files within ModuleCache.Oleksiy Vyalov2015-05-082-42/+31
| | | | | | http://reviews.llvm.org/D9587 llvm-svn: 236917
* Have lldb_assert accept bool expressionsPavel Labath2015-05-081-1/+1
| | | | | | | | | | | | | | | Summary: This changes lldb_assert to accept bool expressions as the parameter, this is because some objects (such as std::shared_ptr) are convertible to bool, but are not convertible to int, which leads to surprising errors. Reviewers: granata.enrico, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9565 llvm-svn: 236819
* Use file locks to synchronize access to ModuleCache.Oleksiy Vyalov2015-05-072-38/+45
| | | | | | http://reviews.llvm.org/D9056 llvm-svn: 236736
* Add Modulecache::GetAndPut method which wraps sequence of Get and Put (if ↵Oleksiy Vyalov2015-04-152-0/+50
| | | | | | | | module wasn't found in cache) calls. http://reviews.llvm.org/D9013 llvm-svn: 235011
* Fix warnings generated by clang-cl.Zachary Turner2015-04-021-3/+3
| | | | | | | | | | | | | | There were a couple of real bugs here regarding error checking and signed/unsigned comparisons, but mostly these were just noise. There was one class of bugs fixed here which is particularly annoying, dealing with MSVC's non-standard behavior regarding the underlying type of enums. See the comment in lldb-enumerations.h for details. In short, from now on please use FLAGS_ENUM and FLAGS_ANONYMOUS_ENUM when defining enums which contain values larger than can fit into a signed integer. llvm-svn: 233943
* Fix ModuleCache usage in Platform - ask remote platform for module's ↵Oleksiy Vyalov2015-03-242-2/+6
| | | | | | | | ModuleSpec beforehand so we can look for a module by UUID locally without need to download it. http://reviews.llvm.org/D8557 llvm-svn: 233136
* Move some functions from source/lldb.cpp to Utility.Zachary Turner2015-03-183-0/+162
| | | | | | | | | | Specifically, there were some functions for converting enums to strings and a function for matching a string using a specific matching algorithm. This moves those functions to more appropriate headers in lldb/Utility and updates references to include the new headers. llvm-svn: 232673
* Silence warnings here by explicit cast.Enrico Granata2015-03-131-2/+2
| | | | llvm-svn: 232126
* Make ModuleCache::Get to return instantiated ModuleSP instance so already ↵Oleksiy Vyalov2015-03-122-25/+36
| | | | | | | | created in-memory instance can be returned instead of creating a new one. http://reviews.llvm.org/D8270 llvm-svn: 232075
* Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer ↵Oleksiy Vyalov2015-03-103-0/+205
| | | | | | | | - in order to allow modules caching from remote targets. http://reviews.llvm.org/D8037 llvm-svn: 231734
* Remove Host::Backtrace in favor of llvm::sys::PrintStackTrace()Zachary Turner2015-03-061-12/+10
| | | | | | | | | | | | This removes Host::Backtrace from the codebase, and changes all call sites to use llvm::sys::PrintStackTrace(). This makes the functionality available for all platforms, and even for platforms which currently had a supported implementation of Host::Backtrace, this patch should enable richer information in stack traces, such as file and line number information, as well as giving it the ability to unwind through inlined functions. llvm-svn: 231511
* Appease the Windows botEnrico Granata2015-03-041-0/+1
| | | | llvm-svn: 231315
* Introduce lldbassert(x)Enrico Granata2015-03-041-0/+38
| | | | | | | | | | | We would like it if LLDB never crashed, especially if we never caused LLDB to crash On the other hand, having assertions can sometimes be useful lldbassert(x) is the best of both worlds: - in debug builds, it turns into a regular assert, which is fine because we don't mind debug LLDB to crash on development machines - in non-debug builds, it emits a message formatted just like assert(x) would, but then instead of crashing, it dumps a backtrace, suggests filing a bug, and keeps running llvm-svn: 231310
* 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
OpenPOWER on IntegriCloud