Discussion:
Syntax error with WinDBG command line -c ".cls;g"
(too old to reply)
Senthil
2010-09-07 19:11:16 UTC
Permalink
Raw Message
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
Satya
2010-09-07 23:32:03 UTC
Permalink
Raw Message
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
> .
>
Scott Noone
2010-09-08 12:26:09 UTC
Permalink
Raw Message
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" <***@discussions.microsoft.com> wrote in message
news:D4C208E0-053A-45A9-87AB-***@microsoft.com...
> 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
>> .
>>
Senthil
2010-09-08 18:21:43 UTC
Permalink
Raw Message
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
rogero
2010-09-09 12:19:59 UTC
Permalink
Raw Message
On Sep 8, 7:21 pm, Senthil <***@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.
rogero
2010-09-09 12:22:50 UTC
Permalink
Raw Message
> Try a space before the semicolon.

Post in haste, repent at leisure...
The above avoids the syntax error but the subsequent command doesn't
seem to work properly.
Sorry for the noise.

Roger.
Scott Noone
2010-09-09 12:25:48 UTC
Permalink
Raw Message
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.com
http://twitter.com/analyzev


"rogero" <***@gmail.com> wrote in message
news:9d9ad3d4-6f16-4683-80e1-***@t7g2000vbj.googlegroups.com...
> On Sep 8, 7:21 pm, Senthil <***@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.
rogero
2010-09-09 12:43:25 UTC
Permalink
Raw Message
On Sep 9, 1:25 pm, "Scott Noone" <***@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" <***@gmail.com> wrote in message
>
> news:9d9ad3d4-6f16-4683-80e1-***@t7g2000vbj.googlegroups.com...
>
>
>
> > On Sep 8, 7:21 pm, Senthil <***@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.
Scott Noone
2010-09-09 13:46:26 UTC
Permalink
Raw Message
"rogero" <***@gmail.com> 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/library/ff560137(VS.85).aspx


-scott

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

"rogero" <***@gmail.com> wrote in message
news:e86fb688-d365-42a2-b768-***@a19g2000vbi.googlegroups.com...
> On Sep 9, 1:25 pm, "Scott Noone" <***@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" <***@gmail.com> wrote in message
>>
>> news:9d9ad3d4-6f16-4683-80e1-***@t7g2000vbj.googlegroups.com...
>>
>>
>>
>> > On Sep 8, 7:21 pm, Senthil <***@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.
Satya
2010-09-23 19:16:07 UTC
Permalink
Raw Message
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" <***@discussions.microsoft.com> wrote in message
> news:D4C208E0-053A-45A9-87AB-***@microsoft.com...
> > 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
> >> .
> >>
Scott Noone
2010-09-27 16:24:51 UTC
Permalink
Raw Message
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" <***@discussions.microsoft.com> wrote in message
news:847199AB-CE7D-475C-BE36-***@microsoft.com...
> 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" <***@discussions.microsoft.com> wrote in message
>> news:D4C208E0-053A-45A9-87AB-***@microsoft.com...
>> > 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
>> >> .
>> >>
Loading...