microsoft / microsoft/MIEngine

GDB and Executable: load file.elf in GDB impossible

Open
#1,274 0 comments 0 reactions 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

Dears, I am trying to debug STM32 project in Visual Studio Pro 2019 using stm32-gdb-server from STM32CubeIDE. So far so good, however I'd like to automate loading the .elf file into the target MCU. This raises few questions or suggestions:

The debug starts with Debug.MIDebugLaunch /Executable:<file.elf> /OptionsFile:<file.xml>, but it doesn't pass the executable filename to GDB itself to guarantee that a 'load file.elf' command can be launched, followed by 'monitor reset'. It could be added to GDB arguments via MIDebuggerArgs, only if the OptionsFile content was parsed and some strings replaced.

I suggest to introduce a macro $(Executable) and replace its content in the options file content, when launching the debug process, incl. path separator adjustments.

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 issue points to Debug.MIDebugLaunch, /Executable, /OptionsFile, and MIDebuggerArgs; start by tracing how MIEngine launches GDB and parses the options file. Done means the executable path can be substituted through a $(Executable) macro with path-separator handling, allowing load file.elf and monitor reset to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools, embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.