Author: martin
Date: 2006-07-06 04:13:15 -0400 (Thu, 06 Jul 2006)
New Revision: 62299
Modified:
trunk/debugger/ChangeLog
trunk/debugger/arch/Architecture_I386.cs
trunk/debugger/arch/Architecture_X86_64.cs
Log:
2006-07-06 Martin Baulig <[EMAIL PROTECTED]>
* arch/Architecture_I386.cs
(Architecture_I386.IsSyscallInstruction): Correctly implement
this; also protect with try/catch.
* arch/Architecture_X86_64.cs
(Architecture_X86_64.IsSyscallInstruction): Protect with try/catch.
Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog 2006-07-06 08:02:00 UTC (rev 62298)
+++ trunk/debugger/ChangeLog 2006-07-06 08:13:15 UTC (rev 62299)
@@ -1,5 +1,14 @@
2006-07-06 Martin Baulig <[EMAIL PROTECTED]>
+ * arch/Architecture_I386.cs
+ (Architecture_I386.IsSyscallInstruction): Correctly implement
+ this; also protect with try/catch.
+
+ * arch/Architecture_X86_64.cs
+ (Architecture_X86_64.IsSyscallInstruction): Protect with try/catch.
+
+2006-07-06 Martin Baulig <[EMAIL PROTECTED]>
+
* backends/SingleSteppingEngine.cs
(OperationFinish.IsSourceOperation): Set to `!Native'.
Modified: trunk/debugger/arch/Architecture_I386.cs
===================================================================
--- trunk/debugger/arch/Architecture_I386.cs 2006-07-06 08:02:00 UTC (rev
62298)
+++ trunk/debugger/arch/Architecture_I386.cs 2006-07-06 08:13:15 UTC (rev
62299)
@@ -44,8 +44,16 @@
internal override bool IsSyscallInstruction (TargetMemoryAccess
memory,
TargetAddress
address)
{
- return (memory.ReadByte (address - 2) == 0x0f) &&
- (memory.ReadByte (address - 1) == 0x05);
+ try {
+ return ((memory.ReadByte (address - 2) == 0x0f)
&&
+ (memory.ReadByte (address - 1) ==
0x05)) ||
+ ((memory.ReadByte (address - 2) ==
0xeb) &&
+ (memory.ReadByte (address - 1) ==
0xf3) &&
+ (memory.ReadByte (address - 11) ==
0x0f) &&
+ (memory.ReadByte (address - 10) ==
0x34));
+ } catch {
+ return false;
+ }
}
internal override TargetAddress GetCallTarget
(TargetMemoryAccess target,
Modified: trunk/debugger/arch/Architecture_X86_64.cs
===================================================================
--- trunk/debugger/arch/Architecture_X86_64.cs 2006-07-06 08:02:00 UTC (rev
62298)
+++ trunk/debugger/arch/Architecture_X86_64.cs 2006-07-06 08:13:15 UTC (rev
62299)
@@ -55,8 +55,12 @@
internal override bool IsSyscallInstruction (TargetMemoryAccess
memory,
TargetAddress
address)
{
- return (memory.ReadByte (address - 2) == 0x0f) &&
- (memory.ReadByte (address - 1) == 0x05);
+ try {
+ return (memory.ReadByte (address - 2) == 0x0f)
&&
+ (memory.ReadByte (address - 1) == 0x05);
+ } catch {
+ return false;
+ }
}
internal override TargetAddress GetCallTarget
(TargetMemoryAccess target,
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches