1

"Bus Error" doesn't tell me much so I want to access the core file to find out where it went wrong. I try to do this:

(gdb) core core
/this/is/my/directory/Program/core: No such file or directory
(gdb)

but it says there is no directory. I compile my program using Qt on mac and it does not produce anything called 'core'. Any advice on how to debug this?

Thank you.

ale
  • 11,636
  • 27
  • 92
  • 149
  • 1
    Used to linux? Have you tried attaching a debugger? If you're using QtCreator as an IDE it has one built in then you can see the callstack, set break points, and debug your application normally. – AJG85 Jun 12 '11 at 18:49
  • 1
    I think this will be helpful for you: http://stackoverflow.com/questions/2080918/where-are-core-dumps-written-to-in-mac-os-x – littleadv Jun 12 '11 at 18:49

1 Answers1

3

I don't use a Mac, but it seems like core files are either suppressed by default or written to a dedicated directory. You could copy the core file to your program directory and invoke gdb with the excecutable and core file name:

Where are core dumps written in Mac OS X?

GDB: http://www.gnu.org/software/gdb/documentation/

gdb <program_name> <core_file_name>
Community
  • 1
  • 1
dolphy
  • 6,218
  • 4
  • 24
  • 32