Re: [PATCH] fix bug of gdb involved by gdb-7.3.1.patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> 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@xxxxxxxxx, anderson@xxxxxxxxxx)
> <cut>
> 
> So I made the patch to fix it.

Hi Qiao,

Thanks for tracking that down.  Although it looks like it only affects
kernels prior to Linux 3.3, which introduced the vfsmount/mount structure
changes.  (At least "mount" works OK for me on 3.5, 3.6, 3.7 and 3.8 kernels.)  

But I should have listened to myself when Lei Wen convinced me to put
the patch in for an extension that he's working on:

> It's not really a bug because that code path was meant for usage by the 
> enumerator_value() function.  So it makes me a bit nervous to modify it 
> for code that only your enhanced whatis command would ever see.

If I can't find another way around it, I'll revert the patch, and probably
do a premature 6.1.6 release next week.  

Thanks,
 Dave 



> 
> --
> --
> Regards
> Qiao Nuohan
> 
> 
> 
> --
> Crash-utility mailing list
> Crash-utility@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/crash-utility

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux