[disassembly] Do not reuse label position for creating bp annotation
authorAnton Leherbauer <anton.leherbauer@windriver.com>
Tue, 15 Dec 2015 14:03:22 +0000 (15:03 +0100)
committerAnton Leherbauer <anton.leherbauer@windriver.com>
Tue, 15 Dec 2015 15:16:23 +0000 (16:16 +0100)
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/provisional/DisassemblyAnnotationModel.java

index 04d0bf4..89848d1 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2011 Wind River Systems, Inc. and others.\r
+ * Copyright (c) 2011, 2015 Wind River Systems, Inc. and others.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -75,7 +75,7 @@ public class DisassemblyAnnotationModel extends AnnotationModel {
                                                if (candidate != null && candidate.startsWith(label)) {\r
                                                        // exact match or followed by ()\r
                                                        if (candidate.length() == labelLen || candidate.charAt(labelLen) == '(') {\r
-                                                               return position;\r
+                                                               return new Position(position.offset, position.length);\r
                                                        }\r
                                                }\r
                                        }\r