From 712d93e1c9d589ef68983e5f55b97ea8bf8ea2e6 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 26 Jan 2021 12:01:52 +0100 Subject: Doc: Describe Debugger settings in appropriate sections Link to the "Debugger Settings" section where appropriate. Task-number: QTCREATORBUG-24500 Change-Id: I7e19211c22bf0139678d49e46db3bd2bb04c7260 Reviewed-by: hjk --- .../images/qtcreator-debugger-general-options.png | Bin 17904 -> 19020 bytes .../src/debugger/creator-debugger-common.qdocinc | 5 +++ .../creator-only/creator-debugger-settings.qdocinc | 17 ++++++-- .../debugger/creator-only/creator-debugger.qdoc | 46 ++++++++++++++++++++- 4 files changed, 64 insertions(+), 4 deletions(-) diff --git a/doc/qtcreator/images/qtcreator-debugger-general-options.png b/doc/qtcreator/images/qtcreator-debugger-general-options.png index 8732a076a6..7823c7668d 100644 Binary files a/doc/qtcreator/images/qtcreator-debugger-general-options.png and b/doc/qtcreator/images/qtcreator-debugger-general-options.png differ diff --git a/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc b/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc index a214bd896c..ecd6902492 100644 --- a/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc +++ b/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc @@ -321,6 +321,11 @@ function after pressing \key {Shift+F11}, the \uicontrol {Return Value} pane displays the value returned by the function. + When using GDB, you can specify whether the dynamic or the static type of + objects will be displayed. Select \uicontrol {Use dynamic object type for + display} in the context menu. Keep in mind that choosing the dynamic type + might be slower. + //! [debugger-locals] //! [debugger-expressions] diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdocinc b/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdocinc index 28fe490a02..3b62b68bf6 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdocinc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdocinc @@ -35,15 +35,26 @@ \image qtcreator-debugger-general-options.png + You can customize the appearance and behavior of the debug views, + \l{Specifying Breakpoint Settings}{specify settings for breakpoints}, + and map source paths to target paths. + \section2 Mapping Source Paths To enable the debugger to step into the code and display the source code when using a copy of the source tree at a location different from the one - at which the libraries were built, map the source paths to target paths: + at which the libraries were built, you can map source paths to target + paths. + + To automatically map the source paths to a Qt version that has not been + patched, select \uicontrol {Add Qt Sources} and browse to the location + of the Qt source files. + + To manually map the source paths to target paths: \list 1 - \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Debugger > - \uicontrol General > \uicontrol Add. + \li In \uicontrol {Source Paths Mapping}, select \uicontrol Add to add + an entry to the path list. \li In the \uicontrol {Source path} field, specify the source path in the debug information of the executable as reported by the debugger. \li In the \uicontrol {Target path} field, specify the actual location diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index 723950ef2f..2cc6204458 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -124,6 +124,10 @@ \uicontrol GDB and \uicontrol CDB. For more information, see \l{Specifying Debugger Settings}. + To allow reading the user's default .gdbinit file on debugger startup, + select the \uicontrol {Load .gdbinit file on startup} check box in + GDB settings. For more information, see \l{Specifying GDB Settings}. + \note Starting a C++ program in the debugger can take a long time, typically in the range of several seconds to minutes if complex features are used. @@ -411,6 +415,13 @@ \endlist + By default, a non-responsive GDB process is terminated after 20 seconds. + To increase the timeout in the \uicontrol {GDB timeout} field, select + \uicontrol Tools > \uicontrol Options > \uicontrol Debugger > + \uicontrol GDB. For more information about settings that you can specify + to manage the GDB process, see \l{Specifying GDB Settings} and + \l{Specifying Extended GDB Settings}. + \section3 Using CDB In remote mode, the local CDB process talks to a CDB process that runs on @@ -475,6 +486,10 @@ \li Click \uicontrol OK to start debugging. \endlist + + To specify settings for managing the CDB process, select \uicontrol Tools > + \uicontrol Options > \uicontrol Debugger > \uicontrol CDB. For more + information, see \l{Specifying CDB Settings}. */ @@ -608,6 +623,16 @@ It is also possible to continue executing the program until the current function completes or jump to an arbitrary position in the current function. + \section2 Stepping Into Code + + When using GDB as the debugging backend, you can compress several steps + into one step for less noisy debugging. For more information, see + \l{Specifying GDB Settings}. + + The extended GDB settings provide the option to step backwards in code, + but this option should be used with care, as it is slow and unstable on the + GDB side. For more information, see \l{Specifying Extended GDB Settings}. + \section2 Customizing Debug Views You can change the appearance and behavior of the debug views by specifying @@ -736,6 +761,11 @@ Right-click the view to open a context menu that contains menu items for reloading data and opening files. + To enable the debugger to step into the code and display the source code + when using a copy of the source tree at a location different from the one + at which the libraries were built, you can map source paths to target + paths. For more information, see \l{Mapping Source Paths}. + By default, the \uicontrol {Source Files} view is hidden. \section2 Viewing Disassembled Code @@ -752,6 +782,10 @@ running. Alternatively, click the \inlineimage debugger_singleinstructionmode.png (\uicontrol {Operate by Instruction}) tool button on the debugger tool bar. + By default, GDB shows AT&T style disassembly. To switch to the Intel style, + select \uicontrol Tools > \uicontrol Options > \uicontrol Debugger > + \uicontrol GDB > \uicontrol {Use Intel style disassembly}. + \section2 Viewing and Editing Register State The \uicontrol Registers view displays the current state of the CPU registers. @@ -834,7 +868,7 @@ \QC uses Python scripts to translate raw memory contents and type information data from native debugger backends (GDB, LLDB, and CDB are currently supported) - into the form presented to the user in the \uicontrol {Locals} and + into the form presented to the user in the \uicontrol {Locals} and \uicontrol {Expressions} views. Unlike GDB's @@ -845,6 +879,11 @@ Linux, LLDB on macOS, and CDB on Windows, or any other platform on which at least one of the three supported backends is available. + To use the default GDB pretty printers installed in your system or linked + to the libraries your application uses, select \uicontrol Options > + \uicontrol Debugger > \uicontrol GDB > \uicontrol {Load system GDB pretty + printers}. For more information, see \l{Specifying GDB Settings}. + \section2 Customizing Built-In Debugging Helpers You can have commands executed after built-in debugging helpers have @@ -870,6 +909,11 @@ handle SIGSTOP nostop \endcode + To display a message box as soon as your application receives a signal + during debugging, select \uicontrol Tools > \uicontrol Options > + \uicontrol Debugger > \uicontrol GDB > \uicontrol {Show a message box + when receiving a signal}. + \section2 Adding Custom Debugging Helpers To add debugging helpers for your own types, no compilation is required, -- cgit v1.2.3