Commit Graph

788 Commits

Author SHA1 Message Date
Johnny Chen 2f71831ceb Remove the @skip() and @expectedFaiure decorators, the previously affected tests
have now all passed.

rdar://problem/8502549 and rdar://problem/8493023 are fixed

llvm-svn: 115399
2010-10-02 01:46:20 +00:00
Greg Clayton 90a2acd441 One final patch for all of this class constructor, destructor, and conversion
operator naming stuff. We now get the constructor and destructor names right
after passing in the type, and we get the correct conversion operator name
after passing in the return type when getting the DeclarationNameInfo.

llvm-svn: 115398
2010-10-02 01:40:05 +00:00
Johnny Chen 1e190a552f Use a more robust regexp to search for the 'Code' symbol. Plus compile the
regexp once and use it within the for loop for some speedup.

llvm-svn: 115397
2010-10-02 01:23:40 +00:00
Sean Callanan 9c5fe130e1 Update to the latest Clang, which fixes a problem
with importing class/struct types.

llvm-svn: 115394
2010-10-02 01:07:50 +00:00
Johnny Chen 7fce877aa5 I committed too fast. Both "struct objc_selector *" and "SEL" are possible,
depending on the compiler used.  Former if gcc/llvm-gcc, and latter if clang.

llvm-svn: 115380
2010-10-01 23:34:28 +00:00
Johnny Chen 9eaa69699a Updated the expected match string when stopped on an objc instance method from:
ARG: (struct objc_selector *) _cmd

to

    ARG: (SEL) _cmd

The change most likely resulted from an update from the llvm tot with a newer clang.

llvm-svn: 115372
2010-10-01 23:21:20 +00:00
Greg Clayton a3c444ac23 Get the declaration names for C++ ctors, dtors, and operators from the
right name pools.

llvm-svn: 115371
2010-10-01 23:13:49 +00:00
Johnny Chen b781cf0022 Commented out two debug prints.
llvm-svn: 115369
2010-10-01 23:05:03 +00:00
Johnny Chen da88434b39 o Added a new feature to the test framework to skip long running tests conditionally.
To not skip long running tests, pass '-l' to the test driver (dotest.py).

  An example:

    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
    def test_foundation_disasm(self):
        ...

o Added a long running disassemble test to the foundation directory, which iterates
  the code symbols from Foundation.framework and kicks off a disassemble command for
  for the named function symbol.  Found a crasher: rdar://problem/8504895.

o Plus added/updated some comments for the TestBase class.

llvm-svn: 115368
2010-10-01 22:59:49 +00:00
Caroline Tice 8d88020e92 Uncomment/fix "-f" command option for disassemble command.
llvm-svn: 115351
2010-10-01 21:34:54 +00:00
Greg Clayton c93237c991 Fixed an issue where if a method funciton was asked to be parsed before
its containing class was parsed, we would crash.

llvm-svn: 115343
2010-10-01 20:48:32 +00:00
Caroline Tice deaab2220e Modify command options to use the new arguments mechanism. Now all command option
arguments are specified in a standardized way, will have a standardized name, and
have functioning help.

The next step is to start writing useful help for all the argument types.

llvm-svn: 115335
2010-10-01 19:59:14 +00:00
Johnny Chen f14331f5c3 Only skip the test cases which are currently crashing, instead of the whole class.
Also, the break by location needs to be modified after changees made to the main.cpp source code.

llvm-svn: 115320
2010-10-01 18:08:29 +00:00
Caroline Tice e139cf2320 Add infrastructure for standardizing arguments for commands and
command options; makes it easier to ensure that the same type of
argument will have the same name everywhere, hooks up help for command
arguments, so that users can ask for help when they are confused about
what an argument should be; puts in the beginnings of the ability to
do tab-completion for certain types of arguments, allows automatic
syntax help generation for commands with arguments, and adds command
arguments into command options help correctly.

Currently only the breakpoint-id and breakpoint-id-range arguments, in
the breakpoint commands, have been hooked up to use the new mechanism.
The next steps will be to fix the command options arguments to use
this mechanism, and to fix the rest of the regular command arguments
to use this mechanism.  Most of the help text is currently missing or
dummy text; this will need to be filled in, and the existing argument
help text will need to be cleaned up a bit (it was thrown in quickly,
mostly for testing purposes).

Help command now works for all argument types, although the help may not
be very helpful yet.

