History log of /external/lldb/include/lldb/Expression/DWARFExpression.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52f792329be5db8e38961350589e97e8f2823acd 12-Jul-2013 Greg Clayton <gclayton@apple.com> Huge change to clean up types.

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
cc810f049dd284ddf63951fdfeb7441067c7b6c0 12-Apr-2013 Sean Callanan <scallanan@apple.com> Fixed a bug where a few class forward declarations
weren't in the proper namespace.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.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/Expression/DWARFExpression.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/include/lldb/Expression/DWARFExpression.h
4fa86fef917b43f9573e5adfee4a4d005059dcae 11-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11791234>

Fixed an issue that could cause references the shared data for an object file to stay around longer than intended and could cause memory bloat when debugging multiple times.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
2f28ece553d2ef0d7b3e8d1419020591ec3818f9 04-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10507811>

Be better at detecting when DWARF changes and handle this more
gracefully than asserting and exiting.

Also fixed up a bunch of system calls that weren't properly checking
for EINTR.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
a1b9a90b7aef446302de9b845dc4f3b0e1473aa7 13-Nov-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10338439>

This is the actual fix for the above radar where global variables that weren't
initialized were not being shown correctly when leaving the DWARF in the .o
files. Global variables that aren't intialized have symbols in the .o files
that specify they are undefined and external to the .o file, yet document the
size of the variable. This allows the compiler to emit a single copy, but makes
it harder for our DWARF in .o files with the executable having a debug map
because the symbol for the global in the .o file doesn't exist in a section
that we can assign a fixed up linked address to, and also the DWARF contains
an invalid address in the "DW_OP_addr" location (always zero). This means that
the DWARF is incorrect and actually maps all such global varaibles to the
first file address in the .o file which is usually the first function. So we
can fix this in either of two ways: make a new fake section in the .o file
so that we have a file address in the .o file that we can relink, or fix the
the variable as it is created in the .o file DWARF parser and actually give it
the file address from the executable. Each variable contains a
SymbolContextScope, or a single pointer that helps us to recreate where the
variables came from (which module, file, function, etc). This context helps
us to resolve any file addresses that might be in the location description of
the variable by pointing us to which file the file address comes from, so we
can just replace the SymbolContextScope and also fix up the location, which we
would have had to do for the other case as well, and update the file address.
Now globals display correctly.

The above changes made it possible to determine if a variable is a global
or static variable when parsing DWARF. The DWARF emits a DW_TAG_variable tag
for each variable (local, global, or static), yet DWARF provides no way for
us to classify these variables into these categories. We can now detect when
a variable has a simple address expressions as its location and this will help
us classify these correctly.

While making the above changes I also noticed that we had two symbol types:
eSymbolTypeExtern and eSymbolTypeUndefined which mean essentially the same
thing: the symbol is not defined in the current object file. Symbol objects
also have a bit that specifies if a symbol is externally visible, so I got
rid of the eSymbolTypeExtern symbol type and moved all code locations that
used it to use the eSymbolTypeUndefined type.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
5c3861df62fde02d610a5ed92927a2d89333358b 02-Sep-2011 Greg Clayton <gclayton@apple.com> Added the ability for DWARF locations to use the ABI plug-ins to resolve
register names when dumping variable locations and location lists. Also did
some cleanup where "int" types were being used for "lldb::RegisterKind"
values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
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/include/lldb/Expression/DWARFExpression.h
82f0746880b4a6b18bcf8666670140f5b4a56791 30-May-2011 Greg Clayton <gclayton@apple.com> lldb-59.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
bdcb6abaa287df2c5f312c51d993c1d0b0cb120c 26-Jan-2011 Greg Clayton <gclayton@apple.com> Enabled extra warnings and fixed a bunch of small issues.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
8e69de4b9c55ec2eaebc62e4d987c2f0618ac431 20-Nov-2010 Jason Molenda <jmolenda@apple.com> Change the DWARFExpression::Evaluate methods to take an optional
RegisterContext* - normally this is retrieved from the ExecutionContext's
StackFrame but when we need to evaluate an expression while creating
the stack frame list this can be a little tricky.

Add DW_OP_deref_size, needed for the _sigtramp FDE expression.

Add support for processing DWARF expressions in RegisterContextLLDB.

Update callers to DWARFExpression::Evaluate.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
178710cd4307f3d44dc76ebd70fc7daf7ebe17c5 14-Sep-2010 Greg Clayton <gclayton@apple.com> Looking at some of the test suite failures in DWARF in .o files with the
debug map showed that the location lists in the .o files needed some
refactoring in order to work. The case that was failing was where a function
that was in the "__TEXT.__textcoal_nt" in the .o file, and in the
"__TEXT.__text" section in the main executable. This made symbol lookup fail
due to the way we were finding a real address in the debug map which was
by finding the section that the function was in in the .o file and trying to
find this in the main executable. Now the section list supports finding a
linked address in a section or any child sections. After fixing this, we ran
into issue that were due to DWARF and how it represents locations lists.
DWARF makes a list of address ranges and expressions that go along with those
address ranges. The location addresses are expressed in terms of a compile
unit address + offset. This works fine as long as nothing moves around. When
stuff moves around and offsets change between the remapped compile unit base
address and the new function address, then we can run into trouble. To deal
with this, we now store supply a location list slide amount to any location
list expressions that will allow us to make the location list addresses into
zero based offsets from the object that owns the location list (always a
function in our case).

With these fixes we can now re-link random address ranges inside the debugger
for use with our DWARF + debug map, incremental linking, and more.

Another issue that arose when doing the DWARF in the .o files was that GCC
4.2 emits a ".debug_aranges" that only mentions functions that are externally
visible. This makes .debug_aranges useless to us and we now generate a real
address range lookup table in the DWARF parser at the same time as we index
the name tables (that are needed because .debug_pubnames is just as useless).
llvm-gcc doesn't generate a .debug_aranges section, though this could be
fixed, we aren't going to rely upon it.

Renamed a bunch of "UINT_MAX" to "UINT32_MAX".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
b04e7a805310f2f2cc77947a8b263de9061617ae 24-Aug-2010 Greg Clayton <gclayton@apple.com> Got a lot of the kinks worked out in the inline support after debugging more
complex inlined examples.

StackFrame classes don't have a "GetPC" anymore, they have "GetFrameCodeAddress()".
This is because inlined frames will have a PC value that is the same as the
concrete frame that owns the inlined frame, yet the code locations for the
frame can be different. We also need to be able to get the real PC value for
a given frame so that variables evaluate correctly. To get the actual PC
value for a frame you can use:

addr_t pc = frame->GetRegisterContext()->GetPC();

Some issues with the StackFrame stomping on its own symbol context were
resolved which were causing the information to change for a frame when the
stack ID was calculated. Also the StackFrame will now correctly store the
symbol context resolve flags for any extra bits of information that were
looked up (if you ask for a block only and you find one, you will alwasy have
the compile unit and function).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.h
3530022304599ed4a2f915454eaaf91e25d640fe 17-Aug-2010 Sean Callanan <scallanan@apple.com> Documented DWARFExpression.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/DWARFExpression.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/Expression/DWARFExpression.h