summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-07-12 15:24:12 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-07-12 17:19:03 +0200
commit3aa807e1dc3c260ea5fb870c119610fc152b9153 (patch)
tree3a4754c6be12fee58c329795ee06e4050c928228
parent32bef80eec204c22a2b37bb6534bc02d24fa68c7 (diff)
downloadqtlocation-mapboxgl-3aa807e1dc3c260ea5fb870c119610fc152b9153.tar.gz
[core] add LLDB summaries for types we use commonly
-rw-r--r--scripts/lldb-types15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/lldb-types b/scripts/lldb-types
new file mode 100644
index 0000000000..fd6ae33830
--- /dev/null
+++ b/scripts/lldb-types
@@ -0,0 +1,15 @@
+type summary add "mbgl::CanonicalTileID" --summary-string "${var.z%u}/${var.x}/${var.y}"
+type summary add "mbgl::UnwrappedTileID" --summary-string "${var.canonical}+${var.wrap}"
+type summary add "mbgl::OverscaledTileID" --summary-string "${var.canonical}=>${var.overscaledZ%u}"
+
+type summary add -e -x "^mbgl::Range<.+>$" --summary-string "${var.min%d} ⇒ ${var.max%d}"
+type summary add -e -x "^mbgl::Rect<.+>$" --summary-string "Size: ${var.w%d}×${var.h%d} — Offset: ${var.x}/${var.y}"
+type summary add "mbgl::Size" --summary-string "${var.width}/${var.height}"
+type summary add "mbgl::LatLng" --summary-string "${var.lat}/${var.lon}"
+
+type summary add "mbgl::Color" --summary-string "${var.r}, ${var.g}, ${var.b}, ${var.a}"
+
+type summary add -e -x "^mbgl::Point<.+>$" --summary-string "${var.x}/${var.y}"
+type summary add -e -x "^mapbox::geometry::point<.+>$" --summary-string "${var.x}/${var.y}"
+
+type summary add -e -x "^mbgl::optional<.+>$" --python-script "return valobj.GetChildAtIndex(0).GetChildAtIndex(0).GetChildAtIndex(1).GetValue() if valobj.GetChildMemberWithName('__engaged_').unsigned > 0 else '<empty>'"