[haiku-development] Re: How to debug a program without the source?

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 27 Jul 2012 11:22:56 +0200

On 2012-07-26 at 23:41:12 [+0200], Fredrik Modèen <fredrik@xxxxxxxxx> wrote:
> How would be the best way to debug a program that crashes? It's
> PersonalStudio I wan't to hunt and debug :) Would it be to fille the media
> kit with printf's and se where it stops?

You can still get a stack trace even if the program hasn't been compiled 
with debug information, so you can still run it in a debugger and look at 
where it crashes (respectively just start the debugger from the crash 
dialog). If that is in media kit code, you can build that with debug info 
and get even more information. If the stack trace of the point of the crash 
doesn't help you further, printf()s might be the best option.

CU, Ingo

Other related posts: