On 05/25/15 08:02, B Cran wrote:
> On May 24, 2015 9:31 PM, "lidonglin" <lidong...@huawei.com
> <mailto:lidong...@huawei.com>> wrote:
>>
>> Thanks for your reply.
>>
>> This method maybe only can  print some log to serial. Is there any way
> to control ovmf work flow like step by step debug?
> 
> You can run qemu with the embedded gdb server and with a bit of setup
> using scripts mentioned a while ago on this list be able to step through
> OVMF code in gdb or any other gdb-compatible debugger with full symbols.
> I don't have the details available right now but if you're interested I
> can find them.

Bruce, what happened to the nice summary you had put up under:

http://edk2.bluestop.org/w/tianocore/debugging-with-gdb/

(announced in
<http://thread.gmane.org/gmane.comp.bios.tianocore.devel/12045/focus=12091>)?

Li Donglin, in any case, please see

  http://thread.gmane.org/gmane.comp.bios.tianocore.devel/7424

FWIW, when hunting for a bug, I never bother to go through the hurdles
described in that email :)

I just add DEBUGs. They work very well. The trick is to insert *many*

  DEBUG (("%a: %d\n", __FUNCTION__, __LINE__));

statements in a function that is known to be entered. Such statements
should be added at the boundaries of basic blocks
<http://en.wikipedia.org/wiki/Basic_block>.

Such a debug log is very useful for control flow analysis (especially
with a cscope- or ctags-compatible editor, when you can jump to
functions by name), plus one can easily dig down to other functions /
log other variables too, in the next round. In many cases I find it more
useful than traditional interactive debugging -- with interactive
debugging you frequently wish you had a log.

Laszlo

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to