Blame SOURCES/0030-Add-an-utility-for-stack-trace-analysis.patch

f9a98e
From d2578295a953ced07371eedc885c032951b11297 Mon Sep 17 00:00:00 2001
f9a98e
From: Jakub Filak <jfilak@redhat.com>
f9a98e
Date: Mon, 13 Jan 2014 16:38:17 +0100
f9a98e
Subject: [PATCH 30/39] Add an utility for stack trace analysis
f9a98e
f9a98e
The tool is supposed to find all remote class paths and create a file
f9a98e
named "not-reportale" containing a short explanation why the examined
f9a98e
stack trace is not reportable via ABRT.
f9a98e
f9a98e
The tool is designed for usage in post-create event.
f9a98e
f9a98e
Related to #29
f9a98e
Related to rhbz#1054737
f9a98e
---
f9a98e
 CMakeLists.txt                   |  19 ++-
f9a98e
 po/CMakeLists.txt                |  64 ++++++++++
f9a98e
 po/LINGUAS                       |   0
f9a98e
 po/POTFILES.in                   |   1 +
f9a98e
 src/CMakeLists.txt               |   7 +-
f9a98e
 utils/CMakeLists.txt             |  34 ++++++
f9a98e
 utils/abrt-action-analyze-java.c | 258 +++++++++++++++++++++++++++++++++++++++
f9a98e
 utils/config.h.in                |   2 +
f9a98e
 8 files changed, 379 insertions(+), 6 deletions(-)
f9a98e
 create mode 100644 po/CMakeLists.txt
f9a98e
 create mode 100644 po/LINGUAS
f9a98e
 create mode 100644 po/POTFILES.in
f9a98e
 create mode 100644 utils/CMakeLists.txt
f9a98e
 create mode 100644 utils/abrt-action-analyze-java.c
f9a98e
 create mode 100644 utils/config.h.in
f9a98e
f9a98e
diff --git a/CMakeLists.txt b/CMakeLists.txt
f9a98e
index 1504461..33a5e03 100644
f9a98e
--- a/CMakeLists.txt
f9a98e
+++ b/CMakeLists.txt
f9a98e
@@ -39,6 +39,10 @@ endif()
f9a98e
 
f9a98e
 set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
f9a98e
 
f9a98e
+if(NOT BIN_INSTALL_DIR)
f9a98e
+    set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
f9a98e
+endif()
f9a98e
+
f9a98e
 if(NOT LIB_INSTALL_DIR)
f9a98e
     set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
f9a98e
 endif()
f9a98e
@@ -55,10 +59,23 @@ if(NOT MAN_INSTALL_DIR)
f9a98e
     set(MAN_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/man)
f9a98e
 endif()
f9a98e
 
f9a98e
+if(NOT LOCALE_INSTALL_DIR)
f9a98e
+    set(LOCALE_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/locale)
f9a98e
+endif()
f9a98e
+
f9a98e
+
f9a98e
 add_custom_target(
f9a98e
     dist
f9a98e
     COMMAND git archive --prefix=${CMAKE_PROJECT_NAME}-${git_commit}/ HEAD | gzip > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz
f9a98e
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
f9a98e
 )
f9a98e
 
