From 26a2a7598846501d109da764020b082ce5394d76 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 27 Dec 2010 20:58:39 +0100 Subject: Fix parsing of disassembly produced by gdb 7.1. Since gdb 7.1, the address does not start at the beginning of a line, and it can be prefixed by a pointer => that indicates the current instruction. (cherry picked from upstream commit 5c5f34852d30337ef7c23ef4e88d50ecee1c0703) --- kdbg/gdbdriver.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kdbg/gdbdriver.cpp b/kdbg/gdbdriver.cpp index 16efe9a..933c191 100644 --- a/kdbg/gdbdriver.cpp +++ b/kdbg/gdbdriver.cpp @@ -2422,6 +2422,15 @@ std::list GdbDriver::parseDisassemble(const char* output) while (p != end) { DisassembledCode c; + // skip initial space or PC pointer ("=>", since gdb 7.1) + while (p != end) { + if (isspace(*p)) + ++p; + else if (p[0] == '=' && p[1] == '>') + p += 2; + else + break; + } const char* start = p; // address while (p != end && !isspace(*p)) -- cgit v1.2.1