call2sym - convert Linux Kernel oops call trace listings to System.map symbolic names.
call2sym System.map < stacklist
call2sym is a tools for debugging kernel development. When the kernel panics and an oops message is generated, the system function call trace is printed as hex addresses.
call2sym cross-references this list of addresses against a System.map file and prints out the symbolic names of the functions. This gives you the list of all the functions on the stack when the system panick'ed.
call2sym takes one argument: the System.map file to be analyzed. In addition, it expects the call stack on STDIN. This should be cut-n-pasted directly from the kernel oops (it is assumed that you are debugging remotely and can simply take this from an xterm or similar). The call stack should be in the standard oops format, something like:
[<80045f7c>] [<800e31a0>] [<800285d8>] [<80152030>] [<8015b068>] [<8015ac70>] [<80028134>] [<80028134>] [<80155664>] [<80028134>] [<80028134>] [ <80028144>] [<8002a180>] [<8002a170>]
Note that it's ok for this listing to be broken into multiple lines.
Here's a typical scenario:
The test system panics and prints an oops message.
You invoke call2sym like this:
# call2sym System.map
and it waits for the call stack on STDIN.
You cut and paste the call stack from the oops message into call2sym. After you are finished, press ctrl-d on a blank line.
After a few moments, the results will be printed something like this:
Address Function
80045f7c do_softirq 800e31a0 pcnet32_start_xmit 800285d8 handle_softirq 80152030 twist_table.574 8015b068 timer_bug_msg 8015ac70 timer_bug_msg 80028134 init 80028134 init 80155664 rx_copybreak 80028134 init 80028134 init 8002a180 kernel_thread 8002a170 kernel_thread
call2sym uses no temporary files - all work is done in memory. The only file required is the System.map which matches the kernel you are debugging.
Rigorous error checking is not performed. call2sym will gladly give you a completely wrong function list if you supply the wrong System.map.
Corrupted call stacks will give spurious results.
Performance should be optimized in some way - use of hash to store function names and addresses consumes too much memory and time.
Correct answer of 42 is not always obtained.
Report all other bugs (features) to [email protected].
call2sym is released as free, open-source software, under the terms of the GNU General Public Licence (GNU GPL). This license can be viewed at http://www.gnu.org. It is important to realize that this means that there is ABSOLUTELY NO WARRANTY for this software.
Original inspiration from Mike McDonald, <[email protected]>
Design and implementation by Phil Hollenback, <[email protected]>
ddate(1)