Thread: assembly code for release code?

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    assembly code for release code?

    Hello everyone,


    Any ideas about how to see assembly code for release mode? Since in release mode, we can not set a breakpoint in Visual Studio 2008, so I can not stop at somewhere and see the Diassembly code.

    Any ideas?

    (My purpose is to compare the release mode and debug mode assembly code to see how Visual Studio make optimizations in release mode.)


    thanks in advance,
    George

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    In visual studio you can set "listing file" (somewhere in the compiler settings) to "Assembler and source" or "assembler, machine code and source". This will intermingle the source code with the assembler code, so you can see what source relates to which assembler code - at least in debug mode. In release mode, optimization makes code move about, so the original source code and the generated code may not match quite so well.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Hi Mats,


    Thanks for your reply. But I can not find this option in Visual Studio 2008. Could you kindly point out please (I can not find anything named "listing file")? :-)

    Quote Originally Posted by matsp View Post
    In visual studio you can set "listing file" (somewhere in the compiler settings) to "Assembler and source" or "assembler, machine code and source". This will intermingle the source code with the assembler code, so you can see what source relates to which assembler code - at least in debug mode. In release mode, optimization makes code move about, so the original source code and the generated code may not match quite so well.

    --
    Mats

    regards,
    George

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    In my V6 IDE, it's under Project Properties, C/C++, Listing files. Have rummage around the project settings and see what you can find.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    404
    VS 2008:
    Project->Properties->Configuration Properties->C/C++->Output Files

    You should be able to figure it out from there.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 06-02-2008, 10:00 PM
  2. Obfuscated Code Contest: The Results
    By Stack Overflow in forum Contests Board
    Replies: 29
    Last Post: 02-18-2005, 05:39 PM
  3. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Linux Programming
    Replies: 0
    Last Post: 10-14-2002, 01:30 PM
  4. The relationship between C++ and assembly and machine code
    By TotalBeginner in forum C++ Programming
    Replies: 5
    Last Post: 04-22-2002, 02:46 PM