Skip to content

'debugger_args' not honored for 'attach' configuration in gdb #206

Closed
@rbrodeur

Description

@rbrodeur

Additional arguments to gdb in 'debugger_args' are not being passed to the gdb command line when using the 'attach' connection method. In the embedded environment where I work, the '-x gdb.ini' parameter is required to set up gdb correctly to attach to the target. The 'autorun' configuration seems to happen too late and is not working in my environment.

It would be super helpful if the 'attach' connection method concatenated the 'debugger_args' the same way as the launch connection method seems to (note, I have not validated that the 'launch' method actually correctly concatenates 'debugger_args', I'm just looking at the code differences between launch and attach).

load():

const args = this.preargs.concat(this.extraargs || []);

attach():

if (target.startsWith("extended-remote")) {
    isExtendedRemote = true;
    args = this.preargs;
} else
    args = args.concat([executable, target], this.preargs);

Thank you for taking the time to create and maintain this vscode extension and thank you for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions