Skip to content

Instantly share code, notes, and snippets.

@vstm
Created January 27, 2014 20:35
Show Gist options
  • Save vstm/8656784 to your computer and use it in GitHub Desktop.
Save vstm/8656784 to your computer and use it in GitHub Desktop.
gdb power user
break HPHP::UnitEmitter::recordSourceLocation
command 1
if m_pceVec.size() > 0 && m_pceVec[0]->m_methods.size() > 0 && m_pceVec[0]->m_methods[0]->m_params.size() > 0
set $phpCodeAddr = &m_pceVec[0]->m_methods[0]->m_params[0].m_phpCode
watch *$phpCodeAddr
break std::__uninitialized_move_if_noexcept_a<std::pair<int, HPHP::SourceLoc>*, std::pair<int, HPHP::SourceLoc>*, std::allocator<std::pair<int, HPHP::SourceLoc> > > if __result < $phpCodeAddr && (__result + (__last - __first)) > $phpCodeAddr
disable 1
else
cont
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment