Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2009-01-16 23:44:55 +0000
committerPawel Piech2009-01-16 23:44:55 +0000
commit710d2b7f0e09ad78957386e02787908caea8a72f (patch)
treeb91ec78ff174dc0714704347467062213c191f38 /org.eclipse.debug.examples.core/samples
parent9cb32841fe223aeb0c43404f71bbb8eabfaa7d52 (diff)
downloadeclipse.platform.debug-710d2b7f0e09ad78957386e02787908caea8a72f.tar.gz
eclipse.platform.debug-710d2b7f0e09ad78957386e02787908caea8a72f.tar.xz
eclipse.platform.debug-710d2b7f0e09ad78957386e02787908caea8a72f.zip
Bug 261400 - Port the PDA example debugger's virtual machine from Perl to Java
Diffstat (limited to 'org.eclipse.debug.examples.core/samples')
-rw-r--r--org.eclipse.debug.examples.core/samples/registers.pda72
-rw-r--r--org.eclipse.debug.examples.core/samples/stack.pda21
-rw-r--r--org.eclipse.debug.examples.core/samples/structures.pda21
3 files changed, 114 insertions, 0 deletions
diff --git a/org.eclipse.debug.examples.core/samples/registers.pda b/org.eclipse.debug.examples.core/samples/registers.pda
new file mode 100644
index 000000000..97fd8d409
--- /dev/null
+++ b/org.eclipse.debug.examples.core/samples/registers.pda
@@ -0,0 +1,72 @@
+def register $pc General true
+def register $sp General true
+def register $status General true
+def bitfield $status.BITS_00_07 0 8
+def bitfield $status.BITS_08_15 8 8
+def bitfield $status.BITS_16_23 16 8
+def bitfield $status.BITS_24_31 24 8
+def mnemonic $status.BITS_24_31 three 3
+def mnemonic $status.BITS_24_31 twelve 12
+def mnemonic $status.BITS_24_31 fourty_eight 48
+def mnemonic $status.BITS_24_31 one_nighty_two 192
+def register $stackdepth General true
+def register $stack[0] General true
+def register $stack[1] General true
+def register $stack[2] General true
+def register $stack[3] General true
+def register $stack[4] General true
+push 103
+pop $$pc
+push 306
+push 2
+pop $$sp
+push 400
+pop $$status
+push 5
+pop $$stackdepth
+push 12
+pop $$stack[0]
+push 45
+pop $$stack[1]
+push 146
+pop $$stack[2]
+push 215
+pop $$stack[3]
+push 251
+pop $$stack[4]
+push 306
+pop $$stack[5]
+def register $total-instructions Analysis false
+def register $add-instructions Analysis false
+def register $call-instructions Analysis false
+def register $dec-instructions Analysis false
+def register $dup-instructions Analysis false
+def register $halt-instructions Analysis false
+def register $output-instructions Analysis false
+def register $pop-instructions Analysis false
+def register $push-instructions Analysis false
+def register $return-instructions Analysis false
+def register $var-instructions Analysis false
+push 1046
+pop $$total-instructions
+push 12
+pop $$add-instructions
+push 24
+pop $$call-instructions
+push 36
+pop $$dec-instructions
+push 50
+pop $$dup-instructions
+push 62
+pop $$halt-instructions
+push 74
+pop $$output-instructions
+push 106
+pop $$pop-instructions
+push 120
+pop $$push-instructions
+push 132
+pop $$return-instructions
+push 144
+pop $$var-instructions
+halt \ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/samples/stack.pda b/org.eclipse.debug.examples.core/samples/stack.pda
new file mode 100644
index 000000000..c7fa1628b
--- /dev/null
+++ b/org.eclipse.debug.examples.core/samples/stack.pda
@@ -0,0 +1,21 @@
+push 5
+:thread_create
+exec stack
+dec
+dup
+branch_not_zero thread_create
+push finished
+output
+halt
+:stack
+push 100
+:inner
+dup
+output
+dup
+branch_not_zero descend
+return
+:descend
+dec
+call inner
+return \ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/samples/structures.pda b/org.eclipse.debug.examples.core/samples/structures.pda
index 97858b079..4cc881728 100644
--- a/org.eclipse.debug.examples.core/samples/structures.pda
+++ b/org.eclipse.debug.examples.core/samples/structures.pda
@@ -1,8 +1,29 @@
+push a
+push b
+push c
+push x
+push y
+push z
push one two three
push 1 2 3
+push I II III
var x
+var x.a
+var x.b
var y
+var y.c
+var y.d
+var y.d.1
+var y.d.2
+var y.d.3
pop $x
+pop $x.a
+pop $x.b
pop $y
+pop $y.c
+pop $y.d
+pop $y.d.1
+pop $y.d.2
+pop $y.d.3
push Done
output \ No newline at end of file

Back to the top