4 ms·
Had to go a step further in a project and patch static functions in a codebase with no source. It’s certainly enlightening how much you can do with just a symbo
by jamesu 6y ago
Had to go a step further in a project and patch static functions in a codebase with no source. It’s certainly enlightening how much you can do with just a symbol map and type info.
I don’t think the articles vtable layout is entirely accurate for gcc though - usually you’ll get 2 destructors at the start of the vtable (assuming the first virtual func declared is the destructor).
- greesil 6y agoAre you willing to share any info on how you got stuck with this project, and what this "codebase" was? Can you call it a codebase is it doesn't have source code?
- Google234 6y agoI would guess a normal project that involves this would be making a hack for a video game
- greesil 6y agoGames ship with symbols unstripped?
- diath 6y agoWouldn't that be useful for crash reporting?
- antiuniverse 6y agoThe standard approach to this, at least on Windows, is to build the debug symbols into a separate database (PDB file), and reconnect the addresses to the symbol names on the back end. Microsoft makes tons of symbols available for their own code via a symbol server which debuggers can query by the combination of a module hash and a relative virtual address.
- MaulingMonkey 6y agoYou'd be suprised what games accidentally ship. I've seen everything from pdbs to unoptimized debug builds accidentally included. If you don't make those mistakes, you might still have std::type_info (or custom equivalents) / RTTI info and __FILE__ / __LINE__ spam from macros, that can still sneak their way in. Suppose you fix all that - the game still has a good chance of including 1 or more scripting languages. They may be included complete in their original unobufscated glory. Or the bytecode might include unstripped debug information. Or the C++ <-> script binding layer might still include unobfuscated string identifiers. If you're clever, you'll rebrand this lack of obfuscation as being "mod friendly" ;)
- Google234 6y agoSome games do, sometimes during a beta.
- topiolli 6y agoI really cannot recall which library it was exactly. I worked on a project that had many proprietary dependencies. It might have been a GenICam camera driver that caused us a lot of other headaches as well.