[if gte mso 9]>

Re: [edk2] Debugging a application running on NT32 Emulator using Intel EDK debugger tool

Subject: Re: [edk2] Debugging a application running on NT32 Emulator using Intel EDK debugger tool

From: "Fan, Jeff" <jeff.fan@intel.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2014-09-26 14:19:16

Try add <BuildOption> for your module as below in DSC file, also please use DEBUG mode build.

 

  MdeModulePkg/Application/HelloWorld/HelloWorld.inf {

    <BuildOptions>

      MSFT:*_*_*_CC_FLAGS = /Od

  }

 

Jeff

 

From: partha sarathi swain [mailto:partha161.silicon@gmail.com]
Sent: Friday, September 26, 2014 12:45 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Debugging a application running on NT32 Emulator using Intel EDK debugger tool

 

I tried this but not able to succeed. My observation are

1. When i Build in NOOPT mode with a break point in the source file, the Debugger lands up in a Disassemble code .

2. when I Build in DEBUG mode it lands up at the application entry point (ProcessModuleEntryPointList) .

 the following observations also i got 

 

1. when i put a break point in a sample driver code (UDK2014.MyWorkSpace\MyWorkSpace\MdeModulePkg\Universal\DriverSampleDxe\DriverSample.c). While launching SecMain.exe it breaks (loading of the driver  ) at the point where the break point is given. but while opening the form (my first setup page) it does not breaks. 

 

What i am suspecting is the symbol files of a particular application (Helloworld.pdb) is not properly linked with the symbol file of the emulator application (secmain.pdb) for which Debugger is not able to debug inside the application source code. (helloworld.c)  


 

~ParthaS

 

On Thu, Sep 25, 2014 at 2:07 PM, Fan, Jeff <jeff.fan@intel.com> wrote:

Try using build option /Od in DSC file for you application to disable compiler optimization.

 

Jeff

From: partha sarathi swain [mailto:partha161.silicon@gmail.com]
Sent: Thursday, September 25, 2014 12:59 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Debugging a application running on NT32 Emulator using Intel EDK debugger tool

 

 

Scott,

I tried the same (build using NOOPT) still i am not able to go inside the source code of any application while debugging. Whenever i put a break point inside the source of the application, While debugging it breaks at   "ProcessModuleEntryPointList " of  "\MdePkg\Library\UefiApplicationEntryPoint\ApplicationEntryPoint.c" .  Is there any way to debug any source file while running the application in NT32 Emulator ?

 

Thanks & Regards

 

Partha Sarathi Swain

 

On Wed, Sep 24, 2014 at 6:42 PM, Scott Duplichan <scott@notabs.org> wrote:

partha sarathi swain [mailto:partha161.silicon@gmail.com] wrote:

]Jeff,
]I tried the same before, but when we put the break point in some application Source file ](Suppose in helloworld.c) and attach to VS2010  it will land at entry point of the ]application  i.e  ProcessModuleEntryPointList (NOT INSIDE THE SOURCE FILE). Is there any other ]way ?

For the best source level debugging support you must use a NOOPT (no optimization) build. The EDK2 DEBUG and RELEASE builds are both fully optimized, resulting in inlined functions and register variables. The Microsoft debugger doesn't handle either of these well.

NOOPT builds are not enabled by default in EDK2 code. But enabling the NOOPT build is easy. Just make this change to your .dsc file:

      BUILD_TARGETS = DEBUG|RELEASE
   to BUILD_TARGETS = DEBUG|RELEASE|NOOPT

Then change your build.exe command line to use '-b NOOPT' in place of '-b DEBUG'.

Thanks,
Scott

]Thanks & Regards
]
]Partha Sarathi Swain
]ASD Dept.
]LSI India Research and Development Center,
]Bangalore-560103.
]
]-----------------------------------------------------------------------------------------------]---------------------------------------------------
]"The earth is round and the place which may seem like the end may also be the beginning"
]-----------------------------------------------------------------------------------------------]---------------------------------------------------
]

]On Wed, Sep 24, 2014 at 2:28 PM, Fan, Jeff <jeff.fan@intel.com> wrote:
]Debugging NT32 emulator does not need Intel UDK Debugger and SourceLevelDebugPkg.
]
]Attach SecMain.exe and put one CpuBreakpoint () in your code and use Visual Studio to do source ]debugging.
]
]From: partha sarathi swain [mailto:partha161.silicon@gmail.com]
]Sent: Wednesday, September 24, 2014 4:21 PM
]To: edk2-devel@lists.sourceforge.net
]Subject: [edk2] Debugging a application running on NT32 Emulator using Intel EDK debugger tool
]
]Hi all,
]I have developed an application using UDK2014 and tested it on NT32 emulator.
]Now i put a software interrupt so that i can attach the process (SecMain.exe) to a debugger.
]I started Intel EDk Debugger tool and kept the channel as "PIPE"  like one below
]
][Debug Port]
]Channel = PIPE
]Port = PipeName
]
]But i am not able to debug the source. Pipename is not listed in the process handles.
]
]Note: i have included the "SourcelevelDebugPkg"   in Nt32Pkg.dsc.
]
]Could you please suggested me a way to debug the application running in NT32 emulator.
]
]Thanks & Regards
]
]Partha Sarathi Swain



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

 


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel