[PATCH 4.9 17/45] scripts/gdb: make lx-dmesg command work (reliably)