[[gdb]]
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gdb [2016/10/16 20:19]
dblume created
gdb [2017/10/24 17:22] (current)
dblume
Line 5: Line 5:
   (gdb) set pagination off   (gdb) set pagination off
   (gdb) thread apply all bt   (gdb) thread apply all bt
 +
 +Other useful tips:
 +
 +  (gdb) t a a f       # thread apply all frame
 +  (gdb) t a a bt 3    # thread apply all backtrace bottom three frames
 +  (gdb) t a a bt -3   # thread apply all backtrace top three frames
 +
 +==== Detecting a Deadlock ====
  
 Get high level info on the threads: Get high level info on the threads:
Line 47: Line 55:
        
 Note the <nowiki>__owner</nowiki> of the mutex that thread 2 is waiting on. It's 24793. That's thread 3. There's your deadlock. Note the <nowiki>__owner</nowiki> of the mutex that thread 2 is waiting on. It's 24793. That's thread 3. There's your deadlock.
 +
 +==== Attaching to a remote target ====
 +
 +  - Deploy gdb server with the remote target. Launch remote target with gdb server. 
 +  - Untar remote libraries to a local dir. Eg., 487.72E04128A-2371582-rootfs.tar.gz in my ~/Downloads directory.
 +
 +    $ /usr/local/arm/bin/arm-linux-gdb builds/myapp.sym
 +    GNU gdb (GDB) 7.5.1
 +    This GDB was configured as "--host=i686-build_pc-linux-gnu --target=arm-brcm-linux-gnueabi".
 +    Reading symbols from builds/myapp.sym...done.
 +    (gdb) set sysroot ~/Downloads/rootfs/firmware.obj/root/
 +    (gdb) set solib-search-path builds/myapp.dir/
 +    (gdb) target remote 10.15.24.54:5555
 +    Remote debugging using 10.15.24.54:5555
 +    ...
 +    (gdb) c
 +
gdb.1476674395.txt.gz · Last modified: 2016/10/16 20:19 by dblume
 
Recent changes RSS feed Driven by DokuWiki