microsoft / microsoft/vscode-cpptools

Unable to attach to GDB server without exec_run

Offen
#3,739 2 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@WardenGnaw arbeitet bereits daran.

Seit 07.6.2019.

debugger
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

I was trying to debug arm elf file using ocd GDB server and gdb debugger.
My scenario is that, I have to attach to the GDB server without download the binary files.
Eg:

  1. Run the GDB Server (server listening at :1000 port)
  2. gdb Image.elf
  3. target remote :1000
  4. symbol-file Image.elf

Is it possible to achieve above steps in VSCode?

My configuration is:

        "name": "(GDB) Attach",
        "type": "cppdbg",
        "request": "launch",
        "program": "${workspaceRoot}Image.elf",
        "MIMode": "gdb",
        "miDebuggerPath": "gdb",
        "miDebuggerServerAddress": "localhost:1000",
         "stopAtEntry": false,
        // "customLaunchSetupCommands": [
        //     {
        //         "description": "Load symbol files",
        //         "ignoreFailures": false,
        //         "text": "symbol-file  ${workspaceRoot}/Image.elf"
        //     }
        // ],
        "logging": {"engineLogging":true},
        "targetArchitecture": "arm",
        "cwd": "${workspaceRoot}",
        "externalConsole": true,
        "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            }
        ]

Looking at logs it seems to be debugger is executing "1: (512) <-1013-exec-run " command which essentially trying to rerun the program from beginning.
Is it possible to skip these commands ? And I tried customLaunchSetupCommands too but it didn't help.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.