Upravit

Sdílet prostřednictvím


WinDbg - Data Model Menu

This section describes how to work with the data model menu in the WinDbg debugger.

New Model Query

Use the New Model Query dialog to create a new model query. You can put anything here you'd put into a normal dx command.

For example, specify Debugger.Sessions to examine the debugger sessions objects.

Screenshot of the New data model query dialog box in WinDbg.

For general information about the debugger objects refer to dx (Display Debugger Object Model Expression).

Use LINQ queries to dig deeper into the session. This query shows the top 5 processes running the most threads.

Debugger.Sessions.First().Processes.Select(p => new { Name = p.Name, ThreadCount = p.Threads.Count() }).OrderByDescending(p => p.ThreadCount),5

Screenshot of the Data model explore window displaying processes and threads in WinDbg.

Data Model Explorer

Use the data model explorer to quickly browse every data model object in the Debugger namespace.

Screenshot of the Data model explorer window with debug object sessions in WinDbg.

Display Mode

Use display mode to toggle between grid and hierarchy display mode. You can right-click column headers to hide or show more columns.

Grid mode can be useful to dig down in the objects. For example, here is the previous top threads query in grid view.

Screenshot of the Data model explore window displaying top threads in grid view in WinDbg.

When you click on any underlined item a new tab is opened and a query is run to display that information.

This query shows the devices in the plug and play device tree grouped by the name of the physical device object's driver for a kernel session.

Debugger.Sessions.First().Devices.DeviceTree.Flatten(n => n.Children).GroupBy(n => n.PhysicalDeviceObject->Driver->DriverName.ToDisplayString()) 

Screenshot of the Data model explore window presenting plug and play device tree in grid view in WinDbg.

Change Query

Use change query to change the query that is used in the active data model window.


See Also

dx (Display Debugger Object Model Expression)

WinDbg Features