Commit Graph

7319 Commits

Author SHA1 Message Date
Andy Gibbs ac93aedc76 Revise r184335 so that warning suppression flag is only for clang 3.4 and higher
llvm-svn: 184399
2013-06-20 06:47:36 +00:00
Greg Clayton e2c93dafc7 Fixed a crasher that I encountered when looking up a virtual base class offset.
llvm-svn: 184390
2013-06-20 01:24:52 +00:00
Greg Clayton 694b49f0f8 Cleanup the output a bit by removing old print statements and also printing the number of types found.
llvm-svn: 184389
2013-06-20 01:23:56 +00:00
Greg Clayton 0fc4f31e4b Unique types a bit more using the clang type to make sure we don't get multiple copies of the same type due to the debug info having multiple types that get uniqued.
llvm-svn: 184388
2013-06-20 01:23:18 +00:00
Greg Clayton d8c3d4b1e9 Implemented a types.py module that allows types to be inspected for padding.
The script was able to point out and save 40 bytes in each lldb_private::Section by being very careful where we need to have virtual destructors and also by re-ordering members.

llvm-svn: 184364
2013-06-19 21:50:28 +00:00
Enrico Granata 6d2cfb80ba Huge speedup for testsuite categories
This ensures that we won't try to do cleanups of test cases that we are skipping
e.g. this brings down the time required to run the cmdline category on my machine from ~70s to ~30s

llvm-svn: 184363
2013-06-19 21:48:09 +00:00
Andy Gibbs 897f50c5ba Use LLDB_INVALID_REGNUM at Mike Sartain's suggestion
llvm-svn: 184342
2013-06-19 20:04:56 +00:00
Ashok Thirumurthi d5dcec1181 Updated the LLDB download page to reflect Debian package locations for 3.3 as well as the incremental 3.4 releases.
llvm-svn: 184339
2013-06-19 19:32:56 +00:00
Enrico Granata c71f349a9e <rdar://problem/14005652>
Fixing a bug with the NSString data formatter where some strings would be truncated

llvm-svn: 184336
2013-06-19 19:15:29 +00:00
Andy Gibbs ef19a014d6 The 'register' keyword is now deprecated in C++11, so ignore the warning when compiling lldb with clang since python headers commonly use the keyword.
llvm-svn: 184335
2013-06-19 19:06:44 +00:00
Andy Gibbs 44f4db784b Fix two 'variable is used uninitialised' warnings. Change assert to llvm_unreachable.
llvm-svn: 184334
2013-06-19 19:05:52 +00:00
Andy Gibbs a297a97e09 Sort out a number of mismatched integer types in order to cut down the number of compiler warnings.
llvm-svn: 184333
2013-06-19 19:04:53 +00:00
Jason Molenda 8359214427 A few small enhancements to the diagnose-unwind command.
Change the simple-minded stack walk to not depend on lldb to unwind
the first frame.

Collect a list of Modules and Addresses seen while backtracing (with
both methods), display the image list output for all of those modules,
plus disassemble and image show-unwind any additional frames that
the simple backtrace was able to unwind through instead of just the 
lldb unwind algorithm frames.

Remove checks for older lldb's that didn't support -a for disassemble
or specifying the assembler syntax on x86 targets.

llvm-svn: 184280
2013-06-19 04:52:55 +00:00
Enrico Granata 5c47969350 Improvements to "command script import" to better support reloading in Xcode
Xcode spawns a new LLDB SBDebugger for each debug session, and this was causing the reloading of python modules to fail across debug sessions

(long story short: the module would not be loaded in the current instance of the ScriptInterpreter, but would still be present in sys.modules, hence the import call would just make a copy of it and not run it again
Greg's new decorator uncovered the issue since it relies on actually loading the module's code rather than using __lldb_init_module as the active entity)

This patch introduces the notion of a local vs. global import and crafts an appropriate command to allow reloading to work across debug sessions

llvm-svn: 184279
2013-06-19 03:05:52 +00:00
Greg Clayton 88e0f618ea Added a new decorator function in the "lldb" module that can register a command automatically. We have just a few kinks to work out for the Xcode workflow and we will be ready to switch over to using this. To use this, you can decorate your python function as:
@lldb.command("new_command", "Documentation string for new_command...")
def new_command(debugger, command, result, dict):
    ....
    
No more need to register your command in the __lldb_init_module function!

llvm-svn: 184274
2013-06-19 01:38:02 +00:00
Jim Ingham fc65a50f41 Don't actually Halt in the Interrupt handler for the Process, just send an AsyncInterrupt.
That's actually not async-signal-clean, but it is a lot safer than Halt...

llvm-svn: 184270
2013-06-19 00:56:17 +00:00
Enrico Granata 9ac21aef9b <rdar://problem/14086503>
Hardening the libstdc++ std::map test case against line table changes

