History log of /llvm-project/lldb/source/Commands/CommandObjectExpression.h (Results 26 – 50 of 61)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2
# e1cfbc79 11-Aug-2016 Todd Fiala <todd.fiala@gmail.com>

Decoupled Options from CommandInterpreter.

Options used to store a reference to the CommandInterpreter instance
in the base Options class. This made it impossible to parse options
independent of a

Decoupled Options from CommandInterpreter.

Options used to store a reference to the CommandInterpreter instance
in the base Options class. This made it impossible to parse options
independent of a CommandInterpreter.

This change removes the reference from the base class. Instead, it
modifies the options-parsing-related methods to take an
ExecutionContext pointer, which the options may inspect if they need
to do so.

Closes https://reviews.llvm.org/D23416
Reviewers: clayborg, jingham

llvm-svn: 278440

show more ...


Revision tags: llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1
# 3fe71581 12-May-2016 Marianne Mailhot-Sarrasin <marianne.mailhot.sarrasin@gmail.com>

[LLDB] Added support for PHI nodes to IR interpreter

This allows expressions such as 'i == 1 || i == 2` to be executed using the IR interpreter, instead of relying on JIT code injection (which may n

[LLDB] Added support for PHI nodes to IR interpreter

This allows expressions such as 'i == 1 || i == 2` to be executed using the IR interpreter, instead of relying on JIT code injection (which may not be available on some platforms).

Patch by cameron314

Differential Revision: http://reviews.llvm.org/D19124

llvm-svn: 269340

show more ...


# f52c40c5 09-May-2016 Sean Callanan <scallanan@apple.com>

Fixed multiline expressions, and removed some dead code.

IOHandlerLinesUpdated() does nothing, and IOHandlerIsInputComplete should be
implemented but isn't. This means that multiline expressions do

Fixed multiline expressions, and removed some dead code.

IOHandlerLinesUpdated() does nothing, and IOHandlerIsInputComplete should be
implemented but isn't. This means that multiline expressions don't work. This
patch fixes that. Test case to follow in the next commit.

llvm-svn: 268970

show more ...


# e5ee6f04 29-Mar-2016 Jim Ingham <jingham@apple.com>

Figure out what the fixed expression is, and print it. Added another target setting to
quietly apply fixits for those who really trust clang's fixits.

Also, moved the retry into ClangUserExpression

Figure out what the fixed expression is, and print it. Added another target setting to
quietly apply fixits for those who really trust clang's fixits.

Also, moved the retry into ClangUserExpression::Evaluate, where I can make a whole new ClangUserExpression
to do the work. Reusing any of the parts of a UserExpression in situ isn't supported at present.

<rdar://problem/25351938>

llvm-svn: 264793

show more ...


# 863fab69 28-Mar-2016 Sean Callanan <scallanan@apple.com>

Expose top-level Clang expressions via the command line and the API.

Top-level Clang expressions are expressions that act as new translation units,
and define their own symbols. They do not have fu

Expose top-level Clang expressions via the command line and the API.

Top-level Clang expressions are expressions that act as new translation units,
and define their own symbols. They do not have function wrappers like regular
expressions do, and declarations are persistent regardless of use of the dollar
sign in identifiers. Names defined by these are given priority over all other
symbol lookups.

This patch adds a new expression option, '-p' or '--top-level,' which controls
whether the expression is treated this way. It also adds a flag controlling
this to SBExpressionOptions so that this API is usable externally. It also adds
a test that validates that this works. (The test requires a fix to the Clang
AST importer which I will be committing shortly.)

<rdar://problem/22864976>

llvm-svn: 264662

show more ...


# a1e541bf 25-Mar-2016 Jim Ingham <jingham@apple.com>

Use Clang's FixItHints to correct expressions with "trivial" mistakes (e.g. "." for "->".)
This feature is controlled by an expression command option, a target property and the
SBExpressionOptions se

Use Clang's FixItHints to correct expressions with "trivial" mistakes (e.g. "." for "->".)
This feature is controlled by an expression command option, a target property and the
SBExpressionOptions setting. FixIt's are only applied to UserExpressions, not UtilityFunctions,
those you have to get right when you make them.

This is just a first stage. At present the fixits are applied silently. The next step
is to tell the user about the applied fixit.

<rdar://problem/25351938>

llvm-svn: 264379

show more ...


Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# f2bd5c3e 20-Oct-2015 Sean Callanan <scallanan@apple.com>

