Bug 358867

Summary: Umbrello should be able to import a gdb stack trace into a sequence diagram
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: 2.19 (KDE Applications 16.04)   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 2.18.80 (KDE Applications 16.03.80)
Sentry Crash Report:

Description Ralf Habacker 2016-02-01 11:49:26 UTC
While working on bug https://bugreports.qt.io/browse/QTBUG-44490 it turned out that for further discussions a visual representation of a complex call tree was required. In umbrello it is currently only possible to import the related source code and to add messages to a sequence diagram  by hand, which may require much time. 
Much easier would it be to be able to import a stack trace from a file, for example generated from a gdb generated stack trace. The required work would then be reduced to 
1. set a breakpoint
2. run the related application and after hitting the breakpoint 
3. to copy and paste the stack trace into a file, which could be imported into a umbrello sequence diagram.


Reproducible: Always
Comment 1 Ralf Habacker 2016-02-01 12:53:41 UTC
Git commit a757b30aa88db7e04e2d39c029994487489e1897 by Ralf Habacker.
Committed on 01/02/2016 at 12:51.
Pushed by habacker into branch 'master'.

Add support for importing gdb stack traces into sequence diagrams.

Stack trace files could be imported by selecting "Import stack trace ..."
from the "new" context menu entry of a sequence diagram.

The supported stack trace formats could be generated by
1. copy and paste of the output of gdb 'bt' command into a file
   (single line for each stack frame)

2. select frames in qtcreator stack window, right click and select
   "copy into clipboard", then paste into file

Examples of supported gdb stack trace formats are added to test/import/stack-trace
FIXED-IN: 2.18.80 (KDE Applications 16.03.80)

A  +34   -0    test/import/stacktrace/stacktrace-gdb.txt
A  +42   -0    test/import/stacktrace/stacktrace-qtcreator.txt
M  +230  -0    umbrello/codeimport/import_utils.cpp
M  +2    -0    umbrello/codeimport/import_utils.h
M  +1    -0    umbrello/listpopupmenu.cpp
M  +1    -0    umbrello/listpopupmenu.h
M  +13   -0    umbrello/umlscene.cpp

http://commits.kde.org/umbrello/a757b30aa88db7e04e2d39c029994487489e1897
Comment 2 Ralf Habacker 2016-02-01 14:10:41 UTC
Git commit 465af2deb8097188dc8d3f309a55fc58ff49e534 by Ralf Habacker.
Committed on 01/02/2016 at 14:10.
Pushed by habacker into branch 'master'.

Exclude comment lines in the form '# <comment>' from generating messages.

M  +1    -1    umbrello/codeimport/import_utils.cpp

http://commits.kde.org/umbrello/465af2deb8097188dc8d3f309a55fc58ff49e534