In the newest version of LLDB, they remove anonymous and inline
namespaces from their display name, which breaks all debugger helper
code on Macs with the newest version of Xcode, since Qt Creator logic
determines libc++ vs. libstdc++ by the presence of the "__1" inline
namespace.
Change-Id: I139d0654ffbc9dec2e42b40eaad92ea2e3c067c0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... to something that works with LLDB 12.
Task-number: QTCREATORBUG-24596
Change-Id: Ib2f8255d45a02fa3d2c737864994397f587e9b15
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Sample broken output:
>result={token="9",lldbid="1",valid="1",hitcount="0",threadid="0",oneshot="0",
condition="",enabled="1",valid="1",ignorecount="0",locations=[
{locid="1",function="foo()",enabled="1",resolved="0",valid="1",ignorecount="0",
file="F:\Projects\test\main.cpp",line="5",addr="4199979"},],
file="F:\Projects\test\main.cpp",line="5"}@
When parsed as GdbMi value, the strings are expected to be escaped.
Change-Id: Idb923516c1cf6e25b970ad08fae977bdf1045b4b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Partially revert 7f958700a0 for 'remote-ios'.
The original commit changed the way attaching to a remote server or process
works, attempting to make it work with lldb-server on a remote linux device.
That breaks connecting to the debugging server on iOS devices.
Fixes: QTCREATORBUG-23995
Change-Id: I7a793fa73a564a4ef19cf82e13c2ad50d4247ee3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and remove some of the now implicit putNumChild() calls.
Also, adapt docs.
Change-Id: I1ab1dafada95a1703cd6a9ba5b9e7e4166b48cd9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This could be extended to the other bridges, not done in this patch.
Change-Id: I620290049b7c95f8e3fb7584d4ca99a42fd343d4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This is apparently the right thing to do anyway and also helps to
select the right emulator or device when multiple ones are connected.
In that situation otherwise an error
"Expected a single connected device, got instead 2 -
try setting 'ANDROID_SERIAL'"
would occur.
Change-Id: I650a221d1a321d4dd9035411f85c7a68244c20e2
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This can appear as (non-existing) preferred frame index in backtraces
consisting only of frames without debug info. Fall back to top most
frame in that case.
Change-Id: Id7bb941d5fc3080aff3853cebb7b92afdd0ba4ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
No need to start the debugger event loop if the engine setup fails
Change-Id: I6bdeda0d2609c79aa5fafff7bc4b373a0bf14fbd
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Breakpoints inserting is async, so they did end up when the process
was running already.
This adds an extra roundtrip. Better, but more intrusive solution
might be to set the initial breakpoints synchronously, but that
would touch all engines.
Change-Id: Ia728a9c5ae8f1d6d29d3cc02b9e2d04952091fe9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The device on remote side *has* to configure (/usr/bin/)lldb-server as
"GDB server executable" in the device settings.
A real gdbserver does not work.
Change-Id: I045ffb60a824e06ee683d8bdfffeb480a580af5f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
generated with autopep8 and the introduced setup.cfg
Change-Id: I5b55a7937f2cde81be59d2b434e94ada1a4af5ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Using imports like
from foo import *
is considered as bad habit and it reduces
static code analysis usability.
Change-Id: I56a175f4c7b231e2b8e486bd9d1c65543720f56a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Tweak handling for LLDB provided by Xcode 11 slightly,
as the state handling of the process went astray when
using the debugger Python 3 based.
Task-number: QTCREATORBUG-22955
Change-Id: Ie070049d210a570993507ed940d141237aab89ce
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If the system or the running inferior produces output while
fetching data the output did interfere with the state handling
of the debugger engine which in turn lead to a complete
inconsistent state of the debugger where the states of the
debugger bridge and the debugger engine (QC internal) assumed
complete different states.
Circumvent by explicitly ignoring the state for inferior output
on stdout or stderr.
Change-Id: I81aa0bacd41de4266a9278c66fed908dd72c9d44
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
As per suggestion from Pyls, this changes
if not needle in haystack:
to
if needle not in haystack:
Change-Id: I4a482604e13e61ecee9e02935479632419710ff7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is a workaround for excess messages from the early LLDB 3.x times.
LLDB 6.0 is ok with and without this workaround, LLDB 7.0 does not
produce the excess messages anymore and the workaround leads to
real stop messages e.g. after a breakpoint hit being ignores.
Change-Id: I2fad014eb92e066b00dbfe590fe62c543e5343f4
Task-number: QTCREATORBUG-21615
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The SetSelectedThreadByID method expects an integer, and not
a string.
Fixes: QTCREATORBUG-21563
Change-Id: Ibd5538a3214b73d7e87e66b59d6b9af0b93effeb
Reviewed-by: hjk <hjk@qt.io>
Prioritize displaying as enum if a type is known
to be an enum. Otherwise this would just end up
get displayed as string representation of its value.
Enable respective dumper tests.
Change-Id: I3e5406e14a68f02741b6144bb54528b72cc8192d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
The bitpos value returned by lldb is the bit offset relative to the
beginning of the type, there is no need to do an extra modulus
operation.
Adjust dumper test to add the previously failing case.
The failing case happens when the class containing the bitfield has
more members in front of the bitfield.
Change-Id: I93678f78e6799843558ec53342a0ed49cac74f48
Reviewed-by: hjk <hjk@qt.io>
The dumper calls PyObject_Repr and shows the result of that as the
value of a PyObject.
It also adds three new sub fields to show the object class (type),
super class (base class), and the meta type (the type of the class
object).
Change-Id: I0612833321f6d2b50826588e775cfa12e1db28e4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: hjk <hjk@qt.io>