summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2023-03-29 13:40:41 +0200
committerTim Jenssen <tim.jenssen@qt.io>2023-03-29 13:42:04 +0200
commit26365f34d44a55db5847e862ae10122c0a7ad4a4 (patch)
tree8f735e0e9d3df738ee030d2fb2e24e8836ee71ae /doc
parentbcd74a2fad243fc7683fd98633b91da4e394c0e8 (diff)
parent81a5e2143cb7728316e02d24925f853e2db2099a (diff)
downloadqt-creator-26365f34d44a55db5847e862ae10122c0a7ad4a4.tar.gz
Merge remote-tracking branch 'origin/10.0' into qds/dev
Change-Id: Idd5eac05f3506387e5f1884e22cc2c902032bbe1
Diffstat (limited to 'doc')
-rw-r--r--doc/qtcreator/images/qcreator-debugger-select-start-address.webpbin0 -> 2672 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-debugger-disassembler-view.webpbin0 -> 12290 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-debugger-expressions.pngbin42246 -> 0 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-debugger-expressions.webpbin0 -> 1480 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-debugger-log-view.webpbin0 -> 8288 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-debugger-memory-editor.webpbin0 -> 9700 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-debugger-new-evaluated-expression.webpbin0 -> 3992 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-debugger-peripheral-registers-view.webpbin0 -> 2414 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-debugger-registers-view.webpbin0 -> 7482 bytes
-rw-r--r--doc/qtcreator/src/debugger/creator-debug-views.qdoc106
-rw-r--r--doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc2
-rw-r--r--doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc192
-rw-r--r--doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc2
-rw-r--r--doc/qtcreator/src/qtcreator-toc.qdoc2
14 files changed, 247 insertions, 57 deletions
diff --git a/doc/qtcreator/images/qcreator-debugger-select-start-address.webp b/doc/qtcreator/images/qcreator-debugger-select-start-address.webp
new file mode 100644
index 0000000000..2e24b71085
--- /dev/null
+++ b/doc/qtcreator/images/qcreator-debugger-select-start-address.webp
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-debugger-disassembler-view.webp b/doc/qtcreator/images/qtcreator-debugger-disassembler-view.webp
new file mode 100644
index 0000000000..7fcf5a13f1
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-debugger-disassembler-view.webp
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-debugger-expressions.png b/doc/qtcreator/images/qtcreator-debugger-expressions.png
deleted file mode 100644
index ef9e972071..0000000000
--- a/doc/qtcreator/images/qtcreator-debugger-expressions.png
+++ /dev/null
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-debugger-expressions.webp b/doc/qtcreator/images/qtcreator-debugger-expressions.webp
new file mode 100644
index 0000000000..2a14cce5d5
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-debugger-expressions.webp
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-debugger-log-view.webp b/doc/qtcreator/images/qtcreator-debugger-log-view.webp
new file mode 100644
index 0000000000..ce3e265365
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-debugger-log-view.webp
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-debugger-memory-editor.webp b/doc/qtcreator/images/qtcreator-debugger-memory-editor.webp
new file mode 100644
index 0000000000..ef51b1dd29
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-debugger-memory-editor.webp
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-debugger-new-evaluated-expression.webp b/doc/qtcreator/images/qtcreator-debugger-new-evaluated-expression.webp
new file mode 100644
index 0000000000..1934a05372
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-debugger-new-evaluated-expression.webp
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-debugger-peripheral-registers-view.webp b/doc/qtcreator/images/qtcreator-debugger-peripheral-registers-view.webp
new file mode 100644
index 0000000000..34c8813108
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-debugger-peripheral-registers-view.webp
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-debugger-registers-view.webp b/doc/qtcreator/images/qtcreator-debugger-registers-view.webp
new file mode 100644
index 0000000000..05b08e9668
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-debugger-registers-view.webp
Binary files differ
diff --git a/doc/qtcreator/src/debugger/creator-debug-views.qdoc b/doc/qtcreator/src/debugger/creator-debug-views.qdoc
index d1c2adff5f..78ee139e3f 100644
--- a/doc/qtcreator/src/debugger/creator-debug-views.qdoc
+++ b/doc/qtcreator/src/debugger/creator-debug-views.qdoc
@@ -374,6 +374,35 @@
function after pressing \key {Shift+F11}, the \uicontrol {Return Value}
pane displays the value returned by the function.
+ You can expand the view contents to check that your application sets a
+ local value correctly.
+
+ \if defined(qtcreator)
+ \section1 Locals View Actions
+
+ Right-click the \uicontrol Locals view to select the following actions:
+
+ //! [0]
+ \list
+ \li Add and remove expression evaluators
+ \li Change value display format
+ \li Expand and collapse view contents
+ \li Copy view contents or expression values to the clipboard
+ \li Open view contents in an editor
+ \li Open memory editor
+ \li Set data breakpoints
+ \li Use \l{Using Debugging Helpers}{debugging helpers}
+ \li Show tooltips in the \uicontrol Locals view when debugging
+ \li Dereference pointers automatically
+ \li Sort members of classes and structs alphabetically
+ \li Use dynamic object type for display
+ \li Set \l{Debugger Preferences}{debugger preferences}
+ \endlist
+ //! [0]
+ \endif
+
+ \section1 Selecting Object Type for Display
+
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
@@ -392,45 +421,88 @@
\title Evaluating Expressions
To compute values of arithmetic expressions or function calls, use
- expression evaluators in the \uicontrol Expressions view. To insert a new
- expression evaluator, either double-click on an empty part of the
- \uicontrol {Expressions} or \uicontrol {Locals} view, or select
- \uicontrol {Add New Expression Evaluator} from the context menu, or drag and
- drop an expression from the code editor.
+ expression evaluators in the \uicontrol Expressions view.
+
+ You can examine static variables that the debuggers don't pick up as
+ \e {local variables}. For example, if you define
+ \c {static int staticVar = 42;} in a source file and then add \c staticVar
+ as an evaluated expression, you should see \e 42 in the view when the
+ debugger stops in the source file.
+
+ \image qtcreator-debugger-expressions.webp {Expressions view}
+
+ \section1 Adding Expression Evaluators
+
+ To add expression evaluators, drag an expression from the code editor
+ to the \uicontrol Expressions view.
+
+ You can also:
+
+ \list
+ \li Double-click in the \uicontrol {Expressions} or
+ \l {Local Variables and Function Parameters}{Locals} view.
+ \li Select \uicontrol {Add New Expression Evaluator} from the context
+ menu.
+ \endlist
+
+ Enter the expression in the \uicontrol {New Evaluated Expression} dialog:
+
+ \image qtcreator-debugger-new-evaluated-expression.webp {New Evaluated Expression dialog}
- \image qtcreator-debugger-expressions.png {Expressions view}
+ \omit
+ ## Visible in the context menu, but does not currently work.
+
+ To insert widgets into expression evaluators, select a
+ widget in the debugged application and then select
+ \uicontrol {Select Widget to Add into Expression Evaluator}
+ in the context menu.
+ \endomit
+
+ The set of evaluated expressions is saved in your session.
\note Expression evaluators are powerful, but slow down debugger operation
- significantly. It is advisable to not use them excessively, and to remove
- unneeded expression evaluators as soon as possible.
+ significantly. Use them sparingly and remove them when you no longer need
+ them.
Expression evaluators are re-evaluated whenever the current frame changes.
- Note that functions used in the expressions are called each time, even if
+ The functions used in the expressions are called each time, even if
they have side-effects.
+ \if defined(qtcreator)
+ \section1 Expressions View Actions
+
+ Right-click the \uicontrol Expressions view to select the following actions:
+
+ \include creator-debug-views.qdoc 0
+ \endif
+
+ \section1 JavaScript Expressions
+
The QML debugger can evaluate JavaScript expressions.
\if defined(qtcreator)
+
+ \section1 C and C++ Expressions
+
GDB, LLDB and CDB support the evaluation of simple C and C++ expressions.
Functions can be called only if they are actually compiled into the debugged
- executable or a library used by the executable. Most notably, inlined
+ executable or a library used by the executable. Inlined
functions such as most \c{operator[]} implementations of standard containers
are typically \e{not} available.
- When using GDB or LLDB as backend, a special ranged syntax can be used to
+ When using GDB or LLDB as backend, you can use a special ranged syntax to
display multiple values with one expression. A sub-expression of form
\c{foo[a..b]} is split into a sequence of individually evaluated expressions
\c{foo[a], ..., foo[b]}.
- Compound variables of struct or class type are displayed as expandable in
- the view. Expand entries to show all members. Together with the display of
- value and type, you can examine and traverse the low-level layout of object
- data.
+ You can expand compound variables of struct or class type to show their
+ members. As you also see the variable value and type, you can examine and
+ traverse the low-level layout of object data.
GDB and LLDB, and therefore \QC's debugger, also work for optimized
builds on Linux and \macos. Optimization can lead to re-ordering
of instructions or removal of some local variables, causing the
- \uicontrol {Locals} and \uicontrol {Expressions} view to show
+ \uicontrol {Locals} and \uicontrol {Expressions} views to show
unexpected data.
The debug information from GCC does not include enough
@@ -441,8 +513,6 @@
\uicontrol {not in scope}. Not all uninitialized objects,
however, can be recognized as such.
- \note The set of evaluated expressions is saved in your session.
-
\section1 Inspecting Basic Qt Objects
The most powerful feature of the debugger is that the \uicontrol {Locals}
diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc
index 334e3c86a6..ab0aff0f54 100644
--- a/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc
+++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger-settings.qdoc
@@ -18,7 +18,7 @@
\l{Specifying Breakpoint Settings}{specify settings for breakpoints},
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
output is sent to the system log. To override this behavior, select
the \uicontrol {Force logging to console} check box. This sets
diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc
index 1009f765ab..a5e49e3749 100644
--- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc
+++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc
@@ -632,9 +632,11 @@
\row
\li Peripheral Registers
\li View the current state of peripheral registers.
- \li
+ \li \l {Peripheral Registers}
\row
- \li Debugger Log
+ \li Global Debugger Log
+
+ Debugger Log
\li View debug output to find out why the debugger does not work.
The log view acts as a console, so you can send the contents
@@ -642,7 +644,7 @@
native debugger.
\li \l{Troubleshooting Debugger}
- \l {Directly Interacting with Native Debuggers}
+ \l {Debugger Log}
\row
\li Disassembler
\li View disassembled code for the current function.
@@ -653,6 +655,9 @@
\li \l {Working in Edit Mode}
\endtable
+ \note The \uicontrol Views menu shows some views only while you are
+ debugging.
+
\section1 Managing Debug Views
When you are not debugging, the \uicontrol Debug mode shows the
@@ -1003,42 +1008,141 @@
/*!
\page creator-registers-view.html
\previouspage creator-expressions-view.html
- \nextpage creator-debugger-log-view.html
+ \nextpage creator-peripheral-registers-view.html
\title Viewing and Editing Register State
- The \uicontrol Registers view displays the current state of the CPU registers.
- Depending on the CPU type, there will be different registers available. The
- values of registers that recently have changed are highlighted in red and empty
- register values as well as leading zeroes are grayed out.
+ \e {Machine code} consists of machine language instructions that make the CPU
+ perform tasks, such as load or store, on units of data in the CPU's registers
+ or memory.
+
+ The \uicontrol Registers view displays the current state of general-purpose
+ and special-purpose CPU registers. The available registers depend on the CPU
+ type.
+
+ \image qtcreator-debugger-registers-view.webp {Registers view}
+
+ You can view register values when the application stops. Double-click
+ register values to edit them.
+
+ The values of registers that recently changed are highlighted in red. Empty
+ register values and leading zeroes are grayed out.
+
+ Right-click column headers to show and hide the \uicontrol Name and
+ \uicontrol Value columns in the view.
+
+ Right-click the view to select the following actions:
+
+ \list
+ \li Reload register list.
+ \li Open \l {Examining Memory}{Memory Editor} at the selected value.
+ \li Open the \l {Viewing Disassembled Code}{Disassembler} view.
+ \li Display a value in hexadecimal, decimal, octal, or binary format.
+ \li Set \l{Debugger Preferences}{debugger preferences}.
+ \endlist
+
+ By default, the \uicontrol Registers view is hidden. To show it, select it in
+ \uicontrol Views on the debugger toolbar.
- In addition it is possible to edit the content of registers while the application is
- stopped. This applies to both General-purpose and Special-purpose registers.
- Registers can be edited in the standard condensed view or in their particular parts
- if the register is displayed expanded.
+ \section1 Examining Memory
- By default, the \uicontrol Registers view is hidden.
+ You can examine memory in many formats, independently of the application's
+ data types.
+
+ To open the memory editor, select a value \uicontrol Registers view,
+ and then select \uicontrol {Open Memory Editor at <value>} or
+ \uicontrol {Open Memory View at <value>} in the context menu:
+
+ \image qtcreator-debugger-memory-editor.webp {Memory Editor}
+
+ Hover the mouse pointer on a value to see details as a tooltip.
+
+ Right-click a value to:
+
+ \list
+ \li Copy the selection in ASCII or hexadecimal format.
+ \li Set a data breakpoint on the selection.
+ \li Jump to the selected address in the current data view or a new one.
+ \endlist
*/
/*!
- \page creator-debugger-log-view.html
+ \page creator-peripheral-registers-view.html
\previouspage creator-registers-view.html
+ \nextpage creator-debugger-log-view.html
+
+ \title Peripheral Registers
+
+ The \uicontrol {Peripheral Registers} view displays the current state of
+ peripheral devices, such as a mouse, keyboard, display, printer, or USB
+ drive. Applications write registers to send information to the device and
+ read them to get information from the device. To read registers in a
+ peripheral device, the application accesses its I/O addresses with a load
+ or store instruction that the CPU issues.
+
+ \image qtcreator-debugger-peripheral-registers-view.webp {Peripheral Registers view}
+
+ The \uicontrol Access column shows whether the register is read-and-write
+ (\uicontrol RW), read-only (\uicontrol RO), or write-only (\uicontrol WO).
+ \uicontrol N/A means that the access type is not available.
+
+ Right-click column headers to show and hide columns in the view.
+
+ Right-click the view to select the following actions:
+
+ \list
+ \li View register groups.
+ \li Set \l{Debugger Preferences}{debugger preferences}.
+ \endlist
+
+ By default, the \uicontrol {Peripheral Registers} view is hidden. To show it,
+ select it in \uicontrol Views on the debugger toolbar.
+*/
+
+/*!
+ \page creator-debugger-log-view.html
+ \previouspage creator-peripheral-registers-view.html
\nextpage creator-disassembler-view.html
- \title Directly Interacting with Native Debuggers
+ \title Debugger Log
+
+ You can view debug output in the \uicontrol {Debugger Log} view to
+ \l {Debugger Does Not Work}{troubleshoot the debugger}.
+
+ \image qtcreator-debugger-log-view.webp {Debugger Log view}
- In some cases, it is convenient to directly interact with the command line
- of the native debugger. In \QC, you can use the left pane of the
- \uicontrol {Debugger Log} view for that purpose. When you press
- \key {Ctrl+Enter}, the contents of the line under the text cursor are sent
- 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
- \uicontrol {Debugger Log} view.
+ If debug output is sent to the system log, select \uicontrol Edit >
+ \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
handle the task. For example, instead of using the GDB
\c print command from the command line, you can evaluate an expression in
- the \uicontrol {Expressions} view.
+ the \l {Evaluating Expressions}{Expressions} view.
*/
/*!
@@ -1048,22 +1152,38 @@
\title Viewing Disassembled Code
- The \uicontrol Disassembler view displays disassembled code for the current
- function.
+ A \e disassembler translates machine language into assembly language for
+ human-readability.
- The \uicontrol Disassembler view is useful for low-level commands for checking
- single instructions, such as \uicontrol {Step Into} and \uicontrol {Step Over}.
- By default, the \uicontrol Disassembler view is hidden.
+ The \uicontrol Disassembler view displays disassembled code for the current
+ function. It is useful for low-level commands for checking single
+ instructions, such as \uicontrol {Step Into} and \uicontrol {Step Over}.
- 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.
+ \image qtcreator-debugger-disassembler-view.webp {Disassembler view}
By default, GDB shows AT&T style disassembly. To switch to the Intel style,
select \uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
\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}
*/
/*!
@@ -1210,7 +1330,7 @@
The custom debugging helpers will be automatically picked up from
\c personaltypes.py when you start a debugging session in \QC or select
\uicontrol {Reload Debugging Helpers} from the context menu of the
- \uicontrol {Debugger Log} view.
+ \l {Debugger Log} view.
\section2 Debugging Helper Overview
@@ -1756,7 +1876,7 @@
\li In the \uicontrol Debug mode, select \uicontrol View >
\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
contents of the pane to debugger-related questions to the \QC
mailing list (qt-creator@qt-project.org) or paste them to a
@@ -1814,7 +1934,7 @@
\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
linking.
diff --git a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc
index 6a883fe37a..6a1d6a1227 100644
--- a/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc
+++ b/doc/qtcreator/src/howto/creator-only/qtcreator-faq.qdoc
@@ -175,7 +175,7 @@
\b {How do I generate a core file in \QC?}
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
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
diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc
index d514c329c3..e2299cd05c 100644
--- a/doc/qtcreator/src/qtcreator-toc.qdoc
+++ b/doc/qtcreator/src/qtcreator-toc.qdoc
@@ -175,7 +175,7 @@
\li \l{Local Variables and Function Parameters}
\li \l{Evaluating Expressions}
\li \l{Viewing and Editing Register State}
- \li \l{Directly Interacting with Native Debuggers}
+ \li \l{Debugger Log}
\li \l{Viewing Disassembled Code}
\li
\endlist