summaryrefslogtreecommitdiff
path: root/share/qtcreator/debugger/dumper.py
Commit message (Collapse)AuthorAgeFilesLines
* Debugger: Drop unnecessary use of ModuleNotFoundErrorhjk2020-05-251-1/+1
| | | | | | | | | That's Python 3 only, and doesn't add value here. Change-Id: I9b1702ea8b0b0ddb090fdfc393228b4430da0b07 Task-number: QTCREATORBUG-24004 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Debugger: Work around for gdb reporting zero array sizes in some caseshjk2020-05-141-4/+5
| | | | | | Task-number: QTCREATORBUG-23998 Change-Id: I101d032705b66faf50260067f6aa604214f09298 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Fix startup when Python's json module is missinghjk2020-05-111-2/+2
| | | | | | | | Task-number: QTCREATORBUG-24004 Change-Id: I1c0563868374263f13cec3a8f40138bce71338d6 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Debugger: prevent calling functions on windows targetsDavid Schulz2020-05-061-1/+1
| | | | | | | | This will result in a crashing gdb. Fixes: QTCREATORBUG-23982 Change-Id: I59b65c5854bb4b7cbd59522a555388d1e833a560 Reviewed-by: hjk <hjk@qt.io>
* Dumper: avoid redundant labelingDavid Schulz2020-03-021-107/+91
| | | | | | | Change-Id: I85581cfe34a60e7f8a3e3590358443a15b7d2d4c Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Dumper: remove unused importsDavid Schulz2020-03-021-2/+0
| | | | | Change-Id: I447c9697dbd631ab26358c193c274484e70a908d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Dumper: unify CodestyleDavid Schulz2020-02-281-229/+271
| | | | | | | generated with autopep8 and the introduced setup.cfg Change-Id: I5b55a7937f2cde81be59d2b434e94ada1a4af5ab Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Dumper: replace xrange with rangeDavid Schulz2020-02-261-8/+7
| | | | | Change-Id: I09b3dd4da548643e927dbc5bb3130c28a746396b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Dumper: replace import * with explicit importsDavid Schulz2020-02-251-3/+3
| | | | | | | | | | | | 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>
* Dumper: move global enums and functions to utilsDavid Schulz2020-02-241-363/+260
| | | | | Change-Id: I11f5f0d970cd23a5fd907d33daa3cb8a441d0c58 Reviewed-by: hjk <hjk@qt.io>
* Dumper: Fix syntax errorOrgad Shaneh2020-01-161-1/+1
| | | | | Change-Id: I8e611b1cb358872d9e0c7302ed8a4d3e0b7d9f3c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Use a more convenient way to create timing sampleshjk2020-01-071-35/+29
| | | | | Change-Id: I4ca983957c81a1f5f963a85b16a2d1b255b2cd2d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-09-231-2/+2
|\ | | | | | | Change-Id: I4a22cdf4d7d5aab2083d5f9f7baaa38e510f83fd
| * Debugger: Show FORTRAN stringshjk2019-09-231-2/+2
| | | | | | | | | | | | Fixes: QTCREATORBUG-22976 Change-Id: Ib435b2692301fe2e2d3378623e99bbcf16e27e46 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Debugger: Allow timestamp reporting on a sub-item levelhjk2019-09-131-4/+4
|/ | | | | | Task-number: QTCREATORBUG-22896 Change-Id: I41252868e14f1e4d5dddc0d1c17c097cba6f5fe5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Disable QObject connection and signal displayhjk2019-07-311-2/+4
| | | | | | | | Besides the announced change to QObject guts in a5a859e72 there has been at least 6e0b5dadc and possibly more, so give up here. Change-Id: I84201cef9f2a7515f082f4c3310bdc96f7a4216d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Avoid infinite loop in dumperhjk2019-07-231-6/+22
| | | | | | | Change-Id: I71e89574a9eecc079b4d8e91da352fd2b7b0d9ab Done-by: Xander (@bugreports.qt.io) Task-number: QTCREATORBUG-22637 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Improve QObject dumperhjk2019-06-181-2/+6
| | | | | | | | | | Don't use two lookups for parent types and act on known null pointers. While the machinery is robust enough to handle the result it's a needless deviation in regular code path. Change-Id: I6e50629cf554870a3ffb9f488f654e6ae557e5b3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* python scripts: Use "not in" operator to test membershipAlessandro Portale2019-05-101-1/+1
| | | | | | | | | | | | 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>
* Debugger: Make the time stamp recording option work for single itemshjk2019-04-121-0/+6
| | | | | | | Should help to drill down to individual expensive dumpers. Change-Id: I983ba075231784f71dd9d5c3bda375a3ee508bf6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Add dumper for QSizePolicyhjk2019-02-191-2/+9
| | | | | | Change-Id: Ib4d2597229f2808fcf79e76a9590b0e07989bfb9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Support rvalue references in functions args with gdbhjk2019-01-101-7/+22
| | | | | | Change-Id: I5383ffa38f07e3f191619555a9e735c211b3dd8b Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Fix display of multidimensional C arrayshjk2018-12-171-25/+27
| | | | | | | | Fixes: QTCREATORBUG-19356 Fixes: QTCREATORBUG-20639 Fixes: QTCREATORBUG-21677 Change-Id: Ie28b51c6caf526e125234959cbf11503d0683dc7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Robustify QEvent dumpershjk2018-12-121-4/+5
| | | | | | | | There's no need to go through unknown enum sizes here, they are known. Also, make it work for namespaced Qt. Avoid casts to typedefs. Change-Id: I9c6fc44a03a0c245f05957306a129f6902f8cf85 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Dumper: Remove unreachable codeChristian Stenger2018-11-191-2/+0
| | | | | Change-Id: Ic0e6c0b9d3d2e4e3a3bf8a63cce41ae23e1084bd Reviewed-by: hjk <hjk@qt.io>
* Dumper: Fix displaying enums with LLDBChristian Stenger2018-11-191-2/+2
| | | | | | | | | | | 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>
* Dumper: Fix handling of bitfields for MinGWChristian Stenger2018-11-121-1/+2
| | | | | | Fixes: QTCREATORBUG-19742 Change-Id: I8723da875607e00a833cd5a1ccb748e7f8ed4314 Reviewed-by: hjk <hjk@qt.io>
* Debugger: Fix display of null referencesChristian Stenger2018-11-061-1/+4
| | | | | | | Fixes: QTCREATORBUG-21210 Change-Id: I529f38aad9b93707e09ffdd28885e46c2cfd158c Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* [Debugger] Add dumpers for Python "PyObject"sAlexandru Croitor2018-10-191-0/+15
| | | | | | | | | | | | | | 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>
* Debugger: Fix display of upper half of short unsigned intshjk2018-10-021-1/+4
| | | | | | Change-Id: Ie15c66c02c15420436b26c65af3cee9a19634e5c Fixes: QTCREATORBUG-21038 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Add an explicit QObjectConnectionList dumperhjk2018-09-171-1/+1
| | | | | | | Mostly for sanity reasons when debugging the QObject dumper itself. Change-Id: I7d6267625f091788e73b0b28695e9b99e33ab3e3 Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/4.7'Eike Ziller2018-08-201-0/+2
|\ | | | | | | Change-Id: I15962a85b0cc37c5a00e15ef7eac0445aad6c295
| * Dumper: Fix enum display in nested typesOrgad Shaneh2018-08-161-0/+2
| | | | | | | | | | | | | | | | When used in SubItem, enums were displayed as "value of type E at address <addr>". Change-Id: Ieecfb791126c6f63f272817afc6c8d05f28b9242 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Make pretty-printing GDB's LazyString workMichael Weghorn2018-08-151-4/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Creator failed to properly display GDB's LazyString. The problem was that GDB's 'PlainDumper::__call__' passed a 'gdb.Type', while 'DumperBase::putCharArrayHelper' called methods that are only defined for the custom and more abstract 'Type' type defined in 'dumper.py'. As described at [1], GDB's 'LazyString.type' "holds the type that is represented by the lazy string’s type. For a lazy string this is a pointer or array type. To resolve this to the lazy string’s character type, use the type’s target method." In addition, 'gdb.Type' does not have a 'size()' method, just a 'sizeof' member, s. [2]. Since all other uses of 'DumperBase::putCharArrayHelper' are passed a "proper" type, extract the code common to the GDB case and all others into a separate method and directly call this one for the GDB LazyString case. [1] https://sourceware.org/gdb/onlinedocs/gdb/Lazy-Strings-In-Python.html#Lazy-Strings-In-Python [2] https://sourceware.org/gdb/onlinedocs/gdb/Types-In-Python.html#Types-In-Python Task-number: QTCREATORBUG-20939 Change-Id: I16608668c9403b6d8e509dab17eb1788586f453e Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-04-131-0/+5
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/settingsaccessor.cpp src/plugins/autotest/autotestplugin.cpp src/plugins/git/gitclient.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.h Change-Id: I65f143cad18af509a2621d6c5925abbd038ea70f
| * Dumper: Return correct address on extractPointer for arraysOrgad Shaneh2018-04-031-0/+5
| | | | | | | | | | | | Change-Id: I8e25cca4553a8b69703ac0ffa80231f97cdef980 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Debugger: Fix enum dumperhjk2018-03-221-14/+11
| | | | | | | | | | | | | | Make the hex display work with LLDB, fix GDB and LLDB test. Change-Id: I529b5cdc908dbcba7270bc4574fa59a012fcacad Reviewed-by: David Schulz <david.schulz@qt.io>
* | Debugger: Make QList as movablehjk2018-03-201-1/+5
|/ | | | | | | | Apparently changed in qtbase dafa3618d23. Task-number: QTCREATORBUG-19812 Change-Id: I70f543c71cc2147cbd5ab33a070e1a35049f46a8 Reviewed-by: David Schulz <david.schulz@qt.io>
* Dumper: Do not use enumHexDisplay unconditionallyChristian Stenger2017-11-271-1/+4
| | | | | | | | | This function is available only for GDB. When using CDB or LLDB this ends up in an exception. Change-Id: Ie1835c1b95cac99e3f996077f6a3d80b5591c145 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Debugger: Fix enum dumper for cdb and lldbDavid Schulz2017-11-071-1/+1
| | | | | Change-Id: Ieea120c00553ebe88c2daca0756a1eadba5991a3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-09-191-4/+4
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggerdialogs.cpp src/plugins/debugger/gdb/remotegdbserveradapter.cpp Change-Id: I1ae77869887a8d9ef2a33439f2733315db9e0cf0
| * Dumper: Dump CHAR/WCHAR arrays as stringsOrgad Shaneh2017-09-181-4/+4
| | | | | | | | | | Change-Id: I78bdb181e27cc858356c9026fc960135b54cdcbb Reviewed-by: hjk <hjk@qt.io>
* | Debugger: Display summaries for CoreFoundation typeshjk2017-08-211-0/+11
| | | | | | | | | | | | | | | | | | | | Uses lldb's GetSummary() method to display values for CoreFoundation string-like variables. Task-number: QTCREATORBUG-18638 Change-Id: Icca6d9cf7b328c80b44eebe597259f38aba1c3ef Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-07-211-1/+8
|\ \ | |/ | | | | Change-Id: I02e54f45d233b89ddaee9c87da9b9af2a56374b8
| * Debugger: Don't hard-fail on missing Python json modulehjk2017-07-201-1/+8
| | | | | | | | | | | | | | | | Only needed for native combined debugging. Task-number: QTCREATORBUG-18577 Change-Id: I7c5d877b9601e77ab8de251305db829a07675f8d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Debugger: print QFlags and bitfields as hexThiago Macieira2017-07-111-2/+4
|/ | | | | | | | | | | | It's a lot more useful to see in Qt Creator: QAbstractFileEngine::FlagsMask (0xff00000) Than QAbstractFileEngine::FlagsMask (267386880) Change-Id: I8d96dea9955d4c749b99fffd14cd690574b433e5 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Dumper: Fix exception when accessing empty itemsChristian Stenger2017-07-071-0/+2
| | | | | | | | | This also fixes accessing 'this' when located inside a different thread. Task-number: QTCREATORBUG-18466 Change-Id: Ib90cc23c65c033a234d3f7cf9b1ba76abff719e2 Reviewed-by: hjk <hjk@qt.io>
* Dumper: Use correct integer value for enumsOrgad Shaneh2017-06-201-1/+1
| | | | | | | In case of an enum bitfield Change-Id: I1e7756d5dffb4d81030795c495f2474a77c50452 Reviewed-by: hjk <hjk@qt.io>
* Debugger: Fix manual splitting of complex template parameter typeshjk2017-06-191-0/+1
| | | | | | | | Parsing has to stop at the first < (coming from the end). foo::span<int>::bar<double> has a parameter 'double', not 'intdouble'. Change-Id: Ied142d5e75a7587d6c0efd3b51608b199b999e93 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Dumper: Add bitfield value in debugging messageOrgad Shaneh2017-06-131-1/+1
| | | | | Change-Id: I353e85b5b6999f85e93eed18ac0cf414c1c46066 Reviewed-by: hjk <hjk@qt.io>