-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
exception.what() not a string #8716
Comments
... #8717 as an alternative way of overloading new. note c++17 also has aligned ones, seems like a waste writing all of those yet again :/
arduino8716 [1]> xtensa-lx106-elf-gdb --batch --ex "disassemble 'std::bad_alloc::what'" --ex "x 0x40204674" .pio/build/d1_mini/firmware.elf
Dump of assembler code for function std::bad_alloc::what() const:
0x4020d614 <+0>: l32r a2, 0x40204674
0x4020d617 <+3>: ret.n
End of assembler dump.
0x40204674: 0x00000012 Here's the string, though
|
this seems to fix the discarded address, just not sure why the rule(s) below try to put things in .text diff --git a/tools/sdk/ld/eagle.app.v6.common.ld.h b/tools/sdk/ld/eagle.app.v6.common.ld.h
index 77c834ae..ed838918 100644
--- a/tools/sdk/ld/eagle.app.v6.common.ld.h
+++ b/tools/sdk/ld/eagle.app.v6.common.ld.h
@@ -181,8 +181,8 @@ SECTIONS
*libgcc.a:_fixsfsi.o(.literal .text)
*libgcc.a:_cmpdf2.o(.literal .text)
*libgcc.a:_cmpsf2.o(.literal .text)
*libstdc++.a:( .literal .text .literal.* .text.*)
- *libstdc++-exc.a:( .literal .text .literal.* .text.*)
+ *libstdc++-exc.a:( .literal .text .literal.* .text.* .irom.exceptiontext)
*libsmartconfig.a:(.literal .text .literal.* .text.*)
*liblwip_gcc.a:(.literal .text .literal.* .text.*)
*liblwip_src.a:(.literal .text .literal.* .text.*) |
@mcspr |
@mcspr Also for me, removing the comma here allows things to work. Arduino/tools/sdk/ld/eagle.app.v6.common.ld.h Line 223 in 80bf716
|
(somewhat late comment, thanks for the fix!) ^ re above and Earles comment about ld, there is actually nothing about such syntax option in up-to-date binutils documentation. https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_chapter/ld_toc.html
vs. Nothing in the testsuite either; + .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } |
Basic Infos
Platform
Settings in IDE
Problem Description
For the case of a missing
try/catch
aroundnew
, a secondary crash within postmortem occurs while processing the unhandled C++ Exception.The second crash is caused when
e.what()
returns a value of0x12
.Arduino/cores/esp8266/core_esp8266_main.cpp
Line 296 in 80bf716
resulting in a new ESP exception in postmortem at
Arduino/cores/esp8266/core_esp8266_postmortem.cpp
Line 144 in 80bf716
MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: