PDA

View Full Version : Trying to use SDL crashes GDB(?)


Goober
2003.04.04, 10:12 AM
Hi there.

I'm getting a problem when trying to debug my game (ported from Windows) on OSX. I thought the best/easiest way to do this would be to use SDL, and I have a version of the game running under Windows that uses SDL (there is also a native Windows version).

The problem is I want to debug my app under OSX to sort out some porting issues (mostly to do with the file formats), but whenever I try debugging the app GDB has a fit and comes back with the following messages:

warning: Unable to read symbols from "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL"; reading from memory.
/SourceCache/gdb/gdb-250/src/gdb/macosx/macosx-nat-dyld-process.c:505: internal-error: assertion failure in function "dyld_load_library": e->dyld_valid

A problem internal to GDB has been detected. Further debugging may prove unreliable.

The Debugger has exited due to signal 6 (SIGABRT).

The SDL framework is actually installed to /Library/Frameworks, so I don't know why the debugger is looking near the executable (which is somewhere on my desktop).

I managed to get so far with just outputting debug information to a file as the app runs, but I've hit a brick wall with that and I need to debug properly. As you can see, this is proving to be somewhat troublesome.

Thanks for any help,

Goober

OneSadCookie
2003.04.04, 06:25 PM
You might (for some strange reason) need to have the SDL framework inside your application bundle. There's a tutorial on how to do this properly on CocoaDevCentral.com, or you could just copy it to MyApp.app/Contents/Frameworks/SDL.framework by hand and see if that helps.

DJBlufire
2003.04.04, 07:26 PM
I ran into that same problem before, and couldn't debug anything that had SDL in it. I think the solution to that is to build the SDL framework yourself with debugging symbols on, because i think they are off by default... but I haven't really tried that yet. Just something to think about...

henryj
2003.04.05, 09:35 PM
You shouldn't have to do this unless it's SDL that you're trying to debug. OSC's suggestion should work

Goober
2003.04.07, 06:29 AM
if I were a woman I might offer to bear OneSadCookie's children, but I'm not, so I'll just have to say "thanks". This works a treat. And the strange reason I have to do this? I'm a Windows programmer originally :blush: ;)