Tracing Function Names WINDBG

Hi,

I am new to WinDbg and i would like to trace the name of the functions that are being called (including their parameters if possible).

I have set up WinDbg with the correct symbols and successfully attached to the service(typical user-mode service) I want to debug which is located on a remote machine. (I am using connect to remote stub)

how can I do this? (note: i am new to windbg) .

Thanks Bill!!

To the best of my knowledge, this isn’t something that windbg can just do
for you. You could write an extension to do this, but it would be S-L-O-W.

I can’t say that I’ve ever tried it, but it sounds like this might do
something along the lines of what you seek, at least for Win32 calls.

http://msdn.microsoft.com/en-us/library/ff552060(v=vs.85).aspx

Good luck,

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, June 28, 2011 9:55 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracing Function Names WINDBG

Hi,

I am new to WinDbg and i would like to trace the name of the functions that
are being called (including their parameters if possible).

I have set up WinDbg with the correct symbols and successfully attached to
the service(typical user-mode service) I want to debug which is located on
a remote machine. (I am using connect to remote stub)

how can I do this? (note: i am new to windbg) .

Thanks Bill!!


NTDEV is sponsored by OSR

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

NOTE: I have the source code for this service.

if there is no way to do it with windbg is there any other tool that can do this?

Bill

On Tue, Jun 28, 2011 at 3:48 PM, wrote:
> NOTE: ?I have the source code for this service.
And of course if you only need to trace calls inside of your own code
then you can just use debug prints or WPP (though you have to put all
trace statements “manually”).

Kris

@Krzysztof thats exactly what i am trying to avoid since this particular service has LOTS of functions with lots of different exit points… (unfortunately) :frowning:

My own proclivity would be to use the Visual Studio debugger for user-level
code. It does support remote debugging, although I have never done this.
joe

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, June 28, 2011 9:55 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracing Function Names WINDBG

Hi,

I am new to WinDbg and i would like to trace the name of the functions that
are being called (including their parameters if possible).

I have set up WinDbg with the correct symbols and successfully attached to
the service(typical user-mode service) I want to debug which is located on
a remote machine. (I am using connect to remote stub)

how can I do this? (note: i am new to windbg) .

Thanks Bill!!


NTDEV is sponsored by OSR

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


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

It actually works quite well, and less there is a need for kernel work, far better than WinDbg.

Gary G. Little

----- Original Message -----
From: “Joseph M. Newcomer”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, June 28, 2011 1:07:35 PM
Subject: RE: [ntdev] Tracing Function Names WINDBG

My own proclivity would be to use the Visual Studio debugger for user-level
code. It does support remote debugging, although I have never done this.
joe

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, June 28, 2011 9:55 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Tracing Function Names WINDBG

Hi,

I am new to WinDbg and i would like to trace the name of the functions that
are being called (including their parameters if possible).

I have set up WinDbg with the correct symbols and successfully attached to
the service(typical user-mode service) I want to debug which is located on
a remote machine. (I am using connect to remote stub)

how can I do this? (note: i am new to windbg) .

Thanks Bill!!


NTDEV is sponsored by OSR

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


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


NTDEV is sponsored by OSR

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

On Tue, Jun 28, 2011 at 4:18 PM, wrote:
> @Krzysztof ?thats exactly what i am trying to avoid since this ?particular service has LOTS of functions with lots of different exit points… (unfortunately) ?:frowning:

If this is for user mode code maybe you can use “wt” command.
For kernel I guess that you can try pct/tct/t running in a loop with
some logic to display only the elements that you are interested in -
though it’s not nice solution since it’s going to significantly slow
down execution.

Btw. IMO the only two things that VS debugger does better than WinDBG
is debugging managed code (sos ext is far from being perfect) and STL
code (again the built support is not so great but you can always write
script/ext to make it work).

Kris

(is this an off-topic rant?)

Remote debugging via the VS debugging makes me absolutely insane. Drives me nuts. Makes me scream. The whole security thing is incredibly obtuse and annoying. It’s PARTICULARLY fun when you have, for example, your dev box in a domain and your test box NOT in a domain. VERY handy. As far as I can tell, getting remote debugging to work hinges on coincidentally setting matching usernames and passwords (even though one is in a domain and the other us for the local machine account).

Give me WinDbg ANyday…

Peter
OSR

>debugging to work hinges on coincidentally setting matching usernames and passwords

Connect to SMB on target via “net use \Machine\ipc$ /user:UserName”, there are good chances that NTLMSSP will reuse this password for the debugger too.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Recent vintages of VS appear to support remote debugging without
requiring one to commit felonious assault on kittens. Versions prior
to 2008, not so much.

Mark Roddy

On Wed, Jul 6, 2011 at 10:42 AM, wrote:
> (is this an off-topic rant?)
>
>


>
> Remote debugging via the VS debugging makes me absolutely insane. ?Drives me nuts. ?Makes me scream. ?The whole security thing is incredibly obtuse and annoying. ?It’s PARTICULARLY fun when you have, for example, your dev box in a domain and your test box NOT in a domain. ?VERY handy. ?As far as I can tell, getting remote debugging to work hinges on coincidentally setting matching usernames and passwords (even though one is in a domain and the other us for the local machine account).
>
> Give me WinDbg ANyday…
>
> Peter
> OSR
>
>
> —
> NTDEV is sponsored by OSR
>
> 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
>