Added support to the expression command for dropping into the REPL at will.

"expr -r" does this. It also returns to a REPL if the LLDB command interpreter
is neseted inside it, for example in cases

Added support to the expression command for dropping into the REPL at will.

"expr -r" does this. It also returns to a REPL if the LLDB command interpreter
is neseted inside it, for example in cases where a REPL command resulted in a
breakpoint being hit or a crash.

llvm-svn: 250780

show more ...


# 1fb7e202 02-Sep-2015 Pavel Labath <labath@google.com>

Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards

patch by Eugene Zelenko.

Differential Revision: http://reviews.llvm.org/D12207

llvm-svn: 246628


Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2
# 15663c53 25-Jul-2015 Dawn Perchik <dawn@burble.org>

Specify a language to use when parsing expressions.

This patch adds the option -l/--language to the expression command, for
use when setting the language options or choosing an alternate FE. If
not

Specify a language to use when parsing expressions.

This patch adds the option -l/--language to the expression command, for
use when setting the language options or choosing an alternate FE. If
not specified, the target.language setting is used.

Reviewed by: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11447

llvm-svn: 243187

show more ...


Revision tags: llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1, llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1, llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1
# cf28a8b7 13-Mar-2014 Greg Clayton <gclayton@apple.com>

Allow a multi-line expression to follow expression commands with options when there is no expression following the option terminating “—“.

llvm-svn: 203872


# b6892508 11-Feb-2014 Greg Clayton <gclayton@apple.com>

When a multiline expression produces output, the multi-line help message is printed twice.

<rdar://problem/16031890>

llvm-svn: 201171


# 44d93782 27-Jan-2014 Greg Clayton <gclayton@apple.com>

Merging the iohandler branch back into main.

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 embe

Merging the iohandler branch back into main.

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

show more ...


Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# 62afb9f6 04-Nov-2013 Greg Clayton <gclayton@apple.com>

Added a "--debug" option to the "expression" command.

Cleaned up ClangUserExpression::Evaluate() to have only one variant that takes a "const EvaluateExpressionOptions& options" instead of taking m

Added a "--debug" option to the "expression" command.

Cleaned up ClangUserExpression::Evaluate() to have only one variant that takes a "const EvaluateExpressionOptions& options" instead of taking many arguments.

The "--debug" option is designed to allow you to debug your expression by stopping at the first instruction (it enables --ignore-breakpoints=true and --unwind-on-error=false) and allowing you to step through your JIT code. It needs to be more integrated with the thread plan, so I am checking this in so Jim Ingham can make it happen.

llvm-svn: 194009

show more ...


# 4d93b8cd 30-Sep-2013 Enrico Granata <egranata@apple.com>

<rdar://problem/14393032>

DumpValueObject() 2.0

This checkin restores pre-Xcode5 functionality to the "po" (expr -O) command:
- expr now has a new --description-verbosity (-v) argument, which takes

<rdar://problem/14393032>

DumpValueObject() 2.0

This checkin restores pre-Xcode5 functionality to the "po" (expr -O) command:
- expr now has a new --description-verbosity (-v) argument, which takes either compact or full as a value (-v is the same as -vfull)
When the full mode is on, "po" will show the extended output with type name, persistent variable name and value, as in
(lldb) expr -O -v -- foo
(id) $0 = 0x000000010010baf0 {
1 = 2;
2 = 3;
}

When -v is omitted, or -vcompact is passed, the Xcode5-style output will be shown, as in
(lldb) expr -O -- foo
{
1 = 2;
2 = 3;
}

- for a non-ObjectiveC object, LLDB will still try to retrieve a summary and/or value to display
(lldb) po 5
5
-v also works in this mode
(lldb) expr -O -vfull -- 5
(int) $4 = 5

On top of that, this is a major refactoring of the ValueObject printing code. The functionality is now factored into a ValueObjectPrinter class for easier maintenance in the future
DumpValueObject() was turned into an instance method ValueObject::Dump() which simply calls through to the printer code, Dump_Impl has been removed

Test case to follow

llvm-svn: 191694

show more ...


Revision tags: llvmorg-3.3.1-rc1, llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1
# 184e9811 15-Jan-2013 Jim Ingham <jingham@apple.com>

Separated the "expr --unwind-on-error" behavior into two parts, actual errors (i.e. crashes) which continue to be
controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately co

