microsoft / microsoft/vscode-cpptools
Didn't display warning message when attempt to debug mismatched core and application
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Internal bug id: 245741
Configuration
Ubuntu14 x64
Install latest verson of vscode and cppdebug extension.
Repro:
- Compile following C++ code with x64 by default: g++ -g main.cpp - o a.out
int main()
{
int i=0;
i=i/i;
return 0;
}
-
Compile the same code with x86: g++ -g -m32 main.cpp -o a.out-x86
-
Run the x64 program "a.out" and collect the core dump
-
Launch vscode by updating "program" and "coreDumpPath" as following:
-
F5
Here is the launch.json file:
{
..
"configurations": [
{
..
"targetArchitecture": "x64",
"program": "${workspaceRoot}/a.out-x86",
"args": [],
"stopAtEntry": false,
"coreDumpPath":"${workspaceRoot}/core",
"cwd": "${workspaceRoot}",
"environment": []
....
}
]
}
Observe:
There is no any message displayed in the debug console, this is difficult for customers to identify what the problem here if they happen to debug the mismatched core dump and application.
Attached log in attachment.
Investigation:
I try to debug the same scenario in gdb, it can at least prompt message like “warning: core file may not match specified executable file … warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64”
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the mismatch with the supplied x64 and x86 compilation commands and the launch.json configuration, then inspect the debug console during the F5 launch. Trace how the extension handles the coreDumpPath and executable architecture. Done means a clear warning is displayed when the core dump and application do not match, comparable to the reported gdb warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100