History log of /haiku-fatelf/src/apps/debugger/debug_info/DwarfTypes.cpp
Revision Date Author Comments
# 16b8573b 23-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Numerous fixes to stack unwinding for .eh_frame.

- Add address size parameter to EvaluateExpression since the compilation
unit may not be available (i.e. in non-debug code). Accordingly, also
add accessor for address size to DwarfExpressionEvaluationContext,
and adjust callers accordingly.

- Correctly handle augmentation 'P'. This one consists of a data byte
describing the address encoding, followed by the address of the
personality function encoded in the aforementioned format. Not
skipping this correctly was resulting in us retrieving the wrong
FDE address format in e.g. CIEs encoded with augmentation 'zPLR'.

- The address range should be retrieved as value only without accounting
for the relative offset portion of the address encoding format. Fixes
some issues where we'd pick the wrong FDE to use for unwinding due
to us misinterpreting it as covering a far larger PC range than it
in fact did.

- DW_CFA_set_loc also needs to respect the encoded address format.

Overall, these changes fix a number of regressions introduced by the
previous commits, and also mean that stack unwinding for x86-64 should
now work as expected in all cases where either debug information or
an exception table is available.


# ada60b4e 03-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Rework handling of template parameters.

- Keep a unified list in DIEClassBaseType so that the order
of template parameters is preserved in cases when type and
value parameters are mixed. Thanks Ingo for the hint.

- Introduce new base Type TemplateParameter, which represents either
a template type or template value parameter, a list of which is
attached to CompoundType.

- Add DwarfTemplateParameter implementing subclass of TemplateParameter
and adjust DwarfTypeFactory accordingly for the above changes.


# ce6b908e 02-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Extend CompoundType to handle template parameters.

- Adjust CompoundType to add accessors for template type and value
parameters.
- Add DwarfCompoundType/DwarfTypeFactory handling for template
template type parameters.


# ab7a2ea8 05-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add support for creating derived types to DwarfType.


# 7483c98d 05-Aug-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger (and some friends): 64 bit fixes


# be63c912 07-Dec-2011 Rene Gollent <anevilyak@gmail.com>

Fix incomplete/incorrect type lookup.

- Add accesor to CompoundType to expose the particular compound kind.

- Implement aforementioned accessor in DwarfCompoundType, and ensure
DwarfTypeFactory populates it appropriately.

- Modify GlobalTypeLookup to make use of the address and compound
subtype kinds when trying to match a type.

Due to the lack of matching against the subtype, we would previously wind
up matching anonymous compound types against those of their parents, resulting
in the wrong type getting assigned to their value nodes.

Fixes #8190.


# 185d2cdc 30-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Add model class TypeLookupConstraints.
* Create and pass constraints to type lookup requests to ensure
that the type we get back is in fact the one we wanted, and not
a different one that happened to have a similar name.

Resolves ticket #5495.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42348 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0573015d 20-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Introduce a flag in ExpressionEvaluationContext in order to distinguish between
cases where no object pointer is available vs the object pointer being present
but NULL, which would previously not be pushed onto the stack, leading to
expression evaluation failures.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42274 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3e066cf 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced uses of obsolescent BReference[able] API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4943027 09-Dec-2010 Rene Gollent <anevilyak@gmail.com>

ValueLocation::SetTo() normally tries to resolve size and offset differences
versus the passed in base location. In the case of a union we don't
want this behavior since all members start at offset 0. Fixes union values
showing up incorrectly in various circumstances.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39797 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a1ce93b 11-Nov-2010 Rene Gollent <anevilyak@gmail.com>

When computing absolute addresses, take the image relocation
delta into account. Fixes retrieving the addresses and
consequently values of static variables.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39407 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e438c2d7 06-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

A Type suffices as base type for DwarfSubrangeType.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33918 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59ea286f 05-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* EnumerationValue -> EnumeratorValue
* Since some types don't have names (e.g. pointer types or anonymous structs or
unions), each type does now also have a unique ID. The global type cache
registers types by ID and by name (if they have one). This fixes clashes of
types with empty names.
* Completely refactored the code dealing with variable values. Formerly we had
Variable and TypeComponentPath to navigate to a component, mapped to a
BVariant representing the value. Now we have:
* Interface Value with various subclasses (BoolValue, IntegerValue, etc.) to
represent a value, with the flexibility for more esoteric values.
* A tree of ValueNode+ValueNodeChild objects to represent the components of a
variable. On top of each ValueNodeChild sits a ValueNode representing the
value of the component, potentially having ValueNodeChild children. This
should allow casting a component value, simply by replacing its ValueNode.
* Interface ValueHandler and various implementations for the different value
types. It is basically a factory for classes allowing to format/display a
value.
* ValueHandlerRoster -- a registry for ValueHandlers, finding the best one
for a given value.
* Interface TypeHandler and various implementions for the different type
kinds (primitive, compound, address, etc.). It is basically a factory for
ValueNodes for that type.
* TypeHandlerRoster -- a registry for TypeHandlers, finding the best one
for a given type.

