diff options
| author | Tim Newsome <tim@sifive.com> | 2022-05-16 09:53:54 -0700 |
|---|---|---|
| committer | Tim Newsome <tim@sifive.com> | 2022-06-08 13:10:56 -0700 |
| commit | 0f07eccaf2139b129b074800cbbcfadee3b45a7e (patch) | |
| tree | cef849f89dd675cf5a6a196ee131b026d651e12b /debug/programs | |
| parent | 27dbc399e23d5f9668363706accc76911d6d31fc (diff) | |
| download | riscv-tests-0f07eccaf2139b129b074800cbbcfadee3b45a7e.zip riscv-tests-0f07eccaf2139b129b074800cbbcfadee3b45a7e.tar.gz riscv-tests-0f07eccaf2139b129b074800cbbcfadee3b45a7e.tar.bz2 | |
Test semihosting_fileio
In the original test, confirm that stdout data ends up in the OpenOCD
log.
In the new test, with `arm semihosting_fileio` enabled, confirm that
stdout data ends up in gdb's CLI.
This test requires https://github.com/riscv/riscv-openocd/pull/699.
Diffstat (limited to 'debug/programs')
| -rw-r--r-- | debug/programs/semihosting.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/debug/programs/semihosting.c b/debug/programs/semihosting.c index 2ceea8c..ea3fdde 100644 --- a/debug/programs/semihosting.c +++ b/debug/programs/semihosting.c @@ -65,9 +65,11 @@ int main() { char *filename = NULL; const char *message = "Hello, world!\n"; + const char *message2 = "Do re mi fa so la ti do!\n"; int fd; begin: fd = open(filename, O_WRONLY, 0644); write(fd, message, strlen(message)); -}
\ No newline at end of file + write(1, message2, strlen(message2)); +} |
