Sun Studio 12:使用 dbx 调试程序

在多个具体值中进行选择

如果可从同一作用域级别访问多个符号,则 dbx 会打印一条报告二义性的消息。


(dbx) func main
(dbx) which C::foo
More than one identifier ’foo’.
Select one of the following:
 0) Cancel
 1) ”a.out”t.cc”C::foo(int)
 2) ”a.out”t.cc”C::foo()
>1
”a.out”t.cc”C::foo(int)

which 命令的上下文中,从具体值列表中进行选择不会影响 dbx 或程序的状态。无论选择哪个具体值,dbx 都会回显名称。