mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibDebug: Add AttributeForm field to Dwarf::AttributeValue
In some contexts, it's helpful to also know the "Attribute Form", in addition to the "Attribute Type". An example for such context is the interpretation of the "DW_AT_high_pc" attribute, which has different meaning if the form is an address or a constant.
This commit is contained in:
parent
a45ce0c6eb
commit
84609aecc1
2 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "DwarfInfo.h"
|
||||
#include "AttributeValue.h"
|
||||
|
||||
#include <AK/MemoryStream.h>
|
||||
|
||||
|
@ -61,6 +62,7 @@ AttributeValue DwarfInfo::get_attribute_value(AttributeDataForm form, ssize_t im
|
|||
InputMemoryStream& debug_info_stream, const CompilationUnit* unit) const
|
||||
{
|
||||
AttributeValue value;
|
||||
value.form = form;
|
||||
|
||||
auto assign_raw_bytes_value = [&](size_t length) {
|
||||
value.data.as_raw_bytes.length = length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue