Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux][SOS] Fix clrstack command of lldb sosplugin on x86 #13973

Merged
merged 5 commits into from
Oct 5, 2017

Conversation

kbaladurin
Copy link
Member

@kbaladurin kbaladurin commented Sep 14, 2017

This patch fixes clrstack command of lldb sosplugin on x86.

@kbaladurin
Copy link
Member Author

cc @Dmitri-Botcharnikov @ayuckhulk

@kbaladurin kbaladurin force-pushed the x86-sosplugin-clrstack branch 2 times, most recently from b74651a to 4be9ee2 Compare September 15, 2017 06:05
@kbaladurin
Copy link
Member Author

@dotnet-bot test Ubuntu x64 Checked Build and Test

@kbaladurin
Copy link
Member Author

@mikem8361 @janvorli PTAL

@kbaladurin
Copy link
Member Author

@dotnet-bot test Ubuntu x64 Checked Build and Test

Konstantin Baladurin added 5 commits October 2, 2017 08:38
It's need for 'clrstack -f' command of SOS plugin on x86.
We should use PTR_UNWIND_INFO instead of PUNWIND_INFO for pointer to
UNWIND_INFO structure because it's pointer from other process and
we need to use DAC to read data using it.
It's needed for 'clrstack -f' command in libsosplugin.
Asm block like following:
__asm fnsave currentFPUState

where currentFPUState is structure works with MSVC but leads to
undefined reference currentFPUState in the binary with other
compilers. So rewrite such asm blocks for them.

This patch fixes error "Unable to load 'libmscordbi.so'" during
execution of 'clrstack -f' command of SOS plugin on x86.
WINAPI and STDAPI are defined as __cdecl but in some cases functions
with these attributes are called using stdcall calling convention.

It leads to crashes during execution of 'clrstack -i' command of
SOS plugin on x86.
@kbaladurin
Copy link
Member Author

@janvorli PTAL

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@janvorli janvorli merged commit de4dacc into dotnet:master Oct 5, 2017
@kbaladurin
Copy link
Member Author

@janvorli thank you!

@kbaladurin kbaladurin deleted the x86-sosplugin-clrstack branch October 5, 2017 08:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants