Commit Graph

3147 Commits

Author SHA1 Message Date
Enrico Granata d0b8505a64 Objective-C runtime now caches resolved ISA information for increased efficiency
llvm-svn: 137612
2011-08-15 15:56:02 +00:00
Greg Clayton f6a5fc2e8b Patch from Matt Johnson that cleans up usage of APInt
to keep GCC 4.5.2 happy and also to not use a deprecated
llvm API.

llvm-svn: 137605
2011-08-15 07:23:47 +00:00
Greg Clayton 8753c1e057 Added the ability to use llvm::APInt class to view
any integers that are larger than a 8 bytes. We can now
display signed decimal, unsigned decimal, octal, and binary
(we could already view hex before this fix).

llvm-svn: 137602
2011-08-15 02:24:40 +00:00
Jim Ingham ff5f5ff963 Factor out the code that parses ObjC Method names into a static method
in ObjCLanguageRuntime.
Add the category-free name of symbols to the Symtab name-to-index list.

llvm-svn: 137600
2011-08-15 01:32:22 +00:00
Greg Clayton 98fcc4e60f Bumped Xcode project versions for lldb-72 and debugserver-143.
llvm-svn: 137547
2011-08-13 01:48:45 +00:00
Jim Ingham 66243847a5 Remember to restore the frame in the exe_ctx passed in to RunThreadPlan.
Also, default "source_init_file" to False in the version of SBDebugger::Create
so that we don't pick up the init file in Python.

llvm-svn: 137545
2011-08-13 00:56:10 +00:00
Johnny Chen fc7483f699 Add a simple test case to exercise the SBDebugger.CreateTargetWithFileAndTargetTriple() API.
llvm-svn: 137544
2011-08-13 00:55:56 +00:00
Jim Ingham a5636fc823 Test case for changing ValueObjects with SBValue::SetValueFromCString.
llvm-svn: 137543
2011-08-13 00:45:23 +00:00
Johnny Chen f017e8d6d7 Modify the skipUnless() logic to work for OSX Lion.
llvm-svn: 137542
2011-08-13 00:27:46 +00:00
Jim Ingham 06942690b1 Add a version of SBDebugger::Create which allows us to specify whether to source
in the init files or not.

llvm-svn: 137541
2011-08-13 00:22:20 +00:00
Johnny Chen 60726fab78 Fix a test driver bug where multiple filter specs (through the -f TestClassName.test_method_name
command line option) belonging to the same Test*.py file are ignored, except for the first one.

llvm-svn: 137540
2011-08-12 23:55:07 +00:00
Jim Ingham 16e0c68627 Make ValueObject::SetValueFromCString work correctly.
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
2011-08-12 23:34:31 +00:00
Greg Clayton 23aca09205 Fixed an incorrect static analyzer fix.
llvm-svn: 137534
2011-08-12 23:32:52 +00:00
Greg Clayton b8171ddf3e Removed an initialization that wasn't needed.
llvm-svn: 137533
2011-08-12 23:32:17 +00:00
Johnny Chen 53cb46ebd7 Update the SBAddress.i Python interface file to the latest SBAddress.h,
and add some docstrings.

llvm-svn: 137528
2011-08-12 22:52:11 +00:00
Greg Clayton 7e9b1fd045 We were leaking a stack frame in StackFrameList in Thread.cpp which could
cause extra shared pointer references to one or more modules to be leaked.
This would cause many object files to stay around the life of LLDB, so after
a recompile and rexecution, we would keep adding more and more memory. After
fixing the leak, we found many cases where leaked stack frames were still
being used and causing crashes in the test suite. These are now all resolved.

llvm-svn: 137516
2011-08-12 21:40:01 +00:00
Johnny Chen 7687d3c116 Add radar info for self.skipTest().
llvm-svn: 137504
2011-08-12 20:41:20 +00:00
Johnny Chen 8f5ebce99c Skip the TestObjCDymaicValue.py tests for i386 due to dynamic types for ObjC V1 runtime not implemented yet.
Radar to be filed.

