Skip to content
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

godbg: add ability to attach to an already running program #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sbinet
Copy link

@sbinet sbinet commented Oct 18, 2013

leverage new gdblib.NewGDBWithPID feature and add -p PID flag.

  • apply gofmt fixes.

@sirnewton01
Copy link
Owner

Thank you for the pull request. I will have a look at it.

One concern I had with the ability to attach to an existing Go process was how gdb behaves when the binary is not compiled with the debugging flags (see http://golang.org/doc/gdb). I have seen gdb hang, produce very strange information about variables, etc. when the binary wasn't compiled with the debug flags. This is why godbg currently attempts to recompile your binary if you provide it with the fully-qualified package name and not just the path to the binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants