Difference between revisions of "Debugging"

From Hackepedia
Jump to navigationJump to search
m (→‎FreeBSD: added sparc link)
Line 25: Line 25:
  
 
produced a lot of output, so much that I won't paste it here. These are the system calls that were made. You will most likely want to send that output to the appropriate helplist/bug report for that application.
 
produced a lot of output, so much that I won't paste it here. These are the system calls that were made. You will most likely want to send that output to the appropriate helplist/bug report for that application.
 +
 +
[[FreeBSD:Sparc]] has basic kernel debugging.

Revision as of 22:45, 18 January 2006

If you have a program crash and create a .core file, like say Thunderbird crashes on you and you find the .core file:

$ gdb thunderbird thunderbird-bin.core

where thunderbird is the application and thunderbird-bin.core is the core file. In this case I got an error:

"/usr/X11R6/bin/thunderbird": not in executable format: File format not recognized

as when I looked at this file a little further I found out it is a shell script and not a binary. I did find a -g (debug) mode in this shell script which I used. Most cases it is a binary though, so the most common starting point is

(gdb) bt

backtrace. This won't usually too much good unless you have compiled the program with debugging symbols.


FreeBSD

I had a case where Mozilla Thunderbird would core on me as soon as I started it.

 $ ktrace thunderbird

which created a file called "ktrace.out".

$ kdump -f ./ktrace.out 

produced a lot of output, so much that I won't paste it here. These are the system calls that were made. You will most likely want to send that output to the appropriate helplist/bug report for that application.

FreeBSD:Sparc has basic kernel debugging.