f9a98e
-subdirs(src etc test)
f9a98e
+include(FindPkgConfig)
f9a98e
+pkg_check_modules(PC_SATYR REQUIRED satyr)
f9a98e
+pkg_check_modules(PC_LIBREPORT REQUIRED libreport)
f9a98e
+pkg_check_modules(PC_ABRT REQUIRED abrt)
f9a98e
+
f9a98e
+add_definitions(-D_GNU_SOURCE)
f9a98e
+set(AJC_ENABLE_NLS true)
f9a98e
+
f9a98e
+subdirs(src etc test utils po)
f9a98e
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
f9a98e
new file mode 100644
f9a98e
index 0000000..7c49772
f9a98e
--- /dev/null
f9a98e
+++ b/po/CMakeLists.txt
f9a98e
@@ -0,0 +1,64 @@
f9a98e
+project(po)
f9a98e
+
f9a98e
+if (AJC_ENABLE_NLS)
f9a98e
+    find_program(INTLTOOL_UPDATE_CMD intltool-update)
f9a98e
+    mark_as_advanced(INTLTOOL_UPDATE_CMD)
f9a98e
+
f9a98e
+    find_program(XGETTEXT_CMD xgettext)
f9a98e
+    mark_as_advanced(XGETTEXT_CMD)
f9a98e
+
f9a98e
+    find_program(MSGMERGE_CMD msgmerge)
f9a98e
+    mark_as_advanced(MSGMERGE_CMD)
f9a98e
+
f9a98e
+    find_program(MSGFMT_CMD msgfmt)
f9a98e
+    mark_as_advanced(MSGFMT_CMD)
f9a98e
+
f9a98e
+    find_program(MSGFMT_CMD cat)
f9a98e
+    mark_as_advanced(CAT_CMD)
f9a98e
+
f9a98e
+    file(STRINGS ${po_SOURCE_DIR}/LINGUAS AJC_LINGUAS)
f9a98e
+    set(AJC_LINGUAS_TARGETS)
f9a98e
+    set(AJC_POTFILE ${CMAKE_PROJECT_NAME}.pot)
f9a98e
+    set(AJC_POTFILE_OUTPUT ${po_BINARY_DIR}/${AJC_POTFILE})
f9a98e
+
f9a98e
+    add_custom_target(nls-update-sources
f9a98e
+            ${INTLTOOL_UPDATE_CMD} -m
f9a98e
+            WORKING_DIRECTORY ${po_SOURCE_DIR})
f9a98e
+
f9a98e
+    add_custom_command(OUTPUT ${AJC_POTFILE_OUTPUT}
f9a98e
+            COMMAND ${XGETTEXT_CMD} --files-from ${po_SOURCE_DIR}/POTFILES.in --keyword=_ -o ${AJC_POTFILE_OUTPUT} --copyright-holder="ABRT Team" --msgid-bugs-address="crash-catcher at lists.fedorahosted.org" --no-wrap --no-location
f9a98e
+            DEPENDS POTFILES.in
f9a98e
+            WORKING_DIRECTORY ${abrt-java-connector_SOURCE_DIR}
f9a98e
+            COMMENT "Extract translatable messages to ${AJC_POTFILE}"
f9a98e
+    )
f9a98e
+
f9a98e
+    foreach(language ${AJC_LINGUAS})
f9a98e
+        set(language_SOURCE ${po_SOURCE_DIR}/${language}.po)
f9a98e
+        set(language_OUTPUT ${po_BINARY_DIR}/${language}/LC_MESSAGES/${CMAKE_PROJECT_NAME}.mo)
f9a98e
+
f9a98e
+        add_custom_target(nls-update-${language}.po
f9a98e
+                ${MSGMERGE_CMD} ${language} ${AJC_POTFILE_OUTPUT} -o ${language_SOURCE} --no-wrap
f9a98e
+                DEPENDS ${language_SOURCE} ${AJC_POTFILE_OUTPUT}
f9a98e
+                WORKING_DIRECTORY ${po_SOURCE_DIR}
f9a98e
+        )
f9a98e
+
f9a98e
+        file(MAKE_DIRECTORY "${po_BINARY_DIR}/${language}/LC_MESSAGES")
f9a98e
+
f9a98e
+        add_custom_command(OUTPUT ${language_OUTPUT}
f9a98e
+                COMMAND ${MSGFMT_CMD} -c -o ${language_OUTPUT} ${language_SOURCE}
f9a98e
+                DEPENDS ${language_SOURCE}
f9a98e
+        )
f9a98e
+
f9a98e
+        install(FILES ${language_OUTPUT}
f9a98e
+                DESTINATION share/${CMAKE_PROJECT_NAME}/locale/${language}/LC_MESSAGES
f9a98e
+        )
f9a98e
+
f9a98e
+        set(AJC_LINGUAS_TARGETS ${AJC_CATALOG_TARGETS} ${language_OUTPUT})
f9a98e
+    endforeach(language)
f9a98e
+
f9a98e
+    add_custom_target(nls ALL
f9a98e
+                      DEPENDS ${AJC_POTFILE_OUTPUT} ${AJC_LINGUAS_TARGETS}
f9a98e
+    )
f9a98e
+else(AJC_ENABLE_NLS)
f9a98e
+    message("Native Language Support is disabled")
f9a98e
+endif (AJC_ENABLE_NLS)
f9a98e
diff --git a/po/LINGUAS b/po/LINGUAS
f9a98e
new file mode 100644
f9a98e
index 0000000..e69de29
f9a98e
diff --git a/po/POTFILES.in b/po/POTFILES.in
f9a98e
new file mode 100644
f9a98e
index 0000000..21aec67
f9a98e
--- /dev/null
f9a98e
+++ b/po/POTFILES.in
f9a98e
@@ -0,0 +1 @@
f9a98e
+utils/abrt-action-analyze-java.c
f9a98e
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
f9a98e
index a00fe77..d084401 100644
f9a98e
--- a/src/CMakeLists.txt
f9a98e
+++ b/src/CMakeLists.txt
f9a98e
@@ -1,13 +1,10 @@
f9a98e
 find_package(JNI REQUIRED)
