Commit Graph

109078 Commits

Author SHA1 Message Date
Greg Clayton a63d08c9ff Modified the LocateMacOSXFilesUsingDebugSymbols(...) function to locate
an executable file if it is right next to a dSYM file that is found using
DebugSymbols. The code also looks into a bundle if the dSYM file is right
next to a bundle.

Modified the MacOSX kernel dynamic loader plug-in to correctly set the load
address for kext sections. This is a tad tricky because of how LLDB chooses
to treat mach-o segments with no name. Also modified the loader to properly
handle the older version 1 kext summary info.

Fixed a crasher in the Mach-o object file parser when it is trying to set
the section size correctly for dSYM sections.

Added packet dumpers to the CommunicationKDP class. We now also properly 
detect address byte sizes based on the cpu type and subtype that is provided.
Added a read memory and read register support to CommunicationKDP. Added a
ThreadKDP class that now uses subclasses of the RegisterContextDarwin_XXX for
arm, i386 and x86_64. 

Fixed some register numbering issues in the RegisterContextDarwin_arm class
and added ARM GDB numbers to the ARM_GCC_Registers.h file.

Change the RegisterContextMach_XXX classes over to subclassing their
RegisterContextDarwin_XXX counterparts so we can share the mach register 
contexts between the user and kernel plug-ins.

llvm-svn: 135466
2011-07-19 03:57:15 +00:00
Akira Hatanaka e4e9a590d2 Make EmitAtomic functions return the correct MachineBasicBlocks so that
ExpandISelPseudos::runOnMachineFunction does not visit instructions that have
just been added.

llvm-svn: 135465
2011-07-19 03:42:13 +00:00
Akira Hatanaka e97bd81f07 Do not insert instructions in reverse order.
llvm-svn: 135464
2011-07-19 03:14:58 +00:00
Enrico Granata 1490c6fd8f Fixed a bug where deleting a regex summary would not immediately reflect in the variables display
The "systemwide summaries" feature has been removed and replaced with a more general and
powerful mechanism.
Categories:
 - summaries can now be grouped into buckets, called "categories" (it is expected that categories
   correspond to libraries and/or runtime environments)
 - to add a summary to a category, you can use the -w option to type summary add and give
   a category name (e.g. type summary add -f "foo" foo_t -w foo_category)
 - categories are by default disabled, which means LLDB will not look into them for summaries,
   to enable a category use "type category enable". once a category is enabled, LLDB will
   look into that category for summaries. the rules are quite trivial: every enabled category
   is searched for an exact match. if an exact match is nowhere to be found, any match is
   searched for in every enabled category (whether it involves cascading, going to base classes,
   ...). categories are searched into the order in which they were enabled (the most recently
   enabled category first, then the second most and so on..)
 - by default, most commands that deal with summaries, use a category named "default" if no
   explicit -w parameter is given (the observable behavior of LLDB should not change when
   categories are not explicitly used)
 - the systemwide summaries are now part of a "system" category

llvm-svn: 135463
2011-07-19 02:34:21 +00:00
Eli Friedman 8608e6e913 Make isLoadExtLegal and isTruncStoreLegal check what the name says. :) This might have some minor effect on CellSPU, but all other targets should be unaffected. Fixing per report from Damien Vincent on llvmdev.
llvm-svn: 135462
2011-07-19 02:24:07 +00:00
Johnny Chen 74549c82ad Initialize the all important automatic variable 'lldb::ConnectionStatus status' before
invoking the Read(...) method to read in bytes.  This seems to fix the infinite looping
I was seeing on SnowLeopard while running the test suite.

llvm-svn: 135461
2011-07-19 01:13:00 +00:00
Howard Hinnant 09ddc43442 Correct test.
llvm-svn: 135460
2011-07-19 01:07:49 +00:00
Johnny Chen 349f076330 Add SWIG interface files for SBSymbol, SBSymbolContext, and SBSymbolContextList.
llvm-svn: 135459
2011-07-19 01:07:06 +00:00
Devang Patel 7ca23dde4e Update docs to reflect r135457.
llvm-svn: 135458
2011-07-19 01:04:39 +00:00
Devang Patel ac532dedf1 Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block.
llvm-svn: 135457
2011-07-19 01:03:32 +00:00
Devang Patel 206f5093e3 Simplify.
llvm-svn: 135456
2011-07-19 00:52:18 +00:00
Alexis Hunt 8cb46bb51c Implement a __WCHAR_UNSIGNED__ macro and use it to include WCHAR_MIN and
WCHAR_MAX in limits.h, thus solving the problem where the system header
thinks it knows better.

