You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix remaining Native AOT Linux DWARF errors #90209
Yeah, that's the pattern. The tricky part is to figure out what is the correct representation in DWARF. I was convinced that it's fine to just mirror the nesting inside the DWARF structure (as parent-child relationship). Then I couldn't find it in the spec, and I tried to replicate something similar emitted by C++ compiler... and I really couldn't come up with an answer what is the correct way to represent it.
I understood from @jakobbotsch' comment #83233 (comment) that RyuJIT should not be creating separate debug info for these nested try scopes. I assume the debuggers would still hit the breakpoint on nested try and inside the nested try as well without them? I tried to filter out the nested ranges in PublishCode() of CorInfoImpl.cs, but was failing (error: DIEs have overlapping address ranges: continue to persist). 😅
I tried to replicate something similar emitted by C++ compiler.
Same, found out that with clang++ -gdwarf-4 -g3 -O0 -o example example.cpp and this example.cpp:
#include<iostream>intmain() {
int x = 0;
std::cout << "Enter a value: ";
std::cin >> x;
try {
if (x > 0) {
throw x;
}
} catch (int e) {
std::cout << "Caught exception: " << e << std::endl;
}
return0;
}
, clang did produced some info, but that wasn't particularly useful. 🥲
Activity
am11 commentedon Feb 6, 2024
Related: #83233 (comment). @filipnavara, maybe the
CORINFO_EH_CLAUSE_SAMETRYscope vs. variables in.debug_loc(LocationListruntime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/Dwarf/DwarfInfoWriter.cs
Line 158 in 12db245
runtime/src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs
Lines 880 to 905 in 12db245
filipnavara commentedon Feb 6, 2024
The clauses need to be nested based on the address ranges. It should not be hard to implement.
am11 commentedon Jun 1, 2024
The code pattern which entails these errors is nested
tryintryand/or thecatchblocks:filipnavara commentedon Jun 1, 2024
Yeah, that's the pattern. The tricky part is to figure out what is the correct representation in DWARF. I was convinced that it's fine to just mirror the nesting inside the DWARF structure (as parent-child relationship). Then I couldn't find it in the spec, and I tried to replicate something similar emitted by C++ compiler... and I really couldn't come up with an answer what is the correct way to represent it.
am11 commentedon Jun 1, 2024
I understood from @jakobbotsch' comment #83233 (comment) that RyuJIT should not be creating separate debug info for these nested try scopes. I assume the debuggers would still hit the breakpoint on nested try and inside the nested try as well without them? I tried to filter out the nested ranges in
PublishCode()ofCorInfoImpl.cs, but was failing (error: DIEs have overlapping address ranges:continue to persist). 😅Same, found out that with
clang++ -gdwarf-4 -g3 -O0 -o example example.cppand this example.cpp:, clang did produced some info, but that wasn't particularly useful. 🥲
Fix NativeAOT DWARF for EH regions and funclets
Fix NativeAOT DWARF for EH regions and funclets
Fix NativeAOT DWARF for EH regions and funclets (dotnet#137511)