-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for 32-bit systems #20
Comments
That is correct, the proctl package is all 64-bit specific. It should be trivial to remove or modify any 64-bit specific code. 32-bit support is the next major task I'd like to check off, aside from general OS X support. |
I'm out of time now, but I want to throw some stuff in here to save time for the next person who looks at this. These instructions trade the precision of a branch for markers of intent that hopefully will prevent them from bit rotting so fast. The 32bit branch no longer applies cleanly to master. To start running tests in
At this point, proctl tests should run, but fire hose your terminal with "Hello, World!". You may have to package frame
import (
"debug/elf"
"os"
"os/exec"
"testing"
)
func DirectTest(t *testing.T) {
const progName = "./testprog"
cmd := exec.Command("go", "build", "-gcflags=-N -l", "-o", progName, "../../_fixtures/"+progName+".go")
err := cmd.Run()
if err != nil {
t.Fatalf("Couldn't compile test program: %v\n", err)
}
defer os.Remove(progName)
exe, err := elf.Open(progName)
if err != nil {
t.Fatalf("ELF missing: %v\n", err)
}
sec := exe.Section(".debug_frame")
if sec == nil {
t.Fatalf("No debug frame section: %v\n", err)
}
data, err := sec.Data()
if err != nil {
t.Fatalf("No debug frame data: %v\n", err)
}
Parse(data)
} The uses of 8 and 16 in glhf! |
Just ran into this on a linux box. Any progress on this front? Also, it might be nice to make the 64bit requirement more prominent in the docs. |
@joegrasse as far as I'm aware nobody is working on this, but I agree it is important. I also agree we should point out in installation docs the processor requirements. I'll update the documentation shortly. |
I was taking a look at this for 32bit linux, but there are a couple things I can't seem to locate. For example, does anyone know what the following should be for 32bit linux? Also, here. |
I don't but disassembling a go program compiled for 32bit linux will probably reveal it (I also do not know how segments work in protected mode, I skipped that section of the intel manual). |
I have delve partially working on 32bit linux and based on your comment here https://github.com/derekparker/delve/issues/468#issuecomment-203968010, I get the following output. 32bit
64bit
Looks like it isn't quite as straight forward on 32bit. |
It's not that different. The big problem is that ptrace on 86x64 does not return the base address of the GS segment. |
@rsc is there an easy way to get the base address of the thread local storage memory on 386 linux in Go? On 64bit linux it looks like you can just use PtraceRegs.Fs_base. |
Just curious if anyone has picked this up yet, or is this still a ways off? |
Probably, wouldn't be difficult to implement on windows. Both amd64 and 386 use same Windows API. As long as the rest of code is not 64-bit specific, I think windows-386 part will be small. Alex |
I could need this as well. Would be happy to hear if someone is working on the topic. |
Any news on this? It'd be really useful for me. |
This would be useful for me as well. I am trying to debug a go program using LiteIDE on a Raspberry Pi 3. I get a segmentation fault error with gdb specified as the debugger in LiteIDE - apparently gdb doesn't play well with go (see second paragraph here - https://golang.org/doc/gdb). So I then decided to try delve; and when I did "go get -u github.com/derekparker/delve/cmd/dlv", I got the subject error: github.com/derekparker/delve/proc/disasm.go:9: undefined: ArchInst So I am thinking that unless this gets "fixed" or there is another debugger out there somewhere for go, anybody trying to step through go code on a Raspberry Pi is out of luck. Other than this, I really like the LiteIDE. It is indeed light - it loads quickly and doesn't lag at all when I am using it (I have it running on ubuntu MATE on my Pi). And given the nature of the problem I am having running a debugger, I don't think it is going to help to switch to a different IDE. So since I do like LiteIDE, I have no desire or see no potential benefit in going down the rabbit hole of trying another IDE. Any other thoughts or status? Thanks! |
I'm also developing a Raspberry Pi 3 go app and would love to be able to debug it remotely rather than rely on print statements! 👍 |
I have the same problem on Windows 7 32 bit : |
When can we get this support for 32 bit system ? I am using 32bit window laptop and not able to debug go program. |
When can we expect the release for 32 bit system ? |
@gidoBOSSftw5731 that's because ARM architectures are not supported by Delve currently, see: https://github.com/derekparker/delve/issues/118 |
Learn about multiplatform ! That is different CPUs, architectures, Operating systems (a distribution is not an operating system), different countries, different encodings, ... Ignorant hobbyists, believing their development machine is the world, are such a drag. |
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update #20
* add validation image size in mm7 * remove size image hardcoded
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Any progress on this one? My project heavily relies on some i386 C code (which we attempt to migrate to Go - but there's just too much, the process is slow, and it is really i386 locked), and there's a need to debug the Go code somehow. |
linux/i386 has been supported for a while. |
Hrm, didn't knew, my main dev env is Windows. I'll check it out, thanks. |
Closing since linux/386 has been supported for years, there are many different 32bit architectures and for some of them (including mips, arm32 and windows/386) we have specific issues open. |
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update go-delve#20
Correct me if I am wrong, but your tool only works in 64-bit systems. I tried to install dlv via go get and got this error:
go build github.com/derekparker/delve/proctl: no buildable Go source files in /home/user/go/src/github.com/derekparker/delve/proctl
AFAIK those who had 64-bit O.S. got dlv working properly.
P.S: I have libreadline installed.
The text was updated successfully, but these errors were encountered: