Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reflect latest runtime changes for mono-trunk.

Starting with runtime version 81.6 (latest mono trunk),
there is no mono_get_thread_abort_signal() method anymore
and its stored in a variable pointed to by a field in the
'MONO_DEBUGGER__debugger_info'.
  • Loading branch information...
commit f739e534aef50e2648155c6ea899d3b773d047e7 1 parent 9b06868
Martin Baulig authored
View
17 backend/mono/MonoThreadManager.cs
@@ -106,6 +106,7 @@ internal class MonoThreadManager
AddressBreakpoint notification_bpt;
IntPtr mono_runtime_info;
int debugger_version;
+ int thread_abort_signal;
internal bool HasCodeBuffer {
get;
@@ -149,6 +150,11 @@ protected void initialize_notifications (Inferior inferior)
notification_bpt.Remove (inferior);
notification_bpt = null;
}
+
+ if (debugger_info.HasThreadAbortSignal)
+ thread_abort_signal = inferior.ReadInteger (debugger_info.ThreadAbortSignal);
+ else
+ thread_abort_signal = inferior.MonoThreadAbortSignal;
}
internal void InitCodeBuffer (Inferior inferior, TargetAddress code_buffer)
@@ -465,7 +471,7 @@ internal void InitializeThreads (Inferior inferior)
}
if ((cevent.Type == Inferior.ChildEventType.CHILD_STOPPED) &&
- (cevent.Argument == inferior.MonoThreadAbortSignal)) {
+ (cevent.Argument == thread_abort_signal)) {
resume_target = true;
return true;
}
@@ -539,6 +545,8 @@ internal class MonoDebuggerInfo
public readonly TargetAddress AbortRuntimeInvoke = TargetAddress.Null;
+ public readonly TargetAddress ThreadAbortSignal = TargetAddress.Null;
+
public static MonoDebuggerInfo Create (TargetMemoryAccess memory, TargetAddress info)
{
TargetBinaryReader header = memory.ReadMemory (info, 24).GetReader ();
@@ -588,6 +596,10 @@ public bool CheckRuntimeVersion (int major, int minor)
get { return CheckRuntimeVersion (81, 5); }
}
+ public bool HasThreadAbortSignal {
+ get { return CheckRuntimeVersion (81, 6); }
+ }
+
protected MonoDebuggerInfo (TargetMemoryAccess memory, TargetReader reader)
{
reader.Offset = 8;
@@ -647,6 +659,9 @@ protected MonoDebuggerInfo (TargetMemoryAccess memory, TargetReader reader)
if (HasAbortRuntimeInvoke)
AbortRuntimeInvoke = reader.ReadAddress ();
+ if (HasThreadAbortSignal)
+ ThreadAbortSignal = reader.ReadAddress ();
+
Report.Debug (DebugFlags.JitSymtab, this);
}
}
View
2  backend/server/darwin-ptrace.c
@@ -785,7 +785,7 @@ server_ptrace_get_signal_info (ServerHandle *handle, SignalInfo **sinfo_out)
* internally by glibc. */
sinfo->kernel_sigrtmin = SIGUSR1;
#ifdef USING_MONO_FROM_TRUNK
- sinfo->mono_thread_abort = mono_debugger_get_thread_abort_signal ();
+ sinfo->mono_thread_abort = -1;
#else
sinfo->mono_thread_abort = mono_thread_get_abort_signal ();
#endif
View
2  backend/server/x86-linux-ptrace.c
@@ -547,7 +547,7 @@ server_ptrace_get_signal_info (ServerHandle *handle, SignalInfo **sinfo_out)
* internally by glibc. */
sinfo->kernel_sigrtmin = __SIGRTMIN;
#ifdef USING_MONO_FROM_TRUNK
- sinfo->mono_thread_abort = mono_debugger_get_thread_abort_signal ();
+ sinfo->mono_thread_abort = -1;
#else
sinfo->mono_thread_abort = mono_thread_get_abort_signal ();
#endif
View
3  backend/server/x86-ptrace.c
@@ -23,9 +23,6 @@
#include <fcntl.h>
#include <errno.h>
-#include <mono/metadata/appdomain.h>
-#include <mono/metadata/object.h>
-
/*
* NOTE: The manpage is wrong about the POKE_* commands - the last argument
* is the data (a word) to be written, not a pointer to it.
View
4 build/Makefile.am
@@ -6,6 +6,10 @@ two_SCRIPTS = mdb.exe mdb-symbolreader.exe
MCS_FLAGS = -debug -define:DEBUG -define:DEBUGGER_SOURCE -nowarn:0169,0067
+if MONO_TRUNK
+MCS_FLAGS += -define:MONO_TRUNK
+endif
+
if MARTIN_PRIVATE
# Enable some more stuff for me.
if ATTACHING_SUPPORTED
View
30 configure.in
@@ -113,16 +113,6 @@ if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
-AC_MSG_CHECKING([whether we're compiling from SVN])
-if test -f "$srcdir/.svn_version" ; then
- from_svn=yes
-else
- from_svn=no
-fi
-AC_MSG_RESULT($from_svn)
-
-AM_CONDITIONAL(COMPILING_FROM_SVN, test x$from_svn = xyes)
-
pkg_config_path=
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
if test x$with_crosspkgdir = "x"; then
@@ -145,20 +135,28 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
AC_SUBST(BASE_DEPENDENCIES_LIBS)
+debugger_major_version=81
+min_debugger_minor_version=0
+symfile_major_version=50
+min_symfile_minor_version=0
+
AC_MSG_CHECKING([Whether we're using Mono from trunk])
## Check for Mono from trunk
if pkg-config --modversion mono-2>/dev/null; then
have_mono_trunk=true
mono_pc=mono-2
+ min_debugger_minor_version=6
+ server_deps="glib-2.0 >= $GLIB_REQUIRED_VERSION $martin_deps"
AC_MSG_RESULT([yes])
else
have_mono_trunk=false
mono_pc=mono
+ server_deps="$mono_pc >= $MONO_REQUIRED_VERSION glib-2.0 >= $GLIB_REQUIRED_VERSION $martin_deps"
AC_MSG_RESULT([no])
fi
## Versions of dependencies
-PKG_CHECK_MODULES(SERVER_DEPENDENCIES, $mono_pc >= $MONO_REQUIRED_VERSION glib-2.0 >= $GLIB_REQUIRED_VERSION $martin_deps)
+PKG_CHECK_MODULES(SERVER_DEPENDENCIES, $server_deps)
AC_SUBST(SERVER_DEPENDENCIES_CFLAGS)
AC_SUBST(SERVER_DEPENDENCIES_LIBS)
@@ -276,10 +274,6 @@ AC_CHECK_FUNCS(strlcpy strlcat fgetln)
CHECK_READLINE
-min_mono_version=72
-symfile_major_version=50
-min_symfile_minor_version=0
-
AC_ARG_WITH(xsp,
[ --with-xsp Enable XSP support (experimental)],
with_xsp=yes, with_xsp=no)
@@ -305,7 +299,10 @@ CFLAGS=$WRAPPER_CFLAGS
AC_TRY_COMPILE([#include <mono/metadata/mono-debug.h>
#include <mono/metadata/debug-mono-symfile.h>
], [
-#if MONO_DEBUGGER_MAJOR_VERSION < $min_mono_version
+#if MONO_DEBUGGER_MAJOR_VERSION != $debugger_major_version
+#error "Your mono is too old for this version of the debugger."
+#endif
+#if MONO_DEBUGGER_MINOR_VERSION < $min_debugger_minor_version
#error "Your mono is too old for this version of the debugger."
#endif
#if MONO_SYMBOL_FILE_MAJOR_VERSION != $symfile_major_version
@@ -363,6 +360,7 @@ AM_CONDITIONAL(DISABLED, false)
if test x$have_mono_trunk = xtrue; then
AC_DEFINE([USING_MONO_FROM_TRUNK], [1], [Whether we're using Mono from trunk])
fi
+AM_CONDITIONAL(MONO_TRUNK, test x$have_mono_trunk = xtrue)
AC_OUTPUT([
Makefile
Please sign in to comment.
Something went wrong with that request. Please try again.