main: remove getting a serial port in gdb subcommand
Remove this code for two reasons: 1. It is not needed. 2. It breaks `tinygo gdb` for debugging QEMU targets (such as cortex-m-qemu).
Этот коммит содержится в:
родитель
71a380ce8c
коммит
a5a90a57b9
1 изменённых файлов: 2 добавлений и 10 удалений
12
main.go
12
main.go
|
@ -274,15 +274,7 @@ func Flash(pkgName, port string, options *compileopts.Options) error {
|
||||||
//
|
//
|
||||||
// Note: this command is expected to execute just before exiting, as it
|
// Note: this command is expected to execute just before exiting, as it
|
||||||
// modifies global state.
|
// modifies global state.
|
||||||
func FlashGDB(pkgName, port string, ocdOutput bool, options *compileopts.Options) error {
|
func FlashGDB(pkgName string, ocdOutput bool, options *compileopts.Options) error {
|
||||||
if port == "" {
|
|
||||||
var err error
|
|
||||||
port, err = getDefaultPort()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
config, err := builder.NewConfig(options)
|
config, err := builder.NewConfig(options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -769,7 +761,7 @@ func main() {
|
||||||
usage()
|
usage()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
err := FlashGDB(flag.Arg(0), *port, *ocdOutput, options)
|
err := FlashGDB(flag.Arg(0), *ocdOutput, options)
|
||||||
handleCompilerError(err)
|
handleCompilerError(err)
|
||||||
}
|
}
|
||||||
case "run":
|
case "run":
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче