Author: martin
Date: 2007-05-23 08:36:09 -0400 (Wed, 23 May 2007)
New Revision: 77830
Modified:
trunk/debugger/ChangeLog
trunk/debugger/classes/SourceLocation.cs
trunk/debugger/frontend/Command.cs
trunk/debugger/languages/mono/MonoClassType.cs
Log:
2007-05-23 Martin Baulig <[EMAIL PROTECTED]>
* frontend/Command.cs
(SourceCommand.FindFile): Don't do a method lookup here.
(ListCommand.DoExecute): We can now list source locations outside
methods.
Modified: trunk/debugger/ChangeLog
===================================================================
--- trunk/debugger/ChangeLog 2007-05-23 11:08:31 UTC (rev 77829)
+++ trunk/debugger/ChangeLog 2007-05-23 12:36:09 UTC (rev 77830)
@@ -1,3 +1,10 @@
+2007-05-23 Martin Baulig <[EMAIL PROTECTED]>
+
+ * frontend/Command.cs
+ (SourceCommand.FindFile): Don't do a method lookup here.
+ (ListCommand.DoExecute): We can now list source locations outside
+ methods.
+
2007-05-16 Martin Baulig <[EMAIL PROTECTED]>
* classes/SourceLocation.cs
Modified: trunk/debugger/classes/SourceLocation.cs
===================================================================
--- trunk/debugger/classes/SourceLocation.cs 2007-05-23 11:08:31 UTC (rev
77829)
+++ trunk/debugger/classes/SourceLocation.cs 2007-05-23 12:36:09 UTC (rev
77830)
@@ -67,14 +67,16 @@
: this (new DynamicSourceLocation (file, line))
{
Module = file.Module.Name;
- FileName = Name = file.Name + ":" + line;
+ FileName = file.FileName;
+ Name = file.FileName + ":" + line;
Line = line;
}
public SourceLocation (string file, int line)
{
this.Line = line;
- this.FileName = Name = file + ":" + line;
+ this.FileName = file;
+ this.Name = file + ":" + line;
}
public void DumpLineNumbers ()
Modified: trunk/debugger/frontend/Command.cs
===================================================================
--- trunk/debugger/frontend/Command.cs 2007-05-23 11:08:31 UTC (rev 77829)
+++ trunk/debugger/frontend/Command.cs 2007-05-23 12:36:09 UTC (rev 77830)
@@ -2656,15 +2656,10 @@
{
SourceFile file = CurrentProcess.FindFile (filename);
if (file == null)
- throw new ScriptingException ("Cannot find
source file `{0}'.",
- filename);
-
- SourceMethod source = file.FindMethod (line);
- if (source == null)
throw new ScriptingException (
- "Cannot find method in line {0} in
`{1}'.", line, file.Name);
+ "Cannot find source file `{0}'.",
filename);
- location = new SourceLocation (source, line);
+ location = new SourceLocation (file, line);
return true;
}
@@ -2696,7 +2691,8 @@
if (line != -1) {
location = context.CurrentLocation;
if (location.FileName == null)
- throw new ScriptingException ("Location
doesn't have any source code.");
+ throw new ScriptingException (
+ "Location doesn't have any
source code.");
return FindFile (location.FileName, line);
}
@@ -2747,16 +2743,15 @@
if (!Repeating) {
SourceBuffer buffer;
- if (Location.FileName != null) {
- buffer = context.FindFile
(Location.FileName);
- if (buffer == null)
- throw new ScriptingException (
- "Cannot find source
file `{0}'",
- Location.FileName);
- } else
+ if (Location.FileName == null)
throw new ScriptingException (
"Current location doesn't have
any source code.");
+ buffer = context.FindFile (Location.FileName);
+ if (buffer == null)
+ throw new ScriptingException (
+ "Cannot read source file
`{0}'", Location.FileName);
+
source_code = buffer.Contents;
if (count < 0)
Modified: trunk/debugger/languages/mono/MonoClassType.cs
===================================================================
--- trunk/debugger/languages/mono/MonoClassType.cs 2007-05-23 11:08:31 UTC
(rev 77829)
+++ trunk/debugger/languages/mono/MonoClassType.cs 2007-05-23 12:36:09 UTC
(rev 77830)
@@ -376,7 +376,8 @@
return type_info;
throw new TargetException (
- TargetError.LocationInvalid, "Can't
find class `{0}'", Name);
+ TargetError.LocationInvalid, "Class
`{0}' not initialized yet.",
+ Name);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches