| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
parameter.
This change converts points to clang::ExternalASTSource from llvm::OwningPtr<> to
llvm::IntrusiveRefCntPtr<>.
llvm-svn: 202411
|
|
|
|
|
|
|
|
| |
prototypes and we now mark the function prototypes as being variadic.
<rdar://problem/16149526>
llvm-svn: 202061
|
|
|
|
|
|
|
|
|
| |
inside a class "A" in the DWARF where "A" is a forward declaration.
<rdar://problem/14673945>
<rdar://problem/15682781>
llvm-svn: 200985
|
|
|
|
| |
llvm-svn: 199506
|
|
|
|
|
|
|
|
|
|
| |
which isn't a complete definition.
<rdar://problem/15594781>
We need to not crash at any cost. We currently detect if any base classes are forward declarations, emit an error string that directs the use to file a compiler bug, and continues by completing the class with no contents. This avoids a clang crash that would usually follow when we call setBase().
llvm-svn: 197108
|
|
|
|
|
|
|
|
| |
not alway treat every member as a bitfield.
The previous fix for bitfields made us always search for anonymous bitfields regardless of the member (bitfield or normal field).
llvm-svn: 197088
|
|
|
|
|
|
| |
llvm.org/pr18114
llvm-svn: 196146
|
|
|
|
| |
llvm-svn: 193794
|
|
|
|
| |
llvm-svn: 193792
|
|
|
|
| |
llvm-svn: 193407
|
|
|
|
|
| |
Review: http://llvm-reviews.chandlerc.com/D2007
llvm-svn: 193368
|
|
|
|
| |
llvm-svn: 193250
|
|
|
|
|
|
|
|
|
|
|
| |
Some versions of the GNU MIPS toolchain generate 64-Bit DWARF (even though
it isn't really necessary). This change adds support for the 64-Bit DWARF
format, but is not actually tested with >4GB of debug data.
Similar changes are in progress for llvm's version of DWARFDebugLine, in
review D1988.
llvm-svn: 193242
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the __thread modifier.
To make this work this patch extends LLDB to:
- Explicitly track the link_map address for each module. This is effectively the module handle, not sure why it wasn't already being stored off anywhere. As an extension later, it would be nice if someone were to add support for printing this as part of the modules list.
- Allow reading the per-thread data pointer via ptrace. I have added support for Linux here. I'll be happy to add support for FreeBSD once this is reviewed. OS X does not appear to have __thread variables, so maybe we don't need it there. Windows support should eventually be workable along the same lines.
- Make DWARF expressions track which module they originated from.
- Add support for the DW_OP_GNU_push_tls_address DWARF opcode, as generated by gcc and recent versions of clang. Earlier versions of clang (such as 3.2, which is default on Ubuntu right now) do not generate TLS debug info correctly so can not be supported here.
- Understand the format of the pthread DTV block. This is where it gets tricky. We have three basic options here:
1) Call "dlinfo" or "__tls_get_addr" on the inferior and ask it directly. However this won't work on core dumps, and generally speaking it's not a good idea for the debugger to call functions itself, as it has the potential to not work depending on the state of the target.
2) Use libthread_db. This is what GDB does. However this option requires having a version of libthread_db on the host cross-compiled for each potential target. This places a large burden on the user, and would make it very hard to cross-debug from Windows to Linux, for example. Trying to build a library intended exclusively for one OS on a different one is not pleasant. GDB sidesteps the problem and asks the user to figure it out.
3) Parse the DTV structure ourselves. On initial inspection this seems to be a bad option, as the DTV structure (the format used by the runtime to manage TLS data) is not in fact a kernel data structure, it is implemented entirely in useerland in libc. Therefore the layout of it's fields are version and OS dependent, and are not standardized.
However, it turns out not to be such a problem. All OSes use basically the same algorithm (a per-module lookup table) as detailed in Ulrich Drepper's TLS ELF ABI document, so we can easily write code to decode it ourselves. The only question therefore is the exact field layouts required. Happily, the implementors of libpthread expose the structure of the DTV via metadata exported as symbols from the .so itself, designed exactly for this kind of thing. So this patch simply reads that metadata in, and re-implements libthread_db's algorithm itself. We thereby get cross-platform TLS lookup without either requiring third-party libraries, while still being independent of the version of libpthread being used.
Test case included.
llvm-svn: 192922
|
|
|
|
|
|
|
| |
Clang tells me that "token pasting of ',' and __VA_ARGS__ is a GNU
extension". Also catch up with changes in function args.
llvm-svn: 192920
|
|
|
|
| |
llvm-svn: 192918
|
|
|
|
| |
llvm-svn: 192897
|
|
|
|
| |
llvm-svn: 192893
|
|
|
|
|
|
|
|
|
|
| |
that all clients use them explicitly. This will hopefully
prevent any future confusion where things get cast to types
we don't expect.
<rdar://problem/15146458>
llvm-svn: 191984
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to be explicit, to prevent horrid things like
std::string a = ConstString("foo")
from taking the path ConstString -> bool -> char
-> std::string.
This fixes, among other things, ClangFunction.
<rdar://problem/15137989>
llvm-svn: 191934
|
|
|
|
|
|
|
|
| |
consistent with
the other "Get*TypeName" functions.
llvm-svn: 191556
|
|
|
|
| |
llvm-svn: 191367
|
|
|
|
|
|
| |
have a type. It does warn, though.
llvm-svn: 190968
|
|
|
|
|
|
| |
unsupported code in MSVC.
llvm-svn: 190924
|
|
|
|
|
|
|
|
|
|
| |
Fixed an issue with the lldb/test/lang/cpp/virtual test case had a virtual class that had a DW_TAG_inheritance child that was virtual and had a DW_AT_data_member_location of:
DW_AT_data_member_location( DW_OP_dup, DW_OP_deref, DW_OP_constu(0x00000018), DW_OP_minus, DW_OP_deref, DW_OP_plus )
We failed to evaluate this and then we were passing the incorrect offset back to clang and clang would crash. The AST external source has a function named LayoutRecordType which allows us to supply the virtual base class offsets, but that really doesn't make sense to do as clang will lay them out correctly. So we must ignore virtual base classes when doing layout.
llvm-svn: 190811
|
|
|
|
|
|
| |
LLDB now handles explicit alignment for inherited classes.
llvm-svn: 190616
|
|
|
|
|
|
| |
correctly even if arange data is not available for every object file in the program.
llvm-svn: 190365
|
|
|
|
|
|
| |
The workaround was introduced in SVN r181613, for http://llvm.org/pr15854
llvm-svn: 190319
|
|
|
|
| |
llvm-svn: 189683
|
|
|
|
|
|
|
| |
- factorize unistd.h and stdbool.h in lldb-types.h.
- Add <functional> and <string> where required.
llvm-svn: 189477
|
|
|
|
|
|
| |
DW_AT_declaration set to true, yet the class actually contains a definition for the class in that DIE.
llvm-svn: 188124
|
|
|
|
|
|
|
|
|
| |
to handle the case of an integer constant (DWARF 3 and later).
- Fixes tests that assert in RecordLayoutBuilder::updateExternalFieldOffset
because LLDB was providing an external AST source with missing member offsets.
llvm-svn: 187423
|
|
|
|
| |
llvm-svn: 187137
|
|
|
|
|
|
| |
- Modifies the DWARF parser for DWARF 4 specification of hi_pc as an offset-from-low-pc.
llvm-svn: 187125
|
|
|
|
|
|
|
|
|
|
|
| |
wasn't handling. This fix will fix cases where classes are forward declared using DW_TAG_structure_type and then actually defined using DW_TAG_class_type. LLDB, when it finds a forward declaration, would try and find and parse the complete type. It does this by:
1 - looking up the type basename in the type index
2 - iterate through all matches and look for decl contexts (namespace/class hierarchy) that match
The issue was the decl context matching wasn't watching for DW_TAG_class_type/DW_TAG_structure_type mismatches, and it wasn't also getting the name for DIE's that didn't have a DW_AT_name, but did have a DW_AT_specification that had a name.
llvm-svn: 186347
|
|
|
|
|
|
| |
types checkin.
llvm-svn: 186195
|
|
|
|
|
|
|
|
| |
A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error.
This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness.
llvm-svn: 186130
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags
- Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections.
Other cleanups:
- Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly
- Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently
- Modified the Symtab class to store a file address lookup table for more efficient lookups
- Removed Section::Finalize() and SectionList::Finalize() as they did nothing
- Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs
- Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement)
llvm-svn: 185990
|
|
|
|
| |
llvm-svn: 185491
|
|
|
|
|
|
| |
DW_TAG_unspecified_type tags as meaning the C++11 null pointer type.
llvm-svn: 185382
|
|
|
|
| |
llvm-svn: 185366
|
|
|
|
|
|
| |
not have aranges
llvm-svn: 185055
|
|
|
|
|
|
| |
multiple copies of the same type due to the debug info having multiple types that get uniqued.
llvm-svn: 184388
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Another fix to make sure that if we aren't able to extract an object file for any reason, we don't crash when trying to parse the debug map info.
llvm-svn: 182441
|
|
|
|
|
|
| |
Show variables that were in the debug info but optimized out. Also display a good error message when one of these variables get used in an expression.
llvm-svn: 182066
|
|
|
|
| |
llvm-svn: 181818
|
|
|
|
|
|
| |
and a function in an anonymous namespace, respectively.
llvm-svn: 181645
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<rdar://problem/13594769>
Main changes in this patch include:
- cleanup plug-in interface and use ConstStrings for plug-in names
- Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp
- Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging
The plug-in interface changes:
Modified the lldb_private::PluginInterface class that all plug-ins inherit from:
Changed:
virtual const char * GetPluginName() = 0;
To:
virtual ConstString GetPluginName() = 0;
Removed:
virtual const char * GetShortPluginName() = 0;
- Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names.
- Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc.
llvm-svn: 181631
|
|
|
|
| |
llvm-svn: 181613
|