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

OSX debugger stop on all exceptions issue #80

Open
rcstuber opened this issue May 4, 2020 · 0 comments
Open

OSX debugger stop on all exceptions issue #80

rcstuber opened this issue May 4, 2020 · 0 comments

Comments

@rcstuber
Copy link
Contributor

rcstuber commented May 4, 2020

Currently enabling "Stop on all exceptions" in the VSCode extension has been disabled, due to issues with setting the appropriate flags in Hashlink. Potential causes could be byte misalignment or faulty 32bit pointer write-op. I will investigate this further.

Function writing into the native thread info:

function set_breakOnThrow(b) {
var count = eval.readI32(jit.threads);
var tinfos = eval.readPointer(jit.threads.offset(8));
var flagsPos = jit.align.ptr * 6 + 8;
for( i in 0...count ) {
var tinf = eval.readPointer(tinfos.offset(jit.align.ptr * i));
var flags = eval.readI32(tinf.offset(flagsPos));
if( b ) flags |= 2 else flags &= ~2;
eval.writeI32(tinf.offset(flagsPos), flags);
}
return breakOnThrow = b;
}

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

No branches or pull requests

1 participant