[Lldb-commits] [PATCH] D48177: Suppress SIGSEGV on Android when the program will recover

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 14 14:01:09 PDT 2018


jingham added a comment.

If you can get the address of the bad access from the signal, you could also check that it was 0x0 and only suppress the SIGSEGV if it is?

Also, do you want to put in a setting to turn this behavior off?  If the code in any of the files of this type were to crash for some other reason than a Java NULL dereference, you'd have no way to use lldb to debug the issue.   lldb will just auto-continue and then either the program will terminate because the SIGSEGV handler doesn't handle this signal or the SIGSEGV handler will crash or whatever...  That will be too late to be useful.

But I don't know anything about how these .oat and .dex/.odex files are constructed, and maybe they can't crash for any other reason than emulating a Java NULL access, in which case this looks fine.



================
Comment at: source/Plugins/Platform/Android/PlatformAndroid.cpp:424
+  // We are lookking for .dex, .odex, and .oat files.
+  if (ext_ref.endswith("dex") || ext_ref.endswith("oat")) {
+    // We have a SIGSEGV we need to mute
----------------
Given that this is a pretty big behavior change, I would exactly match on the three extensions rather than use endswith, so it only affects the file types you care about.


https://reviews.llvm.org/D48177





More information about the lldb-commits mailing list