Changes between Version 35 and Version 36 of BB10


Ignore:
Timestamp:
Jan 9, 2013, 4:30:30 PM (11 years ago)
Author:
Martin Kolman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BB10

    v35 v36  
    214214}}}
    215215
     216
     217'''Using gdb'''
     218
     219It is possible to deploy an application and launch it in debugging mode on the BB10 device.
     220
     221First source your shell envrionment from the BB10 NDK environment script:
     222{{{
     223source bbndk-env.sh
     224}}}
     225Then deploy the application with debugging enabled:
     226{{{
     227blackberry-deploy -installApp -launchApp -debugNative <device ip> -password <device password> -package HelloWorld.bar
     228}}}
     229In the ourput of this command you should get something like this at the end:
     230{{{
     231result::32395406
     232}}}
     233The number is the application PID you will use for debugging it with gdb.
     234
     235Next, start the BB10 NDK gdb:
     236{{{
     237ntoarm-gdb
     238}}}
     239From inside the gdb shell:
     240{{{
     241echo target qnx <device ip>:8000
     242attach <PID>
     243}}}
     244
     245The result:
     246
     247{{{
     248(gdb) attach 32395406
     249Attaching to pid 32395406
     250"/usr/bin/python3.2": not in executable format: File format not recognized
     251(gdb) run
     252../../gdb/thread.c:72: internal-error: inferior_thread: Assertion `tp' failed.
     253A problem internal to GDB has been detected,
     254further debugging may prove unreliable.
     255Quit this debugging session? (y or n) n
     256../../gdb/thread.c:72: internal-error: inferior_thread: Assertion `tp' failed.
     257A problem internal to GDB has been detected,
     258further debugging may prove unreliable.
     259Create a core file of GDB? (y or n) y
     260}}}
     261
     262So its not really that usable for debugging Python applications but probably could be somehow fixed to provide some meaningful output.
     263
    216264=== Helpful commands ===
    217265
    218266Pack, install and run:
    219267{{{
    220 blackberry-pythonpackager -package HelloWorld.bar     -devMode    -env PYTHONPATH=app/python/blackberry-py    bar-descriptor.xml    main.py main.qml     -e ../icon.png icon.png     -e ../blackberry-py/ blackberry-py/   -debugToken ~/token.bar -device 192.168.1.8 -password super_secret_password -launchApp -list -installApp
     268blackberry-pythonpackager -package HelloWorld.bar     -devMode    -env PYTHONPATH=app/python/blackberry-py    bar-descriptor.xml    main.py main.qml     -e ../icon.png icon.png     -e ../blackberry-py/ blackberry-py/   -debugToken ~/token.bar -device <device ip> -password <device password> -launchApp -list -installApp
    221269}}}
    222270
    223271Deploy package:
    224272{{{
    225 blackberry-deploy -installApp 192.168.1.8 -password super_secret_password -package HelloWorld.bar
     273blackberry-deploy -installApp <device ip> -password <device password> -package HelloWorld.bar
    226274}}}
    227275