Commit Graph

3781 Commits

Author SHA1 Message Date
Sean Callanan d5145b36ef Wrapped some logging statements in conditionals, to prevent
crashes.

llvm-svn: 143756
2011-11-05 00:08:12 +00:00
Sean Callanan bfb237bc02 Updated LLVM/Clang to pick up a fix for imports of
C++ vtables, fixing a record layout problem in the
expression parser.

Also fixed various problems with the generation 
and unpacking of llvm.zip given our new better
handling of multiple architectures in the LLVM
build.

(And added a log message that will hopefully catch
record layout problems in the future.)

llvm-svn: 143741
2011-11-04 22:46:46 +00:00
Greg Clayton 9a67c268f8 For "Debug" and "Release" builds, don't build llvm into the $(OBJROOT) since
we often nuke our "build" folder so we can do clean builds. This way if you
are building your own LLVM you won't have to rebuild LLVM when you do remove
your build folder. The new location for the LLVM build is:

lldb/llvm-build

llvm-svn: 143713
2011-11-04 17:36:00 +00:00
Greg Clayton 755c73f1e1 Fixed the LD_DYLIB_INSTALL_NAME to the LLDB.framework.
llvm-svn: 143710
2011-11-04 17:18:16 +00:00
Benjamin Kramer 44030f12f1 Fix linux build after r143679.
llvm-svn: 143703
2011-11-04 16:06:40 +00:00
Benjamin Kramer 110f5039b1 Include limits.h for PATH_MAX.
llvm-svn: 143694
2011-11-04 13:33:49 +00:00
Greg Clayton 0ddf6be103 Fixed a build issue on an older Xcode.
llvm-svn: 143679
2011-11-04 03:42:38 +00:00
Greg Clayton dce502ede0 Fixed the Xcode project building of LLVM to be a bit more user friendly:
- If you download and build the sources in the Xcode project, x86_64 builds
  by default using the "llvm.zip" checkpointed LLVM.
- If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the
  Xcode project will download the right LLVM sources and build them from 
  scratch
- If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib"
  directory, we will use the sources you have placed in the LLDB directory.
  
Python can now be disabled for platforms that don't support it. 

Changed the way the libllvmclang.a files get used. They now all get built into
arch specific directories and never get merged into universal binaries as this
was causing issues where you would have to go and delete the file if you wanted
to build an extra architecture slice.

llvm-svn: 143678
2011-11-04 03:34:56 +00:00
Sean Callanan 744756e389 Occasionally LLDB runs into contexts where the
target is stopped in a C++ or Objective-C method
but the "self" pointer's valid range actually
doesn't cover the current location.  Before, that
was confusing Clang to the point where it crashed;
now, we sanity-check and fall back to pretending
we're in a C function if "self" or "this" isn't
available.

llvm-svn: 143676
2011-11-04 02:09:33 +00:00
Johnny Chen e79a8d3dce Add a utility script:
Greps and returns the first svn log entry containing a line matching the regular
expression pattern passed as the only arg.

Example:

svn log -v | grep-svn-log.py '^   D.+why_are_you_missing.h$'

llvm-svn: 143671
2011-11-04 01:05:29 +00:00
Sean Callanan 3dea5c7cad Fixed a problem where the "this" pointer didn't
have the correct value in the IRInterpreter.

