Compare commits

...
19 Commits
Author SHA1 Message Date
Geoff Norton d88e223dd4 Forward port this change for MonoVS 2010-09-10 14:55:45 -06:00
Geoff Norton 1867fd1486 fix typo
svn path=/branches/mono-2-6/mono/; revision=148851
2010-09-10 14:55:43 -06:00
Geoff Norton 1f42b9026c 2009-12-14 Geoff Norton <[email protected]>
* debugger-agent.c: The end_runtime_invoke guard isn't working
        on AMD64 as __builtin_frame_address (1) returns NULL.  Disable the
        behaviour by default, and make it runtime configurable.

svn path=/branches/mono-2-6/mono/; revision=148421
2010-09-10 14:55:41 -06:00
Miguel de Icaza 4b649e0805 [Fix] Correct fix for the g_shell_parse_argv bug
Simplifies the code a little bit by eliminating the in_quote variable,
but also fixes the rules to follow the requirements from the
"Shell Command Language" specification on the Unix03 site:

http://opengroup.org/onlinepubs/007908775/xcu/chap2.html#tag_001_002

In particular, the interpretation of the backslash inside double quotes
is limited to a handful of characters.   Notice that this differs from
the glib implementation which is not correct either.
2010-09-10 01:04:15 -04:00
Miguel de Icaza 2ce8ebda5f [Fix] Allow escape characters inside quoted text, and do not let nested quote reset the quoting state
This should fix #637680
2010-09-09 19:48:41 -04:00
Andrew Jorgensen 3b7c1f8741 Various cleanup and addition 2010-09-09 09:57:59 -06:00
Zoltan Varga faa1dd5646 Add a few more remaps. 2010-09-07 15:50:00 -06:00
Zoltan Varga 21b9ee9deb Remap g_strdupv too. 2010-09-07 15:49:59 -06:00
Marek Habersack db99cebd57 [asp.net] Fix for bug #636709. ClientID must be reset when ID is assigned. 2010-09-07 23:21:26 +02:00
Marek Habersack a8c3708337 [asp.net] Fix for bug #636475. A typo caused ads not to be matched in ChooseAd
The second loop over the ads hashtable must not reject an app if the keyword filter is empty.
2010-09-07 22:11:41 +02:00
Gonzalo Paniagua Javier b40cb0cc14 Add wsdl help generator to the 4.0 files
Ditto.

	Fixes bug #636841.
2010-09-07 14:32:44 -04:00
Gonzalo Paniagua Javier 5640b0a889 Remove Content-Length header when not needed
If we are redirecting to a GET from a POST, the Content-Length header
	might have stale data and it will be sent. Some servers, instead of
	ignoring it, keep waiting for the data to be sent (for a GET!).

	Fixes bug #636219.
2010-09-01 16:07:04 -06:00
Gonzalo Paniagua Javier 693cbe7207 Use the request itself as the key for the cache.
We were usign teh URL, but that might not be unique among several
	requests that need to be authenticated using NTLM. This led to
	different requests sharing the same authentication session which fails
	miserably.

	Bug #631315 fixed.
2010-09-01 16:07:03 -06:00
Gonzalo Paniagua Javier 93d6cc3bf9 Avoid sending data in the challenge phase of NTLM
If there's a POST/PUT request that gets a NTLM 401, we save the data
	and don't send it again until after the challenge phase. Ie, instead of
	sending all the data 3 times, we only send it at most twice.
2010-09-01 16:07:02 -06:00
Ankit Jain 0474947f86 [xbuild] Update man page to add "/tv:" option.
Add option to specify toolsversion from the command line,
to the man page.
2010-09-01 15:34:14 -06:00
Ankit Jain 0013378bfa [xbuild] Unsubscribe events on ConsoleLogger.Shutdown ()
Reported by Lluis Sanchez.
2010-09-01 15:34:03 -06:00
Geoff Norton 0e5aff05c4 Fix build of mono-basic on ppc64
OP_BREAK can take up to 40 bytes on ppc64
2010-09-01 12:15:25 -06:00
Jonathan Pryor 38a79cb7b8 [mdoc-update] Only check for duplicate elements, not duplicate nodes.
The duplicate-element checking algorithm wasn't restricted to just elements;
consequently, an 'invalid token' exception was generated from XPath because we
were trying to call XmlNode.SelectNodes("#text"), and '#' isn't valid.  Oops.

