> -----Original Message-----
> From: Leif Lindholm <[email protected]>
> Sent: Wednesday, August 1, 2018 2:39 AM
> To: Ard Biesheuvel <[email protected]>
> Cc: Chris Co <[email protected]>; [email protected];
> Michael D Kinney <[email protected]>
> Subject: Re: [PATCH edk2-platforms 3/3] Platform/Microsoft: Add
> Lauterbach debug library
> 
> On Tue, Jul 31, 2018 at 10:59:22PM +0200, Ard Biesheuvel wrote:
> > On 31 July 2018 at 22:56, Leif Lindholm <[email protected]> wrote:
> > > On Tue, Jul 17, 2018 at 02:05:45AM +0000, Chris Co wrote:
> > >> This debug library provides support for importing symbols to debug
> > >> using Lauterbach.
> > >>
> > >> Derived from: ArmPkg\Library\DebugPeCoffExtraActionLib
> > >
> > > I'm not seeing any difference between this one and the original
> > > other than the addition of the Microsoft copyright statement and
> > > updating of the debug printouts to modern style.
> > >
> > > I would be happy to take this as a patch to the original, but I
> > > don't see what benefit this copy brings. What prevents you from
> > > using the original?
> >
> > 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.  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.
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?

> We really don't want a situation where you need to hard-code which
> debugger you are using for a specific platform. And even if that is
> unavoidable, it needs to live in the main edk2 repository.
> 

Agreed

> /
>     Leif


_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to