Commit Graph

1223 Commits

Author SHA1 Message Date
hjk
ac7f32e4c2 Debugger: Ignore async GDB notifications while extracting variables
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>
2015-07-23 12:59:16 +00:00
hjk
e3c2236c26 Debugger: Remove guessing of register size
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>
2015-07-22 11:40:15 +00:00
hjk
d4206752ca Debugger: Only pass environmental differences to inferior
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>
2015-07-16 13:09:58 +00:00
hjk
c81407f28d Debugger: Lift restriction one-shot breakpoints deletion
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>
2015-07-16 11:52:32 +00:00
BogDan Vatra
0f46ad4a55 Debugger: Set debuggee environment vars.
Env vars should be set to debuggee not to debugger.

Change-Id: I1ff877e295cb61f3a47c3aec5ffb43dea64df1cc
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-07-15 08:26:58 +00:00
hjk
11d79e4f23 Debugger: Make Shift-F5 end a debugger session again
This is a regression introduced with a28ac630.

Change-Id: If870c44592de77bec10cd48b4a84fff06e788388
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-08 06:38:46 +00:00
hjk
a28ac6307f Debugger: Fix "Restart debugging session" regression
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>
2015-07-07 13:55:39 +00:00
hjk
d48ac14fba Debugger: Simplify removal of outdated L&E items
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>
2015-07-07 08:08:08 +00:00
hjk
60a8442d8c Debugger: Rework start parameter completion.
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>
2015-06-25 12:13:35 +00:00
Orgad Shaneh
e228c11a21 Debugger: Remove false soft assertion on Windows
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>
2015-06-23 06:38:41 +00:00
hjk
405f2c7d88 Debugger: Remove some unused parameter
Change-Id: Ica2b6facee379fd1e046ced617e3e5176bb3d192
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-06-22 15:27:21 +00:00
Orgad Shaneh
7c33549f98 Debugger: Retrieve threads info for coredump
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>
2015-06-22 14:02:21 +00:00
Orgad Shaneh
fc6480866c Debugger: Do not try to load unreadable extra dumpers file
It aborts the debugger.

Change-Id: Ia926825f658b492fa7ac738a79027186c9dd7386
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-22 05:49:41 +00:00
hjk
6cd5df7587 Debugger: Suppress warning on new GDB async messages
We don't support traces yet.

Change-Id: I4ea4db1e52111a2f7b908b925e94f63af9ce3a88
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-17 06:53:17 +00:00
hjk
d769efe1e2 Debugger: Move watchHandler()->notifyUpdateStarted() to doUpdateLocals
This was it also gets triggered when expanding tooltips.

Change-Id: I90ad39e9e82abdcd40e663b4ba4998205563009b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-17 06:31:53 +00:00
hjk
ad6451bbe4 Debugger: Remove the InferiorExited state
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>
2015-06-17 06:26:24 +00:00
hjk
42be4ef64f Debugger: Don't quit on inferior-exited.
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>
2015-06-16 06:47:43 +00:00
hjk
ebb62804f3 Debugger: Compactify gdb option page creation
Change-Id: I341a84795f3e4dda67d966da9cb5476f50a680dd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-11 10:52:53 +00:00
hjk
7c8d20ded7 Debugger: Pass request to sort struct members to {gdb,lldb}bridge.py
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>
2015-06-11 08:40:51 +00:00
hjk
5309e217e4 Debugger: Consolidate GDB and LLDB "updateLocals" code paths
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>
2015-06-10 07:40:27 +00:00
hjk
03212d6e49 Debugger: Use Utils::QtcProcess instead of GdbProcess
The original use case of running GDB itself remotely
is not present anymore.

Change-Id: I283a27216d6a8849fea7d9ca8df6b94571fb99fd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-09 09:04:33 +00:00
hjk
244cdb7804 Debugger: Split off runtime-only items from DebuggerStartParameters
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>
2015-05-28 08:54:48 +00:00
Kai Koehne
46fc33d914 Don't mix iterator and const_iterator
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>
2015-04-02 09:40:24 +00:00
hjk
00199039e7 Debugger: Fix display of expandable items in GDB and LLDB
Move common code to dumper.py and debuggerengine.cpp and
fix it there.

Change-Id: I20d91d1aa7400fbdb27938c10cf40c8f6019df0a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-26 15:00:23 +00:00
hjk
59172f9ab4 Debugger: Inline GdbEngine::rebuildWatchModel
... into its only caller, remove duplicated and unused code.

Change-Id: Ibdd84eeda34e4f7b4b307dc619c9f31399d7ec5f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-20 11:35:05 +00:00
hjk
b3f88df41d Debugger: Remove most remaining occurrences of WatchData
... 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>
2015-03-20 08:36:57 +00:00
hjk
e8f8aaa263 Debugger: Fix dumper format choosing with GDB
... and further unify GDB and LLDB code paths.