llvm-svn: 184265
2013-06-19 00:20:57 +00:00
Enrico Granata d223563a59 <rdar://problem/14086503>
Hardening the libstdc++ std::vector test case against line table changes

llvm-svn: 184264
2013-06-19 00:14:02 +00:00
Enrico Granata 08a1bb8199 <rdar://problem/14194140>
Adding support for correctly extracting children out of vector types for data formatter purposes

llvm-svn: 184262
2013-06-19 00:00:45 +00:00
Greg Clayton f02500c74c Added the ability to get a list of types from a SBModule or SBCompileUnit. Sebastien Metrot wanted this, and sent a hollowed out patch. I filled in the blanks and did the low level implementation. The new functions are:
//------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// module.
///
/// @param[in] type_mask
///     A bitfield that consists of one or more bits logically OR'ed
///     together from the lldb::TypeClass enumeration. This allows
///     you to request only structure types, or only class, struct
///     and union types. Passing in lldb::eTypeClassAny will return
///     all types found in the debug information for this module.
///
/// @return
///     A list of types in this module that match \a type_mask
//------------------------------------------------------------------
lldb::SBTypeList
SBModule::GetTypes (uint32_t type_mask)


//------------------------------------------------------------------
/// Get all types matching \a type_mask from debug info in this
/// compile unit.
///
/// @param[in] type_mask
///    A bitfield that consists of one or more bits logically OR'ed
///    together from the lldb::TypeClass enumeration. This allows
///    you to request only structure types, or only class, struct
///    and union types. Passing in lldb::eTypeClassAny will return
///    all types found in the debug information for this compile
///    unit.
///
/// @return
///    A list of types in this compile unit that match \a type_mask
//------------------------------------------------------------------
lldb::SBTypeList
SBCompileUnit::GetTypes (uint32_t type_mask = lldb::eTypeClassAny);

This lets you request types by filling out a mask that contains one or more bits from the lldb::TypeClass enumerations, so you can only get the types you really want.

llvm-svn: 184251
2013-06-18 22:51:05 +00:00
Enrico Granata a2e7f9ab2b <rdar://problem/14194128>
ClangASTContext was failing to retrieve fields and base class info for ObjC variables
This checkin fixes that and adds a test case

llvm-svn: 184248
2013-06-18 22:40:36 +00:00
Matt Kopec 246a89562c Add assertion for when no watchpoint found in POSIX watchnotify handler.
Also, ensure x86_64 watchpoint registers are initialized before they are accessed on the POSIX side.

llvm-svn: 184246
2013-06-18 21:58:02 +00:00
Jim Ingham c64623179b We were getting an assert because somebody was making a watchpoint that was
neither read nor write.  Tighten up the checking so this isn't possible.

<rdar://problem/14111167>

llvm-svn: 184245
2013-06-18 21:52:48 +00:00
Jim Ingham 8c8c6fab4c Make the lldb "Release" configuration use the same llvm build "Release+Asserts" as the lldb "Debug" configuration.
No need to rebuild llvm and remove asserts to build the local optimized lldb.

llvm-svn: 184243
2013-06-18 21:44:59 +00:00
Matt Kopec 362f503519 Temporarily disable checking of watchpoint hit on FreeBSD on trace message.
Patch from Ed Maste.

llvm-svn: 184241
2013-06-18 21:35:32 +00:00
Jason Molenda a721731fdd PlatformDarwinKernel was treating its file path arg as a kext bundle id -- but when the user
did a manual "target modules add", it would be a file path.  If the kext bundle lookup fails,
fall back to calling PlatformDarwin's GetSharedModule which will handle a file path correctly.
<rdar://problem/14179858> 

llvm-svn: 184237
2013-06-18 21:23:14 +00:00
Jim Ingham cc0273d784 Fix the help for "image dump line-table" - its arguments are compilation units not modules.
llvm-svn: 184226
2013-06-18 20:27:11 +00:00
Adrian Prantl 5eeaf7402b Fix a missing pointer deref that was uncovered by one of the buildbots.
llvm-svn: 184216
2013-06-18 18:24:04 +00:00
Enrico Granata 68ae4117d9 <rdar://problem/12717717>
Modifying our data formatters matching algorithm to ensure that "const X*" is treated as equivalent to "X*"
Also, a couple improvements to the "lldb types" logging

llvm-svn: 184215
2013-06-18 18:23:07 +00:00
Enrico Granata 5342c4409b This patch fixes the issue where our command-line tab completer would sometimes replicate commands
e.g.

(lldb) pl<TAB>
Available completions:
	platform
	plugin
	platform
	plugin

Thanks to Matthew Sorrels for doing work and testing on this issue

