I just ended up making a bash alias to search for library class instances using
git-grep, so I thought I would share this tip with the list.
~/work/edk2/MdePkg(master)> git grep -e DebugLib --and -e 'LIBRARY_CLASS' --
*.inf
Library/BaseDebugLibNull/BaseDebugLibNull.inf:22: LIBRARY_CLASS
= DebugLib
Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf:23: LIBRARY_CLASS
= DebugLib
Library/UefiDebugLibConOut/UefiDebugLibConOut.inf:24: LIBRARY_CLASS
= DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER
DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf:24: LIBRARY_CLASS
= DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER
DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
You can add this to your ~/.bash_profile:
find_library_instance() {
git grep -e $1 --and -e 'LIBRARY_CLASS' -- *.inf
}
alias li=find_library_instance
~/work/edk2/MdePkg(master)>li DebugLib
Library/BaseDebugLibNull/BaseDebugLibNull.inf:22: LIBRARY_CLASS
= DebugLib
Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf:23: LIBRARY_CLASS
= DebugLib
Library/UefiDebugLibConOut/UefiDebugLibConOut.inf:24: LIBRARY_CLASS
= DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER
DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf:24: LIBRARY_CLASS
= DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER
DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
Thanks,
Andrew Fish
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel