gdbinit: Some little simplification.
authorSascha Wildner <saw@online.de>
Tue, 12 Jul 2011 19:02:07 +0000 (21:02 +0200)
committerSascha Wildner <saw@online.de>
Tue, 12 Jul 2011 19:02:07 +0000 (21:02 +0200)
share/misc/gdbinit

index cd4ee2d..9967875 100644 (file)
@@ -136,10 +136,8 @@ end
 define dmesg
        set $bufp = msgbufp->msg_ptr
        set $size = msgbufp->msg_size
-       set $rseq = msgbufp->msg_bufr
-       set $wseq = msgbufp->msg_bufx
-       set $rseq = $rseq % $size
-       set $wseq = $wseq % $size
+       set $rseq = msgbufp->msg_bufr % $size
+       set $wseq = msgbufp->msg_bufx % $size
        if ( $bufp != 0 && $size != 0 && $rseq != $wseq )
                while ( $rseq < $wseq )
                        set $c = $bufp + $rseq