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

Debugging symbols missing when trying to debug the beam with gdb and supports script. #30

Open
sylane opened this issue Dec 7, 2017 · 4 comments

Comments

@sylane
Copy link
Contributor

sylane commented Dec 7, 2017

I was trying to debug using openocd and using the gdb commands provided by OTP: erts/etc/unix/etp-commands.

The commands require a set of symbols to be defined (the etp_XXX defined in erts/emulator/beam/erl_init.c) but they are not. I wonder if the issue is due to the compiler optimizing them out or any special cross-build issue.

@peerst
Copy link
Member

peerst commented Dec 7, 2017

Hmm, depends what etp_XXX is for. It might also be part of a build that uses threads or supports smp which we don´t do for default at the moment.

@sylane
Copy link
Contributor Author

sylane commented Dec 7, 2017

They are defined in erts/emulator/beam/erl_ini.c, with the entry point of the beam... I don't see why we wouldn't have it.

@sylane
Copy link
Contributor Author

sylane commented Dec 7, 2017

And looking at the generated object symbols, it contains a erl_init one...

@peerst
Copy link
Member

peerst commented Dec 8, 2017

RTEMS uses a method where the compiler puts every function into its own section and then at the linking phase garbage collects sections that are not referenced. This could cause functions to be removed if they are not referenced from the program.

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