Hey all, So Leif and I have discussed this at length but I thought I'd reach out to all of you for more help.
I'm having a lot of trouble debugging my UEFI app. Here's how I do things: - I load the app using uefi-run (https://github.com/Richard-W/uefi-run) like this (from the main EDK II directory): uefi-run -b Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd Build/OvmfX64/DEBUG_GCC5/X64/Shell.efi -- -M q35 -m 24G -usb -device qemu-xhci -device usb-audio,audiodev=audio -audiodev alsa,id=audio -s -debugcon file:../debug.log -global isa-debugcon.iobase=0x402 -nographic Or: uefi-run -b Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd Build/OvmfX64/DEBUG_GCC5/X64/Shell.efi -- -M q35 -m 24G -usb -device qemu-xhci -device usb-audio,audiodev=audio -audiodev alsa,id=audio -s -debugcon stdio -global isa-debugcon.iobase=0x402 - I connect to the remote GDB stub (localhost:1234) and wait until OVMF gives me the image base. Then I use: add-symbol-file UsbAudio.debug <image base> Here's where everything breaks down. One of two things happens at this point: 1. Either I get the wrong debug information (I get source code but the image isn't loaded anymore), and resetting the system and placing a breakpoint (either software or hardware) has no effect; or 2. If I use CpuBreakpoint(), the firmware gives me the registers and the image base and entry point addresses, and then appears to just sit there waiting for something. Once I load the symbols using the image base it gives me, I can't actually do anything in the debugger; I can't list code because I get "1 in <artificial>", I can't jump into my code without triggering a general protection exception or not actually causing anything to happen... You get the idea. So I'm really, really confused on what's going wrong. Do you guys have any advice? -- Signed, Ethin D. Probst -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76402): https://edk2.groups.io/g/devel/message/76402 Mute This Topic: https://groups.io/mt/83473484/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-