]> sourceware.org Git - systemtap.git/commitdiff
Assert that anything other than 32-bit or 64-bit processors will not be seen
authorWilliam Cohen <wcohen@redhat.com>
Wed, 13 Oct 2021 19:56:21 +0000 (15:56 -0400)
committerWilliam Cohen <wcohen@redhat.com>
Tue, 26 Oct 2021 13:57:22 +0000 (09:57 -0400)
One last diagnostic print to remove.  In this case the mapping between
dwarf register and Dyninst register name needs to take into account
whether this is 32-bit or 64-bit code.  However, there is a default in
the switch case to catch the anything other than 4 or 8 bytes.  If the
code see something other than one of those two values, something is
very wrong.  Figured best to just have an assert stop things, so the
problem is examined.

analysis.cxx

index 7292864cd84fab61be0dc1b956096cccc439780c..1c11c87a2c87ed7842dba24d9c522d57234fe0dc 100644 (file)
@@ -245,7 +245,9 @@ int liveness(string executable,
                if (regno >= (sizeof(dyninst_register_64)/sizeof(MachRegister))) return 0;
                r = dyninst_register_64[regno]; break;
        default:
-               cout << "Reg width " << reg_width << " bytes not understood." << endl;
+               // All the current architectures that systemtap (and dyninst) support
+               // are 32-bit (4 byte) or 64-bit (8 byte). Should never end up here.
+               assert(false);
                return 0;
        }
 
This page took 0.025964 seconds and 5 git commands to generate.