mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 22:01:29 +00:00
[LibOS] use struct debug_buf instead of void * in shim_tcb_t
Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
This commit is contained in:
committed by
Don Porter
parent
58cb88d2c1
commit
ceb7897320
@@ -57,6 +57,8 @@ struct shim_context {
|
||||
|
||||
#endif /* IN_SHIM */
|
||||
|
||||
struct debug_buf;
|
||||
|
||||
typedef struct {
|
||||
uint64_t canary;
|
||||
void * self;
|
||||
@@ -64,7 +66,7 @@ typedef struct {
|
||||
struct shim_context context;
|
||||
unsigned int tid;
|
||||
int pal_errno;
|
||||
void * debug_buf;
|
||||
struct debug_buf * debug_buf;
|
||||
|
||||
/* This record is for testing the memory of user inputs.
|
||||
* If a segfault occurs with the range [start, end],
|
||||
|
||||
@@ -78,7 +78,7 @@ debug_fputch (void * f, int ch, void * b)
|
||||
void debug_puts (const char * str)
|
||||
{
|
||||
int len = strlen(str);
|
||||
struct debug_buf * buf = (struct debug_buf *) SHIM_GET_TLS()->debug_buf;
|
||||
struct debug_buf * buf = SHIM_GET_TLS()->debug_buf;
|
||||
|
||||
while (len) {
|
||||
int rem = DEBUGBUF_SIZE - 4 - buf->end;
|
||||
@@ -131,7 +131,7 @@ void debug_setprefix (shim_tcb_t * tcb)
|
||||
if (!debug_handle)
|
||||
return;
|
||||
|
||||
struct debug_buf * buf = (struct debug_buf *) tcb->debug_buf;
|
||||
struct debug_buf * buf = tcb->debug_buf;
|
||||
buf->start = buf->end = 0;
|
||||
|
||||
if (tcb->tid && !IS_INTERNAL_TID(tcb->tid))
|
||||
|
||||
Reference in New Issue
Block a user