Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions man/mono.1
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ host/port configured with the \fBaddress\fR option. If you set it to 'y', it
instructs the Mono runtime to start debugging in server mode, where Mono
actively waits for the debugger front end to connect to the Mono process.
Mono will print out to stdout the IP address and port where it is listening.
.TP
.I suspend=[y/n]
Defaults to yes, with the default option Mono will suspend the vm on startup
until it connects successfully to a debugger front end. If you set it to 'n', in
conjunction with \fBserver=y\fR, it instructs the Mono runtime to run as normal,
while caching metadata to send to the debugger front end on connection.
.ne
.RE
.TP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ public bool IsClosed {
bool disconnected;

void receiver_thread_main () {
while (true) {
while (!closed) {
try {
bool res = ReceivePacket ();
if (!res)
Expand All @@ -1057,6 +1057,7 @@ void receiver_thread_main () {
lock (reply_packets_monitor) {
disconnected = true;
Monitor.PulseAll (reply_packets_monitor);
socket.Close ();
}
EventHandler.VMDisconnect (0, 0, null);
}
Expand Down Expand Up @@ -1205,6 +1206,9 @@ int Send (CommandSet command_set, int command, PacketWriter packet, Action<Packe
PacketReader SendReceive (CommandSet command_set, int command, PacketWriter packet) {
int id = IdGenerator;

if (disconnected)
throw new VMDisconnectedException ();

if (packet == null)
WritePacket (EncodePacket (id, (int)command_set, command, null, 0));
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,11 @@ public BreakpointEventRequest SetBreakpoint (MethodMirror method, long il_offset
public void ClearAllBreakpoints () {
conn.ClearAllBreakpoints ();
}


public void Disconnect () {
conn.Close ();
}

internal void queue_event_set (EventSet es) {
lock (queue_monitor) {
queue.Enqueue (es);
Expand Down
Loading