Re: [edk2-devel] Help with debugging

2021-06-23 Thread Ethin Probst
Thanks for that tip! Unfortunately, the EFI shell (or, more accurately, the way that the EFI console handles input) makes the way I use it a bit difficult. Since I use a screen reader, I use -nographic with qemu, and the EFI console doesn't seem to work well with my terminal; if I for example type

Re: [edk2-devel] Help with debugging

2021-06-23 Thread Laszlo Ersek
On 06/11/21 19:06, Ethin Probst wrote: > 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/Ri

Re: [edk2-devel] Help with debugging

2021-06-12 Thread Andrew Fish via groups.io
Ethin, USB was designed in the 90’s and people actually worried about the number of Si gates in a mouse, so a vast majority of the complexity of USB is in the USB Host Controller (XHCI is the common host controller, aka HC). The devices are just end points on the bus. The end points are abstra

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Ethin Probst
Yeah, maybe. Now I just have to figure out where to even begin with USB audio. The specs aren't useful in determining where to begin -- or at least they aren't from my POV (though that might just be my inexperience with USB/XHCI showing). On 6/11/21, Andrew Fish wrote: > > >> On Jun 11, 2021, at

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Andrew Fish via groups.io
> On Jun 11, 2021, at 4:29 PM, Ethin Probst wrote: > > Your suggestion of adding 0x240 worked. I'm able to successfully step > through the code now. Thank you! > OK that makes sense. The address in the add-symbol-file command is not the load address of the image, but the start address of the

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Ethin Probst
Your suggestion of adding 0x240 worked. I'm able to successfully step through the code now. Thank you! On 6/11/21, Andrew Fish wrote: > > >> On Jun 11, 2021, at 2:29 PM, Ethin Probst >> wrote: >> >> Initial connection and loading symbols: >> Remote debugging using :1234 >> 0x7e4b9517 in

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Andrew Fish via groups.io
> On Jun 11, 2021, at 2:29 PM, Ethin Probst wrote: > > Initial connection and loading symbols: > Remote debugging using :1234 > 0x7e4b9517 in ?? () > add symbol table from file "Build/MdeModule/DEBUG_GCC5/X64/UsbAudio.debug" at > .text_addr = 0x7e4b8000 > Reading symbols from Buil

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Ethin Probst
Initial connection and loading symbols: Remote debugging using :1234 0x7e4b9517 in ?? () add symbol table from file "Build/MdeModule/DEBUG_GCC5/X64/UsbAudio.debug" at .text_addr = 0x7e4b8000 Reading symbols from Build/MdeModule/DEBUG_GCC5/X64/UsbAudio.debug... Expanding full symbols

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Andrew Fish via groups.io
> On Jun 11, 2021, at 1:48 PM, Ethin Probst wrote: > > Okay, so I just tried exactly what you told me to do -- use > CpuDeadLoop() and then just modify index to get out of it. Here's what > I do in GDB: > - Load the EFI application and connect via target remote :1234 > - type `add-symbol-file B

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Ethin Probst
Okay, so I just tried exactly what you told me to do -- use CpuDeadLoop() and then just modify index to get out of it. Here's what I do in GDB: - Load the EFI application and connect via target remote :1234 - type `add-symbol-file Build/MdeModule/DEBUG_GCC5/X64/UsbAudio.debug 0x0007E4B8000` and ans

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Andrew Fish via groups.io
> On Jun 11, 2021, at 11:39 AM, Ethin Probst wrote: > > Hi Andrew, > How do you debug the EFI binary with LLDB? Can LLDB use GDB stubs or > does that work differently? > Ethin, Lldb is the command line debugger that comes with Xcode on Mac. There is no gdb with Xcode, so I have to use lldb

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Ethin Probst
Hi Andrew, How do you debug the EFI binary with LLDB? Can LLDB use GDB stubs or does that work differently? On 6/11/21, Andrew Fish wrote: > > >> On Jun 11, 2021, at 10:06 AM, Ethin Probst >> wrote: >> >> Hey all, >> >> So Leif and I have discussed this at length but I thought I'd reach >> out t

Re: [edk2-devel] Help with debugging

2021-06-11 Thread Andrew Fish via groups.io
> On Jun 11, 2021, at 10:06 AM, Ethin Probst wrote: > > 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 > (h