Linaro GDB crashes on 3.x kernels
Bug #871901 reported by
Ulrich Weigand
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GDB |
Fix Released
|
Medium
|
Ulrich Weigand | ||
gdb |
Fix Released
|
Critical
|
Bug Description
GDB crashes on startup on ARM if the kernel reports a two-level version string (e.g. 3.0, 3.1) instead of a three-level version string (2.6.39, 3.0.0, ...).
Related branches
Changed in gdb: | |
importance: | Unknown → Critical |
status: | Unknown → Fix Released |
Changed in gdb-linaro: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.