public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* DEBUG() macros in DXE driver: can’t make it work in QEMU
@ 2017-02-14 17:55 Nikolay Bodunov
  2017-02-14 18:16 ` Laszlo Ersek
  0 siblings, 1 reply; 14+ messages in thread
From: Nikolay Bodunov @ 2017-02-14 17:55 UTC (permalink / raw)
  To: edk2-devel

Hello


I compiled DXE Driver, in DEBUG_GCC49 mode, but I can’t print any debug
message.
DEBUG((-1, “Print test”))  does nothing.  Exactly as
DebugPrint(EFI_D_ERROR, “Print Test);

However, I see “Print Test” string in my *.efi binary.
I use QEMU + OMVF (OVMF was also recompliled in DEBUG_GCC49 mode, to be
sure). Serial port output is redirected to a file:
qemu-system-x86_64 -L . --bios /…/FV/OVMF.fd -hda hdd.img -serial
file:./serial_file

All I see in output file is EFI shell output messages, include one that my
driver was succesfully loaded. But no messages from DEBUG().


My conditions:

MODULE_TYPE    = DXE_DRIVER


Debug Print Library:

DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf

(BaseDebugLibNull.inf is commented, of course)


DebugPrintEnabled() returns TRUE


I also tried to set some key options manually in MdeModulePkg.dsc
afterwards, but result didn’t change:


[Components]


  MdeModulePkg/CrScreenshotDxe/CrScreenshotDxe.inf  {


    <PcdsFixedAtBuild>


gEfiMdePkgTokenSpaceGuid.gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x07

      gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F

      gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042



   <LibraryClasses>


DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf


   <BuildOptions>

      GCC:*_*_*_CC_FLAGS             = -UMDEPKG_NDEBUG

}


Code (I used it as a base): https://github.com/LongSoft/CrScreenshotDxe

Where I got wrong and what else could I try to make it work?

-- 
With best regards,
Nikolay Bodunov


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-02-16 18:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14 17:55 DEBUG() macros in DXE driver: can’t make it work in QEMU Nikolay Bodunov
2017-02-14 18:16 ` Laszlo Ersek
2017-02-14 18:28   ` Kinney, Michael D
2017-02-14 22:06     ` Nikolay Bodunov
2017-02-14 22:17       ` David A. Van Arnem
2017-02-14 22:36         ` Nikolay Bodunov
2017-02-14 23:14           ` David A. Van Arnem
2017-02-14 23:46             ` Nikolay Bodunov
2017-02-15  0:00               ` David A. Van Arnem
2017-02-15 12:39                 ` Laszlo Ersek
2017-02-16 18:05                   ` Andrew Fish
2017-02-16 18:59                     ` Laszlo Ersek
2017-02-15 10:13       ` Laszlo Ersek
2017-02-15 17:19         ` Nikolay Bodunov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox