Commit Graph

1289 Commits

Author SHA1 Message Date
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
hjk
547855bf02 Debugger: Using DebuggerCommand instead of bbedit call
Mid-term goal is to reduce the amount of similar code
at least in GDB and LLDB engines.

Change-Id: I4883686a102246be3135ddc694b837b1187ac9e9
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-11 08:06:39 +00:00
Orgad Shaneh
9927eb2c37 Valgrind: Suppress messagebox on SIGTRAP for vgdb
Change-Id: I5af3a3a67a9c9903337e0035733a74ad482ba197
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-10 10:40:26 +00:00
hjk
4c63855f88 Debugger: Remove unused UpdateData::tooltipOnly member
Change-Id: I15c6f16a258c0d664d2378150c4b3277a29c4b5c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-06 12:06:28 +00:00
hjk
fbfafd0a01 Debugger: Remove unused UpdateParameters::tooltipExpression member
Change-Id: I61360b151ac8e6181b0635437468b4cd897c9ee8
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-06 11:00:16 +00:00
hjk
835f1fbcd8 Debugger: Merge GdbEngine::GdbCommand into DebuggerCommand
Mostly the timestamp and mechanical renaming.

Change-Id: I9a57302cba454b3c5cf6ce5c8279f817bf85cf2e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-06 09:41:37 +00:00
hjk
968ba7b74d Debugger: Replace the QVariant callback cookies by direct parameters
Lambda makes it possible.

Change-Id: I26a4df71dcd24b76a4f0d6d67545b2e1c6ba2412
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-06 00:32:15 +00:00
hjk
d9e7a6e6af Debugger: Remove GdbCommand::callbackName
This was a debugging aid that has not been needed for a while.

Change-Id: Ia79e8e91b6648bdb807836443b01dd325d819640
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-05 22:31:06 +00:00
hjk
6a2d6b6d20 Debugger: Avoid some Gdb* in common type names
They had been created for use with GDB, but are more general
nowadays.

s/GdbResponse/DebuggerResponse/,
s/GdbResultClass/ResultClass, etc

Change-Id: Idfa3e280cdda882a8b3f02dff7e7d993e7e82d03
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-05 21:27:48 +00:00
hjk
96a0f48093 Debugger: Pass all breakpoint properties to *brigde.py
Change-Id: I58ee1b106e1cd6e8ad5ce99b226860c528698520
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 15:32:20 +00:00
hjk
ca1f743463 Debugger: Native mixed fixes
Change-Id: I1b10b2f6a241c6061ac5ee77825aa8500cb7097f
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 15:30:59 +00:00
hjk
7d4b9c4ba0 Debugger: Move some 'mixed native' code to DumperBase
Prepares reuse in LLDB.

Change-Id: I2238a94937411b80a9ec84ab738aba2146bba50e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 11:30:27 +00:00
Orgad Shaneh
4e8e75d88e Debugger: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I1aa1a2b6ccbafeb1a8f3053fffa39b3f96992591
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 08:52:39 +00:00
hjk
38ec4dd6ae Debugger: Show confirmed state on breakpoint removal
So far we cheated by pretending removal always succeeds
immediately. Now just draw in grey in the view and remove
fully after the backend confirmed removal.

Change-Id: I0bd607774a3db0fe302b9654798be9dcc50abe8a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-02 10:22:41 +00:00
Montel Laurent
c701506348 Use new qt5 connect api
Change-Id: I7841baa54c9861275269981892e18d6b8fa58f3b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 21:16:33 +00:00
hjk
eafde22e16 Debugger: Handle extra dumpers with LLDB
This generalizes part of the previously GDB-only code paths

Change-Id: Id32798073e3c8bcb23bfedf463bebc866c8275e2
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 15:42:31 +00:00
hjk
bea159a701 Debugger: Some parser code consolidation
Change-Id: Icd3afb632cb935fdd95f13db91c9c11a3dea732e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 15:09:12 +00:00
hjk
1eb507afbd Debugger: Simplify calls to parseChildrenData
Having access to the expanded inames doesn't make a difference.

