aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.go/hello.go
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.go/hello.go')
-rw-r--r--gdb/testsuite/gdb.go/hello.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.go/hello.go b/gdb/testsuite/gdb.go/hello.go
new file mode 100644
index 0000000..6e56112
--- /dev/null
+++ b/gdb/testsuite/gdb.go/hello.go
@@ -0,0 +1,12 @@
+package main
+
+import "fmt"
+
+var myst = "Shall we?"
+
+func main () {
+ fmt.Println ("Before assignment") // set breakpoint 1 here
+ st := "Hello, world!" // this intentionally shadows the global "st"
+ fmt.Println (st) // set breakpoint 2 here
+ fmt.Println (myst) // set breakpoint 2 here
+}