aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-08-31 08:43:37 +0000
committerPavel Labath <labath@google.com>2016-08-31 08:43:37 +0000
commitb9739d4090da7812e4a3ba2fccc357a76ee80bcb (patch)
tree5bc0712bb45db3a66d76b1f1aac45ff2e13de4a8 /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
parentf21aade0d8d96417b4a7e25c7ddc300b0ea6d718 (diff)
downloadllvm-b9739d4090da7812e4a3ba2fccc357a76ee80bcb.zip
llvm-b9739d4090da7812e4a3ba2fccc357a76ee80bcb.tar.gz
llvm-b9739d4090da7812e4a3ba2fccc357a76ee80bcb.tar.bz2
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
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 17f136c..49d57c0 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -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 ();
}