Retail PS2 Games with Debugging Symbols

There are a few games out there that contain debugging symbols in their main executable file, meaning they compiled the game using the '-g' option with gcc/g++... oops! Very interesting stuff, as it makes reading the assembly code a whole lot easier.

Off the top of my head, I know of two titles that shipped with debugging symbols:

Crazy Taxi (uses PS2SDK 2.1.4)
Grand Theft Auto III (uses PS2SDK 2.3.0)

Does anyone know of others? An easy easy way to tell is by opening the game's executable (file on the root of he disk starting with SLUS/SCUS/SLPM/SLES) in IDA or ps2dis and looking for lots of named subroutines.
I'm not sure but try Growlanser 3.
- Resident Evil 4 (the symbols are in an unusual format not understood by IDA and PS2Dis)
- Resident Evil Code Veronica X
- Devil May Cry
- Fatal Frame
- PAL versions of ICO and Shadow of the Colossus
When debugging this game today for OPL: Choujikuu Yousai Macross (SLPM-65405), built with SDK v2.5.5. Yes, it has a real runtime bug.

The OSDSND module from the Protokernel boot ROM (SCPH-10000 and SCPH-15000) also has debugging information left over in it. This module is actually the tentative sound driver library (librspu2) that was mentioned within the SONY SDK, and was the predecessor to libsd. The funny thing is that the one in the expansion-bay boot ROMs is newer than the one that comes in the Sony PS2SDK (even in release v3.02).
Found more to add to the list:

Xenosaga Episode I: Der Wille zur Macht (PS2SDK 2.4.2)
Virtual Fighter 4 Evolution (Korean version, PS2SDK 2.5.5)
Shadow Hearts (PS2SDK 2.2.2)
Fatal Frame 2 (PS2SDK 2.8.0)

The Suffering also appears to have debugging symbol, but almost all of them are prefixed with ".gnu.linkonce"
Piposaru 2001 has debugging information in it, still.
It's probably not a mistake. They would have used the symbols during debug and testing, but removing them could introduce problems.
What do you mean by that? AFAIK, they are just debugging symbols for debuggers to use, and removing them will do nothing but save space. Compiling them without the "-g" option isn't like increasing the level of optimization.
Isn't it due to the symbol enabled version being sent off for testing/certification, once that's done they can't change the codebase in anyway?
Removing a '-g' from a makefile isn't a codebase change really.
Yeah wrong choice of words, but you get what I mean. Once it's been submitted for certification you can't change anything.
Found A few more games with debug symbols:

Jak and Daxter (PS2SDK 2.2.1)
Jak II (PS2SDK 2.7.1)

When I was looking at these I found a GPL violation in Jak II. Take a look at "DRIVERS/OVERLORD.IRX" and you'll find routines that load and decompress assets from the disc (CGO and DGO files). These are compessed with MiniLZO, and there are several refrences to it in this file:
lzo1x_decompress
__lzo_copyright
__lzo_init2
__lzo_init_done
/usr/home/agavin/src/jak2/libs/common/minilzo.c

You're supposed to give credit, Andy ;). From the MiniLZO readme: "Note: you also must distribute this file ('README.LZO') with your project."
Most likely the coder felt bad about telling people who would like to mod his game how to go about unpacking his resources. Best way to go about that was develop their own compression instead of using GPL'd code, huh ? ;)
Lol, I wonder how many games have uncredited libs etc inside them.? Like with Hyperkin and the Retron being full of uncredited code.
ICO was pretty bad about it: http://astrange.ithinksw.net/ico/
It's a TRC violation to leave symbols in the retail elf. So retail games with them are a mistake that didn't get caught. A delicious, wonderful mistake. :)
I think that originally it wasn't really a TRC violation. Several games from SONY owned studios released with full debug symbols on.

A excellent example of it (even better than ICO) is Piposaru 2001 (SCPS 11014) which has a enormous (8MB) elf with full debug symbols in it.
It seems inconsistent enough for retail games to have them that it's probably not normal for them to make it onto the retail disc. I can't say for sure if it was always a violation. I can say that it is a requirement for every submission to include them separately, so they exist for every game, somewhere. :)
Well, considering the system only has 32MB of memory on the retail units, every single bit of space you can save is precious.

Piposaru 2001 has full debug symbols on the final retail disc. But then it's a early game compiled with 2.x.x SDK. Very old stuff.

I don't think I've ever seen a retail game with 3.x.x SDK which had symbols in it. It confirms stripping the elf being the norm later on.

Plenty of PS2 arcade stuff have debug symbols on. IOP stuff with symbols in are quite rare on retail stuff even on older stuff because most programmers didn't bother with making their own IOP modules (only companies who designed their own middleware like Square, for example would bother with making custom IOP modules) and the ones which did had to deal with the IOP having only 2MB of memory, meaning memory was too precious to be wasted.

But yes, arcade stuff have debug symbols in it still. lol @ Konami Python1/2 IOP modules. (Konami striped their retail PS2 modules and ELF files diligently, though. Even when it wasn't required)
Is this (part of) the reason why unlicensed developers used Crazy Taxi as it's base for their discs (like swap magic, action replay and such)?

Original thread: https://assemblergames.com/threads/retail-ps2-games-with-debugging-symbols.51510/