Separated the "expr --unwind-on-error" behavior into two parts, actual 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

show more ...


# b576bba2 09-Jan-2013 Enrico Granata <egranata@apple.com>

<rdar://problem/12028723>

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

<rdar://problem/12028723>

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

show more ...


Revision tags: llvmorg-3.2.0, llvmorg-3.2.0-rc3, llvmorg-3.2.0-rc2, llvmorg-3.2.0-rc1
# 35e1bda6 16-Oct-2012 Jim Ingham <jingham@apple.com>

Add the ability to set timeout & "run all threads" options both from the "expr" command and from
the SB API's that evaluate expressions.

<rdar://problem/12457211>

llvm-svn: 166062


# 5a988416 08-Jun-2012 Jim Ingham <jingham@apple.com>

Make raw & parsed commands subclasses of CommandObject rather than having the raw version implement an
Execute which was never going to get run and another ExecuteRawCommandString. Took the knowled

Make raw & parsed commands subclasses of CommandObject rather than having 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

show more ...


Revision tags: llvmorg-3.1.0, llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2, llvmorg-3.1.0-rc1
# a73d2692 27-Jan-2012 Greg Clayton <gclayton@apple.com>

There is no need to hold onto an ExecutionContext as a member variable.
ExecutionContext objects have shared pointers to Target, Process, Thread
and Frame objects and they can end up being held onto

There is no need to hold onto an ExecutionContext as a member variable.
ExecutionContext objects have shared pointers to Target, Process, Thread
and Frame objects and they can end up being held onto for too long.

llvm-svn: 149133

show more ...


Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3, llvmorg-3.0.0-rc2
# 1deb7962 25-Oct-2011 Greg Clayton <gclayton@apple.com>

Updated all commands that use a "--format" / "-f" options to use the new
OptionGroupFormat. Updated OptionGroupFormat to be able to also use the
"--size" and "--count" options. Commands that use a Op

Updated all commands that use a "--format" / "-f" options to use the new
OptionGroupFormat. Updated OptionGroupFormat to be able to also use the
"--size" and "--count" options. Commands that use a OptionGroupFormat instance
can choose which of the options they want by initializing OptionGroupFormat
accordingly. Clients can either get only the "--format", "--format" + "--size",
or "--format" + "--size" + "--count". This is in preparation for upcoming
chnages where there are alternate ways (GDB format specification) to set a
format.

llvm-svn: 142911

show more ...


Revision tags: llvmorg-3.0.0-rc1
# 6e8dc334 13-Jun-2011 Caroline Tice <ctice@apple.com>

More prompt-timing cleanups: Make multi-line expressions
use the asynchronous stream mechanism rather than writing
directly to the Debugger's output & error streams.

llvm-svn: 132930


# 78a685aa 16-Apr-2011 Jim Ingham <jingham@apple.com>

Add support for "dynamic values" for C++ classes. This currently only works for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings. The parser

Add support for "dynamic values" for C++ classes. This currently only works for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings. The parser code will
have to be changed to also query for the dynamic types & offsets as it is looking up variables.

The behavior of "frame var" is controlled in two ways. You can pass "-d {true/false} to the frame var
command to get the dynamic or static value of the variables you are printing.

There's also a general setting:

target.prefer-dynamic-value (boolean) = 'true'

which is consulted if you call "frame var" without supplying a value for the -d option.

llvm-svn: 129623

show more ...


# f6b8b581 13-Apr-2011 Greg Clayton <gclayton@apple.com>

Added two new classes for command options:

lldb_private::OptionGroup
lldb_private::OptionGroupOptions

OptionGroup lets you define a class that encapsulates settings that you want
to reuse i

Added two new classes for command options:

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

show more ...


# eb0103f2 07-Apr-2011 Greg Clayton <gclayton@apple.com>

Modified the ArchSpec to take an optional "Platform *" when setting the triple.
This allows you to have a platform selected, then specify a triple using
"i386" and have the remaining triple items (ve

Modified the ArchSpec to take an optional "Platform *" when setting the triple.
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

show more ...


Revision tags: llvmorg-2.9.0, llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2
# e0d378b3 24-Mar-2011 Greg Clayton <gclayton@apple.com>

Fixed the LLDB build so that we can have private types, private enums and
public types and public enums. This was done to keep the SWIG stuff from
parsing all sorts of enums and types that weren't ne

Fixed the LLDB build so that we can have private types, private enums and
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

show more ...


123