1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00
Commit graph

1215 commits

Author SHA1 Message Date
Simon Marchi
539660d4f7 [dsf-gdb] gdb download script: add examples and print help if unsupported version is given
I got a feedback that the error message when passing an unsupported
version should be more helpful.

Change-Id: I3c925c500d6de787ca9bfce421eda6109e9f6415
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-26 18:26:42 -05:00
Marc Dumais
2ec6e11b2b Bug 460737 - [visualizer] enable MV to know which (cloned) instance it
is

Change-Id: I586dedab6df808f9e68600fa55fa1169b44defaf
2015-02-26 15:07:53 -05:00
Simon Marchi
0ba2118dc9 [dsf-gdb] debug tests: Adjust buffer sizes in MIMemoryTest to take word size into account
Change-Id: I1ffa59165c713609b25b9331c3d245094df4544e
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-24 22:26:43 -05:00
Marc Khouzam
9c05b3506a Add test suite for GDB 7.9 and move Automated Suite to use GDB 7.9
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-20 16:01:33 -05:00
Marc Khouzam
74bd3e0c66 Update script to support GDB 7.9
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-20 15:58:34 -05:00
Simon Marchi
7402cd3123 [dsf-gdb] Put back event assert in
MIMemoryTest.writeCharVarying{Address,Offset}

When we switched SyncUtil.readMemory to use queries, it exposed a race
condition with the asserts that check for the number of event received.
Basically, nothing guarantees that when the assert is evaluated the
event had the time to arrive.

We now use a ServiceEventWaitor to wait until the event arrives (with a
timeout, of course).

At the same time, rename word_size to wordSize.

Change-Id: I6f4b51e22f46625e20bbbdbac91cf70cfd864e5e
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:27:39 -05:00
Simon Marchi
7328220fe6 [dsf-gdb] Add expected message in MIMemoryTest.writeWithInvalidAddress
Change-Id: Id1f46c879669e3a428bbc8039ff6363be35a9cb6
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:14:00 -05:00
Simon Marchi
18a8a45323 debug tests: add missing massageTimeout
Change-Id: I6be611a345de90f36996151fb910449292938f15
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:09:12 -05:00
Marc Khouzam
61ee8133f2 Small cleanup in the tests.
Change-Id: I3236c0efc3de5dbc9b21ed33afbbaeb1439f4864
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-20 14:07:17 -05:00
Simon Marchi
6f0f5d1cc4 debug tests: Move some tests from AsyncCompletionWaitor to Query
Change-Id: Ic9860c369c8cc0cf4bf9d72d83c09e60a119e9b6
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:05:51 -05:00
Simon Marchi
315a204251 debug tests: Convert MIDisassemblyTest to queries
Change-Id: I15a3f49e50c55d42c66b901bf302ed01f974ae98
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 14:04:10 -05:00
Simon Marchi
989d77bf7a Make disassembly default end address relative to start
As it is now, if you pass a start address but no end address (null), the
disassembled range will be [startAddress, $pc + 100], which does not
quite make sense.

I think the intention was to have the default end address be whatever
the start address is, + 100.

Change-Id: I1399cc116ecde6cfbdb2f1ec54a181e64a7f4c5f
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 13:55:03 -05:00
Simon Marchi
e90766e72a Change some comments from non-javadoc to javadoc
This way, we can ctrl-click them.

Change-Id: Ic9dcf299e865deac57e4cc1a29ce11578c651b16
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-20 09:48:47 -05:00
Matthew Khouzam
bb8cc948c4 clean up GDBTypeParser
Reduce function complexity and comply with java coding styles.
Convert some larger ifs to switches for performance sake.

Change-Id: Ief2672141511a1373cdd8a98e0fa2eeb564816e1
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
2015-02-19 17:09:29 -05:00
Alvaro Sanchez-Leon
33f85536b5 Bug 460241 - [Memory] Make tests run with different values of addressable size
Change-Id: I594071e3cee9a99d24dfcae3c080995610ffb533
2015-02-19 12:44:07 -05:00
Simon Marchi
059db21d52 debug tests: Fix error in SyncUtil.fillMemory doc
Change-Id: I7b1ab19b52a9c080c569a95e9ea11cbd45d987cb
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-18 11:35:37 -05:00
Simon Marchi
5ad1f5c4c3 debug tests: MIMemoryTest: Use runToLocation when possible
Change-Id: I66f76039cecf5333826be1b75556437a059c71b9
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-18 11:35:36 -05:00
Simon Marchi
544dbb5af8 [debug tests] Remove superfluous breakpoint tag
There is a superfluous LINE_MAIN_BEFORE_THREAD_START that is causing
problems, remove it.

Change-Id: I57c4637ada0b5efda2848029e5216a13cf638067
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-18 11:34:54 -05:00
Doug Schaefer
7fdd6f6e90 Fix up API @since tags against CDT 8.6.
Change-Id: I31966aa0dc312bb7ba77b6ce91eecd01ad4891ce
2015-02-17 23:43:49 -05:00
Simon Marchi
9ed8f75f74 Change word_size to wordSize
... to respect the coding style.

