diff options
author | Jb Evain <jbevain@gmail.com> | 2019-03-14 11:44:17 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-03-14 11:44:17 +0300 |
commit | 959fbda60a56d6d180c0a0d0a20e13473fc38002 (patch) | |
tree | b3ece402ff66bfed7ad85735160f5de89b307151 /mcs/class/Mono.Debugger.Soft | |
parent | c0b48793db422b502364f5836ac9ba8abe37aa7a (diff) |
[sdb] Add property AssemblyMirror.HasDebugInfo (#13353)
* [sdb] Add property AssemblyMirror.HasDebugInfo
* Fix mono_debug_image_has_debug_info to work with ppdb
* Bump API snapshot submodule
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft')
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs | 15 | ||||
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs | 9 |
2 files changed, 21 insertions, 3 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs index 41b5e1c62ee..081f96044e9 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs @@ -21,6 +21,7 @@ namespace Mono.Debugger.Soft byte[] metadata_blob; bool? isDynamic; byte[] pdb_blob; + bool? has_debug_info; Dictionary<string, long> typeCacheIgnoreCase = new Dictionary<string, long> (StringComparer.InvariantCultureIgnoreCase); Dictionary<string, long> typeCache = new Dictionary<string, long> (); Dictionary<uint, long> tokenTypeCache = new Dictionary<uint, long> (); @@ -222,5 +223,17 @@ namespace Mono.Debugger.Soft } return vm.GetMethod (methodId); } - } + + public bool HasDebugInfo { + get { + if (has_debug_info.HasValue) + return has_debug_info.Value; + + vm.CheckProtocolVersion (2, 51); + + has_debug_info = vm.conn.Assembly_HasDebugInfo (id); + return has_debug_info.Value; + } + } + } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index fe305ad2012..75e647374c9 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -427,7 +427,7 @@ namespace Mono.Debugger.Soft * with newer runtimes, and vice versa. */ internal const int MAJOR_VERSION = 2; - internal const int MINOR_VERSION = 50; + internal const int MINOR_VERSION = 51; enum WPSuspendPolicy { NONE = 0, @@ -548,7 +548,8 @@ namespace Mono.Debugger.Soft GET_IS_DYNAMIC = 9, GET_PDB_BLOB = 10, GET_TYPE_FROM_TOKEN = 11, - GET_METHOD_FROM_TOKEN = 12 + GET_METHOD_FROM_TOKEN = 12, + HAS_DEBUG_INFO = 13, } enum CmdModule { @@ -2226,6 +2227,10 @@ namespace Mono.Debugger.Soft return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_METHOD_FROM_TOKEN, new PacketWriter ().WriteId (id).WriteInt ((int)token)).ReadId (); } + internal bool Assembly_HasDebugInfo (long id) { + return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.HAS_DEBUG_INFO, new PacketWriter ().WriteId (id)).ReadBool (); + } + /* * TYPE */ |