diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bd9bbed..8f5accc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/drkonqi/.kateconfig b/drkonqi/.kateconfig deleted file mode 100644 index 5dff1098..00000000 --- a/drkonqi/.kateconfig +++ /dev/null @@ -1 +0,0 @@ -kate: replace-tabs on; indent-width 4; \ No newline at end of file diff --git a/drkonqi/AUTHORS b/drkonqi/AUTHORS deleted file mode 100644 index 78fb78c4..00000000 --- a/drkonqi/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -Hans Petter Bieker -Dario Andres Rodriguez -George Kiagiadakis -A. L. Spehr -Lee Olson \ No newline at end of file diff --git a/drkonqi/CMakeLists.txt b/drkonqi/CMakeLists.txt deleted file mode 100644 index 2b051e2f..00000000 --- a/drkonqi/CMakeLists.txt +++ /dev/null @@ -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}) diff --git a/drkonqi/ExtraDesktop.sh b/drkonqi/ExtraDesktop.sh deleted file mode 100644 index da48d446..00000000 --- a/drkonqi/ExtraDesktop.sh +++ /dev/null @@ -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 diff --git a/drkonqi/LICENSE b/drkonqi/LICENSE deleted file mode 100644 index d511905c..00000000 --- a/drkonqi/LICENSE +++ /dev/null @@ -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. - - - Copyright (C) - - 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. - - , 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. diff --git a/drkonqi/Messages.sh b/drkonqi/Messages.sh deleted file mode 100644 index fdb88dc6..00000000 --- a/drkonqi/Messages.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -$EXTRACTRC ui/*.ui >> rc.cpp -$XGETTEXT *.cpp -o $podir/drkonqi.pot -rm -f rc.cpp diff --git a/drkonqi/README b/drkonqi/README deleted file mode 100644 index af35289f..00000000 --- a/drkonqi/README +++ /dev/null @@ -1,6 +0,0 @@ -How to activate the debug button for DrKonqi: - -$KDEHOME/share/config/drkonqirc: - -[Drkonqi] -ShowDebugButton=true diff --git a/drkonqi/ToDo b/drkonqi/ToDo deleted file mode 100644 index 0949e82d..00000000 --- a/drkonqi/ToDo +++ /dev/null @@ -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 diff --git a/drkonqi/backtracegenerator.cpp b/drkonqi/backtracegenerator.cpp deleted file mode 100644 index 39d5fe31..00000000 --- a/drkonqi/backtracegenerator.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/***************************************************************** - * drkonqi - The KDE Crash Handler - * - * Copyright (C) 2000-2003 Hans Petter Bieker - * Copyright (C) 2009 George Kiagiadakis - * - * 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 -#include -#include - -#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" diff --git a/drkonqi/backtracegenerator.h b/drkonqi/backtracegenerator.h deleted file mode 100644 index d95e2d45..00000000 --- a/drkonqi/backtracegenerator.h +++ /dev/null @@ -1,92 +0,0 @@ -/***************************************************************** - * drkonqi - The KDE Crash Handler - * - * Copyright (C) 2000-2003 Hans Petter Bieker - * - * 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 - -#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 diff --git a/drkonqi/backtraceratingwidget.cpp b/drkonqi/backtraceratingwidget.cpp deleted file mode 100644 index 2858c767..00000000 --- a/drkonqi/backtraceratingwidget.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************* -* backtraceratingwidget.cpp -* Copyright 2009 Dario Andres Rodriguez -* -* 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 . -* -******************************************************************/ - -#include "backtraceratingwidget.h" - -#include -#include - -#include - -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(); -} diff --git a/drkonqi/backtraceratingwidget.h b/drkonqi/backtraceratingwidget.h deleted file mode 100644 index 72fc0922..00000000 --- a/drkonqi/backtraceratingwidget.h +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************* -* backtraceratingwidget.h -* Copyright 2009 Dario Andres Rodriguez -* -* 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 . -* -******************************************************************/ - -#ifndef BACKTRACERATINGWIDGET__H -#define BACKTRACERATINGWIDGET__H - -#include - -#include "parser/backtraceparser.h" -#include "backtracegenerator.h" - -#include - -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 diff --git a/drkonqi/backtracewidget.cpp b/drkonqi/backtracewidget.cpp deleted file mode 100644 index 281a8e69..00000000 --- a/drkonqi/backtracewidget.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/******************************************************************* -* backtracewidget.cpp -* Copyright 2009,2010 Dario Andres Rodriguez -* -* 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 . -* -******************************************************************/ - -#include "backtracewidget.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#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("

What is a \"backtrace\" ?

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.
Backtraces are commonly " - "used during interactive and post-mortem debugging.

")); - 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 Reload.")); - 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 How to " - "create useful crash reports to learn how to get a useful " - "backtrace; install the needed packages (" - "list of files) and click the " - "Reload 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 Reload" - " 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", "The debugger application is missing or " - "could not be launched.")); - - 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 need to first install the debugger " - "application (%1) then click the Reload" - " button.", - 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 = ""; - message += i18n("The packages containing debug information for the following application and libraries are missing:"); - message += "
    "; - - Q_FOREACH(const QString & string, missingDbgForFiles) { - message += "
  • " + string + "
  • "; - } - - message += "
