summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* <rdar://problem/13021266>Enrico Granata2013-01-166-0/+80
| | | | | | | Adding FindFirstGlobalVariable to SBModule and SBTarget These calls work like FindGlobalVariables but they only return the first match found and so they can return an SBValue instead of an SBValueList for added convenience of use llvm-svn: 172636
* Greg created a new API on SBProcess to get an ID that is guaranteed to be ↵Enrico Granata2013-01-161-1/+1
| | | | | | | | unique even in situations where underlying platforms would actually duplicate or hardcode PIDs The Python data formatters use a per-process cache that was previously keying off the PID. Moving that to be based on this new notion of unique ID. llvm-svn: 172633
* <rdar://problem/13009943>Greg Clayton2013-01-165-4/+73
| | | | | | | | | | Added a unique integer identifier to processes. Some systems, like JTAG or other simulators, might always assign the same process ID (pid) to the processes that are being debugged. In order for scripts and the APIs to uniquely identify the processes, there needs to be another ID. Now the SBProcess class has: uint32_t SBProcess::GetUniqueID(); This integer ID will help to truly uniquely identify a process and help with appropriate caching that can be associated with a SBProcess object. llvm-svn: 172628
* SDKROOT should only be unset/cleared for ARM builds. The first fix by Bob ↵Greg Clayton2013-01-161-5/+14
| | | | | | Wilson removed it for ARM for both configure and make, but only unset it for desktop configure, not for the make. My next fix unset/cleared it all the time. This fix only unset/clears it for ARM builds. llvm-svn: 172593
* <rdar://problem/13019628>Han Ming Ong2013-01-166-12/+12
| | | | | | Prevent profiling from working on older debugserver. Just a simple renaming since the caller is prepared to handle the ‘unimplemented’ answer. llvm-svn: 172583
* Fix clang builds that were broken due to SDKROOT changes of you have an ↵Greg Clayton2013-01-161-3/+3
| | | | | | internal OS build. llvm-svn: 172582
* Fixes to the code I just committed to reflectSean Callanan2013-01-151-0/+3
| | | | | | | that we now also have to ignore breakpoints when running the expression to collect isas. llvm-svn: 172575
* Modified the Objective-C runtime to fetch Objective-CSean Callanan2013-01-152-8/+364
| | | | | | | | | | | | | | | | | | | | isas and corresponding names from the underlying process in a manner much quicker than the current approach. The current approach accesses memory in the underlying process with a random-access pattern as it walks across the data structures associated with each isa. This involves a great deal of back-and-forth with debugserver, resulting in performance problems, especially with iOS targets. The new approach attempts to run an expression in the target that collects the isas and names into two large buffers, which LLDB then collects in one shot. <rdar://problem/12914539> llvm-svn: 172574
* ClangExpressionVariable previously was not capable ofSean Callanan2013-01-153-104/+178
| | | | | | | | | | | | | | | | handling multiple clients. However, occasionally an expression must be run in the service of another expression, and in this case two parsers need to access the same list of persistent variables. To allow this, persistent variables now provide state for multiple parsers, and parsers must allocate, access, and deallocate this state by providing their own ID (at the moment, simply the value of the "this" pointer). <rdar://problem/12914539> llvm-svn: 172573
* <rdar://problem/13011717> Greg Clayton2013-01-151-1/+1
| | | | | | Fixed a compilation error where NULL was being assigned to a uint. llvm-svn: 172566
* <rdar://problem/13010909>Greg Clayton2013-01-151-2/+2
| | | | | | Don't accidentally sign extend unsigned bitfields. llvm-svn: 172506
* Fix for the separation between -i and -u in expression.Jim Ingham2013-01-151-1/+12
| | | | llvm-svn: 172505
* Separated the "expr --unwind-on-error" behavior into two parts, actual ↵Jim Ingham2013-01-1528-105/+425
| | | | | | | | | | | | | | | | errors (i.e. crashes) which continue to be controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called function hits a breakpoint. For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes more sense. Also make both these behaviors globally settable through "settings set". Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint. We were recursing and crashing. Now we just stop without calling the second command. <rdar://problem/12986644> <rdar://problem/9119325> llvm-svn: 172503
* Add a few other missing LOG_ types to set_logging() in RNBRemote.cpp;Jason Molenda2013-01-151-10/+37
| | | | | | | document some simple bourne shell to re-generate these from the DNBDefs.h header file in case this needs to be done again in the future. llvm-svn: 172494
* Adding a test case for expression parser's support for Unicode strings. This ↵Enrico Granata2013-01-153-0/+110
| | | | | | is an expected failure for now llvm-svn: 172493
* <rdar://problem/12790664>Enrico Granata2013-01-146-73/+212
| | | | | | Single-character Unicode data formatters llvm-svn: 172492
* Once a function has been JIT-compiled once, don'tSean Callanan2013-01-141-0/+2
| | | | | | JIT it again. llvm-svn: 172477
* Fix a logic error in the condition for a warning log message.Jim Ingham2013-01-142-2/+2
| | | | llvm-svn: 172442
* Fix cross-compiling problems in build-llvm.pl script. <rdar://problem/12986905>Bob Wilson2013-01-121-3/+5
| | | | | | | | | | As with llvm svn r172138, this patch is basically copying some changes that we've been using for building clang at Apple. Besides cleaning it up to use xcrun to locate the proper versions of tools, especially for cross compiling, it fixes the build to work with newer versions of clang that honor SDKROOT settings in the environment. llvm-svn: 172324
* Recognize LOG_WATCHPOINTS in the QSetLogging gdb-remote packet.Jason Molenda2013-01-121-0/+5
| | | | llvm-svn: 172311
* Add ifdef LLDB_DISABLE_PYTHON around newly added use ofJason Molenda2013-01-121-0/+2
| | | | | | | | AddCXXSummary in FormatManager::LoadSystemFormatters(); that function pulls in code that assumes python; can't be used without the ifdef. llvm-svn: 172300
* Made crashlog.py handle cases where a parentSean Callanan2013-01-121-3/+5
| | | | | | | | | process's name contains spaces. Thanks to Justin Seyster for the patch. <rdar://problem/13002540> llvm-svn: 172294
* Removed the hack that uses "frame variable" toSean Callanan2013-01-121-100/+22
| | | | | | | | | | evaluate expressions. The expression parser and IR interpreter are now fully capable of evaluating expressions with as much (or better) fidelity. <rdar://problem/12879364> llvm-svn: 172293
* Don't always strip the first extension from the module basename when looking ↵Greg Clayton2013-01-121-19/+37
| | | | | | for python scripts. Now we take a name like "a.b.c" and look for scripts that are "a_b_c.py", "a_b.py" and "a.py" inside the dSYM. llvm-svn: 172291
* <rdar://problem/12239827>Enrico Granata2013-01-126-6/+123
| | | | | | Making a summary for std::wstring as provided by libstdc++ along with a relevant test case llvm-svn: 172286
* <rdar://problem/12239827>Enrico Granata2013-01-128-9/+310
| | | | | | | | | Providing a data formatter for libc++ std::wstring In the process, refactoring the std::string data formatter to be written in C++ so that commonalities between the two can be exploited Also, providing a new API on the ValueObject to navigate a hierarchy by index-path Lastly, an appropriate test case is included llvm-svn: 172282
* <rdar://problem/12973809> Greg Clayton2013-01-116-104/+115
| | | | | | | | | | | | | Fixed an issue with the auto loading of script resources in debug info files. Any platform can add support for this, and on MacOSX we allow dSYM files to contain python modules that get automatically loaded when a dSYM file is associated with an executable or shared library. The modifications will now: - Let the module locate the symbol file naturally instead of using a function that only works in certain cases. This helps us to locate the script resources as long as the dSYM file can be found. - Don't try and do any of this if the script interpreter has scripting disabled. - Allow more than one scripting resource to be found in a symbol file by returning the list - Load the scripting resources when a symbol file is added via the "target symbols add" command. - Be smarter about matching the dSYM mach-o file to an existing executable in the target images by stripping extensions on the symfile basname if needed. llvm-svn: 172275
* <rdar://problem/12990038>Greg Clayton2013-01-116-14/+48
| | | | | | Fixed an issue where the platform auto select code was changing the architecture and causing the wrong architecture to be assigned to the target. llvm-svn: 172251
* Fix typo in function name and one more whitespace tweak.Bob Wilson2013-01-111-7/+7
| | | | llvm-svn: 172240
* Fix whitespace.Bob Wilson2013-01-111-230/+226
| | | | | | | | | This script used an inconsistent mix of spaces and tabs, and even ignoring that, it still had inconsistent indentation, which is pretty scary for a Python script. I also removed trailing whitespace from some lines. llvm-svn: 172237
* Modified Value.cpp to share the code that gets the values as bytes ↵Greg Clayton2013-01-111-9/+51
| | | | | | | | | | | | | | | | | | | | | (Value::GetValueAsData()) so now Value::ResolveValue() doesn't do its own thing by reading memory directly. Also modified the Value class so that you can evaluate expressions without a process, yet with some sections loaded in the target. This allows casting pointers that are in data sections to types and being able to evaluate expressions in the data. For example: (lldb) target create a.out (lldb) target modules load --file a.out --slide 0 ... find address of something in data ... (lldb) script expr_opts = lldb.SBExpressionOptions() v = lldb.target.EvaluateExpression('(foo *)0x1230000', expr_opts) print v vv = lldb.value(v) print v.pt.x Above we were able to cast a pointer to an address which was in a.out's data section and print out entire structures and navigate to the child ivars of the expression. llvm-svn: 172227
* Making the Unicode formatters visually nicer by using the same prefix ↵Enrico Granata2013-01-115-15/+17
| | | | | | | | characters as the compiler expects in C++ code Also, marking the Unicode data formatters test cases as dataformatter related for the benefit for the --category flag in dotest.py llvm-svn: 172167
* <rdar://problem/11383764>Enrico Granata2013-01-114-7/+68
| | | | | | Making a data formatter for wchar_t * llvm-svn: 172165
* minor update to status page: C++ exception breakpoints work on linuxDaniel Malea2013-01-101-1/+1
| | | | llvm-svn: 172142
* <rdar://problem/12725746>Enrico Granata2013-01-106-126/+344
| | | | | | | | Providing data formatters for char16_t* and char32_t* C++11-style Unicode strings Using this chance to refactor the UTF data reader used for data formatters for added generality Added a relevant test case llvm-svn: 172119
* <rdar://problem/11146929>Enrico Granata2013-01-102-0/+3
| | | | | | | | | | | Enabling support for the wchar_t type. Without the proper language option setup, clang's ASTContexts will be configured to have wchar_t == int This patch enables the correct options to make sure that we report wchar_t as itself Added a test case to make sure we do not regress Adding files missing from the previous commit llvm-svn: 172039
* <rdar://problem/11146929>Enrico Granata2013-01-103-0/+111
| | | | | | | | | Enabling support for the wchar_t type. Without the proper language option setup, clang's ASTContexts will be configured to have wchar_t == int This patch enables the correct options to make sure that we report wchar_t as itself Added a test case to make sure we do not regress llvm-svn: 172038
* Use a more unique end delimiter. In any case, the thread names are hexified ↵Han Ming Ong2013-01-101-1/+1
| | | | | | when returning to lldb. llvm-svn: 172021
* Fixed an issue the "process plugin" proxy object was trying to use the ↵Greg Clayton2013-01-091-1/+1
| | | | | | m_exe_ctx when it wasn't ok to do so. llvm-svn: 172014
* Added emulation of shifts to the IR interpreter.Sean Callanan2013-01-093-0/+51
| | | | | | <rdar://problem/12978619> llvm-svn: 172013
* <rdar://problem/12975489>Han Ming Ong2013-01-091-6/+5
| | | | | | | 1. Using mach port number, just like when inferior is paused. 2. Use key:value pair of thread used time instead of comma separated notation. llvm-svn: 172012
* <rdar://problem/12028723>Enrico Granata2013-01-0912-93/+54
| | | | | | | | | | Adding useful formatting options to the expression (expr) command. As a side effect of this change, the -d option now supports the same three-values enumeration that frame variables uses (run, don't run, none) instead of a boolean like it did previously These options do not apply to print, p or po because these are aliased to not take any options. In order to use them, use expression or expr. llvm-svn: 171993
* Expanded the flags that can be set for a command object in ↵Greg Clayton2013-01-0916-1008/+1057
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lldb_private::CommandObject. This list of available flags are: enum { //---------------------------------------------------------------------- // eFlagRequiresTarget // // Ensures a valid target is contained in m_exe_ctx prior to executing // the command. If a target doesn't exist or is invalid, the command // will fail and CommandObject::GetInvalidTargetDescription() will be // returned as the error. CommandObject subclasses can override the // virtual function for GetInvalidTargetDescription() to provide custom // strings when needed. //---------------------------------------------------------------------- eFlagRequiresTarget = (1u << 0), //---------------------------------------------------------------------- // eFlagRequiresProcess // // Ensures a valid process is contained in m_exe_ctx prior to executing // the command. If a process doesn't exist or is invalid, the command // will fail and CommandObject::GetInvalidProcessDescription() will be // returned as the error. CommandObject subclasses can override the // virtual function for GetInvalidProcessDescription() to provide custom // strings when needed. //---------------------------------------------------------------------- eFlagRequiresProcess = (1u << 1), //---------------------------------------------------------------------- // eFlagRequiresThread // // Ensures a valid thread is contained in m_exe_ctx prior to executing // the command. If a thread doesn't exist or is invalid, the command // will fail and CommandObject::GetInvalidThreadDescription() will be // returned as the error. CommandObject subclasses can override the // virtual function for GetInvalidThreadDescription() to provide custom // strings when needed. //---------------------------------------------------------------------- eFlagRequiresThread = (1u << 2), //---------------------------------------------------------------------- // eFlagRequiresFrame // // Ensures a valid frame is contained in m_exe_ctx prior to executing // the command. If a frame doesn't exist or is invalid, the command // will fail and CommandObject::GetInvalidFrameDescription() will be // returned as the error. CommandObject subclasses can override the // virtual function for GetInvalidFrameDescription() to provide custom // strings when needed. //---------------------------------------------------------------------- eFlagRequiresFrame = (1u << 3), //---------------------------------------------------------------------- // eFlagRequiresRegContext // // Ensures a valid register context (from the selected frame if there // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx) // is availble from m_exe_ctx prior to executing the command. If a // target doesn't exist or is invalid, the command will fail and // CommandObject::GetInvalidRegContextDescription() will be returned as // the error. CommandObject subclasses can override the virtual function // for GetInvalidRegContextDescription() to provide custom strings when // needed. //---------------------------------------------------------------------- eFlagRequiresRegContext = (1u << 4), //---------------------------------------------------------------------- // eFlagTryTargetAPILock // // Attempts to acquire the target lock if a target is selected in the // command interpreter. If the command object fails to acquire the API // lock, the command will fail with an appropriate error message. //---------------------------------------------------------------------- eFlagTryTargetAPILock = (1u << 5), //---------------------------------------------------------------------- // eFlagProcessMustBeLaunched // // Verifies that there is a launched process in m_exe_ctx, if there // isn't, the command will fail with an appropriate error message. //---------------------------------------------------------------------- eFlagProcessMustBeLaunched = (1u << 6), //---------------------------------------------------------------------- // eFlagProcessMustBePaused // // Verifies that there is a paused process in m_exe_ctx, if there // isn't, the command will fail with an appropriate error message. //---------------------------------------------------------------------- eFlagProcessMustBePaused = (1u << 7) }; Now each command object contains a "ExecutionContext m_exe_ctx;" member variable that gets initialized prior to running the command. The validity of the target objects in m_exe_ctx are checked to ensure that any target/process/thread/frame/reg context that are required are valid prior to executing the command. Each command object also contains a Mutex::Locker m_api_locker which gets used if eFlagTryTargetAPILock is set. This centralizes a lot of checking code that was previously and inconsistently implemented across many commands. llvm-svn: 171990
* Add a "--reverse" or "-r" option to the "list" with no options command. ↵Jim Ingham2013-01-093-44/+94
| | | | | | | | | | | This will list backwards from the last source point listed. Also fix the setting of the default file & line to the file containing main, when you do a plain "list". <rdar://problem/12685226> llvm-svn: 171945
* Updated documentation on the "register_data_addr" key that can be supplied ↵Greg Clayton2013-01-091-0/+5
| | | | | | in the "thread" dictionary return value for the python OS plug-ins. llvm-svn: 171934
* Add an SBProcess API to get the current StopID, either considering or ↵Jim Ingham2013-01-086-2/+62
| | | | | | | | | | ignoring stops caused by expression evaluation. <rdar://problem/12968562> llvm-svn: 171914
* <rdar://problem/12976225>Han Ming Ong2013-01-086-6/+98
| | | | | | Checking in the support for doing index ids reservation when given a thread id. llvm-svn: 171904
* <rdar://problem/12586010>Greg Clayton2013-01-082-5/+4
| | | | | | | | Python OS plug-ins now fetch thread registers lazily. Also changed SBCommandInterpreter::HandleCommand() to not take the API lock. The logic here is that from the command line you can execute a command that might result in another thread (like the private process thread) to execute python or run any code that can re-enter the public API. When this happens, a deadlock immediately occurs for things like "process launch" and "process attach". llvm-svn: 171901
* Fixed comment typo.Greg Clayton2013-01-081-1/+1
| | | | llvm-svn: 171900
* Add test to check the number of threads.Matt Kopec2013-01-083-0/+129
| | | | llvm-svn: 171869
OpenPOWER on IntegriCloud