On Thursday, 7 June 2012 01:17:48 UTC+2, Tim in Boulder wrote:
>
> On 6/6/2012 4:43 PM, b0b wrote: 
> > There's no need for the READ_LOGS permission to log only own app's 
> > logging. 
>
> Sorry, but there IS a need, if you need to look at the NDK crash dump. 
> There's no way to grab that info without READ_LOG. Some of us do 
> cross-platform development where 99% of the code happens in C, C++, or a 
> scripting language built from C or C++, so the normal crash dump from 
> Java always shows the same call into our rendering handler, where the 
> entire app lives. 
>
> Sure I can grab my OWN log messages, but they're rarely as useful as the 
> byte offset of the actual crash, which you can only get from the system 
> log. I'd have to be spamming the log all the time for that to be enough. 
>
> Of course more than half the time I'm seeing that it's actually crashing 
> somewhere deep in Android because an OEM has broken an important API 
> (I'm looking at you Samsung! Though ASUS Transformer has its own unique 
> crash problems as well...). 
>
> See http://pastie.org/4040946 for an example of the kind of crash dump I 
> need to see. Not that the information is always useful; the one in that 
> link, IIRC, showed an illegal instruction at a point where there 
> couldn't possibly be one. But they ARE useful sometimes, so if you can 
> tell me some way to collect them without READ_LOG, I'll be very happy. 
>
> Tim 
>
>
It *might* be possible to get that log , overriding the default signal 
handlers in your NDK code
and taking inspiration from debuggerd.c which handle the logging of the 
detail trace (see function 

handle_crashing_process):


https://github.com/CyanogenMod/android_system_core/blob/ics/debuggerd/debuggerd.c

I have not tried it but if this code does not require particular 
permission, it should work.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/android-discuss/-/Ev89DRs7EkwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en.

Reply via email to