llvm-svn: 137503
2011-08-12 20:39:00 +00:00
Johnny Chen 9f4f5d94cd Add TestInferiorChanged.py to test that lldb reloads the inferior after it was changed during the debug session.
First, main.c causes a crash, the inferior then gets re-built with main2.c which is not crashing.

Add Base.cleanup(self, dictionary=None) for platform specfic way to do cleanup after build.
This plugin method is used by the above test case to cleanup the main.c build before rebuild for main2.c.

llvm-svn: 137500
2011-08-12 20:19:22 +00:00
Enrico Granata 68eb4bb421 Added an error message when the user tries to add a filter when a synthetic provider for the same type is already defined in the same category
The converse is also true: an error is shown when the user tries to add a synthetic provider to a category that already has a filter for the same type

llvm-svn: 137493
2011-08-12 19:14:27 +00:00
Johnny Chen 70cb84a0f6 When running dotest.py under pdb (the python debugger), define DOTEST_PDB=YES and
DOTEST_SCRIPT_DIR=/path/leading/to/your/dotest/script/directory.

llvm-svn: 137492
2011-08-12 18:54:11 +00:00
Enrico Granata 4a04dbc749 Taking care of an issue relating to mapping DeclContext's to DIE's
llvm-svn: 137490
2011-08-12 18:43:16 +00:00
Johnny Chen 7feabf0643 Fix a logic error (Division by zero) uncovered by the static analyzer.
A8.6.391 VST1 (multiple single elements)
alignment = if align == '00' then 1 else 4 << UInt(align);

llvm-svn: 137477
2011-08-12 17:59:58 +00:00
Greg Clayton dd7feaf664 Fixed the issue of a DW_TAG_subprogram in a DW_TAG_subprogram correctly this
time after recently backing out another fix.

llvm-svn: 137475
2011-08-12 17:54:33 +00:00
Enrico Granata 61a80ba6c3 Giving a warning to the user the first time children are truncated by the new cap setting
llvm-svn: 137462
2011-08-12 16:42:31 +00:00
Greg Clayton b4d3733fca Backout previous fix that was designed to allow functions within functions
as this function is what parses the blocks for a function...

llvm-svn: 137461
2011-08-12 16:22:48 +00:00
Greg Clayton 3771927056 Fixed an assertion issue that can arise when a function
is contained inside a function.

llvm-svn: 137438
2011-08-12 07:35:23 +00:00
Greg Clayton 5113dc8e54 Fixed some issues with parsing C++ methods where our detection
was failing if the DWARF was laid out in a certain way. The way
we detect C++ classes is now more robust so that a class method
can be defined outside of the class and refer to a definition inside
the class with a DW_AT_specification or DW_AT_abstract_origin attribute.

Fixed a case in Thread.cpp where we were looking up info in the frame
when we didn't need to. This was from some changes to support external
editors. Now the info is only looked up if needed.

llvm-svn: 137436
2011-08-12 06:47:54 +00:00
Jason Molenda 7efc7e949c Fixes the occasional crash on exit when quitting lldb with control-D.
If the IOChannel has already freed out its m_driver member, and
there's still a character to be read/written (that is, the ^D
character), just skip that char instead of trying to write through
a null object pointer.

llvm-svn: 137421
2011-08-12 02:40:17 +00:00
Enrico Granata 22c55d180d *Some more optimizations in usage of ConstString
*New setting target.max-children-count gives an upper-bound to the number of child objects that will be displayed at each depth-level
  This might be a breaking change in some scenarios. To override the new limit you can use the --show-all-children (-A) option
  to frame variable or increase the limit in your lldbinit file
*Command "type synthetic" has been split in two:
  - "type synthetic" now only handles Python synthetic children providers
  - the new command "type filter" handles filters
  Because filters and synthetic providers are both ways to replace the children of a ValueObject, only one can be effective at any given time.

llvm-svn: 137416
2011-08-12 02:00:06 +00:00
Johnny Chen ff7f3cd277 Fix a logic error caught by the static analyzer.
llvm-svn: 137407
2011-08-12 01:22:56 +00:00
Johnny Chen 160ee8b43d Fix some warnings from static analyzer.
The initialization of 'replicated_element' to 0 is needed, otherwise we get a garbage value to start with.

