7980d35608225dc71b3dd946d4c3aea85bc24e85 |
|
13-Jul-2013 |
Greg Clayton <gclayton@apple.com> |
Fixed GetModuleSpecifications() to work better overall: - MachO files now correctly extract the UUID all the time - More file size and offset verification done for universal mach-o files to watch for truncated files - ObjectContainerBSDArchive now supports enumerating all objects in BSD archives (.a files) - lldb_private::Module() can not be properly constructed using a ModuleSpec for a .o file in a .a file - The BSD archive plug-in shares its cache for GetModuleSpecifications() and the create callback - Improved printing for ModuleSpec objects git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
0e191607adcb0ea8ebd06c278be648a7f5c0097f |
|
10-May-2013 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/13854277> <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. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
36b877d2d27f7d1890f2d13807a3addb216648e2 |
|
25-Apr-2013 |
Greg Clayton <gclayton@apple.com> |
Added the ability to extract a ModuleSpecList (a new class) from an ObjectFile. This is designed to be used when you have an object file that contains one or more architectures (MacOSX universal (fat) files) and/or one or more objects (BSD archive (.a files)). There is a new static ObjectFile function you can call: size_t ObjectFile::GetModuleSpecifications (const FileSpec &file, lldb::offset_t file_offset, ModuleSpecList &specs) This will fill in "specs" which the details of all the module specs (file + arch + UUID (if there is one) + object name (for BSD archive objects eventually) + file offset to the object in question). This helps us when a user specifies a file that contains a single architecture, and also helps us when we are given a debug symbol file (like a dSYM file on MacOSX) that contains one or more architectures and we need to be able to match it up to an existing Module that has no debug info. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
102b2c2681c9a830afe25bfea35557421905e42c |
|
19-Apr-2013 |
Greg Clayton <gclayton@apple.com> |
After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
cbe61bd26db663fa3036866dc33315c6ffc37910 |
|
06-Feb-2013 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/13159777> lldb was mmap'ing archive files once per .o file it loads, now it correctly shares the archive between modules. LLDB was also always mapping entire contents of universal mach-o files, now it maps just the slice that is required. Added a new logging channel for "lldb" called "mmap" to help track future regressions. Modified the ObjectFile and ObjectContainer plugin interfaces to take a data offset along with the file offset and size so we can implement the correct caching and efficient reading of parts of files without mmap'ing the entire file like we used to. The current implementation still keeps entire .a files mmaped (once) and entire slices from universal files mmaped to ensure that if a client builds their binaries during a debug session we don't lose our data and get corrupt object file info and debug info. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
36da2aa6dc5ad9994b638ed09eb81c44cc05540b |
|
25-Jan-2013 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/13069948> Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
843327854a86a1d44f03b838767575ccba8bb77a |
|
29-Oct-2012 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/12500785> I tracked down a leak that could happen when detaching from a process where the lldb_private::Process objects would stay around forever. This was caused by a eStateDetached event that was queued up on the lldb_private::Process private state thread listener. Since process events contain shared pointers to the process, this is dangerous if they don't get consume or cleared as having the lldb_private::Process class contain a collection of things that have a shared pointer to yourself is obviously bad. To fix this I modified the Process::Finalize() function to clear this list. The actual thing that was holding onto the ModuleSP and thus the static archive, was a stack frame. Since the process wasn't going away, it still had thread objects and they still had frames. I modified the Thread::Destroy() to clear the stack frames to ensure this further doesn't happen. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
598df88bd6fc33c6fb330bc859bdc277795501f3 |
|
14-Mar-2012 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/10434005> Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind macros that allows us to easily compile for either C++. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
3508c387c3f0c9ecc439d98048fd7694d41bab1b |
|
24-Feb-2012 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/10103468> I started work on being able to add symbol files after a debug session had started with a new "target symfile add" command and quickly ran into problems with stale Address objects in breakpoint locations that had lldb_private::Section pointers into modules that had been removed or replaced. This also let to grabbing stale modules from those sections. So I needed to thread harded the Address, Section and related objects. To do this I modified the ModuleChild class to now require a ModuleSP on initialization so that a weak reference can created. I also changed all places that were handing out "Section *" to have them hand out SectionSP. All ObjectFile, SymbolFile and SymbolVendors were inheriting from ModuleChild so all of the find plug-in, static creation function and constructors now require ModuleSP references instead of Module *. Address objects now have weak references to their sections which can safely go stale when a module gets destructed. This checkin doesn't complete the "target symfile add" command, but it does get us a lot clioser to being able to do such things without a high risk of crashing or memory corruption. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
13d24fb1817faa7ccc4cfd799113ba1a2b8968eb |
|
29-Jan-2012 |
Greg Clayton <gclayton@apple.com> |
Switching back to using std::tr1::shared_ptr. We originally switched away due to RTTI worries since llvm and clang don't use RTTI, but I was able to switch back with no issues as far as I can tell. Once the RTTI issue wasn't an issue, we were looking for a way to properly track weak pointers to objects to solve some of the threading issues we have been running into which naturally led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared pointer from just a pointer, which is also easily solved using the std::tr1::enable_shared_from_this class. The main reason for this move back is so we can start properly having weak references to objects. Currently a lldb_private::Thread class has a refrence to its parent lldb_private::Process. This doesn't work well when we now hand out a SBThread object that contains a shared pointer to a lldb_private::Thread as this SBThread can be held onto by external clients and if they end up using one of these objects we can easily crash. So the next task is to start adopting std::tr1::weak_ptr where ever it makes sense which we can do with lldb_private::Debugger, lldb_private::Target, lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and many more objects now that they are no longer using intrusive ref counted pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive pointers). git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
db2dc2b824b61ef7578dc8cdad7b338aa82b1f17 |
|
12-Jan-2012 |
Greg Clayton <gclayton@apple.com> |
Big change in the way ObjectFile file contents are managed. We now mmap() the entire object file contents into memory with MAP_PRIVATE. We do this because object file contents can change on us and currently this helps alleviate this situation. It also make the code for accessing object file data much easier to manage and we don't end up opening the file, reading some data and closing the file over and over. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
e40b6424d9e49306392bec4b44060da36414c382 |
|
18-Sep-2011 |
Greg Clayton <gclayton@apple.com> |
Don't put modules for .o files into the global shared module list. We used to do this because we needed to find the shared pointer for a .o file when the .o file's module was needed in a SymbolContext since the module in a symbol context was a shared pointer. Now that we are using intrusive pointers we don't have this limitation anymore since any instrusive shared pointer can be made from a pointer to an object all on its own. Also switched over to having the Module and SymbolVendor use shared pointers to their object files as had a leak on MacOSX when the SymbolVendor's object file wasn't the same as the Module's (debug info in a stand along file (dSYM file)). Now everything will correctly clean itself up when the module goes away after an executable gets rebuilt. Now we correctly get rid of .o files that are used with the DWARF with debug map executables on subsequent runs since the only shared pointer to the object files in from the DWARF symbol file debug map parser, and when the module gets replaced, it destroys to old one along with all .o files. Also added a small optimization when using BSD archives where we will remove old BSD containers from the shared list when they are outdated. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
e4b9c1fb338ee1ada72e6a3c198afb342d68c5c1 |
|
08-Mar-2011 |
Greg Clayton <gclayton@apple.com> |
LLDB now has "Platform" plug-ins. Platform plug-ins are plug-ins that provide an interface to a local or remote debugging platform. By default each host OS that supports LLDB should be registering a "default" platform that will be used unless a new platform is selected. Platforms are responsible for things such as: - getting process information by name or by processs ID - finding platform files. This is useful for remote debugging where there is an SDK with files that might already or need to be cached for debug access. - getting a list of platform supported architectures in the exact order they should be selected. This helps the native x86 platform on MacOSX select the correct x86_64/i386 slice from universal binaries. - Connect to remote platforms for remote debugging - Resolving an executable including finding an executable inside platform specific bundles (macosx uses .app bundles that contain files) and also selecting the appropriate slice of universal files for a given platform. So by default there is always a local platform, but remote platforms can be connected to. I will soon be adding a new "platform" command that will support the following commands: (lldb) platform connect --name machine1 macosx connect://host:port Connected to "machine1" platform. (lldb) platform disconnect macosx This allows LLDB to be well setup to do remote debugging and also once connected process listing and finding for things like: (lldb) process attach --name x<TAB> The currently selected platform plug-in can now auto complete any available processes that start with "x". The responsibilities for the platform plug-in will soon grow and expand. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
5f54ac373b119a4c6693e4875c48aa761fba0c86 |
|
08-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Moved FileSpec into the Host layer since it will vary from host to host. We have a common unix implementation in lldb/source/Host/common/FileSpec.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|
24943d2ee8bfaa7cf5893e4709143924157a5c1e |
|
08-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
Initial checkin of lldb code from internal Apple repo. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
|