]> sourceware.org Git - systemtap.git/commitdiff
runtime: more diagnostics for build-id checking
authorFrank Ch. Eigler <fche@elastic.org>
Wed, 7 Apr 2010 20:59:34 +0000 (16:59 -0400)
committerFrank Ch. Eigler <fche@elastic.org>
Thu, 8 Apr 2010 21:17:46 +0000 (17:17 -0400)
* runtime/sym.c: Store individual rc's for build-id comparisons.

runtime/sym.c

index 3c69fb1aa8b2e57447359a3b50a2cea44d711a19..e1e6e22509e632468ed9e5a2e368f1c033f82f0c 100644 (file)
@@ -311,15 +311,15 @@ static int _stp_module_check(void)
                              loc2c-runtime.h were more easily usable,
                              a deref() loop could do it too. */
                             mm_segment_t oldfs = get_fs();
-                            int rc;
+                            int rc1, rc2;
                             unsigned char theory, practice;
 
                             set_fs(KERNEL_DS);
-                            rc = get_user(theory,((unsigned char*) &m->build_id_bits[j]));
-                            rc = get_user(practice,((unsigned char*) (void*) (notes_addr+j)));
+                            rc1 = get_user(theory,((unsigned char*) &m->build_id_bits[j]));
+                            rc2 = get_user(practice,((unsigned char*) (void*) (notes_addr+j)));
                             set_fs(oldfs);
 
-                            if (rc || theory != practice) {
+                            if (rc1 || rc2 || (theory != practice)) {
                                     const char *basename;
                                     basename = strrchr(m->path, '/');
                                     if (basename)
@@ -328,15 +328,15 @@ static int _stp_module_check(void)
                                             basename = m->path;
                                     
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
-                                    _stp_error ("Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x)\n",
-                                                m->name, basename, j, theory, practice);
+                                    _stp_error ("Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x) rc %d %d\n",
+                                                m->name, basename, j, theory, practice, rc1, rc2);
                                     return 1;
 #else
                                     /* This branch is a surrogate for kernels
                                      * affected by Fedora bug #465873. */
                                     _stp_warn (KERN_WARNING
-                                               "Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x)\n",
-                                               m->name, basename, j, theory, practice);
+                                               "Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x) rc %d %d\n",
+                                               m->name, basename, j, theory, practice, rc1, rc2);
 #endif
                                     break;
                             } /* end mismatch */
This page took 0.028571 seconds and 5 git commands to generate.