Commit Graph

12 Commits

Author SHA1 Message Date
Zachary Turner d37221dc5d Revert "Fix broken tests due to new error output."
This reverts commit ec7c94f8e6860968d384b578e5564a9c55c80b4a and
re-enables OptionValidators.

llvm-svn: 212627
2014-07-09 16:31:49 +00:00
Todd Fiala 9734280f33 Fix broken tests due to new error output.
This reverses out the options validators changes.  We'll get these
back in once the changes to the output can be resolved.

Restores broken tests on FreeBSD, Linux, MacOSX.

Changes reverted: r212500, r212317, r212290.

llvm-svn: 212543
2014-07-08 15:55:32 +00:00
Zachary Turner de963e9a09 Adds the notion of an OptionValidator.
The purpose of the OptionValidator is to determine, based on some
arbitrary set of conditions, whether or not a command option is
valid for a given debugger state.  An example of this might be
to selectively disable or enable certain command options that
don't apply to a particular platform.

This patch contains no functional change, and does not actually
make use of an OptionValidator for any purpose yet.  A follow-up
patch will begin to add the logic and users of OptionValidator.

Reviewed by: Greg Clayton, Jim Ingham

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

llvm-svn: 212290
2014-07-03 20:34:18 +00:00
Ed Maste d78c9576ca Switch NULL to C++11 nullptr in source/Interpreter
Patch by Robert Matusewicz

llvm-svn: 206711
2014-04-20 00:31:37 +00:00
Virgile Bello e2607b50ea Add OptionParser.h
llvm-svn: 190063
2013-09-05 16:42:23 +00:00
Greg Clayton 3bcdfc0ec1 <rdar://problem/12798131>
Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.

This fix does the following:
- make sure all short options are treated as "int"
- make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
- fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
- fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value

llvm-svn: 169189
2012-12-04 00:32:51 +00:00
Johnny Chen 6ebc8c4598 Include llvm/ADT/STLExtras.h from lldb/Utility/Utils.h and use llvm::array_lengthof(), instead.
llvm-svn: 156876
2012-05-15 23:21:36 +00:00
Greg Clayton 86edbf41d1 Cleaned up many error codes. For any who is filling in error strings into
lldb_private::Error objects the rules are:
- short strings that don't start with a capitol letter unless the name is a
  class or anything else that is always capitolized
- no trailing newline character
- should be one line if possible

Implemented a first pass at adding "--gdb-format" support to anything that
accepts format with optional size/count.

llvm-svn: 142999
2011-10-26 00:56:27 +00:00
Jim Ingham 2af4db5835 Remember to mark the OptionValueUUID as set in SetOptionValue.
llvm-svn: 140835
2011-09-30 01:05:23 +00:00
Johnny Chen 7c575b3b3a Refactoring: replace a bunch of static array size computation or hardcoded constant
with a template function 'arraysize(static_array)', defined in Utils.h.

llvm-svn: 139444
2011-09-10 00:48:33 +00:00
Johnny Chen 4bee32e53a Headers have been moved to /includes/lldb/Interpreter. This patch
reflects this change.

Marco Minutoli <mminutoli@gmail.com>

llvm-svn: 131306
2011-05-13 20:21:08 +00:00
Greg Clayton effe5c956b Added new OptionGroup classes for UInt64, UUID, File and Boolean values.
Removed the "image" command and moved it to "target modules". Added an alias
for "image" to "target modules". 

Added some new target commands to be able to add and load modules to a target:
(lldb) target modules add <path>
(lldb) target modules load [--file <path>] [--slide <offset>] [<sect-name> <sect-load-addr> ...]

So you can load individual sections without running a target:

(lldb) target modules load --file /usr/lib/libSystem.B.dylib __TEXT 0x7fccc80000 __DATA 0x1234000000

Or you can rigidly slide an entire shared library:

(lldb) target modules load --file /usr/lib/libSystem.B.dylib --slid 0x7fccc80000

This should improve bare board debugging when symbol files need to be slid around manually.

llvm-svn: 130796
2011-05-03 22:09:39 +00:00