Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2009-02-26 18:19:21 +0000
committereutarass2009-02-26 18:19:21 +0000
commit54f7d978bc4855c474e6bfefc0dfc7cd18cf7ac2 (patch)
tree43d35ff6429f89b4f8895cce7bb6f8f90361a7ce /memorymap.h
parent01777e5d12992727f56fc174fbe3b13975d74761 (diff)
downloadorg.eclipse.tcf.agent-54f7d978bc4855c474e6bfefc0dfc7cd18cf7ac2.tar.gz
org.eclipse.tcf.agent-54f7d978bc4855c474e6bfefc0dfc7cd18cf7ac2.tar.xz
org.eclipse.tcf.agent-54f7d978bc4855c474e6bfefc0dfc7cd18cf7ac2.zip
TCF Agent: Added MemoryMap module, it keeps track of memory regions and mapping.
TCF Agent: implemented special kind of breakpoints - eventpoints. TCF Agent: implemented Linux/UNIX OS loader access using DT_DEBUG, and loader call-backs using eventpoint.
Diffstat (limited to 'memorymap.h')
-rw-r--r--memorymap.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/memorymap.h b/memorymap.h
new file mode 100644
index 00000000..6e1d6b0d
--- /dev/null
+++ b/memorymap.h
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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
+ * and Eclipse Distribution License v1.0 which accompany this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * This module holds execution context memory maps.
+ */
+#ifndef D_memorymap
+#define D_memorymap
+
+#include "mdep.h"
+#include "config.h"
+
+#include "context.h"
+
+typedef struct MemoryRegion MemoryRegion;
+
+struct MemoryRegion {
+ ContextAddress addr;
+ unsigned long size;
+ unsigned long file_offs;
+ dev_t dev;
+ ino_t ino;
+ char * file_name;
+ unsigned flags;
+ void * file;
+};
+
+#define MM_FLAG_R 1
+#define MM_FLAG_W 2
+#define MM_FLAG_X 4
+
+extern void memory_map_get_regions(Context * ctx, MemoryRegion ** regions, unsigned * cnt);
+
+extern void memory_map_event_module_loaded(Context * ctx);
+extern void memory_map_event_code_section_ummapped(Context * ctx, ContextAddress addr, ContextAddress size);
+extern void memory_map_event_module_unloaded(Context * ctx);
+
+typedef struct MemoryMapEventListener {
+ void (*module_loaded)(Context * ctx, void * client_data);
+ void (*code_section_ummapped)(Context * ctx, ContextAddress addr, ContextAddress size, void * client_data);
+ void (*module_unloaded)(Context * ctx, void * client_data);
+ /* Private: */
+ void * client_data;
+ struct MemoryMapEventListener * next;
+} MemoryMapEventListener;
+
+extern void add_memory_map_event_listener(MemoryMapEventListener * listener, void * client_data);
+
+extern void ini_memory_map_service(void);
+
+#endif

Back to the top