That's still a bit work in progress. It introduces at least one regression:
The VariablesView doesn't save/restore its state anymore. Will take a while
until that is added back.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d054be0d 09-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the data location resolution methods from StackFrameDebugInfo to the
respective Type classes. StackFrameDebugInfo is pretty much out of work now,
but maybe something comes up later.
* Renamed GlobalTypeLookupContext to GlobalTypeCache and renamed its methods.
* A TeamDebugInfo does now have a GlobalTypeCache which is used for resolving
types. Formerly it was created per stack frame, so all types had to be
resolved after each single step. Single-stepping is usably fast again.
The disadvantage is that DWARF theoretically allows types properties to
depend on instruction/frame/frame base pointer and we don't support that
anymore. I can't think of a reasonable application for that feature, though.
* Refactored DwarfStackFrameDebugInfo:
- Moved the type classes into new DwarfTypes.{h,cpp}.
- Moved the creation of types into new class DwarfTypeFactory.
- Added class DwarfTypeContext which bundles all the dependencies of the type
classes.
* Made DwarfFile a BReferenceable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ab7a2ea818743b87f41e747871b11d58127ee23f 05-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add support for creating derived types to DwarfType.


# 7483c98dece8f3606fc5d3fd746c0544f7e4b6dd 05-Aug-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger (and some friends): 64 bit fixes


# be63c91230f96d9d728c125ca0e910819b7c0f19 07-Dec-2011 Rene Gollent <anevilyak@gmail.com>

Fix incomplete/incorrect type lookup.

- Add accesor to CompoundType to expose the particular compound kind.

- Implement aforementioned accessor in DwarfCompoundType, and ensure
DwarfTypeFactory populates it appropriately.

- Modify GlobalTypeLookup to make use of the address and compound
subtype kinds when trying to match a type.

Due to the lack of matching against the subtype, we would previously wind
up matching anonymous compound types against those of their parents, resulting
in the wrong type getting assigned to their value nodes.

Fixes #8190.


# 185d2cdcb9b3af20ad0e9cce53ed7e5bafe2e962 30-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Add model class TypeLookupConstraints.
* Create and pass constraints to type lookup requests to ensure
that the type we get back is in fact the one we wanted, and not
a different one that happened to have a similar name.

Resolves ticket #5495.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42348 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0573015d14887ade1a081baa04dcb7f8da8d19b7 20-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Introduce a flag in ExpressionEvaluationContext in order to distinguish between
cases where no object pointer is available vs the object pointer being present
but NULL, which would previously not be pushed onto the stack, leading to
expression evaluation failures.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42274 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3e066cf6d35a86d29396d4e740f9811e506b66c 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced uses of obsolescent BReference[able] API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a4943027ae8e5703640bb2a30372b99772a1e190 09-Dec-2010 Rene Gollent <anevilyak@gmail.com>

ValueLocation::SetTo() normally tries to resolve size and offset differences
versus the passed in base location. In the case of a union we don't
want this behavior since all members start at offset 0. Fixes union values
showing up incorrectly in various circumstances.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39797 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a1ce93bc72bfa23e0f46642c256aa735fb80426 11-Nov-2010 Rene Gollent <anevilyak@gmail.com>

When computing absolute addresses, take the image relocation
delta into account. Fixes retrieving the addresses and
consequently values of static variables.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39407 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e438c2d761c288e8e65b3a6591d87a3463166839 06-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

A Type suffices as base type for DwarfSubrangeType.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33918 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59ea286fac914a808edc6989becc77dadff10383 05-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* EnumerationValue -> EnumeratorValue
* Since some types don't have names (e.g. pointer types or anonymous structs or
unions), each type does now also have a unique ID. The global type cache
registers types by ID and by name (if they have one). This fixes clashes of
types with empty names.
* Completely refactored the code dealing with variable values. Formerly we had
Variable and TypeComponentPath to navigate to a component, mapped to a
BVariant representing the value. Now we have:
* Interface Value with various subclasses (BoolValue, IntegerValue, etc.) to
represent a value, with the flexibility for more esoteric values.
* A tree of ValueNode+ValueNodeChild objects to represent the components of a
variable. On top of each ValueNodeChild sits a ValueNode representing the
value of the component, potentially having ValueNodeChild children. This
should allow casting a component value, simply by replacing its ValueNode.
* Interface ValueHandler and various implementations for the different value
types. It is basically a factory for classes allowing to format/display a
value.
* ValueHandlerRoster -- a registry for ValueHandlers, finding the best one
for a given value.
* Interface TypeHandler and various implementions for the different type
kinds (primitive, compound, address, etc.). It is basically a factory for
ValueNodes for that type.
* TypeHandlerRoster -- a registry for TypeHandlers, finding the best one
for a given type.

That's still a bit work in progress. It introduces at least one regression:
The VariablesView doesn't save/restore its state anymore. Will take a while
until that is added back.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d054be0d8c41431d611f41171232b0f75ec6f30f 09-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the data location resolution methods from StackFrameDebugInfo to the
respective Type classes. StackFrameDebugInfo is pretty much out of work now,
but maybe something comes up later.
* Renamed GlobalTypeLookupContext to GlobalTypeCache and renamed its methods.
* A TeamDebugInfo does now have a GlobalTypeCache which is used for resolving
types. Formerly it was created per stack frame, so all types had to be
resolved after each single step. Single-stepping is usably fast again.
The disadvantage is that DWARF theoretically allows types properties to
depend on instruction/frame/frame base pointer and we don't support that
anymore. I can't think of a reasonable application for that feature, though.
* Refactored DwarfStackFrameDebugInfo:
- Moved the type classes into new DwarfTypes.{h,cpp}.
- Moved the creation of types into new class DwarfTypeFactory.
- Added class DwarfTypeContext which bundles all the dependencies of the type
classes.
* Made DwarfFile a BReferenceable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33495 a95241bf-73f2-0310-859d-f6bbb57e9c96