Commit Graph

3262 Commits

Author SHA1 Message Date
Jim Ingham d3d25d9109 Fix a bunch of places where we were passing Stream *'s but were
never checking them for NULL.  Pass a reference instead.

llvm-svn: 138694
2011-08-27 01:24:54 +00:00
Jim Ingham a6c422b7de Don't change the host's environment, just append our Python Directory
directly to the one in sys.

llvm-svn: 138693
2011-08-27 01:24:08 +00:00
Jim Ingham 650543f9ba Hold onto a shared pointer to the frame CommandObjectFrameVariable::Execute is
analyzing so it won't get deleted on us if a formatter runs code.

llvm-svn: 138692
2011-08-27 01:22:52 +00:00
Johnny Chen 24281181bd Micro-optimization: Update the shift amount only when needed.
llvm-svn: 138678
2011-08-26 23:51:22 +00:00
Johnny Chen 4cd2a8e2f4 Update the test case in light of recent change of LLDB-Info.plist to track Apple Generic Version number
from the Xcode project file.

llvm-svn: 138677
2011-08-26 23:50:10 +00:00
Greg Clayton 8f258513a1 Fixed an assertion that could happen if we happened to parse a mach-o object
file that had a symbol that had a section specified where the section had
zero size. We now honor this section definition for the symbol and don't
assert anymore.

llvm-svn: 138646
2011-08-26 20:01:35 +00:00
Jim Ingham 318c9f2240 Move DIE location reporting into the DWARFDebugInfo class, use it from there in SymbolFileDWARF::ParseType (and eventually in other interesting places as well.)
llvm-svn: 138644
2011-08-26 19:44:13 +00:00
Greg Clayton 05562d1e5c Added code to test hash bucket sizes for an DWARF index that we can write
to a file.

llvm-svn: 138620
2011-08-26 02:44:58 +00:00
Johnny Chen d890bfc962 Add a new attribute self.lldbHere, representing the fullpath to the 'lldb' executable
built locally from the source tree.  This is distinguished from self.lldbExec, which
can be used by test/benchmarks to measure the performances against other debuggers.

You can use environment variable LLDB_EXEC to specify self.lldbExec to the dotest.py
test driver, otherwise it is going to be populated with self.lldbHere.

Modify the regular tests under test dir, i.e., not test/benchmarks, to use self.lldbHere.
Also modify the benchmarks tests to use self.lldbHere when it needs an 'lldb' executable
with debug info to do the performance measurements.

llvm-svn: 138608
2011-08-26 00:00:01 +00:00
Jim Ingham 16746d1f97 Add logging to SymbolFileDWARF::ParseType so that we can tell the type/comp_unit/obj_file were being processed when something goes wrong...
llvm-svn: 138600
2011-08-25 23:21:43 +00:00
Johnny Chen 943ddb730b Modify the impl of ThreadList::GetSelectedThread() so that it tries to fetch the
m_selected_tid thread first, check to see if it is valid (might be null if the
thread just exited), and if not select/return the 0th thread instead.

llvm-svn: 138591
2011-08-25 21:59:59 +00:00
Johnny Chen 689053770b Modify the loggings output oracle to fix test suite failure, after the recent change to CommandInterpreter.cpp.
llvm-svn: 138590
2011-08-25 21:51:45 +00:00
Johnny Chen bbfa68b090 Make ThreadList::GetSelectedThread() select and return the 0th thread if there's no
currently selected thread.  And update the call sites accordingly.

llvm-svn: 138577
2011-08-25 19:38:34 +00:00
Johnny Chen 40e3592961 Initializes (uint64_t)buf variable, patch by Filipe Cabecinhas!
llvm-svn: 138565
2011-08-25 17:40:39 +00:00
Johnny Chen 2c595273e0 Fix compilation error with DEBUG_STACK_FRAMES defined, patch by Filipe Cabecinhas!
With some slight modification.

llvm-svn: 138563
2011-08-25 17:27:02 +00:00
Greg Clayton 447ff1bfdc Make the CFBundleShortVersionString and CFBundleVersion automatically track
the Apple Generic Version number from the Xcode project.

llvm-svn: 138549
2011-08-25 04:13:59 +00:00
Jason Molenda 289673c052 Change old "settings set frame-prompt" and thread-prompt
to frame-format and thread-format.

