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 stack traces with gcc #914

Closed
lifflander opened this issue Jul 8, 2020 · 1 comment · Fixed by #915
Closed

Fix stack traces with gcc #914

lifflander opened this issue Jul 8, 2020 · 1 comment · Fixed by #915

Comments

@lifflander
Copy link
Collaborator

What Needs to be Done?

Stack traces do not expose the line just the address when using gcc without "-rdynamic". We can work around this. Here is a good example of what we should implement:

https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1176/lectures/27-Inheritance/code/Inheritance/lib/StanfordCPPLib/system/call_stack_gcc.cpp

@lifflander
Copy link
Collaborator Author

This is running in the standard gcc-7 container triggering an assertion failure for the hello_world example.

vt: [0] ------------------------------------------------------------------------------------------------------------------------
vt: [0] -------------------------------------------- Dump Stack Backtrace on Node 0 --------------------------------------------
vt: [0] ------------------------------------------------------------------------------------------------------------------------
vt: [0] 0   18  0x563830b60f50 ./examples/hello_world/hello_world(+0x356f50 + 0
vt: [0] 1   18  0x5638308b9b92 ./examples/hello_world/hello_world(+0xafb92 + 0
vt: [0] 2   18  0x5638308b6112 ./examples/hello_world/hello_world(+0xac112 + 0
vt: [0] 3   18  0x5638308b53c2 ./examples/hello_world/hello_world(+0xab3c2 + 0
vt: [0] 4   18  0x56383083ab10 ./examples/hello_world/hello_world(+0x30b10 + 0
vt: [0] 5   18  0x563830918f21 ./examples/hello_world/hello_world(+0x10ef21 + 0
vt: [0] 6   18  0x5638308b9181 ./examples/hello_world/hello_world(+0xaf181 + 0
vt: [0] 7   18  0x5638308b8e3d ./examples/hello_world/hello_world(+0xaee3d + 0
vt: [0] 8   18  0x5638308b9277 ./examples/hello_world/hello_world(+0xaf277 + 0
vt: [0] 9   18  0x5638308b5d66 ./examples/hello_world/hello_world(+0xabd66 + 0
vt: [0] 10  18  0x5638308b773e ./examples/hello_world/hello_world(+0xad73e + 0
vt: [0] 11  18  0x56383082e4d9 ./examples/hello_world/hello_world(+0x244d9 + 0
vt: [0] 12  18  0x7fd71c1a0b97 __libc_start_main + 231
vt: [0] 13  18  0x56383082de5a ./examples/hello_world/hello_world(+0x23e5a + 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants