Skip to content

In -target-select {remoteMode} {destination}, the GDB remoteMode should also be able to be supplied by user. #1410

@xiahualiu

Description

@xiahualiu

if (!string.IsNullOrWhiteSpace(destination))
{
string remoteMode = useExtendedRemote ? "extended-remote" : "remote";
commands.Add(new LaunchCommand($"-target-select {remoteMode} {destination}", string.Format(CultureInfo.CurrentCulture, ResourceStrings.ConnectingMessage, destination)));
}

As you can see, the remoteMode can only be chosen from extended-remote or remote. After checking the older commits I believe the extended-remote was previously added to give support for the OpenOCD debugging server.

However, there are many other remote targets out there. For example, QNX OS uses qnx as the GDB target. You can list all available targets using help target in a GDB console.

I think making the {remoteMode} a json user-defined variable is a better idea. Since it is really up to the user what type of remote target gdb is going to attach to, and should not be limited by the fixed options provided by VS Code.

Thanks,
Xiahua

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions