Revert r280137 and 280139 and subsequent build fixes

The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a way which makes
lldb-server crash. The crash (assert) happens when parsing the "qRegisterInfo0" packet, because
the function tries to drop_front more bytes than the packet contains. It's not clear to me
whether we should consider this a bug in the caller or the callee, but it any case, it worked
before, so I am reverting this until we can figure out what the proper interface should be.

llvm-svn: 280207
This commit is contained in:
Pavel Labath
2016-08-31 08:43:37 +00:00
parent f21aade0d8
commit b9739d4090
11 changed files with 218 additions and 140 deletions

View File

@@ -1620,7 +1620,7 @@ ParseMemoryRegionInfoFromProcMapsLine (const std::string &maps_line, MemoryRegio
{
memory_region_info.Clear();
StringExtractor line_extractor (maps_line);
StringExtractor line_extractor (maps_line.c_str ());
// Format: {address_start_hex}-{address_end_hex} perms offset dev inode pathname
// perms: rwxp (letter is present if set, '-' if not, final character is p=private, s=shared).
@@ -1687,7 +1687,9 @@ ParseMemoryRegionInfoFromProcMapsLine (const std::string &maps_line, MemoryRegio
line_extractor.GetU64(0, 10); // Read the inode number
line_extractor.SkipSpaces();
memory_region_info.SetName(line_extractor.Peek().str().c_str());
const char* name = line_extractor.Peek();
if (name)
memory_region_info.SetName(name);
return Error ();
}