llvm-svn: 135455
2011-07-19 00:50:57 +00:00
Devang Patel 9ab3cac694 Revert r135423.
llvm-svn: 135454
2011-07-19 00:28:24 +00:00
Jeffrey Yasskin 532114e8a4 Document how to maintain a git-svn clone of the LLVM git repositories.
llvm-svn: 135453
2011-07-19 00:20:54 +00:00
Bill Wendling ada366c691 Micro-opt: Only emit compact unwind if there is a compact unwind encoding to emit.
llvm-svn: 135452
2011-07-19 00:09:25 +00:00
Bill Wendling 49bc680bdf Use the CompactUnwindEncoding from the Frame, if it's defined.
llvm-svn: 135451
2011-07-19 00:06:12 +00:00
Bill Wendling b20453faae Add a frame with the compact unwind encoding if it exists.
llvm-svn: 135450
2011-07-19 00:02:51 +00:00
Bill Wendling c438d78c38 Add a method to set compact unwind encoding information in a frame.
llvm-svn: 135449
2011-07-19 00:01:42 +00:00
Bill Wendling 6969ed6286 Rename CompactEncoding to CompactUnwindEncoding.
llvm-svn: 135448
2011-07-19 00:00:58 +00:00
Sean Callanan 67bc18552a Fixed a bug where the MC subtarget information
wasn't being initialized by the enhanced disassembler,
leading to assertion failures. 

llvm-svn: 135447
2011-07-19 00:00:41 +00:00
Bill Wendling c1e40ddde2 Add a field for the compact unwind encoding.
llvm-svn: 135446
2011-07-19 00:00:05 +00:00
Alexis Hunt 2405470f01 Adjust two tests to account for a nasty change in copying behavior
between C++03 and C++0x and its effect on exceptions, and another two to
not test move construction when rvalue references are not available.

llvm-svn: 135445
2011-07-18 23:51:25 +00:00
Alexis Hunt 483cf24547 Make all fstream tests use tmpnam if creating files, rather than
hard-coded names.

llvm-svn: 135444
2011-07-18 23:51:21 +00:00
Bill Wendling 353404d924 Move the compact encoding from the target-specific library to the code-gen
library.

llvm-svn: 135443
2011-07-18 23:38:40 +00:00
Owen Anderson 83c6c4f30e Revamp our handling of tLDMIA[_UPD] and tSTMIA[_UPD] to avoid having multiple instructions with the same encoding. This resolves another conflict when bringing up the new-style disassembler.
llvm-svn: 135442
2011-07-18 23:25:34 +00:00
Johnny Chen f74cb50cda Add SWIG Python interface files for SBLineEntry, SBListener, and SBModule.
llvm-svn: 135441
2011-07-18 23:11:07 +00:00
Eric Christopher 6fdc34054f Add .gitignore file.
llvm-svn: 135440
2011-07-18 23:05:36 +00:00
Evan Cheng 4ce2e4f289 Eliminate TargetAsmInfo::getCompactUnwindEncoding. This get rid of the
use of TargetFrameLowering in TargetAsmInfo.

llvm-svn: 135439
2011-07-18 22:32:12 +00:00
Evan Cheng 67c033e6b8 Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
better location welcome).

llvm-svn: 135438
2011-07-18 22:29:13 +00:00
Devang Patel 11de9a966a Check column number also.
llvm-svn: 135437
2011-07-18 22:18:04 +00:00
Johnny Chen d84a9a1249 Missed the interface file for SBFunction in the previous checkin.
llvm-svn: 135436
2011-07-18 22:15:37 +00:00
Owen Anderson eab4625763 Mark the Darwin assembler workout as isCodeGenOnly, so that it doesn't cause decoding conflicts in the new-style disassembler.
llvm-svn: 135434
2011-07-18 22:14:02 +00:00
Johnny Chen 0eca544b45 Add SWIG Python interface files for SBDebugger, SBCompileUnit, and SBEvent.
llvm-svn: 135432
2011-07-18 22:11:53 +00:00
Jeffrey Yasskin 7a16288157 Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
errors like the one corrected by r135261.  Migrate all LLVM callers of the old
constructor to the new one.