Change-Id: Ic833f647c2c135f213dd621e28a9be98809e0b04
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-01-29 14:16:13 +00:00
hjk
39ab4b3783 Debugger: Use direct access to WatchItems in GDB engine
Change-Id: I6b9735de1855203ce0586c4ee0c8991a13fb0bad
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-29 11:32:00 +00:00
Orgad Shaneh
8b5dcc13c5 Replace QFileInfo::fileName() with FileName::fileName()
Change-Id: I4852ff215abf25649fc5eac1e922ae901839ca3d
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 11:15:43 +00:00
Nikolai Kosjar
4e05b073eb Debugger: Fix compilation with MSVC2013
Change-Id: I7c40720ab426bcb5743cc4bccf656e54b7d8a45a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-26 12:35:36 +01:00
hjk
3c8a8eb8e8 Debugger: Introduce a pty based channel to inferiors
This is experimental for now and requires QTC_USE_PTY=1
in the environment to be used.

Change-Id: I460ce7b9283467d481e903f731f4243b7e5ec094
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-26 09:43:19 +01:00
hjk
4ea0138423 Debugger: Replace gnuplot by python-matplotlib for graph dumper
Better functionality and availability than the gnuplot version.
The feature ("Show array-like data in external plot window")
will be automatically enabled if 'from matplotlib import pyplot'
succeeds.

Change-Id: I1799534ac5f878d3e43e47289d1b563b52bb4378
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-26 09:14:08 +01:00
hjk
4c928f6099 Debugger: Disable GDB's own pretty printers when use is not wanted
Saves up to 20% on large uniform structures.

Change-Id: I98c8c942f0accac7e2db1d8b06bf7ed156967306
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-26 09:13:53 +01:00
hjk
b01a46f946 Debugger: Re-compute L&E after manual dumper reload
Change-Id: I78a8ddc2b25aae48a792d80657b00f34abe9a1fd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-22 13:29:12 +01:00
hjk
61c49a122f Debugger: Initial shot at native Qml-and-C++ debugging
Only for GDB now, requires a debug build of Qt, not feature complete.
To enable it, run with QTC_DEBUGGER_NATIVE_MIXED=1 and press
the 'oo' button in the debugger toolbar.

Change-Id: I28aac9db13f7067e03cc364b89cc8046fa213dae
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-22 12:39:02 +01:00
hjk
cca1030432 Debugger: Add python command to add dumpers
More flexible than hacking on the C++ side. Also registers
the custom dumper path to make it reloadable like the
"built-in" dumpers.

Change-Id: I0405f7278e28eb75d83fdd4a861f5a5c32d97a0e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-22 10:55:36 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
hjk
3b2d2eae17 Debugger: Re-work breakpoint storage handling
The actual data is now in a TreeModel. As interface to
individual breakpoints there's a new Breakpoint class
essentially providing a checked handle.

On the user code side breakHandler()->foo(bpId) is
replaced by bp.foo().

Change-Id: I82f435bad6301fce85a1d82bf6bf39e9ddba511e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-15 12:19:33 +01:00
hjk
3743211e54 Debugger: Rework register handling
Use register names as handle, not their index in the view.
Store the raw real values, not some stringified version
as primary data.  Use subentries to break down bigger
registers into smaller entities. Also remember the
previous value of a register and show it in a tooltip.

Change-Id: I8ae3cc8766a7b211bc7cc827c734e5cf6060825c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-12-18 12:53:46 +01:00
hjk
20396d7809 Debugger: Use Python for GDB stack extraction in native mixed mode
Change-Id: I7ca4a080c9b5e5992f44e5f3d8aa5af7296abe99
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 12:36:41 +01:00
hjk
bf9b63174e Debugger: Introduce a "Native Mixed" switch
This paves the the way to mixed QML/C++ debugging
through the native backends. Currently this requires
QTC_DEBUGGER_NATIVE_MIXED to be set in the environment.

Change-Id: I126ad945e84806f3b548408318007351628c912f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 11:17:58 +01:00
hjk
62d21d123c Debugger: Remove traces of outdated attempt at combined stepping
Has not been usable for a while and will be superseded by
"native" mixed stepping.

Change-Id: I2902a98b7ad4e4b29e389e54fb6488bf711840dd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-12 10:53:43 +01:00
hjk
6d6e8de4a0 Debugger: Use Python instead of GDB/MI to retrieve stack
This will be useful to create artificial QML stack frames.

Change-Id: I41cb87f8dea69d88695fea46a1ae2b0270cbec1a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-08 13:04:24 +01:00
Marco Bubke
2ee9a06f4c Debugger: Use Core::AsynchronousMessageBox
Nested event loops can lead to crashes, so it is better to use a dialog
which does not have have its own event loop.

Change-Id: Icd2390c9026bc1ef88e72a570df5813fe5cbdaa2
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-12-08 12:02:07 +01:00