"; - - KMessageBox::information(this, message, i18nc("messagebox title","Missing debug information packages")); - } -} - diff --git a/drkonqi/backtracewidget.h b/drkonqi/backtracewidget.h deleted file mode 100644 index 17367645..00000000 --- a/drkonqi/backtracewidget.h +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************* -* backtracewidget.h -* Copyright 2009 Dario Andres Rodriguez -* -* 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 . -* -******************************************************************/ - -#ifndef BACKTRACEWIDGET__H -#define BACKTRACEWIDGET__H - -#include -#include - -#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 diff --git a/drkonqi/backtracewidget.ui b/drkonqi/backtracewidget.ui deleted file mode 100644 index 832c5e41..00000000 --- a/drkonqi/backtracewidget.ui +++ /dev/null @@ -1,171 +0,0 @@ - - - Form - - - - 0 - 0 - 511 - 476 - - - - GetBacktraceWidget - - - - - - - - - - - - - 1 - - - - - 0 - - - 0 - - - - - - - - - - 4 - - - - - 10 - - - - - - 0 - 0 - - - - - 48 - 48 - - - - true - - - - - - - true - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Show backtrace content (advanced) - - - - - - - - - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - Qt::RichText - - - true - - - false - - - - - - - - - - - - KPushButton - QPushButton -
kpushbutton.h
-
- - StatusWidget - QWidget -
statuswidget.h
- 1 -
-
- -
diff --git a/drkonqi/config-drkonqi.h.cmake b/drkonqi/config-drkonqi.h.cmake deleted file mode 100644 index a048b9ee..00000000 --- a/drkonqi/config-drkonqi.h.cmake +++ /dev/null @@ -1 +0,0 @@ -#cmakedefine HAVE_STRSIGNAL 1 diff --git a/drkonqi/crashedapplication.cpp b/drkonqi/crashedapplication.cpp deleted file mode 100644 index 39a60306..00000000 --- a/drkonqi/crashedapplication.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ - -#include - -#include "crashedapplication.h" - -#if defined(HAVE_STRSIGNAL) -# include -# include -# include -#else -# include -#endif - -#include - -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" diff --git a/drkonqi/crashedapplication.h b/drkonqi/crashedapplication.h deleted file mode 100644 index a06f0e8c..00000000 --- a/drkonqi/crashedapplication.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef CRASHEDAPPLICATION_H -#define CRASHEDAPPLICATION_H - -#include -#include -#include - -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 diff --git a/drkonqi/data/CMakeLists.txt b/drkonqi/data/CMakeLists.txt deleted file mode 100644 index 36b62601..00000000 --- a/drkonqi/data/CMakeLists.txt +++ /dev/null @@ -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 -) diff --git a/drkonqi/data/crash.png b/drkonqi/data/crash.png deleted file mode 100644 index 46248469..00000000 Binary files a/drkonqi/data/crash.png and /dev/null differ diff --git a/drkonqi/data/debuggers/external/gdbrc b/drkonqi/data/debuggers/external/gdbrc deleted file mode 100644 index 65adcd79..00000000 --- a/drkonqi/data/debuggers/external/gdbrc +++ /dev/null @@ -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 diff --git a/drkonqi/data/debuggers/external/kdbgrc b/drkonqi/data/debuggers/external/kdbgrc deleted file mode 100644 index 3e3d9487..00000000 --- a/drkonqi/data/debuggers/external/kdbgrc +++ /dev/null @@ -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 diff --git a/drkonqi/data/debuggers/external/lldbrc b/drkonqi/data/debuggers/external/lldbrc deleted file mode 100644 index 731ced22..00000000 --- a/drkonqi/data/debuggers/external/lldbrc +++ /dev/null @@ -1,8 +0,0 @@ -[General] -Name=lldb -TryExec=lldb -Backends=KCrash - -[KCrash] -Exec=konsole -e lldb --attach-pid %pid -Terminal=true diff --git a/drkonqi/data/debuggers/internal/dbxrc b/drkonqi/data/debuggers/internal/dbxrc deleted file mode 100644 index 2cea7087..00000000 --- a/drkonqi/data/debuggers/internal/dbxrc +++ /dev/null @@ -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 - diff --git a/drkonqi/data/debuggers/internal/gdbrc b/drkonqi/data/debuggers/internal/gdbrc deleted file mode 100644 index 322c5b3c..00000000 --- a/drkonqi/data/debuggers/internal/gdbrc +++ /dev/null @@ -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 diff --git a/drkonqi/data/debuggers/internal/lldbrc b/drkonqi/data/debuggers/internal/lldbrc deleted file mode 100644 index 84e86347..00000000 --- a/drkonqi/data/debuggers/internal/lldbrc +++ /dev/null @@ -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 diff --git a/drkonqi/debugger.cpp b/drkonqi/debugger.cpp deleted file mode 100644 index f4e48e3f..00000000 --- a/drkonqi/debugger.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#include "debugger.h" - -#include -#include -#include -#include -#include -#include - -#include "crashedapplication.h" -#include "drkonqi.h" - -//static -QList Debugger::availableInternalDebuggers(const QString & backend) -{ - return availableDebuggers("debuggers/internal/*", backend); -} - -//static -QList 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 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::availableDebuggers(const char *regexp, const QString & backend) -{ - KStandardDirs *dirs = KGlobal::dirs(); - QStringList debuggers = dirs->findAllResources("appdata", QLatin1String(regexp), - KStandardDirs::NoDuplicates); - - QList 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; -} diff --git a/drkonqi/debugger.h b/drkonqi/debugger.h deleted file mode 100644 index 1451397e..00000000 --- a/drkonqi/debugger.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef DEBUGGER_H -#define DEBUGGER_H - -#include - -#include - -class Debugger -{ -public: - static QList availableInternalDebuggers(const QString & backend); - static QList 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 availableDebuggers(const char *regexp, const QString & backend); - KSharedConfig::Ptr m_config; - QString m_backend; -}; - -#endif diff --git a/drkonqi/debuggerlaunchers.cpp b/drkonqi/debuggerlaunchers.cpp deleted file mode 100644 index 276ee6f3..00000000 --- a/drkonqi/debuggerlaunchers.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#include "debuggerlaunchers.h" - -#include -#include -#include - -#include -#include - -#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(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" diff --git a/drkonqi/debuggerlaunchers.h b/drkonqi/debuggerlaunchers.h deleted file mode 100644 index 1f825522..00000000 --- a/drkonqi/debuggerlaunchers.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef DEBUGGERLAUNCHERS_H -#define DEBUGGERLAUNCHERS_H - -#include - -#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 diff --git a/drkonqi/debuggermanager.cpp b/drkonqi/debuggermanager.cpp deleted file mode 100644 index d8d9e14c..00000000 --- a/drkonqi/debuggermanager.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#include "debuggermanager.h" - -#include -#include - -#include "debugger.h" -#include "debuggerlaunchers.h" -#include "backtracegenerator.h" - -struct DebuggerManager::Private -{ - BacktraceGenerator *btGenerator; - bool debuggerRunning; - QList externalDebuggers; -}; - -DebuggerManager::DebuggerManager(const Debugger & internalDebugger, - const QList & 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 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(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" diff --git a/drkonqi/debuggermanager.h b/drkonqi/debuggermanager.h deleted file mode 100644 index c7154f50..00000000 --- a/drkonqi/debuggermanager.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef DEBUGGERMANAGER_H -#define DEBUGGERMANAGER_H - -#include - -class BacktraceGenerator; -class Debugger; -class AbstractDebuggerLauncher; - -class DebuggerManager : public QObject -{ - Q_OBJECT -public: - DebuggerManager(const Debugger & internalDebugger, - const QList & externalDebuggers, - QObject *parent = 0); - virtual ~DebuggerManager(); - - bool debuggerIsRunning() const; - bool showExternalDebuggers() const; - QList 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 diff --git a/drkonqi/detachedprocessmonitor.cpp b/drkonqi/detachedprocessmonitor.cpp deleted file mode 100644 index 601eeff7..00000000 --- a/drkonqi/detachedprocessmonitor.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#include "detachedprocessmonitor.h" - -#include -#include -#include - -#include - -#include - -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" diff --git a/drkonqi/detachedprocessmonitor.h b/drkonqi/detachedprocessmonitor.h deleted file mode 100644 index 1d8244e1..00000000 --- a/drkonqi/detachedprocessmonitor.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef DETACHEDPROCESSMONITOR_H -#define DETACHEDPROCESSMONITOR_H - -#include - -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 diff --git a/drkonqi/drkonqi.cpp b/drkonqi/drkonqi.cpp deleted file mode 100644 index c6492dc4..00000000 --- a/drkonqi/drkonqi.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . - - Parts of this code were originally under the following license: - - * Copyright (C) 2000-2003 Hans Petter Bieker - * - * 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 -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#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 %1.", - 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 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 %1 " - "for writing.", tf.fileName())); - return; - } - - if (!KIO::NetAccess::upload(tf.fileName(), fileUrl, parent)) { - KMessageBox::sorry(parent, KIO::NetAccess::lastErrorString()); - } - } - } -} - diff --git a/drkonqi/drkonqi.h b/drkonqi/drkonqi.h deleted file mode 100644 index 168572e2..00000000 --- a/drkonqi/drkonqi.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef DRKONQI_H -#define DRKONQI_H - -#include -#include - -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 diff --git a/drkonqi/drkonqi_globals.h b/drkonqi/drkonqi_globals.h deleted file mode 100644 index d28a9150..00000000 --- a/drkonqi/drkonqi_globals.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef DRKONQI_GLOBALS_H -#define DRKONQI_GLOBALS_H - -#include -#include -#include - -/** 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 diff --git a/drkonqi/drkonqibackends.cpp b/drkonqi/drkonqibackends.cpp deleted file mode 100644 index b01b1c37..00000000 --- a/drkonqi/drkonqibackends.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#include "drkonqibackends.h" - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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 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" diff --git a/drkonqi/drkonqibackends.h b/drkonqi/drkonqibackends.h deleted file mode 100644 index 2aeb8003..00000000 --- a/drkonqi/drkonqibackends.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef DRKONQIBACKENDS_H -#define DRKONQIBACKENDS_H - -#include - -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 diff --git a/drkonqi/drkonqidialog.cpp b/drkonqi/drkonqidialog.cpp deleted file mode 100644 index b4d23c1e..00000000 --- a/drkonqi/drkonqidialog.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/******************************************************************* -* drkonqidialog.cpp -* Copyright 2009 Dario Andres Rodriguez -* -* 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 . -* -******************************************************************/ - -#include "drkonqidialog.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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", "We are sorry, %1 " - "closed unexpectedly.", crashedApp->name())); - - QString reportMessage; - if (!crashedApp->bugReportAddress().isEmpty()) { - if (crashedApp->executableBaseName() == QLatin1String("drkonqi")) { //Handle own crashes - reportMessage = i18nc("@info", "As the Crash Handler itself has failed, the " - "automatic reporting process is disabled to reduce the " - "risks of failing again." - "Please, manually report this error " - "to the KDE bug tracking system. Do not forget to include " - "the backtrace from the Developer Information " - "tab.", - QLatin1String(KDE_BUG_REPORT_URL)); - } else if (KCmdLineArgs::parsedArgs()->isSet("safer")) { - reportMessage = i18nc("@info", "The reporting assistant is disabled because " - "the crash handler dialog was started in safe mode." - "You can manually report this bug to %1 " - "(including the backtrace from the " - "Developer Information " - "tab.)", crashedApp->bugReportAddress()); - } else { - reportMessage = i18nc("@info", "You can help us improve KDE Software by reporting " - "this error.Learn " - "more about bug reporting.It is " - "safe to close this dialog if you do not want to report " - "this bug.", - QLatin1String(ABOUT_BUG_REPORTING_URL) - ); - } - } else { - reportMessage = i18nc("@info", "You cannot report this error, because " - "%1 does not provide a bug reporting " - "address.", - crashedApp->name() - ); - } - ui.infoLabel->setText(reportMessage); - - ui.iconLabel->setPixmap( - QPixmap(KStandardDirs::locate("appdata", QLatin1String("pics/crash.png")))); - - ui.detailsTitleLabel->setText(QString("%1").arg(i18nc("@label","Details:"))); - - ui.detailsLabel->setText(i18nc("@info Note the time information is divided into date and time parts", - "Executable: %1" - " PID: %2 Signal: %3 (%4) " - "Time: %5 %6", - 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 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 %1", - 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); -} diff --git a/drkonqi/drkonqidialog.h b/drkonqi/drkonqidialog.h deleted file mode 100644 index c2bcba5e..00000000 --- a/drkonqi/drkonqidialog.h +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************* -* drkonqidialog.h -* Copyright 2009 Dario Andres Rodriguez -* -* 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 . -* -******************************************************************/ - -#ifndef DRKONQIDIALOG__H -#define DRKONQIDIALOG__H - -#include -#include - -#include - -#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 m_debugMenuActions; -}; - -#endif diff --git a/drkonqi/gdbhighlighter.cpp b/drkonqi/gdbhighlighter.cpp deleted file mode 100644 index 1dd84820..00000000 --- a/drkonqi/gdbhighlighter.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - Copyright (C) 2010 Milian Wolff - - 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 - -#include - -GdbHighlighter::GdbHighlighter(QTextDocument* parent, const QList & 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; - } -} diff --git a/drkonqi/gdbhighlighter.h b/drkonqi/gdbhighlighter.h deleted file mode 100644 index 6d26b2ab..00000000 --- a/drkonqi/gdbhighlighter.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2010 Milian Wolff - - 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 - -#include "parser/backtraceline.h" - -class GdbHighlighter : public QSyntaxHighlighter -{ -public: - GdbHighlighter(QTextDocument* parent, const QList & gdbLines); - -protected: - virtual void highlightBlock(const QString& text); - -private: - QMap lines; - QTextCharFormat crashFormat; - QTextCharFormat nullptrFormat; - QTextCharFormat assertFormat; - QTextCharFormat threadFormat; - QTextCharFormat urlFormat; - QTextCharFormat funcFormat; - QTextCharFormat otheridFormat; - QTextCharFormat crapFormat; -}; - -#endif // GDBHIGHLIGHTER_H diff --git a/drkonqi/lldbhighlighter.cpp b/drkonqi/lldbhighlighter.cpp deleted file mode 100644 index bf5036ab..00000000 --- a/drkonqi/lldbhighlighter.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2022 Ivailo Monev - - 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 -#include - -LldbHighlighter::LldbHighlighter(QTextDocument* parent, const QList &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); - } -} diff --git a/drkonqi/lldbhighlighter.h b/drkonqi/lldbhighlighter.h deleted file mode 100644 index cb86b0f9..00000000 --- a/drkonqi/lldbhighlighter.h +++ /dev/null @@ -1,45 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2022 Ivailo Monev - - 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 -#include - -class LldbHighlighter : public QSyntaxHighlighter -{ -public: - LldbHighlighter(QTextDocument* parent, const QList &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 diff --git a/drkonqi/main.cpp b/drkonqi/main.cpp deleted file mode 100644 index 7389f49a..00000000 --- a/drkonqi/main.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/***************************************************************** - * drkonqi - The KDE Crash Handler - * - * Copyright (C) 2000-2003 Hans Petter Bieker - * - * 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 -#include - -#include -#include -#include -#include - -#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 ", ki18nc("@info:shell","The signal number that was caught")); - options.add("appname ", ki18nc("@info:shell","Name of the program")); - options.add("apppath ", ki18nc("@info:shell","Path to the executable")); - options.add("appversion ", ki18nc("@info:shell","The version of the program")); - options.add("bugaddress
", ki18nc("@info:shell","The bug address to use")); - options.add("programname ", ki18nc("@info:shell","Translated name of the program")); - options.add("pid ", ki18nc("@info:shell","The PID of the program")); - options.add("startupid ", 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 ", 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; -} diff --git a/drkonqi/maindialog.ui b/drkonqi/maindialog.ui deleted file mode 100644 index 5450dcfe..00000000 --- a/drkonqi/maindialog.ui +++ /dev/null @@ -1,139 +0,0 @@ - - - MainWidget - - - - 0 - 0 - 404 - 289 - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - - - - - - - - true - - - - - - - - - - true - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - 0 - 0 - - - - - 64 - 64 - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 40 - - - - - - - - - - - - - - - true - - - - - - - - - - true - - - Qt::TextBrowserInteraction - - - - - - - diff --git a/drkonqi/parser/backtraceline.h b/drkonqi/parser/backtraceline.h deleted file mode 100644 index 672faeed..00000000 --- a/drkonqi/parser/backtraceline.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2009-2010 George Kiagiadakis - - 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 -#include - -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 "") - 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 d; -}; - -#endif // BACKTRACELINE_H diff --git a/drkonqi/parser/backtraceparser.cpp b/drkonqi/parser/backtraceparser.cpp deleted file mode 100644 index b440b947..00000000 --- a/drkonqi/parser/backtraceparser.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* - Copyright (C) 2009-2010 George Kiagiadakis - - 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 -#include -#include - -//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 BacktraceParser::parsedBacktraceLines() const -{ - Q_D(const BacktraceParser); - return d ? d->m_linesList : QList(); -} - -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(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 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(this)->calculateRatingData(); - } - - //if there is no d, the debugger has not run yet, so we have no libraries. - return d ? d->m_librariesWithMissingDebugSymbols : QSet(); -} - -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 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(line.rating()) * multiplier; - bestPossibleRating += static_cast(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" diff --git a/drkonqi/parser/backtraceparser.h b/drkonqi/parser/backtraceparser.h deleted file mode 100644 index 2d2806b2..00000000 --- a/drkonqi/parser/backtraceparser.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2009-2010 George Kiagiadakis - - 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 -#include -#include -#include -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 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 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 diff --git a/drkonqi/parser/backtraceparser_p.h b/drkonqi/parser/backtraceparser_p.h deleted file mode 100644 index ef6f3c8e..00000000 --- a/drkonqi/parser/backtraceparser_p.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2009-2010 George Kiagiadakis - - 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 m_linesList; - QList m_linesToRate; - QSet m_librariesWithMissingDebugSymbols; - BacktraceParser::Usefulness m_usefulness; -}; - -#endif //BACKTRACEPARSER_P_H diff --git a/drkonqi/parser/backtraceparsergdb.cpp b/drkonqi/parser/backtraceparsergdb.cpp deleted file mode 100644 index a3778f2f..00000000 --- a/drkonqi/parser/backtraceparsergdb.cpp +++ /dev/null @@ -1,292 +0,0 @@ -/* - Copyright (C) 2009-2010 George Kiagiadakis - - 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 -#include - -//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("")) { - 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 BacktraceParserGdb::parsedBacktraceLines() const -{ - Q_D(const BacktraceParserGdb); - - QList 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" diff --git a/drkonqi/parser/backtraceparsergdb.h b/drkonqi/parser/backtraceparsergdb.h deleted file mode 100644 index 2991df82..00000000 --- a/drkonqi/parser/backtraceparsergdb.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2009-2010 George Kiagiadakis - - 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 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 diff --git a/drkonqi/parser/backtraceparserlldb.cpp b/drkonqi/parser/backtraceparserlldb.cpp deleted file mode 100644 index 567b59ad..00000000 --- a/drkonqi/parser/backtraceparserlldb.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2022 Ivailo Monev - - 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 - -#include - -//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" diff --git a/drkonqi/parser/backtraceparsernull.cpp b/drkonqi/parser/backtraceparsernull.cpp deleted file mode 100644 index 6131d140..00000000 --- a/drkonqi/parser/backtraceparsernull.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2009-2010 George Kiagiadakis - - 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" diff --git a/drkonqi/parser/backtraceparsernull.h b/drkonqi/parser/backtraceparsernull.h deleted file mode 100644 index 247d0e60..00000000 --- a/drkonqi/parser/backtraceparsernull.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2009-2010 George Kiagiadakis - - 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 diff --git a/drkonqi/statuswidget.cpp b/drkonqi/statuswidget.cpp deleted file mode 100644 index 2994f5ae..00000000 --- a/drkonqi/statuswidget.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/******************************************************************* -* statuswidget.cpp -* Copyright 2009,2010 Dario Andres Rodriguez -* -* 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 . -* -******************************************************************/ -#include "statuswidget.h" - -#include -#include -#include - -#include -#include - -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(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(); - } -} diff --git a/drkonqi/statuswidget.h b/drkonqi/statuswidget.h deleted file mode 100644 index 8fdb901f..00000000 --- a/drkonqi/statuswidget.h +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************* -* statuswidget.h -* Copyright 2009,2010 Dario Andres Rodriguez -* -* 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 . -* -******************************************************************/ -#ifndef STATUSWIDGET__H -#define STATUSWIDGET__H - -#include -#include -#include -#include -#include - -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 diff --git a/drkonqi/tests/CMakeLists.txt b/drkonqi/tests/CMakeLists.txt deleted file mode 100644 index 8324e8c4..00000000 --- a/drkonqi/tests/CMakeLists.txt +++ /dev/null @@ -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() diff --git a/drkonqi/tests/README b/drkonqi/tests/README deleted file mode 100644 index 2f29e423..00000000 --- a/drkonqi/tests/README +++ /dev/null @@ -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) diff --git a/drkonqi/tests/backtraceparsertest.cpp b/drkonqi/tests/backtraceparsertest.cpp deleted file mode 100644 index d6b18215..00000000 --- a/drkonqi/tests/backtraceparsertest.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#include "backtraceparsertest.h" -#include -#include -#include -#include -#include -#include - -#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("filename"); - QTest::addColumn("result"); - QTest::addColumn("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 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("filename"); - QTest::addColumn("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 parser(BacktraceParser::newParser(debugger)); - parser->connectToGenerator(m_generator); - - QBENCHMARK { - m_generator->sendData(filename); - } -} - -QTEST_MAIN(BacktraceParserTest) -#include "moc_backtraceparsertest.cpp" diff --git a/drkonqi/tests/backtraceparsertest.h b/drkonqi/tests/backtraceparsertest.h deleted file mode 100644 index 57dd9bf6..00000000 --- a/drkonqi/tests/backtraceparsertest.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 . -*/ -#ifndef BACKTRACEPARSERTEST_H -#define BACKTRACEPARSERTEST_H - -#include -#include - -#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 diff --git a/drkonqi/tests/backtraceparsertest_data/data.ini b/drkonqi/tests/backtraceparsertest_data/data.ini deleted file mode 100644 index b96a56a4..00000000 --- a/drkonqi/tests/backtraceparsertest_data/data.ini +++ /dev/null @@ -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 diff --git a/drkonqi/tests/backtraceparsertest_data/test_a b/drkonqi/tests/backtraceparsertest_data/test_a deleted file mode 100644 index 529c44c7..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_a +++ /dev/null @@ -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 -#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) () - from /usr/lib64/libQtCore.so.4 -#28 0x00007f8c37f179bf in ?? () from /usr/lib64/libQtGui.so.4 -#29 0x00007f8c3a8b49a2 in - QEventLoop::processEvents(QFlags) () from - /usr/lib64/libQtCore.so.4 -#30 0x00007f8c3a8b4b2d in - QEventLoop::exec(QFlags) () 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 () \ No newline at end of file diff --git a/drkonqi/tests/backtraceparsertest_data/test_anon_namespace b/drkonqi/tests/backtraceparsertest_data/test_anon_namespace deleted file mode 100644 index a9ea1337..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_anon_namespace +++ /dev/null @@ -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 -#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) () from /usr/lib64/libQtCore.so.4 -#49 0x00007fe47302711e in QGuiEventDispatcherGlib::processEvents(QFlags) () from /usr/lib64/libQtGui.so.4 -#50 0x00007fe473b75ab2 in QEventLoop::processEvents(QFlags) () from /usr/lib64/libQtCore.so.4 -#51 0x00007fe473b75e8c in QEventLoop::exec(QFlags) () from /usr/lib64/libQtCore.so.4 -#52 0x00007fe473b79bcb in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4 -#53 0x00000000004041f7 in main () diff --git a/drkonqi/tests/backtraceparsertest_data/test_b b/drkonqi/tests/backtraceparsertest_data/test_b deleted file mode 100644 index 51ac8a48..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_b +++ /dev/null @@ -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 -#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 ?? () \ No newline at end of file diff --git a/drkonqi/tests/backtraceparsertest_data/test_bug168000 b/drkonqi/tests/backtraceparsertest_data/test_bug168000 deleted file mode 100644 index ae9a4538..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_bug168000 +++ /dev/null @@ -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 -#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 diff --git a/drkonqi/tests/backtraceparsertest_data/test_bug190882 b/drkonqi/tests/backtraceparsertest_data/test_bug190882 deleted file mode 100644 index 52be7b3c..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_bug190882 +++ /dev/null @@ -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 -#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=, receiver=) - at ../../include/QtCore/../../../../src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.h:216 -#16 QWidgetPrivate::drawWidget (event=, receiver=) 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=, receiver=) - at ../../include/QtCore/../../../../src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.h:213 -#26 QCoreApplicationPrivate::sendPostedEvents (event=, receiver=) 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=) - 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=, receiver=) - at ../../include/QtCore/../../../../src/qt-x11-opensource-src-4.5.1/src/corelib/kernel/qcoreapplication.h:216 -#55 QApplicationPrivate::sendMouseEvent (event=,receiver=) 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 - diff --git a/drkonqi/tests/backtraceparsertest_data/test_bug192412_a b/drkonqi/tests/backtraceparsertest_data/test_bug192412_a deleted file mode 100644 index 400f4011..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_bug192412_a +++ /dev/null @@ -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 -#6 0x0805a0eb in ?? () -#7 0x08050ac4 in _start () diff --git a/drkonqi/tests/backtraceparsertest_data/test_bug192412_b b/drkonqi/tests/backtraceparsertest_data/test_bug192412_b deleted file mode 100644 index 7817eacf..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_bug192412_b +++ /dev/null @@ -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 -#4 KCmdLineArgs::arg (this=0x0, n=0) at /home/gkiagia/kde/src/KDE/kdelibs/kdecore/kernel/kcmdlineargs.cpp:1530 -#5 0x00000000004023af in _start () diff --git a/drkonqi/tests/backtraceparsertest_data/test_bug200993 b/drkonqi/tests/backtraceparsertest_data/test_bug200993 deleted file mode 100644 index d92cede9..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_bug200993 +++ /dev/null @@ -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 -#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=) 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=) 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=) 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
, 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 diff --git a/drkonqi/tests/backtraceparsertest_data/test_c b/drkonqi/tests/backtraceparsertest_data/test_c deleted file mode 100644 index bfa2131f..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_c +++ /dev/null @@ -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 -#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 () - diff --git a/drkonqi/tests/backtraceparsertest_data/test_d b/drkonqi/tests/backtraceparsertest_data/test_d deleted file mode 100644 index 5ac7675e..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_d +++ /dev/null @@ -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 -#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 \ No newline at end of file diff --git a/drkonqi/tests/backtraceparsertest_data/test_e b/drkonqi/tests/backtraceparsertest_data/test_e deleted file mode 100644 index f7fe2d04..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_e +++ /dev/null @@ -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 -#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 () \ No newline at end of file diff --git a/drkonqi/tests/backtraceparsertest_data/test_f b/drkonqi/tests/backtraceparsertest_data/test_f deleted file mode 100644 index ad6409f0..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_f +++ /dev/null @@ -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 -#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=) - 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=) at kernel/qeventdispatcher_glib.cpp:325 -#20 0x00007f085455c16f in QGuiEventDispatcherGlib::processEvents ( - this=0x7fff5f54c5a0, flags=) - at kernel/qguieventdispatcher_glib.cpp:204 -#21 0x00007f0853887d22 in QEventLoop::processEvents ( - this=, 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 diff --git a/drkonqi/tests/backtraceparsertest_data/test_g b/drkonqi/tests/backtraceparsertest_data/test_g deleted file mode 100644 index b627e961..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_g +++ /dev/null @@ -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=) 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::iterator, QtConcurrent::FunctionWrapper1 >::runIteration (this=, it=) - at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:73 -#2 0x0000000000402e3a in QtConcurrent::MapKernel::iterator, QtConcurrent::FunctionWrapper1 >::runIterations (this=0x67f220, - sequenceBeginIterator=, beginIndex=, endIndex=1) at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:82 -#3 0x0000000000403882 in QtConcurrent::IterateKernel::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 -#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::iterator, QtConcurrent::FunctionWrapper1 >::runIteration (this=, it=) - at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:73 -#7 0x0000000000402e3a in QtConcurrent::MapKernel::iterator, QtConcurrent::FunctionWrapper1 >::runIterations (this=0x67f220, - sequenceBeginIterator=, beginIndex=, endIndex=4) at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:82 -#8 0x0000000000403882 in QtConcurrent::IterateKernel::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=) 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::iterator, QtConcurrent::FunctionWrapper1 >::runIteration (this=, it=) - at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:73 -#4 0x0000000000402e3a in QtConcurrent::MapKernel::iterator, QtConcurrent::FunctionWrapper1 >::runIterations (this=0x67f220, - sequenceBeginIterator=, beginIndex=, endIndex=3) at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:82 -#5 0x0000000000403882 in QtConcurrent::IterateKernel::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=) at tools/qstring.cpp:1928 -#1 0x0000000000403b3b in qStringComparisonHelper (s1=@0x687e90, s2=) 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::iterator, QtConcurrent::FunctionWrapper1 >::runIteration (this=, it=) - at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:73 -#5 0x0000000000402e3a in QtConcurrent::MapKernel::iterator, QtConcurrent::FunctionWrapper1 >::runIterations (this=0x67f220, - sequenceBeginIterator=, beginIndex=, endIndex=2) at /usr/include/qt4/QtCore/qtconcurrentmapkernel.h:82 -#6 0x0000000000403882 in QtConcurrent::IterateKernel::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::startBlocking (this=0x67f220) at /usr/include/qt4/QtCore/qtconcurrentthreadengine.h:185 -#9 0x0000000000403a4c in QtConcurrent::ThreadEngineStarter::startBlocking (this=0x7fff88daed20) at /usr/include/qt4/QtCore/qtconcurrentthreadengine.h:286 -#10 0x0000000000403acb in QtConcurrent::blockingMap (sequence=@0x7fff88daedd0, map=) 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 diff --git a/drkonqi/tests/backtraceparsertest_data/test_h b/drkonqi/tests/backtraceparsertest_data/test_h deleted file mode 100644 index 1fb066df..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_h +++ /dev/null @@ -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 -#4 0x00007f44eff82065 in *__GI_raise (sig=) 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=) at global/qglobal.cpp:2017 -#7 0x00007f44f1b6d8bb in qFatal (msg=) at global/qglobal.cpp:2216 -#8 0x0000000000402815 in main () diff --git a/drkonqi/tests/backtraceparsertest_data/test_trailing_const b/drkonqi/tests/backtraceparsertest_data/test_trailing_const deleted file mode 100644 index f6be80ab..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_trailing_const +++ /dev/null @@ -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 -#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::operator() (this=0x21ef6d8, u=...) at /usr/include/QtCore/qtconcurrentfunctionwrappers.h:86 -#9 0x0000000000403e0c in QtConcurrent::MapKernel::iterator, QtConcurrent::FunctionWrapper1 >::runIteration (this=0x21ef6a0, it=...) - at /usr/include/QtCore/qtconcurrentmapkernel.h:73 -#10 0x0000000000403e97 in QtConcurrent::MapKernel::iterator, QtConcurrent::FunctionWrapper1 >::runIterations (this=0x21ef6a0, sequenceBeginIterator=..., - beginIndex=2, endIndex=3) at /usr/include/QtCore/qtconcurrentmapkernel.h:82 -#11 0x000000000040433e in QtConcurrent::IterateKernel::iterator, void>::forThreadFunction (this=0x21ef6a0) at /usr/include/QtCore/qtconcurrentiteratekernel.h:266 -#12 0x0000000000404010 in QtConcurrent::IterateKernel::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 ?? () diff --git a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions b/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions deleted file mode 100644 index a4fb43c8..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions +++ /dev/null @@ -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 -#6 0x00000000 in ?? () -#6 QBasicAtomicInt::operator!= (this=0xa6bf968, result=...) at /usr/include/qt4/QtCore/qbasicatomic.h:69 -#7 QList >::detach (this=0xa6bf968, result=...) at /usr/include/qt4/QtCore/qlist.h:119 -#8 QList >::append (this=0xa6bf968, result=...) at /usr/include/qt4/QtCore/qlist.h:424 -#9 QList >::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 diff --git a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions2 b/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions2 deleted file mode 100644 index 45595c1a..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions2 +++ /dev/null @@ -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 -#6 0x00000000 in ?? () -#6 0x0824add1 in QMap::node_create (this=0xbd74808,key=0x0) at /usr/include/qt4/QtCore/qmap.h:420 -#7 QMap::detach_helper (this=0xbd74808, key=0x0) at /usr/include/qt4/QtCore/qmap.h:708 -#8 QMap::detach (this=0xbd74808, key=0x0) at /usr/include/qt4/QtCore/qmap.h:172 -#9 QMap::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=) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:160 -#12 0x0833cff8 in ~TreeAlbumCheckListItem (this=0xc098ea0, __in_chrg=) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:191 -#13 0x02ecff6c in ~QTreeWidgetItem (this=0xc098cd8, __in_chrg=) at itemviews/qtreewidget.cpp:1514 -#14 0x0833cff8 in ~TreeAlbumCheckListItem (this=0xc098cd8, __in_chrg=) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:191 -#15 0x02ecff6c in ~QTreeWidgetItem (this=0xc098758, __in_chrg=) at itemviews/qtreewidget.cpp:1514 -#16 0x0833cff8 in ~TreeAlbumCheckListItem (this=0xc098758, __in_chrg=) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:191 -#17 0x02ecff6c in ~QTreeWidgetItem (this=0xc0966e8, __in_chrg=) at itemviews/qtreewidget.cpp:1514 -#18 0x0833cff8 in ~TreeAlbumCheckListItem (this=0xc0966e8, __in_chrg=) at /build/buildd/digikam-1.0.0/digikam/treefolderitem.cpp:191 -#19 0x02ecff6c in ~QTreeWidgetItem (this=0xc08ec10, __in_chrg=) at itemviews/qtreewidget.cpp:1514 -#95 0x083bcb2b in main (argc=5, argv=0xbfede9b4) at /build/buildd/digikam-1.0.0/digikam/main.cpp:195 diff --git a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions3 b/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions3 deleted file mode 100644 index 76939ceb..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions3 +++ /dev/null @@ -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 -#5 0x00007f57c1a6e4b5 in *__GI_raise (sig=) 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 diff --git a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions4 b/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions4 deleted file mode 100644 index 91e80803..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions4 +++ /dev/null @@ -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 -#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 diff --git a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions5 b/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions5 deleted file mode 100644 index e3e03acb..00000000 --- a/drkonqi/tests/backtraceparsertest_data/test_usefulfunctions5 +++ /dev/null @@ -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 -#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
) 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 diff --git a/drkonqi/tests/fakebacktracegenerator.cpp b/drkonqi/tests/fakebacktracegenerator.cpp deleted file mode 100644 index f75f537c..00000000 --- a/drkonqi/tests/fakebacktracegenerator.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 -#include - -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" diff --git a/drkonqi/tests/fakebacktracegenerator.h b/drkonqi/tests/fakebacktracegenerator.h deleted file mode 100644 index cda1ee22..00000000 --- a/drkonqi/tests/fakebacktracegenerator.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2009 George Kiagiadakis - - 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 - -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 diff --git a/kcrash/CMakeLists.txt b/kcrash/CMakeLists.txt new file mode 100644 index 00000000..5db64d41 --- /dev/null +++ b/kcrash/CMakeLists.txt @@ -0,0 +1,5 @@ +project(kcrash) + +add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1410) + +add_subdirectory(kded) diff --git a/kcrash/kded/CMakeLists.txt b/kcrash/kded/CMakeLists.txt new file mode 100644 index 00000000..78ce6630 --- /dev/null +++ b/kcrash/kded/CMakeLists.txt @@ -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 +) diff --git a/kcrash/kded/kcrash.desktop b/kcrash/kded/kcrash.desktop new file mode 100644 index 00000000..8359a3b0 --- /dev/null +++ b/kcrash/kded/kcrash.desktop @@ -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; diff --git a/kcrash/kded/kcrash.notifyrc b/kcrash/kded/kcrash.notifyrc new file mode 100644 index 00000000..13af5c7f --- /dev/null +++ b/kcrash/kded/kcrash.notifyrc @@ -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 diff --git a/kcrash/kded/kded_kcrash.cpp b/kcrash/kded/kded_kcrash.cpp new file mode 100644 index 00000000..c919dfb5 --- /dev/null +++ b/kcrash/kded/kded_kcrash.cpp @@ -0,0 +1,125 @@ +/* This file is part of the KDE project + Copyright (C) 2023 Ivailo Monev + + 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 +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +// NOTE: keep in sync with: +// kdelibs/kdeui/util/kcrash.cpp + +static const QStringList s_kcrashfilters = QStringList() + << QString::fromLatin1("*.kcrash"); + +K_PLUGIN_FACTORY(KCrashModuleFactory, registerPlugin();) +K_EXPORT_PLUGIN(KCrashModuleFactory("kcrash")) + +KCrashModule::KCrashModule(QObject *parent, const QList &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( + 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" diff --git a/drkonqi/parser/backtraceparserlldb.h b/kcrash/kded/kded_kcrash.h similarity index 61% rename from drkonqi/parser/backtraceparserlldb.h rename to kcrash/kded/kded_kcrash.h index bd720016..b345bdfb 100644 --- a/drkonqi/parser/backtraceparserlldb.h +++ b/kcrash/kded/kded_kcrash.h @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2022 Ivailo Monev + Copyright (C) 2023 Ivailo Monev 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 -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 &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