1 2018-02-26 Maciej W. Rozycki <macro@mips.com>
3 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
4 architecture with a 64-bit ABI.
6 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9 ahead of target description loading.
11 2018-02-26 Tom Tromey <tom@tromey.com>
13 * stack.c (backtrace_command_1): Update.
14 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
16 * python/py-framefilter.c (py_print_frame)
17 (gdbpy_apply_frame_filter): Change type of "flags".
18 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
20 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
21 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
22 * extension.h (enum frame_filter_flag): Rename from
24 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
25 (apply_ext_lang_frame_filter): Change type of "flags".
26 * extension.c (apply_ext_lang_frame_filter): Change type of
28 * extension-priv.h (struct extension_language_ops)
29 <apply_frame_filter>: Change type of "flags".
31 2018-02-26 Tom Tromey <tom@tromey.com>
34 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
35 off-by-one in py_end computation.
36 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
38 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
41 2018-02-26 Tom Tromey <tom@tromey.com>
43 * dwarf2read.c (struct variant_field): New.
44 (struct nextfield) <variant>: New field.
45 (dwarf2_add_field): Handle DW_TAG_variant_part.
46 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
48 (read_structure_type): Handle DW_TAG_variant_part.
49 (handle_struct_member_die): New function, extracted from
50 process_structure_scope. Handle DW_TAG_variant.
51 (process_structure_scope): Handle discriminated unions. Call
52 handle_struct_member_die.
54 2018-02-26 Tom Tromey <tom@tromey.com>
56 * rust-lang.h (rust_last_path_segment): Declare.
57 * rust-lang.c (rust_last_path_segment): Now public. Change
59 (struct disr_info): Remove.
60 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
61 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
62 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
63 (rust_enum_p, rust_enum_variant): New function.
64 (rust_underscore_fields): Remove "offset" parameter.
65 (rust_print_enum): New function.
66 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
67 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
68 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
70 (rust_internal_print_type): New function, from rust_print_type.
72 (rust_print_type): Call rust_internal_print_type.
73 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
75 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
76 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
77 (rust_union_quirks): New functions.
78 (process_full_comp_unit, process_full_type_unit): Call
80 (process_structure_scope): Update rust_unions if necessary.
82 2018-02-26 Tom Tromey <tom@tromey.com>
84 * value.h (value_union_variant): Declare.
85 * valops.c (value_union_variant): New function.
86 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
87 (struct discriminant_info): New.
88 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
90 (struct main_type) <flag_discriminated_union>: New field.
92 2018-02-26 Tom Tromey <tom@tromey.com>
94 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
95 unittests/unpack-selftests.c.
96 * unittests/unpack-selftests.c: New file.
97 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
99 2018-02-26 Yao Qi <yao.qi@linaro.org>
101 * dwarf2read.c (struct partial_die_info) <read>: New method.
102 (read_partial_die): Remove the declaration.
103 (load_partial_dies): Update.
104 (partial_die_info::partial_die_info):
105 (read_partial_die): Change it to partial_die_info::read.
107 2018-02-26 Yao Qi <yao.qi@linaro.org>
109 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
110 (fixup_partial_die): Remove declaration.
111 (scan_partial_symbols): Update.
112 (partial_die_parent_scope): Likewise.
113 (partial_die_full_name): Likewise.
114 (fixup_partial_die): Change it to partial_die_info::fixup.
116 2018-02-26 Yao Qi <yao.qi@linaro.org>
118 * dwarf2read.c (read_partial_die): Update the declaration.
119 (load_partial_dies): Caller update.
120 (read_partial_die): Remove one argument abbrev_len.
122 2018-02-26 Yao Qi <yao.qi@linaro.org>
124 * dwarf2read.c (struct partial_die_info): Add ctor, delete
126 (load_partial_dies): Use ctor and copy ctor.
127 (read_partial_die): Update.
128 (dwarf2_cu::find_partial_die): Use ctor.
130 2018-02-26 Yao Qi <yao.qi@linaro.org>
132 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
133 (find_partial_die_in_comp_unit): Change it to
134 dwarf2_cu::find_partial_die.
135 (find_partial_die): Update.
137 2018-02-26 Yao Qi <yao.qi@linaro.org>
139 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
142 2018-02-26 Yao Qi <yao.qi@linaro.org>
144 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
146 2018-02-26 Alan Hayward <alan.hayward@arm.com>
148 * arch/amd64.h: Use common/tdesc.h.
149 * arch/i386.c: Likewise.
150 * arch/i386.h: Likewise.
151 * arch/tic6x.c: Likewise.
152 * arch/tdesc.h: Move file from here...
153 * common/tdesc.h: ...to here.
154 * features/aarch64-core.c: Regenerate.
155 * features/aarch64-fpu.c: Regenerate.
156 * features/i386/32bit-avx.c: Regenerate.
157 * features/i386/32bit-avx512.c: Regenerate.
158 * features/i386/32bit-core.c: Regenerate.
159 * features/i386/32bit-linux.c: Regenerate.
160 * features/i386/32bit-mpx.c: Regenerate.
161 * features/i386/32bit-pkeys.c: Regenerate.
162 * features/i386/32bit-sse.c: Regenerate.
163 * features/i386/64bit-avx.c: Regenerate.
164 * features/i386/64bit-avx512.c: Regenerate.
165 * features/i386/64bit-core.c: Regenerate.
166 * features/i386/64bit-linux.c: Regenerate.
167 * features/i386/64bit-mpx.c: Regenerate.
168 * features/i386/64bit-pkeys.c: Regenerate.
169 * features/i386/64bit-segments.c: Regenerate.
170 * features/i386/64bit-sse.c: Regenerate.
171 * features/i386/x32-core.c: Regenerate.
172 * features/tic6x-c6xp.c: Regenerate.
173 * features/tic6x-core.c: Regenerate.
174 * features/tic6x-gp.c: Regenerate.
175 * target-descriptions.c: Use common/tdesc.h.
176 * target-descriptions.h: Likewise.
178 2018-02-24 Tom Tromey <tom@tromey.com>
180 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
181 (try_thread_db_load_from_dir, thread_db_load_search): Use
183 (info_auto_load_libthread_db_compare): Return bool. Change
185 (info_auto_load_libthread_db): Use std::vector, std::string.
188 2018-02-24 Tom Tromey <tom@tromey.com>
190 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
192 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
194 * gdbarch.c: Rebuild.
195 * gdbarch.h: Rebuild.
196 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
197 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
198 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
201 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
203 * gdbtypes.h (sect_offset): Change type to uint64_t.
204 (sect_offset_str): New function.
205 * dwarf2read.c (create_addrmap_from_aranges): Use
207 (error_check_comp_unit_head): Likewise.
208 (create_debug_type_hash_table): Likewise.
209 (read_cutu_die_from_dwo): Likewise.
210 (init_cutu_and_read_dies): Likewise.
211 (init_cutu_and_read_dies_no_follow): Likewise.
212 (process_psymtab_comp_unit_reader): Likewise.
213 (partial_die_parent_scope): Likewise.
214 (peek_die_abbrev): Likewise.
215 (process_queue): Likewise.
216 (dwarf2_physname): Likewise.
217 (read_namespace_alias): Likewise.
218 (read_import_statement): Likewise.
219 (create_dwo_cu_reader): Likewise.
220 (create_cus_hash_table): Likewise.
221 (lookup_dwo_cutu): Likewise.
222 (inherit_abstract_dies): Likewise.
223 (read_func_scope): Likewise.
224 (read_call_site_scope): Likewise.
225 (dwarf2_add_member_fn): Likewise.
226 (read_common_block): Likewise.
227 (read_module_type): Likewise.
228 (read_typedef): Likewise.
229 (read_subrange_type): Likewise.
230 (load_partial_dies): Likewise.
231 (read_partial_die): Likewise.
232 (find_partial_die): Likewise.
233 (read_str_index): Likewise.
234 (dwarf2_string_attr): Likewise.
235 (build_error_marker_type): Likewise.
236 (lookup_die_type): Likewise.
237 (dump_die_shallow): Likewise.
238 (follow_die_ref): Likewise.
239 (dwarf2_fetch_die_loc_sect_off): Likewise.
240 (dwarf2_fetch_constant_bytes): Likewise.
241 (follow_die_sig): Likewise.
242 (get_signatured_type): Likewise.
243 (get_DW_AT_signature_type): Likewise.
244 (dwarf2_find_containing_comp_unit): Likewise.
245 (set_die_type): Likewise.
247 2018-02-21 John Baldwin <jhb@FreeBSD.org>
249 * arch/aarch64.c: Include "common-defs.h".
250 * arch/amd64.c: Likewise.
251 * arch/i386.c: Likewise.
253 2018-02-21 Tom Tromey <tom@tromey.com>
255 * value.h: (extract_field_op): Update.
256 * eval.c (extract_field_op): Return a const char *.
257 * expression.h (parse_expression_for_completion): Update.
258 * completer.c (complete_expression): Update.
259 (add_struct_fields): Make fieldname const.
260 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
261 (mark_completion_tag, parse_exp_in_context_1): Update.
262 (parse_expression_for_completion): Change "name" to
265 2018-02-21 Tom Tromey <tom@tromey.com>
267 * infcall.c (call_function_by_hand_dummy): Use std::vector.
269 2018-02-21 Yao Qi <yao.qi@linaro.org>
271 * avr-tdep.c (avr_read_pc): Change parameter type to
273 * gdbarch.sh (read_pc): Likewise.
274 * gdbarch.c: Re-generated.
275 * gdbarch.h: Re-generated.
276 * hppa-tdep.c (hppa_read_pc): Change parameter type to
278 * ia64-tdep.c (ia64_read_pc): Likewise.
279 * mips-tdep.c (mips_read_pc): Likewise.
280 * spu-tdep.c (spu_read_pc): Likewise.
282 2018-02-21 Yao Qi <yao.qi@linaro.org>
284 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
285 * regcache-dump.c: New file.
286 * regcache.c: Move register_dump to regcache-dump.c.
287 (maintenance_print_registers): Likewise.
288 (maintenance_print_raw_registers): Likewise.
289 (maintenance_print_cooked_registers): Likewise.
290 (maintenance_print_register_groups): Likewise.
291 (maintenance_print_remote_registers): Likewise.
292 (_initialize_regcache): Likewise.
293 * regcache.h (register_dump): Moved from regcache.c.
295 2018-02-21 Yao Qi <yao.qi@linaro.org>
297 * regcache.c (regcache::regcache): Update.
298 (regcache::invalidate): Move it to detached_regcache::invalidate.
299 (get_thread_arch_aspace_regcache): Update.
300 (regcache::raw_update): Update.
301 (regcache::cooked_read): Remove some code.
302 (regcache::cooked_read_value): Likewise.
303 (regcache::raw_write): Remove assert on m_readonly_p.
304 (regcache::raw_supply_integer): Move it to
305 detached_regcache::raw_supply_integer.
306 (regcache::raw_supply_zeroed): Likewise.
307 * regcache.h (detached_regcache) <raw_supply_integer>: New
309 <raw_supply_zeroed, invalidate>: Likewise.
310 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
311 <invalidate>: Likewise.
312 <m_readonly_p>: Removed.
314 2018-02-21 Yao Qi <yao.qi@linaro.org>
316 * infcmd.c (get_return_value): Let stop_regs point to
317 get_current_regcache.
318 * regcache.c (regcache::regcache): Remove.
319 (register_dump_reg_buffer): New class.
320 (regcache_print): Adjust.
321 * regcache.h (regcache): Remove constructors.
323 2018-02-21 Yao Qi <yao.qi@linaro.org>
325 * regcache.c (class register_dump): New class.
326 (register_dump_regcache, register_dump_none): New class.
327 (register_dump_remote, register_dump_groups): New class.
328 (regcache_print): Update.
329 * regcache.h (regcache_dump_what): Move it to regcache.c.
330 (regcache) <dump>: Remove.
332 2018-02-21 Yao Qi <yao.qi@linaro.org>
334 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
336 (jit_unwind_reg_set_impl): Call raw_supply.
337 (jit_frame_sniffer): Use reg_buffer_rw.
338 * record-full.c (record_full_core_regbuf): Change its type.
339 (record_full_core_open_1): Use reg_buffer_rw.
340 (record_full_close): Likewise.
341 (record_full_core_fetch_registers): Use regcache->raw_supply.
342 (record_full_core_store_registers): Likewise.
343 * regcache.c (regcache::get_register_status): Move it to
345 (regcache_raw_set_cached_value): Remove.
346 (regcache::raw_set_cached_value): Remove.
347 (regcache::raw_write): Call raw_supply.
348 (regcache::raw_supply): Move it to reg_buffer_rw.
349 * regcache.h (regcache_raw_set_cached_value): Remove.
350 (reg_buffer_rw): New class.
352 2018-02-21 Yao Qi <yao.qi@linaro.org>
354 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
355 readonly_detached_regcache.
356 (dummy_frame_prev_register): Use regcache->cooked_read.
357 * frame.c (frame_save_as_regcache): Change return type.
359 * frame.h (frame_save_as_regcache): Update declaration.
360 * inferior.h (get_infcall_suspend_state_regcache): Update
362 * infrun.c (infcall_suspend_state) <registers>: use
363 readonly_detached_regcache.
364 (save_infcall_suspend_state): Don't use regcache_dup.
365 (get_infcall_suspend_state_regcache): Change return type.
366 * linux-fork.c (struct fork_info) <savedregs>: Change to
367 readonly_detached_regcache.
369 (fork_save_infrun_state): Don't use regcache_dup.
370 (info_checkpoints_command): Adjust.
371 * mi/mi-main.c (register_changed_p): Update declaration.
372 (mi_cmd_data_list_changed_registers): Use
373 readonly_detached_regcache.
374 (register_changed_p): Change parameter type to
375 readonly_detached_regcache.
376 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
377 readonly_detached_regcache.
378 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
379 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
381 (regcache::save): Move it to reg_buffer.
382 (regcache::restore): Change parameter type.
383 (regcache_dup): Remove.
384 * regcache.h (reg_buffer) <save>: New method.
385 (readonly_detached_regcache): New class.
386 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
387 readonly_detached_regcache.
388 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
390 2018-02-21 Yao Qi <yao.qi@linaro.org>
392 * frame.c (frame_save_as_regcache): Use regcache method save.
393 (frame_pop): Use regcache method restore.
394 * infrun.c (restore_infcall_suspend_state): Likewise.
395 * linux-fork.c (fork_load_infrun_state): Likewise.
396 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
398 * regcache.c (regcache_save): Remove.
399 (regcache::restore): More asserts.
400 (regcache_cpy): Remove.
401 * regcache.h (regcache_save): Remove the declaration.
402 (regcache::restore): Move from private to public.
403 Remove the friend declaration of regcache_cpy.
404 (regcache_cpy): Remove declaration.
406 2018-02-21 Yao Qi <yao.qi@linaro.org>
408 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
409 parameter type to 'readable_regcache *'.
410 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
411 * arm-tdep.c (arm_neon_quad_read): Likewise.
412 (arm_pseudo_read): Likewise.
413 * avr-tdep.c (avr_pseudo_register_read): Likewise.
414 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
415 * frv-tdep.c (frv_pseudo_register_read): Likewise.
416 * gdbarch.c: Re-generated.
417 * gdbarch.h: Re-generated.
418 * gdbarch.sh (pseudo_register_read): Change parameter type to
419 'readable_regcache *'.
420 (pseudo_register_read_value): Likewise.
421 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
422 (h8300_pseudo_register_read): Likewise.
423 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
424 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
425 (i386_pseudo_register_read_into_value): Likewise.
426 (i386_pseudo_register_read_value): Likewise.
427 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
429 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
430 * m32c-tdep.c (m32c_raw_read): Likewise.
431 (m32c_read_flg): Likewise.
432 (m32c_banked_register): Likewise.
433 (m32c_banked_read): Likewise.
434 (m32c_sb_read): Likewise.
435 (m32c_part_read): Likewise.
436 (m32c_cat_read): Likewise.
437 (m32c_r3r2r1r0_read): Likewise.
438 (m32c_pseudo_register_read): Likewise.
439 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
440 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
441 (mep_pseudo_cr64_read): Likewise.
442 (mep_pseudo_register_read): Likewise.
443 * mips-tdep.c (mips_pseudo_register_read): Likewise.
444 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
445 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
446 * regcache.c (regcache::raw_read): Move it to readable_regcache.
447 (regcache::cooked_read): Likewise.
448 (regcache::cooked_read_value): Likewise.
449 (regcache_cooked_read_signed):
450 (regcache::cooked_read): Likewise.
451 * regcache.h (readable_regcache): New class.
452 (regcache): Inherit readable_regcache. Move some methods to
454 * rl78-tdep.c (rl78_pseudo_register_read): Change
455 parameter type to 'readable_regcache *'.
456 * rs6000-tdep.c (do_regcache_raw_read): Remove.
457 (e500_pseudo_register_read): Change parameter type to
458 'readable_regcache *'.
459 (dfp_pseudo_register_read): Likewise.
460 (vsx_pseudo_register_read): Likewise.
461 (efpr_pseudo_register_read): Likewise.
462 * s390-tdep.c (s390_pseudo_register_read): Likewise.
463 * sh-tdep.c (sh_pseudo_register_read): Likewise.
464 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
465 (sh64_pseudo_register_read): Likewise.
466 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
467 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
468 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
469 (spu_pseudo_register_read): Likewise.
470 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
471 (xtensa_pseudo_register_read): Likewise.
473 2018-02-21 Yao Qi <yao.qi@linaro.org>
475 * regcache.c (regcache::regcache): Call reg_buffer ctor.
476 (regcache::arch): Move it to reg_buffer::arch.
477 (regcache::register_buffer): Likewise.
478 (regcache::assert_regnum): Likewise.
479 (regcache::num_raw_registers): Likewise.
480 * regcache.h (reg_buffer): New class.
481 (regcache): Inherit reg_buffer.
483 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
485 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
486 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
488 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
490 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
492 2018-02-19 Alan Hayward <alan.hayward@arm.com>
494 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
495 (SFILES): Remove common/*.c files.
496 (COMMON_OBS): Remove some *.o files built from common/*.c files.
497 * common/common.host: Add common reference.
498 * configure.ac: Likewise.
499 * configure: Regenerate.
501 2018-02-16 Yao Qi <yao.qi@linaro.org>
503 * block.c (block_namespace_info): Inherit allocate_on_obstack.
504 (block_initialize_namespace): Use new.
505 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
506 (dwarf2_free_objfile): Use delete.
507 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
508 (copy_type_recursive): Use new.
509 * gdb_obstack.h (allocate_on_obstack): New.
511 2018-02-15 Yao Qi <yao.qi@linaro.org>
514 * inferior.c (exit_inferior_1): Reset inf->control.
516 2018-02-15 Joel Brobecker <brobecker@adacore.com>
518 * ada-lang.c (ada_to_fixed_value_create): Delete advance
521 2018-02-14 Pedro Alves <palves@redhat.com>
523 * frame-unwind.c (frame_unwind_try_unwinder): Always call
524 frame_cleanup_after_sniffer on exception.
526 2018-02-14 Tom Tromey <tom@tromey.com>
528 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
530 (solib_bfd_open): Make pathname const.
531 * solib.c (solib_bfd_open): Make pathname const.
532 * solib-spu.c (spu_bfd_fopen): Make name const.
533 (spu_bfd_open): Make pathname const.
534 * solib-darwin.c (darwin_bfd_open): Make pathname const.
535 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
537 2018-02-14 Tom Tromey <tom@tromey.com>
539 * symfile.c (symfile_bfd_open): Update.
540 * source.h (openp, source_full_path_of, find_and_open_source):
541 Change argument type to unique_xmalloc_ptr.
542 * source.c (openp): Take a unique_xmalloc_ptr.
543 (source_full_path_of, find_and_open_source): Likewise.
544 (open_source_file, symtab_to_fullname): Update.
545 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
547 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
548 (exec_file_find): Update.
549 * psymtab.c (psymtab_to_fullname): Update.
550 * nto-tdep.h (nto_find_and_open_solib): Update.
551 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
553 * exec.c (exec_file_attach): Update.
554 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
555 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
557 2018-02-14 Tom Tromey <tom@tromey.com>
559 * solib.c: Include source.h.
560 * nto-tdep.c: Include source.h.
561 * mi/mi-cmd-env.c: Include source.h.
562 * infcmd.c: Include source.h.
563 * exec.c: Include source.h.
564 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
565 (add_path, directory_switch, source_path, init_source_path): Move
567 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
568 (add_path, directory_switch, source_path, init_source_path):
571 2018-02-14 Tom Tromey <tom@tromey.com>
573 * solist.h (exec_file_find, solib_find): Return
575 (solib_bfd_fopen): Take a const char *.
576 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
577 (exec_file_find, solib_find): Likewise.
578 (solib_bfd_fopen): Do not take ownership of "pathname".
579 (solib_bfd_open): Use unique_xmalloc_ptr.
580 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
581 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
582 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
583 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
585 2018-02-14 Joel Brobecker <brobecker@adacore.com>
587 * ada-lang.c (name_match_type_from_name): Remove reference to
588 ada_name_for_lookup in function's documentation.
589 * ada-lang.h (ada_name_for_lookup): Delete declaration.
591 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
593 * defs.h (enum openp_flags): New enum.
594 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
595 Move to enum openp_flags.
596 (openp_flags): New enum flags.
597 (openp): Change parameter type to openp_flags.
598 * source.c (openp): Change parameter type to openp_flags.
599 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
600 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
602 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
604 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
607 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
609 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
611 (class dwarf2_queue_guard): ...the destructor of this new class.
612 (dw2_do_instantiate_symtab): Create instance of the new class
613 dwarf2_queue_guard, remove cleanup.
615 2018-02-09 Tom Tromey <tom@tromey.com>
617 * source.c (find_source_lines): Don't reference past the end of
620 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
622 * remote.c (remote_btrace_maybe_reopen): Change error message.
623 * btrace.c (btrace_enable): Likewise.
624 (parse_xml_btrace): Likewise.
625 (parse_xml_btrace_conf): Likewise.
627 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
629 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
630 (linux_enable_pt, linux_enable_bts): Call
631 diagnose_perf_event_open_fail.
633 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
635 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
636 Remove parameter and change return type. Update callers. Move it.
637 (linux_enable_bts, linux_enable_pt): Improve error message.
638 (linux_enable_pt): Remove zero buffer size check.
639 (linux_enable_btrace): Improve error messages. Remove NULL return
642 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
644 * btrace.c (btrace_enable): Remove target_supports_btrace call.
645 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
646 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
647 (linux_supports_pt, linux_supports_btrace): Remove.
648 (linux_enable_bts): Call cpu_supports_bts.
649 * nat/linux-btrace.h (linux_supports_btrace): Remove.
650 * remote.c (remote_supports_btrace): Remove.
651 (init_remote_ops): Remove remote_supports_btrace.
652 * target-delegates.c: Regenerated.
653 * target.c (target_supports_btrace): Remove.
654 * target.h (target_ops) <to_supports_btrace>: Remove
655 (target_supports_btrace): Remove.
656 * x86-linux-nat.c (x86_linux_create_target): Remove
657 linux_supports_btrace.
659 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
661 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
663 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
664 exception and use message in own exception.
666 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
668 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
669 (perf_event_pt_event_type): Use gdb_file_up.
670 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
671 scoped_fd, and scoped_mmap.
673 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
675 * common/scoped_mmap.h: New.
676 * unittests/scoped_mmap-selftest.c: New.
677 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
678 unittests/scoped_mmap-selftest.c.
680 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
682 * common/scoped_fd.h: New.
683 * unittests/scoped_fd-selftest.c: New.
684 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
685 unittests/scoped_fd-selftest.c.
687 2018-02-09 Tom Tromey <tom@tromey.com>
689 * auto-load.c (auto_load_section_scripts): Use
690 gdb::unique_xmalloc_ptr.
692 2018-02-09 Tom Tromey <tom@tromey.com>
694 * auto-load.c (execute_script_contents): Use std::string.
696 2018-02-09 Joel Brobecker <brobecker@adacore.com>
698 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
699 Python function, rather than a new command.
701 2018-02-08 Tom Tromey <tom@tromey.com>
703 * solib.c (solib_find_1): Use std::string.
704 (solib_bfd_fopen): Use unique_xmalloc_ptr.
706 2018-02-08 Tom Tromey <tom@tromey.com>
708 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
710 2018-02-08 Tom Tromey <tom@tromey.com>
712 * source.c (find_source_lines): Use gdb::def_vector.
714 2018-02-08 Tom Tromey <tom@tromey.com>
716 * macrocmd.c (struct temporary_macro_definition): New.
717 (macro_define_command): Use temporary_macro_definition. Remove
719 (free_macro_definition_ptr): Remove.
721 2018-02-08 Tom Tromey <tom@tromey.com>
723 * macroexp.c (maybe_expand): Use std::string.
725 2018-02-08 Tom Tromey <tom@tromey.com>
727 * macroexp.c (struct macro_buffer): Add initializers for some
729 (init_buffer, init_shared_buffer, free_buffer)
730 (free_buffer_return_text): Remove.
731 (macro_buffer): New constructors.
732 (~macro_buffer): New destructor.
733 (macro_buffer::set_shared): New method.
734 (macro_buffer::resize_buffer, macro_buffer::appendc)
735 (macro_buffer::appendmem): Now methods, not free functions.
736 (set_token, append_tokens_without_splicing, stringify)
737 (macro_stringify): Update.
738 (gather_arguments): Change return type. Remove argc_p argument,
739 add args_ptr argument. Use std::vector.
740 (substitute_args): Remove argc argument. Accept std::vector.
741 (expand): Update. Use std::vector.
742 (scan, macro_expand, macro_expand_next): Update.
744 2018-02-08 Tom Tromey <tom@tromey.com>
746 * symtab.c (default_collect_symbol_completion_matches_break_on):
747 Use unique_xmalloc_ptr.
748 * macroscope.h: (sal_macro_scope, user_macro_scope)
749 (default_macro_scope): Return unique_xmalloc_ptr.
750 * macroscope.c (sal_macro_scope, user_macro_scope)
751 (default_macro_scope): Return unique_xmalloc_ptr.
752 * macroexp.h (macro_expand, macro_expand_once): Return
754 * macroexp.c (macro_expand, macro_expand_once): Return
756 * macrocmd.c (macro_expand_command, macro_expand_once_command)
757 (info_macro_command, info_macros_command): Use
759 * compile/compile-c-support.c (write_macro_definitions): Use
761 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
763 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
765 * value.c (value_static_field): Assign field type instead of
766 containing type when returning an optimized out value.
768 2018-02-06 Yao Qi <yao.qi@linaro.org>
770 * ft32-tdep.c (ft32_read_pc): Remove.
771 (ft32_write_pc): Remove.
772 (ft32_gdbarch_init): Update.
773 * m32r-tdep.c (m32r_read_pc): Remove.
774 (m32r_gdbarch_init): Update.
775 * mep-tdep.c (mep_read_pc): Remove.
776 (mep_gdbarch_init): Update.
777 * microblaze-tdep.c (microblaze_write_pc): Remove.
778 (microblaze_gdbarch_init): Update.
779 * mn10300-tdep.c (mn10300_read_pc): Remove.
780 (mn10300_write_pc): Remove.
781 (mn10300_gdbarch_init): Update.
782 * moxie-tdep.c (moxie_read_pc): Remove.
783 (moxie_write_pc): Remove.
784 (moxie_gdbarch_init): Update.
786 2018-02-06 Yao Qi <yao.qi@linaro.org>
788 * expprint.c (print_subexp_standard): Handle
789 OP_F77_UNDETERMINED_ARGLIST.
790 (dump_subexp_body_standard): Likewise.
792 2018-02-05 Alan Hayward <alan.hayward@arm.com>
794 * target-descriptions.c (tdesc_element_visitor) Add empty
796 (tdesc_type): Move make_gdb_type from here.
797 (tdesc_type_builtin): Likewise.
798 (tdesc_type_vector): Likewise.
799 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
800 (make_gdb_type_struct): Move from tdesc_type_with_fields.
801 (make_gdb_type_union): Likewise.
802 (make_gdb_type_flags): Likewise.
803 (make_gdb_type_enum): Likewise.
804 (make_gdb_type): New function.
805 (tdesc_register_type): Use static make_gdb_type.
807 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
809 * infcmd.c (default_print_one_register_info): Align natural-format
810 column values consistently one under another.
811 (pad_to_column): New function.
813 2018-02-05 Joel Brobecker <brobecker@adacore.com>
815 * dwarf2read.c (dwarf2_physname): Move commment.
817 2018-02-01 Leszek Swirski <leszeks@google.com>
819 * varobj.c (varobj_formatted_print_options): Allow recursive
820 pretty printing if pretty printing is enabled.
822 2018-02-01 Leszek Swirski <leszeks@google.com>
824 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
825 names after a structop as a filename.
827 2018-02-01 Yao Qi <yao.qi@linaro.org>
829 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
830 (arm_record_coproc_data_proc): Likewise.
832 2018-02-01 Yao Qi <yao.qi@linaro.org>
834 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
836 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
838 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
839 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
841 2018-01-31 Pedro Alves <palves@redhat.com>
843 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
844 * inflow.c (child_terminal_save_inferior): Wrap reference to
845 tcgetpgrp in HAVE_TERMIOS_H.
846 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
848 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
849 always iterate over all inferiors.
850 (gdbsim_cntrl_c): Adjust.
851 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
853 2018-01-31 Joel Brobecker <brobecker@adacore.com>
855 * gdbtypes.c (lookup_array_range_type): Make sure the array's
856 index type is objfile-owned if the element type is as well.
858 2018-01-31 Joel Brobecker <brobecker@adacore.com>
862 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
864 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
865 "features/s390x-linux64.c".
866 (_initialize_s390_linux_tdep): Remove initialization of tdescs
867 s390_linux32 and s390x_linux64.
868 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
870 * s390-tdep.c: Include "features/s390-linux32.c" and
871 "features/s390x-linux64.c".
872 (s390_tdesc_valid): Add check for tdesc_has_registers.
873 (s390_gdbarch_init): Make sure there is always a valid tdesc.
874 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
876 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
877 tdesc_s390x_linux64 to...
878 * s390-tdep.h: ...here.
880 2018-01-30 Pedro Alves <palves@redhat.com>
883 * config.in, configure: Regenerate.
884 * configure.ac: Check for getpgid.
885 * go32-nat.c (go32_pass_ctrlc): New.
886 (go32_target): Install it.
887 * inf-child.c (inf_child_target): Install
888 child_terminal_save_inferior, child_pass_ctrlc and
890 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
891 (inf_ptrace_target): No longer install it.
892 * infcmd.c (interrupt_target_1): Adjust.
893 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
894 (child_interrupt): Declare.
895 (inferior::terminal_state): New.
896 * inflow.c (struct terminal_info): Update comments.
897 (inferior_process_group): Delete.
898 (terminal_is_ours): Delete.
899 (gdb_tty_state): New.
900 (child_terminal_init): Adjust.
901 (is_gdb_terminal, sharing_input_terminal_1)
902 (sharing_input_terminal): New functions.
903 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
904 Set the process's actual process group in the foreground if
905 possible. Handle is_ours_for_output/is_ours distinction. Don't
906 mark terminal as the inferior's if not sharing GDB's terminal.
907 Don't check attach_flag.
908 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
909 pass down a target_terminal_state.
910 (child_terminal_save_inferior): New, factored out from ...
911 (child_terminal_ours_1): ... this. Handle
912 target_terminal_state::is_ours_for_output.
913 (child_interrupt, child_pass_ctrlc): New.
914 (inflow_inferior_exit): Clear the inferior's terminal_state.
915 (copy_terminal_info): Copy the inferior's terminal state.
916 (_initialize_inflow): Remove reference to terminal_is_ours.
917 * inflow.h (inferior_process_group): Delete.
918 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
919 * procfs.c (procfs_target): Don't install procfs_interrupt.
920 (procfs_interrupt): Delete.
921 * remote.c (remote_serial_quit_handler): Adjust.
922 (remote_interrupt): Remove ptid parameter. Adjust.
923 * target-delegates.c: Regenerate.
924 * target.c: Include "terminal.h".
925 (target_terminal::terminal_state): Rename to ...
926 (target_terminal::m_terminal_state): ... this.
927 (target_terminal::init): Adjust.
928 (target_terminal::inferior): Adjust to per-inferior
930 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
931 (target_terminal::ours, target_terminal::ours_for_output): Use
932 target_terminal_is_ours_kind.
933 (target_interrupt): Remove ptid parameter. Adjust.
934 (default_target_pass_ctrlc): Adjust.
935 * target.h (target_ops::to_terminal_save_inferior): New field.
936 (target_ops::to_interrupt): Remove ptid_t parameter.
937 (target_interrupt): Remove ptid_t parameter. Update comment.
938 (target_pass_ctrlc): Update comment.
939 * target/target.h (target_terminal_state): New scoped enum,
941 (target_terminal::terminal_state): ... here.
942 (target_terminal::inferior): Update comments.
943 (target_terminal::restore_inferior): New.
944 (target_terminal::is_inferior, target_terminal::is_ours)
945 (target_terminal::is_ours_for_output): Adjust.
946 (target_terminal::scoped_restore_terminal_state): Adjust to
947 rename, and call restore_inferior() instead of inferior().
948 (target_terminal::scoped_restore_terminal_state::m_state): Change
950 (target_terminal::terminal_state): Rename to ...
951 (target_terminal::m_terminal_state): ... this and change type.
953 2018-01-30 Pedro Alves <palves@redhat.com>
955 * linux-nat.c (wait_for_signal): New function.
956 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
958 (async_terminal_is_ours)
959 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
960 (linux_nat_add_target): Don't override
961 to_terminal_inferior/to_terminal_ours.
963 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
965 * remote.c (remote_follow_fork): Don't call "detach_inferior".
967 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
969 * dwarf2read.c (free_dwo_files): Add forward-declaration.
970 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
971 dwarf2_per_objfile_free here.
972 (dwarf2_per_objfile_free): Remove.
973 (_initialize_dwarf2_read): Don't register
974 dwarf2_per_objfile_free as a registry cleanup.
976 2018-01-27 Eli Zaretskii <eliz@gnu.org>
978 Avoid compilation errors in MinGW native builds
980 The error is triggered by including python-internal.h, and the
983 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
984 from build-gnulib/import/math.h:27,
985 from d:/usr/Python26/include/pyport.h:235,
986 from d:/usr/Python26/include/Python.h:58,
987 from python/python-internal.h:94,
988 from python/py-arch.c:24:
989 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
993 This happens because Python headers define 'hypot' to expand t
994 '_hypot' in the Windows builds.
995 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
996 'hypoth'. This avoids a compilation error.
998 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1000 * MAINTAINERS (Write After Approval): Fix ordering.
1002 2018-01-26 Alan Hayward <alan.hayward@arm.com>
1004 * MAINTAINERS (Write After Approval): Add Alan Hayward.
1006 2018-01-26 Alan Modra <amodra@gmail.com>
1008 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
1009 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
1010 Remove nop. Make const. Comment.
1011 (powerpc32_plt_stub_so_2): New.
1012 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
1013 Correct count. Update uses.
1014 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
1015 Move common code reading PLT entry word. Correct
1016 powerpc32_plt_stub PLT address calculation.
1017 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
1018 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
1019 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
1020 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
1021 (ppc64_standard_linkage8): Likewise.
1022 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
1023 Correct insns description.
1024 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
1026 2018-01-24 Pedro Alves <palves@redhat.com>
1028 GCC PR libstdc++/83906
1029 * gdbtypes.c (operator==(const dynamic_prop &,
1030 const dynamic_prop &)): New.
1031 (operator==(const range_bounds &, const range_bounds &)): New.
1032 (check_types_equal): Use them instead of memcmp.
1033 * gdbtypes.h (operator==(const dynamic_prop &,
1034 const dynamic_prop &)): Declare.
1035 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
1036 (operator==(const range_bounds &, const range_bounds &)): Declare.
1037 (operator!=(const range_bounds &, const range_bounds &)): Declare.
1039 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1041 * s390-linux-tdep.c (s390_record_address_mask)
1042 (s390_record_calc_disp_common, s390_record_calc_disp)
1043 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1044 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1045 (s390_process_record): Move to s390-tdep.c.
1046 (s390_linux_init_abi_any): Adjust.
1047 * s390-tdep.c (s390_record_address_mask)
1048 (s390_record_calc_disp_common, s390_record_calc_disp)
1049 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1050 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1051 (s390_process_record): Moved from s390-linux-tdep.c
1052 (s390_gdbarch_init): Adjust.
1054 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1056 * s390-linux-nat.c (s390-tdep.h): New include.
1057 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
1058 (HFILES_NO_SRCDIR): Add s390-tdep.h.
1059 (ALLDEPFILES): Add s390-tdep.c.
1060 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
1061 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
1062 * s390-tdep.h: ...this. New file.
1063 * s390-linux-tdep.c (s390-tdep.h): New include.
1064 (_initialize_s390_tdep): Rename to...
1065 (_initialize_s390_linux_tdep): ...this and adjust.
1066 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
1067 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
1069 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
1070 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
1071 (s390_is_partial_instruction, s390_software_single_step)
1072 (is_non_branch_ril, s390_displaced_step_copy_insn)
1073 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
1074 (s390_prologue_data, s390_addr, s390_store, s390_load)
1075 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
1076 (s390_register_call_saved, s390_guess_tracepoint_registers)
1077 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
1078 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
1079 (s390_pseudo_register_name, s390_pseudo_register_type)
1080 (s390_pseudo_register_read, s390_pseudo_register_write)
1081 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
1082 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
1083 (s390_addr_bits_remove, s390_address_class_type_flags)
1084 (s390_address_class_type_flags_to_name)
1085 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
1086 (s390_function_arg_float, s390_function_arg_vector)
1087 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
1088 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
1089 (s390_frame_align, s390_register_return_value, s390_return_value)
1090 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
1091 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
1092 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
1093 (s390_trad_frame_prev_register, s390_unwind_cache)
1094 (s390_prologue_frame_unwind_cache)
1095 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
1096 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
1097 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
1098 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
1099 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
1100 (s390_frame_base_address, s390_local_base_address)
1101 (s390_frame_base, s390_gcc_target_options)
1102 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
1103 (s390_validate_reg_range, s390_tdesc_valid)
1104 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
1105 * s390-tdep.c: ...this. New file.
1107 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1109 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
1110 (s390_process_record, s390_gdbarch_tdep_alloc)
1111 (s390_linux_init_abi_any): Use/set new hook.
1113 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1115 * s390-linux-tdep.c (osabi.h): New include.
1116 (s390_linux_init_abi_31, s390_linux_init_abi_64)
1117 (s390_linux_init_abi_any): New functions.
1118 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
1120 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1122 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
1123 tdesc_has_registers check
1125 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1127 * s390-linux-tdep.c (s390_tdesc_valid): New function.
1128 (s390_validate_reg_range): New macro.
1129 (s390_gdbarch_init): Adjust.
1131 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1133 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
1134 (s390_gdbarch_tdep_alloc): Adjust.
1135 (s390_gdbarch_init): Adjust.
1137 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1139 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
1140 <have_tdb>: Change type to bool.
1141 (s390_gdbarch_tdep_alloc): Adjust.
1142 (s390_gdbarch_init): Adjust.
1144 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1146 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
1147 (gdbarch_tdep) <have_upper, have_vx>: New fields.
1148 (s390_gdbarch_tdep_alloc): New function.
1149 (s390_gdbarch_init): Allocate tdep at start and use its fields
1150 instead of separate variables.
1152 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1154 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
1155 when looking for cached gdbarch and add comment for remaining.
1157 2018-01-22 Pedro Alves <palves@redhat.com>
1158 Sergio Durigan Junior <sergiodj@redhat.com>
1160 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
1163 2018-01-22 Maciej W. Rozycki <macro@mips.com>
1165 * MAINTAINERS: Update my company e-mail address.
1167 2018-01-22 Yao Qi <yao.qi@linaro.org>
1169 * regcache.c (cooked_write_test): New function.
1170 (_initialize_regcache): Register the test.
1172 2018-01-22 Yao Qi <yao.qi@linaro.org>
1174 * ia64-tdep.c (ia64_pseudo_register_read): Call
1175 regcache->cooked_read instead of regcache_cooked_read_unsigned.
1176 * m32c-tdep.c (m32c_cat_read): Likewise.
1177 (m32c_r3r2r1r0_read): Likewise.
1178 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1179 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1181 2018-01-22 Yao Qi <yao.qi@linaro.org>
1183 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
1184 method raw_read instead of regcache_raw_read.
1185 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1186 * arm-tdep.c (arm_neon_quad_read): Likewise.
1187 * avr-tdep.c (avr_pseudo_register_read): Likewise.
1188 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1189 * frv-tdep.c (frv_pseudo_register_read): Likewise.
1190 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
1191 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1192 (i386_pseudo_register_read_into_value): Likewise.
1193 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1194 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1195 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1196 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
1197 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
1198 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1199 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1200 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1201 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1203 2018-01-22 Yao Qi <yao.qi@linaro.org>
1205 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
1206 * configure.tgt: Remove target mt.
1207 * mt-tdep.c: Remove.
1208 * regcache.c (cooked_read_test): Remove the check for mt.
1210 2018-01-22 Yao Qi <yao.qi@linaro.org>
1212 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
1213 instead of gdbarch_pseudo_register_read_value.
1215 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1217 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
1220 2018-01-22 Joel Brobecker <brobecker@adacore.com>
1222 * linespec.c (create_sals_line_offset): Remove code that preserved
1223 the symtab_and_line's line number.
1225 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1227 * varobj.c (varobj_create): Don't set valid_block when creating a
1230 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1232 * varobj.c (varobj_create): Remove out of date comment.
1234 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1237 * ada-exp.y (write_var_from_sym): Pass extra parameter when
1238 updating innermost block.
1239 * parse.c (innermost_block_tracker::update): Take extra type
1240 parameter, and check types match before updating innermost block.
1241 (write_dollar_variable): Update innermost block for registers.
1242 * parser-defs.h (enum innermost_block_tracker_type): New enum.
1243 (innermost_block_tracker::innermost_block_tracker): Initialise
1245 (innermost_block_tracker::reset): Take type parameter.
1246 (innermost_block_tracker::update): Take type parameter, and pass
1247 type through as needed.
1248 (innermost_block_tracker::m_types): New member.
1249 * varobj.c (varobj_create): Pass type when reseting innermost
1252 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1254 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
1255 * ada-lang.c (resolve_subexp): Likewise.
1256 * breakpoint.c (set_breakpoint_condition) Likewise.
1257 (watch_command_1) Likewise.
1258 * c-exp.y (variable): Likewise.
1259 * d-exp.y (PrimaryExpression): Likewise.
1260 * f-exp.y (variable): Likewise.
1261 * go-exp.y (variable): Likewise.
1262 * m2-exp.y (variable): Likewise.
1263 * objfiles.c (objfile::~objfile): Likewise.
1264 * p-exp.y (variable): Likewise.
1265 * parse.c (innermost_block): Change type.
1266 * parser-defs.h (class innermost_block_tracker): New.
1267 (innermost_block): Change to innermost_block_tracker.
1268 * printcmd.c (display_command): Switch to innermost_block API.
1269 (do_one_display): Likewise.
1270 * rust-exp.y (do_one_display): Likewise.
1271 * symfile.c (clear_symtab_users): Likewise.
1272 * varobj.c (varobj_create): Switch to innermost_block API, replace
1273 use of innermost_block with block stored on varobj object.
1275 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1277 * expression.h (innermost_block): Remove declaration.
1278 * varobj.c: Add 'parser-defs.h' include.
1280 2018-01-19 Tom Tromey <tom@tromey.com>
1282 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
1283 symbols in the static and global blocks.
1285 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1287 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
1288 gdb_ptrace.h, and move including gdb_wait.h ...
1289 * nat/linux-ptrace.h: ... to here.
1291 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1293 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
1294 inf_ptrace_detach_success.
1295 (inf_ptrace_detach_success): Add inferior parameter, use it
1296 instead of inferior_ptid, pass it to detach_inferior.
1297 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
1299 * inferior.c (detach_inferior): Add overload that takes an
1301 * inferior.h (detach_inferior): Likewise.
1302 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
1303 use inferior_ptid, adjust call to inf_ptrace_detach_success.
1304 * linux-thread-db.c (thread_db_detach): Use inf parameter.
1306 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1308 * target.h (struct target_ops) <to_detach>: Add inferior
1310 (target_detach): Likewise.
1311 * target.c (dispose_inferior): Pass inferior down.
1312 (target_detach): Pass inferior down. Assert that it is equal to
1313 the current inferior.
1314 * aix-thread.c (aix_thread_detach): Pass inferior down.
1315 * corefile.c (core_file_command): Pass current_inferior() down.
1316 * corelow.c (core_detach): Add inferior parameter.
1317 * darwin-nat.c (darwin_detach): Likewise.
1318 * gnu-nat.c (gnu_detach): Likewise.
1319 * inf-ptrace.c (inf_ptrace_detach): Likewise.
1320 * infcmd.c (detach_command): Pass current_inferior() down to
1322 * infrun.c (follow_fork_inferior): Pass parent_inf to
1324 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
1326 * linux-nat.c (linux_nat_detach): Add inferior parameter.
1327 * linux-thread-db.c (thread_db_detach): Likewise.
1328 * nto-procfs.c (procfs_detach): Likewise.
1329 * procfs.c (procfs_detach): Likewise.
1330 * record.c (record_detach): Likewise.
1331 * record.h (struct inferior): Forward-declare.
1332 (record_detach): Add inferior parameter.
1333 * remote-sim.c (gdbsim_detach): Likewise.
1334 * remote.c (remote_detach_1): Likewise.
1335 (remote_detach): Likewise.
1336 (extended_remote_detach): Likewise.
1337 * sol-thread.c (sol_thread_detach): Likewise.
1338 * target-debug.h (target_debug_print_inferior_p): New macro.
1339 * target-delegates.c: Re-generate.
1340 * top.c (kill_or_detach): Pass inferior down to target_detach.
1341 * windows-nat.c (windows_detach): Add inferior parameter.
1343 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
1345 * target.h (struct target_ops) <to_detach>: Remove args
1347 (target_detach): Likewise.
1348 * target.c (dispose_inferior): Adjust.
1349 (target_detach): Remove args parameter, adjust.
1350 * aix-thread.c (aix_thread_detach): Adjust.
1351 * corefile.c (core_file_command): Adjust.
1352 * corelow.c (core_detach): Adjust.
1353 * darwin-nat.c (darwin_detach): Adjust.
1354 * gnu-nat.c (gnu_detach): Adjust.
1355 * inf-ptrace.c (inf_ptrace_detach): Adjust.
1356 * infcmd.c (detach_command): Adjust
1357 * infrun.c (follow_fork_inferior): Adjust.
1358 (handle_vfork_child_exec_or_exit): Adjust.
1359 * linux-fork.c (linux_fork_detach): Remove args parameter.
1360 * linux-fork.h (linux_fork_detach): Likewise.
1361 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
1362 * linux-thread-db.c (thread_db_detach): Likewise.
1363 * nto-procfs.c (procfs_detach): Likewise.
1364 * procfs.c (procfs_detach): Likewise.
1365 (do_detach): Remove signo parameter.
1366 * record.c (record_detach): Remove args parameter.
1367 * record.h (record_detach): Likewise.
1368 * remote-sim.c (gdbsim_detach): Likewise.
1369 * remote.c (remote_detach_1): Likewise.
1370 (remote_detach): Likewise.
1371 (extended_remote_detach): Likewise.
1372 * sol-thread.c (sol_thread_detach): Likewise.
1373 * target-delegates.c: Re-generate.
1374 * top.c (struct qt_args) <args>: Remove field.
1375 (kill_or_detach): Don't pass args.
1376 (quit_force): Don't set args.
1377 * windows-nat.c (windows_detach): Remove args parameter.
1379 2018-01-19 Yao Qi <yao.qi@linaro.org>
1381 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
1382 (arm_linux_init_abi): Install it.
1384 2018-01-19 Yao Qi <yao.qi@linaro.org>
1386 * osabi.c (gdb_osabi_names): Extend the regexp for
1387 arm-linux-gnueabihf.
1389 2018-01-18 Yao Qi <yao.qi@linaro.org>
1391 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
1393 (abbrev_table::add_abbrev): Update.
1394 (abbrev_table::lookup_abbrev): Update.
1396 2018-01-18 Yao Qi <yao.qi@linaro.org>
1398 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
1400 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
1402 * compile/compile.c (compile_to_object): Convert "triplet_rx"
1405 2018-01-17 Tom Tromey <tom@tromey.com>
1407 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
1409 2018-01-17 Tom Tromey <tom@tromey.com>
1411 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
1412 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
1413 (create_array_type_with_stride): Update.
1414 * dwarf2read.c (set_die_type): Update.
1416 2018-01-17 Tom Tromey <tom@tromey.com>
1418 * dwarf2read.c (delayed_method_info): Remove typedef.
1419 (dwarf2_cu::method_info): Now a std::vector.
1420 (add_to_method_list): Update.
1421 (free_delayed_list): Remove.
1422 (compute_delayed_physnames): Update.
1423 (process_full_comp_unit, process_full_type_unit): Clear the method
1424 list. Remove cleanups.
1425 (psymtab_include_file_name): Add name_holder parameter. Use
1427 (dwarf_decode_lines): Update.
1429 2018-01-17 Tom Tromey <tom@tromey.com>
1430 Simon Marchi <simon.marchi@ericsson.com>
1432 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
1433 (dwarf2_per_objfile::free_cached_comp_units)
1434 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1435 (init_cutu_and_read_dies_no_follow): Update.
1436 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
1437 (dwarf2_cu::~dwarf2_cu): New.
1438 (free_heap_comp_unit, free_stack_comp_unit): Remove.
1439 (age_cached_comp_units, free_one_cached_comp_unit): Update.
1441 2018-01-17 Tom Tromey <tom@tromey.com>
1442 Simon Marchi <simon.marchi@ericsson.com>
1444 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
1445 (struct die_reader_specs) <abbrev_table>: New member.
1446 (struct abbrev_table): Add constructor.
1447 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
1448 <abbrev_obstack>: Now an auto_obstack.
1449 (abbrev_table_up): New typedef.
1450 (init_cu_die_reader): Add abbrev_table parameter.
1451 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
1452 Add result_dwo_abbrev_table.
1453 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
1454 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
1456 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
1458 (skip_children): Update.
1459 (abbrev_table::alloc_abbrev): Rename from
1460 abbrev_table_alloc_abbrev.
1461 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
1462 (abbrev_table::lookup_abbrev): Rename from
1463 abbrev_table_lookup_abbrev.
1464 (abbrev_table_read_table): Return abbrev_table_up.
1465 (abbrev_table_free, abbrev_table_free_cleanup)
1466 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
1467 (load_partial_dies): Update.
1469 2018-01-17 Tom Tromey <tom@tromey.com>
1471 * dwarf2read.c (dwarf2_compute_name): Update comment.
1472 (read_func_scope, read_variable): Update.
1473 (new_symbol): Remove.
1474 (new_symbol_full): Rename to new_symbol.
1476 2018-01-17 Mike Gulick <mgulick@mathworks.com>
1479 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
1480 a warning instead of throwing an error, set section size to 0 and return
1482 * gdb_bfd.h (gdb_bfd_map_section): Update description.
1484 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1486 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
1488 (linux_ptrace_attach_fail_reason_string): Likewise.
1489 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
1491 (linux_ptrace_attach_fail_reason_string): Likewise.
1492 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
1494 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1496 * linux-nat.c (linux_nat_attach): Remove xstrdup.
1498 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1501 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1502 checking for fs_base/gs_base fields in struct user_regs_struct.
1503 * configure: Regenerate.
1505 2018-01-17 Yao Qi <yao.qi@linaro.org>
1507 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
1509 (aarch64_linux_init_abi): Install it to gdbarch hook
1512 2018-01-15 Pedro Alves <palves@redhat.com>
1514 * common/signals-state-save-restore.c
1515 (save_original_signals_state): Fix typos.
1517 2017-01-12 Tom Tromey <tom@tromey.com>
1518 Sergio Durigan Junior <sergiodj@redhat.com>
1520 * Makefile.in (install-only): Install gdb-add-index.
1522 2018-01-12 John Baldwin <jhb@FreeBSD.org>
1524 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
1526 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1528 * infrun.c (keep_going_pass_signal): Clear step-over info when
1529 insert_breakpoints fails.
1531 2018-01-11 Pedro Alves <palves@redhat.com>
1534 * infrun.c (resume): Rename to ...
1535 (resume_1): ... this.
1536 (resume): Reimplement as wrapper around resume_1.
1538 2018-01-11 Pedro Alves <palves@redhat.com>
1541 * remote.c (remote_parse_stop_reply): Default to the last-set
1542 general thread instead of to 'magic_null_ptid'.
1544 2018-01-10 Pedro Alves <palves@redhat.com>
1546 * language.h (language_get_symbol_name_matcher): Rename ...
1547 (get_symbol_name_matcher): ... this.
1548 * language.c (language_get_symbol_name_matcher): Ditto.
1549 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
1552 2018-01-10 Pedro Alves <palves@redhat.com>
1556 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
1557 Adjust to use language_get_symbol_name_matcher instead of
1558 language_defn::la_get_symbol_name_matcher.
1559 * language.c (language_get_symbol_name_matcher): If in Ada mode
1560 and the lookup name is a verbatim match, return Ada's matcher.
1561 * language.h (language_get_symbol_name_matcher): Adjust comment.
1562 (ada_lookup_name_info::verbatim_p):: New method.
1564 2018-01-10 Pedro Alves <palves@redhat.com>
1567 * ada-lang.c (ada_collect_symbol_completion_matches): If the
1568 minsym's language is language_auto or language_cplus, pass down
1569 language_ada instead.
1570 * symtab.c (compare_symbol_name): Don't frob symbol language here.
1572 2018-01-10 Pedro Alves <palves@redhat.com>
1575 * minsyms.c (linkage_name_str): New function.
1576 (iterate_over_minimal_symbols): Use it.
1578 2018-01-09 John Baldwin <jhb@FreeBSD.org>
1580 * NEWS: Document that 'info proc' now works on FreeBSD.
1582 2018-01-09 John Baldwin <jhb@FreeBSD.org>
1584 * configure.ac: Check for kinfo_getfile in libutil.
1585 * configure: Regenerate.
1586 * config.in: Regenerate.
1587 * fbsd-nat.c: Include "fbsd-tdep.h".
1588 (fbsd_fetch_cmdline): New.
1589 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
1590 rather than calling error.
1591 (fbsd_info_proc): New.
1592 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
1593 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
1594 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
1596 2018-01-09 John Baldwin <jhb@FreeBSD.org>
1598 * fbsd-nat.c (struct free_deleter): Remove.
1599 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
1601 2018-01-09 John Baldwin <jhb@FreeBSD.org>
1603 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
1604 NULL for an empty pathname.
1606 2018-01-09 John Baldwin <jhb@FreeBSD.org>
1608 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
1609 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
1610 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
1611 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
1612 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
1613 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
1614 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
1615 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
1616 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
1617 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
1618 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
1619 (fbsd_core_fetch_timeval, fbsd_print_sigset)
1620 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
1621 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
1622 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
1624 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
1626 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
1627 (gnu_xfer_auxv): New function.
1628 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
1631 2018-01-08 Yao Qi <yao.qi@linaro.org>
1632 Simon Marchi <simon.marchi@ericsson.com>
1634 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
1636 (COMMON_OBS): Remove selftest.o.
1637 * configure.ac: Append selftest-arch.c and common/selftest.c to
1638 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
1639 * configure: Re-generated.
1640 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
1642 (maintenance_info_selftests): Likewise.
1644 2018-01-08 Xavier Roirand <roirand@adacore.com>
1646 * ada-valprint.c (val_print_packed_array_elements): Use
1647 proper number of elements when printing an array indexed
1648 by an enumeration type.
1650 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1652 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
1653 (dw2_get_file_names_reader): Adjust.
1654 (lookup_dwo_signatured_type): Adjust.
1655 (lookup_dwp_signatured_type): Adjust.
1656 (lookup_signatured_type): Adjust.
1657 (create_type_unit_group): Adjust.
1658 (get_type_unit_group): Adjust.
1659 (process_psymtab_comp_unit_reader): Adjust.
1660 (build_type_psymtabs_reader): Adjust.
1661 (scan_partial_symbols): Adjust.
1662 (add_partial_symbol): Adjust.
1663 (add_partial_subprogram): Adjust.
1664 (peek_die_abbrev): Adjust.
1665 (fixup_go_packaging): Adjust.
1666 (process_imported_unit_die): Adjust.
1667 (dwarf2_compute_name): Adjust.
1668 (dwarf2_physname): Adjust.
1669 (read_import_statement): Adjust.
1670 (handle_DW_AT_stmt_list): Adjust.
1671 (read_file_scope): Adjust.
1672 (read_func_scope): Adjust.
1673 (read_lexical_block_scope): Adjust.
1674 (read_call_site_scope): Adjust.
1675 (read_variable): Adjust.
1676 (dwarf2_rnglists_process): Adjust.
1677 (dwarf2_ranges_process): Adjust.
1678 (dwarf2_ranges_read): Adjust.
1679 (dwarf2_get_pc_bounds): Adjust.
1680 (dwarf2_record_block_ranges): Adjust.
1681 (dwarf2_add_field): Adjust.
1682 (dwarf2_add_member_fn): Adjust.
1683 (read_structure_type): Adjust.
1684 (process_structure_scope): Adjust.
1685 (read_enumeration_type): Adjust.
1686 (read_array_type): Adjust.
1687 (mark_common_block_symbol_computed): Adjust.
1688 (read_common_block): Adjust.
1689 (read_namespace_type): Adjust.
1690 (read_namespace): Adjust.
1691 (read_module_type): Adjust.
1692 (read_tag_pointer_type): Adjust.
1693 (read_tag_ptr_to_member_type): Adjust.
1694 (read_tag_string_type): Adjust.
1695 (read_subroutine_type): Adjust.
1696 (read_typedef): Adjust.
1697 (read_base_type): Adjust.
1698 (attr_to_dynamic_prop): Adjust.
1699 (read_subrange_type): Adjust.
1700 (read_unspecified_type): Adjust.
1701 (dwarf2_read_abbrevs): Adjust.
1702 (load_partial_dies): Adjust.
1703 (read_partial_die): Adjust.
1704 (find_partial_die): Adjust.
1705 (guess_partial_die_structure_name): Adjust.
1706 (fixup_partial_die): Adjust.
1707 (read_attribute_value): Adjust.
1708 (read_addr_index): Adjust.
1709 (read_addr_index_from_leb128): Adjust.
1710 (read_str_index): Adjust.
1711 (dwarf2_string_attr): Adjust.
1712 (get_debug_line_section): Adjust.
1713 (dwarf_decode_line_header): Adjust.
1714 (lnp_state_machine::check_line_address): Adjust.
1715 (dwarf_decode_lines_1): Adjust.
1716 (dwarf_decode_lines): Adjust.
1717 (dwarf2_start_symtab): Adjust.
1718 (var_decode_location): Adjust.
1719 (new_symbol_full): Adjust.
1720 (dwarf2_const_value_data): Adjust.
1721 (dwarf2_const_value_attr): Adjust.
1722 (dwarf2_const_value): Adjust.
1724 (die_containing_type): Adjust.
1725 (build_error_marker_type): Adjust.
1726 (lookup_die_type): Adjust.
1727 (guess_full_die_structure_name): Adjust.
1728 (anonymous_struct_prefix): Adjust.
1729 (determine_prefix): Adjust.
1730 (dwarf2_name): Adjust.
1731 (follow_die_ref_or_sig): Adjust.
1732 (follow_die_offset): Adjust.
1733 (follow_die_ref): Adjust.
1734 (follow_die_sig_1): Adjust.
1735 (follow_die_sig): Adjust.
1736 (get_signatured_type): Adjust.
1737 (get_DW_AT_signature_type): Adjust.
1738 (decode_locdesc): Adjust.
1739 (dwarf_decode_macros): Adjust.
1740 (cu_debug_loc_section): Adjust.
1741 (fill_in_loclist_baton): Adjust.
1742 (dwarf2_symbol_mark_computed): Adjust.
1743 (init_one_comp_unit): Don't assign
1744 dwarf2_cu::dwarf2_per_objfile.
1745 (set_die_type): Adjust.
1747 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
1749 * dwarf2read.c (struct mapped_debug_names): Add constructor.
1750 <dwarf2_per_objfile>: New field.
1751 (dwarf2_per_objfile): Remove global.
1752 (get_dwarf2_per_objfile): New function.
1753 (set_dwarf2_per_objfile): New function.
1754 (dwarf2_build_psymtabs_hard): Change objfile parameter to
1756 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
1757 (read_abbrev_offset): Likewise.
1758 (read_indirect_string): Likewise.
1759 (read_indirect_line_string): Likewise.
1760 (read_indirect_string_at_offset): Likewise.
1761 (read_indirect_string_from_dwz): Likewise.
1762 (dwarf2_find_containing_comp_unit): Change objfile parameter to
1764 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
1765 (create_all_comp_units): Change objfile parameter to
1767 (create_all_type_units): Likewise.
1768 (process_queue): Add dwarf2_per_objfile parameter.
1769 (read_and_check_comp_unit_head): Likewise.
1770 (lookup_dwo_unit_in_dwp): Likewise.
1771 (get_dwp_file): Likewise.
1772 (process_cu_includes): Likewise.
1773 (struct free_dwo_file_cleanup_data): New struct.
1774 (dwarf2_has_info): Use get_dwarf2_per_objfile and
1775 set_dwarf2_per_objfile.
1776 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
1777 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
1778 context, adjust calls.
1779 (dw2_instantiate_symtab): Likewise.
1780 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
1781 (dw2_get_cu): Likewise.
1782 (create_cu_from_index_list): Change objfile parameter to
1784 (create_cus_from_index_list): Get dwarf2_per_objfile from
1785 context, adjust calls.
1786 (create_cus_from_index): Likewise.
1787 (create_signatured_type_table_from_index): Change objfile
1788 parameter to dwarf2_per_objfile.
1789 (create_signatured_type_table_from_debug_names): Change objfile
1790 parameter to dwarf2_per_objfile.
1791 (create_addrmap_from_index): Likewise.
1792 (create_addrmap_from_aranges): Likewise.
1793 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
1794 (dw2_setup): Remove.
1795 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
1797 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
1798 get_dwarf2_per_objfile.
1799 (dw2_forget_cached_source_info): Likewise.
1800 (dw2_map_symtabs_matching_filename): Likewise.
1801 (struct dw2_symtab_iterator) <index>: Remove.
1802 <dwarf2_per_objfile>: New field.
1803 (dw2_symtab_iter_init): Replace index parameter with
1805 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
1806 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
1807 (dw2_print_stats): Likewise.
1808 (dw2_dump): Likewise.
1809 (dw2_expand_symtabs_for_function): Likewise.
1810 (dw2_expand_all_symtabs): Likewise.
1811 (dw2_expand_symtabs_with_fullname): Likewise.
1812 (dw2_expand_marked_cus): Replace index and objfile parameters
1813 with dwarf2_per_objfile.
1814 (dw_expand_symtabs_matching_file_matcher): Add
1815 dwarf2_per_objfile parameter and adjust calls.
1816 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
1818 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
1819 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
1821 (create_cus_from_debug_names_list): Replace objfile parameter
1822 with dwarf2_per_objfile and adjust calls.
1823 (create_cus_from_debug_names): Likewise.
1824 (dwarf2_read_debug_names): Likewise.
1825 (mapped_debug_names::namei_to_name): Adjust call.
1826 (dw2_debug_names_iterator::next): Likewise.
1827 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
1828 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
1829 (dw2_debug_names_dump): Likewise.
1830 (dw2_debug_names_expand_symtabs_for_function): Likewise.
1831 (dw2_debug_names_expand_symtabs_matching): Likewise.
1832 (dwarf2_initialize_objfile): Likewise.
1833 (dwarf2_build_psymtabs): Likewise.
1834 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
1836 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
1837 (read_and_check_comp_unit_head): Likewise.
1838 (read_abbrev_offset): Likewise.
1839 (create_debug_type_hash_table): Likewise.
1840 (create_debug_types_hash_table): Likewise.
1841 (create_all_type_units): Replace objfile parameter with
1843 (add_type_unit): Add dwarf2_per_objfile parameter.
1844 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
1845 with dwarf2_per_objfile.
1846 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
1847 (lookup_dwp_signatured_type): Likewise.
1848 (lookup_signatured_type): Likewise.
1849 (read_cutu_die_from_dwo): Likewise.
1850 (init_tu_and_read_dwo_dies): Likewise.
1851 (init_cutu_and_read_dies): Likewise.
1852 (init_cutu_and_read_dies_no_follow): Likewise.
1853 (allocate_type_unit_groups_table): Add objfile parameter.
1854 (create_type_unit_group): Use dwarf2_per_objfile from cu.
1855 (get_type_unit_group): Likewise.
1856 (process_psymtab_comp_unit): Update call.
1857 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
1858 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
1859 (print_tu_stats): Likewise.
1860 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
1862 (build_type_psymtabs): Change objfile parameter to
1864 (process_skeletonless_type_unit): Use dwarf2_per_objfile
1865 passed in void* parameter.
1866 (process_skeletonless_type_units): Change objfile parameter to
1868 (set_partial_user): Likewise.
1869 (dwarf2_build_psymtabs_hard): Likewise.
1870 (read_comp_units_from_section): Likewise.
1871 (create_all_comp_units): Likewise.
1872 (scan_partial_symbols): Update calls.
1873 (add_partial_symbol): Likewise.
1874 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
1875 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
1876 (process_queue): Add dwarf2_per_objfile parameter.
1877 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
1878 (compute_compunit_symtab_includes): Likewise.
1879 (process_cu_includes): Add dwarf2_per_objfile parameter.
1880 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
1881 (process_full_type_unit): Likewise.
1882 (process_imported_unit_die): Update call.
1883 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
1884 (read_file_scope): Likewise.
1885 (allocate_dwo_file_hash_table): Add objfile parameter.
1886 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
1887 (create_cus_hash_table): Likewise.
1888 (create_dwp_hash_table): Likewise.
1889 (create_dwo_unit_in_dwp_v1): Likewise.
1890 (create_dwp_v2_section): Likewise.
1891 (create_dwo_unit_in_dwp_v2): Likewise.
1892 (lookup_dwo_unit_in_dwp): Likewise.
1893 (try_open_dwop_file): Likewise.
1894 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
1895 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
1896 cleanup to include a reference to dwarf2_per_objfile.
1897 (open_dwp_file): Add dwarf2_per_objfile parameter.
1898 (open_and_init_dwp_file): Likewise.
1899 (get_dwp_file): Likewise.
1900 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
1901 (queue_and_load_all_dwo_tus): Update call.
1902 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
1904 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
1905 (dwarf2_ranges_process): Likewise.
1906 (dwarf2_get_pc_bounds): Likewise.
1907 (mark_common_block_symbol_computed): Likewise.
1908 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
1909 (dwarf2_read_abbrevs): Update call.
1910 (read_partial_die): Use dwarf2_per_objfile from cu.
1911 (find_partial_die): Likewise.
1912 (fixup_partial_die): Likewise.
1913 (read_attribute_value): Likewise.
1914 (read_indirect_string_at_offset_from): Add objfile parameter.
1915 (read_indirect_string_at_offset): Add dwarf2_per_objfile
1917 (read_indirect_string_from_dwz): Add objfile parameter.
1918 (read_indirect_string): Add objfile parameter.
1919 (read_addr_index_1): Add dwarf2_per_objfile parameter.
1920 (read_addr_index): Use dwarf2_per_objfile from cu.
1921 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
1923 (read_str_index): Use dwarf2_per_objfile from cu.
1924 (get_debug_line_section): Likewise.
1925 (read_formatted_entries): Add dwarf2_per_objfile parameter.
1926 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
1927 (new_symbol_full): Use dwarf2_per_objfile from cu.
1928 (build_error_marker_type): Likewise.
1929 (lookup_die_type): Likewise.
1930 (determine_prefix): Likewise.
1931 (follow_die_offset): Likewise.
1932 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
1933 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
1934 (dwarf2_fetch_die_type_sect_off): Likewise.
1935 (dwarf2_get_die_type): Likewise.
1936 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
1937 (get_signatured_type): Likewise.
1938 (get_DW_AT_signature_type): Likewise.
1939 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
1940 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
1941 (cu_debug_loc_section): Likewise.
1942 (fill_in_loclist_baton): Likewise.
1943 (dwarf2_symbol_mark_computed): Likewise.
1944 (dwarf2_find_containing_comp_unit): Change objfile parameter to
1946 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
1948 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
1949 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
1950 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
1951 (set_die_type): Use dwarf2_free_objfile from cu.
1952 (get_die_type_at_offset): Likewise.
1953 (dwarf2_per_objfile_free): Don't assign global variable.
1954 (debug_names) <constructor>: Add dwarf2_per_objfile
1955 parameter, update m_debugstrlookup construction.
1956 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
1958 <m_dwarf2_per_objfile>: New field.
1959 <lookup>: Use m_dwarf2_per_objfile.
1960 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
1961 (psyms_seen_size): Likewise.
1962 (write_gdbindex): Replace objfile parameter with
1964 (write_debug_names): Likewise.
1965 (write_psymtabs_to_index): Likewise.
1966 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
1969 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
1971 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
1972 <dwarf2_per_objfile>: New field.
1973 (struct dwarf2_per_cu_data) <objfile>: Remove.
1974 <dwarf2_per_objfile>: New field.
1975 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
1977 (create_signatured_type_table_from_index): Likewise.
1978 (create_debug_type_hash_table): Likewise.
1979 (fill_in_sig_entry_from_dwo_entry): Likewise.
1980 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
1981 (create_type_unit_group): Assign dwarf2_per_objfile instead of
1983 (create_partial_symtab): Access objfile through
1985 (process_psymtab_comp_unit_reader): Likewise.
1986 (read_comp_units_from_section): Likewise.
1987 (scan_partial_symbols): Likewise.
1988 (add_partial_symbol): Likewise.
1989 (add_partial_subprogram): Likewise.
1990 (peek_die_abbrev): Likewise.
1991 (fixup_go_packaging): Likewise.
1992 (process_full_comp_unit): Likewise.
1993 (process_full_type_unit): Likewise.
1994 (process_imported_unit_die): Likewise.
1995 (dwarf2_compute_name): Likewise.
1996 (dwarf2_physname): Likewise.
1997 (read_import_statement): Likewise.
1998 (create_cus_hash_table): Assign dwarf2_physname instead of
2000 (read_func_scope): Access objfile through dwarf2_per_objfile.
2001 (read_lexical_block_scope): Likewise.
2002 (read_call_site_scope): Likewise.
2003 (read_variable): Likewise.
2004 (dwarf2_rnglists_process): Likewise.
2005 (dwarf2_ranges_process): Likewise.
2006 (dwarf2_ranges_read): Likewise.
2007 (dwarf2_record_block_ranges): Likewise.
2008 (dwarf2_add_field): Likewise.
2009 (dwarf2_add_member_fn): Likewise.
2010 (read_structure_type): Likewise.
2011 (process_structure_scope): Likewise.
2012 (read_enumeration_type): Likewise.
2013 (read_array_type): Likewise.
2014 (read_common_block): Likewise.
2015 (read_namespace_type): Likewise.
2016 (read_namespace): Likewise.
2017 (read_module_type): Likewise.
2018 (read_tag_pointer_type): Likewise.
2019 (read_tag_ptr_to_member_type): Likewise.
2020 (read_tag_string_type): Likewise.
2021 (read_subroutine_type): Likewise.
2022 (read_typedef): Likewise.
2023 (read_base_type): Likewise.
2024 (attr_to_dynamic_prop): Likewise.
2025 (read_subrange_type): Likewise.
2026 (read_unspecified_type): Likewise.
2027 (load_partial_dies): Likewise.
2028 (read_partial_die): Likewise.
2029 (find_partial_die): Likewise.
2030 (guess_partial_die_structure_name): Likewise.
2031 (fixup_partial_die): Likewise.
2032 (read_attribute_value): Likewise.
2033 (read_addr_index_from_leb128): Likewise.
2034 (dwarf2_read_addr_index): Likewise.
2035 (dwarf2_string_attr): Likewise.
2036 (lnp_state_machine::check_line_address): Likewise.
2037 (dwarf_decode_lines_1): Likewise.
2038 (dwarf_decode_lines): Likewise.
2039 (dwarf2_start_symtab): Likewise.
2040 (var_decode_location): Likewise.
2041 (new_symbol_full): Likewise.
2042 (dwarf2_const_value_data): Likewise.
2043 (dwarf2_const_value_attr): Likewise.
2044 (dwarf2_const_value): Likewise.
2045 (die_type): Likewise.
2046 (die_containing_type): Likewise.
2047 (lookup_die_type): Likewise.
2048 (guess_full_die_structure_name): Likewise.
2049 (anonymous_struct_prefix): Likewise.
2050 (dwarf2_name): Likewise.
2051 (follow_die_ref_or_sig): Likewise.
2052 (follow_die_offset): Likewise.
2053 (follow_die_ref): Likewise.
2054 (dwarf2_fetch_die_loc_sect_off): Likewise.
2055 (dwarf2_fetch_constant_bytes): Likewise.
2056 (dwarf2_fetch_die_type_sect_off): Likewise.
2057 (dwarf2_get_die_type): Likewise.
2058 (follow_die_sig): Likewise.
2059 (decode_locdesc): Likewise.
2060 (dwarf2_per_cu_objfile): Likewise.
2061 (dwarf2_per_cu_text_offset): Likewise.
2062 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
2064 (set_die_type): Access objfile through
2067 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2069 * valprint.c (converted_character_d): Remove typedef.
2070 (DEF_VEC_O (converted_character_d)): Remove.
2071 (count_next_character): Use std::vector.
2072 (print_converted_chars_to_obstack): Likewise.
2073 (generic_printstr): Likewise.
2075 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2077 * xml-support.h (struct gdb_xml_value): Add constructor.
2078 <value>: Change type to unique_xmalloc_ptr.
2079 (gdb_xml_value_s): Remove typedef.
2080 (DEF_VEC_O (gdb_xml_value_s)): Remove.
2081 (gdb_xml_element_start_handler): Change parameter type to
2083 (xml_find_attribute): Likewise.
2084 * xml-support.c (xml_find_attribute): Change parameter type to
2085 std::vector and adjust.
2086 (gdb_xml_values_cleanup): Remove.
2087 (gdb_xml_parser::start_element): Adjust to std::vector.
2088 (xinclude_start_include): Change paraeter type to std::vector
2090 * btrace.c (check_xml_btrace_version): Likewise.
2091 (parse_xml_btrace_block): Likewise.
2092 (parse_xml_btrace_pt_config_cpu): Likewise.
2093 (parse_xml_btrace_pt): Likewise.
2094 (parse_xml_btrace_conf_bts): Likewise.
2095 (parse_xml_btrace_conf_pt): Likewise.
2096 * memory-map.c (memory_map_start_memory): Likewise.
2097 (memory_map_start_property): Likewise.
2098 * osdata.c (osdata_start_osdata): Likewise.
2099 (osdata_start_item): Likewise.
2100 (osdata_start_column): Likewise.
2101 * remote.c (start_thread): Likewise.
2102 * solib-aix.c (library_list_start_library): Likewise.
2103 (library_list_start_list): Likewise.
2104 * solib-svr4.c (library_list_start_library): Likewise.
2105 (svr4_library_list_start_list): Likewise.
2106 * solib-target.c (library_list_start_segment): Likewise.
2107 (library_list_start_section): Likewise.
2108 (library_list_start_library): Likewise.
2109 (library_list_start_list): Likewise.
2110 * tracepoint.c (traceframe_info_start_memory): Likewise.
2111 (traceframe_info_start_tvar): Likewise.
2112 * xml-syscall.c (syscall_start_syscall): Likewise.
2113 * xml-tdesc.c (tdesc_start_target): Likewise.
2114 (tdesc_start_feature): Likewise.
2115 (tdesc_start_reg): Likewise.
2116 (tdesc_start_union): Likewise.
2117 (tdesc_start_struct): Likewise.
2118 (tdesc_start_flags): Likewise.
2119 (tdesc_start_enum): Likewise.
2120 (tdesc_start_field): Likewise.
2121 (tdesc_start_enum_value): Likewise.
2122 (tdesc_start_vector): Likewise.
2124 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2126 * extension.h (struct xmethod_worker) <clone>: Remove.
2127 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
2129 (python_xmethod_worker::clone): Remove.
2130 * valops.c (find_overload_match): Use std::move instead of
2133 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2135 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
2136 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
2137 <free_xmethod_worker_data>: Remove.
2138 <get_matching_xmethod_workers>: Chance VEC to std::vector.
2139 <get_xmethod_arg_types>: Remove.
2140 <get_xmethod_result_type>: Remove.
2141 <invoke_xmethod>: Remove.
2142 * extension.c (new_xmethod_worker): Remove.
2143 (clone_xmethod_worker): Remove.
2144 (get_matching_xmethod_workers): Return void, pass std::vector by
2146 (get_xmethod_arg_types): Rename to...
2147 (xmethod_worker::get_arg_types): ... this, and adjust.
2148 (get_xmethod_result_type): Rename to...
2149 (xmethod_worker::get_result_type): ... this, and adjust.
2150 (invoke_xmethod): Remove.
2151 (free_xmethod_worker): Remove.
2152 (free_xmethod_worker_vec): Remove.
2153 * extension.h (enum ext_lang_rc): Move here from
2155 (struct xmethod_worker): Add constructor and destructor.
2158 <invoke, clone, do_get_result_type, do_get_arg_types>: New
2159 virtual pure methods.
2160 <get_arg_types, get_result_type>: New methods.
2161 (xmethod_worker_ptr): Remove typedef.
2162 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
2163 (xmethod_worker_vec): Remove typedef.
2164 (xmethod_worker_up): New typedef.
2165 (invoke_xmethod): Remove.
2166 (clone_xmethod_worker): Remove.
2167 (free_xmethod_worker): Remove.
2168 (free_xmethod_worker_vec): Remove.
2169 (get_xmethod_arg_types): Remove.
2170 (get_xmethod_result_type): Remove.
2171 * valops.c (find_method_list): Use std::vector, don't use
2172 intermediate vector.
2173 (value_find_oload_method_list): Use std::vector.
2174 (find_overload_match): Use std::vector.
2175 (find_oload_champ): Use std::vector.
2176 * value.c (value_free): Use operator delete.
2177 (value_of_xmethod): Rename to...
2178 (value_from_xmethod): ... this. Don't assign
2179 xmethod_worker::value, take rvalue-reference.
2180 (result_type_of_xmethod): Adjust.
2181 (call_xmethod): Adjust.
2182 * value.h: Include extension.h.
2183 (struct xmethod_worker): Don't forward-declare.
2184 (value_of_xmethod): Rename to...
2185 (value_from_xmethod): ... this, take rvalue-reference.
2186 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
2187 (struct python_xmethod_worker): ... this, add constructor and
2189 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
2190 (gdbpy_free_xmethod_worker_data): Rename to...
2191 (python_xmethod_worker::~python_xmethod_worker): ... this and
2193 (gdbpy_clone_xmethod_worker_data): Rename to...
2194 (python_xmethod_worker::clone): ... this and adjust.
2195 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
2197 (gdbpy_get_xmethod_arg_types): Rename to...
2198 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
2199 (gdbpy_get_xmethod_result_type): Rename to...
2200 (python_xmethod_worker::do_get_result_type): ... this and
2202 (gdbpy_invoke_xmethod): Rename to...
2203 (python_xmethod_worker::invoke): ... this and adjust.
2204 (new_python_xmethod_worker): Rename to...
2205 (python_xmethod_worker::python_xmethod_worker): ... this and
2207 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
2209 (gdbpy_free_xmethod_worker_data): Remove.
2210 (gdbpy_get_matching_xmethod_workers): Use std::vector.
2211 (gdbpy_get_xmethod_arg_types): Remove.
2212 (gdbpy_get_xmethod_result_type): Remove.
2213 (gdbpy_invoke_xmethod): Remove.
2214 * python/python.c (python_extension_ops): Remove obsolete
2217 2018-01-05 Pedro Alves <palves@redhat.com>
2220 * common/signals-state-save-restore.c
2221 (save_original_signals_state): New parameter 'quiet'. Warn if we
2222 find a custom handler preinstalled, instead of internal erroring.
2223 But only warn if !quiet.
2224 * common/signals-state-save-restore.h
2225 (save_original_signals_state): New parameter 'quiet'.
2226 * main.c (captured_main_1): Move save_original_signals_state call
2227 after option handling, and pass QUIET.
2229 2018-01-05 Pedro Alves <palves@redhat.com>
2231 * spu-tdep.c (spu_catch_start): Pass
2232 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
2234 2018-01-05 Pedro Alves <palves@redhat.com>
2237 * ada-lang.c (literal_symbol_name_matcher): New function.
2238 (ada_get_symbol_name_matcher): Use it for
2239 symbol_name_match_type::SEARCH_NAME.
2240 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
2241 it down instead of assuming symbol_name_match_type::FULL.
2242 * block.h (block_lookup_symbol): New parameter 'match_type'.
2243 * c-valprint.c (print_unpacked_pointer): Use
2244 lookup_symbol_search_name instead of lookup_symbol.
2245 * compile/compile-object-load.c (get_out_value_type): Pass down
2246 symbol_name_match_type::SEARCH_NAME.
2247 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
2248 symbol_name_match_type::FULL.
2249 * cp-support.c (cp_get_symbol_name_matcher): Handle
2250 symbol_name_match_type::SEARCH_NAME.
2251 * infrun.c (insert_exception_resume_breakpoint): Use
2252 lookup_symbol_search_name.
2253 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
2254 * psymtab.c (maintenance_check_psymtabs): Use
2255 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
2256 * stack.c (print_frame_args): Use lookup_symbol_search_name and
2258 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
2259 if symbol_name_match_type::SEARCH_NAME.
2260 (lookup_symbol_in_language): Pass down
2261 symbol_name_match_type::FULL.
2262 (lookup_symbol_search_name): New.
2263 (lookup_language_this): Pass down
2264 symbol_name_match_type::SEARCH_NAME.
2265 (lookup_symbol_aux, lookup_local_symbol): New parameter
2266 'match_type'. Pass it down.
2267 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
2268 (lookup_symbol_search_name): New declaration.
2269 (lookup_symbol_in_block): New 'match_type' parameter.
2271 2018-01-05 Pedro Alves <palves@redhat.com>
2274 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
2276 (ada_lookup_symbol): Reimplement in terms of
2277 ada_lookup_symbol_list, bits factored out from
2278 ada_lookup_encoded_symbol.
2280 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2282 * ada-exp.y (write_object_renaming): When subscripting an array
2283 using a symbol as the index, pass the block in call to
2284 ada_lookup_encoded_symbol when looking that symbol up.
2286 2018-01-05 Jerome Guitton <guitton@adacore.com>
2288 * ada-lang.c (ada_array_length): Use ada_index_type instead of
2291 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2293 * ada-lang.c (ada_to_fixed_value_create): Add handling of
2294 the case where VALUE_LVAL (val0) is not lval_memory.
2296 2018-01-05 Xavier Roirand <roirand@adacore.com>
2298 * ada-valprint.c (print_optional_low_bound): Handle
2299 character-indexed array printing like boolean-indexed array
2302 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2304 * NEWS: Create a new section for the next release branch.
2305 Rename the section of the current branch, now that it has
2308 2018-01-05 Joel Brobecker <brobecker@adacore.com>
2310 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
2311 * version.in: Bump version to 8.1.50.DATE-git.
2313 2018-01-03 Xavier Roirand <roirand@adacore.com>
2315 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
2317 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
2319 (default_exception_support_info) <catch_handlers_sym>: Add field.
2320 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
2321 (ada_exception_name_addr_1): Add "catch handlers" handling.
2322 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
2324 (create_excep_cond_exprs) <ex>: Add parameter.
2325 (re_set_exception): Update create_excep_cond_exprs call.
2326 (print_it_exception, print_one_exception, print_mention_exception)
2327 (print_recreate_exception): Add "catch handler" handling.
2328 (allocate_location_catch_handlers, re_set_catch_handlers)
2329 (check_status_catch_handlers, print_it_catch_handlers)
2330 (print_one_catch_handlers, print_mention_catch_handlers)
2331 (print_recreate_catch_handlers): New function.
2332 (catch_handlers_breakpoint_ops): New variable.
2333 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
2334 Add parameter. Add "catch handler" handling.
2335 (ada_exception_sym_name, ada_exception_breakpoint_ops):
2336 Add "catch handler" handling.
2337 (ada_exception_catchpoint_cond_string): Add "catch handler"
2339 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
2341 (catch_ada_handlers_command): New function.
2342 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
2343 operations structure.
2344 (_initialize_ada_language): Add "catch handlers" command entry.
2345 * NEWS: Document "catch handlers" feature.
2347 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2349 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
2350 account when creating the array type of the slice.
2351 (ada_value_slice): Likewise.
2353 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2355 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
2357 (create_array_type_with_stride): Add byte_stride_prop parameter.
2358 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
2359 New parameter. Update all callers in this file.
2360 (array_type_has_dynamic_stride): New function.
2361 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
2362 of arrays with dynamic byte strides.
2363 * dwarf2read.c (read_array_type): Add support for dynamic
2364 DW_AT_byte_stride attributes.
2366 2018-01-02 Joel Brobecker <brobecker@adacore.com>
2368 * dwarf2read.c (read_unspecified_type): Treat
2369 DW_TAG_enumeration_type DIEs from Ada units as stubs.
2371 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2373 Update copyright year range in all GDB files.
2375 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2377 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
2378 and gdb/testsuite/gdb.base/step-line.c.
2380 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2382 * copyright.py (main): Dump the contents of
2383 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
2384 even if BY_HAND is empty.
2386 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2388 * top.c (print_gdb_version): Update Copyright year in version
2391 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2393 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
2395 For older changes see ChangeLog-2017.
2401 version-control: never