From 08235187bcdd66599884f33b046cf8abcf949727 Mon Sep 17 00:00:00 2001 From: Christian Biesinger Date: Thu, 15 Aug 2019 11:29:04 -0500 Subject: Rename internal Python functions to start with an underscore I could not tell if GdbSetPythonDirectory is internal or not because I could not find any references to it, so I left it as-is. Tested by running the testsuite on gdb.python/*.exp; everything still passes. 2019-08-15 Christian Biesinger * python/lib/gdb/__init__.py (GdbOutputFile): Rename to have a leading underscore. (GdbOutputErrorFile): Likewise. (global scope): Adjust constructor calls to GdbOutput{,Error}File accordingly. (execute_unwinders): Rename to have a leading underscore. (auto_load_packages): Likewise. (global scope): Adjust call to auto_load_packages accordingly. (GdbSetPythonDirectory): Likewise. * python/py-unwind.c (pyuw_sniffer): Call _execute_unwinders instead of execute_unwinders. gdb/testsuite/ChangeLog: 2019-08-15 Christian Biesinger * gdb.python/python.exp: Expect a leading underscore on GdbOutput{,Error}File. --- gdb/python/py-unwind.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/python/py-unwind.c') diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index 08c3aff..7cb9fa1 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -507,16 +507,16 @@ pyuw_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, /* Run unwinders. */ if (gdb_python_module == NULL - || ! PyObject_HasAttrString (gdb_python_module, "execute_unwinders")) + || ! PyObject_HasAttrString (gdb_python_module, "_execute_unwinders")) { PyErr_SetString (PyExc_NameError, - "Installation error: gdb.execute_unwinders function " + "Installation error: gdb._execute_unwinders function " "is missing"); gdbpy_print_stack (); return 0; } gdbpy_ref<> pyo_execute (PyObject_GetAttrString (gdb_python_module, - "execute_unwinders")); + "_execute_unwinders")); if (pyo_execute == NULL) { gdbpy_print_stack (); -- cgit v1.1