feat(debug): enhance linked list demo with item count and message output
feat(debug): improve GDB pretty-printer support for structured types fix(debug): update dump_debug_graph script to reflect changes in main.cpp feat(visualization): add type hint display to node table visualizer
This commit is contained in:
@@ -28,6 +28,7 @@ module.exports = function (register, lib) {
|
||||
name: sj.sString(),
|
||||
value: sj.sString(),
|
||||
isPointer: sj.sOptionalProp(sj.sBoolean(), {}),
|
||||
typeHint: sj.sOptionalProp(sj.sString(), {}),
|
||||
});
|
||||
|
||||
var sNode = sj.sOpenObject({
|
||||
@@ -45,6 +46,7 @@ module.exports = function (register, lib) {
|
||||
name: sj.sString(),
|
||||
value: sj.sString(),
|
||||
kind: sj.sOptionalProp(sj.sString(), {}),
|
||||
type: sj.sOptionalProp(sj.sString(), {}),
|
||||
});
|
||||
|
||||
var sData = sj.sOpenObject({
|
||||
@@ -293,6 +295,7 @@ module.exports = function (register, lib) {
|
||||
bodyBg: "#252526",
|
||||
fieldName: "#9cdcfe",
|
||||
fieldValue: "#d4d4d4",
|
||||
fieldType: "#7a7a7a",
|
||||
pointerValue: "#ce9178",
|
||||
edge: "#8a8a8a",
|
||||
viewportBg: "#1e1e1e",
|
||||
@@ -304,6 +307,7 @@ module.exports = function (register, lib) {
|
||||
bodyBg: "#ffffff",
|
||||
fieldName: "#0451a5",
|
||||
fieldValue: "#1a1a1a",
|
||||
fieldType: "#8a8a8a",
|
||||
pointerValue: "#a31515",
|
||||
edge: "#6b6b6b",
|
||||
viewportBg: "#fafafa",
|
||||
@@ -532,13 +536,23 @@ module.exports = function (register, lib) {
|
||||
|
||||
n.fields.forEach(function (f) {
|
||||
var row = el("tr");
|
||||
if (f.typeHint) row.title = f.name + ": " + f.typeHint + " = " + f.value;
|
||||
var nameCell = el("td", {
|
||||
padding: "2px 8px",
|
||||
color: colors.fieldName,
|
||||
whiteSpace: "nowrap",
|
||||
height: ROW_HEIGHT - 4 + "px",
|
||||
});
|
||||
nameCell.textContent = f.name;
|
||||
nameCell.appendChild(document.createTextNode(f.name));
|
||||
if (f.typeHint) {
|
||||
var typeSpan = el("span", {
|
||||
color: colors.fieldType,
|
||||
fontSize: "10px",
|
||||
marginLeft: "5px",
|
||||
});
|
||||
typeSpan.textContent = " " + f.typeHint;
|
||||
nameCell.appendChild(typeSpan);
|
||||
}
|
||||
var valueCell = el("td", {
|
||||
padding: "2px 8px",
|
||||
color: f.isPointer ? colors.pointerValue : colors.fieldValue,
|
||||
@@ -579,7 +593,7 @@ module.exports = function (register, lib) {
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
});
|
||||
badge.title = r.name + " = " + r.value;
|
||||
badge.title = r.name + (r.type ? " : " + r.type : "") + " = " + r.value;
|
||||
badge.textContent = r.name + (matched ? "" : " (" + r.value + ")");
|
||||
world.appendChild(badge);
|
||||
var line = null;
|
||||
@@ -850,7 +864,7 @@ module.exports = function (register, lib) {
|
||||
if (rb.line) rb.line.style.display = targetId ? "" : "none";
|
||||
if (!targetId) return;
|
||||
var redirected = targetId !== rb.root.value;
|
||||
rb.badge.title = rb.root.name + " = " + rb.root.value +
|
||||
rb.badge.title = rb.root.name + (rb.root.type ? " : " + rb.root.type : "") + " = " + rb.root.value +
|
||||
(redirected ? " (inside collapsed " + targetId + ")" : "");
|
||||
var target = byId[targetId];
|
||||
var stackIndex = badgesPerTarget[targetId] || 0;
|
||||
|
||||
Reference in New Issue
Block a user