-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
proc/gdbserial: Added support for darwin/arm64 using gdbserver #2285
Conversation
Here is the log of running the tests on my M1 machine: test.log But, somehow it looks like I broke |
c3be37d
to
6d79255
Compare
package gdbserial | ||
|
||
const ( | ||
regnamePC = "pc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably be a good idea to define those constants somewhere else, since multiple backends might need to refer to them.
Existing tests on amd64 should now all run flawlessly. Ready to review and open for suggestions how to improve it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, just a couple of minor things, glad to see you made it work!
18b72b1
to
1bc2568
Compare
1bc2568
to
15456ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I hate to ask, and I know this isn't the right place, but @oxisto, I can't get this to work on my setup. I've been pulling down every version you push to try them out. Darwin_arm64 laptop, When I try to debug something using Microsoft Code, I get:
This works on my old laptop just fine, so has to be part of the arm move. Have you run into this? Are there additional instructions required in the Readme.md? |
Could be that you are using a version of go compiled for amd64. |
Yes, exactly. This PR adds support for To test it, you can get the Go 1.16 beta that supports You can even test it in Visual Studio code, but you probably need to download the very experimental arm64 builds of VSCode for that (https://code.visualstudio.com/insiders/# / https://code.visualstudio.com/sha/download?build=insider&os=darwin-arm64). I would not recommend this for any productive workflow yet. |
@oxisto I think you forgot to bump up the version number in compat.go |
That's going to be done by #2214 |
If you want to try it in GoLand, you can specify |
mask8 = 0x000f | ||
mask16 = 0x00ff | ||
mask32 = 0xffff | ||
mask8 = 0xff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed elsewhere, but we really should export these somewhere for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, I don't think this should happen in this patch, just making a note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes more sense to do it after the compositeMemory.WriteMemory PR, since that changes some other things about registers, we should just go through op.DwarfRegisters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
when I try to debug
|
I get this error when debugging
|
check your go IDE is arm version? or you use another go version to run code? |
I still run into trouble debugging TiDB. |
…lve#2285) * Added support for reading darwin/arm64 using gdbserver * Trying to fix test failures * Addressing review comments
This is an alternative fix for #2246 and one that might be easier to merge in than fixing the native darwin backend (see #2254).
Tests almost succeed, and it looks like those that do not, i.e. cgo-related ones, might be related to some Go 1.16 problems. I can provide a complete log of
make test
(it is currently running).Fixes #2246