[Vm-dev] NoDbgRegParms test case results

gettimothy gettimothy at zoho.com
Thu Apr 2 16:15:54 UTC 2015


Hi Eliot,



Thanks for your reply.






    the attributes are only ever meaningful for static functions.  gcc (and other compilers) use faster register-based calling conventions where possible when the optimize.  Non-static functions can't be so optimized because they have to accord with the Application Binary Interface (ABI) and on x86 that's a purely stack-based calling convention.  But static functions are not visible outside the file and so the optimizer is free to so optimize.  But that breaks the use of static functions within gdb; gdb only knows how to call functions that accord with the ABI.  Given that we don't care too much about performance in the Debug and Assert VMs but we /do/ care about debuggability (and hence being able to call useful functions, be they static or not) I try and apply the "don't use register parameters" attribute to these functions.


Des this make sense to you?  Cuz if it isn't you need to understand it before you can fix it, otherwise you'll waste a lot of effort chasing down rat holes.



Yes, it makes perfect sense in the abstract. The use of GDB in the concrete to see if the function attributes are actually in place is the specific task I do not know how to approach (I could learn, my gdb skills are rudimentary) so I asked.



My last email about gcc -E confirms the problem is at the cpp stage (fingers crossed). The "fix" of putting #define NoDbgRegParms in config.h.in probably only masked the error; it is that 'false positive' I wanted to confirm.


cheers.


tty


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150402/088ba6cd/attachment-0001.htm


More information about the Vm-dev mailing list