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