aboutsummaryrefslogtreecommitdiff
path: root/gdb/testregs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testregs.c')
-rw-r--r--gdb/testregs.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/testregs.c b/gdb/testregs.c
new file mode 100644
index 0000000..7a5acb3
--- /dev/null
+++ b/gdb/testregs.c
@@ -0,0 +1,20 @@
+typedef struct aa { int b;} *hack;
+
+static int
+foo (argc)
+{
+ register int a = 0x1234;
+ register int b = 0x56788765;
+ register char *x = (char *) 0xabababab;
+ register char *y = (char *) 0xcdcdcdcd;
+ register double d = 1.582;
+ int loser;
+ printf ("Address of loser is 0x%x.\n", &loser);
+ printf ("Address of argc is 0x%x.\n", &argc);
+ abort ();
+}
+
+main (argc)
+{
+ foo (argc);
+}