summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
Commit message (Collapse)AuthorAgeFilesLines
* Enable the ability to enable debug info generation when evaluating expressions.Greg Clayton2014-07-111-0/+12
| | | | llvm-svn: 212792
* If a breakpoint gets deleted, any SBBreakpoints representing thatJim Ingham2014-07-021-1/+6
| | | | | | breakpoint should return false from IsValid. llvm-svn: 212206
* Fix typos.Bruce Mitchener2014-07-011-1/+1
| | | | llvm-svn: 212132
* Added an option to turn OFF the "detach on error" behavior that was addedJim Ingham2014-06-251-0/+12
| | | | | | | | to debugserver when launching processes. <rdar://problem/16216199> llvm-svn: 211658
* Fix up Windows build for the SBUnixSignals addition.Todd Fiala2014-06-241-0/+3
| | | | | | Change by Zachary Turner. llvm-svn: 211635
* Add API control of the signal disposition.Todd Fiala2014-06-233-0/+214
| | | | | | | | | | | | See http://reviews.llvm.org/D4221 for details. This commit allows you to control the signals that lldb will suppress, stop or forward using the Python and C++ APIs. Change by Russell Harmon. Xcode build system changes (and any mistakes) by Todd Fiala. Tested on MacOSX 10.9.3 and Xcode 6 beta. (Xcode 5 is hitting the dependency checker crasher on all my systems). llvm-svn: 211526
* Remove unused variablesSaleem Abdulrasool2014-06-131-11/+0
| | | | | | | | Address the 'variable set but not used' warning from GCC. In some cases a few additional calls were removed where there should be no visible side effects of the calls (i.e. should not effect any cached state). llvm-svn: 210879
* Initial merge of some of the iOS 8 / Mac OS X Yosemite specificJason Molenda2014-06-132-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add support for inspecting enum members.Todd Fiala2014-06-023-0/+217
| | | | | | | | | Change by Russell Harmon. Xcode project updates (and all errors therein) by Todd Fiala. llvm-svn: 210046
* Don't allow two threads to both be in SBDebugger::Create() due to threading ↵Greg Clayton2014-05-191-0/+9
| | | | | | | | issues in FormatManager. <rdar://problem/16937126> llvm-svn: 209160
* Introduce the concept of a "display name" for typesEnrico Granata2014-05-172-0/+33
| | | | | | | | | | | | | | | | | | | | | | 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
* Add a new SBThread::SafeToCallFunctions API; this calls over toJason Molenda2014-05-131-0/+9
| | | | | | | | | | the SystemRuntime to check if a thread will have any problems performing an inferior function call so the driver can skip making that function call on that thread. Often the function call can be executed on another thread instead. <rdar://problem/16777874> llvm-svn: 208732
* Allow clients to control the exact path that is used to launch processes by ↵Greg Clayton2014-05-071-15/+30
| | | | | | | | | | | | | | | | adding new calls to SBLaunchInfo. The new calls are: SBFileSpec SBLaunchInfo::GetExecutableFile (); void SBLaunchInfo::SetExecutableFile (SBFileSpec exe_file, bool add_as_first_arg); <rdar://problem/16833939> llvm-svn: 208245
* Rename eExecution*** to eExpression*** to be consistent with the result type.Jim Ingham2014-05-052-2/+2
| | | | llvm-svn: 207945
* Make the Expression Execution result enum available to the SB API layer.Jim Ingham2014-05-053-2/+8
| | | | | | | | | Add a callback that will allow an expression to be cancelled between the expression evaluation stages (for the ClangUserExpressions.) <rdar://problem/16790467>, <rdar://problem/16573440> llvm-svn: 207944
* Add a new SBThread::GetQueue() method to get the queue that is Jason Molenda2014-04-252-0/+39
| | | | | | | | | | currently associated with a given thread, on relevant targets. Change the queue detection code to verify that the queues associated with all live threads are included in the list. <rdar://problem/16411314> llvm-svn: 207160
* Included <inttypes.h> in a few headers that wereSean Callanan2014-04-192-0/+3
| | | | | | | using preprocessor constants for printf() format specifications. llvm-svn: 206679
* Fixed SBThread.GetStopReasonDataAtIndex() to correctly return breakpoint ↵Greg Clayton2014-04-111-1/+1
| | | | | | | | location ID. Patch from Vyacheslav Karpukhin. llvm-svn: 206040
* sweep up -Wformat warnings from gccSaleem Abdulrasool2014-04-0431-1042/+1305
| | | | | | | This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
* Make the fail messagesJim Ingham2014-04-031-1/+2
| | | | llvm-svn: 205497
* sanitise sign comparisonsSaleem Abdulrasool2014-04-021-1/+2
| | | | | | | | This is a mechanical change addressing the various sign comparison warnings that are identified by both clang and gcc. This helps cleanup some of the warning spew that occurs during builds. llvm-svn: 205390
* Add the ability to set python breakpoint commands from the SBBreakpoint & ↵Jim Ingham2014-04-022-1/+87
| | | | | | | | | | | SBBreakpointLocation API's. You can either provide the function name, or function body text. Also propagate the compilation error up from where it is checked so we can report compilation errors. <rdar://problem/9898371> llvm-svn: 205380
* lldb arm64 import.Jason Molenda2014-03-292-0/+37
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* Add the ability from the SB API's to set the "one thread" timeoutJim Ingham2014-03-281-0/+12
| | | | | | | | for expression evaluations that try one and then all threads. <rdar://problem/15598528> llvm-svn: 205060
* Add a SBQueue::GetKind() method to retrieve the type of libdispatch queue ↵Jason Molenda2014-03-131-0/+17
| | | | | | | | (serial or concurrent). <rdar://problem/7964505> llvm-svn: 203748
* This commit reworks how the thread plan's ShouldStopHere mechanism works, so ↵Jim Ingham2014-03-131-4/+10
| | | | | | | | | | | | | | | that it is useful not only for customizing "step-in" behavior (e.g. step-in doesn't step into code with no debug info), but also the behavior of step-in/step-out and step-over when they step out of the frame they started in. I also added as a proof of concept of this reworking a mode for stepping where stepping out of a frame into a frame with no debug information will continue stepping out till it arrives at a frame that does have debug information. This is useful when you are debugging callback based code where the callbacks are separated from the code that initiated them by some library glue you don't care about, among other things. llvm-svn: 203747
* Add some missing defines that are already present in the cmake side.Hafiz Abid Qadeer2014-03-121-0/+4
| | | | | | This is to help fix mingw build. llvm-svn: 203649
* SBQueue::GetNumPendingItems() should not force a fetch of the pendingJason Molenda2014-03-091-6/+29
| | | | | | | | | items; the backing Queue object has the number of pending items already cached. Also, add SBQueue::GetNumRunningItems() to provide that information. <rdar://problem/16272016> llvm-svn: 203420
* Add inttypes.h to SBQueue.cpp (MSVC compilation error with PRIx32).Virgile Bello2014-03-081-0/+2
| | | | llvm-svn: 203348
* Add API logging to the SBQueue/SBQueueItem/SBThread calls.Jason Molenda2014-03-083-8/+77
| | | | llvm-svn: 203330
* When a client asks for a queue pending item's extended backtrace,Jason Molenda2014-03-061-5/+14
| | | | | | | | | | | hold a strong pointer to that extended backtrace thread in the Process just like we do for asking a thread's extended backtrace. Also, give extended backtrace threads an invalid ThreadIndexID number. We'll still give them valid thread_id's. Clients who want to know the original thread's IndexID can call GetExtendedBacktraceOriginatingIndexID(). <rdar://problem/16126034> llvm-svn: 203088
* "size_t" isn't always 64 bit, it is 32 bit on 32 bit systems. All printf ↵Greg Clayton2014-03-032-28/+28
| | | | | | | | style statements that were assuming size_t were 64 bit were changed, and they were also changed to display them as unsigned values as "size_t" isn't signed. If you print anything with 'size_t', please cast it to "uint64_t" in the printf and use PRIu64 or PRIx64. llvm-svn: 202738
* Fix Windows build using portable types for formatting the log outputsDeepak Panickal2014-03-033-16/+16
| | | | llvm-svn: 202723
* Better error reporting when a variable can't beSean Callanan2014-02-281-2/+3
| | | | | | | | | | | read during materialization. First of all, report if we can't read the data for some reason. Second, consult the ValueObject's error and report that if there's some problem. <rdar://problem/16074201> llvm-svn: 202552
* Plumb the EvaluateExpressionOptions::{Set,Get}StopOthers through the SB API, ↵Jim Ingham2014-02-281-0/+12
| | | | | | | | | and make it work in RunThreadPlan. Also remove SetStopOthers from the ThreadPlanCallFunction, because if the value you have doesn't match what is in the EvaluateExpressionOptions the plan was passed when created it won't work correctly. llvm-svn: 202464
* Restore the ability of SBFrame::FindValue() to look for file global variablesEnrico Granata2014-02-191-2/+10
| | | | | | This should clean up the new test failures caused by r201614 llvm-svn: 201710
* <rdar://problem/15960553>Enrico Granata2014-02-181-13/+7
| | | | | | Fix a bug where calling SBFrame::FindValue() would cause a copy of all variables in the block to be inserted in the frame's variable list, regardless of whether those same variables were there or not - which means one could end up with a frame with lots of duplicate copies of the same variables llvm-svn: 201614
* Modified ObjectFile::SetLoadAddress() to now be:Greg Clayton2014-02-072-2/+2
| | | | | | | | | | | | | | ObjectFile::SetLoadAddress (Target &target, lldb::addr_t value, bool value_is_offset); Now "value" is a slide if "value_is_offset" is true, and "value" is an image base address otherwise. All previous usage of this API was using slides. Updated the ObjectFileELF and ObjectFileMachO SetLoadAddress methods to do the right thing. Also updated the ObjectFileMachO::SetLoadAddress() function to not load __LINKEDIT when it isn't needed and to only load sections that belong to the executable object file. llvm-svn: 201003
* Change the Mac OS X SystemRuntime plugin from using the placeholderJason Molenda2014-02-052-26/+27
| | | | | | | | | | | | | | libldi library to collect extended backtrace information; switch to the libBacktraceRecording library and its APIs. Complete the work of adding QueueItems to Queues and allow for the QueueItems to be interrogated about their extended backtraces in turn. There's still cleanup and documentation to do on this code but the code is functional and I it's a good time to get the work-in-progress checked in. <rdar://problem/15314027> llvm-svn: 200822
* Merging the iohandler branch back into main. Greg Clayton2014-01-274-273/+72
| | | | | | | | | | | | 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
* Added the ability to get the type that a typedef points to via:Greg Clayton2014-01-232-0/+25
| | | | | | | | | | 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
* Add a new way to bind a format to a type: by enum typeEnrico Granata2013-12-281-9/+47
| | | | | | | | | | | 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
* FormatNavigator has long stopped navigating anything - the generation of ↵Enrico Granata2013-12-201-28/+28
| | | | | | | | | possible formatters matches is now done elsewhere So, rename the class for what it truly is: a FormattersContainer Also do a bunch of related text substitutions in the interest of overall naming clarity llvm-svn: 197795
* Fix how Queue/QueueItem weak pointers are initialized in the ctors.Jason Molenda2013-12-181-1/+2
| | | | llvm-svn: 197541
* Move the ivars / logic of SBQueue into a QueueImpl class and Jason Molenda2013-12-141-163/+274
| | | | | | | | change SBQueue to have a shared pointer to its corresponding QueueImpl object for binary compatibility. <rdar://problem/15657926> llvm-svn: 197300
* Centralized the launching of a process into Target::Launch()Greg Clayton2013-12-131-103/+34
| | | | | | | | | | | | | While investigating test suite failures when running the test suite remotely, I noticed we had 3 copies of code that launched a process: 1 - in "process launch" command 2 - SBTarget::Launch() with args 3 - SBTarget::Launch() with SBLaunchInfo "process launch" was launching through the platform if it was supported (this is needed for remote debugging) and the 2 and 3 were not. Now all code is in one place. llvm-svn: 197247
* Add new Queue, QueueItem, Queuelist, SBQueue, SBQueueItem classes to representJason Molenda2013-12-134-0/+424
| | | | | | | | | libdispatch aka Grand Central Dispatch (GCD) queues. Still fleshing out the documentation and testing of these but the overall API is settling down so it's a good time to check it in. <rdar://problem/15600370> llvm-svn: 197190
* Do a little more prevention against SBValues getting used after the world ↵Jim Ingham2013-12-061-2/+21
| | | | | | has been torn down around them. llvm-svn: 196616
* Add a setting to allow users to enable expressions that crash LLDB to show ↵Greg Clayton2013-12-061-10/+12
| | | | | | | | up in crash logs. <rdar://problem/11549320> llvm-svn: 196613
* For logical backtrace work, lldb needs to track Module unloads etc & ↵Greg Clayton2013-12-062-6/+41
| | | | | | | | | | 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
OpenPOWER on IntegriCloud