llvm-svn: 184212
2013-06-18 18:01:08 +00:00
Enrico Granata 8ca77852f4 Removing the lldb-perf file group from our Xcode project
This is in a separate project now so this duplication is unnecessary and some referenced files were also dangling after a rename

llvm-svn: 184209
2013-06-18 17:15:32 +00:00
Bill Wendling d63d0a8fe3 Update to new API.
llvm-svn: 184177
2013-06-18 07:50:43 +00:00
Enrico Granata ca5acdbef8 <rdar://problem/13270271>
Only add the — (double dash) separator to a command syntax if it has any options to be separated from arguments
Also remove the unused Translate() method from CommandObject 

llvm-svn: 184163
2013-06-18 01:17:46 +00:00
Greg Clayton cd3523c12d Added a troubleshooting page as a place to add commonly asked questions with solutions.
The first two questions I have added explanations and answers to are:
- File and line breakpoints are not getting hit
- How do I check if I have debug symbols?

llvm-svn: 184159
2013-06-18 01:01:31 +00:00
Enrico Granata 9b27c6f0d4 <rdar://problem/13926101>
Allow “command script import” to work with folder names that have a ‘ (tick) in them

Kudos to StackOverflow (question 1494399) for the replace_all code!

llvm-svn: 184158
2013-06-18 00:58:06 +00:00
Enrico Granata a62e38c898 Adding a "cmdline" category to the test suite
llvm-svn: 184155
2013-06-18 00:22:27 +00:00
Greg Clayton 0076e71592 A collection of 3 patches to the COFF file ObjectFile parser from Virgile Bello:
3 patches, aiming to improve PE/COFF support:
- First patch fix symbol reading (invalid header size from sizeof() == 20 != 18, and various bugfixes such as invalid skipping of auxiliary symbols, 4 bytes shift from beginning, etc...).
- Second patch add image_base to section vmaddr offset so that VM addr is in image_base space.
- Third patch add support for DWARF section in PECOFF (taken from ELF counterpart), since they are generated by gcc/clang under windows.

llvm-svn: 184153
2013-06-18 00:08:58 +00:00
Enrico Granata 63123b6484 Renaming the "--wipe" option to "command history" to "--clear" (-C) for coherence with the rest of the LLDB command-line interface
llvm-svn: 184147
2013-06-17 23:28:27 +00:00
Michael Sartain 9eb4cc6266 Add new files to CMakeLists.txt to fix cmake build error.
llvm-svn: 184143
2013-06-17 23:07:22 +00:00
Enrico Granata 7594f14f7d <rdar://problem/14134716>
This is a rewrite of the command history facility of LLDB

It takes the history management out of the CommandInterpreter into its own CommandHistory class
It reimplements the command history command to allow more combinations of options to work correctly (e.g. com hist -c 1 -s 5)
It adds a new --wipe (-w) option to command history to allow clearing the history on demand
It extends the lldbtest runCmd: and expect: methods to allow adding commands to history if need be
It adds a test case for the reimplemented facility

llvm-svn: 184140
2013-06-17 22:51:50 +00:00
Enrico Granata fd4bc4e58f Fixing a linking issue when building LLDB with ToT LLVM
llvm-svn: 184127
2013-06-17 21:42:39 +00:00
Matt Kopec 2ee99f4922 Fix breakpoint test to account for full path of source file location.
llvm-svn: 184126
2013-06-17 21:27:50 +00:00
Sean Callanan ad7cc466d7 Fixed a problem in the expression parser that
caused the IR interpreter not to work if the
process had finished running.

<rdar://problem/14124301>

llvm-svn: 184125
2013-06-17 21:19:31 +00:00
Matt Kopec 36e5a7db2a Fix single whitespace before breakpoint filename in some tests due to r183932.
llvm-svn: 184104
2013-06-17 19:00:31 +00:00
Michael Sartain d55eadf0be Add newer Linux AT_ defines from elf.h.
llvm-svn: 184094
2013-06-17 17:44:53 +00:00
Michael Sartain c493bd1f59 Remove extra modules.Append() as it causes dupes in the m_images array. (Used with image list, etc.)
llvm-svn: 184082
2013-06-17 15:35:42 +00:00
Michael Sartain ff5b497c1f Fix unitialized variable in AuxVector::GetEntryName() which crashed in AuxVector::DumpToLog
llvm-svn: 184023
2013-06-15 00:25:52 +00:00
Rafael Espindola 7a35f4b1e3 Fix autohell build.
llvm-svn: 184018
2013-06-14 23:00:27 +00:00
Matt Kopec 58231d7897 Remove unused Host macro.
Patch from Ed Maste.

llvm-svn: 183998
2013-06-14 19:41:36 +00:00
Rafael Espindola d0c19ec0af Fix the build. clang/Driver/OptTable.h was removed.
llvm-svn: 183991
2013-06-14 18:04:50 +00:00