1. 16 Sep, 2015 1 commit
  2. 24 Jun, 2015 1 commit
  3. 13 Feb, 2015 1 commit
    • Andrew Hsieh's avatar
      Fixes to handle adb return value properly · edda08c3
      Andrew Hsieh authored
      "adb shell cmd" always return 0 even though when cmd returns
      non-zero.  Fix those instance of adb whose return values are checked
      to call adb_var_shell* instead.
      
      Without this fix, "adb shell test -e /system/bin/app_process32" always
      return 0 on pre-L devices, and causes ndk-gdb to use the non-existance
      app_process32 and fail
      
      Change-Id: I1e8925dc989009859cf5c02a2fb92655864f1d7b
      edda08c3
  4. 22 Jan, 2015 1 commit
    • Alexander Ivchenko's avatar
      Three fixes for ndk-gdb and ndk-gdb.py: · 94b323a8
      Alexander Ivchenko authored
      
      1) Always try to use app_process32/app_process64 to
      avoid pulling symlinks (this does not work on win hosts).
      
      2) Don't change the name of linker64 when pulling it from the device
      (otherwise symbols from linker64 are not being loaded in 64-bit case).
      
      3) Always pull app_process32/app_process64 as app_process to avoid
      inconsistency.
      
      Change-Id: I1e4f066b77ee2fc37b879c1a1924b8396921539c
      Signed-off-by: default avatarAlexander Ivchenko <alexander.ivchenko@intel.com>
      94b323a8
  5. 15 Jan, 2015 1 commit
    • Alexander Ivchenko's avatar
      Fix ndk-gdb for debugging applications on x86_64 · f91d44c1
      Alexander Ivchenko authored
      
      This patch fixes several issues:
      
      1) Use ro.product.cpu.abilist64 and ro.product.cpu.abilist32
      instead of ro.product.cpu.abi and ro.product.cpu.abi2. The latter
      ones for x86_64 do not contain x86 abi.
      
      2) Pull app_process32 instead pf app_process when debugging 32-bit
      app on 64-bit device.
      
      3) Pull linker64 for 64-bit.
      
      4) Pull lib64/libc.so for 64-bit.
      
      5) We have to push the gdbserver that matches the ABI of the app AND
      the ABI of the device, not just the one that matches the ABI of the device.
      
      Change-Id: Ibb0f264fdd007cb2a84aad87bcb396d24e2092e7
      Signed-off-by: default avatarAlexander Ivchenko <alexander.ivchenko@intel.com>
      f91d44c1
  6. 09 Dec, 2014 1 commit
  7. 12 Nov, 2014 1 commit
    • Andrew Hsieh's avatar
      Remove bashisms in ndk-gdb · fc114055
      Andrew Hsieh authored
      Cause of issue b.android.com/73338 with message reads:
      
         ../../ndk-gdb: 771: [: armeabi-v7a: unexpected operator
      
      Change-Id: I76c7f0c151b5c31166fc6d70d12071efa8500d9a
      fc114055
  8. 13 Feb, 2014 1 commit
  9. 10 Feb, 2014 1 commit
    • Andrew Hsieh's avatar
      Support APP_ABI=armeabi-v7a-hard · 748416e5
      Andrew Hsieh authored
      Add a new NDK-only ABI armeabi-v7a-hard in order to solve
      -mfloat-abi=hard issue.
      
      1. Note that this is NDK-only ABI.  No known devices
         support armeabi-v7a-hard, and they can't w/o breaking existing float-abi=softfp
         code
      2. APP_ABI=armeabi-v7a-hard still installs libraries in libs/armeabi-v7a.
         As a result, armeabi-v7a-hard and armeabi-v7a can't co-exist ("make"
         will ignore one of the "install"), unless when _NDK_TESTING_ALL_=yes for
         internal testing (where lib is installed to libs/armeabi-v7a-hard)
      3. Both GCC 4.6/4.8 and Clang3.3/3.4 has additional multilib
         option "-mfloat-abi=hard" to look for libraries in /hard
         sub-directory.
           5be615df32ce970fcccda93cf577e9ce35b1d397 (gcc4.6,4.8)
           7e8798057dc5f28b44b5608fd98fff1cba6909a2 (clang3.4)
           deedd8557b7d82c6931b6942bd39a00127780835 (clang3.3)
      4. APP_ABI=all still expand to armeabi,armeabi-v7a,x86,mips
      
      Change-Id: I08c26bfa6580c80260185c2fef398848aebd197d
      748416e5
  10. 14 Nov, 2013 2 commits
  11. 12 Nov, 2013 1 commit
  12. 10 Jun, 2013 1 commit
  13. 09 Apr, 2013 1 commit
  14. 12 Dec, 2012 1 commit
  15. 21 Sep, 2012 1 commit
  16. 27 Aug, 2012 1 commit
  17. 07 Aug, 2012 1 commit
    • Andrew Hsieh's avatar
      Enhance ndk-gdb to handle list of ABIs in cpu.abi and cpu.abi2 · 3c3ce150
      Andrew Hsieh authored
      In order for vendor to provide more than two CPU_ABIs, both
      ro.product.cpu.abi and abi2 may contain multiple comma-delimited
      ABIs.  This scheme is also backward compatible when there is only
      one or two APIs.
      
      Enhance ndk-gdb to handle it.
      
      Change-Id: I81f5765a5d51a8a131753828d73919618c0a9d3f
      3c3ce150
  18. 27 Jul, 2012 1 commit
  19. 02 Jul, 2012 1 commit
    • Andrew Hsieh's avatar
      Fix ndk-gdb to also pull /system/bin/link · 07a6a66c
      Andrew Hsieh authored
      ndk-gdb should also pull /system/bin/link, so gdb on host can set
      a breakpoint in __dl_rtld_db_dlactivity and be aware of linker
      activity (eg. rescan solib symbols when dlopen() is called)
      
      Change-Id: Ie98d026a92177a076650665d7c26ac88781621a2
      07a6a66c
  20. 29 Jun, 2012 1 commit
  21. 16 May, 2012 1 commit
  22. 14 Feb, 2012 1 commit
    • David 'Digit' Turner's avatar
      Custom output directory support with NDK_OUT · ff7cd04c
      David 'Digit' Turner authored
      This patch allows the use of the NDK_OUT environment variable
      to specify a custom output directory for all intermediate
      generated files (i.e. instead of $PROJECT_PATH/obj).
      
      ndk-gdb will pick up the right location if the variable is
      defined too. Note that final binaries are still placed under
      $PROJECT_PATH/libs by default since the packaging scripts
      expect them to be here.
      
      This fixes http://code.google.com/p/android/issues/detail?id=25470
      
      Change-Id: I50618df619c13f5208200f8d0902b8e4fe201de8
      ff7cd04c
  23. 24 Nov, 2011 2 commits
    • David 'Digit' Turner's avatar
      ndk-gdb: Fix for when the 'adb' path contains spaces · db09243e
      David 'Digit' Turner authored
      This patch ensures the ndk-gdb works correctly if the "adb"
      program (either from the path, or from the --adb=<path> option)
      contains spaces.
      
      Change-Id: I6b4c2469d89236ee5adf8edf1eaf05a69a79564e
      db09243e
    • David 'Digit' Turner's avatar
      Fix the use of $@ in all shell scripts · ec2b8dda
      David 'Digit' Turner authored
      This patch allows all our development scripts, as well as ndk-gdb
      to work well when parameters containing spaces are used.
      
      The $@ shell variable is very special because it will expand
      differently if inside a quoted string. What this means is that,
      while $@ normally corresponds to the list of all parameters to
      a function or script, we have:
      
        $@   -> expands to a single string
        "$@" -> expands to a series of strings
      
      This is important when using them as parameters to other commands
      for example consider:
      
        # Simple function to dump all parameters, one per line.
        dump () {
           for ITEM; do
              echo "$ITEM"
           done
        }
      
        dump1 () {   # this will always print a single line
            dump $@
        }
      
        dump2 () {   # this will print one line per item
            dump "$@"
        }
      
        dump1 aaa bbb ccc      # prints "aaa bbb ccc" on a single line
        dump2 aaa bbb ccc      # prints three lines: "aaa", "bbb" and "ccc"
      
      Generally speaking, one should always use "$@" except in very rare cases
      (e.g. when called from an eval command).
      
      Change-Id: I87ec2a7b078cbe463f0ec0257ecad8fd38835b2e
      ec2b8dda
  24. 27 Oct, 2011 1 commit
    • David 'Digit' Turner's avatar
      ndk-gdb: Fix debugging of private services · 9c10d882
      David 'Digit' Turner authored
      This patch fixes ndk-gdb so it can properly debug an application
      that has private services. These will appear in the 'ps' output
      as <package-name>:<service-name>, and the way the extract-pid.awk
      script worked, were matched against <package-name> incorrectly.
      
      + Make extrac-pid.awk usable when custom ROM use a Busybox 'ps'
        instead of the standard Android toolbox version
      
      + Add unit test for extract-pid.awk
      
      Change-Id: Ifb38d5bdfd5b648ff468cb3642db3bb64297707d
      9c10d882
  25. 24 Mar, 2011 1 commit
    • David 'Digit' Turner's avatar
      ndk-gdb: Fixes for Darwin and --project option · b2e3ee77
      David 'Digit' Turner authored
      This patch contains several fixes for ndk-gdb:
      
      - Allow it to run properly on Darwin, where 'mktemp' will return an
        error if used without parameters. Note that 'mktemp -t <pattern>'
        does not work the same on Linux and Darwin, so use an invocation
        that is supported by all host platforms (Cygwin included).
      
      - Ensure that ANDROID_NDK_ROOT is defined as an absolute path,
        to avoid problems when the script is invoked as in:
      
            cd $NDKROOT
            ./ndk-gdb --project=/path/to/project/
      
      - The _adb_var_shell redirection was buggy and created files named
        "&1" and "&2" in the current directory for no good reason.
      
      Fix for bug 4156117
      
      Change-Id: I8dbd29bd33db808289755055a6ff5c9ccd181bfc
      b2e3ee77
  26. 16 Mar, 2011 1 commit
  27. 18 Oct, 2010 1 commit
    • David 'Digit' Turner's avatar
      ndk-gdb: Fix windows invokation · caf06194
      David 'Digit' Turner authored
      This also simplifies the gdb client invokation by putting
      the "file" command inside the gdb.setup file, instead of
      using the command-line.
      
      Change-Id: Iaa31dd2afaada8552db0b72baca91ecd16d6ff95
      caf06194
  28. 07 Oct, 2010 1 commit
    • David 'Digit' Turner's avatar
      Fix ndk-gdb and add --delay=<seconds> option. · 5b65625a
      David 'Digit' Turner authored
      Fix ndk-gdb to _not_ start the activity unless --start or --launch is used.
      
      Add a new option --delay=<seconds> to change the wait delay between the
      launch of an activity and its attachement with gdbserver. The default delay
      is also changed from 1 to 2 seconds.
      
      Document the system libraries update.
      
      Change-Id: Ia7e8c47221e3741bdc2688e750dae366c5426e67
      5b65625a
  29. 14 Sep, 2010 1 commit
    • David 'Digit' Turner's avatar
      Add easy native debugging support through NDK_DEBUG=1 · fd204377
      David 'Digit' Turner authored
      "ndk-build NDK_DEBUG=1" will force the build of a debuggable application.
      This really copies gdbserver to the proper location, as if android:debuggable
      was set to "true" in the app's manifest.
      
      The value of NDK_DEBUG can be 0, 1, true or false, and will override the content
      of the manifest. The main benefit from this change is that you don't have to
      edit your manifest file just to rebuilt
      
      Change-Id: I3fafb620189ac53a72b492c963832dd0c7f8b7d7
      fd204377
  30. 07 Jun, 2010 1 commit
  31. 04 Jun, 2010 1 commit
  32. 01 Jun, 2010 1 commit
  33. 06 May, 2010 1 commit
  34. 29 Apr, 2010 1 commit
    • David 'Digit' Turner's avatar
      Add --start, --launch=<name> and --launch-list options to ndk-gdb. · 0b2676ba
      David 'Digit' Turner authored
      Move all awk scripts to build/awk/ and rework them a bit
      
      Add build/awk/xmlparser.awk to parse XML files into something that
      is easier to process with awk. Its output is used by several
      scripts now (extract-debuggable.awk, extract-package-name.awk and
      the new extract-launchable.awk).
      
      Also update documentation.
      
      Change-Id: I50507abbb2b438aeea25a4e0521e6bf69ad86603
      0b2676ba
  35. 26 Apr, 2010 1 commit
    • David 'Digit' Turner's avatar
      Add ndk-gdb script to the NDK. · a08d6057
      David 'Digit' Turner authored
      This is a helper script used to launch a native debugging session.
      To use it, follow these steps:
      
      1. Make your application debuggable
      2. Build the machine code with 'ndk-build'  (make APP=<name> is not supported)
      3. Build the package with ant or the ADT Eclipse plugin
      4. Install it on your device/emulator
      5. Launch it
      6. Run 'ndk-gdb' from your application project directory.
      
      Change-Id: Ie3b0557e70cefa0080075a34ad0ca46bebef3c42
      NOTE: To work properly, a modified gdbserver binary must be used
            (one that binds to Unix sockets instead of TCP ones). Patch
            upcoming.
      a08d6057