gdb、hp ux:收到消息无法找到虚拟表——对象可能尚未构造
在 ia64 上的 HP UX 11.23 中,在调试特定代码段时,出现此错误 当尝试访问特定对象时。
我想知道是否有人遇到过这个问题,并且可以帮助我理解它。
(gdb) p *rsp
$8 = {<> = {Couldn't find virtual table -- object may not be constructed yet.
(gdb) p rrc
$9 = (class iface::rrc::MeasurementMessage *) 0x0
(gdb) l
417 iface::cpr::PositionResponse &rspPtr,
418 bool &is3D)
419 {
420 iface::rrlp::PositionResponse *rsp = lt.getRrlpResponse();
421 iface::rrc::MeasurementMessage *rrc = lt.getRrc();
422 iface::lpp::PositionResponse *lpp = lt.getLppResponse();
423 const iface::util::GadShape *gad = 0;
424 iface::cpr::PositionRequest &req = lt.getCprRequest();
425 const iface::is801::MsRspLocation *cdma = lt.getMsRspLocation();
426
(gdb) bt
#0 eotd::fetchAndSetPosition (lt=@0xa76200, position=@0x65e2c640,
rspPtr=@0x3be9660, is3D=@0x65e2c580)
at /home/egpsbld/source/smlc47hpux/icursor/com/cps/eotd/utils.cpp:422
#1 0x200000007e7195b0:0 in eotd::P6Locator::compute (this=0x4076c0,
lt=@0xa76200)
in HP UX 11.23 on ia64 , when debugging a particular code segment, i am getting this error
when trying to access a particular object.
I was wondering if anyone faced it, and could help me make sense of it.
(gdb) p *rsp
$8 = {<> = {Couldn't find virtual table -- object may not be constructed yet.
(gdb) p rrc
$9 = (class iface::rrc::MeasurementMessage *) 0x0
(gdb) l
417 iface::cpr::PositionResponse &rspPtr,
418 bool &is3D)
419 {
420 iface::rrlp::PositionResponse *rsp = lt.getRrlpResponse();
421 iface::rrc::MeasurementMessage *rrc = lt.getRrc();
422 iface::lpp::PositionResponse *lpp = lt.getLppResponse();
423 const iface::util::GadShape *gad = 0;
424 iface::cpr::PositionRequest &req = lt.getCprRequest();
425 const iface::is801::MsRspLocation *cdma = lt.getMsRspLocation();
426
(gdb) bt
#0 eotd::fetchAndSetPosition (lt=@0xa76200, position=@0x65e2c640,
rspPtr=@0x3be9660, is3D=@0x65e2c580)
at /home/egpsbld/source/smlc47hpux/icursor/com/cps/eotd/utils.cpp:422
#1 0x200000007e7195b0:0 in eotd::P6Locator::compute (this=0x4076c0,
lt=@0xa76200)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您调试优化代码时,此类问题很常见。局部变量都被优化器弄乱了。当然,结果行为是相同的,但您不会在您期望的时间和地点看到数据。
如果是这种情况,只需使用
-O0
重新编译您的程序即可These kind of issues are frequent when you debug optimized code. Local variables are all messed up by the optimizer. The resulting behavior is the same, of course, but you will not see the data where and when you'd expect.
If that is the case, simply recompile your program with
-O0