Skip to content

Game symbols v4: catch blocks, RTTI records and interface methods

Choose a tag to compare

@Trinculo54 Trinculo54 released this 03 Dec 10:28
0002084

The fourth release of the PDB for forza_durango_release_final.exe, the Forza Horizon 2 build that Azimuth runs
(24 Nov 2015, TimeDateStamp 0x565501ED, SizeOfImage 0x3A18000). It carries the exe's own GUID and age, so tools
accept it as the game's real PDB.

Download: FH2-symbols-pdb.zip (10 MB; the PDB inside is 71 MB). It holds the PDB and a short README. It
replaces v3: same GUID, more names.

New in v4

About 418,000 names, up from 235,000. Most of the new ones cover parts of the exe that had no symbol at all.

  • Catch blocks and unwind actions. A function with a try block, or with objects to destroy when an exception
    passes through, has small pieces of code for that, which the linker puts far away from the function. About 89,000
    of them are now named after their function: Function$catch$0, Function$dtor$0, $dtor$1 and so on. 72,000
    had no symbol before, so an address in one showed as some other function plus a big offset. Crash dumps land in
    this code often, since it runs while an exception is being handled.
  • RTTI's own records, about 108,000, under the names the compiler gives them: Class `RTTI Type Descriptor',
    Class::`RTTI Complete Object Locator' (what the pointer just before a vtable points at),
    Class::`RTTI Class Hierarchy Descriptor' and Class::`RTTI Base Class Array'.
  • Interface methods behind deferred calls. Calls into the render and audio threads are queued, and the class
    that carries the arguments is named after the interface and method it will call. That gives the vtable slot of
    383 interface methods (IAudioManager::PlayUISoundEvent, ITrackPresentation::ResetObjectPose and so on), and
    every class that implements the interface gets the names: about 740 functions that were Class::vfN. The 125
    small functions that make the call on the other thread read Class::Method`deferred call'.
  • The UI library's types. AVUI keeps a type object for each UI class. 1,646 of them are named
    (Class::`AVUI type'), with the function that builds each one and the stub that destroys it at exit.
  • FMOD Studio's command table: the two functions listed beside each of 90 recordable API calls, such as
    FMOD::Studio::System::getBank`command parser'.
  • atexit, and import thunks that nothing calls directly.

No existing name changes, apart from vfN and sub_ placeholders that now have a real name.

What's in it

  • About 418,000 names:
    • RTTI vtables and records, virtual functions, constructors and destructors;
    • catch blocks and unwind actions, named after their function;
    • the methods and properties the game registers with its reflection system;
    • exports and imports;
    • "Class::Method" strings the game logs;
    • names gathered from mod source code and notes;
    • standard library, C runtime, zlib and SQLite functions;
    • sub_ names for everything else.
  • About 79,000 are real names of code and vtables (72,000 in v3). 108,000 are RTTI records and 89,000 are catch
    blocks and unwind actions; the rest are Class::vfN and sub_<address> placeholders.
  • Every function's size, so debuggers know where each one ends. The small functions without unwind data have a
    name but no size.
  • No types, local variables or source lines.

Use it

Azimuth maps the game into azimuth.exe by hand, so the game is not a module and no tool finds this PDB by itself.

  • Crash addresses, no debugger (tried with v4): python lookup.py <pdb folder> <exe> 0x1412CC7A0, using
    lookup.py from symbols/.
  • Ghidra (tried with 12.2 and v2): import the exe, then put the PDB beside it before auto-analysis, or use
    File > Load PDB File.
  • x64dbg (tried with v2), attached to azimuth.exe with the game running:
    virtualmod forza_durango_release_final.exe, 140000000, 3A18000, then
    symload forza_durango_release_final.exe, <path to the pdb>. Leave with Debug > Detach.
  • lldb on a platform minidump (tried with v2): target modules add the exe, then
    target modules load --file forza_durango_release_final.exe --slide 0, then image lookup -a <address>.
  • WinDbg, IDA (not tried yet): put the PDB beside the exe or on your symbol path.

v4 is written the same way as v2 and v3, with more names in it. It is half as big again as v3, so loading it takes
a little longer.
Chapter 15 of the guide has the
details.

Add names

Found a name? Add it to symbols/names.txt and rebuild with gen.py, or send it as a pull request so the next
release has it. If you know a class's vtable layout, add it to symbols/slots.txt and every class derived from it
gets the names.

Checksums (SHA-256)

  • FH2-symbols-pdb.zip: 572387b7ea10cb6ba4133695573fe4ede252ca8a94fc35558f7174ccaf00a180
  • forza_durango_release_final.pdb: 71b45564d9a108cb033b0a71aab8fbd3e4b9e41888878692b58c3ea8651059af