The Wayback Machine - https://web.archive.org/web/20201223152104/https://github.com/tinygo-org/tinygo/pull/1057
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

main: support gdb debugging with AVR #1057

Merged
merged 1 commit into from Dec 10, 2020
Merged

main: support gdb debugging with AVR #1057

merged 1 commit into from Dec 10, 2020

Conversation

@aykevl
Copy link
Member

@aykevl aykevl commented Apr 14, 2020

Be able to run tinygo gdb -target=arduino ./testdata/alias.go and debug a program with the power of a real debugger.

Note that this only works on LLVM 11 (see #1056) because older versions have a bug in the AVR backend that cause it to produce invalid debug information: https://reviews.llvm.org/D74213.

Screenshot from 2020-04-14 23-20-29

@niaow niaow added this to the v0.15 milestone Jun 27, 2020
@niaow niaow self-requested a review Jun 27, 2020
@aykevl aykevl force-pushed the gdb-simavr branch from a365191 to b1c3d2d Oct 16, 2020
@aykevl
Copy link
Member Author

@aykevl aykevl commented Oct 16, 2020

This PR is now ready. It depends on LLVM 11 to be usable, but that has been merged in #1056.

@deadprogram
Copy link
Member

@deadprogram deadprogram commented Oct 16, 2020

Something went wrong with the CI with the LLVM 11 build @aykevl you should take a look. Thanks.

@aykevl
Copy link
Member Author

@aykevl aykevl commented Oct 16, 2020

Looking into it now, I can't seem to reproduce it locally (only in CI).

@aykevl
Copy link
Member Author

@aykevl aykevl commented Oct 16, 2020

Huh, this is triggered by Go 1.15.3.

@aykevl
Copy link
Member Author

@aykevl aykevl commented Oct 16, 2020

Managed to find the cause, see: golang/go#42032.

Maybe we should just use Go 1.15.2 until it is fixed.

@aykevl
Copy link
Member Author

@aykevl aykevl commented Oct 17, 2020

Pushed fix: #1443

@deadprogram
Copy link
Member

@deadprogram deadprogram commented Oct 17, 2020

#1143 has been merged, @aykevl can you please rebase this PR to make sure it passes CI now?

@aykevl aykevl force-pushed the gdb-simavr branch from b1c3d2d to 41ac276 Oct 17, 2020
@aykevl
Copy link
Member Author

@aykevl aykevl commented Oct 17, 2020

Rebased.

Be able to run `tinygo gdb -target=arduino examples/serial` and debug a
program with the power of a real debugger.

Note that this only works on LLVM 11 because older versions have a bug
in the AVR backend that cause it to produce invalid debug information:
https://reviews.llvm.org/D74213.
@aykevl aykevl force-pushed the gdb-simavr branch from 41ac276 to d4c7dbb Dec 10, 2020
@aykevl
Copy link
Member Author

@aykevl aykevl commented Dec 10, 2020

Rebased again.

@deadprogram
Copy link
Member

@deadprogram deadprogram commented Dec 10, 2020

🐛 glad to be finally merging, thanks @aykevl

@deadprogram deadprogram merged commit 4cc1cdf into dev Dec 10, 2020
14 checks passed
14 checks passed
ci/circleci: assert-test-linux Your tests passed on CircleCI!
Details
ci/circleci: build-linux Your tests passed on CircleCI!
Details
ci/circleci: build-macos Your tests passed on CircleCI!
Details
ci/circleci: test-llvm10-go112 Your tests passed on CircleCI!
Details
ci/circleci: test-llvm10-go113 Your tests passed on CircleCI!
Details
ci/circleci: test-llvm10-go114 Your tests passed on CircleCI!
Details
ci/circleci: test-llvm11-go115 Your tests passed on CircleCI!
Details
ci/circleci: test-llvm9-go111 Your tests passed on CircleCI!
Details
tinygo-CI #20201210.1 succeeded
Details
tinyhci: arduino Hardware CI passed
Details
tinyhci: arduino-nano33 Hardware CI passed
Details
tinyhci: hifive1b Hardware CI passed
Details
tinyhci: itsybitsy-m4 Hardware CI passed
Details
tinyhci: microbit Hardware CI passed
Details
@deadprogram deadprogram deleted the gdb-simavr branch Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.