]> sourceware.org Git - systemtap.git/commitdiff
arm/registers.stp: correct the assert condition
authorJosh Stone <jistone@redhat.com>
Fri, 28 Aug 2015 16:49:48 +0000 (09:49 -0700)
committerJosh Stone <jistone@redhat.com>
Fri, 28 Aug 2015 16:49:48 +0000 (09:49 -0700)
The offset condition was not fully inverted in its transition to assert.
(The same checks for other architectures were all done correctly.)

tapset/arm/registers.stp

index a56fecf35f54ab15376d3de62e5abdb51f5111cd..0720150475fa4a52e91f816d9d8dc651aeea3ac3 100644 (file)
@@ -108,7 +108,7 @@ function uarch_bytes:long() {
 function register:long (name:string) {
   assert(registers_valid(), "cannot access CPU registers in this context")
        offset = _reg_offsets[name]
-  assert(offset != 0 && (name in _reg_offsets), "Unknown register: " . name)
+  assert(offset != 0 || (name in _reg_offsets), "Unknown register: " . name)
        return _stp_get_register_by_offset(offset)
 }
 
This page took 0.029308 seconds and 5 git commands to generate.