Commit Graph

5547 Commits

Author SHA1 Message Date
Enrico Granata 165f8af8c5 Initial commit of a new testsuite feature: test categories.
This feature allows us to group test cases into logical groups (categories), and to only run a subset of test cases based on these categories.

Each test-case can have a new method getCategories(self): which returns a list of strings that are the categories to which the test case belongs.
If a test-case does not provide its own categories, we will look for categories in the class that contains the test case.
If that fails too, the default implementation looks for a .category file, which contains a comma separated list of strings.
The test suite will recurse look for .categories up until the top level directory (which we guarantee will have an empty .category file).

The driver dotest.py has a new --category <foo> option, which can be repeated, and specifies which categories of tests you want to run.
(example: ./dotest.py --category objc --category expression)

All tests that do not belong to any specified category will be skipped. Other filtering options still exist and should not interfere with category filtering.
A few tests have been categorized. Feel free to categorize others, and to suggest new categories that we could want to use.

All categories need to be validly defined in dotest.py, or the test suite will refuse to run when you use them as arguments to --category.

In the end, failures will be reported on a per-category basis, as well as in the usual format.

This is the very first stage of this feature. Feel free to chime in with ideas for improvements!

llvm-svn: 164403
2012-09-21 19:10:53 +00:00
Greg Clayton 7925fbbadb Full KDP process control with per CPU resume and step.
llvm-svn: 164378
2012-09-21 16:31:20 +00:00
Sean Callanan 3e633a290e Fixed an oddity in the Objective-C class descriptors
where the descriptor took a pointer to an object and
expected the Initialize function to dereference that
pointer and extract the isa value.  This caused one
of our tests to fail.

llvm-svn: 164353
2012-09-21 02:09:51 +00:00
Greg Clayton 4b1b8b3e1d <rdar://problem/9959501>
KDP -- now with rudimentary process control (continue only) and read + write registers (which means we can see stack frames) for x86_64, i386 and ARM.

llvm-svn: 164352
2012-09-21 01:55:30 +00:00
Enrico Granata eacb4911a0 Fixing a logic error where we would incorrectly show the newly crafted function not found error for a Python function in some cases where the function actually existed and had an empty docstring
llvm-svn: 164334
2012-09-20 23:23:55 +00:00
Sean Callanan 2cb5e527f6 Fixed a problem where persistent variables did
not correctly store the contents of Objective-C
classes.  This was due to a combination of
factors:

  1) Types were only being completed if we were
     looking inside them for specific ivars
     (using FindExternalVisibleDeclsByName). 
     We now look the complete type up at every
     FindExternalLexicalDecls.

  2) Even if the types were completed properly,
     ValueObjectConstResult overrode the type
     of every ValueObject using the complete type
     for its class from the debug information.
     Superclasses of complete classes are not
     guaranteed to be complete.  Although "frame
     variable" uses the debug information,
     the expression parser does now piece together
     complete types at every level (as described
     in Bullet 1), so I provided a way for the
     expression parser to prevent overriding.

  3) Type sizes were being miscomputed by
     ClangASTContext.  It ignored the ISA pointer
     and only counted fields.  We now correctly
     count the ISA in the size of an object.

<rdar://problem/12315386>

llvm-svn: 164333
2012-09-20 23:21:16 +00:00
Greg Clayton dcadc5cfb7 Re-adding this previously removed file.
llvm-svn: 164331
2012-09-20 23:08:52 +00:00
Greg Clayton b85248da95 This file is causing problems. I am going to remove it and try re-adding it.
llvm-svn: 164328
2012-09-20 23:08:12 +00:00
Greg Clayton bb011f73f5 Show the size of what we are dematerializing in the output log for "lldb expr".
llvm-svn: 164327
2012-09-20 23:07:44 +00:00
Greg Clayton 0c9773c6d5 Compile shared libraries with dSYM files when requested on darwin. Prior to this, we never had dSYM files for shared libraries unless it was a dylib only Makefile.
llvm-svn: 164322
2012-09-20 21:43:11 +00:00
Greg Clayton 48e0c2c82d <rdar://problem/12315386>
Test suite to catch fragile base class ivar issues.

llvm-svn: 164321
2012-09-20 21:38:45 +00:00
Sean Callanan d0dcae08e5 More work for reading the Objective-C runtime.
We can now read the relevant data structures for
the method list, and use a callback mechanism to
report their details to the AppleObjCTypeVendor,
which constructs appropriate Clang types.

