[btls]: Allow importing a null `byte[]`. Fixes #51562.
ModuleMirror main_module;
AssemblyName aname;
AssemblyDefinition meta;
+ AppDomainMirror domain;
Dictionary<string, long> typeCacheIgnoreCase = new Dictionary<string, long> (StringComparer.InvariantCultureIgnoreCase);
Dictionary<string, long> typeCache = new Dictionary<string, long> ();
}
}
+ // Since Protocol version 2.45
+ public AppDomainMirror Domain {
+ get {
+ if (domain == null) {
+ vm.CheckProtocolVersion (2, 45);
+ domain = vm.GetDomain (vm.conn.Assembly_GetIdDomain (id));
+ }
+ return domain;
+ }
+ }
+
public virtual AssemblyName GetName () {
if (aname == null) {
string name = vm.conn.Assembly_GetName (id);
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 44;
+ internal const int MINOR_VERSION = 45;
enum WPSuspendPolicy {
NONE = 0,
GET_MANIFEST_MODULE = 3,
GET_OBJECT = 4,
GET_TYPE = 5,
- GET_NAME = 6
+ GET_NAME = 6,
+ GET_DOMAIN = 7
}
enum CmdModule {
return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
}
+ internal long Assembly_GetIdDomain (long id) {
+ return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_DOMAIN, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
/*
* TYPE
*/
// d_method is from another domain
MethodMirror d_method = (e as BreakpointEvent).Method;
Assert.IsTrue (m != d_method);
+ Assert.AreEqual (domain, d_method.DeclaringType.Assembly.Domain);
var frames = e.Thread.GetFrames ();
Assert.AreEqual ("invoke_in_domain", frames [0].Method.Name);
-/*
- * This is a private header file.
- * The API in here is undocumented and may only be used by the JIT to
- * communicate with the debugger.
- */
-
#ifndef __MONO_DEBUG_DEBUGGER_H__
#define __MONO_DEBUG_DEBUGGER_H__
call: dest:a clob:c len:17
tailcall: len:120 clob:c
br: len:5
-seq_point: len:24 clob:c
+seq_point: len:26 clob:c
il_seq_point: len:0
int_beq: len:6
#define HEADER_LENGTH 11
#define MAJOR_VERSION 2
-#define MINOR_VERSION 44
+#define MINOR_VERSION 45
typedef enum {
CMD_SET_VM = 1,
CMD_ASSEMBLY_GET_MANIFEST_MODULE = 3,
CMD_ASSEMBLY_GET_OBJECT = 4,
CMD_ASSEMBLY_GET_TYPE = 5,
- CMD_ASSEMBLY_GET_NAME = 6
+ CMD_ASSEMBLY_GET_NAME = 6,
+ CMD_ASSEMBLY_GET_DOMAIN = 7
} CmdAssembly;
typedef enum {
static void
send_types_for_domain (MonoDomain *domain, void *user_data)
{
+ MonoDomain* old_domain;
AgentDomainInfo *info = NULL;
info = get_agent_domain_info (domain);
g_assert (info);
+
+ old_domain = mono_domain_get ();
+
+ mono_domain_set (domain, TRUE);
mono_loader_lock ();
g_hash_table_foreach (info->loaded_classes, emit_type_load, NULL);
mono_loader_unlock ();
+
+ mono_domain_set (old_domain, TRUE);
+}
+
+static void
+send_assemblies_for_domain (MonoDomain *domain, void *user_data)
+{
+ GSList *tmp;
+ MonoDomain* old_domain;
+
+ old_domain = mono_domain_get ();
+
+ mono_domain_set (domain, TRUE);
+
+ mono_domain_assemblies_lock (domain);
+ for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
+ MonoAssembly* ass = (MonoAssembly *)tmp->data;
+ emit_assembly_load (ass, NULL);
+ }
+ mono_domain_assemblies_unlock (domain);
+
+ mono_domain_set (old_domain, TRUE);
}
static void
break;
case EVENT_KIND_ASSEMBLY_LOAD:
/* Emit load events for currently loaded assemblies */
- mono_assembly_foreach (emit_assembly_load, NULL);
+ mono_domain_foreach (send_assemblies_for_domain, NULL);
break;
case EVENT_KIND_THREAD_START:
/* Emit start events for currently started threads */
mono_error_cleanup (&error);
return err;
}
+ case CMD_ASSEMBLY_GET_DOMAIN: {
+ buffer_add_domainid (buf, domain);
+ break;
+ }
case CMD_ASSEMBLY_GET_TYPE: {
MonoError error;
char *s = decode_string (p, &p, end);
"GET_MANIFEST_MODULE",
"GET_OBJECT",
"GET_TYPE",
- "GET_NAME"
+ "GET_NAME",
+ "GET_DOMAIN"
};
static const char* module_cmds_str[] = {
/* Load ss_tramp_var */
/* This is equal to &ss_trampoline */
x86_mov_reg_membase (code, X86_ECX, var->inst_basereg, var->inst_offset, sizeof (mgreg_t));
- x86_alu_membase_imm (code, X86_CMP, X86_ECX, 0, 0);
+ x86_mov_reg_membase (code, X86_ECX, X86_ECX, 0, sizeof (mgreg_t));
+ x86_alu_reg_imm (code, X86_CMP, X86_ECX, 0);
br[0] = code; x86_branch8 (code, X86_CC_EQ, 0, FALSE);
- x86_call_membase (code, X86_ECX, 0);
+ x86_call_reg (code, X86_ECX);
x86_patch (br [0], code);
}
elif [[ ${CI_TAGS} == *'aot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime_preset=aot ";
elif [[ ${CI_TAGS} == *'fullaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=fullaot";
elif [[ ${CI_TAGS} == *'hybridaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=hybridaot";
+elif [[ ${CI_TAGS} == *'winaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=winaot";
elif [[ ${CI_TAGS} == *'aot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=aot";
elif [[ ${CI_TAGS} == *'bitcode'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=bitcode";
elif [[ ${CI_TAGS} == *'interpreter'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-interpreter=yes";
wget -qO- https://download.mono-project.com/test/new-certs.tgz| tar zx -C ~/.config/.mono/
fi
-
${TESTCMD} --label=configure --timeout=60m --fatal ./autogen.sh $EXTRA_CONF_FLAGS
if [[ ${label} == 'w32' ]];
then
${TESTCMD} --label=make-msvc-sgen --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release /p:MONO_TARGET_GC=sgen msvc/mono.sln
fi
+if [[ ${CI_TAGS} == *'winaot'* ]];
+ then
+ # The AOT compiler on Windows requires Visual Studio's clang.exe and link.exe in $PATH
+ # and we must make sure Visual Studio's link.exe comes before Cygwin's link.exe
+ VC_ROOT="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC"
+ export PATH="$VC_ROOT/ClangC2/bin/amd64:$VC_ROOT/bin/amd64":$PATH
+fi
+
if [[ ${CI_TAGS} == *'monolite'* ]]; then make get-monolite-latest; fi
make_parallelism=-j4
--- /dev/null
+#!/bin/bash -e
+
+if test -n "${MONO_LLVMONLY}";
+then
+${TESTCMD} --label=mini --timeout=25m make -j 4 -w -C mono/mini -k llvmonlycheck
+else
+${TESTCMD} --label=mini --timeout=25m make -j 4 -w -C mono/mini -k fullaotcheck
+fi
+
+${TESTCMD} --label=runtime --timeout=160m make -w -C mono/tests -k test-wrench V=1 CI=1
+${TESTCMD} --label=corlib --timeout=30m make -w -C mcs/class/corlib run-test
+${TESTCMD} --label=verify --timeout=15m make -w -C runtime mcs-compileall
+${TESTCMD} --label=profiler --timeout=30m make -w -C mono/profiler -k check
+${TESTCMD} --label=System --timeout=10m make -w -C mcs/class/System run-test
+${TESTCMD} --label=System.XML --timeout=5m make -w -C mcs/class/System.XML run-test
+${TESTCMD} --label=Mono.Security --timeout=5m make -w -C mcs/class/Mono.Security run-test
+${TESTCMD} --label=System.Data --timeout=5m make -w -C mcs/class/System.Data run-test
+${TESTCMD} --label=System.Web.Services --timeout=5m make -w -C mcs/class/System.Web.Services run-test
+${TESTCMD} --label=I18N.CJK --timeout=5m make -w -C mcs/class/I18N/CJK run-test
+${TESTCMD} --label=I18N.West --timeout=5m make -w -C mcs/class/I18N/West run-test
+${TESTCMD} --label=I18N.MidEast --timeout=5m make -w -C mcs/class/I18N/MidEast run-test
+${TESTCMD} --label=System.Transactions --timeout=5m make -w -C mcs/class/System.Transactions run-test
+${TESTCMD} --label=System.Core --timeout=15m make -w -C mcs/class/System.Core run-test
+${TESTCMD} --label=System.Xml.Linq --timeout=5m make -w -C mcs/class/System.Xml.Linq run-test
+${TESTCMD} --label=System.Runtime.Serialization --timeout=5m make -w -C mcs/class/System.Runtime.Serialization run-test
+${TESTCMD} --label=System.ServiceModel --timeout=15m make -w -C mcs/class/System.ServiceModel run-test
+${TESTCMD} --label=System.ServiceModel.Web --timeout=5m make -w -C mcs/class/System.ServiceModel.Web run-test
+${TESTCMD} --label=System.ComponentModel.DataAnnotations --timeout=5m make -w -C mcs/class/System.ComponentModel.DataAnnotations run-test
+${TESTCMD} --label=Mono.CSharp --timeout=5m make -w -C mcs/class/Mono.CSharp run-test
+${TESTCMD} --label=System.Numerics --timeout=5m make -w -C mcs/class/System.Numerics run-test
+${TESTCMD} --label=System.Net.Http --timeout=5m make -w -C mcs/class/System.Net.Http run-test
+${TESTCMD} --label=System.Json --timeout=5m make -w -C mcs/class/System.Json run-test
+
+rm -fr /tmp/jenkins-temp-aspnet*