summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint
Commit message (Collapse)AuthorAgeFilesLines
...
* Some Breakpoint:: methods crept down be log the ↵Jim Ingham2012-02-091-63/+62
| | | | | | Breakpoint::BreakpointEventData methods. llvm-svn: 150131
* Send Breakpoint Changed events for all the relevant changes to breakpoints.Jim Ingham2012-02-084-38/+318
| | | | | | | Also, provide and use accessors for the thread options on breakpoints so we can control sending the appropriate events. llvm-svn: 150057
* Add const-ness to BreakpointLocation::IsEnabled().Johnny Chen2012-02-011-1/+1
| | | | llvm-svn: 149523
* Reverted 149277 changeset. It was coded that way for a reason.Johnny Chen2012-01-301-4/+6
| | | | llvm-svn: 149292
* Add "watch set" command as a more general interface in conjunction with ↵Johnny Chen2012-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | "frame var -w". Also add test cases for watching a variable as well as a location expressed as an expression. o TestMyFirstWatchpoint.py: Modified to test "watchpoint set -w write global". o TestWatchLocationWithWatchSet.py: Added to test "watchpoint set -w write -x 1 g_char_ptr + 7" where a contrived example program with several threads is supposed to only access the array index within the range [0..6], but there's some misbehaving thread writing past the range. rdar://problem/10701761 llvm-svn: 149280
* Make BreakpointLocation::IsEnabled() consistent with the ↵Johnny Chen2012-01-301-6/+4
| | | | | | BreakpointLocation::SetEnabled() implementation. llvm-svn: 149277
* Switching back to using std::tr1::shared_ptr. We originally switched awayGreg Clayton2012-01-293-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | due to RTTI worries since llvm and clang don't use RTTI, but I was able to switch back with no issues as far as I can tell. Once the RTTI issue wasn't an issue, we were looking for a way to properly track weak pointers to objects to solve some of the threading issues we have been running into which naturally led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared pointer from just a pointer, which is also easily solved using the std::tr1::enable_shared_from_this class. The main reason for this move back is so we can start properly having weak references to objects. Currently a lldb_private::Thread class has a refrence to its parent lldb_private::Process. This doesn't work well when we now hand out a SBThread object that contains a shared pointer to a lldb_private::Thread as this SBThread can be held onto by external clients and if they end up using one of these objects we can easily crash. So the next task is to start adopting std::tr1::weak_ptr where ever it makes sense which we can do with lldb_private::Debugger, lldb_private::Target, lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and many more objects now that they are no longer using intrusive ref counted pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive pointers). llvm-svn: 149207
* For Dump(Stream *s), use GetOptionsNoCreate()->GetIgnoreCount() and fix the ↵Johnny Chen2012-01-261-8/+8
| | | | | | indentation. llvm-svn: 149002
* Typo.Johnny Chen2012-01-251-1/+1
| | | | llvm-svn: 148994
* Minor comment change. Plus use member function instead of directly ↵Johnny Chen2012-01-241-1/+1
| | | | | | accessing member field. llvm-svn: 148756
* Tiny refactoring to use member functions instead of directly accessing ↵Johnny Chen2012-01-233-6/+7
| | | | | | member fields. llvm-svn: 148743
* Don't set breakpoints independently comp unit by comp unit, but look over ↵Jim Ingham2012-01-131-42/+108
| | | | | | | | | all the file & line matches and only pick the "best" ones. <rdar://problem/10685990> llvm-svn: 148087
* The "desired result type" code in the expressionSean Callanan2011-12-212-9/+5
| | | | | | | | | | | | | | | | | | | | | | parser has hitherto been an implementation waiting for a use. I have now tied the '-o' option for the expression command -- which indicates that the result is an Objective-C object and needs to be printed -- to the ExpressionParser, which communicates the desired type to Clang. Now, if the result of an expression is determined by an Objective-C method call for which there is no type information, that result is implicitly cast to id if and only if the -o option is passed to the expression command. (Otherwise if there is no explicit cast Clang will issue an error. This behavior is identical to what happened before r146756.) Also added a testcase for -o enabled and disabled. llvm-svn: 147099
* Fixed some extra warnings that show up with the new clang.Greg Clayton2011-12-032-3/+3
| | | | llvm-svn: 145735
* Process IDs (lldb::pid_t) and thread IDs (lldb::tid_t) are now 64 bit. This Greg Clayton2011-12-011-1/+1
| | | | | | | | will allow us to represent a process/thread ID using a pointer for the OS plug-ins where they might want to represent the process or thread ID using the address of the process or thread structure. llvm-svn: 145644
* Added a language parameter to the expression parser,Sean Callanan2011-11-072-4/+4
| | | | | | | | | | | which will in the future allow expressions to be compiled as C, C++, and Objective-C instead of the current default Objective-C++. This feature requires some additional support from Clang -- specifically, it requires reference types in the parser regardless of language -- so it is not yet exposed to the user. llvm-svn: 144042
* Add a commnad to set a condition for a watchpoint. Example:Johnny Chen2011-10-171-12/+53
| | | | | | | | | | | | | | | watchpoint modify -c 'global==5' modifies the last created watchpoint so that the condition expression is evaluated at the stop point to decide whether we should proceed with the stopping. Also add SBWatchpont::SetCondition(const char *condition) to set condition programmatically. Test cases to come later. llvm-svn: 142227
* Add SBWatchpoint::GetError() API, which is not currently populated as yet.Johnny Chen2011-10-141-1/+3
| | | | llvm-svn: 141979
* SBValue::Watch() and SBValue::WatchPointee() are now the official API for ↵Johnny Chen2011-10-143-262/+262
| | | | | | | | | | | | | | | | | | creating a watchpoint for either the variable encapsulated by SBValue (Watch) or the pointee encapsulated by SBValue (WatchPointee). Removed SBFrame::WatchValue() and SBFrame::WatchLocation() API as a result of that. Modified the watchpoint related test suite to reflect the change. Plus replacing WatchpointLocation with Watchpoint throughout the code base. There are still cleanups to be dome. This patch passes the whole test suite. Check it in so that we aggressively catch regressions. llvm-svn: 141925
* Removed namespace qualification from symbol queries.Sean Callanan2011-10-131-1/+1
| | | | llvm-svn: 141866
* Added ClangNamespaceDecl * parameters to severalSean Callanan2011-10-121-5/+7
| | | | | | | core Module functions that the expression parser will soon be using. llvm-svn: 141766
* Move the responsibility for translating the various eFunctionNameType ↵Jim Ingham2011-10-071-107/+3
| | | | | | | | | | lookups to the SymbolFIle (it was done mostly in the BreakpointResolverName resolver before.) Then tailor our searches to the way the indexed maps are laid out. This removes a bunch of test case failures using indexed dSYM's. llvm-svn: 141428
* Simplify the verbose output of WatchpointLocation::DumpWithLevel().Johnny Chen2011-10-061-6/+12
| | | | llvm-svn: 141307
* Export the watchpoint related API (SBWatchpointLocation class and added ↵Johnny Chen2011-09-271-1/+0
| | | | | | | | | | | | | | SBTarget methods) to the Python interface. Implement yet another (threre're 3 now) iterator protocol for SBTarget: watchpoint_location_iter(), to iterate on the available watchpoint locations. And add a print representation for SBWatchpointLocation. Exercise some of these Python API with TestWatchpointLocationIter.py. llvm-svn: 140595
* Add SB API class SBWatchpointLocation and some extra methods to the SBTarget ↵Johnny Chen2011-09-262-1/+1
| | | | | | | | | | | class to iterate on the available watchpoint locations and to perform watchpoint manipulations. I still need to export the SBWatchpointLocation class as well as the added watchpoint manipulation methods to the Python interface. And write test cases for them. llvm-svn: 140575
* Added the ability to restrict breakpoints by function name, function regexp, ↵Jim Ingham2011-09-232-51/+71
| | | | | | | | | | selector etc to specific source files. Added SB API's to specify these source files & also more than one module. Added an "exact" option to CompileUnit's FindLineEntry API. llvm-svn: 140362
* Add initial implementation of watchpoint commands for list, enable, disable, ↵Johnny Chen2011-09-222-51/+41
| | | | | | | | and delete. Test cases to be added later. llvm-svn: 140322
* Converted the lldb_private::Process over to use the intrusiveGreg Clayton2011-09-221-4/+5
| | | | | | | | | | | | | | | | | | | | shared pointers. Changed the ExecutionContext over to use shared pointers for the target, process, thread and frame since these objects can easily go away at any time and any object that was holding onto an ExecutionContext was running the risk of using a bad object. Now that the shared pointers for target, process, thread and frame are just a single pointer (they all use the instrusive shared pointers) the execution context is much safer and still the same size. Made the shared pointers in the the ExecutionContext class protected and made accessors for all of the various ways to get at the pointers, references, and shared pointers. llvm-svn: 140298
* StopInfoWatchpoint should override the StopInfo::ShouldStop() virtual method ↵Johnny Chen2011-09-211-2/+6
| | | | | | | | | and delegate to the WatchpointLocation object to check whether it should stop and allow it to update the hit count, among other bookkeepings. llvm-svn: 140279
* Add a new breakpoint type "break by source regular expression".Jim Ingham2011-09-213-6/+154
| | | | | | | | | Fix the RegularExpression class so it has a real copy constructor. Fix the breakpoint setting with multiple shared libraries so it makes one breakpoint not one per shared library. Add SBFileSpecList, to be used to expose the above to the SB interface (not done yet.) llvm-svn: 140225
* Add some watchpoint maintenance methods to the Target class.Johnny Chen2011-09-202-3/+18
| | | | | | Plus some minor changes to the WatchpointLocationList and WatchpointLocation classes. llvm-svn: 140211
* Update declarations for all functions/methods that accept printf-styleJason Molenda2011-09-204-4/+4
| | | | | | | | stdarg formats to use __attribute__ format so the compiler can flag incorrect uses. Fix all incorrect uses. Most of these are innocuous, a few were resulting in crashes. llvm-svn: 140185
* Add GetByIndex() methods to the WatchpointLocationList class to facilitate ↵Johnny Chen2011-09-191-1/+38
| | | | | | | | iteration through the watchpoint locations by index. llvm-svn: 140071
* Adopt the intrusive pointers in:Greg Clayton2011-09-173-14/+9
| | | | | | | | | | | | lldb_private::Breakpoint lldb_private::BreakpointLocations lldb_private::BreakpointSite lldb_private::Debugger lldb_private::StackFrame lldb_private::Thread lldb_private::Target llvm-svn: 139985
* Add a declaraion info member field to the WatchpointLocation class.Johnny Chen2011-09-162-13/+41
| | | | | | | Modify CommandObjectFrame.cpp to populate this field when creating a watchpoint location. Update the test case to verify that the declaration info matches the file and line number. llvm-svn: 139946
* Add cleanup of watchpoint locations during Target::DeleteCurrentProcess().Johnny Chen2011-09-151-0/+10
| | | | llvm-svn: 139840
* This patch modifies the expression parser to allow itSean Callanan2011-09-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to execute expressions even in the absence of a process. This allows expressions to run in situations where the target cannot run -- e.g., to perform calculations based on type information, or to inspect a binary's static data. This modification touches the following files: lldb-private-enumerations.h Introduce a new enum specifying the policy for processing an expression. Some expressions should always be JITted, for example if they are functions that will be used over and over again. Some expressions should always be interpreted, for example if the target is unsafe to run. For most, it is acceptable to JIT them, but interpretation is preferable when possible. Target.[h,cpp] Have EvaluateExpression now accept the new enum. ClangExpressionDeclMap.[cpp,h] Add support for the IR interpreter and also make the ClangExpressionDeclMap more robust in the absence of a process. ClangFunction.[cpp,h] Add support for the new enum. IRInterpreter.[cpp,h] New implementation. ClangUserExpression.[cpp,h] Add support for the new enum, and for running expressions in the absence of a process. ClangExpression.h Remove references to the old DWARF-based method of evaluating expressions, because it has been superseded for now. ClangUtilityFunction.[cpp,h] Add support for the new enum. ClangExpressionParser.[cpp,h] Add support for the new enum, remove references to DWARF, and add support for checking whether the expression could be evaluated statically. IRForTarget.[h,cpp] Add support for the new enum, and add utility functions to support the interpreter. IRToDWARF.cpp Removed CommandObjectExpression.cpp Remove references to the obsolete -i option. Process.cpp Modify calls to ClangUserExpression::Evaluate to pass the correct enum (for dlopen/dlclose) SBValue.cpp Add support for the new enum. SBFrame.cpp Add support for he new enum. BreakpointOptions.cpp Add support for the new enum. llvm-svn: 139772
* Add logging to Target::CreateWatchpointLocation() and fix some bug of using ↵Johnny Chen2011-09-141-3/+1
| | | | | | | | the wrong variable. Plus simplify WatchpointLocation::Dump() output. llvm-svn: 139724
* Watchpoint WIP:Johnny Chen2011-09-132-1/+6
| | | | | | | | | | | | | | | | | o WatchpointLocationList: Add a GetListMutex() method. o WatchpointLocation: Fix Dump() method where there was an extra % in the format string. o Target.cpp: Add implementation to CreateWatchpointLocation() to create and enable a watchpoint. o DNBArchImplX86_64.cpp: Fix bugs in SetWatchpoint()/ClearWatchpoint() where '==' was used, instead of '=', to assign/reset the data break address to a debug register. Also fix bugs where a by reference debug_state should have been used, not by value. llvm-svn: 139666
* Add trivial implementation for GetDescription().Johnny Chen2011-09-131-1/+2
| | | | llvm-svn: 139568
* Watchpoint WIP:Johnny Chen2011-09-121-0/+7
| | | | | | | | | | | | o Rename from OptionGroupWatchpoint::WatchMode to OptionGroupWatchpoint::WatchType, and CommandArgumentType::eArgTypeWatchMode to CommandArgumentType::eArgTypeWatchType. Update the sources to reflect the change. o Add a CreateWatchpointLocation() method to Target class, which is currently not implmeneted (returns an empty WatchpointLocationSP object). Add logic to CommandObjectFrame::Execute() to exercise the added API for creating a watchpoint location. llvm-svn: 139560
* Fill out implementation of Enable/DisableWatchpoint() for ProcessGDBRemote ↵Johnny Chen2011-09-061-1/+1
| | | | | | | | class (Not Tested Yet). Also update the signature of WatchpointLocation::SetEnable() to take a bool as input arg. llvm-svn: 139198
* Add a data type WatchpointLocationList to the repository. A Target contains ↵Johnny Chen2011-09-061-0/+190
| | | | | | | | an instance of watchpoint location list. Also add a typefed for WatchpointLocationSP to lldb-forward-rtti.h. llvm-svn: 139166
* Change the signature of WatchpointLocation ctor so that the second param becomesJohnny Chen2011-09-061-2/+2
| | | | | | | 'size_t size', instead of 'lldb::tid_t tid'. Pass size to the StoppointLocation ctor as well. llvm-svn: 139131
* Added alpha .debug_names and .debug_types support in the DWARF parser.Greg Clayton2011-09-021-7/+9
| | | | llvm-svn: 138996
* Make ValueObject::SetValueFromCString work correctly.Jim Ingham2011-08-121-1/+1
| | | | | | | | | | | | | | | | Also change the SourceInitFile to look for .lldb-<APPNAME> and source that preferentially if it exists. Also made the breakpoint site report its address as well as its breakpoint number when it gets hit and can't find any the associated locations (usually because the breakpoint got disabled or deleted programmatically between the time it was hit and reported.) Changed ThreadPlanCallFunction to initialize the ivar m_func in the initializers of the constructor, rather than waiting to initialize till later on in the function. Fixed a bug where if you make an SBError and the ask it Success, it returns false. Fixed ValueObject::ResolveValue so that it resolves a temporary value, rather than overwriting the one in the value object. llvm-svn: 137536
* Silence the static analyzer.Johnny Chen2011-08-111-11/+2
| | | | llvm-svn: 137360
* To silence the static analyzer.Johnny Chen2011-08-111-2/+0
| | | | llvm-svn: 137355
* Move the handling of breakpoint conditions from the Private event loop to ↵Jim Ingham2011-08-091-31/+0
| | | | | | | | | | | the StopInfoBreakpoint::DoActions, which happens as the event is removed. Also use the return value of asynchronous breakpoint callbacks, they get checked before, and override the breakpoint conditions. Added ProcessModInfo class, to unify "stop_id generation" and "memory modification generation", and use where needed. llvm-svn: 137102
* Added the ability to _not_ skip the prologue when settings breakpoints Greg Clayton2011-07-121-14/+14
| | | | | | | | | | | | | | by name by adding an extra parameter to the lldb_private::Target breakpoint setting functions. Added a function in the DWARF symbol file plug-in that can dump errors and prints out which DWARF file the error is happening in so we can track down what used to be assertions easily. Fixed the MacOSX kernel plug-in to properly read the kext images and set the kext breakpoint to watch for kexts as they are loaded. llvm-svn: 134990
OpenPOWER on IntegriCloud