Tom Tromey
7d38e38f3f
* python/py-prettyprint.c (search_pp_list): Decref 'attr'.
2013-05-20 20:39:31 +00:00
Tom Tromey
97b77b3951
* python/py-value.c (valpy_get_dynamic_type): Simplify
...
dynamic_type assignment. Use Py_XINCREF.
2013-05-20 20:38:47 +00:00
Tom Tromey
53e6647928
* python/py-type.c (typy_fields): Unconditionally decref 'r'.
2013-05-20 20:37:48 +00:00
Tom Tromey
dcf8783234
* python/py-frame.c (frapy_older, frapy_newer, gdbpy_newest_frame)
...
(gdbpy_selected_frame): Move object-construction code
out of TRY_CATCH.
2013-05-20 20:37:06 +00:00
Tom Tromey
aa36459a92
* 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.
2013-05-20 20:36:19 +00:00
Tom Tromey
3d4a3c3ea2
* 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.
2013-05-20 20:34:49 +00:00
Tom Tromey
72ff8829c1
* python/py-evts.c (gdbpy_initialize_py_events): Don't
...
incref the module.
2013-05-20 20:34:11 +00:00
Tom Tromey
02146ba51f
* python/python.c (gdbpy_run_events): Decref the result
...
of PyObject_CallObject.
2013-05-20 20:32:56 +00:00
Tom Tromey
33ee792fe5
* python/py-symtab.c (set_sal): Use
...
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION. Return -1 on error.
(symtab_and_line_to_sal_object): Update.
2013-05-20 20:31:18 +00:00
Tom Tromey
fcb49fc817
* python/py-param.c (compute_enum_values): Decref 'item'.
2013-05-20 20:30:24 +00:00
Tom Tromey
0646da15da
* 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.
2013-05-20 20:29:44 +00:00
Tom Tromey
999633ede7
* 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.
2013-05-20 20:28:52 +00:00
Tom Tromey
1886886089
* python/py-finishbreakpoint.c (bpfinishpy_out_of_scope):
...
Decref the reslut of PyObject_CallMethod.
2013-05-20 20:27:44 +00:00
Tom Tromey
9f4ff0c296
* python/py-event.c (gdbpy_initialize_event_generic): Return
...
early if PyType_Ready fails.
2013-05-20 20:26:39 +00:00
Tom Tromey
0d3a2e8a79
* python/py-type.c (make_fielditem): Add gdb_assert_not_reached
...
as 'default' in the switch.
2013-05-20 20:25:40 +00:00
Tom Tromey
b86af38a5a
* 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.
2013-05-20 20:24:49 +00:00
Doug Evans
e19d3afbf8
* gdb.base/maint.exp: Fix test for "mt expand-symtabs" to account for
...
-fdebug-types-section.
2013-05-20 20:23:20 +00:00
Tom Tromey
c127ec5867
* python/py-event.c (evpy_emit_event): Decref the
...
result of PyObject_CallFunctionObjArgs.
2013-05-20 20:23:19 +00:00
Tom Tromey
ba327838ba
* python/py-cmd.c (cmdpy_completer): Use iterator protocol.
...
Correctly decref.
2013-05-20 20:21:55 +00:00
Tom Tromey
d819143244
* python/py-cmd.c (cmdpy_init): Decref 'ds_obj'.
2013-05-20 20:20:48 +00:00
Tom Tromey
5d153bd188
* 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.
2013-05-20 20:19:54 +00:00
Tom Tromey
56cc411c4b
* 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.
2013-05-20 20:19:03 +00:00
Tom Tromey
8919e1746d
* python/python-internal.h (events_object_type): Remove.
2013-05-20 20:18:22 +00:00
Tom Tromey
9b08f22510
* python/py-event.h (evpy_emit_event): Use
...
CPYCHECKER_STEALS_REFERENCE_TO_ARG.
* python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
New macro.
2013-05-20 20:16:57 +00:00
Tom Tromey
f04010ffab
* py-evtregistry.c (create_event_object): Decref
...
eventregistry_object if PyList_New fails.
2013-05-20 20:16:24 +00:00
Tom Tromey
3919fd966c
* py-cmd.c (gdbpy_string_to_argv): Check result of
...
PyList_New.
2013-05-20 20:14:51 +00:00
Tom Tromey
0430e8cba9
* python/python.c (before_prompt_hook): Add cleanup to
...
decref 'hook'.
2013-05-20 20:13:28 +00:00
Tom Tromey
764123e402
* python/py-function.c (fnpy_init): Decref result of
...
PyObject_GetAttrString.
2013-05-20 20:12:04 +00:00
Tom Tromey
634c58be55
* 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.
2013-05-20 20:10:03 +00:00
Tom Tromey
62eec1a534
* python/py-arch.c (arch_object_type): Use
...
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-block.c (block_syms_iterator_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-bpevent.c (breakpoint_event_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-cmd.c (cmdpy_object_type): Use
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-continueevent.c (continue_event_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-event.h (GDBPY_NEW_EVENT_TYPE):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-events.h (thread_event_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-evtregistry.c (eventregistry_object_type): Use
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-exitedevent.c (exited_event_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-finishbreakpoint.c (finish_breakpoint_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-function.c (fnpy_object_type): Use
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-inferior.c (inferior_object_type, membuf_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-infthread.c (thread_object_type): Use
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-lazy-string.c (lazy_string_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-newobjfileevent.c (new_objfile_event_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-objfile.c (objfile_object_type): Use
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-param.c (parmpy_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-progspace.c (pspace_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-signalevent.c (signal_event_object_type):
Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-symtab.c (symtab_object_type, sal_object_type): Use
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-type.c (type_object_type, field_object_type)
(type_iterator_object_type): Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
* python/py-internal.h (CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF): New
define.
(value_object_type, block_object_type, symbol_object_type)
(event_object_type, stop_event_object_type, breakpoint_object_type)
(frame_object_type): Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
2013-05-20 20:09:01 +00:00
Andreas Tobler
81ea8796fe
2013-05-20 Andreas Tobler <andreas@fgznet.ch>
...
* Makefile.in (ALL_TARGET_OBS): Add ppcfbsd-tdep.o.
(ALLDEPFILES): Add ppcfbsd-nat.c and ppcfbsd-tdep.c.
2013-05-20 18:00:36 +00:00
Doug Evans
a2ce51a0ef
When reading CU, stay in DWO. Be more tolerent of bad debug info.
...
For Fission.
* dwarf2read.c (struct dwarf2_per_cu_data): New member
reading_dwo_directly.
(struct signatured_type): New member dwo_unit.
(struct die_reader_specs): New member comp_dir.
(create_signatured_type_table_from_index): Use malloc for
all_type_units instead of objfile's obstack.
(create_all_type_units): Ditto.
(fill_in_sig_entry_from_dwo_entry): New function.
(add_type_unit): New function.
(lookup_dwo_signatured_type): New function.
(lookup_dwp_signatured_type): New function.
(lookup_signatured_type): New arg cu. All callers updated.
(init_cu_die_reader): Initialize comp_dir.
(read_cutu_die_from_dwo): New arg stub_comp_dir. All callers updated.
Change assert of matching type signatures to call error on mismatch.
(lookup_dwo_unit): Add assert.
(init_tu_and_read_dwo_dies): New function.
(init_cutu_and_read_dies): Call it.
(build_type_unit_groups): Handle case of no type unit groups created.
(hash_dwo_file, eq_dwo_file): Handle missing comp_dir.
(lookup_dwo_cutu): Tweak complaint.
(dwarf2_free_abbrev_table): Check for NULL abbrev_table.
(dwarf2_per_objfile_free): Free all_type_units.
2013-05-20 17:24:21 +00:00
Will Newton
593f8f2938
bfd/elf64-aarch64.c: Remove dead code.
...
The relocs_copied member is never assigned a non-NULL value, so
this code does not appear to be used.
bfd/ChangeLog:
2013-05-20 Will Newton <will.newton@linaro.org>
* elf64-aarch64.c (elf64_aarch64_link_hash_entry): Remove
relocs_copied member.
(elf64_aarch64_link_hash_newfunc): Remove initialization of
relocs_copied member.
(elf64_aarch64_copy_indirect_symbol): Remove code to copy
relocs_copied member.
2013-05-20 13:26:40 +00:00
Joel Brobecker
a25cd31f61
Add missing empty line after var declarations in handle_unload_dll
...
gdb/ChangeLog:
* windows-nat.c (handle_unload_dll): Add missing empty line.
2013-05-20 10:27:26 +00:00
Alan Modra
5656a9815d
* config/tc-ppc.c (md_apply_fix): Hoist code common to insn
...
and data fixups performing shift/high adjust/sign extension on
fieldval. Sink fx_pcrel handling and checks. Use fixP->fx_size
when writing data fixups rather than recalculating size.
2013-05-20 10:16:31 +00:00
Joel Brobecker
4d804846db
[dwarf] Mark all functions as prototyped except C functions.
...
This makes sure that the types of the arguments are taken into account
when performing an inferior function call to a non-C (or C-like)
function. In particular, this makes sure that the arguments are
appropriatly converted to the correct type.
For instance, on x86_64-linux, with the following Ada code:
procedure Set_Float (F : Float) is
begin
Global_Float := F;
end Set_Float;
The following sequence shows that Float arguments are incorrectly
passed (Ada's Float type is the equivalent of type "float" in C):
(gdb) call set_float (2.0)
(gdb) print global_float
$1 = 0.0
Putting a breakpoint inside set_float to inspect the value of
register xmm0 gives the first hint of the problem:
(gdb) p $xmm0
$2 = (v4_float => (0 => 0.0, 2.0, 0.0, 0.0),
v2_double => (0 => 2.0, 0.0),
[...]
It shows that the argument was passed as a double.
The code responsible for doing appropriate type conversions
for the arguments (value_arg_coerce) found that our function
was not prototyped, and thus could not use typing information
for the arguments. Instead, it defaulted to the value of "set
coerce-float-to-double", which by default is true, to determine
the argument type.
This patch fixes the problem by setting the PROTOTYPE flag
for all functions of any language except C and Objective C.
gdb/ChangeLog:
* dwarf2read.c (prototyped_function_p): New function.
(read_subroutine_type): Use it.
gdb/testsuite/ChangeLog:
* gdb.ada/float_param: New testcase.
2013-05-20 09:45:13 +00:00
Joel Brobecker
1c432e72b0
De-indent example code in rs6000-aix-tdep.c (ARI fix)
...
This patch de-indents the code provided as a comment explaining
how the code declaring the ld_info32_desc and ld_info64_desc globals
was generated. The intent is to avoid an ARI warning about a macro
not starting at column zero of the line.
gdb/ChangeLog:
* rs6000-aix-tdep.c: De-indent some example code provided
as a comment.
2013-05-20 09:14:24 +00:00
Alan Modra
94b7bb3559
daily update
2013-05-20 00:00:04 +00:00
gdbadmin
fdc2322aef
*** empty log message ***
2013-05-20 00:00:02 +00:00
Maciej W. Rozycki
a0f0eb1e92
* elf32-vax.c (elf_vax_adjust_dynamic_symbol): Convert K&R
...
function definition.
2013-05-19 21:40:00 +00:00
gdbadmin
2f2fb5e626
*** empty log message ***
2013-05-19 00:00:33 +00:00
Alan Modra
f3018c5d82
daily update
2013-05-19 00:00:07 +00:00
Alan Modra
d4dd980d61
daily update
2013-05-18 00:00:06 +00:00
gdbadmin
3e68617657
*** empty log message ***
2013-05-18 00:00:02 +00:00
Edjunior Barbosa Machado
4feebbddff
2013-05-17 Edjunior Machado <emachado@linux.vnet.ibm.com>
...
* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Check if the
region is ok for a hardware watchpoint using the new ptrace interface
on Power servers.
2013-05-17 23:05:00 +00:00
Doug Evans
7d0c9981dc
* NEWS: Mention new maintenance commands check-symtabs, and
...
expand-symtabs, and renamed check-psymtabs.
* psymtab.c (maintenance_check_psymtabs): Renamed from
maintenance_check_symtabs. Only process already-expanded symbol
tables.
(_initialize_psymtab): Update.
* symmisc.c (maintenance_check_symtabs): New function.
(maintenance_expand_name_matcher): New function
(maintenance_expand_file_matcher): New function
(maintenance_expand_symtabs): New function.
(_initialize_symmisc): Add "mt check-symtabs" and "mt expand-symtabs"
commands.
doc/
* gdb.texinfo (Maintenance Commands): Update doc for
"maint check-psymtabs". Add doc for "maint check-symtabs",
"maint expand-symtabs".
testsuite/
* gdb.base/maint.exp: Update test for "maint check-psymtabs".
Add tests for "maint check-symtabs", "maint expand-symtabs".
2013-05-17 18:09:06 +00:00
Doug Evans
8d324e8329
* gdb.base/maint.exp: Remove testing of individual maint command
...
help output.
2013-05-17 18:05:19 +00:00
Tom Tromey
6cbc7c3d34
* python/py-inferior.c (infpy_read_memory): Don't call
...
PyErr_SetString if PyObject_New fails.
* python/py-frame.c (frame_info_to_frame_object): Don't call
PyErr_SetString if PyObject_New fails.
2013-05-17 16:52:34 +00:00
H.J. Lu
a48b32c068
Replace hardcoded -ldl with check for availability
...
2013-05-17 Pavel Chupin <pavel.v.chupin@intel.com>
* acinclude.m4: Add check for dlopen in libdl.
* configure.ac: Ditto.
* configure: Regenerate.
2013-05-17 16:24:21 +00:00
Alan Modra
4934fdafea
* ia64-raw.tbl: Replace non-ASCII char.
...
* ia64-waw.tbl: Likewise.
* ia64-asmtab.c: Regenerate.
2013-05-17 12:57:16 +00:00