llvm-svn: 135431
2011-07-18 21:45:40 +00:00
Johnny Chen 5de6a790f2 Add SWIG Python interface files for SBAddress, SBBlock, SBBreakpoint, and SBBreakpointLocation.
llvm-svn: 135430
2011-07-18 21:30:21 +00:00
Sean Callanan 22c52d9a98 Removed a redundant dyn_cast. Thanks to Felipe
Cabecinhas.

llvm-svn: 135429
2011-07-18 21:30:18 +00:00
Tobias Grosser 0c0acb02d5 www: Fix typo
Reported by: Chad Rosier <mcrosier@apple.com>

llvm-svn: 135428
2011-07-18 21:27:42 +00:00
Eli Friedman 4d5532a085 FileCheck-ize a couple tests.
llvm-svn: 135427
2011-07-18 21:23:42 +00:00
Andrew Trick c43b67644c Compiler warning.
llvm-svn: 135426
2011-07-18 21:15:03 +00:00
Evan Cheng b505ace101 MCContext now takes MCRegisterInfo.
llvm-svn: 135425
2011-07-18 20:57:51 +00:00
Evan Cheng d60fa58ba1 Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
to MCRegisterInfo. Also initialize the mapping at construction time.

This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.

llvm-svn: 135424
2011-07-18 20:57:22 +00:00
Devang Patel 4dc76f2438 During bottom up fast-isel, instructions emitted to materalize registers are at top of basic block and do not have debug location. This may misguide debugger while entering the basic block and sometimes debugger provides semi useful view of current location to developer by picking up previous known location as current location. Assign a sensible location to the first instruction in a basic block, if it does not have one location derived from source file, so that debugger can provide meaningful user experience to developers in edge cases.
[take 2]

llvm-svn: 135423
2011-07-18 20:55:23 +00:00
Alexis Hunt 4c14ed75ee Do a litmus test of using tmpnam to generate safe temporary file names
for the tests that open new data files.

llvm-svn: 135422
2011-07-18 20:46:16 +00:00
Tobias Grosser 276aab5a21 www: Mention new Polly Builder in News
llvm-svn: 135421
2011-07-18 20:34:41 +00:00
Andrew Trick 7da2417c8a indvars: LinearFunctionTestReplace for non-canonical IVs.
For -disable-iv-rewrite, perform LFTR without generating a new
"canonical" induction variable. Instead find the "best" existing
induction variable for use in the loop exit test and compute the final
value of that IV for use in the new loop exit test. In short,
convert to a simple eq/ne exit test as long as it's cheap to do so.

llvm-svn: 135420
2011-07-18 20:32:31 +00:00
Johnny Chen 357033b337 Add SWIG Python interface files for SBProcess, SBThread, and SBFrame.
llvm-svn: 135419
2011-07-18 20:13:38 +00:00
Akira Hatanaka 338879a7f4 Do not treat atomic.load.sub differently than other atomic binary intrinsics.
llvm-svn: 135418
2011-07-18 19:58:59 +00:00
Johnny Chen 9a5b16b87c Fix header documentations.
llvm-svn: 135417
2011-07-18 19:15:22 +00:00
Johnny Chen 67ae7bdb54 Add two new interface files SBValue.i and SBValueList.i, instead of directly swigging the header files.
llvm-svn: 135416
2011-07-18 19:08:30 +00:00
Akira Hatanaka 27292638bd Set mayLoad or mayStore flags for SC and LL in order to prevent LICM from
moving them out of the loop. Previously, stores and loads to a stack frame
object were inserted to accomplish this. Remove the code that was needed to do
this. Patch by Sasa Stankovic.

llvm-svn: 135415
2011-07-18 18:52:12 +00:00