From patchwork Wed Apr 20 06:49:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1619337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=NIohYcMe; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kjrsq09bXz9sG0 for ; Wed, 20 Apr 2022 16:50:55 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Kjrsp5pNyz2ymg for ; Wed, 20 Apr 2022 16:50:54 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=NIohYcMe; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::42c; helo=mail-pf1-x42c.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=NIohYcMe; dkim-atps=neutral Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Kjrsm5Fz1z2yZf for ; Wed, 20 Apr 2022 16:50:52 +1000 (AEST) Received: by mail-pf1-x42c.google.com with SMTP id a15so1074698pfv.11 for ; Tue, 19 Apr 2022 23:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nKk/gZRMHwNWNDODaUe50aLpbfbiB1HZCYurD9HyTLY=; b=NIohYcMe63U1MyTWLMQoI5/fCkg9IOVxkpQQnWS76l8C6yoIdy2I4ciNeRZpxYRJ1D Uo9tysMG+Q6cmxUZyh/5jDkKjLZrBhAVNKDg2iwnWjDbr64FJYdU7HM30SYc3ZgxFPjU U9IzG3562ZvMdH+hTRI2IYW8bMsfaDroHwMw24dUxxp6Jl7u2MNuH13Yy2QRzRmhow7z ERxGawVG+6r7vhfbVT6MYACgki5QQoccnYrtHJFCiahb8no+XN0rQTSeqWp2ZMIV3RDQ OIxFKrLD5vFik8C7UsVbxilU0X+lTpNmTfuYmOGKFu1MmDa0gcXB63TpDpmxi55SHBCO BcSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nKk/gZRMHwNWNDODaUe50aLpbfbiB1HZCYurD9HyTLY=; b=3DmkBDwcgyS4l+vkp7QR3yotJIZiEnJe4BPaEiLYaO3DO9Y9h1pL8PBkODm2+EJm8D 5TneE9mmBxggRVGbyCaisTc2xgAvNxGv0XoVYWENZpI5z81ONA6bVn0DpHu74oKJ5crG lgcx5NefHsIW3OYCLHoIZhMs4YVEkhoa9iKt7feMd7xzuq/Ifs2NhwGLjgE8R3N0Y+re MubSlg6vHhrUYLPdOKdZSkF4ZfkVl40Q0ivixTVnhq3HU5tm+SIxMT7lD7xOJ2AGYRj2 zW6Bcamyr0t0gaNNMSdMcen7Hq/j/cvU3KPKIJoVdqmYhjCeGA9UtOW7koQrV9klyd2b pvMg== X-Gm-Message-State: AOAM53090pJIW45DR6xci8pvm32EaDhUwkbSJzxFqWV0ZwBDITOZayTi W/0mA5N0iFaAktIMdULhghOEddydS9p0Kg== X-Google-Smtp-Source: ABdhPJxKerpumtcdtcroUq0HTab7EyjcqPQsWTq4QkCTQstB6mutiYWpozPkO/CyRFv4aJ6cI36wRQ== X-Received: by 2002:a63:a902:0:b0:398:cdd3:f85e with SMTP id u2-20020a63a902000000b00398cdd3f85emr18026318pge.122.1650437449862; Tue, 19 Apr 2022 23:50:49 -0700 (PDT) Received: from bobo.ozlabs.ibm.com ([203.221.203.144]) by smtp.gmail.com with ESMTPSA id x20-20020aa79574000000b005061f4782c5sm18481235pfq.183.2022.04.19.23.50.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 23:50:49 -0700 (PDT) From: Nicholas Piggin To: pdbg@lists.ozlabs.org Date: Wed, 20 Apr 2022 16:49:45 +1000 Message-Id: <20220420065013.222816-12-npiggin@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420065013.222816-1-npiggin@gmail.com> References: <20220420065013.222816-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v2 11/39] gdbserver: reduce PR_INFO noise X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Printing the first byte of the received packet in hex on its own line is not very useful and clutters debug output. We print the full received packet anyway which is generally quite readable. Remove the first byte info line, and replace it with a debug line that contains the entire hex string as hex bytes. Signed-off-by: Nicholas Piggin Reviewed-by: Joel Stanley --- src/pdbgproxy.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pdbgproxy.c b/src/pdbgproxy.c index 4c6327fb..9e5e7d80 100644 --- a/src/pdbgproxy.c +++ b/src/pdbgproxy.c @@ -396,9 +396,15 @@ static int read_from_client(int fd) PR_INFO("0 bytes\n"); return -1; } else { + int i; + buffer[nbytes] = '\0'; - PR_INFO("%x\n", buffer[0]); PR_INFO("Recv: %s\n", buffer); + pdbg_log(PDBG_DEBUG, " hex: "); + for (i = 0; i < nbytes; i++) + pdbg_log(PDBG_DEBUG, "%02x ", buffer[i]); + pdbg_log(PDBG_DEBUG, "\n"); + parse_buffer(buffer, nbytes, &fd); }