Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'agent/tcf/services/linenumbers.h')
-rw-r--r--agent/tcf/services/linenumbers.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/agent/tcf/services/linenumbers.h b/agent/tcf/services/linenumbers.h
new file mode 100644
index 00000000..3e43c970
--- /dev/null
+++ b/agent/tcf/services/linenumbers.h
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.
+ * You may elect to redistribute this code under either of these licenses.
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * TCF service Line Numbers
+ * The service associates locations in the source files with the corresponding
+ * machine instruction addresses in the executable object.
+ */
+
+#ifndef D_linenumbers
+#define D_linenumbers
+
+#include <framework/protocol.h>
+#include <framework/context.h>
+
+typedef struct CodeArea {
+ char * directory;
+ char * file;
+ uint32_t file_mtime;
+ uint32_t file_size;
+ ContextAddress start_address;
+ int start_line;
+ int start_column;
+ ContextAddress end_address;
+ int end_line;
+ int end_column;
+ int isa;
+ int is_statement;
+ int basic_block;
+ int prologue_end;
+ int epilogue_begin;
+} CodeArea;
+
+typedef void LineNumbersCallBack(CodeArea *, void *);
+
+extern int line_to_address(Context * ctx, char * file, int line, int column, LineNumbersCallBack * client, void * args);
+
+extern int address_to_line(Context * ctx, ContextAddress addr0, ContextAddress addr1, LineNumbersCallBack * client, void * args);
+
+/*
+ * Initialize Line Numbers service.
+ */
+extern void ini_line_numbers_service(Protocol *);
+extern void ini_line_numbers_lib(void);
+
+
+#endif /* D_linenumbers */

Back to the top