microsoft / microsoft/MIEngine

Cannot debug the 64-bit version of a C++ library for Android using Visual Studio

Open
#1,246 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
859
Forks
233
Avg merge
1d 6h
Merged PRs (30d)
3

Description

Some time ago, I opened an issue about not being able to debug the 64-bit version of a shared library for Android written using C++ on developercommunity.visualstudio.com. Unfortunately, the Microsoft engineers that I know were once working in this area have all been reassigned and hence nothing has happened with that issue.

However, I see a clear difference between the 32- and 64-bit output on the file system when I'm attempting to debug the library. When debugging the 32-bit version of the library in Visual Studio for the first time, a folder named .gdb gets created. Within that folder, the following files appear:

app_process32
libc.so
linker

The Android app is properly running on the Android emulator and I am able to debug the C++ code.

But when debugging the 64-bit version of the library for the first time, the same .gdb folder gets created in the output folder but it does not contain anything which I suspect is the problem why debugging does not work. Eventually, Visual Studio shows a messagebox stating Unable to start debugging. GDBServer failed to start or attach to the target application.

Unfortunately, I cannot find any documentation where those files are coming from or what code ensures that those files end up in the .gdb folder. I'm clueless what linker and app_process32 actually is.

Can anyone help me understand what is going on here? The goal is to understand what I would need to do to add the necessary files to the 64-bit .gdb folder.

I suspect that this folder gets created by the MIEngine or is at least closely related to it which is why I've opened this issue here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The payload names no repository files or tests. Start with the linked Developer Community report and MIEngine's handling of the .gdb folder, comparing the 32-bit and 64-bit Android debugging outputs; done means identifying why the 64-bit folder is empty and what is needed for GDBServer to start or attach.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cpp
Domain
devtools, mobile-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.