aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2016-07-22 12:55:35 +0000
committerTamas Berghammer <tberghammer@google.com>2016-07-22 12:55:35 +0000
commitd7d69f80836c8485c83ba55d2e5e5bac4154d975 (patch)
treecf5d46fb847e559bcfaaaf892a908de4a9736aa4 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parent29333c9de6c7ab6ad1ca09d19d011927704db0c5 (diff)
downloadllvm-d7d69f80836c8485c83ba55d2e5e5bac4154d975.zip
llvm-d7d69f80836c8485c83ba55d2e5e5bac4154d975.tar.gz
llvm-d7d69f80836c8485c83ba55d2e5e5bac4154d975.tar.bz2
Support loading files even when incorrect file name specified by the linker
"Incorrect" file name seen on Android whene the main executable is called "app_process32" (or 64) but the linker specifies the package name (e.g. com.android.calculator2). Additionally it can be present in case of some linker bugs. This CL adds logic to try to fetch the correct file name from the proc file system based on the base address sepcified by the linker in case we are failed to load the module by name. Differential revision: http://reviews.llvm.org/D22219 llvm-svn: 276411
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index ede6976..4721e23 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -2221,6 +2221,15 @@ GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo (StringExtractorGDBRe
response.PutChar (';');
}
+
+ // Name
+ ConstString name = region_info.GetName();
+ if (name)
+ {
+ response.PutCString("name:");
+ response.PutCStringAsRawHex8(name.AsCString());
+ response.PutChar(';');
+ }
}
return SendPacketNoLock(response.GetData(), response.GetSize());