llvm-svn: 143663
2011-11-03 22:48:37 +00:00
Jim Ingham cf0bca9e85 Print out the task suspend count as well.
llvm-svn: 143659
2011-11-03 21:43:55 +00:00
Greg Clayton 982c9762a2 Modified all Process::Launch() calls to use a ProcessLaunchInfo structure
on internal only (public API hasn't changed) to simplify the paramter list
to the launch calls down into just one argument. Also all of the argument,
envronment and stdio things are now handled in a much more centralized fashion.

llvm-svn: 143656
2011-11-03 21:22:33 +00:00
Benjamin Kramer f82d8064d4 The alpha and system z backends were removed.
llvm-svn: 143613
2011-11-03 12:13:52 +00:00
Sean Callanan 9c95fd2ed6 Fixed the function that gets values for the
IRInterpreter to get the value, not the location,
of references.  The location of a reference has
type T&&, which is meaningless to Clang.

llvm-svn: 143592
2011-11-02 23:24:30 +00:00
Greg Clayton e59da1688e Bumping Xcode project versions for lldb-85 and debugserver-150.
llvm-svn: 143587
2011-11-02 23:11:17 +00:00
Sean Callanan f90597993a ...And forgot to check in build-llvm.pl. Sigh.
llvm-svn: 143586
2011-11-02 23:09:23 +00:00
Benjamin Kramer 4832e29795 Try to unbreak Makefile builds.
llvm-svn: 143566
2011-11-02 19:52:07 +00:00
Sean Callanan c832475cd2 Updated LLVM/Clang to pull in an MCJIT fix that
allows us to set __attribute__ ((used)) on expressions
that masquerade as methods.  When we are stopped in
classes in anonymous namespaces, this fix (and enabling
__attribute__ ((used)) on the method) will allow
expressions to run.

llvm-svn: 143560
2011-11-02 18:09:01 +00:00
Greg Clayton 8b867b475b <rdar://problem/10020849>
Fixed an issue where the DWARF might mention that a class has a constructor
(default, copy or move), destructor, or an assignment operator (copy or move)
and it might not have an actual implementation in your code. Then you try and
use this struct or class in an expression and the JIT would ask for the 
address of these methods that were in the declaration, yet there are none.
We now "do the right thing" for trivial ctors, dtors and assignment operators
by telling the methods that they are are defaulted and trivial, and clang will
then just do all of the work with builtins!

llvm-svn: 143528
2011-11-02 02:06:20 +00:00
Sean Callanan dbb583992a Sometimes the debug information includes artifically-
generated special member functions (constructors,
destructors, etc.) for classes that don't really have
them.  We needed to mark these as artificial to reflect
the debug information; this bug does that for
constructors and destructors.

The "etc." case (certain assignment operators, mostly)
remains to be fixed.

llvm-svn: 143526
2011-11-02 01:38:59 +00:00
Sean Callanan fc89c142d3 Added functionality to call Objective-C class methods
correctly, and added a testcase to check that it works.

The main problem here is that Objective-C class method
selectors are external references stored in a special
data structure in the LLVM IR module for an expression.
I just had to extract them and ensure that the real
class object locations were properly resolved.

llvm-svn: 143520
2011-11-01 23:38:03 +00:00
Johnny Chen a8df2c7a74 Add bench entries.
llvm-svn: 143476
2011-11-01 19:22:09 +00:00
Johnny Chen 5e27d5e033 Change the expected substrings for 'frame variable' output to:
'::my_uint_t', 'anon_uint = 0'

from:

    '(my_uint_t) anon_uint = 0'

to make the test suite clean with ToT.

llvm-svn: 143474
2011-11-01 18:46:52 +00:00
Sean Callanan c1b732d782 Added the capability (turned off for now) to mark a
method as __attribute__ ((used)) when adding it to a
class.  This functionality is useful when stopped in
anonymous namespaces: expressions attached to classes
in anonymous namespaces are typically elided by Clang's
CodeGen because they have no namespaces are intended
not to be externally visible.  __attribute__ ((used))
forces CodeGen to emit the function.

Right now, __attribute__ ((used)) causes the JIT not to
emit the function, so we're not enabling it until we
fix that.

llvm-svn: 143469
2011-11-01 18:07:13 +00:00
Sean Callanan ea685aeb3c Minor logging changes: added logging right before
the expression makes it to the JIT, and made some
logging only appear in verbose mode.

llvm-svn: 143467
2011-11-01 17:33:54 +00:00
Daniel Dunbar 8d365a1749 build: liblldb now depends on the linker library
llvm-svn: 143466
2011-11-01 17:32:01 +00:00
Jason Molenda 707fec479c Restructure the relationship between UnwindLLDB and the
RegisterContextLLDBs it contains.

Previously RegisterContextLLDB objects had a pointer to their "next"
frame down the stack.  e.g. stack starts at frame 0; frame 3 has a
pointer to frame 2.  This is used to retreive callee saved register
values.  When debugging an inferior that has blown out its own stack,
however, this could result in lldb blowing out its own stack while
recursing down to retrieve register values.

RegisterContextLLDB no longer has a pointer to its next frame; it 
has a reference to the UnwindLLDB which contains it.  When it needs
to retrieve a reg value, it asks the UnwindLLDB for that reg value
and UnwindLLDB iterates through the frames until it finds a location.

llvm-svn: 143423
2011-11-01 03:21:25 +00:00
Jim Ingham ce553d885a Enhanced the ObjC DynamicCheckerFunction to test for "object responds to selector" as well as
"object borked"...  Also made the error when the checker fails reflect this fact rather than
report a crash at 0x0.

Also a little cleanup:
- StopInfoMachException had a redundant copy of the description string.
- ThreadPlanCallFunction had a redundant copy of the thread, and had a 
copy of the process that it didn't really need.

llvm-svn: 143419
2011-11-01 02:46:54 +00:00
Greg Clayton 93d217889e Bumped Xcode project version to lldb-84 and debugserver-149.
llvm-svn: 143408
2011-11-01 01:10:56 +00:00
Greg Clayton 9d3d6886e6 Fixed some warnings after enabling some stricter warnings in the Xcode project
settings.

Also fixed an issue where we weren't creating anonymous namepaces correctly:
<rdar://problem/10371295>

llvm-svn: 143403
2011-10-31 23:51:19 +00:00
Jim Ingham 549f737453 We can't have the global vector of modules be a static object, or it might get destroyed
before all the modules, which will then crash when the next modules tries to take itself off it.

llvm-svn: 143402
2011-10-31 23:47:10 +00:00
Daniel Dunbar 3344d2b9ea build: Add the Darwin-Kernel Makefile.
llvm-svn: 143398
2011-10-31 23:38:34 +00:00
Daniel Dunbar a6ad0e2979 warnings: Fix another place with extension warnings I somehow missed.
llvm-svn: 143397
2011-10-31 23:38:30 +00:00
Johnny Chen 5fede4bfba Add expectedFailure decorators.
rdar://problem/10373783

llvm-svn: 143396
2011-10-31 23:35:33 +00:00
Johnny Chen 9a1e9af2ba Add some expr evaluations for simple STL data types.
Radar to be filed soon.

llvm-svn: 143395
2011-10-31 23:28:52 +00:00
Daniel Dunbar 16d88ff045 tests: Improve Makefile/dotest to properly set LLDB_HERE variable used in some
tests.

llvm-svn: 143394
2011-10-31 23:27:06 +00:00
Jim Ingham 56bbb88689 ValueObjectVariable::GetClangAST should check that it has a valid Type before accessing it.
llvm-svn: 143393
2011-10-31 23:06:45 +00:00
Daniel Dunbar f1a7d2253a build: Fix SWIG include paths on Darwin.
llvm-svn: 143390
2011-10-31 22:51:14 +00:00
Daniel Dunbar 3257a7714d build: Build in the Darwin-Kernel OperatingSystem plugin.
llvm-svn: 143389
2011-10-31 22:51:11 +00:00
Daniel Dunbar f9031c4ff5 build: Fix Makefiles on Darwin to link proper dynamic loader plugin.
llvm-svn: 143388
2011-10-31 22:51:08 +00:00
Daniel Dunbar 12a199040c warnings: Use LLVM_EXTENSION to suppress a bunch of pedantic warnings.
llvm-svn: 143387
2011-10-31 22:51:05 +00:00
Daniel Dunbar 0d23d03b7c warnings: Fix a non-standard escape sequence.
llvm-svn: 143386
2011-10-31 22:51:02 +00:00
Daniel Dunbar 108228bf5b warnings: Fix use of a non-standard escape.
llvm-svn: 143385
2011-10-31 22:51:00 +00:00
Daniel Dunbar dacdfb52b0 warnings: Get rid of spurious semicolon.
llvm-svn: 143384
2011-10-31 22:50:57 +00:00
Daniel Dunbar 807d2c6b27 build: Add some -Wno's for things LLDB isn't clean on yet.
llvm-svn: 143383
2011-10-31 22:50:55 +00:00
Daniel Dunbar 5ae8732394 build: Fix an improperly formed include path (works under Xcode's promiscuous include additions, but not Makefiles).
llvm-svn: 143382
2011-10-31 22:50:53 +00:00
Daniel Dunbar a08823fd10 warnings: Fix a bunch of -Wreorder problems.
llvm-svn: 143381
2011-10-31 22:50:49 +00:00
Daniel Dunbar daed340b57 warnings: Fix several uses of trailing comma on enumeration extensions.
llvm-svn: 143380
2011-10-31 22:50:41 +00:00
Daniel Dunbar f9f7032b5d warnings: Fix up several const qualified return types.
llvm-svn: 143379
2011-10-31 22:50:37 +00:00