[Crash-utility] Re: source line numbers and modules

Dave Anderson anderson at redhat.com
Wed Jan 16 18:30:29 UTC 2008


Alan Tyson wrote:
> Dave Anderson wrote:
> 
>> Alan Tyson wrote:
>>  
>>
>>> Hi,
>>>
>>> Could someone please explain why we cannot get source line numbers when
>>> disassembling modules?  Is the problem missing functionality in
>>> store_load_module_symbols() or is there an inherent limitation with the
>>> gdb linked in with crash in that it cannot accept additional debug_line
>>> information for modules?  I ask because gdb has this functionality for
>>> user-space shared libraries and it seems to work OK.  Or am I missing
>>> something which is much more complex?
>>>
>>> Thanks,
>>>
>>> Alan Tyson,
>>> Hewlett-Packard.
>>>   
>>
>> What architecture?
>>  
>>
> x86_64.  Sorry I omitted to mention this.
> 
>> I'm presuming that you're running the "mod" command to load
>> the debuginfo data from the target module:
>>
>> << working example on i686 snipped >>
>>  
>>
> Yes I am.  Indeed it seems that i686 and ia64 work fine.  But x86_64 has 
> the problem.
> 
> Thanks,
> Alan.

Hmmm -- seems to work with RHEL5:

# crash

crash 4.0-4.13
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008  Red Hat, Inc.
Copyright (C) 2004, 2005, 2006  IBM Corporation
Copyright (C) 1999-2006  Hewlett-Packard Co
Copyright (C) 2005, 2006  Fujitsu Limited
Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
Copyright (C) 2005  NEC Corporation
Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions.  Enter "help copying" to see the conditions.
This program has absolutely no warranty.  Enter "help warranty" for details.

GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...

       KERNEL: /usr/lib/debug/lib/modules/2.6.18-61.el5/vmlinux
     DUMPFILE: /dev/crash
         CPUS: 2
         DATE: Wed Jan 16 08:43:47 2008
       UPTIME: 5 days, 01:36:07
LOAD AVERAGE: 0.21, 0.06, 0.02
        TASKS: 101
     NODENAME: dhcp83-53.boston.redhat.com
      RELEASE: 2.6.18-61.el5
      VERSION: #1 SMP Tue Jan 8 13:56:19 EST 2008
      MACHINE: x86_64  (2793 Mhz)
       MEMORY: 1 GB
          PID: 32197
      COMMAND: "crash"
         TASK: ffff810030dd3860  [THREAD_INFO: ffff81002c3d4000]
          CPU: 0
        STATE: TASK_RUNNING (ACTIVE)

crash> dis -l ext3_count_dirs
0xffffffff8804c34c <ext3_count_dirs>:   push   %r12
0xffffffff8804c34e <ext3_count_dirs+2>: mov    %rdi,%r12
0xffffffff8804c351 <ext3_count_dirs+5>: push   %rbp
0xffffffff8804c352 <ext3_count_dirs+6>: xor    %ebp,%ebp
0xffffffff8804c354 <ext3_count_dirs+8>: push   %rbx
0xffffffff8804c355 <ext3_count_dirs+9>: xor    %ebx,%ebx
0xffffffff8804c357 <ext3_count_dirs+11>:        jmp    0xffffffff8804c374
0xffffffff8804c359 <ext3_count_dirs+13>:        xor    %edx,%edx
0xffffffff8804c35b <ext3_count_dirs+15>:        mov    %ebx,%esi
0xffffffff8804c35d <ext3_count_dirs+17>:        mov    %r12,%rdi
0xffffffff8804c360 <ext3_count_dirs+20>:        callq  0xffffffff8804a0a0 
<ext3_get_group_desc>
0xffffffff8804c365 <ext3_count_dirs+25>:        test   %rax,%rax
0xffffffff8804c368 <ext3_count_dirs+28>:        je     0xffffffff8804c371
0xffffffff8804c36a <ext3_count_dirs+30>:        movzwl 0x10(%rax),%eax
0xffffffff8804c36e <ext3_count_dirs+34>:        add    %rax,%rbp
0xffffffff8804c371 <ext3_count_dirs+37>:        inc    %rbx
0xffffffff8804c374 <ext3_count_dirs+40>:        mov    0x240(%r12),%rax
0xffffffff8804c37c <ext3_count_dirs+48>:        cmp    0x48(%rax),%rbx
0xffffffff8804c380 <ext3_count_dirs+52>:        jb     0xffffffff8804c359
0xffffffff8804c382 <ext3_count_dirs+54>:        pop    %rbx
0xffffffff8804c383 <ext3_count_dirs+55>:        mov    %rbp,%rax
0xffffffff8804c386 <ext3_count_dirs+58>:        pop    %rbp
0xffffffff8804c387 <ext3_count_dirs+59>:        pop    %r12
0xffffffff8804c389 <ext3_count_dirs+61>:        retq
crash> mod -s ext3
      MODULE       NAME               SIZE  OBJECT FILE
