Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISC-V] Implement SOS related code. (#4385)
Implement ICorDebug related `clrstack -i`. Implement `clrstack -r` output. Related PR in runtime: dotnet/runtime#94454 ``` > clrstack OS Thread Id: 0x40614 (0) Child SP IP Call Site 0000003FCBDD6F70 0000000000000000 [InlinedCallFrame: 0000003fcbdd6f70] Interop+Sys.<ReadStdin>g____PInvoke|44_0(Byte*, Int32) 0000003FCBDD6F70 0000003f32be5758 [InlinedCallFrame: 0000003fcbdd6f70] Interop+Sys.<ReadStdin>g____PInvoke|44_0(Byte*, Int32) 0000003FCBDD6F50 0000003F32BE5758 ILStubClass.IL_STUB_PInvoke(Byte*, Int32) 0000003FCBDD7050 0000003F32BE55BC Interop+Sys.ReadStdin(Byte*, Int32) [/home/runtime/src/libraries/System.Console/src/Microsoft.Interop.LibraryImportGenerator/Microsoft.Interop.LibraryImportGenerator/LibraryImports.g.cs @ 800] 0000003FCBDD7080 0000003F32BE5464 System.IO.StdInReader.ReadStdin(Byte*, Int32) [/home/runtime/src/libraries/System.Console/src/System/IO/StdInReader.cs @ 83] 0000003FCBDD70B0 0000003F32BE4FBC System.IO.StdInReader.ReadKey() [/home/runtime/src/libraries/System.Console/src/System/IO/StdInReader.cs @ 337] 0000003FCBDD7560 0000003F32BE3A24 System.IO.StdInReader.ReadLineCore(Boolean) [/home/runtime/src/libraries/System.Console/src/System/IO/StdInReader.cs @ 160] 0000003FCBDD7740 0000003F32BE3694 System.IO.StdInReader.ReadLine() [/home/runtime/src/libraries/System.Console/src/System/IO/StdInReader.cs @ 90] 0000003FCBDD77A0 0000003F32BE353C System.IO.SyncTextReader.ReadLine() [/home/runtime/src/libraries/System.Console/src/System/IO/SyncTextReader.cs @ 77] 0000003FCBDD77F0 0000003F32BE144C System.Console.ReadLine() [/home/runtime/src/libraries/System.Console/src/System/Console.cs @ 752] 0000003FCBDD7820 0000003F32B9DFD0 TestApp.Program.Main(System.String[]) [/home/viewizard/Desktop/projects_test/test_hr/Program.cs @ 11] ``` ``` > clrstack -i Dumping managed stack and managed variables using ICorDebug. ============================================================================= Child SP IP Call Site 0000003FCBDD6EF0 0000000000000000 [NativeStackFrame] 0000003FCBDD6F50 0000003f32be5758 0000003FCBDD6F70 (null) [Managed to Unmanaged transition: 0000003FCBDD6F70] 0000003FCBDD7050 0000003f32be55bc [DEFAULT] I4 Interop+Sys.ReadStdin(Ptr UI1,I4) (/home/mkurinnoi/dotnet/System.Console.dll) 0000003FCBDD7080 0000003f32be5464 [DEFAULT] I4 System.IO.StdInReader.ReadStdin(Ptr UI1,I4) (/home/mkurinnoi/dotnet/System.Console.dll) 0000003FCBDD70B0 0000003f32be4fbc [DEFAULT] [hasThis] ValueClass System.ConsoleKeyInfo System.IO.StdInReader.ReadKey() (/home/mkurinnoi/dotnet/System.Console.dll) 0000003FCBDD7560 0000003f32be3a24 [DEFAULT] [hasThis] Boolean System.IO.StdInReader.ReadLineCore(Boolean) (/home/mkurinnoi/dotnet/System.Console.dll) 0000003FCBDD7740 0000003f32be3694 [DEFAULT] [hasThis] String System.IO.StdInReader.ReadLine() (/home/mkurinnoi/dotnet/System.Console.dll) 0000003FCBDD77A0 0000003f32be353c [DEFAULT] [hasThis] String System.IO.SyncTextReader.ReadLine() (/home/mkurinnoi/dotnet/System.Console.dll) 0000003FCBDD77F0 0000003f32be144c [DEFAULT] String System.Console.ReadLine() (/home/mkurinnoi/dotnet/System.Console.dll) 0000003FCBDD7820 0000003f32b9dfd0 [DEFAULT] Void TestApp.Program.Main(SZArray String) (/home/mkurinnoi/test_hr.dll) 0000003FCBDD7850 0000003fb1e2307e [NativeStackFrame] Stack walk complete. ============================================================================= ``` CC @clamp03 @wscho77 @HJLeee @JongHeonChoi @t-mustafin @gbalykov
- Loading branch information