|
|
046a1c |
From 58e874e4a28ce00623db208475b0d9fd22d601ac Mon Sep 17 00:00:00 2001
|
|
|
046a1c |
From: Martin Milata <mmilata@redhat.com>
|
|
|
046a1c |
Date: Tue, 14 Jan 2014 13:40:45 +0100
|
|
|
046a1c |
Subject: [SATYR PATCH 3/3] abrt: disable fingerprinting of core stacktraces
|
|
|
046a1c |
|
|
|
046a1c |
Closes rhbz#1052402.
|
|
|
046a1c |
|
|
|
046a1c |
Signed-off-by: Martin Milata <mmilata@redhat.com>
|
|
|
046a1c |
---
|
|
|
046a1c |
include/abrt.h | 2 ++
|
|
|
046a1c |
lib/abrt.c | 2 ++
|
|
|
046a1c |
lib/core_fingerprint.c | 25 +++++++++++++++++++++++++
|
|
|
046a1c |
3 files changed, 29 insertions(+)
|
|
|
046a1c |
|
|
|
046a1c |
diff --git a/include/abrt.h b/include/abrt.h
|
|
|
046a1c |
index 1ef7876..0a8f5ac 100644
|
|
|
046a1c |
--- a/include/abrt.h
|
|
|
046a1c |
+++ b/include/abrt.h
|
|
|
046a1c |
@@ -31,6 +31,8 @@ bool
|
|
|
046a1c |
sr_abrt_print_report_from_dir(const char *directory,
|
|
|
046a1c |
char **error_message);
|
|
|
046a1c |
|
|
|
046a1c |
+/* NOTE: the hash_fingerprints argument has no effect because fingerprint
|
|
|
046a1c |
+ * generation is disabled. */
|
|
|
046a1c |
bool
|
|
|
046a1c |
sr_abrt_create_core_stacktrace(const char *directory,
|
|
|
046a1c |
bool hash_fingerprints,
|
|
|
046a1c |
diff --git a/lib/abrt.c b/lib/abrt.c
|
|
|
046a1c |
index 8c006fa..39bc45d 100644
|
|
|
046a1c |
--- a/lib/abrt.c
|
|
|
046a1c |
+++ b/lib/abrt.c
|
|
|
046a1c |
@@ -87,11 +87,13 @@ create_core_stacktrace(const char *directory, const char *gdb_output,
|
|
|
046a1c |
if (!core_stacktrace)
|
|
|
046a1c |
return false;
|
|
|
046a1c |
|
|
|
046a1c |
+#if 0
|
|
|
046a1c |
sr_core_fingerprint_generate(core_stacktrace,
|
|
|
046a1c |
error_message);
|
|
|
046a1c |
|
|
|
046a1c |
if (hash_fingerprints)
|
|
|
046a1c |
sr_core_fingerprint_hash(core_stacktrace);
|
|
|
046a1c |
+#endif
|
|
|
046a1c |
|
|
|
046a1c |
char *json = sr_core_stacktrace_to_json(core_stacktrace);
|
|
|
046a1c |
|
|
|
046a1c |
diff --git a/lib/core_fingerprint.c b/lib/core_fingerprint.c
|
|
|
046a1c |
index 8c5a228..3c7b5ba 100644
|
|
|
046a1c |
--- a/lib/core_fingerprint.c
|
|
|
046a1c |
+++ b/lib/core_fingerprint.c
|
|
|
046a1c |
@@ -17,6 +17,8 @@
|
|
|
046a1c |
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
046a1c |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
046a1c |
*/
|
|
|
046a1c |
+#include "config.h"
|
|
|
046a1c |
+
|
|
|
046a1c |
#include "core/fingerprint.h"
|
|
|
046a1c |
#include "core/stacktrace.h"
|
|
|
046a1c |
#include "core/frame.h"
|
|
|
046a1c |
@@ -33,6 +35,8 @@
|
|
|
046a1c |
#include <stdlib.h>
|
|
|
046a1c |
#include <search.h>
|
|
|
046a1c |
|
|
|
046a1c |
+#if HAVE_LIBOPCODES
|
|
|
046a1c |
+
|
|
|
046a1c |
static void
|
|
|
046a1c |
fingerprint_add_bool(struct sr_strbuf *buffer,
|
|
|
046a1c |
const char *name,
|
|
|
046a1c |
@@ -552,6 +556,27 @@ sr_core_fingerprint_generate_for_binary(struct sr_core_thread *thread,
|
|
|
046a1c |
return true;
|
|
|
046a1c |
}
|
|
|
046a1c |
|
|
|
046a1c |
+#else // HAVE_LIBOPCODES
|
|
|
046a1c |
+
|
|
|
046a1c |
+bool
|
|
|
046a1c |
+sr_core_fingerprint_generate(struct sr_core_stacktrace *stacktrace,
|
|
|
046a1c |
+ char **error_message)
|
|
|
046a1c |
+{
|
|
|
046a1c |
+ *error_message = sr_strdup("satyr compiled without libopcodes");
|
|
|
046a1c |
+ return false;
|
|
|
046a1c |
+}
|
|
|
046a1c |
+
|
|
|
046a1c |
+bool
|
|
|
046a1c |
+sr_core_fingerprint_generate_for_binary(struct sr_core_thread *thread,
|
|
|
046a1c |
+ const char *binary_path,
|
|
|
046a1c |
+ char **error_message)
|
|
|
046a1c |
+{
|
|
|
046a1c |
+ *error_message = sr_strdup("satyr compiled without libopcodes");
|
|
|
046a1c |
+ return false;
|
|
|
046a1c |
+}
|
|
|
046a1c |
+
|
|
|
046a1c |
+#endif // HAVE_LIBOPCODES
|
|
|
046a1c |
+
|
|
|
046a1c |
static void
|
|
|
046a1c |
hash_frame (struct sr_core_frame *frame)
|
|
|
046a1c |
{
|
|
|
046a1c |
--
|
|
|
046a1c |
1.8.3.1
|
|
|
046a1c |
|