public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"mhaeuser@posteo.de" <mhaeuser@posteo.de>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>
Subject: Re: [edk2-devel] SLDP: Usage of PE library context by debugger?
Date: Mon, 2 Aug 2021 03:09:16 +0000	[thread overview]
Message-ID: <CO1PR11MB493056B4B85BA407A8E7A6888CEF9@CO1PR11MB4930.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20b13677-098e-6105-bbd6-c708321f839a@posteo.de>

Marvin,
Host assumes first 8-byte (little endian) of memory pointed by DR2 is the value of Image base address.
DR1 points to the PDB path (I am sure you noticed that in the SourceLevelDebugPkg code).

There is no plan to provide detailed documentation of host/client communication protocol. So far, the brief explanation can be seen in SourceLevelDebugPkg\Include\TransferProtocol.h.

I admit that if the old me had the mindset of today's me, a detailed markdown doc should have been provided in SourceLevelDebugPkg.
I will check internally on the open source plan, but please don't heavily rely on that.

Thanks,
Ray

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marvin H?user
Sent: Sunday, August 1, 2021 1:21 AM
To: devel@edk2.groups.io
Cc: Wu, Hao A <hao.a.wu@intel.com>
Subject: [edk2-devel] SLDP: Usage of PE library context by debugger?

Good day everyone,

While refining the port of SourceLevelDebugPkg to my newly proposed PeCoffLib rework (RFC upcoming), I noticed that the address of the PE Image context is written to DR2 [1]. Because the UDK and Intel System Studio debugging tools are closed source, I cannot verify what happens to this value. Does the host read the library context and retrieve data from it? If not, why is its address written to DR2? If so, this would mean the new PeCoffLib implementation breaks the existing debugging tools. The following questions would arise:

1) Which data are retrieved from the context structure? For GDB, I think only the Image address and symbol file path are required (to load the symbols), while PDB is saved in DR1 already.
2) Are there any plans to provide detailed documentation of the host/client communication protocol?
3) Are there any plans to provide an open source debugger, or at least the EDK II communication protocol portion?

Thank you for your time!

Best regards,
Marvin


[1]
https://github.com/tianocore/edk2/blob/610bcc69ed3d1e8c016332a1862465d41d95dd6c/SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.c#L126






  reply	other threads:[~2021-08-02  3:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31 17:21 SLDP: Usage of PE library context by debugger? Marvin Häuser
2021-08-02  3:09 ` Ni, Ray [this message]
2021-08-02  5:36   ` [edk2-devel] " Marvin Häuser
2021-08-02  4:51 ` Jeff Fan
2021-08-02  5:47   ` Marvin Häuser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO1PR11MB493056B4B85BA407A8E7A6888CEF9@CO1PR11MB4930.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox