summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* debug printfs that got left in. I blame greg.Jason Molenda2015-01-231-2/+0
| | | | llvm-svn: 226892
* Workaround for what looks like an OS X-specific libedit issueKate Stone2015-01-231-0/+21
| | | | | | | | | | | Other platforms may benefit from something similar if issues arise. The libedit library doesn't explicitly initialize the curses termcap library, which it gets away with until TERM is set to VT100 where it stumbles over an implementation assumption that may not exist on other platforms. <rdar://problem/17581929> llvm-svn: 226891
* Two fixes for compact unwind decoding for frameless large-stack-sizeJason Molenda2015-01-231-6/+25
| | | | | | | | | | | i386/x86_64 functions. The stack size was being multiplied by the pointer size incorrectly. The register permutation placeholders (UNWIND_X86_REG_NONE) were decrementing the stack offset of the saved registers when it should not have been. <rdar://problem/19570035> llvm-svn: 226889
* Error::Clear() should reset the type to invalid instead of generic.Zachary Turner2015-01-221-1/+1
| | | | | | | | | | This matches the behavior of the default constructor, so is technically more correct. Patch by Chaoren Lin Differential Revision: http://reviews.llvm.org/D7113 llvm-svn: 226851
* Don't stomp the triple when loading a PECOFF target.Zachary Turner2015-01-223-4/+28
| | | | | | | | | | | | | | | | | | | | | When you create a target, it tries to look for the platform's list of supported architectures for a match. The match it finds can contain specific triples, like i386-pc-windows-msvc. Later, we overwrite this value with the most generic triple that can apply to any platform with COFF support, causing some of the fields of the triple to get overwritten. This patch changes the behavior to only merge in values from the COFF triple if the fields of the matching triple were unknown/unspecified to begin with. This fixes load address resolution on Windows, since it enables the DynamicLoaderWindows to be used instead of DynamicLoaderStatic. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D7120 llvm-svn: 226849
* Fix the -*-version-min option to not try and use the current OS version for ↵Greg Clayton2015-01-227-29/+68
| | | | | | iOS and the simulator since llvm/clang will assert and kill LLDB. llvm-svn: 226846
* Update ExpressionSourceCode::GetText() to match theJason Molenda2015-01-221-1/+1
| | | | | | | | name of the iOS simulator platform which was changed in r181631. <rdar://problem/19200084> llvm-svn: 226789
* Add an API to ValueObject that iterates over the entire parent chain via a ↵Enrico Granata2015-01-221-8/+14
| | | | | | callback, and rewrite GetRoot() in terms of this general iteration API. NFC llvm-svn: 226771
* File::Read(), when asked to read the contents of a file into a heapJason Molenda2015-01-221-3/+4
| | | | | | | | | | | | buffer and to add a nul terminator byte, was incorrectly resizing its buffer so the nul terminator was not included. Problem found by clang ASAN instrumentation when using an expression prefix file which was read via this mechanism. <rdar://problem/19556459> llvm-svn: 226753
* Expression evaluation for functions with unknown signatures on works byKate Stone2015-01-211-0/+4
| | | | | | | | | | | | | | | inferring the function signature. This works well where the ABI doesn't distinguish between variadic and fixed argument lists, but on arm64 the calling conventions differ. The default assumption works for fixed argument lists, but variadic functions require explicit prototypes to be called. By far the most common case where this is an issue is when attempting to use printf(). This change augments the default expression prefix to include a working variadic prototype for the function. <rdar://problem/19024779> llvm-svn: 226744
* Implement ProcessWindows::GetMemoryRegionInfo.Zachary Turner2015-01-212-0/+39
| | | | llvm-svn: 226742
* This patch gets remote-linux platform able to run processesVince Harron2015-01-2111-95/+183
| | | | | | | | | | | | | | | | Make sure the selected platform is always used Make sure that the host uses the connect://hostname to connect to both the lldb-platform and the lldb-gdbserver rather than what the platform reports as the hostname of the lldb-gdbserver Make sure that lldb-platform uses the IP address on it's connection back to the host instead of the hostname that the host sends to it when launching lldb-gdbserver with the remote host information Tested on OSX and Linux llvm-svn: 226712
* Abstract the details from regex.h a bit more by not allowing people to ↵Greg Clayton2015-01-217-43/+30
| | | | | | | | | | specify compile and execute flags for regular expressions. Also enable better regular expressions if they are available by check if the REG_ENHANCED is available and using it if it is. Since REG_ENHANCED is available on MacOSX, this allow the use of \d (digits) \b (word boundaries) and much more without affecting other systems. <rdar://problem/12082562> llvm-svn: 226704
* Allow individual ValueObjects to pick their preferred display languageEnrico Granata2015-01-211-12/+23
| | | | | | | | Most of the time, we can use context information just fine to choose a language (i.e. the language of the frame that the root object was defined in, if any); but in some cases, synthetic children may be fabricated as root frame-less entities, and then we wouldn't know any better This patch allows (internal) synthetic child providers to set a display language on the children they generate, should they so choose llvm-svn: 226634
* Adding compact unwind as a source of unwind information Jason Molenda2015-01-211-2/+5
| | | | | | | | | | | | | | introduced subtle bugs in two places in RegisterContextLLDB::GetFullUnwindPlanForFrame where it specifically wanted to get an eh_frame unwind plan and was using "Get CallSite UnwindPlan" as synonymous with that. But now we have two different types of unwind plan that can be returned in that case, and compact unwind won't behaves as needed. <rdar://problem/19528559> llvm-svn: 226631
* Remove unused function:Greg Clayton2015-01-202-49/+0
| | | | | | | | | | | lldb::pid_t Host::LaunchApplication (const FileSpec &app_file_spec); This had use of a function FSPathMakeRef(const UInt8*, FSRef *, ...) that was deprecated in 10.8. Removing this fucntion since it wasn't used and was causing warnings. llvm-svn: 226608
* Don't remove backslashes from arguments unless the following char is recognized.Zachary Turner2015-01-201-11/+9
| | | | | | | | | | | | | This fixes file paths on Windows, as you can now write, for example, file d:\foo\bar.txt, but does not break the case that this tokenization logic was originally designed for, which is to allow escaping of things like quotes and double quotes, so that all of the escapable characters can appear in the same string together. Reviewed by: Jim Ingham, Greg Clayton Differential Revision: http://reviews.llvm.org/D7018 llvm-svn: 226587
* Fix creation of StringRef in FileSpec::ResolveUsername()Jason Molenda2015-01-201-1/+1
| | | | | | | | so it doesn't assume that the SmallVector<char> will have nul terminator. It did not in at least one case. Caught by ASAN instrumentation. llvm-svn: 226544
* Don't mention a "--core-file" argument to target create. It isJason Molenda2015-01-201-1/+1
| | | | | | | | "--core". <rdar://problem/19518164> llvm-svn: 226543
* Fix a race condition where you could set the selected thread & target in theJim Ingham2015-01-192-2/+7
| | | | | | | | | | CommandInterpreter's execution context AFTER the process had started running and before it initially stopped. Also fixed one test case that was implicitly using this (and an abuse of the async mode) to accidentally succeed. <rdar://problem/16814726> llvm-svn: 226528
* Update to reflect the API change to createMCSymbolizer in LLVM r226416.Chandler Carruth2015-01-191-1/+1
| | | | | | This should fix the LLDB build since that change. llvm-svn: 226427
* Commit fix for a static analyzer issue where a string pointer could ↵Enrico Granata2015-01-171-9/+15
| | | | | | theoretically be NULL.. llvm-svn: 226366
* Added Connection::GetURI()Vince Harron2015-01-175-8/+67
| | | | | | | | | | | | | This function returns a URI of the resource that the connection is connected to. This is especially important for connections established by accepting a connection from a remote host. Also added implementations for ConnectionMachPort, ConnectionSharedMemory, Also fixed up some documentation in Connection::Write Renamed ConnectionFileDescriptorPosix::SocketListen to ConnectionFileDescriptorPosix::SocketListenAndAccept Fixed a log message in Socket.cpp Differential Review: http://reviews.llvm.org/D7026 llvm-svn: 226362
* Add comments explaining the unwind setup inJason Molenda2015-01-162-0/+20
| | | | | | | | | ABIMacOSX_i386::CreateFunctionEntryUnwindPlan, ABIMacOSX_i386::CreateDefaultUnwindPlan, ABISysV_x86_64::CreateFunctionEntryUnwindPlan, ABISysV_x86_64::CreateDefaultUnwindPlan llvm-svn: 226347
* Compile fix for WIN32Vince Harron2015-01-161-7/+9
| | | | llvm-svn: 226301
* Take extra care to ensure we don't deref a NULL pointer.Greg Clayton2015-01-161-14/+18
| | | | llvm-svn: 226299
* minor refactoring to remove unneeded/unspecific header filesVince Harron2015-01-162-9/+4
| | | | | | Differential review: http://reviews.llvm.org/D6919 llvm-svn: 226249
* Add Socket::Get[Remote/Local]IpAddress and unit testsVince Harron2015-01-163-10/+128
| | | | | | Differential Revision: http://reviews.llvm.org/D6917 llvm-svn: 226234
* Add comment regarding which i386 registers are non-volatile instead ofJason Molenda2015-01-161-0/+5
| | | | | | just pointing to the standard document regarding this. llvm-svn: 226231
* Some fixes for thread stepping on Windows.Zachary Turner2015-01-153-46/+48
| | | | | | | | | | | | | This hooks up the changes necessary to set the trap flag on the CPU and properly manage the process and thread's resume state and private state so that the ThreadPlan does its thing. Stepping still doesn't work as of this change, because there are some issues with stack frames where it doesn't update the thread's frame list correctly when it breaks inside of a function, but I will try to fix that separately. llvm-svn: 226221
* 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
* Moved Args::StringToXIntYZ to StringConvert::ToXIntYZVince Harron2015-01-1536-235/+280
| | | | | | | | | | The refactor was motivated by some comments that Greg made http://reviews.llvm.org/D6918 and also to break a dependency cascade that caused functions linking in string->int conversion functions to pull in most of lldb llvm-svn: 226199
* Fix a -Wnull-conversion warning.Nico Weber2015-01-151-1/+1
| | | | llvm-svn: 226181
* Fix build after clang r226128.Nico Weber2015-01-151-1/+0
| | | | llvm-svn: 226180
* In commit clang r226096, DefinitionRequired has been removed. Do the same in ↵Sylvestre Ledru2015-01-152-4/+4
| | | | | | lldb implementation llvm-svn: 226162
* Fix a little thinko in r226017 - the code to actually add the demangled name ↵Jim Ingham2015-01-151-4/+6
| | | | | | | | | | | | | to the Mangled object got moved into the #else branch of the #if/#elif/#endif, so it wasn't getting done in the #if case anymore. Keep the code to add the demangled name outside of the #if, and then just free the demangled_name and set it back to NULL in the Windows case. <rdar://problem/19479499> llvm-svn: 226088
* Don't crash when we can't find a block for some reason, just try and do the ↵Greg Clayton2015-01-151-3/+5
| | | | | | | | right thing and fail gracefully. <rdar://problem/19196221> llvm-svn: 226087
* Don't crash when we run into lexical block address range problems, just ↵Greg Clayton2015-01-151-19/+18
| | | | | | | | ignore the bad ranges and log an error message asking the user to file a bug. <rdar://problem/19021931> llvm-svn: 226085
* Modified LLDB to be able to lookup global variables by address.Greg Clayton2015-01-156-15/+150
| | | | | | | | | | | | This is done by adding a "Variable *" to SymbolContext and allowing SymbolFile::ResolveSymbolContext() so if an address is resolved into a symbol context, we can include the global or static variable for that address. This means you can now find global variables that are merged globals when doing a "image lookup --verbose --address 0x1230000". Previously we would resolve a symbol and show "_MergedGlobals123 + 1234". But now we can show the global variable name. The eSymbolContextEverything purposely does not include the new eSymbolContextVariable in its lookup since stack frame code does many lookups and we don't want it triggering the global variable lookups. <rdar://problem/18945678> llvm-svn: 226084
* Fix build after r226068: cannot initialize 'int' with 'nullptr_t'Ed Maste2015-01-151-1/+1
| | | | llvm-svn: 226076
* Make sure that when a breakpoint is hit but its condition is not met,Jim Ingham2015-01-154-3/+32
| | | | | | | | | | the hit count is not updated. Also, keep the hit count for the breakpoint in the breakpoint. We were using just the sum of the location's hit counts, but that was wrong since if a shared library is unloaded, and the location goes away, the breakpoint hit count should not suddenly drop by the number of hits there were on that location. llvm-svn: 226074
* Three related changes to help:Kate Stone2015-01-154-86/+116
| | | | | | | | | | | | | | | | The default help display now shows the alias collection by default, and hides commands whose named begin with an underscore. Help is primarily useful to those unfamiliar with LLDB and should aim to answer typical questions while still being able to provide more esoteric answers when required. To that latter end an argument to include the hidden commands in help has been added, and instead of having a help flag to show aliases there is now one to hide them. This final change might be controversial as it repurposes the -a shorthand as the opposite of its original meaning. The previous implementation of OutputFormattedHelpText was easily confused by embedded newlines. The new algorithm correctly breaks on the FIRST newline or LAST space/tab before the target column count rather than treating all whitespace interchangeably. Command interpreters now have the ability to specify help prologue text and a command prefix string. Neither are used in the current LLDB sources but are required to support REPL-like extensions where LLDB commands must be prefixed and additional help text is required to explain how to access traditional debugging commands. <rdar://problem/17751929> <rdar://problem/16953815> <rdar://problem/16953841> <rdar://problem/16930173> <rdar://problem/16879028> llvm-svn: 226068
* Reenable the logic to take an integer value and attempt to "po" it as an ↵Enrico Granata2015-01-141-2/+5
| | | | | | | | | | ObjC object While there is quite a bit of potential for mishaps due to tagged pointers, and after quite some internal discussion, this seems a saner behavior given how "po" stands for "print OBJECT". The argument being that we should make at least some sensible attempt to print the thing the user passed as-if it was an object Fixes rdar://19423124 llvm-svn: 226062
* Only set the StopInfo on Windows if the stop is valid for this thread.Zachary Turner2015-01-141-7/+3
| | | | llvm-svn: 226054
* Fix a number of tests on Windows.Zachary Turner2015-01-141-1/+1
| | | | | | | These fix various issues with path handling and disable a few tests which use features of LLVM which are not yet supported on Windows. llvm-svn: 226042
* Fixes compilation/run error with BUILD_SHARED_LIBS=TRUEVince Harron2015-01-141-3/+2
| | | | | | | | | | | | BUILD_SHARED_LIBS=TRUE currently isn't working for Linux x86_64 This patch fixes the link errors and also some runtime errors Test Plan: CC=clang CXX=clang++ cmake -GNinja -DBUILD_SHARED_LIBS=TRUE -DCMAKE_LINKER=ld.gold -DCMAKE_BUILD_TYPE=Debug ../../llvm ninja ninja check-lldb llvm-svn: 226039
* Typing "gui" will crash programs that don't give LLDB a real terminal. Greg Clayton2015-01-141-4/+16
| | | | | | | | | | We now verify that the debugger's input file is a valid terminal file descriptor before allowing the "gui" command to try to run. Xcode would crash if you typed "gui" at the command line prior to this fix. <rdar://problem/18775851> llvm-svn: 226027
* Implement demangling on Windows.Zachary Turner2015-01-141-7/+22
| | | | llvm-svn: 226017
* Add null pointer checks to some SBStream functions.Zachary Turner2015-01-141-0/+6
| | | | llvm-svn: 226016
* Extend PipePosix with support for named pipes/timeout-based IO and integrate ↵Oleksiy Vyalov2015-01-144-11/+4
| | | | | | | | it with GDBRemoteCommunication / lldb-gdbserver - include reviews fixes. http://reviews.llvm.org/D6954 llvm-svn: 225923
OpenPOWER on IntegriCloud