Author Topic: How to use thread local storage  (Read 2435 times)


  • Member
  • **
  • Posts: 203
Re: How to use thread local storage
« Reply #15 on: February 09, 2018, 08:20:53 AM »
Good morning, Hutch

When I first opened up a 64 bit executable with x64dbg I saw code that I hadn't put there:  the clever work of STACKFRAME.  It took me longer than it should to tumble to the fact that STACKFRAME was built into 

After discovering this very important fact I then debated whether or not it was better to construct my own stacks instead and invoke NOSTACKFRAME.  I've tried both ways of going about matters, but more often then not I do as you advise.

I'm still playing around with movs instead of push/pop's for parameters in excess of 4.  And there is still the deuced question of where the heck they are when the callee hunts for them.

The STACKFRAME macro is hard to follow.  I've tried more than once, partly to see how to better construct my own stacks. 

Thanks for elucidating the macro.  Much appreciated.