class DwarfStackEntry
Defined at line 27 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
Represents an entry in the stack for evaluating DWARF 5 expressions.
DWARF 5 introduced "typed" stack entries. Previously, all values were of a generic type. This
means that every entry has a value plus an optional type which is a reference to a "base" type
"Each element of the stack has a type and a value, and can represent a value of any supported
base type of the target machine. Instead of a base type, elements can have a generic type,
which is an integral type that has the size of an address on the target machine and unspecified
signedness."
We treat these different values as either signed, unsigned, float, or double. The generic type
and bools are stored as unsigned.
Public Methods
void DwarfStackEntry (UnsignedType generic_value)
Defined at line 17 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
void DwarfStackEntry (fxl::RefPtr<BaseType> type, const void * data, size_t data_size)
This doesn't do any validation of the data, it just copies data_bytes (up to the maximum size
this class supports) and hopes it's the correct type. This is used for deserializing from
DWARF where the data is coming in as raw bytes.
Defined at line 22 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
void DwarfStackEntry (fxl::RefPtr<BaseType> type, SignedType value)
The sign of the BaseType in the first argument must match the sign of the second argument.
Defined at line 28 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
void DwarfStackEntry (fxl::RefPtr<BaseType> type, UnsignedType value)
Defined at line 36 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
void DwarfStackEntry (fxl::RefPtr<BaseType> type, float value)
Defined at line 44 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
void DwarfStackEntry (fxl::RefPtr<BaseType> type, double value)
Defined at line 51 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
bool operator!= (const DwarfStackEntry & other)
Defined at line 56 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
bool is_generic ()
Defined at line 58 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
const BaseType * type ()
Defined at line 59 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
bool operator== (const DwarfStackEntry & other)
Comparison for unit testing. If types are present, the base type enum and byte size are
compared, but not the name nor the identity of the type record.
Defined at line 59 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
fxl::RefPtr<BaseType> type_ref ()
Defined at line 60 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
UnsignedType unsigned_value ()
Defined at line 65 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
SignedType signed_value ()
Defined at line 66 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
float float_value ()
Defined at line 67 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
double double_value ()
Defined at line 68 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
const void * data ()
Some operations need to work on the contained data as an abstract bag of bits. These accessors
provide access to it.
Defined at line 72 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
size_t MaxByteSize ()
Defined at line 73 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
bool TreatAsSigned ()
Defined at line 81 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
bool TreatAsUnsigned ()
Defined at line 82 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
bool TreatAsFloat ()
Defined at line 83 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
bool TreatAsDouble ()
Defined at line 84 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
bool is_integral ()
Defined at line 86 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.h
size_t GetByteSize ()
Returns the size in bytes of this value.
Defined at line 95 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
bool TreatAsSigned (const BaseType * type)
These functions also accept null BaseType pointers which are counted as generic.
Defined at line 105 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
bool TreatAsUnsigned (const BaseType * type)
static
Defined at line 113 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
bool TreatAsFloat (const BaseType * type)
static
Defined at line 124 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
bool TreatAsDouble (const BaseType * type)
static
Defined at line 131 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
bool IsZero ()
Returns true if the value is within the machine epsilon of 0 for the current type.
Defined at line 137 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
bool SameTypeAs (const DwarfStackEntry & other)
Returns true if the two stack entries have the same type, either the same base type, or they
are both generic. Most arithmetic operations require them to be the same.
Defined at line 155 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc
std::string GetTypeDescription ()
Defined at line 167 of file ../../src/developer/debug/zxdb/symbols/dwarf_stack_entry.cc