Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ef72bde

Browse files
authored
Added programmer field in debug info output (#2391)
* Added `programmer` field to debug info response * Added integration test
1 parent 6753a12 commit ef72bde

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

‎commands/debug/debug_info.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
197197
ToolchainPrefix: debugProperties.Get("toolchain.prefix"),
198198
ToolchainConfiguration: &toolchainConfiguration,
199199
CortexDebugCustomJson: cortexDebugCustomJson,
200+
Programmer: req.GetProgrammer(),
200201
}, nil
201202
}
202203

‎internal/cli/debug/debug.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ type debugInfoResult struct {
126126
ServerConfig any `json:"server_configuration,omitempty"`
127127
SvdFile string `json:"svd_file,omitempty"`
128128
CortexDebugCustomConfig any `json:"cortex-debug_custom_configuration,omitempty"`
129+
Programmer string `json:"programmer"`
129130
}
130131

131132
type openOcdServerConfigResult struct {
@@ -166,6 +167,7 @@ func newDebugInfoResult(info *rpc.GetDebugConfigResponse) *debugInfoResult {
166167
ServerConfig: serverConfig,
167168
SvdFile: info.SvdFile,
168169
CortexDebugCustomConfig: cortexDebugCustomConfig,
170+
Programmer: info.Programmer,
169171
}
170172
}
171173

‎internal/integrationtest/debug/debug_test.go‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
147147
"thb setup",
148148
"c"
149149
]
150-
}
150+
},
151+
"programmer": "atmel_ice"
151152
}`)
152153
}
153154

@@ -189,7 +190,8 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
189190
"thb setup",
190191
"c"
191192
]
192-
}
193+
},
194+
"programmer": "my_cold_ice"
193195
}`)
194196

195197
{
@@ -211,7 +213,8 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
211213
"single-script"
212214
]
213215
},
214-
"svd_file": "svd-file"
216+
"svd_file": "svd-file",
217+
"programmer": "atmel_ice"
215218
}`)
216219
}
217220

@@ -234,7 +237,8 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli
234237
"cold_ice_script"
235238
]
236239
},
237-
"svd_file": "svd-file"
240+
"svd_file": "svd-file",
241+
"programmer": "my_cold_ice"
238242
}`)
239243
}
240244

‎rpc/cc/arduino/cli/commands/v1/debug.pb.go‎

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎rpc/cc/arduino/cli/commands/v1/debug.proto‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ message GetDebugConfigResponse {
9696
string cortex_debug_custom_json = 9;
9797
// the SVD file to use
9898
string svd_file = 10;
99+
// The programmer specified in the request
100+
string programmer = 11;
99101
}
100102

101103
// Configurations specific for the 'gcc' toolchain

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /