Author Topic: Remote DebugCenter  (Read 745 times)

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1082
  • ObjAsm Developer
    • ObjAsm
Remote DebugCenter
« 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

fearless

  • Member
  • ****
  • Posts: 577
    • Github
Re: Remote DebugCenter
« Reply #1 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.
fearless

ASUS Crosshair 8 Hero, AMD 5950X, 32GB, MSI 5700XT, NZXT Kraken Z73, Seasonic 1000W PSU

Github Twitter Mastodon Gitbook

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1082
  • ObjAsm Developer
    • ObjAsm
Re: Remote DebugCenter
« Reply #2 on: August 03, 2022, 03:49:58 PM »
Hi fearless
Yes, that is the way to go  :thumbsup:


Biterider

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1082
  • ObjAsm Developer
    • ObjAsm
Re: Remote DebugCenter
« Reply #3 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.
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

HSE

  • Member
  • *****
  • Posts: 2494
  • AMD 7-32 / i3 10-64
Re: Remote DebugCenter
« Reply #4 on: August 04, 2022, 08:09:40 AM »
Hi Biterider!

who is always one step ahead in all UEFI topics

far from that  :biggrin:

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
Equations in Assembly: SmplMath

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1082
  • ObjAsm Developer
    • ObjAsm
Re: Remote DebugCenter
« Reply #5 on: August 04, 2022, 04:20:25 PM »
Hi HSE
I'll check that.  :thumbsup:


Biterider

LiaoMi

  • Member
  • *****
  • Posts: 1055
Re: Remote DebugCenter
« Reply #6 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

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 1082
  • ObjAsm Developer
    • ObjAsm
Re: Remote DebugCenter
« Reply #7 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