Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > RE: Syntax error with WinDBG command line -c ".cls;g"

Reply
Thread Tools Display Modes

RE: Syntax error with WinDBG command line -c ".cls;g"

 
 
Satya
Guest
Posts: n/a

 
      09-07-2010
You may have better luck creating a script file and executing the script file
with $< syntax.

Satya
http://www.winprogger.com

"Senthil" wrote:

> I am using WinDBG 6.12.2.663 to debug a target (VMWare ware guest)
> over COM pipe. I intend to pass a command line that clears the screen
> and continues debugging. So, I pass -c ".cls;g" and I get the syntax
> error
>
> Processing initial command '.cls;g'
> 0: kd> .cls;g
> ^ Syntax error in '.cls;g'
>
> It works fine if pass just -c ".cls"
>
> WinDBG help states that "If you are starting a debugging client, this
> command must be intended for the debugging server. Client-specific
> commands, such as .lsrcpath, are not allowed. ". Is that wha the issue
> is?
>
> I am not using client/server setup here, though I would agree that my
> debugger is running in client mode here for all practical purposes.
> Why is this restriction and is there a way for me to get .cls working
> with other commands via -c ""?
>
> Thanks,
> Senthil
> .
>

 
Reply With Quote
 
 
 
 
Scott Noone
Guest
Posts: n/a

 
      09-08-2010
That's not going to work either, some commands can't be scripted and .cls is
one of them.

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com
http://twitter.com/analyzev

"Satya" <> wrote in message
news4C208E0-053A-45A9-87AB-...
> You may have better luck creating a script file and executing the script
> file
> with $< syntax.
>
> Satya
> http://www.winprogger.com
>
> "Senthil" wrote:
>
>> I am using WinDBG 6.12.2.663 to debug a target (VMWare ware guest)
>> over COM pipe. I intend to pass a command line that clears the screen
>> and continues debugging. So, I pass -c ".cls;g" and I get the syntax
>> error
>>
>> Processing initial command '.cls;g'
>> 0: kd> .cls;g
>> ^ Syntax error in '.cls;g'
>>
>> It works fine if pass just -c ".cls"
>>
>> WinDBG help states that "If you are starting a debugging client, this
>> command must be intended for the debugging server. Client-specific
>> commands, such as .lsrcpath, are not allowed. ". Is that wha the issue
>> is?
>>
>> I am not using client/server setup here, though I would agree that my
>> debugger is running in client mode here for all practical purposes.
>> Why is this restriction and is there a way for me to get .cls working
>> with other commands via -c ""?
>>
>> Thanks,
>> Senthil
>> .
>>

 
Reply With Quote
 
Scott Noone
Guest
Posts: n/a

 
      09-09-2010
"rogero" <> wrote in message
news:e86fb688-d365-42a2-b768-
> Anyone know why .cls is special? Other dot commands I try seem happy
> with the space:
>
> windbg -c " .asm ; dd eip l1 " cmd.exe


..cls is a WinDBG GUI command, not a debugger engine command. So, it's
stripped out by the GUI code and not passed along to DbgEng. The list of
other commands like this is here:

http://msdn.microsoft.com/en-us/libr...37(VS.85).aspx


-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com
http://twitter.com/analyzev

"rogero" <> wrote in message
news:e86fb688-d365-42a2-b768-...
> On Sep 9, 1:25 pm, "Scott Noone" <sno...@osr.com> wrote:
>> If you do that the .cls will work but everything else on the line will be
>> ignored.
>>
>> -scott
>>
>> --
>> Scott Noone
>> Consulting Associate
>> OSR Open Systems Resources,
>> Inc.http://www.osronline.comhttp://twitter.com/analyzev
>>
>> "rogero" <roger....@gmail.com> wrote in message
>>
>> news:9d9ad3d4-6f16-4683-80e1-...
>>
>>
>>
>> > On Sep 8, 7:21 pm, Senthil <sanasent...@gmail.com> wrote:
>> >> Thank you for all your comments. But at this point nothing is working.
>> >> Scripting doesn't work either as suggested by Scott. Kind of
>> >> frustrating, but I guess I can live with it.
>> >> Senthil

>>
>> > Try a space before the semicolon.
>> > Strange but true...

>>
>> > Roger.- Hide quoted text -

>>
>> - Show quoted text -

>
> Anyone know why .cls is special? Other dot commands I try seem happy
> with the space:
>
> windbg -c " .asm ; dd eip l1 " cmd.exe
>
> roger.


 
Reply With Quote
 
Satya
Guest
Posts: n/a

 
      09-23-2010
I tried this and you are right. It seems this is a windbg issue. If you use
kd this works nicely. Here is what I tried in 6.12.2.633 x86 build of Windbg
package-

