On Oct 15, 7:08 am, Michael Richardson <[email protected]> wrote: > (gdb) cd /build/m1 > Working directory /build/m1 > (canonically /build/m2). > (gdb) file out/target/product/generic/symbols/system/bin/app_process > Reading symbols from /build/m2/out/target/product/generic/symbols/ > system/bin/app_process...done. > (gdb) set solib-search-path out/target/product/generic/symbols/system/ > lib [...] > This is with a physical device. With an emulator, one has to, of > course, run the adb forward stuff. (Too bad that doesn't work with a > real device too, as then I would not need to run gdb over the > wireless)
"adb forward" should work equally well with the emulator and with a real device. build/envsetup.sh has a "gdbclient" shell function that automates some of this; if you have a full source tree I recommend using it (or at least looking at it to see what it does). On the device: # gdbserver :5039 --attach pid On the host, just cd to the top of your source tree and type "gdbclient". Magic happens (it assumes port 5039 is forwarded and you're debugging app_process). If magic doesn't happen, try the steps individually: % cd <top-of-tree> % adb forward tcp:5039 tcp:5039 % ./prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gdb out/ target/product/<product-name>/symbols/system/bin/app_process (gdb) set solib-absolute-prefix /absolute-source-path/out/target/ product/<product-name>/symbols (gdb) set solib-search-path /absolute-source-path/out/target/product/ <product-name>/symbols/system/lib (gdb) target remote :5039 Note in particular the use of absolute paths. Last I checked, gdb provided no diagnostics if you got the path wrong. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

