How to native debug Java on macOS?
Alexander Miloslavskiy
alexandr.miloslavskiy at gmail.com
Tue Oct 1 10:27:14 UTC 2019
Sorry about very late reply.
Did quite a bit of experimenting, trying to get back that pesky
'EXC_BAD_ACCESS' problem. Long story short, I will go straight to the
interesting stuff, answering your questions is no longer needed.
When I use lldb to start my program like `lldb ~/Downloads/program` then
'os::_polling_page' exceptions are seen as continuable 'SIGBUS'.
When I use lldb to attach to running process with `lldb -p` then
'os::_polling_page' exceptions are seen as non-continuable 'EXC_BAD_ACCESS'.
At this moment, I lack the knowledge to explain this difference.
To verify that you're dealing with same 'os::_polling_page' exceptions
in both cases:
1) 'SIGBUS' scenario:
thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGBUS
0x10647fb56: testl %eax, (%r10)
(lldb) print/x $r10
0x00000001000fd008
(lldb) print _ZN2os13_polling_pageE
0x00000001000fd000
These two are obviously related.
2) 'EXC_BAD_ACCESS' scenario:
thread #1, queue = 'com.apple.main-thread', stop reason =
EXC_BAD_ACCESS (code=2, address=0x105c4d008)
(lldb) print _ZN2os13_polling_pageE
0x0000000105c4d000
Notice '0x105c4d008' vs '0x0000000105c4d000'.
More information about the hotspot-dev
mailing list