AVX gdb support landed

Steve Fink sphink at gmail.com
Wed Jun 1 15:43:48 UTC 2016


I use the following in my .gdbinit.py to create a $_when_ticks() command
that is usable in breakpoint expressions.

​import gdb
import re

class PythonWhenTicks(gdb.Function):
    """$_when_ticks - return the numeric output of rr's 'when-ticks' command
Usage:
    $_when_ticks()
"""

    def __init__(self):
        super(PythonWhenTicks, self).__init__('_when_ticks')

    def invoke(self):
        when = gdb.execute("when-ticks", False, True)
        m = re.search(r'(\d+)', when)
        if not m:
            raise Exception("when-ticks returned invalid string")
        return int(m.group(1))

PythonWhenTicks()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20160601/979bceec/attachment.html>


More information about the rr-dev mailing list