Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
mabouzou
Posts: 16
Registered: ‎05-02-2013
My Device: Z10 LE
Accepted Solution

Getting a stack trace of a process

I have a simple Cascades application that starts a thread (other than the main thread) and this thread sleeps for 1 second then outputs a message to a TextArea control on the GUI. My application was compiled with -g. If I interrupt the application in gdb I don't see a stack trace of my thread while it's blocked in sleep(). Likewise, if there are other threads in my process that are blocked on any system calls then gdb cannot retrieve their stack traces. The only case were I can get a stack trace is in threads that are not blocked in system calls.

 

The libraries that are shipped with the NDK are all stripped so there are no symbol information. Also, it's difficult to match the NDK version with what's on the device.

 

Any help is greatly appreciated.

 

Developer
indy2718
Posts: 36
Registered: ‎01-16-2013
My Device: Z10

Re: Getting a stack trace of a process

Yes, I experience this difficulty too.   It's especially hard when I have an assert(x); and the stack is meaningless.  Any suggestions?  Is there a gdb stack history command we can use?

Developer
mabouzou
Posts: 16
Registered: ‎05-02-2013
My Device: Z10 LE

Re: Getting a stack trace of a process

The latest SDK 10.2 has addressed this problem. The IDE downloads the unstripped binaries that matches the device you are debugging on. These binaries are not stripped and allow for a good stack trace.