aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectBreakpoint.h
AgeCommit message (Collapse)AuthorFilesLines
2016-09-06*** This commit represents a complete reformatting of the LLDB source codeKate Stone1-17/+17
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
2015-09-02Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify ↵Pavel Labath1-3/+2
closing inclusion guards patch by Eugene Zelenko. Differential Revision: http://reviews.llvm.org/D12207 llvm-svn: 246628
2014-12-16Add the ability to tag one or more breakpoints with a name. TheseJim Ingham1-1/+13
names can then be used in place of breakpoint id's or breakpoint id ranges in all the commands that operate on breakpoints. <rdar://problem/10103959> llvm-svn: 224392
2012-06-08Make raw & parsed commands subclasses of CommandObject rather than having ↵Jim Ingham1-320/+0
the raw version implement an Execute which was never going to get run and another ExecuteRawCommandString. Took the knowledge of how to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs. Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for the overall command and moved them into the .cpp file. Made the CommandObject flags work for raw as well as parsed commands. Made "expr" use the flags so that it requires you to be paused to run "expr". llvm-svn: 158235
2012-05-25rdar://problem/11533713Johnny Chen1-0/+1
Allow setting conditions inline with breakpoints. Add test cases. llvm-svn: 157497
2012-05-22Also push file & line breakpoints past the prologue. Also added a "-K" ↵Jim Ingham1-0/+1
argument to the relevant "break set" commands to set this per breakpoint. Also, some CreateBreakpoint API's in the lldb_private namespace had "internal" first and "skip_prologue" second. "internal should always be last. Fixed that. rdar://problem/11484729 llvm-svn: 157225
2012-03-06Add a command and an SB API to create exception breakpoints. Make the break ↵Jim Ingham1-2/+6
output prettier for Exception breakpoints. llvm-svn: 152081
2011-09-23Added the ability to restrict breakpoints by function name, function regexp, ↵Jim Ingham1-3/+3
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
2011-09-21Add a new breakpoint type "break by source regular expression".Jim Ingham1-1/+6
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
2011-04-13Added two new classes for command options:Greg Clayton1-8/+8
lldb_private::OptionGroup lldb_private::OptionGroupOptions OptionGroup lets you define a class that encapsulates settings that you want to reuse in multiple commands. It contains only the option definitions and the ability to set the option values, but it doesn't directly interface with the lldb_private::Options class that is the front end to all of the CommandObject option parsing. For that the OptionGroupOptions class can be used. It aggregates one or more OptionGroup objects and directs the option setting to the appropriate OptionGroup class. For an example of this, take a look at the CommandObjectFile and how it uses its "m_option_group" object shown below to be able to set values in both the FileOptionGroup and PlatformOptionGroup classes. The members used in CommandObjectFile are: OptionGroupOptions m_option_group; FileOptionGroup m_file_options; PlatformOptionGroup m_platform_options; Then in the constructor for CommandObjectFile you can combine the option settings. The code below shows a simplified version of the constructor: CommandObjectFile::CommandObjectFile(CommandInterpreter &interpreter) : CommandObject (...), m_option_group (interpreter), m_file_options (), m_platform_options(true) { m_option_group.Append (&m_file_options); m_option_group.Append (&m_platform_options); m_option_group.Finalize(); } We append the m_file_options and then the m_platform_options and then tell the option group the finalize the results. This allows the m_option_group to become the organizer of our prefs and after option parsing we end up with valid preference settings in both the m_file_options and m_platform_options objects. This also allows any other commands to use the FileOptionGroup and PlatformOptionGroup classes to implement options for their commands. Renamed: virtual void Options::ResetOptionValues(); to: virtual void Options::OptionParsingStarting(); And implemented a new callback named: virtual Error Options::OptionParsingFinished(); This allows Options subclasses to verify that the options all go together after all of the options have been specified and gives the chance for the command object to return an error. It also gives a chance to take all of the option values and produce or initialize objects after all options have completed parsing. Modfied: virtual Error SetOptionValue (int option_idx, const char *option_arg) = 0; to be: virtual Error SetOptionValue (uint32_t option_idx, const char *option_arg) = 0; (option_idx is now unsigned). llvm-svn: 129415
2011-04-07Modified the ArchSpec to take an optional "Platform *" when setting the triple.Greg Clayton1-4/+4
This allows you to have a platform selected, then specify a triple using "i386" and have the remaining triple items (vendor, os, and environment) set automatically. Many interpreter commands take the "--arch" option to specify an architecture triple, so now the command options needed to be able to get to the current platform, so the Options class now take a reference to the interpreter on construction. Modified the build LLVM building in the Xcode project to use the new Xcode project level user definitions: LLVM_BUILD_DIR - a path to the llvm build directory LLVM_SOURCE_DIR - a path to the llvm sources for the llvm that will be used to build lldb LLVM_CONFIGURATION - the configuration that lldb is built for (Release, Release+Asserts, Debug, Debug+Asserts). I also changed the LLVM build to not check if "lldb/llvm" is a symlink and then assume it is a real llvm build directory versus the unzipped llvm.zip package, so now you can actually have a "lldb/llvm" directory in your lldb sources. llvm-svn: 129112
2011-03-24Fixed the LLDB build so that we can have private types, private enums andGreg Clayton1-8/+8
public types and public enums. This was done to keep the SWIG stuff from parsing all sorts of enums and types that weren't needed, and allows us to abstract our API better. llvm-svn: 128239
2011-02-05Header patch, virtual dtor patch and missed UUID patch from Kirk Beitz.Greg Clayton1-1/+1
llvm-svn: 124931
2010-12-03Documentation fix - explain how to unset conditions. Also fix unsetting -x ↵Jim Ingham1-0/+2
and -t so they work. llvm-svn: 120851
2010-11-02Fixed the default file and line breakpoints to include inlined breakpoints.Greg Clayton1-1/+1
llvm-svn: 118002
2010-10-28Check in an initial implementation of the "breakpoint clear" command, whose ↵Johnny Chen1-1/+61
purpose is clear the breakpoint associated with the (filename, line_number) combo when an arrow is pointing to a source position using Emacs Grand Unified Debugger library to interact with lldb. The current implmentation is insufficient in that it only asks the breakpoint whether it is associated with a breakpoint resolver with FileLine type and whether it matches the (filename, line_number) combo. There are other breakpoint resolver types whose breakpoint locations can potentially match the (filename, line_number) combo. The BreakpointResolver, BreakpointResolverName, BreakpointResolverAddress, and BreakpointResolverFileLine classes have extra static classof methods to support LLVM style type inquiry through isa, cast, and dyn_cast. The Breakpoint class has an API method bool GetMatchingFileLine(...) which is invoked from CommandObjectBreak.cpp to implement the "breakpoint clear" command. llvm-svn: 117562
2010-10-14Added support for breakpoint conditions. I also had to separate the "run ↵Jim Ingham1-0/+2
the expression" part of ClangFunction::Execute from the "Gather the expression result" so that in the case of the Breakpoint condition I can move the condition evaluation into the normal thread plan processing. Also added support for remembering the "last set breakpoint" so that "break modify" will act on the last set breakpoint. llvm-svn: 116542
2010-09-18Fixed the way set/show variables were being accessed to being natively Greg Clayton1-18/+12
accessed by the objects that own the settings. The previous approach wasn't very usable and made for a lot of unnecessary code just to access variables that were already owned by the objects. While I fixed those things, I saw that CommandObject objects should really have a reference to their command interpreter so they can access the terminal with if they want to output usaage. Fixed up all CommandObjects to take an interpreter and cleaned up the API to not need the interpreter to be passed in. Fixed the disassemble command to output the usage if no options are passed down and arguments are passed (all disassebmle variants take options, there are no "args only"). llvm-svn: 114252
2010-07-09Merged Eli Friedman's linux build changes where he added Makefile files thatGreg Clayton1-3/+3
enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
2010-06-28Added function name types to allow us to set breakpoints by name moreGreg Clayton1-2/+3
intelligently. The four name types we currently have are: eFunctionNameTypeFull = (1 << 1), // The function name. // For C this is the same as just the name of the function // For C++ this is the demangled version of the mangled name. // For ObjC this is the full function signature with the + or // - and the square brackets and the class and selector eFunctionNameTypeBase = (1 << 2), // The function name only, no namespaces or arguments and no class // methods or selectors will be searched. eFunctionNameTypeMethod = (1 << 3), // Find function by method name (C++) with no namespace or arguments eFunctionNameTypeSelector = (1 << 4) // Find function by selector name (ObjC) names this allows much more flexibility when setting breakoints: (lldb) breakpoint set --name main --basename (lldb) breakpoint set --name main --fullname (lldb) breakpoint set --name main --method (lldb) breakpoint set --name main --selector The default: (lldb) breakpoint set --name main will inspect the name "main" and look for any parens, or if the name starts with "-[" or "+[" and if any are found then a full name search will happen. Else a basename search will be the default. Fixed some command option structures so not all options are required when they shouldn't be. Cleaned up the breakpoint output summary. Made the "image lookup --address <addr>" output much more verbose so it shows all the important symbol context results. Added a GetDescription method to many of the SymbolContext objects for the more verbose output. llvm-svn: 107075
2010-06-23Very large changes that were needed in order to allow multiple connectionsGreg Clayton1-19/+13
to the debugger from GUI windows. Previously there was one global debugger instance that could be accessed that had its own command interpreter and current state (current target/process/thread/frame). When a GUI debugger was attached, if it opened more than one window that each had a console window, there were issues where the last one to setup the global debugger object won and got control of the debugger. To avoid this we now create instances of the lldb_private::Debugger that each has its own state: - target list for targets the debugger instance owns - current process/thread/frame - its own command interpreter - its own input, output and error file handles to avoid conflicts - its own input reader stack So now clients should call: SBDebugger::Initialize(); // (static function) SBDebugger debugger (SBDebugger::Create()); // Use which ever file handles you wish debugger.SetErrorFileHandle (stderr, false); debugger.SetOutputFileHandle (stdout, false); debugger.SetInputFileHandle (stdin, true); // main loop SBDebugger::Terminate(); // (static function) SBDebugger::Initialize() and SBDebugger::Terminate() are ref counted to ensure nothing gets destroyed too early when multiple clients might be attached. Cleaned up the command interpreter and the CommandObject and all subclasses to take more appropriate arguments. llvm-svn: 106615
2010-06-19Remember whether a queue or thread name were passed into "breakpoint modify" ↵Jim Ingham1-0/+2
so we can recognize an empty argument as unsetting the option. llvm-svn: 106377
2010-06-18Change "breakpoint configure" to "breakpoint modify" so it doesn't collide ↵Jim Ingham1-4/+6
with "breakpoint command" Change "breakpoint enable/disable" so changing a breakpoint's state doesn't also overwrite the location states. llvm-svn: 106261
2010-06-16Add a "thread specification" class that specifies thread specific ↵Jim Ingham1-0/+64
breakpoints by name, index, queue or TID. Push this through all the breakpoint management code. Allow this to be set when the breakpoint is created. Fix the Process classes so that a breakpoint hit that is not for a particular thread is not reported as a breakpoint hit event for that thread. Added a "breakpoint configure" command to allow you to reset any of the thread specific options (or the ignore count.) llvm-svn: 106078
2010-06-15Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.Jim Ingham1-1/+1
llvm-svn: 106034
2010-06-09More minor build fixes.Eli Friedman1-1/+1
llvm-svn: 105706
2010-06-08Initial checkin of lldb code from internal Apple repo.Chris Lattner1-0/+235
llvm-svn: 105619