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

Fix 'corrupt stack?' warning in GDB backtrace #1665

Merged
merged 2 commits into from
Apr 12, 2019

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Apr 12, 2019

One cause is missing symbols, so tell GDB about ESP8266 ROM symbols defined in bootrom.elf file.

See https://github.com/jcmvbkbc/esp-elf-rom for how the bootrom.elf file was created.

One cause is missing symbols, so tell GDB about ESP8266 ROM symbols defined in `bootrom.elf` file.

See https://github.com/jcmvbkbc/esp-elf-rom for how the `bootrom.elf` file was created.
@mikee47
Copy link
Contributor Author

mikee47 commented Apr 12, 2019

This issue was raised in #1613.


# File contains boot rom symbols required by GDB, put it somewhere easy to find
$(BUILD_BASE)/$(BOOTROM_ELF):
cp $(SMING_HOME)/gdb/$(BOOTROM_ELF) $(BUILD_BASE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess bootrom.elf should be included in this PR.

@slaff slaff added this to the 3.8.0 milestone Apr 12, 2019
@slaff slaff merged commit af98dcd into SmingHub:develop Apr 12, 2019
@mikee47 mikee47 deleted the fix/bootrom_symbols branch April 12, 2019 11:35
@mikee47
Copy link
Contributor Author

mikee47 commented Apr 13, 2019

A couple of notes if this issue is revisisted in the future.

  • This PR always copies the bootrom.elf file regardless of build mode. A better approach would be to add a GDB_SYMBOLS target to makefile, defined only when ENABLE_GDB=1.

  • I was unable to find a way to directly load the $(SMING_HOME)/gdb/bootrom.elf file. Adding the directory to GDB's data or debug directory didn't work. Also, in Windows GDB doesn't recognise drive separators. Copying the file to out/build means we can use a relative reference.

  • An alternative to loading symbols separately is to merge the symbols into the app_0.out file.

@slaff
Copy link
Contributor

slaff commented Apr 13, 2019

Do you want to make the changes this weekend? Is yes - go ahead and give it a try.

@mikee47
Copy link
Contributor Author

mikee47 commented Apr 14, 2019

Commit in #1671 copies symbol files only when ENABLE_GDB=1.

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