0

I'm trying to get debugging of go programs working in eclipse Luna with goclipse v0.11.0 on OS-X 10.9.5. I am using GNU gdb (GDB) 7.9.1 from brew, and go1.4.2.

I successfully installed and code-signed gdb using instructions here:

http://ntraft.com/installing-gdb-on-os-x-mavericks/

I am building my go program with -gcflags "-N -l" and I can successfully debug it at the command line, including setting breakpoints at go functions and stepping through them with the gdb command line, with source appearing as it should.

However, in goclipse I cannot set a breakpoint at all, because the 'toggle breakpoint' item on the menu is greyed out, and the 'Breakpoint Types' list says 'none available'.

If I select 'Stop on Startup at' 'main', then I can step through assembler, which is unhelpful, but proves gdb is being used.

If I keep the above option set, wait until the program hits the main breakpoint, and type (at the gdb console within eclipse) break main.foo, then cont, then a breakpoint is set in the right place, and I can step through things in the Eclipse IDE. Thus it appears the only issue is setting the breakpoints in the IDE.

The go program concerned is a single file and it works under command line gdb, and I have deleted the binary and started afresh, so this is not a 'need a rebuild' issue.

Related question: How to debug Go programs using GoClipse? however the two answers there are 'disable Stop on Startup' (which makes no difference here), and ensuring -gcflags "-N -l" is given (which makes no difference).

Screenshot: Screenshot of breakpoints not being available

Any ideas?

Community
  • 1
  • 1
abligh
  • 24,573
  • 4
  • 47
  • 84
  • This seems to be a genuine Goclipse issue. Can you open a bug report please: https://github.com/GoClipse/goclipse/blob/master/CONTRIBUTING.md . I'm particularly interested in the Eclipse Error Log and Configuration Log. (You can use https://gist.github.com/ to attach large files) – BrunoMedeiros Jun 30 '15 at 12:36
  • @BrunoMedeiros thanks - filed as https://github.com/GoClipse/goclipse/issues/135 with an error log excerpt, but no configuration log as I'm not sure how to find that. – abligh Jun 30 '15 at 12:53

0 Answers0