From patchwork Wed Aug 7 12:37:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 817391 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp370759wrt; Wed, 7 Aug 2024 05:39:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXt1i5OwfLl4LBk/Q6n3lIH855Wd1ZtIJXWYLSDzg1UQfp0zpm1kMc2p2ilFHylw9JebZ/Zr2UIsxrothJxF7Yv X-Google-Smtp-Source: AGHT+IEsZGCVcgJdaXfvlvXfG4EhpncEoLWRZHuksaUMy481Der8RXU8sAifw1m5AvUcPRJDJEhb X-Received: by 2002:a05:6122:2090:b0:4f6:ae65:1e10 with SMTP id 71dfb90a1353d-4f89ff60bb5mr23521083e0c.4.1723034342828; Wed, 07 Aug 2024 05:39:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723034342; cv=none; d=google.com; s=arc-20160816; b=f1v08Yr+PutG68DZIHXpHVm0s3pi5vDhNzF61zfY3wZOj1PuXRWw7oDyC77Hgcgfnx J4qjkzbeVFOr64xTB+ts7/uMHyDKPhMMps571XQzpG7l+OrOtnJrvTfTFjzd6FnH4L2V wId6FZOXfyG0vj7wRMOEZKySut3DgjegBbKdRY6DVzk23DJaY5Al3QqYeeQPJQFJjwko 1z48Jkv9oTJ0I43EsqLAvyoG4vX9U4IMZ0BjgYztJsDihGjxGfVAmduZEfiP9HSLs3BZ 3ChKmVNzfr84Mi06Wc3Xh2loOzLfzHtYVE+AH8wHSALs61nNzOE0sUsIK5zxtmgVR52J zjew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LV7ui2s92iWKf/QhDHe8ag1xXqJV4XRcoiSJcQR2FJ4=; fh=D/AfDv6rci0iju5+e6kLvugBX51V+xS8N/MVeVcMvVk=; b=RLyT6Kb9X4WD50hy1KCQyqnjefzRQdr+2bAZY0vLsEayb+xoVufHMuHyJhQcV3Eras ODzjjv8/3J2qW3P7Ai0C5b52mRUuJOOBYJmHfMBwBEpFC/RPReooCUQZrRwagAjKX0kW kVYl4qrW+mPsd/2aF875sugM6ruHOJVEoVhAK0cO47Ed3px0GqTqeOgM1EAZlK8mOBBy CkzLveJdKgztaK198x4yqFs4+MKlQqoj+vCEEp3VQ+ikPAy/l5dcU+X7qcpq6n1szPB7 Xh2YeDXR1aanee3ubrw/ywZtYfBzjYDYXbSpwhMUf6qpQ959JMe3PM5cKHgeITZ4+zvI ufNA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cJRl/lVU"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bbbb91c470si17066356d6.517.2024.08.07.05.39.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 05:39:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cJRl/lVU"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbfvK-00034c-3f; Wed, 07 Aug 2024 08:37:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbfvH-0002zT-6n for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:37:47 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbfvF-0004ic-MC for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:37:46 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-368584f9e36so919001f8f.2 for ; Wed, 07 Aug 2024 05:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723034264; x=1723639064; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LV7ui2s92iWKf/QhDHe8ag1xXqJV4XRcoiSJcQR2FJ4=; b=cJRl/lVUHSUnSSTm3RCCU75/dxNNeI9w2S3WL2JsFO0Owya1ctHXBbvbtgpx5r++V7 TZ8Y76qSvYkw1yes03E9X6BbwAbXgpcZmeGFDPI7iHzicC8RS7GeVBisLMjK2WpxJJge bF3OzQ84OEj4ZGbjsPleS/CSNGSEYUKSM3dUwFhtsV/0UlyBeC72+nl8tnXg8V+vjOPN J70aObZMxAPYoZyZgHrj89Ikvqken2L2V6hmfKMHI/lKns6enGA/YAZuw56yFf1YbO6n YggfZHBXLLBlQeN1/LGQFRq9W/4eRqQ+e2MYz/OL3dNHw3IpPrIH5fCTiN14ln/Uml7j Bnqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723034264; x=1723639064; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LV7ui2s92iWKf/QhDHe8ag1xXqJV4XRcoiSJcQR2FJ4=; b=A7EoiXkwTEyaUrzfHUspD6kBmi0yTKqZJfRE/zXYhaQ072i3+HlRrpzhVkCyJjyGdo pJSQKLw/am2R8bPY4iry9bgqHsaPq+lxe4CtajHXPxagYCtDutT6SaADQe53aG0EI6yg unub5lIOkB3kza9osp7MagTEqQR/lBX6rHYplbeufWHPXbcsOtueEloEZD70iLQckEgE aIc7LhV0dLcdZ0cDon4ft1/NljKKOAN3IQUcI/Jw2JwIILjj5/EDkr71Xu4UsBr03j8c I15GZdWXfzOW7oheUxkHNce5ANH945Hhysw8R21QbcTz/RHXkDISKC5n8UV3/VVFoYHy 9iFA== X-Gm-Message-State: AOJu0YznoHHnciAcqtxlU+Lc2w6n2SoN1EVwIChdGBx8ArzRZFwIQIN1 c6jaxlwZBeb24qXuigBaZuVAq12TgA8UnKssiP7c6Tnl/gfK+gZQgWKVBm3sd8UjrCrYM5k6Pah O X-Received: by 2002:adf:f792:0:b0:360:9bf5:1eab with SMTP id ffacd0b85a97d-36bbc0ecfeamr11358681f8f.36.1723034263586; Wed, 07 Aug 2024 05:37:43 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbcf1e0bcsm15820183f8f.30.2024.08.07.05.37.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 05:37:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Zach van Rijn , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 1/4] linux-user: Display sockaddr buffer as pointer Date: Wed, 7 Aug 2024 14:37:31 +0200 Message-ID: <20240807123734.52501-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807123734.52501-1-philmd@linaro.org> References: <20240807123734.52501-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Rather than 'raw param', display as pointer to get "NULL" instead of "0x00000000". Remove spurious space. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/strace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index b4d1098170..80f64ff40c 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -434,9 +434,9 @@ print_sockaddr(abi_ulong addr, abi_long addrlen, int last) } unlock_user(sa, addr, 0); } else { - print_raw_param("0x"TARGET_ABI_FMT_lx, addr, 0); + print_pointer(addr, 1); } - qemu_log(", "TARGET_ABI_FMT_ld"%s", addrlen, get_comma(last)); + qemu_log(","TARGET_ABI_FMT_ld"%s", addrlen, get_comma(last)); } static void From patchwork Wed Aug 7 12:37:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 817390 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp370686wrt; Wed, 7 Aug 2024 05:38:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV7+Uj9e+upxmLaYykL88nhg0CpwuFimxtUGibTgedkeYAdX7hU+ZXX5jJ3GHCasP4ENRzbHLpeIyaSvhoADtia X-Google-Smtp-Source: AGHT+IEEu8mwvPlr8vlcqqPffKQ+1VgeeQgZno7iMsPVuJXDJJAe3R0M8kj0gUrQL+Fi88IHWYdZ X-Received: by 2002:a05:6214:590a:b0:6b9:60ad:a9e2 with SMTP id 6a1803df08f44-6bb9830f744mr268696376d6.11.1723034332223; Wed, 07 Aug 2024 05:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723034332; cv=none; d=google.com; s=arc-20160816; b=qisBgy+oZcNkcRfv9rr4leQxXfKTJMsWrf4Am/pvUv/ZIOS7TinyEij9usHQRyeLIi pdEVXpidLssF8YxYiM6zmhgljGyovCKBT69uOVo2dsTHnisaWg/EeIx918cVC06tEJhL ijBVuDZeSeXphwoeRONFvR6vt8XiFnoY1w8Lfc4FT+BkbX2bZlVIq3FDZnvABQJ1CYGX 45Fi8LZj37iXkYBGO/vL9vdxLaq2oZnlaRPOh2x9d2FPwJGENykbd2pbrgtGFDrfOvkV vCdXuFIzj5IGph7ptWcqr8im5in3Z5Z5b76rK1tnzBPeUBHAk30STKCBP9DBdQaEpu/q 4Q0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rnPHm5qmilosKgT5p/Ig2S4/TLxu+gWuPX7v2WagT94=; fh=ywvbD4ylErzoB2IlWnu3L0NLvq9GVVuZHGzPWx3FgPM=; b=jLT8Bfsj9YtJ0YmtNiTbEFfuXTKfZorYE5ND2IP7S7HFtxoBedxSjHe3dnt5zMLY4V HNg4b9aikPscWNLijtxlwBt2LpWPW86+3m5PG30+WO3Dy5xdzq9hR9cUhRQ1dunSsZ0b 4A6U5GDdbCn7mPhtta1asPRsGa6V3/ZvtKzqzBRIsiAxZL7UUyrR4qMhKAlx85BQv1EX 0NpeD6TfGVT4H0xQ57eZN0u1q5X5W5NfckVfzdyY0hXYIBoGxcz//IbWzNpafiVr9CsE 8BIFlbKt9bHZoXboHpHIT5e864yFrPEQvwNyetXQqfNClMxJq4kH1GCuFNrpzteiSxOj KzMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DU5H6yUb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bbbb90f8ddsi16850686d6.493.2024.08.07.05.38.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 05:38:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DU5H6yUb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbfvQ-0003Ei-Be; Wed, 07 Aug 2024 08:37:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbfvM-0003E8-PK for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:37:53 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbfvL-0004io-5H for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:37:52 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42812945633so12825895e9.0 for ; Wed, 07 Aug 2024 05:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723034269; x=1723639069; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rnPHm5qmilosKgT5p/Ig2S4/TLxu+gWuPX7v2WagT94=; b=DU5H6yUbh64Q27BuJS467eFTyzdveZYHJxdTsuFs3Sw2h7BHaqU/I2F1f+zO38T9q6 mmrmytwVXklWhJnrOQCV12vOUaiWzpdC1Yr7WhON1PXMA0TAHjtcJFGRSzyVr26FVeUo xVgo0HXvAzNLc1r9IFQJ0W0UaSSzFRgQeaGNEaNGS7LD7WHWkzUckK/4i+4wk7YrBaVh rK4as6h+aF2NawaoQUQhmmuP3BUnGclqR+7brVM1sgDcySJhn9bAZGob17MYzw40xG2T bxXT6Q+J5eqaA52xnGG5HebHmsOuLTqWOA0kN4cTl0m+ypMPU6H8KyeiAXONYVUgc3ji g2Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723034269; x=1723639069; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rnPHm5qmilosKgT5p/Ig2S4/TLxu+gWuPX7v2WagT94=; b=kQryK3uSMGs07rfpYc+5jcTZnqZTP5bTDOljFuzgjo9G56LQUYJoHVDAkosQiCnbzb gm39R1i/uAPVzHkl4Za1Uoeyci0fO/3wV4HP9zESzREx80ygAQwSft5YyIt612z/ltgp de8hTLqMlSFn/SQZ8sMFfA+3ZQtulQYsSxgyhS2QBuPYKtt4Qg1DXSR+sqzXuqsl74IK vYyO4+pwIULrV84kJumMbiWxl4IQPo0CwnNf8fKUoYpkRCVxGoltOUZXlG2N/HBYrr3P KRe3sgCqI0RpsQlKyx+B74jezUnlfaTb9/bx7HRwOGrRazFZeGHW8M9N2Sr0l8k6jIAK ljfg== X-Gm-Message-State: AOJu0YxhJSS0zS2Yk8+h1jQp420XjQWTQnAI8NhxpVf6G3ay+AYESBTn AnfVHyhVGYiZWp6I4rKtJGAou6qKcWBtCI7dVTEi7QjoglvYfXlqJ4i3AIsI5gtKJQfwFyqZVFs j X-Received: by 2002:a05:6000:1fa2:b0:368:7ee2:b7c8 with SMTP id ffacd0b85a97d-36bbc0e6721mr14969362f8f.1.1723034269357; Wed, 07 Aug 2024 05:37:49 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbcf0c314sm15660585f8f.12.2024.08.07.05.37.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 05:37:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Zach van Rijn , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 2/4] linux-user: Factor print_buf_len() out Date: Wed, 7 Aug 2024 14:37:32 +0200 Message-ID: <20240807123734.52501-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807123734.52501-1-philmd@linaro.org> References: <20240807123734.52501-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- linux-user/strace.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 80f64ff40c..210ff86afc 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1655,6 +1655,13 @@ print_buf(abi_long addr, abi_long len, int last) } } +static void +print_buf_len(abi_long addr, abi_long len, int last) +{ + print_buf(addr, len, 0); + print_raw_param(TARGET_ABI_FMT_ld, len, last); +} + /* * Prints out raw parameter using given format. Caller needs * to do byte swapping if needed. @@ -2742,8 +2749,7 @@ static void do_print_sendrecv(const char *name, abi_long arg1) qemu_log("%s(", name); print_sockfd(sockfd, 0); - print_buf(msg, len, 0); - print_raw_param(TARGET_ABI_FMT_ld, len, 0); + print_buf_len(msg, len, 0); print_flags(msg_flags, flags, 1); qemu_log(")"); } @@ -2761,8 +2767,7 @@ static void do_print_msgaddr(const char *name, abi_long arg1) qemu_log("%s(", name); print_sockfd(sockfd, 0); - print_buf(msg, len, 0); - print_raw_param(TARGET_ABI_FMT_ld, len, 0); + print_buf_len(msg, len, 0); print_flags(msg_flags, flags, 0); print_sockaddr(addr, addrlen, 0); qemu_log(")"); From patchwork Wed Aug 7 12:37:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 817388 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp370546wrt; Wed, 7 Aug 2024 05:38:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWN2zbkzjBFguwHzlnZ7mIBrwmkDATihN/QQClIqOilO1r3p0f77bSBM5SHfVMCHPlHe49NjxAbQIlBUre5gnUZ X-Google-Smtp-Source: AGHT+IGnl2kiOi8hWcs3U15og3qoL1E8UcHWknchJc2RmLvGllxaQD1+SmSETCTeTS8Ey910waMG X-Received: by 2002:ac8:5f93:0:b0:444:d08d:6202 with SMTP id d75a77b69052e-451c798fcd3mr43040941cf.12.1723034307973; Wed, 07 Aug 2024 05:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723034307; cv=none; d=google.com; s=arc-20160816; b=qxNTPqjp7dkD+lOeE92au+LYThmtPzniBxqSD+VFcH+dsPco06xHRa49feGerAGyTb yRr+ETdsoDQioWBcrBBmzMcRx4oI5zghzDy87Y8323fU+peoSvKcrZuShzk+1sHUY2V1 biJvj4bBHfgnfrQMNiaO26VpJrHrShyJum0k+CtO3uX1gDm5uIJNp9UbHx/TJHo26JlY 1Fve3wzP73EcSw1O9UiBa/a09iyHr5dkS/9KB3E7Ze/U3Tms9R7/+9QS17Q3e8FshLKz Wu2yrnQWGr4Sj+mfgnWtmHLSOcDw4O8TmX1PsgBMixW5e37BZeYS/dPENRGbVbslh52U OhuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RpWIKWWe5ixWDtiVxOKLp+Lsc4k9VqF1doDZjHB6Yj4=; fh=ywvbD4ylErzoB2IlWnu3L0NLvq9GVVuZHGzPWx3FgPM=; b=ifCbhALjMQuQn8iKHLhINETIUS3NNalRVweXe/Wr0+o/v80ZH8y+KYlG5z9U0affiy qUUzkTiToblX5Ot29wHCW2UiGj7A9vMaYgamSKjfBXKWYZwsTo4OMhNDcF/iCqUwMJdP k6OPLY8BmFo2hugr2su0NHQ4VIkPv8JCXoDKazBiz1aNFIB/S6tmBT5mZkIG/q/Z2bKz +Va1IkfnYkwX/mdSvKcTSvDCdZpaDCZJZGOfBidRyeqUE5SLvIV2uDpk6FVQndP0ypL4 3MEUMf7YxXcmyQ0YEWsvyJo6+m16WZk2dM6c2cIByWEzyaApxtLWJmBwnTQbySNVVBUl +vkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KhgLBKF0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-451c8700f2csi14526761cf.99.2024.08.07.05.38.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 05:38:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KhgLBKF0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbfve-0003On-Lf; Wed, 07 Aug 2024 08:38:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbfvT-0003O4-Dn for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:38:00 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbfvR-0004iy-R1 for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:37:59 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-369cb9f086aso1085367f8f.0 for ; Wed, 07 Aug 2024 05:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723034275; x=1723639075; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RpWIKWWe5ixWDtiVxOKLp+Lsc4k9VqF1doDZjHB6Yj4=; b=KhgLBKF0iP7sfipXXuR0qbs2SuHbO5PYsO6oPowTecPu1sFEj3BeuvcCB/4svFB58b kENjL0HtSCkv/1o/pMg035VBhj/K107kQqxGEA9tER0oYj7bw5JYwOyEtUbeZxZRHmfr XocxUC+dgBp0BJSgYXTpstzEMHZ2Ptbw7MssqnvVzkuwFhoLQzAruB7RoXRpRLHQoWnS OXyzdZG+xVRnCPKrV/M54xlDAo6dqoGoKIE5OropIY0ijRTnOtMpT2XmwnsZP1FOvEcy +BPhC3btFa80geS4gGMj9MZ7hXSKGWeZyf5DPZo3butXeINOGDqLgdeV0RCPYfUZrFQv rQEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723034275; x=1723639075; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RpWIKWWe5ixWDtiVxOKLp+Lsc4k9VqF1doDZjHB6Yj4=; b=SJ/K9Zrp377PjIfImsR+BBb4PCg536SiMkB2cb6+BG0qF/bBvsJe0vF6CpLGPmuDlT A3U67NE3c3TUXGo3QUjU7gent8nRd/H54VLdIEcqmFau5b6pwmZAcuhAmIYPXh8eYVrL pAwjZikbJXOfUWo7/mpHa7BQ2vAiocuwbCY6/Ld+6bWmykrmOMLJdy+yUGFgMvEJY1pU tkx0MxeurCXcgpF8f/pndn/OphBDUA8s0PnjFfsiaE9rhtiwlAri9PHzOOqRfWmVOGTn c9TEMWZTBhoZJyTSqzm/QwvDvcAe2pNAAYHctYW8clZXLW5ycGscqZ0fwP9joPEAZy7j dOqQ== X-Gm-Message-State: AOJu0Yw5znK0qgfNEbOhOS0ClBWIhoSoPDtOzOwskTGcNwn6UXBAoPqn iNwrOnMpyXlCvrfNYBWb3e5wUQJ3F3Facmu1s1U5iiVrzAOMKBGkjA1PVRH42QkVZR90f+yYMrQ K X-Received: by 2002:adf:b51a:0:b0:368:30fe:ffd2 with SMTP id ffacd0b85a97d-36bbc10fb16mr13421243f8f.22.1723034275121; Wed, 07 Aug 2024 05:37:55 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbd01eff1sm15850833f8f.44.2024.08.07.05.37.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 05:37:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Zach van Rijn , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 3/4] linux-user: Add strace for sendto() Date: Wed, 7 Aug 2024 14:37:33 +0200 Message-ID: <20240807123734.52501-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807123734.52501-1-philmd@linaro.org> References: <20240807123734.52501-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- linux-user/strace.c | 15 +++++++++++++++ linux-user/strace.list | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 210ff86afc..98ef26b917 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -3127,6 +3127,21 @@ print_bind(CPUArchState *cpu_env, const struct syscallname *name, } #endif +#ifdef TARGET_NR_sendto +static void +print_sendto(CPUArchState *cpu_env, const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_sockfd(arg0, 0); + print_buf_len(arg1, arg2, 0); + print_flags(msg_flags, arg3, 0); + print_sockaddr(arg4, arg5, 1); + print_syscall_epilogue(name); +} +#endif + #if defined(TARGET_NR_stat) || defined(TARGET_NR_stat64) || \ defined(TARGET_NR_lstat) || defined(TARGET_NR_lstat64) static void diff --git a/linux-user/strace.list b/linux-user/strace.list index dfd4237d14..5a86419e7d 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1285,7 +1285,7 @@ { TARGET_NR_sendmsg, "sendmsg" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_sendto -{ TARGET_NR_sendto, "sendto" , NULL, NULL, NULL }, +{ TARGET_NR_sendto, "sendto" , NULL, print_sendto, NULL }, #endif #ifdef TARGET_NR_setdomainname { TARGET_NR_setdomainname, "setdomainname" , NULL, NULL, NULL }, From patchwork Wed Aug 7 12:37:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 817389 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp370561wrt; Wed, 7 Aug 2024 05:38:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWHinOBQd1H/V56/lxdXgU01hHBeAL9QNj3CD3ig2ssohQY3lAhRypfcGmzXG1WRKEQrZPpSgNBq92Zf4/WwQ91 X-Google-Smtp-Source: AGHT+IGgNJ7ook7hmAZHKj0WqfaxH6zi0UwhkWkuLbtFCDW8rOmMs7kac7A8v0+Mna1xoep4FjMc X-Received: by 2002:a05:6808:309c:b0:3d9:dabc:7b8d with SMTP id 5614622812f47-3db5583c9d2mr20547882b6e.48.1723034309926; Wed, 07 Aug 2024 05:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723034309; cv=none; d=google.com; s=arc-20160816; b=QDXEVMNh2Y1dbBYgNp1kMNW46uqnB/RCLHgaMT+LOrJXplaYAskz1bjHnFdK5SXteU TJP0jvJucwcY3NMp9XLZFyptY6D8tMVQZGVlDIAmyN6CuZORr5DI2M8bjwZdqTCEtH7+ YLglDj8KmcB5kFto7zdvN2PHGVv2QfWtjddRuqIW0jYkc3cY5yoOYrp5P8sHUcFGoxNg nHYEAL/cXN5pmmbTykLdc7hWeRhH824myRgl0yfiDUOegrs7eBN7LwmnrvVDvXeJdCCw YMVZQxLuMk0aWa7RVLKD+eub7to6Mxn2lJKxjiCUgXAcJk8zgP7Gs1QC671TXmTvMMfl gzYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Pq1dTXzDXbRYVMh0ReJZN5GzV4YwZOctS4OmQtmosdA=; fh=ywvbD4ylErzoB2IlWnu3L0NLvq9GVVuZHGzPWx3FgPM=; b=JSIWtCFZnlhA4DALgnyW7nXoGpDTp9utscBz6bRB7LWCBFQDFk98KNuSNQNo9CCNtO 72jalLZ4mxv3EMyz91uwK7FM5cHj9UtwpfbEq4R7yII048HmsTl67g1Y/EqkVqi3Kiss 5CM+jk4kxTVoN47+jEXhw203vHIOtXeYLX1c9Hk73uwU3godoGObB3rzCjgbnpaGIzLj uYvym7o8O+CxxbPhYyXREmrueyyHj57pTMa1mgLxTi69xJOE0wGapXY3R5hGv/+Mq1D7 UWJ0+3NVvKLXMHZvtqO7VgPncvoTBg1lcbZk9BDGhV1kFbeCBdp/i/2G4OaVhqCZzE2P N88Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=excwC3Es; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-451c87ffe05si14394581cf.497.2024.08.07.05.38.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 05:38:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=excwC3Es; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbfvk-0003Yl-Lj; Wed, 07 Aug 2024 08:38:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbfvY-0003Om-Ui for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:38:08 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbfvW-0004j8-TK for qemu-devel@nongnu.org; Wed, 07 Aug 2024 08:38:04 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3685a564bafso944691f8f.3 for ; Wed, 07 Aug 2024 05:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723034281; x=1723639081; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Pq1dTXzDXbRYVMh0ReJZN5GzV4YwZOctS4OmQtmosdA=; b=excwC3Esi70I1NSvZC3VTe/TylvQ+2MuIGK/bizV+LPl/UjRYTPh9f1CQZ0AJ8ty8E kWTmggjWrGOgzKyk/MEpu2GlrzHPs1gOhQA+hWWXPQtq+v/hpwX7CRecl62QGsBBTMQL FuYPsGUvTcAC+0t575sf4kkhhhCJq4Qbz+saYocSYwBziiu7WQ1igTJKTWd3xw7+XEDb WycuX1V56C7meQHL/KrnGjKCeYgi102nEr8f4yn9vL+P/EGEEAacEPh/3YMZOGnNp//h XxFK3ePnlRIuT7+IOblkUgnJHsfwAMS8QNLIeTs/OHjBy8AKwLAxfpSIxck/vYsfCGUw BHTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723034281; x=1723639081; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pq1dTXzDXbRYVMh0ReJZN5GzV4YwZOctS4OmQtmosdA=; b=U9xJAYY9v5AYJNzrxIBHk+UcMICXBfvnhKxGUEWegWfJhI1xc1xrchURkzMq6bCocM Y6Ybg2xfY/GdxHDQAtkzjtZTTK/T4idOV/U0MJ5iDEDDtiAWrNfC/WRLloNnX1+icdAS aMzVnhSvUtul+csEnfGwRfqwXz8Q5DrQOrz8C4XuM/AAA7hgOAI8VLhTJ58zre5TaRF5 L1uo++Bgg26jD+wmSLKCpm5/kSduOtyXNsYMjqslPi8m8f80XbBWs+qosTh5A6nHAIIw oGDMBxn1v/KwbcqJbpX2LAfSJNNLm4HpgMY3pmXRF54pF3/iE3Or3xFZ56h0gINgcwX7 9b0w== X-Gm-Message-State: AOJu0YzrtJxNys3O+J4bh2DSahesa6ySIMI8gIY/okSx5tX2iIRX0z0/ 5tuFJjJXnIhPPSldf+9ztod4PgQRRcwCiGtJZeXSex3hblpdcTc1fRYnTHw3PQIA8q2561Zc8Hp D X-Received: by 2002:adf:dd87:0:b0:367:f104:d9e8 with SMTP id ffacd0b85a97d-36bbc16102bmr12385015f8f.47.1723034280721; Wed, 07 Aug 2024 05:38:00 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbcf0de1csm16027213f8f.4.2024.08.07.05.37.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 05:38:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Zach van Rijn , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 4/4] linux-user: Add strace for recvfrom() Date: Wed, 7 Aug 2024 14:37:34 +0200 Message-ID: <20240807123734.52501-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807123734.52501-1-philmd@linaro.org> References: <20240807123734.52501-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- linux-user/strace.c | 19 +++++++++++++++++++ linux-user/strace.list | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 98ef26b917..d76907fdc9 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -3127,6 +3127,25 @@ print_bind(CPUArchState *cpu_env, const struct syscallname *name, } #endif +#ifdef TARGET_NR_recvfrom +static void +print_recvfrom(CPUArchState *cpu_env, const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + abi_ulong addrlen; + + get_user_ualx(addrlen, arg5, 0); + + print_syscall_prologue(name); + print_sockfd(arg0, 0); + print_buf_len(arg1, arg2, 0); + print_flags(msg_flags, arg3, 0); + print_sockaddr(arg4, addrlen, 1); + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_sendto static void print_sendto(CPUArchState *cpu_env, const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index 5a86419e7d..77ca824f9c 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1135,7 +1135,7 @@ { TARGET_NR_recv, "recv" , "%s(%d,%p,%u,%d)", NULL, NULL }, #endif #ifdef TARGET_NR_recvfrom -{ TARGET_NR_recvfrom, "recvfrom" , NULL, NULL, NULL }, +{ TARGET_NR_recvfrom, "recvfrom" , NULL, print_recvfrom, NULL }, #endif #ifdef TARGET_NR_recvmmsg { TARGET_NR_recvmmsg, "recvmmsg" , NULL, NULL, NULL },