Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Chicken out of list parsing when an element can't be read.
Change-Id: Ia0c487c53984ee29ba1b561edc040aa1447493a6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Currently only the previous from/to pair, but can be extended
by codec state.
Task-number: QTCREATORBUG-24462
Change-Id: I3d101e74d1fef65bb75ddaab1dc2eaf77201dcde
Reviewed-by: David Schulz <david.schulz@qt.io>
QString::begin/end may be null in Qt 6.
Fixes: QTCREATORBUG-25018
Change-Id: If50cb79c58096d5fa68e494e33bea131063968fb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Apparently, the values are sometimes transmitted without leading zeroes,
so insert them if they are missing.
This fixes a crash in the QV4 dumper test.
Change-Id: I7434c9c090524eecbf5c50e69ad49f5a6ca81e1a
Reviewed-by: hjk <hjk@qt.io>
When using GDB through a script, additional messages can be printed
before the line reporting the version number, and some digits of those
messages could be interpreted as a version value, leading to wrong
version detection.
This patch searches for the "GNU gdb" tag first, so the correct
line is evaluated.
Change-Id: Ief64a056a20a963ad01c44941777361abcce00fc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Currently, the gdb target ABI is determined by running
`gdb -version`, which for recent gdb's does not reproduce
the target ABI string -- yet this string is searched in
the output. This obviously fails, and qtcreator uses a
fallback behavior, that is not suitable when using gdb
for debugging on targets (like avr microcontrollers).
With this change, QtCreator calls `gdb --configuration`
if that is supported by gdb and extracts `<string> from
`--target=<string>` in the output.
For older versions of gdb (which do not support the
`--configuration` flag, but still have the target
information in the output of `--version`, the output of
`--version` is parsed.
If both methods fail, no ABI is set for gdb.
Change-Id: Ib406f6700b63e2cedb46bd4ec8cc0d215677ecdc
Reviewed-by: Michael Kopp <kopp.michael@yahoo.de>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
GDB version on SLES is reported as
GNU gdb (GDB; SUSE Linux Enterprise XX) Y.Z.W
So, the content between parentheses must be skipped, otherwise
the wrong digits are parsed.
Change-Id: I05eb1373bc6558dfe088c1328142ff21d48f5591
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
At least LLDB reports sometimes out of scope variables as such.
Report them as "out of scope" instead of letting the common
struct dumper fail and report its generic "not available".
Change-Id: Ic9d0d196894ef811fab8e6a586bf55d80cd02e45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.
Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Easier to coordinate between dumpers and watchhandler
Change-Id: Ide191a5786dc04ef22c3e9c8b0bec39f8f8c0f1d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... into a string specifying a kind of encoding (utf8, latin1),
an optional bytesize (2-byte integers, 4-byte integers) and a
flag whether the displayed value should get "..." around it.
Scales better than adding an enum value for each new combination.
Change-Id: Iffcb1e2f148f12da96e165559a976bd34026c649
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Python doesn't like lowercase "true" or "false", so we have to
convert those to int before we send the command.
Change-Id: Id30ebbb0714cae23b030c78eec5e59378ac467bb
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This makes sure we construct QJsonValues from bools, rather than
casting them to ints.
Change-Id: Ibc3e5322460e5bec153d80024219ba7935268d68
Task-number: QTCREATORBUG-15395
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
- Remove old experimental native mixed approach.
- Move some common stack parsing to Stackhandler.
- Mark gdbbridge.py debug output explicitly to remove it
from actual reponse handling
New native mixed needs QtDeclarative changes and
QTC_DEBUGGER_NATIVE_MIXED=1 for now.
Change-Id: I09eed1da51cea878636d36756015b7bfaed34203
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The V4 debug service expects correct JSON as input and gdb, lldb, and
pdb expect Python object literals. There is a subset of JSON that is
also valid as Python object literals and we use that for the protocol
spoken with gdb, lldb, and pdb. The strings passed to CDB are tunneled
through JSON strings and converted to byte arrays before sending them.
Change-Id: I87319b5450e5c3c3b29c565b75cddaa612767611
Task-number: QTCREATORBUG-14931
Reviewed-by: hjk <hjk@theqtcompany.com>
- Move DisplayFormat from watchhandler.h to debuggerprotocol.h
- Add/update a few comments about the use of the protocol enums
- Make decodeData take a DebuggerEncoding instead of an int
Change-Id: I50bed70a5da2e94da46e894bf9136bc14c9a1b23
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... when passing data from the dumpers to the GUI. This reduces
the need to guess whether a value contains a translatable string.
Change-Id: I5e2210b8d028bd71f0087a2ba5c7c5b04331b882
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... instead of manually set up JSON. It's more concise, and paves the
way to use per-command callbacks as in the other engines.
Change-Id: Ib5cf9c9b882ec0ec87acd7c1ceb938d3ee60346b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>