提交 72062677 编写于 作者: P Paul Smith

Visually align registers & show 16 bytes for each

This change right-aligns the register names in the output of the "regs" command,
and pads out the display of the hex value of each register to 16 bytes. This
makes scanning registers for set values a bit easier.
上级 d5e00a58
......@@ -62,7 +62,7 @@ func (r *Regs) String() string {
{"Gs_base", r.gs_base},
}
for _, reg := range regs {
fmt.Fprintf(&buf, "%s = 0x%x\n", reg.k, reg.v)
fmt.Fprintf(&buf, "%8s = %0#16x\n", reg.k, reg.v)
}
return buf.String()
}
......
......@@ -43,7 +43,7 @@ func (r *Regs) String() string {
{"Gs", r.regs.Gs},
}
for _, reg := range regs {
fmt.Fprintf(&buf, "%s = 0x%x\n", reg.k, reg.v)
fmt.Fprintf(&buf, "%8s = %0#16x\n", reg.k, reg.v)
}
return buf.String()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册