|
|
|
|
@ -36,20 +36,19 @@ The [src/debuggers/gdb](https://github.com/mosra/magnum/tree/master/src/debugger
|
|
|
|
|
directory contains [GDB pretty printers](https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html) |
|
|
|
|
for important types in the @ref Magnum and @ref Animation namespace and most |
|
|
|
|
@ref Math classes. Contents of this directory are also copied into |
|
|
|
|
@cb{.sh} ${CMAKE_PREFIX_PATH}/share/magnum/debuggers/gdb @ce during |
|
|
|
|
installation, where the prefix is usually `/usr` or `/usr/local`. |
|
|
|
|
@cb{.sh} ${CMAKE_INSTALL_PREFIX}/share/gdb/python @ce during installation, |
|
|
|
|
where the prefix is usually `/usr` or `/usr/local`. |
|
|
|
|
|
|
|
|
|
Easiest is to auto-load them on startup, by putting the following snippet into |
|
|
|
|
the user-specific `~/.gdbinit` or `~/.config/gdb/gdbinit` file: |
|
|
|
|
|
|
|
|
|
@code{.py} |
|
|
|
|
python |
|
|
|
|
import sys |
|
|
|
|
# Adapt this path to the actual install location (or Magnum's src/ directory). |
|
|
|
|
# Not pointing to the debuggers subdirectory here because it could conflict |
|
|
|
|
# with the built-in GDB module. |
|
|
|
|
sys.path.insert(0, '/usr/share') |
|
|
|
|
from magnum.debuggers.gdb import register_magnum_printers |
|
|
|
|
# If not installing into /usr, you'll need to insert the install location (or |
|
|
|
|
# the src/debuggers/gdb/ directory inside Magnum sources) to Python's path: |
|
|
|
|
#import sys |
|
|
|
|
#sys.path.insert(0, '/magnum/install/prefix/share/gdb/python') |
|
|
|
|
from magnum import register_magnum_printers |
|
|
|
|
register_magnum_printers(gdb.current_objfile()) |
|
|
|
|
end |
|
|
|
|
@endcode |
|
|
|
|
@ -71,8 +70,9 @@ See also @ref corrade-debuggers-gdb-pretty-printers "Corrade GDB pretty printers
|
|
|
|
|
|
|
|
|
|
The [src/debuggers/natvis](https://github.com/mosra/magnum/tree/master/src/debuggers/natvis) |
|
|
|
|
directory contains MSVC natvis files for important @ref Math classes. Contents |
|
|
|
|
of this directory are also copied into @cb{.sh} ${CMAKE_PREFIX_PATH}/share/magnum/debuggers/natvis @ce |
|
|
|
|
during installation. |
|
|
|
|
of this directory are also copied into |
|
|
|
|
@cb{.sh} ${CMAKE_INSTALL_PREFIX}/share/magnum/debuggers/natvis @ce during |
|
|
|
|
installation. |
|
|
|
|
|
|
|
|
|
Easiest way to use is to copy them to the user-specific Natvis directory for |
|
|
|
|
given version of Visual Studio, such as @cb{.bat} %USERPROFILE%/Documents/Visual Studio 2022/Visualizers @ce. |
|
|
|
|
|