first pass at (rdi -> loose rdim) path, used in (rdi * ... * rdi) -> rdi joining in radbin; plug in regular conversion path before voff -> line & breakpad paths in radbin, such that PDBs, DWARFs, RDIs, etc. can be used as input; fix up voff -> line path to plug into regular output systems; remove String8 union thing - three reasons: (a) it was only ever introduced for convenience in Linux layers, so let's just keep zero-terminated Linux nonsense in Linux land, (b) it was just alternate syntax for a cast, so let's just cast, (c) it was misleading - 'cstr' implies null-termination, which String8 of course doesn't guarantee. this led to some misuses, where .cstr was trusted to be zero-terminated, when that was not necessarily true (semaphore opening).

This commit is contained in:
Ryan Fleury
2026-03-03 16:24:54 -08:00
parent 2af3990971
commit 4312ee14fd
17 changed files with 1797 additions and 1508 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ typedef struct RS_MAX_BUBBLE_BUF { char b[RS_SMALL_FLIP_TO_INSERTION_GT_SIZE]; }
#if _MSC_VER
# define radsort_break_ __debugbreak()
#else
# define radsort_break_ ___builtin_trap()
# define radsort_break_ __builtin_trap()
#endif
#define radsort( start, len, is_before_func ) \
+15 -15
View File
@@ -631,17 +631,17 @@ cl = lg; \
dp = 0;
cs = 0;
}goto scopy;
case 'm':
case 'M':
{
stbsp__flush_cb();
static const U64 one_kib = 1ull * 1024;
static const U64 one_mib = 1ull * 1024 * 1024;
static const U64 one_gib = 1ull * 1024 * 1024 * 1024;
static const U64 one_tib = 1ull * 1024 * 1024 * 1024 * 1024;
U64 size;
if(f[0] == 'M')
{
@@ -651,11 +651,11 @@ cl = lg; \
{
size = va_arg(va, U32);
}
U64 lo = 0;
U64 hi = 0;
char *units = "";
if(size < one_kib)
{
hi = size;
@@ -686,7 +686,7 @@ cl = lg; \
lo = ((size * 100) / one_tib) % 100;
units = "TiB";
}
// format high part
if(hi > 0)
{
@@ -707,37 +707,37 @@ cl = lg; \
*bf = '0';
++bf;
}
// format low part
if(lo > 0)
{
*bf = '.';
++bf;
s = num;
for(U64 n = lo; n > 0; n /= 10ull)
{
*s = (char)(n % 10ull) + '0';
++s;
}
U64 lead_zero_count = 3 - (U64)(s-num);
for(U64 i = 1; i < lead_zero_count; ++i)
{
*bf = '0';
++bf;
}
for(S64 i = (S64)(s-num)-1; i >= 0; --i)
{
*bf = num[i];
++bf;
}
}
*bf = ' ';
++bf;
// copy units
for(U64 i = 0; units[i] != 0; ++i)
{
@@ -745,14 +745,14 @@ cl = lg; \
++bf;
}
}break;
case 'r':
{
stbsp__flush_cb();
Rng1U64 range = va_arg(va, Rng1U64);
bf += STB_SPRINTF_DECORATE(sprintf)(bf, "[0x%llx, 0x%llx)", range.min, range.max);
bf += STB_SPRINTF_DECORATE(sprintf)(bf, "[0x%llx, 0x%llx)", (unsigned long long)range.min, (unsigned long long)range.max);
}break;
//
// NOTE(rjf): DEBUGGER PROJECT ADDITION ^^^
//-