public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Chris Co <Christopher.Co@microsoft.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [PATCH edk2-platforms 3/3] Platform/Microsoft: Add Lauterbach debug library
Date: Thu, 2 Aug 2018 12:22:37 +0100	[thread overview]
Message-ID: <20180802112237.jjhx5emkyt4fhzjb@bivouac.eciton.net> (raw)
In-Reply-To: <DM5PR2101MB11287C4AA3A0A01AB69EE492942C0@DM5PR2101MB1128.namprd21.prod.outlook.com>

On Thu, Aug 02, 2018 at 01:27:16AM +0000, Chris Co wrote:
> > > The 'data.load.elf' statement in
> > > PeCoffLoaderRelocateImageExtraAction() is particular to Lauterbach
> > 
> > Oh, right.
> > 
> > That (original) code badly needs reformatting.
> > 
> > Still, if that's the only difference - and in a debug printout, why fork the
> > module?
> > 
> > If there is a way to identify which debugger is being used, use that.
> > If not, dump all the possible strings.
> 
> Currently I didn't find a way to identify the debugger being used.

Well, it was worth a shot.

> Default behavior of the original code assumes ARM platforms use DS5
> debugger.  I could introduce a PCD or compile flag so the developer
> can indicate DS5 vs Lauterbach debugger and key the debug print off
> of that.

That would certainly be preferable over keeping a separate copy.
If we find a way to determine dynamically, that would be better.

Maybe it could even be worth to have a dynamic pcd and a menu setting,
defaulting to just printing module names and addresses/sizes if no
specific debugger has been selected? (Where the default could be
platform-specific.)

I have some theory about adding information to qemu fw_cfg to let EDK2
know it's being debugged, but clearly that won't help real platforms.

> Regarding dumping all possible strings, I am not sure exactly how
> the DS5 output string is being used.  i.e. does the DS5 software
> receive the serial info directly?  If so, does it expect to see a
> specific format?  Is the software resilient enough that it can
> handle the Lauterbach spew on the same channel?

So, this predates my involvement with edk2 - but I think it was just
added so you could copy/paste the command line needed to get symbols
in your debugger for a specific file.
(I will note here that the DS5 syntax is also suspiciously like GDB
syntax.)

/
    Leif


      reply	other threads:[~2018-08-02 11:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17  2:05 [PATCH edk2-platforms 0/3] Add Platform-Generic Packages to support Windows IoT Core Chris Co
2018-07-17  2:05 ` [PATCH edk2-platforms 1/3] Platform/Microsoft: Add SdMmc Dxe Driver Chris Co
2018-07-31 20:33   ` Leif Lindholm
2018-08-02  0:05     ` Chris Co
2018-08-02 11:38       ` Leif Lindholm
2018-07-17  2:05 ` [PATCH edk2-platforms 2/3] Platform/Microsoft: Add MsPkg Chris Co
2018-07-31 20:38   ` Leif Lindholm
2018-07-17  2:05 ` [PATCH edk2-platforms 3/3] Platform/Microsoft: Add Lauterbach debug library Chris Co
2018-07-31 20:56   ` Leif Lindholm
2018-07-31 20:59     ` Ard Biesheuvel
2018-08-01  9:39       ` Leif Lindholm
2018-08-02  1:27         ` Chris Co
2018-08-02 11:22           ` Leif Lindholm [this message]

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=20180802112237.jjhx5emkyt4fhzjb@bivouac.eciton.net \
    --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