diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2012-01-16 10:59:21 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2012-01-16 10:59:21 +0400 |
commit | 449660ba8116c78533f9633872dd373c317d80f9 (patch) | |
tree | 17aaf5cd3663165fa38f0a0b1458b3afdcda6cbb /extras/MonoDevelop.Debugger.Gdb | |
parent | e937be0892cbbd576f5c777a9dc5dcfb3e471aa0 (diff) | |
parent | 3f851ecd47475535d9f4f4bc6a4c31bfd35a1fd7 (diff) |
Merge branch 'master' into newresolver
Diffstat (limited to 'extras/MonoDevelop.Debugger.Gdb')
-rw-r--r-- | extras/MonoDevelop.Debugger.Gdb/GdbSession.cs | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/extras/MonoDevelop.Debugger.Gdb/GdbSession.cs b/extras/MonoDevelop.Debugger.Gdb/GdbSession.cs index e88742c48d..a149fabe91 100644 --- a/extras/MonoDevelop.Debugger.Gdb/GdbSession.cs +++ b/extras/MonoDevelop.Debugger.Gdb/GdbSession.cs @@ -283,26 +283,36 @@ namespace MonoDevelop.Debugger.Gdb extraCmd += " -c " + bp.ConditionExpression; } - // Breakpoint locations must be double-quoted if files contain spaces. - // For example: -break-insert "\"C:/Documents and Settings/foo.c\":17" - - RunCommand ("-environment-directory", Escape (Path.GetDirectoryName (bp.FileName))); GdbCommandResult res = null; string errorMsg = null; - try { - res = RunCommand ("-break-insert", extraCmd.Trim (), Escape (Escape (bp.FileName) + ":" + bp.Line)); - } catch (Exception ex) { - errorMsg = ex.Message; - } - if (res == null) { + if (bp is FunctionBreakpoint) { try { - res = RunCommand ("-break-insert", extraCmd.Trim (), Escape (Escape (Path.GetFileName (bp.FileName)) + ":" + bp.Line)); + res = RunCommand ("-break-insert", extraCmd.Trim (), ((FunctionBreakpoint) bp).FunctionName); + } catch (Exception ex) { + errorMsg = ex.Message; } - catch { - // Ignore + } else { + // Breakpoint locations must be double-quoted if files contain spaces. + // For example: -break-insert "\"C:/Documents and Settings/foo.c\":17" + RunCommand ("-environment-directory", Escape (Path.GetDirectoryName (bp.FileName))); + + try { + res = RunCommand ("-break-insert", extraCmd.Trim (), Escape (Escape (bp.FileName) + ":" + bp.Line)); + } catch (Exception ex) { + errorMsg = ex.Message; + } + + if (res == null) { + try { + res = RunCommand ("-break-insert", extraCmd.Trim (), Escape (Escape (Path.GetFileName (bp.FileName)) + ":" + bp.Line)); + } + catch { + // Ignore + } } } + if (res == null) { bi.SetStatus (BreakEventStatus.Invalid, errorMsg); return bi; |