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

Improve debugging experience when debugging host != build machine #485

Open
jschwe opened this issue Jul 29, 2024 · 3 comments
Open

Improve debugging experience when debugging host != build machine #485

jschwe opened this issue Jul 29, 2024 · 3 comments

Comments

@jschwe
Copy link
Contributor

jschwe commented Jul 29, 2024

The debug information for some of the files currently points to the target directory, including an unpredictable hash.
This makes it hard to setup the debugger to show the source code while debugging (if you are debugging an executable built on a different machine).

Example:

(lldb) image lookup -vn IsCatchableExceptionStatus
[redacted]
      LineEntry: [0x0000005b879f25d4-0x0000005b879f25dc): /data/servo/target/aarch64-unknown-linux-ohos/debug/build/mozjs_sys-af0e41768545dd53/out/build/dist/include/js/Exception.h:80

This makes it hard to setup lldb's settings set target.source-map /path/on/build-machine D:\path\on\debugger-host-machine, since the hash will change frequently.
At first glance it seems like the header files are also present in the source directory, and identical, so it would be preferable, if the original files at the fixed location could be used when compiling mozjs, instead of the files in the target directory.

@sagudev
Copy link
Member

sagudev commented Jul 29, 2024

I think that's the limitation of how SM build system works (creates out/build dir and works from there), I wonder how this is worked around in Firefox?

@jdm
Copy link
Member

jdm commented Jul 29, 2024

Yeah, the hash is present because the SM build is invoked by the cargo build script for mozjs.

@jschwe
Copy link
Contributor Author

jschwe commented Jul 30, 2024

Yeah, thats a bit unfortunate. I guess I should count myself lucky, that it only affects a couple headers in dist/include, while the source .cpp files seem to be mostly unaffected (based on an entirely unrepresentative sample set of my current debugging session)

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

3 participants