This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257850 - File and line should be included when copying stack to clipboard
Summary: File and line should be included when copying stack to clipboard
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-04 17:33 UTC by Vladimir Kvashin
Modified: 2017-04-20 10:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2016-02-04 17:33:15 UTC
I copied stack to clipboard and found that there are no file names and lines there.

Here is the stack I got (its upper part):

DeclJavaPrinter::VisitFunctionDeclImpl (this=0x7fffffffcaf0, D=0x1d7b3e0, lastPrintedParamIdx=65535, printExtra=true)
DeclJavaPrinter::VisitFunctionDecl (this=0x7fffffffcaf0, D=0x1d7b3e0)
DeclJavaPrinter::VisitCXXMethodDecl (this=0x7fffffffcaf0, D=0x1d7b3e0)
DeclJavaPrinter::VisitCXXConstructorDecl (this=0x7fffffffcaf0, D=0x1d7b3e0)
clang::declvisitor::Base<clang::declvisitor::make_ptr, DeclJavaPrinter, void>::Visit (this=0x7fffffffcaf0, D=0x1d7b3e0)
...

And here is the output of "where" command typed in gdb console:

#0  DeclJavaPrinter::VisitFunctionDeclImpl (this=0x7fffffffcaf0, D=0x1d7b3e0, lastPrintedParamIdx=65535, printExtra=true) at DeclJavaPrinter.cpp:1678
#1  0x00000000004c8873 in DeclJavaPrinter::VisitFunctionDecl (this=0x7fffffffcaf0, D=0x1d7b3e0) at DeclJavaPrinter.cpp:1611
#2  0x00000000004c7cc4 in DeclJavaPrinter::VisitCXXMethodDecl (this=0x7fffffffcaf0, D=0x1d7b3e0) at DeclJavaPrinter.cpp:1420
#3  0x00000000004c7d3d in DeclJavaPrinter::VisitCXXConstructorDecl (this=0x7fffffffcaf0, D=0x1d7b3e0) at DeclJavaPrinter.cpp:1429
#4  0x00000000004d64a9 in clang::declvisitor::Base<clang::declvisitor::make_ptr, DeclJavaPrinter, void>::Visit (this=0x7fffffffcaf0, D=0x1d7b3e0) at ../../../LLVM/build/tools/clang/include/clang/AST/DeclNodes.inc:353
#5  0x00000000004c605c in DeclJavaPrinter::VisitDeclContext (this=0x7fffffffcaf0, DC=0x1d7aee8, IndentDecl=true) at DeclJavaPrinter.cpp:1056

The last is more convenient.

It would be fine if the stack was in the format that can be placed into "Analyze Stack" pane and allow navigation.
Comment 1 Maria Tishkova 2017-04-12 11:45:57 UTC
fixed in enum/release82

changeset:   315585:f8a1b0ee3e40
branch:      release82
tag:         tip
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Wed Apr 12 14:44:20 2017 +0300
summary:     fixed bz#257850 - File and line should be included when copying stack to clipboard
Comment 2 Maria Tishkova 2017-04-12 12:04:03 UTC
One more remark: it is not possible to use Analyze Stack pane as there is no API/SPI and it has the following pattern to parse stack:
    private static final String IDENTIFIER =
        "\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*";    // NOI18N
    private static final Pattern LINE_PATTERN = Pattern.compile(
        "at\\s" +                                       //  initial at // NOI18N
        "(("+IDENTIFIER+"(\\."+IDENTIFIER+")*)\\.)?("+IDENTIFIER+")" + // class name // NOI18N
        "\\.("+IDENTIFIER+"|\\<init\\>|\\<clinit\\>)\\("+IDENTIFIER+"\\.java" + // method and file name // NOI18N
        "\\:([0-9]*)\\)");
Comment 3 ilia 2017-04-12 12:50:25 UTC
https://netbeans.org/bugzilla/show_bug.cgi?id=257850 Changesets:
    http://hg.netbeans.org/releases/rev/f8a1b0ee3e40 # fixed bz#257850 - File and line should be included when copying stack to clipboard
Comment 4 Quality Engineering 2017-04-14 01:53:27 UTC
Integrated into 'main-silver', will be available in build *201704140002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/23a133d12f46
User: Maria Dalmatova <mromashova@netbeans.org>
Log: fixed bz#257850 - File and line should be included when copying stack to clipboard
(transplanted from f8a1b0ee3e40303112a58e3576a42a661882e4cf)
Comment 5 soldatov 2017-04-20 10:03:42 UTC
Verified in NetBeans IDE 8.2 (Build 201704181436)