1
0

debug: add parameters to set ssh addr/port

This commit is contained in:
2023-02-28 19:11:28 +00:00
parent 71f5530fed
commit 0e153b2763
2 changed files with 17 additions and 1 deletions

View File

@@ -23,6 +23,9 @@ type DebugCmd struct {
Kernel string `help:"regexp (first match)" required:""`
Gdb string `help:"gdb listen address" default:"tcp::1234"`
SshAddr string `help:"ssh address to listen" default:"127.0.0.1"`
SshPort int `help:"ssh port to listen" default:"50022"`
ArtifactConfig string `help:"path to artifact config" type:"path"`
Kaslr bool `help:"Enable KASLR"`
@@ -69,6 +72,11 @@ func (cmd *DebugCmd) Run(g *Globals) (err error) {
return
}
err = q.SetSSHAddrPort(cmd.SshAddr, cmd.SshPort)
if err != nil {
return
}
if ka.Qemu.Cpus != 0 {
q.Cpus = ka.Qemu.Cpus
}