Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added programmer field in debug info output #2391

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions commands/debug/debug_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
ToolchainPrefix: debugProperties.Get("toolchain.prefix"),
ToolchainConfiguration: &toolchainConfiguration,
CortexDebugCustomJson: cortexDebugCustomJson,
Programmer: req.GetProgrammer(),
}, nil
}

Expand Down
2 changes: 2 additions & 0 deletions internal/cli/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ type debugInfoResult struct {
ServerConfig any `json:"server_configuration,omitempty"`
SvdFile string `json:"svd_file,omitempty"`
CortexDebugCustomConfig any `json:"cortex-debug_custom_configuration,omitempty"`
Programmer string `json:"programmer"`
}

type openOcdServerConfigResult struct {
Expand Down Expand Up @@ -166,6 +167,7 @@ func newDebugInfoResult(info *rpc.GetDebugConfigResponse) *debugInfoResult {
ServerConfig: serverConfig,
SvdFile: info.SvdFile,
CortexDebugCustomConfig: cortexDebugCustomConfig,
Programmer: info.Programmer,
}
}

Expand Down
12 changes: 8 additions & 4 deletions internal/integrationtest/debug/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
"thb setup",
"c"
]
}
},
"programmer": "atmel_ice"
}`)
}

Expand Down Expand Up @@ -189,7 +190,8 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
"thb setup",
"c"
]
}
},
"programmer": "my_cold_ice"
}`)

{
Expand All @@ -211,7 +213,8 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
"single-script"
]
},
"svd_file": "svd-file"
"svd_file": "svd-file",
"programmer": "atmel_ice"
}`)
}

Expand All @@ -234,7 +237,8 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
"cold_ice_script"
]
},
"svd_file": "svd-file"
"svd_file": "svd-file",
"programmer": "my_cold_ice"
}`)
}

Expand Down
15 changes: 13 additions & 2 deletions rpc/cc/arduino/cli/commands/v1/debug.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions rpc/cc/arduino/cli/commands/v1/debug.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ message GetDebugConfigResponse {
string cortex_debug_custom_json = 9;
// the SVD file to use
string svd_file = 10;
// The programmer specified in the request
string programmer = 11;
}

// Configurations specific for the 'gcc' toolchain
Expand Down
Loading