llvm-svn: 164310
2012-09-20 17:01:52 +00:00
Jason Molenda 944cc67eba Bump to lldb-168, debugserver-193.
llvm-svn: 164291
2012-09-20 06:42:30 +00:00
Jason Molenda 5c4210be8e Update the LLDB_DISABLE_PYTHON ifdef in FormatManager::LoadObjCFormatters to
get FormatManager.cpp to build on no-python platforms again.

llvm-svn: 164284
2012-09-20 06:06:59 +00:00
Greg Clayton 9e6cffc9fd A patch that allows for mach-o architectures to be specified as "<number>-<number>" where the first number is the cpu type and the second is the cpu subtype. Also added code to allow use of mach-o architectures that aren't in our tables so that symbolication and static file introspection (crashlogs) can work with them.
llvm-svn: 164258
2012-09-19 22:25:17 +00:00
Greg Clayton a150de05f3 Don't get everything when resolving the symbol context of the ObjC Class symbol, just the module + symbol.
llvm-svn: 164257
2012-09-19 22:23:30 +00:00
Sean Callanan 39def1f7c0 Fix to the project file, to prevent it from using
an out-of-date compiler in certain cases.

llvm-svn: 164255
2012-09-19 22:10:40 +00:00
Filipe Cabecinhas 3e6ff11220 Fix some type-related swig bugs on FreeBSD on x86_64 (and maybe other OS/arch).
llvm-svn: 164227
2012-09-19 15:22:05 +00:00
Sean Callanan 43dd07ec3e Updated AppleObjCV2Runtime to load the class
data structures more rapidly.  Also added fields
for the other data structures in a class.

I also fixed a problem where I accidentally used
hasExternalLexicalStorage() instead of
hasExternalVisibleStorage() to mark an
incomplete object.

llvm-svn: 164197
2012-09-19 03:23:13 +00:00
Greg Clayton aa4d45314c Added auto LLDB import to the crashlog script.
llvm-svn: 164192
2012-09-19 01:59:34 +00:00
Greg Clayton 9944cd7f7a <rdar://problem/11752499>
Improve error messages when memory read/write fails.

llvm-svn: 164188
2012-09-19 01:46:31 +00:00
Greg Clayton 6f4d8af713 <rdar://problem/12125274>
Intentionally leak the module list to avoid unnecessary freeing of modules + object files + symbol files when the program is exiting.

llvm-svn: 164184
2012-09-18 23:50:22 +00:00
Jason Molenda dfa424c593 Allow for numeric cputype-cpusubtype specifications where the subtype is 0. Use errno to
detect strtoul parse failure instead of return value of 0.  <rdar://problem/12198994>

llvm-svn: 164183
2012-09-18 23:27:18 +00:00
Enrico Granata fac939e918 <rdar://problem/12188843> Fixing a problem where a Python command created in the same module where the target function is defined causes the help string not to come out
llvm-svn: 164172
2012-09-18 21:53:02 +00:00
Sean Callanan 27c658bd18 Objective-C runtime class descriptors can now
populate Clang ObjCInterfaceDecls with their
ivars, methods, and properties.  The default
implementation does nothing.  I have also made
sure that AppleObjCRuntimeV2 creates 
ObjCInterfaceDecls that actually get queried
appropriately.

llvm-svn: 164164
2012-09-18 20:36:30 +00:00
Enrico Granata 5d31103974 <rdar://problem/11398693> Making sure we do not attempt to run code on zombie objects when attempting to format them
llvm-svn: 164156
2012-09-18 18:34:14 +00:00
Greg Clayton 813ddfcdd0 <rdar://problem/12219840>
Don't leak mach ports when calling "mach_thread_self()".

llvm-svn: 164152
2012-09-18 18:19:49 +00:00
Enrico Granata 63d2a23618 Fix a potential issue where data formatters can get confused over malformed UUIDs
llvm-svn: 164151
2012-09-18 18:15:27 +00:00
Enrico Granata 69277bac23 <rdar://problem/12161825> Rephrase formatter for NSIndexSet in terms of indexes instead of objects
llvm-svn: 164149
2012-09-18 18:06:37 +00:00
Greg Clayton 43e0af06b4 Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. Some platforms don't support this modification.
llvm-svn: 164148
2012-09-18 18:04:04 +00:00
Enrico Granata 97fca507f4 <rdar://problem/11988289> Making C++ synthetic children provider for NSDictionary and related classes
llvm-svn: 164144
2012-09-18 17:43:16 +00:00
Enrico Granata dfc88a0338 Making ClangExpression hold on to a WP to the Process instead of a SP. This fix should enable us to have per-process maps of ClangExpressions without fear of keeping the process alive forever
llvm-svn: 164082
2012-09-18 00:08:47 +00:00
Jim Ingham a1b536a231 Remove a spurious control character coming from trying to save files in Xcode with emacs' ^x^s.
llvm-svn: 164081
2012-09-18 00:00:25 +00:00
Enrico Granata ee23ae264b Make the Class Descriptors able to fetch the class name for unrealized classes
llvm-svn: 164050
2012-09-17 19:51:33 +00:00
Sean Callanan 9b44493304 Re-applied Enrico's patch that I so rudely
stomped on.

