From 6f96c6763d7e135c57c2fa092bf938679909dfa5 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 17 Jan 2024 08:25:54 -0500 Subject: [PATCH] Commentary --- docs/guide/simulating.rst | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/guide/simulating.rst b/docs/guide/simulating.rst index 3890fc75a..c4af6115a 100644 --- a/docs/guide/simulating.rst +++ b/docs/guide/simulating.rst @@ -505,21 +505,12 @@ documentation. Runtime Debugging ================= -To debug a Verilated executable, use the standard GNU debugger ``gdb`` or a -similar tool, e.g.: - - .. code-block:: bash - - gdb obj_dir/Vmodel - run {Vmodel_command_arguments} - {segmentation faults} - bt - -Typically you will want to have debugger symbols inserted by the compiler, -assertions enabled in the C library, assertions enabled in the Verilated -library, and the sanitizer enabled to look for bad memory or undefined -operations. (These options slow down the executable, so do this only when -debugging.) To enable these, Verilate with: +To debug a Verilated executable, typically you will want to have debugger +symbols inserted by the compiler, assertions enabled in the C library, +assertions enabled in the Verilated library, and the sanitizer enabled to +look for bad memory or undefined operations. (These options slow down the +executable, so do this only when debugging.) To enable these, Verilate +with: .. code-block:: bash @@ -532,3 +523,13 @@ The :vlopt:`-CFLAGS` and/or :vlopt:`-LDFLAGS` options used here pass the following argument into the generated Makefile for use as compiler or linker options respectively. If you are using your own Makefiles, adapt appropriately to pass the suggested flags to the compiler and linker. + +Once you have a debugging-enabled executable, run it using the the standard +GNU debugger ``gdb`` or a similar tool, and create a backtrace; e.g.: + + .. code-block:: bash + + gdb obj_dir/Vmodel + run {Vmodel_command_arguments} + {segmentation faults} + bt