Change-Id: Id89f3804c53190c4888082891fd3c3c55eceac84
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-19 06:59:01 +00:00
hjk
9851484b31 Debugger: Remove new watch window timer from public interface
Change-Id: Ic9d3df22d917e5644d6302a6af06aa8eadea8b5a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-17 14:44:08 +00:00
David Schulz
40dd248178 Debugger: Show progress indicator while updating locals.
Change-Id: I4b26cbe71f5936f367f9add2b3a6c812446835d8
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-16 10:10:05 +00:00
hjk
46fcfa9018 Debugger: Remove widget argument from tooltip request
The only information ever used is whether it's c++ or not.

Change-Id: I4ca00663856dd66cbdf58c468f175a8c9e41d6a5
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 13:57:53 +00:00
hjk
34c807a11a Debugger: Remove WatchUpdateFlags
Only needed in the non-Python days. CDB didn't use it to start with.

Change-Id: Ia609218cc1a694f797e278c4d99ead68e6212938
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 13:55:55 +00:00
hjk
7c2c3307b3 Debugger: Simplify GdbEngine::updateWatchData
The removed parts were only used with the non-Python engine.

Change-Id: Ia6858517b011c6f7ace8b2521beafdb4b03efc89
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 13:54:56 +00:00
hjk
74f7cd1c26 Debugger: Simplify watcher handling in GdbEngine
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>
2015-03-06 09:49:23 +00:00
hjk
7b3a185d41 Debugger: Suppress gdb warnings regarding controlling terminal
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>
2015-03-05 12:35:56 +00:00
hjk
39f904957a Debugger: Merge GDB/LLDB process error handling
This also removes some of the "illegal" state transitions,
partially addressing QTCREATORBUG-14089.

Change-Id: I817d87a0b5e0a40285bc9b0880fef5bceaee3f16
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-05 11:55:37 +00:00
hjk
8a3c5bc1e7 Debugger: Skip interpretation of unreadable register content
Task-number: QTCREATORBUG-14029
Change-Id: I88553377a567607c7748c4875a5991e8fb0d52ab
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-03 16:47:18 +00:00
hjk
8b0a07f657 Debugger: Partially revert 7b8c58b
Caused problems with MinGW/Start in Terminal.

Change-Id: I6b88687f2eddd4437a329bf5cf2bd0bf86044cb0
Task-number: QTCREATORBUG-14069
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-02 13:13:29 +00:00
hjk
01cb4ee21d Debugger: Fix soft assert when loading core file
Task-number: QTCREATORBUG-14048
Change-Id: I20d4d8269df3bfb42259ad459b92d5cd738332f5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-26 14:58:03 +00:00
hjk
7b8c58b99b Debugger: Fix a state transition regression
Task-number: QTCREATORBUG-14028
Change-Id: I426baf1549d138f4a35d23d5ab814def2125dfbe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-25 11:32:54 +00:00
hjk
37bd3eab24 Debugger: Visually fake instant breakpoint removal
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>
2015-02-24 14:31:23 +00:00
hjk
592ffe7377 SettingsDialog: Remove CategoryId parameter from callers
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>
2015-02-24 13:52:00 +00:00
Friedemann Kleint
143af2845d Fix excessive warnings by MSVC 2013 64bit about size_t->int truncation
C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data

Change-Id: I91979c685bbbd84359f7f4e19911a21a408f5d23
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-20 14:27:51 +00:00
hjk
e4fb098842 Debugger: Decrease dependency of protocol structures on Qt
For potential re-use in qtcreatorcdbextension.

Change-Id: Ia5742b61c71fcd04eeaa894ed62218151d528a53
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-18 08:07:13 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
hjk
f1c5889e77 Debugger: Some code modernization
Qt 5 signal/slot, a few auto.

Change-Id: Ia17f1b3dcd41dfe0a373c14e7c1d34d210d084f1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 15:14:55 +00:00
hjk
f91cc66f9a Debugger: Combine some watch related GDB and LLDB code paths
Change-Id: I20e5f6f04418c931354a07bc3597f6982fcaf942
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 12:49:21 +00:00
hjk
9df463da84 Debugger: Convert bb extension to use runCommand
Change-Id: I528c51d2b02dccd91429778ef8c940fe5565345f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 10:27:33 +00:00
hjk
875d889082 Debugger: Move bbsetup over to runCommand()
Change-Id: I0a19b28d24cb570651ea84bf7cdbc9a761f85a0b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 07:19:48 +00:00
hjk
f65cb6ae4d Debugger: Complete switch to Python for GDB stack generation
The iteration in Python was only used for the 'native mixed'
case before. Seems reasonably fast and robust now to always
enable it. Also, make the calling code use 'runCommand'.

Change-Id: I10565a725dfaa9bf46c28739c69e9f2546498929
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-11 16:34:51 +00:00
hjk
e76c4839bb Debugger: Consolidate some GDB-through-Python interaction
Instead of calling a GDB extension command invoking a function
on the well-known Dumper instance, call the Dumper function
directly. This also makes the code more similar to the LLDB side.

Change-Id: I4b23177eb72a904721b63c578ce7fbfe204f02a2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-11 15:00:35 +00:00