[stable 4.9.y 1/4] scripts/gdb: make lx-dmesg command work (reliably)