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

Regression : GDB/JIT symbols required to bind to debugger must be exported on Windows so debugger can bind. #3371

Closed
adv-sw opened this issue Sep 20, 2021 · 1 comment

Comments

@adv-sw
Copy link
Contributor

adv-sw commented Sep 20, 2021

crates/runtime/src/helpers.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/crates/runtime/src/helpers.c b/crates/runtime/src/helpers.c
index 4865928a1..c743e244e 100644
--- a/crates/runtime/src/helpers.c
+++ b/crates/runtime/src/helpers.c
@@ -42,7 +42,12 @@ void wasmtime_longjmp(void *JmpBuf) {
// Note the weak linkage here, though, which is intended to let other code
// override this symbol if it's defined elsewhere, since this definition doesn't
// matter.
-#ifndef CFG_TARGET_OS_windows
+
+
+#ifdef CFG_TARGET_OS_windows
+// ADV_SW_PATCH - export required for external access.
+__declspec(dllexport)
+#else
attribute((weak, noinline))
#endif
void __jit_debug_register_code() {
@@ -61,7 +66,10 @@ struct JITDescriptor {
// Note the weak linkage here which is the same purpose as above. We want to
// let other runtimes be able to override this since our own definition isn't
// important.
-#ifndef CFG_TARGET_OS_windows
+#ifdef CFG_TARGET_OS_windows
+// ADV_SW_PATCH - export required for external access.
+__declspec(dllexport)
+#else
attribute((weak))
#endif
struct JITDescriptor __jit_debug_descriptor = {1, 0, NULL, NULL};

@alexcrichton
Copy link
Member

Fixed by #3373

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

2 participants