Change-Id: Ie68422182afad2532ce9238665bb06576fc3cc18
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-17 20:37:37 -05:00
Vladimir Prus
9471bc7bc1 Extract MIExpressions.getBasicType.
This permits derived classes to reimplement the logic for getting
expression value without copy-pasting the logic for getting type.

Change-Id: I21b048afaee8433d17e873b7aaf4f7b118edd107
2015-02-17 12:13:17 -05:00
Marc Dumais
ae9445c5ae Bug 460015 - [visualizer] Make VisualizerThread "m_locInfo" field
protected instead of private

Change-Id: Idd6faafa39fae849839072a96dc8296ebd27652c
2015-02-17 08:31:48 -05:00
Alvaro Sanchez-Leon
ef889c26f9 Bug 459901 - [visualizer] The visualizer may display duplicate elements
Change-Id: I9fb3fb8f85ec51afde48a665e275c6080b9b9bab
2015-02-17 08:31:11 -05:00
Alvaro Sanchez-Leon
384e9759c4 Bug 459114 - [visualizer] Make it possible to override the construction of the data model
Change-Id: Ib2af550136fa3ca638fd970e3c2e40ddf597ba80
2015-02-16 13:44:26 -05:00
Marc Khouzam
0e041e8e86 Bug 459688 - Label in breakpoint thread filter dialog should match debug
view 

Change-Id: I3d74c3316f5acbf2b6aadc0b6e99e7081384f401
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-11 11:17:47 -05:00
Marc Khouzam
2c1113c590 Bug 456959 - Disable test for versions of GDB that don't support it
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-02-07 19:33:34 -05:00
Marc-Andre Laperle
afd11359e6 Extract test VM args to common property base.test.vmargs
This makes it easier to change arguments for all tests. As a side-effect,
all tests now enable assertion (-ea) and have the same max heap size, etc.

Change-Id: I0965d40ba3283efe7eacdf927f6c302ee0ab30f0
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2015-02-06 13:02:28 -05:00
Alena Laskavaia
d3718b536f Bug 458091 - Debug frames - cache part II
- added more comments and fixed copyright
- changed one the functions in cache class from private to public
- changed request for stack frames to request for stack depths in
getFrames fallback
- removed an extra private function which is not used anymore

Change-Id: I405e0ad61c6f9bf00bdccd041c0897f423f0b947
2015-02-04 14:24:07 -05:00
Simon Marchi
3cf7241ccb debug tests: Remove fWait field from GDBProcessesTest
Re-using the waitor between tests possibly a dependency between tests
(e.g. on the order they are ran). It would be easy to forget to add an
fWait.waitReset() to a test and break another test.

It is safer to create a new one every time, while the performance hit is
negligible.

Change-Id: I404d240b29dddffb07899e7e529e7205282bd1d2
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-04 11:26:29 -05:00
Simon Marchi
a96fcd5a37 debug tests: MIMemoryTest: Use assertEquals instead of assertTrue when
possible

Change-Id: If9fc8f3f0f1f2070b7bc4ea6dc23778001dc0092
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-04 11:22:18 -05:00
Alena Laskavaia
d41b69136d Bug 458091 - Debug frames - cache
- Implemented cache for stack trace (replaces original stack depth
cache with a cache of frames and depth)
 - This is mostly done to mitigate bugs in gdb but it will also help
speed up the debugger since the mi cache doesn't cache commands with
different limits and does not know that if we requested frames already
we don't need to ask about stack depth anymore
 - In case of unrecoverable errors I will also return some constant
depth like 5, later the front end will ask to fill it up and in many
cases gdb will be happy to do that, even if it failed to report the
proper depth in the first place. We originally just returned 1 but it is
really not enough for most of the cases. This will result in potential
white gaps at the end of trace, but it is better then showing just the
first frame when we have errors

Change-Id: I24b42fd7ffea082e8064a9c5348fd95c5f7777be
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
2015-02-02 10:22:56 -05:00
Simon Marchi
59854a48cd debug tests: Factor out duplicated code in MIMemoryTest.memoryCachedRead
Change-Id: I8ee7883e96e99d2daebe7a3748d4e5e6b3a165fe
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-01 20:47:19 -05:00
Simon Marchi
9ae9ed49f6 debug tests: Use SyncUtil's memory functions in MIMemoryTest
Change-Id: I47b9e4e65d418743da97bfddb78bfdce29f3c688
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-01 20:46:06 -05:00
Simon Marchi
e11bdc4502 debug tests: Use SyncUtil.readMemory in PostMortemCoreTest
Change-Id: I2572e7f9bef8512bd32df7c040f3f12506dc5453
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-01 20:44:45 -05:00
Simon Marchi
5500e418c9 debug tests: Use SyncUtil.readMemory in GDBConsoleSynchronizingTest
Change-Id: Ied75ccb790842a746f09e3d7b51bb9225891af96
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-02-01 20:41:45 -05:00
Marc Khouzam
624446b2c3 Bug 458499 - Unable to debug when GDB command contains additional
arguments

