Esempio n. 1
0
static PyObject *
find_pretty_printer (PyObject *value)
{
  /* Look at the pretty-printer list for each objfile
     in the current program-space.  */
  gdbpy_ref<> function (find_pretty_printer_from_objfiles (value));
  if (function == NULL || function != Py_None)
    return function.release ();

  /* Look at the pretty-printer list for the current program-space.  */
  function.reset (find_pretty_printer_from_progspace (value));
  if (function == NULL || function != Py_None)
    return function.release ();

  /* Look at the pretty-printer list in the gdb module.  */
  return find_pretty_printer_from_gdb (value);
}
Esempio n. 2
0
static PyObject *
find_pretty_printer (PyObject *value)
{
    PyObject *function;

    /* Look at the pretty-printer list for each objfile
       in the current program-space.  */
    function = find_pretty_printer_from_objfiles (value);
    if (function == NULL || function != Py_None)
        return function;
    Py_DECREF (function);

    /* Look at the pretty-printer list for the current program-space.  */
    function = find_pretty_printer_from_progspace (value);
    if (function == NULL || function != Py_None)
        return function;
    Py_DECREF (function);

    /* Look at the pretty-printer list in the gdb module.  */
    function = find_pretty_printer_from_gdb (value);
    return function;
}