| /netbsd/src/external/gpl3/gdb/dist/gdb/python/ |
| D | py-infevents.c | 25 static gdbpy_ref<> 29 gdbpy_ref<> event; in create_inferior_call_event_object() 43 gdbpy_ref<> ptid_obj (gdbpy_create_ptid_object (ptid)); in create_inferior_call_event_object() 50 gdbpy_ref<> addr_obj = gdb_py_object_from_ulongest (addr); in create_inferior_call_event_object() 63 static gdbpy_ref<> 67 gdbpy_ref<> event = create_event_object (®ister_changed_event_object_type); in create_register_changed_event_object() 71 gdbpy_ref<> frame_obj (frame_info_to_frame_object (frame)); in create_register_changed_event_object() 78 gdbpy_ref<> regnum_obj = gdb_py_object_from_longest (regnum); in create_register_changed_event_object() 91 static gdbpy_ref<> 94 gdbpy_ref<> event = create_event_object (&memory_changed_event_object_type); in create_memory_changed_event_object() [all …]
|
| D | py-prettyprint.c | 53 static gdbpy_ref<> 68 gdbpy_ref<> attr (PyObject_GetAttr (function, gdbpy_enabled_cst)); in search_pp_list() 81 gdbpy_ref<> printer (PyObject_CallFunctionObjArgs (function, value, in search_pp_list() 89 return gdbpy_ref<>::new_reference (Py_None); in search_pp_list() 103 gdbpy_ref<> objf = objfile_to_objfile_object (obj); in find_pretty_printer_from_objfiles() 111 gdbpy_ref<> pp_list (objfpy_get_printers (objf.get (), NULL)); in find_pretty_printer_from_objfiles() 112 gdbpy_ref<> function (search_pp_list (pp_list.get (), value)); in find_pretty_printer_from_objfiles() 131 static gdbpy_ref<> 134 gdbpy_ref<> obj = pspace_to_pspace_object (current_program_space); in find_pretty_printer_from_progspace() 138 gdbpy_ref<> pp_list (pspy_get_printers (obj.get (), NULL)); in find_pretty_printer_from_progspace() [all …]
|
| D | py-xmethods.c | 86 gdbpy_ref<> enabled_field (PyObject_GetAttrString (matcher, in invoke_match_method() 100 gdbpy_ref<> match_method (PyObject_GetAttrString (matcher, in invoke_match_method() 105 gdbpy_ref<> py_xmethod_name (PyUnicode_FromString (xmethod_name)); in invoke_match_method() 126 gdbpy_ref<> py_type (type_to_type_object (obj_type)); in gdbpy_get_matching_xmethod_workers() 134 gdbpy_ref<> py_xmethod_matcher_list (PyList_New (0)); in gdbpy_get_matching_xmethod_workers() 146 gdbpy_ref<> py_objfile = objfile_to_objfile_object (objfile); in gdbpy_get_matching_xmethod_workers() 154 gdbpy_ref<> objfile_matchers (objfpy_get_xmethods (py_objfile.get (), in gdbpy_get_matching_xmethod_workers() 156 gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (), in gdbpy_get_matching_xmethod_workers() 169 gdbpy_ref<> py_progspace = pspace_to_pspace_object (current_program_space); in gdbpy_get_matching_xmethod_workers() 172 gdbpy_ref<> pspace_matchers (pspy_get_xmethods (py_progspace.get (), in gdbpy_get_matching_xmethod_workers() [all …]
|
| D | py-newobjfileevent.c | 22 static gdbpy_ref<> 25 gdbpy_ref<> objfile_event in create_new_objfile_event_object() 30 gdbpy_ref<> py_objfile = objfile_to_objfile_object (objfile); in create_new_objfile_event_object() 49 gdbpy_ref<> event = create_new_objfile_event_object (objfile); in emit_new_objfile_event() 58 static gdbpy_ref<> 61 gdbpy_ref<> objfile_event in create_free_objfile_event_object() 66 gdbpy_ref<> py_objfile = objfile_to_objfile_object (objfile); in create_free_objfile_event_object() 85 gdbpy_ref<> event = create_free_objfile_event_object (objfile); in emit_free_objfile_event() 94 static gdbpy_ref<> 97 gdbpy_ref<> objfile_event in create_clear_objfiles_event_object() [all …]
|
| D | py-utils.c | 36 gdbpy_ref<> 55 return gdbpy_ref<> (unicode_str); in python_string_to_unicode() 66 gdbpy_ref<> string (PyUnicode_AsEncodedString (unicode_str, charset, NULL)); in unicode_to_encoded_string() 78 static gdbpy_ref<> 82 return gdbpy_ref<> (PyUnicode_AsEncodedString (unicode_str, charset, NULL)); in unicode_to_encoded_python_string() 101 static gdbpy_ref<> 115 gdbpy_ref<> str = python_string_to_unicode (obj); in python_string_to_target_string() 127 gdbpy_ref<> 130 gdbpy_ref<> str = python_string_to_unicode (obj); in python_string_to_target_python_string() 143 gdbpy_ref<> str = python_string_to_unicode (obj); in python_string_to_host_string() [all …]
|
| D | py-stopevent.c | 24 gdbpy_ref<> 25 create_stop_event_object (PyTypeObject *py_type, const gdbpy_ref<> &dict) in create_stop_event_object() 27 gdbpy_ref<> thread = py_get_event_thread (inferior_ptid); in create_stop_event_object() 31 gdbpy_ref<> result = create_thread_event_object (py_type, thread.get ()); in create_stop_event_object() 44 static gdbpy_ref<> 81 gdbpy_ref<> dict = uiout.result (); in py_print_bpstat() 89 gdbpy_ref<> val (value_to_value_object (return_value)); in py_print_bpstat() 109 gdbpy_ref<> stop_event_obj; in emit_stop_event() 110 gdbpy_ref<> list; in emit_stop_event() 117 gdbpy_ref<> dict = py_print_bpstat (bs, stop_signal); in emit_stop_event()
|
| D | py-function.c | 38 static gdbpy_ref<> 42 gdbpy_ref<> result (PyTuple_New (argc)); in convert_values_to_python() 49 gdbpy_ref<> elt (value_to_value_object (argv[i])); in convert_values_to_python() 67 gdbpy_ref<> result; in fnpy_call() 68 gdbpy_ref<> args = convert_values_to_python (argc, argv); in fnpy_call() 78 gdbpy_ref<> callable (PyObject_GetAttrString ((PyObject *) cookie, in fnpy_call() 111 gdbpy_ref<> self_ref = gdbpy_ref<>::new_reference (self); in fnpy_init() 115 gdbpy_ref<> ds_obj (PyObject_GetAttrString (self, "__doc__")); in fnpy_init()
|
| D | py-cmd.c | 95 gdbpy_ref<cmdpy_object> cmd ((cmdpy_object *) context); in cmdpy_destroyer() 122 gdbpy_ref<> argobj (PyUnicode_Decode (args, strlen (args), host_charset (), in cmdpy_function() 130 gdbpy_ref<> ttyobj (PyBool_FromLong (from_tty)); in cmdpy_function() 131 gdbpy_ref<> result (PyObject_CallMethodObjArgs ((PyObject *) obj, invoke_cst, in cmdpy_function() 168 static gdbpy_ref<> 182 gdbpy_ref<> textobj (PyUnicode_Decode (text, strlen (text), host_charset (), in cmdpy_completer_helper() 190 gdbpy_ref<> wordobj; in cmdpy_completer_helper() 194 wordobj = gdbpy_ref<>::new_reference (Py_None); in cmdpy_completer_helper() 207 gdbpy_ref<> resultobj (PyObject_CallMethodObjArgs ((PyObject *) obj, in cmdpy_completer_helper() 236 gdbpy_ref<> resultobj = cmdpy_completer_helper (command, text, word); in cmdpy_completer_handle_brkchars() [all …]
|
| D | py-stopevent.h | 25 extern gdbpy_ref<> create_stop_event_object (PyTypeObject *py_type, 26 const gdbpy_ref<> &dict); 31 extern gdbpy_ref<> create_breakpoint_event_object (const gdbpy_ref<> &dict, 35 extern gdbpy_ref<> create_signal_event_object (const gdbpy_ref<> &dict,
|
| D | py-tui.c | 64 tui_py_window (const char *name, gdbpy_ref<gdbpy_tui_window> wrapper) in tui_py_window() 78 void set_user_window (gdbpy_ref<> &&user_window) in set_user_window() 144 gdbpy_ref<> m_window; 147 gdbpy_ref<gdbpy_tui_window> m_wrapper; 167 gdbpy_ref<> result (PyObject_CallMethod (m_window.get (), "close", in ~tui_py_window() 201 gdbpy_ref<> result (PyObject_CallMethod (m_window.get (), "render", in rerender() 215 gdbpy_ref<> result (PyObject_CallMethod (m_window.get(), "hscroll", in do_scroll_horizontal() 229 gdbpy_ref<> result (PyObject_CallMethod (m_window.get (), "vscroll", in do_scroll_vertical() 251 gdbpy_ref<> result (PyObject_CallMethod (m_window.get (), "click", in click() 285 explicit gdbpy_tui_window_maker (gdbpy_ref<> &&constr) in gdbpy_tui_window_maker() [all …]
|
| D | python.c | 311 gdbpy_ref<> file = host_string_to_python_string ("__file__"); 322 gdbpy_ref<> filename_obj = host_string_to_python_string (filename); 336 gdbpy_ref<> code (Py_CompileStringExFlags (command, 346 gdbpy_ref<> eval_result (PyEval_EvalCode (code.get (), d, d)); 823 gdbpy_ref<> iter (PyObject_GetIter (symtab_list)); in gdbpy_rbreak() 830 gdbpy_ref<> next (PyIter_Next (iter.get ())); in gdbpy_rbreak() 839 gdbpy_ref<> obj_name (PyObject_GetAttrString (next.get (), in gdbpy_rbreak() 888 gdbpy_ref<> return_list (PyList_New (0)); in gdbpy_rbreak() 917 gdbpy_ref<> argList (Py_BuildValue("(s)", symbol_name.c_str ())); in gdbpy_rbreak() 918 gdbpy_ref<> obj (PyObject_CallObject ((PyObject *) in gdbpy_rbreak() [all …]
|
| D | py-framefilter.c | 62 gdbpy_ref<> result (PyObject_CallMethod (obj, "symbol", NULL)); in extract_sym() 133 gdbpy_ref<> vresult (PyObject_CallMethod (obj, "value", NULL)); in extract_value() 267 gdbpy_ref<> result (PyObject_CallMethod (filter, func, NULL)); in get_py_iter_from_func() 439 gdbpy_ref<> item (PyIter_Next (iter)); in enumerate_args() 568 gdbpy_ref<> item (PyIter_Next (iter)); in enumerate_locals() 641 gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args")); in py_mi_print_variables() 645 gdbpy_ref<> locals_iter (get_py_iter_from_func (filter, "frame_locals")); in py_mi_print_variables() 675 gdbpy_ref<> locals_iter (get_py_iter_from_func (filter, "frame_locals")); in py_print_locals() 701 gdbpy_ref<> args_iter (get_py_iter_from_func (filter, "frame_args")); in py_print_args() 715 gdbpy_ref<> item (PyIter_Next (args_iter.get ())); in py_print_args() [all …]
|
| D | py-connection.c | 69 gdbpy_ref<connection_object>> all_connection_objects; 78 gdbpy_ref<> 82 return gdbpy_ref<>::new_reference (Py_None); in target_to_connection_object() 84 gdbpy_ref <connection_object> conn_obj; in target_to_connection_object() 107 return gdbpy_ref<> ((PyObject *) conn_obj.release ()); in target_to_connection_object() 116 gdbpy_ref<> list (PyList_New (0)); in gdbpy_connections() 124 gdbpy_ref<> conn = target_to_connection_object (target); in gdbpy_connections() 143 gdbpy_ref<> event_obj in emit_connection_event() 148 gdbpy_ref<> conn = target_to_connection_object (target); in emit_connection_event() 172 gdbpy_ref <connection_object> conn_obj = conn_obj_iter->second; in connpy_connection_removed() [all …]
|
| D | python-internal.h | 449 gdbpy_ref<> pspace_to_pspace_object (struct program_space *); 455 gdbpy_ref<> objfile_to_objfile_object (struct objfile *); 469 gdbpy_ref<thread_object> create_thread_object (struct thread_info *tp); 470 gdbpy_ref<> thread_to_thread_object (thread_info *thr);; 471 gdbpy_ref<inferior_object> inferior_to_inferior_object (inferior *inf); 477 gdbpy_ref<> target_to_connection_object (process_stratum_target *target); 690 gdbpy_ref<> err_type = this->type (); in type_matches() 696 gdbpy_ref<> value () const in value() 719 gdbpy_ref<> type () const in type() 726 return gdbpy_ref<>::new_reference ((PyObject *)Py_TYPE (m_exc.get ())); in type() [all …]
|
| D | py-progspace.c | 82 gdbpy_ref<pspace_object> object (obj); in operator() 241 gdbpy_ref<> tmp (self->printers); in pspy_set_printers() 280 gdbpy_ref<> tmp (self->frame_filters); in pspy_set_frame_filters() 320 gdbpy_ref<> tmp (self->frame_unwinders); in pspy_set_frame_unwinders() 383 gdbpy_ref<> tmp (self->missing_debug_handlers); in pspy_set_missing_debug_handlers() 412 gdbpy_ref<> tmp (self->type_printers); in pspy_set_type_printers() 428 gdbpy_ref<> list (PyList_New (0)); in pspy_get_objfiles() 436 gdbpy_ref<> item = objfile_to_objfile_object (objf); in pspy_get_objfiles() 594 gdbpy_ref<> 600 gdbpy_ref<pspace_object> object in pspace_to_pspace_object() [all …]
|
| D | py-exitedevent.c | 22 static gdbpy_ref<> 25 gdbpy_ref<> exited_event = create_event_object (&exited_event_object_type); in create_exited_event_object() 32 gdbpy_ref<> exit_code_obj = gdb_py_object_from_longest (*exit_code); in create_exited_event_object() 41 gdbpy_ref<inferior_object> inf_obj = inferior_to_inferior_object (inf); in create_exited_event_object() 59 gdbpy_ref<> event = create_exited_event_object (exit_code, inf); in emit_exited_event()
|
| D | py-disasm.c | 115 std::vector<gdbpy_ref<>> *parts; 184 std::vector<gdbpy_ref<>> release () in release() 216 std::vector<gdbpy_ref<>> m_parts; 358 static gdbpy_ref<> 367 return gdbpy_ref<> ((PyObject *) text_part); in make_disasm_text_part() 374 static gdbpy_ref<> 383 return gdbpy_ref<> ((PyObject *) addr_part); in make_disasm_addr_part() 429 gdbpy_ref<> text_part in disasmpy_info_make_text_part() 488 disasmpy_parts_list_to_string (const std::vector<gdbpy_ref<>> &parts) in disasmpy_parts_list_to_string() 518 std::vector<gdbpy_ref<>> &&parts) in disasmpy_init_disassembler_result() [all …]
|
| D | py-event.c | 29 gdbpy_ref<> 32 gdbpy_ref<event_object> event_obj (PyObject_New (event_object, py_type)); in create_event_object() 40 return gdbpy_ref<> ((PyObject *) event_obj.release ()); in create_event_object() 91 gdbpy_ref<> callback_list_copy (PySequence_List (registry->callbacks)); in evpy_emit_event() 102 gdbpy_ref<> func_result (PyObject_CallFunctionObjArgs (func, event, in evpy_emit_event()
|
| D | py-signalevent.c | 22 gdbpy_ref<> 23 create_signal_event_object (const gdbpy_ref<> &dict, in create_signal_event_object() 26 gdbpy_ref<> signal_event_obj in create_signal_event_object() 34 gdbpy_ref<> signal_name_obj (PyUnicode_FromString (signal_name)); in create_signal_event_object()
|
| D | py-threadevent.c | 24 gdbpy_ref<> 36 return gdbpy_ref<>::new_reference (Py_None); in py_get_event_thread() 39 gdbpy_ref<> 44 gdbpy_ref<> thread_event_obj = create_event_object (py_type); in create_thread_event_object()
|
| D | py-inferior.c | 36 = std::unordered_map<thread_info *, gdbpy_ref<thread_object>>; 66 gdbpy_ref<inferior_object> inf_obj (obj); in operator() 233 gdbpy_ref<inferior_object> 258 return gdbpy_ref<inferior_object>::new_reference (inf_obj); in inferior_to_inferior_object() 274 gdbpy_ref<inferior_object> inf_obj = inferior_to_inferior_object (inf); in python_new_inferior() 281 gdbpy_ref<> event = create_event_object (&new_inferior_event_object_type); in python_new_inferior() 302 gdbpy_ref<inferior_object> inf_obj = inferior_to_inferior_object (inf); in python_inferior_deleted() 309 gdbpy_ref<> event = create_event_object (&inferior_deleted_event_object_type); in python_inferior_deleted() 317 gdbpy_ref<> 320 gdbpy_ref<inferior_object> inf_obj = inferior_to_inferior_object (thr->inf); in thread_to_thread_object() [all …]
|
| D | py-varobj.c | 26 py_varobj_iter (struct varobj *var, gdbpy_ref<> &&pyiter, 77 gdbpy_ref<> item (PyIter_Next (m_iter)); in next() 134 py_varobj_iter::py_varobj_iter (struct varobj *var, gdbpy_ref<> &&pyiter, in py_varobj_iter() 157 gdbpy_ref<> children (PyObject_CallMethodObjArgs (printer, gdbpy_children_cst, in py_varobj_get_iterator() 165 gdbpy_ref<> iter (PyObject_GetIter (children.get ())); in py_varobj_get_iterator()
|
| D | py-registers.c | 28 typedef std::vector<gdbpy_ref<>> gdbpy_register_type; 95 static gdbpy_ref<> 101 static std::unordered_map<const struct reggroup *,gdbpy_ref<>> in gdbpy_get_reggroup() 109 gdbpy_ref<reggroup_object> group in gdbpy_get_reggroup() 115 = gdbpy_ref<> ((PyObject *) group.release ()); in gdbpy_get_reggroup() 148 static gdbpy_ref<> 165 gdbpy_ref <register_descriptor_object> reg 172 vec[regnum] = gdbpy_ref<> ((PyObject *) reg.release ());
|
| D | py-mi.c | 31 py_ui_out::add_field (const char *name, const gdbpy_ref<> &obj) in add_field() 58 gdbpy_ref<> new_obj (type == ui_out_type_list in do_begin() 94 gdbpy_ref<> val = gdb_py_object_from_longest (value); in do_field_signed() 105 gdbpy_ref<> val = gdb_py_object_from_ulongest (value); in do_field_unsigned() 117 gdbpy_ref<> val = host_string_to_python_string (string); in do_field_string() 192 gdbpy_ref<> key_repr (PyObject_Repr (key_obj)); in py_object_to_mi_key() 274 gdbpy_ref<> item (PySequence_ITEM (result, i)); in serialize_mi_result_1() 282 gdbpy_ref<> item; in serialize_mi_result_1()
|
| D | py-infthread.c | 38 gdbpy_ref<thread_object> 41 gdbpy_ref<thread_object> thread_obj; in create_thread_object() 43 gdbpy_ref<inferior_object> inf_obj = inferior_to_inferior_object (tp->inf); in create_thread_object() 164 gdbpy_ref<> result in thpy_get_num() 178 gdbpy_ref<> result in thpy_get_global_num() 382 gdbpy_ref<> pid_obj = gdb_py_object_from_longest (pid); in gdbpy_create_ptid_object() 385 gdbpy_ref<> lwp_obj = gdb_py_object_from_longest (lwp); in gdbpy_create_ptid_object() 388 gdbpy_ref<> tid_obj = gdb_py_object_from_ulongest (tid); in gdbpy_create_ptid_object()
|