This bug appears to be related to bug #2741.
This bug appears to be the same bug as #2741.
I've found a cutting .c file perl script of B.Schwander. After some modifications, the script cuts all .c files in a directory and makes one .h file and many .c files each with one function inside. The script also makes .lib. I would like to have a copy of your version of B.Schwanders perl script. Please post it somewhere, or you can email it via david-gould@users.sourceforge.net. Thanks!
Please don't strip binaries in default build from source
I have simplifed the reproduction of this bug. If you download the three files and run ./test.sh with sdcc in your path it will make a core file for you. Let me know if I can help somehow. In main.c you can comment out the define of BUG and it will build successfully. It appears the problem is with statics declared and initialized in functions. May I also suggest you not strip the binaries by default. It makes debugging much less convenient and disk space is quite ample these days.
I have simplifed the reproduction of this bug. If you download the three files and run ./test.sh with sdcc in your path it will make a core file for you. Let me know if I can help somehow. May I also suggest you not strip the binaries by default. It makes debugging much less convenient and disk space is quite ample these days.
I have simplifed the reproduction of this bug. If you download the three files and run ./test.sh with sdcc in your path it will make a core file for you. Let me know if I can help somehow. May I also suggest you not strip the binaries by default. It makes debugging much less convenient and disk space is quite ample these days.
I have simplifed the reproduction of this bug. If you download the three files and run ./test.sh with sdcc in your path it will make a core file for you. Let me know if I can help somehow. May I also suggest you not strip the binaries by default. It makes debugging much less convenient and disk space is quite ample these days.
There were undefined symbols in there because the makefile missed a couple sources.I fixed that and used your suggestion and got the project to build and link but without debug information. I had hoped resolving the undefined symbols might have let debug info work too, but no such luck. With debug info on it still segvs. I have not verified that it is the same though. Anyway, I'm going to try to simplify the reproduction for you.
Please let me know if there is any way I can help resolve this.
sdasstm8 seg faults on null pointer deref