Commit Graph

222 Commits

Author SHA1 Message Date
Johnny Chen 364b0e72d1 Add a test case (incomplete) to check that settings and readings of program
variabes work.

llvm-svn: 107914
2010-07-08 21:38:07 +00:00
Sean Callanan 246549c50b Moved NDEBUG from a global setting to a specific
hack.

llvm-svn: 107894
2010-07-08 18:16:16 +00:00
Sean Callanan 6015095608 Updated to build against the latest LLVM release.
Also fixed our build to define NDEBUG; code that
uses LLVM headers without NDEBUG is
binary-incompatible with libraries built with
NDEBUG.

llvm-svn: 107853
2010-07-08 02:13:18 +00:00
Johnny Chen acfbeff17e Test that debug symbols have the correct order as specified by the order file.
llvm-svn: 107844
2010-07-08 00:17:29 +00:00
Johnny Chen 529728e82a Fixed typos in the comments.
llvm-svn: 107829
2010-07-07 22:49:43 +00:00
Greg Clayton 51dc188216 64 bit ELF support from Stephen Wilson.
llvm-svn: 107817
2010-07-07 21:52:01 +00:00
Johnny Chen 41a3c9a5f8 Test that breakpoint by symbol name works correctly dlopen'ing a dynamic lib.
llvm-svn: 107812
2010-07-07 21:10:55 +00:00
Greg Clayton a624358728 Added some comments to clarify where "init_lldb" comes from.
llvm-svn: 107801
2010-07-07 18:40:03 +00:00
Greg Clayton 69b518f6ef typedef fixups, patch from Jean-Daniel Dupas.
llvm-svn: 107794
2010-07-07 17:07:17 +00:00
Greg Clayton 72db59664f Fixed "#endif"s followed by non comments, patch from Jean-Daniel Dupas.
llvm-svn: 107793
2010-07-07 17:06:20 +00:00
Benjamin Kramer 59d9a5c209 Declare LLDBVersionNumber extern "C" to make sure clang++ mangles it properly. Patch from Jean-Daniel Dupas!
llvm-svn: 107765
2010-07-07 09:33:41 +00:00
Benjamin Kramer 3f3ff5cc87 Fix build for newer versions of GCC that don't include cstring implicitly. Based on a patch by Pawel Wodnicki!
llvm-svn: 107763
2010-07-07 09:19:50 +00:00
Jim Ingham 6f80bc5602 Remove includes for removed files...
llvm-svn: 107753
2010-07-07 03:39:43 +00:00
Jim Ingham ebc09c36e9 Fix GetRepeatCommand so it works with multi-word commands.
Move the "source", "alias", and "unalias" commands to "commands *".
Move "source-file" to "source list".
Added a "source info" command but it isn't implemented yet.

llvm-svn: 107751
2010-07-07 03:36:20 +00:00
Jim Ingham 1308bb2791 Added a "GetRepeatCommand" to the command object. The Interpreter uses this
instead of the last history item to provide a command for the "empty" command.
Use this in the source-file command to make <RETURN> continue the listing rather
than relist the first listing...

llvm-svn: 107736
2010-07-06 23:48:33 +00:00
Johnny Chen 51991b549b Enable a test clause since rdar://problem/8163668 is fixed by http://llvm.org/viewvc/llvm-project?rev=107729&view=rev.
llvm-svn: 107733
2010-07-06 23:41:17 +00:00
Greg Clayton 364f1167cb Fixed an issue with looking up line table entries by address where internal
line table entries that were termination entries (ones that define the bounds
of the previous entry) could be found when looking up line table entries.
We now properly skip these termination entries and check the next entry to
try for a match.

llvm-svn: 107729
2010-07-06 23:34:08 +00:00
Johnny Chen f031b71f7e if -1 => evaluates to True
oops!

llvm-svn: 107724
2010-07-06 23:26:16 +00:00
Johnny Chen 0e38f42f0a Test that breakpoint works correctly in the presence of dead-code stripping.
llvm-svn: 107719
2010-07-06 22:52:00 +00:00
Jim Ingham 279a6c2669 Hide the logic for command resolution for commands, aliases & user commands behind a single
interface so everybody does it the same way.  Add an "exact" lookup for internal uses.

Fix up a few little cases where we weren't reporting command lookup errors correctly.

Added "b" as an alias for "breakpoint" so it doesn't collide with "bt".

