a807ceef5dad2b24e5bae5c5a193ff03aa7ec8d9 |
|
01-Jul-2013 |
Michael Sartain <mikesart@valvesoftware.com> |
Split symbol support for ELF and Linux. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
98c608262aa9bfb48aa8d3af388e0b62576716b1 |
|
07-Jun-2013 |
Jim Ingham <jingham@apple.com> |
Address::GetSection() turns a weak pointer to a shared pointer which is a little slow. So in Address::operator== & != do the cheap GetOffset() comparison first and only compare the sections if that is true. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
a7e864cb0a450c7ef65b6f9f6c9bae839c405906 |
|
23-Feb-2013 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/13265297> StackFrame assumes m_sc is additive, but m_sc can lose its target. So now the SymbolContext::Clear() method takes a bool that indicates if the target should be cleared. Modified all existing code to properly set the bool argument. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/Core/Address.cpp
|
5f35a4be95aed0e5b2cb36f7d785bcbfc67284ae |
|
29-Nov-2012 |
Daniel Malea <daniel.malea@intel.com> |
Resolve printf formatting warnings on Linux: - use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
49ce8969d3154e1560106cfe530444c09410f217 |
|
29-Aug-2012 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/11757916> Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile() Cleaned up header includes a bit as well. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
4a379b1194f3e6b308cd6e80b45d6ca5dd0aafd7 |
|
17-Jul-2012 |
Greg Clayton <gclayton@apple.com> |
Ran the static analyzer on the codebase and found a few things. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
2ad894b66a6b5e689d98a7d4d2b7d037ca271b3b |
|
15-May-2012 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/11455398> Add "--name" option to "image lookup" that will search both functions and symbols. Also made all of the output from any of the "image lookup" commands be the same regardless of the lookup type (function name, symbol name, func or symbol, file and line, address, etc). The --verbose or -v option also will expand the results as needed and display things so they look the same. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
0c31d3d3a4a1d00d53346d8a23b0519f47e55d1f |
|
07-Mar-2012 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/10997402> This fix really needed to happen as a previous fix I had submitted for calculating symbol sizes made many symbols appear to have zero size since the function that was calculating the symbol size was calling another function that would cause the calculation to happen again. This resulted in some symbols having zero size when they shouldn't. This could then cause infinite stack traces and many other side affects. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/Core/Address.cpp
|
289afcb5e26c2527a0d2e71f84e780b86bbcf90a |
|
18-Feb-2012 |
Greg Clayton <gclayton@apple.com> |
The second part in thread hardening the internals of LLDB where we make the lldb_private::StackFrame objects hold onto a weak pointer to the thread object. The lldb_private::StackFrame objects the the most volatile objects we have as when we are doing single stepping, frames can often get lost or thrown away, only to be re-created as another object that still refers to the same frame. We have another bug tracking that. But we need to be able to have frames no longer be able to get the thread when they are not part of a thread anymore, and this is the first step (this fix makes that possible but doesn't implement it yet). Also changed lldb_private::ExecutionContextScope to return shared pointers to all objects in the execution context to further thread harden the internals. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/Core/Address.cpp
|
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/source/Core/Address.cpp
|
444e35b5fdf15a25a427285650f06f1390e62c75 |
|
19-Oct-2011 |
Greg Clayton <gclayton@apple.com> |
Moved lldb::user_id_t values to be 64 bit. This was going to be needed for process IDs, and thread IDs, but was mainly needed for for the UserID's for Types so that DWARF with debug map can work flawlessly. With DWARF in .o files the type ID was the DIE offset in the DWARF for the .o file which is not unique across all .o files, so now the SymbolFileDWARFDebugMap class will make the .o file index part (the high 32 bits) of the unique type identifier so it can uniquely identify the types. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
567e7f3ba16eb48cb9fd6a2f26f2f7269eb6983c |
|
22-Sep-2011 |
Greg Clayton <gclayton@apple.com> |
Converted the lldb_private::Process over to use the intrusive shared pointers. Changed the ExecutionContext over to use shared pointers for the target, process, thread and frame since these objects can easily go away at any time and any object that was holding onto an ExecutionContext was running the risk of using a bad object. Now that the shared pointers for target, process, thread and frame are just a single pointer (they all use the instrusive shared pointers) the execution context is much safer and still the same size. Made the shared pointers in the the ExecutionContext class protected and made accessors for all of the various ways to get at the pointers, references, and shared pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
7e5fa7fc1f8efd24c078e063b2c4b5e13ba5be20 |
|
20-Sep-2011 |
Jason Molenda <jmolenda@apple.com> |
Update declarations for all functions/methods that accept printf-style stdarg formats to use __attribute__ format so the compiler can flag incorrect uses. Fix all incorrect uses. Most of these are innocuous, a few were resulting in crashes. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
02e210cad27e36108bef493b798c2c1eb3b04cb8 |
|
17-Sep-2011 |
Greg Clayton <gclayton@apple.com> |
Removed the function: ModuleSP Module::GetSP(); Since we are now using intrusive ref counts, we can easily turn any pointer to a module into a shared pointer just by assigning it. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
451d02b76949776afe3b036e11cdd8814f7c2049 |
|
25-Aug-2011 |
Johnny Chen <johnny.chen@apple.com> |
Initializes (uint64_t)buf variable, patch by Filipe Cabecinhas! git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
9b82f8637b65c90e91c2827245550a1bb5e8df91 |
|
11-Jul-2011 |
Greg Clayton <gclayton@apple.com> |
Added the ability to see block variables when looking up addresses with the "target modules lookup --address <addr>" command. The variable ID's, names, types, location for the address, and declaration is displayed. This can really help with crash logs since we get, on MacOSX at least, the registers for the thread that crashed so it is often possible to figure out some of the variable contents. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
c0fa53324d62a48257c092a3347d6e7236aa3152 |
|
23-May-2011 |
Greg Clayton <gclayton@apple.com> |
Added new lldb_private::Process memory read/write functions to stop a bunch of duplicated code from appearing all over LLDB: lldb::addr_t Process::ReadPointerFromMemory (lldb::addr_t vm_addr, Error &error); bool Process::WritePointerToMemory (lldb::addr_t vm_addr, lldb::addr_t ptr_value, Error &error); size_t Process::ReadScalarIntegerFromMemory (lldb::addr_t addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error); size_t Process::WriteScalarToMemory (lldb::addr_t vm_addr, const Scalar &scalar, uint32_t size, Error &error); in lldb_private::Process the following functions were renamed: From: uint64_t Process::ReadUnsignedInteger (lldb::addr_t load_addr, size_t byte_size, Error &error); To: uint64_t Process::ReadUnsignedIntegerFromMemory (lldb::addr_t load_addr, size_t byte_size, uint64_t fail_value, Error &error); Cleaned up a lot of code that was manually doing what the above functions do to use the functions listed above. Added the ability to get a scalar value as a buffer that can be written down to a process (byte swapping the Scalar value if needed): uint32_t Scalar::GetAsMemoryData (void *dst, uint32_t dst_len, lldb::ByteOrder dst_byte_order, Error &error) const; The "dst_len" can be smaller that the size of the scalar and the least significant bytes will be written. "dst_len" can also be larger and the most significant bytes will be padded with zeroes. Centralized the code that adds or removes address bits for callable and opcode addresses into lldb_private::Target: lldb::addr_t Target::GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const; lldb::addr_t Target::GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const; All necessary lldb_private::Address functions now use the target versions so changes should only need to happen in one place if anything needs updating. Fixed up a lot of places that were calling : addr_t Address::GetLoadAddress(Target*); to call the Address::GetCallableLoadAddress() or Address::GetOpcodeLoadAddress() as needed. There were many places in the breakpoint code where things could go wrong for ARM if these weren't used. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
395fc33dc4b06c048ed35047ec461bc092ef2df3 |
|
15-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Made lldb_private::ArchSpec contain much more than just an architecture. It now, in addition to cpu type/subtype and architecture flavor, contains: - byte order (big endian, little endian) - address size in bytes - llvm::Triple for true target triple support and for more powerful plug-in selection. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
cd548034fa23113e995b8463d14f910ba2f7298c |
|
01-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Endian patch from Kirk Beitz that allows better cross platform building. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
7e2f91cb958c8670774cb2190db7b858618b5b9b |
|
29-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Finished up the async attach support. This allows us to request to attach by name or by pid (with or without waiting for a process to launch) and catch the response asynchronously. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
5d187e5495ee17f6763337a6ae28c2a7b07e4945 |
|
08-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener. Thanks Bruce! git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
26100dcbc49648eac03fa8e8c3d7c793808fc8d6 |
|
07-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Added the ability for Target::ReadMemory to prefer to read from the file cache even when a valid process exists. Previously, Target::ReadMemory would read from the process if there was a valid one and then fallback to the object file cache. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
3fed8b9b2696fc2ea78005c8f9b1c621d5748042 |
|
08-Oct-2010 |
Greg Clayton <gclayton@apple.com> |
Hooked up ability to look up data symbols so they show up in disassembly if the address comes from a data section. Fixed an issue that could occur when looking up a symbol that has a zero byte size where no match would be returned even if there was an exact symbol match. Cleaned up the section dump output and added the section type into the output. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
a830adbcd63d1995a01e6e18da79893c1426ca43 |
|
04-Oct-2010 |
Greg Clayton <gclayton@apple.com> |
There are now to new "settings set" variables that live in each debugger instance: settings set frame-format <string> settings set thread-format <string> This allows users to control the information that is seen when dumping threads and frames. The default values are set such that they do what they used to do prior to changing over the the user defined formats. This allows users with terminals that can display color to make different items different colors using the escape control codes. A few alias examples that will colorize your thread and frame prompts are: settings set frame-format 'frame #${frame.index}: \033[0;33m${frame.pc}\033[0m{ \033[1;4;36m${module.file.basename}\033[0;36m ${function.name}{${function.pc-offset}}\033[0m}{ \033[0;35mat \033[1;35m${line.file.basename}:${line.number}}\033[0m\n' settings set thread-format 'thread #${thread.index}: \033[1;33mtid\033[0;33m = ${thread.id}\033[0m{, \033[0;33m${frame.pc}\033[0m}{ \033[1;4;36m${module.file.basename}\033[0;36m ${function.name}{${function.pc-offset}}\033[0m}{, \033[1;35mstop reason\033[0;35m = ${thread.stop-reason}\033[0m}{, \033[1;36mname = \033[0;36m${thread.name}\033[0m}{, \033[1;32mqueue = \033[0;32m${thread.queue}}\033[0m\n' A quick web search for "colorize terminal output" should allow you to see what you can do to make your output look like you want it. The "settings set" commands above can of course be added to your ~/.lldbinit file for permanent use. Changed the pure virtual void ExecutionContextScope::Calculate (ExecutionContext&); To: void ExecutionContextScope::CalculateExecutionContext (ExecutionContext&); I did this because this is a class that anything in the execution context heirarchy inherits from and "target->Calculate (exe_ctx)" didn't always tell you what it was really trying to do unless you look at the parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
c67b7d13cffeb2c9454635e8a11d65350bce61ad |
|
10-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Cleaned up the output of "image lookup --address <ADDR>" which involved cleaning up the output of many GetDescription objects that are part of a symbol context. This fixes an issue where no ranges were being printed out for functions, blocks and symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
b47e69e6903ba9f2a699d0fac20f0d8df96d2dcc |
|
07-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Stop line entries from dumping full paths when addresses dump themselves as symbol contexts. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
72b7158235500ae6d4b69ed378cbc36bf6e5cbe1 |
|
02-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Added a new bool parameter to many of the DumpStopContext() methods that might dump file paths that allows the dumping of full paths or just the basenames. Switched the stack frame dumping code to use just the basenames for the files instead of the full path. Modified the StackID class to no rely on needing the start PC for the current function/symbol since we can use the SymbolContextScope to uniquely identify that, unless there is no symbol context scope. In that case we can rely upon the current PC value. This saves the StackID from having to calculate the start PC when the StackFrame::GetStackID() accessor is called. Also improved the StackID less than operator to correctly handle inlined stack frames in the same stack. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
33ed170599d41fe407a4dcf5f0875c75e1ad1375 |
|
24-Aug-2010 |
Greg Clayton <gclayton@apple.com> |
Added support for inlined stack frames being represented as real stack frames which is now on by default. Frames are gotten from the unwinder as concrete frames, then if inline frames are to be shown, extra information to track and reconstruct these frames is cached with each Thread and exanded as needed. I added an inline height as part of the lldb_private::StackID class, the class that helps us uniquely identify stack frames. This allows for two frames to shared the same call frame address, yet differ only in inline height. Fixed setting breakpoint by address to not require addresses to resolve. A quick example: % cat main.cpp % ./build/Debug/lldb test/stl/a.out Current executable set to 'test/stl/a.out' (x86_64). (lldb) breakpoint set --address 0x0000000100000d31 Breakpoint created: 1: address = 0x0000000100000d31, locations = 1 (lldb) r Launching 'a.out' (x86_64) (lldb) Process 38031 Stopped * thread #1: tid = 0x2e03, pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280, stop reason = breakpoint 1.1, queue = com.apple.main-thread 277 278 _CharT* 279 _M_data() const 280 -> { return _M_dataplus._M_p; } 281 282 _CharT* 283 _M_data(_CharT* __p) (lldb) bt thread #1: tid = 0x2e03, stop reason = breakpoint 1.1, queue = com.apple.main-thread frame #0: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280 frame #1: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_rep() const at /usr/include/c++/4.2.1/bits/basic_string.h:288 frame #2: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::size() const at /usr/include/c++/4.2.1/bits/basic_string.h:606 frame #3: pc = 0x0000000100000d31, where = a.out`main [inlined] operator<< <char, std::char_traits<char>, std::allocator<char> > at /usr/include/c++/4.2.1/bits/basic_string.h:2414 frame #4: pc = 0x0000000100000d31, where = a.out`main + 33 at /Volumes/work/gclayton/Documents/src/lldb/test/stl/main.cpp:14 frame #5: pc = 0x0000000100000d08, where = a.out`start + 52 Each inline frame contains only the variables that they contain and each inlined stack frame is treated as a single entity. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
960d6a40711f05effe6fcc5b66f0952450f79ea2 |
|
03-Aug-2010 |
Greg Clayton <gclayton@apple.com> |
Added support for objective C built-in types: id, Class, and SEL. This involved watching for the objective C built-in types in DWARF and making sure when we convert the DWARF types into clang types that we use the appropriate ASTContext types. Added a way to find and dump types in lldb (something equivalent to gdb's "ptype" command): image lookup --type <TYPENAME> This only works for looking up types by name and won't work with variables. It also currently dumps out verbose internal information. I will modify it to dump more appropriate user level info in my next submission. Hookup up the "FindTypes()" functions in the SymbolFile and SymbolVendor so we can lookup types by name in one or more images. Fixed "image lookup --address <ADDRESS>" to be able to correctly show all symbol context information, but it will only show this extra information when the new "--verbose" flag is used. Updated to latest LLVM to get a few needed fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
15be8eddf3a2f9aff328197822ad8f338f96232b |
|
21-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Allow searching for a section by SectionType. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
53d68e749f0715691a95f23e9490d97e484b15da |
|
21-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Remove use of STL collection class use of the "data()" method since it isn't part of C++'98. Most of these were "std::vector<T>::data()" and "std::string::data()". git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
bef1583b89e73de77c8b0897fcf42b5b1fcabe4c |
|
14-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
I enabled some extra warnings for hidden local variables and for hidden virtual functions and caught some things and did some general code cleanup. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
54e7afa84d945f9137f9372ecde432f9e1a702fc |
|
09-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Merged Eli Friedman's linux build changes where he added Makefile files that enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
12bec71b323dc520f0e985a86e09c4712559e115 |
|
28-Jun-2010 |
Greg Clayton <gclayton@apple.com> |
Added function name types to allow us to set breakpoints by name more intelligently. The four name types we currently have are: eFunctionNameTypeFull = (1 << 1), // The function name. // For C this is the same as just the name of the function // For C++ this is the demangled version of the mangled name. // For ObjC this is the full function signature with the + or // - and the square brackets and the class and selector eFunctionNameTypeBase = (1 << 2), // The function name only, no namespaces or arguments and no class // methods or selectors will be searched. eFunctionNameTypeMethod = (1 << 3), // Find function by method name (C++) with no namespace or arguments eFunctionNameTypeSelector = (1 << 4) // Find function by selector name (ObjC) names this allows much more flexibility when setting breakoints: (lldb) breakpoint set --name main --basename (lldb) breakpoint set --name main --fullname (lldb) breakpoint set --name main --method (lldb) breakpoint set --name main --selector The default: (lldb) breakpoint set --name main will inspect the name "main" and look for any parens, or if the name starts with "-[" or "+[" and if any are found then a full name search will happen. Else a basename search will be the default. Fixed some command option structures so not all options are required when they shouldn't be. Cleaned up the breakpoint output summary. Made the "image lookup --address <addr>" output much more verbose so it shows all the important symbol context results. Added a GetDescription method to many of the SymbolContext objects for the more verbose output. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/Address.cpp
|
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/source/Core/Address.cpp
|
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/Core/Address.cpp
|