Fixes building gendarme from mono-tools.
2010-09-01 09:12:12 -06:00
Andrew Jorgensen fc767570a8 Version 2.8 2010-08-31 16:38:26 -06:00
18 changed files with 2068 additions and 47 deletions

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,2.8.1)
AM_INIT_AUTOMAKE(mono,2.8)
AM_MAINTAINER_MODE
API_VER=2.0
File diff suppressed because it is too large. Load diff
+2
View File
@@ -4,9 +4,11 @@ monodir = $(sysconfdir)/mono/4.0
EXTRA_DIST = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx \
settings.map
mono_DATA = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx \
settings.map
+3
View File
@@ -50,6 +50,7 @@
#define g_hash_table_new_full monoeg_g_hash_table_new_full
#define g_hash_table_remove monoeg_g_hash_table_remove
#define g_hash_table_size monoeg_g_hash_table_size
#define g_hash_table_print_stats monoeg_g_hash_table_print_stats
#define g_int_equal monoeg_g_int_equal
#define g_int_hash monoeg_g_int_hash
#define g_list_alloc monoeg_g_list_alloc
@@ -99,6 +100,7 @@
#define g_pattern_spec_new monoeg_g_pattern_spec_new
#define g_print monoeg_g_print
#define g_printf monoeg_g_printf
#define g_printerr monoeg_g_printerr
#define g_propagate_error monoeg_g_propagate_error
#define g_ptr_array_add monoeg_g_ptr_array_add
#define g_ptr_array_foreach monoeg_g_ptr_array_foreach
@@ -166,6 +168,7 @@
#define g_strerror monoeg_g_strerror
#define g_strescape monoeg_g_strescape
#define g_strfreev monoeg_g_strfreev
#define g_strdupv monoeg_g_strdupv
#define g_string_append monoeg_g_string_append
#define g_string_append_c monoeg_g_string_append_c
#define g_string_append_len monoeg_g_string_append_len
+17 -9
View File
@@ -33,7 +33,6 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
{
gchar *ptr;
gchar c;
gboolean in_quote = FALSE;
gboolean escaped = FALSE;
gchar quote_char = '\0';
GString *str;
@@ -42,18 +41,28 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
ptr = (gchar *) cmdline;
while ((c = *ptr++) != '\0') {
if (escaped) {
escaped = FALSE;
if (!g_ascii_isspace (c))
/*
* \CHAR is only special inside a double quote if CHAR is
* one of: $`"\ and newline
*/
if (quote_char == '\"'){
if (!(c == '$' || c == '`' || c == '"' || c == '\\'))
g_string_append_c (str, '\\');
g_string_append_c (str, c);
} else if (in_quote) {
} else {
if (!g_ascii_isspace (c))
g_string_append_c (str, c);
}
escaped = FALSE;
} else if (quote_char) {
if (c == quote_char) {
in_quote = FALSE;
quote_char = '\0';
g_ptr_array_add (array, g_string_free (str, FALSE));
str = g_string_new ("");
} else {
} else if (c == '\\'){
escaped = TRUE;
} else
g_string_append_c (str, c);
}
} else if (g_ascii_isspace (c)) {
if (str->len > 0) {
g_ptr_array_add (array, g_string_free (str, FALSE));
@@ -62,7 +71,6 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
} else if (c == '\\') {
escaped = TRUE;
} else if (c == '\'' || c == '"') {
in_quote = TRUE;
quote_char = c;
} else {
g_string_append_c (str, c);
@@ -76,7 +84,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
return -1;
}
if (in_quote) {
if (quote_char) {
if (error)
*error = g_error_new (G_LOG_DOMAIN, 0, "Unfinished quote.");
g_string_free (str, TRUE);
+34
View File
@@ -226,6 +226,39 @@ test_shell_argv3 ()
return OK;
}
// This was the 2.8 showstopper error
RESULT
test_shell_argv4 ()
{
GError *error;
gint argc;
gchar **argv;
gboolean ret;
char *str = "'/usr/bin/gnome-terminal' -e \"bash -c 'read -p \\\"Press any key to continue...\\\" -n1;'\"";
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv (str, &argc, &argv, &error);
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 3)
return FAILED ("2. argc was %d", argc);
if (argv == NULL)
return FAILED ("3. argv[0] was NULL");
if (error != NULL)
return FAILED ("4. error was set");
if (strcmp (argv [0], "/usr/bin/gnome-terminal"))
return FAILED ("5. Expected /usr/bin/gnome-terminal got %s", argv [0]);
if (strcmp (argv [1], "-e"))
return FAILED ("6. Expected -e, got: %s", argv [1]);
if (strcmp (argv [2], "bash -c 'read -p \"Press any key to continue...\" -n1;'"))
return FAILED ("7. Got unexpected result: %s\n", argv [2]);
return OK;
}
RESULT
test_quote ()
{
@@ -244,6 +277,7 @@ static Test shell_tests [] = {
{"g_shell_parse_argv1", test_shell_argv1},
{"g_shell_parse_argv2", test_shell_argv2},
{"g_shell_parse_argv3", test_shell_argv3},
{"g_shell_parse_argv4", test_shell_argv4},
{"g_shell_quote", test_quote},
{NULL, NULL}
};
+9
View File
@@ -23,6 +23,15 @@ Set or override project properties
.B \//logger:<logger>
Custom logger to log build events
.TP
.B \//toolsversion:version , /tv:version
Specify the toolset version to use.
Eg. /tv:4.0
This would cause 4.0 version of the Microsoft.Common.targets (among others) to be used. This overrides
the value specified in a project file.
Valid values: 2.0, 3.0, 3.5 and 4.0
.TP
.B \//verbosity:<level>
Logger verbosity level : quiet, minimal, normal, detailed, diagnostic
.TP
@@ -55,6 +55,7 @@ namespace Microsoft.Build.BuildEngine {
ConsoleColor errorColor, warningColor, eventColor, messageColor, highMessageColor;
ColorSetter colorSet;
ColorResetter colorReset;
IEventSource eventSource;
bool no_message_color, use_colors;
bool noItemAndPropertyList;
@@ -202,6 +203,8 @@ namespace Microsoft.Build.BuildEngine {
public virtual void Initialize (IEventSource eventSource)
{
this.eventSource = eventSource;
eventSource.BuildStarted += new BuildStartedEventHandler (BuildStartedHandler);
eventSource.BuildFinished += new BuildFinishedEventHandler (BuildFinishedHandler);
eventSource.ProjectStarted += new ProjectStartedEventHandler (ProjectStartedHandler);
@@ -574,6 +577,20 @@ namespace Microsoft.Build.BuildEngine {
public virtual void Shutdown ()
{
if (eventSource == null)
return;
eventSource.BuildStarted -= BuildStartedHandler;
eventSource.BuildFinished -= BuildFinishedHandler;
eventSource.ProjectStarted -= ProjectStartedHandler;
eventSource.ProjectFinished -= ProjectFinishedHandler;
eventSource.TargetStarted -= TargetStartedHandler;
eventSource.TargetFinished -= TargetFinishedHandler;
eventSource.TaskStarted -= TaskStartedHandler;
eventSource.TaskFinished -= TaskFinishedHandler;
eventSource.MessageRaised -= MessageHandler;
eventSource.WarningRaised -= WarningHandler;
eventSource.ErrorRaised -= ErrorHandler;
}
static bool InEmacs = Environment.GetEnvironmentVariable ("EMACS") == "t";
@@ -143,7 +143,7 @@ namespace System.Web.UI.WebControls
int r = new Random ().Next (total_imp);
foreach (Hashtable a in ads) {
if (keywordFilterEmpty && KeywordFilter != (string) a ["Keyword"])
if (!keywordFilterEmpty && KeywordFilter != (string) a ["Keyword"])
continue;
cur_imp += a ["Impressions"] != null ? int.Parse ((string) a ["Impressions"]) : 1;
@@ -821,6 +821,8 @@ namespace System.Web.UI
uniqueID = null;
#if NET_4_0
ClearCachedClientID ();
#else
clientID = null;
#endif
if (!HasControls ())
return;
+2 -2
View File
@@ -134,10 +134,10 @@ namespace Mono.Http
return null;
lock (cache) {
NtlmSession ds = (NtlmSession) cache [request.RequestUri];
NtlmSession ds = (NtlmSession) cache [request];
if (ds == null) {
ds = new NtlmSession ();
cache.Add (request.RequestUri, ds);
cache.Add (request, ds);
}
return ds.Authenticate (header, webRequest, credentials);
+44 -19
View File
@@ -96,14 +96,20 @@ namespace System.Net
bool getResponseCalled;
Exception saved_exc;
object locker = new object ();
bool is_ntlm_auth;
bool finished_reading;
internal WebConnection WebConnection;
DecompressionMethods auto_decomp;
int maxResponseHeadersLength;
static int defaultMaxResponseHeadersLength;
int readWriteTimeout = 300000; // ms
enum NtlmAuthState {
None,
Challenge,
Response
}
NtlmAuthState ntlm_auth_state;
// Constructors
static HttpWebRequest ()
{
@@ -160,10 +166,6 @@ namespace System.Net
// Properties
internal bool UsesNtlmAuthentication {
get { return is_ntlm_auth; }
}
public string Accept {
get { return webHeaders ["Accept"]; }
set {
@@ -960,10 +962,17 @@ namespace System.Net
webHeaders.RemoveAndAdd ("Transfer-Encoding", "chunked");
webHeaders.RemoveInternal ("Content-Length");
} else if (contentLength != -1) {
if (contentLength > 0)
continue100 = true;
webHeaders.SetInternal ("Content-Length", contentLength.ToString ());
if (ntlm_auth_state != NtlmAuthState.Challenge) {
if (contentLength > 0)
continue100 = true;
webHeaders.SetInternal ("Content-Length", contentLength.ToString ());
} else {
webHeaders.SetInternal ("Content-Length", "0");
}
webHeaders.RemoveInternal ("Transfer-Encoding");
} else {
webHeaders.RemoveInternal ("Content-Length");
}
if (actualVersion == HttpVersion.Version11 && continue100 &&
@@ -1107,9 +1116,11 @@ namespace System.Net
if (bodyBuffer != null) {
// The body has been written and buffered. The request "user"
// won't write it again, so we must do it.
writeStream.Write (bodyBuffer, 0, bodyBufferLength);
bodyBuffer = null;
writeStream.Close ();
if (ntlm_auth_state != NtlmAuthState.Challenge) {
writeStream.Write (bodyBuffer, 0, bodyBufferLength);
bodyBuffer = null;
writeStream.Close ();
}
} else if (method != "HEAD" && method != "GET" && method != "MKCOL" && method != "CONNECT" &&
method != "TRACE") {
if (getResponseCalled && !writeStream.RequestWritten)
@@ -1185,6 +1196,7 @@ namespace System.Net
}
}
r.Reset ();
finished_reading = false;
haveResponse = false;
webResponse.ReadAll ();
webResponse = null;
@@ -1237,7 +1249,7 @@ namespace System.Net
try {
redirected = CheckFinalStatus (r);
if (!redirected) {
if (is_ntlm_auth && authCompleted && webResponse != null
if (ntlm_auth_state != NtlmAuthState.None && authCompleted && webResponse != null
&& (int)webResponse.StatusCode < 400) {
WebConnectionStream wce = webResponse.GetResponseStream () as WebConnectionStream;
if (wce != null) {
@@ -1256,7 +1268,7 @@ namespace System.Net
r.DoCallback ();
} else {
if (webResponse != null) {
if (is_ntlm_auth) {
if (ntlm_auth_state != NtlmAuthState.None) {
HandleNtlmAuth (r);
return;
}
@@ -1316,18 +1328,21 @@ namespace System.Net
return false;
webHeaders [(isProxy) ? "Proxy-Authorization" : "Authorization"] = auth.Message;
authCompleted = auth.Complete;
is_ntlm_auth = (auth.Module.AuthenticationType == "NTLM");
bool is_ntlm = (auth.Module.AuthenticationType == "NTLM");
if (is_ntlm)
ntlm_auth_state = (NtlmAuthState)((int) ntlm_auth_state + 1);
return true;
}
// Returns true if redirected
bool CheckFinalStatus (WebAsyncResult result)
{
if (result.GotException)
if (result.GotException) {
bodyBuffer = null;
throw result.Exception;
}
Exception throwMe = result.Exception;
bodyBuffer = null;
HttpWebResponse resp = result.Response;
WebExceptionStatus protoError = WebExceptionStatus.ProtocolError;
@@ -1339,10 +1354,17 @@ namespace System.Net
if (!usedPreAuth && CheckAuthorization (webResponse, code)) {
// Keep the written body, so it can be rewritten in the retry
if (InternalAllowBuffering) {
bodyBuffer = writeStream.WriteBuffer;
bodyBufferLength = writeStream.WriteBufferLength;
// NTLM: This is to avoid sending data in the 'challenge' request
// We save it in the first request (first 401), don't send anything
// in the challenge request and send it in the response request along
// with the buffers kept form the first request.
if (ntlm_auth_state != NtlmAuthState.Response) {
bodyBuffer = writeStream.WriteBuffer;
bodyBufferLength = writeStream.WriteBufferLength;
}
return true;
} else if (method != "PUT" && method != "POST") {
bodyBuffer = null;
return true;
}
@@ -1350,6 +1372,7 @@ namespace System.Net
writeStream = null;
webResponse.Close ();
webResponse = null;
bodyBuffer = null;
throw new WebException ("This request requires buffering " +
"of data for authentication or " +
@@ -1357,6 +1380,7 @@ namespace System.Net
}
}
bodyBuffer = null;
if ((int) code >= 400) {
string err = String.Format ("The remote server returned an error: ({0}) {1}.",
(int) code, webResponse.StatusDescription);
@@ -1373,6 +1397,7 @@ namespace System.Net
}
}
bodyBuffer = null;
if (throwMe == null) {
bool b = false;
int c = (int) code;
@@ -1046,6 +1046,8 @@ namespace System.Net
socket = null;
}
if (ntlm_authenticated)
ResetNtlm ();
busy = false;
Data = new WebConnectionData ();
if (sendNext)
@@ -1973,15 +1973,12 @@ class MDocUpdater : MDocCommand
break;
}
default: {
bool dup = false;
foreach (XmlElement n in e.SelectNodes (child.Name))
if (n.OuterXml == child.OuterXml) {
dup = true;
break;
}
if (!dup) {
bool add = true;
if (child.NodeType == XmlNodeType.Element &&
e.SelectNodes (child.Name).Cast<XmlElement>().Any (n => n.OuterXml == child.OuterXml))
add = false;
if (add)
CopyNode (child, e);
}
break;
}
}
+17 -4
View File
@@ -51,6 +51,9 @@ Conflicts: f-spot < 0.4
Conflicts: helix-banshee < 1.0
Conflicts: mono-addins < 0.3.1
Recommends: libgdiplus0 >= 2.6
%if %llvm == yes
Recommends: libmono-llvm0 = %{version}-%{release}
%endif
Provides: mono(Commons.Xml.Relaxng) = 1.0.5000.0
Provides: mono(CustomMarshalers) = 1.0.5000.0
Provides: mono(I18N) = 1.0.5000.0
@@ -67,6 +70,7 @@ Provides: mono(System.Security) = 1.0.5000.0
Provides: mono(System.Xml) = 1.0.5000.0
Provides: mono(mscorlib) = 1.0.5000.0
%define _use_internal_dependency_generator 0
%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | prefix=%{buildroot}%{_prefix} %{buildroot}%{_bindir}/mono-find-provides ; } | sort | uniq'
%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | prefix=%{buildroot}%{_prefix} %{buildroot}%{_bindir}/mono-find-requires ; } | sort | uniq'
@@ -428,7 +432,6 @@ Obsoletes: mono-novell-directory
Provides: mono-directory
Provides: mono-ms-enterprise
Provides: mono-novell-directory
Provides: mono(Mono.Data) = 1.0.5000.0
Provides: mono(Mono.Data.Tds) = 1.0.5000.0
Provides: mono(Novell.Directory.Ldap) = 1.0.5000.0
Provides: mono(System.Data) = 1.0.5000.0
@@ -724,6 +727,7 @@ Mono implementation of ASP.NET, Remoting and Web Services.
%config %_sysconfdir/mono/2.0/Browsers
%config %_sysconfdir/mono/2.0/DefaultWsdlHelpGenerator.aspx
%config %_sysconfdir/mono/2.0/web.config
%config %_sysconfdir/mono/4.0/DefaultWsdlHelpGenerator.aspx
%config %_sysconfdir/mono/4.0/web.config
%config %_sysconfdir/mono/browscap.ini
%config %_sysconfdir/mono/mconfig/config.xml
@@ -1098,6 +1102,7 @@ License: LGPL v2.1 only
Summary: Monodoc - Documentation tools for C# code
Group: Development/Tools/Other
Obsoletes: monodoc
Provides: monodoc
# Added to uncompress and compare documentation used by build-compare
Requires: unzip
@@ -1140,15 +1145,21 @@ Monodoc-core contains documentation tools for C#.
License: LGPL v2.1 only
Summary: Install everything built from the mono source tree
Group: Development/Languages/Mono
Requires: bytefx-data-mysql = %version-%release
Requires: ibm-data-db2 = %version-%release
Requires: libmono-2_0-1 = %version-%release
Requires: libmono-2_0-devel = %version-%release
%if %llvm == yes
Requires: libmono-llvm0 = %version-%release
%endif
%if %sgen == yes
Requires: libmonosgen-2_0-0 = %version-%release
Requires: libmonosgen-2_0-devel = %version-%release
%endif
Requires: mono-core = %version-%release
Requires: mono-data = %version-%release
Requires: mono-data-firebird = %version-%release
Requires: mono-data-oracle = %version-%release
Requires: mono-data-postgresql = %version-%release
Requires: mono-data-sqlite = %version-%release
Requires: mono-data-sybase = %version-%release
Requires: mono-devel = %version-%release
Requires: mono-extras = %version-%release
Requires: mono-locale-extras = %version-%release
@@ -1156,6 +1167,8 @@ Requires: mono-nunit = %version-%release
Requires: mono-wcf = %version-%release
Requires: mono-web = %version-%release
Requires: mono-winforms = %version-%release
Requires: mono-winfxcore = %version-%release
Requires: monodoc-core = %version-%release
%description -n mono-complete
The Mono Project is an open development initiative that is working to
+6
View File
@@ -2797,6 +2797,12 @@ Wed Jan 13 15:54:53 CET 2010 Paolo Molaro <[email protected]>
* tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix the LLVM support
by merging the LLVM and !MAP_32BIT cases.
2009-12-14 Geoff Norton <[email protected]>
* debugger-agent.c: The end_runtime_invoke guard isn't working on
AMD64 as __builtin_frame_address (1) returns NULL. Disable the
behaviour by default, and make it runtime configurable.
2009-12-13 Jonathan Chambers <[email protected]>
* debugger-agent.c (mono_debugger_agent_thread_interrupt): Handle a NULL
+1 -1
View File
@@ -48,7 +48,7 @@
memory_barrier: len:4
nop: len:4
relaxed_nop: len:4
break: len:4
break: len:40
seq_point: len:48
jmp: len:96
call: dest:a clob:c len:36
+9 -2
View File
@@ -103,6 +103,7 @@ typedef struct {
GSList *onthrow;
int timeout;
char *launch;
gboolean embedding;
} AgentConfig;
typedef struct
@@ -232,7 +233,7 @@ typedef struct {
#define HEADER_LENGTH 11
#define MAJOR_VERSION 2
#define MINOR_VERSION 1
#define MINOR_VERSION 2
typedef enum {
CMD_SET_VM = 1,
@@ -534,6 +535,8 @@ static HANDLE debugger_thread_handle;
static int log_level;
static gboolean embedding;
static FILE *log_file;
/* Classes whose class load event has been sent */
@@ -727,6 +730,8 @@ mono_debugger_agent_parse_options (char *options)
agent_config.timeout = atoi (arg + 8);
} else if (strncmp (arg, "launch=", 7) == 0) {
agent_config.launch = g_strdup (arg + 7);
} else if (strncmp (arg, "embedding=", 10) == 0) {
agent_config.embedding = atoi (arg + 10) == 1;
} else {
print_usage ();
exit (1);
@@ -794,6 +799,8 @@ mono_debugger_agent_init (void)
log_level = agent_config.log_level;
embedding = agent_config.embedding;
if (agent_config.log_file) {
log_file = fopen (agent_config.log_file, "w+");
if (!log_file) {
@@ -3000,7 +3007,7 @@ end_runtime_invoke (MonoProfiler *prof, MonoMethod *method)
gpointer stackptr = __builtin_frame_address (1);
#endif
if (ss_req == NULL || stackptr != ss_invoke_addr || ss_req->thread != mono_thread_internal_current ())
if (!embedding || ss_req == NULL || stackptr != ss_invoke_addr || ss_req->thread != mono_thread_internal_current ())
return;
/*