Layout of compiled objects

后端 未结 6 684
余生分开走
余生分开走 2020-12-01 01:57

Is there a way—much like viewing the result of preprocessing with gcc -E—to see what my objects look like once compiled into object files?

I

6条回答
  •  温柔的废话
    2020-12-01 02:22

    For Visual C++:

    I finally managed to dig up the (well-hidden!) undocumented compiler flags that MSVC++ supports using information from here and here. Here they are:

    /d1reportSingleClassLayoutXXX
    /d1reportAllClassLayout
    

    (replace XXX with the class name)

提交回复
热议问题