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
Post by Senthil
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
Post by Satya
You may have better luck creating a script file and executing the script file
with $< syntax.
Satya
http://www.winprogger.com
Post by Senthil
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
Post by Senthil
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
Post by rogero
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
Post by rogero
Post by Senthil
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
Post by Scott Noone
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
Post by rogero
Post by Senthil
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-
Post by rogero
Anyone know why .cls is special? Other dot commands I try seem happy
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
Post by rogero
Post by Scott Noone
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
Post by rogero
Post by Senthil
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
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
Post by Scott Noone
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
Post by Satya
You may have better luck creating a script file and executing the script file
with $< syntax.
Satya
http://www.winprogger.com
Post by Senthil
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
Post by Satya
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
Post by Scott Noone
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
Post by Satya
You may have better luck creating a script file and executing the
script
file
with $< syntax.
Satya
http://www.winprogger.com
Post by Senthil
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...