summaryrefslogtreecommitdiff
path: root/plugins/python/exectracer
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-02-01 01:14:01 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-02-01 01:14:01 (GMT)
commit14e82ed268cb78d62bbba93357fede5ece5c4f7d (patch)
tree76e146d4dcf7b6db67b51eb8f75a6c5e76bf6896 /plugins/python/exectracer
parenteacb69625d51707ac0a158815a53f71fb70968ce (diff)
Provided interfaces to use debuggers in plugins.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@231 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/python/exectracer')
-rw-r--r--plugins/python/exectracer/Makefile.am6
-rw-r--r--plugins/python/exectracer/__init__.py2
-rw-r--r--plugins/python/exectracer/exectracer.py18
3 files changed, 26 insertions, 0 deletions
diff --git a/plugins/python/exectracer/Makefile.am b/plugins/python/exectracer/Makefile.am
new file mode 100644
index 0000000..9f8eeb2
--- /dev/null
+++ b/plugins/python/exectracer/Makefile.am
@@ -0,0 +1,6 @@
+
+exectracerdir = $(datadir)/openida/plugins/python/exectracer
+
+exectracer_DATA = \
+ __init__.py \
+ exectracer.py
diff --git a/plugins/python/exectracer/__init__.py b/plugins/python/exectracer/__init__.py
new file mode 100644
index 0000000..abdaa6c
--- /dev/null
+++ b/plugins/python/exectracer/__init__.py
@@ -0,0 +1,2 @@
+
+from exectracer import ExecTracer as exectracer
diff --git a/plugins/python/exectracer/exectracer.py b/plugins/python/exectracer/exectracer.py
new file mode 100644
index 0000000..2773586
--- /dev/null
+++ b/plugins/python/exectracer/exectracer.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+from pyoida import Plugin
+
+
+class ExecTracer(Plugin):
+ """Trace and replay debug executions."""
+
+ def get_action(self):
+ """Register the plugin for given actions."""
+
+ return Plugin.PGA_DEBUGGER_ATTACH
+
+ def handle_debugger(self, debugger, action):
+ """Be notify about debugger attaching or detaching."""
+
+ print "Python Hello !"