Sun Studio 12 Update 1:使用 dbx 调试程序

在机器指令级设置断点

要在机器指令级设置断点,应使用 stopi 命令。该命令接受任何 event specification,语法如下:


stopi event-specification [modifier]

stopi 命令的常用形式如下:


stopi [at address] [-if cond]
stopi in function [-if cond]

有关更多信息,请参见stopi 命令

在地址处设置断点

要在特定地址设置断点,请键入:


(dbx) stopi at address

例如:


(dbx) nexti
stopped in hand::ungrasp at 0x12638
(dbx) stopi at &hand::ungrasp
(3) stopi at &hand::ungrasp
(dbx)