Trying to use SDL crashes GDB(?)

Post: #1
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:

[SOURCECODE]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).[/SOURCECODE]

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,

Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
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, or you could just copy it to by hand and see if that helps.
Quote this message in a reply
Post: #3
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...
Quote this message in a reply
Post: #4
You shouldn't have to do this unless it's SDL that you're trying to debug. OSC's suggestion should work
Quote this message in a reply
Post: #5
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 Wink
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Cocoa: NSRectFillListWithColors crashes Lycander 0 2,449 Aug 23, 2009 10:33 PM
Last Post: Lycander
  Full Screen OpenGL Crashes Blacktiger 13 10,320 Feb 19, 2009 02:39 PM
Last Post: backslash
  Multitexture Crashes Jake 6 4,611 Sep 6, 2004 12:46 PM
Last Post: Jake