Debugging: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
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 == | == FreeBSD == | ||
Line 10: | 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. | |||
== Windows == | |||
Start -> Run | |||
and then type | |||
eventvwr | |||
there you can read through the error logs. You will also want to follow the steps listed on our [[Windows]] page. |
Latest revision as of 14:34, 13 December 2007
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.
Windows
Start -> Run
and then type
eventvwr
there you can read through the error logs. You will also want to follow the steps listed on our Windows page.