Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
melnikga committed Apr 28, 2024
1 parent 343355d commit 69135cf
Showing 1 changed file with 59 additions and 52 deletions.
111 changes: 59 additions & 52 deletions components/Tracer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,60 +385,67 @@ function DebugInfoTab({
</tr>
</thead>
<tbody>
{currentCallstackEntry?.map((callstackEntry, index) => (
<tr
key={index}
className="relative border-b border-gray-300 dark:border-black-500 text-gray-400 dark:text-gray-600"
>
{debugMode === ProgramDebugMode.Execution && (
<>
<td className="py-1 px-2 min-w-16">
{callstackEntry.fp}
{currentCallstackEntry?.map((callstackEntry, index) => {
if (
callstackEntry.fn_name ||
debugMode === ProgramDebugMode.Execution
) {
return (
<tr
key={index}
className="relative border-b border-gray-300 dark:border-black-500 text-gray-400 dark:text-gray-600"
>
{debugMode === ProgramDebugMode.Execution && (
<>
<td className="py-1 px-2 min-w-16">
{callstackEntry.fp}
</td>
<td className="py-1 px-2 w-16">
{callstackEntry.call_pc}
</td>
<td className="py-1 px-2 w-16">
{callstackEntry.ret_pc}
</td>
</>
)}
<td className="py-1 px-2 text-left w-64 break-all">
{callstackEntry.fn_name}
</td>
<td className="py-1 px-2 w-16">
{callstackEntry.call_pc}
<td className="py-1 px-2 text-left w-full">
{callstackEntry?.params?.map(
(
param: { type_name: string; value: number[] },
index,
array,
) => (
<div key={index} className="inline-block">
<div
data-tip={param.type_name}
data-for={param.type_name}
className="inline-block cursor-pointer hover:text-black-700 transition-colors ease-out delay-0 break-normal"
>
{param.value.length > 1
? `[${param.value.join(', ')}]`
: param.value[0]}

<ReactTooltip
className="tooltip"
id={param.type_name}
effect="solid"
uuid="buttonTooltip"
/>
</div>
<span>
{index < array.length - 1 ? ',\u00A0' : ''}
</span>
</div>
),
)}
</td>
<td className="py-1 px-2 w-16">
{callstackEntry.ret_pc}
</td>
</>
)}
<td className="py-1 px-2 text-left w-64 break-all">
{callstackEntry.fn_name}
</td>
<td className="py-1 px-2 text-left w-full">
{callstackEntry?.params?.map(
(
param: { type_name: string; value: number[] },
index,
array,
) => (
<div key={index} className="inline-block">
<div
data-tip={param.type_name}
data-for={param.type_name}
className="inline-block cursor-pointer hover:text-black-700 transition-colors ease-out delay-0 break-normal"
>
{param.value.length > 1
? `[${param.value.join(', ')}]`
: param.value[0]}

<ReactTooltip
className="tooltip"
id={param.type_name}
effect="solid"
uuid="buttonTooltip"
/>
</div>
<span>
{index < array.length - 1 ? ',\u00A0' : ''}
</span>
</div>
),
)}
</td>
</tr>
))}
</tr>
)
}
})}
</tbody>
</table>
</dd>
Expand Down

0 comments on commit 69135cf

Please sign in to comment.