New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 860531 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 23
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

We need an IDE that can debug native code on Android

Project Member Reported by agrieve@chromium.org, Jul 5

Issue description

We currently have only command-line gdb available to us for debugging native code. There are many visual tools, and I"m sure we could make one of them work. Would be great if added an "--ide" to adb_gdb, and then wrote instructions for how to hook up an IDE.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f48dc97697d630c6c4d0d4a02df6ca5da026afc

commit 4f48dc97697d630c6c4d0d4a02df6ca5da026afc
Author: Andrew Grieve <agrieve@chromium.org>
Date: Tue Jul 10 03:34:53 2018

apk_operations.py: Add --ide for gdb command

Also improves robustness of adb_gdb script a bit.

I was able to get vscode to attach to an emulator with a launch.json of:


{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "/tmp/adb-gdb-support-agrieve/app_process",
            "miDebuggerServerAddress": "localhost:19631",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceRoot}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "/tmp/adb-gdb-support-agrieve/gdb",
            "logging": {
                "engineLogging": true
            }
        }
    ]
}

And then pausing and executing:
-exec source /tmp/adb-gdb-support-agrieve/gdbinit

This made breakpoints show up as "active", but afaict, they still didn't cause
execution to break :(.


Bug:  860531 
Change-Id: Idc421f34b54630306b1a7c02b446e487e44abebf
Reviewed-on: https://chromium-review.googlesource.com/1129636
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573608}
[modify] https://crrev.com/4f48dc97697d630c6c4d0d4a02df6ca5da026afc/build/android/adb_gdb
[modify] https://crrev.com/4f48dc97697d630c6c4d0d4a02df6ca5da026afc/build/android/apk_operations.py

Cc: -agrieve@chromium.org wnwen@chromium.org
Owner: agrieve@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4b85796d853822a38bb296d2d0d62d603cff0057

commit 4b85796d853822a38bb296d2d0d62d603cff0057
Author: Andrew Grieve <agrieve@chromium.org>
Date: Wed Oct 03 15:06:31 2018

adb_gdb: Make --ide work with vscode

Bug:  860531 
Change-Id: I03983ef066185bfc5aa40a34c9ced4fbfd2c97e2
Reviewed-on: https://chromium-review.googlesource.com/c/1258055
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596213}
[modify] https://crrev.com/4b85796d853822a38bb296d2d0d62d603cff0057/build/android/adb_gdb
[modify] https://crrev.com/4b85796d853822a38bb296d2d0d62d603cff0057/build/android/apk_operations.py
[modify] https://crrev.com/4b85796d853822a38bb296d2d0d62d603cff0057/docs/vscode.md

Status: Fixed (was: Assigned)
Updated docs here: https://crrev.com/c/1288954

This is now fixed!
Thanks Andrew! We can now mark this off our DevX OKRs.

Sign in to add a comment