Change-Id: I0cfb07dd04d28062a653f76dbd23510d712e4c71
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-01-30 16:14:15 -05:00
Simon Marchi
b662f3b063 debug tests: Add memory access functions to SyncUtil
Unlike those in AsyncCompletionWaitor, these functions are based on
queries. The patch also changes occurences in MIMemoryTest where it
makes sense to use synchronous functions.

Change-Id: Id5e47b7634153d916bf896e47f6cc48f1a4727bd
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-01-30 15:17:55 -05:00
Alena Laskavaia
5df84dcfe0 MIStack correct code style
- removed trailing whitespace
- added/removed curly braces according to cdt style
- corrected indentation using tabs only policy

Change-Id: I605f68ed47753e0486aef42049f2e7392cadf9d0
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
2015-01-29 14:43:39 -05:00
Alvaro Sanchez-Leon
d95f95521e Bug 458566 - [visualizer] NPE Closing the visualizer when the debug view is not present
Change-Id: I330a91f78504c4430dc39bd58dfb309a3ef6c18a
2015-01-27 13:17:36 -05:00
Alena Laskavaia
5a7e047ab5 Bug 458091 - Debug frames are missing or not shown in some cases
- one case where debugger fails to return stack depth, but returns
correct stack frames
- second case where debugger fails to return stack frames when asked
without limit, but can return a specific frame

Both of these are workaround for GDB bugs where it fails to return data
consistently

Change-Id: I4fb0d4e850fbce6adc655849ec3f73c85adb1bdc
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
2015-01-26 10:46:11 -05:00
Marc Dumais
674e89ad8f Bug 458076 - [visualizer] load of some cores missing when there are
multiple CPUs

Change-Id: Ice5e6d7447336ddaf678d37854783eff349e22bb
2015-01-26 08:17:25 -05:00
Simon Marchi
80ff1f872f debug tests: Factor out test in GDBConsoleSynchronizingTest
Factor out the code for testSettingVariableWithSet and
testSettingVariableWithPrint.

testSettingVariableWithSetWithMemory is not exactly the same, so I
didn't factor it out.

Change-Id: Ib4e79eda4851ec2291fcf32054694b76e40c65ca
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2015-01-25 10:18:36 -05:00
Alena Laskavaia
7124bcc621 Enhanced Expressions: menu for add locals and registers in dsf
Added a popup menu in expressions menu to add locals group
and registers group - for discoverability of this feature.

The menus are added to generic dsf but the command handlers 
added to the gdb plugin, just in case somebody wants to implement
this for another dsf based debugger

Change-Id: Iab64e2a9f3a0c81f8bac939a2a5e94c67ef1daba
2015-01-23 20:14:12 -05:00
Marc Khouzam
b36c74eb6a Bug 214398: Small cleanup
Change-Id: Iff09cb9815bfc9913ad6cc69a94e6fe8f4cb4251
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-01-22 14:07:58 -05:00
Marc Khouzam
8855a845a3 Bug 456959 - Unit tests for bp after restart bug
Change-Id: Id25d6a6c7c2e094b5308ca42e2f1fa24c260f6af
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-01-21 08:13:07 -05:00
Alvaro Sanchez-Leon
6dda632d25 Bug 456959-Breakpoint Enable does not work after restarting the application
Change-Id: I97e1256a3c718ed653ad255bffe1fa67ae5368c2
2015-01-19 16:49:51 -05:00
Marc Khouzam
1e441c619d Missing @since tag
Change-Id: I26236d4b7d4b3bab5d06faf728209768efb15299
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-01-19 15:51:51 -05:00
Alena Laskavaia
8db788ee92 Bug 214398: Implement Load Symbols and Load Symbols for All
- switched default ui from actions to commands
- for DSF implemented this in DSF GDB
- for CDI implemented command wrappers
- created new API to support loading symbols in IModules service
(IModules2)

Change-Id: Id44f42fa9f0f3d7f22ff7dda07c0830262667d9c
2015-01-19 14:58:18 -05:00
Simon Marchi
41065c06e1 Debug BaseTestCase: don't swallow exception
Catching the exception and asserting false just hides the real reason,
making failures harder to debug.

Change-Id: I1a73fb5893da2762d0b9a9a496749643471f75b4
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/39787
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-01-16 14:43:20 -05:00
Simon Marchi
ac6e5420d9 debug tests: Remove runToLine
runToLine uses gdb's -exec-until, which has a very strange and
unpredictable behaviour. It is safer to use runToLocation, which uses a
temporary breakpoint + continue.

Change-Id: If7bbbdd12570b50f38eb92f1748d10dff96f1f45
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/39769
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-01-16 14:42:04 -05:00