forked from qt-creator/qt-creator
Doc: Edit docs for Debug mode Disassembler and Debugger Log views
Task-number: QTCREATORBUG-28778 Change-Id: I66ea94881dc1ce3fa8d8fbe3bdd4b59504330738 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
BIN
doc/qtcreator/images/qcreator-debugger-select-start-address.webp
Normal file
BIN
doc/qtcreator/images/qcreator-debugger-select-start-address.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
doc/qtcreator/images/qtcreator-debugger-disassembler-view.webp
Normal file
BIN
doc/qtcreator/images/qtcreator-debugger-disassembler-view.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
doc/qtcreator/images/qtcreator-debugger-log-view.webp
Normal file
BIN
doc/qtcreator/images/qtcreator-debugger-log-view.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
@@ -18,7 +18,7 @@
|
|||||||
\l{Specifying Breakpoint Settings}{specify settings for breakpoints},
|
\l{Specifying Breakpoint Settings}{specify settings for breakpoints},
|
||||||
and map source paths to target paths.
|
and map source paths to target paths.
|
||||||
|
|
||||||
You can view debug output in the \uicontrol {Debugger Log} view.
|
You can view debug output in the \l {Debugger Log} view.
|
||||||
However, in some Linux distributions, such as Arch Linux, debug
|
However, in some Linux distributions, such as Arch Linux, debug
|
||||||
output is sent to the system log. To override this behavior, select
|
output is sent to the system log. To override this behavior, select
|
||||||
the \uicontrol {Force logging to console} check box. This sets
|
the \uicontrol {Force logging to console} check box. This sets
|
||||||
|
|||||||
@@ -642,7 +642,7 @@
|
|||||||
native debugger.
|
native debugger.
|
||||||
\li \l{Troubleshooting Debugger}
|
\li \l{Troubleshooting Debugger}
|
||||||
|
|
||||||
\l {Directly Interacting with Native Debuggers}
|
\l {Debugger Log}
|
||||||
\row
|
\row
|
||||||
\li Disassembler
|
\li Disassembler
|
||||||
\li View disassembled code for the current function.
|
\li View disassembled code for the current function.
|
||||||
@@ -1065,20 +1065,45 @@
|
|||||||
\previouspage creator-registers-view.html
|
\previouspage creator-registers-view.html
|
||||||
\nextpage creator-disassembler-view.html
|
\nextpage creator-disassembler-view.html
|
||||||
|
|
||||||
\title Directly Interacting with Native Debuggers
|
\title Debugger Log
|
||||||
|
|
||||||
In some cases, it is convenient to directly interact with the command line
|
You can view debug output in the \uicontrol {Debugger Log} view to
|
||||||
of the native debugger. In \QC, you can use the left pane of the
|
\l {Debugger Does Not Work}{troubleshoot the debugger}.
|
||||||
\uicontrol {Debugger Log} view for that purpose. When you press
|
|
||||||
\key {Ctrl+Enter}, the contents of the line under the text cursor are sent
|
\image qtcreator-debugger-log-view.webp {Debugger Log view}
|
||||||
directly to the native debugger. Alternatively, you can use the line edit at
|
|
||||||
the bottom of the view. Output is displayed in the right pane of the
|
If debug output is sent to the system log, select \uicontrol Edit >
|
||||||
\uicontrol {Debugger Log} view.
|
\uicontrol Preferences > \uicontrol Debugger > \uicontrol General >
|
||||||
|
\uicontrol {Force logging to console} check box.
|
||||||
|
|
||||||
|
Right-click the view to select the following actions:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li Copy, paste, cut, and delete log contents.
|
||||||
|
\li Undo and redo editing actions.
|
||||||
|
\li Select all log contents.
|
||||||
|
\li Clear log contents.
|
||||||
|
\li Save log contents as a file.
|
||||||
|
\li Log time stamps.
|
||||||
|
\li Reload debugging helpers after \l{Adding Custom Debugging Helpers}
|
||||||
|
{adding custom debugging helpers}.
|
||||||
|
\li Set \l{Debugger Preferences}{debugger preferences}.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\section1 Directly Interacting with Native Debuggers
|
||||||
|
|
||||||
|
You can use the left pane of the \uicontrol {Debugger Log} view to directly
|
||||||
|
interact with the command line of the native debugger.
|
||||||
|
|
||||||
|
Press \key {Ctrl+Enter} to send the contents of the line under the
|
||||||
|
text cursor to the native debugger. Or, enter the command in the
|
||||||
|
\uicontrol Command field. The right side pane of the
|
||||||
|
\uicontrol {Debugger Log} view shows the command output.
|
||||||
|
|
||||||
\note Usually, you do not need this feature because \QC offers better ways to
|
\note Usually, you do not need this feature because \QC offers better ways to
|
||||||
handle the task. For example, instead of using the GDB
|
handle the task. For example, instead of using the GDB
|
||||||
\c print command from the command line, you can evaluate an expression in
|
\c print command from the command line, you can evaluate an expression in
|
||||||
the \uicontrol {Expressions} view.
|
the \l {Evaluating Expressions}{Expressions} view.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -1088,22 +1113,38 @@
|
|||||||
|
|
||||||
\title Viewing Disassembled Code
|
\title Viewing Disassembled Code
|
||||||
|
|
||||||
|
A \e disassembler translates machine language into assembly language for
|
||||||
|
human-readability.
|
||||||
|
|
||||||
The \uicontrol Disassembler view displays disassembled code for the current
|
The \uicontrol Disassembler view displays disassembled code for the current
|
||||||
function.
|
function. It is useful for low-level commands for checking single
|
||||||
|
instructions, such as \uicontrol {Step Into} and \uicontrol {Step Over}.
|
||||||
|
|
||||||
The \uicontrol Disassembler view is useful for low-level commands for checking
|
\image qtcreator-debugger-disassembler-view.webp {Disassembler view}
|
||||||
single instructions, such as \uicontrol {Step Into} and \uicontrol {Step Over}.
|
|
||||||
By default, the \uicontrol Disassembler view is hidden.
|
|
||||||
|
|
||||||
To access the \uicontrol Disassembler view, check
|
|
||||||
\uicontrol Debug > \uicontrol {Operate by Instruction} while the debugger is
|
|
||||||
running. Alternatively, click the
|
|
||||||
\inlineimage icons/debugger_singleinstructionmode.png
|
|
||||||
(\uicontrol {Operate by Instruction}) tool button on the debugger toolbar.
|
|
||||||
|
|
||||||
By default, GDB shows AT&T style disassembly. To switch to the Intel style,
|
By default, GDB shows AT&T style disassembly. To switch to the Intel style,
|
||||||
select \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
|
select \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
|
||||||
\uicontrol GDB > \uicontrol {Use Intel style disassembly}.
|
\uicontrol GDB > \uicontrol {Use Intel style disassembly}.
|
||||||
|
|
||||||
|
To open the \uicontrol Disassembler view:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li Select \uicontrol Debug > \uicontrol {Operate by Instruction} while
|
||||||
|
the debugger is running.
|
||||||
|
\li Select the \inlineimage icons/debugger_singleinstructionmode.png
|
||||||
|
(\uicontrol {Operate by Instruction}) tool button on the debugger
|
||||||
|
toolbar.
|
||||||
|
\li In the \l {Viewing and Editing Register State}{Registers} view,
|
||||||
|
select a value, and then select \uicontrol {Open Disassembler at <value>}
|
||||||
|
in the context menu.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\section1 Starting Disassembler
|
||||||
|
|
||||||
|
To start a disassembler from the \uicontrol Registers view, select
|
||||||
|
\uicontrol {Open Disassembler} and set the disassembler address:
|
||||||
|
|
||||||
|
\image qcreator-debugger-select-start-address.webp {Select Start Address dialog}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -1250,7 +1291,7 @@
|
|||||||
The custom debugging helpers will be automatically picked up from
|
The custom debugging helpers will be automatically picked up from
|
||||||
\c personaltypes.py when you start a debugging session in \QC or select
|
\c personaltypes.py when you start a debugging session in \QC or select
|
||||||
\uicontrol {Reload Debugging Helpers} from the context menu of the
|
\uicontrol {Reload Debugging Helpers} from the context menu of the
|
||||||
\uicontrol {Debugger Log} view.
|
\l {Debugger Log} view.
|
||||||
|
|
||||||
\section2 Debugging Helper Overview
|
\section2 Debugging Helper Overview
|
||||||
|
|
||||||
@@ -1796,7 +1837,7 @@
|
|||||||
|
|
||||||
\li In the \uicontrol Debug mode, select \uicontrol View >
|
\li In the \uicontrol Debug mode, select \uicontrol View >
|
||||||
\uicontrol Views > \uicontrol {Debugger Log} to open the
|
\uicontrol Views > \uicontrol {Debugger Log} to open the
|
||||||
\uicontrol {Debugger Log} view. Browse the contents of the pane on
|
\l {Debugger Log} view. Browse the contents of the pane on
|
||||||
the right hand side to find out what went wrong. Always attach the
|
the right hand side to find out what went wrong. Always attach the
|
||||||
contents of the pane to debugger-related questions to the \QC
|
contents of the pane to debugger-related questions to the \QC
|
||||||
mailing list (qt-creator@qt-project.org) or paste them to a
|
mailing list (qt-creator@qt-project.org) or paste them to a
|
||||||
@@ -1854,7 +1895,7 @@
|
|||||||
|
|
||||||
\section2 Disabling Incremental Linking
|
\section2 Disabling Incremental Linking
|
||||||
|
|
||||||
Incremental linking can affect debugging. If the debugger log has
|
Incremental linking can affect debugging. If the \l {Debugger Log} view shows
|
||||||
the \e {Unable to verify checksum of module} message, disable incremental
|
the \e {Unable to verify checksum of module} message, disable incremental
|
||||||
linking.
|
linking.
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
\b {How do I generate a core file in \QC?}
|
\b {How do I generate a core file in \QC?}
|
||||||
|
|
||||||
To trigger the GDB command that generates a core file while debugging,
|
To trigger the GDB command that generates a core file while debugging,
|
||||||
select \uicontrol View > \uicontrol Views > \uicontrol {Debugger Log}.
|
select \uicontrol View > \uicontrol Views > \l {Debugger Log}.
|
||||||
In the \uicontrol Command field, type \c gcore and press \key Enter. The
|
In the \uicontrol Command field, type \c gcore and press \key Enter. The
|
||||||
core file is created in the current working directory. You can specify
|
core file is created in the current working directory. You can specify
|
||||||
another location for the file, including a relative or absolute path, as an
|
another location for the file, including a relative or absolute path, as an
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
\li \l{Local Variables and Function Parameters}
|
\li \l{Local Variables and Function Parameters}
|
||||||
\li \l{Evaluating Expressions}
|
\li \l{Evaluating Expressions}
|
||||||
\li \l{Viewing and Editing Register State}
|
\li \l{Viewing and Editing Register State}
|
||||||
\li \l{Directly Interacting with Native Debuggers}
|
\li \l{Debugger Log}
|
||||||
\li \l{Viewing Disassembled Code}
|
\li \l{Viewing Disassembled Code}
|
||||||
\li
|
\li
|
||||||
\endlist
|
\endlist
|
||||||
|
|||||||
Reference in New Issue
Block a user