[Crash-utility] [PATCH] fix bug of gdb involved by gdb-7.3.1.patch

qiaonuohan qiaonuohan at cn.fujitsu.com
Fri Mar 29 10:10:38 UTC 2013


Hi Dave,

The newly modification of gdb involved some bug. When using mount,
crash prints the following message.

<cut>
crash> mount

mount: invalid structure member offset: mount_mnt_devname
       FILE: filesys.c  LINE: 1396  FUNCTION: show_mounts()

[./crash] error trace: 45dbf7 => 49dc02 => 49af31 => 502cdd
     MOUNT           SUPERBLK     TYPE   DEVNAME   DIRNAME

  502cdd: OFFSET_verify+189
  49af31: show_mounts+785
  49dc02: cmd_mount+1234
  45dbf7: exec_command+919

mount: invalid structure member offset: mount_mnt_devname
       FILE: filesys.c  LINE: 1396  FUNCTION: show_mounts()

crash>
<cut>

Then I try to find what caused the bug. I found a wrong number is returned
when using "STRUCT_SIZE_INIT(mount, "mount");".

and then I referred to the changelog to see what had happened, and I guess
from changelog, the bug is related to 
<cut>
         - Patch to the internal gdb_get_datatype() function to return the 
           typecode and length of integer variables.
           (adrian.wenl at gmail.com, anderson at redhat.com)
<cut>

So I made the patch to fix it.

--
--
Regards
Qiao Nuohan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-bug-of-gdb.patch
Type: application/octet-stream
Size: 1294 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20130329/3be59ec4/attachment.obj>


More information about the Crash-utility mailing list