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