llvm-svn: 138544
2011-08-25 02:46:44 +00:00
Jason Molenda b1ad65c548 Emit an error message if we're unable to write a value to a register.
(in addition to the previous error message if the value could not be 
parsed as a numbe).  These both generate reasonable errors now -
reg write rip 0x500000000000000000000a
reg write rip 0x5jjjj

llvm-svn: 138543
2011-08-25 01:59:13 +00:00
Jason Molenda bfb36ff9ea Include lldb/commands as a valid logging type in the
'log list' output.

Remove an extraneous \n from one of the lldb/commands
log line.

Add an lldb/commands log indicating whether the command
was successful or not.

llvm-svn: 138530
2011-08-25 00:20:04 +00:00
Greg Clayton e1be996baa Fix so we don't create C++ classes for all objective C classes when we have a
objective C++ source file.

llvm-svn: 138527
2011-08-24 23:50:00 +00:00
Jim Ingham 0f35ac2a54 The Compilation Unit language was being stored in a variable called "class_language"... Changed that to "cu_language".
llvm-svn: 138523
2011-08-24 23:34:20 +00:00
Johnny Chen dd6be27427 Remove skip decorator now that crash has been fixed.
Fix a compie warning for main.cpp.

llvm-svn: 138503
2011-08-24 22:30:47 +00:00
Sean Callanan 737330c1de Fixed a bug where the target for an expression was
not set if the containing function could not be
found.  This caused LLDB to crash later in
expression parsing.

llvm-svn: 138499
2011-08-24 22:18:12 +00:00
Johnny Chen b7bdd1001e Pretty print the run options for dumpSessionInfo(self) client.
llvm-svn: 138466
2011-08-24 19:48:51 +00:00
Johnny Chen ba3b99ef1c Fix compile warning.
llvm-svn: 138465
2011-08-24 19:35:24 +00:00
Johnny Chen 3e15c4d50b Don't display the stdout if not in TraceOn(), i.e, '-t option, mode.
llvm-svn: 138458
2011-08-24 18:19:50 +00:00
Johnny Chen 4ab4a9b897 The plugin impl of getCompiler() should be in unison with the Makefile.rules change.
llvm-svn: 138454
2011-08-24 18:12:53 +00:00
Johnny Chen a68135aed0 Remove the expectedFailure decorator. The test has been passing for some time now.
llvm-svn: 138452
2011-08-24 18:10:09 +00:00
Enrico Granata 65a6a6bea4 Moved the test code for Python commands out of the test case for aliases, into its own dedicated test case (one fill was still lurking in the old folder)
llvm-svn: 138446
2011-08-24 17:46:38 +00:00
Enrico Granata cb2921dbd3 Moved the test code for Python commands out of the test case for aliases, into its own dedicated test case
llvm-svn: 138444
2011-08-24 17:45:40 +00:00
Enrico Granata 45403f31f1 Documentation edits: correcting typos, adding information and general tweaks for readability
llvm-svn: 138442
2011-08-24 17:12:47 +00:00
Enrico Granata c5df00f0b9 Documentation on dynamic types (WIP)
llvm-svn: 138425
2011-08-24 04:53:31 +00:00
Enrico Granata 83cfc9abf8 Minor documentation changes (WIP)
llvm-svn: 138423
2011-08-24 01:49:09 +00:00
Enrico Granata 64997d6c0e More documentation changes (WIP)
llvm-svn: 138421
2011-08-24 01:32:46 +00:00
Johnny Chen 6d1010cb5c Patch by Filipe to build lldb usng 'make'!
llvm-svn: 138403
2011-08-23 22:36:23 +00:00
Johnny Chen 04adb62569 Uniquefy the various data-formatter test class names so that:
./dotest.py -v -f DataFormatterTestCase.test_with_dsym_and_run_command

will not end up running 14 tests.

