microsoft / microsoft/vscode-cpptools

Didn't display warning message when attempt to debug mismatched core and application

Open
#504 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug debugger
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:

  1. 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;  

}

  1. Compile the same code with x86: g++ -g -m32 main.cpp -o a.out-x86

  2. Run the x64 program "a.out" and collect the core dump

  3. Launch vscode by updating "program" and "coreDumpPath" as following:

  4. 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

Open the contributing guide

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.