- created a script file that has 2 lines in it (mark that ; is adsent)
..cls
g
- in command prompt kd -k 1394:channel=1 -cf <script path>

Satya
Winprogger
http://www.winprogger.com

"Scott Noone" wrote:

> That's not going to work either, some commands can't be scripted and .cls is
> one of them.
>
> -scott
>
> --
> Scott Noone
> Consulting Associate
> OSR Open Systems Resources, Inc.
> http://www.osronline.com
> http://twitter.com/analyzev
>
> "Satya" <> wrote in message
> news4C208E0-053A-45A9-87AB-...
> > You may have better luck creating a script file and executing the script
> > file
> > with $< syntax.
> >
> > Satya
> > http://www.winprogger.com
> >
> > "Senthil" wrote:
> >
> >> I am using WinDBG 6.12.2.663 to debug a target (VMWare ware guest)
> >> over COM pipe. I intend to pass a command line that clears the screen
> >> and continues debugging. So, I pass -c ".cls;g" and I get the syntax
> >> error
> >>
> >> Processing initial command '.cls;g'
> >> 0: kd> .cls;g
> >> ^ Syntax error in '.cls;g'
> >>
> >> It works fine if pass just -c ".cls"
> >>
> >> WinDBG help states that "If you are starting a debugging client, this
> >> command must be intended for the debugging server. Client-specific
> >> commands, such as .lsrcpath, are not allowed. ". Is that wha the issue
> >> is?
> >>
> >> I am not using client/server setup here, though I would agree that my
> >> debugger is running in client mode here for all practical purposes.
> >> Why is this restriction and is there a way for me to get .cls working
> >> with other commands via -c ""?
> >>
> >> Thanks,
> >> Senthil
> >> .
> >>

 
Reply With Quote
 
Scott Noone
Guest
Posts: n/a

 
      09-27-2010
I put up a couple of blog posts on the issue and a very, very hacky
workaround:

http://analyze-v.com/?p=716
http://analyze-v.com/?p=719

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com


"Satya" <> wrote in message
news:847199AB-CE7D-475C-BE36-...
> I tried this and you are right. It seems this is a windbg issue. If you
> use
> kd this works nicely. Here is what I tried in 6.12.2.633 x86 build of
> Windbg
> package-
>
> - created a script file that has 2 lines in it (mark that ; is adsent)
> .cls
> g
> - in command prompt kd -k 1394:channel=1 -cf <script path>
>
> Satya
> Winprogger
> http://www.winprogger.com
>
> "Scott Noone" wrote:
>
>> That's not going to work either, some commands can't be scripted and .cls
>> is
>> one of them.
>>
>> -scott
>>
>> --
>> Scott Noone
>> Consulting Associate
>> OSR Open Systems Resources, Inc.
>> http://www.osronline.com
>> http://twitter.com/analyzev
>>
>> "Satya" <> wrote in message
>> news4C208E0-053A-45A9-87AB-...
>> > You may have better luck creating a script file and executing the
>> > script
>> > file
>> > with $< syntax.
>> >
>> > Satya
>> > http://www.winprogger.com
>> >
>> > "Senthil" wrote:
>> >
>> >> I am using WinDBG 6.12.2.663 to debug a target (VMWare ware guest)
>> >> over COM pipe. I intend to pass a command line that clears the screen
>> >> and continues debugging. So, I pass -c ".cls;g" and I get the syntax
>> >> error
>> >>
>> >> Processing initial command '.cls;g'
>> >> 0: kd> .cls;g
>> >> ^ Syntax error in '.cls;g'
>> >>
>> >> It works fine if pass just -c ".cls"
>> >>
>> >> WinDBG help states that "If you are starting a debugging client, this
>> >> command must be intended for the debugging server. Client-specific
>> >> commands, such as .lsrcpath, are not allowed. ". Is that wha the issue
>> >> is?
>> >>
>> >> I am not using client/server setup here, though I would agree that my
>> >> debugger is running in client mode here for all practical purposes.
>> >> Why is this restriction and is there a way for me to get .cls working
>> >> with other commands via -c ""?
>> >>
>> >> Thanks,
>> >> Senthil
>> >> .
>> >>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Discovery of PMI-Compliant Power Meter Devices Javier Càceres Windows Vista Drivers 1 09-09-2010 07:18 PM
Re: Syntax error with WinDBG command line -c ".cls;g" Scott Noone Windows Vista Drivers 0 09-07-2010 08:31 PM
Windbg trouble debugging - target Win7 pro AMD64 Clay Windows Vista Drivers 0 06-29-2010 10:15 PM
How to see KdPrint in WinDbg mpefareo Windows Vista Drivers 2 05-10-2010 10:28 AM
Is Windows Vista index-based full-text search powerful enough? Peter Frank Windows Vista File Management 47 03-23-2007 05:54 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59