sln build fix (again), tests fixes, audit work and doctors work
This commit is contained in:
@@ -5,14 +5,12 @@
|
||||
// Description: Name demangler implementation for C++ and Rust symbols
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace StellaOps.BinaryIndex.Builders.SymbolDiff;
|
||||
|
||||
/// <summary>
|
||||
/// Demangles C++ and Rust symbol names.
|
||||
/// </summary>
|
||||
public sealed partial class NameDemangler : INameDemangler
|
||||
public sealed class NameDemangler : INameDemangler
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public string? Demangle(string mangledName)
|
||||
@@ -42,7 +40,19 @@ public sealed partial class NameDemangler : INameDemangler
|
||||
return ManglingScheme.None;
|
||||
}
|
||||
|
||||
// Itanium C++ ABI: starts with _Z
|
||||
// Rust v0: starts with _R
|
||||
if (name.StartsWith("_R", StringComparison.Ordinal))
|
||||
{
|
||||
return ManglingScheme.Rust;
|
||||
}
|
||||
|
||||
// Rust legacy: starts with _ZN...E (must check before generic Itanium)
|
||||
if (name.StartsWith("_ZN", StringComparison.Ordinal) && name.EndsWith('E'))
|
||||
{
|
||||
return ManglingScheme.Rust;
|
||||
}
|
||||
|
||||
// Itanium C++ ABI: starts with _Z (after Rust check)
|
||||
if (name.StartsWith("_Z", StringComparison.Ordinal))
|
||||
{
|
||||
return ManglingScheme.ItaniumCxx;
|
||||
@@ -54,18 +64,6 @@ public sealed partial class NameDemangler : INameDemangler
|
||||
return ManglingScheme.MicrosoftCxx;
|
||||
}
|
||||
|
||||
// Rust legacy: starts with _ZN...E or contains $
|
||||
if (name.StartsWith("_ZN", StringComparison.Ordinal) && name.Contains("17h"))
|
||||
{
|
||||
return ManglingScheme.Rust;
|
||||
}
|
||||
|
||||
// Rust v0: starts with _R
|
||||
if (name.StartsWith("_R", StringComparison.Ordinal))
|
||||
{
|
||||
return ManglingScheme.Rust;
|
||||
}
|
||||
|
||||
// Swift: starts with $s or _$s
|
||||
if (name.StartsWith("$s", StringComparison.Ordinal) ||
|
||||
name.StartsWith("_$s", StringComparison.Ordinal))
|
||||
@@ -312,8 +310,9 @@ public sealed partial class NameDemangler : INameDemangler
|
||||
var part = mangledName.Substring(pos, length);
|
||||
pos += length;
|
||||
|
||||
// Skip hash part (17h + 16 hex digits)
|
||||
if (part.StartsWith('h') && part.Length == 17 && IsHexString().IsMatch(part[1..]))
|
||||
// Skip hash part (h + 16 hex digits = 17 chars total)
|
||||
// Rust legacy format encodes hashes as 17h<16-hex-digits>
|
||||
if (part.Length == 17 && part[0] == 'h' && IsAllHex(part.AsSpan(1)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -326,6 +325,18 @@ public sealed partial class NameDemangler : INameDemangler
|
||||
return parts.Count > 0 ? string.Join("::", parts) : null;
|
||||
}
|
||||
|
||||
private static bool IsAllHex(ReadOnlySpan<char> span)
|
||||
{
|
||||
foreach (var c in span)
|
||||
{
|
||||
if (!char.IsAsciiHexDigit(c))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return span.Length > 0;
|
||||
}
|
||||
|
||||
private static string? DemangleRustV0(string mangledName)
|
||||
{
|
||||
// Rust v0 mangling is complex; provide basic support
|
||||
@@ -373,7 +384,4 @@ public sealed partial class NameDemangler : INameDemangler
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
[GeneratedRegex("^[0-9a-f]+$", RegexOptions.IgnoreCase)]
|
||||
private static partial Regex IsHexString();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Builders Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Cache Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Contracts Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Core Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Corpus Alpine Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Corpus Debian Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Corpus RPM Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Corpus Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Fingerprints Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex FixIndex Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex Persistence Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# BinaryIndex VexBridge Task Board
|
||||
|
||||
This board mirrors active sprint tasks for this module.
|
||||
Source of truth: `docs/implplan/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
Source of truth: `docs-archived/implplan/2025-12-29-csproj-audit/SPRINT_20251229_049_BE_csproj_audit_maint_tests.md`.
|
||||
|
||||
| Task ID | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
|
||||
Reference in New Issue
Block a user