Skip to content

Commit 927cd7a

Browse files
Dwarf: Return that function isn't found if function list is empty.
1 parent fdd584f commit 927cd7a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/CsDebugScript.DwarfSymbolProvider/DwarfSymbolProviderModule.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,11 @@ private DwarfSymbol FindFunction(ulong address, out ulong displacement)
21342134
{
21352135
index = functionsCache.Count - 1;
21362136
}
2137+
if (index < 0)
2138+
{
2139+
displacement = address;
2140+
return null;
2141+
}
21372142
if (functionAddressesCache[index] > address && index > 0)
21382143
{
21392144
index--;

0 commit comments

Comments
 (0)