Skip to content

Instantly share code, notes, and snippets.

@ostrolucky
Created April 20, 2019 13:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ostrolucky/768f08dbe813ef941c63de62a6cffe6e to your computer and use it in GitHub Desktop.
Save ostrolucky/768f08dbe813ef941c63de62a6cffe6e to your computer and use it in GitHub Desktop.
Using lldb to debug PHP code
Guilhermes-MacBook-Pro:orm guilhermeblanco$ lldb /usr/local/Cellar/php/7.3.2/bin/php
(lldb) target create "/usr/local/Cellar/php/7.3.2/bin/php"
Current executable set to '/usr/local/Cellar/php/7.3.2/bin/php' (x86_64).
(lldb) run ./vendor/bin/phpunit tests/Doctrine/Tests/ORM/Functional/PaginationTest.php --filter testIterateWithOutputWalkersWithRegularJoinWithComplexOrderByReferencingJoined
Process 99416 launched: '/usr/local/Cellar/php/7.3.2/bin/php' (x86_64)
PHPUnit 7.5.6 by Sebastian Bergmann and contributors.
Runtime: PHP 7.3.2 with Xdebug 2.7.0RC2
Configuration: /Users/guilhermeblanco/doctrine/orm/phpunit.xml.dist
Process 99416 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
frame #0: 0x00000001012e1e2f libsqlite3.0.dylib`sqlite3BtreeMovetoUnpacked + 46
libsqlite3.0.dylib`sqlite3BtreeMovetoUnpacked:
-> 0x1012e1e2f <+46>: movzwl 0x8(%rax), %ecx
0x1012e1e33 <+50>: leaq 0x3396(%rip), %r13 ; sqlite3VdbeRecordCompare
0x1012e1e3a <+57>: cmpl $0xd, %ecx
0x1012e1e3d <+60>: ja 0x1012e1ea9 ; <+168>
Target 0: (php) stopped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment