zoukankan      html  css  js  c++  java
  • $<, $><, $$<, $$><, $$>a< (Run Script File)

    $<, $><, $$<, $$><, $$>a<读取指定的脚本文件内容,然后把它的内容做为调试器的命令行输出


    $<Filename
    $><Filename
    $$< Filename
    $$>< Filename
    $$>a< Filename [arg1 arg2 arg3 ... ]


    Filename:文件的路径,可以包含空格

    argn:指定任意数目的参数,用于调试器传送给脚本,在执行脚本文件之前,脚本文件中任意${$argn}格式的字符串,对应被调试器传送进来的argn替换,具体看后面的实例

    参数中不能包括引号或分号,多个参数应该用空格来分隔开,如果一个参数包含了空格,那么就用引号把它括起来,你可以使用任意多的参数


    备注:

    如果你使用$$<或$$><,那么Filename之前可以不带空格,你能在这个命令之后使用一个分号或其他命令,你可以选择Filename使用引号括起来,但不是必需的,即使Filename中含有空格或同一行中有其他命令(这个前面肯定要带分号来分隔不同命令):

    0:000> $$>< c:\1.txt
    The first argument is ${$arg1}
    The fifth argument is ${$arg5}
    The fourth argument is ${$arg4}
    0:000> $$><c:\1.txt
    The first argument is ${$arg1}
    The fifth argument is ${$arg5}
    The fourth argument is ${$arg4}
    0:000> $$><"c:\1.txt"
    The first argument is ${$arg1}
    The fifth argument is ${$arg5}
    The fourth argument is ${$arg4}
    0:000> $$><c:\1.txt; r ebx
    The first argument is ${$arg1}
    The fifth argument is ${$arg5}
    The fourth argument is ${$arg4}
    ebx=00000000
    也就是$$><或$$<会把分号之前(如果没有分号就是整行)都当成Filename


    如果你使用$<或$><,你不能在Filename之前加任意空格,你也不能使用引号把Filename括起来,你也不能在这个命令后加分号或其他命令!

    0:000> $><c:\1.txt
    The first argument is ${$arg1}
    The fifth argument is ${$arg5}
    The fourth argument is ${$arg4}
    0:000> $>< c:\1.txt
    Command file execution failed, Win32 error 0n2
        "系统找不到指定的文件。"
    0:000> $><c:\1.txt;
    Command file execution failed, Win32 error 0n2
        "系统找不到指定的文件。"
    0:000> $><c:\1.txt;r eax
    Command file execution failed, Win32 error 0n2
        "系统找不到指定的文件。"
    意思,它总是把<后的所有内容当成Filename!


    $<和$$<照字面意思执行在脚本文件中的命令,它们打开脚本文件,使用分号替换所有的回车换行


    最常用的:

    $$>a< FileName arg1 arg2..... argn;  cmd

    $$>a<是允许调试器向脚本文件中传入参数,如果FileName中有空格,则一定要包含在双引号中 同样arg1..argn也是这么定义的,你可以不带双引号,但如果有空格,就得带上,最后一个参数要以分号结束,不然会把后面的cmd命名也认为是参数!,如果传入参数在脚本中没用到,就无视了,脚本使用$($arg1}这样去调用参数1

    如果这个参数没被传入,就直接显示${$arg1}




    帮助中的小示例:

    .echo The first argument is ${$arg1}.
    .echo The fifth argument is ${$arg5}.
    .echo The fourth argument is ${$arg4}.
    
    
    运行windbg:

    0:003> $$>a< "c:\1.txt" "First one" Two "Three More" "Fourl"; recx
    the first argument is First one
    the first argument is ${$arg5}
    the first argument is Fourl
    ecx=00000000
    注意几点:

    1.Two没带双引号,它仍是对应${$arg2}

    2.Fourl后带了分号,表示传参从此结束了

    3.recx是显示ecx的值,当然你也可以写成r ecx


    其实就是对于$$>a<这种,第一个分号前的是传入的参数,之后就是cmd1;cmd2;cmd3这样了



  • 相关阅读:
    如何实现虚拟机(VirtualBox)中的Ubuntu与Windows XP间的数据共享
    linux中安装sqlmap
    LookupError: unknown encoding: cp65001解决办法
    共勉
    Linux中安装Nginx
    touch: cannot touch `/home/tomcat7/logs/catalina.out': Permission denied
    程序猿的十一条浮躁表现
    MySQL中varchar类型排序
    Gson和FastJson
    jquery-messager-消息提示
  • 原文地址:https://www.cnblogs.com/hgy413/p/3693421.html
Copyright © 2011-2022 走看看