f9a98e
 include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
f9a98e
 
f9a98e
-include(FindPkgConfig)
f9a98e
-pkg_check_modules(PC_ABRT REQUIRED libreport)
f9a98e
 pkg_check_modules(PC_JOURNALD REQUIRED libsystemd-journal)
f9a98e
-include_directories(${PC_ABRT_INCLUDE_DIRS})
f9a98e
+include_directories(${PC_LIBREPORT_INCLUDE_DIRS})
f9a98e
 include_directories(${PC_JOURNALD_INCLUDE_DIRS})
f9a98e
 
f9a98e
-add_definitions(-D_GNU_SOURCE)
f9a98e
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic")
f9a98e
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -DVERBOSE")
f9a98e
 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSILENT")
f9a98e
@@ -20,7 +17,7 @@ set_target_properties(
f9a98e
     PROPERTIES
f9a98e
         OUTPUT_NAME abrt-java-connector)
f9a98e
 
f9a98e
-target_link_libraries(AbrtChecker ${PC_ABRT_LIBRARIES})
f9a98e
+target_link_libraries(AbrtChecker ${PC_LIBREPORT_LIBRARIES})
f9a98e
 target_link_libraries(AbrtChecker ${PC_JOURNALD_LIBRARIES})
f9a98e
 
f9a98e
 install(TARGETS AbrtChecker DESTINATION ${LIB_INSTALL_DIR})