Those commands that take "raw" command strings now indicate it in their
help text.

llvm-svn: 115318
2010-10-01 17:46:38 +00:00
Johnny Chen b5051dc529 Added bug number to the @skip decorator.
llvm-svn: 115317
2010-10-01 16:34:53 +00:00
Johnny Chen 179543890e These currently crash (from running 'expr' command). Disable the entire class for the time being.
llvm-svn: 115316
2010-10-01 16:26:42 +00:00
Greg Clayton 878eaf188c Added correct C++ method declarations for destructors and for conversion
operators.

llvm-svn: 115290
2010-10-01 03:45:20 +00:00
Greg Clayton f51de67640 Make C++ constructors and destructors correctly within the clang types we
generate from DWARF.

llvm-svn: 115268
2010-10-01 02:31:07 +00:00
Sean Callanan e1314273b6 Fixed handling of signed short types in expressions.
llvm-svn: 115267
2010-10-01 02:06:46 +00:00
Johnny Chen ec67219617 Add a simple test for the lldb 'disassemble' command. The initial version just
sets some breakpoints and invokes 'disassemble' when the breakpoint hits, which
just disassembles the bytes in the current function, i.e., frame #0's function.

llvm-svn: 115249
2010-10-01 00:10:17 +00:00
Johnny Chen 9ea6e21f91 Updated to remove most of the @expectedFailure decorators for:
# rdar://problem/8493023
    # test/types failures for Test*TypesExpr.py: element offset computed wrong and sign error?

Two failures remain for test_short* test cases.

llvm-svn: 115229
2010-09-30 22:49:07 +00:00
Greg Clayton 16c880f080 Fixed an issue where byte sizes were not able to be calculated for forward
declarations because we lost the original context which was needed to be
able to figure out the byte size.

llvm-svn: 115223
2010-09-30 22:25:09 +00:00
Johnny Chen c63bf9961c Modification required to test clang, gcc, and llvm-gcc.
llvm-svn: 115216
2010-09-30 22:11:33 +00:00
Greg Clayton 4957bf69e5 Cleaned up a unused member variable in Debugger.
Added the start of Host specific launch services, though it currently isn't
hookup up to anything. We want to be able to launch a process and use the
native launch services to launch an app like it would be launched by the
user double clicking on the app. We also eventually want to be able to run
a command line app in a newly spawned terminal to avoid terminal sharing.

Fixed an issue with the new DWARF forward type declaration stuff. A crasher
was found that was happening when trying to properly expand the forward
declarations.

llvm-svn: 115213
2010-09-30 21:49:03 +00:00
Jim Ingham 86103ea237 Change how we call Target::CreateBreakpoint to account for the new "name type" parameter.
llvm-svn: 115210
2010-09-30 21:21:43 +00:00
Sean Callanan 038df50315 Switched the expression parser from using TargetData
to using Clang to get type sizes.  This fixes a bug
where the type size for a double[2] was being wrongly
reported as 8 instead of 16 bytes, causing problems
for IRForTarget.

Also improved logging so that the next bug in this
area will be easier to find.

llvm-svn: 115208
2010-09-30 21:18:25 +00:00
Johnny Chen e8a3093296 Add a more complex test scenario for breakpoint locations, with breakpoint enable/disable.
llvm-svn: 115202
2010-09-30 20:46:47 +00:00
Johnny Chen f7edb1c813 Fixed indentation.
llvm-svn: 115186
2010-09-30 18:30:25 +00:00
Johnny Chen a9a764e65d Fixed 'expr' help message.
llvm-svn: 115185
2010-09-30 18:16:58 +00:00
Greg Clayton eae9cc6dc7 Retry task_for_pid a few times to avoid some cases where task_for_pid fails.
llvm-svn: 115184
2010-09-30 18:10:44 +00:00
Johnny Chen a92bf08038 Test new feature with r115115:
Add "-o" option to "expression" which prints the object description if available.

llvm-svn: 115182
2010-09-30 18:02:47 +00:00
Johnny Chen 92609b52ab Stop using LLDB_CC/LLDB_ARCH in the plugins for test configurations. Use make
friendly CC and ARCH, instead.

