main: halt GDB on start
Most programmers support the "reset halt" command, which resets the target but keeps it halted at the first instruction. This is a much more natural way of working with GDB, and allows setting breakpoints before the program is started. This commit switches to `reset halt` by default and also stops running the program directly when debugging natively on the host.
Этот коммит содержится в:
родитель
a4642ddf59
коммит
373fa6d69b
1 изменённых файлов: 1 добавлений и 2 удалений
3
main.go
3
main.go
|
@ -530,9 +530,8 @@ func FlashGDB(pkgName, target, port string, ocdOutput bool, config *BuildConfig)
|
|||
switch gdbInterface {
|
||||
case "native":
|
||||
// Run GDB directly.
|
||||
gdbCommands = append(gdbCommands, "run")
|
||||
case "openocd":
|
||||
gdbCommands = append(gdbCommands, "target remote :3333", "monitor halt", "load", "monitor reset", "c")
|
||||
gdbCommands = append(gdbCommands, "target remote :3333", "monitor halt", "load", "monitor reset halt")
|
||||
|
||||
// We need a separate debugging daemon for on-chip debugging.
|
||||
args, err := spec.OpenOCDConfiguration()
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче