Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify launching windbgx from command line using provided config #18

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions DebuggerFeaturePkg/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,17 @@ Image scanning heuristics size, and select the correct IP and port.
Windbg can attach to the GDB port exposed by the debugger using the [Windbg EXDI
GDB Server](https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/configuring-the-exdi-debugger-transport).
For recent builds of windbg this can be invoked using the following command from
and administrator prompt.
and administrator prompt. Since only the most recent windbgx builds will have the
configuration by default, you can provide the PathToSrvCfgFiles path as shown before
to load the config from the included [exdiConfigData.xml](../Scripts/exdiConfigData.xml).

```cmd
windbg.exe -noredirect -v -kx exdi:CLSID={29f9906e-9dbe-4d4b-b0fb-6acf7fb6d014},Kd=Guess,Inproc=ExdiGdbSrv.dll,DataBreaks=Exdi
Windbgx -v -kx exdi:CLSID={29f9906e-9dbe-4d4b-b0fb-6acf7fb6d014},Kd=Guess,Inproc=ExdiGdbSrv.dll,DataBreaks=Exdi,PathToSrvCfgFiles=PATH_TO_MU_FEATURE_DEBUGGER_REPO\Scripts\
```

In order to connect to the UEFI debugger using this method, you will need to modify
the `exdiConfigData.xml` to have `UEFI` set for `CurrentTarget`, and customizing
the default port for UEFI devices if required. For more details see
[Customizing EXDI Configuration](#customizing-exdi-configuration).
Note that this by default is configured to use the port `5555`. Also running the
kuqin12 marked this conversation as resolved.
Show resolved Hide resolved
above from PowerShell might leads to issues as PowerShell will interpret the brackets
in the guid as language components rather then passing them as arguments to Windbgx.

### Customizing EXDI Configuration

Expand Down
2 changes: 1 addition & 1 deletion Scripts/exdiConfigData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ExdiGdbServerConfigData agentNamePacket = "" uuid = "9F7AA64A-55AF-476E-AABA-87518C04F979" displayCommPackets = "yes" debuggerSessionByCore = "no" enableThrowExceptionOnMemoryErrors = "yes" qSupportedPacket="qSupported:xmlRegisters=aarch64,i386">
<ExdiGdbServerTargetData targetArchitecture = "ARM64" targetFamily = "ProcessorFamilyARM64" numberOfCores = "1" EnableSseContext = "no" heuristicScanSize = "0" targetDescriptionFile = "target.xml" />
<GdbServerConnectionParameters MultiCoreGdbServerSessions = "no" MaximumGdbServerPacketLength = "1024" MaximumConnectAttempts = "3" SendPacketTimeout = "100" ReceivePacketTimeout = "3000">
<Value HostNameAndPort="localhost:5556" />
<Value HostNameAndPort="localhost:5555" />
</GdbServerConnectionParameters>
<ExdiGdbServerMemoryCommands GdbSpecialMemoryCommand = "no" PhysicalMemory = "no" SupervisorMemory = "no" HypervisorMemory = "no" SpecialMemoryRegister = "no" SystemRegistersGdbMonitor = "no" SystemRegisterDecoding = "no">
</ExdiGdbServerMemoryCommands>
Expand Down
Loading