就像是:
set variable $x=`shell uname -m`@H_301_4@
旧的方式:
(gdb) shell echo set \$x=\"$(uname -m)\" >/tmp/foo.gdb (gdb) source /tmp/foo.gdb@H_301_4@ python更新: (gdb) python gdb.execute("set $y=\"" + os.uname()[4] + "\"")@H_301_4@
python更新:
(gdb) python gdb.execute("set $y=\"" + os.uname()[4] + "\"")@H_301_4@