llvm-svn: 164049
2012-09-17 19:30:47 +00:00
Enrico Granata 2e2aa6470a Stop validating the vtable_ptr since it's not actually guaranteed to be correct
llvm-svn: 164048
2012-09-17 19:26:37 +00:00
Jason Molenda 38f8bbecba Update LLDB_DISABLE_PYTHON #ifdefs in FormatManager.cpp to get it
building on no-Python systems again.

llvm-svn: 163961
2012-09-15 01:59:02 +00:00
Sean Callanan c09d9d898d More runtime work. We now successfully traverse
the dynamic and static runtime class tables to
construct our isa table.  This is putting the runtime
in contact with unrealized classes, which we need
to deal with in order to get accurate information.
That's the next piece of work.

<rdar://problem/10986023>

llvm-svn: 163957
2012-09-15 01:05:12 +00:00
Enrico Granata 01fd9804cb Fixing a potential crasher where the new C++ synthetic children can return a NULL FrontEnd and cause LLDB to crash. This patch introduces a dummy front-end which the ValueObjectSynthetic can use lacking a real FrontEnd
llvm-svn: 163946
2012-09-14 22:41:44 +00:00
Jim Ingham 6fe2dc79b7 Remove a duplicate frame_sp local that was shadowing the one we copied the incoming SBFrame into.
<rdar://problem/12304255>

llvm-svn: 163943
2012-09-14 22:16:10 +00:00
Jim Ingham 94b092461d SBThread::StepOut and SBThread::StepOutOfFrame should both run all threads.
llvm-svn: 163938
2012-09-14 21:07:14 +00:00
Jim Ingham 43d886ec90 "thread step-out" should run all threads by default.
llvm-svn: 163937
2012-09-14 21:04:15 +00:00
Jim Ingham f76ab67c55 Use the frame index passed into "thread until" rather than using the selected frame.
llvm-svn: 163936
2012-09-14 20:48:14 +00:00
Jim Ingham c02e334422 SBThread::StepOverUntil should run all threads. It is running to breakpoints, so running one thread is likely to cause the target to stall.
llvm-svn: 163924
2012-09-14 18:57:14 +00:00
Sean Callanan 903259fea2 Extended the "watchpoint set variable" code to
support watchpoints on globals.

<rdar://problem/12297238>

llvm-svn: 163913
2012-09-14 17:20:18 +00:00
Filipe Cabecinhas 3e9e081d35 Fixed some problems with SWIG bindings.
This may (but shouldn't) break Linux (but I tested and it still worked on FreeBSD).

The same shell scripts are now used on Xcode and Makefiles, for generating
the SWIG bindings.
Some compatibility fixes were applied, too (python path, bash-isms, etc).

llvm-svn: 163912
2012-09-14 17:09:15 +00:00
Filipe Cabecinhas d685840a5e Don't force libc++ and c++11 on everyone.
Make the flags part of configure and make invocations, for now.

llvm-svn: 163911
2012-09-14 17:09:06 +00:00
Greg Clayton c1b1f1ea26 <rdar://problem/11374963>
When attaching on ARM hosted debuggers we were incorrectly setting the triple to "arm-apple-ios". This was happening because in the post attach code, we would lookup the process info through the platform, and if successful, we would get the architecture of the process. This code uses sysctl() calls, but we can only get the CPU type, not the subtype, so we would get ARM for CPU type and nothing for the cpu subtype, so this would map to "arm-apple-ios". I fixed the code to get the cpu subtype from "hw.cpusubtype" which is what we really want for ARM, and not the architecture is already correct. "add-dsym" then works like a charm. I also improved the command output when the architecture changes to show the entire triple instead of just the arch name.

llvm-svn: 163868
2012-09-14 02:41:36 +00:00
Jim Ingham cb640dd8a0 Make the unwinding of the stack part of "thread return" work, and add the thread return command.
llvm-svn: 163867
2012-09-14 02:14:15 +00:00
Sean Callanan 5527442d11 Updated the demangler to take the fix for a crasher.
<rdar://problem/12293231>

llvm-svn: 163864
2012-09-14 00:52:49 +00:00