WinDbg Command to know number of devices connected to the System.

Hello,

I want 'WinDbg Command" to know all the details about devices which are connected to the system.

like, number of devices connected to the System.
PID, Stack of it, Number of threads into the process, etc.

regards
matt

xxxxx@hotmail.com wrote:

I want 'WinDbg Command" to know all the details about devices which are connected to the system.

like, number of devices connected to the System.

Of what possible use is that? And how do you define “device”? Remember
that most of the drivers in your system are not handling physical hardware.

PID, Stack of it, Number of threads into the process, etc.

You still have some fundamental misunderstandings here. Drivers do not
have processes, or PIDs, or stacks. It’s possible for a driver to
create a system thread, but that thread is not associated with the driver.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thank you Sir,

I would like to know, Is there any command in WinDbg to get know the number of peripheral devices connected to my system.

My concern is like Pendrive or extra Plug N Play devices.

thanks
regards
matt

Hello Sir

I gone through command “!devnode Address [Flags] [Service]” but it is not listing my Pnp devices (a Pendrive). Instead “!process 0” command is listing it. But my question is can we directly get to know all PnP devices connected to the system through a single WinDbg command.

thanks
regards

matt

xxxxx@hotmail.com wrote:

I would like to know, Is there any command in WinDbg to get know the number of peripheral devices connected to my system.

My concern is like Pendrive or extra Plug N Play devices.

“Extra”? How do you decide which devices are “extra”?

I gone through command “!devnode Address [Flags] [Service]” but it is not listing my Pnp devices (a Pendrive). Instead “!process 0” command is listing it. But my question is can we directly get to know all PnP devices connected to the system through a single WinDbg command.

!devnode will list your pen drive, although perhaps not in a forum you
recognize. !process 0 does not list devices.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

You really need to be more specific.

‘!devnode 0 1’ displays whole device tree. This will include root
enumerated devices as well as devices connected to various hw buses,
like PCI or USB etc.

If you are looking specifically “pendrives” then you can narrow it
down by using ‘!devnode 0 1 disk’ or ‘!devnode 0 1 usbstor’. Then you
can use ‘!devstack <devobj_addr>’ to display device stack you’re
interested in.

However if you want to check if there are threads that has some
specific driver’s code on their stack you can use something like
‘!stacks 2 usbstor’. That of course doesn’t guarantee that you’ll see
anything basically because at the moment you break into debugger there
won’t be any “pendrive activity”.

Kris

On Fri, Nov 22, 2013 at 6:54 AM, wrote:
> Hello Sir
>
> I gone through command “!devnode Address [Flags] [Service]” but it is not listing my Pnp devices (a Pendrive). Instead “!process 0” command is listing it. But my question is can we directly get to know all PnP devices connected to the system through a single WinDbg command.
>
> thanks
> regards
>
> matt
>
> —
> WINDBG is sponsored by OSR
>
> OSR is hiring!! Info at http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kris</devobj_addr>

Thank You Mr. Kris,

This is really, what I was expecting, a most appropriate answer.
Yeah, might be the way of asking my question was not in a proper way,
but my concern was only to get to know the number of peripheral devices
currently connected to the system using WinDbg commands and again which
are only detachable like Pen drive a PnP kind of devices.

regards
matt