[Mono-bugs] [Bug 77566][Nor] New - "file" command doesn't check to see if arg is valid file

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Feb 15 14:46:04 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by joeshaw at novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=77566

--- shadow/77566	2006-02-15 14:46:04.000000000 -0500
+++ shadow/77566.tmp.25549	2006-02-15 14:46:04.000000000 -0500
@@ -0,0 +1,71 @@
+Bug#: 77566
+Product: Mono: Debugger
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: cli
+AssignedTo: martin at ximian.com                            
+ReportedBy: joeshaw at novell.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: "file" command doesn't check to see if arg is valid file
+
+Open up the debugger, and at the (mdb) prompt, type an invalid path into
+the "file" command:
+
+(mdb) file /asdf/foo/bar.exe
+Executable file: /asdf/foo/bar.exe.
+
+If you then try to run, you get:
+
+(mdb) run
+Starting program:
+ERROR: Caught exception while executing command
+Mono.Debugger.Frontend.RunCommand: System.ArgumentException: An invalid
+argument was specified.
+
+Server stack trace:
+in [0x0009b] (at /home/joe/cvs/mcs/class/corlib/System.IO/Path.cs:167)
+System.IO.Path:GetDirectoryName (System.String path)
+in [0x00159] (at /home/joe/cvs/debugger/backends/ProcessStart.cs:105)
+Mono.Debugger.Backends.ProcessStart:.ctor (Mono.Debugger.DebuggerOptions
+options)
+in (wrapper remoting-invoke-with-check)
+Mono.Debugger.Backends.ProcessStart:.ctor (Mono.Debugger.DebuggerOptions)
+in [0x0001f] (at /home/joe/cvs/debugger/backends/Debugger.cs:122)
+Mono.Debugger.Debugger:Run (Mono.Debugger.DebuggerOptions options)
+in (wrapper remoting-invoke-with-check) Mono.Debugger.Debugger:Run
+(Mono.Debugger.DebuggerOptions)
+in (wrapper xdomain-dispatch) Mono.Debugger.Debugger:Run
+(object,byte[]&,byte[]&)
+
+Exception rethrown at [0]:
+
+in (wrapper xdomain-invoke) Mono.Debugger.Debugger:Run
+(Mono.Debugger.DebuggerOptions)
+in (wrapper remoting-invoke-with-check) Mono.Debugger.Debugger:Run
+(Mono.Debugger.DebuggerOptions)
+in <0x000f2> Mono.Debugger.Frontend.Interpreter:Start ()
+in (wrapper remoting-invoke-with-check)
+Mono.Debugger.Frontend.Interpreter:Start ()
+in <0x000cf> Mono.Debugger.Frontend.RunCommand:DoExecute
+(Mono.Debugger.Frontend.ScriptingContext context)
+in <0x0001f> Mono.Debugger.Frontend.DebuggerCommand:Execute
+(Mono.Debugger.Frontend.ScriptingContext context)
+in <0x00096> Mono.Debugger.Frontend.DebuggerCommand:Execute
+(Mono.Debugger.Frontend.Engine e)
+
+Along the same lines, if you pass an invalid path into mdb, you get no
+indication that it doesn't exist until you try to run.
+
+$ mdb /asdf/foo/bar.exe
+Mono Debugger
+(mdb) r
+Starting program: /asdf/foo/bar.exe
+ERROR: Cannot exec `/asdf/foo/bar.exe': No such file or directory


More information about the mono-bugs mailing list