report when there's no information for an address

This commit is contained in:
Corwin 2024-04-20 13:30:14 +01:00
parent 8352d20d73
commit 1adf31d140
No known key found for this signature in database

View file

@ -139,8 +139,19 @@ function BacktraceAddressInfo({
address: number;
info: AddressInfo[] | undefined;
}) {
const formattedAddress = `0x${address.toString(16).padStart(8, "0")}`;
if (!info) {
return <code>0x{address.toString(16).padStart(8, "0")}</code>;
return <code>{formattedAddress}</code>;
}
if (info.length === 0) {
return (
<BacktraceAddressLine>
<li>
<code>(no info) {formattedAddress}</code>
</li>
</BacktraceAddressLine>
);
}
function FunctionName({
@ -156,6 +167,8 @@ function BacktraceAddressInfo({
return functionName;
}
console.log(info);
return (
<BacktraceAddressLine>
{info.map((x, idx) => (