mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Bug 489501 - [memory] Add API to resolve the default memory space id
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
This commit is contained in:
parent
f9d3a184aa
commit
2655b4a0f3
2 changed files with 28 additions and 0 deletions
|
@ -8,4 +8,12 @@
|
||||||
</message_arguments>
|
</message_arguments>
|
||||||
</filter>
|
</filter>
|
||||||
</resource>
|
</resource>
|
||||||
|
<resource path="src/org/eclipse/cdt/dsf/debug/service/IMemorySpaces.java" type="org.eclipse.cdt.dsf.debug.service.IMemorySpaces">
|
||||||
|
<filter id="403804204">
|
||||||
|
<message_arguments>
|
||||||
|
<message_argument value="org.eclipse.cdt.dsf.debug.service.IMemorySpaces"/>
|
||||||
|
<message_argument value="getDefaultMemorySpace(IDMContext, DataRequestMonitor<String>)"/>
|
||||||
|
</message_arguments>
|
||||||
|
</filter>
|
||||||
|
</resource>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -103,4 +103,24 @@ public interface IMemorySpaces extends IDsfService{
|
||||||
* select a memory space when being prompted for a memory location.
|
* select a memory space when being prompted for a memory location.
|
||||||
*/
|
*/
|
||||||
public boolean creatingBlockRequiresMemorySpaceID();
|
public boolean creatingBlockRequiresMemorySpaceID();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides the default memory space to be used in the given context.
|
||||||
|
*
|
||||||
|
* @param ctx
|
||||||
|
* a context which might <i>contain</i> one or more memory
|
||||||
|
* spaces. Contexts that may be <i>associated</i> with a memory
|
||||||
|
* space should not be passed in. E.g., an expression might be
|
||||||
|
* associated with a memory space, but it does not contain memory
|
||||||
|
* spaces, and is thus not an appropriate context for this
|
||||||
|
* method.
|
||||||
|
* @param rm
|
||||||
|
* the asynchronous data request monitor. Returns a memory space ID.
|
||||||
|
* Never null, but may be empty.
|
||||||
|
* @since 2.7
|
||||||
|
*/
|
||||||
|
default void getDefaultMemorySpace(IDMContext context, final DataRequestMonitor<String> rm) {
|
||||||
|
rm.setData(""); //$NON-NLS-1$
|
||||||
|
rm.done();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue