Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2015-08-03 16:13:19 -0400
committerEugene Tarassov2015-08-03 16:13:19 -0400
commit3b2aca8bd0940fd668ffe6a83d8fd1eb2334169f (patch)
tree64103009678832f9c3e251e6a474a3f076f34e66
parentc5ad89c05194786fa43d2230957ed62b824ea8ed (diff)
downloadorg.eclipse.tcf-3b2aca8bd0940fd668ffe6a83d8fd1eb2334169f.tar.gz
org.eclipse.tcf-3b2aca8bd0940fd668ffe6a83d8fd1eb2334169f.tar.xz
org.eclipse.tcf-3b2aca8bd0940fd668ffe6a83d8fd1eb2334169f.zip
TCF Core: new memory map property: KernelModule - supports debugging of Linux kernel modules
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemoryMap.java7
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java39
2 files changed, 41 insertions, 5 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemoryMap.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemoryMap.java
index b5502db56..838b41ef4 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemoryMap.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IMemoryMap.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2015 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -46,9 +46,12 @@ public interface IMemoryMap extends IService {
/** Boolean, true if the region represents BSS */
PROP_BSS = "BSS",
- /** Object, Operation System Awareness properties */
+ /** Object, Operating System Awareness properties */
PROP_OSA = "OSA",
+ /** Object, kernel module properties */
+ PROP_KERNEL_MODULE = "KernelModule",
+
/** Number, region memory protection flags, see FLAG_* */
PROP_FLAGS = "Flags",
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java
index 9b890d78f..a426bb9c7 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java
@@ -156,11 +156,44 @@ public class TCFNodeModule extends TCFNode implements IDetailsProvider {
}
}
String section = r.getSectionName();
+ Number offset = r.getOffset();
if (section != null) bf.append("File section: ", SWT.BOLD).append(section).append('\n');
- else bf.append("File offset: ", SWT.BOLD).append(toHexString(r.getOffset()), StyledStringBuffer.MONOSPACED).append('\n');
+ if (offset != null) bf.append("File offset: ", SWT.BOLD).append(toHexString(offset), StyledStringBuffer.MONOSPACED).append('\n');
+ }
+ Number addr = r.getAddress();
+ Number size = r.getSize();
+ if (addr != null) bf.append("Address: ", SWT.BOLD).append(toHexString(addr), StyledStringBuffer.MONOSPACED).append('\n');
+ if (size != null) bf.append("Size: ", SWT.BOLD).append(toHexString(size), StyledStringBuffer.MONOSPACED).append('\n');
+ @SuppressWarnings("unchecked")
+ Map<String,Object> kernel_module = (Map<String,Object>)r.getProperties().get(IMemoryMap.PROP_KERNEL_MODULE);
+ if (kernel_module != null) {
+ int cnt = 0;
+ Number init = (Number)kernel_module.get("Init");
+ Number core = (Number)kernel_module.get("Core");
+ Number init_size = (Number)kernel_module.get("InitSize");
+ Number core_size = (Number)kernel_module.get("CoreSize");
+ bf.append("Kernel module: ", SWT.BOLD);
+ if (init != null) {
+ bf.append("init addr ", SWT.BOLD).append(toHexString(init), StyledStringBuffer.MONOSPACED);
+ cnt++;
+ }
+ if (init_size != null) {
+ if (cnt > 0) bf.append(", ");
+ bf.append("init size ", SWT.BOLD).append(toHexString(init_size), StyledStringBuffer.MONOSPACED);
+ cnt++;
+ }
+ if (core != null) {
+ if (cnt > 0) bf.append(", ");
+ bf.append("core addr ", SWT.BOLD).append(toHexString(core), StyledStringBuffer.MONOSPACED);
+ cnt++;
+ }
+ if (core_size != null) {
+ if (cnt > 0) bf.append(", ");
+ bf.append("core size ", SWT.BOLD).append(toHexString(core_size), StyledStringBuffer.MONOSPACED);
+ cnt++;
+ }
+ bf.append('\n');
}
- bf.append("Address: ", SWT.BOLD).append(toHexString(r.getAddress()), StyledStringBuffer.MONOSPACED).append('\n');
- bf.append("Size: ", SWT.BOLD).append(toHexString(r.getSize()), StyledStringBuffer.MONOSPACED).append('\n');
bf.append("Flags: ", SWT.BOLD).append(getFlagsLabel(r.getFlags())).append('\n');
return true;
}

Back to the top