From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13052 invoked by alias); 19 Apr 2013 14:05:19 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 13027 invoked by uid 306); 19 Apr 2013 14:05:18 -0000 Date: Fri, 19 Apr 2013 14:05:00 -0000 Message-ID: <20130419140518.12925.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] tromey/python-checker: fix refcount bug in search_pp_list X-Git-Refname: refs/heads/tromey/python-checker X-Git-Reftype: branch X-Git-Oldrev: 43e96afa9e1dcdfce1579906404fcb9a074ddc44 X-Git-Newrev: d91d291cba120e7c76d8ce1511cc9b9585c4b405 X-SW-Source: 2013-q2/txt/msg00035.txt.bz2 List-Id: The branch, tromey/python-checker has been updated discards 43e96afa9e1dcdfce1579906404fcb9a074ddc44 (commit) discards d2b428a3d3d1f8065b6f45d6bf7f743e1cf4c7f3 (commit) discards 509e400b5bf65d16f8cc7415f2926d510985b503 (commit) discards 88a425dbb0e3ec0b9c0330e73548acd4f20e83b4 (commit) discards 990463590e6c8ad1a48859347558316a4094a845 (commit) discards 727bebaa535c9930bfd69e171e9a4addaeadd599 (commit) discards a0a61ec18260b85fcc1131ea15cfc1fd09fac790 (commit) discards a00e60c38429db4b1f100e0205e485fa827ced39 (commit) discards 573de856d39b0091418bfd6a6a5a73c36811f393 (commit) discards 6ab1b3bf539c6eaf4d1b309b2ceed74c90b02045 (commit) discards 0a19f14d4f4885c16314b7d7f52a1f59ad35f371 (commit) discards 18fcdaa73e1c7293bd2eacd90032e779758f0cd2 (commit) discards cbee6854eb1dccfe48e1074f78d8a7063ec21611 (commit) discards 10a6548c1b68d3178b7c932b27b9ba2c74afb397 (commit) discards 0ae7b317081e8adaf352615fe277af92fee1a313 (commit) discards c308b903501e0fef3cdcf9f63a775b7bfe23a33d (commit) discards 4ddcf9bbf334915d6bf1c8dd183011ddd299df83 (commit) discards 45bc7ceeb68db28c4c5312ceb38e39d4ad71805a (commit) discards a1add5c814dd785bd6c5668b23232cfbeee2ff92 (commit) discards fcbff1901a7c4dfd8bea48ff6891a5531e51f77d (commit) discards 60495b8c8854e1bfdf84484724a79a9603861711 (commit) discards 116b814604761983a8811be3b94e5b8fca774d8f (commit) discards e4a5e5d472958909ffcdcde3dc63ad1256f859f6 (commit) discards 03f84b011729d5e4bec441134cc275f515991133 (commit) discards 9278ab2a6f965309521d5057eabe221fbbfbbe0c (commit) discards 00fe9fe40617fc9262700c629c16dd14ae4b5bd3 (commit) discards 4587a042f0b29699ad9e91aae61a4fd884fd109d (commit) discards 48d691c136e76689853233e976c32990523ee9b7 (commit) discards 0934d48727e8a7f6515934cb24529140bc85960d (commit) discards 7d3bf4066e13e41fade53decc91c55ac719025f5 (commit) discards de5a2253a611d5cb19ad4af1df859686d6b82645 (commit) via d91d291cba120e7c76d8ce1511cc9b9585c4b405 (commit) via 85b634cb836608272901fcc496bf464567cb0800 (commit) via 5ef5c08975d0c5fb4e4aec8f448afeb891483bdd (commit) via 95b1376c46af5c86942b6b3cd149264c7b369a7b (commit) via d88c1ef43ee89085b583a0487069627cf5dc2a59 (commit) via 61220805b994e8bb9a05475671bdafec8bcfb1f1 (commit) via 966f379e4f411f7d60c4b5307c492ded26e53906 (commit) via b97d3201ce52788cf122546fb7adcdfa9d682607 (commit) via 1915b06c21dec6f7878d4ec43dbdb94a27e4e7d3 (commit) via c8866f512f05112e4902d8d1ec6b66b03060b750 (commit) via 5a056ce2a3e5f623581d98949fcdf848b7701a15 (commit) via 8f25c9d1697a6b65c54b91de07a4b787c8f97ebd (commit) via fe3ed87265788a9ea52988aa59f587cb2630cbd5 (commit) via 22014c728f2e435ecf89daf4e778493ae683e946 (commit) via c35abeed07e4da3ad9c1cfcdec8846dde93ef4e5 (commit) via f413ed7a1b9fb3d4bcc70103c90ea3620bd80ce8 (commit) via c0d7976b41d90bb7b126bdd18b47e4950d6b0b29 (commit) via 063f309cf6fb5a893c334250f5f86b6c53aeac09 (commit) via 551c7ca879d4cf14daac72b6dd35b6856a3d6da9 (commit) via 642dbba398dc16c7bcaaad738b28b8d6272d3cb6 (commit) via e2e1365db863dc75931da51edd60c4bbb0b402be (commit) via 7edc500296b8a371e9fbe88d450b8862d0bbab43 (commit) via 3ff56574e73cbef97e2f132acceb27438985d1fe (commit) via 36ab1eef0093c6743b1a8231fcbbacca22c2cdc9 (commit) via 522db6fae0ee6edb4b17db5bdcd7894e2d8f2d3d (commit) via 70f2277ebeca38e968aa75dcb773f2e5494da7fa (commit) via de8cc14de16df8f581d776a3a559ddda4d08fa7c (commit) via c5ef5e5140a57db32491275d2acc6f374a3d731f (commit) via 7a9088e93d91fb5f872465cb6238fe346f68911a (commit) via 8971f489b0f0e28e401c18844d6c679ffb9b6f6e (commit) via daebb5ec91791a8a577a02c5f5857d5810de684d (commit) via 254638dfadb925d3d1fd55f019841d5c6556e752 (commit) via 45140821a713d7b1ef8cb38c737591abfaaff596 (commit) via a04b16a96f161d6b82bdc72ceddcead8539e3977 (commit) via cbf2f0c9dd67247944d06588fd76c9002d61ae5a (commit) via f112776d5ad2210f7b71b2acfd4ca385377c4755 (commit) via 3e258681182fe2fad8a479355494073134748396 (commit) via c09b84a2353bfde550932fa90c3487c6aa962a18 (commit) via c1357f25675c247a7ed40f6948f40d7d013f0bdd (commit) via 62629fa8221ab05d6d7ad14de41a3f4c9319f0bb (commit) via 7e2fcf5bb7283956d5b15b4c13a1051327f3b4b1 (commit) from 43e96afa9e1dcdfce1579906404fcb9a074ddc44 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit d91d291cba120e7c76d8ce1511cc9b9585c4b405 Author: Tom Tromey Date: Thu Apr 18 12:51:02 2013 -0600 fix refcount bug in search_pp_list The checker noticed a missing decref in search_pp_list. * python/py-prettyprint.c (search_pp_list): Decref 'attr'. commit 85b634cb836608272901fcc496bf464567cb0800 Author: Tom Tromey Date: Thu Apr 18 12:50:46 2013 -0600 rearrange for some clarity in valpy_get_dynamic_type The checker noticed some funny code in valpy_get_dynamic_type. This simplifies the code a little and also changes an incref to an xincref; the current code could crash if type_to_type_object failed. * python/py-value.c (valpy_get_dynamic_type): Simplify dynamic_type assignment. Use Py_XINCREF. commit 5ef5c08975d0c5fb4e4aec8f448afeb891483bdd Author: Tom Tromey Date: Thu Apr 18 12:32:24 2013 -0600 fix refcount bug in typy_fields The checker found a bug in typy_fields -- we leaked a reference in one path. * python/py-type.c (typy_fields): Unconditionally decref 'r'. commit 95b1376c46af5c86942b6b3cd149264c7b369a7b Author: Tom Tromey Date: Thu Apr 18 11:40:47 2013 -0600 some py-frame.c changes to make the checker work better The checker complained about some code in py-frame.c that was simple to refactor into a digestible form. * python/py-frame.c (frapy_older, frapy_newer, gdbpy_newest_frame) (gdbpy_selected_frame): Move object-construction code out of TRY_CATCH. commit d88c1ef43ee89085b583a0487069627cf5dc2a59 Author: Tom Tromey Date: Thu Apr 18 11:26:10 2013 -0600 introduce gdb_pymodule_addobject The checker pointed out that this common idiom in gdb is wrong: - Py_INCREF (&arch_object_type); - return PyModule_AddObject (gdb_module, "Architecture", - (PyObject *) &arch_object_type); This is buggy because if PyModule_AddObject fails, then the reference will not be stolen. So, the object will be leaked. This isn't extremely important, as such failures probably won't actually happen. Nevertheless it is better to be clean; and also remove false reports from the checker. This patch does so by introducing a wrapper function for PyModule_AddObject that doesn't steal a reference. * python/py-arch.c (gdbpy_initialize_arch): Use gdb_pymodule_addobject. * python/py-block.c (gdbpy_initialize_blocks): Use gdb_pymodule_addobject. * python/py-breakpoint.c (gdbpy_initialize_breakpoints): Use gdb_pymodule_addobject. * python/py-cmd.c (gdbpy_initialize_breakpoints): Use gdb_pymodule_addobject. * python/py-event.c (gdbpy_initialize_event_generic): Use gdb_pymodule_addobject. * python/py-evtregistry.c (gdbpy_initialize_eventregistry): Use gdb_pymodule_addobject. * python/py-evts.c (add_new_registry): Use gdb_pymodule_addobject. (gdbpy_initialize_py_events): Likewise. * python/py-finishbreakpoint.c (gdbpy_initialize_finishbreakpoints): Use gdb_pymodule_addobject. * python/py-frame.c (gdbpy_initialize_frames): Use gdb_pymodule_addobject. * python/py-function.c (gdbpy_initialize_functions): Use gdb_pymodule_addobject. * python/py-inferior.c (gdbpy_initialize_inferior): Use gdb_pymodule_addobject. * python/py-infthread.c (gdbpy_initialize_thread): Use gdb_pymodule_addobject. * python/py-objfile.c (gdbpy_initialize_objfile): Use gdb_pymodule_addobject. * python/py-param.c (gdbpy_initialize_parameters): Use gdb_pymodule_addobject. * python/py-progspace.c (gdbpy_initialize_pspace): Use gdb_pymodule_addobject. * python/py-symbol.c (gdbpy_initialize_symbols): Use gdb_pymodule_addobject. * python/py-symtab.c (gdbpy_initialize_symtabs): Use gdb_pymodule_addobject. * python/py-type.c (gdbpy_initialize_types): Use gdb_pymodule_addobject. * python/py-utils.c (gdb_pymodule_addobject): New function. * python/py-value.c (gdbpy_initialize_values): Use gdb_pymodule_addobject. * python/python-internal.h (gdb_pymodule_addobject): Declare. * python/python.c (_initialize_python): Use gdb_pymodule_addobject. commit 61220805b994e8bb9a05475671bdafec8bcfb1f1 Author: Tom Tromey Date: Thu Apr 18 10:52:17 2013 -0600 use explicit decrefs rather than cleanups in some cases The checker doesn't understand cleanups, and probably never will. However, in a few places, I think we use cleanups where explicit decref calls are just as clean. So, this patch changes those spots and silences the checker. There are other spots using decref cleanups that can't readily be changed. For example, the pretty-printing code calls into parts of gdb that can throw, and so cleanups must be used. * python/py-cmd.c (cmdpy_completer): Use explicit decref. * python/py-param.c (get_set_value, get_show_value): Use explicit decrefs. * python/python.c (start_type_printers, apply_type_printers): Use explicit decrefs. commit 966f379e4f411f7d60c4b5307c492ded26e53906 Author: Tom Tromey Date: Thu Apr 18 08:53:14 2013 -0600 remove erroneous incref from gdbpy_initialize_py_events The checker noticed a bogus incref in gdbpy_initialize_py_events. * python/py-evts.c (gdbpy_initialize_py_events): Don't incref the module. commit b97d3201ce52788cf122546fb7adcdfa9d682607 Author: Tom Tromey Date: Thu Apr 18 07:46:18 2013 -0600 fix refcounting in gdbpy_run_events The checker noticed a missing decref in gdbpy_run_events. * python/python.c (gdbpy_run_events): Decref the result of PyObject_CallObject. commit 1915b06c21dec6f7878d4ec43dbdb94a27e4e7d3 Author: Tom Tromey Date: Wed Apr 17 14:43:26 2013 -0600 make set_sal follow negative result convention This changes set_sal to follow the "negative means error" convention. This lets the checker understand it. * python/py-symtab.c (set_sal): Use CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION. Return -1 on error. (symtab_and_line_to_sal_object): Update. commit c8866f512f05112e4902d8d1ec6b66b03060b750 Author: Tom Tromey Date: Wed Apr 17 14:35:18 2013 -0600 add missing decref in py-param.c The checker found a missing decref in compute_enum_values. * python/py-param.c (compute_enum_values): Decref 'item'. commit 5a056ce2a3e5f623581d98949fcdf848b7701a15 Author: Tom Tromey Date: Wed Apr 17 13:31:38 2013 -0600 check gdb_python_initialized everywhere This patch changes the rest of gdb to use gdb_python_initialized. It also changes ensure_python_env to throw an exception if Python is not initialized. In some spots no other checks were needed -- there is no way to reach some of the calls to ensure_python_env unless some previous call into Python was made. value_get_print_value had to be reindented, which is why that part of the patch looks odd. * mi/mi-main.c: Include python-internal.h. (mi_cmd_list_features): Check gdb_python_initialized. * python/py-inferior.c (python_on_normal_stop, python_on_resume) (python_inferior_exit, python_new_objfile, add_thread_object) (delete_thread_object, py_free_inferior): Check gdb_python_initialized. * python/py-prettyprint.c (apply_val_pretty_printer): Check gdb_python_initialized. * python/py-type.c (save_objfile_types): Check gdb_python_initialized. * python/python-internal.h (gdb_python_initialized): Declare. * python/python.c (ensure_python_env): Throw exception if Python not initialized. (before_prompt_hook, source_python_script_for_objfile) (start_type_printers, apply_type_printers, free_type_printers): Check gdb_python_initialized. * varobj.c (varobj_get_display_hint) (dynamic_varobj_has_child_method, update_dynamic_varobj_children) (install_new_value_visualizer, varobj_set_visualizer) (value_get_print_value): Check gdb_python_initialized. commit 8f25c9d1697a6b65c54b91de07a4b787c8f97ebd Author: Tom Tromey Date: Wed Apr 17 13:12:59 2013 -0600 convert python init functions to do error-checking The checker pointed out that we did not do Python error checking in any of our module initialization functions. There is no deep reason for this -- just that it is common in the Python world to work this way. However, it seems cleaner to me to be correct, and it makes the checker quieter besides. This changes nearly all of the Python initialization functions to return -1 on error. This also introduces gdb_python_initialized, which is set to a non-zero value if initialization went properly. A subsequent patch will use this to disable Python support if initialization failed. * python/py-arch.c (gdbpy_initialize_arch): Return 'int'. Check errors. * python/py-auto-load.c (gdbpy_initialize_auto_load): Return 'int'. * python/py-block.c (gdbpy_initialize_blocks): Return 'int'. Check errors. * python/py-breakpoint.c (gdbpy_initialize_breakpoints): Return 'int'. Check errors. * python/py-cmd.c (gdbpy_initialize_commands): Return 'int'. Check errors. * python/py-event.c (gdbpy_initialize_event): Return 'int'. Check errors. * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Change generated init function to return 'int'. * python/py-evtregistry.c (gdbpy_initialize_eventregistry): Return 'int'. Check errors. * python/py-evts.c (gdbpy_initialize_py_events): Return 'int'. Check errors. * python/py-finishbreakpoint.c (gdbpy_initialize_finishbreakpoints): Return 'int'. Check errors. * python/py-frame.c (gdbpy_initialize_frames): Return 'int'. Check errors. * python/py-function.c (gdbpy_initialize_functions): Return 'int'. Check errors. * python/py-gdb-readline.c (gdbpy_initialize_gdb_readline): Check errors. * python/py-inferior.c (gdbpy_initialize_inferior): Return 'int'. Check errors. * python/py-infthread.c (gdbpy_initialize_thread): Return 'int'. Check errors. * python/py-lazy-string.c (gdbpy_initialize_lazy_string): Return 'int'. Check errors. * python/py-objfile.c (gdbpy_initialize_objfile): Return 'int'. Check errors. * python/py-param.c (gdbpy_initialize_parameters): Return 'int'. Check errors. * python/py-progspace.c (gdbpy_initialize_pspace): Return 'int'. Check errors. * python/py-symbol.c (gdbpy_initialize_symbols): Return 'int'. Check errors. * python/py-symtab.c (gdbpy_initialize_symtabs): Return 'int'. Check errors. * python/py-type.c (gdbpy_initialize_types): Return 'int'. Check errors. * python/py-value.c (gdbpy_initialize_values): Return 'int'. Check errors. * python/python-internal.h (gdbpy_initialize_auto_load, gdbpy_initialize_values, gdbpy_initialize_frames, gdbpy_initialize_symtabs, gdbpy_initialize_commands, gdbpy_initialize_symbols, gdbpy_initialize_symtabs, gdbpy_initialize_blocks, gdbpy_initialize_types, gdbpy_initialize_functions, gdbpy_initialize_pspace, gdbpy_initialize_objfile, gdbpy_initialize_breakpoints, gdbpy_initialize_finishbreakpoints, gdbpy_initialize_lazy_string, gdbpy_initialize_parameters, gdbpy_initialize_thread, gdbpy_initialize_inferior, gdbpy_initialize_eventregistry, gdbpy_initialize_event, gdbpy_initialize_py_events, gdbpy_initialize_stop_event, gdbpy_initialize_signal_event, gdbpy_initialize_breakpoint_event, gdbpy_initialize_continue_event, gdbpy_initialize_exited_event, gdbpy_initialize_thread_event, gdbpy_initialize_new_objfile_event, gdbpy_initialize_arch): Update. Use CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION. * python/python.c (gdb_python_initialized): New global. (gdbpy_initialize_events): Return 'int'. Check errors. (_initialize_python): Check errors. Set gdb_python_initialized. commit fe3ed87265788a9ea52988aa59f587cb2630cbd5 Author: Tom Tromey Date: Wed Apr 17 12:20:47 2013 -0600 reference count in bpfinishpy_out_of_scope The checker noticed a missing decref in bpfinishpy_out_of_scope. * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Decref the reslut of PyObject_CallMethod. commit 22014c728f2e435ecf89daf4e778493ae683e946 Author: Tom Tromey Date: Wed Apr 17 12:05:32 2013 -0600 fix bug in gdbpy_initialize_event_generic The checker noticed that gdbpy_initialize_event_generic could do an extra decref of 'type' if PyType_Ready failed. This fixes the bug. * python/py-event.c (gdbpy_initialize_event_generic): Return early if PyType_Ready fails. commit c35abeed07e4da3ad9c1cfcdec8846dde93ef4e5 Author: Tom Tromey Date: Wed Apr 17 10:29:30 2013 -0600 add gdb_assert_not_reached This patch adds a gdb_assert_not_reached to a switch in make_fielditem. This avoids a checker complaint. * python/py-type.c (make_fielditem): Add gdb_assert_not_reached as 'default' in the switch. commit f413ed7a1b9fb3d4bcc70103c90ea3620bd80ce8 Author: Tom Tromey Date: Wed Apr 17 10:23:52 2013 -0600 fix get_addr_from_python get_addr_from_python confused the checker and so I decided to change it to a form that it found more palatable. In particular now it returns a negative value on error (using CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION), and it can no longer throw a gdb exception. This let me hoist calls to it out of some TRY_CATCHes. * python/py-inferior.c (gdbpy_inferiors): Update. Hoist get_addr_from_python calls out of TRY_CATCH. (infpy_write_memory, infpy_search_memory): Likewise. * python/py-utils.c (get_addr_from_python): Return negative value on error. Use TRY_CATCH. * python/python-internal.h (get_addr_from_python): Use CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION. commit c0d7976b41d90bb7b126bdd18b47e4950d6b0b29 Author: Tom Tromey Date: Wed Apr 17 09:31:55 2013 -0600 add decref in evpy_emit_event The checker noticed a missing decref in evpy_emit_event. * python/py-event.c (evpy_emit_event): Decref the result of PyObject_CallFunctionObjArgs. commit 063f309cf6fb5a893c334250f5f86b6c53aeac09 Author: Tom Tromey Date: Wed Apr 17 09:12:51 2013 -0600 use iterator protocol and avoid refcount bugs The checker pointed out some refcounting bugs in cmdpy_completer. And, while looking at it, I noticed that it was not using the iterator protocol. I couldn't think of a reason why not; and using an iterator cleaned up the code, so this patch does that. * python/py-cmd.c (cmdpy_completer): Use iterator protocol. Correctly decref. commit 551c7ca879d4cf14daac72b6dd35b6856a3d6da9 Author: Tom Tromey Date: Wed Apr 17 08:56:13 2013 -0600 add decref to cmdpy_init The checker pointed out some missing decrefs in cmdpy_init. This patch adds them. * python/py-cmd.c (cmdpy_init): Decref 'ds_obj'. commit 642dbba398dc16c7bcaaad738b28b8d6272d3cb6 Author: Tom Tromey Date: Wed Apr 17 08:52:35 2013 -0600 introduce and use CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION The checker provides an attribute that indicates that a function sets the Python exception if it returns a negative value. This patch introduces a new macro for this attribute and changes gdb to use it where appropriate. * python/py-event.h (gdbpy_initialize_event_generic): Use CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION. * python/py-evts.c (add_new_registry): Use CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION. * python/python-internal.h (CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION): New macro. commit e2e1365db863dc75931da51edd60c4bbb0b402be Author: Tom Tromey Date: Mon Mar 4 08:45:17 2013 -0700 use CPYCHECKER_SETS_EXCEPTION The checker defines an attribute that can be used to indicate that a function sets the Python exception. This patch introduces a new macro for this attribute and changes gdb to use it. I also changed gdbpy_convert_exception to return 'void'. This is friendlier to the checker, which didn't recognize our current convention; but also turns out to clean up the code a little. * python/py-arch.c (archpy_disassemble): Update. * python/py-type.c (typy_get_composite, typy_lookup_typename) (typy_lookup_type): Use GDB_PY_HANDLE_EXCEPTION. * python/py-utils.c (gdbpy_convert_exception): Return 'void'. * python/python-internal.h (CPYCHECKER_SETS_EXCEPTION): New macro. (GDB_PY_HANDLE_EXCEPTION): Update. (gdbpy_convert_exception): Update. Use CPYCHECKER_SETS_EXCEPTION. commit 7edc500296b8a371e9fbe88d450b8862d0bbab43 Author: Tom Tromey Date: Mon Mar 4 07:45:33 2013 -0700 remove unused declaration I happened to notice that we declare but do not define events_object_type. This removes it. * python/python-internal.h (events_object_type): Remove. commit 3ff56574e73cbef97e2f132acceb27438985d1fe Author: Tom Tromey Date: Wed Jan 4 15:00:57 2012 -0700 fix py-evtregistry.c refcount bug The checker found a refcounting bug in py-evtregistry.c. This fixes it. * py-evtregistry.c (create_event_object): Decref eventregistry_object if PyList_New fails. commit 36ab1eef0093c6743b1a8231fcbbacca22c2cdc9 Author: Tom Tromey Date: Wed Jan 4 14:59:59 2012 -0700 py-cmd.c error-checking bug fix The checker found an error-checking bug in py-cmd.c. This fixes it. * py-cmd.c (gdbpy_string_to_argv): Check result of PyList_New. commit 522db6fae0ee6edb4b17db5bdcd7894e2d8f2d3d Author: Tom Tromey Date: Thu Apr 18 14:50:46 2013 -0600 add missing decref in before_prompt_hook The checker noticed a missing decref in before_prompt_hook. * python/python.c (before_prompt_hook): Add cleanup to decref 'hook'. commit 70f2277ebeca38e968aa75dcb773f2e5494da7fa Author: Tom Tromey Date: Wed Jan 4 14:41:44 2012 -0700 PyObject_GetAttrString returns a new ref This fixes a bug in py-function.c pointed out by the checker. PyObject_GetAttrString returns a new ref, so we must decref it. commit de8cc14de16df8f581d776a3a559ddda4d08fa7c Author: Tom Tromey Date: Thu Oct 27 09:02:25 2011 -0600 add borrowed-ref attribute from the python checker This adds the borrowed-ref attribute from the CPython checker, and then updates the code to use it in various places. This attribute tells the checker that a function returns a borrowed reference. * python/py-threadevent.c (get_event_thread): Use CPYCHECKER_RETURNS_BORROWED_REF. * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF): New define. (pspace_to_pspace_object, objfile_to_objfile_object) (find_thread_object): Use it. commit c5ef5e5140a57db32491275d2acc6f374a3d731f Author: Tom Tromey Date: Fri Feb 22 12:03:50 2013 -0700 add README.archer ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 25 ++ bfd/coffcode.h | 6 +- bfd/compress.c | 7 +- bfd/elf-ifunc.c | 2 +- bfd/elf32-hppa.c | 6 +- bfd/elf32-m32r.c | 6 +- bfd/elf32-tic6x.c | 5 +- bfd/elfnn-ia64.c | 13 +- bfd/elfxx-mips.c | 24 ++- bfd/mach-o.c | 6 +- bfd/mmo.c | 18 +- bfd/opncls.c | 7 +- bfd/peicode.h | 6 +- bfd/version.h | 2 +- bfd/vms-alpha.c | 6 +- gdb/ChangeLog | 25 ++ gdb/aarch64-tdep.c | 10 - gdb/dwarf2read.c | 294 +++++++++++++++++-------- gdb/mi/mi-main.c | 6 +- gdb/python/py-arch.c | 5 +- gdb/python/py-block.c | 10 +- gdb/python/py-breakpoint.c | 5 +- gdb/python/py-cmd.c | 9 +- gdb/python/py-event.c | 10 +- gdb/python/py-evtregistry.c | 5 +- gdb/python/py-evts.c | 26 +-- gdb/python/py-finishbreakpoint.c | 5 +- gdb/python/py-frame.c | 51 ++--- gdb/python/py-function.c | 7 +- gdb/python/py-gdb-readline.c | 9 +- gdb/python/py-inferior.c | 24 ++- gdb/python/py-infthread.c | 5 +- gdb/python/py-objfile.c | 5 +- gdb/python/py-param.c | 17 +- gdb/python/py-prettyprint.c | 1 + gdb/python/py-progspace.c | 5 +- gdb/python/py-symbol.c | 5 +- gdb/python/py-symtab.c | 10 +- gdb/python/py-threadevent.c | 5 +- gdb/python/py-type.c | 20 +- gdb/python/py-utils.c | 15 ++ gdb/python/py-value.c | 16 +- gdb/python/python-internal.h | 34 ++- gdb/python/python.c | 39 ++-- gdb/testsuite/ChangeLog | 10 + gdb/testsuite/gdb.dwarf2/missing-sig-type.exp | 68 ++++++ gdb/testsuite/gdb.mi/mi-var-create-rtti.exp | 6 +- gdb/testsuite/lib/dwarf.exp | 73 ++++++ gdb/version.in | 2 +- opcodes/ChangeLog | 7 + opcodes/cgen-dis.c | 7 +- 51 files changed, 650 insertions(+), 340 deletions(-) create mode 100644 gdb/testsuite/gdb.dwarf2/missing-sig-type.exp First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 883c4a2..22cf440 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,28 @@ +2013-04-19 Nick Clifton + + PR binutils/15356 + * compress.c (decompress_contents): Always call inflateEnd, even + when another inflation operation fails. + +2013-04-17 H.J. Lu + + * elf-ifunc.c: Update copyright year. + +2013-04-17 Luca Pizzamiglio + + * coffcode.h: Added a cast to void when a bfd_set_section_*() + macro's return value is ignored. + * elf32-hppa.c: Likewise. + * elf32-tic6x.c: Likewise. + * mach-o.c: Likewise. + * mmo.c: Likewise. + * opncls.c: Likewise. + * peicode.h: Likewise. + * elf32-m32r.c: Check return value of bfd_set_section_*(). + * elfnn-ia64.c: Likewise. + * elfxx-mips.c: Likewise. + * vms-alpha.c: Likewise. + 2013-04-15 H.J. Lu PR ld/15371 diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 49c13c3..9d9c992 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -1,7 +1,5 @@ /* Support for the generic parts of most COFF variants, for BFD. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright 1990-2013 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -3447,7 +3445,7 @@ coff_compute_section_file_positions (bfd * abfd) incremented in coff_set_section_contents. This is right for SVR3.2. */ if (strcmp (current->name, _LIB) == 0) - bfd_set_section_vma (abfd, current, 0); + (void) bfd_set_section_vma (abfd, current, 0); #endif #ifdef ALIGN_SECTIONS_IN_FILE diff --git a/bfd/compress.c b/bfd/compress.c index eb3bc53..46c2bcb 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -45,19 +45,20 @@ decompress_contents (bfd_byte *compressed_buffer, strm.next_in = (Bytef*) compressed_buffer + 12; strm.avail_out = uncompressed_size; + BFD_ASSERT (Z_OK == 0); rc = inflateInit (&strm); while (strm.avail_in > 0 && strm.avail_out > 0) { if (rc != Z_OK) - return FALSE; + break; strm.next_out = ((Bytef*) uncompressed_buffer + (uncompressed_size - strm.avail_out)); rc = inflate (&strm, Z_FINISH); if (rc != Z_STREAM_END) - return FALSE; + break; rc = inflateReset (&strm); } - rc = inflateEnd (&strm); + rc |= inflateEnd (&strm); return rc == Z_OK && strm.avail_out == 0; } #endif diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c index 7e7ec36..c2fa163 100644 --- a/bfd/elf-ifunc.c +++ b/bfd/elf-ifunc.c @@ -1,5 +1,5 @@ /* ELF STT_GNU_IFUNC support. - Copyright 2009 + Copyright 2009-2013 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 4ffa3d2..dfffbcb 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1,7 +1,5 @@ /* BFD back-end for HP PA-RISC ELF files. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. + Copyright 1990-2013 Free Software Foundation, Inc. Original code by Center for Software Science @@ -2370,7 +2368,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, bfd_size_type mask; if (gotalign > pltalign) - bfd_set_section_alignment (dynobj, sec, gotalign); + (void) bfd_set_section_alignment (dynobj, sec, gotalign); mask = ((bfd_size_type) 1 << gotalign) - 1; sec->size = (sec->size + sizeof (plt_stub) + mask) & ~mask; } diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 789a456..71e8fc7 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -1,6 +1,5 @@ /* M32R-specific support for 32-bit ELF. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + Copyright 1996-2013 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1390,7 +1389,8 @@ m32r_elf_add_symbol_hook (bfd *abfd, flags); if (s == NULL) return FALSE; - bfd_set_section_alignment (abfd, s, 2); + if (! bfd_set_section_alignment (abfd, s, 2)) + return FALSE; } bh = bfd_link_hash_lookup (info->hash, "_SDA_BASE_", diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c index 04ef708..77c6ad1 100644 --- a/bfd/elf32-tic6x.c +++ b/bfd/elf32-tic6x.c @@ -1,6 +1,5 @@ /* 32-bit ELF support for TI C6X - Copyright 2010, 2011, 2012 - Free Software Foundation, Inc. + Copyright 2010-2013 Free Software Foundation, Inc. Contributed by Joseph Myers Bernd Schmidt @@ -3038,7 +3037,7 @@ elf32_tic6x_add_symbol_hook (bfd *abfd, *secp = bfd_make_section_old_way (abfd, ".scommon"); (*secp)->flags |= SEC_IS_COMMON; *valp = sym->st_size; - bfd_set_section_alignment (abfd, *secp, bfd_log2 (sym->st_value)); + (void) bfd_set_section_alignment (abfd, *secp, bfd_log2 (sym->st_value)); break; } diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c index 05c2f1b..117b4c8 100644 --- a/bfd/elfnn-ia64.c +++ b/bfd/elfnn-ia64.c @@ -1,6 +1,5 @@ /* IA-64 support for 64-bit ELF - Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + Copyright 1998-2013 Free Software Foundation, Inc. Contributed by David Mosberger-Tang This file is part of BFD, the Binary File Descriptor library. @@ -1546,7 +1545,8 @@ elfNN_ia64_create_dynamic_sections (bfd *abfd, bfd_set_section_flags (abfd, ia64_info->root.sgot, SEC_SMALL_DATA | flags); /* The .got section is always aligned at 8 bytes. */ - bfd_set_section_alignment (abfd, ia64_info->root.sgot, 3); + if (! bfd_set_section_alignment (abfd, ia64_info->root.sgot, 3)) + return FALSE; } if (!get_pltoff (abfd, info, ia64_info)) @@ -1952,16 +1952,17 @@ get_got (bfd *abfd, struct bfd_link_info *info, if (!dynobj) ia64_info->root.dynobj = dynobj = abfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return 0; + return NULL; got = ia64_info->root.sgot; /* The .got section is always aligned at 8 bytes. */ if (!bfd_set_section_alignment (abfd, got, 3)) - return 0; + return NULL; flags = bfd_get_section_flags (abfd, got); - bfd_set_section_flags (abfd, got, SEC_SMALL_DATA | flags); + if (! bfd_set_section_flags (abfd, got, SEC_SMALL_DATA | flags)) + return NULL; } return got; diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 317e7b2..fa80771 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -1,7 +1,5 @@ /* MIPS-specific support for ELF - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 - Free Software Foundation, Inc. + Copyright 1993-2013 Free Software Foundation, Inc. Most of the information added by Ian Lance Taylor, Cygnus Support, . @@ -7265,20 +7263,24 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) /* Change alignments of some sections. */ s = bfd_get_linker_section (abfd, ".hash"); if (s != NULL) - bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + (void) bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + s = bfd_get_linker_section (abfd, ".dynsym"); if (s != NULL) - bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + (void) bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + s = bfd_get_linker_section (abfd, ".dynstr"); if (s != NULL) - bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + (void) bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + /* ??? */ s = bfd_get_section_by_name (abfd, ".reginfo"); if (s != NULL) - bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + (void) bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + s = bfd_get_linker_section (abfd, ".dynamic"); if (s != NULL) - bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); + (void) bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)); } if (!info->shared) @@ -13533,7 +13535,8 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) /* Structure for saying that BFD machine EXTENSION extends BASE. */ -struct mips_mach_extension { +struct mips_mach_extension +{ unsigned long extension, base; }; @@ -13541,7 +13544,8 @@ struct mips_mach_extension { /* An array describing how BFD machines relate to one another. The entries are ordered topologically with MIPS I extensions listed last. */ -static const struct mips_mach_extension mips_mach_extensions[] = { +static const struct mips_mach_extension mips_mach_extensions[] = +{ /* MIPS64r2 extensions. */ { bfd_mach_mips_octeon2, bfd_mach_mips_octeonp }, { bfd_mach_mips_octeonp, bfd_mach_mips_octeon }, diff --git a/bfd/mach-o.c b/bfd/mach-o.c index c92b530..e1bbd29 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -1,7 +1,5 @@ /* Mach-O support for BFD. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. + Copyright 1999-2013 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -2693,7 +2691,7 @@ bfd_mach_o_new_section_hook (bfd *abfd, asection *sec) s->flags = xlat->macho_sectype | xlat->macho_secattr; s->align = xlat->sectalign > bfdalign ? xlat->sectalign : bfdalign; - bfd_set_section_alignment (abfd, sec, s->align); + (void) bfd_set_section_alignment (abfd, sec, s->align); bfd_flags = bfd_get_section_flags (abfd, sec); if (bfd_flags == SEC_NO_FLAGS) bfd_set_section_flags (abfd, sec, xlat->bfd_flags); diff --git a/bfd/mmo.c b/bfd/mmo.c index e336723..cd7b0fc 100644 --- a/bfd/mmo.c +++ b/bfd/mmo.c @@ -1,6 +1,5 @@ /* BFD back-end for mmo objects (MMIX-specific object-format). - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright 2001-2013 Free Software Foundation, Inc. Written by Hans-Peter Nilsson (hp@bitrange.com). Infrastructure and other bits originally copied from srec.c and binary.c. @@ -662,8 +661,9 @@ mmo_decide_section (bfd *abfd, bfd_vma vma) if (sec == NULL) return NULL; - if (! sec->user_set_vma) - bfd_set_section_vma (abfd, sec, vma); + if (! sec->user_set_vma && ! bfd_set_section_vma (abfd, sec, vma)) + return NULL; + if (! bfd_set_section_flags (abfd, sec, bfd_get_section_flags (abfd, sec) | SEC_CODE | SEC_LOAD | SEC_ALLOC)) @@ -676,8 +676,9 @@ mmo_decide_section (bfd *abfd, bfd_vma vma) if (sec == NULL) return NULL; - if (! sec->user_set_vma) - bfd_set_section_vma (abfd, sec, vma); + if (! sec->user_set_vma && ! bfd_set_section_vma (abfd, sec, vma)) + return NULL; + if (! bfd_set_section_flags (abfd, sec, bfd_get_section_flags (abfd, sec) | SEC_LOAD | SEC_ALLOC)) @@ -692,8 +693,9 @@ mmo_decide_section (bfd *abfd, bfd_vma vma) /* If there's still no suitable section, make a new one. */ sprintf (sec_name, ".MMIX.sec.%d", abfd->tdata.mmo_data->sec_no++); sec = mmo_make_section (abfd, sec_name); - if (! sec->user_set_vma) - bfd_set_section_vma (abfd, sec, vma); + + if (! sec->user_set_vma && ! bfd_set_section_vma (abfd, sec, vma)) + return NULL; if (! bfd_set_section_flags (abfd, sec, bfd_get_section_flags (abfd, sec) diff --git a/bfd/opncls.c b/bfd/opncls.c index 1217cea..3879a65 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -1,7 +1,5 @@ /* opncls.c -- open and close a BFD. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 - Free Software Foundation, Inc. + Copyright 1990-2013 Free Software Foundation, Inc. Written by Cygnus Support. @@ -255,12 +253,13 @@ bfd_fopen (const char *filename, const char *target, const char *mode, int fd) return NULL; } nbfd->opened_once = TRUE; + /* If we opened the file by name, mark it cacheable; we can close it and reopen it later. However, if a file descriptor was provided, then it may have been opened with special flags that make it unsafe to close and reopen the file. */ if (fd == -1) - bfd_set_cacheable (nbfd, TRUE); + (void) bfd_set_cacheable (nbfd, TRUE); return nbfd; } diff --git a/bfd/peicode.h b/bfd/peicode.h index 66c8198..64ca092 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -1,7 +1,5 @@ /* Support for the generic parts of PE/PEI, for BFD. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. + Copyright 1995-2013 Free Software Foundation, Inc. Written by Cygnus Solutions. This file is part of BFD, the Binary File Descriptor library. @@ -610,7 +608,7 @@ pe_ILF_make_a_section (pe_ILF_vars * vars, bfd_set_section_flags (vars->abfd, sec, flags | extra_flags); - bfd_set_section_alignment (vars->abfd, sec, 2); + (void) bfd_set_section_alignment (vars->abfd, sec, 2); /* Check that we will not run out of space. */ BFD_ASSERT (vars->data + size < vars->bim->buffer + vars->bim->size); diff --git a/bfd/version.h b/bfd/version.h index f9669f0..e5462d7 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20130417 +#define BFD_VERSION_DATE 20130419 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 3383b0f..4edc226 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -1,6 +1,5 @@ /* vms.c -- BFD back-end for EVAX (openVMS/Alpha) files. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright 1996-2013 Free Software Foundation, Inc. Initial version written by Klaus Kaempf (kkaempf@rmi.de) Major rewrite by Adacore. @@ -9118,7 +9117,8 @@ vms_new_section_hook (bfd * abfd, asection *section) vms_debug2 ((1, "vms_new_section_hook (%p, [%d]%s)\n", abfd, section->index, section->name)); - bfd_set_section_alignment (abfd, section, 0); + if (! bfd_set_section_alignment (abfd, section, 0)) + return FALSE; vms_debug2 ((7, "%d: %s\n", section->index, section->name)); diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 89d05f6..85c3245 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,28 @@ +2013-04-17 Doug Evans + + * dwarf2read.c (struct signatured_type): New member type. + (struct attribute): Replace member signatured_type with signature. + (DW_SIGNATURE): Replaces DW_SIGNATURE_TYPE. + (read_call_site_scope): Call follow_die_ref instead of + follow_die_ref_or_sig. + (read_structure_type): Rewrite handling of signatured types. + (read_enumeration_type): Ditto. + (read_attribute_value): Update. + (build_error_marker_type): New function. + (lookup_die_type): Add assert. Rewrite handling of signatured types. + Don't call error for bad types, just build an error marker type. + (dump_die_shallow): Update. + (follow_die_sig_1): Renamed from follow_die_sig. + Don't call error for bad types, instead return NULL. + (follow_die_sig): New function. + (get_signatured_type, get_DW_AT_signature_type): New functions. + +2013-04-17 Yufeng Zhang + + * aarch64-tdep.c (aarch64_write_pc): Removed. + (aarch64_gdbarch_init): Remove set_gdbarch_write_pc of the above + function. + 2013-04-17 Yao Qi * top.c (print_gdb_configuration): Print configure-time diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index ebc78d6..2b03106 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -2499,14 +2499,6 @@ aarch64_pseudo_write (struct gdbarch *gdbarch, struct regcache *regcache, gdb_assert_not_reached ("regnum out of bound"); } -/* Implement the "write_pc" gdbarch method. */ - -static void -aarch64_write_pc (struct regcache *regcache, CORE_ADDR pc) -{ - regcache_cooked_write_unsigned (regcache, AARCH64_PC_REGNUM, pc); -} - /* Callback function for user_reg_add. */ static struct value * @@ -2618,8 +2610,6 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_push_dummy_call (gdbarch, aarch64_push_dummy_call); set_gdbarch_frame_align (gdbarch, aarch64_frame_align); - set_gdbarch_write_pc (gdbarch, aarch64_write_pc); - /* Frame handling. */ set_gdbarch_dummy_id (gdbarch, aarch64_dummy_id); set_gdbarch_unwind_pc (gdbarch, aarch64_unwind_pc); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0542bea..2ea80d7 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -601,6 +601,7 @@ struct dwarf2_per_cu_data struct signatured_type { /* The "per_cu" object of this type. + This struct is used iff per_cu.is_debug_types. N.B.: This is the first member so that it's easy to convert pointers between them. */ struct dwarf2_per_cu_data per_cu; @@ -623,6 +624,11 @@ struct signatured_type /* Type units are grouped by their DW_AT_stmt_list entry so that they can share them. This points to the containing symtab. */ struct type_unit_group *type_unit_group; + + /* The type. + The first time we encounter this type we fully read it in and install it + in the symbol tables. Subsequent times we only need the type. */ + struct type *type; }; hooks/post-receive -- Repository for Project Archer.