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)
pull/3/head
Johannes Sixt 14 years ago committed by Slávek Banko
parent a8abc77457
commit 26a2a75988
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -2422,6 +2422,15 @@ std::list<DisassembledCode> 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))

Loading…
Cancel
Save