Skip to content

Commit

Permalink
removed linux debug
Browse files Browse the repository at this point in the history
  • Loading branch information
aodinokov committed Aug 18, 2024
1 parent d4df46c commit f18663d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions examples/c_ffi_call/value_ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,14 @@ int _call(metac_value_t * p_param_storage_val, void (*fn)(void), metac_value_t *
assert(va_list_number_cur < va_list_number);
assert(p_val_list_entries[va_list_number_cur].id == i);
#if __linux__
void **p1 = &p_val_list_entries[va_list_number_cur].va_list_c;
fprintf(stderr, "dbg:p1 %p: %p, %p p2\n", p1, *p1, *(p1+1));
// void **p1 = &p_val_list_entries[va_list_number_cur].va_list_c;
// fprintf(stderr, "dbg:p1 %p: %p, %p p2\n", p1, *p1, *(p1+1));
pvalues[i] = &(p_val_list_entries[va_list_number_cur].va_list_c);
values[i] = &pvalues[i];
va_list cp;
va_copy(cp, p_val_list_entries[va_list_number_cur].va_list_c.parameters);
vfprintf(stderr, "dbg0: %x %x %x %x %x %x\n", cp);
va_end(cp);
// va_list cp;
// va_copy(cp, p_val_list_entries[va_list_number_cur].va_list_c.parameters);
// vfprintf(stderr, "dbg0: %x %x %x %x %x %x\n", cp);
// va_end(cp);
// //va_list cp;
// va_copy(cp, p_val_list_entries[va_list_number_cur].va_list_c.parameters);
// vfprintf(stderr, "dbg1: %x %x %x %x %x %x\n", cp);
Expand Down
16 changes: 8 additions & 8 deletions examples/c_ffi_call/value_ffi_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,12 +623,12 @@ METAC_START_TEST(test_function_with_extra) {

// variadic param tests
int test_function_with_va_list(const char * format, va_list vl) {
void **p1 = &vl;
fprintf(stderr, "dbg:p1 %p: %p, %p p2\n", p1, *p1, *(p1+1));
va_list l;
va_copy(l, vl);
int i = va_arg(l, int);
va_end(l);
// void **p1 = &vl;
// fprintf(stderr, "dbg:p1 %p: %p, %p p2\n", p1, *p1, *(p1+1));
// va_list l;
// va_copy(l, vl);
// int i = va_arg(l, int);
// va_end(l);

return vsnprintf(called, sizeof(called), format, vl);
}
Expand All @@ -637,8 +637,8 @@ METAC_GSYM_LINK(test_function_with_va_list);
int test_function_with_va_args(const char * format, ...) {
va_list l;
va_start(l, format);
void **p1 = &l;
fprintf(stderr, "dbg:p1 %p: %p, %p p2\n", p1, *p1, *(p1+1));
// void **p1 = &l;
// fprintf(stderr, "dbg:p1 %p: %p, %p p2\n", p1, *p1, *(p1+1));
int res = test_function_with_va_list(format, l);//vsnprintf(called, sizeof(called), format, l);
va_end(l);
return res;
Expand Down

0 comments on commit f18663d

Please sign in to comment.