mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
generic: adjust to KCrash changes
on a side note generating backtrace via drkonqi was not working on some systems where traces are disabled by default (for security reasons) and it required not only to install debug packages or build for debugging purposes but also to setup the system so that backtrace can be generated to get something out of it where that is no the case on Linux there is usually a core dump in the system log anyway thus the only thing a program related to crashes has to do is to notify about it and (when possible) automatically file some information (with the option to disable that) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
0dd7a6a674
commit
1aa221bd26
92 changed files with 204 additions and 6666 deletions
|
@ -220,12 +220,6 @@ add_feature_info(qrencode
|
|||
"QR Code support in klipper"
|
||||
)
|
||||
|
||||
find_program(GDB_OR_LLDB_EXECUTABLE NAMES gdb lldb)
|
||||
add_feature_info(gdb_or_lldb
|
||||
GDB_OR_LLDB_EXECUTABLE
|
||||
"Backtraces support"
|
||||
)
|
||||
|
||||
find_program(CTAGS_EXECUTABLE ctags ctags-universal ctags-exuberant exctags uctags)
|
||||
add_feature_info(ctags
|
||||
CTAGS_EXECUTABLE
|
||||
|
@ -354,7 +348,7 @@ add_subdirectory(ktraderclient)
|
|||
add_subdirectory(kreadconfig)
|
||||
add_subdirectory(kmimetypefinder)
|
||||
# UI Helper applications
|
||||
add_subdirectory(drkonqi)
|
||||
add_subdirectory(kcrash)
|
||||
add_subdirectory(knetattach)
|
||||
add_subdirectory(kdirshare)
|
||||
add_subdirectory(keditfiletype)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
kate: replace-tabs on; indent-width 4;
|
|
@ -1,5 +0,0 @@
|
|||
Hans Petter Bieker <bieker@kde.org>
|
||||
Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
A. L. Spehr <spehr@kde.org>
|
||||
Lee Olson <leetolson@gmail.com>
|
|
@ -1,56 +0,0 @@
|
|||
project(drkonqi)
|
||||
|
||||
check_function_exists("strsignal" HAVE_STRSIGNAL)
|
||||
|
||||
configure_file(
|
||||
config-drkonqi.h.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config-drkonqi.h
|
||||
)
|
||||
|
||||
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1410)
|
||||
|
||||
add_subdirectory(data)
|
||||
|
||||
set(drkonqi_SRCS
|
||||
main.cpp
|
||||
drkonqidialog.cpp
|
||||
statuswidget.cpp
|
||||
backtraceratingwidget.cpp
|
||||
backtracewidget.cpp
|
||||
backtracegenerator.cpp
|
||||
drkonqi.cpp
|
||||
drkonqibackends.cpp
|
||||
detachedprocessmonitor.cpp
|
||||
crashedapplication.cpp
|
||||
debugger.cpp
|
||||
debuggerlaunchers.cpp
|
||||
debuggermanager.cpp
|
||||
gdbhighlighter.cpp
|
||||
lldbhighlighter.cpp
|
||||
)
|
||||
|
||||
set(backtrace_parser_SRCS
|
||||
parser/backtraceparser.cpp
|
||||
parser/backtraceparsergdb.cpp
|
||||
parser/backtraceparserlldb.cpp
|
||||
parser/backtraceparsernull.cpp
|
||||
)
|
||||
|
||||
if(ENABLE_TESTING)
|
||||
add_library(drkonqi_backtrace_parser STATIC ${backtrace_parser_SRCS})
|
||||
target_link_libraries(drkonqi_backtrace_parser KDE4::kdecore)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# if BACKTRACE_PARSER_DEBUG is enabled, it will show both the
|
||||
# parsed and the unparsed backtrace in the backtrace widget.
|
||||
# Comment this out for release.
|
||||
#add_definitions(-DBACKTRACE_PARSER_DEBUG)
|
||||
|
||||
add_executable(drkonqi ${drkonqi_SRCS} ${backtrace_parser_SRCS})
|
||||
|
||||
target_link_libraries(drkonqi
|
||||
KDE4::kio
|
||||
)
|
||||
|
||||
install(TARGETS drkonqi DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR})
|
|
@ -1,4 +0,0 @@
|
|||
#! /bin/sh
|
||||
#This file has output in separate line each file with a .desktop syntax
|
||||
#that needs to be translated but has a non .desktop extension
|
||||
find -name "*rc" -print
|
339
drkonqi/LICENSE
339
drkonqi/LICENSE
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
$EXTRACTRC ui/*.ui >> rc.cpp
|
||||
$XGETTEXT *.cpp -o $podir/drkonqi.pot
|
||||
rm -f rc.cpp
|
|
@ -1,6 +0,0 @@
|
|||
How to activate the debug button for DrKonqi:
|
||||
|
||||
$KDEHOME/share/config/drkonqirc:
|
||||
|
||||
[Drkonqi]
|
||||
ShowDebugButton=true
|
205
drkonqi/ToDo
205
drkonqi/ToDo
|
@ -1,205 +0,0 @@
|
|||
##Main Tasks
|
||||
-------------
|
||||
|
||||
##For KDE4.5+:
|
||||
--------------
|
||||
|
||||
- Offer option to "subscribe" (addToCC) to a bug report
|
||||
|
||||
#P1:
|
||||
|
||||
- Check the wording of the new introduced texts (common crashes warnings and notes)
|
||||
|
||||
- Implement inline help (tooltip/whatsthis) for Bugzilla Duplicate Confirmation dialog
|
||||
|
||||
#P2
|
||||
|
||||
#- Have a "canceled " page (instead of directly exiting the assistant) ?????
|
||||
|
||||
- If the report was "dismissed" because it was not really useful, and the backtrace was not generated;
|
||||
allow the advanced users to generate it later (on the "Show report's content" button or in the backtrace tab)
|
||||
|
||||
#P3
|
||||
|
||||
- Merge the two main dialogs (?)
|
||||
|
||||
#Other
|
||||
|
||||
- If attaching, include in the attach'description, a condensed string with the app/kdesc version
|
||||
|
||||
- Check for plugins / Read memory-maps (/proc/PID/maps) and upload as attachment
|
||||
(example, if plasma crashes, which libs were loaded, which lib caused the crash)
|
||||
This is useful to determine if some external plugin is involved
|
||||
(I don't know if this is technically possible)
|
||||
|
||||
- Implement TerminalDebuggerLauncher (the idea is to use the same trick as the one used in the installdbgsymbols.sh examples)
|
||||
|
||||
- BacktraceGenerator should not be allowed to start if another debugger is running.
|
||||
Add some check and possibly some signal indicating this state. As a consequence,
|
||||
remove the call to DrKonqi::debuggerManager()->debuggerIsRunning() from BacktraceWidget
|
||||
to make it trully independent from drkonqi.
|
||||
|
||||
- Make a docs dir and add documentation for:
|
||||
1) the format of the debugger files
|
||||
2) The dbus interface
|
||||
+ move README.packagers in there with a proper name.
|
||||
|
||||
- Register dynamic debug area (see dfaure's mail on k-c-d).
|
||||
|
||||
- Use external .desktop files to provide examples of "useful crash details" for external applications
|
||||
(ex. Amarok installs a amarokdrkonqiexamples.desktop file with a content like "Type of music you were listening to..."
|
||||
- It can contain translations too.
|
||||
|
||||
## FUTURE
|
||||
---------------
|
||||
|
||||
- Update DrKonqi to use the remote product mapping implementation (being done by Mattr)
|
||||
[[ currently bugzillalib detects unexistent products to later use the "kde" product ]]
|
||||
##Update: local mappings file support already implemented.
|
||||
##Sample PHP script sent
|
||||
Waiting for remote implementation to be complete.
|
||||
|
||||
- Implement a bugzilla field "Fixed at" X version, to show to the user... (mattr)
|
||||
|
||||
- Detect app versions and encourage the user to test new version?
|
||||
(detect stable or devel)
|
||||
|
||||
- Custom usefulness values needed by application
|
||||
(ex. Amarok wants only perfect backtraces...)
|
||||
|
||||
##Brainstorming
|
||||
--------------
|
||||
|
||||
- Try to also provide full backtraces ("bt full")
|
||||
The simple backtrace is going to be pasted inline as always
|
||||
The complete backtrace could be added as an attachment
|
||||
(how to retrieve both versions at the same time?, fetch only the full and "manually strip it" to get the simple one ?)
|
||||
|
||||
- Implement bugtracking-system-agnostic interface on KDE servers and adapt DrKonqi to interact with it
|
||||
(this will also remove the HTML parsing code from DrKonqi itself, to put it on a remote script)
|
||||
|
||||
- Display the time of the crash
|
||||
("I came back to the computer some time later and drkonqi was there..
|
||||
when the application crashed? during the night?") (by sreich)
|
||||
|
||||
- Usability review and suggestions:
|
||||
http://blogs.msdn.com/oldnewthing/archive/2003/09/01/54734.aspx (by Maciej)
|
||||
|
||||
- Hide backtrace from user (only show progress and backtrace status)??
|
||||
|
||||
- Search in backtrace (esp. for [KCrash Handler])
|
||||
|
||||
- Backtrace syntax highlighting (xml parser+ some qt/kde class ?)
|
||||
|
||||
- Option to "don't show DrKonqi for this(X) app"
|
||||
(Do we want this?)
|
||||
|
||||
- Option to avoid drkonqi at all (setting KDE_DEBUG=1), and GUI to renable it
|
||||
(Do we want this?)
|
||||
|
||||
#Later
|
||||
---------
|
||||
|
||||
- Implement a proper DBus interface.
|
||||
- Include help in the details page, near the "Details:" label (ex. "What should I write this?" link with help)
|
||||
|
||||
#DONE
|
||||
-------
|
||||
|
||||
- Improve the "Enter manual bug ID" option in the Duplicates page to be more discoverable
|
||||
|
||||
- Improve the help about the information the user needs to provide
|
||||
|
||||
- Show the minimum text require length / or a "progress bar"(or capacitybar)
|
||||
|
||||
- If we are going to attach the bug report to an existent one, and that one has too much duplicates, warn the user that his/her attachment is only going to be useful if s/he provides good info
|
||||
|
||||
- In the "Details page" (user enters description) write the headers like
|
||||
"What I was doing when app crashed: \n\n Other useful config details:" (depending on the options checked before)
|
||||
|
||||
- Exclude some backtrace functions to improve the search feature (like Qt base stuff at the top of the bt)
|
||||
|
||||
- Replace the progressbar of the StatusWidget with a throbber....
|
||||
|
||||
- The reporting dialog should check (on start) if the backtrace was already generated by the main dialog
|
||||
(to use it when saving the report to a file, even when the backtrace page is not shown)
|
||||
|
||||
- If reproducibility is Always or Sometimes, set a minimum required char ammount in the details page
|
||||
|
||||
- Title is not needed when attaching the report to an existant one
|
||||
|
||||
- Remove the "Are you ready to submit this bug report" in the Preview page
|
||||
|
||||
- Application detection: ask for or detect specific things depending on application
|
||||
ie konqueror: url, plasma: plasmoids in use, kopete: protocol, etc.
|
||||
|
||||
- REVIEW criteria of minimum chars/words to use in the Title and Details fields
|
||||
"- If a possible duplicate is marked as FIXED, show a better (banner) message so the user will notice....
|
||||
|
||||
!!IMPORTANT: (to be done before 2009Nov25 / String Freeze)
|
||||
- Update "AboutBugReporting" guide to reflect the new workflow
|
||||
- Review the confirmation dialog in the Bug Report Information page:
|
||||
if the text is not long enough, we dismiss the whole report saying something like "a report without a good description
|
||||
will only waste bug triagers and developers time"...
|
||||
|
||||
##- Use https://bugs.kde.org/enter_bug.cgi?product=X to fetch product versions... (it will reduce server load)
|
||||
|
||||
##Bugzilla DrKonqi reports cleanup:
|
||||
Wontfix: 143243, 185547
|
||||
|
||||
---------
|
||||
---------
|
||||
|
||||
* Crashes on Shutdown:
|
||||
|
||||
https://bugs.kde.org/show_bug.cgi?id=126073 ->
|
||||
**** Restore block shutdown/logout while DrKonqi window is up
|
||||
(to catch crashes on shutdown)
|
||||
- Config option to:
|
||||
- (default) Show a feedback indicator for a "automatically closing window" timer (and continue with shutdown)
|
||||
- non-default Block shutdown/logout completely, do not use a closing timer.
|
||||
|
||||
- Ask Seli for Session Management stuff (we need to ask from code if we are in the middle of a shutdown process)
|
||||
- Use " unsetenv("SESSION_MANAGER");" again on main.cpp (http://websvn.kde.org/trunk/kdebase/drkonqi/main.cpp?r1=408177&r2=408176&pathrev=408177)
|
||||
|
||||
- Startkde waiting for drkonqi to exit->
|
||||
# wait if there's any crashhandler shown
|
||||
318 while dcop | grep -q ^drkonqi- ; do
|
||||
319 sleep 5
|
||||
320 done
|
||||
|
||||
" while qdbus | grep "^[^w]*org.kde.drkonqi" > /dev/null ; do sleep 5; done "
|
||||
http://websvn.kde.org/trunk/kdebase/startkde?r1=408177&r2=408176&pathrev=408177
|
||||
|
||||
http://websvn.kde.org/?view=rev&revision=408177
|
||||
|
||||
bool KSessionManager::saveState ( QSessionManager & sm ) [virtual]
|
||||
void QApplication::saveState ( QSessionManager & manager )
|
||||
|
||||
---------------------
|
||||
---------------------
|
||||
Improving symbol loading speed using GDB
|
||||
---
|
||||
|
||||
- Create a temp file "init"
|
||||
|
||||
"init" contents:
|
||||
set auto-solib-add off
|
||||
|
||||
(this will disable the symbols autoload)
|
||||
|
||||
Start gdb with .. "-x init" (init includes the fullpath)
|
||||
|
||||
"bt full" will show an empty backtrace, but with the libraries path.
|
||||
|
||||
Use "shar path" to load the debug symbols for that file
|
||||
|
||||
"bt full" will now be more complete (but it may need more symbols to be loaded)
|
||||
|
||||
|
||||
--
|
||||
|
||||
The current gdb commands could be adapted to...
|
||||
- Do not include the PID on the command line
|
||||
- "set auto-solib-add off" could be the first command of the BatchCommands (passed tempfile with -x)
|
||||
- "attach PID" could be the second command
|
|
@ -1,169 +0,0 @@
|
|||
/*****************************************************************
|
||||
* drkonqi - The KDE Crash Handler
|
||||
*
|
||||
* Copyright (C) 2000-2003 Hans Petter Bieker <bieker@kde.org>
|
||||
* Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************/
|
||||
#include "backtracegenerator.h"
|
||||
|
||||
#include <KDebug>
|
||||
#include <KTemporaryFile>
|
||||
#include <KShell>
|
||||
|
||||
#include "parser/backtraceparser.h"
|
||||
|
||||
BacktraceGenerator::BacktraceGenerator(const Debugger & debugger, QObject *parent)
|
||||
: QObject(parent),
|
||||
m_debugger(debugger), m_proc(NULL),
|
||||
m_temp(NULL), m_state(NotLoaded)
|
||||
{
|
||||
m_parser = BacktraceParser::newParser(m_debugger.codeName(), this);
|
||||
m_parser->connectToGenerator(this);
|
||||
|
||||
#ifdef BACKTRACE_PARSER_DEBUG
|
||||
m_debugParser = BacktraceParser::newParser(QString(), this); //uses the null parser
|
||||
m_debugParser->connectToGenerator(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
BacktraceGenerator::~BacktraceGenerator()
|
||||
{
|
||||
if (m_proc && m_proc->state() == QProcess::Running) {
|
||||
kWarning() << "Killing running debugger instance";
|
||||
m_proc->disconnect(this);
|
||||
m_proc->terminate();
|
||||
if (!m_proc->waitForFinished(10000)) {
|
||||
m_proc->kill();
|
||||
m_proc->waitForFinished();
|
||||
}
|
||||
delete m_proc;
|
||||
delete m_temp;
|
||||
}
|
||||
}
|
||||
|
||||
bool BacktraceGenerator::start()
|
||||
{
|
||||
//they should always be null before entering this function.
|
||||
Q_ASSERT(m_proc == NULL && m_temp == NULL);
|
||||
|
||||
m_parsedBacktrace.clear();
|
||||
m_state = Loading;
|
||||
|
||||
emit starting();
|
||||
|
||||
if (!m_debugger.isValid() || !m_debugger.isInstalled()) {
|
||||
m_state = FailedToStart;
|
||||
emit failedToStart();
|
||||
return false;
|
||||
}
|
||||
|
||||
m_proc = new QProcess(this);
|
||||
|
||||
// force C locale
|
||||
QProcessEnvironment procenv = QProcessEnvironment::systemEnvironment();
|
||||
procenv.insert("LC_ALL", "C");
|
||||
m_proc->setProcessEnvironment(procenv);
|
||||
|
||||
m_temp = new KTemporaryFile;
|
||||
m_temp->open();
|
||||
m_temp->write(m_debugger.backtraceBatchCommands().toLatin1());
|
||||
m_temp->write("\n", 1);
|
||||
m_temp->flush();
|
||||
|
||||
// start the debugger
|
||||
QString str = m_debugger.command();
|
||||
Debugger::expandString(str, Debugger::ExpansionUsageShell, m_temp->fileName());
|
||||
|
||||
m_proc->setReadChannel(QProcess::StandardOutput);
|
||||
connect(m_proc, SIGNAL(readyReadStandardOutput()),
|
||||
SLOT(slotReadInput()));
|
||||
connect(m_proc, SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||
SLOT(slotProcessExited(int,QProcess::ExitStatus)));
|
||||
|
||||
QStringList procargs = KShell::splitArgs(str);
|
||||
QString procprog = procargs.takeAt(0);
|
||||
m_proc->start(procprog, procargs, QIODevice::ReadWrite | QIODevice::Text);
|
||||
if (!m_proc->waitForStarted()) {
|
||||
//we mustn't keep these around...
|
||||
m_proc->deleteLater();
|
||||
m_temp->deleteLater();
|
||||
m_proc = NULL;
|
||||
m_temp = NULL;
|
||||
|
||||
m_state = FailedToStart;
|
||||
emit failedToStart();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void BacktraceGenerator::slotReadInput()
|
||||
{
|
||||
// we do not know if the output array ends in the middle of an utf-8 sequence
|
||||
m_output += m_proc->readAllStandardOutput();
|
||||
|
||||
int pos;
|
||||
while ((pos = m_output.indexOf('\n')) != -1) {
|
||||
QString line = QString::fromLocal8Bit(m_output, pos + 1);
|
||||
m_output.remove(0, pos + 1);
|
||||
|
||||
emit newLine(line);
|
||||
}
|
||||
}
|
||||
|
||||
void BacktraceGenerator::slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
//these are useless now
|
||||
m_proc->deleteLater();
|
||||
m_temp->deleteLater();
|
||||
m_proc = NULL;
|
||||
m_temp = NULL;
|
||||
|
||||
//mark the end of the backtrace for the parser
|
||||
emit newLine(QString());
|
||||
|
||||
if (exitStatus != QProcess::NormalExit || exitCode != 0) {
|
||||
m_state = Failed;
|
||||
emit someError();
|
||||
return;
|
||||
}
|
||||
|
||||
//no translation, string appears in the report
|
||||
QString tmp("Application: %progname (%execname), signal: %signame\n");
|
||||
Debugger::expandString(tmp);
|
||||
|
||||
m_parsedBacktrace = tmp + m_parser->parsedBacktrace();
|
||||
m_state = Loaded;
|
||||
|
||||
#ifdef BACKTRACE_PARSER_DEBUG
|
||||
//append the raw unparsed backtrace
|
||||
m_parsedBacktrace += "\n------------ Unparsed Backtrace ------------\n";
|
||||
m_parsedBacktrace += m_debugParser->parsedBacktrace(); //it's not really parsed, it's from the null parser.
|
||||
#endif
|
||||
|
||||
emit done();
|
||||
}
|
||||
|
||||
#include "moc_backtracegenerator.cpp"
|
|
@ -1,92 +0,0 @@
|
|||
/*****************************************************************
|
||||
* drkonqi - The KDE Crash Handler
|
||||
*
|
||||
* Copyright (C) 2000-2003 Hans Petter Bieker <bieker@kde.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************/
|
||||
|
||||
#ifndef BACKTRACEGENERATOR_H
|
||||
#define BACKTRACEGENERATOR_H
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
#include "debugger.h"
|
||||
|
||||
class KTemporaryFile;
|
||||
class BacktraceParser;
|
||||
|
||||
class BacktraceGenerator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum State { NotLoaded, Loading, Loaded, Failed, FailedToStart };
|
||||
|
||||
BacktraceGenerator(const Debugger & debugger, QObject *parent);
|
||||
~BacktraceGenerator();
|
||||
|
||||
State state() const {
|
||||
return m_state;
|
||||
}
|
||||
|
||||
BacktraceParser *parser() const {
|
||||
return m_parser;
|
||||
}
|
||||
|
||||
QString backtrace() const {
|
||||
return m_parsedBacktrace;
|
||||
}
|
||||
|
||||
const Debugger debugger() const {
|
||||
return m_debugger;
|
||||
}
|
||||
|
||||
public Q_SLOTS:
|
||||
bool start();
|
||||
|
||||
Q_SIGNALS:
|
||||
void starting();
|
||||
void newLine(const QString &str); // emitted for every line
|
||||
void someError();
|
||||
void failedToStart();
|
||||
void done();
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void slotReadInput();
|
||||
|
||||
private:
|
||||
const Debugger m_debugger;
|
||||
QProcess * m_proc;
|
||||
KTemporaryFile * m_temp;
|
||||
QByteArray m_output;
|
||||
State m_state;
|
||||
BacktraceParser * m_parser;
|
||||
QString m_parsedBacktrace;
|
||||
|
||||
#ifdef BACKTRACE_PARSER_DEBUG
|
||||
BacktraceParser * m_debugParser;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,97 +0,0 @@
|
|||
/*******************************************************************
|
||||
* backtraceratingwidget.cpp
|
||||
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
#include "backtraceratingwidget.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
|
||||
#include <KIcon>
|
||||
|
||||
BacktraceRatingWidget::BacktraceRatingWidget(QWidget * parent) :
|
||||
QWidget(parent),
|
||||
m_state(BacktraceGenerator::NotLoaded),
|
||||
m_star1(false),
|
||||
m_star2(false),
|
||||
m_star3(false)
|
||||
{
|
||||
setMinimumSize(105, 24);
|
||||
|
||||
m_starPixmap = KIcon("favorites").pixmap(QSize(22, 22));
|
||||
m_disabledStarPixmap = KIcon("favorites").pixmap(QSize(22, 22), QIcon::Disabled);
|
||||
m_errorPixmap = KIcon("dialog-error").pixmap(QSize(22, 22));
|
||||
}
|
||||
|
||||
void BacktraceRatingWidget::setUsefulness(BacktraceParser::Usefulness usefulness)
|
||||
{
|
||||
switch (usefulness) {
|
||||
case BacktraceParser::ReallyUseful: {
|
||||
m_star1 = true;
|
||||
m_star2 = true;
|
||||
m_star3 = true;
|
||||
break;
|
||||
}
|
||||
case BacktraceParser::MayBeUseful: {
|
||||
m_star1 = true;
|
||||
m_star2 = true;
|
||||
m_star3 = false;
|
||||
break;
|
||||
}
|
||||
case BacktraceParser::ProbablyUseless: {
|
||||
m_star1 = true;
|
||||
m_star2 = false;
|
||||
m_star3 = false;
|
||||
break;
|
||||
}
|
||||
case BacktraceParser::Useless:
|
||||
case BacktraceParser::InvalidUsefulness: {
|
||||
m_star1 = false;
|
||||
m_star2 = false;
|
||||
m_star3 = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void BacktraceRatingWidget::paintEvent(QPaintEvent * event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
||||
QPainter p(this);
|
||||
|
||||
p.drawPixmap(QPoint(30, 1) , m_star1 ? m_starPixmap : m_disabledStarPixmap);
|
||||
p.drawPixmap(QPoint(55, 1) , m_star2 ? m_starPixmap : m_disabledStarPixmap);
|
||||
p.drawPixmap(QPoint(80, 1) , m_star3 ? m_starPixmap : m_disabledStarPixmap);
|
||||
|
||||
switch (m_state) {
|
||||
case BacktraceGenerator::Failed:
|
||||
case BacktraceGenerator::FailedToStart: {
|
||||
p.drawPixmap(QPoint(0, 1) , m_errorPixmap);
|
||||
break;
|
||||
}
|
||||
case BacktraceGenerator::Loading:
|
||||
case BacktraceGenerator::Loaded:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
p.end();
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
/*******************************************************************
|
||||
* backtraceratingwidget.h
|
||||
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
#ifndef BACKTRACERATINGWIDGET__H
|
||||
#define BACKTRACERATINGWIDGET__H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "parser/backtraceparser.h"
|
||||
#include "backtracegenerator.h"
|
||||
|
||||
#include <QPixmap>
|
||||
|
||||
class BacktraceRatingWidget: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit BacktraceRatingWidget(QWidget *);
|
||||
void setUsefulness(BacktraceParser::Usefulness);
|
||||
void setState(BacktraceGenerator::State s) {
|
||||
m_state = s; update();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
void paintEvent(QPaintEvent * event);
|
||||
|
||||
private:
|
||||
|
||||
BacktraceGenerator::State m_state;
|
||||
|
||||
bool m_star1;
|
||||
bool m_star2;
|
||||
bool m_star3;
|
||||
|
||||
QPixmap m_errorPixmap;
|
||||
|
||||
QPixmap m_starPixmap;
|
||||
QPixmap m_disabledStarPixmap;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,352 +0,0 @@
|
|||
/*******************************************************************
|
||||
* backtracewidget.cpp
|
||||
* Copyright 2009,2010 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
#include "backtracewidget.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QScrollBar>
|
||||
|
||||
#include <KIcon>
|
||||
#include <KMessageBox>
|
||||
#include <KLocalizedString>
|
||||
#include <KToolInvocation>
|
||||
#include <KGlobalSettings>
|
||||
|
||||
#include "drkonqi.h"
|
||||
#include "backtraceratingwidget.h"
|
||||
#include "crashedapplication.h"
|
||||
#include "backtracegenerator.h"
|
||||
#include "parser/backtraceparser.h"
|
||||
#include "drkonqi_globals.h"
|
||||
#include "debuggermanager.h"
|
||||
#include "gdbhighlighter.h"
|
||||
#include "lldbhighlighter.h"
|
||||
|
||||
static const char extraDetailsLabelMargin[] = " margin: 5px; ";
|
||||
|
||||
BacktraceWidget::BacktraceWidget(BacktraceGenerator *generator, QWidget *parent,
|
||||
bool showToggleBacktrace) :
|
||||
QWidget(parent),
|
||||
m_btGenerator(generator),
|
||||
m_highlighter(0)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
connect(m_btGenerator, SIGNAL(done()) , this, SLOT(loadData()));
|
||||
connect(m_btGenerator, SIGNAL(someError()) , this, SLOT(loadData()));
|
||||
connect(m_btGenerator, SIGNAL(failedToStart()) , this, SLOT(loadData()));
|
||||
connect(m_btGenerator, SIGNAL(newLine(QString)) , this, SLOT(backtraceNewLine(QString)));
|
||||
|
||||
connect(ui.m_extraDetailsLabel, SIGNAL(linkActivated(QString)), this,
|
||||
SLOT(extraDetailsLinkActivated(QString)));
|
||||
ui.m_extraDetailsLabel->setVisible(false);
|
||||
ui.m_extraDetailsLabel->setStyleSheet(QLatin1String(extraDetailsLabelMargin));
|
||||
|
||||
//Setup the buttons
|
||||
ui.m_reloadBacktraceButton->setGuiItem(
|
||||
KGuiItem2(i18nc("@action:button", "&Reload"),
|
||||
KIcon("view-refresh"), i18nc("@info:tooltip", "Use this button to "
|
||||
"reload the crash information (backtrace). This is useful when you have "
|
||||
"installed the proper debug symbol packages and you want to obtain "
|
||||
"a better backtrace.")));
|
||||
connect(ui.m_reloadBacktraceButton, SIGNAL(clicked()), this, SLOT(regenerateBacktrace()));
|
||||
|
||||
ui.m_copyButton->setGuiItem(KGuiItem2(QString(), KIcon("edit-copy"),
|
||||
i18nc("@info:tooltip", "Use this button to copy the "
|
||||
"crash information (backtrace) to the clipboard.")));
|
||||
connect(ui.m_copyButton, SIGNAL(clicked()) , this, SLOT(copyClicked()));
|
||||
ui.m_copyButton->setEnabled(false);
|
||||
|
||||
ui.m_saveButton->setGuiItem(KGuiItem2(QString(),
|
||||
KIcon("document-save"),
|
||||
i18nc("@info:tooltip", "Use this button to save the "
|
||||
"crash information (backtrace) to a file. This is useful "
|
||||
"if you want to take a look at it or to report the bug "
|
||||
"later.")));
|
||||
connect(ui.m_saveButton, SIGNAL(clicked()) , this, SLOT(saveClicked()));
|
||||
ui.m_saveButton->setEnabled(false);
|
||||
|
||||
//Create the rating widget
|
||||
m_backtraceRatingWidget = new BacktraceRatingWidget(ui.m_statusWidget);
|
||||
ui.m_statusWidget->addCustomStatusWidget(m_backtraceRatingWidget);
|
||||
|
||||
ui.m_statusWidget->setIdle(QString());
|
||||
|
||||
//Do we need the "Show backtrace" toggle action ?
|
||||
if (!showToggleBacktrace) {
|
||||
ui.mainLayout->removeWidget(ui.m_toggleBacktraceCheckBox);
|
||||
ui.m_toggleBacktraceCheckBox->setVisible(false);
|
||||
toggleBacktrace(true);
|
||||
} else {
|
||||
//Generate help widget
|
||||
ui.m_backtraceHelpLabel->setText(
|
||||
i18n("<h2>What is a \"backtrace\" ?</h2><p>A backtrace basically describes what was "
|
||||
"happening inside the application when it crashed, so the developers may track "
|
||||
"down where the mess started. They may look meaningless to you, but they might "
|
||||
"actually contain a wealth of useful information.<br />Backtraces are commonly "
|
||||
"used during interactive and post-mortem debugging.</p>"));
|
||||
ui.m_backtraceHelpIcon->setPixmap(KIcon("help-hint").pixmap(48,48));
|
||||
connect(ui.m_toggleBacktraceCheckBox, SIGNAL(toggled(bool)), this,
|
||||
SLOT(toggleBacktrace(bool)));
|
||||
toggleBacktrace(false);
|
||||
}
|
||||
|
||||
ui.m_backtraceEdit->setFont( KGlobalSettings::fixedFont() );
|
||||
}
|
||||
|
||||
void BacktraceWidget::setAsLoading()
|
||||
{
|
||||
//remove the syntax highlighter
|
||||
delete m_highlighter;
|
||||
m_highlighter = 0;
|
||||
|
||||
//Set the widget as loading and disable all the action buttons
|
||||
ui.m_backtraceEdit->setText(i18nc("@info:status", "Loading..."));
|
||||
ui.m_backtraceEdit->setEnabled(false);
|
||||
|
||||
ui.m_statusWidget->setBusy(i18nc("@info:status",
|
||||
"Generating backtrace... (this may take some time)"));
|
||||
m_backtraceRatingWidget->setUsefulness(BacktraceParser::Useless);
|
||||
m_backtraceRatingWidget->setState(BacktraceGenerator::Loading);
|
||||
|
||||
ui.m_extraDetailsLabel->setVisible(false);
|
||||
ui.m_extraDetailsLabel->clear();
|
||||
|
||||
ui.m_reloadBacktraceButton->setEnabled(false);
|
||||
|
||||
ui.m_copyButton->setEnabled(false);
|
||||
ui.m_saveButton->setEnabled(false);
|
||||
}
|
||||
|
||||
//Force backtrace generation
|
||||
void BacktraceWidget::regenerateBacktrace()
|
||||
{
|
||||
setAsLoading();
|
||||
|
||||
if (!DrKonqi::debuggerManager()->debuggerIsRunning()) {
|
||||
m_btGenerator->start();
|
||||
} else {
|
||||
anotherDebuggerRunning();
|
||||
}
|
||||
|
||||
emit stateChanged();
|
||||
}
|
||||
|
||||
void BacktraceWidget::generateBacktrace()
|
||||
{
|
||||
if (m_btGenerator->state() == BacktraceGenerator::NotLoaded) {
|
||||
//First backtrace generation
|
||||
regenerateBacktrace();
|
||||
} else if (m_btGenerator->state() == BacktraceGenerator::Loading) {
|
||||
//Set in loading state, the widget will catch the backtrace events anyway
|
||||
setAsLoading();
|
||||
emit stateChanged();
|
||||
} else {
|
||||
//*Finished* states
|
||||
setAsLoading();
|
||||
emit stateChanged();
|
||||
//Load already generated information
|
||||
loadData();
|
||||
}
|
||||
}
|
||||
|
||||
void BacktraceWidget::anotherDebuggerRunning()
|
||||
{
|
||||
//As another debugger is running, we should disable the actions and notify the user
|
||||
ui.m_backtraceEdit->setEnabled(false);
|
||||
ui.m_backtraceEdit->setText(i18nc("@info", "Another debugger is currently debugging the "
|
||||
"same application. The crash information could not be fetched."));
|
||||
m_backtraceRatingWidget->setState(BacktraceGenerator::Failed);
|
||||
m_backtraceRatingWidget->setUsefulness(BacktraceParser::Useless);
|
||||
ui.m_statusWidget->setIdle(i18nc("@info:status", "The crash information could not be fetched."));
|
||||
ui.m_extraDetailsLabel->setVisible(true);
|
||||
ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "Another debugging process is attached to "
|
||||
"the crashed application. Therefore, the DrKonqi debugger cannot "
|
||||
"fetch the backtrace. Please close the other debugger and "
|
||||
"click <interface>Reload</interface>."));
|
||||
ui.m_reloadBacktraceButton->setEnabled(true);
|
||||
}
|
||||
|
||||
void BacktraceWidget::loadData()
|
||||
{
|
||||
//Load the backtrace data from the generator
|
||||
m_backtraceRatingWidget->setState(m_btGenerator->state());
|
||||
|
||||
if (m_btGenerator->state() == BacktraceGenerator::Loaded) {
|
||||
ui.m_backtraceEdit->setEnabled(true);
|
||||
ui.m_backtraceEdit->setPlainText(m_btGenerator->backtrace());
|
||||
|
||||
// scroll to crash
|
||||
QTextCursor crashCursor = ui.m_backtraceEdit->document()->find("[KCrash Handler]");
|
||||
if (!crashCursor.isNull()) {
|
||||
crashCursor.movePosition(QTextCursor::Up, QTextCursor::MoveAnchor);
|
||||
ui.m_backtraceEdit->verticalScrollBar()->setValue(ui.m_backtraceEdit->cursorRect(crashCursor).top());
|
||||
}
|
||||
|
||||
// highlight if possible
|
||||
if (m_btGenerator->debugger().codeName() == "gdb") {
|
||||
m_highlighter = new GdbHighlighter(
|
||||
ui.m_backtraceEdit->document(),
|
||||
m_btGenerator->parser()->parsedBacktraceLines()
|
||||
);
|
||||
} else if (m_btGenerator->debugger().codeName() == "lldb") {
|
||||
m_highlighter = new LldbHighlighter(
|
||||
ui.m_backtraceEdit->document(),
|
||||
m_btGenerator->parser()->parsedBacktraceLines()
|
||||
);
|
||||
}
|
||||
|
||||
BacktraceParser * btParser = m_btGenerator->parser();
|
||||
m_backtraceRatingWidget->setUsefulness(btParser->backtraceUsefulness());
|
||||
|
||||
//Generate the text to put in the status widget (backtrace usefulness)
|
||||
QString usefulnessText;
|
||||
switch (btParser->backtraceUsefulness()) {
|
||||
case BacktraceParser::ReallyUseful:
|
||||
usefulnessText = i18nc("@info", "The generated crash information is useful");
|
||||
break;
|
||||
case BacktraceParser::MayBeUseful:
|
||||
usefulnessText = i18nc("@info", "The generated crash information may be useful");
|
||||
break;
|
||||
case BacktraceParser::ProbablyUseless:
|
||||
usefulnessText = i18nc("@info", "The generated crash information is probably not useful");
|
||||
break;
|
||||
case BacktraceParser::Useless:
|
||||
usefulnessText = i18nc("@info", "The generated crash information is not useful");
|
||||
break;
|
||||
default:
|
||||
//let's hope nobody will ever see this... ;)
|
||||
usefulnessText = i18nc("@info", "The rating of this crash information is invalid. "
|
||||
"This is a bug in DrKonqi itself.");
|
||||
break;
|
||||
}
|
||||
ui.m_statusWidget->setIdle(usefulnessText);
|
||||
|
||||
if (btParser->backtraceUsefulness() != BacktraceParser::ReallyUseful) {
|
||||
//Not a perfect bactrace, ask the user to try to improve it
|
||||
ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "Please read <link url='%1'>How to "
|
||||
"create useful crash reports</link> to learn how to get a useful "
|
||||
"backtrace; install the needed packages (<link url='%2'>"
|
||||
"list of files</link>) and click the "
|
||||
"<interface>Reload</interface> button.",
|
||||
QLatin1String(TECHBASE_HOWTO_DOC_URL),
|
||||
QLatin1String("#missingDebugPackages")));
|
||||
}
|
||||
|
||||
ui.m_copyButton->setEnabled(true);
|
||||
ui.m_saveButton->setEnabled(true);
|
||||
} else if (m_btGenerator->state() == BacktraceGenerator::Failed) {
|
||||
//The backtrace could not be generated because the debugger had an error
|
||||
m_backtraceRatingWidget->setUsefulness(BacktraceParser::Useless);
|
||||
|
||||
ui.m_statusWidget->setIdle(i18nc("@info:status", "The debugger has quit unexpectedly."));
|
||||
|
||||
ui.m_backtraceEdit->setPlainText(i18nc("@info:status",
|
||||
"The crash information could not be generated."));
|
||||
|
||||
ui.m_extraDetailsLabel->setVisible(true);
|
||||
ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "You could try to regenerate the "
|
||||
"backtrace by clicking the <interface>Reload"
|
||||
"</interface> button."));
|
||||
} else if (m_btGenerator->state() == BacktraceGenerator::FailedToStart) {
|
||||
//The backtrace could not be generated because the debugger could not start (missing)
|
||||
//Tell the user to install it.
|
||||
m_backtraceRatingWidget->setUsefulness(BacktraceParser::Useless);
|
||||
|
||||
ui.m_statusWidget->setIdle(i18nc("@info:status", "<strong>The debugger application is missing or "
|
||||
"could not be launched.</strong>"));
|
||||
|
||||
ui.m_backtraceEdit->setPlainText(i18nc("@info:status",
|
||||
"The crash information could not be generated."));
|
||||
ui.m_extraDetailsLabel->setVisible(true);
|
||||
ui.m_extraDetailsLabel->setText(i18nc("@info/rich", "<strong>You need to first install the debugger "
|
||||
"application (%1) then click the <interface>Reload"
|
||||
"</interface> button.</strong>",
|
||||
m_btGenerator->debugger().name()));
|
||||
}
|
||||
|
||||
ui.m_reloadBacktraceButton->setEnabled(true);
|
||||
emit stateChanged();
|
||||
}
|
||||
|
||||
void BacktraceWidget::backtraceNewLine(const QString & line)
|
||||
{
|
||||
//While loading the backtrace (unparsed) a new line was sent from the debugger, append it
|
||||
ui.m_backtraceEdit->append(line.trimmed());
|
||||
}
|
||||
|
||||
void BacktraceWidget::copyClicked()
|
||||
{
|
||||
ui.m_backtraceEdit->selectAll();
|
||||
ui.m_backtraceEdit->copy();
|
||||
}
|
||||
|
||||
void BacktraceWidget::saveClicked()
|
||||
{
|
||||
DrKonqi::saveReport(m_btGenerator->backtrace(), this);
|
||||
}
|
||||
|
||||
void BacktraceWidget::hilightExtraDetailsLabel(bool hilight)
|
||||
{
|
||||
QString stylesheet;
|
||||
if (hilight) {
|
||||
stylesheet = QLatin1String("border-width: 2px; "
|
||||
"border-style: solid; "
|
||||
"border-color: red;");
|
||||
} else {
|
||||
stylesheet = QLatin1String("border-width: 0px;");
|
||||
}
|
||||
stylesheet += QLatin1String(extraDetailsLabelMargin);
|
||||
ui.m_extraDetailsLabel->setStyleSheet(stylesheet);
|
||||
}
|
||||
|
||||
void BacktraceWidget::toggleBacktrace(bool show)
|
||||
{
|
||||
ui.m_backtraceStack->setCurrentWidget(show ? ui.backtracePage : ui.backtraceHelpPage);
|
||||
}
|
||||
|
||||
void BacktraceWidget::extraDetailsLinkActivated(QString link)
|
||||
{
|
||||
if (link.startsWith(QLatin1String("http"))) {
|
||||
//Open externally
|
||||
KToolInvocation::invokeBrowser(link);
|
||||
} else if (link == QLatin1String("#missingDebugPackages")) {
|
||||
BacktraceParser * btParser = m_btGenerator->parser();
|
||||
|
||||
QStringList missingDbgForFiles = btParser->librariesWithMissingDebugSymbols().toList();
|
||||
missingDbgForFiles.insert(0, DrKonqi::crashedApplication()->executable().absoluteFilePath());
|
||||
|
||||
//HTML message
|
||||
QString message;
|
||||
message = "<html>";
|
||||
message += i18n("The packages containing debug information for the following application and libraries are missing:");
|
||||
message += "<br /><ul>";
|
||||
|
||||
Q_FOREACH(const QString & string, missingDbgForFiles) {
|
||||
message += "<li>" + string + "</li>";
|
||||
}
|
||||
|
||||
message += "</ul></html>";
|
||||
|
||||
KMessageBox::information(this, message, i18nc("messagebox title","Missing debug information packages"));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
/*******************************************************************
|
||||
* backtracewidget.h
|
||||
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
#ifndef BACKTRACEWIDGET__H
|
||||
#define BACKTRACEWIDGET__H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QSyntaxHighlighter>
|
||||
|
||||
#include "ui_backtracewidget.h"
|
||||
|
||||
class BacktraceRatingWidget;
|
||||
class BacktraceGenerator;
|
||||
|
||||
class BacktraceWidget: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BacktraceWidget(BacktraceGenerator *generator, QWidget *parent = 0,
|
||||
bool showToggleBacktrace = false);
|
||||
|
||||
public Q_SLOTS:
|
||||
void generateBacktrace();
|
||||
void hilightExtraDetailsLabel(bool hilight);
|
||||
|
||||
void toggleBacktrace(bool show);
|
||||
void extraDetailsLinkActivated(QString link);
|
||||
|
||||
Q_SIGNALS:
|
||||
void stateChanged();
|
||||
|
||||
private:
|
||||
BacktraceGenerator *m_btGenerator;
|
||||
Ui::Form ui;
|
||||
BacktraceRatingWidget *m_backtraceRatingWidget;
|
||||
QSyntaxHighlighter *m_highlighter;
|
||||
|
||||
void setAsLoading();
|
||||
|
||||
private Q_SLOTS:
|
||||
void loadData();
|
||||
void backtraceNewLine(const QString &);
|
||||
|
||||
void regenerateBacktrace();
|
||||
|
||||
void saveClicked();
|
||||
void copyClicked();
|
||||
|
||||
void anotherDebuggerRunning();
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,171 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>511</width>
|
||||
<height>476</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true" extracomment="This is an internal name that is never shown...">GetBacktraceWidget</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="StatusWidget" name="m_statusWidget" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="mainLayout">
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="m_backtraceStack">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="backtracePage">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="m_backtraceEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="backtraceHelpPage">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_backtraceHelpIcon">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>48</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="m_backtraceHelpLabel">
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="m_toggleBacktraceCheckBox">
|
||||
<property name="text">
|
||||
<string>Show backtrace content (advanced)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="KPushButton" name="m_reloadBacktraceButton">
|
||||
<property name="isDragEnabled" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="KPushButton" name="m_copyButton"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="KPushButton" name="m_saveButton"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="m_extraDetailsLabel">
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KPushButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>kpushbutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>StatusWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>statuswidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1 +0,0 @@
|
|||
#cmakedefine HAVE_STRSIGNAL 1
|
|
@ -1,151 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config-drkonqi.h>
|
||||
|
||||
#include "crashedapplication.h"
|
||||
|
||||
#if defined(HAVE_STRSIGNAL)
|
||||
# include <clocale>
|
||||
# include <cstring>
|
||||
# include <cstdlib>
|
||||
#else
|
||||
# include <signal.h>
|
||||
#endif
|
||||
|
||||
#include <KToolInvocation>
|
||||
|
||||
CrashedApplication::CrashedApplication(QObject *parent)
|
||||
: QObject(parent),
|
||||
m_pid(0),
|
||||
m_signalNumber(0),
|
||||
m_restarted(false),
|
||||
m_thread(0)
|
||||
{
|
||||
}
|
||||
|
||||
CrashedApplication::~CrashedApplication()
|
||||
{
|
||||
}
|
||||
|
||||
QString CrashedApplication::name() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
QFileInfo CrashedApplication::executable() const
|
||||
{
|
||||
return m_executable;
|
||||
}
|
||||
|
||||
QString CrashedApplication::executableBaseName() const
|
||||
{
|
||||
return m_executable.baseName();
|
||||
}
|
||||
|
||||
QString CrashedApplication::version() const
|
||||
{
|
||||
return m_version;
|
||||
}
|
||||
|
||||
QString CrashedApplication::bugReportAddress() const
|
||||
{
|
||||
return m_reportAddress;
|
||||
}
|
||||
|
||||
int CrashedApplication::pid() const
|
||||
{
|
||||
return m_pid;
|
||||
}
|
||||
|
||||
int CrashedApplication::signalNumber() const
|
||||
{
|
||||
return m_signalNumber;
|
||||
}
|
||||
|
||||
QString CrashedApplication::signalName() const
|
||||
{
|
||||
#if defined(HAVE_STRSIGNAL)
|
||||
const char * oldLocale = std::setlocale(LC_MESSAGES, NULL);
|
||||
char * savedLocale;
|
||||
if (oldLocale) {
|
||||
savedLocale = strdup(oldLocale);
|
||||
} else {
|
||||
savedLocale = NULL;
|
||||
}
|
||||
std::setlocale(LC_MESSAGES, "C");
|
||||
const char *name = strsignal(m_signalNumber);
|
||||
std::setlocale(LC_MESSAGES, savedLocale);
|
||||
std::free(savedLocale);
|
||||
return QString::fromLocal8Bit(name != NULL ? name : "Unknown");
|
||||
#else
|
||||
switch (m_signalNumber) {
|
||||
case SIGILL: return QString::fromLatin1("SIGILL");
|
||||
case SIGABRT: return QString::fromLatin1("SIGABRT");
|
||||
case SIGFPE: return QString::fromLatin1("SIGFPE");
|
||||
case SIGSEGV: return QString::fromLatin1("SIGSEGV");
|
||||
case SIGBUS: return QString::fromLatin1("SIGBUS");
|
||||
default: return QString::fromLatin1("Unknown");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CrashedApplication::hasBeenRestarted() const
|
||||
{
|
||||
return m_restarted;
|
||||
}
|
||||
|
||||
int CrashedApplication::thread() const
|
||||
{
|
||||
return m_thread;
|
||||
}
|
||||
|
||||
const QDateTime& CrashedApplication::datetime() const
|
||||
{
|
||||
return m_datetime;
|
||||
}
|
||||
|
||||
void CrashedApplication::restart()
|
||||
{
|
||||
if (m_restarted) {
|
||||
return;
|
||||
}
|
||||
|
||||
//start the application via klauncher, as it needs to have a pristine environment and
|
||||
//QProcess::startDetached() can't start a new process with custom environment variables.
|
||||
int ret = KToolInvocation::kdeinitExec(m_executable.absoluteFilePath());
|
||||
|
||||
const bool success = (ret == 0);
|
||||
|
||||
m_restarted = success;
|
||||
emit restarted(success);
|
||||
}
|
||||
|
||||
QString getSuggestedKCrashFilename(const CrashedApplication* app)
|
||||
{
|
||||
QString filename = app->executableBaseName() + '-' +
|
||||
app->datetime().toString("yyyyMMdd-hhmmss") +
|
||||
".kcrash.txt";
|
||||
|
||||
if (filename.contains('/')) {
|
||||
filename = filename.mid(filename.lastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
#include "moc_crashedapplication.cpp"
|
|
@ -1,85 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef CRASHEDAPPLICATION_H
|
||||
#define CRASHEDAPPLICATION_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QFileInfo>
|
||||
|
||||
class KCrashBackend;
|
||||
|
||||
class CrashedApplication : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual ~CrashedApplication();
|
||||
|
||||
/** Returns the crashed program's name, possibly translated (ex. "The KDE Crash Handler") */
|
||||
QString name() const;
|
||||
|
||||
/** Returns a QFileInfo with information about the executable that crashed */
|
||||
QFileInfo executable() const;
|
||||
|
||||
/** This method returns executable().baseName() */
|
||||
QString executableBaseName() const;
|
||||
|
||||
/** Returns the version of the crashed program */
|
||||
QString version() const;
|
||||
|
||||
/** Returns the address where the bug report for this application should go */
|
||||
QString bugReportAddress() const;
|
||||
|
||||
/** Returns the pid of the crashed program */
|
||||
int pid() const;
|
||||
|
||||
/** Returns the signal number that the crashed program received */
|
||||
int signalNumber() const;
|
||||
|
||||
/** Returns the name of the signal (ex. SIGSEGV) */
|
||||
QString signalName() const;
|
||||
|
||||
bool hasBeenRestarted() const;
|
||||
|
||||
int thread() const;
|
||||
|
||||
const QDateTime& datetime() const;
|
||||
|
||||
public slots:
|
||||
void restart();
|
||||
|
||||
signals:
|
||||
void restarted(bool success);
|
||||
|
||||
protected:
|
||||
friend class KCrashBackend;
|
||||
CrashedApplication(QObject *parent = 0);
|
||||
|
||||
int m_pid;
|
||||
int m_signalNumber;
|
||||
QString m_name;
|
||||
QFileInfo m_executable;
|
||||
QString m_version;
|
||||
QString m_reportAddress;
|
||||
bool m_restarted;
|
||||
int m_thread;
|
||||
QDateTime m_datetime;
|
||||
};
|
||||
|
||||
QString getSuggestedKCrashFilename(const CrashedApplication* app);
|
||||
|
||||
#endif // CRASHEDAPPLICATION_H
|
|
@ -1,9 +0,0 @@
|
|||
install(
|
||||
FILES crash.png
|
||||
DESTINATION ${KDE4_DATA_INSTALL_DIR}/drkonqi/pics
|
||||
)
|
||||
install(
|
||||
DIRECTORY debuggers
|
||||
DESTINATION ${KDE4_DATA_INSTALL_DIR}/drkonqi
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB |
80
drkonqi/data/debuggers/external/gdbrc
vendored
80
drkonqi/data/debuggers/external/gdbrc
vendored
|
@ -1,80 +0,0 @@
|
|||
[General]
|
||||
Name=gdb
|
||||
Name[ar]=gdb
|
||||
Name[ast]=gdb
|
||||
Name[bg]=gdb
|
||||
Name[bn]=gdb
|
||||
Name[bs]=GDB
|
||||
Name[ca]=gdb
|
||||
Name[ca@valencia]=gdb
|
||||
Name[cs]=gdb
|
||||
Name[csb]=gdb
|
||||
Name[da]=gdb
|
||||
Name[de]=gdb
|
||||
Name[el]=gdb
|
||||
Name[en_GB]=gdb
|
||||
Name[eo]=gdb
|
||||
Name[es]=gdb
|
||||
Name[et]=gdb
|
||||
Name[eu]=gdb
|
||||
Name[fa]=gdb
|
||||
Name[fi]=gdb
|
||||
Name[fr]=gdb
|
||||
Name[fy]=gdb
|
||||
Name[ga]=gdb
|
||||
Name[gl]=gdb
|
||||
Name[gu]=gdb
|
||||
Name[he]=gdb
|
||||
Name[hi]=gdb
|
||||
Name[hr]=gdb
|
||||
Name[hu]=gdb
|
||||
Name[ia]=gdb
|
||||
Name[id]=gdb
|
||||
Name[is]=gdb
|
||||
Name[it]=gdb
|
||||
Name[ja]=gdb
|
||||
Name[ka]=gdb
|
||||
Name[kk]=gdb
|
||||
Name[km]=gdb
|
||||
Name[kn]=gdb
|
||||
Name[ko]=gdb
|
||||
Name[lt]=gdb
|
||||
Name[lv]=gdb
|
||||
Name[mai]=gdb
|
||||
Name[mk]=gdb
|
||||
Name[ml]=ജിഡിബി
|
||||
Name[mr]=gdb
|
||||
Name[nb]=gdb
|
||||
Name[nds]=gdb
|
||||
Name[nl]=gdb
|
||||
Name[nn]=gdb
|
||||
Name[pa]=gdb
|
||||
Name[pl]=gdb
|
||||
Name[pt]=gdb
|
||||
Name[pt_BR]=gdb
|
||||
Name[ro]=gdb
|
||||
Name[ru]=gdb
|
||||
Name[si]=gdb
|
||||
Name[sk]=gdb
|
||||
Name[sl]=gdb
|
||||
Name[sr]=ГДБ
|
||||
Name[sr@ijekavian]=ГДБ
|
||||
Name[sr@ijekavianlatin]=GDB
|
||||
Name[sr@latin]=GDB
|
||||
Name[sv]=gdb
|
||||
Name[tg]=gdb
|
||||
Name[th]=gdb
|
||||
Name[tr]=gdb
|
||||
Name[ug]=gdb
|
||||
Name[uk]=gdb
|
||||
Name[vi]=gdb
|
||||
Name[wa]=gdb
|
||||
Name[x-test]=xxgdbxx
|
||||
Name[zh_CN]=gdb
|
||||
Name[zh_TW]=gdb
|
||||
TryExec=gdb
|
||||
Backends=KCrash
|
||||
|
||||
[KCrash]
|
||||
Exec=konsole -e gdb -nw -p %pid %execpath
|
||||
Terminal=true
|
79
drkonqi/data/debuggers/external/kdbgrc
vendored
79
drkonqi/data/debuggers/external/kdbgrc
vendored
|
@ -1,79 +0,0 @@
|
|||
[General]
|
||||
Name=kdbg
|
||||
Name[ar]=kdbg
|
||||
Name[ast]=kdbg
|
||||
Name[bg]=kdbg
|
||||
Name[bn]=kdbg
|
||||
Name[bs]=Kdbg
|
||||
Name[ca]=kdbg
|
||||
Name[ca@valencia]=kdbg
|
||||
Name[cs]=kdbg
|
||||
Name[csb]=kdbg
|
||||
Name[da]=kdbg
|
||||
Name[de]=kdbg
|
||||
Name[el]=kdbg
|
||||
Name[en_GB]=kdbg
|
||||
Name[eo]=kdbg
|
||||
Name[es]=kdbg
|
||||
Name[et]=kdbg
|
||||
Name[eu]=kdbg
|
||||
Name[fa]=kdbg
|
||||
Name[fi]=kdbg
|
||||
Name[fr]=kdbg
|
||||
Name[fy]=kdbg
|
||||
Name[ga]=kdbg
|
||||
Name[gl]=kdbg
|
||||
Name[gu]=kdbg
|
||||
Name[he]=kdbg
|
||||
Name[hi]=kdbg
|
||||
Name[hr]=kdbg
|
||||
Name[hu]=kdbg
|
||||
Name[ia]=kdbg
|
||||
Name[id]=kdbg
|
||||
Name[is]=kdbg
|
||||
Name[it]=kdbg
|
||||
Name[ja]=kdbg
|
||||
Name[ka]=kdbg
|
||||
Name[kk]=kdbg
|
||||
Name[km]=kdbg
|
||||
Name[kn]=kdbg
|
||||
Name[ko]=kdbg
|
||||
Name[lt]=kdbg
|
||||
Name[lv]=kdbg
|
||||
Name[mai]=kdbg
|
||||
Name[mk]=kdbg
|
||||
Name[ml]=കെഡിബിജി
|
||||
Name[mr]=kdbg
|
||||
Name[nb]=kdbg
|
||||
Name[nds]=kgdb
|
||||
Name[nl]=kdbg
|
||||
Name[nn]=kdbg
|
||||
Name[pa]=kdbg
|
||||
Name[pl]=kdbg
|
||||
Name[pt]=kdbg
|
||||
Name[pt_BR]=kdbg
|
||||
Name[ro]=kdbg
|
||||
Name[ru]=kdbg
|
||||
Name[si]=kdbg
|
||||
Name[sk]=kdbg
|
||||
Name[sl]=kdbg
|
||||
Name[sr]=Кдбг
|
||||
Name[sr@ijekavian]=Кдбг
|
||||
Name[sr@ijekavianlatin]=KDbg
|
||||
Name[sr@latin]=KDbg
|
||||
Name[sv]=kdbg
|
||||
Name[tg]=kdbg
|
||||
Name[th]=kdbg
|
||||
Name[tr]=kdbg
|
||||
Name[ug]=kdbg
|
||||
Name[uk]=kdbg
|
||||
Name[vi]=kdbg
|
||||
Name[wa]=kdbg
|
||||
Name[x-test]=xxkdbgxx
|
||||
Name[zh_CN]=kdbg
|
||||
Name[zh_TW]=kdbg
|
||||
TryExec=kdbg
|
||||
Backends=KCrash
|
||||
|
||||
[KCrash]
|
||||
Exec=kdbg -p %pid %execpath
|
8
drkonqi/data/debuggers/external/lldbrc
vendored
8
drkonqi/data/debuggers/external/lldbrc
vendored
|
@ -1,8 +0,0 @@
|
|||
[General]
|
||||
Name=lldb
|
||||
TryExec=lldb
|
||||
Backends=KCrash
|
||||
|
||||
[KCrash]
|
||||
Exec=konsole -e lldb --attach-pid %pid
|
||||
Terminal=true
|
|
@ -1,76 +0,0 @@
|
|||
[General]
|
||||
Name=dbx
|
||||
Name[ar]=dbx
|
||||
Name[ast]=dbx
|
||||
Name[bg]=dbx
|
||||
Name[bn]=dbx
|
||||
Name[bs]=DBX
|
||||
Name[ca]=dbx
|
||||
Name[ca@valencia]=dbx
|
||||
Name[cs]=dbx
|
||||
Name[da]=dbx
|
||||
Name[de]=dbx
|
||||
Name[el]=dbx
|
||||
Name[en_GB]=dbx
|
||||
Name[eo]=dbx
|
||||
Name[es]=dbx
|
||||
Name[et]=dbx
|
||||
Name[eu]=dbx
|
||||
Name[fa]=dbx
|
||||
Name[fi]=dbx
|
||||
Name[fr]=dbx
|
||||
Name[ga]=dbx
|
||||
Name[gl]=dbx
|
||||
Name[gu]=dbx
|
||||
Name[he]=dbx
|
||||
Name[hi]=dbx
|
||||
Name[hr]=dbx
|
||||
Name[hu]=dbx
|
||||
Name[ia]=dbx
|
||||
Name[id]=dbx
|
||||
Name[is]=dbx
|
||||
Name[it]=dbx
|
||||
Name[ja]=dbx
|
||||
Name[kk]=dbx
|
||||
Name[km]=dbx
|
||||
Name[kn]=dbx
|
||||
Name[ko]=dbx
|
||||
Name[lt]=dbx
|
||||
Name[lv]=dbx
|
||||
Name[mai]=dbx
|
||||
Name[mr]=dbx
|
||||
Name[nb]=gdb
|
||||
Name[nds]=dbx
|
||||
Name[nl]=dbx
|
||||
Name[nn]=dbx
|
||||
Name[pa]=dbx
|
||||
Name[pl]=dbx
|
||||
Name[pt]=dbx
|
||||
Name[pt_BR]=dbx
|
||||
Name[ro]=dbx
|
||||
Name[ru]=dbx
|
||||
Name[si]=dbx
|
||||
Name[sk]=dbx
|
||||
Name[sl]=dbx
|
||||
Name[sr]=ДБИкс
|
||||
Name[sr@ijekavian]=ДБИкс
|
||||
Name[sr@ijekavianlatin]=DBX
|
||||
Name[sr@latin]=DBX
|
||||
Name[sv]=dbx
|
||||
Name[tg]=dbx
|
||||
Name[th]=dbx
|
||||
Name[tr]=dbx
|
||||
Name[ug]=dbx
|
||||
Name[uk]=dbx
|
||||
Name[vi]=dbx
|
||||
Name[wa]=dbx
|
||||
Name[x-test]=xxdbxxx
|
||||
Name[zh_CN]=dbx
|
||||
Name[zh_TW]=dbx
|
||||
TryExec=dbx
|
||||
Backends=KCrash
|
||||
|
||||
[KCrash]
|
||||
Exec=dbx -c "where -l -v -h;quit" - %pid
|
||||
BatchCommands=where
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
[General]
|
||||
Name=gdb
|
||||
Name[ar]=gdb
|
||||
Name[ast]=gdb
|
||||
Name[bg]=gdb
|
||||
Name[bn]=gdb
|
||||
Name[bs]=GDB
|
||||
Name[ca]=gdb
|
||||
Name[ca@valencia]=gdb
|
||||
Name[cs]=gdb
|
||||
Name[csb]=gdb
|
||||
Name[da]=gdb
|
||||
Name[de]=gdb
|
||||
Name[el]=gdb
|
||||
Name[en_GB]=gdb
|
||||
Name[eo]=gdb
|
||||
Name[es]=gdb
|
||||
Name[et]=gdb
|
||||
Name[eu]=gdb
|
||||
Name[fa]=gdb
|
||||
Name[fi]=gdb
|
||||
Name[fr]=gdb
|
||||
Name[fy]=gdb
|
||||
Name[ga]=gdb
|
||||
Name[gl]=gdb
|
||||
Name[gu]=gdb
|
||||
Name[he]=gdb
|
||||
Name[hi]=gdb
|
||||
Name[hr]=gdb
|
||||
Name[hu]=gdb
|
||||
Name[ia]=gdb
|
||||
Name[id]=gdb
|
||||
Name[is]=gdb
|
||||
Name[it]=gdb
|
||||
Name[ja]=gdb
|
||||
Name[ka]=gdb
|
||||
Name[kk]=gdb
|
||||
Name[km]=gdb
|
||||
Name[kn]=gdb
|
||||
Name[ko]=gdb
|
||||
Name[lt]=gdb
|
||||
Name[lv]=gdb
|
||||
Name[mai]=gdb
|
||||
Name[mk]=gdb
|
||||
Name[ml]=ജിഡിബി
|
||||
Name[mr]=gdb
|
||||
Name[nb]=gdb
|
||||
Name[nds]=gdb
|
||||
Name[nl]=gdb
|
||||
Name[nn]=gdb
|
||||
Name[pa]=gdb
|
||||
Name[pl]=gdb
|
||||
Name[pt]=gdb
|
||||
Name[pt_BR]=gdb
|
||||
Name[ro]=gdb
|
||||
Name[ru]=gdb
|
||||
Name[si]=gdb
|
||||
Name[sk]=gdb
|
||||
Name[sl]=gdb
|
||||
Name[sr]=ГДБ
|
||||
Name[sr@ijekavian]=ГДБ
|
||||
Name[sr@ijekavianlatin]=GDB
|
||||
Name[sr@latin]=GDB
|
||||
Name[sv]=gdb
|
||||
Name[tg]=gdb
|
||||
Name[th]=gdb
|
||||
Name[tr]=gdb
|
||||
Name[ug]=gdb
|
||||
Name[uk]=gdb
|
||||
Name[vi]=gdb
|
||||
Name[wa]=gdb
|
||||
Name[x-test]=xxgdbxx
|
||||
Name[zh_CN]=gdb
|
||||
Name[zh_TW]=gdb
|
||||
TryExec=gdb
|
||||
Backends=KCrash
|
||||
|
||||
[KCrash]
|
||||
Exec=gdb -nw -n -batch -x %tempfile -p %pid %execpath
|
||||
BatchCommands=set width 200\nthread\nthread apply all bt
|
|
@ -1,8 +0,0 @@
|
|||
[General]
|
||||
Name=lldb
|
||||
TryExec=lldb
|
||||
Backends=KCrash
|
||||
|
||||
[KCrash]
|
||||
Exec=lldb --batch --source %tempfile --attach-pid %pid
|
||||
BatchCommands=settings set use-color no\nthread backtrace all
|
|
@ -1,147 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "debugger.h"
|
||||
|
||||
#include <KConfig>
|
||||
#include <KConfigGroup>
|
||||
#include <KGlobal>
|
||||
#include <KStandardDirs>
|
||||
#include <KMacroExpanderBase>
|
||||
#include <KDebug>
|
||||
|
||||
#include "crashedapplication.h"
|
||||
#include "drkonqi.h"
|
||||
|
||||
//static
|
||||
QList<Debugger> Debugger::availableInternalDebuggers(const QString & backend)
|
||||
{
|
||||
return availableDebuggers("debuggers/internal/*", backend);
|
||||
}
|
||||
|
||||
//static
|
||||
QList<Debugger> Debugger::availableExternalDebuggers(const QString & backend)
|
||||
{
|
||||
return availableDebuggers("debuggers/external/*", backend);
|
||||
}
|
||||
|
||||
bool Debugger::isValid() const
|
||||
{
|
||||
return !m_config.isNull();
|
||||
}
|
||||
|
||||
bool Debugger::isInstalled() const
|
||||
{
|
||||
QString tryexec = tryExec();
|
||||
return !tryexec.isEmpty() && !KStandardDirs::findExe(tryexec).isEmpty();
|
||||
}
|
||||
|
||||
QString Debugger::name() const
|
||||
{
|
||||
return isValid() ? m_config->group("General").readEntry("Name") : QString();
|
||||
}
|
||||
|
||||
QString Debugger::codeName() const
|
||||
{
|
||||
//fall back to the "TryExec" string if "CodeName" is not specified.
|
||||
//for most debuggers those strings should be the same
|
||||
return isValid() ? m_config->group("General").readEntry("CodeName", tryExec()) : QString();
|
||||
}
|
||||
|
||||
QString Debugger::tryExec() const
|
||||
{
|
||||
return isValid() ? m_config->group("General").readEntry("TryExec") : QString();
|
||||
}
|
||||
|
||||
QStringList Debugger::supportedBackends() const
|
||||
{
|
||||
return isValid() ? m_config->group("General").readEntry("Backends")
|
||||
.split('|', QString::SkipEmptyParts) : QStringList();
|
||||
}
|
||||
|
||||
void Debugger::setUsedBackend(const QString & backendName)
|
||||
{
|
||||
if (supportedBackends().contains(backendName)) {
|
||||
m_backend = backendName;
|
||||
}
|
||||
}
|
||||
|
||||
QString Debugger::command() const
|
||||
{
|
||||
if (!isValid() || !m_config->hasGroup(m_backend)) {
|
||||
return QString();
|
||||
} else {
|
||||
return m_config->group(m_backend).readPathEntry("Exec", QString());
|
||||
}
|
||||
}
|
||||
|
||||
QString Debugger::backtraceBatchCommands() const
|
||||
{
|
||||
if (!isValid() || !m_config->hasGroup(m_backend)) {
|
||||
return QString();
|
||||
} else {
|
||||
return m_config->group(m_backend).readEntry("BatchCommands");
|
||||
}
|
||||
}
|
||||
|
||||
bool Debugger::runInTerminal() const
|
||||
{
|
||||
if (!isValid() || !m_config->hasGroup(m_backend)) {
|
||||
return false;
|
||||
} else {
|
||||
return m_config->group(m_backend).readEntry("Terminal", false);
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void Debugger::expandString(QString & str, ExpandStringUsage usage, const QString & tempFile)
|
||||
{
|
||||
const CrashedApplication *appInfo = DrKonqi::crashedApplication();
|
||||
QHash<QString, QString> map;
|
||||
map[QLatin1String("progname")] = appInfo->name();
|
||||
map[QLatin1String("execname")] = appInfo->executableBaseName();
|
||||
map[QLatin1String("execpath")] = appInfo->executable().absoluteFilePath();
|
||||
map[QLatin1String("signum")] = QString::number(appInfo->signalNumber());
|
||||
map[QLatin1String("signame")] = appInfo->signalName();
|
||||
map[QLatin1String("pid")] = QString::number(appInfo->pid());
|
||||
map[QLatin1String("tempfile")] = tempFile;
|
||||
map[QLatin1String("thread")] = QString::number(appInfo->thread());
|
||||
|
||||
if (usage == ExpansionUsageShell) {
|
||||
str = KMacroExpander::expandMacrosShellQuote(str, map);
|
||||
} else {
|
||||
str = KMacroExpander::expandMacros(str, map);
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
QList<Debugger> Debugger::availableDebuggers(const char *regexp, const QString & backend)
|
||||
{
|
||||
KStandardDirs *dirs = KGlobal::dirs();
|
||||
QStringList debuggers = dirs->findAllResources("appdata", QLatin1String(regexp),
|
||||
KStandardDirs::NoDuplicates);
|
||||
|
||||
QList<Debugger> result;
|
||||
foreach (const QString & debuggerFile, debuggers) {
|
||||
Debugger debugger;
|
||||
debugger.m_config = KSharedConfig::openConfig(debuggerFile);
|
||||
if (debugger.supportedBackends().contains(backend)) {
|
||||
debugger.setUsedBackend(backend);
|
||||
result.append(debugger);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef DEBUGGER_H
|
||||
#define DEBUGGER_H
|
||||
|
||||
#include <QtCore/QString>
|
||||
|
||||
#include <KSharedConfig>
|
||||
|
||||
class Debugger
|
||||
{
|
||||
public:
|
||||
static QList<Debugger> availableInternalDebuggers(const QString & backend);
|
||||
static QList<Debugger> availableExternalDebuggers(const QString & backend);
|
||||
|
||||
/** Returns true if this Debugger instance is valid, or false otherwise.
|
||||
* Debugger instances are valid only if they have been constructed from
|
||||
* availableInternalDebuggers() or availableExternalDebuggers(). If they
|
||||
* have been constructed directly using the Debugger constructor, they are invalid.
|
||||
*/
|
||||
bool isValid() const;
|
||||
|
||||
/** Returns true if this debugger is installed. This is determined by
|
||||
* looking for the executable that tryExec() returns. If it is in $PATH,
|
||||
* this method returns true.
|
||||
*/
|
||||
bool isInstalled() const;
|
||||
|
||||
/** Returns the translatable name of the debugger (eg. "GDB") */
|
||||
QString name() const;
|
||||
|
||||
/** Returns the code name of the debugger (eg. "gdb"). */
|
||||
QString codeName() const;
|
||||
|
||||
/** Returns the executable name that drkonqi should check if it exists
|
||||
* to determine whether the debugger is installed
|
||||
*/
|
||||
QString tryExec() const;
|
||||
|
||||
/** Returns a list with the drkonqi backends that this debugger supports */
|
||||
QStringList supportedBackends() const;
|
||||
|
||||
/** Sets the backend to be used. This function must be called before using
|
||||
* command(), backtraceBatchCommands() or runInTerminal().
|
||||
*/
|
||||
void setUsedBackend(const QString & backendName);
|
||||
|
||||
/** Returns the command that should be run to use the debugger */
|
||||
QString command() const;
|
||||
|
||||
/** Returns the commands that should be given to the debugger when
|
||||
* run in batch mode in order to generate a backtrace
|
||||
*/
|
||||
QString backtraceBatchCommands() const;
|
||||
|
||||
/** If this is an external debugger, it returns whether it should be run in a terminal or not */
|
||||
bool runInTerminal() const;
|
||||
|
||||
|
||||
enum ExpandStringUsage {
|
||||
ExpansionUsagePlainText,
|
||||
ExpansionUsageShell
|
||||
};
|
||||
|
||||
static void expandString(QString & str, ExpandStringUsage usage = ExpansionUsagePlainText,
|
||||
const QString & tempFile = QString());
|
||||
|
||||
private:
|
||||
static QList<Debugger> availableDebuggers(const char *regexp, const QString & backend);
|
||||
KSharedConfig::Ptr m_config;
|
||||
QString m_backend;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,82 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "debuggerlaunchers.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDir>
|
||||
#include <QDBusConnection>
|
||||
|
||||
#include <KShell>
|
||||
#include <KDebug>
|
||||
|
||||
#include "detachedprocessmonitor.h"
|
||||
#include "drkonqi.h"
|
||||
#include "crashedapplication.h"
|
||||
|
||||
DefaultDebuggerLauncher::DefaultDebuggerLauncher(const Debugger & debugger, DebuggerManager *parent)
|
||||
: AbstractDebuggerLauncher(parent), m_debugger(debugger)
|
||||
{
|
||||
m_monitor = new DetachedProcessMonitor(this);
|
||||
connect(m_monitor, SIGNAL(processFinished()), SLOT(onProcessFinished()));
|
||||
}
|
||||
|
||||
QString DefaultDebuggerLauncher::name() const
|
||||
{
|
||||
return m_debugger.name();
|
||||
}
|
||||
|
||||
void DefaultDebuggerLauncher::start()
|
||||
{
|
||||
if ( qobject_cast<DebuggerManager*>(parent())->debuggerIsRunning() ) {
|
||||
kWarning() << "Another debugger is already running";
|
||||
return;
|
||||
}
|
||||
|
||||
QString str = m_debugger.command();
|
||||
Debugger::expandString(str, Debugger::ExpansionUsageShell);
|
||||
|
||||
emit starting();
|
||||
QStringList procargs = KShell::splitArgs(str);
|
||||
QString procprog = procargs.takeAt(0);
|
||||
Q_PID procpid = 0;
|
||||
const bool started = QProcess::startDetached(procprog, procargs, QDir::currentPath(), &procpid);
|
||||
if ( started && procpid > 0 ) {
|
||||
m_monitor->startMonitoring(procpid);
|
||||
} else {
|
||||
kError() << "Could not start debugger:" << name();
|
||||
emit finished();
|
||||
}
|
||||
}
|
||||
|
||||
void DefaultDebuggerLauncher::onProcessFinished()
|
||||
{
|
||||
emit finished();
|
||||
}
|
||||
|
||||
#if 0
|
||||
TerminalDebuggerLauncher::TerminalDebuggerLauncher(const Debugger & debugger, DebuggerManager *parent)
|
||||
: DefaultDebuggerLauncher(debugger, parent)
|
||||
{
|
||||
}
|
||||
|
||||
void TerminalDebuggerLauncher::start()
|
||||
{
|
||||
DefaultDebuggerLauncher::start(); //FIXME
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "moc_debuggerlaunchers.cpp"
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef DEBUGGERLAUNCHERS_H
|
||||
#define DEBUGGERLAUNCHERS_H
|
||||
|
||||
#include <QtDBus/QDBusAbstractAdaptor>
|
||||
|
||||
#include "debugger.h"
|
||||
#include "debuggermanager.h"
|
||||
|
||||
class DetachedProcessMonitor;
|
||||
|
||||
class AbstractDebuggerLauncher : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString name READ name)
|
||||
public:
|
||||
explicit AbstractDebuggerLauncher(DebuggerManager *parent = 0) : QObject(parent) {}
|
||||
virtual QString name() const = 0;
|
||||
|
||||
public slots:
|
||||
virtual void start() = 0;
|
||||
|
||||
signals:
|
||||
void starting();
|
||||
void finished();
|
||||
void invalidated();
|
||||
};
|
||||
|
||||
class DefaultDebuggerLauncher : public AbstractDebuggerLauncher
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DefaultDebuggerLauncher(const Debugger & debugger, DebuggerManager *parent = 0);
|
||||
virtual QString name() const;
|
||||
|
||||
public slots:
|
||||
virtual void start();
|
||||
|
||||
private slots:
|
||||
void onProcessFinished();
|
||||
|
||||
private:
|
||||
const Debugger m_debugger;
|
||||
DetachedProcessMonitor *m_monitor;
|
||||
};
|
||||
|
||||
#if 0
|
||||
class TerminalDebuggerLauncher : public DefaultDebuggerLauncher
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TerminalDebuggerLauncher(const Debugger & debugger, DebuggerManager *parent = 0);
|
||||
|
||||
public slots:
|
||||
virtual void start();
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // DEBUGGERLAUNCHERS_H
|
|
@ -1,112 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "debuggermanager.h"
|
||||
|
||||
#include <KConfigGroup>
|
||||
#include <KGlobal>
|
||||
|
||||
#include "debugger.h"
|
||||
#include "debuggerlaunchers.h"
|
||||
#include "backtracegenerator.h"
|
||||
|
||||
struct DebuggerManager::Private
|
||||
{
|
||||
BacktraceGenerator *btGenerator;
|
||||
bool debuggerRunning;
|
||||
QList<AbstractDebuggerLauncher*> externalDebuggers;
|
||||
};
|
||||
|
||||
DebuggerManager::DebuggerManager(const Debugger & internalDebugger,
|
||||
const QList<Debugger> & externalDebuggers,
|
||||
QObject *parent)
|
||||
: QObject(parent), d(new Private)
|
||||
{
|
||||
d->debuggerRunning = false;
|
||||
d->btGenerator = new BacktraceGenerator(internalDebugger, this);
|
||||
connect(d->btGenerator, SIGNAL(starting()), SLOT(onDebuggerStarting()));
|
||||
connect(d->btGenerator, SIGNAL(done()), SLOT(onDebuggerFinished()));
|
||||
connect(d->btGenerator, SIGNAL(someError()), SLOT(onDebuggerFinished()));
|
||||
connect(d->btGenerator, SIGNAL(failedToStart()), SLOT(onDebuggerFinished()));
|
||||
|
||||
foreach(const Debugger & debugger, externalDebuggers) {
|
||||
if (debugger.isInstalled()) {
|
||||
AbstractDebuggerLauncher *l = new DefaultDebuggerLauncher(debugger, this); //FIXME
|
||||
d->externalDebuggers.append(l);
|
||||
connect(l, SIGNAL(starting()), SLOT(onDebuggerStarting()));
|
||||
connect(l, SIGNAL(finished()), SLOT(onDebuggerFinished()));
|
||||
connect(l, SIGNAL(invalidated()), SLOT(onDebuggerInvalidated()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DebuggerManager::~DebuggerManager()
|
||||
{
|
||||
if (d->btGenerator->state() == BacktraceGenerator::Loading) {
|
||||
//if the debugger is running, kill it and continue the process.
|
||||
delete d->btGenerator;
|
||||
onDebuggerFinished();
|
||||
}
|
||||
|
||||
delete d;
|
||||
}
|
||||
|
||||
bool DebuggerManager::debuggerIsRunning() const
|
||||
{
|
||||
return d->debuggerRunning;
|
||||
}
|
||||
|
||||
bool DebuggerManager::showExternalDebuggers() const
|
||||
{
|
||||
KConfigGroup config(KGlobal::config(), "DrKonqi");
|
||||
return config.readEntry("ShowDebugButton", false);
|
||||
}
|
||||
|
||||
QList<AbstractDebuggerLauncher*> DebuggerManager::availableExternalDebuggers() const
|
||||
{
|
||||
return d->externalDebuggers;
|
||||
}
|
||||
|
||||
BacktraceGenerator* DebuggerManager::backtraceGenerator() const
|
||||
{
|
||||
return d->btGenerator;
|
||||
}
|
||||
|
||||
void DebuggerManager::onDebuggerStarting()
|
||||
{
|
||||
d->debuggerRunning = true;
|
||||
emit debuggerStarting();
|
||||
emit debuggerRunning(true);
|
||||
}
|
||||
|
||||
void DebuggerManager::onDebuggerFinished()
|
||||
{
|
||||
d->debuggerRunning = false;
|
||||
emit debuggerFinished();
|
||||
emit debuggerRunning(false);
|
||||
}
|
||||
|
||||
void DebuggerManager::onDebuggerInvalidated()
|
||||
{
|
||||
AbstractDebuggerLauncher *launcher = qobject_cast<AbstractDebuggerLauncher*>(sender());
|
||||
Q_ASSERT(launcher);
|
||||
int index = d->externalDebuggers.indexOf(launcher);
|
||||
Q_ASSERT(index >= 0);
|
||||
d->externalDebuggers.removeAt(index);
|
||||
emit externalDebuggerRemoved(launcher);
|
||||
}
|
||||
|
||||
#include "moc_debuggermanager.cpp"
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef DEBUGGERMANAGER_H
|
||||
#define DEBUGGERMANAGER_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
class BacktraceGenerator;
|
||||
class Debugger;
|
||||
class AbstractDebuggerLauncher;
|
||||
|
||||
class DebuggerManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DebuggerManager(const Debugger & internalDebugger,
|
||||
const QList<Debugger> & externalDebuggers,
|
||||
QObject *parent = 0);
|
||||
virtual ~DebuggerManager();
|
||||
|
||||
bool debuggerIsRunning() const;
|
||||
bool showExternalDebuggers() const;
|
||||
QList<AbstractDebuggerLauncher*> availableExternalDebuggers() const;
|
||||
BacktraceGenerator *backtraceGenerator() const;
|
||||
|
||||
signals:
|
||||
void debuggerStarting();
|
||||
void debuggerFinished();
|
||||
void debuggerRunning(bool running);
|
||||
void externalDebuggerAdded(AbstractDebuggerLauncher *launcher);
|
||||
void externalDebuggerRemoved(AbstractDebuggerLauncher *launcher);
|
||||
|
||||
private slots:
|
||||
void onDebuggerStarting();
|
||||
void onDebuggerFinished();
|
||||
void onDebuggerInvalidated();
|
||||
|
||||
private:
|
||||
struct Private;
|
||||
Private *const d;
|
||||
};
|
||||
|
||||
#endif // DEBUGGERMANAGER_H
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "detachedprocessmonitor.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <QtCore/qcoreevent.h>
|
||||
|
||||
#include <KDebug>
|
||||
|
||||
DetachedProcessMonitor::DetachedProcessMonitor(QObject *parent)
|
||||
: QObject(parent), m_pid(0)
|
||||
{
|
||||
}
|
||||
|
||||
void DetachedProcessMonitor::startMonitoring(int pid)
|
||||
{
|
||||
m_pid = pid;
|
||||
startTimer(10);
|
||||
}
|
||||
|
||||
void DetachedProcessMonitor::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
Q_ASSERT(m_pid != 0);
|
||||
if (::kill(m_pid, 0) < 0) {
|
||||
kDebug() << "Process" << m_pid << "finished. kill(2) returned errno:" << ::strerror(errno);
|
||||
killTimer(event->timerId());
|
||||
m_pid = 0;
|
||||
emit processFinished();
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_detachedprocessmonitor.cpp"
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef DETACHEDPROCESSMONITOR_H
|
||||
#define DETACHEDPROCESSMONITOR_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
class DetachedProcessMonitor : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DetachedProcessMonitor(QObject *parent = 0);
|
||||
void startMonitoring(int pid);
|
||||
|
||||
signals:
|
||||
void processFinished();
|
||||
|
||||
protected:
|
||||
virtual void timerEvent(QTimerEvent *);
|
||||
|
||||
private:
|
||||
int m_pid;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,188 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Parts of this code were originally under the following license:
|
||||
|
||||
* Copyright (C) 2000-2003 Hans Petter Bieker <bieker@kde.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "drkonqi.h"
|
||||
|
||||
#include <QtCore/qsharedpointer.h>
|
||||
#include <QtCore/QTextStream>
|
||||
#include <QtCore/qcoreevent.h>
|
||||
|
||||
#include <KMessageBox>
|
||||
#include <KFileDialog>
|
||||
#include <KTemporaryFile>
|
||||
#include <KCmdLineArgs>
|
||||
#include <KIO/NetAccess>
|
||||
#include <KCrash>
|
||||
#include <KDebug>
|
||||
#include <KLocalizedString>
|
||||
|
||||
#include "crashedapplication.h"
|
||||
#include "drkonqibackends.h"
|
||||
|
||||
DrKonqi::DrKonqi()
|
||||
{
|
||||
m_backend = new KCrashBackend();
|
||||
}
|
||||
|
||||
DrKonqi::~DrKonqi()
|
||||
{
|
||||
delete m_backend;
|
||||
}
|
||||
|
||||
//static
|
||||
DrKonqi *DrKonqi::instance()
|
||||
{
|
||||
static DrKonqi *drKonqiInstance = NULL;
|
||||
if (!drKonqiInstance) {
|
||||
drKonqiInstance = new DrKonqi();
|
||||
}
|
||||
return drKonqiInstance;
|
||||
}
|
||||
|
||||
//based on KCrashDelaySetHandler from kdeui/util/kcrash.cpp
|
||||
class EnableCrashCatchingDelayed : public QObject
|
||||
{
|
||||
public:
|
||||
EnableCrashCatchingDelayed() {
|
||||
startTimer(10000); // 10 s
|
||||
}
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *event) {
|
||||
kDebug() << "Enabling drkonqi crash catching";
|
||||
KCrash::setFlags(KCrash::flags() | KCrash::DrKonqi);
|
||||
killTimer(event->timerId());
|
||||
this->deleteLater();
|
||||
}
|
||||
};
|
||||
|
||||
bool DrKonqi::init()
|
||||
{
|
||||
if (!instance()->m_backend->init()) {
|
||||
cleanup();
|
||||
return false;
|
||||
} else { //all ok, continue initialization
|
||||
// Set drkonqi to handle its own crashes, but only if the crashed app
|
||||
// is not drkonqi already. If it is drkonqi, delay enabling crash catching
|
||||
// to prevent recursive crashes (in case it crashes at startup)
|
||||
if (crashedApplication()->executableBaseName() != "drkonqi") {
|
||||
kDebug() << "Enabling drkonqi crash catching";
|
||||
KCrash::setFlags(KCrash::flags() | KCrash::DrKonqi);
|
||||
} else {
|
||||
new EnableCrashCatchingDelayed;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void DrKonqi::cleanup()
|
||||
{
|
||||
delete instance();
|
||||
}
|
||||
|
||||
//static
|
||||
DebuggerManager* DrKonqi::debuggerManager()
|
||||
{
|
||||
return instance()->m_backend->debuggerManager();
|
||||
}
|
||||
|
||||
//static
|
||||
CrashedApplication *DrKonqi::crashedApplication()
|
||||
{
|
||||
return instance()->m_backend->crashedApplication();
|
||||
}
|
||||
|
||||
//static
|
||||
void DrKonqi::saveReport(const QString & reportText, QWidget *parent)
|
||||
{
|
||||
if (KCmdLineArgs::parsedArgs()->isSet("safer")) {
|
||||
KTemporaryFile tf;
|
||||
tf.setSuffix(".kcrash.txt");
|
||||
tf.setAutoRemove(false);
|
||||
|
||||
if (tf.open()) {
|
||||
QTextStream textStream(&tf);
|
||||
textStream << reportText;
|
||||
textStream.flush();
|
||||
KMessageBox::information(parent, i18nc("@info",
|
||||
"Report saved to <filename>%1</filename>.",
|
||||
tf.fileName()));
|
||||
} else {
|
||||
KMessageBox::sorry(parent, i18nc("@info","Could not create a file in which to save the report."));
|
||||
}
|
||||
} else {
|
||||
QString defname = getSuggestedKCrashFilename(crashedApplication());
|
||||
|
||||
QWeakPointer<KFileDialog> dlg = new KFileDialog(defname, QString(), parent);
|
||||
dlg.data()->setSelection(defname);
|
||||
dlg.data()->setCaption(i18nc("@title:window","Select Filename"));
|
||||
dlg.data()->setOperationMode(KFileDialog::Saving);
|
||||
dlg.data()->setMode(KFile::File);
|
||||
dlg.data()->setConfirmOverwrite(true);
|
||||
dlg.data()->exec();
|
||||
|
||||
if (dlg.isNull()) {
|
||||
//Dialog is invalid, it was probably deleted (ex. via DBus call)
|
||||
//return and do not crash
|
||||
return;
|
||||
}
|
||||
|
||||
KUrl fileUrl = dlg.data()->selectedUrl();
|
||||
delete dlg.data();
|
||||
|
||||
if (fileUrl.isValid()) {
|
||||
KTemporaryFile tf;
|
||||
if (tf.open()) {
|
||||
QTextStream ts(&tf);
|
||||
ts << reportText;
|
||||
ts.flush();
|
||||
} else {
|
||||
KMessageBox::sorry(parent, i18nc("@info","Cannot open file <filename>%1</filename> "
|
||||
"for writing.", tf.fileName()));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!KIO::NetAccess::upload(tf.fileName(), fileUrl, parent)) {
|
||||
KMessageBox::sorry(parent, KIO::NetAccess::lastErrorString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef DRKONQI_H
|
||||
#define DRKONQI_H
|
||||
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
|
||||
class DebuggerManager;
|
||||
class CrashedApplication;
|
||||
class KCrashBackend;
|
||||
|
||||
class DrKonqi
|
||||
{
|
||||
public:
|
||||
static bool init();
|
||||
static void cleanup();
|
||||
|
||||
static DebuggerManager *debuggerManager();
|
||||
static CrashedApplication *crashedApplication();
|
||||
|
||||
static void saveReport(const QString & reportText, QWidget *parent = 0);
|
||||
|
||||
private:
|
||||
DrKonqi();
|
||||
~DrKonqi();
|
||||
static DrKonqi *instance();
|
||||
|
||||
KCrashBackend *m_backend;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef DRKONQI_GLOBALS_H
|
||||
#define DRKONQI_GLOBALS_H
|
||||
|
||||
#include <KGuiItem>
|
||||
#include <KIcon>
|
||||
#include <KGlobalSettings>
|
||||
|
||||
/** This class provides a custom constructor to fill the "toolTip"
|
||||
* and "whatsThis" texts of KGuiItem with the same text.
|
||||
*/
|
||||
class KGuiItem2 : public KGuiItem
|
||||
{
|
||||
public:
|
||||
inline KGuiItem2(const QString &text, const KIcon &icon, const QString &toolTip)
|
||||
: KGuiItem(text, icon, toolTip, toolTip) {}
|
||||
};
|
||||
|
||||
/* Urls are defined globally here, so that they can change easily */
|
||||
#define TECHBASE_HOWTO_DOC_URL KDE_HELP_URL "/how_to_debug"
|
||||
#define ABOUT_BUG_REPORTING_URL KDE_HELP_URL "/how_to_report"
|
||||
|
||||
#endif
|
|
@ -1,186 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "drkonqibackends.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cerrno>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDir>
|
||||
|
||||
#include <KCmdLineArgs>
|
||||
#include <KStandardDirs>
|
||||
#include <KDebug>
|
||||
#include <KConfig>
|
||||
#include <KConfigGroup>
|
||||
#include <KGlobal>
|
||||
#include <KStartupInfo>
|
||||
#include <KCrash>
|
||||
#include <kde_file.h>
|
||||
|
||||
#include "crashedapplication.h"
|
||||
#include "debugger.h"
|
||||
#include "debuggermanager.h"
|
||||
#include "backtracegenerator.h"
|
||||
|
||||
KCrashBackend::KCrashBackend()
|
||||
: QObject()
|
||||
{
|
||||
}
|
||||
|
||||
KCrashBackend::~KCrashBackend()
|
||||
{
|
||||
continueAttachedProcess();
|
||||
}
|
||||
|
||||
bool KCrashBackend::init()
|
||||
{
|
||||
m_crashedApplication = constructCrashedApplication();
|
||||
m_debuggerManager = constructDebuggerManager();
|
||||
|
||||
QString startupId(KCmdLineArgs::parsedArgs()->getOption("startupid"));
|
||||
if (!startupId.isEmpty()) { // stop startup notification
|
||||
KStartupInfoId id;
|
||||
id.initId(startupId.toLocal8Bit());
|
||||
KStartupInfo::sendFinish(id);
|
||||
}
|
||||
|
||||
//check whether the attached process exists and whether we have permissions to inspect it
|
||||
if (crashedApplication()->pid() <= 0) {
|
||||
kError() << "Invalid pid specified";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (::kill(crashedApplication()->pid(), 0) < 0) {
|
||||
switch (errno) {
|
||||
case EPERM:
|
||||
kError() << "DrKonqi doesn't have permissions to inspect the specified process";
|
||||
break;
|
||||
case ESRCH:
|
||||
kError() << "The specified process does not exist.";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// stop the process to avoid high cpu usage by other threads (bug 175362), also to get a
|
||||
// backtrace the process must not exit
|
||||
stopAttachedProcess();
|
||||
|
||||
// --keeprunning means: generate backtrace instantly and let the process continue execution
|
||||
if (KCmdLineArgs::parsedArgs()->isSet("keeprunning")) {
|
||||
connect(debuggerManager(), SIGNAL(debuggerFinished()), SLOT(continueAttachedProcess()));
|
||||
debuggerManager()->backtraceGenerator()->start();
|
||||
}
|
||||
|
||||
// Handle drkonqi crashes
|
||||
s_pid = crashedApplication()->pid(); // copy pid for use by the crash handler, so that it is safer
|
||||
KCrash::setCrashHandler(emergencySaveFunction);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CrashedApplication *KCrashBackend::constructCrashedApplication()
|
||||
{
|
||||
CrashedApplication *a = new CrashedApplication(this);
|
||||
a->m_datetime = QDateTime::currentDateTime();
|
||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
||||
a->m_name = args->getOption("programname");
|
||||
a->m_version = args->getOption("appversion").toUtf8();
|
||||
a->m_reportAddress = args->getOption("bugaddress").toUtf8();
|
||||
a->m_pid = args->getOption("pid").toInt();
|
||||
a->m_signalNumber = args->getOption("signal").toInt();
|
||||
a->m_restarted = args->isSet("restarted");
|
||||
a->m_thread = args->getOption("thread").toInt();
|
||||
|
||||
//try to determine the executable that crashed
|
||||
if (!args->getOption("apppath").isEmpty()) {
|
||||
a->m_executable = QFileInfo(args->getOption("apppath"));
|
||||
} else if (!args->getOption("appname").isEmpty() ) {
|
||||
a->m_executable = QFileInfo(KStandardDirs::findExe(args->getOption("appname")));
|
||||
} else {
|
||||
kError() << "Neither apppath nor appname is set";
|
||||
}
|
||||
|
||||
kDebug() << "Executable is:" << a->m_executable.absoluteFilePath();
|
||||
kDebug() << "Executable exists:" << a->m_executable.exists();
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
DebuggerManager *KCrashBackend::constructDebuggerManager()
|
||||
{
|
||||
QList<Debugger> internalDebuggers = Debugger::availableInternalDebuggers("KCrash");
|
||||
KConfigGroup config(KGlobal::config(), "DrKonqi");
|
||||
QString defaultDebuggerName = config.readEntry("Debugger", QString("gdb"));
|
||||
|
||||
Debugger firstKnownGoodDebugger, preferredDebugger;
|
||||
foreach (const Debugger & debugger, internalDebuggers) {
|
||||
if (!firstKnownGoodDebugger.isValid() && debugger.isInstalled()) {
|
||||
firstKnownGoodDebugger = debugger;
|
||||
}
|
||||
if (debugger.codeName() == defaultDebuggerName) {
|
||||
preferredDebugger = debugger;
|
||||
}
|
||||
if (firstKnownGoodDebugger.isValid() && preferredDebugger.isValid()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!preferredDebugger.isInstalled()) {
|
||||
if (firstKnownGoodDebugger.isValid()) {
|
||||
preferredDebugger = firstKnownGoodDebugger;
|
||||
} else {
|
||||
kError() << "Unable to find an internal debugger that can work with the KCrash backend";
|
||||
}
|
||||
}
|
||||
|
||||
return new DebuggerManager(preferredDebugger, Debugger::availableExternalDebuggers("KCrash"), this);
|
||||
}
|
||||
|
||||
void KCrashBackend::stopAttachedProcess()
|
||||
{
|
||||
kDebug() << "Sending SIGSTOP to process";
|
||||
::kill(crashedApplication()->pid(), SIGSTOP);
|
||||
}
|
||||
|
||||
void KCrashBackend::continueAttachedProcess()
|
||||
{
|
||||
kDebug() << "Sending SIGCONT to process";
|
||||
::kill(crashedApplication()->pid(), SIGCONT);
|
||||
}
|
||||
|
||||
//static
|
||||
qint64 KCrashBackend::s_pid = 0;
|
||||
|
||||
//static
|
||||
void KCrashBackend::emergencySaveFunction(int signal)
|
||||
{
|
||||
KDE_signal(signal, SIG_DFL);
|
||||
|
||||
// In case drkonqi itself crashes, we need to get rid of the process being debugged,
|
||||
// so we kill it, no matter what its state was.
|
||||
::kill(s_pid, SIGKILL);
|
||||
|
||||
::exit(signal);
|
||||
}
|
||||
|
||||
#include "moc_drkonqibackends.cpp"
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef DRKONQIBACKENDS_H
|
||||
#define DRKONQIBACKENDS_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
class CrashedApplication;
|
||||
class DebuggerManager;
|
||||
|
||||
class KCrashBackend : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KCrashBackend();
|
||||
~KCrashBackend();
|
||||
|
||||
bool init();
|
||||
|
||||
inline CrashedApplication *crashedApplication() const {
|
||||
return m_crashedApplication;
|
||||
}
|
||||
|
||||
inline DebuggerManager *debuggerManager() const {
|
||||
return m_debuggerManager;
|
||||
}
|
||||
|
||||
private slots:
|
||||
void stopAttachedProcess();
|
||||
void continueAttachedProcess();
|
||||
|
||||
private:
|
||||
CrashedApplication *constructCrashedApplication();
|
||||
DebuggerManager *constructDebuggerManager();
|
||||
|
||||
static void emergencySaveFunction(int signal);
|
||||
static qint64 s_pid; //for use by the emergencySaveFunction
|
||||
|
||||
CrashedApplication *m_crashedApplication;
|
||||
DebuggerManager *m_debuggerManager;
|
||||
};
|
||||
|
||||
#endif // DRKONQIBACKENDS_H
|
|
@ -1,248 +0,0 @@
|
|||
/*******************************************************************
|
||||
* drkonqidialog.cpp
|
||||
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
#include "drkonqidialog.h"
|
||||
|
||||
#include <KMenu>
|
||||
#include <KIcon>
|
||||
#include <KStandardDirs>
|
||||
#include <KLocale>
|
||||
#include <KTabWidget>
|
||||
#include <KDebug>
|
||||
#include <KCmdLineArgs>
|
||||
#include <KToolInvocation>
|
||||
#include <kglobalsettings.h>
|
||||
|
||||
#include "drkonqi.h"
|
||||
#include "backtracegenerator.h"
|
||||
#include "backtracewidget.h"
|
||||
#include "parser/backtraceparser.h"
|
||||
#include "crashedapplication.h"
|
||||
#include "debuggermanager.h"
|
||||
#include "debuggerlaunchers.h"
|
||||
#include "drkonqi_globals.h"
|
||||
|
||||
DrKonqiDialog::DrKonqiDialog(QWidget * parent) :
|
||||
KDialog(parent),
|
||||
m_backtraceWidget(0)
|
||||
{
|
||||
KGlobal::ref();
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
//Setting dialog title and icon
|
||||
setCaption(DrKonqi::crashedApplication()->name());
|
||||
setWindowIcon(KIcon("tools-report-bug"));
|
||||
|
||||
m_tabWidget = new KTabWidget(this);
|
||||
setMainWidget(m_tabWidget);
|
||||
|
||||
buildIntroWidget();
|
||||
m_tabWidget->addTab(m_introWidget, i18nc("@title:tab general information", "&General"));
|
||||
|
||||
m_backtraceWidget = new BacktraceWidget(DrKonqi::debuggerManager()->backtraceGenerator(), this);
|
||||
m_backtraceWidget->setMinimumSize(QSize(575, 240));
|
||||
m_tabWidget->addTab(m_backtraceWidget, i18nc("@title:tab", "&Developer Information"));
|
||||
|
||||
buildDialogButtons();
|
||||
|
||||
setMinimumSize(QSize(640,320));
|
||||
resize(minimumSize());
|
||||
KConfigGroup config(KGlobal::config(), "General");
|
||||
restoreDialogSize(config);
|
||||
|
||||
m_backtraceWidget->generateBacktrace();
|
||||
}
|
||||
|
||||
DrKonqiDialog::~DrKonqiDialog()
|
||||
{
|
||||
KConfigGroup config(KGlobal::config(), "General");
|
||||
saveDialogSize(config);
|
||||
|
||||
KGlobal::deref();
|
||||
}
|
||||
|
||||
void DrKonqiDialog::buildIntroWidget()
|
||||
{
|
||||
const CrashedApplication *crashedApp = DrKonqi::crashedApplication();
|
||||
|
||||
m_introWidget = new QWidget(this);
|
||||
ui.setupUi(m_introWidget);
|
||||
|
||||
ui.titleLabel->setText(i18nc("@info", "<para>We are sorry, <application>%1</application> "
|
||||
"closed unexpectedly.</para>", crashedApp->name()));
|
||||
|
||||
QString reportMessage;
|
||||
if (!crashedApp->bugReportAddress().isEmpty()) {
|
||||
if (crashedApp->executableBaseName() == QLatin1String("drkonqi")) { //Handle own crashes
|
||||
reportMessage = i18nc("@info", "<para>As the Crash Handler itself has failed, the "
|
||||
"automatic reporting process is disabled to reduce the "
|
||||
"risks of failing again.<nl /><nl />"
|
||||
"Please, <link url='%1'>manually report</link> this error "
|
||||
"to the KDE bug tracking system. Do not forget to include "
|
||||
"the backtrace from the <interface>Developer Information</interface> "
|
||||
"tab.</para>",
|
||||
QLatin1String(KDE_BUG_REPORT_URL));
|
||||
} else if (KCmdLineArgs::parsedArgs()->isSet("safer")) {
|
||||
reportMessage = i18nc("@info", "<para>The reporting assistant is disabled because "
|
||||
"the crash handler dialog was started in safe mode."
|
||||
"<nl />You can manually report this bug to %1 "
|
||||
"(including the backtrace from the "
|
||||
"<interface>Developer Information</interface> "
|
||||
"tab.)</para>", crashedApp->bugReportAddress());
|
||||
} else {
|
||||
reportMessage = i18nc("@info", "<para>You can help us improve KDE Software by reporting "
|
||||
"this error.<nl /><link url='%1'>Learn "
|
||||
"more about bug reporting.</link></para><para><note>It is "
|
||||
"safe to close this dialog if you do not want to report "
|
||||
"this bug.</note></para>",
|
||||
QLatin1String(ABOUT_BUG_REPORTING_URL)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
reportMessage = i18nc("@info", "<para>You cannot report this error, because "
|
||||
"<application>%1</application> does not provide a bug reporting "
|
||||
"address.</para>",
|
||||
crashedApp->name()
|
||||
);
|
||||
}
|
||||
ui.infoLabel->setText(reportMessage);
|
||||
|
||||
ui.iconLabel->setPixmap(
|
||||
QPixmap(KStandardDirs::locate("appdata", QLatin1String("pics/crash.png"))));
|
||||
|
||||
ui.detailsTitleLabel->setText(QString("<strong>%1</strong>").arg(i18nc("@label","Details:")));
|
||||
|
||||
ui.detailsLabel->setText(i18nc("@info Note the time information is divided into date and time parts",
|
||||
"<para>Executable: <application>%1"
|
||||
"</application> PID: <numid>%2</numid> Signal: %3 (%4) "
|
||||
"Time: %5 %6</para>",
|
||||
crashedApp->executableBaseName(),
|
||||
crashedApp->pid(),
|
||||
crashedApp->signalName(),
|
||||
crashedApp->signalNumber(),
|
||||
KGlobal::locale()->formatDate(crashedApp->datetime().date()),
|
||||
|
||||
KGlobal::locale()->formatTime(crashedApp->datetime().time())
|
||||
));
|
||||
}
|
||||
|
||||
void DrKonqiDialog::buildDialogButtons()
|
||||
{
|
||||
const CrashedApplication *crashedApp = DrKonqi::crashedApplication();
|
||||
|
||||
//Set kdialog buttons
|
||||
setButtons(KDialog::User3 | KDialog::User2 | KDialog::User1 | KDialog::Close);
|
||||
|
||||
//Report bug button
|
||||
setButtonGuiItem(KDialog::User1, KGuiItem2(i18nc("@action:button", "Report &Bug"),
|
||||
KIcon("tools-report-bug"),
|
||||
i18nc("@info:tooltip",
|
||||
"Starts the bug report assistant.")));
|
||||
|
||||
bool enableReportAssistant = !crashedApp->bugReportAddress().isEmpty() &&
|
||||
crashedApp->executableBaseName() != QLatin1String("drkonqi") &&
|
||||
!KCmdLineArgs::parsedArgs()->isSet("safer");
|
||||
enableButton(KDialog::User1, enableReportAssistant);
|
||||
connect(this, SIGNAL(user1Clicked()), this, SLOT(startBugReportAssistant()));
|
||||
|
||||
//Default debugger button and menu (only for developer mode)
|
||||
DebuggerManager *debuggerManager = DrKonqi::debuggerManager();
|
||||
setButtonGuiItem(KDialog::User2, KGuiItem2(i18nc("@action:button this is the debug menu button "
|
||||
"label which contains the debugging applications",
|
||||
"&Debug"), KIcon("applications-development"),
|
||||
i18nc("@info:tooltip", "Starts a program to debug "
|
||||
"the crashed application.")));
|
||||
showButton(KDialog::User2, debuggerManager->showExternalDebuggers());
|
||||
|
||||
m_debugMenu = new KMenu(this);
|
||||
setButtonMenu(KDialog::User2, m_debugMenu);
|
||||
|
||||
QList<AbstractDebuggerLauncher*> debuggers = debuggerManager->availableExternalDebuggers();
|
||||
foreach(AbstractDebuggerLauncher *launcher, debuggers) {
|
||||
addDebugger(launcher);
|
||||
}
|
||||
|
||||
connect(debuggerManager, SIGNAL(externalDebuggerAdded(AbstractDebuggerLauncher*)),
|
||||
SLOT(addDebugger(AbstractDebuggerLauncher*)));
|
||||
connect(debuggerManager, SIGNAL(externalDebuggerRemoved(AbstractDebuggerLauncher*)),
|
||||
SLOT(removeDebugger(AbstractDebuggerLauncher*)));
|
||||
connect(debuggerManager, SIGNAL(debuggerRunning(bool)), SLOT(enableDebugMenu(bool)));
|
||||
|
||||
//Restart application button
|
||||
setButtonGuiItem(KDialog::User3, KGuiItem2(i18nc("@action:button", "&Restart Application"),
|
||||
KIcon("system-reboot"),
|
||||
i18nc("@info:tooltip", "Use this button to restart "
|
||||
"the crashed application.")));
|
||||
enableButton(KDialog::User3, !crashedApp->hasBeenRestarted() &&
|
||||
crashedApp->executableBaseName() != QLatin1String("drkonqi"));
|
||||
connect(this, SIGNAL(user3Clicked()), crashedApp, SLOT(restart()));
|
||||
connect(crashedApp, SIGNAL(restarted(bool)), this, SLOT(applicationRestarted(bool)));
|
||||
|
||||
//Close button
|
||||
QString tooltipText = i18nc("@info:tooltip",
|
||||
"Close this dialog (you will lose the crash information.)");
|
||||
setButtonToolTip(KDialog::Close, tooltipText);
|
||||
setButtonWhatsThis(KDialog::Close, tooltipText);
|
||||
setDefaultButton(KDialog::Close);
|
||||
setButtonFocus(KDialog::Close);
|
||||
}
|
||||
|
||||
void DrKonqiDialog::addDebugger(AbstractDebuggerLauncher *launcher)
|
||||
{
|
||||
QAction *action = new QAction(KIcon("applications-development"),
|
||||
i18nc("@action:inmenu 1 is the debugger name",
|
||||
"Debug in <application>%1</application>",
|
||||
launcher->name()), m_debugMenu);
|
||||
m_debugMenu->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), launcher, SLOT(start()));
|
||||
m_debugMenuActions.insert(launcher, action);
|
||||
}
|
||||
|
||||
void DrKonqiDialog::removeDebugger(AbstractDebuggerLauncher *launcher)
|
||||
{
|
||||
QAction *action = m_debugMenuActions.take(launcher);
|
||||
if ( action ) {
|
||||
m_debugMenu->removeAction(action);
|
||||
action->deleteLater();
|
||||
} else {
|
||||
kError() << "Invalid launcher";
|
||||
}
|
||||
}
|
||||
|
||||
void DrKonqiDialog::enableDebugMenu(bool debuggerRunning)
|
||||
{
|
||||
enableButton(KDialog::User2, !debuggerRunning);
|
||||
}
|
||||
|
||||
void DrKonqiDialog::startBugReportAssistant()
|
||||
{
|
||||
const CrashedApplication *crashedApp = DrKonqi::crashedApplication();
|
||||
const QString appReportAddress = crashedApp->bugReportAddress();
|
||||
// KDE applications use the email address by default
|
||||
if (appReportAddress == QLatin1String(KDE_BUG_REPORT_EMAIL)) {
|
||||
KToolInvocation::invokeBrowser(KDE_BUG_REPORT_URL);
|
||||
return;
|
||||
}
|
||||
KToolInvocation::invokeMailer(appReportAddress, QString());
|
||||
}
|
||||
|
||||
void DrKonqiDialog::applicationRestarted(bool success)
|
||||
{
|
||||
enableButton(KDialog::User3, !success);
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
/*******************************************************************
|
||||
* drkonqidialog.h
|
||||
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************/
|
||||
|
||||
#ifndef DRKONQIDIALOG__H
|
||||
#define DRKONQIDIALOG__H
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QHash>
|
||||
|
||||
#include <KDialog>
|
||||
|
||||
#include "ui_maindialog.h"
|
||||
|
||||
class BacktraceWidget;
|
||||
class KTabWidget;
|
||||
class AbstractDebuggerLauncher;
|
||||
class KMenu;
|
||||
|
||||
class DrKonqiDialog: public KDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DrKonqiDialog(QWidget * parent = 0);
|
||||
~DrKonqiDialog();
|
||||
|
||||
private Q_SLOTS:
|
||||
void startBugReportAssistant();
|
||||
|
||||
void applicationRestarted(bool success);
|
||||
|
||||
void addDebugger(AbstractDebuggerLauncher *launcher);
|
||||
void removeDebugger(AbstractDebuggerLauncher *launcher);
|
||||
void enableDebugMenu(bool);
|
||||
|
||||
//GUI
|
||||
void buildIntroWidget();
|
||||
void buildDialogButtons();
|
||||
|
||||
private:
|
||||
KTabWidget * m_tabWidget;
|
||||
|
||||
QWidget * m_introWidget;
|
||||
Ui::MainWidget ui;
|
||||
|
||||
BacktraceWidget * m_backtraceWidget;
|
||||
|
||||
KMenu *m_debugMenu;
|
||||
QHash<AbstractDebuggerLauncher*, QAction*> m_debugMenuActions;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,141 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2010 Milian Wolff <mail@milianw.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#include "gdbhighlighter.h"
|
||||
|
||||
#include <QTextDocument>
|
||||
|
||||
#include <KColorScheme>
|
||||
|
||||
GdbHighlighter::GdbHighlighter(QTextDocument* parent, const QList<BacktraceLine> & gdbLines)
|
||||
: QSyntaxHighlighter(parent)
|
||||
{
|
||||
// setup line lookup
|
||||
int l = 0;
|
||||
foreach(const BacktraceLine& line, gdbLines) {
|
||||
lines.insert(l, line);
|
||||
l += line.toString().count('\n');
|
||||
}
|
||||
// Add a dummy, in case the last backtrace line has more than 1 '\n' char.
|
||||
const BacktraceLine dummy;
|
||||
lines.insert(l, dummy);
|
||||
|
||||
// setup formates
|
||||
KColorScheme scheme(QPalette::Active);
|
||||
|
||||
crashFormat.setForeground(scheme.foreground(KColorScheme::NegativeText));
|
||||
nullptrFormat.setForeground(scheme.foreground(KColorScheme::NegativeText));
|
||||
nullptrFormat.setFontWeight(QFont::Bold);
|
||||
assertFormat = nullptrFormat;
|
||||
threadFormat.setForeground(scheme.foreground(KColorScheme::NeutralText));
|
||||
urlFormat.setForeground(scheme.foreground(KColorScheme::LinkText));
|
||||
funcFormat.setForeground(scheme.foreground(KColorScheme::VisitedText));
|
||||
funcFormat.setFontWeight(QFont::Bold);
|
||||
otheridFormat.setForeground(scheme.foreground(KColorScheme::PositiveText));
|
||||
crapFormat.setForeground(scheme.foreground(KColorScheme::InactiveText));
|
||||
}
|
||||
|
||||
void GdbHighlighter::highlightBlock(const QString& text)
|
||||
{
|
||||
int cur = 0;
|
||||
int next;
|
||||
int diff;
|
||||
const QRegExp hexptrPattern("0x[0-9a-f]+", Qt::CaseSensitive, QRegExp::RegExp2);
|
||||
int lineNr = currentBlock().firstLineNumber();
|
||||
while ( cur < text.length() ) {
|
||||
next = text.indexOf('\n', cur);
|
||||
if (next == -1) {
|
||||
next = text.length();
|
||||
}
|
||||
if (lineNr == 0) {
|
||||
// line that contains 'Application: ...'
|
||||
++lineNr;
|
||||
cur = next;
|
||||
continue;
|
||||
}
|
||||
|
||||
diff = next - cur;
|
||||
|
||||
QString lineStr = text.mid(cur, diff).append('\n');
|
||||
// -1 since we skip the first line
|
||||
QMap< int, BacktraceLine >::iterator it = lines.lowerBound(lineNr - 1);
|
||||
Q_ASSERT(it != lines.end());
|
||||
// QMap::lowerBound() returns the next higher item or
|
||||
// the dummy item, but we want the one before that.
|
||||
if (it.key() > lineNr - 1) {
|
||||
--it;
|
||||
}
|
||||
const BacktraceLine& line = it.value();
|
||||
|
||||
if (line.type() == BacktraceLine::KCrash) {
|
||||
setFormat(cur, diff, crashFormat);
|
||||
} else if (line.type() == BacktraceLine::ThreadStart || line.type() == BacktraceLine::ThreadIndicator) {
|
||||
setFormat(cur, diff, threadFormat);
|
||||
} else if (line.type() == BacktraceLine::Crap) {
|
||||
setFormat(cur, diff, crapFormat);
|
||||
} else if (line.type() == BacktraceLine::StackFrame) {
|
||||
if (!line.fileName().isEmpty()) {
|
||||
int colonPos = line.fileName().lastIndexOf(':');
|
||||
setFormat(lineStr.indexOf(line.fileName()), colonPos == -1 ? line.fileName().length() : colonPos, urlFormat);
|
||||
}
|
||||
if (!line.libraryName().isEmpty()) {
|
||||
setFormat(lineStr.indexOf(line.libraryName()), line.libraryName().length(), urlFormat);
|
||||
}
|
||||
if (!line.functionName().isEmpty()) {
|
||||
int idx = lineStr.indexOf(line.functionName());
|
||||
if (idx != -1) {
|
||||
// highlight Id::Id::Id::Func
|
||||
// Id should have otheridFormat, :: no format and Func funcFormat
|
||||
int i = idx;
|
||||
int from = idx;
|
||||
while (i < idx + line.functionName().length()) {
|
||||
if (lineStr.at(i) == ':') {
|
||||
setFormat(from, i - from, otheridFormat);
|
||||
// skip ::
|
||||
i += 2;
|
||||
from = i;
|
||||
continue;
|
||||
} else if (lineStr.at(i) == '<' || lineStr.at(i) == '>') {
|
||||
setFormat(from, i - from, otheridFormat);
|
||||
++i;
|
||||
from = i;
|
||||
continue;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
if (line.functionName() == "qFatal" || line.functionName() == "abort" || line.functionName() == "__assert_fail"
|
||||
|| line.functionName() == "*__GI___assert_fail" || line.functionName() == "*__GI_abort") {
|
||||
setFormat(from, i - from, assertFormat);
|
||||
} else {
|
||||
setFormat(from, i - from, funcFormat);
|
||||
}
|
||||
}
|
||||
}
|
||||
// highlight hexadecimal ptrs
|
||||
int idx = 0;
|
||||
while ((idx = hexptrPattern.indexIn(lineStr, idx)) != -1) {
|
||||
if (hexptrPattern.cap() == "0x0") {
|
||||
setFormat(idx, hexptrPattern.matchedLength(), nullptrFormat);
|
||||
}
|
||||
idx += hexptrPattern.matchedLength();
|
||||
}
|
||||
}
|
||||
|
||||
cur = next;
|
||||
++lineNr;
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2010 Milian Wolff <mail@milianw.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#ifndef GDBHIGHLIGHTER_H
|
||||
#define GDBHIGHLIGHTER_H
|
||||
|
||||
#include <QSyntaxHighlighter>
|
||||
|
||||
#include "parser/backtraceline.h"
|
||||
|
||||
class GdbHighlighter : public QSyntaxHighlighter
|
||||
{
|
||||
public:
|
||||
GdbHighlighter(QTextDocument* parent, const QList<BacktraceLine> & gdbLines);
|
||||
|
||||
protected:
|
||||
virtual void highlightBlock(const QString& text);
|
||||
|
||||
private:
|
||||
QMap<int, BacktraceLine> lines;
|
||||
QTextCharFormat crashFormat;
|
||||
QTextCharFormat nullptrFormat;
|
||||
QTextCharFormat assertFormat;
|
||||
QTextCharFormat threadFormat;
|
||||
QTextCharFormat urlFormat;
|
||||
QTextCharFormat funcFormat;
|
||||
QTextCharFormat otheridFormat;
|
||||
QTextCharFormat crapFormat;
|
||||
};
|
||||
|
||||
#endif // GDBHIGHLIGHTER_H
|
|
@ -1,90 +0,0 @@
|
|||
/* This file is part of the KDE project
|
||||
Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License version 2, as published by the Free Software Foundation.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "lldbhighlighter.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <KColorScheme>
|
||||
|
||||
LldbHighlighter::LldbHighlighter(QTextDocument* parent, const QList<BacktraceLine> &lines)
|
||||
: QSyntaxHighlighter(parent)
|
||||
{
|
||||
Q_UNUSED(lines);
|
||||
|
||||
KColorScheme kcolorscheme(QPalette::Active);
|
||||
m_crapformat.setForeground(kcolorscheme.foreground(KColorScheme::InactiveText));
|
||||
m_signalformat.setForeground(kcolorscheme.foreground(KColorScheme::NegativeText));
|
||||
m_idformat.setForeground(kcolorscheme.foreground(KColorScheme::PositiveText));
|
||||
m_hexformat.setForeground(kcolorscheme.foreground(KColorScheme::NegativeText));
|
||||
m_hexformat.setFontWeight(QFont::Bold);
|
||||
m_libraryformat.setForeground(kcolorscheme.foreground(KColorScheme::NeutralText));
|
||||
m_functionformat.setForeground(kcolorscheme.foreground(KColorScheme::VisitedText));
|
||||
m_functionformat.setFontWeight(QFont::Bold);
|
||||
m_sourceformat.setForeground(kcolorscheme.foreground(KColorScheme::LinkText));
|
||||
}
|
||||
|
||||
void LldbHighlighter::highlightBlock(const QString &text)
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO << text << currentBlock().position() << currentBlock().length();
|
||||
const bool hasthread = text.contains(QLatin1String(" thread #"));
|
||||
if (!hasthread && !text.contains(QLatin1String(" frame #"))) {
|
||||
setFormat(0, text.length(), m_crapformat);
|
||||
}
|
||||
|
||||
if (hasthread) {
|
||||
int partlength = 0;
|
||||
foreach (const QString &textpart, text.split(QLatin1Char(' '))) {
|
||||
if (textpart.startsWith(QLatin1String("SIG"))) {
|
||||
setFormat(partlength, textpart.length(), m_signalformat);
|
||||
}
|
||||
partlength += (textpart.length() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
int partlength = 0;
|
||||
int partscounter = 0;
|
||||
int functionstart = 0;
|
||||
int functionend = 0;
|
||||
const QStringList textparts = text.split(QLatin1Char(' '));
|
||||
foreach (const QString &textpart, textparts) {
|
||||
if (textpart.startsWith(QLatin1Char('#'))) {
|
||||
const bool lastcharislon = (textpart.length() > 0 && textpart.at(textpart.length() - 1).isLetterOrNumber());
|
||||
setFormat(partlength, textpart.length() - int(!lastcharislon), m_idformat);
|
||||
} else if (textpart.startsWith(QLatin1String("0x"))) {
|
||||
setFormat(partlength, textpart.length(), m_hexformat);
|
||||
} else if (textpart.contains(QLatin1Char('`'))) {
|
||||
const int tildeindex = textpart.indexOf(QLatin1Char('`'));
|
||||
setFormat(partlength, tildeindex, m_libraryformat);
|
||||
functionstart = (partlength + tildeindex + 1);
|
||||
if (!textpart.contains(QLatin1Char('(')) || textpart.endsWith(QLatin1Char(')'))) {
|
||||
setFormat(functionstart, textpart.length() - tildeindex - 1, m_functionformat);
|
||||
functionstart = 0;
|
||||
}
|
||||
} else if (functionstart && (textpart == QLatin1String("+") || textpart == QLatin1String("at"))) {
|
||||
functionend = (partlength - textpart.length());
|
||||
} else if (partscounter > 0 && textparts.at(partscounter - 1) == QLatin1String("at")) {
|
||||
setFormat(partlength, textpart.length(), m_sourceformat);
|
||||
}
|
||||
partlength += (textpart.length() + 1);
|
||||
partscounter += 1;
|
||||
}
|
||||
|
||||
if (functionstart > 0 && functionend > 0) {
|
||||
setFormat(functionstart, functionend - functionstart + 1, m_functionformat);
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/* This file is part of the KDE project
|
||||
Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License version 2, as published by the Free Software Foundation.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef LLDBHIGHLIGHTER_H
|
||||
#define LLDBHIGHLIGHTER_H
|
||||
|
||||
#include "parser/backtraceline.h"
|
||||
|
||||
#include <QSyntaxHighlighter>
|
||||
#include <QTextDocument>
|
||||
|
||||
class LldbHighlighter : public QSyntaxHighlighter
|
||||
{
|
||||
public:
|
||||
LldbHighlighter(QTextDocument* parent, const QList<BacktraceLine> &lines);
|
||||
|
||||
protected:
|
||||
void highlightBlock(const QString& text) final;
|
||||
|
||||
private:
|
||||
QTextCharFormat m_crapformat;
|
||||
QTextCharFormat m_signalformat;
|
||||
QTextCharFormat m_idformat;
|
||||
QTextCharFormat m_hexformat;
|
||||
QTextCharFormat m_libraryformat;
|
||||
QTextCharFormat m_functionformat;
|
||||
QTextCharFormat m_sourceformat;
|
||||
};
|
||||
|
||||
#endif // LLDBHIGHLIGHTER_H
|
107
drkonqi/main.cpp
107
drkonqi/main.cpp
|
@ -1,107 +0,0 @@
|
|||
/*****************************************************************
|
||||
* drkonqi - The KDE Crash Handler
|
||||
*
|
||||
* Copyright (C) 2000-2003 Hans Petter Bieker <bieker@kde.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <KApplication>
|
||||
#include <KCmdLineArgs>
|
||||
#include <KAboutData>
|
||||
#include <KLocalizedString>
|
||||
|
||||
#include "drkonqi.h"
|
||||
#include "drkonqidialog.h"
|
||||
|
||||
static const char version[] = "2.1.5";
|
||||
static const char description[] = I18N_NOOP("The KDE Crash Handler gives the user feedback "
|
||||
"if a program has crashed.");
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
// Prevent KApplication from setting the crash handler. We will set it later...
|
||||
setenv("KDE_DEBUG", "true", 1);
|
||||
// Session management is not needed, do not even connect in order to survive longer than ksmserver.
|
||||
unsetenv("SESSION_MANAGER");
|
||||
|
||||
KAboutData aboutData("drkonqi", 0, ki18n("The KDE Crash Handler"),
|
||||
version, ki18n(description),
|
||||
KAboutData::License_GPL,
|
||||
ki18n("(C) 2000-2009, The DrKonqi Authors"));
|
||||
aboutData.addAuthor(ki18nc("@info:credit","Hans Petter Bieker"), KLocalizedString(),
|
||||
"bieker@kde.org");
|
||||
aboutData.addAuthor(ki18nc("@info:credit","Dario Andres Rodriguez"), KLocalizedString(),
|
||||
"andresbajotierra@gmail.com");
|
||||
aboutData.addAuthor(ki18nc("@info:credit","George Kiagiadakis"), KLocalizedString(),
|
||||
"gkiagia@users.sourceforge.net");
|
||||
aboutData.addAuthor(ki18nc("@info:credit","A. L. Spehr"), KLocalizedString(),
|
||||
"spehr@kde.org");
|
||||
aboutData.setProgramIconName("tools-report-bug");
|
||||
|
||||
KCmdLineArgs::init(argc, argv, &aboutData);
|
||||
|
||||
KCmdLineOptions options;
|
||||
options.add("signal <number>", ki18nc("@info:shell","The signal number that was caught"));
|
||||
options.add("appname <name>", ki18nc("@info:shell","Name of the program"));
|
||||
options.add("apppath <path>", ki18nc("@info:shell","Path to the executable"));
|
||||
options.add("appversion <version>", ki18nc("@info:shell","The version of the program"));
|
||||
options.add("bugaddress <address>", ki18nc("@info:shell","The bug address to use"));
|
||||
options.add("programname <name>", ki18nc("@info:shell","Translated name of the program"));
|
||||
options.add("pid <pid>", ki18nc("@info:shell","The PID of the program"));
|
||||
options.add("startupid <id>", ki18nc("@info:shell","Startup ID of the program"));
|
||||
options.add("safer", ki18nc("@info:shell","Disable arbitrary disk access"));
|
||||
options.add("restarted", ki18nc("@info:shell","The program has already been restarted"));
|
||||
options.add("keeprunning", ki18nc("@info:shell","Keep the program running and generate "
|
||||
"the backtrace at startup"));
|
||||
options.add("thread <threadid>", ki18nc("@info:shell","The thread id of the failing thread"));
|
||||
KCmdLineArgs::addCmdLineOptions(options);
|
||||
|
||||
KComponentData inst(KCmdLineArgs::aboutData());
|
||||
QApplication *qa =
|
||||
KCmdLineArgs::parsedArgs()->isSet("safer") ?
|
||||
new QApplication(KCmdLineArgs::qtArgc(), KCmdLineArgs::qtArgv()) :
|
||||
new KApplication;
|
||||
qa->setApplicationName(inst.componentName());
|
||||
|
||||
if (!DrKonqi::init()) {
|
||||
delete qa;
|
||||
return 1;
|
||||
}
|
||||
|
||||
qa->setQuitOnLastWindowClosed(false);
|
||||
KGlobal::setAllowQuit(true);
|
||||
|
||||
DrKonqiDialog *w = new DrKonqiDialog();
|
||||
w->show();
|
||||
// Make sure the Dr Konqi dialog comes to the front, whatever the platform
|
||||
// or window manager, but especially on Apple OS X.
|
||||
w->raise();
|
||||
int ret = qa->exec();
|
||||
|
||||
DrKonqi::cleanup();
|
||||
delete qa;
|
||||
return ret;
|
||||
}
|
|
@ -1,139 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWidget</class>
|
||||
<widget class="QWidget" name="MainWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>404</width>
|
||||
<height>289</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="titleLabel">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="infoLabel">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="iconLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="detailsTitleLabel">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="detailsLabel">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextBrowserInteraction</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#ifndef BACKTRACELINE_H
|
||||
#define BACKTRACELINE_H
|
||||
|
||||
#include <QtCore/QSharedData>
|
||||
#include <QtCore/QString>
|
||||
|
||||
class BacktraceLine
|
||||
{
|
||||
public:
|
||||
enum LineType {
|
||||
Unknown, //unknown type. the default
|
||||
EmptyLine, //line is empty
|
||||
Crap, //line is gdb's crap (like "(no debugging symbols found)",
|
||||
//"[New Thread 0x4275c950 (LWP 11931)]", etc...)
|
||||
KCrash, //line is "[KCrash Handler]"
|
||||
ThreadIndicator, //line indicates the current thread,
|
||||
//ex. "[Current thread is 0 (process 11313)]"
|
||||
ThreadStart, //line indicates the start of a thread's stack.
|
||||
SignalHandlerStart, //line indicates the signal handler start
|
||||
//(contains "<signal handler called>")
|
||||
StackFrame //line is a normal stack frame
|
||||
};
|
||||
|
||||
enum LineRating {
|
||||
/* RATING -- EXAMPLE */
|
||||
MissingEverything = 0, // #0 0x0000dead in ?? ()
|
||||
MissingFunction = 1, // #0 0x0000dead in ?? () from /usr/lib/libfoobar.so.4
|
||||
MissingLibrary = 2, // #0 0x0000dead in foobar()
|
||||
MissingSourceFile = 3, // #0 0x0000dead in FooBar::FooBar () from /usr/lib/libfoobar.so.4
|
||||
Good = 4, // #0 0x0000dead in FooBar::crash (this=0x0) at /home/user/foobar.cpp:204
|
||||
InvalidRating = -1 // (dummy invalid value)
|
||||
};
|
||||
|
||||
static const LineRating BestRating = Good;
|
||||
|
||||
BacktraceLine() : d(new Data) {}
|
||||
|
||||
QString toString() const {
|
||||
return d->m_line;
|
||||
}
|
||||
LineType type() const {
|
||||
return d->m_type;
|
||||
}
|
||||
LineRating rating() const {
|
||||
return d->m_rating;
|
||||
}
|
||||
|
||||
int frameNumber() const {
|
||||
return d->m_stackFrameNumber;
|
||||
}
|
||||
QString functionName() const {
|
||||
return d->m_functionName;
|
||||
}
|
||||
QString fileName() const {
|
||||
return d->m_file;
|
||||
}
|
||||
QString libraryName() const {
|
||||
return d->m_library;
|
||||
}
|
||||
|
||||
protected:
|
||||
class Data : public QSharedData
|
||||
{
|
||||
public:
|
||||
Data() : m_type(Unknown), m_rating(InvalidRating),
|
||||
m_stackFrameNumber(-1) {}
|
||||
|
||||
QString m_line;
|
||||
LineType m_type;
|
||||
LineRating m_rating;
|
||||
int m_stackFrameNumber;
|
||||
QString m_functionName;
|
||||
QString m_file;
|
||||
QString m_library;
|
||||
};
|
||||
QExplicitlySharedDataPointer<Data> d;
|
||||
};
|
||||
|
||||
#endif // BACKTRACELINE_H
|
|
@ -1,252 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#include "backtraceparser_p.h"
|
||||
#include "backtraceparsergdb.h"
|
||||
#include "backtraceparserlldb.h"
|
||||
#include "backtraceparsernull.h"
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/qmetaobject.h>
|
||||
#include <KDebug>
|
||||
|
||||
//factory
|
||||
BacktraceParser *BacktraceParser::newParser(const QString & debuggerName, QObject *parent)
|
||||
{
|
||||
if (debuggerName == "gdb") {
|
||||
return new BacktraceParserGdb(parent);
|
||||
} else if (debuggerName == "lldb") {
|
||||
return new BacktraceParserLldb(parent);
|
||||
} else {
|
||||
return new BacktraceParserNull(parent);
|
||||
}
|
||||
}
|
||||
|
||||
BacktraceParser::BacktraceParser(QObject *parent) : QObject(parent), d_ptr(NULL) {}
|
||||
BacktraceParser::~BacktraceParser() { delete d_ptr; }
|
||||
|
||||
void BacktraceParser::connectToGenerator(QObject *generator)
|
||||
{
|
||||
connect(generator, SIGNAL(starting()), this, SLOT(resetState()));
|
||||
connect(generator, SIGNAL(newLine(QString)), this, SLOT(newLine(QString)));
|
||||
}
|
||||
|
||||
QString BacktraceParser::parsedBacktrace() const
|
||||
{
|
||||
Q_D(const BacktraceParser);
|
||||
|
||||
QString result;
|
||||
if (d) {
|
||||
foreach(const BacktraceLine i, d->m_linesList) {
|
||||
result += i.toString();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<BacktraceLine> BacktraceParser::parsedBacktraceLines() const
|
||||
{
|
||||
Q_D(const BacktraceParser);
|
||||
return d ? d->m_linesList : QList<BacktraceLine>();
|
||||
}
|
||||
|
||||
BacktraceParser::Usefulness BacktraceParser::backtraceUsefulness() const
|
||||
{
|
||||
Q_D(const BacktraceParser);
|
||||
|
||||
//if there is no cached usefulness, the data calculation function has not run yet.
|
||||
if (d && d->m_usefulness == InvalidUsefulness) {
|
||||
const_cast<BacktraceParser*>(this)->calculateRatingData();
|
||||
}
|
||||
|
||||
//if there is no d, the debugger has not run yet,
|
||||
//so we can say that the (inexistent) backtrace is Useless.
|
||||
return d ? d->m_usefulness : Useless;
|
||||
}
|
||||
|
||||
QSet<QString> BacktraceParser::librariesWithMissingDebugSymbols() const
|
||||
{
|
||||
Q_D(const BacktraceParser);
|
||||
|
||||
//if there is no cached usefulness, the data calculation function has not run yet.
|
||||
if (d && d->m_usefulness == InvalidUsefulness) {
|
||||
const_cast<BacktraceParser*>(this)->calculateRatingData();
|
||||
}
|
||||
|
||||
//if there is no d, the debugger has not run yet, so we have no libraries.
|
||||
return d ? d->m_librariesWithMissingDebugSymbols : QSet<QString>();
|
||||
}
|
||||
|
||||
void BacktraceParser::resetState()
|
||||
{
|
||||
//reset the state of the parser by getting a new instance of Private
|
||||
delete d_ptr;
|
||||
d_ptr = constructPrivate();
|
||||
}
|
||||
|
||||
BacktraceParserPrivate *BacktraceParser::constructPrivate() const
|
||||
{
|
||||
return new BacktraceParserPrivate();
|
||||
}
|
||||
|
||||
|
||||
/* This function returns true if the given stack frame line is the base of the backtrace
|
||||
and thus the parser should not rate any frames below that one. */
|
||||
static bool lineIsStackBase(const BacktraceLine & line)
|
||||
{
|
||||
//optimization. if there is no function name, do not bother to check it
|
||||
if ( line.rating() == BacktraceLine::MissingEverything
|
||||
|| line.rating() == BacktraceLine::MissingFunction )
|
||||
return false;
|
||||
|
||||
//this is the base frame for all threads except the main thread
|
||||
//FIXME that probably works only on linux
|
||||
if ( line.functionName() == "start_thread" )
|
||||
return true;
|
||||
|
||||
QRegExp regExp;
|
||||
regExp.setPattern("(kde)?main"); //main() or kdemain() is the base for the main thread
|
||||
if ( regExp.exactMatch(line.functionName()) )
|
||||
return true;
|
||||
|
||||
//HACK for better rating. we ignore all stack frames below any function that matches
|
||||
//the following regular expression. The functions that match this expression are usually
|
||||
//"QApplicationPrivate::notify_helper", "QApplication::notify" and similar, which
|
||||
//are used to send any kind of event to the Qt application. All stack frames below this,
|
||||
//with or without debug symbols, are useless to KDE developers, so we ignore them.
|
||||
regExp.setPattern("(Q|K)(Core)?Application(Private)?::notify.*");
|
||||
if ( regExp.exactMatch(line.functionName()) )
|
||||
return true;
|
||||
|
||||
//attempt to recognize crashes that happen after main has returned (bug 200993)
|
||||
if ( line.functionName() == "~KCleanUpGlobalStatic" ||
|
||||
line.functionName() == "~QGlobalStatic" ||
|
||||
line.functionName() == "exit" ||
|
||||
line.functionName() == "*__GI_exit" )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* This function returns true if the given stack frame line is the top of the bactrace
|
||||
and thus the parser should not rate any frames above that one. This is used to avoid
|
||||
rating the stack frames of abort(), assert(), Q_ASSERT() and qFatal() */
|
||||
static bool lineIsStackTop(const BacktraceLine & line)
|
||||
{
|
||||
//optimization. if there is no function name, do not bother to check it
|
||||
if ( line.rating() == BacktraceLine::MissingEverything
|
||||
|| line.rating() == BacktraceLine::MissingFunction )
|
||||
return false;
|
||||
|
||||
if ( line.functionName().startsWith(QLatin1String("qt_assert")) //qt_assert and qt_assert_x
|
||||
|| line.functionName() == "qFatal"
|
||||
|| line.functionName() == "abort"
|
||||
|| line.functionName() == "*__GI_abort"
|
||||
|| line.functionName() == "*__GI___assert_fail" )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* This function returns true if the given stack frame line should be ignored from rating
|
||||
for some reason. Currently it ignores all libc/libstdc++/libpthread functions. */
|
||||
static bool lineShouldBeIgnored(const BacktraceLine & line)
|
||||
{
|
||||
if ( line.libraryName().contains("libc.so")
|
||||
|| line.libraryName().contains("libstdc++.so")
|
||||
|| line.functionName().startsWith(QLatin1String("*__GI_")) //glibc2.9 uses *__GI_ as prefix
|
||||
|| line.libraryName().contains("libpthread.so")
|
||||
|| line.libraryName().contains("libglib-2.0.so")
|
||||
|| line.functionName().contains("_tmain") )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BacktraceParser::calculateRatingData()
|
||||
{
|
||||
Q_D(BacktraceParser);
|
||||
|
||||
uint rating = 0, bestPossibleRating = 0, counter = 0;
|
||||
bool haveSeenStackBase = false;
|
||||
|
||||
QListIterator<BacktraceLine> i(d->m_linesToRate);
|
||||
i.toBack(); //start from the end of the list
|
||||
|
||||
while( i.hasPrevious() ) {
|
||||
const BacktraceLine & line = i.previous();
|
||||
|
||||
if ( !i.hasPrevious() && line.rating() == BacktraceLine::MissingEverything ) {
|
||||
//Under some circumstances, the very first stack frame is invalid (ex, calling a function
|
||||
//at an invalid address could result in a stack frame like "0x00000000 in ?? ()"),
|
||||
//which however does not necessarily mean that the backtrace has a missing symbol on
|
||||
//the first line. Here we make sure to ignore this line from rating. (bug 190882)
|
||||
break; //there are no more items anyway, just break the loop
|
||||
}
|
||||
|
||||
if ( lineIsStackBase(line) ) {
|
||||
rating = bestPossibleRating = counter = 0; //restart rating ignoring any previous frames
|
||||
haveSeenStackBase = true;
|
||||
} else if ( lineIsStackTop(line) ) {
|
||||
break; //we have reached the top, no need to inspect any more frames
|
||||
}
|
||||
|
||||
if ( lineShouldBeIgnored(line) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( line.rating() == BacktraceLine::MissingFunction
|
||||
|| line.rating() == BacktraceLine::MissingSourceFile) {
|
||||
d->m_librariesWithMissingDebugSymbols.insert(line.libraryName().trimmed());
|
||||
}
|
||||
|
||||
uint multiplier = ++counter; //give weight to the first lines
|
||||
rating += static_cast<uint>(line.rating()) * multiplier;
|
||||
bestPossibleRating += static_cast<uint>(BacktraceLine::BestRating) * multiplier;
|
||||
|
||||
kDebug() << line.rating() << line.toString();
|
||||
}
|
||||
|
||||
//calculate rating
|
||||
d->m_usefulness = Useless;
|
||||
if (rating >= (bestPossibleRating*0.90)) {
|
||||
d->m_usefulness = ReallyUseful;
|
||||
} else if (rating >= (bestPossibleRating*0.70)) {
|
||||
d->m_usefulness = MayBeUseful;
|
||||
} else if (rating >= (bestPossibleRating*0.40)) {
|
||||
d->m_usefulness = ProbablyUseless;
|
||||
}
|
||||
|
||||
//if there is no stack base, the executable is probably stripped,
|
||||
//so we need to be more strict with rating
|
||||
if ( !haveSeenStackBase ) {
|
||||
//less than 4 stack frames is useless
|
||||
if ( counter < 4 ) {
|
||||
d->m_usefulness = Useless;
|
||||
//more than 4 stack frames might have some value, so let's not be so strict, just lower the rating
|
||||
} else if ( d->m_usefulness > Useless ) {
|
||||
d->m_usefulness = (Usefulness) (d->m_usefulness - 1);
|
||||
}
|
||||
}
|
||||
|
||||
kDebug() << "Rating:" << rating << "out of" << bestPossibleRating << "Usefulness:"
|
||||
<< staticMetaObject.enumerator(staticMetaObject.indexOfEnumerator("Usefulness")).valueToKey(d->m_usefulness);
|
||||
kDebug() << "90%:" << (bestPossibleRating*0.90) << "70%:" << (bestPossibleRating*0.70)
|
||||
<< "40%:" << (bestPossibleRating*0.40);
|
||||
kDebug() << "Have seen stack base:" << haveSeenStackBase << "Lines counted:" << counter;
|
||||
}
|
||||
|
||||
#include "moc_backtraceparser.cpp"
|
|
@ -1,86 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#ifndef BACKTRACEPARSER_H
|
||||
#define BACKTRACEPARSER_H
|
||||
|
||||
#include "backtraceline.h"
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QMetaType>
|
||||
#include <QtCore/QSet>
|
||||
class BacktraceParserPrivate;
|
||||
|
||||
class BacktraceParser : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(BacktraceParser)
|
||||
Q_ENUMS(Usefulness)
|
||||
public:
|
||||
enum Usefulness { InvalidUsefulness, Useless, ProbablyUseless, MayBeUseful, ReallyUseful };
|
||||
|
||||
static BacktraceParser *newParser(const QString & debuggerName, QObject *parent = 0);
|
||||
virtual ~BacktraceParser();
|
||||
|
||||
/*! Connects the parser to the backtrace generator.
|
||||
* Any QObject that defines the starting() and newLine(QString) signals will do.
|
||||
*/
|
||||
void connectToGenerator(QObject *generator);
|
||||
|
||||
/*! Returns the parsed backtrace. Any garbage that should not be shown to the user is removed. */
|
||||
virtual QString parsedBacktrace() const;
|
||||
|
||||
/*! Same as parsedBacktrace(), but the backtrace here is returned as a list of
|
||||
* BacktraceLine objects, which provide extra information on each line.
|
||||
*/
|
||||
virtual QList<BacktraceLine> parsedBacktraceLines() const;
|
||||
|
||||
/*! Returns a value that indicates how much useful is the backtrace that we got */
|
||||
virtual Usefulness backtraceUsefulness() const;
|
||||
|
||||
/*! Returns a list of libraries/executables that are missing debug symbols. */
|
||||
virtual QSet<QString> librariesWithMissingDebugSymbols() const;
|
||||
|
||||
private Q_SLOTS:
|
||||
void resetState();
|
||||
|
||||
protected Q_SLOTS:
|
||||
/*! Called every time there is a new line from the generator. Subclasses should parse
|
||||
* the line here and insert it in the m_linesList field of BacktraceParserPrivate.
|
||||
* If the line is useful for rating as well, it should also be inserted in the m_linesToRate
|
||||
* field, so that calculateRatingData() can use it.
|
||||
*/
|
||||
virtual void newLine(const QString & lineStr) = 0;
|
||||
|
||||
protected:
|
||||
explicit BacktraceParser(QObject *parent = 0);
|
||||
|
||||
/*! Subclasses should override to provide their own BacktraceParserPrivate instance */
|
||||
virtual BacktraceParserPrivate *constructPrivate() const;
|
||||
|
||||
/*! This method should fill the m_usefulness and m_librariesWithMissingDebugSymbols members of
|
||||
* the BacktraceParserPrivate instance. The default implementation uses the lines inserted in
|
||||
* m_linesToRate and applies a generic algorithm that should work for many debuggers.
|
||||
*/
|
||||
virtual void calculateRatingData();
|
||||
|
||||
BacktraceParserPrivate *d_ptr;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(BacktraceParser::Usefulness)
|
||||
|
||||
#endif // BACKTRACEPARSER_H
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#ifndef BACKTRACEPARSER_P_H
|
||||
#define BACKTRACEPARSER_P_H
|
||||
|
||||
#include "backtraceparser.h"
|
||||
|
||||
class BacktraceParserPrivate
|
||||
{
|
||||
public:
|
||||
BacktraceParserPrivate() : m_usefulness(BacktraceParser::InvalidUsefulness) {}
|
||||
virtual ~BacktraceParserPrivate() {}
|
||||
|
||||
QList<BacktraceLine> m_linesList;
|
||||
QList<BacktraceLine> m_linesToRate;
|
||||
QSet<QString> m_librariesWithMissingDebugSymbols;
|
||||
BacktraceParser::Usefulness m_usefulness;
|
||||
};
|
||||
|
||||
#endif //BACKTRACEPARSER_P_H
|
|
@ -1,292 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009-2010 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#include "backtraceparsergdb.h"
|
||||
#include "backtraceparser_p.h"
|
||||
#include <QtCore/QRegExp>
|
||||
#include <KDebug>
|
||||
|
||||
//BEGIN BacktraceLineGdb
|
||||
|
||||
class BacktraceLineGdb : public BacktraceLine
|
||||
{
|
||||
public:
|
||||
BacktraceLineGdb(const QString & line);
|
||||
|
||||
private:
|
||||
void parse();
|
||||
void rate();
|
||||
};
|
||||
|
||||
BacktraceLineGdb::BacktraceLineGdb(const QString & lineStr)
|
||||
: BacktraceLine()
|
||||
{
|
||||
d->m_line = lineStr;
|
||||
d->m_functionName = QLatin1String("??");
|
||||
parse();
|
||||
if (d->m_type == StackFrame) {
|
||||
rate();
|
||||
}
|
||||
}
|
||||
|
||||
void BacktraceLineGdb::parse()
|
||||
{
|
||||
QRegExp regExp;
|
||||
|
||||
if (d->m_line == "\n") {
|
||||
d->m_type = EmptyLine;
|
||||
return;
|
||||
} else if (d->m_line == "[KCrash Handler]\n") {
|
||||
d->m_type = KCrash;
|
||||
return;
|
||||
} else if (d->m_line.contains("<signal handler called>")) {
|
||||
d->m_type = SignalHandlerStart;
|
||||
return;
|
||||
}
|
||||
|
||||
regExp.setPattern("^#([0-9]+)" //matches the stack frame number, ex. "#0"
|
||||
"[\\s]+(0x[0-9a-f]+[\\s]+in[\\s]+)?" // matches " 0x0000dead in " (optionally)
|
||||
"((\\(anonymous namespace\\)::)?[^\\(]+)" //matches the function name
|
||||
//(anything except left parenthesis, which is the start of the arguments section)
|
||||
//and optionally the prefix "(anonymous namespace)::"
|
||||
"(\\(.*\\))?" //matches the function arguments
|
||||
//(when the app doesn't have debugging symbols)
|
||||
"[\\s]+(const[\\s]+)?" //matches a traling const, if it exists
|
||||
"\\(.*\\)" //matches the arguments of the function with their values
|
||||
//(when the app has debugging symbols)
|
||||
"([\\s]+" //beginning of optional file information
|
||||
"(from|at)[\\s]+" //matches "from " or "at "
|
||||
"(.+)" //matches the filename (source file or shared library file)
|
||||
")?\n$"); //matches trailing newline.
|
||||
//the )? at the end closes the parenthesis before [\\s]+(from|at) and
|
||||
//notes that the whole expression from there is optional.
|
||||
|
||||
if (regExp.exactMatch(d->m_line)) {
|
||||
d->m_type = StackFrame;
|
||||
d->m_stackFrameNumber = regExp.cap(1).toInt();
|
||||
d->m_functionName = regExp.cap(3).trimmed();
|
||||
|
||||
if (!regExp.cap(7).isEmpty()) { //we have file information (stuff after from|at)
|
||||
if (regExp.cap(8) == "at") { //'at' means we have a source file
|
||||
d->m_file = regExp.cap(9);
|
||||
} else { //'from' means we have a library
|
||||
d->m_library = regExp.cap(9);
|
||||
}
|
||||
}
|
||||
|
||||
kDebug() << d->m_stackFrameNumber << d->m_functionName << d->m_file << d->m_library;
|
||||
return;
|
||||
}
|
||||
|
||||
regExp.setPattern(".*\\(no debugging symbols found\\).*|"
|
||||
".*\\[Thread debugging using libthread_db enabled\\].*|"
|
||||
".*\\[New .*|"
|
||||
"0x[0-9a-f]+.*|"
|
||||
"Current language:.*");
|
||||
if (regExp.exactMatch(d->m_line)) {
|
||||
kDebug() << "garbage detected:" << d->m_line;
|
||||
d->m_type = Crap;
|
||||
return;
|
||||
}
|
||||
|
||||
regExp.setPattern("Thread [0-9]+\\s+\\(Thread [0-9a-fx]+\\s+\\(.*\\)\\):\n");
|
||||
if (regExp.exactMatch(d->m_line)) {
|
||||
kDebug() << "thread start detected:" << d->m_line;
|
||||
d->m_type = ThreadStart;
|
||||
return;
|
||||
}
|
||||
|
||||
regExp.setPattern("\\[Current thread is [0-9]+ \\(.*\\)\\]\n");
|
||||
if (regExp.exactMatch(d->m_line)) {
|
||||
kDebug() << "thread indicator detected:" << d->m_line;
|
||||
d->m_type = ThreadIndicator;
|
||||
return;
|
||||
}
|
||||
|
||||
kDebug() << "line" << d->m_line << "did not match";
|
||||
}
|
||||
|
||||
void BacktraceLineGdb::rate()
|
||||
{
|
||||
LineRating r;
|
||||
|
||||
//for explanations, see the LineRating enum definition
|
||||
if (!fileName().isEmpty()) {
|
||||
r = Good;
|
||||
} else if (!libraryName().isEmpty()) {
|
||||
if (functionName() == "??") {
|
||||
r = MissingFunction;
|
||||
} else {
|
||||
r = MissingSourceFile;
|
||||
}
|
||||
} else {
|
||||
if (functionName() == "??") {
|
||||
r = MissingEverything;
|
||||
} else {
|
||||
r = MissingLibrary;
|
||||
}
|
||||
}
|
||||
|
||||
d->m_rating = r;
|
||||
}
|
||||
|
||||
//END BacktraceLineGdb
|
||||
|
||||
//BEGIN BacktraceParserGdb
|
||||
|
||||
class BacktraceParserGdbPrivate : public BacktraceParserPrivate
|
||||
{
|
||||
public:
|
||||
BacktraceParserGdbPrivate()
|
||||
: BacktraceParserPrivate(),
|
||||
m_possibleKCrashStart(0), m_threadsCount(0),
|
||||
m_isBelowSignalHandler(false), m_frameZeroAppeared(false) {}
|
||||
|
||||
QString m_lineInputBuffer;
|
||||
int m_possibleKCrashStart;
|
||||
int m_threadsCount;
|
||||
bool m_isBelowSignalHandler;
|
||||
bool m_frameZeroAppeared;
|
||||
};
|
||||
|
||||
BacktraceParserGdb::BacktraceParserGdb(QObject *parent)
|
||||
: BacktraceParser(parent)
|
||||
{
|
||||
}
|
||||
|
||||
BacktraceParserPrivate* BacktraceParserGdb::constructPrivate() const
|
||||
{
|
||||
return new BacktraceParserGdbPrivate();
|
||||
}
|
||||
|
||||
void BacktraceParserGdb::newLine(const QString & lineStr)
|
||||
{
|
||||
Q_D(BacktraceParserGdb);
|
||||
|
||||
//when the line is too long, gdb splits it into two lines.
|
||||
//This breaks parsing and results in two Unknown lines instead of a StackFrame one.
|
||||
//Here we workaround this by joining the two lines when such a scenario is detected.
|
||||
if (d->m_lineInputBuffer.isEmpty()) {
|
||||
d->m_lineInputBuffer = lineStr;
|
||||
} else if (lineStr.startsWith(QLatin1Char(' ')) || lineStr.startsWith(QLatin1Char('\t'))) {
|
||||
//gdb always adds some whitespace at the beginning of the second line
|
||||
d->m_lineInputBuffer.append(lineStr);
|
||||
} else {
|
||||
parseLine(d->m_lineInputBuffer);
|
||||
d->m_lineInputBuffer = lineStr;
|
||||
}
|
||||
}
|
||||
|
||||
void BacktraceParserGdb::parseLine(const QString & lineStr)
|
||||
{
|
||||
Q_D(BacktraceParserGdb);
|
||||
|
||||
BacktraceLineGdb line(lineStr);
|
||||
switch (line.type()) {
|
||||
case BacktraceLine::Crap:
|
||||
break; //we don't want crap in the backtrace ;)
|
||||
case BacktraceLine::ThreadStart:
|
||||
d->m_linesList.append(line);
|
||||
d->m_possibleKCrashStart = d->m_linesList.size();
|
||||
d->m_threadsCount++;
|
||||
//reset the state of the flags that need to be per-thread
|
||||
d->m_isBelowSignalHandler = false;
|
||||
d->m_frameZeroAppeared = false; // gdb bug workaround flag, see below
|
||||
break;
|
||||
case BacktraceLine::SignalHandlerStart:
|
||||
if (!d->m_isBelowSignalHandler) {
|
||||
//replace the stack frames of KCrash with a nice message
|
||||
d->m_linesList.erase(d->m_linesList.begin() + d->m_possibleKCrashStart, d->m_linesList.end());
|
||||
d->m_linesList.insert(d->m_possibleKCrashStart, BacktraceLineGdb("[KCrash Handler]\n"));
|
||||
d->m_isBelowSignalHandler = true; //next line is the first below the signal handler
|
||||
} else {
|
||||
//this is not the first time we see a crash handler frame on the same thread,
|
||||
//so we just add it to the list
|
||||
d->m_linesList.append(line);
|
||||
}
|
||||
break;
|
||||
case BacktraceLine::StackFrame:
|
||||
// gdb workaround - (v6.8 at least) - 'thread apply all bt' writes
|
||||
// the #0 stack frame again at the end.
|
||||
// Here we ignore this frame by using a flag that tells us whether
|
||||
// this is the first or the second time that the #0 frame appears in this thread.
|
||||
// The flag is cleared on each thread start.
|
||||
if (line.frameNumber() == 0) {
|
||||
if (d->m_frameZeroAppeared) {
|
||||
break; //break from the switch so that the frame is not added to the list.
|
||||
} else {
|
||||
d->m_frameZeroAppeared = true;
|
||||
}
|
||||
}
|
||||
|
||||
//rate the stack frame if we are below the signal handler
|
||||
if (d->m_isBelowSignalHandler) {
|
||||
d->m_linesToRate.append(line);
|
||||
}
|
||||
|
||||
//fall through and append the line to the list
|
||||
default:
|
||||
d->m_linesList.append(line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QString BacktraceParserGdb::parsedBacktrace() const
|
||||
{
|
||||
Q_D(const BacktraceParserGdb);
|
||||
|
||||
QString result;
|
||||
if (d) {
|
||||
foreach(const BacktraceLine i, d->m_linesList) {
|
||||
//if there is only one thread, we can omit the thread indicator,
|
||||
//the thread header and all the empty lines.
|
||||
if (d->m_threadsCount == 1 && (i.type() == BacktraceLine::ThreadIndicator
|
||||
|| i.type() == BacktraceLine::ThreadStart
|
||||
|| i.type() == BacktraceLine::EmptyLine))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
result += i.toString();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<BacktraceLine> BacktraceParserGdb::parsedBacktraceLines() const
|
||||
{
|
||||
Q_D(const BacktraceParserGdb);
|
||||
|
||||
QList<BacktraceLine> result;
|
||||
if (d) {
|
||||
foreach(const BacktraceLine i, d->m_linesList) {
|
||||
//if there is only one thread, we can omit the thread indicator,
|
||||
//the thread header and all the empty lines.
|
||||
if (d->m_threadsCount == 1 && (i.type() == BacktraceLine::ThreadIndicator
|
||||
|| i.type() == BacktraceLine::ThreadStart
|
||||
|| i.type() == BacktraceLine::EmptyLine))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
result.append(i);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//END BacktraceParserGdb
|
||||
|
||||
#include "moc_backtraceparsergdb.cpp"
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#ifndef BACKTRACEPARSERGDB_H
|
||||
#define BACKTRACEPARSERGDB_H
|
||||
|
||||
#include "backtraceparser.h"
|
||||
class BacktraceParserGdbPrivate;
|
||||
|
||||
class BacktraceParserGdb : public BacktraceParser
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(BacktraceParserGdb)
|
||||
public:
|
||||
explicit BacktraceParserGdb(QObject *parent = 0);
|
||||
|
||||
virtual QString parsedBacktrace() const;
|
||||
virtual QList<BacktraceLine> parsedBacktraceLines() const;
|
||||
|
||||
protected:
|
||||
virtual BacktraceParserPrivate *constructPrivate() const;
|
||||
|
||||
protected Q_SLOTS:
|
||||
virtual void newLine(const QString & lineStr);
|
||||
|
||||
private:
|
||||
void parseLine(const QString & lineStr);
|
||||
};
|
||||
|
||||
#endif // BACKTRACEPARSERGDB_H
|
|
@ -1,142 +0,0 @@
|
|||
/* This file is part of the KDE project
|
||||
Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License version 2, as published by the Free Software Foundation.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "backtraceparserlldb.h"
|
||||
#include "backtraceparser_p.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
//BEGIN BacktraceLineLldb
|
||||
|
||||
class BacktraceLineLldb : public BacktraceLine
|
||||
{
|
||||
public:
|
||||
BacktraceLineLldb(const QString &line);
|
||||
};
|
||||
|
||||
BacktraceLineLldb::BacktraceLineLldb(const QString &line)
|
||||
: BacktraceLine()
|
||||
{
|
||||
d->m_line = line;
|
||||
d->m_type = BacktraceLine::Unknown;
|
||||
d->m_rating = BacktraceLine::MissingEverything;
|
||||
|
||||
const QString trimmedline = line.trimmed();
|
||||
if (trimmedline.isEmpty()) {
|
||||
d->m_type = BacktraceLine::EmptyLine;
|
||||
return;
|
||||
}
|
||||
|
||||
if (line.startsWith(QLatin1String("* thread"))) {
|
||||
// also SignalHandlerStart
|
||||
d->m_type = BacktraceLine::ThreadIndicator;
|
||||
d->m_rating = BacktraceLine::MissingEverything;
|
||||
} else if (line.contains(QLatin1String(" thread #"))) {
|
||||
d->m_type = BacktraceLine::ThreadStart;
|
||||
d->m_rating = BacktraceLine::MissingEverything;
|
||||
} else if (line.contains(QLatin1String(" frame #"))) {
|
||||
d->m_type = BacktraceLine::StackFrame;
|
||||
d->m_rating = BacktraceLine::Good;
|
||||
|
||||
int partscounter = 0;
|
||||
const QStringList lineparts = trimmedline.split(QLatin1Char(' '));
|
||||
foreach (const QString &linepart, lineparts) {
|
||||
if (linepart.contains(QLatin1Char('`'))) {
|
||||
const int tildeindex = linepart.indexOf(QLatin1Char('`'));
|
||||
d->m_library = linepart.mid(0, tildeindex);
|
||||
d->m_functionName = linepart.mid(tildeindex + 1, linepart.length() - tildeindex + 1);
|
||||
const int bracketindex = d->m_functionName.indexOf(QLatin1Char('('));
|
||||
if (bracketindex > 0) {
|
||||
d->m_functionName = d->m_functionName.mid(0, bracketindex);
|
||||
}
|
||||
} else if (partscounter > 0 && lineparts.at(partscounter - 1) == QLatin1String("at")) {
|
||||
d->m_file = linepart;
|
||||
}
|
||||
partscounter += 1;
|
||||
}
|
||||
|
||||
if (d->m_file.isEmpty()) {
|
||||
d->m_rating = BacktraceLine::MissingSourceFile;
|
||||
}
|
||||
if (d->m_library.isEmpty()) {
|
||||
d->m_rating = BacktraceLine::MissingLibrary;
|
||||
}
|
||||
if (d->m_functionName.isEmpty() || d->m_functionName.startsWith(QLatin1String("___lldb_unnamed_symbol"))) {
|
||||
d->m_rating = BacktraceLine::MissingFunction;
|
||||
}
|
||||
// qDebug() << Q_FUNC_INFO << line << d->m_functionName << d->m_library << d->m_file;
|
||||
} else {
|
||||
d->m_type = BacktraceLine::Crap;
|
||||
}
|
||||
// qDebug() << Q_FUNC_INFO << line << d->m_type << d->m_rating;
|
||||
}
|
||||
|
||||
//END BacktraceLineLldb
|
||||
|
||||
//BEGIN BacktraceParserLldb
|
||||
|
||||
class BacktraceParserLldbPrivate : public BacktraceParserPrivate
|
||||
{
|
||||
public:
|
||||
BacktraceParserLldbPrivate();
|
||||
};
|
||||
|
||||
|
||||
BacktraceParserLldbPrivate::BacktraceParserLldbPrivate()
|
||||
: BacktraceParserPrivate()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BacktraceParserLldb::BacktraceParserLldb(QObject *parent)
|
||||
: BacktraceParser(parent)
|
||||
{
|
||||
}
|
||||
|
||||
BacktraceParserPrivate* BacktraceParserLldb::constructPrivate() const
|
||||
{
|
||||
return new BacktraceParserLldbPrivate();
|
||||
}
|
||||
|
||||
void BacktraceParserLldb::newLine(const QString &line)
|
||||
{
|
||||
Q_D(BacktraceParserLldb);
|
||||
BacktraceLineLldb lldbline(line);
|
||||
d->m_linesList.append(lldbline);
|
||||
switch (lldbline.type()) {
|
||||
case BacktraceLine::Unknown:
|
||||
case BacktraceLine::EmptyLine:
|
||||
case BacktraceLine::Crap:
|
||||
case BacktraceLine::KCrash: {
|
||||
break;
|
||||
}
|
||||
case BacktraceLine::ThreadIndicator:
|
||||
case BacktraceLine::ThreadStart:
|
||||
case BacktraceLine::SignalHandlerStart:
|
||||
case BacktraceLine::StackFrame: {
|
||||
d->m_linesToRate.append(lldbline);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//END BacktraceParserLldb
|
||||
|
||||
#include "moc_backtraceparserlldb.cpp"
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#include "backtraceparsernull.h"
|
||||
#include "backtraceparser_p.h"
|
||||
|
||||
//BEGIN BacktraceLineNull
|
||||
|
||||
class BacktraceLineNull : public BacktraceLine
|
||||
{
|
||||
public:
|
||||
BacktraceLineNull(const QString & line);
|
||||
};
|
||||
|
||||
BacktraceLineNull::BacktraceLineNull(const QString & line)
|
||||
: BacktraceLine()
|
||||
{
|
||||
d->m_line = line;
|
||||
d->m_rating = MissingEverything;
|
||||
}
|
||||
|
||||
//END BacktraceLineNull
|
||||
|
||||
//BEGIN BacktraceParserNull
|
||||
|
||||
BacktraceParserNull::BacktraceParserNull(QObject *parent) : BacktraceParser(parent) {}
|
||||
|
||||
BacktraceParserPrivate *BacktraceParserNull::constructPrivate() const
|
||||
{
|
||||
BacktraceParserPrivate *d = BacktraceParser::constructPrivate();
|
||||
d->m_usefulness = MayBeUseful;
|
||||
return d;
|
||||
}
|
||||
|
||||
void BacktraceParserNull::newLine(const QString & lineStr)
|
||||
{
|
||||
d_ptr->m_linesList.append(BacktraceLineNull(lineStr));
|
||||
}
|
||||
|
||||
//END BacktraceParserNull
|
||||
|
||||
#include "moc_backtraceparsernull.cpp"
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#ifndef BACKTRACEPARSERNULL_H
|
||||
#define BACKTRACEPARSERNULL_H
|
||||
|
||||
#include "backtraceparser.h"
|
||||
|
||||
class BacktraceParserNull : public BacktraceParser
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BacktraceParserNull(QObject *parent = 0);
|
||||
|
||||
protected Q_SLOTS:
|
||||
virtual void newLine(const QString & lineStr);
|
||||
|
||||
protected:
|
||||
virtual BacktraceParserPrivate *constructPrivate() const;
|
||||
};
|
||||
|
||||
#endif // BACKTRACEPARSERNULL_H
|
|
@ -1,124 +0,0 @@
|
|||
/*******************************************************************
|
||||
* statuswidget.cpp
|
||||
* Copyright 2009,2010 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************/
|
||||
#include "statuswidget.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QSizePolicy>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include <KPixmapSequenceWidget>
|
||||
#include <KPixmapSequence>
|
||||
|
||||
StatusWidget::StatusWidget(QWidget * parent) :
|
||||
QStackedWidget(parent),
|
||||
m_cursorStackCount(0),
|
||||
m_busy(false)
|
||||
{
|
||||
setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
|
||||
|
||||
//Main layout
|
||||
m_statusPage = new QWidget(this);
|
||||
m_busyPage = new QWidget(this);
|
||||
|
||||
addWidget(m_statusPage);
|
||||
addWidget(m_busyPage);
|
||||
|
||||
//Status widget
|
||||
m_statusLabel = new WrapLabel();
|
||||
m_statusLabel->setOpenExternalLinks(true);
|
||||
m_statusLabel->setTextFormat(Qt::RichText);
|
||||
//m_statusLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum));
|
||||
|
||||
QHBoxLayout * statusLayout = new QHBoxLayout();
|
||||
statusLayout->setContentsMargins(0,0,0,0);
|
||||
m_statusPage->setLayout(statusLayout);
|
||||
|
||||
statusLayout->addWidget(m_statusLabel);
|
||||
|
||||
//Busy widget
|
||||
m_throbberWidget = new KPixmapSequenceWidget();
|
||||
m_throbberWidget->setSequence(KPixmapSequence("process-working", 22));
|
||||
m_throbberWidget->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
|
||||
|
||||
m_busyLabel = new WrapLabel();
|
||||
//m_busyLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum));
|
||||
|
||||
QHBoxLayout * busyLayout = new QHBoxLayout();
|
||||
busyLayout->setContentsMargins(0,0,0,0);
|
||||
m_busyPage->setLayout(busyLayout);
|
||||
|
||||
busyLayout->addWidget(m_busyLabel);
|
||||
busyLayout->addWidget(m_throbberWidget);
|
||||
busyLayout->setAlignment(m_throbberWidget,Qt::AlignVCenter);
|
||||
}
|
||||
|
||||
void StatusWidget::setBusy(const QString& busyMessage)
|
||||
{
|
||||
m_statusLabel->clear();
|
||||
m_busyLabel->setText(busyMessage);
|
||||
setCurrentWidget(m_busyPage);
|
||||
setBusyCursor();
|
||||
m_busy = true;
|
||||
}
|
||||
|
||||
void StatusWidget::setIdle(const QString& idleMessage)
|
||||
{
|
||||
m_busyLabel->clear();
|
||||
m_statusLabel->setText(idleMessage);
|
||||
setCurrentWidget(m_statusPage);
|
||||
setIdleCursor();
|
||||
m_busy = false;
|
||||
}
|
||||
|
||||
void StatusWidget::addCustomStatusWidget(QWidget * widget)
|
||||
{
|
||||
QHBoxLayout * statusLayout = static_cast<QHBoxLayout*>(m_statusPage->layout());
|
||||
|
||||
statusLayout->addWidget(widget);
|
||||
statusLayout->setAlignment(widget,Qt::AlignVCenter);
|
||||
widget->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed));
|
||||
}
|
||||
|
||||
void StatusWidget::setBusyCursor()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
m_cursorStackCount++;
|
||||
}
|
||||
|
||||
void StatusWidget::setIdleCursor()
|
||||
{
|
||||
while (m_cursorStackCount!=0) {
|
||||
QApplication::restoreOverrideCursor();
|
||||
m_cursorStackCount--;
|
||||
}
|
||||
}
|
||||
|
||||
void StatusWidget::hideEvent(QHideEvent *)
|
||||
{
|
||||
if (m_busy) {
|
||||
setIdleCursor();
|
||||
}
|
||||
}
|
||||
|
||||
void StatusWidget::showEvent(QShowEvent *)
|
||||
{
|
||||
if (m_busy) {
|
||||
setBusyCursor();
|
||||
}
|
||||
}
|
|
@ -1,91 +0,0 @@
|
|||
/*******************************************************************
|
||||
* statuswidget.h
|
||||
* Copyright 2009,2010 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
******************************************************************/
|
||||
#ifndef STATUSWIDGET__H
|
||||
#define STATUSWIDGET__H
|
||||
|
||||
#include <QtCore/QEvent>
|
||||
#include <QStackedWidget>
|
||||
#include <QLabel>
|
||||
#include <QTextDocument>
|
||||
#include <QHideEvent>
|
||||
|
||||
class WrapLabel;
|
||||
class KPixmapSequenceWidget;
|
||||
|
||||
class StatusWidget: public QStackedWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit StatusWidget(QWidget * parent = 0);
|
||||
|
||||
void setBusy(const QString&);
|
||||
void setIdle(const QString&);
|
||||
|
||||
void addCustomStatusWidget(QWidget *);
|
||||
|
||||
private:
|
||||
void showEvent(QShowEvent *);
|
||||
void hideEvent(QHideEvent *);
|
||||
|
||||
void setBusyCursor();
|
||||
void setIdleCursor();
|
||||
|
||||
WrapLabel * m_statusLabel;
|
||||
|
||||
KPixmapSequenceWidget * m_throbberWidget;
|
||||
WrapLabel * m_busyLabel;
|
||||
|
||||
QWidget * m_statusPage;
|
||||
QWidget * m_busyPage;
|
||||
|
||||
int m_cursorStackCount;
|
||||
bool m_busy;
|
||||
};
|
||||
|
||||
//Dummy class to avoid a QLabel+wordWrap height bug
|
||||
class WrapLabel: public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WrapLabel(QWidget * parent = 0) : QLabel(parent){
|
||||
setWordWrap(true);
|
||||
}
|
||||
|
||||
void setText(const QString & text) {
|
||||
QLabel::setText(text);
|
||||
adjustHeight();
|
||||
}
|
||||
|
||||
bool event(QEvent * e) {
|
||||
if (e->type() == QEvent::ApplicationFontChange || e->type() == QEvent::Resize) {
|
||||
adjustHeight();
|
||||
}
|
||||
return QLabel::event(e);
|
||||
}
|
||||
|
||||
private:
|
||||
void adjustHeight() {
|
||||
QTextDocument document(text());
|
||||
document.setTextWidth(width());
|
||||
setMaximumHeight(document.size().height());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,23 +0,0 @@
|
|||
set(backtraceparsertest_SRCS
|
||||
fakebacktracegenerator.cpp
|
||||
backtraceparsertest.cpp
|
||||
)
|
||||
|
||||
kde4_add_test(drkonqi-backtraceparsertest ${backtraceparsertest_SRCS})
|
||||
target_link_libraries(drkonqi-backtraceparsertest
|
||||
${QT_QTTEST_LIBRARY}
|
||||
${QT_QTCORE_LIBRARY}
|
||||
drkonqi_backtrace_parser
|
||||
)
|
||||
|
||||
# create a link so that the data directory can be accessed from the build
|
||||
# directory, where the test runs
|
||||
if(NOT ${CMAKE_CURRENT_BINARY_DIR} EQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_custom_command(
|
||||
TARGET drkonqi-backtraceparsertest POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/backtraceparsertest_data
|
||||
backtraceparsertest_data
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
|
@ -1,25 +0,0 @@
|
|||
This is a unit test for the BacktraceInfo class, which is used in drkonqi
|
||||
to rate the usefulness of a backtrace.
|
||||
|
||||
This test dynamically loads test data from the "backtraceinfotest_data" directory.
|
||||
To add new data, simply create a file starting with the "test_" prefix and paste
|
||||
a backtrace in it. Then, in the "usefulness_map" file, add a line with the following format:
|
||||
|
||||
test_file: UsefulnessValue
|
||||
|
||||
where "test_file" is the exact filename of the file containing the backtrace and
|
||||
UsefulnessValue is the usefulness value that you expect the backtrace to get.
|
||||
Whitespaces do not matter, they are ignored. Valid usefulness values can be seen
|
||||
in backtraceinfotest.h, in the enum BacktraceInfoTest::Usefulness.
|
||||
|
||||
The UsefulnessValue has to be the enum's text representation of the
|
||||
value and not an integer. For example, having the enum like this:
|
||||
|
||||
enum Usefulness { ReallyUseful = 0, MayBeUseful=1, ProbablyUseless=2, Useless = 3 };
|
||||
|
||||
"ReallyUseful" is a valid value, but "0" isn't.
|
||||
|
||||
|
||||
All files in the "backtraceinfotest_data" directory that do not start with the
|
||||
"test_" prefix are ignored (except the "usefulness_map" file, which has a special
|
||||
purpose, as described above)
|
|
@ -1,108 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "backtraceparsertest.h"
|
||||
#include <QDirIterator>
|
||||
#include <QFileInfo>
|
||||
#include <QFile>
|
||||
#include <QtCore/qmetaobject.h>
|
||||
#include <QDebug>
|
||||
#include <QSharedPointer>
|
||||
|
||||
#define DATA_DIR KDESRCDIR "backtraceparsertest_data"
|
||||
#define SETTINGS_FILE "data.ini"
|
||||
|
||||
BacktraceParserTest::BacktraceParserTest(QObject *parent)
|
||||
: QObject(parent),
|
||||
m_settings(DATA_DIR "/" SETTINGS_FILE, QSettings::IniFormat),
|
||||
m_generator(new FakeBacktraceGenerator(this))
|
||||
{
|
||||
}
|
||||
|
||||
void BacktraceParserTest::fetchData(const QString & group)
|
||||
{
|
||||
QTest::addColumn<QString>("filename");
|
||||
QTest::addColumn<QString>("result");
|
||||
QTest::addColumn<QString>("debugger");
|
||||
|
||||
m_settings.beginGroup(group);
|
||||
QStringList keys = m_settings.groupKeys();
|
||||
m_settings.endGroup();
|
||||
|
||||
foreach(const QString & key, keys) {
|
||||
QTest::newRow(key.toLocal8Bit())
|
||||
<< QString(DATA_DIR"/" + key)
|
||||
<< m_settings.value(group + "/" + key).toString()
|
||||
<< m_settings.value("debugger/" + key).toString();
|
||||
}
|
||||
}
|
||||
|
||||
void BacktraceParserTest::btParserUsefulnessTest_data()
|
||||
{
|
||||
fetchData("usefulness");
|
||||
}
|
||||
|
||||
void BacktraceParserTest::btParserUsefulnessTest()
|
||||
{
|
||||
QFETCH(QString, filename);
|
||||
QFETCH(QString, result);
|
||||
QFETCH(QString, debugger);
|
||||
|
||||
//parse
|
||||
QSharedPointer<BacktraceParser> parser(BacktraceParser::newParser(debugger));
|
||||
parser->connectToGenerator(m_generator);
|
||||
m_generator->sendData(filename);
|
||||
|
||||
//convert usefulness to string
|
||||
QMetaEnum metaUsefulness = BacktraceParser::staticMetaObject.enumerator(
|
||||
BacktraceParser::staticMetaObject.indexOfEnumerator("Usefulness"));
|
||||
QString btUsefulness = metaUsefulness.valueToKey(parser->backtraceUsefulness());
|
||||
|
||||
//compare
|
||||
QEXPECT_FAIL("test_e", "Working on it", Continue);
|
||||
QCOMPARE(btUsefulness, result);
|
||||
}
|
||||
|
||||
void BacktraceParserTest::btParserBenchmark_data()
|
||||
{
|
||||
QTest::addColumn<QString>("filename");
|
||||
QTest::addColumn<QString>("debugger");
|
||||
|
||||
m_settings.beginGroup("debugger");
|
||||
QStringList keys = m_settings.groupKeys();
|
||||
foreach(const QString & key, keys) {
|
||||
QTest::newRow(key.toLocal8Bit())
|
||||
<< QString(DATA_DIR"/" + key)
|
||||
<< m_settings.value(key).toString();
|
||||
}
|
||||
m_settings.endGroup();
|
||||
}
|
||||
|
||||
void BacktraceParserTest::btParserBenchmark()
|
||||
{
|
||||
QFETCH(QString, filename);
|
||||
QFETCH(QString, debugger);
|
||||
|
||||
QSharedPointer<BacktraceParser> parser(BacktraceParser::newParser(debugger));
|
||||
parser->connectToGenerator(m_generator);
|
||||
|
||||
QBENCHMARK {
|
||||
m_generator->sendData(filename);
|
||||
}
|
||||
}
|
||||
|
||||
QTEST_MAIN(BacktraceParserTest)
|
||||
#include "moc_backtraceparsertest.cpp"
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef BACKTRACEPARSERTEST_H
|
||||
#define BACKTRACEPARSERTEST_H
|
||||
|
||||
#include <QtTest>
|
||||
#include <QtCore/qsettings.h>
|
||||
|
||||
#include "fakebacktracegenerator.h"
|
||||
#include "../parser/backtraceparser.h"
|
||||
|
||||
class BacktraceParserTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BacktraceParserTest(QObject *parent = 0);
|
||||
|
||||
private slots:
|
||||
void btParserUsefulnessTest_data();
|
||||
void btParserUsefulnessTest();
|
||||
void btParserBenchmark_data();
|
||||
void btParserBenchmark();
|
||||
|
||||
private:
|
||||
void fetchData(const QString & group);
|
||||
|
||||
QSettings m_settings;
|
||||
FakeBacktraceGenerator *m_generator;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,36 +0,0 @@
|
|||
[usefulness]
|
||||
test_a=Useless
|
||||
test_b=MayBeUseful
|
||||
test_c=ProbablyUseless
|
||||
test_d=ReallyUseful
|
||||
test_e=ProbablyUseless
|
||||
test_f=ProbablyUseless
|
||||
test_g=ReallyUseful
|
||||
test_h=ProbablyUseless
|
||||
test_bug190882=ReallyUseful
|
||||
test_bug192412_a=Useless
|
||||
test_bug192412_b=Useless
|
||||
test_bug168000=MayBeUseful
|
||||
test_bug200993=ReallyUseful
|
||||
|
||||
[debugger]
|
||||
test_a=gdb
|
||||
test_b=gdb
|
||||
test_c=gdb
|
||||
test_d=gdb
|
||||
test_e=gdb
|
||||
test_f=gdb
|
||||
test_g=gdb
|
||||
test_h=gdb
|
||||
test_bug190882=gdb
|
||||
test_bug192412_a=gdb
|
||||
test_bug192412_b=gdb
|
||||
test_bug168000=gdb
|
||||
test_bug200993=gdb
|
||||
test_usefulfunctions=gdb
|
||||
test_usefulfunctions2=gdb
|
||||
test_usefulfunctions3=gdb
|
||||
test_usefulfunctions4=gdb
|
||||
test_usefulfunctions5=gdb
|
||||
test_trailing_const=gdb
|
||||
test_anon_namespace=gdb
|
|
@ -1,140 +0,0 @@
|
|||
[?1034h(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
[Thread debugging using libthread_db enabled]
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
(no debugging symbols found)
|
||||
0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#5 0x00007f8c3562e645 in raise () from /lib64/libc.so.6
|
||||
#6 0x00007f8c3562fc33 in abort () from /lib64/libc.so.6
|
||||
#7 0x00007f8c37500df9 in ?? () from /usr/X11R6/lib64/libGL.so.1
|
||||
#8 0x00007f8c333f1abe in ?? () from /usr/X11R6/lib64/libGLcore.so.1
|
||||
#9 0x00007f8c333f2423 in ?? () from /usr/X11R6/lib64/libGLcore.so.1
|
||||
#10 0x00007f8c331493c4 in ?? () from /usr/X11R6/lib64/libGLcore.so.1
|
||||
#11 0x00007f8c32de6aa6 in ?? () from /usr/X11R6/lib64/libGLcore.so.1
|
||||
#12 0x00007f8c3b6e1c23 in ?? () from /usr/lib64/libkdeinit4_kwin.so
|
||||
#13 0x00007f8c3b6e23bc in ?? () from /usr/lib64/libkdeinit4_kwin.so
|
||||
#14 0x00007f8c3b6d2316 in ?? () from /usr/lib64/libkdeinit4_kwin.so
|
||||
#15 0x00007f8c3b67c2ca in ?? () from /usr/lib64/libkdeinit4_kwin.so
|
||||
#16 0x00007f8c3a8ca454 in QMetaObject::activate(QObject*, int, int, void**) ()
|
||||
from /usr/lib64/libQtCore.so.4
|
||||
#17 0x00007f8c3a8c4da3 in QObject::event(QEvent*) ()
|
||||
from /usr/lib64/libQtCore.so.4
|
||||
#18 0x00007f8c37e871bd in QApplicationPrivate::notify_helper(QObject*, QEvent*)
|
||||
() from /usr/lib64/libQtGui.so.4
|
||||
#19 0x00007f8c37e8ef8a in QApplication::notify(QObject*, QEvent*) ()
|
||||
from /usr/lib64/libQtGui.so.4
|
||||
#20 0x00007f8c362c2bab in KApplication::notify(QObject*, QEvent*) ()
|
||||
from /usr/lib64/libkdeui.so.5
|
||||
#21 0x00007f8c3a8b6091 in QCoreApplication::notifyInternal(QObject*, QEvent*)
|
||||
() from /usr/lib64/libQtCore.so.4
|
||||
#22 0x00007f8c3a8e21c0 in ?? () from /usr/lib64/libQtCore.so.4
|
||||
#23 0x00007f8c3a8de58d in ?? () from /usr/lib64/libQtCore.so.4
|
||||
#24 0x00007f8c344760db in g_main_context_dispatch ()
|
||||
from /usr/lib64/libglib-2.0.so.0
|
||||
#25 0x00007f8c344798ad in ?? () from /usr/lib64/libglib-2.0.so.0
|
||||
#26 0x00007f8c34479a6b in g_main_context_iteration ()
|
||||
from /usr/lib64/libglib-2.0.so.0
|
||||
#27 0x00007f8c3a8de4ef in
|
||||
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
|
||||
from /usr/lib64/libQtCore.so.4
|
||||
#28 0x00007f8c37f179bf in ?? () from /usr/lib64/libQtGui.so.4
|
||||
#29 0x00007f8c3a8b49a2 in
|
||||
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from
|
||||
/usr/lib64/libQtCore.so.4
|
||||
#30 0x00007f8c3a8b4b2d in
|
||||
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
|
||||
/usr/lib64/libQtCore.so.4
|
||||
#31 0x00007f8c3a8b6ffd in QCoreApplication::exec() ()
|
||||
from /usr/lib64/libQtCore.so.4
|
||||
#32 0x00007f8c3b691c21 in kdemain () from /usr/lib64/libkdeinit4_kwin.so
|
||||
#33 0x00007f8c3561a586 in __libc_start_main () from /lib64/libc.so.6
|
||||
#34 0x0000000000400889 in _start ()
|
|
@ -1,53 +0,0 @@
|
|||
Thread 1 (Thread 0x7fe4756407f0 (LWP 9487)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0x00007fe46fd0ac57 in formatICalInvitationHelper(QString, KCal::Calendar*, KCal::InvitationFormatterHelper*, bool, KDateTime::Spec) () from /usr/lib64/libkcal.so.4
|
||||
#7 0x00007fe46fd0d130 in KCal::IncidenceFormatter::formatICalInvitationNoHtml(QString, KCal::Calendar*, KCal::InvitationFormatterHelper*) () from /usr/lib64/libkcal.so.4
|
||||
#8 0x00007fe451a3d7d0 in (anonymous namespace)::Formatter::format(KMail::Interface::BodyPart*, KMail::HtmlWriter*) const () from /usr/lib64/kde4/kmail_bodypartformatter_text_calendar.so
|
||||
#9 0x00007fe45d93a319 in KMail::ObjectTreeParser::parseObjectTree(partNode*) () from /usr/lib64/libkmailprivate.so.4
|
||||
#10 0x00007fe45d93ad55 in KMail::ObjectTreeParser::stdChildHandling(partNode*) () from /usr/lib64/libkmailprivate.so.4
|
||||
#11 0x00007fe45d93b006 in KMail::ObjectTreeParser::processMultiPartAlternativeSubtype(partNode*, KMail::ProcessResult&) () from /usr/lib64/libkmailprivate.so.4
|
||||
#12 0x00007fe45d93aa31 in KMail::ObjectTreeParser::parseObjectTree(partNode*) () from /usr/lib64/libkmailprivate.so.4
|
||||
#13 0x00007fe45d93ad55 in KMail::ObjectTreeParser::stdChildHandling(partNode*) () from /usr/lib64/libkmailprivate.so.4
|
||||
#14 0x00007fe45d93b094 in KMail::ObjectTreeParser::processMultiPartMixedSubtype(partNode*, KMail::ProcessResult&) () from /usr/lib64/libkmailprivate.so.4
|
||||
#15 0x00007fe45d93aa31 in KMail::ObjectTreeParser::parseObjectTree(partNode*) () from /usr/lib64/libkmailprivate.so.4
|
||||
#16 0x00007fe45d7bf3e6 in KMReaderWin::parseMsg(KMMessage*) () from /usr/lib64/libkmailprivate.so.4
|
||||
#17 0x00007fe45d7b45e1 in KMReaderWin::displayMessage() () from /usr/lib64/libkmailprivate.so.4
|
||||
#18 0x00007fe45d7b47ce in KMReaderWin::updateReaderWin() () from /usr/lib64/libkmailprivate.so.4
|
||||
#19 0x00007fe45d7b50d5 in KMReaderWin::update(KMail::Interface::Observable*) () from /usr/lib64/libkmailprivate.so.4
|
||||
#20 0x00007fe45d9da719 in KMail::ISubject::notify() () from /usr/lib64/libkmailprivate.so.4
|
||||
#21 0x00007fe45d6d980c in KMMessage::updateBodyPart(QString, QByteArray const&) () from /usr/lib64/libkmailprivate.so.4
|
||||
#22 0x00007fe45d9b0f59 in KMail::ImapJob::slotGetMessageResult(KJob*) () from /usr/lib64/libkmailprivate.so.4
|
||||
#23 0x00007fe45d9b2b1b in KMail::ImapJob::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkmailprivate.so.4
|
||||
#24 0x00007fe473b8a19a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
|
||||
#25 0x00007fe473f7b382 in KJob::result(KJob*) () from /usr/lib64/libkdecore.so.5
|
||||
#26 0x00007fe473f7b60f in KJob::emitResult() () from /usr/lib64/libkdecore.so.5
|
||||
#27 0x00007fe4713c1733 in KIO::SimpleJob::slotFinished() () from /usr/lib64/libkio.so.5
|
||||
#28 0x00007fe4713c1bf3 in KIO::TransferJob::slotFinished() () from /usr/lib64/libkio.so.5
|
||||
#29 0x00007fe4713bfbb1 in KIO::TransferJob::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkio.so.5
|
||||
#30 0x00007fe473b8a19a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
|
||||
#31 0x00007fe471480301 in KIO::SlaveInterface::dispatch(int, QByteArray const&) () from /usr/lib64/libkio.so.5
|
||||
#32 0x00007fe47147d693 in KIO::SlaveInterface::dispatch() () from /usr/lib64/libkio.so.5
|
||||
#33 0x00007fe47147158d in KIO::Slave::gotInput() () from /usr/lib64/libkio.so.5
|
||||
#34 0x00007fe471471bcc in KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkio.so.5
|
||||
#35 0x00007fe473b8a19a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
|
||||
#36 0x00007fe4713914d7 in KIO::ConnectionPrivate::dequeue() () from /usr/lib64/libkio.so.5
|
||||
#37 0x00007fe4713915fd in KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkio.so.5
|
||||
#38 0x00007fe473b86d89 in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4
|
||||
#39 0x00007fe472f8a4bc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
|
||||
#40 0x00007fe472f90914 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
|
||||
#41 0x00007fe47452da86 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
|
||||
#42 0x00007fe473b7718c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
|
||||
#43 0x00007fe473b79907 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQtCore.so.4
|
||||
#44 0x00007fe473ba0a03 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQtCore.so.4
|
||||
#45 0x00007fe46b430e6e in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
|
||||
#46 0x00007fe46b434838 in ?? () from /usr/lib64/libglib-2.0.so.0
|
||||
#47 0x00007fe46b434960 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
|
||||
#48 0x00007fe473ba0543 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
|
||||
#49 0x00007fe47302711e in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtGui.so.4
|
||||
#50 0x00007fe473b75ab2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
|
||||
#51 0x00007fe473b75e8c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
|
||||
#52 0x00007fe473b79bcb in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
|
||||
#53 0x00000000004041f7 in main ()
|
|
@ -1,70 +0,0 @@
|
|||
[Current thread is 0 (LWP 2636)]
|
||||
|
||||
Thread 4 (Thread 0xa9226b90 (LWP 2637)):
|
||||
#0 0xb8076424 in __kernel_vsyscall ()
|
||||
#1 0xb6982c55 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
|
||||
#2 0xb69fa6a2 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
|
||||
#3 0xb7af1a0a in ?? () from /usr/lib/libQtNetwork.so.4
|
||||
#4 0x0923ebb0 in ?? ()
|
||||
#5 0x0923ebac in ?? ()
|
||||
#6 0xffffffff in ?? ()
|
||||
#7 0xb6b72000 in ?? ()
|
||||
#8 0xa92262f0 in ?? ()
|
||||
#9 0xb808541b in _dl_fixup () from /lib/ld-linux.so.2
|
||||
#10 0xb69f9910 in ?? () from /usr/lib/libQtCore.so.4
|
||||
#11 0x0923eba0 in ?? ()
|
||||
#12 0x00000000 in ?? ()
|
||||
|
||||
Thread 3 (Thread 0xa892ab90 (LWP 2648)):
|
||||
#0 0xb8076424 in __kernel_vsyscall ()
|
||||
#1 0xb6982c55 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
|
||||
#2 0xb69fa6a2 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
|
||||
#3 0xa949380a in RenderThread::run () from
|
||||
/usr/lib/kde4/plasma_wallpaper_image.so
|
||||
#4 0xb69f9910 in ?? () from /usr/lib/libQtCore.so.4
|
||||
#5 0x08f7ee5c in ?? ()
|
||||
#6 0x00000000 in ?? ()
|
||||
|
||||
Thread 2 (Thread 0xa714fb90 (LWP 2703)):
|
||||
#0 0xb8076424 in __kernel_vsyscall ()
|
||||
#1 0xb67d7ab1 in select () from /lib/libc.so.6
|
||||
#2 0xb6ab7bf7 in ?? () from /usr/lib/libQtCore.so.4
|
||||
#3 0x00000008 in ?? ()
|
||||
#4 0xa714f278 in ?? ()
|
||||
#5 0x00000000 in ?? ()
|
||||
|
||||
Thread 1 (Thread 0xb4909730 (LWP 2636)):
|
||||
#0 0xa985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0xaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0xaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0xb721455d in QGraphicsLinearLayout::removeItem () from
|
||||
/usr/lib/libQtGui.so.4
|
||||
#7 0xb804c3f0 in PanelAppletOverlay::mousePressEvent () from
|
||||
/usr/lib/libkdeinit4_plasma.so
|
||||
#8 0xb6d2fd1a in QWidget::event () from /usr/lib/libQtGui.so.4
|
||||
#9 0xb6cddaec in QApplicationPrivate::notify_helper () from
|
||||
/usr/lib/libQtGui.so.4
|
||||
#10 0xb6ce4863 in QApplication::notify () from /usr/lib/libQtGui.so.4
|
||||
#11 0xb78a7f2d in KApplication::notify () from /usr/lib/libkdeui.so.5
|
||||
#12 0xb6ad3f31 in QCoreApplication::notifyInternal () from
|
||||
/usr/lib/libQtCore.so.4
|
||||
#13 0xb6ce5be3 in QApplicationPrivate::sendMouseEvent () from
|
||||
/usr/lib/libQtGui.so.4
|
||||
#14 0xb6d42715 in ?? () from /usr/lib/libQtGui.so.4
|
||||
#15 0x09b3eb08 in ?? ()
|
||||
#16 0xbfb933dc in ?? ()
|
||||
#17 0x09b3eb08 in ?? ()
|
||||
#18 0x092de818 in ?? ()
|
||||
#19 0xb7310bd0 in ?? () from /usr/lib/libQtGui.so.4
|
||||
#20 0xb7310bd4 in ?? () from /usr/lib/libQtGui.so.4
|
||||
#21 0xbfb9345c in ?? ()
|
||||
#22 0x00000028 in ?? ()
|
||||
#23 0x09a53f60 in ?? ()
|
||||
#24 0x09a53000 in ?? ()
|
||||
#25 0xb6779bae in mem2chunk_check () from /lib/libc.so.6
|
||||
#26 0xb6d41bcd in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
|
||||
#27 0xb6d67172 in ?? () from /usr/lib/libQtGui.so.4
|
||||
#28 0x08dbb988 in ?? ()
|
||||
#29 0xbfb938bc in ?? ()
|
||||
#30 0x00000000 in ?? ()
|
|
@ -1,16 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#5 0x00007f50e99f776f in QWidget::testAttribute_helper (this=0x6e6440,
|
||||
attribute=Qt::WA_WState_Created) at kernel/qwidget.cpp:9081
|
||||
#6 0x00007f50e9a37d51 in QWidget::mapFromGlobal (this=0x6e6440,
|
||||
pos=@0x7ffff350ff90)
|
||||
at ../../include/QtGui/../../src/gui/kernel/qwidget.h:991
|
||||
#7 0x00007f50e9a37e79 in QWidget::mapFromGlobal (this=0x6e6450,
|
||||
pos=@0x7ffff350ff90) at kernel/qwidget_x11.cpp:1069
|
||||
#8 0x000000000041fb6c in _start ()
|
||||
#0 0x00007f50e75ff241 in nanosleep () from /lib/libc.so.6
|
|
@ -1,78 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0x00000000 in ?? ()
|
||||
#7 0xb74b192b in QGLWidget::glDraw (this=0xad928a8) at /local/src/qt-x11-opensource-src-4.5.1/src/opengl/qgl.cpp:3458
|
||||
#8 0xb74b041e in QGLWidget::paintEvent (this=0xad928a8) at /local/src/qt-x11-opensource-src-4.5.1/src/opengl/qgl.cpp:3261
|
||||
#9 0xb5b8d942 in QWidget::event (this=0xad928a8, event=0xbffe9924) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qwidget.cpp:7659
|
||||
#10 0xb74b36bc in QGLWidget::event (this=0xad928a8, e=0xbffe9924) at /local/src/qt-x11-opensource-src-4.5.1/src/opengl/qgl.cpp:3244
|
||||
#11 0xb5b3827c in QApplicationPrivate::notify_helper (this=0x8088b68, receiver=0xad928a8, e=0xbffe9924) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication.cpp:4057
|
||||
#12 0xb5b3fa54 in QApplication::notify (this=0xbffec4bc, receiver=0xad928a8, e=0xbffe9924) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication.cpp:4022
|
||||
#13 0xb69ee93b in KApplication::notify (this=0xbffec4bc, receiver=0xad928a8, event=0xbffe9924) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
|
||||
#14 0xb7fcddcb in QCoreApplication::notifyInternal (this=0xbffec4bc, receiver=0xad928a8, event=0xbffe9924) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp:610
|
||||
#15 0xb5b96205 in QCoreApplication::sendSpontaneousEvent (event=<value optimized out>, receiver=<value optimized out>)
|
||||
at ../../include/QtCore/../../../../src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.h:216
|
||||
#16 QWidgetPrivate::drawWidget (event=<value optimized out>, receiver=<value optimized out>) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qwidget.cpp:5052
|
||||
#17 0xb5d5133d in QWidgetPrivate::repaint_sys (this=0xad928f0, rgn=...) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/painting/qbackingstore.cpp:1536
|
||||
#18 0xb5b86d5e in QWidgetPrivate::syncBackingStore (this=0xad928f0) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qwidget.cpp:1599
|
||||
#19 0xb5b8e123 in QWidget::event (this=0xad928a8, event=0x874e6b0) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qwidget.cpp:7799
|
||||
#20 0xb74b36bc in QGLWidget::event (this=0xad928a8, e=0x874e6b0) at /local/src/qt-x11-opensource-src-4.5.1/src/opengl/qgl.cpp:3244
|
||||
#21 0xb5b3827c in QApplicationPrivate::notify_helper (this=0x8088b68, receiver=0xad928a8, e=0x874e6b0) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication.cpp:4057
|
||||
#22 0xb5b3fa54 in QApplication::notify (this=0xbffec4bc, receiver=0xad928a8, e=0x874e6b0) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication.cpp:4022
|
||||
#23 0xb69ee93b in KApplication::notify (this=0xbffec4bc, receiver=0xad928a8, event=0x874e6b0) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
|
||||
#24 0xb7fcddcb in QCoreApplication::notifyInternal (this=0xbffec4bc, receiver=0xad928a8, event=0x874e6b0) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp:610
|
||||
#25 0xb7fce898 in QCoreApplication::sendEvent (event=<value optimized out>, receiver=<value optimized out>)
|
||||
at ../../include/QtCore/../../../../src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.h:213
|
||||
#26 QCoreApplicationPrivate::sendPostedEvents (event=<value optimized out>, receiver=<value optimized out>) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp:1247
|
||||
#27 0xb7fcea6d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp:1140
|
||||
#28 0xb7ff952f in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../../../src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.h:218
|
||||
#29 postEventSourceDispatch () at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qeventdispatcher_glib.cpp:209
|
||||
#30 0xb56839c8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
|
||||
#31 0xb5687083 in ?? () from /usr/lib/libglib-2.0.so.0
|
||||
#32 0xb5687241 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
|
||||
#33 0xb7ff915c in QEventDispatcherGlib::processEvents (this=0x80506a8, flags=...) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qeventdispatcher_glib.cpp:324
|
||||
#34 0xb5bd7845 in QGuiEventDispatcherGlib::processEvents (this=0x80506a8, flags=...) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qguieventdispatcher_glib.cpp:202
|
||||
#35 0xb7fcc359 in QEventLoop::processEvents (this=0xbffea210, flags=...) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qeventloop.cpp:149
|
||||
#36 0xb7fcc7a2 in QEventLoop::exec (this=0xbffea210, flags=...) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qeventloop.cpp:200
|
||||
#37 0xb6057bb3 in QDialog::exec (this=0xbffea250) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/dialogs/qdialog.cpp:498
|
||||
#38 0xad36ef3c in Glsl::slotActivate (this=0xa47fc40) at /local/svn/kde/trunk/koffice/krita/plugins/extensions/glsl/glsl.cc:71
|
||||
#39 0xad36efb5 in Glsl::qt_metacall (this=0xa47fc40, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbffea3e8) at /local/build/koffice/krita/plugins/extensions/glsl/glsl.moc:68
|
||||
#40 0xb7fe3ef8 in QMetaObject::activate (sender=0xa4825d8, from_signal_index=5, to_signal_index=6, argv=0xbffea3e8) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qobject.cpp:3111
|
||||
#41 0xb7fe4388 in QMetaObject::activate (sender=0xa4825d8, m=0xb63cc108, from_local_signal_index=1, to_local_signal_index=2, argv=0xbffea3e8)
|
||||
at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qobject.cpp:3205
|
||||
#42 0xb5b31b91 in QAction::triggered (this=0xa4825d8, _t1=false) at .moc/release-shared/moc_qaction.cpp:236
|
||||
#43 0xb5b33112 in QAction::activate (this=0xa4825d8, event=QAction::Trigger) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qaction.cpp:1160
|
||||
#44 0xb5fb25cc in QMenuPrivate::activateCausedStack (this=0xa5b6370, causedStack=..., action=0xa4825d8, action_e=QAction::Trigger, self=true)
|
||||
at /local/src/qt-x11-opensource-src-4.5.1/src/gui/widgets/qmenu.cpp:967
|
||||
#45 0xb5fb8ceb in QMenuPrivate::activateAction (this=0xa5b6370, action=0xa4825d8, action_e=QAction::Trigger, self=<value optimized out>)
|
||||
at /local/src/qt-x11-opensource-src-4.5.1/src/gui/widgets/qmenu.cpp:1060
|
||||
#46 0xb5fb98b7 in QMenu::mouseReleaseEvent (this=0xa5ae708, e=0xbffeac44) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/widgets/qmenu.cpp:2254
|
||||
#47 0xb6ac8fc2 in KMenu::mouseReleaseEvent (this=0xa5ae708, e=0xbffeac44) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/widgets/kmenu.cpp:456
|
||||
#48 0xb5b8db77 in QWidget::event (this=0xa5ae708, event=0xbffeac44) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qwidget.cpp:7521
|
||||
#49 0xb5fbbbbc in QMenu::event (this=0xa5ae708, e=0xbffeac44) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/widgets/qmenu.cpp:2353
|
||||
#50 0xb5b3827c in QApplicationPrivate::notify_helper (this=0x8088b68, receiver=0xa5ae708, e=0xbffeac44) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication.cpp:4057
|
||||
#51 0xb5b4032b in QApplication::notify (this=0xbffec4bc, receiver=0xa5ae708, e=0xbffeac44) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication.cpp:3759
|
||||
#52 0xb69ee93b in KApplication::notify (this=0xbffec4bc, receiver=0xa5ae708, event=0xbffeac44) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
|
||||
#53 0xb7fcddcb in QCoreApplication::notifyInternal (this=0xbffec4bc,receiver=0xa5ae708, event=0xbffeac44) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp:610
|
||||
#54 0xb5b3f3ae in QCoreApplication::sendSpontaneousEvent (event=<valueoptimized out>, receiver=<value optimized out>)
|
||||
at ../../include/QtCore/../../../../src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.h:216
|
||||
#55 QApplicationPrivate::sendMouseEvent (event=<value optimized out>,receiver=<value optimized out>) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication.cpp:2925
|
||||
#56 0xb5bae8c0 in QETWidget::translateMouseEvent (this=0xa5ae708, event=0xbffec1a0) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication_x11.cpp:4382
|
||||
#57 0xb5bad8cc in QApplication::x11ProcessEvent (this=0xbffec4bc,event=0xbffec1a0) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication_x11.cpp:3444
|
||||
#58 0xb5bd8112 in x11EventSourceDispatch (s=0x808ba38, callback=0,user_data=0x0) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qguieventdispatcher_glib.cpp:146
|
||||
#59 0xb56839c8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
|
||||
#60 0xb5687083 in ?? () from /usr/lib/libglib-2.0.so.0
|
||||
#61 0xb5687241 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
|
||||
#62 0xb7ff915c in QEventDispatcherGlib::processEvents (this=0x80506a8,flags=...) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qeventdispatcher_glib.cpp:324
|
||||
#63 0xb5bd7845 in QGuiEventDispatcherGlib::processEvents (this=0x80506a8,flags=...) at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qguieventdispatcher_glib.cpp:202
|
||||
#64 0xb7fcc359 in QEventLoop::processEvents (this=0xbffec444, flags=...) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qeventloop.cpp:149
|
||||
#65 0xb7fcc7a2 in QEventLoop::exec (this=0xbffec444, flags=...) at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qeventloop.cpp:200
|
||||
#66 0xb7fceb2f in QCoreApplication::exec () at /local/src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.cpp:888
|
||||
#67 0xb5b380f7 in QApplication::exec () at /local/src/qt-x11-opensource-src-4.5.1/src/gui/kernel/qapplication.cpp:3526
|
||||
#68 0xb80c5591 in kdemain (argc=1, argv=0xbffec5b4) at /local/svn/kde/trunk/koffice/krita/main.cc:44
|
||||
#69 0x0804887b in main (argc=1, argv=0xbffec5b4) at /local/build/koffice/krita/krita_dummy.cpp:3
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0x0805a0eb in ?? ()
|
||||
#7 0x08050ac4 in _start ()
|
|
@ -1,9 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#4 KCmdLineArgs::arg (this=0x0, n=0) at /home/gkiagia/kde/src/KDE/kdelibs/kdecore/kernel/kcmdlineargs.cpp:1530
|
||||
#5 0x00000000004023af in _start ()
|
|
@ -1,20 +0,0 @@
|
|||
Thread 1 (Thread 0x7fe4756407f0 (LWP 9487)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0xffffe430 in __kernel_vsyscall ()
|
||||
#7 0xb617b990 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
|
||||
#8 0xb617d2c8 in *__GI_abort () at abort.c:88
|
||||
#9 0xb617478e in *__GI___assert_fail (assertion=0xb3391928 "!s_refcnt", file=0xb3391720 "/local/svn/kde/trunk/KDE/kdelibs/khtml/khtml_global.cpp", line=258,
|
||||
function=0xb3391ac0 "static void KHTMLGlobal::finalCheck()") at assert.c:78
|
||||
#10 0xb2f947d3 in KHTMLGlobal::finalCheck () at /local/svn/kde/trunk/KDE/kdelibs/khtml/khtml_global.cpp:258
|
||||
#11 0xb418554d in ~KHTMLFactory (this=0x825fcd0, __in_chrg=<value optimized out>) at /local/svn/kde/trunk/KDE/kdelibs/khtml/khtml_factory.cpp:35
|
||||
#12 0xb70e8e86 in QObjectCleanupHandler::clear (this=0x825d9e0) at /local/git/Qt/qt/src/corelib/kernel/qobjectcleanuphandler.cpp:140
|
||||
#13 0xb70e8ed0 in ~QObjectCleanupHandler (this=0x825d9e0, __in_chrg=<value optimized out>) at /local/git/Qt/qt/src/corelib/kernel/qobjectcleanuphandler.cpp:86
|
||||
#14 0xb741fc21 in destroy () at /local/svn/kde/trunk/KDE/kdelibs/kdecore/util/kpluginfactory.cpp:29
|
||||
#15 0xb72e154b in ~KCleanUpGlobalStatic (this=0xb74d15d4, __in_chrg=<value optimized out>) at /local/svn/kde/trunk/KDE/kdelibs/kdecore/kernel/kglobal.h:62
|
||||
#16 0xb617e9b1 in *__GI_exit (status=0) at exit.c:75
|
||||
#17 0xb616770d in __libc_start_main (main=0x804877e <main>, argc=1, ubp_av=0xbf97df04, init=0x80487b0 <__libc_csu_init>, fini=0x80487a0 <__libc_csu_fini>, rtld_fini=0xb7f70220 <_dl_fini>,
|
||||
stack_end=0xbf97defc) at libc-start.c:252
|
||||
#18 0x080486d1 in _start () at ../sysdeps/i386/elf/start.S:119
|
|
@ -1,35 +0,0 @@
|
|||
0x00007fd2f44f4001 in nanosleep () from /lib/libc.so.6
|
||||
[Current thread is 0 (LWP 4414)]
|
||||
|
||||
Thread 3 (Thread 0x7fd2c7276950 (LWP 4425)):
|
||||
#0 0x00007fd2f451bc66 in poll () from /lib/libc.so.6
|
||||
#1 0x00007fd2f6bbbc61 in net::DownloadThread::waitForSocketReady () from /usr/lib/libbtcore.so.7
|
||||
#2 0x00007fd2f6bbbccc in net::DownloadThread::update () from /usr/lib/libbtcore.so.7
|
||||
#3 0x00007fd2f6bbc6d9 in net::NetworkThread::run () from /usr/lib/libbtcore.so.7
|
||||
#4 0x00007fd2fba5ad79 in ?? () from /usr/lib/libQtCore.so.4
|
||||
#5 0x00007fd2fb7e9fc7 in start_thread () from /lib/libpthread.so.0
|
||||
#6 0x00007fd2f45245dd in clone () from /lib/libc.so.6
|
||||
#7 0x0000000000000000 in ?? ()
|
||||
|
||||
Thread 2 (Thread 0x7fd2c6a75950 (LWP 4426)):
|
||||
#0 0x00007fd2fb7edd69 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
|
||||
#1 0x00007fd2fba5bb09 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
|
||||
#2 0x00007fd2f6bbb7a4 in net::UploadThread::update () from /usr/lib/libbtcore.so.7
|
||||
#3 0x00007fd2f6bbc6d9 in net::NetworkThread::run () from /usr/lib/libbtcore.so.7
|
||||
#4 0x00007fd2fba5ad79 in ?? () from /usr/lib/libQtCore.so.4
|
||||
#5 0x00007fd2fb7e9fc7 in start_thread () from /lib/libpthread.so.0
|
||||
#6 0x00007fd2f45245dd in clone () from /lib/libc.so.6
|
||||
#7 0x0000000000000000 in ?? ()
|
||||
|
||||
Thread 1 (Thread 0x7fd2fc35f750 (LWP 4414)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#5 0x00007fd2f44d272b in memcpy () from /lib/libc.so.6
|
||||
#6 0x00007fd2f6bd4add in bt::WebSeed::handleData () from /usr/lib/libbtcore.so.7
|
||||
#7 0x00007fd2f6bd5703 in bt::WebSeed::update () from /usr/lib/libbtcore.so.7
|
||||
#8 0x00007fd2f6bdc120 in bt::Downloader::update () from /usr/lib/libbtcore.so.7
|
||||
#9 0x00007fd2f6bfee5b in bt::TorrentControl::update () from /usr/lib/libbtcore.so.7
|
||||
#10 0x000000000042996a in _start ()
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0xb59786c0 (LWP 6637)):
|
||||
#0 0xa985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0xaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0xaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0xb3fe1ac0 in QBasicAtomicInt::ref (this=0xc) at
|
||||
/home/tz/develop/kde/svn/qt-copy/include/QtCore/../../src/corelib/arch/qatomic_i386.h:116
|
||||
#7 0xb40010e6 in QHash (this=0xbfb999fc, other=@0x84afe24) at
|
||||
/home/tz/develop/kde/svn/qt-copy/include/QtCore/../../src/corelib/tools/qhash.h:264
|
||||
#8 0xb400111c in QSet (this=0xbfb999fc, other=@0x84afe24) at
|
||||
/home/tz/develop/kde/svn/qt-copy/include/QtCore/../../src/corelib/tools/qset.h:56
|
||||
#9 0xb4001136 in QForeachContainer (this=0xbfb999fc, t=@0x84afe24) at
|
||||
/home/tz/develop/kde/svn/qt-copy/include/QtCore/../../src/corelib/global/qglobal.h:1964
|
||||
#10 0xb3ffa778 in KoShape::notifyChanged (this=0x84a4538) at
|
||||
/home/tz/develop/kde/svn/koffice/libs/flake/KoShape.cpp:458
|
||||
#11 0xb3ffb773 in KoShape::setParent (this=0x84a4538, parent=0x0) at
|
||||
/home/tz/develop/kde/svn/koffice/libs/flake/KoShape.cpp:375
|
||||
#12 0xb40032de in ~Private (this=0x84a0ca0) at
|
||||
/home/tz/develop/kde/svn/koffice/libs/flake/KoShapeContainer.cpp:36
|
||||
#13 0xb4002aa8 in ~KoShapeContainer (this=0x84b4bf8) at
|
||||
/home/tz/develop/kde/svn/koffice/libs/flake/KoShapeContainer.cpp:56
|
||||
#14 0xb4240152 in ~MagicCurtain (this=0x84b4bf8) at
|
||||
/home/tz/develop/kde/svn/koffice/kword/part/KWDocument.cpp:80
|
||||
#15 0xb423ab9e in ~KWDocument (this=0x81a34e0) at
|
||||
/home/tz/develop/kde/svn/koffice/kword/part/KWDocument.cpp:154
|
||||
#16 0xb77b7849 in KoMainWindow::setRootDocument (this=0x8200b38, doc=0x0) at
|
||||
/home/tz/develop/kde/svn/koffice/libs/main/KoMainWindow.cpp:501
|
||||
#17 0xb77ba45b in KoMainWindow::slotFileClose (this=0x8200b38) at
|
||||
/home/tz/develop/kde/svn/koffice/libs/main/KoMainWindow.cpp:1283
|
||||
#18 0xb77ba922 in KoMainWindow::qt_metacall (this=0x8200b38,
|
||||
_c=QMetaObject::InvokeMetaMethod, _id=13, _a=0xbfb99c7c) at
|
||||
/home/ko2/koffice-build/libs/main/KoMainWindow.moc:135
|
||||
#19 0xb6c8a635 in QMetaObject::activate (sender=0x8207500, from_signal_index=5,
|
||||
to_signal_index=6, argv=0xbfb99c7c) at kernel/qobject.cpp:3028
|
||||
#20 0xb6c8a83e in QMetaObject::activate (sender=0x8207500, m=0xb7730af8,
|
||||
from_local_signal_index=1, to_local_signal_index=2, argv=0xbfb99c7c) at
|
||||
kernel/qobject.cpp:3121
|
||||
#21 0xb702cb16 in QAction::triggered (this=0x8207500, _t1=false) at
|
||||
.moc/debug-shared/moc_qaction.cpp:216
|
||||
#22 0xb702e6b8 in QAction::activate (this=0x8207500, event=QAction::Trigger) at
|
||||
kernel/qaction.cpp:1125
|
||||
#23 0xb702e857 in QAction::event (this=0x8207500, e=0xbfb9a0d4) at
|
||||
kernel/qaction.cpp:1044
|
||||
#24 0xb709d70a in QWidgetAction::event (this=0x8207500, event=0xbfb9a0d4) at
|
||||
kernel/qwidgetaction.cpp:230
|
||||
#25 0xb70348c5 in QApplicationPrivate::notify_helper (this=0x805afa0,
|
||||
receiver=0x8207500, e=0xbfb9a0d4) at kernel/qapplication.cpp:3803
|
||||
#26 0xb7034bab in QApplication::notify (this=0xbfb9ae7c, receiver=0x8207500,
|
||||
e=0xbfb9a0d4) at kernel/qapplication.cpp:3393
|
||||
#27 0xb79f6ebb in KApplication::notify (this=0xbfb9ae7c, receiver=0x8207500,
|
||||
event=0xbfb9a0d4) at
|
||||
/home/tz/develop/kde/svn/kdelibs/kdeui/kernel/kapplication.cpp:311
|
||||
#28 0xb6c7570a in QCoreApplication::notifyInternal (this=0xbfb9ae7c,
|
||||
receiver=0x8207500, event=0xbfb9a0d4) at kernel/qcoreapplication.cpp:583
|
||||
#29 0xb703153d in QCoreApplication::sendEvent (receiver=0x8207500,
|
||||
event=0xbfb9a0d4) at
|
||||
../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
|
||||
#30 0xb7074325 in QShortcutMap::dispatchEvent (this=0x805b03c, e=0xbfb9a4f4) at
|
||||
kernel/qshortcutmap.cpp:771
|
||||
#31 0xb7075364 in QShortcutMap::tryShortcutEvent (this=0x805b03c, w=0x893ac60,
|
||||
e=0xbfb9a4f4) at kernel/qshortcutmap.cpp:362
|
||||
#32 0xb7034dc6 in QApplication::notify (this=0xbfb9ae7c, receiver=0x893ac60,
|
||||
e=0xbfb9a4f4) at kernel/qapplication.cpp:3430
|
||||
#33 0xb79f6ebb in KApplication::notify (this=0xbfb9ae7c, receiver=0x893ac60,
|
||||
event=0xbfb9a4f4) at
|
||||
/home/tz/develop/kde/svn/kdelibs/kdeui/kernel/kapplication.cpp:311
|
||||
#34 0xb6c7570a in QCoreApplication::notifyInternal (this=0xbfb9ae7c,
|
||||
receiver=0x893ac60, event=0xbfb9a4f4) at kernel/qcoreapplication.cpp:583
|
||||
#35 0xb704079f in QCoreApplication::sendSpontaneousEvent (receiver=0x893ac60,
|
||||
event=0xbfb9a4f4) at
|
||||
../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:212
|
||||
#36 0xb70a00ce in qt_sendSpontaneousEvent (receiver=0x893ac60,
|
||||
event=0xbfb9a4f4) at kernel/qapplication_x11.cpp:4588
|
||||
#37 0xb70da5b4 in QKeyMapper::sendKeyEvent (keyWidget=0x893ac60, grab=false,
|
||||
type=QEvent::KeyPress, code=87, modifiers=@0xbfb9a658, text=@0xbfb9a68c,
|
||||
autorepeat=false, count=1, nativeScanCode=25,
|
||||
nativeVirtualKey=119, nativeModifiers=4) at kernel/qkeymapper_x11.cpp:1652
|
||||
#38 0xb70db921 in QKeyMapperPrivate::translateKeyEvent (this=0x807ef50,
|
||||
keyWidget=0x893ac60, event=0xbfb9abdc, grab=false) at
|
||||
kernel/qkeymapper_x11.cpp:1623
|
||||
#39 0xb70b15af in QApplication::x11ProcessEvent (this=0xbfb9ae7c,
|
||||
event=0xbfb9abdc) at kernel/qapplication_x11.cpp:3053
|
||||
#40 0xb70dde71 in x11EventSourceDispatch (s=0x805df20, callback=0,
|
||||
user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:142
|
||||
#41 0xb670ecc6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
|
||||
#42 0xb6712083 in ?? () from /usr/lib/libglib-2.0.so.0
|
||||
#43 0xb671263e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
|
||||
#44 0xb6ca4b8c in QEventDispatcherGlib::processEvents (this=0x805b0d8,
|
||||
flags=@0xbfb9ad74) at kernel/qeventdispatcher_glib.cpp:319
|
||||
#45 0xb70dd68c in QGuiEventDispatcherGlib::processEvents (this=0x805b0d8,
|
||||
flags=@0xbfb9ada4) at kernel/qguieventdispatcher_glib.cpp:198
|
||||
#46 0xb6c725ca in QEventLoop::processEvents (this=0xbfb9ae20,
|
||||
flags=@0xbfb9ade4) at kernel/qeventloop.cpp:143
|
||||
#47 0xb6c72809 in QEventLoop::exec (this=0xbfb9ae20, flags=@0xbfb9ae28) at
|
||||
kernel/qeventloop.cpp:190
|
||||
#48 0xb6c75ef3 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
|
||||
#49 0xb70345de in QApplication::exec () at kernel/qapplication.cpp:3331
|
||||
#50 0xb7f3be82 in kdemain (argc=1, argv=0xbfb9af74) at
|
||||
/home/tz/develop/kde/svn/koffice/kword/part/main.cpp:38
|
||||
#51 0x08048736 in main (argc=139070860, argv=0x0) at
|
||||
/home/ko2/koffice-build/kword/part/kword_dummy.cpp:3
|
|
@ -1,21 +0,0 @@
|
|||
Thread 1 (Thread 0xb4eda700 (LWP 9067)):
|
||||
#0 0xa985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0xaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0xaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0xffffe430 in __kernel_vsyscall ()
|
||||
#7 0xb5f05990 in raise () from /lib/libc.so.6
|
||||
#8 0xb5f072c8 in abort () from /lib/libc.so.6
|
||||
#9 0xb5f47683 in ?? () from /lib/libc.so.6
|
||||
#10 0xb5f48edb in free () from /lib/libc.so.6
|
||||
#11 0xb6128ec1 in operator delete(void*) () from /usr/lib/libstdc++.so.6
|
||||
#12 0x08054227 in ?? ()
|
||||
#13 0xb7c6466a in K3StaticDeleterPrivate::deleteStaticDeleters () at
|
||||
/usr/src/debug/kdelibs-4.2.0/kde3support/kdecore/k3staticdeleter.cpp:56
|
||||
#14 0xb6ce9efb in qt_call_post_routines() () from /usr/lib/libQtCore.so.4
|
||||
#15 0xb6289c18 in QApplication::~QApplication() () from /usr/lib/libQtGui.so.4
|
||||
#16 0xb7eb019e in ~KApplication (this=0xbfbdb0a0) at
|
||||
/usr/src/debug/kdelibs-4.2.0/kdeui/kernel/kapplication.cpp:928
|
||||
#17 0xb7eb7318 in ~KUniqueApplication (this=0xbfbdb0a0) at
|
||||
/usr/src/debug/kdelibs-4.2.0/kdeui/kernel/kuniqueapplication.cpp:372
|
||||
#18 0x0805116a in _start ()
|
|
@ -1,53 +0,0 @@
|
|||
(no debugging symbols found)
|
||||
[Thread debugging using libthread_db enabled]
|
||||
[New Thread 0x7f085740d780 (LWP 11923)]
|
||||
[New Thread 0x4275c950 (LWP 11931)]
|
||||
0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#5 0x00007f0856662a3c in Kopete::MetaContact::metaContactId ()
|
||||
from /usr/lib/libkopete.so.4
|
||||
#6 0x00007f0842c975cc in ?? () from /usr/lib/kde4/kopete_statistics.so
|
||||
#7 0x00007f0842c97944 in ?? () from /usr/lib/kde4/kopete_statistics.so
|
||||
#8 0x00007f0842c88a61 in ?? () from /usr/lib/kde4/kopete_statistics.so
|
||||
#9 0x00007f085389842d in QObject::event (this=0xc220a0, e=0x98d950)
|
||||
at kernel/qobject.cpp:1124
|
||||
#10 0x00007f08544cae5d in QApplicationPrivate::notify_helper (this=0x69a640,
|
||||
receiver=0xc220a0, e=0x2ad1350) at kernel/qapplication.cpp:3772
|
||||
#11 0x00007f08544d2b2a in QApplication::notify (this=0x7fff5f54d0f0,
|
||||
receiver=0xc220a0, e=0x2ad1350) at kernel/qapplication.cpp:3739
|
||||
#12 0x00007f08554b9b7b in KApplication::notify (this=0x7fff5f54d0f0,
|
||||
receiver=0xc220a0, event=0x2ad1350)
|
||||
at /build/buildd/kde4libs-4.0.98+svn833207/kdeui/kernel/kapplication.cpp:311
|
||||
#13 0x00007f0853889411 in QCoreApplication::notifyInternal (
|
||||
this=0x7fff5f54d0f0, receiver=0xc220a0, event=0x2ad1350)
|
||||
at kernel/qcoreapplication.cpp:587
|
||||
#14 0x00007f085388a0ba in QCoreApplicationPrivate::sendPostedEvents (
|
||||
receiver=0x0, event_type=0, data=0x675580)
|
||||
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
|
||||
#15 0x00007f08538b1bb3 in postEventSourceDispatch (s=<value optimized out>)
|
||||
at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
|
||||
#16 0x00007f084f4840f2 in g_main_context_dispatch ()
|
||||
from /usr/lib/libglib-2.0.so.0
|
||||
#17 0x00007f084f487396 in ?? () from /usr/lib/libglib-2.0.so.0
|
||||
#18 0x00007f084f48782f in g_main_context_iteration ()
|
||||
from /usr/lib/libglib-2.0.so.0
|
||||
#19 0x00007f08538b183f in QEventDispatcherGlib::processEvents (this=0x688fb0,
|
||||
flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:325
|
||||
#20 0x00007f085455c16f in QGuiEventDispatcherGlib::processEvents (
|
||||
this=0x7fff5f54c5a0, flags=<value optimized out>)
|
||||
at kernel/qguieventdispatcher_glib.cpp:204
|
||||
#21 0x00007f0853887d22 in QEventLoop::processEvents (
|
||||
this=<value optimized out>, flags={i = 1599393824})
|
||||
at kernel/qeventloop.cpp:149
|
||||
#22 0x00007f0853887ead in QEventLoop::exec (this=0x7fff5f54d060, flags=
|
||||
{i = 1599393904}) at kernel/qeventloop.cpp:200
|
||||
#23 0x00007f085388a37d in QCoreApplication::exec ()
|
||||
at kernel/qcoreapplication.cpp:845
|
||||
#24 0x0000000000448c6c in _start ()
|
||||
#0 0x00007f0853178241 in nanosleep () from /lib/libc.so.6
|
|
@ -1,76 +0,0 @@
|
|||
[Thread debugging using libthread_db enabled]
|
||||
[New Thread 0x7fd180c72740 (LWP 24313)]
|
||||
[New Thread 0x42f84950 (LWP 24317)]
|
||||
[New Thread 0x42783950 (LWP 24316)]
|
||||
[New Thread 0x41f82950 (LWP 24315)]
|
||||
0x00007fd17fb15bf2 in QString::operator== (this=0x687e90,
|
||||
other=<value optimized out>) at tools/qstring.cpp:1928
|
||||
in tools/qstring.cpp
|
||||
[Current thread is 0 (LWP 24313)]
|
||||
|
||||
Thread 4 (Thread 0x41f82950 (LWP 24315)):
|
||||
#0 map_function (s=@0x687e88) at /home/gkiagia/kde/src/drkonqi/tests/crashtest/crashtest.cpp:71
|
||||
#1 0x0000000000402dbb in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIteration (this=<value optimized out>, it=<value optimized out>)
|
||||
at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:73
|
||||
#2 0x0000000000402e3a in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIterations (this=0x67f220,
|
||||
sequenceBeginIterator=<value optimized out>, beginIndex=<value optimized out>, endIndex=1) at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:82
|
||||
#3 0x0000000000403882 in QtConcurrent::IterateKernel<QList<QString>::iterator, void>::forThreadFunction (this=0x67f220) at /usr/include/qt4/QtCore/qtconcurrentiteratekernel.h:247
|
||||
#4 0x00007fd17fac8f79 in QtConcurrent::ThreadEngineBase::run (this=0x67f260) at concurrent/qtconcurrentthreadengine.cpp:184
|
||||
#5 0x00007fd17facc251 in QThreadPoolThread::run (this=0x685b20) at concurrent/qthreadpool.cpp:106
|
||||
#6 0x00007fd17fad5802 in QThreadPrivate::start (arg=0x685b20) at thread/qthread_unix.cpp:189
|
||||
#7 0x00007fd17f853fc7 in start_thread () from /lib/libpthread.so.0
|
||||
#8 0x00007fd17df8e5ad in clone () from /lib/libc.so.6
|
||||
#9 0x0000000000000000 in ?? ()
|
||||
|
||||
Thread 3 (Thread 0x42783950 (LWP 24316)):
|
||||
#0 0x00007fd17f85b5ef in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fd1807e260d in KCrash::startDirectly (argv=0x42782890) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fd1807e3581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#4 KCmdLineArgs::arg (this=0x0, n=0) at /home/gkiagia/kde/src/KDE/kdelibs/kdecore/kernel/kcmdlineargs.cpp:1516
|
||||
#5 0x000000000040233f in do_crash () at /home/gkiagia/kde/src/drkonqi/tests/crashtest/crashtest.cpp:42
|
||||
#6 0x0000000000402dbb in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIteration (this=<value optimized out>, it=<value optimized out>)
|
||||
at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:73
|
||||
#7 0x0000000000402e3a in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIterations (this=0x67f220,
|
||||
sequenceBeginIterator=<value optimized out>, beginIndex=<value optimized out>, endIndex=4) at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:82
|
||||
#8 0x0000000000403882 in QtConcurrent::IterateKernel<QList<QString>::iterator, void>::forThreadFunction (this=0x67f220) at /usr/include/qt4/QtCore/qtconcurrentiteratekernel.h:247
|
||||
#9 0x00007fd17fac8f79 in QtConcurrent::ThreadEngineBase::run (this=0x67f260) at concurrent/qtconcurrentthreadengine.cpp:184
|
||||
#10 0x00007fd17facc251 in QThreadPoolThread::run (this=0x67ec30) at concurrent/qthreadpool.cpp:106
|
||||
#11 0x00007fd17fad5802 in QThreadPrivate::start (arg=0x67ec30) at thread/qthread_unix.cpp:189
|
||||
#12 0x00007fd17f853fc7 in start_thread () from /lib/libpthread.so.0
|
||||
#13 0x00007fd17df8e5ad in clone () from /lib/libc.so.6
|
||||
#14 0x0000000000000000 in ?? ()
|
||||
|
||||
Thread 2 (Thread 0x42f84950 (LWP 24317)):
|
||||
#0 0x0000000000403b3b in qStringComparisonHelper (s1=@0x687e98, s2=<value optimized out>) at /usr/include/qt4/QtCore/qstring.h:905
|
||||
#1 0x0000000000403b69 in QString::operator!= (this=0x687e98, s=0x68816a "") at /usr/include/qt4/QtCore/qstring.h:910
|
||||
#2 0x00000000004027e5 in map_function (s=@0x687e98) at /home/gkiagia/kde/src/drkonqi/tests/crashtest/crashtest.cpp:71
|
||||
#3 0x0000000000402dbb in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIteration (this=<value optimized out>, it=<value optimized out>)
|
||||
at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:73
|
||||
#4 0x0000000000402e3a in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIterations (this=0x67f220,
|
||||
sequenceBeginIterator=<value optimized out>, beginIndex=<value optimized out>, endIndex=3) at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:82
|
||||
#5 0x0000000000403882 in QtConcurrent::IterateKernel<QList<QString>::iterator, void>::forThreadFunction (this=0x67f220) at /usr/include/qt4/QtCore/qtconcurrentiteratekernel.h:247
|
||||
#6 0x00007fd17fac8f79 in QtConcurrent::ThreadEngineBase::run (this=0x67f260) at concurrent/qtconcurrentthreadengine.cpp:184
|
||||
#7 0x00007fd17facc251 in QThreadPoolThread::run (this=0x654a30) at concurrent/qthreadpool.cpp:106
|
||||
#8 0x00007fd17fad5802 in QThreadPrivate::start (arg=0x654a30) at thread/qthread_unix.cpp:189
|
||||
#9 0x00007fd17f853fc7 in start_thread () from /lib/libpthread.so.0
|
||||
#10 0x00007fd17df8e5ad in clone () from /lib/libc.so.6
|
||||
#11 0x0000000000000000 in ?? ()
|
||||
|
||||
Thread 1 (Thread 0x7fd180c72740 (LWP 24313)):
|
||||
#0 0x00007fd17fb15bf2 in QString::operator== (this=0x687e90, other=<value optimized out>) at tools/qstring.cpp:1928
|
||||
#1 0x0000000000403b3b in qStringComparisonHelper (s1=@0x687e90, s2=<value optimized out>) at /usr/include/qt4/QtCore/qstring.h:905
|
||||
#2 0x0000000000403b69 in QString::operator!= (this=0x687e90, s=0x6880ba "") at /usr/include/qt4/QtCore/qstring.h:910
|
||||
#3 0x00000000004027e5 in map_function (s=@0x687e90) at /home/gkiagia/kde/src/drkonqi/tests/crashtest/crashtest.cpp:71
|
||||
#4 0x0000000000402dbb in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIteration (this=<value optimized out>, it=<value optimized out>)
|
||||
at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:73
|
||||
#5 0x0000000000402e3a in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIterations (this=0x67f220,
|
||||
sequenceBeginIterator=<value optimized out>, beginIndex=<value optimized out>, endIndex=2) at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:82
|
||||
#6 0x0000000000403882 in QtConcurrent::IterateKernel<QList<QString>::iterator, void>::forThreadFunction (this=0x67f220) at /usr/include/qt4/QtCore/qtconcurrentiteratekernel.h:247
|
||||
#7 0x00007fd17fac9261 in QtConcurrent::ThreadEngineBase::startBlocking (this=0x67f260) at concurrent/qtconcurrentthreadengine.cpp:76
|
||||
#8 0x0000000000403a30 in QtConcurrent::ThreadEngine<void>::startBlocking (this=0x67f220) at /usr/include/qt4/QtCore/qtconcurrentthreadengine.h:185
|
||||
#9 0x0000000000403a4c in QtConcurrent::ThreadEngineStarter<void>::startBlocking (this=0x7fff88daed20) at /usr/include/qt4/QtCore/qtconcurrentthreadengine.h:286
|
||||
#10 0x0000000000403acb in QtConcurrent::blockingMap<QStringList, void, QString const&> (sequence=@0x7fff88daedd0, map=<value optimized out>) at /usr/include/qt4/QtCore/qtconcurrentmap.h:386
|
||||
#11 0x0000000000402283 in do_threads () at /home/gkiagia/kde/src/drkonqi/tests/crashtest/crashtest.cpp:79
|
||||
#12 0x0000000000402785 in main (argc=2, argv=0x7fff88daf0e8) at /home/gkiagia/kde/src/drkonqi/tests/crashtest/crashtest.cpp:141
|
||||
0x00007fd17fb15bf2 1928 in tools/qstring.cpp
|
|
@ -1,12 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#4 0x00007f44eff82065 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
|
||||
#5 0x00007f44eff85153 in *__GI_abort () at abort.c:88
|
||||
#6 0x00007f44f1b6d775 in qt_message_output (msgType=QtFatalMsg, buf=<value optimized out>) at global/qglobal.cpp:2017
|
||||
#7 0x00007f44f1b6d8bb in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2216
|
||||
#8 0x0000000000402815 in main ()
|
|
@ -1,22 +0,0 @@
|
|||
Thread 4 (Thread 0x7feabc3ea710 (LWP 23321)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#4 0x00007feac3c101ed in QString::operator==(QLatin1String const&) const () from /usr/lib/libQtCore.so.4
|
||||
#5 0x0000000000402e7b in qStringComparisonHelper (s1=..., s2=0x404957 "thread 4") at /usr/include/QtCore/qstring.h:908
|
||||
#6 0x0000000000402ea9 in QString::operator!= (this=0x21ef798, s=0x404957 "thread 4") at /usr/include/QtCore/qstring.h:913
|
||||
#7 0x00000000004023d0 in map_function (s=...) at /home/milian/projects/kde4/drkonqi/tests/crashtest/crashtest.cpp:78
|
||||
#8 0x00000000004040c4 in QtConcurrent::FunctionWrapper1<void, QString const&>::operator() (this=0x21ef6d8, u=...) at /usr/include/QtCore/qtconcurrentfunctionwrappers.h:86
|
||||
#9 0x0000000000403e0c in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIteration (this=0x21ef6a0, it=...)
|
||||
at /usr/include/QtCore/qtconcurrentmapkernel.h:73
|
||||
#10 0x0000000000403e97 in QtConcurrent::MapKernel<QList<QString>::iterator, QtConcurrent::FunctionWrapper1<void, QString const&> >::runIterations (this=0x21ef6a0, sequenceBeginIterator=...,
|
||||
beginIndex=2, endIndex=3) at /usr/include/QtCore/qtconcurrentmapkernel.h:82
|
||||
#11 0x000000000040433e in QtConcurrent::IterateKernel<QList<QString>::iterator, void>::forThreadFunction (this=0x21ef6a0) at /usr/include/QtCore/qtconcurrentiteratekernel.h:266
|
||||
#12 0x0000000000404010 in QtConcurrent::IterateKernel<QList<QString>::iterator, void>::threadFunction (this=0x21ef6a0) at /usr/include/QtCore/qtconcurrentiteratekernel.h:228
|
||||
#13 0x00007feac3bc2dc5 in QtConcurrent::ThreadEngineBase::run() () from /usr/lib/libQtCore.so.4
|
||||
#14 0x00007feac3bc4b05 in ?? () from /usr/lib/libQtCore.so.4
|
||||
#15 0x00007feac3bce485 in ?? () from /usr/lib/libQtCore.so.4
|
||||
#16 0x00007feac3946cb0 in start_thread () from /lib/libpthread.so.0
|
||||
#17 0x00007feac205e7ad in clone () from /lib/libc.so.6
|
||||
#18 0x0000000000000000 in ?? ()
|
|
@ -1,22 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0x00000000 in ?? ()
|
||||
#6 QBasicAtomicInt::operator!= (this=0xa6bf968, result=...) at /usr/include/qt4/QtCore/qbasicatomic.h:69
|
||||
#7 QList<KSharedPtr<Meta::MetaBase> >::detach (this=0xa6bf968, result=...) at /usr/include/qt4/QtCore/qlist.h:119
|
||||
#8 QList<KSharedPtr<Meta::MetaBase> >::append (this=0xa6bf968, result=...) at /usr/include/qt4/QtCore/qlist.h:424
|
||||
#9 QList<KSharedPtr<Meta::MetaBase> >::operator<< (this=0xa6bf968, result=...) at /usr/include/qt4/QtCore/qlist.h:304
|
||||
#10 SqlQueryMaker::handleTracks (this=0xa6bf968, result=...) at /build/buildd/amarok-2.2.0/src/collection/sqlcollection/SqlQueryMaker.cpp:975
|
||||
#11 0xb443a084 in SqlQueryMaker::handleResult (this=0xa6bf968, result=...) at /build/buildd/amarok-2.2.0/src/collection/sqlcollection/SqlQueryMaker.cpp:671
|
||||
#12 0xb443c32b in SqlWorkerThread::run() () from /usr/lib/kde4/amarok_collection-mysqlecollection.so
|
||||
#13 0x02b2137d in ThreadWeaver::JobRunHelper::runTheJob (this=0xb299a26c, th=0x9aeb9b8, job=0xa6c0e20) at ../../../threadweaver/Weaver/Job.cpp:106
|
||||
#14 0x02b216e1 in ThreadWeaver::Job::execute (this=0xa6c0e20, th=0x9aeb9b8) at ../../../threadweaver/Weaver/Job.cpp:135
|
||||
#15 0x02b2038a in ThreadWeaver::ThreadRunHelper::run (this=0xb299a2f4, parent=0x992bf40, th=0x9aeb9b8) at ../../../threadweaver/Weaver/Thread.cpp:95
|
||||
#16 0x02b209db in ThreadWeaver::Thread::run (this=0x9aeb9b8) at ../../../threadweaver/Weaver/Thread.cpp:142
|
||||
#17 0x089bfe32 in QThreadPrivate::start (arg=0x9aeb9b8) at thread/qthread_unix.cpp:188
|
||||
#18 0x06e2d80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
|
||||
#19 0x086be8de in clone () from /lib/tls/i686/cmov/libc.so.6
|
|
@ -1,23 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0x00000000 in ?? ()
|
||||
#6 0x0824add1 in QMap<void const*, void*>::node_create (this=0xbd74808,key=0x0) at /usr/include/qt4/QtCore/qmap.h:420
|
||||
#7 QMap<void const*, void*>::detach_helper (this=0xbd74808, key=0x0) at /usr/include/qt4/QtCore/qmap.h:708
|
||||
#8 QMap<void const*, void*>::detach (this=0xbd74808, key=0x0) at /usr/include/qt4/QtCore/qmap.h:172
|
||||
#9 QMap<void const*, void*>::remove (this=0xbd74808, key=0x0) at /usr/include/qt4/QtCore/qmap.h:609
|
||||
#10 Digikam::Album::removeExtraData (this=0xbd74808, key=0x0) at /build/buildd/digikam-1.0.0/digikam/album.cpp:215
|
||||
#11 0x0833cfb6 in ~TreeAlbumItem (this=0xc098ea0, __in_chrg=<value optimized out>) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:160
|
||||
#12 0x0833cff8 in ~TreeAlbumCheckListItem (this=0xc098ea0, __in_chrg=<value optimized out>) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:191
|
||||
#13 0x02ecff6c in ~QTreeWidgetItem (this=0xc098cd8, __in_chrg=<value optimized out>) at itemviews/qtreewidget.cpp:1514
|
||||
#14 0x0833cff8 in ~TreeAlbumCheckListItem (this=0xc098cd8, __in_chrg=<valuenoptimized out>) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:191
|
||||
#15 0x02ecff6c in ~QTreeWidgetItem (this=0xc098758, __in_chrg=<value optimized out>) at itemviews/qtreewidget.cpp:1514
|
||||
#16 0x0833cff8 in ~TreeAlbumCheckListItem (this=0xc098758, __in_chrg=<value optimized out>) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:191
|
||||
#17 0x02ecff6c in ~QTreeWidgetItem (this=0xc0966e8, __in_chrg=<value optimized out>) at itemviews/qtreewidget.cpp:1514
|
||||
#18 0x0833cff8 in ~TreeAlbumCheckListItem (this=0xc0966e8, __in_chrg=<value optimized out>) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:191
|
||||
#19 0x02ecff6c in ~QTreeWidgetItem (this=0xc08ec10, __in_chrg=<value optimized out>) at itemviews/qtreewidget.cpp:1514
|
||||
#95 0x083bcb2b in main (argc=5, argv=0xbfede9b4) at /build/buildd/digikam-1.0.0/digikam/main.cpp:195
|
|
@ -1,26 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#5 0x00007f57c1a6e4b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
|
||||
#6 0x00007f57c1a71f50 in *__GI_abort () at abort.c:92
|
||||
#7 0x00007f57c3de6e0d in qt_message_output (msgType=QtFatalMsg, buf=0x22c9138 "ASSERT: \"!(*watched)\" in file /home/w00t/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp, line 997") at /home/w00t/kdesvn/qt-copy/src/corelib/global/qglobal.cpp:2248
|
||||
#8 0x00007f57c3de700f in qt_message (msgType=QtFatalMsg, msg=0x7f57c3fa9f90 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fff621502b0) at
|
||||
/home/w00t/kdesvn/qt-copy/src/corelib/global/qglobal.cpp:2294
|
||||
#9 0x00007f57c3de787c in qFatal (msg=0x7f57c3fa9f90 "ASSERT: \"%s\" in file %s, line %d") at /home/w00t/kdesvn/qt-copy/src/corelib/global/qglobal.cpp:2477
|
||||
#10 0x00007f57c3de699f in qt_assert (assertion=0x7f57c3653b74 "!(*watched)", file=0x7f57c3653b40 "/home/w00t/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp", line=997) at /home/w00t/kdesvn/qt-copy/src/corelib/global/qglobal.cpp:2011
|
||||
#11 0x00007f57c32fb473 in ExceptionGuard (this=0x7fff62150420, w=0x202e2c1) at /home/w00t/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:997
|
||||
#12 0x00007f57c32f07fa in QMenuPrivate::activateCausedStack (this=0x202e0b0, causedStack=..., action=0x202ec60, action_e=QAction::Hover, self=true) at /home/w00t/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:1006
|
||||
#13 0x00007f57c32f0d23 in QMenuPrivate::activateAction (this=0x202e0b0, action=0x202ec60, action_e=QAction::Hover, self=true) at /home/w00t/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:1103
|
||||
#14 0x00007f57c32eea8c in QMenuPrivate::setCurrentAction (this=0x202e0b0, action=0x202ec60, popup=96, reason=QMenuPrivate::SelectedFromElsewhere, activateFirst=false) at /home/w00t/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:571
|
||||
#15 0x00007f57c32f7c18 in QMenu::mouseMoveEvent (this=0x202e070, e=0x7fff62151190) at /home/w00t/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:2824
|
||||
#16 0x00007f57c2dc4c19 in QWidget::event (this=0x202e070, event=0x7fff62151190) at /home/w00t/kdesvn/qt-copy/src/gui/kernel/qwidget.cpp:7999
|
||||
#17 0x00007f57c32f5c12 in QMenu::event (this=0x202e070, e=0x7fff62151190) at /home/w00t/kdesvn/qt-copy/src/gui/widgets/qmenu.cpp:2428
|
||||
#18 0x00007f57bc81d605 in Oxygen::MenuBarDataV1::eventFilter (this=0x20ccc00, object=0x202e070, event=0x7fff62151190) at /home/w00t/kdesvn/kdebase/runtime/kstyles/oxygen/animations/oxygenmenubardata.cpp:83
|
||||
#19 0x00007f57c3f1f5db in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x1c95380, receiver=0x202e070, event=0x7fff62151190) at /home/w00t/kdesvn/qt-copy/src/corelib/kernel/qcoreapplication.cpp:819
|
||||
#20 0x00007f57c2d51785 in QApplicationPrivate::notify_helper (this=0x1c95380, receiver=0x202e070, e=0x7fff62151190) at /home/w00t/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:4296
|
||||
#21 0x00007f57c2d4f656 in QApplication::notify (this=0x7fff62157f70, receiver=0x202e070, e=0x7fff62151190) at /home/w00t/kdesvn/qt-copy/src/gui/kernel/qapplication.cpp:3865
|
||||
#22 0x00007f57c580e9f6 in KApplication::notify (this=0x7fff62157f70, receiver=0x202e070, event=0x7fff62151190) at /home/w00t/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:302
|
|
@ -1,17 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0x00471f42 in qt_meta_stringdata_QAnimationGroup () from /usr/lib/libQtCore.so.4
|
||||
#7 0x0087f7fc in __dynamic_cast () from /usr/lib/libstdc++.so.6
|
||||
#8 0x0521ae26 in KarbonPart::addShape(KoShape*) () from /usr/lib/libkarbonui.so.6
|
||||
#9 0x0437c9b0 in KoShapeDeleteCommand::undo() () from /usr/lib/libflake.so.6
|
||||
#10 0x089e4a78 in QUndoCommand::undo (this=0xa70abb0) at util/qundostack.cpp:226
|
||||
#11 0x0437c562 in KoShapeCreateCommand::undo() () from /usr/lib/libflake.so.6
|
||||
#12 0x089e6147 in QUndoStack::undo (this=0x9e107d8) at util/qundostack.cpp:659
|
||||
#13 0x08a0d703 in QUndoStack::qt_metacall (this=0x9e107d8, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbfba6d28) at .moc/release-shared/moc_qundostack.cpp:105
|
||||
#14 0x011b5482 in KUndoStack::qt_metacall (this=0x9e107d8, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0xbfba6d28) at ./kundostack.moc:64
|
||||
#15 0x07398a52 in KoUndoStack::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkotext.so.6
|
|
@ -1,25 +0,0 @@
|
|||
[Current thread is 0 (process 12545)]
|
||||
|
||||
Thread 1 (Thread 0x7fddaac76740 (LWP 12545)):
|
||||
#0 0x00007fdda985f5b5 in waitpid () from /lib/libpthread.so.0
|
||||
#1 0x00007fddaa7e660d in KCrash::startDirectly (argv=0x7fffb2db2800) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:436
|
||||
#2 0x00007fddaa7e7581 in KCrash::defaultCrashHandler (sig=11) at /home/gkiagia/kde/src/KDE/kdelibs/kdeui/util/kcrash.cpp:340
|
||||
#3 <signal handler called>
|
||||
#6 0xffffe424 in __kernel_vsyscall ()
|
||||
#7 0xb57400cf in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
|
||||
#8 0xb57419e7 in abort () at abort.c:88
|
||||
#9 0xb660f7f4 in qt_message_output (msgType=QtFatalMsg, buf=0x6 <Address 0x6 out of bounds>) at global/qglobal.cpp:2248
|
||||
#10 0xb660fa13 in qt_message (msgType=QtFatalMsg, msg=0xb678c85c "ASSERT: \"%s\" in file %s, line %d", ap=0xbfb81204 "\203\234\f\b\354\233\f\bw\001") at global/qglobal.cpp:2294
|
||||
#11 0xb660fb38 in qFatal (msg=0xb678c85c "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2477
|
||||
#12 0xb660fbb5 in qt_assert (assertion=0x80c9c83 "rowCount >= usedRowCnt", file=0x80c9bec "/local/svn/kde/trunk/KDE/kdebase/apps/dolphin/src/panels/information/kmetadatawidget.cpp", line=375) at global/qglobal.cpp:2011
|
||||
#13 0x08083a65 in KMetaDataWidget::Private::slotLoadingFinished (this=0x82f7a90) at /local/svn/kde/trunk/KDE/kdebase/apps/dolphin/src/panels/information/kmetadatawidget.cpp:375
|
||||
#14 0x08085757 in KMetaDataWidget::qt_metacall (this=0x8124650, _c=InvokeMetaMethod, _id=1, _a=0x839a290) at /local/build/KDE/kdebase/apps/dolphin/src/kmetadatawidget.moc:89
|
||||
#15 0xb6726efd in QMetaObject::metacall (object=0x8124650, cl=8929, idx=28, argv=0x839a290) at kernel/qmetaobject.cpp:237
|
||||
#16 0xb6731855 in QMetaCallEvent::placeMetaCall (this=0x8247550, object=0x8124650) at kernel/qobject.cpp:561
|
||||
#17 0xb67329ff in QObject::event (this=0x8124650, e=0x8247550) at kernel/qobject.cpp:1240
|
||||
#18 0xb5cb6330 in QWidget::event (this=0x8124650, event=0x8247550) at kernel/qwidget.cpp:8471
|
||||
#19 0x0808564e in KMetaDataWidget::event (this=0x8124650, event=0x8247550) at /local/svn/kde/trunk/KDE/kdebase/apps/dolphin/src/panels/information/kmetadatawidget.cpp:700
|
||||
#20 0xb5c5615c in QApplicationPrivate::notify_helper (this=0x811ab60, receiver=0x8124650, e=0x8247550) at kernel/qapplication.cpp:4300
|
||||
#21 0xb5c5d038 in QApplication::notify (this=0x8124650, receiver=0x8124650, e=0x8247550) at kernel/qapplication.cpp:4265
|
||||
#22 0xb6da6dd4 in KApplication::notify (this=0xbfb81d04, receiver=0x8124650, event=0x8247550) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
|
||||
#23 0xb6721b8e in QCoreApplication::notifyInternal (this=0xbfb81d04, receiver=0x8124650, event=0x8247550) at kernel/qcoreapplication.cpp:704
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#include "fakebacktracegenerator.h"
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QTextStream>
|
||||
|
||||
void FakeBacktraceGenerator::sendData(const QString & filename)
|
||||
{
|
||||
QFile file(filename);
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
QTextStream stream(&file);
|
||||
|
||||
emit starting();
|
||||
while (!stream.atEnd()) {
|
||||
emit newLine(stream.readLine() + '\n');
|
||||
}
|
||||
emit newLine(QString());
|
||||
}
|
||||
|
||||
#include "moc_fakebacktracegenerator.cpp"
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2009 George Kiagiadakis <kiagiadakis.george@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef FAKEBACKTRACEGENERATOR_H
|
||||
#define FAKEBACKTRACEGENERATOR_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class FakeBacktraceGenerator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FakeBacktraceGenerator(QObject *parent = 0) : QObject(parent) {}
|
||||
void sendData(const QString & filename);
|
||||
|
||||
signals:
|
||||
void starting();
|
||||
void newLine(const QString & line);
|
||||
};
|
||||
|
||||
#endif // FAKEBACKTRACEGENERATOR_H
|
5
kcrash/CMakeLists.txt
Normal file
5
kcrash/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
project(kcrash)
|
||||
|
||||
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1410)
|
||||
|
||||
add_subdirectory(kded)
|
35
kcrash/kded/CMakeLists.txt
Normal file
35
kcrash/kded/CMakeLists.txt
Normal file
|
@ -0,0 +1,35 @@
|
|||
########### next target ###############
|
||||
|
||||
set(kded_kcrash_SRCS
|
||||
kded_kcrash.cpp
|
||||
${CMAKE_CURRENT_BINARY_DIR}/org.kde.kcrash.xml
|
||||
)
|
||||
|
||||
qt4_generate_dbus_interface(kded_kcrash.h org.kde.kcrash.xml)
|
||||
|
||||
kde4_add_plugin(kded_kcrash ${kded_kcrash_SRCS})
|
||||
target_link_libraries(kded_kcrash PRIVATE
|
||||
${QT_QTDBUS_LIBRARY}
|
||||
KDE4::kdecore
|
||||
KDE4::kdeui
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS kded_kcrash
|
||||
DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES kcrash.desktop
|
||||
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}/kded
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kcrash.xml
|
||||
DESTINATION ${KDE4_DBUS_INTERFACES_INSTALL_DIR}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES kcrash.notifyrc
|
||||
DESTINATION ${KDE4_DATA_INSTALL_DIR}/kcrash
|
||||
)
|
11
kcrash/kded/kcrash.desktop
Normal file
11
kcrash/kded/kcrash.desktop
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Icon=tools-report-bug
|
||||
Name=Crash Notifier
|
||||
Comment=Notifies about crashed applications
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=KDEDModule
|
||||
X-KDE-Library=kcrash
|
||||
X-KDE-DBus-ModuleName=kcrash
|
||||
X-KDE-Kded-autoload=true
|
||||
X-KDE-Kded-load-on-demand=true
|
||||
OnlyShowIn=KDE;
|
10
kcrash/kded/kcrash.notifyrc
Normal file
10
kcrash/kded/kcrash.notifyrc
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Global]
|
||||
Name=kcrash
|
||||
Comment=Crash notifier
|
||||
IconName=tools-report-bug
|
||||
|
||||
[Event/Crash]
|
||||
Name=Application crashed
|
||||
Action=Sound|Popup
|
||||
Sound=KDE-Sys-App-Error-Serious-Very.ogg
|
||||
IconName=tools-report-bug
|
125
kcrash/kded/kded_kcrash.cpp
Normal file
125
kcrash/kded/kded_kcrash.cpp
Normal file
|
@ -0,0 +1,125 @@
|
|||
/* This file is part of the KDE project
|
||||
Copyright (C) 2023 Ivailo Monev <xakepa10@gmail.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License version 2, as published by the Free Software Foundation.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "kded_kcrash.h"
|
||||
#include <kpluginfactory.h>
|
||||
#include <knotification.h>
|
||||
#include <kglobal.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include <klocale.h>
|
||||
#include <kglobalsettings.h>
|
||||
#include <ktoolinvocation.h>
|
||||
#include <kcrash.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
|
||||
// NOTE: keep in sync with:
|
||||
// kdelibs/kdeui/util/kcrash.cpp
|
||||
|
||||
static const QStringList s_kcrashfilters = QStringList()
|
||||
<< QString::fromLatin1("*.kcrash");
|
||||
|
||||
K_PLUGIN_FACTORY(KCrashModuleFactory, registerPlugin<KCrashModule>();)
|
||||
K_EXPORT_PLUGIN(KCrashModuleFactory("kcrash"))
|
||||
|
||||
KCrashModule::KCrashModule(QObject *parent, const QList<QVariant> &args)
|
||||
: KDEDModule(parent),
|
||||
m_dirwatch(nullptr)
|
||||
{
|
||||
Q_UNUSED(args);
|
||||
|
||||
m_kcrashpath = KGlobal::dirs()->saveLocation("tmp", "kcrash/");
|
||||
m_dirwatch = new KDirWatch(this);
|
||||
m_dirwatch->addDir(m_kcrashpath);
|
||||
connect(
|
||||
m_dirwatch, SIGNAL(dirty(QString)),
|
||||
this, SLOT(slotDirty(QString))
|
||||
);
|
||||
}
|
||||
|
||||
KCrashModule::~KCrashModule()
|
||||
{
|
||||
m_dirwatch->deleteLater();
|
||||
}
|
||||
|
||||
void KCrashModule::slotDirty(const QString &path)
|
||||
{
|
||||
Q_UNUSED(path);
|
||||
QDir kcrashdir(m_kcrashpath);
|
||||
foreach (const QFileInfo &fileinfo, kcrashdir.entryInfoList(s_kcrashfilters, QDir::Files)) {
|
||||
const QString kcrashfilepath = fileinfo.absoluteFilePath();
|
||||
QFile kcrashfile(kcrashfilepath);
|
||||
if (!kcrashfile.open(QFile::ReadOnly)) {
|
||||
kWarning() << "Could not open" << kcrashfilepath;
|
||||
continue;
|
||||
}
|
||||
|
||||
kDebug() << "Reading" << kcrashfilepath;
|
||||
QVariantMap kcrashdata;
|
||||
int kcrashsignal;
|
||||
QString kcrashbacktrace;
|
||||
{
|
||||
QDataStream crashstream(&kcrashfile);
|
||||
crashstream >> kcrashdata;
|
||||
crashstream >> kcrashsignal;
|
||||
crashstream >> kcrashbacktrace;
|
||||
}
|
||||
if (!QFile::remove(kcrashfilepath)) {
|
||||
kWarning() << "Could not remove" << kcrashfilepath;
|
||||
}
|
||||
|
||||
const KCrash::CrashFlags kcrashflags = static_cast<KCrash::CrashFlags>(
|
||||
kcrashdata["flags"].toInt()
|
||||
);
|
||||
if (kcrashflags & KCrash::DrKonqi) {
|
||||
QString kcrashappname = kcrashdata["programname"].toString();
|
||||
if (kcrashappname.isEmpty()) {
|
||||
kcrashappname = kcrashdata["appname"].toString();
|
||||
}
|
||||
kDebug() << "Sending notification for" << kcrashfilepath;
|
||||
KNotification* knotification = new KNotification("Crash");
|
||||
knotification->setComponentData(KComponentData("kcrash"));
|
||||
knotification->setTitle(i18n("%1 crashed", kcrashappname));
|
||||
knotification->setText(i18n("For details about the crash look into the system log."));
|
||||
knotification->setActions(QStringList() << i18n("Report"));
|
||||
connect(knotification, SIGNAL(action1Activated()), this, SLOT(slotReport()));
|
||||
knotification->sendEvent();
|
||||
}
|
||||
if (kcrashflags & KCrash::AutoRestart) {
|
||||
const QString kcrashdisplay = kcrashdata["display"].toString();
|
||||
const QString kcrashapppath = kcrashdata["apppath"].toString();
|
||||
QStringList kcrashargs;
|
||||
if (!kcrashdisplay.isEmpty()) {
|
||||
kcrashargs.append(QString::fromLatin1("--display"));
|
||||
kcrashargs.append(kcrashdisplay);
|
||||
}
|
||||
kDebug() << "Restarting" << kcrashfilepath << kcrashapppath << kcrashargs;
|
||||
KToolInvocation::kdeinitExec(kcrashapppath, kcrashargs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KCrashModule::slotReport()
|
||||
{
|
||||
const QString kcrashreporturl = KDE_BUG_REPORT_URL;
|
||||
KToolInvocation::invokeBrowser(kcrashreporturl);
|
||||
}
|
||||
|
||||
#include "moc_kded_kcrash.cpp"
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of the KDE project
|
||||
Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||
Copyright (C) 2023 Ivailo Monev <xakepa10@gmail.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
|
@ -16,25 +16,29 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef BACKTRACEPARSERLLDB_H
|
||||
#define BACKTRACEPARSERLLDB_H
|
||||
#ifndef KCRASH_KDED_H
|
||||
#define KCRASH_KDED_H
|
||||
|
||||
#include "backtraceparser.h"
|
||||
#include "kdedmodule.h"
|
||||
|
||||
class BacktraceParserLldbPrivate;
|
||||
#include <KDirWatch>
|
||||
|
||||
class BacktraceParserLldb : public BacktraceParser
|
||||
class KCrashModule: public KDEDModule
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(BacktraceParserLldb)
|
||||
Q_CLASSINFO("D-Bus Interface", "org.kde.kcrash")
|
||||
|
||||
public:
|
||||
explicit BacktraceParserLldb(QObject *parent = 0);
|
||||
KCrashModule(QObject *parent, const QList<QVariant> &args);
|
||||
~KCrashModule();
|
||||
|
||||
protected:
|
||||
virtual BacktraceParserPrivate *constructPrivate() const;
|
||||
private Q_SLOTS:
|
||||
void slotDirty(const QString &path);
|
||||
void slotReport();
|
||||
|
||||
protected Q_SLOTS:
|
||||
virtual void newLine(const QString &line);
|
||||
private:
|
||||
QString m_kcrashpath;
|
||||
KDirWatch *m_dirwatch;
|
||||
};
|
||||
|
||||
#endif // BACKTRACEPARSERLLDB_H
|
||||
#endif // KCRASH_KDED_H
|
Loading…
Add table
Reference in a new issue