Skip to content

[LLDB] Finish implementing support for DW_FORM_data16 #106799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ bool DWARFFormValue::SkipValue(dw_form_t form,
*offset_ptr += 8;
return true;

// 16 byte values
case DW_FORM_data16:
*offset_ptr += 16;
return true;

// signed or unsigned LEB 128 values
case DW_FORM_addrx:
case DW_FORM_loclistx:
Expand Down Expand Up @@ -578,6 +583,7 @@ bool DWARFFormValue::IsBlockForm(const dw_form_t form) {
case DW_FORM_block1:
case DW_FORM_block2:
case DW_FORM_block4:
case DW_FORM_data16:
Copy link
Collaborator

@jasonmolenda jasonmolenda Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want IsBlockForm to return true for a DW_FORM_data16? I only ask because we don't do that for any of the other DW_FORM_data's.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might simply because this is represented the same way. Many systems don't support uint128_t types, so we can't just add one of those, so we need to use a byte pointer. Or we can add a bool DWARFFormValue::IsLargeConstant(const dw_form_t form) if we don't want to re-use the block stuff.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the block form will be the most convenient way to access this just because not all systems have uint128_t.

return true;
default:
return false;
Expand Down Expand Up @@ -611,6 +617,7 @@ bool DWARFFormValue::FormIsSupported(dw_form_t form) {
case DW_FORM_data2:
case DW_FORM_data4:
case DW_FORM_data8:
case DW_FORM_data16:
case DW_FORM_string:
case DW_FORM_block:
case DW_FORM_block1:
Expand Down
Loading