... instead of the custom mechanisms to funnel breakpoint ids, cookies
and similar through individual bridge functions.
Change-Id: I2b6e906078eefdbcd4ffa166dc1881a1d0f7fb51
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-exec-finish in 'main' results (correctly) in something like
40^error,msg="\"finish\" not meaningful in the outermost frame."
However, this message does not seem to get flushed before
anything else happens - i.e. "never". So force some extra output
that's known to trigger a flush.
Change-Id: I3f5ef6f7cc57dd085976b239f18d6ec7bd108972
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Instead, always pipe them into the GDB process, even if the inferior
is not stopped. The original need to hold back commands until
the inferior is stopped seems to be long gone.
Change-Id: I234fdd067d78966c9896f1fa85a134900bf6dec7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@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>
Recent builds of GDB started to deliver *running and *stopped
notifications for expression evaluation, even unpaired at times.
Since we know that we are stopped when we start variable extraction
and we are stopped when it ends, the intermediate notifications
can be ignored.
Change-Id: I800082afb7df600ad4e6f97b534f4ea901c02d8a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
GDB does not report register sizes using the MI protocol, so sizes were
infered from the register name. This is fragile, better use
"maintenance print raw-registers" which reports the sizes and even
if not part of the official interface, is unlikely to change.
Change-Id: If7c7182751a496084a351aaef3a97dcdac6c500b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This amends 0f46ad4a55.
Passing the whole environment is unneeded, and can cause
problems with multi-line variables.
Change-Id: I49a32c550ba52737bb8f797e227bb883be8b1df1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This was/is a workaround to not lose the extra information carefully
crafted one-shot-breakpoints might carry (e.g. conditions). However,
it gets into the way when simple one-shot breakpoints are used
automatically ("Jump to line", or native-mixed debugging),
so actually deleting the bp in the ui if it's gone on the debugger
side seems the lesser evil nowadays.
Change-Id: If00dc4e8f27881236c05b17109b57d7c53d424ab
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Introduced with the support for fork-follows-child.
With 'Restart', we temporarily don't have a living
thread, so that can't be taken as indication for
ending the debugging session.
Task-number: QTCREATORBUG-14393
Change-Id: I0070b9ca7e6897dab48bdbcf493d03df4709be98
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This removes the need of bookkeeping on the engine side. It's
basically a kind of mark-and-sweep: On update begin mark items
that are expected to change as outdated, while data arrives, undo
that marking, and update end remove all remaining marked items.
Change-Id: I739b84869033d511d5c9a80605c079e87ef4f6a7
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
It's again a linear process now, with explicit entrance point for
all users.
Task-number: QTCREATORBUG-14618
Change-Id: I96c08947270ce34d7bc6c8be1d7f350dbfa14794
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Some libraries do not provide full names.
For example:
frame={level=\"1\",addr=\"0x2b669230\",func=\"*__GI_abort\",file=\"abort.c
\",fullname=\"\",line=\"117\",from=\"D:/sysroot/octeon17/lib32/libc.so.
6\",language=\"c\"}
Change-Id: Ibd273d451844d467395d8d7708b87f2cfc7a139e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
handleStop2 used to retrieve the stack. This is no longer right.
While at it, remove outdated comment regarding GDB version.
Task-number: QTCREATORBUG-14617
Change-Id: I9511fe5315e941fd9e08737a5b11677f9fdf8d09
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This was it also gets triggered when expanding tooltips.
Change-Id: I90ad39e9e82abdcd40e663b4ba4998205563009b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
There are now several possible orders of events between sending a 'kill'
and receiving something that indicated a properly shut down inferior.
Coordinating the InferiorExited state during engine ramp down is not
worthwhile as that state had only a forced transition to InferiorShutdownOk
anyway. For the user (and user code), only the fact that ramp down is
finished is interesting.
Change-Id: Ic22131d5a1066dc62bd069f532c28b773f231088
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
We might have "follow-fork-mode child" and it's only the parent exiting.
Instead quit when the last known thread is gone.
Change-Id: I77a017e6f57ae0ee383aabd2b6f0377ff8261d41
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
The request will be honored when creating the values
instead of re-sorting in the frontend.
Change-Id: I0ea13bd9b0700a4d2ae4f0b355c56ddd37557398
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This splits the bool setToolTipExpression() operation into
a bool canHandleToolTip(), and the actual processing of
the request, which is mostly identical to the handling of
a watcher.
Handling a watcher is now mostly the same as a full Locals
update, except for the 'partial' flag. Pushing the handling
of that down to the bridges gives identical code paths
in the gdb and lldbengine. Move that to the
DebuggerEngine base class.
Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The original use case of running GDB itself remotely
is not present anymore.
Change-Id: I283a27216d6a8849fea7d9ca8df6b94571fb99fd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Right now, DebuggerStartParameter is part of the debugger plugin
external interface. Better not make it fatter than necessary.
Change-Id: I3b9205089f971dd314ccba1335b5ca2d4d9fe7c6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This avoids unnecessary detaches of the Qt container data.
The mismatches where detected by defining QT_STRICT_ITERATORS;
however, this define violates the ODR (causing linker errors),
and therefore is not added permanently.
Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c
GPush-Base: 62b0848b9c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Move common code to dumper.py and debuggerengine.cpp and
fix it there.
Change-Id: I20d91d1aa7400fbdb27938c10cf40c8f6019df0a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... into its only caller, remove duplicated and unused code.
Change-Id: Ibdd84eeda34e4f7b4b307dc619c9f31399d7ec5f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... in WatchHandler and DebuggerEngine interface.
Adjust using code.
Change-Id: I6371f3e96ba46a783e23a5767cdde24a10d3fce7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
... and further unify GDB and LLDB code paths.
Change-Id: Id89f3804c53190c4888082891fd3c3c55eceac84
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The only information ever used is whether it's c++ or not.
Change-Id: I4ca00663856dd66cbdf58c468f175a8c9e41d6a5
Reviewed-by: hjk <hjk@theqtcompany.com>
Only needed in the non-Python days. CDB didn't use it to start with.
Change-Id: Ia609218cc1a694f797e278c4d99ead68e6212938
Reviewed-by: hjk <hjk@theqtcompany.com>
The removed parts were only used with the non-Python engine.
Change-Id: Ia6858517b011c6f7ace8b2521beafdb4b03efc89
Reviewed-by: hjk <hjk@theqtcompany.com>
There was only one user on GdbEngine::insertData left, and this
always took the !isSomethingNeeded branch.
Change-Id: Ibe51f7a7689be39ad3ffd60099a9cbe7b614648a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Causes more confusion for users than actual trouble. A hint is
still left in the debugger log, so it's not completely gone.
Task-number: QTCREATORBUG-3918
Change-Id: I51244094811bcb5c436f0631cb02dbf41cc202bf
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This also removes some of the "illegal" state transitions,
partially addressing QTCREATORBUG-14089.
Change-Id: I817d87a0b5e0a40285bc9b0880fef5bceaee3f16
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This partially reverts 38ec4dd6ae.
After using the new, "correct" behavior for some time I am
convinced that the original felt indeed better.
Change-Id: Ia921ccf8410bec33eb3053dc91bcca7b0328ef38
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
PageIds are supposed to be unique, so the CategoryId can be determined
from the PageId. Look for PageIds in the already expanded categories
first before searching through expensive categories.
Change-Id: I006beb0df6183453163ac1810fe59a306a0f52b1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
Change-Id: I91979c685bbbd84359f7f4e19911a21a408f5d23
Reviewed-by: hjk <hjk@theqtcompany.com>
For potential re-use in qtcreatorcdbextension.
Change-Id: Ia5742b61c71fcd04eeaa894ed62218151d528a53
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>