Skip to content
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

Fix build on alpine-riscv64 #4787

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/SOS/lldbplugin/services.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ LLDBServices::VirtualUnwind(
DWORD spToFind = dtcontext->Sp;
#elif DBG_TARGET_ARM64
DWORD64 spToFind = dtcontext->Sp;
#elif DBG_TARGET_RISCV64
DWORD64 spToFind = dtcontext->Sp;
#else
#error "spToFind undefined for this platform"
#endif
Expand Down Expand Up @@ -454,6 +456,8 @@ LLDBServices::GetExecutingProcessorType(
*type = IMAGE_FILE_MACHINE_ARM64;
#elif DBG_TARGET_X86
*type = IMAGE_FILE_MACHINE_I386;
#elif DBG_TARGET_RISCV64
*type = IMAGE_FILE_MACHINE_RISCV64;
#else
#error "Unsupported target"
#endif
Expand Down
8 changes: 4 additions & 4 deletions src/shared/inc/regdisp.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ struct REGDISPLAY : public REGDISPLAY_BASE {

inline TADDR GetRegdisplayFP(REGDISPLAY *display) {
LIMITED_METHOD_CONTRACT;
return NULL;
return (TADDR)NULL;
}

inline TADDR GetRegdisplayFPAddress(REGDISPLAY *display) {
LIMITED_METHOD_CONTRACT;
return NULL;
return (TADDR)NULL;
}

// This function tells us if the given stack pointer is in one of the frames of the functions called by the given frame
Expand All @@ -248,14 +248,14 @@ inline TADDR GetRegdisplayStackMark(REGDISPLAY *display)
_ASSERTE(GetRegdisplaySP(display) == GetSP(display->pCurrentContext));
return GetRegdisplaySP(display);

#elif defined(TARGET_ARM64)
#elif defined(TARGET_ARM64) || defined(TARGET_RISCV64)

_ASSERTE(display->IsCallerContextValid);
return GetSP(display->pCallerContext);

#else // TARGET_AMD64
PORTABILITY_ASSERT("GetRegdisplayStackMark NYI for this platform (Regdisp.h)");
return NULL;
return (TADDR)NULL;
#endif // TARGET_AMD64
}

Expand Down
Loading