llvm-svn: 138399
2011-08-23 22:32:45 +00:00
Johnny Chen 4aa4f5dc0a Skip these two cases temporarily while investigating the crash on OSX Lion with clang as the compiler.
llvm-svn: 138393
2011-08-23 22:10:17 +00:00
Johnny Chen 597cbbbd45 Make clang the default compiler for building the test programs.
llvm-svn: 138391
2011-08-23 21:54:10 +00:00
Enrico Granata 129c3db6a7 Fixing commas in enums (build breaker on GCC) as reported by Filipe Cabecinhas
llvm-svn: 138385
2011-08-23 21:29:50 +00:00
Enrico Granata 88da35f881 Improved the user-friendliness of errors shown by the summary feature in certain areas
Renamed format "signed decimal" to be "decimal". "unsigned decimal" remains unchanged:
 - the name "signed decimal" was interfering with symbol %S (use summary) in summary strings.
   because of the way summary strings are implemented, this did not really lead to a bug, but
   simply to performing more steps than necessary to display a summary. this is fixed.
Documentation improvements (more on synthetic children, some information on filters). This is still a WIP.

llvm-svn: 138384
2011-08-23 21:26:09 +00:00
Sean Callanan bccce81340 Added support for persistent types to the
expression parser.  You can use a persistent
type like this:

(lldb) expr struct $foo { int a; int b; };
(lldb) struct $foo i; i.a = 2; i.b = 3; i
($foo) $0 = {
  (int) a = 2
  (int) b = 3
}

typedefs work similarly.

This patch affects the following files:

test/expression_command/persistent_types/*
  A test case for persistent types,
  in particular structs and typedefs.

ClangForward.h
  Added TypeDecl, needed to declare some
  functions in ASTResultSynthesizer.h

ClangPersistentVariables.[h,cpp]
  Added a list of persistent types to the
  persistent variable store.

ASTResultSynthesizer.[h,cpp]
  Made the AST result synthesizer iterate
  across TypeDecls in the expression, and
  record any persistent types found.  Also
  made a minor documentation fix.

ClangUserExpression.[h,cpp]
  Extended the user expression class to
  keep the state needed to report the
  persistent variable store for the target
  to the AST result synthesizers. 

  Also introduced a new error code for
  expressions that executed normally but
  did not return a result.

CommandObjectExpression.cpp
  Improved output for expressions (like 
  declarations of new persistent types) that
  don't return a result.  This is no longer
  treated as an error.

llvm-svn: 138383
2011-08-23 21:20:51 +00:00
Enrico Granata db3485cd06 Short option for --summary-string in 'type summary add' is now -s. This might be a breaking change for those who have summaries defined.
llvm-svn: 138331
2011-08-23 16:13:35 +00:00
Johnny Chen 49996274fd Add some expected failure decorators with radar numbers.
llvm-svn: 138316
2011-08-23 01:00:14 +00:00
Enrico Granata dc9407308e Additional code cleanups ; Short option name for --python-script in type summary add moved from -s to -o (this is a preliminary step in moving the short option for --summary-string from -f to -s) ; Accordingly updated the test suite
llvm-svn: 138315
2011-08-23 00:32:52 +00:00
Enrico Granata 4b49acc5bb Separated FormatNavigator and FormatManager in two different files ; moved FormatCategoryItem enum out of FormatManager.h as a debugger-wide lldb_private enum ; minor style cleanups
llvm-svn: 138307
2011-08-22 23:45:15 +00:00
Sean Callanan 60dbc63a89 Restored the version of LLVM that we previously
rolled back, and the testcase that the rollback
broke.

The new LLVM has a new ARM disassembler, which
may cause instability.  Keeping the old one would
force us into a contorted position vis-a-vis the
LLVM sources we bring in, so we will address
issues on the new one rather than keeping the old
one around.

llvm-svn: 138284
2011-08-22 22:34:22 +00:00
Greg Clayton 944b828abb Finishing the renaming from "MacOSX-Kernel" to "Darwin-Kernel".
llvm-svn: 138283
2011-08-22 22:30:57 +00:00
Greg Clayton d4bfbc9ac0 Renaming "MacOSX-Kernel" to "Darwin-Kernel". The file contents and project
commit will come shortly after this commit.

llvm-svn: 138282
2011-08-22 22:23:48 +00:00
Johnny Chen 81ab3f5d31 Fix the 'target variable' help syntax to output one or more <variable-name>'s.
Add a simple test case for that.

llvm-svn: 138281
2011-08-22 22:22:00 +00:00
Johnny Chen 30123f114a Check the timesatmps of includees python-extensions.swig and python-wrapper.swig and force
a re-SWIG if newer than the SWIG-generated LLDBWrapPython.cpp file.

llvm-svn: 138280
2011-08-22 22:10:57 +00:00