The MASM Forum

Projects => ObjAsm => Topic started by: Biterider on August 03, 2022, 06:06:40 AM

Title: Remote DebugCenter
Post by: Biterider on August 03, 2022, 06:06:40 AM
Hi
My recent experience with UEFI has shown me that in this environment it is extremely difficult to debug your code and it would be extremely helpful to have some additional jit debug output streams.
The idea I want to discuss is to extend the functionality of DebugCenter to receive messages over Ethernet, using on the sender side the native communication services provided by UEFI. In this way, specifying a network address of the computer running DC allows the debuggee to send debug information to DebugCenter over the network.

Sounds simple, but it is certainly not.  :biggrin:

Biterider
Title: Re: Remote DebugCenter
Post by: fearless on August 03, 2022, 07:57:18 AM
I would use the httpserver and setup a webhook url, that way the client machine receives the debug information. So the simple client utility uses the http server and registers the webhook url to listen to, for example: http://192.168.1.100/debuginfo

The UEFI sends debug information to the all the defined webhook urls for the client to parse and display or do whatever with.
Title: Re: Remote DebugCenter
Post by: Biterider on August 03, 2022, 03:49:58 PM
Hi fearless
Yes, that is the way to go  :thumbsup:


Biterider
Title: Re: Remote DebugCenter
Post by: Biterider on August 04, 2022, 06:27:22 AM
Hi
I found some really good code at SOF that shows how to send data from a UEFI application over the network Send TCP or UDP packets from efi-application (https://stackoverflow.com/questions/67045742/send-tcp-or-udp-packets-from-efi-application).
This is the most critical part.

I would like to ask HSE, who is always one step ahead in all UEFI topics, if he has any stuff to support this debug function idea.  :rolleyes:

Biterider
Title: Re: Remote DebugCenter
Post by: HSE on August 04, 2022, 08:09:40 AM
Hi Biterider!

Quote from: Biterider on August 04, 2022, 06:27:22 AM
who is always one step ahead in all UEFI topics

far from that  :biggrin:

Quote from: Biterider on August 04, 2022, 06:27:22 AM
if he has any stuff to support this debug function idea.  :rolleyes:

In edk2 sources there is a package named NetWorkPkg with all available protocols.

HSE
Title: Re: Remote DebugCenter
Post by: Biterider on August 04, 2022, 04:20:25 PM
Hi HSE
I'll check that.  :thumbsup:


Biterider
Title: Re: Remote DebugCenter
Post by: LiaoMi on August 05, 2022, 04:03:46 AM
Hi Biterider,

maybe this example will be useful: TcpTransport - A UEFI application to receive TCP network packets - https://github.com/vinxue/TcpTransport
Title: Re: Remote DebugCenter
Post by: Biterider on August 05, 2022, 06:40:33 AM
Hi LiaoMi
As you may guess, it's the other way around, I need to send from the UEFI application.
Anyway, maybe the project you found contains useful information. I thank you for that.  :thumbsup:

Biterider