summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Terminate an unused char* buffer correctly so we don't try to openJason Molenda2014-01-241-0/+1
| | | | | | | | it later in GDBRemoteCommunication::StartDebugserverProcess and report an error. <rdar://problem/15820813> llvm-svn: 200047
* Added reaper for commandline-launched processes.Todd Fiala2014-01-242-11/+83
| | | | | | | | | | | | | | | | | | GDBRemoteCommunicationServer::LaunchProcess () now uses the built-up ProcessLaunchArgs rather than clearing and setting items from the function arguments. I added setters for the arguments and launch flags, which lldb-gdbserver uses for its specification of the commandline-specified startup app (if one is specified). LaunchProcess () also adds a new reaper monitor that it applies to the launched process if no process monitor has already been applied. This addresses an issue where the 'k' command would generate (possibly false) warnings about not being able to positively state whether a killed process actually terminated. GDBRemoteCommunicationServer now definitely knows the disposition of its children. llvm-svn: 199959
* 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
* Move process launching into GDBRemoteCommunicationServer.Todd Fiala2014-01-232-31/+161
| | | | | | | | | | | | | | | | | | lldb-gdbserver was launching the commandline-specified launch process directly, without GDBRemoteCommunicationServer knowing anything about it. As GDBRemoteCommunicationServer is the piece that manages and knows about processes that the gdb remote protocol discusses with the client end, it is important that it know about launched processes. This change also implements the k gdb remote protocol message, having it kill all known spawned processes when it is received. (Note: in lldb-gdbserver, the spawned processes are not properly monitored yet. The response to the k packet will complain that spawned processes do not really appear to be getting killed even if they are. This will get addressed soon.) llvm-svn: 199945
* Don't need to figure out the frame's module if we don't have any librariesJim Ingham2014-01-231-10/+14
| | | | | | in the step-avoid-libraries list. llvm-svn: 199944
* Add a "step-avoid-libraries" setting to complement the "step-avoid-regexp" ↵Jim Ingham2014-01-232-4/+39
| | | | | | setting. llvm-svn: 199943
* Added the ability to get the type that a typedef points to via:Greg Clayton2014-01-233-0/+35
| | | | | | | | | | SBType SBType::GetTypedefedType(); Also added the ability to get a type by type ID from a SBModule: SBType SBModule::GetTypeByID (lldb::user_id_t uid); llvm-svn: 199939
* Candidate fix for bug 18592.Todd Fiala2014-01-231-1/+1
| | | | | | | | | This reverts Host.cpp LaunchProcess spawn behavior on FreeBSD to be like Linux (and unlike OS X) with regards to how default signal handlers and setup on the spawned process. FreeBSD does not reset default signal handlers on the spawned process after this change. llvm-svn: 199908
* If a user specifies a format option to frame variable or expression, that ↵Enrico Granata2014-01-232-13/+21
| | | | | | | | format should prevail over whatever format(s) a summary specifies (see test case for an example) llvm-svn: 199857
* Unify OS X/POSIX/Linux Host spawn support.Todd Fiala2014-01-232-284/+233
| | | | | | | | | | | | | | | This fixes a bug under Linux where spawning a process via Host::LaunchProcess was disabling all blockable signals on the launched process. This caused strange behavior when attempting to kill the lldb-gdbserver process, as the child generally would not die unless killed with a non-blockable signal (e.g. 'kill -9'). This change moves several functions out of macosx/Host.mm into common/Host.cpp. In addition, two functions that needed to work across common/Host.cpp and macosx/Host.mm were moved into the Host.h header file. llvm-svn: 199856
* Add support for Haswell on x86_64.Greg Clayton2014-01-228-18/+79
| | | | | | <rdar://problem/15312873> llvm-svn: 199854
* Better logging for the IRExecutionUnit so thatSean Callanan2014-01-211-6/+20
| | | | | | we can see exactly what data was put where. llvm-svn: 199701
* Build fix following clang r199686Alp Toker2014-01-202-12/+12
| | | | llvm-svn: 199689
* Make lldb build with Makefiles on OS X.Todd Fiala2014-01-185-12/+31
| | | | | | | | | | | | | | | | | | This change does the following: * Adds Makefile build scripts to debug server. * Fixes a few small mistakes in the other makefiles. * Modifies generate-vers.pl slightly to also work for debugserver. * Changes the OS X, non-framework python search path from libdir to libdir/python2.X/site-packages where it is installed by the build system (also where it is installed on other operating systems). Patch by Keno Fischer. llvm-svn: 199543
* Added distribution info to ArchSpec and qHostInfo message.Todd Fiala2014-01-184-6/+51
| | | | | | | | | | | | | | | | | | | 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
* Undo change to triple behavior from r199510.Todd Fiala2014-01-171-7/+1
| | | | | | | | | The Linux distribution will be added to the ArchSpec class in an upcoming change. This change only undoes the change to the triple. The distribution retrieval logic and enabling of lldb-gdbserver for linux x86_64 builds is still in place. llvm-svn: 199520
* Enable Linux distribution in vendor portion of host triple.Todd Fiala2014-01-172-1/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change does the following: * enables building lldb-gdbserver on linux_x86-64 platforms. Note - it builds but it has several run-time issues where many gdb remote protocol features are not properly implemented yet. I'm working on these one at a time. * lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on Linux. Currently the POSIX launch routine will assert if that flag is passed in, presumably because that launch mode is not yet available. This prevents lldb-gdbserver from asserting the moment it launches the debuggee process. * Adds ConstString& Host::GetDistributionId () This method is defined to return an empty result on all platforms except for Linux. On Linux, it makes one attempt to execute 'lsb_release -i' (both /usr/bin/lsb_release, where it appears on ubuntu, and /bin/lsb_release, where it appears on fedora if the redhat-lsb package is installed). If lsb_release is not found in either of those locations, or if 'lsb_release -i' does not return the first line starting with "Distributor ID:\t", then the distribution id is empty. The method will lower-case the id and replace whitespace with underscores. * Modify Host::GetArchitecture () so that linux replaces an unknown vendor portion with the results of GetDistributionId () if that is non-empty. This shows up now in qHostInfo remote packet responses and on the lldb host side. Tested with ubuntu and fedora (the latter both with the default of not having lsb_release installed, and with having lsb_release installed via the redhat-lsb package). Examples of triples on Linux after this change: # x86_64 Unbuntu 12.04 LTS: x86_64-ubuntu-linux-gnu # x86_64 Fedora 20 Desktop with redhat-lsb package installed x86_64-fedora-linux-gnu # x86_64 Fedora 20 Desktop without redhat-lsb-core installed # (i.e. no /bin/lsb_release available) # same as before the change x86_64--linux-gnu Note I intend to have Android respond with: {arch}-android-linux when I get to implementing Android lldb-gdbserver support. llvm-svn: 199510
* The default timeout for EvaluateExpressionOptions is not 0, so if no timeout ↵Jim Ingham2014-01-171-0/+2
| | | | | | | | is provided, we have to set the option timeout to 0 by hand. <rdar://problem/15846781> llvm-svn: 199509
* Fix gcc warnings about casting away constnessSteve Pucci2014-01-171-1/+1
| | | | llvm-svn: 199506
* Rename Platform::GetFile (3-arg version) to GetFileWithUUIDSteve Pucci2014-01-1712-34/+34
| | | | | | | | | | | This rename was suggested by gclayton as a way to silence gcc warnings; the warning is emitted when there is an overloaded function in a base class (Platform) for which a derived class redefines one of the overloads but not the other (because doing so hides the other overload from users of the derived class). By giving the two methods different names, the situation is avoided. llvm-svn: 199504
* Correct logic checking for the first stop IDEd Maste2014-01-171-1/+1
| | | | llvm-svn: 199503
* Test new committer permission with one-line trailing whitespace removal.Steve Pucci2014-01-161-1/+1
| | | | llvm-svn: 199432
* Fix bug in Linux remote dynamic loader setup and fix test.Todd Fiala2014-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Part 1 changes PlatformLinux::CreateInstance to always create with is_host=false; that method is only used as the plug-in creator method associated with the remote-linux platform plugin, and should therefore always be remote. Part 1 patch by Steve Pucci. Part 2: fix a test break on linux. In test/functionalities/thread/thread_specific_break, when using gcc, either C99 mode would need to be enabled, or the code would need to change. I changed a couple loop variable definitions to conform to pre-C99 to simplify testing the fix. The second issue was the necessity to include -lpthread as a linker option in the Makefile. Any issues with that part are due to me (Todd Fiala). llvm-svn: 199426
* Fixed some API drift by making "used" attributesSean Callanan2014-01-161-1/+1
| | | | | | in a better way. llvm-svn: 199408
* If a library has no N_FUN symbols we don't succeed in finding resolver ↵Greg Clayton2014-01-161-2/+2
| | | | | | | | symbols, now we do. <rdar://problem/15831334> llvm-svn: 199345
* Make sure we correctly merge all N_FUN symbols with non-stab entries even if ↵Greg Clayton2014-01-161-50/+82
| | | | | | | | there are multiple symbols with the same name. <rdar://problem/15831292> llvm-svn: 199344
* Fix a bug where if we stop but nobody says there was a reason for the stop, ↵Jim Ingham2014-01-151-5/+19
| | | | | | | | | | | | | we would return control to the user anyway. This was put in to handle monitors that would say there was no stop reason when you first attached to them. But it broke the case where you hit a thread specific breakpoint on many threads, but NOT the one specified in the breakpoint. I work around this by only doing the junky override when the StopID is 0 - i.e. on first attach. This commit also adds a test for thread specific breakpoints. llvm-svn: 199290
* Add a little more logging to the StopInfoBreakpoint::PerformAction.Jim Ingham2014-01-151-1/+14
| | | | llvm-svn: 199289
* Fix return type for WindowsDeepak Panickal2014-01-141-2/+1
| | | | llvm-svn: 199202
* Harden the Materializer logic against types thatSean Callanan2014-01-141-0/+6
| | | | | | don't know their bit alignment. llvm-svn: 199173
* Fixed the Visual Studio Windows buildDeepak Panickal2014-01-133-3/+7
| | | | llvm-svn: 199111
* Avoid LLDB crash upon DW_OP_deref* with empty stackEd Maste2014-01-131-0/+12
| | | | | | | | As done in other DW_OP_* cases, return an error if the stack is empty rather than eventually crashing elsewhere. Encountered on big-endian MIPS, where LLVM bugs currently result in invalid .debug_loc data. llvm-svn: 199110
* Sometimes the trampoline refers directly to the indirect symbol. Handle ↵Jim Ingham2014-01-111-0/+23
| | | | | | that too. llvm-svn: 198990
* Add the offset for cfa+offset log messages in the unwind channel, to aid in ↵Jason Molenda2014-01-101-2/+2
| | | | | | debugging. llvm-svn: 198977
* Get the breakpoint setting, and the Mac OS X DYLD trampolines and expression ↵Jim Ingham2014-01-1013-176/+344
| | | | | | | | | | | | | | | | | | | | | | | | 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
* The actual indirect symbol is not the one at the address of the Trie entry ↵Jim Ingham2014-01-101-27/+42
| | | | | | marked with the EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER, it is given in the address in the “other” field in that entry. llvm-svn: 198967
* Revert to getting a random port and sending that down to debugserver for ↵Greg Clayton2014-01-104-37/+100
| | | | | | | | iOS. The sandboxing is not letting debugserver reverse connect back to lldb. <rdar://problem/15789865> llvm-svn: 198963
* Update the lldb version number in the xcode project files from 310.99.0 to ↵Jason Molenda2014-01-102-2/+2
| | | | | | 320.99.0. llvm-svn: 198917
* Fixed an issue with the byte order of ports in KDP packets. Greg Clayton2014-01-101-6/+6
| | | | | | | | | | I previously fixed a bug in the SocketAddress class where SocketAddress::GetPort() wasn't using ntohs() on the port number in the structures. After fixing this, it broke places where we weren't using ntohs() and htons() correctly. <rdar://problem/15767514> llvm-svn: 198902
* Roll back r198729; it seems to be causing two testsuite failures if llvm is ↵Jason Molenda2014-01-091-2/+2
| | | | | | | | | | | | built with asserts - 210: test_with_dsym_and_run_command (Test-rdar-10642615.Radar10642615DataFormatterTestCase) Test data formatter commands. ... Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239. 226: test_with_dsym_and_run_command (Test-rdar-13338477.Radar13338477DataFormatterTestCase) Test that LLDB handles the clang typeclass Paren correctly. ... Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239. llvm-svn: 198811
* Roll back my change to r198729; I'm going to revert it entirely.Jason Molenda2014-01-091-1/+1
| | | | llvm-svn: 198810
* Revert the vector part of Enrico's change in r198729;Jason Molenda2014-01-081-1/+1
| | | | | | | | | it is causing an llvm assert when run against test/functionalities/data-formatter/rdar-10642615, Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239. llvm-svn: 198809
* Only check os version for POSIX_SPAWN_CLOEXEC_DEFAULT on desktop builds of LLDB.Greg Clayton2014-01-081-1/+1
| | | | llvm-svn: 198800
* Fixed a kernel panic that would occur if you debug anything on MacOSX 10.7 ↵Greg Clayton2014-01-081-43/+72
| | | | | | or earlier due to the use of the POSIX_SPAWN_CLOEXEC_DEFAULT attribute flag that closes all file descriptors on exec. We now dyamically detect the OS version and do the right thing. llvm-svn: 198776
* Fixes a bug preventing reading of the python register file.Todd Fiala2014-01-081-0/+4
| | | | | | | | | | This change fixes a bug recently introduced in ProcessGDBRemote that prevented the Python register definition file from getting loaded when the qRegisterInfo0 response returned $00#. Patch by Steve Pucci. llvm-svn: 198742
* <rdar://problem/15453076>Enrico Granata2014-01-081-2/+2
| | | | | | | When determining the type of array members, do not see-through typedefs For instance, in BOOL arr[4], we want the elements to be typed as BOOL, not signed char llvm-svn: 198729
* __CFString should also format as an NSStringEnrico Granata2014-01-081-0/+1
| | | | llvm-svn: 198727
* New and improved data formatter for std::shared_ptr<> and std::weak_ptr<>Enrico Granata2014-01-083-4/+56
| | | | llvm-svn: 198724
OpenPOWER on IntegriCloud