CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2010
    Posts
    75

    Ollydbg (and probably other debuggers) can view my C++ source code

    Really. With the comments too.
    What the hell?
    I thought it was impossible or at least hard to retrieve the source code for a C/C++ application but opening my executable with OllyDbg and going to View->Source isn't hard.

    Anyway, how do I prevent this?

  2. #2
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Ollydbg (and probably other debuggers) can view my C++ source code

    Compile optimized, with no debug information.

    Viggy

  3. #3
    Join Date
    Jul 2010
    Posts
    75

    Re: Ollydbg (and probably other debuggers) can view my C++ source code

    How do I do that in VS2010?

    Edit: It's okay now. I deleted the .pdb file from the executable directory.
    Thanks
    Last edited by paprica; July 25th, 2011 at 02:37 PM.

  4. #4
    Join Date
    Jul 2010
    Posts
    75

    Re: Ollydbg (and probably other debuggers) can view my C++ source code

    BTW, Is there some kind of anti-debugger protection for executables?

  5. #5
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Ollydbg (and probably other debuggers) can view my C++ source code

    No. Ultimately, anyone can view assembly for your application. The "protection" is to change to a "Release" version, not a "Debug" version.

    http://msdn.microsoft.com/en-us/libr...=VS.71%29.aspx

    Viggy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured