one is completely filled in. The one we make up from the event doesn't have section info since the
library has already been unloaded by the time we get to it.
llvm-svn: 137143
For Makefile.rules, the modification of CFLAGS (addition of -arch $(ARCH) for Darwin) needs to come before
the consuming of CFLAGS, not after.
llvm-svn: 137140
cpu registers it uses and it crashes the release version of
debugserver. We just get lucky in Debug builds. Until this
is fixed I am disabling AVX detection to avoid the crashes.
llvm-svn: 137113
event is removed. Also use the return value of asynchronous breakpoint callbacks, they get checked before, and override the
breakpoint conditions.
Added ProcessModInfo class, to unify "stop_id generation" and "memory modification generation", and use where needed.
llvm-svn: 137102
if your datatype provides synthetic children, "frame variable object[index]" should now do the right thing
in cases where the above syntax would have been rejected before, i.e.
object is not a pointer nor an array (frame variable ignores potential overload of [])
object is a pointer to an Objective-C class (which cannot be dereferenced)
expression will still run operator[] if available and complain if it cannot do so
synthetic children by name do not work yet
llvm-svn: 137097
on lldb's Driver::MainLoop function which is ~1190 lines of x86 assembly code. This file is not
exercised during the normal test suite run, i.e., no +b option specified. So it should be ok.
The following is the benchmark result on my MBP running OSX Lion:
[17:38:46] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v +b -p TestFlintVsSlate
/Volumes/data/lldb/svn/trunk/build/Debug
LLDB-71
Path: /Volumes/data/lldb/svn/trunk
URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk
Repository Root: https://johnny@llvm.org/svn/llvm-project
Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
Revision: 137008
Node Kind: directory
Schedule: normal
Last Changed Author: gclayton
Last Changed Rev: 137008
Last Changed Date: 2011-08-05 17:50:36 -0700 (Fri, 05 Aug 2011)
Session logs for test failures/errors/unexpected successes will go into directory '2011-08-08-17_38_52'
Command invoked: python ./dotest.py -v +b -p TestFlintVsSlate
----------------------------------------------------------------------
Collected 2 tests
1: test_run_41_then_42 (TestFlintVsSlateGDBDisassembly.FlintVsSlateGDBDisassembly)
Test disassembly on a large function with 4.1 vs. 4.2's gdb. ...
4.1 gdb benchmark: Avg: 0.205623 (Laps: 5, Total Elapsed Time: 1.028113)
4.2 gdb benchmark: Avg: 0.201970 (Laps: 5, Total Elapsed Time: 1.009849)
gdb_42_avg/gdb_41_avg: 0.982236
ok
2: test_run_42_then_41 (TestFlintVsSlateGDBDisassembly.FlintVsSlateGDBDisassembly)
Test disassembly on a large function with 4.1 vs. 4.2's gdb. ...
4.2 gdb benchmark: Avg: 0.202602 (Laps: 5, Total Elapsed Time: 1.013012)
4.1 gdb benchmark: Avg: 0.204418 (Laps: 5, Total Elapsed Time: 1.022089)
gdb_42_avg/gdb_41_avg: 0.991119
ok
----------------------------------------------------------------------
Ran 2 tests in 15.688s
OK
llvm-svn: 137092
command that allows us to see all modules that exist and
their corresponding global shared pointer count. This will
help us track down memory issues when modules aren't being
removed and cleaned up from the module list.
llvm-svn: 137078
that detects what context the current expression is
meant to execute in. LLDB now properly consults
the method declaration in the debug information
rather than trying to hunt down the "this" or "self"
pointer by name, which can be misleading.
Other fixes include:
- LLDB now properly detects that it is inside
an inlined C++ member function.
- LLDB now allows access to non-const members when
in const code.
- The functions in SymbolFile that locate the
DeclContext containing a DIE have been renamed
to reflect what they actually do. I have added
new functions that find the DeclContext for the
DIE itself.
I have also introduced testcases for C++ and
Objective-C.
llvm-svn: 136999
SBTypeList does not have IsValid() method defined. It's always valid in a sense.
So the Python's truth value testing in turn delegates to __len__() method, which
is defined for SBTypeList, and returns 0.
llvm-svn: 136985
a native architecture that doesn't match the universal
slice that is being used for all executables, we weren't
correctly descending through the platform architectures
and resolving the binaries.
llvm-svn: 136980
Add the rich comparison methods (__eq__, __ne__) to SBType, too.
o lldbtest.py:
Add debug utility method TestBase.DebugSBType().
o test/python_api/type:
Add tests for exercising SBType/SBTypeList API, including the SBTarget.FindTypes(type_name)
API which returns a SBTypeList matching the type_name.
llvm-svn: 136975
This patch takes some time because the old Python constructor pattern was not a valid one,
and breaks with SBTypeList's __init__ signature. Oops.
llvm-svn: 136958
And remove expectedFailure decorator for test_SBTypeMember, which no longer exists after the recent changes, replace
it with test_SBTypeList.
llvm-svn: 136947
Sample run on my OSX Lion (MacBook Pro):
1: test_run_gdb_then_lldb (TestDisassembly.DisassembleDriverMainLoop)
Test disassembly on a large function with lldb vs. gdb. ...
gdb benchmark: Avg: 0.201802 (Laps: 5, Total Elapsed Time: 1.009008)
lldb benchmark: Avg: 0.109569 (Laps: 5, Total Elapsed Time: 0.547843)
lldb_avg/gdb_avg: 0.542952
ok
2: test_run_lldb_then_gdb (TestDisassembly.DisassembleDriverMainLoop)
Test disassembly on a large function with lldb vs. gdb. ...
lldb benchmark: Avg: 0.109580 (Laps: 5, Total Elapsed Time: 0.547902)
gdb benchmark: Avg: 0.201587 (Laps: 5, Total Elapsed Time: 1.007936)
lldb_avg/gdb_avg: 0.543588
ok
llvm-svn: 136931
expressions that used function pointers. The problem
was that IRForTarget previously only scanned the IR
for the expression for call instructions; if a function
was used in another context, it was ignored.
Now LLDB scans the Module for functions that are only
declared (not also defined -- so these are externals);
it then constructs function pointers for these
functions and substitutes them wherever the function
is used.
Also made some changes so that "expr main" works just
as well as "expr &main"; they end up being the same
code, but LLDB was generating the result variable in
different ways.
llvm-svn: 136928
There should be nothing unwanted there and a simpe main.cpp (generated from main.cpp.template)
which includes SB*.h should compile and link with the LLDB framework.
llvm-svn: 136894
- accordingly, the test cases for the synthetic providers for the std:: containers have been edited to use
${svar%#} instead of ${svar.len} to print out the count of elements ; the .len synthetic child has been
removed from the synthetic providers
The synthetic children providers for the std:: containers now return None when asked for children indexes >= num_children()
Basic code to support filter names based on regular expressions (WIP)
llvm-svn: 136862
The synthetic children providers now use the new (safer) APIs to get the values of objects
As a side effect, fixed an issue in ValueObject where ResolveValue() was not always updating the value before reading it
llvm-svn: 136861
the SBType implementation classes.
Fixed LLDB core and the test suite to not use deprecated SBValue APIs.
Added a few new APIs to SBValue:
int64_t
SBValue::GetValueAsSigned(int64_t fail_value=0);
uint64_t
SBValue::GetValueAsUnsigned(uint64_t fail_value=0)
llvm-svn: 136829
to make & delete directories in the test case. Make a real copy of libd.dylib
in that directory so the two libraries are actually different. Use (and remove)
the DYLD_LIBRARY_PATH to point to the new library.
llvm-svn: 136801
current context. Previously, if there was a variable
called "self" available, the expression parser
assumed it was inside a method. But class methods
in Objective-C also take a "self" parameter, of DWARF
type "id". We now detect this properly, and only
assume we're in an instance method if "self" is a
pointer to an Objective-C object.
llvm-svn: 136784
The entire .a file gets cached, and after the first .o file
gets loaded, a cached version would get used when trying to
extract the skinny slice from a fat BSD archive and would
cause a code path to get taken in the BSD archive parser
even if we aren't at a BSD archive offset.
llvm-svn: 136765
- see the test case in lang/objc/objc-dynamic-value for an example
Objective-C dynamic type lookup now works for every Objective-C type
- previously, true dynamic lookup was only performed for type id
llvm-svn: 136763
was previously using the entire frame variable list instead of using the
in scope variable list. I added a new function to a stack frame:
lldb::VariableListSP
StackFrame::GetInScopeVariableList (bool get_file_globals);
This gets only variables that are in scope and they will be ordered such
that the variables from the current scope are first.
llvm-svn: 136745
Modify lldbbench.py so that lldbtest.line_number() utility function is available to
BenchBase client as just line_number(), and modify lldbtest.py so that self.lldbExec
(the full path for the 'lldb' executable) is available to BenchBase client as well.
An example run of the test case on my MacBook Pro running Lion:
1: test_compare_lldb_to_gdb (TestRepeatedExprs.RepeatedExprsCase)
Test repeated expressions with lldb vs. gdb. ...
lldb_avg: 0.204339
gdb_avg: 0.205721
lldb_avg/gdb_avg: 0.993284
ok
llvm-svn: 136740
appropriately between C++ static methods and non-static
methods. This bug made it impossible to call most static
methods, either because Clang did not recognize that a
method could be called without providing a "this"
parameter, or because Clang did not properly mangle the
name of the method when searching for it in the target.
Also added a testcase.
llvm-svn: 136733
I did not take the patch for ClangExpressionParser.cpp since there was a
recent change by Peter for the same line. Feel free to disagree. :-)
Reference:
----------------------------------------------------------------------
r136580 | pcc | 2011-07-30 15:42:24 -0700 (Sat, 30 Jul 2011) | 3 lines
Add reloc arg to standard JIT createJIT()
Fixes non-__APPLE__ build. Patch by Matt Johnson!
----------------------------------------------------------------------
Also, I ignore the part of the patch to remove the RegisterContextDarwin*.h/.cpp.
llvm-svn: 136720
Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
- expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
pointer to the Python code
Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
- Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target
llvm-svn: 136695
Stopwatch (self.swatch) within the BenchBase's setUp() instance method to be available
to all the child classes.
Use self.swatch to measure elapsed time in TestRepeatedExprs.py, which needs to be
modified later on to actually measure repeated expression evaluations within the
context of lldb as well as gdb.
llvm-svn: 136664
caused functions that were cast as part of the
call to have that cast ignored once their
addresses were resolved.
Notably, in the case of objc_msgSend(), if
the function was cast from something returning
i8* to something returning i8, the expression
parser was discarding the cast as part of its
resolution. This caused crashes later on.
llvm-svn: 136648
while its API clients remain unchanged. The new lldbtest.Base class is to capture common behaviors
when working with the test driver to accomplish things. The clients of lldbtest.Base can be
lldb command line and api tests as well as other generic tests like a benchmark test.
llvm-svn: 136636
treated as externals, causing problems when we
tried to look their locations up in the debug
info. For example:
expr char c[] = "foo"; c[0]
would terminate when trying to find c in the
debug information, despite the fact that c was
defined inside the expression.
llvm-svn: 136629
completes the support in the LLDB expression parser
for incomplete types. Clang now imports types
lazily, and we complete those types as necessary.
Changes include:
- ClangASTSource now supports three APIs which it
passes to ClangExpressionDeclMap. CompleteType
completes a TagDecl or an ObjCInterfaceDecl when
needed; FindExternalVisibleDecls finds named
entities that are visible in the expression's
scope; and FindExternalLexicalDecls performs a
(potentially restricted) search for entities
inside a lexical scope like a namespace. These
changes mean that entities in namespaces should
work normally.
- The SymbolFileDWARF code for searching a context
for a specific name is now more general, and can
search arbitrary contexts.
- We are continuing to adapt our calls into LLVM
from interfaces that take start and end iterators
when accepting multiple items to interfaces that
use ArrayRef.
- I have cleaned up some code, especially our use
of namespaces.
This change is neutral for our testsuite and greatly
improves correctness for large programs (like Clang)
with complicated type systems. It should also lay
the groundwork for improving the expression parser's
performance as we are lazier and lazier about
providing type information.
llvm-svn: 136555