# SSSD and LDB debugging plugins
#
# Activate them by putting:
# to your .gdbinit file
#
# To bypass the pretty printer and print the raw values, use the "/r" option:
# print /r foobar
import gdb
return fn
"Shared code between different string-printing classes"
" print an ldb dn "
" print a ldb value"
" print a ldb message element "
try:
except ValueError:
return "num_values is not numeric?"
" print a ldb message "
try:
except ValueError:
return "num_elements is not numeric?"
" print a ldb message element "
ret = "count = %(count)s, extended = %(extended)s, controls = %(controls)s, refs = %(refs)s" % self.val
try:
except ValueError:
ret += 'Count is not numeric value?'
return ret
" print a struct sysdb attrs "
try:
except ValueError:
ret += 'num is not numeric value?'
return ret
# ---
# --- register pretty printers ---
# ---
return LdbDnPrinter(val)
return None
return LdbValPrinter(val)
return None
return LdbMessageElementPrinter(val)
return None
return LdbMessagePrinter(val)
return None
return LdbResultPrinter(val)
return None
return SysdbAttrsPrinter(val)
return None
# ---
# --- set a breakpoint at the tevent_req finish fn ---
# ---
"""Break at the tevent finish location """
print('cannot determine the type of the variable')
return
print('wrong attribute - must be a tevent_req pointer')
return
try:
except KeyError:
print("No async function defined?")
return
try:
except IndexError:
print("Cannot get function address")
return