|
From: Philipp K. K. <pk...@sp...> - 2017-05-10 20:55:33
|
Am 10.05.2017 um 22:16 schrieb Åke Rehnman: > On 2017-05-10 21:46, Philipp Klaus Krause wrote: >> Am 10.05.2017 um 21:30 schrieb Åke Rehnman: >>> Hello Philip, >>> I assume you mean the trouble with bool variables is incorrectly encoded >>> as floats? >> No, I meant the frame base issue. >> > To make the frame unwinding work in gdb the frame base has to be > constantly adjusted (call to updateCFA) when ever the stack pointer is > moved (e.i things pushed or popped from the stack). The hc08 makes those > push and pops in a few well defined functions perhaps total 5-10 places. > As opposed to the stm8 code since it is lacking pushReg() and popReg() > functions resulting in stack adjustments are made all over the place. > > So to make debugging work with CFA the first job would be to clean up > the code and move the stack operations into a few well defined places > similar to hc08. Since that work involves a lot of changes I was a bit > hesitant to make those changes since that would result in quite > difficult merges whenever the stm8 gen code change. > > /Ake But stm8 codegen basically does all stack-pointer-changing stuff in the three functions push(), pop() and adjustStack(). Does that help in any way? The stm8 codegen also supports the use of a frame-pointer, which currently is rarely used. If it is useful for debugging, I could however easily implement --fno-omit-frame-pointer for stm8. Philipp |