llvm-svn: 107718
2010-07-06 22:46:59 +00:00
Jason Molenda ea84e76479 Switch over to using llvm's dwarf constants file.
llvm-svn: 107716
2010-07-06 22:38:03 +00:00
Greg Clayton 6b6742b08e Remove extraneous semicolon after if condition (from Jean-Daniel Dupas).
llvm-svn: 107694
2010-07-06 20:30:35 +00:00
Greg Clayton 5f067820ba Avoid duplicate names (something else that clang++ really doesn't like) in
function prototype (from Jean-Daniel Dupas).

llvm-svn: 107693
2010-07-06 20:29:25 +00:00
Greg Clayton 3afe8a9f1d Applied pid.patch from Jean-Daniel Dupas.
llvm-svn: 107692
2010-07-06 20:27:00 +00:00
Greg Clayton 388e3b0fa9 Added "-Wparentheses" so we catch possible errors like:
if (a = 0)

instead of: 

if (a == 0)

Thanks to Jean-Daniel Dupas.

llvm-svn: 107672
2010-07-06 16:16:14 +00:00
Greg Clayton a08073565a Jean-Daniel Dupas patch that fixes a bad if statement with assignment.
llvm-svn: 107671
2010-07-06 16:11:44 +00:00
Eric Christopher 2159b4ae6d Change order of initialization.
Patch by Stephen Wilson!

llvm-svn: 107623
2010-07-05 19:13:23 +00:00
Johnny Chen f02ec12796 Make it fail fast if 'mydir' attribute is not overridden by subclasses of
lldbtest.TestBase.

Also removed some debug prints.

llvm-svn: 107575
2010-07-03 20:41:42 +00:00
Johnny Chen bf6ffa3b89 Abstracted the lldb-specific unittest.TestCase.setUp()/tearDown() in a separate
module lldbtest.py and refactored the existing test cases to derive from the
abstract base class lldbtest.TestBase.

MOdified the test driver (dotest.py and dotest.pl) to set up additional
PYTHONPATH component for locating the lldbtest module, which sits in the same
directory.

llvm-svn: 107563
2010-07-03 03:41:59 +00:00
Sean Callanan 2ab712f212 Added the skeleton of an IR transformer that will
prepare IR for execution in the target.  Wired the
expression command to use this IR transformer when
conversion to DWARF fails, and wired conversion to
DWARF to always fail (well, we don't generate any
DWARF...)

llvm-svn: 107559
2010-07-03 01:35:46 +00:00
Johnny Chen f1d2ac7c01 Test variable with function ptr type and that break on the function works.
llvm-svn: 107545
2010-07-02 23:50:37 +00:00
Greg Clayton 13a177aeb8 Plugged 4 more leaks in the libunwind code. One leaks is still left in as it
is quite gnarly code and there is no good way to clean it up. I will have
Jason look at a fix for this.

llvm-svn: 107539
2010-07-02 23:23:14 +00:00
Sean Callanan 248e64b5b8 Fixes to improve logging (by printing basic
block labels) and produce cleaner IR (by removing
the thread-safe statics guards)

llvm-svn: 107528
2010-07-02 22:22:28 +00:00
Johnny Chen 03813ec687 Also verified the values of global variables.
llvm-svn: 107525
2010-07-02 22:12:25 +00:00
Johnny Chen 85d6948f3d Add a test to show global variables and to verify that they do display as having
global scopes.

llvm-svn: 107522
2010-07-02 22:04:42 +00:00
Sean Callanan 177909a350 Small fixes to the DWARF relocator.
llvm-svn: 107518
2010-07-02 21:28:35 +00:00
Sean Callanan 2df8a1f39c Added the skeleton of a transformation pass to
convert IR to DWARF.  So far, this pass only
performs a depth-first traversal of the IR,
logging each basic block as it finds it.

llvm-svn: 107515
2010-07-02 21:09:36 +00:00
Johnny Chen c653d4c574 Fixed logic error; checking return status and raising exception should only be
done if the environment variable LLDB_LOG is defined.

llvm-svn: 107508
2010-07-02 20:35:23 +00:00
Eli Friedman b6c9e103a1 Implement GetProgramFileSpec().
llvm-svn: 107502
2010-07-02 19:38:10 +00:00
Eli Friedman 5423ebff13 Add hacky, incomplete Linux host implementation; barely enough to allow
compiling lldb.  Someone else might try to improve it, though. :)

llvm-svn: 107501
2010-07-02 19:28:44 +00:00
Eli Friedman feaeebfb5d Add const qualification; fixes error on gcc 4.4.
llvm-svn: 107499
2010-07-02 19:15:50 +00:00
Greg Clayton d2d60ce388 Updated to llvm/clang from July 2, 2010 at 8:00AM.
llvm-svn: 107494
2010-07-02 18:39:06 +00:00
Sean Callanan 609f8c584a Added a method to get a stream's byte order.
llvm-svn: 107460
2010-07-02 02:43:42 +00:00
Greg Clayton 0b42ac32c8 More leaks detection:
- fixed 3 posix spawn attributes leaks 
- fixed us always leaking CXXBaseSpecifier objects when we create class 
  base classes. Clang apparently copies the base classes we pass in.

Fixed some code formatting in ClangASTContext.cpp.

llvm-svn: 107459
2010-07-02 01:29:13 +00:00
Jim Ingham 4fdf181a00 Remember to save first...
llvm-svn: 107457
2010-07-02 01:03:49 +00:00
Jim Ingham a302bb1608 Resolve dueling commits... Plus add docs for Resolve & ResolveUsername.
llvm-svn: 107456
2010-07-02 00:57:26 +00:00
Jim Ingham 7cc478b9a2 Remove duplicate def'n from FileSpec.h.
Add user name completion to the file completer.

llvm-svn: 107455
2010-07-02 00:45:55 +00:00
Greg Clayton c228ebba77 Removed the thread specific data that was being used for demangling since
removing it didn't cause any performance loss, and leaks were showing up
when run under instruments when we tried to re-use the buffer. We are now leak
free and still just as performant.

llvm-svn: 107453
2010-07-02 00:29:31 +00:00
Johnny Chen 3d7e687245 A dumber way to invoke the test suite.
Use this script to visit each python test case under the specified directory and
run python unittest.main() on each test case.

llvm-svn: 107447
2010-07-01 23:01:23 +00:00
Johnny Chen 119b53ea6d Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is
is defined.  Use ${LLDB_LOG} to specify the log file.

Create a singleton SBDebugger in the lldb namespace, that gets used when running
the entire test suite.

llvm-svn: 107445
2010-07-01 22:52:57 +00:00