summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* When writing data back into a register, acceptSean Callanan2014-02-071-1/+1
| | | | | | | values whose size differs from the register's size. llvm-svn: 200991
* Implement ObjectFileMachO::SetLoadAddress().Greg Clayton2014-02-061-1/+6
| | | | llvm-svn: 200943
* Factor some methods that were in DynamicLoaderPOSIXDYLD.Steve Pucci2014-02-062-20/+141
| | | | | | | | | | | | | | | Move some code that was in DynamicLoaderPOSIXDLYD into the base class DynamicLoader. In the case of UpdateLoadedSections(), the test to see whether a file is loadable (its address is zero) is not generally applicable so that test is changed to a more universally applicable check for the SHF_ALLOC flag on the section. Also make it explicit that the reading of the module_id in DynamicLoaderPOSIXDYLD::GetThreadLocalData() is using a hardcoded size (of module_id) of 4, which might not be appropriate on big-endian 64-bit systems, leaving a FIXME comment in place. llvm-svn: 200939
* Fixed an issue where "command source" would not do the right thing:Greg Clayton2014-02-051-26/+26
| | | | | | | - empty lines in init files would repeat previous command and cause errors to be displayed - all options to control showing the command, its output, if it should stop on error or continue, weren't being obeyed. llvm-svn: 200860
* LLDB exits the command interpreter and thus LLDB when using a pty or file as ↵Greg Clayton2014-02-041-0/+5
| | | | | | | | the input handle and a blank line is entered (like when running under emacs). This is now fixed. <rdar://problem/15976187> llvm-svn: 200790
* Avoid accessing an element of an empty vector in a log messageEd Maste2014-02-041-10/+12
| | | | llvm-svn: 200784
* Fixing the Windows build for the changes brought in from the iohandler merge.Deepak Panickal2014-01-311-2/+15
| | | | llvm-svn: 200565
* Check curr_thread is not empty before accessing it.Jim Ingham2014-01-311-1/+1
| | | | | | <rdar://problem/15953271> llvm-svn: 200504
* Missing files for previous checkin that fixed: "script help (lldb.SBThread)" ↵Greg Clayton2014-01-301-0/+10
| | | | | | | | output stops after 2048 bytes are printed. <rdar://problem/15942977> llvm-svn: 200478
* Show help dialog the first time the "gui" is run to help users find their way.Greg Clayton2014-01-281-6/+61
| | | | llvm-svn: 200326
* Fixed a crasher when handling process events that is due to a translation ↵Greg Clayton2014-01-281-1/+2
| | | | | | from the public API to the private API. llvm-svn: 200267
* Merging the iohandler branch back into main. Greg Clayton2014-01-2713-803/+6051
| | | | | | | | | | | | The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263
* Change DataExtractor's ReadInt* and ReadSwapInt* routines, as well asJason Molenda2014-01-251-16/+52
| | | | | | | | | | | | | GetU32 and GetU64, to use memcpy to copy bytes into a local buffer instead of having a (uint64_t *) etc local variable, pointing to the address, and dereferencing it. If compiled on a CPU where data alignment is required (e.g. the LDM instruction on armv7) and we try to GetU64 out of a mmap'ed DWARF file, that 8 byte quantity may not be world aligned and the program can get an unaligned memory access fault. <rdar://problem/15849231> llvm-svn: 200069
* Don't copy entire value into m_data unless we need to. If we did this and ↵Greg Clayton2014-01-232-3/+6
| | | | | | the entire variable failed to be read, we wouldn't be able to display any actual values that were in good memory. This will also make things more efficient by not have every struct/union/class/array copy its entire value into a ValueObject.m_data even though no one was using it. llvm-svn: 199953
* Updated to latest and greatest demangler sources.Greg Clayton2014-01-231-1/+14
| | | | | | <rdar://problem/15736085> llvm-svn: 199946
* If a user specifies a format option to frame variable or expression, that ↵Enrico Granata2014-01-231-4/+12
| | | | | | | | format should prevail over whatever format(s) a summary specifies (see test case for an example) llvm-svn: 199857
* Add support for Haswell on x86_64.Greg Clayton2014-01-222-3/+6
| | | | | | <rdar://problem/15312873> llvm-svn: 199854
* Added distribution info to ArchSpec and qHostInfo message.Todd Fiala2014-01-181-5/+26
| | | | | | | | | | | | | | | | | | | ArchSpec now contains an optional distribution_id, with getters and setters. Host::GetArchitecture () sets it on non-Apple platforms using Host::GetDistributionId (). The distribution_id is ignored during ArchSpec comparisons. The gdb remote qHostInfo message transmits it, if set, via the distribution_id={id-value} key/value pair. Updated gdb remote docs to reflect this change. As before, GetDistributionId () returns nothing on non-Linux platforms at this time. On Linux, it is returned only if the lsb_platform command is installed (in /bin or /usr/bin), and only if the distributor id key is returned by 'lsb_platform -i'. This id is lowercased, and whitespace is replaced with underscores. llvm-svn: 199539
* Made sure that ValueObjectVariable actuallySean Callanan2014-01-181-0/+12
| | | | | | | | | | updates itself before it tries to set its own data. Otherwise it has no idea where to put the data value. <rdar://problem/15846476> llvm-svn: 199533
* Fixed the Visual Studio Windows buildDeepak Panickal2014-01-131-2/+2
| | | | llvm-svn: 199111
* Get the breakpoint setting, and the Mac OS X DYLD trampolines and expression ↵Jim Ingham2014-01-101-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | evaluator to handle Indirect symbols correctly. There were a couple of pieces to this. 1) When a breakpoint location finds itself pointing to an Indirect symbol, when the site for it is created it needs to resolve the symbol and actually set the site at its target. 2) Not all breakpoints want to do this (i.e. a straight address breakpoint should always set itself on the specified address, so somem machinery was needed to specify that. 3) I added some info to the break list output for indirect symbols so you could see what was happening. Also I made it clear when we re-route through re-exported symbols. 4) I moved ResolveIndirectFunction from ProcessPosix to Process since it works the exact same way on Mac OS X and the other posix systems. If we find a platform that doesn't do it this way, they can override the call in Process. 5) Fixed one bug in RunThreadPlan, if you were trying to run a thread plan after a "running" event had been broadcast, the event coalescing would cause you to miss the ThreadPlan running event. So I added a way to override the coalescing. 6) Made DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan handle Indirect & Re-exported symbols. <rdar://problem/15280639> llvm-svn: 198976
* New and improved data formatter for std::shared_ptr<> and std::weak_ptr<>Enrico Granata2014-01-081-2/+8
| | | | llvm-svn: 198724
* Add a new way to bind a format to a type: by enum typeEnrico Granata2013-12-281-2/+2
| | | | | | | | | | | The "type format add" command gets a new flag --type (-t). If you pass -t <sometype>, upon fetching the value for an object of your type, LLDB will display it as-if it was of enumeration type <sometype> This is useful in cases of non-contiguous enums where there are empty gaps of unspecified values, and as such one cannot type their variables as the enum type, but users would still like to see them as-if they were of the enum type (e.g. DWARF field types with their user-reserved ranges) The SB API has also been improved to handle both types of formats, and a test case is added llvm-svn: 198105
* Centralize the code for GetValueAsCString() in TypeFormatImpl (the ↵Enrico Granata2013-12-221-79/+15
| | | | | | | | | | | implementing class of "type format ...") TypeFormatImpl used to just wrap a Format (and Flags for matching), and then ValueObject itself would do the printing deed With this checkin, the responsibility of generating a value string is centralized in the data formatter (as it should, and already is for summaries) This change is good practice per se, and should also enable us to extend the type format mechanism in a cleaner way llvm-svn: 197874
* Pickup fixes for demangling crashers.Greg Clayton2013-12-121-18/+271
| | | | | | <rdar://problem/15600471> llvm-svn: 197171
* sin_len is not available in the structure sockaddr_in under GNU/Linux. Fix ↵Sylvestre Ledru2013-12-121-1/+6
| | | | | | the build failure. Patch by Todd Fiala (and many other who proposed similar patches) llvm-svn: 197155
* Fix the test suite after the changes made in revision 196616 exposed issues ↵Greg Clayton2013-12-101-1/+2
| | | | | | | | in the test suite. We must make sure that all ValueObject objects always contain a valid target. llvm-svn: 196983
* Handle endianness in the Opcode classEd Maste2013-12-092-30/+61
| | | | | | | | | Previously, an opcode set via SetOpcode32 (for example) was later extracted via GetData() as a byte sequence in host order rather than target order. Review: http://llvm-reviews.chandlerc.com/D1838 llvm-svn: 196808
* Replace all in_port_t with uint16_t to avoid compilation issues on different ↵Greg Clayton2013-12-061-5/+5
| | | | | | systems. llvm-svn: 196586
* For logical backtrace work, lldb needs to track Module unloads etc & ↵Greg Clayton2013-12-067-0/+7
| | | | | | | | | | symoblicate an address based on a point in time <rdar://problem/15314403> This patch adds a new lldb_private::SectionLoadHistory class that tracks what shared libraries were loaded given a process stop ID. This allows us to keep a history of the sections that were loaded for a time T. Many items in history objects will rely upon the process stop ID in the future. llvm-svn: 196557
* Modified local spawning in debugserver processes to use a new ↵Greg Clayton2013-12-051-28/+137
| | | | | | | | | | | | | | | | | | --reverse-connect option so that debugserver actually connects back to LLDB instead of LLDB connecting to debugserver. This gets rid of our hacky "get_random_port()" which would grab a random port and tell debugserver to open that port. Now LLDB creates, binds, listens and accepts a connection by binding to port zero and sending the correctly bound port down as the host:port to connect back to. Fixed the "ConnectionFileDescriptor" to be able to correctly listen for connections from a specified host, localhost, or any host. Prior to this fix "listen://" only accepted the following format: listen://<port> But now it can accept: listen://<port> // Listen for connection from localhost on port <port> listen://<host>:<port> // Listen for connection from <host> and <port> listen://*:<port> // Listen for connection from any host on port <port> llvm-svn: 196547
* Fixed internal code to not link against and code from "lldb/API/*". Greg Clayton2013-12-021-37/+16
| | | | | | | | | | lldb_private::Debugger was #including some "lldb/API" header files which causes tools (lldb-platform and lldb-gdbserver) that link against the internals only (no API layer) to fail to link depending on which calls were being used. Also fixed the current working directory so that it gets set correctly for remote test suite runs. Now the remote working directory is set to: "ARCH/TESTNUM/..." where ARCH is the current architecture name and "TESTNUM" is the current test number. Fixed the "lldb-platform" and "lldb-gdbserver" to not warn about mismatched visibility settings by having each have their own exports file which contains nothing. This forces all symbols to not be exported, and also quiets the linker warnings. llvm-svn: 196141
* <rdar://problem/15530080>Enrico Granata2013-11-221-1/+1
| | | | | | | | | | | | | | | | | Rework data formatters matching algorithm What happens now is that, for each category, the FormatNavigator generates all possible matches, and checks them one by one Since the possible matches do not actually depend on the category (whether a match is accepted or not does, but that check can be shifted at a more convenient time), it is actually feasible to generate every possible match upfront and then let individual categories just scan through those This commit changes things by introducing a notion of formatters match candidate, and shifting responsibility for generating all of them given a (ValueObject,DynamicValueType) pair from the FormatNavigator back to the FormatManager A list of these candidates is then passed down to each category for matching Candidates also need to remember whether they were generated by stripping pointers, references, typedefs, since this is something that individual formatters can choose to reject This check, however, is conveniently only done once a "textual" match has been found, so that the list of candidates is truly category-independent While the performance benefit is small (mostly, due to caching), this is much cleaner from a design perspective llvm-svn: 195395
* Expose SBPlatform through the public API.Greg Clayton2013-11-203-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix MSVC buildColin Riley2013-11-201-1/+6
| | | | | | The demangler added in r193708 from cxa_demangle.cpp uses language features which are not supported by the latest visual studio. In order to preserve the msvc build, this patch restores the previous (non)functionality in windows under msvc by disabling the demangler. llvm-svn: 195254
* Fixed the the breakpoint test case failures. Greg Clayton2013-11-091-2/+10
| | | | | | There were 6 on darwin. All of these were related to the recent changes for exec. llvm-svn: 194298
* Improve lldb_private::Address to detect when section was deleted and not ↵Greg Clayton2013-11-061-15/+42
| | | | | | return bogus values for GetLoadAddress() and GetFileAddress(). llvm-svn: 194120
* Add a new system runtime plugin type - just the top levelJason Molenda2013-11-051-0/+105
| | | | | | | class, not any actual plugin implementation yet. <rdar://problem/15314068> llvm-svn: 194044
* Roll back the changes I made in r193907 which created a new FrameJason Molenda2013-11-046-18/+18
| | | | | | | | | | pure virtual base class and made StackFrame a subclass of that. As I started to build on top of that arrangement today, I found that it wasn't working out like I intended. Instead I'll try sticking with the single StackFrame class -- there's too much code duplication to make a more complicated class hierarchy sensible I think. llvm-svn: 193983
* Add a new base class, Frame. It is a pure virtual function whichJason Molenda2013-11-026-18/+18
| | | | | | | | | | | | | | | | | | | | | defines a protocol that all subclasses will implement. StackFrame is currently the only subclass and the methods that Frame vends are nearly identical to StackFrame's old methods. Update all callers to use Frame*/Frame& instead of pointers to StackFrames. This is almost entirely a mechanical change that touches a lot of the code base so I'm committing it alone. No new functionality is added with this patch, no new subclasses of Frame exist yet. I'll probably need to tweak some of the separation, possibly moving some of StackFrame's methods up in to Frame, but this is a good starting point. <rdar://problem/15314068> llvm-svn: 193907
* Further fixes to the dynamic type system prompted by ↵Enrico Granata2013-10-311-4/+6
| | | | | | ObjCDataFormatterTestCase.test_nserror_with_dsym_and_run_command llvm-svn: 193818
* Renaming the setting to enable/disable automatic one-lining of summaries as ↵Enrico Granata2013-10-311-4/+4
| | | | | | auto-one-line-summaries llvm-svn: 193801
* SBValue::GetValueAsUnsigned()/GetValueAsSigned() should not replicate the ↵Enrico Granata2013-10-311-0/+21
| | | | | | Scalar manipulation logic found in ValueObject, but rather just call down to it llvm-svn: 193786
* Added more details on the exact version of the cxa_demangle.cpp file for the ↵Greg Clayton2013-10-311-4/+12
| | | | | | built in demangler. This will help us track when we need to update this file. llvm-svn: 193784
* Use inlined demangler on FreeBSDEd Maste2013-10-311-1/+1
| | | | | | | | FreeBSD includes the elftoolchain project's demangler in the base system. It does not handle some unusual mangled names, so use the inlined libcxxabi one. llvm-svn: 193776
* <rdar://problem/15201312>Greg Clayton2013-10-301-4/+4683
| | | | | | | | | | Inlined a copy of cxa_demangle.cpp from: http://llvm.org/svn/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp For systems that don't have demangling built into the system, and for systems that don't want to use the version that is installed. Defining LLDB_USE_BUILTIN_DEMANGLER in your build system allows you to use the built in demangler. This setting is curently automatically enabled for Windows builds. llvm-svn: 193708
* <rdar://problem/13308704>Enrico Granata2013-10-301-1/+1
| | | | | | | | | Fixing a problem where ValueObject::GetPointeeData() would not accept "partial" valid reads (i.e. asking for 10 items and getting only 5 back) While suboptimal, this situation is not a flat-out failure and could well be caused by legit scenarios, such as hitting a page boundary Among others, this allows data formatters to print char* buffers allocated under libgmalloc llvm-svn: 193704
* <rdar://problem/15045059>Enrico Granata2013-10-301-0/+1
| | | | | | | One of the things that dynamic typing affects is the count of children a type has Clear out the flag that makes us blindly believe the children count when a dynamic type change is detected llvm-svn: 193663
* Fixing an issue in yesterday's dynamic type changes where we would not craft ↵Enrico Granata2013-10-291-6/+23
| | | | | | | | a valid SBType given debug information Added a test case to help us detect regression in this realm llvm-svn: 193631
* <rdar://problem/15144376>Enrico Granata2013-10-292-33/+72
| | | | | | | | | | | | This commit reimplements the TypeImpl class (the class that backs SBType) in terms of a static,dynamic type pair This is useful for those cases when the dynamic type of an ObjC variable can only be obtained in terms of an "hollow" type with no ivars In that case, we could either go with the static type (+iVar information) or with the dynamic type (+inheritance chain) With the new TypeImpl implementation, we try to combine these two sources of information in order to extract as much information as possible This should improve the functionality of tools that are using the SBType API to do extensive dynamic type inspection llvm-svn: 193564
OpenPOWER on IntegriCloud