Skip to content

[lldb][ObjC] Fix method list entry offset calculation #115571

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

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ bool ClassDescriptorV2::relative_list_entry_t::Read(Process *process,
lldb::offset_t cursor = 0;
uint64_t raw_entry = extractor.GetU64_unchecked(&cursor);
m_image_index = raw_entry & 0xFFFF;
m_list_offset = (int64_t)(raw_entry >> 16);
m_list_offset = llvm::SignExtend64<48>(raw_entry >> 16);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess that works, too, but why not (int64_t)raw_entry >> 16 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just felt more explicit

return true;
}

Expand Down
Loading