This adds a new service, GDBFocusSynchronizer, that helps keep the
internal GDB selection and the Debug View selection synchronized.
Change-Id: I021b3f65d61e82f6971bdb9232369b6fdf58ea5b
In non-stop mode, when the last thread of a process is resumed, the
corresponding process node icon, in the Debug View, is updated to the
"running process" one. However the node was not being automatically
refreshed, and so still showed the previous "suspended process" icon.
This fix adds the necessary Delta to refresh the process node when a
IResumedDMEvent is received.
Change-Id: Ie7d2b6aef9ae7f5906e4b54470f74ee238e13ef5
This will allow us to eventually take action (like prepare the console)
as soon as the user adds a new inferior using the gdb console and the
command add-inferior.
Change-Id: I24ff380b8442de6a88e3caa0fe6832e90e83ac99
Solaris Sparc support was removed in SWT therefore it cannot be
supported by CDT anymore.
Change-Id: Ic40f55632023fd77fd164d3e48b5ca06835c3a31
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
When a viewportChanged event and a setActive event arrived at the same
following a debug context change the two event handlers would cancel
each other out.
Change-Id: I07a8d0ff46e4ea4f4ab682a5311650fca021d75b
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Eclipse warns if a String literal does not have a `//$NON-NLS-<n>$`
entry at the end of the line. However, for historic or formatting
reasons, many such occurrences in the CDT source have an intermediate
whitespace, such as `// $NON-NLS-<n>$`
Fix these so that the whitespace is removed between the // and $
characters.
Change-Id: Idc12398fe6e9d619af1d0b1b73fb8b6180da223c
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
When using a `StringBuilder` or `StringBuffer` to create a string message,
using implicit string concatenation inside an `.append()` call will
create a nested StringBuilder for the purposes of creating the arguments,
which will subsequently be converted to a String and then passed to
the outer StringBuilder.
Skip the creation of the intermediate object and String by simply
replacing such calls with `buffer.append(a).append(b)`.
Where values are compile time String constants, leave as is so
that the javac compiler can perform compile-time String concatenation.
Ensure that NEWLINE isn't appended in such a way since it is not
a compile time constant `System.getProperty("line.separator")`
Change-Id: I4126aefb2272f06b08332e004d7ea76b6f02cdba
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
There are many opportunities for replacing `StringBuffer` with
`StringBuilder` provided that the type isn't visible from the
public API and is used only in internal methods. Replace these
where appropriate.
Change-Id: Ic2f50c5b6f3c3a4eae301bb3b40fb6faed235f79
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
In many cases a String's empty status is tested with `.equals("")`.
However, Java 1.6 added `.isEmpty()` which can be more efficient since
it compares the internal length parameter only for testing. Replace
code using the `.isEmpty()` variant instead.
Some tests for `"".equals(expr)` can be replaced with `expr.isEmpty()`
where it is already known that the `expr` is not null; however,
these have to be reviewed on a case-by-case basis.
Change-Id: I3c6af4d8b7638e757435914ac76cb3a67899a5fd
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Occurrences of `new String()` have been replaced with the equivalent `""` and
additional NON-NLS tags have been inserted in where appropriate.
Change-Id: I54cf71dcd0d5a92a675a71166d66949533de502b
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Using `new Integer` and other wrapper types such as `new Character` results in
potential extra heap utilisation as the values are not cached. The built-in
`Integer.valueOf` will perform caching on numbers in the range -128..127 (at
least) using a flyweight pattern. In addition, parsing `int` values can be done
with `Integer.parseInt` which avoids object construction.
Adjust tests such as `"true".equals(expr)` to `Boolean.parseBoolean(expr)`.
Change-Id: I0408a5c69afc4ca6ede71acaf6cc4abd67538006
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
When using memory spaces, a backend may sometimes qualify an address
to specify the memory space to which the address belongs. However, to
minimize impacts, the memory space qualifier may not always be present.
In such cases, the address is implied to belong to the "default" memory
space.
DSF-GDB currently has no means to know what is the "default" memory
space to apply in such cases.
This change introduces a new API to request the default memory space
from the memory service.
Change-Id: Icea87543b8529756aee92c6d2af95fb936f5fb9c
When an address is resolved from an expression, the resulting address
may carry a memory space provided by the backend to associate
this address to a particular memory space.
The current interface for the memory space service (e.g.
IMemorySpaces2) can be used to parse the memory space contained in the
expression.
This update adds:
1) A new API method to resolve the memory space of an
IExpressionDMAddress instance
2) The use of the memory space service to attempt to resolve the memory
space.
Note: if there is no memory space service, the memory space defaults to
an empty string, which does not affect the default behaviour i.e.
when memory spaces are not used.
Change-Id: Idfe5669b26f84ee4e3e78f96f229ced75e6ec5c3
Before calling setEnabled on the ToolItem check if it is disposed. If
thats the case, do nothing, else enable the ToolItem.
Bug: 487920
Change-Id: I1f7b9e0da7f07b2b49e3176e162b9ffb7968439b
Signed-off-by: Martin Schreiber <m.schreiber@bachmann.info>
Includes:
- CSourceLookupParticipant only did one useful thing (For DSF). When the
object being looked up is a String, as is the case when disassembly
view/editor is doing a lookup, the CSourceLookupParticipant would be the
one to do the resolution. Updated
DsfSourceLookupParticipant.getSourceName to be able to handle a String
- Changed super of DsfSourceLookupParticipant to
AbstractSourceLookupParticipant, saves duplicate code, and adds comment
about what is different about findSourceElements
- a previously missing test for an unusual case (no containers)
- Some of these methods that are only part of CDI have been
marked as such for eventual removal in Bug 484900
Change-Id: I9954b4469e9db9cb46eb117f3beba9e01634689b
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
This fix follows on from af49d7701a and
redoes the generification changes brought on by the AbstractDocument
changes for Neon M4.
The earlier fix (af49d77) made a copy of the list to work around the
casting problem, however many of the methods that work on the positions
expected access to the real list, not a copy.
For example, consider addModelPositionFirst(), it gets the
CATEGORY_MODEL list and then adds to it. If getAddressRangePositions
returned a copy, then the wrong list would be updated.
Change-Id: I36ca589ba748b66541c632182aceaf0b0b64aea4
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
A new command, ShowVersionHandler, has been added to the plug-in to
demonstrate all the pieces that need to be put in place to connect
a command to a DSF session.
Change-Id: Iefde0ba144c12ce2e580da7717b390258c0d3675
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Revert "Bug 460760: Fix DsfSourceDisplayAdapter.openEditor to avoid
ignoring editor id set in SourceLookupResult "
This reverts commit 2af7d6d592.
Change-Id: I0f2694605f95007ad1feac9a126365958d732bd4
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Fixed two FindBugs problems: (1) doing Math.abs(random.nextInt()) (which
may be negative if nextInt() returns Integer.MIN_VALUE), and (2)
creating a new Random() object for each nextInt() invocation.
Change-Id: I037a8f6c6c875c951a20beb315c54dc3759c963f
Signed-off-by: Jesper Eskilson <jesper.eskilson@iar.com>
instructions
- set update pending to false when received a late disasm result and no
context is available.
- add some trace messages helping trace the issue
Change-Id: Ia0a98ef283e871d12de4f50bad89a8d2f4e4c887
Signed-off-by: Teodor Madan <teodor.madan@freescale.com>
- Add generics for ServiceRegistration and ServiceReference
(added <?>), See Bug 322007 which added generics to OSGI
- Add generics for getAdapter, See Bug Bug 442021
- Fix calls to MessageFormat.format()
- Cross reference some unused/commented out code for dprintf with
associated @SuppressWarnings("unused")
Change-Id: I4bacb3b37b69c97ab35615413f0f1f3e71aa2092
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
- Add a note about turning pre-processor off so edits made as part of
the tutorial are not overwritten
- Add missing ConfinedToDsfExecutor for Exercise 4
- Fix typo
Change-Id: I790fc2e3f640510a665a9a29a04f20502af7c710
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
getAdaptable() in 4.5 M6 has changed to use generics, making casting its
result no longer necessary.
Change-Id: Idd943216a925576bb72c784b2c5a2a4b8e8b00d2
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
isEmpty is garantied to be as fast or faster than size and
length. It is also easier to read.
Change-Id: Ia768910c21313666aeab774963c0b6e82d825b44
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Note that
memory/org.eclipse.cdt.debug.ui.memory.traditional/.settings/.api_filters
needs to be kept because:
1- it removes warnings about implementing provisional APIs
2- that plugin sets warnings as errors, so warnings are not allowed
Change-Id: Id4bcc9cd78c4c6678ef749cfe276e5a9945efa1e
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
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
- 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
Bug 235747: Move register group actions to the command framework.
Change-Id: Ife5aefc1a1609309724db01d92a35750e25def24
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/13980
Tested-by: Hudson CI
Change-Id: Ia0191fedc9e2dcbcfa244636fbff7b0a640044d1
Reviewed-on: https://git.eclipse.org/r/37320
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
editor part name
Follow "Show Full Paths" setting in description of a source not found
editor
Change-Id: I902ebb7052df76a10861b0e9c2cc38903d71003c
Signed-off-by: Teodor Madan <teodor.madan@freescale.com>
Reviewed-on: https://git.eclipse.org/r/35887
Tested-by: Hudson CI
not translatable
Change-Id: I7c032ccf5c380c1d2445eb42575e9a6887904590
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/31233
The replacment is org.junit.Assert.
Change-Id: I44bd6da6e19f9d69f91eb1ad251bd6e259ff67a9
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/30629
Tested-by: Hudson CI
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
every debug event
Change-Id: Id281d505ee770ba492ad51a8322a4150aee60401
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/29104
Reviewed-by: Anton Leherbauer <anton.leherbauer@windriver.com>
features
Change-Id: I52a71e62f8161990657e96ef52403fd7f69698a2
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27499
This means that:
- feature.xml files now make a reference to the shared license plugin
using version 0.0.0
- feature.properties files no longer have the text for the license
- license.html and epl-v10.html files are removed as they are part
of the shared license plugin
- build.properties files no longer reference removed files
- the main pom.xml file references the license repository
Change-Id: Ibd880480de3a07597084d44cce7b822903509079
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/27250
Change-Id: Ia88fa4032483cf70f41714bddd688d754bb5451b
Signed-off-by: William Riley <william.riley@renesas.com>
Reviewed-on: https://git.eclipse.org/r/22972
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
Add IViewInMemory interface to general CDT to make it available for CDI
also.
Use IViewInMemory in DSF, and override it for the GDB case.
No need to use IViewInMemory.viewInMemory() yet, but it is put in the
new interface to be future-proof.
Change-Id: Iba9abee6b9bb459b4ec3a4fd72378f77f417643a
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/18952
Change-Id: I67683ee5c9c55ec609de7011140e67a22e6e87ea
Reviewed-on: https://git.eclipse.org/r/14669
Reviewed-by: Anton Leherbauer <anton.leherbauer@windriver.com>
IP-Clean: Patrick Chuong <pchuong@ti.com>
Tested-by: Patrick Chuong <pchuong@ti.com>
Reviewed-by: Patrick Chuong <pchuong@ti.com>
First Implementation:
* Non-stop as well as All-stop debugging
* Function / Method name validation, arguments size validation
(no arguments signature yet)
* Ctrl-F5 as short key (consistent with JDT)
* Hyper link support with Ctrl-Shift click
* Junit Test (Services part)
Change-Id: I58903b4b6b7f9fd39a827f5297ad23ac3f96186d
Reviewed-on: https://git.eclipse.org/r/11305
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
includes special handling for array indices. Furthermore, we now
require the '=' prefix for all glob-pattern expressions, including
registers.
Change-Id: If929d539b80d282df383c44d1487611fda928613
Reviewed-on: https://git.eclipse.org/r/8881
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
field editors
Also addresses:
Bug 374514 - breakpointContribution always add Widgets on top of
common properties page
Bug 374508 - breakpointContribution does not support restrictions
prior to creating the breakpoint.
- Added support for double-click action modifiers in the Disassembly
view.
- Added an "Add Breakpoint..." action to the Disassembly view as
well.
- Converted the Breakpoints view's "Add Watchpoint (C/C++)" action
to use a full breakpoint properties dialog when creating a watchpoint.
- Added an "Add Function Breakpoint (C/C++)" action to the
Breakpoints view. The action opens the full properties dialog and
allows user to enter the function name.