Comment 4 for bug 871901

Revision history for this message
In , Johannes Pfau (johannespfau) wrote :

Created attachment 5940
patch

Because of a bug in the get_linux_version function in the arm-linux-nat.c file, gdb always segfaults. get_linux_version assumes that a linux kernel version always has 3 version numbers (n.n.n) which is not true for the linux 3.0 kernel. In my case, the kernel version string is "3.0-ARCH". Because of that, the third token returned by strtok is null, which causes the segfault.

Patch for gdb 7.3.1 attached.