public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Fish via groups.io" <afish=apple.com@groups.io>
To: edk2-devel-groups-io <devel@edk2.groups.io>,
	Pedro Falcato <pedro.falcato@gmail.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>,
	Abner Chang <abner.chang@amd.com>,
	Alexei Fedorov <Alexei.Fedorov@arm.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Igor Kulchytskyy <igork@ami.com>,
	Jian J Wang <jian.j.wang@intel.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Mike Kinney <michael.d.kinney@intel.com>,
	Nickle Wang <nicklew@nvidia.com>,
	Pierre Gondois <pierre.gondois@arm.com>,
	Sami Mujawar <Sami.Mujawar@arm.com>,
	Sean Brogan <sean.brogan@microsoft.com>
Subject: Re: [edk2-devel] [PATCH v1 0/7] Add DebugMacroCheck
Date: Mon, 14 Aug 2023 17:23:08 -0700	[thread overview]
Message-ID: <D881C765-F0E7-433B-8C55-F71A9D7FF2A0@apple.com> (raw)
In-Reply-To: <CAKbZUD1UX9PuCcN8qAj3hUy04DQw1qRagaTgxVXcrXAA2M+QyQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2753 bytes --]



> On Aug 14, 2023, at 3:51 PM, Pedro Falcato <pedro.falcato@gmail.com> wrote:
> 
> On Mon, Aug 14, 2023 at 9:49 PM Michael Kubacki
> <mikuback@linux.microsoft.com <mailto:mikuback@linux.microsoft.com>> wrote:
>> 
>> From: Michael Kubacki <michael.kubacki@microsoft.com>
>> 
>> Adds a new script and build plugin called DebugMacroCheck.
>> 
>> The script verifies that the number of print specifiers match the
>> number of arguments in DEBUG() calls.
>> 
>> Overview:
>> 
>> - Build plugin: BuildPlugin/DebugMacroCheckBuildPlugin.py
>>  - Runs on any build target that is not NO-TARGET
>> - Standalone script: DebugMacroCheck.py
>>  - Run `DebugMacroCheck.py --help` to see command line options
>> - Unit tests:
>>  - Tests/test_DebugMacroCheck.py
>>  - Can be run with:
>>    `python -m unittest discover -s ./.pytool/Plugin/DebugMacroCheck/tests -v`
>>  - Also visible in VS Code Test Explorer
>> 
>> Background:
>> 
>> The tool has been constantly run against edk2 derived code for about
>> a year now. During that time, its found over 20 issues in edk2, over
>> 50 issues in various vendor code, and numerous other issues specific
>> to Project Mu.
>> 
>> See the following series for a batch of issues previously fixed in
>> edk2 discovered by the tool:
>> 
>>  https://edk2.groups.io/g/devel/message/93104
>> 
>> I've received interest from vendors to place it in edk2 to
>> immediately find issues in the upstream and make it easier for edk2
>> consumers to directly acquire it. That led to this patch series.
>> 
>> This would run in edk2 as a build plugin. All issues in the edk2
>> codebase have been resolved so this would find new issues before
>> they are merged into the codebase.
> 
> Hi,
> 
> I really like this change but I cannot stop and think that if DEBUG
> and PrintLib were ISO C compliant, we could be using normal interfaces
> with normal argument types and the compiler's intrinsic knowledge of
> printf-like functions.
> Have you explored that option for future code? See e.g
> https://godbolt.org/z/4e8d3WToT (I don't know what MSVC uses, if
> anything).
> 

I have a dream that we add an eft_print as an attribute format archetype and then do what you recommend. After all clang and gcc are open source. 

Thanks,

Andrew Fish

> -- 
> Pedro
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107746): https://edk2.groups.io/g/devel/message/107746
Mute This Topic: https://groups.io/mt/100745693/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 15387 bytes --]

  reply	other threads:[~2023-08-15  0:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 20:48 [edk2-devel] [PATCH v1 0/7] Add DebugMacroCheck Michael Kubacki
2023-08-14 20:48 ` [edk2-devel] [PATCH v1 1/7] RedfishPkg/PlatformHostInterfaceBmcUsbNicLib: Fix DEBUG macro args Michael Kubacki
2023-08-14 20:48 ` [edk2-devel] [PATCH v1 2/7] pip-requirements.txt: Add regex Michael Kubacki
2023-09-07  1:26   ` Michael D Kinney
2023-08-14 20:48 ` [edk2-devel] [PATCH v1 3/7] SecurityPkg.ci.yaml: Add debug macro exception Michael Kubacki
2023-09-07  1:42   ` Yao, Jiewen
2023-08-14 20:48 ` [edk2-devel] [PATCH v1 4/7] ArmVirtPkg.ci.yaml: " Michael Kubacki
2023-08-14 20:48 ` [edk2-devel] [PATCH v1 5/7] DynamicTablesPkg.ci.yaml: " Michael Kubacki
2023-08-14 20:48 ` [edk2-devel] [PATCH v1 6/7] OvmfPkg/PlatformCI: Disable DebugMacroCheck Michael Kubacki
2023-09-07  1:40   ` Yao, Jiewen
2023-08-14 20:48 ` [edk2-devel] [PATCH v1 7/7] .pytool/Plugin: Add DebugMacroCheck Michael Kubacki
2023-09-07  1:35   ` Michael D Kinney
2023-09-07 21:43     ` Michael Kubacki
2023-09-07 21:59       ` Michael D Kinney
2023-08-14 22:51 ` [edk2-devel] [PATCH v1 0/7] " Pedro Falcato
2023-08-15  0:23   ` Andrew Fish via groups.io [this message]
2023-08-15  0:26     ` Michael Kubacki
2023-08-15  1:12       ` Andrew Fish via groups.io
2023-08-15  0:57     ` Pedro Falcato
     [not found] <177B5B086FA2671E.12117@groups.io>
2023-08-29 23:27 ` Michael Kubacki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D881C765-F0E7-433B-8C55-F71A9D7FF2A0@apple.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox