diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog index 08ba339971e..2baced1f001 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -1,3 +1,10 @@ +2003-11-13 Mikhail Khodjaiants + + * src/org/eclipse/cdt/debug/mi/core/output/MIFrame.java + Fix for PR 46592: Debug View shows Functions as func(type param,...)(). + In some situations gdb returns the function names that include parameter types. + To make the presentation consistent truncate the parameters. + 2003-11-06 Alain Magloire * src/org/eclipse/cdt/debug/mi/core/cdi/EventManager.java: diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIFrame.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIFrame.java index eb517ba6d1c..074f50f87bd 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIFrame.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/output/MIFrame.java @@ -84,7 +84,19 @@ public class MIFrame { } catch (NumberFormatException e) { } } else if (var.equals("func")) { - func = ( str != null && str.equals( "??" ) ) ? "" : str; + func = null; + if ( str != null ) { + str = str.trim(); + if ( str.equals( "??" ) ) + func = ""; + // In some situations gdb returns the function names that include parameter types. + // To make the presentation consistent truncate the parameters. PR 46592 + int end = str.indexOf( '(' ); + if ( end != -1 ) + func = str.substring( 0, end ); + else + func = str; + } } else if (var.equals("file")) { file = str; } else if (var.equals("line")) {