Page 1 of 1
Why do some DLL's contain C++ class information?
Posted: Fri May 10, 2013 12:58 am
by Typhox
Opening the server.dll from Dota 2 (a Steam game by Valve) with my disassembler, I find a lot of strings (most of them not xreferenced in the code) that obviously refer to the original source code they come from (sometimes even including pathes to the source files).

There are only 2 exported functions.
Why is that? Why does that compiler keep those data?
Is it possible for me to reproduce that behaviour?
Re: Why do some DLL's contain C++ class information?
Posted: Sat May 11, 2013 10:14 pm
by Sir Kane
The var names are from the Source engine send tables. And the rest is possibly something like asserts or some other kind of debugging aid.
Re: Why do some DLL's contain C++ class information?
Posted: Sun Feb 23, 2014 8:27 am
by jfwfreo
Its not unheard of for software to contain debug output statements that can contain the names of functions, files or other source references.
I know of several games (including Elder Scrolls: Oblivion) that contain such data and it can sometimes be useful to reverse engineering experts.
The Linux version of the dedicated server for Command & Conquer: Renegade contained a full symbol table with full prototypes for every function in the binary.
Re: Why do some DLL's contain C++ class information?
Posted: Wed May 21, 2014 8:49 am
by mgrandi
Its probably just internal logging, its not uncommon for logging frameworks to have macros that when you call LogThisError("something")
it expands to something like ReallyLogSomething(level.Error, __FILE__, _CLASS_, __LINENO__) and whatever, that the c++ compiler fills in when its actually compiled.
Just looking at my mac os x system log you can see examples of this:
5/20/14 11:33:56.909 PM acvpnagent[69]: Function: updatePotentialPublicAddresses File: ../../vpn/AgentUtilities/HostConfigMgr.cpp Line: 1914 Invoked Function: CHostConfigMgr::determinePublicAddrCandidateFromDefRoute Return Code: -24117215 (0xFE900021) Description: ROUTETABLE_ERROR_GETBESTROUTE_FAILED
Re: Why do some DLL's contain C++ class information?
Posted: Wed May 21, 2014 1:36 pm
by cra0
lol what are you trying to do in dota?