diff --git a/pkg/proc/gdbserial/gdbserver.go b/pkg/proc/gdbserial/gdbserver.go index 7a72910d..d079bcd1 100644 --- a/pkg/proc/gdbserial/gdbserver.go +++ b/pkg/proc/gdbserial/gdbserver.go @@ -395,7 +395,7 @@ func getDebugServerAbsolutePath() string { func canUnmaskSignals(debugServerExecutable string) bool { checkCanUnmaskSignalsOnce.Do(func() { - buf, _ := exec.Command(debugServerExecutable, "--unmask-singals").CombinedOutput() + buf, _ := exec.Command(debugServerExecutable, "--unmask-signals").CombinedOutput() canUnmaskSignalsCached = !strings.Contains(string(buf), "unrecognized option") }) return canUnmaskSignalsCached @@ -897,7 +897,7 @@ func (p *gdbProcess) findThreadByStrID(threadID string) *gdbThread { // and returns true if we should stop execution in response to one of the // signals and return control to the user. // Adjusts trapthread to a thread that we actually want to stop at. -func (p *gdbProcess) handleThreadSignals(trapthread *gdbThread) (trapthreadOut *gdbThread, atstart bool, shouldStop bool) { +func (p *gdbProcess) handleThreadSignals(trapthread *gdbThread) (trapthreadOut *gdbThread, atstart, shouldStop bool) { var trapthreadCandidate *gdbThread for _, th := range p.threads { @@ -1575,8 +1575,7 @@ func (t *gdbThread) reloadRegisters() error { } } - switch t.p.bi.GOOS { - case "linux": + if t.p.bi.GOOS == "linux" { if reg, hasFsBase := t.regs.regs[t.p.regnames.FsBase]; hasFsBase { t.regs.gaddr = 0 t.regs.tls = binary.LittleEndian.Uint64(reg.value)