将shell的输出重定向/存储到GDB变量中?
发布时间:2020-12-15 19:19:34 所属栏目:安全 来源:网络整理
导读:我想知道如何在GDB中了解当前的系统架构,并将此信息存储在一个变量中供以后评估。 就像是: set variable $x=`shell uname -m` theres 2种方式: 旧的方式: (gdb) shell echo set $x="$(uname -m)" /tmp/foo.gdb(gdb) source /tmp/foo.gdb python更新:
我想知道如何在GDB中了解当前的系统架构,并将此信息存储在一个变量中供以后评估。
就像是: set variable $x=`shell uname -m`
theres 2种方式:
旧的方式: (gdb) shell echo set $x="$(uname -m)" >/tmp/foo.gdb (gdb) source /tmp/foo.gdb python更新: (gdb) python gdb.execute("set $y="" + os.uname()[4] + """) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |