On Sep 14, 2:08 pm, DaveG <david.golom...@flexilis.com> wrote:
> Here is
> the code (should I move this thread to the NDK list?) that causes the
> crash for me -- I don't see anything wrong, but maybe I'm missing
> something about the ordering freeing of the resources?

The code looks right to me.  Note you don't actually need the
DeleteLocalRef calls; those evaporate when the thread is detached.

>     // Copy output into another buffer

You sure the output buffer is big enough?  (UTF-8 uses a variable-
width encoding.)


> Yeah, unfortunately this is hard enough to reproduce that I haven't
> gotten it to reproduce within gdb yet. Still hoping... It'd be great
> to improve the stack unwinding code.

Another trick: put "debug.db.uid = 32767" in /data/local.prop and
reboot.  Now, when something crashes and debuggerd sees it, it will
halt the process to give you a chance to attach a debugger.  Press the
home key to let things continue.


> Even the #00 address is sometimes
> wrong for us, it seems to calculate the base address of our shared
> library wrong and do the pc to #00 translation wrong. The pc is
> correct,
> #00 is off by 0xB0000 or so. That's easy enough to handle, but the
> lack of a real stack makes post-mortem debugging painful.

It's computing a relative address by stripping off the high bits.  The
system libs all have fixed addresses, so this always works for those.

> Unfortunately the libc.so on the device has no symbols so I can't
> truly verify that -- is there a flag to objdump that I don't know
> about that would help reverse resolve the address?

If you know the start address of the library and the offset of the
function you should be able to just find the right file offset.

And yes, the NDK list is probably more appropriate, since we're
entirely focused on native code.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to