ffffffff8806aa00  ext3             166993 
/lib/modules/2.6.18-61.el5.bz232489.2/kernel/fs/ext3/ext3.ko
crash> dis -l ext3_count_dirs
/usr/src/debug/kernel-2.6.18/linux-2.6.18.x86_64/fs/ext3/ialloc.c: 746
0xffffffff8804c34c <ext3_count_dirs>:   push   %r12
0xffffffff8804c34e <ext3_count_dirs+2>: mov    %rdi,%r12
0xffffffff8804c351 <ext3_count_dirs+5>: push   %rbp
0xffffffff8804c352 <ext3_count_dirs+6>: xor    %ebp,%ebp
0xffffffff8804c354 <ext3_count_dirs+8>: push   %rbx
0xffffffff8804c355 <ext3_count_dirs+9>: xor    %ebx,%ebx
0xffffffff8804c357 <ext3_count_dirs+11>:        jmp    0xffffffff8804c374 
<ext3_count_dirs+40>
/usr/src/debug/kernel-2.6.18/linux-2.6.18.x86_64/fs/ext3/ialloc.c: 751
0xffffffff8804c359 <ext3_count_dirs+13>:        xor    %edx,%edx
0xffffffff8804c35b <ext3_count_dirs+15>:        mov    %ebx,%esi
0xffffffff8804c35d <ext3_count_dirs+17>:        mov    %r12,%rdi
0xffffffff8804c360 <ext3_count_dirs+20>:        callq  0xffffffff8804a0a0 
<ext3_get_group_desc>
/usr/src/debug/kernel-2.6.18/linux-2.6.18.x86_64/fs/ext3/ialloc.c: 752
0xffffffff8804c365 <ext3_count_dirs+25>:        test   %rax,%rax
0xffffffff8804c368 <ext3_count_dirs+28>:        je     0xffffffff8804c371 
<ext3_count_dirs+37>
/usr/src/debug/kernel-2.6.18/linux-2.6.18.x86_64/fs/ext3/ialloc.c: 754
0xffffffff8804c36a <ext3_count_dirs+30>:        movzwl 0x10(%rax),%eax
0xffffffff8804c36e <ext3_count_dirs+34>:        add    %rax,%rbp
0xffffffff8804c371 <ext3_count_dirs+37>:        inc    %rbx
/usr/src/debug/kernel-2.6.18/linux-2.6.18.x86_64/fs/ext3/ialloc.c: 750
0xffffffff8804c374 <ext3_count_dirs+40>:        mov    0x240(%r12),%rax
0xffffffff8804c37c <ext3_count_dirs+48>:        cmp    0x48(%rax),%rbx
0xffffffff8804c380 <ext3_count_dirs+52>:        jb     0xffffffff8804c359 
<ext3_count_dirs+13>
/usr/src/debug/kernel-2.6.18/linux-2.6.18.x86_64/fs/ext3/ialloc.c: 757
0xffffffff8804c382 <ext3_count_dirs+54>:        pop    %rbx
0xffffffff8804c383 <ext3_count_dirs+55>:        mov    %rbp,%rax
0xffffffff8804c386 <ext3_count_dirs+58>:        pop    %rbp
0xffffffff8804c387 <ext3_count_dirs+59>:        pop    %r12
0xffffffff8804c389 <ext3_count_dirs+61>:        retq
crash>

RHEL4 x86_64 doesn't appear to work though...

Dave





More information about the Crash-utility mailing list