Commit 6b23f777223166d99e88402ddcf3583c3dda9b4c
1 parent
8d18e893
printf format fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3645 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
1 deletions
linux-user/strace.c
@@ -271,7 +271,7 @@ print_syscall(int num, | @@ -271,7 +271,7 @@ print_syscall(int num, | ||
271 | abi_long arg4, abi_long arg5, abi_long arg6) | 271 | abi_long arg4, abi_long arg5, abi_long arg6) |
272 | { | 272 | { |
273 | int i; | 273 | int i; |
274 | - char *format="%s(%ld,%ld,%ld,%ld,%ld,%ld)"; | 274 | + char *format="%s(" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld ")"; |
275 | 275 | ||
276 | gemu_log("%d ", getpid() ); | 276 | gemu_log("%d ", getpid() ); |
277 | 277 | ||
@@ -280,6 +280,8 @@ print_syscall(int num, | @@ -280,6 +280,8 @@ print_syscall(int num, | ||
280 | if( scnames[i].call != NULL ) { | 280 | if( scnames[i].call != NULL ) { |
281 | scnames[i].call(&scnames[i],arg1,arg2,arg3,arg4,arg5,arg6); | 281 | scnames[i].call(&scnames[i],arg1,arg2,arg3,arg4,arg5,arg6); |
282 | } else { | 282 | } else { |
283 | + /* XXX: this format system is broken because it uses | ||
284 | + host types and host pointers for strings */ | ||
283 | if( scnames[i].format != NULL ) | 285 | if( scnames[i].format != NULL ) |
284 | format = scnames[i].format; | 286 | format = scnames[i].format; |
285 | gemu_log(format,scnames[i].name, arg1,arg2,arg3,arg4,arg5,arg6); | 287 | gemu_log(format,scnames[i].name, arg1,arg2,arg3,arg4,arg5,arg6); |