projects
/
riscv-isa-sim.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Rename gdbserver-smoke.py to gdbserver.py.
[riscv-isa-sim.git]
/
tests
/
debug.c
1
#include <stdio.h>
2
3
char
c
=
'x'
;
4
5
void
print_row
(
int
length
)
6
{
7
for
(
int
x
=
0
;
x
<
length
;
x
++) {
8
printf
(
"%c"
,
c
);
9
}
10
printf
(
"
\n
"
);
11
}
12
13
int
main
()
14
{
15
volatile
int
i
=
42
;
16
const char
*
text
=
"constant
\n
"
;
17
int
threshold
=
7
;
18
19
// Wait for the debugger to get us out of this loop.
20
while
(
i
)
21
;
22
23
printf
(
"%s"
,
text
);
24
for
(
int
y
=
0
;
y
<
10
;
y
++) {
25
print_row
(
y
);
26
}
27
}