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

Use external __jit_debug_descriptor when IR_EXTERNAL_GDB_ENTRY is defined #93

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

arnaud-lb
Copy link
Contributor

If there are multiple __jit_debug_descriptor symbols, GDB may pick any, and ir_gdb_register_code() has no effect.

@dstogov
Copy link
Owner

dstogov commented Oct 7, 2024

Where do you see the problem? (PHP+linux_x86_64 seems to work fine).
Probably, you are right. I just like to know more about the problem.

@arnaud-lb
Copy link
Contributor Author

I've had the problem on the same environment (php + linux x86_64). The exact problem I'm having is that GDB is not aware of JIT symbols (so I don't see stubs in backtraces for example).

My understanding is that the main binary's definition should be given precedence by the linker (so ir_gdb_register_code() would use the __jit_debug_descriptor of the php binary), but the behavior I'm observing is that ir_gdb_register_code() uses the symbol of opcache.so. I'm not sure why. Maybe it's due to dlopen().

Building with IR_EXTERNAL_GDB_ENTRY + this patch fixes the issue for me.

@dstogov dstogov merged commit eff4b41 into dstogov:master Oct 7, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants