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

µtvm debug improvements #5648

Merged
merged 4 commits into from
May 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/runtime/micro/host_driven/utvm_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void UTVMMain() {

// We use a dummy function to signal execution is finished for device
// backends which require breakpoints.
void __attribute__((noinline)) UTVMDone() { utvm_done = 1; }
void __attribute__((noinline,noreturn)) UTVMDone() { utvm_done = 1; for (;;) ; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want this to trap ever in which case a __builtin_trap might be a trick to play ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at the moment, since we aren't installing a predictable ISR vector table, we should avoid triggering those. but we can revisit approaches like this when we switch to on-device runtime.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough, lgtm.


#define ALIGNED_UP(x, word_size) \
((((word_size) - (((uintptr_t)(x)) % (word_size))) % (word_size)) + (x))
Expand Down