This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Change RegisterValue::GetAsMemoryData to const RegisterInfo&
ClosedPublic

Authored by DavidSpickett on Sep 30 2022, 7:25 AM.

Details

Summary

Most of the paths to this never passed nullptr intentionally. Those
that possibly could have were assuming it was not null elsehwere,
so would have crashed.

I've added asserts in those cases.

At least one case was relying on GetAsMemoryData to return an error
when it was given nullptr. So I've hoisted that error setting code
out into the caller.

Depends on D134963

Diff Detail

Event Timeline

DavidSpickett created this revision.Sep 30 2022, 7:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2022, 7:25 AM
DavidSpickett requested review of this revision.Sep 30 2022, 7:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2022, 7:25 AM
clayborg accepted this revision.Oct 10 2022, 4:50 PM
This revision is now accepted and ready to land.Oct 10 2022, 4:50 PM