Author: martin
Date: 2006-06-12 09:53:17 -0400 (Mon, 12 Jun 2006)
New Revision: 61626
Modified:
trunk/debugger/ChangeLog
trunk/debugger/arch/DwarfReader.cs
trunk/debugger/classes/Method.cs
trunk/debugger/classes/StackFrame.cs
trunk/debugger/frontend/Expression.cs
trunk/debugger/languages/TargetVariable.cs
trunk/debugger/languages/mono/MonoVariable.cs
Log:
2006-06-12 Martin Baulig <[EMAIL PROTECTED]>
* classes/TargetVariable.cs
(TargetVariable.IsInScope): New public abstract method.
* classes/Method.cs
(Method.GetVariableByName): Added `TargetAddress address' argument
and check whether the variable is actually in scope.
* classes/StackFrame.cs
(StackFrame.Locals): Use `local.IsInScope()' rather than
`local.IsAlive()'.
Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog 2006-06-12 12:53:29 UTC (rev 61625)
+++ trunk/debugger/ChangeLog 2006-06-12 13:53:17 UTC (rev 61626)
@@ -1,5 +1,18 @@
2006-06-12 Martin Baulig <[EMAIL PROTECTED]>
+ * classes/TargetVariable.cs
+ (TargetVariable.IsInScope): New public abstract method.
+
+ * classes/Method.cs
+ (Method.GetVariableByName): Added `TargetAddress address' argument
+ and check whether the variable is actually in scope.
+
+ * classes/StackFrame.cs
+ (StackFrame.Locals): Use `local.IsInScope()' rather than
+ `local.IsAlive()'.
+
+2006-06-12 Martin Baulig <[EMAIL PROTECTED]>
+
* backends/SingleSteppingEngine.cs
(OperationRuntimeInvoke.DoProcessEvent): Also push the rti frame
if we hit a breakpoint at the invoke method.
Modified: trunk/debugger/arch/DwarfReader.cs
===================================================================
--- trunk/debugger/arch/DwarfReader.cs 2006-06-12 12:53:29 UTC (rev 61625)
+++ trunk/debugger/arch/DwarfReader.cs 2006-06-12 13:53:17 UTC (rev 61626)
@@ -2670,6 +2670,11 @@
get { return type; }
}
+ public override bool IsInScope (TargetAddress address)
+ {
+ return true;
+ }
+
public override bool IsAlive (TargetAddress address)
{
return true;
Modified: trunk/debugger/classes/Method.cs
===================================================================
--- trunk/debugger/classes/Method.cs 2006-06-12 12:53:29 UTC (rev 61625)
+++ trunk/debugger/classes/Method.cs 2006-06-12 13:53:17 UTC (rev 61626)
@@ -273,10 +273,10 @@
internal abstract SourceMethod GetTrampoline
(TargetMemoryAccess memory,
TargetAddress
address);
- public TargetVariable GetVariableByName (string name)
+ public TargetVariable GetVariableByName (TargetAddress address,
string name)
{
foreach (TargetVariable var in Locals) {
- if (var.Name == name)
+ if ((var.Name == name) && var.IsInScope
(address))
return var;
}
Modified: trunk/debugger/classes/StackFrame.cs
===================================================================
--- trunk/debugger/classes/StackFrame.cs 2006-06-12 12:53:29 UTC (rev
61625)
+++ trunk/debugger/classes/StackFrame.cs 2006-06-12 13:53:17 UTC (rev
61626)
@@ -283,7 +283,7 @@
get {
ArrayList list = new ArrayList ();
foreach (TargetVariable local in Method.Locals)
{
- if (local.IsAlive (TargetAddress))
+ if (local.IsInScope (TargetAddress))
list.Add (local);
}
TargetVariable[] retval = new TargetVariable
[list.Count];
Modified: trunk/debugger/frontend/Expression.cs
===================================================================
--- trunk/debugger/frontend/Expression.cs 2006-06-12 12:53:29 UTC (rev
61625)
+++ trunk/debugger/frontend/Expression.cs 2006-06-12 13:53:17 UTC (rev
61626)
@@ -746,7 +746,8 @@
{
StackFrame frame = context.CurrentFrame;
if (frame.Method != null) {
- TargetVariable var =
frame.Method.GetVariableByName (name);
+ TargetVariable var =
frame.Method.GetVariableByName (
+ frame.TargetAddress, name);
if (var != null)
return new VariableAccessExpression
(var);
}
Modified: trunk/debugger/languages/TargetVariable.cs
===================================================================
--- trunk/debugger/languages/TargetVariable.cs 2006-06-12 12:53:29 UTC (rev
61625)
+++ trunk/debugger/languages/TargetVariable.cs 2006-06-12 13:53:17 UTC (rev
61626)
@@ -16,6 +16,12 @@
}
// <summary>
+ // Checks whether the variable is accessible in the lexical
scope around
+ // address @address, but without actually trying to access
the variable.
+ // </summary>
+ public abstract bool IsInScope (TargetAddress address);
+
+ // <summary>
// Checks whether the variable is alive at @address, but
without actually
// trying to access the variable. The implementation just
checks the data
// from the symbol file and - if appropriate - from the JIT
to find out
Modified: trunk/debugger/languages/mono/MonoVariable.cs
===================================================================
--- trunk/debugger/languages/mono/MonoVariable.cs 2006-06-12 12:53:29 UTC
(rev 61625)
+++ trunk/debugger/languages/mono/MonoVariable.cs 2006-06-12 13:53:17 UTC
(rev 61626)
@@ -52,6 +52,9 @@
this.info = info;
this.is_byref = is_byref;
+ start_scope = method.StartAddress;
+ end_scope = method.EndAddress;
+
if (info.HasLivenessInfo) {
start_liveness = method.StartAddress +
info.BeginLiveness;
end_liveness = method.StartAddress +
info.EndLiveness;
@@ -92,6 +95,11 @@
return null;
}
+ public override bool IsInScope (TargetAddress address)
+ {
+ return (address >= start_scope) && (address <=
end_scope);
+ }
+
public override bool IsAlive (TargetAddress address)
{
return (address >= start_liveness) && (address <=
end_liveness);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches