c++ - GDB conditional breakpoint syntax error -
c++ - GDB conditional breakpoint syntax error -
i trying figure out why c++ programme failing assertion. want analyze current variable values @ time of failure, programme exits when assertion fails , scope lost. hence want set conditional breakpoint assertion status negated. assertion looks this:
assert( addrrange(pkt->getaddr(), pkt->getaddr() + pkt->getsize() - 1).issubset(range) );
in gdb, do:
break filename.cc:linenum if (addrrange(pkt->getaddr(), pkt->getaddr() + pkt->getsize() - 1).issubset(range) == false )
but results in:
a syntax error in expression, near `pkt->getaddr(), pkt->getaddr() + pkt->getsize() - 1).issubset(range) == false )'.
i tried creating breakpoint first , using cond, same syntax error. doing wrong?
i ended modifying code , saving function phone call homecoming value bool, , creating conditional breakpoint using bool variable instead.
c++ debugging gdb assert
Comments
Post a Comment