如何在WinDbg的启动命令行中打开转储符时转义引号 [英] How to escape quotation marks in WinDbg's startup command line opening a dump
问题描述
遵循此答案,我正在尝试使用 -c ... $ c在注册表中设置
.dmp
shell命令$ c>打开我的转储文件时执行命令。
Following this answer, I'm trying to set up a .dmp
shell command in the Registry using the -c "..."
switch to execute commands whenever I open a dump file.
尽管此方法适用于任何不使用引号的命令,但我现在想使用需要引号的命令。我如何才能避免引号引起来,以使它们不被视为 -c ...
开关的结尾?
While this works for any commands not using quotation marks, I'd now like to use a command which needs quotation marks. How can I escape the quotation marks to that they are not seen as the end of the -c "..."
switch?
我尝试过:
- 使用反斜杠
\
- 通过加引号
- escaping with a backslash
\"
- escaping by doubling the quotation marks
""
详细信息如下:
注册表项: HKEY_CLASSES_ROOT\Windbg.DumpFile.1\shell\WinDbgStartup\command
(默认值)(工作): C:\windbg.exe的路径 -z %1 -Q -c .echo欢迎
(Default) value (working): "C:\path to\windbg.exe" -z "%1" -Q -c ".echo Welcome"
(默认)值(断开): C:\windbg.exe的路径 -z%1 -Q -c .echo Wel来
(Default) value (broken): "C:\path to\windbg.exe" -z "%1" -Q -c ".echo Wel""come"
-z
用于打开转储文件, -Q
用于安静的工作空间,位于 -c
我可以输入命令,并且要包含引号。
-z
is for opening a dump file, -Q
is for quiet workspaces, at -c
I can enter commands and I want to include quatation marks.
错误消息:命令行参数不能指定一种以上的调试来启动
WinD bg版本: 6.2.9200.16384 X86
WinDbg Version: 6.2.9200.16384 X86
推荐答案
您是否尝试过 ^
? ^
转义了 cmd
Have you tried ^"
? ^
escapes most characters in cmd
(正在调查)
-c " command "
Specifies the initial debugger command to run at start-up. This command must be
enclosed in quotation marks. Multiple commands can be separated with semicolons.
(If you have a long command list, it may be easier to put them in a script and
then use the -c option with the $<, $><, $><, $$>< (Run Script File) command.)
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.
然后单击 $ ...
超链接进一步解释了这些选项。
And clicking on the $...
hyperlink further explains these options.
似乎您实际上想在 echo $ c中包含 $ c>。坦率地说,我不知道-但是我要尝试的是
-c .echo Wel ^ come
,如果那不起作用,我将转到 $-option
gobbledegook。没有人(理智的)声称在建造这些设施时已经考虑了所有可能性...
and if that doesn't work, I'd go off to the $-option
gobbledegook. No-one (sane) ever claimed that every possibility had been considered in constructing these facilities...
这篇关于如何在WinDbg的启动命令行中打开转储符时转义引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!