[PD] backtrace() for MinGW (and Android)

Mathieu Bouchard matju at artengine.ca
Sun Feb 12 17:09:25 CET 2012


Le 2012-02-12 à 10:41:00, Hans-Christoph Steiner a écrit :
> On Feb 12, 2012, at 12:43 AM, Mathieu Bouchard wrote:
>> Does anyone have such a thing for Android ?
>> I found something similar, except it doesn't work inside a signal 
>> handler, so, unlike any other Linux OS, I can't get backtrace() to give 
>> me the stack of a segfault.
>
> That's probably because backtrace() is not Linux but GNU, and Android is 
> Linux but not GNU.  It uses its own "Bionic" libc, for example.

Yeah, I already know that part. The question is more about how to do it on 
Android. The native functions can't seem to go through the signal 
boundary, so they give a backtrace of 4 functions in my Android app when 
the app crashed inside of 50 nested functions, for example. The 4th stack 
frame looks like it's the end of the stack, and I need a way to access the 
5th stack frame from there, and then I'd be able to access the 49 other 
frames. But it seems that even if I had a magical way of finding where the 
5th frame is, Android's function would not allow me to tell it where to 
go.

> I'll bet backtrace() works fine on Debian GNU/kFreeBSD, which is also 
> not Linux but is GNU.  So those who think "GNU/Linux" is just marketing 
> aren't paying attention to the details :)

Well, I'm paying attention to the details, but it does not help fixing the 
problem.

  ______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC


More information about the Pd-list mailing list