c++ - How do I get an accurate stack base address on OS X? -


  • pthread_attr_getstackaddr gives me value 0xfffffffffff80000 doesn't seem valid base address.
  • pthread_get_stackaddr_np, such documented in this answer , appears undocumented , non-portable, gives me value 0x00007fff5fc00000 seems more sensible. when place random breakpoint in program (with either gdb or lldb) , print stackpointer addresses below 1 returned above (such 0x00007fff5fbfe7e0).

all operations done on pthread_self , never switch threads. ideas?

on mac os x (and on x86 family processors in general) stack grows down, higher lower addresses. variables supposed below stack base address.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -