Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
903fb9b
commit 7a1a542
Showing
5 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,6 +144,7 @@ set(BASIC_TESTS | |
prw | ||
ptrace | ||
rdtsc | ||
read_big_struct | ||
save_data_fd | ||
sched_setaffinity | ||
sched_yield | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* -*- Mode: C; tab-width: 8; c-basic-offset: 8; indent-tabs-mode: t; -*- */ | ||
|
||
#include "rrutil.h" | ||
|
||
static void breakpoint(void) { | ||
int break_here = 1; | ||
(void)break_here; | ||
} | ||
|
||
/* FIXME: we should be able to send arbitrarily large structs over the | ||
* debugging socket. This is a temporary hack. */ | ||
struct big { | ||
char bytes[8192]; | ||
}; | ||
|
||
int main(int argc, char *argv[]) { | ||
struct big big; | ||
|
||
memset(&big, 0x5a, sizeof(big)); | ||
|
||
breakpoint(); | ||
|
||
atomic_puts("EXIT-SUCCESS"); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from rrutil import * | ||
|
||
send_gdb('b breakpoint\n') | ||
expect_gdb('Breakpoint 1') | ||
|
||
send_gdb('c\n') | ||
expect_gdb('Breakpoint 1, breakpoint') | ||
|
||
send_gdb('f 1\n') | ||
expect_gdb('(gdb)') | ||
|
||
send_gdb('p big\n') | ||
expect_gdb(" bytes = 'Z'") | ||
|
||
ok() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source `dirname $0`/util.sh read_big_struct "$@" | ||
debug_test |