llvm-svn: 115169
2010-09-30 17:11:58 +00:00
Johnny Chen cf11e6066b These prints should go to stderr as well. Plus add a global assert string.
llvm-svn: 115167
2010-09-30 17:06:27 +00:00
Johnny Chen 703dbd049a These prints should go to stderr as well. Plus add a global assert string.
llvm-svn: 115166
2010-09-30 17:06:24 +00:00
Johnny Chen 448718a863 Add extra value string to self.expect().
llvm-svn: 115150
2010-09-30 16:00:12 +00:00
Johnny Chen 832d2333a5 Added a utility function to return the counterpart C++ compiler of $(CC) and use
it inside Makefile.rules to return clang++ on clang and llvm-g++ on llvm-gcc.

Removed CPLUSPLUSFLAGS which is simply wrong and CPPFLAGS which is unnecessary.

llvm-svn: 115125
2010-09-30 01:22:34 +00:00
Jim Ingham 6c68fb4549 Add "-o" option to "expression" which prints the object description if available.
llvm-svn: 115115
2010-09-30 00:54:27 +00:00
Johnny Chen eb1db1c547 Verify that we have a valid breakpoint ID before proceeding with retrieving its
number of locations.  This fixed a crasher.

llvm-svn: 115092
2010-09-29 21:57:51 +00:00
Caroline Tice 9068d794fd Fix breakpoint id range testing to disallow ranges that specify breakpoint locations from
crossing major breakpoint boundaries (must be within a single breakpoint if specifying locations).

Add .* as a means of specifying all the breakpoint locations under a major breakpoint, e.g. "3.*"
means "all the breakpoint locations of breakpoint 3".

Fix error message to make more sense, if user attempts to specify a breakpoint command when there
isn't a target yet.

llvm-svn: 115077
2010-09-29 19:42:33 +00:00
Johnny Chen d8ed43cde0 Simple refactoring.
llvm-svn: 115075
2010-09-29 19:36:25 +00:00
Johnny Chen b19cd0fff4 Wrapped the regexp grokking of data type within a try:expect: instead of letting
the Python runtime take over in case there isn't a match.

llvm-svn: 115073
2010-09-29 19:29:42 +00:00
Johnny Chen 2c48dbec96 Added an example 'frame variable' output to demonstrate how the generic_type_tester
groks the data type of the variable.

llvm-svn: 115070
2010-09-29 19:12:10 +00:00
Johnny Chen c0ba019a19 Added @expectedFailure decorators for test suite failures:
# rdar://problem/8493023
    # test/types failures for Test*TypesExpr.py: element offset computed wrong?

llvm-svn: 115065
2010-09-29 19:02:20 +00:00
Johnny Chen cfd405fb42 Turn on generic type tester for expression parser; preparing to file bugs.
llvm-svn: 115063
2010-09-29 18:46:14 +00:00
Caroline Tice bd13b8d5ce Fix various timing/threading problems in IOChannel & Driver that
were causing the prompt to be stomped on, mangled or omitted occasionally.

llvm-svn: 115059
2010-09-29 18:35:42 +00:00
Johnny Chen f3d3d1c743 Removed the two @skip class decorators. The assert failures have been fixed.
llvm-svn: 115055
2010-09-29 18:14:50 +00:00
Johnny Chen 2e566e040a Updated the comment section for running 'expr self->string' and 'expr self->date'.
The failures are similar in nature to the radar already filed:

        # rdar://problem/8492646
        # test/foundation fails after updating to tot r115023
        # self->str displays nothing as output

llvm-svn: 115052
2010-09-29 18:05:03 +00:00
Johnny Chen 8eb3850886 Added two @expectedFailure decorators for test_data_type_and_expr_with_dsym() and
test_data_type_and_expr_with_dwarf().

rdar://problem/8492646
test/foundation fails after updating to tot r115023: self->str displays nothing as output

llvm-svn: 115050
2010-09-29 17:58:12 +00:00
Johnny Chen 620f9d1548 Updated to reflect the updated tot r115023. Will be filing a bug next.
llvm-svn: 115046
2010-09-29 17:50:35 +00:00
Johnny Chen 3801fbdee8 Removed the two @expectedFailure decorators for expression parser, they have been fixed.
Also chnaged the expected string for 'frame variable this' from '(class C *const) this ='
to 'C *const) this =' for the time being, while investigating the different output for
tot r115023.

runCmd: frame variable this
output: (struct C *const) this = 0x0000000100000c2e
llvm-svn: 115042
2010-09-29 17:29:13 +00:00