summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* Rewrote the initial DW_OP_piece support to be able to support opcodes like:Greg Clayton2014-07-311-1/+63
| | | | | | | | | | | | | | | | | | DW_OP_fbreg(N) DW_OP_piece(4) DW_OP_fbreg(M) DW_OP_piece(8) DW_OP_fbreg(N) DW_OP_piece(4) DW_OP_piece(8) The first grabs 4 bytes from FP+N followed by 8 bytes from FP+M, the second grabs 4 bytes from FP+N followed by zero filling 8 bytes which are unavailable. Of course regiters are stuff supported: DW_OP_reg3 DW_OP_piece(4) DW_OP_reg8 DW_OP_piece(8) The fix does the following: 1 - don't push the full piece value onto the stack, keep it on the side 2 - fill zeros for DW_OP_piece(N) opcodes that have nothing on the stack (instead of previously consuming the full piece that was pushed onto the stack) 3 - simplify the logic <rdar://problem/16930524> llvm-svn: 214415
* When constructing an ArchSpec from a MachO cpu type and subtype, don't set ↵Greg Clayton2014-07-291-0/+9
| | | | | | | | the OS for x86_64 and x86 in case the binary ends up being for macosx or ios. <rdar://problem/17819272> llvm-svn: 214188
* Fix supported architectures on PlatformWindows.Zachary Turner2014-07-281-2/+6
| | | | | | | | | | i386, i486, i486sx, and i686 are all indistinguishable as far as PE/COFF files are concerned. This patch adds support for all of these architectures to PlatformWindows. Differential Revision: http://reviews.llvm.org/D4658 llvm-svn: 214092
* Fix the MSVC build. MSVC does not support constexpr.Zachary Turner2014-07-281-1/+1
| | | | llvm-svn: 214091
* Make sure we don't crash if someone (E.G.) comments out on entry from ↵Greg Clayton2014-07-231-6/+11
| | | | | | | | | | g_core_definitions[] without removing the ArchSpec::Core enumeration when submitting from source. We now catch the issue with a static_assert() at compile time and use llvm::array_lengthof(g_core_definitions) as well. <rdar://problem/17767541> llvm-svn: 213778
* Update lldb to track recent Triple arm64 enum removal and collapse into aarch64.Todd Fiala2014-07-232-3/+3
| | | | | | | | | | | See the following llvm change for details: r213743 | tnorthover | 2014-07-23 05:32:47 -0700 (Wed, 23 Jul 2014) | 9 lines AArch64: remove arm64 triple enumerator. This change fixes build breaks on Linux and MacOSX lldb. llvm-svn: 213755
* PluginManager: Don't cast from void-pointer to pointer-to-functionDavid Majnemer2014-07-221-2/+16
| | | | | | | | | | GCC warns on reinterpret_cast expressions involving a void-pointer source and a pointer-to-function destination. Take a detour through intptr_t to silence it. Differential Revision: http://reviews.llvm.org/D4626 llvm-svn: 213691
* Mangled: Fix an 'unused variable' warning on GNU/LinuxDavid Majnemer2014-07-221-2/+1
| | | | | | | | | | Platforms which don't use LLDB's built-in demangler don't use the 'mangled_length' variable. Instead, replace it's only use by an expression it is equivalent to. Differential Revision: http://reviews.llvm.org/D4625 llvm-svn: 213681
* Dramatically improves C++ demangling performance by introducing a new ↵Kate Stone2014-07-223-2/+2220
| | | | | | | | | | implementation that is much faster than the existing demangler. While not yet complete, the new demangler will fail gracefully when it encounters symbols it isn’t prepared to deal with. In these cases LLDB will fall back to using the full demangler to prevent a loss in functionality. On sizable code bases the fast path succeeds 95% of the time, providing a significant net win. The new implementation is located in source/Core/FastDemangle.cpp. It’s fairly straightforward C code with a few basic C++ extensions. It should compile with little or no change on a variety of platforms, but of course it is still only useful for symbols that comply with the Itanium ABI mangling spec (plus a few Clang extensions.) <rdar://problem/15397553> <rdar://problem/15794867> llvm-svn: 213671
* Improve LLDB's embedded C++ demangler by addressing the following two issues:Kate Stone2014-07-221-4/+5
| | | | | | | | 1) Preserve ref qualification state in a local variable while parsing a nested name. Previously, the state was recorded in the shared db reference and could therefore be overwritten when parsing multiple levels of nested names (e.g.: when a qualified name has qualified template args.) 2) Address an off-by-one error when testing whether or not a thunk is non-virtual. This resulted in the demangled identifying all thunks as non-virtual. llvm-svn: 213591
* LLDB now correctly handles virtual inheritance.Greg Clayton2014-07-192-6/+38
| | | | | | | | Test case added as well. <rdar://problem/16785904> llvm-svn: 213433
* Add kalimba as a platform.Todd Fiala2014-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This change comprises of additions and some minor changes in order that "kalimba" is listed as a supported platform and that debugging any kalimbas results in PlatformKalimba being associated with the target. The changes are as follows: * The PlatformKalimba implementation itself * A tweak to ArchSpec * .note parsing for Kalimba in ObjectFileELF.cpp * Plugin registration * Makefile additions Change by Matthew Gardiner Minor tweak for cmake and Xcode by Todd Fiala Tested: Ubuntu 14.04 x86_64, clang 3.5-built lldb, all tests pass. MacOSX 10.9.4, Xcode 6.0 Beta 1-built lldb, all tests pass. llvm-svn: 213158
* lldb.LLDB_ARCH_DEFAULT now works correctly on Macs with haswell enabled kernels.Greg Clayton2014-07-141-0/+9
| | | | | | <rdar://problem/17604133> llvm-svn: 213004
* lldb needs to support DW_op_piece masks for values in subregister and also ↵Greg Clayton2014-07-122-3/+24
| | | | | | | | | | to be able to piece together a value that is spread across multiple registers. Patch from Adrian Prantl. <rdar://problem/16040521> llvm-svn: 212867
* Allow generic ARM cores to match any more specific ARM architecture.Greg Clayton2014-07-121-1/+9
| | | | | | <rdar://problem/15932248> llvm-svn: 212863
* Remove assert now that we have a 'i' character that might come through as ↵Greg Clayton2014-07-111-1/+0
| | | | | | | | well as the 'q' character on the interrupt pipe. <rdar://problem/15840749> llvm-svn: 212856
* Cleanup the iOS simulator code.Greg Clayton2014-07-101-27/+4
| | | | | | | | | | | Fixes include: - Don't say that "<arch>-apple-ios" is compatible with "<arch>-apple-macosx" - Fixed DynamicLoaderMacOSXDYLD so specify an architecture that was converted solely from a cputype and subtype, just specify the file + UUID. - Fixed PlatformiOSSimulator::GetSupportedArchitectureAtIndex() so it returns the correct archs - Fixed SymbolFileDWARFDebugMap to load .o files correctly by just specifying the architecture without the vendor and OS now that "<arch>-apple-ios" is not compatible with "<arch>-apple-macosx" so we can load .o files correctly for DWARF with debug map - Fixed the coded in TargetList::CreateTarget() so it does the right thing with an underspecified triple where just the arch is specified. llvm-svn: 212783
* __arm64__ and __aarch64__ #ifdef adjustmentsTodd Fiala2014-07-091-1/+1
| | | | | | | | Change by Paul Osmialowski See http://reviews.llvm.org/D4379 for details. llvm-svn: 212583
* Fix typos.Bruce Mitchener2014-07-081-1/+1
| | | | llvm-svn: 212553
* If a hand-called function is interrupted by hitting a breakpoint, then Jim Ingham2014-07-081-0/+14
| | | | | | | when you continue to finish off the function call, the expression result will be included as part of the thread stop info. llvm-svn: 212506
* Add host layer support for pipes.Greg Clayton2014-07-021-43/+14
| | | | | | | | | | | Windows does support pipes, but they do so in a slightly different way. Added a Host layer which abstracts the use of pipes into a new Pipe class that everyone can use. Windows benefits include: - Being able to interrupt running processes when IO is directly hooked up - being able to interrupt long running python scripts - being able to interrupt anything based on ConnectionFileDescriptor llvm-svn: 212220
* Start converting usages of off_t to other types.Zachary Turner2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | off_t is a type which is used for file offsets. Even more specifically, it is only used by a limited number of C APIs that deal with files. Any usage of off_t where the variable is not intended to be used with one of these APIs is a bug, by definition. This patch corrects some easy mis-uses of off_t, generally by converting them to lldb::offset_t, but sometimes by using other types such as size_t, when appropriate. The use of off_t to represent these offsets has worked fine in practice on linux-y platforms, since we used _FILE_OFFSET_64 to guarantee that off_t was a uint64. On Windows, however, _FILE_OFFSET_64 is unrecognized, and off_t will always be 32-bit. So the usage of off_t on Windows actually leads to legitimate bugs. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D4358 llvm-svn: 212192
* Replace uint32_t by lldb::RegisterKing in register context API.Jean-Daniel Dupas2014-07-021-7/+9
| | | | llvm-svn: 212172
* Add Kalimba support to ArchSpec.Todd Fiala2014-07-011-2/+6
| | | | | | | | | See http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140630/011508.html for more details. Change by Matthew Gardiner. llvm-svn: 212145
* Fix typos.Bruce Mitchener2014-07-016-14/+14
| | | | llvm-svn: 212132
* Add lldb-gdbserver support for Linux x86_64.Todd Fiala2014-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | | 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-272-7/+7
| | | | | | | | 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
* Fix a few typos.Bruce Mitchener2014-06-274-14/+14
| | | | llvm-svn: 211851
* Patch from Keno Fischer to enable JITLoaderGDB with mach-o file support.Greg Clayton2014-06-241-1/+5
| | | | | | The patch is as is with the functionality left disabled for apple vendors because of performance regressions. If this is enabled it ends up searching for symbols in all shared libraries that are loadeded. llvm-svn: 211638
* Command files that switch input handlers didn't work, now they do.Greg Clayton2014-06-201-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue was when we called Debugger::RunIOHandler(), it would run the current IOHandler by activating it, and running it and then try to pop it and exit regardless of wether it was on top or not. The new code will push the IOHandler that was passed in, and run the IOHandlers until the one passed in is successfully popped. This allows files for the "command source" to switch input handlers: % cat /tmp/commands br s -S alignLeftEdges: br command add bt frame var po self DONE b s -n main br command add bt frame var DONE Note above we set a breakpoint, then add commands do it. The "br command add" will push the breakpoint comment gatherer until it sees "DONE" and then pop itself off the stack. The a new breakpoint will be set and it does the same thing again. Now this file can be sourced from the command line: % lldb -s /tmp/commands /path/to/a.out And your breakpoints will be correctly setup! <rdar://problem/17081650> llvm-svn: 211329
* Core: address comparison of signed and unsigned typesSaleem Abdulrasool2014-06-131-2/+4
| | | | | | | Add a cast to ensure that the comparison is done with the same sign type. Identified by GCC. llvm-svn: 210880
* Initial merge of some of the iOS 8 / Mac OS X Yosemite specificJason Molenda2014-06-133-0/+531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lldb support. I'll be doing more testing & cleanup but I wanted to get the initial checkin done. This adds a new SBExpressionOptions::SetLanguage API for selecting a language of an expression. I added adds a new SBThread::GetInfoItemByPathString for retriving information about a thread from that thread's StructuredData. I added a new StructuredData class for representing key-value/array/dictionary information (e.g. JSON formatted data). Helper functions to read JSON and create a StructuredData object, and to print a StructuredData object in JSON format are included. A few Cocoa / Cocoa Touch data formatters were updated by Enrico to track changes in iOS 8 / Yosemite. Before we query a thread's extended information, the system runtime may provide hints to the remote debug stub that it will use to retrieve values out of runtime structures. I added a new SystemRuntime method AddThreadExtendedInfoPacketHints which allows the SystemRuntime to add key-value type data to the initial request that we send to the remote stub. The thread-format formatter string can now retrieve values out of a thread's extended info structured data. The default thread-format string picks up two of these - thread.info.activity.name and thread.info.trace_messages. I added a new "jThreadExtendedInfo" packet in debugserver; I will add documentation to the lldb-gdb-remote.txt doc soon. It accepts JSON formatted arguments (most importantly, "thread":threadnum) and it returns a variety of information regarding the thread to lldb in JSON format. This JSON return is scanned into a StructuredData object that is associated with the thread; UI layers can query the thread's StructuredData to see if key-values are present, and if so, show them to the user. These key-values are likely to be specific to different targets with some commonality among many targets. For instance, many targets will be able to advertise the pthread_t value for a thread. I added an initial rough cut of "thread info" command which will print the information about a thread from the jThreadExtendedInfo result. I need to do more work to make this format reasonably. Han Ming added calls into the pmenergy and pmsample libraries if debugserver is run on Mac OS X Yosemite to get information about the inferior's power use. I added support to debugserver for gathering the Genealogy information about threads, if it exists, and returning it in the jThreadExtendedInfo JSON result. llvm-svn: 210874
* Added the ability to save core files:Greg Clayton2014-06-131-3/+22
| | | | | | | | | | | (lldb) file /bin/ls (lldb) b malloc (lldb) run (lldb) process save-core /tmp/ls.core Each ObjectFile plug-in now has the option to save core files by registering a new static callback. llvm-svn: 210864
* Multi-line expressions in Xcode now have a space between the line number and ↵Greg Clayton2014-06-111-1/+1
| | | | | | | | the expression text. <rdar://problem/17238093> llvm-svn: 210718
* Restore select limitations comment for non-Apple platformsEd Maste2014-06-111-0/+6
| | | | llvm-svn: 210682
* Remove duplicated codeEd Maste2014-06-101-180/+21
| | | | | | | | | | | | We preivously had two copies of ::BytesAvailable with only trivial differences between them, and fixes have been applied to only one of them. Instead of duplicating the whole function, hide the FD_SET differences behind a macro. This leaves only one small __APPLE__-specific #if block, and fixes ^C on non-__APPLE__ platforms. llvm-svn: 210592
* Windows fix: Disable editline for MSVC. Since r208369 there have been ↵Colin Riley2014-06-031-1/+2
| | | | | | issues, probably related to the editline wrapper. For now, it's more stable and usable disabled. llvm-svn: 210105
* Fix most of the remaining Windows build warnings.Todd Fiala2014-06-022-45/+48
| | | | | | | | See http://reviews.llvm.org/D3944 for more details. Change by Zachary Turner. llvm-svn: 210035
* iOS simulator cleanup to make sure we use "*-apple-ios" for iOS simulator ↵Greg Clayton2014-05-292-12/+66
| | | | | | | | | | | | | | | | | | apps and binaries. Changes include: - ObjectFileMachO can now determine if a binary is "*-apple-ios" or "*-apple-macosx" by checking the min OS and SDK load commands - ArchSpec now says "<arch>-apple-macosx" is equivalent to "<arch>-apple-ios" since the simulator mixes and matches binaries (some from the system and most from the iOS SDK). - Getting process inforamtion on MacOSX now correctly classifies iOS simulator processes so they have "*-apple-ios" architectures in the ProcessInstanceInfo - PlatformiOSSimulator can now list iOS simulator processes correctly instead of showing nothing by using: (lldb) platform select ios-simulator (lldb) platform process list - debugserver can now properly return "*-apple-ios" for the triple in the process info packets for iOS simulator executables - GDBRemoteCommunicationClient now correctly passes along the triples it gets for process info by setting the OS in the llvm::Triple correctly <rdar://problem/17060217> llvm-svn: 209852
* Fixed the Module::Module(ModuleSpec) constructor to properly copy the file ↵Greg Clayton2014-05-291-2/+2
| | | | | | offset and object file mod time from the actual module specifications so we will always be able to directly load the image we care about when calling Module::GetObjectFile(). llvm-svn: 209833
* Fix Windows warnings.Todd Fiala2014-05-281-2/+2
| | | | | | | | | | This fixes a number of trivial warnings in the Windows build. This is part of a larger effort to make the Windows build warning-free. See http://reviews.llvm.org/D3914 for more details. Change by Zachary Turner llvm-svn: 209749
* Correct comment for thread name log optionEd Maste2014-05-211-1/+1
| | | | llvm-svn: 209299
* Introduce the concept of a "display name" for typesEnrico Granata2014-05-178-30/+81
| | | | | | | | | | | | | | | | | | | | | | Rationale: Pretty simply, the idea is that sometimes type names are way too long and contain way too many details for the average developer to care about. For instance, a plain ol' vector of int might be shown as std::__1::vector<int, std::__1::allocator<.... rather than the much simpler std::vector<int> form, which is what most developers would actually type in their code Proposed solution: Introduce a notion of "display name" and a corresponding API GetDisplayTypeName() to return such a crafted for visual representation type name Obviously, the display name and the fully qualified (or "true") name are not necessarily the same - that's the whole point LLDB could choose to pick the "display name" as its one true notion of a type name, and if somebody really needs the fully qualified version of it, let them deal with the problem Or, LLDB could rename what it currently calls the "type name" to be the "display name", and add new APIs for the fully qualified name, making the display name the default choice The choice that I am making here is that the type name will keep meaning the same, and people who want a type name suited for display will explicitly ask for one It is the less risky/disruptive choice - and it should eventually make it fairly obvious when someone is asking for the wrong type Caveats: - for now, GetDisplayTypeName() == GetTypeName(), there is no logic to produce customized display type names yet. - while the fully-qualified type name is still the main key to the kingdom of data formatters, if we start showing custom names to people, those should match formatters llvm-svn: 209072
* Fix the copy constructor and assignement operator for the ↵Greg Clayton2014-05-161-2/+4
| | | | | | lldb_private::Value class to "do the right thing". llvm-svn: 209036
* Replace SIZE_T_MAX with std::numeric_limits value in Section.cpp.Todd Fiala2014-05-141-1/+4
| | | | | | SIZE_T_MAX is not available on Linux. llvm-svn: 208789
* Don't assert and crash when sections are malformed.Greg Clayton2014-05-141-11/+16
| | | | | | <rdar://problem/16833247> llvm-svn: 208749
* "process kill" and "process detach" were causing double prompts or prompts ↵Greg Clayton2014-05-081-2/+4
| | | | | | | | that would overwrite each other. Fixed now. <rdar://problem/16547729> llvm-svn: 208369
* Revert bad checkin that use incorrect member field.Greg Clayton2014-05-081-1/+0
| | | | llvm-svn: 208339
* Set the current line to invalid when done getting multiple lines.Greg Clayton2014-05-081-0/+1
| | | | llvm-svn: 208338
* lldb TOT is dropping the last entry for multi-line IOHandlers that use the ↵Greg Clayton2014-05-081-1/+6
| | | | | | | | IOHandlerDelegateMultiline. <rdar://problem/16844164> llvm-svn: 208336
OpenPOWER on IntegriCloud