Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <jeff@xamarin.com>2012-01-14 01:10:31 +0400
committerJeffrey Stedfast <jeff@xamarin.com>2012-01-14 01:10:31 +0400
commit10aa23fb929bc766da75aad4ac88e240334db2fb (patch)
treea531f818779ad4ba73ff969840e9f25235046d60 /extras/MonoDevelop.Debugger.Gdb
parent5ef3f5af132a9b20f102f9b7a9d200c8f17af7a0 (diff)
[Debugger] Implemented function breakpoints
Fixes bug #2850
Diffstat (limited to 'extras/MonoDevelop.Debugger.Gdb')
-rw-r--r--extras/MonoDevelop.Debugger.Gdb/GdbSession.cs36
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;