gdb、hp ux:收到消息无法找到虚拟表——对象可能尚未构造

发布于 2024-11-30 16:50:46 字数 1174 浏览 0 评论 0原文

在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你的心境我的脸 2024-12-07 16:50:46

当您调试优化代码时,此类问题很常见。局部变量都被优化器弄乱了。当然,结果行为是相同的,但您不会在您期望的时间和地点看到数据。

如果是这种情况,只需使用 -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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文