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
canurabus
Posts: 23
Registered: ‎05-29-2012
My Device: PlayBook
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

Please use plain text.
New Contributor
teh_programerer
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

Please use plain text.
Developer
canurabus
Posts: 23
Registered: ‎05-29-2012
My Device: PlayBook

Re: Running an application through GDB remotely

This is exactly what I was looking for, thanks!

Please use plain text.
New Contributor
teh_programerer
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

Please use plain text.