Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bingbingbingbing
mono
提交
d5e6d7a0
M
mono
项目概览
bingbingbingbing
/
mono
与 Fork 源项目一致
从无法访问的项目Fork
通知
35
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mono
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d5e6d7a0
编写于
12月 08, 2010
作者:
L
Levi Bard
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'Mono2.6.x-Unity3.0-debugger-attach' into Mono2.6.x-Unity3.x
上级
e36399ee
37ea70e6
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
412 addition
and
135 deletion
+412
-135
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
...class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+2
-1
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
...s/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
+5
-2
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
...Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
+71
-3
mono/mini/debugger-agent.c
mono/mini/debugger-agent.c
+334
-129
未找到文件。
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
浏览文件 @
d5e6d7a0
...
...
@@ -937,7 +937,7 @@ namespace Mono.Debugger.Soft
bool
disconnected
;
void
receiver_thread_main
()
{
while
(
true
)
{
while
(
!
closed
)
{
try
{
bool
res
=
ReceivePacket
();
if
(!
res
)
...
...
@@ -951,6 +951,7 @@ namespace Mono.Debugger.Soft
lock
(
reply_packets_monitor
)
{
disconnected
=
true
;
Monitor
.
PulseAll
(
reply_packets_monitor
);
socket
.
Close
();
}
EventHandler
.
VMDisconnect
(
0
,
0
,
null
);
}
...
...
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
浏览文件 @
d5e6d7a0
...
...
@@ -109,7 +109,6 @@ namespace Mono.Debugger.Soft
public
void
Dispose
()
{
conn
.
VM_Dispose
();
conn
.
Close
();
notify_vm_event
(
EventType
.
VMDisconnect
,
0
,
0
,
null
);
}
public
IList
<
ThreadMirror
>
GetThreads
()
{
...
...
@@ -185,7 +184,11 @@ namespace Mono.Debugger.Soft
public
void
ClearAllBreakpoints
()
{
conn
.
ClearAllBreakpoints
();
}
public
void
Disconnect
()
{
conn
.
Close
();
}
internal
void
queue_event
(
Event
e
)
{
lock
(
queue_monitor
)
{
queue
.
Enqueue
(
e
);
...
...
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
浏览文件 @
d5e6d7a0
...
...
@@ -33,6 +33,7 @@ namespace Mono.Debugger.Soft
{
private
delegate
VirtualMachine
LaunchCallback
(
ITargetProcess
p
,
ProcessStartInfo
info
,
Socket
socket
);
private
delegate
VirtualMachine
ListenCallback
(
Socket
dbg_sock
,
Socket
con_sock
);
private
delegate
VirtualMachine
ConnectCallback
(
Socket
dbg_sock
,
Socket
con_sock
,
IPEndPoint
dbg_ep
,
IPEndPoint
con_ep
);
internal
VirtualMachineManager
()
{
}
...
...
@@ -220,21 +221,88 @@ namespace Mono.Debugger.Soft
* Connect to a virtual machine listening at the specified address.
*/
public
static
VirtualMachine
Connect
(
IPEndPoint
endpoint
)
{
return
Connect
(
endpoint
,
null
);
}
public
static
VirtualMachine
Connect
(
IPEndPoint
endpoint
,
IPEndPoint
consoleEndpoint
)
{
if
(
endpoint
==
null
)
throw
new
ArgumentNullException
(
"endpoint"
);
Socket
socket
=
new
Socket
(
AddressFamily
.
InterNetwork
,
SocketType
.
Stream
,
ProtocolType
.
Tcp
);
socket
.
Connect
(
endpoint
);
return
EndConnect
(
BeginConnect
(
endpoint
,
consoleEndpoint
,
null
)
);
}
Connection
conn
=
new
Connection
(
socket
);
public
static
VirtualMachine
ConnectInternal
(
Socket
dbg_sock
,
Socket
con_sock
,
IPEndPoint
dbg_ep
,
IPEndPoint
con_ep
)
{
if
(
con_sock
!=
null
)
{
try
{
con_sock
.
Connect
(
con_ep
);
}
catch
(
Exception
)
{
try
{
dbg_sock
.
Close
();
}
catch
{}
throw
;
}
}
try
{
dbg_sock
.
Connect
(
dbg_ep
);
}
catch
(
Exception
)
{
if
(
con_sock
!=
null
)
{
try
{
con_sock
.
Close
();
}
catch
{}
}
throw
;
}
Connection
conn
=
new
Connection
(
dbg_sock
);
VirtualMachine
vm
=
new
VirtualMachine
(
null
,
conn
);
if
(
con_sock
!=
null
)
{
vm
.
StandardOutput
=
new
StreamReader
(
new
NetworkStream
(
con_sock
));
vm
.
StandardError
=
null
;
}
conn
.
EventHandler
=
new
EventHandler
(
vm
);
vm
.
connect
();
return
vm
;
}
public
static
IAsyncResult
BeginConnect
(
IPEndPoint
dbg_ep
,
AsyncCallback
callback
)
{
return
BeginConnect
(
dbg_ep
,
null
,
callback
);
}
public
static
IAsyncResult
BeginConnect
(
IPEndPoint
dbg_ep
,
IPEndPoint
con_ep
,
AsyncCallback
callback
)
{
Socket
dbg_sock
=
null
;
Socket
con_sock
=
null
;
dbg_sock
=
new
Socket
(
AddressFamily
.
InterNetwork
,
SocketType
.
Stream
,
ProtocolType
.
Tcp
);
if
(
con_ep
!=
null
)
{
con_sock
=
new
Socket
(
AddressFamily
.
InterNetwork
,
SocketType
.
Stream
,
ProtocolType
.
Tcp
);
}
ConnectCallback
c
=
new
ConnectCallback
(
ConnectInternal
);
return
c
.
BeginInvoke
(
dbg_sock
,
con_sock
,
dbg_ep
,
con_ep
,
callback
,
con_sock
??
dbg_sock
);
}
public
static
VirtualMachine
EndConnect
(
IAsyncResult
asyncResult
)
{
if
(
asyncResult
==
null
)
throw
new
ArgumentNullException
(
"asyncResult"
);
if
(!
asyncResult
.
IsCompleted
)
asyncResult
.
AsyncWaitHandle
.
WaitOne
();
AsyncResult
async
=
(
AsyncResult
)
asyncResult
;
ConnectCallback
cb
=
(
ConnectCallback
)
async
.
AsyncDelegate
;
return
cb
.
EndInvoke
(
asyncResult
);
}
public
static
void
CancelConnection
(
IAsyncResult
asyncResult
)
{
((
Socket
)
asyncResult
.
AsyncState
).
Close
();
}
}
}
mono/mini/debugger-agent.c
浏览文件 @
d5e6d7a0
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录