llvm-svn: 137405
2011-08-12 01:10:45 +00:00
Johnny Chen 1cee80c081 Silence the static analyzer.
llvm-svn: 137396
2011-08-12 00:21:20 +00:00
Johnny Chen d397dc80eb Fix two 'dereference of a null pointer' detected by the static analyzer.
llvm-svn: 137394
2011-08-12 00:02:24 +00:00
Sean Callanan 912855fd27 Fixed LLDB's handling of ElaboratedTypes, which was
causing problems with printing the values of persistent
variables with struct types.

llvm-svn: 137392
2011-08-11 23:56:13 +00:00
Johnny Chen ec34c6aba5 Silence the static analyzer.
llvm-svn: 137387
2011-08-11 23:47:21 +00:00
Johnny Chen ec95565a9d Fix 'Undefined or garbage value returned to caller' (static analyzer).
llvm-svn: 137374
2011-08-11 22:23:44 +00:00
Johnny Chen 0861be0c30 Silence the static analyzer.
llvm-svn: 137360
2011-08-11 21:43:13 +00:00
Enrico Granata 5c7b8e682c changed some variables from char* to std::string
llvm-svn: 137357
2011-08-11 21:37:21 +00:00
Johnny Chen cbbd9bea53 To silence the static analyzer.
llvm-svn: 137355
2011-08-11 21:24:08 +00:00
Johnny Chen d5e00ba6c4 Fix the expect patterns to work for both OSX SnowLeopard and Lion.
On Lion, printf is defined in libsystem_c.dylib.

llvm-svn: 137348
2011-08-11 20:51:45 +00:00
Johnny Chen d08a834a68 Patch by Matt Johnson to build on his Linux machine with recent versions of libstdc++ and glibc!
llvm-svn: 137343
2011-08-11 20:40:21 +00:00
Sean Callanan 793d6330cd Updated LLVM/Clang to to pick up fixes for a
problem in which the following cast:
–
expr (int (*)(const char*, ...))printf
-
caused a crash.  This had several causes:

  - First, Clang did not support implicit
    casts of a function of unknown type to
    a function pointer.

  - Second, after this was fixed, the
    Clang AST importer did not support
    importing function pointer types
    produced by resolving these casts.

These two problems are now resolved, and
I have added a test case to verify that
they work.  I also did a little bit of
build-system cleanup because we now use
libEnhancedDisassembly.a instead of the
.dylib.

llvm-svn: 137338
2011-08-11 20:11:18 +00:00
Johnny Chen 3e99bc3a07 Fix a logic error caught by the static analyzer.
llvm-svn: 137334
2011-08-11 19:40:36 +00:00
Enrico Granata a365f296e6 Fixed an issue where LLDB was complaining about the lack of 'update' in a synthetic provider, despite it being optional
llvm-svn: 137330
2011-08-11 19:20:44 +00:00
Johnny Chen 0a76c28a87 To silence the static analyzer.
llvm-svn: 137329
2011-08-11 19:17:45 +00:00
Johnny Chen 8446277c11 Fix a logic error caught by the static analyzer.
llvm-svn: 137328
2011-08-11 19:12:10 +00:00
Johnny Chen 64503c8168 To silence the static analyzer.
llvm-svn: 137326
2011-08-11 19:03:44 +00:00
Johnny Chen d14651afaf To silence the static analyzer.
llvm-svn: 137319
2011-08-11 18:21:06 +00:00
Enrico Granata 8c9d35603e Fixed an issue where a pointer's address was being logged instead of its value
Access to synthetic children by name:
 if your object has a synthetic child named foo you can now type
  frame variable object.foo (or ->foo if you have a pointer)
  and that will print the value of the synthetic child
  (if your object has an actual child named foo, the actual child prevails!)
 this behavior should also work in summaries, and you should be able to use
 ${var.foo} and ${svar.foo} interchangeably
  (but using svar.foo will mask an actual child named foo)

llvm-svn: 137314
2011-08-11 17:08:01 +00:00