From: Senthil on
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
From: Scott Noone on
I believe that .cls does fall into the category of commands that you can't
execute in this way.

If you play around with it a bit, you'll see strange behavior if you try to
combine .cls with another other command. Even putting a command separator
next to it will cause a complaint:

0:000> .cls;
^ Syntax error in '.cls;'

Where that's valid for other commands:

0:000> k;
ChildEBP RetAddr
001cf918 7795115a ntdll!LdrpDoDebuggerBreak+0x2c
001cfa90 77915947 ntdll!LdrpInitializeProcess+0x133f
001cfae0 77909cc9 ntdll!_LdrpInitialize+0x78
001cfaf0 00000000 ntdll!LdrInitializeThunk+0x10

Putting a space before the semicolon avoids the error, but everything after
the command will be ignored. The trouble is that these commands are handled
specially by the debugger engine I don't think there's any way around this
limitation unfortunately.

-scott

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


"Senthil" <sanasenthil(a)gmail.com> wrote in message
news:a93ac44e-b4b0-423c-81fd-ffe04dc85380(a)h7g2000yqn.googlegroups.com...
> 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

From: Satya on
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
> .
>
From: Scott Noone on
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" <Satya(a)discussions.microsoft.com> wrote in message
news:D4C208E0-053A-45A9-87AB-269141485774(a)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
>> .
>>
From: Senthil on
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