emb425 using advanced platform builder debugger features james stulz program manager windows ce core...
TRANSCRIPT
EMB425EMB425
Using Advanced Platform Using Advanced Platform Builder Debugger Builder Debugger FeaturesFeatures
James StulzJames StulzProgram ManagerProgram ManagerWindows CE Core ToolsWindows CE Core ToolsMicrosoft CorporationMicrosoft Corporation
MManagementanagementTToolsools
CCommunicationsommunications& & MMessagingessaging
Device Update Agent
Software Update Services
Live Communications Server
Exchange Server
Internet Security and Acceleration Server
Speech Server
Image Update
LLocation ocation SServiceservices
MMultimediaultimedia
MapPoint
DirectX
Windows Media
Visual Studio 2005DDevelopment evelopment TToolsools
MFC 8.0, ATL 8.0
Win32NNativeative
MManagedanaged
SServer erver SSideide
LLightweightightweight
RRelationalelationalSQL Server 2005 Express EditionEDB
DDa
taata
PPro
gra
mm
ing
ro
gra
mm
ing
MM
od
el
od
el
DDevice evice BBuilding uilding TToolsools
HHardware/ardware/DDriversrivers
Windows XP DDK
Windows Embedded Studio
Platform Builder
OEM/IHV SuppliedBSP
(ARM, SH4, MIPS)OEM Hardware and Standard Drivers
Standard PC Hardware and Drivers
SQL Server 2005SQL Server 2005 Mobile Edition
ASP.NET Mobile Controls ASP.NET
.NET Compact Framework .NET Framework
Microsoft Operations Manager
Systems Management Server
AgendaAgenda
Introduction to the PB Introduction to the PB Kernel DebuggerKernel Debugger
Build RequirementsBuild Requirements
Debugger SettingsDebugger Settings
Advanced FeaturesAdvanced Features
DemoDemo
PB Kernel DebuggerPB Kernel Debugger
VC++ version 6 rootsVC++ version 6 rootsFamiliar UIFamiliar UI
Rich in featuresRich in features
System DebuggerSystem DebuggerExceptions from any processExceptions from any process
Stops interrupts while in break stateStops interrupts while in break state
Uses KITL connectionsUses KITL connections
HW Assist thru 3rd party supportHW Assist thru 3rd party support
Debugging ApplicationsDebugging ApplicationsSlightly different from eVCSlightly different from eVC
Build RequirementsBuild RequirementsRetail buildsRetail builds
This is the default buildThis is the default build
Debugger support is not onDebugger support is not on
Easy to add using PBEasy to add using PBEnable Kernel Debugger (IMGNODEBUGGER= )Enable Kernel Debugger (IMGNODEBUGGER= )
Enable KITL connectivity (IMGNOKITL=)Enable KITL connectivity (IMGNOKITL=)
Debugging optimized codeDebugging optimized codeBeware of code movementBeware of code movement
View assemblyView assembly
Set extra safety breakpointsSet extra safety breakpoints
Some variables optimized awaySome variables optimized away
Build RequirementsBuild RequirementsDebug buildsDebug builds
Not the default but easy to selectNot the default but easy to select
Debugger support is onDebugger support is on
Full debug symbols supportFull debug symbols support
Disadvantages Disadvantages Not the code that shipsNot the code that ships
Some bugs only happen in retail buildsSome bugs only happen in retail builds
Build RequirementsBuild RequirementsHW assist debuggingHW assist debugging
Default (without IMGHDSTUB=1)Default (without IMGHDSTUB=1)No OS AwarenessNo OS Awareness
Load notificationsLoad notifications
OS events/exceptionsOS events/exceptions
No processes/threads dataNo processes/threads data
Retail buildsRetail buildsAdd IMGHDSTUB=1Add IMGHDSTUB=1
Debug buildsDebug buildsDo not enable Kernel Debugger Do not enable Kernel Debugger (IMGNODEBUGGER=1)(IMGNODEBUGGER=1)
Add IMGHDSTUB=1Add IMGHDSTUB=1
Debugger SettingsDebugger SettingsSelecting The DebuggerSelecting The Debugger
Under Target\Connectivity OptionsUnder Target\Connectivity Options
Default for Debug build is SW AssistDefault for Debug build is SW Assist
No options for HW Assist until eXDI No options for HW Assist until eXDI driver is installeddriver is installed
Debugger SettingsDebugger SettingsJust in time debuggingJust in time debugging
Enable Passive KITLEnable Passive KITLRequires a code change in the OALRequires a code change in the OAL
Run device as normal Run device as normal
Wait for a unhandled 2nd chance Wait for a unhandled 2nd chance exception on deviceexception on device
Unfortunately, there is no device UIUnfortunately, there is no device UI
Attach the debuggerAttach the debugger
Debugger SettingsDebugger SettingsPost build debuggingPost build debugging
Image was built with Image was built with IMGNODEBUGGER=IMGNODEBUGGER=
Requires KITL in the ImageRequires KITL in the Image
Load the debugger supportLoad the debugger supportLoaddbg.exeLoaddbg.exe
Attach the debuggerAttach the debugger
Debugger SettingsDebugger SettingsVerbosityVerbosity
Dialogs and message boxes have the Dialogs and message boxes have the option “Don’t show me again”option “Don’t show me again”
To get them back settings under Tools\To get them back settings under Tools\options\Verbosity options\Verbosity
Debugger SettingsDebugger SettingsDetaching the debuggerDetaching the debugger
By default the device will still catch By default the device will still catch debug eventsdebug events
If you want it to continue as a device If you want it to continue as a device without debug supportwithout debug support
Check the option Disable kdstub on Stop Check the option Disable kdstub on Stop Debugging in Tools\Options\DebugDebugging in Tools\Options\Debug
FeaturesFeaturesBreakpoints in ROMBreakpoints in ROM
Only works on code in Virtual memoryOnly works on code in Virtual memoryUser codeUser code
Not Kernel Not Kernel
Limited to 10 VM pages simultaneouslyLimited to 10 VM pages simultaneously
Relies on the correct description of Relies on the correct description of ROM addresses from the OALROM addresses from the OAL
FeaturesFeaturesBreakpoint instancesBreakpoint instances
New Breakpoint List windowNew Breakpoint List windowDockable and not modalDockable and not modal
Tree control breakpoint listsTree control breakpoint lists
Generic top level descriptionGeneric top level description
Specific descriptions for instancesSpecific descriptions for instancesAll instances are listed All instances are listed
Before this feature the debugger got Before this feature the debugger got confused by multiple instancesconfused by multiple instances
FeaturesFeaturesDeferred breakpointsDeferred breakpoints
Not red (Some people see pink, Not red (Some people see pink, others see purple)others see purple)
Colors are configurableColors are configurable
Waits for a module loadWaits for a module loadWhen it finds the symbol, it turns redWhen it finds the symbol, it turns red
FeaturesFeaturesSet breakpoints while runningSet breakpoints while running
Set as deferredSet as deferred
Instantiated at the next stopping eventInstantiated at the next stopping event
If it stays deferred, it will not get hitIf it stays deferred, it will not get hit
FeaturesFeaturesContext specifierContext specifier
Stopped in a context where a variable Stopped in a context where a variable or function is Not definedor function is Not defined
{function,source,module}symbol_name{function,source,module}symbol_name
E.g.,E.g.,
{,,coredll.dll}LocalAlloc{,,coredll.dll}LocalAlloc
FeaturesFeaturesRelease directory modulesRelease directory modules
Instruct the loader to load from the Instruct the loader to load from the FlatRelDir instead of from the imageFlatRelDir instead of from the image
AdvantageAdvantageFast debugging turnaroundFast debugging turnaround
Remember to remove them when you Remember to remove them when you are doneare done
FeaturesFeaturesSource path mappingSource path mapping
Solves the build lab problemSolves the build lab problem
Exposing the mapping to the userExposing the mapping to the user
Search order from top tp bottomSearch order from top tp bottom
Remaps breakpoints on changesRemaps breakpoints on changes
FeaturesFeaturesHW assist debuggingHW assist debugging
Doesn’t require a KITL enabled imageDoesn’t require a KITL enabled image
Debug before kd loadsDebug before kd loads
Debug all code on the device (Bootloaders, ISRs, etc.)Debug all code on the device (Bootloaders, ISRs, etc.)
Use HW resources (Registers, BPs, etc.)Use HW resources (Registers, BPs, etc.)
Non intrusiveNon intrusive
Full debugging support requires a hd component Full debugging support requires a hd component on the deviceon the device
JTAG pins must be availableJTAG pins must be available
Requires specific/compatible probe/eXDI support for Requires specific/compatible probe/eXDI support for the architecturethe architecture
HW Assist VendorsHW Assist Vendors
ArchitectureArchitecture VendorVendor
ARM4IARM4I ARM – MultiICEARM – MultiICE
EPITools – MajicEPITools – Majic
Aiji – A900Aiji – A900
XScaleXScale Macgregor – Raven (Thru Intel)Macgregor – Raven (Thru Intel)
MIPSMIPS EPITools - MajicEPITools - Majic
SH3, SH4SH3, SH4 Hitachi – E10aHitachi – E10a
If you have a favorite Probe vendor that does not provide an If you have a favorite Probe vendor that does not provide an eXDI driver have them contact meeXDI driver have them contact me
[email protected]@microsoft.com
DebuggerDebugger
James StulzJames StulzProgram ManagerProgram ManagerWindows CE Core ToolsWindows CE Core Tools
While at MEDC 2005…While at MEDC 2005…Fill outFill out an evaluation for this session an evaluation for this session
Randomly selected instant Randomly selected instant WINWIN prizes! prizes!
Use Use real technology in a labreal technology in a lab Instructor led Instructor led Reef E/FReef E/F & & Breakers LBreakers L
Self-paced Self-paced Reef B/CReef B/C
VisitVisit the Microsoft Product Pavilion the Microsoft Product Pavilion
in the Exhibit Hall in the Exhibit Hall Shorelines BShorelines B
After The Conference…After The Conference…
DevelopDevelop
BuildBuild
InstallInstall
BuildBuild
JoinJoin
InstallInstall
EnterEnter
JoinJoin
Full-featured trial versions of Windows CE Full-featured trial versions of Windows CE and/or Windows XP Embeddedand/or Windows XP Embedded
Cool stuff & tell us about it: Cool stuff & tell us about it: msdn.microsoft.com/embedded/community
Windows Embedded Partner Program:Windows Embedded Partner Program:www.mswep.com
Windows Mobile 5.0 Eval Kit including Windows Mobile 5.0 Eval Kit including Visual Studio 2005 Beta 2Visual Studio 2005 Beta 2
Mobile2Market Contest and win up to $25000: Mobile2Market Contest and win up to $25000: mobile2marketcontest.com
Microsoft Solutions Partner Program:Microsoft Solutions Partner Program:partner.microsoft.com
Tools & ResourcesTools & Resources
msdn.microsoft.com/msdn.microsoft.com/ embeddedembedded
microsoft.public.microsoft.public. windowsxp.embeddedwindowsxp.embedded windowsce.platbuilderwindowsce.platbuilder windowsce.embedded.vcwindowsce.embedded.vc
blogs.msdn.com/blogs.msdn.com/ mikehallmikehall
Windows CE 5.0 Eval KitWindows CE 5.0 Eval KitWindows XP Embedded Eval KitWindows XP Embedded Eval Kit
msdn.microsoft.com/msdn.microsoft.com/ mobilitymobility
microsoft.public.microsoft.public. pocketpc.developer pocketpc.developer smartphone.developer smartphone.developer dotnet.framework.compactframeworkdotnet.framework.compactframework
blogs.msdn.com/blogs.msdn.com/ windowsmobilewindowsmobile vsdteamvsdteam netcfteamnetcfteam
Windows Mobile 5.0 Eval KitWindows Mobile 5.0 Eval Kit
WebsitesWebsites
NewsgroupsNewsgroups
BlogsBlogs
ToolsTools
BuildBuild DevelopDevelop
© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.