Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 62514 Details for
Bug 180059
Incorrect backtrace shown for anonymous namespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for MI Parser
patchMIParsingHead.txt (text/plain), 1.77 KB, created by
Elena Laskavaia
on 2007-03-30 12:27:50 EDT
(
hide
)
Description:
Patch for MI Parser
Filename:
MIME Type:
Creator:
Elena Laskavaia
Created:
2007-03-30 12:27:50 EDT
Size:
1.77 KB
patch
obsolete
>Index: mi/org/eclipse/cdt/debug/mi/core/output/MIFrame.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIFrame.java,v >retrieving revision 1.8 >diff -u -r1.8 MIFrame.java >--- mi/org/eclipse/cdt/debug/mi/core/output/MIFrame.java 23 Jun 2006 17:25:39 -0000 1.8 >+++ mi/org/eclipse/cdt/debug/mi/core/output/MIFrame.java 30 Mar 2007 16:22:37 -0000 >@@ -102,15 +102,19 @@ > str = str.trim(); > if ( str.equals( "??" ) ) //$NON-NLS-1$ > func = ""; //$NON-NLS-1$ >- else >- { >+ else { >+ func = str; > // 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; >+ // However PR180059: only cut it if it is last brackets represent parameters, >+ // because gdb can return: func="(anonymous namespace)::func2((anonymous namespace)::Test*)" >+ int closing = str.lastIndexOf(')'); >+ if (closing == str.length() - 1) { >+ int end = getMatchingBracketIndex(str, closing - 1); >+ if (end >= 0) { >+ func = str.substring(0, end); >+ } >+ } > } > } > } else if (var.equals("file")) { //$NON-NLS-1$ >@@ -131,4 +135,17 @@ > } > } > } >+ >+ private int getMatchingBracketIndex(String str, int end) { >+ int depth = 1; >+ for (;end>=0;end--) { >+ int c = str.charAt(end); >+ if (c=='(') { >+ depth--; >+ if (depth==0) break; >+ } else if (c==')') >+ depth++; >+ } >+ return end; >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 180059
:
62421
| 62514