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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 23
Registered: ‎05-29-2012
My Device: PlayBook
My Carrier: NA
Accepted Solution

Running an application through GDB remotely

Hiya,

 

I'm trying to debug an application and I want to use GDB remotely [ie no IDE, just through command line]. I'm developing on Linux with Qt/QML for the Playbook. There's some documentation [1], and an older forum thread [2], but these are kind of over my head. Given a bar file "abc.bar", could anyone provide step by step instructions as to how I can debug it remotely as it executes on the device?

 

http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.neutrino.prog/topic/using_gdb_...

http://supportforums.blackberry.com/t5/Native-Development/Launching-debugger-without-IDE/m-p/1789555...

 

 

Regards,

 

Preet

Highlighted
New Contributor
Posts: 2
Registered: ‎05-07-2012
My Device: BlackBerry PlayBook
My Carrier: None

Re: Running an application through GDB remotely

[ Edited ]

I have the following in a Makefile:

 

[Assuming you haven't deployed your program]

$ blackberry-debugtokenrequest -storepass <Keystore Password> -devicepin <PIN><YourApplication>_tok.bar

$ blackberry-deploy -package <YourApplication>.bar -installDebugToken <YourApplication>_tok.bar <Device IP Address> -password <Device Password>

$ blackberry-deploy -debugNative -launchApp -device <Device IP Address> -password <Device Password> <YourApplication>.bar | grep result:: | sed 's/result:://' > pid

 

[Connecting to the device and running GDB]

$ blackberry-connect <Device IP Address> -password <Device Password> -sshPublicKey ~/.rim/bbt_id_rsa.pub > /dev/null &

$ echo target qnx <Device IP Address>:8000 > gdbrun

$ echo sym <Executable Path> >> gdbrun

$ printf "attach " >> gdbrun

$ cat pid >> gdbrun

$ ntoarm-gdb -command=gdbrun

 

I only have a PlayBook, so if you also plan on using this for BB10 later I'm not sure if it will work.  The whole project is hosted at: https://hg.interactivelaboratories.com/playbook_template

Developer
Posts: 23
Registered: ‎05-29-2012
My Device: PlayBook
My Carrier: NA

Re: Running an application through GDB remotely

This is exactly what I was looking for, thanks!

New Contributor
Posts: 2
Registered: ‎05-07-2012
My Device: BlackBerry PlayBook
My Carrier: None

Re: Running an application through GDB remotely

Sorry about bumping this thread, I couldn't edit my post.

 

Here's the new URL where the project is hosted:

https://github.com/El-Rico/PlayBook_Template