[android-developers] Re: Is that possible to print backtrace when debug native code

2010-11-23 Thread DanH
There's no generic C/C++ facility for that -- it would be system- specific (if it exists at all). On Nov 23, 3:45 am, A.TNG tang.j...@gmail.com wrote: Hi All, When I debug android app, if I work with Java, I can use Log.d(TAG, , new Throwable()) to print backtrace of Java code. This is

[android-developers] Re: Is that possible to print backtrace when debug native code

2010-11-23 Thread Jason
If you want to just print a log line, you can do this with the log.h library: #include android/log.h __android_log_print(ANDROID_LOG_DEBUG, Category, Your message); But you won't get a stack trace (I'm assume from backtrace you mean stack trace?) If you are trying to handle exceptions in C++