Browse Source

Fixed SD2-431: Debugger fails on FileLoadException

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@419 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 20 years ago
parent
commit
1efcd118ab
  1. 9
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/ExceptionHistoryPad.cs
  2. 5
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs

9
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Pads/ExceptionHistoryPad.cs

@ -127,7 +127,14 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -127,7 +127,14 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
exceptionHistoryList.Items.Clear();
foreach(DebuggerLibrary.Exception exception in debugger.ExceptionHistory) {
ListViewItem item = new ListViewItem(new string[] {exception.CreationTime.ToLongTimeString() , exception.Type + " - " + exception.Message, exception.Location.SourceFilename + ":" + exception.Location.StartLine + " (type=" + exception.ExceptionType.ToString() + ")"});
string location;
if (exception.Location != null) {
location = exception.Location.SourceFilename + ":" + exception.Location.StartLine;
} else {
location = "n/a";
}
location += " (type=" + exception.ExceptionType.ToString() + ")";
ListViewItem item = new ListViewItem(new string[] {exception.CreationTime.ToLongTimeString() , exception.Type + " - " + exception.Message, location});
item.Tag = exception;
item.ForeColor = Color.Black;
if (exception.ExceptionType == ExceptionType.DEBUG_EXCEPTION_UNHANDLED) {

5
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs

@ -49,7 +49,10 @@ namespace DebuggerLibrary @@ -49,7 +49,10 @@ namespace DebuggerLibrary
message = runtimeVariableException.SubVariables["_message"].Value.ToString();
}
location = thread.LastFunctionWithLoadedSymbols.NextStatement;
if (thread.LastFunctionWithLoadedSymbols != null) {
location = thread.LastFunctionWithLoadedSymbols.NextStatement;
}
callstack = "";
foreach(Function function in thread.Callstack) {
SourcecodeSegment loc = function.NextStatement;

Loading…
Cancel
Save