ba6b37d9b893746f04aaf1a07c97fc8b161feff9 |
|
22-Apr-2013 |
Daniel Malea <daniel.malea@intel.com> |
Fix data race in Address class by wrapping m_offset in std::atomic git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
464a5063bc59755cb6ec063d0b2491097302d2ab |
|
04-Mar-2013 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/13338643> DWARF with .o files now uses 40-60% less memory! Big fixes include: - Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed. - Removed linked address members/methods from lldb_private::Section and lldb_private::Address - lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future - Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason - Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile. - Changed how the debug map is parsed and stored to be able to: - Lazily parse the debug map for each object file - not require the address map for a .o file until debug information is linked for a .o file git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
4f9103faba72fdfc4b4299d6d459bc820ee597b2 |
|
27-Feb-2013 |
Matt Kopec <Matt.Kopec@intel.com> |
Add GNU indirect function support in expressions for Linux. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
941f5da5f0fd38bfe5510f54a387c833bd71d2c4 |
|
12-Jul-2012 |
Greg Clayton <gclayton@apple.com> |
Modifying the "address" format, which prints a pointer and a description of what it points to, to detect when the deref of that pointer points to something valid. So if you have: % cat sp.cpp #include <tr1/memory> class A { public: A (): m_i (12) {} virtual ~A() {} private: int m_i; }; int main (int argc, char const *argv[], char const *envp[]) { A *a_pointers[2] = { NULL, NULL }; A a1; A a2; a_pointers[0] = &a1; a_pointers[1] = &a2; return 0; } And you stop at the "return 0", you can now read memory using the "address" format and see: (lldb) memory read --format address `&a_pointers` 0x7fff5fbff870: 0x00007fff5fbff860 -> 0x00000001000010b0 vtable for A + 16 0x7fff5fbff878: 0x00007fff5fbff850 -> 0x00000001000010b0 vtable for A + 16 0x7fff5fbff880: 0x00007fff5fbff8d0 0x7fff5fbff888: 0x00007fff5fbff8c0 0x7fff5fbff890: 0x0000000000000001 0x7fff5fbff898: 0x36d54c275add2294 0x7fff5fbff8a0: 0x00007fff5fbff8b0 0x7fff5fbff8a8: 0x0000000100000bb4 a.out`start + 52 Note the extra dereference that was applied to 0x00007fff5fbff860 and 0x00007fff5fbff850 so we can see that these are "A" classes. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
7fb143064009e34dbb7a602924e9807375f72a46 |
|
13-Apr-2012 |
Greg Clayton <gclayton@apple.com> |
Expose GetAddressClass() from both the SBAddress and SBInstruction so clients can tell the difference between ARM/Thumb opcodes when disassembling ARM. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
1d295e802c04324f18184566911e89f0388d35af |
|
25-Feb-2012 |
Greg Clayton <gclayton@apple.com> |
Avoid a throw in case we init a lldb_private::Address with an invalid SectionSP. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.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/include/lldb/Core/Address.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/include/lldb/Core/Address.h
|
c5d14e6146ccacd8e00f1c247e21cd86ebfac21d |
|
10-Dec-2011 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/9958446> <rdar://problem/10561406> Stopped the SymbolFileDWARF::FindFunctions (...) from always calculating the line table entry for all functions that were found. This can slow down the expression parser if it ends up finding a bunch of matches. Fixed the places that were relying on the line table entry being filled in. Discovered a recursive stack blowout that happened when "main" didn't have line info for it and there was no line information for "main" git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
c51ffbf896e398ada5f7e89b2fa5aec6f2224f09 |
|
12-Aug-2011 |
Greg Clayton <gclayton@apple.com> |
We were leaking a stack frame in StackFrameList in Thread.cpp which could cause extra shared pointer references to one or more modules to be leaked. This would cause many object files to stay around the life of LLDB, so after a recompile and rexecution, we would keep adding more and more memory. After fixing the leak, we found many cases where leaked stack frames were still being used and causing crashes in the test suite. These are now all resolved. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
5a26910ed231503d2a7a71365a44e379a994f4e6 |
|
22-May-2011 |
Greg Clayton <gclayton@apple.com> |
Added functions to lldb_private::Address to set an address from a load address and set the address as an opcode address or as a callable address. This is needed in various places in the thread plans to make sure that addresses that might be found in symbols or runtime might already have extra bits set (ARM/Thumb). The new functions are: bool Address::SetCallableLoadAddress (lldb::addr_t load_addr, Target *target); bool Address::SetOpcodeLoadAddress (lldb::addr_t load_addr, Target *target); SetCallableLoadAddress will initialize a section offset address if it can, and if so it might possibly set some bits in the address to make the address callable (bit zero might get set for ARM for Thumb functions). SetOpcodeLoadAddress will initialize a section offset address using the specified target and it will strip any special address bits if needed depending on the target. Fixed the ABIMacOSX_arm::GetArgumentValues() function to require arguments 1-4 to be in the needed registers (previously this would incorrectly fallback to the stack) and return false if unable to get the register values. The function was also modified to first look for the generic argument registers and then fall back to finding the registers by name. Fixed the objective trampoline handler to use the new Address::SetOpcodeLoadAddress function when needed to avoid address mismatches when trying to complete steps into objective C methods. Make similar fixes inside the AppleThreadPlanStepThroughObjCTrampoline::ShouldStop() function. Modified ProcessGDBRemote::BuildDynamicRegisterInfo(...) to be able to deal with the new generic argument registers. Modified RNBRemote::HandlePacket_qRegisterInfo() to handle the new generic argument registers on the debugserver side. Modified DNBArchMachARM::NumSupportedHardwareBreakpoints() to be able to detect how many hardware breakpoint registers there are using a darwin sysctl. Did the same for hardware watchpoints in DNBArchMachARM::NumSupportedHardwareWatchpoints(). git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
265ab33ae56209d2bfdc47510a557aa075b2a829 |
|
19-May-2011 |
Greg Clayton <gclayton@apple.com> |
Moved a lot of simple functions from StoppointLocation.cpp to be inlined in StoppointLocation.h. Added a new lldb_private::Address function: addr_t Address::GetOpcodeLoadAddress (Target *target) const; This will strip any special bits from an address to make sure it is suitable for use in addressing an opcode. Often ARM addresses have an extra bit zero that can be set to indicate ARM vs Thumb addresses (gotten from return address registers, or symbol addresses that may be marked up specially). We need to strip these bits off prior to setting breakpoints, so we can centralized the place to do this inside the Address class. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
da7af84c427c5c3a7b18e550c665c2f538670a34 |
|
19-May-2011 |
Greg Clayton <gclayton@apple.com> |
Added a function to lldb_private::Address: addr_t Address::GetCallableLoadAddress (Target *target) const; This will resolve the load address in the Address object and optionally decorate the address up to be able to be called. For all non ARM targets, this just essentially returns the result of "Address::GetLoadAddress (target)". But for ARM targets, it checks if the address is Thumb, and if so, it returns an address with bit zero set to indicate a mode switch to Thumb. This is how we need function pointers to be for return addresses and when resolving function addresses for the JIT. It is also nice to centralize this in one spot to avoid having multiple copies of this code. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
b9e8f6e7a374d9313f89193e90ae41ef91712e5b |
|
18-May-2011 |
Greg Clayton <gclayton@apple.com> |
Added a way to resolve an load address from a target: bool Address::SetLoadAddress (lldb::addr_t load_addr, Target *target); Added an == and != operator to RegisterValue. Modified the ThreadPlanTracer to use RegisterValue objects to store the register values when single stepping. Also modified the output to be a bit less wide. Fixed the ABIMacOSX_arm to not overwrite stuff on the stack. Also made the trivial function call be able to set the ARM/Thumbness of the target correctly, and also sets the return value ARM/Thumbness. Fixed the encoding on the arm s0-s31 and d16 - d31 registers when the default register set from a standard GDB server register sets. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
b344843f75ef893762c93fd0a22d2d45712ce74d |
|
24-Mar-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed the LLDB build so that we can have private types, private enums and public types and public enums. This was done to keep the SWIG stuff from parsing all sorts of enums and types that weren't needed, and allows us to abstract our API better. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
b1888f24fa181489840b9acf193e224d125d0776 |
|
19-Mar-2011 |
Greg Clayton <gclayton@apple.com> |
Added more platform support. There are now some new commands: platform status -- gets status information for the selected platform platform create <platform-name> -- creates a new instance of a remote platform platform list -- list all available platforms platform select -- select a platform instance as the current platform (not working yet) When using "platform create" it will create a remote platform and make it the selected platform. For instances for iPhone OS debugging on Mac OS X one can do: (lldb) platform create remote-ios --sdk-version=4.0 Remote platform: iOS platform SDK version: 4.0 SDK path: "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0" Not connected to a remote device. (lldb) file ~/Documents/a.out Current executable set to '~/Documents/a.out' (armv6). (lldb) image list [ 0] /Volumes/work/gclayton/Documents/devb/attach/a.out [ 1] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/dyld [ 2] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.B.dylib Note that this is all happening prior to running _or_ connecting to a remote platform. Once connected to a remote platform the OS version might change which means we will need to update our dependecies. Also once we run, we will need to match up the actualy binaries with the actualy UUID's to files in the SDK, or download and cache them locally. This is just the start of the remote platforms, but this modification is the first iteration in getting the platforms really doing something. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
e2f90647b93b0f44c0222da8d995dfe267499f9c |
|
08-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed issues with the unwinding code where the collection of FuncUnwinders was being searched and sorted using a shared pointer as the value which means the pointer value was what was being searched for. This means that anytime you did a stack backtrace, the collection of FuncUnwinders doubled and then the array or shared pointer got sorted (by pointer value), so you had an ever increasing collection of shared pointer where a match was never found. This means we had a ton of duplicates in this table and would cause issues after one had been debugging for a long time. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
49ce682dfa7993d31206cea19ce7006cd3f3077e |
|
31-Oct-2010 |
Greg Clayton <gclayton@apple.com> |
Cleaned up the API logging a lot more to reduce redundant information and keep the file size a bit smaller. Exposed SBValue::GetExpressionPath() so SBValue users can get an expression path for their values. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
eea264007bc5fb42c8f3239726a9d28ae42e1b7b |
|
15-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Moved the section load list up into the target so we can use the target to symbolicate things without the need for a valid process subclass. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
3a4ea24572fad1e22525f8efb718d49d41e30398 |
|
10-Sep-2010 |
Jason Molenda <jmolenda@apple.com> |
The first part of an lldb native stack unwinder. The Unwind and RegisterContext subclasses still need to be finished; none of this code is used by lldb at this point (unless you call into it by hand). The ObjectFile class now has an UnwindTable object. The UnwindTable object has a series of FuncUnwinders objects (Function Unwinders) -- one for each function in that ObjectFile we've backtraced through during this debug session. The FuncUnwinders object has a few different UnwindPlans. UnwindPlans are a generic way of describing how to find the canonical address of a given function's stack frame (the CFA idea from DWARF/eh_frame) and how to restore the caller frame's register values, if they have been saved by this function. UnwindPlans are created from different sources. One source is the eh_frame exception handling information generated by the compiler for unwinding an exception throw. Another source is an assembly language inspection class (UnwindAssemblyProfiler, uses the Plugin architecture) which looks at the instructions in the funciton prologue and describes the stack movements/register saves that are done. Two additional types of UnwindPlans that are worth noting are the "fast" stack UnwindPlan which is useful for making a first pass over a thread's stack, determining how many stack frames there are and retrieving the pc and CFA values for each frame (enough to create StackFrameIDs). Only a minimal set of registers is recovered during a fast stack walk. The final UnwindPlan is an architectural default unwind plan. These are provided by the ArchDefaultUnwindPlan class (which uses the plugin architecture). When no symbol/function address range can be found for a given pc value -- when we have no eh_frame information and when we don't have a start address so we can't examine the assembly language instrucitons -- we have to make a best guess about how to unwind. That's when we use the architectural default UnwindPlan. On x86_64, this would be to assume that rbp is used as a stack pointer and we can use that to find the caller's frame pointer and pc value. It's a last-ditch best guess about how to unwind out of a frame. There are heuristics about when to use one UnwindPlan versues the other -- this will all happen in the still-begin-written UnwindLLDB subclass of Unwind which runs the UnwindPlans. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
4fb08150367853dae24bb92904356788e919a72f |
|
30-Aug-2010 |
Greg Clayton <gclayton@apple.com> |
Clarified the intent of the SymbolContextScope class in the header documentation. Symbol now inherits from the symbol context scope so that the StackID can use a "SymbolContextScope *" instead of a blockID (which could have been the same as some other blockID from another symbol file). Modified the stacks that are created on subsequent stops to reuse the previous stack frame objects which will allow for some internal optimization using pointer comparisons during stepping. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
32f4fdde0882395aec2ea56d1adcce78759105b7 |
|
25-Aug-2010 |
Greg Clayton <gclayton@apple.com> |
Fixed another issue with the inline stack frames where if the first frame has inlined functions that all started at the same address, then the inlined backtrace would not produce correct stack frames. Also cleaned up and inlined a lot of stuff in lldb_private::Address. Added a function to StackFrame to detect if the frame is a concrete frame so we can detect the difference between actual frames and inlined frames. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
cf7f1ad9860ad2447680d427be87f85f3a1396d9 |
|
01-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Fixed up disassembly to not emit the module name before all function names that are in the disassembly comments since most of them are in the same module (shared library). Fixed a crasher that could happen when disassembling special section data. Added an address dump style that shows the symbol context without the module (used in the disassembly code). git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
704363531ee4877ccc6d35d0702876096f54c67b |
|
01-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Centralized all disassembly into static functions in source/Core/Disassembler.cpp. Added the ability to read memory from the target's object files when we aren't running, so disassembling works before you run! Cleaned up the API to lldb_private::Target::ReadMemory(). Cleaned up the API to the Disassembler to use actual "lldb_private::Address" objects instead of just an "addr_t". This is nice because the Address objects when resolved carry along their section and module which can get us the object file. This allows Target::ReadMemory to be used when we are not running. Added a new lldb_private::Address dump style: DumpStyleDetailedSymbolContext This will show a full breakdown of what an address points to. To see some sample output, execute a "image lookup --address <addr>". Fixed SymbolContext::DumpStopContext(...) to not require a live process in order to be able to print function and symbol offsets. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.h
|
f9a232b8befaf0e1584906ed7b862d64b6fedb6d |
|
21-Jun-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move a bunch of trivial methods into the header. These compile down to 1-2 instructions so it's really profitable to inline them. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/Address.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/include/lldb/Core/Address.h
|