From nobody Wed Apr 03 17:51:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V8sl40lT9z5FWNm for ; Wed, 3 Apr 2024 17:52:00 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V8sl3622Tz44RR for ; Wed, 3 Apr 2024 17:51:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-415515178ceso834495e9.0 for ; Wed, 03 Apr 2024 10:51:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712166718; x=1712771518; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HmOdo7bXF2SlTTzWHdwu26dyp/IelbW5zybPj5j/vEA=; b=CsQPta7EM9/dHk8kGM0LMpF/qkyc8EVyBuTxfU1ceMoveMH4/FMZLx0hlv9ctC9QmT nrpHObQcaDsmryDqp0ShFjXGxZGYR1YWlbCLbqW/It2GVti1BxJYwdgcHkrUFrQlyHDO Vlt1sBJToln3SqqxX2UFaMIStcbIsfk+rNKDxm+y2PyZlkGjHN1ljP4rl8ncYwWbV4br vEuOp/k2HahcwCzIDQILkpnKdkwLlZic7ayoiXHqPLEhfxfjAVVd5KLc7O9L7F57KrTX a7CYHd6jZ+ojVHL8qeo7eqiWZc/wuPkHrp2kZnEyAE8LZHedYSgCW13PexUT4feoapxL kvrA== X-Forwarded-Encrypted: i=1; AJvYcCVdUrimKdp6HWB3D1rLhX2qnVh0eF0ML+y4PoqtKlnMQMU3GvQrIp4gSr3pSIOrjR3oPGAMkoDpnF3hc6OYfT3XB3N2yJe9RfT1tCjaSZtl4Q== X-Gm-Message-State: AOJu0Yww+w2+2Tdg8JT0jpZa25GQKMoLx3ybYc74t3UfKApvQCGdh/oF OhIWIULKbUpTmuBgP/CTmf6CjxnuqnjtBSSmwKQpG3iyyLq+ceTrVd6gqD16Km4= X-Google-Smtp-Source: AGHT+IEzKfc/VWgoKqfpDq8j7+ZCGnCHFbgjpljVd7PR4Vu8QauzL1u/m8yFicjDHaxCKx5KNzIw4Q== X-Received: by 2002:a05:600c:63c2:b0:415:611c:cb1a with SMTP id dx2-20020a05600c63c200b00415611ccb1amr257062wmb.1.1712166718211; Wed, 03 Apr 2024 10:51:58 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id g17-20020a05600c001100b004155a32841bsm15039579wmc.39.2024.04.03.10.51.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Apr 2024 10:51:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: aada453dcbaa - main - ddb: Properly pretty-print non-labeled enum values From: Jessica Clarke In-Reply-To: <202404031618.433GIPbq096540@gitrepo.freebsd.org> Date: Wed, 3 Apr 2024 18:51:47 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <452E6F8D-21DC-47B6-AE4F-F4A2C4790F0B@freebsd.org> References: <202404031618.433GIPbq096540@gitrepo.freebsd.org> To: =?utf-8?Q?Bojan_Novkovi=C4=87?= X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4V8sl3622Tz44RR On 3 Apr 2024, at 17:18, Bojan Novkovi=C4=87 = wrote: >=20 > The branch main has been updated by bnovkov: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Daada453dcbaab1b8f7d50b66add5a38e= b9e06cc3 >=20 > commit aada453dcbaab1b8f7d50b66add5a38eb9e06cc3 > Author: Bojan Novkovi=C4=87 > AuthorDate: 2024-04-03 15:47:00 +0000 > Commit: Bojan Novkovi=C4=87 > CommitDate: 2024-04-03 16:17:11 +0000 >=20 > ddb: Properly pretty-print non-labeled enum values >=20 > The ddb pretty-printer currently does not print out enum values = that > are not labeled (e.g. X | Y). > The enum printer was reworked to print non-labeled values. >=20 > Reported by: jrtc27 > Fixes: c21bc6f ("ddb: Add CTF-based pretty printing") > Approved by: markj (mentor) > --- > sys/ddb/db_pprint.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) >=20 > diff --git a/sys/ddb/db_pprint.c b/sys/ddb/db_pprint.c > index 8aa14550f068..b4116372cf65 100644 > --- a/sys/ddb/db_pprint.c > +++ b/sys/ddb/db_pprint.c > @@ -225,13 +225,14 @@ db_pprint_enum(db_addr_t addr, struct = ctf_type_v3 *type, u_int depth) > for (; ep < endp; ep++) { > if (val =3D=3D ep->cte_value) { > valname =3D db_ctf_stroff_to_str(&sym_data, ep->cte_name); > - if (valname !=3D NULL) > - db_printf("%s (0x%lx)", valname, (long)val); > - else > - db_printf("(0x%lx)", (long)val); > - break; > + if (valname !=3D NULL) { > + db_printf("%s (0x%lx)", valname, val); > + break; > + } This ignored the "(well, with 32-bit fixed)" part of my review comment = for that suggestion and rolled back d722901fa3a2 ("ddb: Fix format string errors = in db_pprint.c"). Jess > } > } > + if (ep =3D=3D endp) > + db_printf("0x%lx", val); > } >=20 > /*