Skip to contentSkip to conversation

linux-user: Improve formatting for mremap()

PATCH In review [email protected] 2 participants 2 messages Mar 7 – Mar 19

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: Improve formatting for mremap()

From: Helge Deller <[email protected]>

Improve slightly the strace output for mremap().
Print the old_address and new_address as hex values, old_size and new_size as unsigned, and the flags as integer.

---
 linux-user/strace.list | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/strace.list +1 -1
index 51b5ead969..35f001fecd 100644
@@ -641,7 +641,7 @@
 { TARGET_NR_mq_unlink, "mq_unlink" , NULL, print_mq_unlink, NULL },
 #endif
 #ifdef TARGET_NR_mremap
-{ TARGET_NR_mremap, "mremap" , NULL, NULL, NULL },
+{ TARGET_NR_mremap, "mremap" , "%s(%#x,%u,%u,%d,%#x)", NULL, NULL },
 #endif
 #ifdef TARGET_NR_msgctl
 { TARGET_NR_msgctl, "msgctl" , NULL, NULL, NULL },
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · On 3/8/26 08:34, [email protected] wrote:

From: Helge Deller <[email protected]>

Improve slightly the strace output for mremap().
Print the old_address and new_address as hex values, old_size and new_size as unsigned, and the flags as integer.

---
  linux-user/strace.list | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/strace.list +0 -0
index 51b5ead969..35f001fecd 100644

linux-user/strace.list line 647

Quoted 8 lines
linux-user/strace.list +1 -1
@@ -641,7 +641,7 @@
  { TARGET_NR_mq_unlink, "mq_unlink" , NULL, print_mq_unlink, NULL },
  #endif
  #ifdef TARGET_NR_mremap
-{ TARGET_NR_mremap, "mremap" , NULL, NULL, NULL },
+{ TARGET_NR_mremap, "mremap" , "%s(%#x,%u,%u,%d,%#x)", NULL, NULL },
  #endif
  #ifdef TARGET_NR_msgctl
  { TARGET_NR_msgctl, "msgctl" , NULL, NULL, NULL },

r~