From eda5bc26f44ee9a6f83dcf8c91f17296d7fc509d Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 12 Feb 2024 14:52:43 +0100 Subject: Move into version control --- src/imgui/misc/debuggers/README.txt | 16 ++++++++ src/imgui/misc/debuggers/imgui.gdb | 12 ++++++ src/imgui/misc/debuggers/imgui.natstepfilter | 31 +++++++++++++++ src/imgui/misc/debuggers/imgui.natvis | 58 ++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+) create mode 100644 src/imgui/misc/debuggers/README.txt create mode 100644 src/imgui/misc/debuggers/imgui.gdb create mode 100644 src/imgui/misc/debuggers/imgui.natstepfilter create mode 100644 src/imgui/misc/debuggers/imgui.natvis (limited to 'src/imgui/misc/debuggers') diff --git a/src/imgui/misc/debuggers/README.txt b/src/imgui/misc/debuggers/README.txt new file mode 100644 index 0000000..3f4ba83 --- /dev/null +++ b/src/imgui/misc/debuggers/README.txt @@ -0,0 +1,16 @@ + +HELPER FILES FOR POPULAR DEBUGGERS + +imgui.gdb + GDB: disable stepping into trivial functions. + (read comments inside file for details) + +imgui.natstepfilter + Visual Studio Debugger: disable stepping into trivial functions. + (read comments inside file for details) + +imgui.natvis + Visual Studio Debugger: describe Dear ImGui types for better display. + With this, types like ImVector<> will be displayed nicely in the debugger. + (read comments inside file for details) + diff --git a/src/imgui/misc/debuggers/imgui.gdb b/src/imgui/misc/debuggers/imgui.gdb new file mode 100644 index 0000000..000ff6e --- /dev/null +++ b/src/imgui/misc/debuggers/imgui.gdb @@ -0,0 +1,12 @@ +# GDB configuration to aid debugging experience + +# To enable these customizations edit $HOME/.gdbinit (or ./.gdbinit if local gdbinit is enabled) and add: +# add-auto-load-safe-path /path/to/imgui.gdb +# source /path/to/imgui.gdb +# +# More Information at: +# * https://sourceware.org/gdb/current/onlinedocs/gdb/gdbinit-man.html +# * https://sourceware.org/gdb/current/onlinedocs/gdb/Init-File-in-the-Current-Directory.html#Init-File-in-the-Current-Directory + +# Disable stepping into trivial functions +skip -rfunction Im(Vec2|Vec4|Strv|Vector|Span)::.+ diff --git a/src/imgui/misc/debuggers/imgui.natstepfilter b/src/imgui/misc/debuggers/imgui.natstepfilter new file mode 100644 index 0000000..6825c93 --- /dev/null +++ b/src/imgui/misc/debuggers/imgui.natstepfilter @@ -0,0 +1,31 @@ + + + + + + + + (ImVec2|ImVec4|ImStrv)::.+ + NoStepInto + + + (ImVector|ImSpan).*::operator.+ + NoStepInto + + + diff --git a/src/imgui/misc/debuggers/imgui.natvis b/src/imgui/misc/debuggers/imgui.natvis new file mode 100644 index 0000000..13b6360 --- /dev/null +++ b/src/imgui/misc/debuggers/imgui.natvis @@ -0,0 +1,58 @@ + + + + + + + {{Size={Size} Capacity={Capacity}}} + + + Size + Data + + + + + + {{Size={DataEnd-Data} }} + + + DataEnd-Data + Data + + + + + + {{x={x,g} y={y,g}}} + + + + {{x={x,g} y={y,g} z={z,g} w={w,g}}} + + + + {{Min=({Min.x,g} {Min.y,g}) Max=({Max.x,g} {Max.y,g}) Size=({Max.x-Min.x,g} {Max.y-Min.y,g})}} + + Min + Max + Max.x - Min.x + Max.y - Min.y + + + + + {{Name {Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d} Hidden {(Hidden)?1:0,d}} + + + -- cgit v1.2.1