f9a98e
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
f9a98e
new file mode 100644
f9a98e
index 0000000..c358968
f9a98e
--- /dev/null
f9a98e
+++ b/utils/CMakeLists.txt
f9a98e
@@ -0,0 +1,34 @@
f9a98e
+project(utils)
f9a98e
+
f9a98e
+set(AbrtActionAnalyzeJava_SRCS abrt-action-analyze-java.c)
f9a98e
+
f9a98e
+include(CheckIncludeFiles)
f9a98e
+
f9a98e
+if (AJC_ENABLE_NLS)
f9a98e
+    check_include_files(locale.h HAVE_LOCALE_H)
f9a98e
+    if (HAVE_LOCALE_H)
f9a98e
+        set (ENABLE_NLS true)
f9a98e
+    endif (HAVE_LOCALE_H)
f9a98e
+endif (AJC_ENABLE_NLS)
f9a98e
+
f9a98e
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
f9a98e
+
f9a98e
+include_directories(${PC_SATYR_INCLUDE_DIRS})
f9a98e
+include_directories(${PC_LIBREPORT_INCLUDE_DIRS})
f9a98e
+include_directories(${PC_ABRT_INCLUDE_DIRS})
f9a98e
+
f9a98e
+add_definitions(-DHAVE_CONFIG_H)
f9a98e
+add_definitions(-DPACKAGE=\"${CMAKE_PROJECT_NAME}\")
f9a98e
+add_definitions(-DLOCALEDIR=\"${LOCALE_INSTALL_DIR}\")
f9a98e
+include_directories(${utils_BINARY_DIR})
f9a98e
+
f9a98e
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=gnu99 -pedantic")
f9a98e
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -DVERBOSE")
f9a98e
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSILENT")
f9a98e
+
f9a98e
+add_executable(abrt-action-analyze-java ${AbrtActionAnalyzeJava_SRCS})
f9a98e
+target_link_libraries(abrt-action-analyze-java ${PC_SATYR_LIBRARIES})
f9a98e
+target_link_libraries(abrt-action-analyze-java ${PC_LIBREPORT_LIBRARIES})
f9a98e
+target_link_libraries(abrt-action-analyze-java ${PC_ABRT_LIBRARIES})
f9a98e
+
f9a98e
+install(TARGETS abrt-action-analyze-java DESTINATION ${BIN_INSTALL_DIR})
f9a98e
diff --git a/utils/abrt-action-analyze-java.c b/utils/abrt-action-analyze-java.c
f9a98e
new file mode 100644
f9a98e
index 0000000..a4728b6
f9a98e
--- /dev/null
f9a98e
+++ b/utils/abrt-action-analyze-java.c
f9a98e
@@ -0,0 +1,258 @@
f9a98e
+/*
f9a98e
+    Copyright (C) 2014  Red Hat, Inc.
f9a98e
+
f9a98e
+    This program is free software; you can redistribute it and/or modify
f9a98e
+    it under the terms of the GNU General Public License as published by
f9a98e
+    the Free Software Foundation; either version 2 of the License, or
f9a98e
+    (at your option) any later version.
f9a98e
+
f9a98e
+    This program is distributed in the hope that it will be useful,
f9a98e
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
f9a98e
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f9a98e
+    GNU General Public License for more details.
f9a98e
+
f9a98e
+    You should have received a copy of the GNU General Public License along
f9a98e
+    with this program; if not, write to the Free Software Foundation, Inc.,
f9a98e
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
f9a98e
+*/
f9a98e
+
f9a98e
+#include <satyr/location.h>
f9a98e
+#include <satyr/java/stacktrace.h>
f9a98e
+#include <satyr/java/thread.h>
f9a98e
+#include <satyr/java/frame.h>
f9a98e
+
f9a98e
+#include <abrt/libabrt.h>
f9a98e
+#include <stdlib.h>
f9a98e
+
f9a98e
+static char *
f9a98e
+backtrace_from_dump_dir(const char *dir_name)
f9a98e
+{
f9a98e
+    struct dump_dir *dd = dd_opendir(dir_name, DD_OPEN_READONLY);
f9a98e
+    if (NULL == dd)
f9a98e
+    {
f9a98e
+        return NULL;
f9a98e
+    }
f9a98e
+
f9a98e
+    /* Read backtrace */
f9a98e
+    /* Prints an error message if the file cannot be loaded */
f9a98e
+    char *backtrace_str = dd_load_text_ext(dd, FILENAME_BACKTRACE,
f9a98e
+                                           DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE);
f9a98e
+
f9a98e
+    dd_close(dd);
f9a98e
+
f9a98e
+    return backtrace_str;
f9a98e
+}
f9a98e
+
f9a98e
+static void
f9a98e
+write_not_reportable_message_to_dump_dir(const char *dir_name, const char *message)
f9a98e
+{
f9a98e
+    struct dump_dir *dd = dd_opendir(dir_name, /*Open for writing*/0);
f9a98e
+    if (NULL != dd)
f9a98e
+    {
f9a98e
+        dd_save_text(dd, FILENAME_NOT_REPORTABLE, message);
f9a98e
+        dd_close(dd);
f9a98e
+    }
f9a98e
+}
f9a98e
+
f9a98e
+static void
f9a98e
+write_not_reportable_message_to_fd(int fdout, const char *message)
f9a98e
+{
f9a98e
+    full_write(fdout, message, strlen(message));
f9a98e
+    full_write(fdout, "\n", 1);
f9a98e
+}
f9a98e
+
f9a98e
+static void
f9a98e
+write_not_reportable_message_to_file(const char *file_name, const char *message)
f9a98e
+{
f9a98e
+    int fdout = open(file_name,
f9a98e
+            O_WRONLY | O_TRUNC | O_CREAT | O_NOFOLLOW,
f9a98e
+            S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP );
f9a98e
+
f9a98e
+    if (0 > fdout)
f9a98e
+    {
f9a98e
+        perror_msg("Can't open file '%s' for writing", file_name);
f9a98e
+        return;
f9a98e
+    }
f9a98e
+    write_not_reportable_message_to_fd(fdout, message);
f9a98e
+    close(fdout);
f9a98e
+}
f9a98e
+
f9a98e
+static char *
f9a98e
+backtrace_from_fd(int fdin)
f9a98e
+{
f9a98e
+    return xmalloc_read(fdin, /*no size limit*/NULL);
f9a98e
+}
f9a98e
+
f9a98e
+static char *
f9a98e
+backtrace_from_file(const char *file_name)
f9a98e
+{
f9a98e
+    return xmalloc_xopen_read_close(file_name, /*no size limit*/NULL);
f9a98e
+}
f9a98e
+
f9a98e
+typedef void (*frame_cb)(struct sr_java_frame *frame, void *args);
f9a98e
+
f9a98e
+typedef struct {
f9a98e
+    frame_cb callback;
f9a98e
+    void *args;
f9a98e
+} frame_proc_t;
f9a98e
+
f9a98e
+static void
f9a98e
+iterate_trough_stacktrace(struct sr_java_stacktrace *stacktrace, frame_proc_t **fproc)
f9a98e
+{
f9a98e
+    struct sr_java_thread *thread = stacktrace->threads;
f9a98e
+    while (NULL != thread)
f9a98e
+    {
f9a98e
+        struct sr_java_frame *frame = thread->frames;
f9a98e
+        while (NULL != frame)
f9a98e
+        {
f9a98e
+            frame_proc_t **it = fproc;
f9a98e
+            while (NULL != *it)
f9a98e
+            {
f9a98e
+                (*it)->callback(frame, (*it)->args);
f9a98e
+                ++it;
f9a98e
+            }
f9a98e
+            frame = frame->next;
f9a98e
+        }
f9a98e
+        thread = thread->next;
f9a98e
+    }
f9a98e
+}
f9a98e
+
f9a98e
+static void
f9a98e
+work_out_list_of_remote_urls(struct sr_java_frame *frame, struct strbuf *remote_files_csv)
f9a98e
+{
f9a98e
+    if (NULL != frame->class_path && prefixcmp(frame->class_path, "file://") != 0)
f9a98e
+    {
f9a98e
+        struct stat buf;
f9a98e
+        if (stat(frame->class_path, &buf) && errno == ENOENT)
f9a98e
+        {
f9a98e
+            if (strstr(remote_files_csv->buf, frame->class_path) == NULL)
f9a98e
+            {
f9a98e
+                strbuf_append_strf(remote_files_csv, "%s%s",
f9a98e
+                        remote_files_csv->buf[0] != '\0' ? ", " : "",
f9a98e
+                        frame->class_path);
f9a98e
+            }
f9a98e
+        }
f9a98e
+    }
f9a98e
+}
f9a98e
+
f9a98e
+int main(int argc, char *argv[])
f9a98e
+{
f9a98e
+#if ENABLE_NLS
f9a98e
+    /* I18n */
f9a98e
+    setlocale(LC_ALL, "");
f9a98e
+    bindtextdomain(PACKAGE, LOCALEDIR);
f9a98e
+    textdomain(PACKAGE);
f9a98e
+#endif
f9a98e
+
f9a98e
+    abrt_init(argv);
f9a98e
+
f9a98e
+    const char *dump_dir_name = NULL;
f9a98e
+    const char *backtrace_file = NULL;
f9a98e
+
f9a98e
+    /* Can't keep these strings/structs static: _() doesn't support that */
f9a98e
+    const char *program_usage_string = _(
f9a98e
+        "& [[-d DIR] | [-f FILE]] [-o]\n"
f9a98e
+        "\n"
f9a98e
+        "Analyzes Java backtrace\n"
f9a98e
+    );
f9a98e
+    enum {
f9a98e
+        OPT_v = 1 << 0,
f9a98e
+        OPT_d = 1 << 1,
f9a98e
+        OPT_f = 1 << 2,
f9a98e
+        OPT_o = 1 << 3,
f9a98e
+    };
f9a98e
+    /* Keep enum above and order of options below in sync! */
f9a98e
+    struct options program_options[] = {
f9a98e
+        OPT__VERBOSE(&g_verbose),
f9a98e
+        OPT_STRING('d', "dumpdir", &dump_dir_name, "DIR", _("Problem directory")),
f9a98e
+        OPT_STRING('f', "backtrace", &backtrace_file, "FILE", _("Path to backtrace")),
f9a98e
+        OPT_BOOL('o', "stdout", NULL, _("Print results on standard output")),
f9a98e
+        { 0 }
f9a98e
+    };
f9a98e
+    program_options[ARRAY_SIZE(program_options) - 1].type = OPTION_END;
f9a98e
+
f9a98e
+    unsigned opts = parse_opts(argc, argv, program_options, program_usage_string);
f9a98e
+
f9a98e
+    export_abrt_envvars(0);
f9a98e
+
f9a98e
+    if (NULL != dump_dir_name && NULL != backtrace_file)
f9a98e
+        error_msg_and_die("You need to pass either DIR or FILE");
f9a98e
+
f9a98e
+    int retval = 1;
f9a98e
+    char *backtrace_str = NULL;
f9a98e
+    if (NULL != dump_dir_name)
f9a98e
+    {
f9a98e
+        backtrace_str = backtrace_from_dump_dir(dump_dir_name);
f9a98e
+    }
f9a98e
+    else if (NULL != backtrace_file)
f9a98e
+    {
f9a98e
+        backtrace_str = backtrace_from_file(backtrace_file);
f9a98e
+    }
f9a98e
+    else
f9a98e
+    {
f9a98e
+        backtrace_str = backtrace_from_fd(STDIN_FILENO);
f9a98e
+    }
f9a98e
+
f9a98e
+    if (NULL == backtrace_str)
f9a98e
+        goto finish;
f9a98e
+
f9a98e
+    struct sr_location location;
f9a98e
+    sr_location_init(&location);
f9a98e
+    const char *backtrace_str_ptr = backtrace_str;
f9a98e
+    struct sr_java_stacktrace *stacktrace = sr_java_stacktrace_parse(&backtrace_str_ptr, &location);
f9a98e
+    free(backtrace_str);
f9a98e
+
f9a98e
+    if (NULL == stacktrace)
f9a98e
+    {
f9a98e
+        error_msg("Could not parse the stack trace");
f9a98e
+        goto finish;
f9a98e
+    }
f9a98e
+
f9a98e
+    struct strbuf *remote_files_csv = strbuf_new();
f9a98e
+    frame_proc_t remote_files_proc = {
f9a98e
+        .callback = (frame_cb)&work_out_list_of_remote_urls,
f9a98e
+        .args = (void *)remote_files_csv
f9a98e
+    };
f9a98e
+
f9a98e
+    frame_proc_t *fproc[] = {
f9a98e
+        &remote_files_proc,
f9a98e
+        //duphash_proc,
f9a98e
+        //backtrace_usability,
f9a98e
+        NULL,
f9a98e
+    };
f9a98e
+
f9a98e
+    iterate_trough_stacktrace(stacktrace, fproc);
f9a98e
+
f9a98e
+    sr_java_stacktrace_free(stacktrace);
f9a98e
+
f9a98e
+    if ('\0' != remote_files_csv->buf[0])
f9a98e
+    {
f9a98e
+        char *not_reportable_message = xasprintf(
f9a98e
+        _("This problem can be caused by a 3rd party code from the "\
f9a98e
+        "jar/class at %s. In order to provide valuable problem " \
f9a98e
+        "reports, ABRT will not allow you to submit this problem. If you " \
f9a98e
+        "still want to participate in solving this problem, please contact " \
f9a98e
+        "the developers directly."), remote_files_csv->buf);
f9a98e
+
f9a98e
+        if (opts & OPT_o)
f9a98e
+        {
f9a98e
+            write_not_reportable_message_to_fd(STDOUT_FILENO,  not_reportable_message);
f9a98e
+        }
f9a98e
+        else if (NULL != dump_dir_name)
f9a98e
+        {
f9a98e
+            write_not_reportable_message_to_dump_dir(dump_dir_name,  not_reportable_message);
f9a98e
+        }
f9a98e
+        else
f9a98e
+        {   /* Just write it to the current working directory */
f9a98e
+            write_not_reportable_message_to_file(FILENAME_NOT_REPORTABLE,  not_reportable_message);
f9a98e
+        }
f9a98e
+
f9a98e
+        free(not_reportable_message);
f9a98e
+    }
f9a98e
+
f9a98e
+    strbuf_free(remote_files_csv);
f9a98e
+    retval = 0;
f9a98e
+finish:
f9a98e
+
f9a98e
+    return retval;
f9a98e
+}
f9a98e
diff --git a/utils/config.h.in b/utils/config.h.in
f9a98e
new file mode 100644
f9a98e
index 0000000..6a26446
f9a98e
--- /dev/null
f9a98e
+++ b/utils/config.h.in
f9a98e
@@ -0,0 +1,2 @@
f9a98e
+#cmakedefine ENABLE_NLS 1
f9a98e
+#cmakedefine HAVE_LOCALE_H 1
f9a98e
-- 
f9a98e
1.8.3.1
f9a98e