X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=blobdiff_plain;f=debug%2Fprograms%2Fdebug.c;h=c7c23a6e83dea1bfe5b0c45058806c0110b274ed;hp=afca484e992d1229eb7664ab5b2326dce8ea76da;hb=c11808e013c7c34161d9f343cd97d5f2440c4c2e;hpb=6ccc0bdde5eea898e88961f49e755bd2b4577792 diff --git a/debug/programs/debug.c b/debug/programs/debug.c index afca484..c7c23a6 100644 --- a/debug/programs/debug.c +++ b/debug/programs/debug.c @@ -26,10 +26,14 @@ size_t strlen(const char *buf) return len; } +// TODO: These should be local to main, but if I make them global then gdb can +// find them. +static volatile int i; +static int j; int main() { - volatile int i = 0; - int j = 0; + i = 0; + j = 0; char *fox = "The quick brown fox jumps of the lazy dog."; unsigned int checksum = 0;