]> sourceware.org Git - systemtap.git/commitdiff
Fix usymbols.exp test for 32-on-64 (again). PR11722.
authorMark Wielaard <mjw@redhat.com>
Fri, 9 Jul 2010 22:26:37 +0000 (00:26 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 9 Jul 2010 22:26:37 +0000 (00:26 +0200)
Bug introduced by commit 82ea0c. Add a comment why we need the same
"chopping" of addr in both _stp_umod_lookup and _stp_kallsyms_lookup.

* runtime/sym.c (_stp_kallsyms_lookup): Detect long used as 32bit address.

runtime/sym.c

index db58181bc960e628e70428f8d2d87d0bcac3b089..895ec8c4dec1a30c48ad74b362da10c6add08f6f 100644 (file)
@@ -163,6 +163,13 @@ static const char *_stp_kallsyms_lookup(unsigned long addr,
          {
            unsigned long vm_start = 0;
            unsigned long vm_end = 0;
+#ifdef CONFIG_COMPAT
+        /* Handle 32bit signed values in 64bit longs, chop off top bits.
+           _stp_umod_lookup does the same, but we need it here for the
+           binary search on addr below. */
+        if (test_tsk_thread_flag(task, TIF_32BIT))
+          addr &= ((compat_ulong_t) ~0);
+#endif
            m = _stp_umod_lookup(addr, task, modname, &vm_start, &vm_end);
            if (m)
              {
This page took 0.027393 seconds and 5 git commands to generate.