Remove new_bfd_ref
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-04-30 Tom Tromey <tom@tromey.com>
2
3 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
4 * gdb_bfd.h (new_bfd_ref): Remove.
5 (gdb_bfd_open): Update comment.
6 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8 (gdb_bfd_fdopenr): Use new_reference.
9 * exec.c (exec_file_attach): Use new_reference.
10
11 2018-04-30 Tom Tromey <tom@tromey.com>
12
13 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
14 method.
15
16 2018-04-30 Tom Tromey <tom@tromey.com>
17
18 * jit.c (jit_read_code_entry): Use type_align.
19 * i386-tdep.c (i386_gdbarch_init): Don't call
20 set_gdbarch_long_long_align_bit.
21 * gdbarch.sh: Remove long_long_align_bit.
22 * gdbarch.c, gdbarch.h: Rebuild.
23 * arc-tdep.c (arc_type_align): New function.
24 (arc_gdbarch_init): Use arc_type_align. Don't call
25 set_gdbarch_long_long_align_bit.
26
27 2018-04-30 Tom Tromey <tom@tromey.com>
28
29 * rust-lang.c (rust_type_alignment): Remove.
30 (rust_composite_type): Use type_align.
31
32 2018-04-30 Tom Tromey <tom@tromey.com>
33
34 * NEWS: Mention Type.align.
35 * python/py-type.c (typy_get_alignof): New function.
36 (type_object_getset): Add "alignof".
37
38 2018-04-30 Tom Tromey <tom@tromey.com>
39
40 PR exp/17095:
41 * NEWS: Update.
42 * std-operator.def (UNOP_ALIGNOF): New operator.
43 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
44 New.
45 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
46 * c-lang.c (c_op_print_tab): Add alignof.
47 * c-exp.y (ALIGNOF): New token.
48 (exp): Add "ALIGNOF" production.
49 (ident_tokens): Add _Alignof and alignof.
50
51 2018-04-30 Tom Tromey <tom@tromey.com>
52
53 * i386-tdep.c (i386_type_align): New function.
54 (i386_gdbarch_init): Update.
55 * gdbarch.sh (type_align): New method.
56 * gdbarch.c, gdbarch.h: Rebuild.
57 * arch-utils.h (default_type_align): Declare.
58 * arch-utils.c (default_type_align): New function.
59 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
60 (struct type) <align_log2>: New field.
61 <instance_flags>: Now a bitfield.
62 (TYPE_RAW_ALIGN): New macro.
63 (type_align, type_raw_align, set_type_align): Declare.
64 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
65 functions.
66 * dwarf2read.c (quirk_rust_enum): Set type alignment.
67 (get_alignment, maybe_set_alignment): New functions.
68 (read_structure_type, read_enumeration_type, read_array_type)
69 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
70 (read_subrange_type, read_base_type): Set type alignment.
71
72 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
73
74 * dwarf2read.c (read_index_from_section): Use bool.
75
76 2018-04-29 Fabian Groffen <grobian@gentoo.org>
77
78 PR gdb/22950
79 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
80 with #ifdef.
81
82 2018-04-29 John Reiser <jreiser@BitWagon.com>
83
84 PR build/22873
85 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
86 last step, and do it atomically.
87
88 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
89
90 * compile/compile-c-types.c (convert_int, convert_float):
91 Update for C FE v1.
92
93 2018-04-27 Tom Tromey <tom@tromey.com>
94
95 PR rust/22545:
96 * rust-lang.c (rust_inclusive_range_type_p): New function.
97 (rust_range): Handle inclusive ranges.
98 (rust_compute_range): Likewise.
99 * rust-exp.y (struct rust_op) <inclusive>: New field.
100 (DOTDOTEQ): New constant.
101 (range_expr): Add "..=" productions.
102 (operator_tokens): Add "..=" token.
103 (ast_range): Add "inclusive" parameter.
104 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
105 ranges.
106 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
107 bounds values.
108 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
109 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
110 Update comments.
111 * expprint.c (print_subexp_standard): Handle new bounds values.
112 (dump_subexp_body_standard): Likewise.
113
114 2018-04-27 Tom Tromey <tom@tromey.com>
115
116 * configure: Rebuild.
117 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
118 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
119 "OVERRIDE".
120 (class symbol_needs_eval_context): Likewise.
121 * dwarf2read.c (mock_mapped_index::symbol_name_count)
122 (mock_mapped_index::symbol_name_at): Use "override". Remove
123 "virtual".
124 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
125 "override".
126 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
127 * aarch64-tdep.c (instruction_reader::read): Use "override".
128 (instruction_reader_test::read): Likewise.
129 * arm-tdep.c (instruction_reader::read): Use "override".
130 (instruction_reader_thumb::read): Likewise.
131
132 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
133
134 PR remote/9665
135 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
136 instead of remote_send.
137 (remote_send): Remove.
138
139 2018-04-26 Pedro Alves <palves@redhat.com>
140
141 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
142 find_function_start_sal instead of find_pc_line.
143
144 2018-04-26 Pedro Alves <palves@redhat.com>
145
146 * breakpoint.c (set_breakpoint_location_function): Handle
147 mst_data_gnu_ifunc.
148 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
149 * elfread.c (elf_symtab_read): Give data symbols with
150 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
151 (elf_rel_plt_read): Update comment.
152 * linespec.c (convert_linespec_to_sals): Handle
153 mst_data_gnu_ifunc.
154 (minsym_found): Handle mst_data_gnu_ifunc.
155 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
156 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
157 * parse.c (find_minsym_type_and_address): Handle
158 mst_data_gnu_ifunc.
159 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
160 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
161 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
162 comment.
163 <mst_data_gnu_ifunc>: New enumerator.
164
165 2018-04-26 Pedro Alves <palves@redhat.com>
166
167 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
168 (lookup_minimal_symbol_by_pc_section): ... this. Replace
169 'want_trampoline' parameter by a lookup_msym_prefer parameter.
170 Handle it.
171 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
172 (lookup_minimal_symbol_by_pc): Adjust.
173 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
174 (lookup_solib_trampoline_symbol_by_pc): Adjust.
175 * minsyms.h (lookup_msym_prefer): New enum.
176 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
177 parameter by a lookup_msym_prefer parameter.
178
179 2018-04-26 Pedro Alves <palves@redhat.com>
180
181 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
182 ends in "@plt" instead of looking at the symbol's section.
183
184 2018-04-26 Pedro Alves <palves@redhat.com>
185
186 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
187 all references.
188 (find_pc_partial_function_gnu_ifunc): Rename to ...
189 (find_pc_partial_function): ... this, and remove references to
190 'is_gnu_ifunc_p'.
191 (find_pc_partial_function): Delete old implementation.
192 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
193
194 2018-04-26 Pedro Alves <palves@redhat.com>
195
196 * linespec.c (struct bound_minimal_symbol_search_key): New.
197 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
198 skip first line if we found a GNU ifunc minimal symbol by name.
199 (compare_msymbols): Change parameters to work with a destructured
200 lhs minsym.
201 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
202 functions.
203
204 2018-04-26 Pedro Alves <palves@redhat.com>
205
206 * breakpoint.c (set_breakpoint_location_function): Don't resolve
207 ifunc targets here. Instead, if we have an ifunc minsym, use its
208 address/name.
209 (add_location_to_breakpoint): Store the minsym and the objfile in
210 the breakpoint location.
211 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
212 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
213 Record the minsym in the sal.
214 * symtab.h (symtab_and_line) <msymbol>: New field.
215
216 2018-04-26 Pedro Alves <palves@redhat.com>
217
218 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
219 unless we actually resolved the ifunc.
220
221 2018-04-26 Pedro Alves <palves@redhat.com>
222
223 * c-exp.y (variable production): Prefer ifunc minsyms over
224 regular function symbols.
225 * symtab.c (find_gnu_ifunc): New function.
226 * minsyms.h (lookup_msym_prefer): New enum.
227 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
228 parameter by a lookup_msym_prefer parameter.
229 * symtab.h (find_gnu_ifunc): New declaration.
230
231 2018-04-26 Pedro Alves <palves@redhat.com>
232
233 * blockframe.c (find_gnu_ifunc_target_type): New function.
234 (find_function_type): New.
235 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
236 return a value with a memory address.
237 (eval_call): For calls to GNU ifunc functions, try to find the
238 type of the target function from the type that the resolver
239 returns.
240 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
241 symbols.
242 * infcall.c (find_function_return_type): Delete.
243 (find_function_addr): Add 'function_type' parameter. For calls to
244 GNU ifunc functions, try to find the type of the target function
245 from the type that the resolver returns, and return it via
246 FUNCTION_TYPE.
247 (call_function_by_hand_dummy): Adjust to use the function type
248 returned by find_function_addr.
249 (find_function_addr): Add 'function_type' parameter and move
250 description here.
251 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
252 declarations.
253
254 2018-04-26 Pedro Alves <palves@redhat.com>
255
256 * c-exp.y (variable production): Skip finding an alias for ifunc
257 symbols.
258
259 2018-04-26 Pedro Alves <palves@redhat.com>
260
261 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
262
263 2018-04-25 Pedro Alves <palves@redhat.com>
264
265 * infcmd.c (kill_command): Print the pid as string, not the whole
266 thread's ptid. Add comment. s/has been killed/killed/ in output
267 message.
268 * remote.c (remote_detach_1): Print the pid as string, not the
269 whole thread's ptid.
270
271 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
272 Sergio Durigan Junior <sergiodj@redhat.com>
273 Pedro Alves <palves@redhat.com>
274
275 * infcmd.c (kill_command): Print message when inferior has
276 been killed.
277 * inferior.c (print_inferior_events): Remove 'static'. Set as
278 '1'.
279 (add_inferior): Improve message printed when
280 'print_inferior_events' is on.
281 (exit_inferior): Remove message printed when
282 'print_inferior_events' is on.
283 (detach_inferior): Improve message printed when
284 'print_inferior_events' is on.
285 (initialize_inferiors): Use 'add_inferior_silent' to set
286 'current_inferior_'.
287 * inferior.h (print_inferior_events): Declare here as
288 'extern'.
289 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
290 '[Detaching...]' messages when 'print_inferior_events' is on.
291 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
292 as prefix/suffix for messages. Remove periods. Fix erroneous
293 'Detaching after fork from child...', replace it by '... from
294 parent...'.
295 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
296 prefix/suffix when printing 'Detaching...' messages. Print
297 them when 'print_inferior_events' is on.
298 * remote.c (remote_detach_1): Print message when detaching
299 from inferior and '!is_fork_parent'.
300
301 2018-04-24 Tom Tromey <tom@tromey.com>
302
303 * cli-out.h: Reindent.
304
305 2018-04-24 Tom Tromey <tom@tromey.com>
306
307 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
308 (cli_ui_out::do_field_string): Use fputs_filtered.
309 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
310
311 2018-04-23 Tom Tromey <tom@tromey.com>
312
313 * guile/scm-frame.c (gdbscm_frame_read_var): Use
314 gdb::unique_xmalloc_ptr.
315
316 2018-04-23 Tom Tromey <tom@tromey.com>
317
318 * configure: Rebuild.
319
320 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
321
322 PR gdb/23095
323 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
324 prepare_for_testing. Set normal_bp to r_debug_state if target
325 is bsd.
326
327 2018-04-21 Pedro Alves <palves@redhat.com>
328 Rajendra SY <rajendra.sy@gmail.com>
329
330 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
331 * remote.c (extended_remote_attach): In all-stop mode, mark the
332 thread as executing.
333
334 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
335
336 * thread.c (thread_apply_all_command): Fix comment.
337 (thread_command): Fix comment.
338
339 2018-04-10 Alan Hayward <alan.hayward@arm.com>
340
341 * common/tdesc.h (tdesc_create_feature): Remove xml filename
342 parameter.
343 * features/aarch64-core.c (create_feature_aarch64_core):
344 Regenerate.
345 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
346 Likewise.
347 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
348 Likewise.
349 * features/i386/32bit-avx512.c
350 (create_feature_i386_32bit_avx512): Likewise.
351 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
352 Likewise.
353 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
354 Likewise.
355 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
356 Likewise.
357 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
358 Likewise.
359 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
360 Likewise.
361 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
362 Likewise.
363 * features/i386/64bit-avx512.c
364 (create_feature_i386_64bit_avx512): Likewise.
365 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
366 Likewise.
367 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
368 Likewise.
369 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
370 Likewise.
371 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
372 Likewise.
373 * features/i386/64bit-segments.c
374 (create_feature_i386_64bit_segments): Likewise.
375 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
376 Likewise.
377 * features/i386/x32-core.c
378 (create_feature_i386_x32_core): Likewise.
379 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
380 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
381 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
382 * target-descriptions.c: In generated code, don't pass xml
383 filename.
384
385 2018-04-18 Alan Hayward <alan.hayward@arm.com>
386
387 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
388 (print_xml_feature::visit_post): Likewise.
389 (print_xml_feature::visit): Likewise.
390 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
391 (print_xml_feature): Add new class.
392 * regformats/regdat.sh: Null xmltarget on feature targets.
393 * target-descriptions.c (struct target_desc): Add xmltarget.
394 (maintenance_check_tdesc_xml_convert): Add unittest function.
395 (tdesc_get_features_xml): Add function to get xml.
396 (maintenance_check_xml_descriptions): Test xml generation.
397 * xml-tdesc.c (string_read_description_xml): Add function.
398 * xml-tdesc.h (string_read_description_xml): Add declaration.
399
400 2018-04-18 Alan Hayward <alan.hayward@arm.com>
401
402 * features/Makefile: Add feature marker to targets with new style
403 target descriptions.
404 * regformats/aarch64.dat: Regenerate.
405 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
406 * regformats/i386/amd64-avx-linux.dat: Likewise.
407 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
408 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
409 * regformats/i386/amd64-linux.dat: Likewise.
410 * regformats/i386/amd64-mpx-linux.dat: Likewise.
411 * regformats/i386/amd64.dat: Likewise.
412 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
413 * regformats/i386/i386-avx-linux.dat: Likewise.
414 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
415 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
416 * regformats/i386/i386-linux.dat: Likewise.
417 * regformats/i386/i386-mmx-linux.dat: Likewise.
418 * regformats/i386/i386-mpx-linux.dat: Likewise.
419 * regformats/i386/i386.dat: Likewise.
420 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
421 * regformats/i386/x32-avx-linux.dat: Likewise.
422 * regformats/i386/x32-linux.dat: Likewise.
423 * regformats/tic6x-c62x-linux.dat: Likewise.
424 * regformats/tic6x-c64x-linux.dat: Likewise.
425 * regformats/tic6x-c64xp-linux.dat: Likewise.
426 * regformats/regdat.sh: Parse feature marker.
427
428 2018-04-18 Alan Hayward <alan.hayward@arm.com>
429
430 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
431 (tdesc_osabi_name): Likewise.
432 * target-descriptions.c (tdesc_architecture_name): Add new
433 function.
434 (tdesc_osabi_name): Likewise.
435
436 2018-04-18 Alan Hayward <alan.hayward@arm.com>
437
438 * common/tdesc.c (tdesc_predefined_type): Move to here.
439 (tdesc_named_type): Likewise.
440 (tdesc_create_vector): Likewise.
441 (tdesc_create_struct): Likewise.
442 (tdesc_set_struct_size): Likewise.
443 (tdesc_create_union): Likewise.
444 (tdesc_create_flags): Likewise.
445 (tdesc_create_enum): Likewise.
446 (tdesc_add_field): Likewise.
447 (tdesc_add_typed_bitfield): Likewise.
448 (tdesc_add_bitfield): Likewise.
449 (tdesc_add_flag): Likewise.
450 (tdesc_add_enum_value): Likewise.
451 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
452 (struct tdesc_type_vector): Likewise.
453 (struct tdesc_type_field): Likewise.
454 (struct tdesc_type_with_fields): Likewise.
455 (tdesc_create_enum): Add declaration.
456 (tdesc_add_typed_bitfield): Likewise.
457 (tdesc_add_enum_value): Likewise.
458 * target-descriptions.c (tdesc_type_field): Move from here.
459 (tdesc_type_builtin): Likewise.
460 (tdesc_type_vector): Likewise.
461 (tdesc_type_with_fields): Likewise.
462 (tdesc_predefined_types): Likewise.
463 (tdesc_named_type): Likewise.
464 (tdesc_create_vector): Likewise.
465 (tdesc_create_struct): Likewise.
466 (tdesc_set_struct_size): Likewise.
467 (tdesc_create_union): Likewise.
468 (tdesc_create_flags): Likewise.
469 (tdesc_create_enum): Likewise.
470 (tdesc_add_field): Likewise.
471 (tdesc_add_typed_bitfield): Likewise.
472 (tdesc_add_bitfield): Likewise.
473 (tdesc_add_flag): Likewise.
474 (tdesc_add_enum_value): Likewise.
475 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
476 (tdesc_add_typed_bitfield): Likewise.
477 (tdesc_add_enum_value): Likewise.
478
479 2018-04-18 Alan Hayward <alan.hayward@arm.com>
480
481 * common/tdesc.c (tdesc_feature::accept): Move to here.
482 (tdesc_feature::operator==): Likewise.
483 (tdesc_create_reg): Likewise.
484 * common/tdesc.h (tdesc_type_kind): Likewise.
485 (struct tdesc_type): Likewise.
486 (struct tdesc_feature): Likewise.
487 * regformats/regdat.sh: Create a feature.
488 * target-descriptions.c (tdesc_type_kind): Move from here.
489 (tdesc_type): Likewise.
490 (tdesc_type_up): Likewise.
491 (tdesc_feature): Likewise.
492 (tdesc_create_reg): Likewise.
493
494 2018-04-18 Alan Hayward <alan.hayward@arm.com>
495
496 * Makefile.in: Add arch/tdesc.c
497 * common/tdesc.c: New file.
498 * common/tdesc.h (tdesc_element_visitor): Move to here.
499 (tdesc_element): Likewise.
500 (tdesc_reg): Likewise.
501 (tdesc_reg_up): Likewise.
502 * regformats/regdef.h (reg): Add offset to constructors.
503 * target-descriptions.c (tdesc_element_visitor): Move from here.
504 (tdesc_element): Likewise.
505 (tdesc_reg): Likewise.
506 (tdesc_reg_up): Likewise.
507
508 2018-04-17 Tom Tromey <tom@tromey.com>
509
510 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
511 discriminant field.
512
513 2018-04-17 Tom Tromey <tom@tromey.com>
514
515 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
516
517 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
518
519 * symtab.c (print_symbol_info): Skip printing filename and line
520 number when `last' is NULL.
521 (symtab_symbol_info): Use empty string instead of NULL for first
522 invocation of print_symbol_info.
523 (rbreak_command): Pass NULL to `last' parameter of
524 print_symbol_info.
525
526 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
527
528 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
529 instead of nullptr.
530
531 2018-04-16 Pedro Alves <palves@redhat.com>
532
533 * MAINTAINERS (sh): Remove.
534 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
535 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
536 (ALLDEPFILES): Remove sh64-tdep.c.
537 * NEWS: Mentions that support for SH-5/SH64 is removed.
538 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
539 (sh*-*-openbsd*): Ditto.
540 (sh64-*-elf*): Remove.
541 (sh*): Remove.
542 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
543 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
544 * sh-tdep.c: No longer include "sh64-tdep.h".
545 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
546 * sh64-tdep.c, sh64-tdep.h: Remove files.
547
548 2018-04-16 Pedro Alves <palves@redhat.com>
549
550 * MAINTAINERS: Remove m88k.
551 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
552 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
553 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
554 * NEWS: Mention that support for m88k was removed.
555 * configure.host (m88*-*-*): Remove support.
556 * configure.nat (m88k-*-*): Remove support.
557 * configure.tgt (m88*-*-openbsd*): Remove.
558 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
559
560 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
561
562 * configure.tgt (x86_tobjs): New variable.
563 (amd64_tobjs, i386_tobjs): Use it.
564
565 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
566
567 * symtab.c (print_symbol_info): Precede the symbol definition by
568 the line number when available.
569 * NEWS: Advertise this enhancement.
570
571 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
572
573 * NEWS (New options): announce set/show record btrace cpu.
574 * btrace.c: Include record-btrace.h.
575 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
576 the vendor is unknown.
577 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
578 Maybe overwrite the btrace configuration's cpu.
579 (btrace_compute_ftrace): Add cpu parameter. Update callers.
580 (btrace_fetch): Add cpu parameter. Update callers.
581 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
582 Maybe overwrite the btrace configuration's cpu. Skip enabling
583 errata workarounds if the vendor is unknown.
584 * python/py-record-btrace.c: Include record-btrace.h.
585 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
586 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
587 * record-btrace.c (record_btrace_cpu_state_kind): New.
588 (record_btrace_cpu): New.
589 (set_record_btrace_cpu_cmdlist): New.
590 (record_btrace_get_cpu): New.
591 (require_btrace_thread, record_btrace_info)
592 (record_btrace_resume_thread): Call record_btrace_get_cpu.
593 (cmd_set_record_btrace_cpu_none): New.
594 (cmd_set_record_btrace_cpu_auto): New.
595 (cmd_set_record_btrace_cpu): New.
596 (cmd_show_record_btrace_cpu): New.
597 (_initialize_record_btrace): Initialize set/show record btrace cpu
598 commands.
599 * record-btrace.h (record_btrace_get_cpu): New.
600
601 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
602
603 * record.c (set_record_command): Fix typo in message.
604
605 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
606
607 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
608
609 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
610
611 * infrun.c (process_event_stop_test): Call
612 gdbarch_in_indirect_branch_thunk.
613 * gdbarch.sh (in_indirect_branch_thunk): New.
614 * gdbarch.c: Regenerated.
615 * gdbarch.h: Regenerated.
616 * x86-tdep.h: New.
617 * x86-tdep.c: New.
618 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
619 (HFILES_NO_SRCDIR): Add x86-tdep.h.
620 (ALLDEPFILES): Add x86-tdep.c.
621 * arch-utils.h (default_in_indirect_branch_thunk): New.
622 * arch-utils.c (default_in_indirect_branch_thunk): New.
623 * i386-tdep: Include x86-tdep.h.
624 (i386_in_indirect_branch_thunk): New.
625 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
626 function.
627 * amd64-tdep: Include x86-tdep.h.
628 (amd64_in_indirect_branch_thunk): New.
629 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
630
631 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
632
633 PR gdb/23053
634 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
635 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
636 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
637 regression.
638
639 2018-04-12 Tom Tromey <tom@tromey.com>
640
641 * rust-lang.c (rust_print_struct_def): Remove univariant code.
642 (rust_evaluate_subexp): Likewise.
643
644 2018-04-12 Pedro Alves <palves@redhat.com>
645
646 * procfs.c (procfs_detach): Make forward declaration's prototype
647 match definition's protototype.
648 (proc_get_LDT_entry): Remove stale do_cleanups call.
649
650 2018-04-12 Pedro Alves <palves@redhat.com>
651
652 * target.h (target_ops::to_has_exited): Delete.
653 (target_has_exited): Delete.
654 * target-delegates.c: Regenerate.
655
656 2018-04-11 Pedro Alves <palves@redhat.com>
657
658 * target.c (fileio_fh_t::t): Add comment.
659 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
660 (target_fileio_close): Handle a NULL target.
661 (invalidate_fileio_fh): New.
662 (target_close): Call it.
663 * remote.c (remote_hostio_send_command): No longer check whether
664 remote_desc is open.
665
666 2018-04-11 Pedro Alves <palves@redhat.com>
667
668 * target.c (fileio_fh_t): Make it a named struct instead of a
669 typedef.
670 (fileio_fh_t::is_closed): New method.
671 (DEF_VEC_O (fileio_fh_t)): Remove.
672 (fileio_fhandles): Now a std::vector.
673 (is_closed_fileio_fh): Delete.
674 (acquire_fileio_fd): Adjust. Rename parameters.
675 (release_fileio_fd): Adjust.
676 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
677 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
678 (target_fileio_close): Adjust.
679
680 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
681
682 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
683 index.
684
685 2018-04-10 Pedro Alves <palves@redhat.com>
686
687 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
688 (scoped_finish_thread_state): New class.
689 * infcmd.c (run_command_1): Use it instead of finish_thread_state
690 cleanup.
691 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
692 (fetch_inferior_event, normal_stop): Likewise.
693 * thread.c (finish_thread_state_cleanup): Delete.
694
695 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
696 Pedro Alves <palves@redhat.com>
697
698 * value.c: Include "selftest.h" and "common/array-view.h".
699 (struct range) <operator ==>: New.
700 (test_ranges_contain): New.
701 (check_ranges_vector): New.
702 (test_insert_into_bit_range_vector): New.
703 (_initialize_values): Register selftests.
704 * common/array-view.h (operator==, operator!=): New.
705
706 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
707
708 * common/gdb_vecs.h (unordered_remove): Add overload that takes
709 an iterator.
710 * inline-frame.c: Include <algorithm>.
711 (struct inline_state): Add constructor.
712 (inline_state_s): Remove.
713 (DEF_VEC_O(inline_state_s)): Remove.
714 (inline_states): Change type to std::vector.
715 (find_inline_frame_state): Adjust to std::vector.
716 (allocate_inline_frame_state): Remove.
717 (clear_inline_frame_state): Adjust to std::vector.
718 (skip_inline_frames): Adjust to std::vector.
719
720 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
721
722 * tracepoint.h (struct trace_state_variable): Add constructor.
723 <name>: Change type to std::string.
724 * tracepoint.c (tsv_s): Remove.
725 (DEF_VEC_O(tsv_s)): Remove.
726 (tvariables): Change to std::vector.
727 (create_trace_state_variable): Adjust to std::vector.
728 (find_trace_state_variable): Likewise.
729 (find_trace_state_variable_by_number): Likewise.
730 (delete_trace_state_variable): Likewise.
731 (trace_variable_command): Adjust to std::string.
732 (delete_trace_variable_command): Likewise.
733 (tvariables_info_1): Adjust to std::vector.
734 (save_trace_state_variables): Likewise.
735 (start_tracing): Likewise.
736 (merge_uploaded_trace_state_variables): Adjust to std::vector
737 and std::string.
738 * target.h (struct target_ops)
739 <to_download_trace_state_variable>: Pass reference to
740 trace_state_variable.
741 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
742 * target-delegates.c: Re-generate.
743 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
744 (mi_tsv_deleted): Likewise.
745 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
746 * remote.c (remote_download_trace_state_variable): Change
747 pointer to reference and adjust.
748 * make-target-delegates (parse_argtypes): Handle references.
749 (write_function_header): Likewise.
750 (munge_type): Likewise.
751
752 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
753
754 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
755 string_view-selftests.c.
756 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
757 testsuite.
758 * unittests/basic_string_view/cons/char/1.cc: Likewise.
759 * unittests/basic_string_view/cons/char/2.cc: Likewise.
760 * unittests/basic_string_view/cons/char/3.cc: Likewise.
761 * unittests/basic_string_view/element_access/char/1.cc:
762 Likewise.
763 * unittests/basic_string_view/element_access/char/empty.cc:
764 Likewise.
765 * unittests/basic_string_view/element_access/char/front_back.cc:
766 Likewise.
767 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
768 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
769 Likewise.
770 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
771 Likewise.
772 * unittests/basic_string_view/modifiers/swap/char/1.cc:
773 Likewise.
774 * unittests/basic_string_view/operations/compare/char/1.cc:
775 Likewise.
776 * unittests/basic_string_view/operations/compare/char/13650.cc:
777 Likewise.
778 * unittests/basic_string_view/operations/copy/char/1.cc:
779 Likewise.
780 * unittests/basic_string_view/operations/data/char/1.cc:
781 Likewise.
782 * unittests/basic_string_view/operations/find/char/1.cc:
783 Likewise.
784 * unittests/basic_string_view/operations/find/char/2.cc:
785 Likewise.
786 * unittests/basic_string_view/operations/find/char/3.cc:
787 Likewise.
788 * unittests/basic_string_view/operations/find/char/4.cc:
789 Likewise.
790 * unittests/basic_string_view/operations/rfind/char/1.cc:
791 Likewise.
792 * unittests/basic_string_view/operations/rfind/char/2.cc:
793 Likewise.
794 * unittests/basic_string_view/operations/rfind/char/3.cc:
795 Likewise.
796 * unittests/basic_string_view/operations/substr/char/1.cc:
797 Likewise.
798 * unittests/basic_string_view/operators/char/2.cc: Likewise.
799 * unittests/string_view-selftests.c: New file.
800
801 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
802
803 * unittests/basic_string_view/capacity/1.cc: New file.
804 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
805 * unittests/basic_string_view/cons/char/1.cc: New file.
806 * unittests/basic_string_view/cons/char/2.cc: New file.
807 * unittests/basic_string_view/cons/char/3.cc: New file.
808 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
809 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
810 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
811 * unittests/basic_string_view/element_access/char/1.cc: New file.
812 * unittests/basic_string_view/element_access/char/2.cc: New file.
813 * unittests/basic_string_view/element_access/char/empty.cc: New file.
814 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
815 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
816 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
817 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
818 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
819 * unittests/basic_string_view/include.cc: New file.
820 * unittests/basic_string_view/inserters/char/1.cc: New file.
821 * unittests/basic_string_view/inserters/char/2.cc: New file.
822 * unittests/basic_string_view/inserters/char/3.cc: New file.
823 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
824 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
825 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
826 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
827 * unittests/basic_string_view/literals/types.cc: New file.
828 * unittests/basic_string_view/literals/values.cc: New file.
829 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
830 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
831 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
832 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
833 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
834 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
835 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
836 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
837 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
838 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
839 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
840 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
841 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
842 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
843 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
844 * unittests/basic_string_view/operations/data/char/1.cc: New file.
845 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
846 * unittests/basic_string_view/operations/find/char/1.cc: New file.
847 * unittests/basic_string_view/operations/find/char/2.cc: New file.
848 * unittests/basic_string_view/operations/find/char/3.cc: New file.
849 * unittests/basic_string_view/operations/find/char/4.cc: New file.
850 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
851 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
852 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
853 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
854 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
855 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
856 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
857 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
858 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
859 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
860 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
861 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
862 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
863 * unittests/basic_string_view/operators/char/2.cc: New file.
864 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
865 * unittests/basic_string_view/range_access/char/1.cc: New file.
866 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
867 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
868 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
869 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
870 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
871 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
872 * unittests/basic_string_view/requirements/typedefs.cc: New file.
873 * unittests/basic_string_view/typedefs.cc: New file.
874 * unittests/basic_string_view/types/1.cc: New file.
875
876 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
877
878 * common/gdb_string_view.h: Remove libstdc++ implementation
879 details, adjust to gdb reality.
880 * common/gdb_string_view.tcc: Likewise.
881 * cli/cli-script.c (struct string_view): Remove.
882 (user_args) <m_args>: Change element type to gdb::string_view.
883 (user_args::insert_args): Adjust.
884
885 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
886
887 * common/gdb_string_view.h: New file.
888 * common/gdb_string_view.tcc: New file.
889
890 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
891
892 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
893 * configure: Re-generate.
894
895 2018-04-09 Pedro Alves <palves@redhat.com>
896
897 * gdbarch.sh: Include "observable.h" instead of "observer.h".
898 (set_target_gdbarch): Call
899 gdb::observers::architecture_changed.notify instead of
900 observer_notify_architecture_changed.
901
902 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
903
904 * tracepoint.c (struct current_traceframe_cleanup): Remove.
905 (do_restore_current_traceframe_cleanup): Remove.
906 (restore_current_traceframe_cleanup_dtor): Remove.
907 (make_cleanup_restore_current_traceframe): Remove.
908 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
909 New.
910 * tracepoint.h (struct scoped_restore_current_traceframe): New.
911 * infrun.c (fetch_inferior_event): Use
912 scoped_restore_current_traceframe.
913
914 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
915
916 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
917 Remove.
918 <n_allocated_type_units>: Remove.
919 <all_type_units>: Change to std::vector.
920 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
921 to std::vector change.
922 (dwarf2_per_objfile::get_cutu): Likewise.
923 (dwarf2_per_objfile::get_tu): Likewise.
924 (create_signatured_type_table_from_index): Likewise.
925 (create_signatured_type_table_from_debug_names): Likewise.
926 (dw2_symtab_iter_next): Likewise.
927 (dw2_print_stats): Likewise.
928 (dw2_expand_all_symtabs): Likewise.
929 (dw2_expand_marked_cus): Likewise.
930 (dw2_debug_names_iterator::next): Likewise.
931 (dwarf2_initialize_objfile): Likewise.
932 (add_signatured_type_cu_to_table): Likewise.
933 (create_all_type_units): Likewise.
934 (add_type_unit): Likewise.
935 (struct tu_abbrev_offset): Add constructor.
936 (build_type_psymtabs_1): Adjust to std::vector change.
937 (print_tu_stats): Likewise.
938 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
939 (write_debug_names): Likewise.
940
941 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
942
943 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
944 Make an std::vector.
945 <n_comp_units>: Remove.
946 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
947 to std::vector change.
948 (dwarf2_per_objfile::get_cutu): Likewise.
949 (dwarf2_per_objfile::get_cu): Likewise.
950 (create_cus_from_index): Likewise.
951 (create_addrmap_from_index): Likewise.
952 (create_addrmap_from_aranges): Likewise.
953 (dwarf2_read_index): Likewise.
954 (dw2_find_last_source_symtab): Likewise.
955 (dw2_map_symtabs_matching_filename): Likewise.
956 (dw2_symtab_iter_next): Likewise.
957 (dw2_print_stats): Likewise.
958 (dw2_expand_all_symtabs): Likewise.
959 (dw2_expand_symtabs_with_fullname): Likewise.
960 (dw2_expand_marked_cus): Likewise.
961 (dw2_map_symbol_filenames): Likewise.
962 (create_cus_from_debug_names): Likewise.
963 (dwarf2_read_debug_names): Likewise.
964 (dw2_debug_names_iterator::next): Likewise.
965 (dwarf2_initialize_objfile): Likewise.
966 (set_partial_user): Likewise.
967 (dwarf2_build_psymtabs_hard): Likewise.
968 (read_comp_units_from_section): Remove arguments, adjust to
969 std::vector change.
970 (create_all_comp_units): Adjust to std::vector and
971 read_comp_units_from_section changes.
972 (dwarf2_find_containing_comp_unit): Adjust to std::vector
973 change.
974 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
975 (psyms_seen_size): Likewise.
976 (write_gdbindex): Likewise.
977 (write_debug_names): Likewise.
978
979 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
982 with dwarf2_per_objfile.
983 (create_cus_from_index): Likewise.
984 (create_signatured_type_table_from_index): Likewise.
985 (dwarf2_read_index): Likewise.
986 (dwarf2_initialize_objfile): Likewise.
987 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
988 per_cu rather than get_dwarf2_per_objfile.
989
990 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
991
992 * dwarf2read.h (struct signatured_type): Forward declare.
993 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
994 New methods.
995 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
996 (dw2_get_cutu): ...this.
997 (dwarf2_per_objfile::get_cu): Rename from...
998 (dw2_get_cu): ...this.
999 (dwarf2_per_objfile::get_tu): New.
1000 (create_addrmap_from_index): Adjust.
1001 (create_addrmap_from_aranges): Adjust.
1002 (dw2_find_last_source_symtab): Adjust.
1003 (dw2_map_symtabs_matching_filename): Adjust.
1004 (dw2_symtab_iter_next): Adjust.
1005 (dw2_print_stats): Adjust.
1006 (dw2_expand_all_symtabs): Adjust.
1007 (dw2_expand_symtabs_with_fullname): Adjust.
1008 (dw2_expand_marked_cus): Adjust.
1009 (dw_expand_symtabs_matching_file_matcher): Adjust.
1010 (dw2_map_symbol_filenames): Adjust.
1011 (dw2_debug_names_iterator::next): Adjust.
1012 (dwarf2_initialize_objfile): Adjust.
1013 (set_partial_user): Adjust.
1014 (dwarf2_build_psymtabs_hard): Adjust.
1015
1016 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1017
1018 * dwarf2read.c (create_signatured_type_table_from_debug_names):
1019 Remove unused variables.
1020 (dw2_map_symtabs_matching_filename): Likewise.
1021 (dwarf2_record_block_ranges): Likewise.
1022 (dwarf2_read_addr_index): Likewise.
1023 (follow_die_offset): Likewise.
1024
1025 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1026
1027 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
1028 to symbol_file_add_main.
1029
1030 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1031
1032 PR mi/22299
1033 * mi/mi-console.c (do_fputc_async_safe): New.
1034 (mi_console_file::write_async_safe): New.
1035 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
1036 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
1037 New.
1038 * ui-file.c (ui_file::putstrn): Adjust call to
1039 fputstrn_unfiltered.
1040 * utils.c (printchar): Replace do_fputs and do_fprintf
1041 parameters by do_fputc.
1042 (fputstr_filtered): Adjust call to printchar.
1043 (fputstr_unfiltered): Likewise.
1044 (fputstrn_filtered): Likewise.
1045 (fputstrn_unfiltered): Add do_fputc parameter, pass to
1046 printchar.
1047 * utils.h (do_fputc_ftype): New typedef.
1048 (fputstrn_unfiltered): Add do_fputc parameter.
1049
1050 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
1051
1052 * regformats/i386/i386-avx.dat: Remove.
1053
1054 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
1055
1056 PR gdb/22979
1057 * amd64-tdep.c (amd64_none_init_abi): New function.
1058 (amd64_x32_none_init_abi): New function.
1059 (_initialize_amd64_tdep): Register handlers for x86-64 and
1060 x64_32 with GDB_OSABI_NONE.
1061 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
1062 GDB_OSABI_NONE osabi.
1063
1064 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
1065
1066 PR gdb/22980
1067 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
1068 GDB_OSABI_NONE.
1069 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
1070 * osabi.c (gdb_osabi_names): Add "unknown" entry.
1071
1072 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
1073
1074 * common/byte-vector.h (char_vector): New type.
1075 * target.h (target_read_alloc): Return
1076 gdb::optional<byte_vector>.
1077 (target_read_stralloc): Return gdb::optional<char_vector>.
1078 (target_get_osdata): Return gdb::optional<char_vector>.
1079 * target.c (target_read_alloc_1): Templatize. Replacement
1080 manual memory management with vector.
1081 (target_read_alloc): Change return type, adjust.
1082 (target_read_stralloc): Change return type, adjust.
1083 (target_get_osdata): Change return type, adjust.
1084 * auxv.c (struct auxv_info) <length>: Remove.
1085 <data>: Change type to gdb::optional<byte_vector>.
1086 (auxv_inferior_data_cleanup): Free auxv_info with delete.
1087 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
1088 (target_auxv_search): Adjust.
1089 (fprint_target_auxv): Adjust.
1090 * avr-tdep.c (avr_io_reg_read_command): Adjust.
1091 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
1092 (linux_make_corefile_notes): Adjust.
1093 * osdata.c (get_osdata): Adjust.
1094 * remote.c (remote_get_threads_with_qxfer): Adjust.
1095 (remote_memory_map): Adjust.
1096 (remote_traceframe_info): Adjust.
1097 (btrace_read_config): Adjust.
1098 (remote_read_btrace): Adjust.
1099 (remote_pid_to_exec_file): Adjust.
1100 * solib-aix.c (solib_aix_get_library_list): Adjust.
1101 * solib-dsbt.c (decode_loadmap): Don't free buf.
1102 (dsbt_get_initial_loadmaps): Adjust.
1103 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
1104 * solib-target.c (solib_target_current_sos): Adjust.
1105 * tracepoint.c (sdata_make_value): Adjust.
1106 * xml-support.c (xinclude_start_include): Adjust.
1107 (xml_fetch_content_from_file): Adjust.
1108 * xml-support.h (xml_fetch_another): Change return type.
1109 (xml_fetch_content_from_file): Change return type.
1110 * xml-syscall.c (xml_init_syscalls_info): Adjust.
1111 * xml-tdesc.c (file_read_description_xml): Adjust.
1112 (fetch_available_features_from_target): Change return type.
1113 (target_fetch_description_xml): Adjust.
1114 (target_read_description_xml): Adjust.
1115
1116 2018-04-06 Tom Tromey <tom@tromey.com>
1117
1118 * value.c (~value): Update.
1119 (struct value) <contents>: Now unique_xmalloc_ptr.
1120 (value_contents_bits_eq, allocate_value_contents)
1121 (value_contents_raw, value_contents_all_raw)
1122 (value_contents_for_printing, value_contents_for_printing_const)
1123 (set_value_enclosing_type): Update.
1124
1125 2018-04-06 Tom Tromey <tom@tromey.com>
1126
1127 * value.c (range_s): Remove typedef, VEC.
1128 (struct range): Add operator<.
1129 (range_lessthan): Remove.
1130 (ranges_contain): Change type.
1131 (~value): Update.
1132 (struct value) <unavailable, optimized_out>: Now std::vector.
1133 (value_entirely_available)
1134 (value_entirely_covered_by_range_vector)
1135 (value_entirely_unavailable, value_entirely_optimized_out):
1136 Update.
1137 (insert_into_bit_range_vector): Change argument type.
1138 (find_first_range_overlap): Likewise.
1139 (struct ranges_and_idx, value_contents_bits_eq)
1140 (require_not_optimized_out, require_available): Update.
1141 (ranges_copy_adjusted): Change argument types.
1142 (value_optimized_out, value_copy, value_fetch_lazy): Update.
1143
1144 2018-04-06 Tom Tromey <tom@tromey.com>
1145
1146 * value.c (~value): Update.
1147 (struct value) <parent>: Now a value_ref_ptr.
1148 (value_parent, set_value_parent, value_address, value_copy):
1149 Update.
1150
1151 2018-04-06 Tom Tromey <tom@tromey.com>
1152
1153 * value.c (struct value): Add constructor, destructor, and member
1154 initializers.
1155 (allocate_value_lazy, value_decref): Update.
1156
1157 2018-04-06 Tom Tromey <tom@tromey.com>
1158
1159 * value.c (struct value) <released, next>: Remove.
1160 (all_values): Now a std::vector.
1161 (allocate_value_lazy): Update.
1162 (value_next): Remove.
1163 (value_mark, value_free_to_mark, release_value)
1164 (value_release_to_mark): Update.
1165
1166 2018-04-06 Tom Tromey <tom@tromey.com>
1167
1168 * value.h (fetch_subexp_value, value_release_to_mark): Update.
1169 (free_value_chain): Remove.
1170 * value.c (free_value_chain): Remove.
1171 (value_release_to_mark): Return a std::vector.
1172 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
1173 std::vector.
1174 (check_condition): Update.
1175 * eval.c (fetch_subexp_value): Change "val_chain" to a
1176 std::vector.
1177 * breakpoint.c (update_watchpoint): Update.
1178 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
1179
1180 2018-04-06 Tom Tromey <tom@tromey.com>
1181
1182 * value.h (free_all_values): Remove.
1183 * value.c (free_all_values): Remove.
1184
1185 2018-04-06 Tom Tromey <tom@tromey.com>
1186
1187 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
1188 (value_history_chain, value_history_count): Remove.
1189 (value_history): New global.
1190 (record_latest_value, access_value_history, show_values)
1191 (preserve_values): Update.
1192
1193 2018-04-06 Tom Tromey <tom@tromey.com>
1194
1195 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
1196 * varobj.c (varobj_set_display_format, varobj_set_value)
1197 (install_default_visualizer, construct_visualizer)
1198 (install_new_value, ~varobj, varobj_get_value_type)
1199 (my_value_of_variable, varobj_editable_p): Update.
1200 * c-varobj.c (c_describe_child, c_value_of_variable)
1201 (cplus_number_of_children, cplus_describe_child): Update.
1202 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
1203 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
1204 (ada_value_of_variable, ada_value_is_changeable_p): Update.
1205
1206 2018-04-06 Tom Tromey <tom@tromey.com>
1207
1208 * printcmd.c (last_examine_address): Change type to
1209 value_ref_ptr.
1210 (do_examine, x_command): Update.
1211
1212 2018-04-06 Tom Tromey <tom@tromey.com>
1213
1214 * value.c (release_value): Update.
1215 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
1216 (struct bpstats) <val>: Now a value_ref_ptr.
1217 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
1218 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
1219 (~watchpoint, print_it_watchpoint, watch_command_1)
1220 (invalidate_bp_value_on_memory_change): Update.
1221
1222 2018-04-06 Tom Tromey <tom@tromey.com>
1223
1224 * varobj.c (varobj_clear_saved_item)
1225 (update_dynamic_varobj_children, install_new_value, ~varobj):
1226 Update.
1227 * value.h (value_incref): Move declaration earlier.
1228 (value_decref): Rename from value_free.
1229 (struct value_ref_policy): New.
1230 (value_ref_ptr): New typedef.
1231 (struct value_deleter): Remove.
1232 (gdb_value_up): Remove typedef.
1233 (release_value): Change return type.
1234 (release_value_or_incref): Remove.
1235 * value.c (set_value_parent): Update.
1236 (value_incref): Change return type.
1237 (value_decref): Rename from value_free.
1238 (value_free_to_mark, free_all_values, free_value_chain): Update.
1239 (release_value): Return value_ref_ptr.
1240 (release_value_or_incref): Remove.
1241 (record_latest_value, set_internalvar, clear_internalvar):
1242 Update.
1243 * stack.c (info_frame_command): Don't call value_free.
1244 * python/py-value.c (valpy_dealloc, valpy_new)
1245 (value_to_value_object): Update.
1246 * printcmd.c (do_examine): Update.
1247 * opencl-lang.c (lval_func_free_closure): Update.
1248 * mi/mi-main.c (register_changed_p): Don't call value_free.
1249 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
1250 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
1251 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
1252 value_free.
1253 * guile/scm-value.c (vlscm_free_value_smob)
1254 (vlscm_scm_from_value): Update.
1255 * frame.c (frame_register_unwind, frame_unwind_register_signed)
1256 (frame_unwind_register_unsigned, get_frame_register_bytes)
1257 (put_frame_register_bytes): Don't call value_free.
1258 * findvar.c (address_from_register): Don't call value_free.
1259 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
1260 * dwarf2loc.c (entry_data_value_free_closure)
1261 (value_of_dwarf_reg_entry, free_pieced_value_closure)
1262 (dwarf2_evaluate_loc_desc_full): Update.
1263 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
1264 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
1265 (~watchpoint, watch_command_1)
1266 (invalidate_bp_value_on_memory_change): Update.
1267 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
1268
1269 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
1270
1271 PR gdb/23022
1272 * warning.m4: Add -Wno-error=deprecated-register.
1273 * configure: Re-generate.
1274
1275 2018-04-05 Tom Tromey <tom@tromey.com>
1276
1277 * linespec.h: Remove include of "vec.h".
1278
1279 2018-04-05 Tom Tromey <tom@tromey.com>
1280
1281 * linespec.c (typep): Remove typedef.
1282 (find_methods, find_superclass_methods): Take a std::vector.
1283 (find_method): Use std::vector.
1284
1285 2018-04-05 Tom Tromey <tom@tromey.com>
1286
1287 * utils.c (compare_strings): Remove.
1288 * utils.h (compare_strings): Remove.
1289 * objc-lang.h (find_imps): Update.
1290 * objc-lang.c (find_methods): Take a std::vector.
1291 (uniquify_strings, find_imps): Likewise.
1292 * linespec.c (find_methods): Take a std::vector.
1293 (decode_objc): Use std::vector.
1294 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
1295 a std::vector.
1296 (find_method, find_function_symbols): Use std::vector.
1297
1298 2018-04-05 Tom Tromey <tom@tromey.com>
1299
1300 * completer.c (completion_tracker::completion_tracker): Remove
1301 cast.
1302 (completion_tracker::discard_completions): Likewise.
1303 * breakpoint.c (ambiguous_names_p): Remove cast.
1304 * ada-lang.c (_initialize_ada_language): Remove cast.
1305 * utils.h (streq): Update.
1306 (streq_hash): Add new declaration.
1307 * utils.c (streq): Return bool.
1308 (streq_hash): New function.
1309
1310 2018-04-05 Tom Tromey <tom@tromey.com>
1311
1312 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
1313 Remove a string copy.
1314
1315 2018-04-05 Tom Tromey <tom@tromey.com>
1316
1317 * linespec.c (filter_results): Use std::vector.
1318 (decode_line_2, decode_line_full): Update.
1319
1320 2018-04-05 Tom Tromey <tom@tromey.com>
1321
1322 * linespec.c (canonical_to_fullform): Return std::string.
1323 (filter_results): Update.
1324 (struct decode_line_2_item): Add constructor.
1325 <fullform, displayform>: Now std::string.
1326 (decode_line_2_compare_items): Now a std::sort comparator.
1327 (decode_line_2): Update.
1328
1329 2018-04-05 Tom Tromey <tom@tromey.com>
1330
1331 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
1332 (unexpected_linespec_error): Update.
1333 (linespec_parse_basic, parse_linespec): Update.
1334
1335 2018-04-05 Tom Tromey <tom@tromey.com>
1336
1337 * linespec.c (linespec_parse_basic): Reindent.
1338
1339 2018-04-05 Tom Tromey <tom@tromey.com>
1340
1341 * minsyms.h (iterate_over_minimal_symbols): Update.
1342 * minsyms.c (iterate_over_minimal_symbols): Take a
1343 gdb::function_view.
1344 * linespec.c (struct collect_minsyms): Remove.
1345 (compare_msyms): Now a std::sort comparator.
1346 (add_minsym): Add parameters.
1347 (search_minsyms_for_name): Update. Use std::vector.
1348
1349 2018-04-03 Tom Tromey <tom@tromey.com>
1350
1351 * mipsread.c (read_alphacoff_dynamic_symtab): Use
1352 gdb::byte_vector.
1353
1354 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
1355
1356 * MAINTAINERS (Write After Approval): Add Weimin Pan.
1357
1358 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
1359
1360 PR gdb/16959
1361 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
1362 printing static type.
1363
1364 2018-04-01 Tom Tromey <tom@tromey.com>
1365
1366 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
1367 (rs6000_xfer_shared_libraries): Update.
1368
1369 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
1370
1371 * common/gdb_vecs.h (char_ptr): Remove.
1372 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
1373
1374 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1375
1376 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
1377 with std::vector.
1378 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
1379
1380 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1381
1382 * tracepoint.h (struct uploaded_tp): Initialize fields.
1383 <actions, step_actions, cmd_strings>: Change type to
1384 std::vector<char *>.
1385 * tracepoint.c (get_uploaded_tp): Allocate with new.
1386 (free_uploaded_tps): Free with delete.
1387 (parse_tracepoint_definition): Adjust to std::vector change.
1388 * breakpoint.c (read_uploaded_action): Likewise.
1389 (create_tracepoint_from_upload): Likewise.
1390 * ctf.c (ctf_write_uploaded_tp): Likewise.
1391 (SET_ARRAY_FIELD): Likewise.
1392 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
1393
1394 2018-03-30 Tom Tromey <tom@tromey.com>
1395
1396 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
1397 std::unique_ptr.
1398 (svr4_keep_data_in_core): Update.
1399 (svr4_read_so_list): Update.
1400
1401 2018-03-30 Tom Tromey <tom@tromey.com>
1402
1403 * windows-nat.c (handle_output_debug_string, handle_exception):
1404 Update.
1405 * target.h (target_read_string): Update.
1406 * target.c (target_read_string): Change "string" to
1407 unique_xmalloc_ptr.
1408 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
1409 Update.
1410 * solib-frv.c (frv_current_sos): Update.
1411 * solib-dsbt.c (dsbt_current_sos): Update.
1412 * solib-darwin.c (darwin_current_sos): Update.
1413 * linux-thread-db.c (inferior_has_bug): Update.
1414 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
1415 Update. Remove alloca.
1416 * ada-lang.c (ada_main_name): Update.
1417
1418 2018-03-30 Tom Tromey <tom@tromey.com>
1419
1420 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
1421 (struct dwo_file_deleter): New.
1422 (dwo_file_up): New typedef.
1423 (open_and_init_dwo_file): Use dwo_file_up.
1424 (free_dwo_file_cleanup): Remove.
1425
1426 2018-03-30 Tom Tromey <tom@tromey.com>
1427
1428 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
1429 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
1430
1431 2018-03-30 Tom Tromey <tom@tromey.com>
1432
1433 * dwarf2read.c (class free_cached_comp_units): New class.
1434 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
1435 (free_cached_comp_units): Remove function.
1436
1437 2018-03-30 Tom Tromey <tom@tromey.com>
1438
1439 * utils.h (make_cleanup_unpush_target): Remove.
1440 * inf-ptrace.c (struct target_unpusher): New.
1441 (target_unpush_up) New typedef.
1442 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
1443 target_unpush_up.
1444 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
1445
1446 2018-03-27 Tom Tromey <tom@tromey.com>
1447
1448 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
1449
1450 2018-03-27 Pedro Alves <palves@redhat.com>
1451 Tom Tromey <tom@tromey.com>
1452
1453 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
1454 destructor. Now a class.
1455 (gdb_readline_wrapper_cleanup): Remove function.
1456 (gdb_readline_wrapper): Remove cleanups.
1457
1458 2018-03-27 Tom Tromey <tom@tromey.com>
1459
1460 * typeprint.h (struct type_print_options) <local_typedefs,
1461 global_typedefs>: Remove "struct" keyword.
1462 (class typedef_hash_table): New class.
1463 (recursively_update_typedef_hash, add_template_parameters)
1464 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
1465 (find_typedef_in_hash): Don't declare.
1466 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
1467 (typedef_hash_table::recursively_update): Rename from
1468 recursively_update_typedef_hash. Now a member.
1469 (typedef_hash_table::add_template_parameters): Rename from
1470 add_template_parameters. Now a member.
1471 (typedef_hash_table::typedef_hash_table): Now a constructor;
1472 rename from create_typedef_hash.
1473 (typedef_hash_table::~typedef_hash_table): Now a destructor;
1474 rename from free_typedef_hash.
1475 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
1476 (do_free_global_table): Remove.
1477 (typedef_hash_table::typedef_hash_table): New constructor; renamed
1478 from copy_type_recursive.
1479 (create_global_typedef_table): Remove.
1480 (typedef_hash_table::find_global_typedef): Now a member of
1481 typedef_hash_table.
1482 (typedef_hash_table::find_typedef): Rename from
1483 find_typedef_in_hash; now a member.
1484 (whatis_exp): Update.
1485 * extension.h (struct ext_lang_type_printers): Add constructor and
1486 destructor.
1487 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
1488 declare.
1489 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
1490 Now a constructor; rename from start_ext_lang_type_printers.
1491 (ext_lang_type_printers): Now a destructor; rename from
1492 free_ext_lang_type_printers.
1493 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
1494 Update.
1495 (c_type_print_base_struct_union): Update. Remove cleanups.
1496
1497 2018-03-27 Tom Tromey <tom@tromey.com>
1498
1499 * dwarf-index-write.c: Include <cmath>.
1500
1501 2018-03-27 Joel Brobecker <brobecker@adacore.com>
1502
1503 * NEWS: Add entry describing new "set|show varsize-limit" command.
1504 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
1505 command.
1506 * printcmd.c (_initialize_printcmd): Add "set var" alias of
1507 "set variable".
1508
1509 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
1510
1511 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
1512 dwarf-index-write.c
1513 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
1514 * dwarf-index-common.c: New file.
1515 * dwarf-index-common.h: New file.
1516 * dwarf-index-write.c: New file.
1517 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
1518 (struct dwarf2_section_info): Move from here.
1519 (dwarf2_section_info_def): Likewise.
1520 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
1521 (offset_type): Likewise.
1522 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
1523 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
1524 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
1525 (byte_swap): Likewise.
1526 (MAYBE_SWAP): Likewise.
1527 (dwarf2_per_cu_ptr): Likewise.
1528 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
1529 (struct tu_stats): Likewise.
1530 (struct dwarf2_per_objfile): Likewise.
1531 (struct dwarf2_per_cu_data): Likewise.
1532 (struct signatured_type): Likewise.
1533 (sig_type_ptr): Likewise.
1534 (DEF_VEC_P (sig_type_ptr)): Likewise.
1535 (INDEX4_SUFFIX): Likewise.
1536 (INDEX5_SUFFIX): Likewise.
1537 (DEBUG_STR_SUFFIX): Likewise.
1538 (dwarf2_read_section): Make non-static.
1539 (mapped_index_string_hash): Move from here.
1540 (dwarf5_djb_hash): Likewise.
1541 (file_write): Likewise.
1542 (class data_buf): Likewise.
1543 (struct symtab_index_entry): Likewise.
1544 (struct mapped_symtab): Likewise.
1545 (find_slot): Likewise.
1546 (hash_expand): Likewise.
1547 (add_index_entry): Likewise.
1548 (uniquify_cu_indices): Likewise.
1549 (class c_str_view): Likewise.
1550 (class c_str_view_hasher): Likewise.
1551 (class vector_hasher): Likewise.
1552 (write_hash_table): Likewise.
1553 (psym_index_map): Likewise.
1554 (struct addrmap_index_data): Likewise.
1555 (add_address_entry): Likewise.
1556 (add_address_entry_worker): Likewise.
1557 (write_address_map): Likewise.
1558 (symbol_kind): Likewise.
1559 (write_psymbols): Likewise.
1560 (struct signatured_type_index_data): Likewise.
1561 (write_one_signatured_type): Likewise.
1562 (recursively_count_psymbols): Likewise.
1563 (recursively_write_psymbols): Likewise.
1564 (class debug_names): Likewise.
1565 (check_dwarf64_offsets): Likewise.
1566 (psyms_seen_size): Likewise.
1567 (write_gdbindex): Likewise.
1568 (write_debug_names): Likewise.
1569 (assert_file_size): Likewise.
1570 (write_psymtabs_to_index): Likewise.
1571 (save_gdb_index_command): Likewise.
1572 (_initialize_dwarf2_read): Don't register the "save gdb-index"
1573 command.
1574 * dwarf2read.h: New file.
1575
1576 2018-03-27 Joel Brobecker <brobecker@adacore.com>
1577
1578 PR gdb/22670
1579 * dwarf2read.c (dwarf2_physname): Do not return the demangled
1580 symbol name if the CU's language stores symbol names in linkage
1581 format.
1582 * language.h (struct language_defn)
1583 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
1584 all instances of this struct.
1585
1586 2018-03-26 Tom Tromey <tom@tromey.com>
1587
1588 * stack.c (backtrace_command_1): Remove verbose code.
1589
1590 2018-03-26 Tom Tromey <tom@tromey.com>
1591
1592 * python/py-framefilter.c (py_print_type): Don't catch
1593 exceptions. Return void.
1594 (py_print_value): Likewise.
1595 (py_print_single_arg): Likewise.
1596 (enumerate_args): Don't catch exceptions.
1597 (py_print_args): Likewise.
1598 (py_print_frame): Likewise.
1599 (gdbpy_apply_frame_filter): Catch exceptions here.
1600
1601 2018-03-26 Tom Tromey <tom@tromey.com>
1602
1603 * stack.c (_initialize_stack): Remove trailing newlines from help
1604 text. Add "Usage" line to "backtrace" help.
1605
1606 2018-03-26 Tom Tromey <tom@tromey.com>
1607
1608 PR python/16486:
1609 * python/py-framefilter.c (py_print_args): Call wrap_hint.
1610
1611 2018-03-26 Tom Tromey <tom@tromey.com>
1612
1613 * python/py-framefilter.c (py_print_single_arg): Return
1614 EXT_LANG_BT_ERROR from catch.
1615
1616 2018-03-26 Tom Tromey <tom@tromey.com>
1617
1618 PR backtrace/15584:
1619 * stack.c (backtrace_command_1): Move some code into no-filters
1620 "if".
1621
1622 2018-03-26 Tom Tromey <tom@tromey.com>
1623
1624 * python/py-framefilter.c (throw_quit_or_print_exception): New
1625 function.
1626 (gdbpy_apply_frame_filter): Use it.
1627
1628 2018-03-26 Tom Tromey <tom@tromey.com>
1629
1630 PR cli/17716:
1631 * python/py-framefilter.c (py_print_type, py_print_value)
1632 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
1633 RETURN_MASK_ERROR.
1634
1635 2018-03-26 Tom Tromey <tom@tromey.com>
1636
1637 * python/py-framefilter.c (enumerate_args): Use
1638 gdb::unique_xmalloc_ptr.
1639
1640 2018-03-26 Tom Tromey <tom@tromey.com>
1641
1642 * python/py-framefilter.c (py_print_frame): Return
1643 EXT_LANG_BT_OK.
1644 (gdbpy_apply_frame_filter): Update comment.
1645 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
1646 Remove.
1647 <EXT_LANG_BT_NO_FILTERS>: Change value.
1648
1649 2018-03-26 Tom Tromey <tom@tromey.com>
1650
1651 PR backtrace/15582:
1652 * stack.c (backtrace_command): Parse "hide" argument.
1653 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
1654 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
1655 constant.
1656
1657 2018-03-26 Tom Tromey <tom@tromey.com>
1658
1659 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
1660 add "flags".
1661 (backtrace_command): Remove "fulltrace", add "flags".
1662
1663 2018-03-26 Tom Tromey <tom@tromey.com>
1664
1665 * stack.c (backtrace_command): Rewrite command line parsing.
1666
1667 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
1668
1669 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
1670
1671 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
1672
1673 * filename-seen-cache.h: Add include guard.
1674
1675 2018-03-26 Keith Seitz <keiths@redhat.com>
1676
1677 * symfile.c (place_section): Remove "struct" from section_addr_info
1678 in comment.
1679 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
1680 "struct" keyword from section_addr_info.
1681
1682 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1683
1684 * regformats/regdef.h (reg): Add constructors.
1685
1686 2018-03-25 Pedro Alves <palves@redhat.com>
1687
1688 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
1689 if then/else bodies in var_func_name extraction.
1690
1691 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
1692
1693 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
1694 lookup_minimal_symbol() to find symbol entry.
1695 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
1696
1697 2018-03-23 Keith Seitz <keiths@redhat.com>
1698
1699 PR c++/22968
1700 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
1701 nested type definitions for C++, too.
1702
1703 2018-03-23 Tom Tromey <tom@tromey.com>
1704
1705 * machoread.c (struct oso_el): Add a constructor. Don't define as
1706 a typedef.
1707 (macho_register_oso): Remove.
1708 (macho_symtab_read): Take a std::vector.
1709 (oso_el_compare_name): Now a std::sort comparator.
1710 (macho_symfile_read_all_oso): Take a std::vector.
1711 (macho_symfile_read): Use std::vector. Remove cleanups.
1712
1713 2018-03-22 Tom Tromey <tom@tromey.com>
1714
1715 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
1716 (record_full_goto_bookmark): Use std::string.
1717
1718 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1719
1720 PR tdep/18295
1721 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
1722 a single mask.
1723
1724 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1725
1726 * rs6000-tdep.c (store_insn_p): New function.
1727 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
1728 and cr_reg to their unshifted values. Use store_insn_p to
1729 match LR saves using either R1 or fdata->alloca_reg. Use
1730 store_insn_p to match CR saves. Set alloca_reg_offset
1731 when alloca_reg and framep are set. Remove lr_reg shift
1732 when assigning to fdata->lr_register.
1733
1734 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1735
1736 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
1737 command line args instead of emitting a warning.
1738
1739 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1740
1741 * tracepoint.h (struct static_tracepoint_marker): Initialize
1742 fields, define default constructor, move constructor and move
1743 assignment, disable the rest.
1744 <str_id, extra>: Make std::string.
1745 (release_static_tracepoint_marker): Remove.
1746 (free_current_marker): Remove.
1747 * tracepoint.c (free_current_marker): Remove.
1748 (parse_static_tracepoint_marker_definition): Adjust to
1749 std::string, use new hex2str overload.
1750 (release_static_tracepoint_marker): Remove.
1751 (print_one_static_tracepoint_marker): Get marker by reference
1752 and adjust to std::string.
1753 (info_static_tracepoint_markers_command): Adjust to std::vector
1754 changes
1755 * target.h (static_tracepoint_marker_p): Remove typedef.
1756 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
1757 (struct target_ops) <to_static_tracepoint_marker_at>: Return
1758 bool.
1759 <to_static_tracepoint_markers_by_strid>: Return std::vector.
1760 * target-debug.h
1761 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
1762 (target_debug_print_std_vector_static_tracepoint_marker): New.
1763 (target_debug_print_struct_static_tracepoint_marker_p): Rename
1764 to...
1765 (target_debug_print_static_tracepoint_marker_p): ... this.
1766 * target-delegates.c: Re-generate.
1767 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
1768 Make std::string.
1769 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
1770 (decode_static_tracepoint_spec): Adjust to std::vector.
1771 (tracepoint_print_one_detail): Adjust to std::string.
1772 (strace_marker_decode_location): Adjust to std::string.
1773 (update_static_tracepoint): Adjust to std::string, remove call
1774 to release_static_tracepoint_marker.
1775 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1776 Adjust to std::vector.
1777 * remote.c (remote_static_tracepoint_marker_at): Return bool.
1778 (remote_static_tracepoint_markers_by_strid): Adjust to
1779 std::vector.
1780 * common/rsp-low.h (hex2str): New overload with explicit count
1781 of bytes.
1782 * common/rsp-low.c (hex2str): New overload with explicit count
1783 of bytes.
1784 * unittests/rsp-low-selftests.c (test_hex2str): New function.
1785 (_initialize_rsp_low_selftests): Add test_hex2str test.
1786 * unittests/tracepoint-selftests.c
1787 (test_parse_static_tracepoint_marker_definition): Adjust to
1788 std::string.
1789
1790 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1791
1792 * tracepoint.c (parse_static_tracepoint_marker_definition):
1793 Consider case where the definition is followed by more
1794 definitions.
1795 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1796 tracepoint-selftests.c.
1797 * unittests/tracepoint-selftests.c: New.
1798
1799 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1800
1801 * MAINTAINERS (Write After Approval): Add Pedro Franco de
1802 Carvalho.
1803
1804 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1805
1806 * symtab.c (find_pc_sect_line): fixed indentation.
1807
1808 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1809
1810 * symtab.c (find_pc_sect_line): now uses binary search.
1811
1812 2018-03-19 Tom Tromey <tom@tromey.com>
1813
1814 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
1815 "IDENT" production.
1816
1817 2018-03-19 Pedro Alves <palves@redhat.com>
1818 Tom Tromey <tom@tromey.com>
1819
1820 * unittests/observable-selftests.c: New file.
1821 * common/observable.h: New file.
1822 * observable.h: New file.
1823 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
1824 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
1825 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
1826 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
1827 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
1828 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
1829 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
1830 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
1831 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
1832 python/py-breakpoint.c, python/py-finishbreakpoint.c,
1833 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
1834 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
1835 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
1836 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
1837 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
1838 tui/tui-interp.c, valops.c: Update all users.
1839 * tui/tui-hooks.c (tui_bp_created_observer)
1840 (tui_bp_deleted_observer, tui_bp_modified_observer)
1841 (tui_inferior_exit_observer, tui_before_prompt_observer)
1842 (tui_normal_stop_observer, tui_register_changed_observer):
1843 Remove.
1844 (tui_observers_token): New global.
1845 (attach_or_detach, tui_attach_detach_observers): New functions.
1846 (tui_install_hooks, tui_remove_hooks): Use
1847 tui_attach_detach_observers.
1848 * record-btrace.c (record_btrace_thread_observer): Remove.
1849 (record_btrace_thread_observer_token): New global.
1850 * observer.sh: Remove.
1851 * observer.c: Rename to observable.c.
1852 * observable.c (namespace gdb_observers): Define new objects.
1853 (observer_debug): Move into gdb_observers namespace.
1854 (struct observer, struct observer_list, xalloc_observer_list_node)
1855 (xfree_observer_list_node, generic_observer_attach)
1856 (generic_observer_detach, generic_observer_notify): Remove.
1857 (_initialize_observer): Update.
1858 Don't include observer.inc.
1859 * Makefile.in (generated_files): Remove observer.h, observer.inc.
1860 (clean mostlyclean): Likewise.
1861 (observer.h, observer.inc): Remove targets.
1862 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
1863 (COMMON_SFILES): Use observable.c, not observer.c.
1864 * .gitignore: Remove observer.h.
1865
1866 2018-03-18 Tom Tromey <tom@tromey.com>
1867
1868 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
1869 gdb::def_vector.
1870 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
1871
1872 2018-03-17 Tom Tromey <tom@tromey.com>
1873
1874 * auto-load.c (auto_load_objfile_script_1): Use std::string.
1875
1876 2018-03-17 Tom Tromey <tom@tromey.com>
1877
1878 * target.c (class scoped_target_fd): New.
1879 (target_fileio_close_cleanup): Remove.
1880 (target_fileio_read_alloc_1): Use scoped_target_fd.
1881
1882 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * silent-rules.mk: New.
1885 * Makefile.in: Include silent-rules.mk
1886 (srcdir, VPATH, top_srcdir): Move up.
1887 (COMPILE): Add ECHO_CXX.
1888 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
1889 (init.c): Add ECHO_INIT_C.
1890 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1891 (version.c): Add ECHO_GEN.
1892 (printcmd.o): Add ECHO_CXX.
1893 (target-float.o): Add ECHO_CXX.
1894 (ada-exp.o): Add ECHO_CXX.
1895 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
1896 (insight$(EXEEXT)): Add ECHO_CXXLD.
1897 * gnulib/configure.ac: Add AM_SILENT_RULES.
1898 * gnulib/aclocal.m4: Re-generate.
1899 * gnulib/configure: Re-generate.
1900 * gnulib/import/Makefile.in: Re-generate.
1901
1902 2018-03-16 Tom Tromey <tom@tromey.com>
1903
1904 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
1905 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
1906 * utils.c (do_free_section_addr_info)
1907 (make_cleanup_free_section_addr_info): Remove.
1908 * symfile.h (struct other_sections): Add constructor.
1909 (struct section_addr_info): Remove.
1910 (section_addr_info): New typedef.
1911 (struct sym_fns) <sym_offsets>: Change type of parameter.
1912 (build_section_addr_info_from_objfile)
1913 (relative_addr_info_to_section_offsets, addr_info_make_relative)
1914 (default_symfile_offsets, symbol_file_add)
1915 (symbol_file_add_from_bfd)
1916 (build_section_addr_info_from_section_table): Update.
1917 (alloc_section_addr_info, free_section_addr_info): Don't declare.
1918 * symfile.c (alloc_section_addr_info): Remove.
1919 (build_section_addr_info_from_section_table): Change return type.
1920 Update.
1921 (build_section_addr_info_from_bfd)
1922 (build_section_addr_info_from_objfile): Likewise.
1923 (free_section_addr_info): Remove.
1924 (relative_addr_info_to_section_offsets): Change type of "addrs".
1925 (addrs_section_compar): Now a std::sort comparator.
1926 (addrs_section_sort): Change return type.
1927 (addr_info_make_relative): Change type of "addrs". Update.
1928 (default_symfile_offsets, syms_from_objfile_1)
1929 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
1930 (symbol_file_add_separate): Update.
1931 (symbol_file_add): Change type of "addrs". Update.
1932 (add_symbol_file_command): Update. Remove cleanups.
1933 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
1934 cleanups.
1935 * symfile-debug.c (debug_sym_offsets): Change type of "info".
1936 * solib.c (solib_read_symbols): Update.
1937 * objfiles.c (objfile_relocate): Update. Remove cleanups.
1938 * machoread.c (macho_symfile_offsets): Update.
1939 * jit.c (jit_bfd_try_read_symtab): Update.
1940
1941 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
1942
1943 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1944 unittests/utils-selftests.c.
1945 * unittests/utils-selftests.c: New file.
1946
1947 2018-03-14 Tom Tromey <tom@tromey.com>
1948
1949 PR cli/14977:
1950 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
1951 for NULL.
1952
1953 2018-03-14 Tom Tromey <tom@tromey.com>
1954
1955 PR cli/19918:
1956 * printcmd.c (printf_pointer): Allow "-" in format.
1957
1958 2018-03-14 Tom Tromey <tom@tromey.com>
1959
1960 * printcmd.c (_initialize_printcmd): Add usage to printf.
1961
1962 2018-03-14 Yao Qi <qiyao@sourceware.org>
1963
1964 * MAINTAINERS: Update my email address.
1965
1966 2018-03-13 Tom Tromey <tom@tromey.com>
1967
1968 * machoread.c (macho_check_dsym): Change filenamep to a
1969 std::string*.
1970 (macho_symfile_read): Update.
1971 * symfile.c (load_command): Use std::string.
1972
1973 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
1974
1975 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
1976 to error message string.
1977 (riscv_register_name): Use xsnprintf instead of sprintf.
1978 (riscv_insn::fetch_instruction): Use gdb_assert instead of
1979 internal_error.
1980 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
1981 error.
1982 (riscv_push_dummy_call): Likewise.
1983
1984 2018-03-12 Tom Tromey <tom@tromey.com>
1985
1986 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
1987 Use gdb::byte_vector.
1988 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
1989
1990 2018-03-12 Yao Qi <yao.qi@linaro.org>
1991
1992 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
1993 parameter type to readable_regcache.
1994 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
1995 the declaration.
1996
1997 2018-03-11 Tom Tromey <tom@tromey.com>
1998
1999 * dwarf2read.c (struct nextfield): Add initializers.
2000 (struct nextfnfield): Remove.
2001 (struct fnfieldlist): Add initializers. Remove "length" and
2002 "head", use std::vector.
2003 (struct decl_field_list): Remove.
2004 (struct field_info): Add initializers.
2005 <fields, baseclasses>: Now std::vector.
2006 <nbaseclasses, nfnfields, typedef_field_list_count,
2007 nested_types_list_count>: Remove.
2008 (dwarf2_add_field, dwarf2_add_type_defn)
2009 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
2010 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
2011 (process_structure_scope): Update.
2012
2013 2018-03-11 Tom Tromey <tom@tromey.com>
2014
2015 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
2016 for use by std::sort.
2017 (build_type_psymtabs_1): Use std::vector.
2018
2019 2018-03-09 Eli Zaretskii <eliz@gnu.org>
2020
2021 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
2022 and LIBMPFR in the printed configuration.
2023
2024 2018-03-08 Tom Tromey <tom@tromey.com>
2025
2026 * source.c (get_filename_and_charpos): Use scoped_fd.
2027 * nto-procfs.c (procfs_open_1): Use scoped_fd.
2028 (procfs_pidlist): Likewise.
2029 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
2030 (iterate_over_mappings): Likewise.
2031
2032 2018-03-08 Tom Tromey <tom@tromey.com>
2033
2034 * infcall.c (struct call_return_meta_info)
2035 <stack_temporaries_enabled>: Remove.
2036 (get_call_return_value, call_function_by_hand_dummy): Update.
2037 * thread.c (disable_thread_stack_temporaries): Remove.
2038 (enable_thread_stack_temporaries): Remove.
2039 (thread_stack_temporaries_enabled_p): Return bool.
2040 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
2041 (get_last_thread_stack_temporary): Update.
2042 * eval.c (evaluate_subexp): Update.
2043 * gdbthread.h (class enable_thread_stack_temporaries): Now a
2044 class, not a function.
2045 (value_ptr, value_vec): Remove typedefs.
2046 (class thread_info) <stack_temporaries_enabled>: Now bool.
2047 <stack_temporaries>: Now a std::vector.
2048 (thread_stack_temporaries_enabled_p)
2049 (value_in_thread_stack_temporaries): Return bool.
2050
2051 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
2052
2053 * remote.c (putpkt_binary): Fix omitted bytes reporting.
2054 (getpkt_or_notif_sane_1): Likewise.
2055
2056 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2057
2058 * build-id.c (build_id_to_debug_bfd): Use std::string.
2059
2060 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2061
2062 * build-id.c (find_separate_debug_file_by_buildid): Return
2063 std::string.
2064 * build-id.h (find_separate_debug_file_by_buildid): Return
2065 std::string.
2066 * coffread.c (coff_symfile_read): Adjust to std::string.
2067 * elfread.c (elf_symfile_read): Adjust to std::string.
2068 * symfile.c (separate_debug_file_exists): Change parameter to
2069 std::string.
2070 (find_separate_debug_file): Return std::string.
2071 (find_separate_debug_file_by_debuglink): Return std::string.
2072 * symfile.h (find_separate_debug_file_by_debuglink): Return
2073 std::string.
2074
2075 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2076
2077 * common/xml-utils.c (xml_escape_text): Move code to...
2078 (xml_escape_text_append): ... this new function.
2079 * common/xml-utils.h (xml_escape_text_append): New declaration.
2080 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
2081 New function.
2082 (_initialize_xml_utils): register test_xml_escape_text_append as
2083 a selftest.
2084
2085 2018-03-07 Alan Hayward <alan.hayward@arm.com>
2086
2087 * defs.h: Remove MAX_REGISTER_SIZE.
2088 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
2089 asserts.
2090 * python/py-unwind.c (pyuw_sniffer): Likewise.
2091
2092 2018-03-07 Tom Tromey <tom@tromey.com>
2093
2094 * linux-tdep.c (linux_info_proc): Update.
2095 * target.h (struct target_ops) <to_fileio_readlink>: Return
2096 optional<string>.
2097 (target_fileio_readlink): Return optional<string>.
2098 * remote.c (remote_hostio_readlink): Return optional<string>.
2099 * inf-child.c (inf_child_fileio_readlink): Return
2100 optional<string>.
2101 * target.c (target_fileio_readlink): Return optional<string>.
2102
2103 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
2104
2105 * regcache.c (cooked_read_test): Add riscv to the list of
2106 architectures that have a save_reggroup.
2107
2108 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
2109
2110 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
2111 value is not a dynamic class object.
2112
2113 2018-03-06 Tom Tromey <tom@tromey.com>
2114
2115 * rust-exp.y: Formatting fixes.
2116
2117 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2118
2119 * riscv-tdep.c (riscv_register_name): Remove target description
2120 support.
2121 (riscv_gdbarch_init): Remove target description check.
2122
2123 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2124
2125 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
2126 comment.
2127 * riscv-tdep.h: Likewise.
2128
2129 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2130
2131 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
2132 (riscv_pseudo_register_write): Delete.
2133 (riscv_gdbarch_init): Remove all use of pseudo registers.
2134
2135 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
2136
2137 * record-btrace.c (btrace_print_lines): Replace cleanup
2138 parameter with RAII equivalents.
2139 (btrace_insn_history): Replace cleanup with RAII equivalents.
2140 * ui-out.h (make_cleanup_ui_out_list_begin_end,
2141 make_cleanup_ui_out_tuple_begin_end): Remove.
2142 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
2143 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
2144 make_cleanup_ui_out_list_begin_end): Remove.
2145
2146 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
2147
2148 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
2149 parameter types to std::vector. Use bool.
2150 (record_btrace_wait): Replace VEC(tp_t) with
2151 std::vector<thread_info *>.
2152 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
2153
2154 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
2155
2156 * record-btrace.c (record_btrace_disable_callback): Remove.
2157 (struct scoped_btrace_disable): New.
2158 (record_btrace_open): Use scoped_btrace_disable.
2159
2160 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2161
2162 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
2163 reading values from registers.
2164
2165 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2166
2167 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
2168 where appropriate.
2169
2170 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2171
2172 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
2173 change parameter type. Use GDB's print functions, and use
2174 core_addr_to_string where appropriate.
2175 (riscv_push_dummy_call): Use core_addr_to_string where
2176 appropriate, update call to riscv_print_arg_location, and reindent
2177 a few lines.
2178 (riscv_return_value): Update call to riscv_print_arg_location.
2179
2180 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2181 Tim Newsome <tim@sifive.com>
2182 Albert Ou <a0u@eecs.berkeley.edu>
2183 Darius Rad <darius@bluespec.com>
2184
2185 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
2186 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
2187 (ALLDEPFILES): Add riscv-tdep.c
2188 * configure.tgt: Add riscv support.
2189 * riscv-tdep.c: New file.
2190 * riscv-tdep.h: New file.
2191 * NEWS: Mention new target.
2192 * MAINTAINERS: Add entry for riscv.
2193
2194 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2195
2196 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
2197 fields within aggregates.
2198
2199 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
2200
2201 * record-btrace.c (btrace_print_lines): Change type of flags to
2202 gdb_disassembly_flags.
2203
2204 2018-03-04 John Baldwin <jhb@FreeBSD.org>
2205
2206 * fbsd-nat.c: Include "inf-ptrace.h".
2207 (USE_SIGTRAP_SIGINFO): Conditionally define.
2208 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
2209 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
2210 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
2211 function.
2212 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
2213 Likewise.
2214 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
2215 Likewise.
2216 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
2217 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
2218 "supports_stopped_by_hw_breakpoint" target methods.
2219
2220 2018-03-04 John Baldwin <jhb@FreeBSD.org>
2221
2222 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
2223 * fbsd-nat.c (debug_fbsd_nat): New variable.
2224 (show_fbsd_nat_debug): New function.
2225 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
2226 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
2227
2228 2018-03-04 John Baldwin <jhb@FreeBSD.org>
2229
2230 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
2231 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
2232 prototype.
2233 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
2234 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
2235 method.
2236
2237 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2238
2239 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
2240 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
2241
2242 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2243
2244 * charset.c (struct charset_vector): New.
2245 (charsets): Change type to charset_vector.
2246 (find_charset_names): Adjust.
2247 (add_one): Adjust.
2248 (_initialize_charset): Adjust.
2249
2250 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2251
2252 * progspace.h (struct program_space) <deleted_solibs>: Change
2253 type to std::vector<std::string>.
2254 * progspace.c (clear_program_space_solib_cache): Adjust.
2255 * breakpoint.c (print_solib_event): Adjust.
2256 (check_status_catch_solib): Adjust.
2257 * solib.c (update_solib_list): Adjust.
2258 * ui-out.h (class ui_out) <field_string>: New overload.
2259 * ui-out.c (ui_out::field_string): New overload.
2260
2261 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2262
2263 * progspace.h (struct program_space): Add constructor and
2264 destructor, initialize fields.
2265 (add_program_space): Remove.
2266 * progspace.c (add_program_space): Rename to...
2267 (program_space::program_space): ... this.
2268 (release_program_space): Rename to...
2269 (program_space::~program_space): ... this.
2270 (delete_program_space): Use delete to delete program_space.
2271 (initialize_progspace): Use new to allocate program_space.
2272 * inferior.c (add_inferior_with_spaces): Likewise.
2273 (clone_inferior_command): Likewise.
2274 * infrun.c (follow_fork_inferior): Likewise.
2275 (handle_vfork_child_exec_or_exit): Likewise.
2276
2277 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2278
2279 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
2280 (delim_string_to_char_ptr_vec): Return std::vector of
2281 gdb::unique_xmalloc_ptr.
2282 (dirnames_to_char_ptr_vec_append): Take std::vector of
2283 gdb::unique_xmalloc_ptr.
2284 (dirnames_to_char_ptr_vec): Return std::vector of
2285 gdb::unique_xmalloc_ptr.
2286 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
2287 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
2288 (delim_string_to_char_ptr_vec): Return an std::vector of
2289 gdb::unique_xmalloc_ptr, adjust the code.
2290 (dirnames_to_char_ptr_vec_append): Take an std::vector of
2291 gdb::unique_xmalloc_ptr, adjust the code.
2292 (dirnames_to_char_ptr_vec): Return an std::vector of
2293 gdb::unique_xmalloc_ptr, adjust the code.
2294 * auto-load.c (auto_load_safe_path_vec): Change type to
2295 std::vector of gdb::unique_xmalloc_ptr.
2296 (auto_load_expand_dir_vars): Return an std::vector of
2297 gdb::unique_xmalloc_ptr, adjust the code.
2298 (auto_load_safe_path_vec_update): Adjust.
2299 (filename_is_in_auto_load_safe_path_vec): Adjust.
2300 (auto_load_objfile_script_1): Adjust.
2301 * build-id.c (build_id_to_debug_bfd): Adjust.
2302 * linux-thread-db.c (thread_db_load_search): Adjust.
2303 * source.c (add_path): Adjust.
2304 (openp): Adjust.
2305 * symfile.c (find_separate_debug_file): Adjust.
2306 * utils.c (do_free_char_ptr_vec): Remove.
2307 (make_cleanup_free_char_ptr_vec): Remove.
2308
2309 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
2310
2311 PR gdb/22907
2312 * common/pathstuff.c: Conditionally include "<windows.h>".
2313
2314 2018-03-01 Georg Sauthoff <mail@georg.so>
2315
2316 PR gdb/22888
2317 * gcore.in: Quote variables and switch interpreter to bash.
2318
2319 2018-03-01 Tom Tromey <tom@tromey.com>
2320
2321 * dwarf2read.c (alloc_discriminant_info): Fix default_index
2322 assertion. Add assertion for discriminant_index.
2323 (quirk_rust_enum): Use correct base type name in univariant case.
2324
2325 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
2326
2327 * record.c (get_call_history_modifiers): Return a
2328 record_print_flags.
2329 (cmd_record_call_history): Adjust.
2330 * record-btrace.c (record_btrace_call_history): Adjust.
2331 (record_btrace_call_history_range): Adjust.
2332 (record_btrace_call_history_from): Adjust.
2333 * target-debug.h (target_debug_print_record_print_flags): New.
2334 * target-delegates.c: Re-generate.
2335 * target.c (target_call_history): Change flags type.
2336 (target_call_history_from): Likewise.
2337 (target_call_history_range): Likewise.
2338 * target.h (struct target_ops) <target_call_history>: Likewise.
2339 (target_call_history_from): Likewise.
2340 (target_call_history_range): Likewise.
2341
2342 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2343 Simon Marchi <simon.marchi@polymtl.ca>
2344
2345 * common/common-utils.c: Include "sys/stat.h".
2346 (is_regular_file): Move here from "source.c"; change return
2347 type to "bool".
2348 * common/common-utils.h (is_regular_file): New prototype.
2349 * common/pathstuff.c (contains_dir_separator): New function.
2350 * common/pathstuff.h (contains_dir_separator): New prototype.
2351 * source.c: Don't include "sys/stat.h".
2352 (is_regular_file): Move to "common/common-utils.c".
2353
2354 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2355
2356 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
2357 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
2358 * auto-load.c: Include "common/pathstuff.h".
2359 * common/common-def.h (current_directory): Move here.
2360 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
2361 function.
2362 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
2363 prototype.
2364 * common/pathstuff.c: New file.
2365 * common/pathstuff.h: New file.
2366 * compile/compile.c: Include "common/pathstuff.h".
2367 * defs.h (current_directory): Move to "common/common-defs.h".
2368 * dwarf2read.c: Include "common/pathstuff.h".
2369 * exec.c: Likewise.
2370 * guile/scm-safe-call.c: Likewise.
2371 * linux-thread-db.c: Likewise.
2372 * main.c: Likewise.
2373 * nto-tdep.c: Likewise.
2374 * objfiles.c: Likewise.
2375 * source.c: Likewise.
2376 * symtab.c: Likewise.
2377 * utils.c: Include "common/pathstuff.h".
2378 (gdb_realpath): Move to "common/pathstuff.c".
2379 (gdb_realpath_keepfile): Likewise.
2380 (gdb_abspath): Likewise.
2381 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
2382 (gdb_realpath_keepfile): Likewise.
2383 (gdb_abspath): Likewise.
2384
2385 2018-02-28 John Baldwin <jhb@FreeBSD.org>
2386
2387 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
2388 wildcard process pid for super_resume for kernels with a
2389 specific bug.
2390
2391 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
2392
2393 * compile/compile.c (get_args): Add additional comments
2394 explaining function.
2395
2396 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
2397 Tom Tromey <tom@tromey.com>
2398
2399 * target.h (memory_write_request_s): Remove typedef. Don't define
2400 VEC.
2401 (target_write_memory_blocks): Change argument to std::vector.
2402 (struct memory_write_request): Add constructor.
2403 * target-memory.c (compare_block_starting_address): Return bool.
2404 Change argument types.
2405 (claim_memory): Change arguments to use std::vector.
2406 (split_regular_and_flash_blocks, blocks_to_erase)
2407 (compute_garbled_blocks): Likewise.
2408 (cleanup_request_data, cleanup_write_requests_vector): Remove.
2409 (target_write_memory_blocks): Change argument to std::vector.
2410 * symfile.c (struct load_section_data): Add constructor and
2411 destructor. Use std::vector for "requests".
2412 (struct load_progress_data): Add initializers.
2413 (load_section_callback): Update. Use "new".
2414 (clear_memory_write_data): Remove.
2415 (generic_load): Update.
2416
2417 2018-02-27 Alan Hayward <alan.hayward@arm.com>
2418
2419 * arch/aarch64.h: Use common/tdesc.h.
2420
2421 2018-02-26 Maciej W. Rozycki <macro@mips.com>
2422
2423 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
2424 architecture with a 64-bit ABI.
2425
2426 2018-02-26 Maciej W. Rozycki <macro@mips.com>
2427
2428 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
2429 ahead of target description loading.
2430
2431 2018-02-26 Tom Tromey <tom@tromey.com>
2432
2433 * stack.c (backtrace_command_1): Update.
2434 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
2435 of "flags".
2436 * python/py-framefilter.c (py_print_frame)
2437 (gdbpy_apply_frame_filter): Change type of "flags".
2438 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
2439 of "flags".
2440 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
2441 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
2442 * extension.h (enum frame_filter_flag): Rename from
2443 frame_filter_flags.
2444 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
2445 (apply_ext_lang_frame_filter): Change type of "flags".
2446 * extension.c (apply_ext_lang_frame_filter): Change type of
2447 "flags".
2448 * extension-priv.h (struct extension_language_ops)
2449 <apply_frame_filter>: Change type of "flags".
2450
2451 2018-02-26 Tom Tromey <tom@tromey.com>
2452
2453 PR python/16497:
2454 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
2455 off-by-one in py_end computation.
2456 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
2457 PRINT_MORE_FRAMES.
2458 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
2459 constant.
2460
2461 2018-02-26 Tom Tromey <tom@tromey.com>
2462
2463 * dwarf2read.c (struct variant_field): New.
2464 (struct nextfield) <variant>: New field.
2465 (dwarf2_add_field): Handle DW_TAG_variant_part.
2466 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
2467 discriminated union.
2468 (read_structure_type): Handle DW_TAG_variant_part.
2469 (handle_struct_member_die): New function, extracted from
2470 process_structure_scope. Handle DW_TAG_variant.
2471 (process_structure_scope): Handle discriminated unions. Call
2472 handle_struct_member_die.
2473
2474 2018-02-26 Tom Tromey <tom@tromey.com>
2475
2476 * rust-lang.h (rust_last_path_segment): Declare.
2477 * rust-lang.c (rust_last_path_segment): Now public. Change
2478 contract.
2479 (struct disr_info): Remove.
2480 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
2481 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
2482 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
2483 (rust_enum_p, rust_enum_variant): New function.
2484 (rust_underscore_fields): Remove "offset" parameter.
2485 (rust_print_enum): New function.
2486 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
2487 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
2488 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
2489 enums.
2490 (rust_internal_print_type): New function, from rust_print_type.
2491 Remove enum code.
2492 (rust_print_type): Call rust_internal_print_type.
2493 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
2494 Update enum handling.
2495 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
2496 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
2497 (rust_union_quirks): New functions.
2498 (process_full_comp_unit, process_full_type_unit): Call
2499 rust_union_quirks.
2500 (process_structure_scope): Update rust_unions if necessary.
2501
2502 2018-02-26 Tom Tromey <tom@tromey.com>
2503
2504 * value.h (value_union_variant): Declare.
2505 * valops.c (value_union_variant): New function.
2506 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
2507 (struct discriminant_info): New.
2508 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
2509 enumerator.
2510 (struct main_type) <flag_discriminated_union>: New field.
2511
2512 2018-02-26 Tom Tromey <tom@tromey.com>
2513
2514 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2515 unittests/unpack-selftests.c.
2516 * unittests/unpack-selftests.c: New file.
2517 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
2518
2519 2018-02-26 Yao Qi <yao.qi@linaro.org>
2520
2521 * dwarf2read.c (struct partial_die_info) <read>: New method.
2522 (read_partial_die): Remove the declaration.
2523 (load_partial_dies): Update.
2524 (partial_die_info::partial_die_info):
2525 (read_partial_die): Change it to partial_die_info::read.
2526
2527 2018-02-26 Yao Qi <yao.qi@linaro.org>
2528
2529 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
2530 (fixup_partial_die): Remove declaration.
2531 (scan_partial_symbols): Update.
2532 (partial_die_parent_scope): Likewise.
2533 (partial_die_full_name): Likewise.
2534 (fixup_partial_die): Change it to partial_die_info::fixup.
2535
2536 2018-02-26 Yao Qi <yao.qi@linaro.org>
2537
2538 * dwarf2read.c (read_partial_die): Update the declaration.
2539 (load_partial_dies): Caller update.
2540 (read_partial_die): Remove one argument abbrev_len.
2541
2542 2018-02-26 Yao Qi <yao.qi@linaro.org>
2543
2544 * dwarf2read.c (struct partial_die_info): Add ctor, delete
2545 assignment operator.
2546 (load_partial_dies): Use ctor and copy ctor.
2547 (read_partial_die): Update.
2548 (dwarf2_cu::find_partial_die): Use ctor.
2549
2550 2018-02-26 Yao Qi <yao.qi@linaro.org>
2551
2552 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
2553 (find_partial_die_in_comp_unit): Change it to
2554 dwarf2_cu::find_partial_die.
2555 (find_partial_die): Update.
2556
2557 2018-02-26 Yao Qi <yao.qi@linaro.org>
2558
2559 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
2560 is NULL.
2561
2562 2018-02-26 Yao Qi <yao.qi@linaro.org>
2563
2564 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
2565
2566 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2567
2568 * arch/amd64.h: Use common/tdesc.h.
2569 * arch/i386.c: Likewise.
2570 * arch/i386.h: Likewise.
2571 * arch/tic6x.c: Likewise.
2572 * arch/tdesc.h: Move file from here...
2573 * common/tdesc.h: ...to here.
2574 * features/aarch64-core.c: Regenerate.
2575 * features/aarch64-fpu.c: Regenerate.
2576 * features/i386/32bit-avx.c: Regenerate.
2577 * features/i386/32bit-avx512.c: Regenerate.
2578 * features/i386/32bit-core.c: Regenerate.
2579 * features/i386/32bit-linux.c: Regenerate.
2580 * features/i386/32bit-mpx.c: Regenerate.
2581 * features/i386/32bit-pkeys.c: Regenerate.
2582 * features/i386/32bit-sse.c: Regenerate.
2583 * features/i386/64bit-avx.c: Regenerate.
2584 * features/i386/64bit-avx512.c: Regenerate.
2585 * features/i386/64bit-core.c: Regenerate.
2586 * features/i386/64bit-linux.c: Regenerate.
2587 * features/i386/64bit-mpx.c: Regenerate.
2588 * features/i386/64bit-pkeys.c: Regenerate.
2589 * features/i386/64bit-segments.c: Regenerate.
2590 * features/i386/64bit-sse.c: Regenerate.
2591 * features/i386/x32-core.c: Regenerate.
2592 * features/tic6x-c6xp.c: Regenerate.
2593 * features/tic6x-core.c: Regenerate.
2594 * features/tic6x-gp.c: Regenerate.
2595 * target-descriptions.c: Use common/tdesc.h.
2596 * target-descriptions.h: Likewise.
2597
2598 2018-02-24 Tom Tromey <tom@tromey.com>
2599
2600 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
2601 (try_thread_db_load_from_dir, thread_db_load_search): Use
2602 std::string.
2603 (info_auto_load_libthread_db_compare): Return bool. Change
2604 argument types.
2605 (info_auto_load_libthread_db): Use std::vector, std::string.
2606 Remove cleanups.
2607
2608 2018-02-24 Tom Tromey <tom@tromey.com>
2609
2610 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
2611 std::string.
2612 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
2613 std::string*.
2614 * gdbarch.c: Rebuild.
2615 * gdbarch.h: Rebuild.
2616 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
2617 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
2618 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
2619 std::string*.
2620
2621 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
2622
2623 * gdbtypes.h (sect_offset): Change type to uint64_t.
2624 (sect_offset_str): New function.
2625 * dwarf2read.c (create_addrmap_from_aranges): Use
2626 sect_offset_str.
2627 (error_check_comp_unit_head): Likewise.
2628 (create_debug_type_hash_table): Likewise.
2629 (read_cutu_die_from_dwo): Likewise.
2630 (init_cutu_and_read_dies): Likewise.
2631 (init_cutu_and_read_dies_no_follow): Likewise.
2632 (process_psymtab_comp_unit_reader): Likewise.
2633 (partial_die_parent_scope): Likewise.
2634 (peek_die_abbrev): Likewise.
2635 (process_queue): Likewise.
2636 (dwarf2_physname): Likewise.
2637 (read_namespace_alias): Likewise.
2638 (read_import_statement): Likewise.
2639 (create_dwo_cu_reader): Likewise.
2640 (create_cus_hash_table): Likewise.
2641 (lookup_dwo_cutu): Likewise.
2642 (inherit_abstract_dies): Likewise.
2643 (read_func_scope): Likewise.
2644 (read_call_site_scope): Likewise.
2645 (dwarf2_add_member_fn): Likewise.
2646 (read_common_block): Likewise.
2647 (read_module_type): Likewise.
2648 (read_typedef): Likewise.
2649 (read_subrange_type): Likewise.
2650 (load_partial_dies): Likewise.
2651 (read_partial_die): Likewise.
2652 (find_partial_die): Likewise.
2653 (read_str_index): Likewise.
2654 (dwarf2_string_attr): Likewise.
2655 (build_error_marker_type): Likewise.
2656 (lookup_die_type): Likewise.
2657 (dump_die_shallow): Likewise.
2658 (follow_die_ref): Likewise.
2659 (dwarf2_fetch_die_loc_sect_off): Likewise.
2660 (dwarf2_fetch_constant_bytes): Likewise.
2661 (follow_die_sig): Likewise.
2662 (get_signatured_type): Likewise.
2663 (get_DW_AT_signature_type): Likewise.
2664 (dwarf2_find_containing_comp_unit): Likewise.
2665 (set_die_type): Likewise.
2666
2667 2018-02-21 John Baldwin <jhb@FreeBSD.org>
2668
2669 * arch/aarch64.c: Include "common-defs.h".
2670 * arch/amd64.c: Likewise.
2671 * arch/i386.c: Likewise.
2672
2673 2018-02-21 Tom Tromey <tom@tromey.com>
2674
2675 * value.h: (extract_field_op): Update.
2676 * eval.c (extract_field_op): Return a const char *.
2677 * expression.h (parse_expression_for_completion): Update.
2678 * completer.c (complete_expression): Update.
2679 (add_struct_fields): Make fieldname const.
2680 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
2681 (mark_completion_tag, parse_exp_in_context_1): Update.
2682 (parse_expression_for_completion): Change "name" to
2683 unique_xmalloc_ptr*.
2684
2685 2018-02-21 Tom Tromey <tom@tromey.com>
2686
2687 * infcall.c (call_function_by_hand_dummy): Use std::vector.
2688
2689 2018-02-21 Yao Qi <yao.qi@linaro.org>
2690
2691 * avr-tdep.c (avr_read_pc): Change parameter type to
2692 readable_regcache.
2693 * gdbarch.sh (read_pc): Likewise.
2694 * gdbarch.c: Re-generated.
2695 * gdbarch.h: Re-generated.
2696 * hppa-tdep.c (hppa_read_pc): Change parameter type to
2697 readable_regcache.
2698 * ia64-tdep.c (ia64_read_pc): Likewise.
2699 * mips-tdep.c (mips_read_pc): Likewise.
2700 * spu-tdep.c (spu_read_pc): Likewise.
2701
2702 2018-02-21 Yao Qi <yao.qi@linaro.org>
2703
2704 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
2705 * regcache-dump.c: New file.
2706 * regcache.c: Move register_dump to regcache-dump.c.
2707 (maintenance_print_registers): Likewise.
2708 (maintenance_print_raw_registers): Likewise.
2709 (maintenance_print_cooked_registers): Likewise.
2710 (maintenance_print_register_groups): Likewise.
2711 (maintenance_print_remote_registers): Likewise.
2712 (_initialize_regcache): Likewise.
2713 * regcache.h (register_dump): Moved from regcache.c.
2714
2715 2018-02-21 Yao Qi <yao.qi@linaro.org>
2716
2717 * regcache.c (regcache::regcache): Update.
2718 (regcache::invalidate): Move it to detached_regcache::invalidate.
2719 (get_thread_arch_aspace_regcache): Update.
2720 (regcache::raw_update): Update.
2721 (regcache::cooked_read): Remove some code.
2722 (regcache::cooked_read_value): Likewise.
2723 (regcache::raw_write): Remove assert on m_readonly_p.
2724 (regcache::raw_supply_integer): Move it to
2725 detached_regcache::raw_supply_integer.
2726 (regcache::raw_supply_zeroed): Likewise.
2727 * regcache.h (detached_regcache) <raw_supply_integer>: New
2728 declaration.
2729 <raw_supply_zeroed, invalidate>: Likewise.
2730 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
2731 <invalidate>: Likewise.
2732 <m_readonly_p>: Removed.
2733
2734 2018-02-21 Yao Qi <yao.qi@linaro.org>
2735
2736 * infcmd.c (get_return_value): Let stop_regs point to
2737 get_current_regcache.
2738 * regcache.c (regcache::regcache): Remove.
2739 (register_dump_reg_buffer): New class.
2740 (regcache_print): Adjust.
2741 * regcache.h (regcache): Remove constructors.
2742
2743 2018-02-21 Yao Qi <yao.qi@linaro.org>
2744
2745 * regcache.c (class register_dump): New class.
2746 (register_dump_regcache, register_dump_none): New class.
2747 (register_dump_remote, register_dump_groups): New class.
2748 (regcache_print): Update.
2749 * regcache.h (regcache_dump_what): Move it to regcache.c.
2750 (regcache) <dump>: Remove.
2751
2752 2018-02-21 Yao Qi <yao.qi@linaro.org>
2753
2754 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
2755 reg_buffer_rw *.
2756 (jit_unwind_reg_set_impl): Call raw_supply.
2757 (jit_frame_sniffer): Use reg_buffer_rw.
2758 * record-full.c (record_full_core_regbuf): Change its type.
2759 (record_full_core_open_1): Use reg_buffer_rw.
2760 (record_full_close): Likewise.
2761 (record_full_core_fetch_registers): Use regcache->raw_supply.
2762 (record_full_core_store_registers): Likewise.
2763 * regcache.c (regcache::get_register_status): Move it to
2764 reg_buffer.
2765 (regcache_raw_set_cached_value): Remove.
2766 (regcache::raw_set_cached_value): Remove.
2767 (regcache::raw_write): Call raw_supply.
2768 (regcache::raw_supply): Move it to reg_buffer_rw.
2769 * regcache.h (regcache_raw_set_cached_value): Remove.
2770 (reg_buffer_rw): New class.
2771
2772 2018-02-21 Yao Qi <yao.qi@linaro.org>
2773
2774 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
2775 readonly_detached_regcache.
2776 (dummy_frame_prev_register): Use regcache->cooked_read.
2777 * frame.c (frame_save_as_regcache): Change return type.
2778 (frame_pop): Update.
2779 * frame.h (frame_save_as_regcache): Update declaration.
2780 * inferior.h (get_infcall_suspend_state_regcache): Update
2781 declaration.
2782 * infrun.c (infcall_suspend_state) <registers>: use
2783 readonly_detached_regcache.
2784 (save_infcall_suspend_state): Don't use regcache_dup.
2785 (get_infcall_suspend_state_regcache): Change return type.
2786 * linux-fork.c (struct fork_info) <savedregs>: Change to
2787 readonly_detached_regcache.
2788 <pc>: New field.
2789 (fork_save_infrun_state): Don't use regcache_dup.
2790 (info_checkpoints_command): Adjust.
2791 * mi/mi-main.c (register_changed_p): Update declaration.
2792 (mi_cmd_data_list_changed_registers): Use
2793 readonly_detached_regcache.
2794 (register_changed_p): Change parameter type to
2795 readonly_detached_regcache.
2796 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
2797 readonly_detached_regcache.
2798 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
2799 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
2800 New.
2801 (regcache::save): Move it to reg_buffer.
2802 (regcache::restore): Change parameter type.
2803 (regcache_dup): Remove.
2804 * regcache.h (reg_buffer) <save>: New method.
2805 (readonly_detached_regcache): New class.
2806 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
2807 readonly_detached_regcache.
2808 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
2809
2810 2018-02-21 Yao Qi <yao.qi@linaro.org>
2811
2812 * frame.c (frame_save_as_regcache): Use regcache method save.
2813 (frame_pop): Use regcache method restore.
2814 * infrun.c (restore_infcall_suspend_state): Likewise.
2815 * linux-fork.c (fork_load_infrun_state): Likewise.
2816 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
2817 save.
2818 * regcache.c (regcache_save): Remove.
2819 (regcache::restore): More asserts.
2820 (regcache_cpy): Remove.
2821 * regcache.h (regcache_save): Remove the declaration.
2822 (regcache::restore): Move from private to public.
2823 Remove the friend declaration of regcache_cpy.
2824 (regcache_cpy): Remove declaration.
2825
2826 2018-02-21 Yao Qi <yao.qi@linaro.org>
2827
2828 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
2829 parameter type to 'readable_regcache *'.
2830 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
2831 * arm-tdep.c (arm_neon_quad_read): Likewise.
2832 (arm_pseudo_read): Likewise.
2833 * avr-tdep.c (avr_pseudo_register_read): Likewise.
2834 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
2835 * frv-tdep.c (frv_pseudo_register_read): Likewise.
2836 * gdbarch.c: Re-generated.
2837 * gdbarch.h: Re-generated.
2838 * gdbarch.sh (pseudo_register_read): Change parameter type to
2839 'readable_regcache *'.
2840 (pseudo_register_read_value): Likewise.
2841 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
2842 (h8300_pseudo_register_read): Likewise.
2843 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
2844 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2845 (i386_pseudo_register_read_into_value): Likewise.
2846 (i386_pseudo_register_read_value): Likewise.
2847 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
2848 declaration.
2849 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
2850 * m32c-tdep.c (m32c_raw_read): Likewise.
2851 (m32c_read_flg): Likewise.
2852 (m32c_banked_register): Likewise.
2853 (m32c_banked_read): Likewise.
2854 (m32c_sb_read): Likewise.
2855 (m32c_part_read): Likewise.
2856 (m32c_cat_read): Likewise.
2857 (m32c_r3r2r1r0_read): Likewise.
2858 (m32c_pseudo_register_read): Likewise.
2859 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
2860 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
2861 (mep_pseudo_cr64_read): Likewise.
2862 (mep_pseudo_register_read): Likewise.
2863 * mips-tdep.c (mips_pseudo_register_read): Likewise.
2864 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
2865 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
2866 * regcache.c (regcache::raw_read): Move it to readable_regcache.
2867 (regcache::cooked_read): Likewise.
2868 (regcache::cooked_read_value): Likewise.
2869 (regcache_cooked_read_signed):
2870 (regcache::cooked_read): Likewise.
2871 * regcache.h (readable_regcache): New class.
2872 (regcache): Inherit readable_regcache. Move some methods to
2873 readable_regcache.
2874 * rl78-tdep.c (rl78_pseudo_register_read): Change
2875 parameter type to 'readable_regcache *'.
2876 * rs6000-tdep.c (do_regcache_raw_read): Remove.
2877 (e500_pseudo_register_read): Change parameter type to
2878 'readable_regcache *'.
2879 (dfp_pseudo_register_read): Likewise.
2880 (vsx_pseudo_register_read): Likewise.
2881 (efpr_pseudo_register_read): Likewise.
2882 * s390-tdep.c (s390_pseudo_register_read): Likewise.
2883 * sh-tdep.c (sh_pseudo_register_read): Likewise.
2884 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
2885 (sh64_pseudo_register_read): Likewise.
2886 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
2887 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
2888 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
2889 (spu_pseudo_register_read): Likewise.
2890 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
2891 (xtensa_pseudo_register_read): Likewise.
2892
2893 2018-02-21 Yao Qi <yao.qi@linaro.org>
2894
2895 * regcache.c (regcache::regcache): Call reg_buffer ctor.
2896 (regcache::arch): Move it to reg_buffer::arch.
2897 (regcache::register_buffer): Likewise.
2898 (regcache::assert_regnum): Likewise.
2899 (regcache::num_raw_registers): Likewise.
2900 * regcache.h (reg_buffer): New class.
2901 (regcache): Inherit reg_buffer.
2902
2903 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
2904
2905 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
2906 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
2907
2908 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
2909
2910 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
2911
2912 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2913
2914 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
2915 (SFILES): Remove common/*.c files.
2916 (COMMON_OBS): Remove some *.o files built from common/*.c files.
2917 * common/common.host: Add common reference.
2918 * configure.ac: Likewise.
2919 * configure: Regenerate.
2920
2921 2018-02-16 Yao Qi <yao.qi@linaro.org>
2922
2923 * block.c (block_namespace_info): Inherit allocate_on_obstack.
2924 (block_initialize_namespace): Use new.
2925 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
2926 (dwarf2_free_objfile): Use delete.
2927 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
2928 (copy_type_recursive): Use new.
2929 * gdb_obstack.h (allocate_on_obstack): New.
2930
2931 2018-02-15 Yao Qi <yao.qi@linaro.org>
2932
2933 PR gdb/22849
2934 * inferior.c (exit_inferior_1): Reset inf->control.
2935
2936 2018-02-15 Joel Brobecker <brobecker@adacore.com>
2937
2938 * ada-lang.c (ada_to_fixed_value_create): Delete advance
2939 declaration.
2940
2941 2018-02-14 Pedro Alves <palves@redhat.com>
2942
2943 * frame-unwind.c (frame_unwind_try_unwinder): Always call
2944 frame_cleanup_after_sniffer on exception.
2945
2946 2018-02-14 Tom Tromey <tom@tromey.com>
2947
2948 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
2949 const.
2950 (solib_bfd_open): Make pathname const.
2951 * solib.c (solib_bfd_open): Make pathname const.
2952 * solib-spu.c (spu_bfd_fopen): Make name const.
2953 (spu_bfd_open): Make pathname const.
2954 * solib-darwin.c (darwin_bfd_open): Make pathname const.
2955 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
2956
2957 2018-02-14 Tom Tromey <tom@tromey.com>
2958
2959 * symfile.c (symfile_bfd_open): Update.
2960 * source.h (openp, source_full_path_of, find_and_open_source):
2961 Change argument type to unique_xmalloc_ptr.
2962 * source.c (openp): Take a unique_xmalloc_ptr.
2963 (source_full_path_of, find_and_open_source): Likewise.
2964 (open_source_file, symtab_to_fullname): Update.
2965 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
2966 unique_xmalloc_ptr.
2967 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
2968 (exec_file_find): Update.
2969 * psymtab.c (psymtab_to_fullname): Update.
2970 * nto-tdep.h (nto_find_and_open_solib): Update.
2971 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
2972 unique_xmalloc_ptr.
2973 * exec.c (exec_file_attach): Update.
2974 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
2975 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
2976
2977 2018-02-14 Tom Tromey <tom@tromey.com>
2978
2979 * solib.c: Include source.h.
2980 * nto-tdep.c: Include source.h.
2981 * mi/mi-cmd-env.c: Include source.h.
2982 * infcmd.c: Include source.h.
2983 * exec.c: Include source.h.
2984 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
2985 (add_path, directory_switch, source_path, init_source_path): Move
2986 declarations...
2987 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
2988 (add_path, directory_switch, source_path, init_source_path):
2989 ...here.
2990
2991 2018-02-14 Tom Tromey <tom@tromey.com>
2992
2993 * solist.h (exec_file_find, solib_find): Return
2994 unique_xmalloc_ptr.
2995 (solib_bfd_fopen): Take a const char *.
2996 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
2997 (exec_file_find, solib_find): Likewise.
2998 (solib_bfd_fopen): Do not take ownership of "pathname".
2999 (solib_bfd_open): Use unique_xmalloc_ptr.
3000 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
3001 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
3002 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
3003 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
3004
3005 2018-02-14 Joel Brobecker <brobecker@adacore.com>
3006
3007 * ada-lang.c (name_match_type_from_name): Remove reference to
3008 ada_name_for_lookup in function's documentation.
3009 * ada-lang.h (ada_name_for_lookup): Delete declaration.
3010
3011 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
3012
3013 * defs.h (enum openp_flags): New enum.
3014 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
3015 Move to enum openp_flags.
3016 (openp_flags): New enum flags.
3017 (openp): Change parameter type to openp_flags.
3018 * source.c (openp): Change parameter type to openp_flags.
3019 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
3020 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
3021
3022 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
3023
3024 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
3025 per-command.
3026
3027 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
3028
3029 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
3030 into...
3031 (class dwarf2_queue_guard): ...the destructor of this new class.
3032 (dw2_do_instantiate_symtab): Create instance of the new class
3033 dwarf2_queue_guard, remove cleanup.
3034
3035 2018-02-09 Tom Tromey <tom@tromey.com>
3036
3037 * source.c (find_source_lines): Don't reference past the end of
3038 the vector.
3039
3040 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3041
3042 * remote.c (remote_btrace_maybe_reopen): Change error message.
3043 * btrace.c (btrace_enable): Likewise.
3044 (parse_xml_btrace): Likewise.
3045 (parse_xml_btrace_conf): Likewise.
3046
3047 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3048
3049 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
3050 (linux_enable_pt, linux_enable_bts): Call
3051 diagnose_perf_event_open_fail.
3052
3053 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3054
3055 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
3056 Remove parameter and change return type. Update callers. Move it.
3057 (linux_enable_bts, linux_enable_pt): Improve error message.
3058 (linux_enable_pt): Remove zero buffer size check.
3059 (linux_enable_btrace): Improve error messages. Remove NULL return
3060 check.
3061
3062 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3063
3064 * btrace.c (btrace_enable): Remove target_supports_btrace call.
3065 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
3066 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
3067 (linux_supports_pt, linux_supports_btrace): Remove.
3068 (linux_enable_bts): Call cpu_supports_bts.
3069 * nat/linux-btrace.h (linux_supports_btrace): Remove.
3070 * remote.c (remote_supports_btrace): Remove.
3071 (init_remote_ops): Remove remote_supports_btrace.
3072 * target-delegates.c: Regenerated.
3073 * target.c (target_supports_btrace): Remove.
3074 * target.h (target_ops) <to_supports_btrace>: Remove
3075 (target_supports_btrace): Remove.
3076 * x86-linux-nat.c (x86_linux_create_target): Remove
3077 linux_supports_btrace.
3078
3079 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3080
3081 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
3082 btrace failed.
3083 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
3084 exception and use message in own exception.
3085
3086 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3087
3088 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
3089 (perf_event_pt_event_type): Use gdb_file_up.
3090 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
3091 scoped_fd, and scoped_mmap.
3092
3093 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3094
3095 * common/scoped_mmap.h: New.
3096 * unittests/scoped_mmap-selftest.c: New.
3097 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3098 unittests/scoped_mmap-selftest.c.
3099
3100 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3101
3102 * common/scoped_fd.h: New.
3103 * unittests/scoped_fd-selftest.c: New.
3104 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3105 unittests/scoped_fd-selftest.c.
3106
3107 2018-02-09 Tom Tromey <tom@tromey.com>
3108
3109 * auto-load.c (auto_load_section_scripts): Use
3110 gdb::unique_xmalloc_ptr.
3111
3112 2018-02-09 Tom Tromey <tom@tromey.com>
3113
3114 * auto-load.c (execute_script_contents): Use std::string.
3115
3116 2018-02-09 Joel Brobecker <brobecker@adacore.com>
3117
3118 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
3119 Python function, rather than a new command.
3120
3121 2018-02-08 Tom Tromey <tom@tromey.com>
3122
3123 * solib.c (solib_find_1): Use std::string.
3124 (solib_bfd_fopen): Use unique_xmalloc_ptr.
3125
3126 2018-02-08 Tom Tromey <tom@tromey.com>
3127
3128 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
3129
3130 2018-02-08 Tom Tromey <tom@tromey.com>
3131
3132 * source.c (find_source_lines): Use gdb::def_vector.
3133
3134 2018-02-08 Tom Tromey <tom@tromey.com>
3135
3136 * macrocmd.c (struct temporary_macro_definition): New.
3137 (macro_define_command): Use temporary_macro_definition. Remove
3138 cleanups.
3139 (free_macro_definition_ptr): Remove.
3140
3141 2018-02-08 Tom Tromey <tom@tromey.com>
3142
3143 * macroexp.c (maybe_expand): Use std::string.
3144
3145 2018-02-08 Tom Tromey <tom@tromey.com>
3146
3147 * macroexp.c (struct macro_buffer): Add initializers for some
3148 members.
3149 (init_buffer, init_shared_buffer, free_buffer)
3150 (free_buffer_return_text): Remove.
3151 (macro_buffer): New constructors.
3152 (~macro_buffer): New destructor.
3153 (macro_buffer::set_shared): New method.
3154 (macro_buffer::resize_buffer, macro_buffer::appendc)
3155 (macro_buffer::appendmem): Now methods, not free functions.
3156 (set_token, append_tokens_without_splicing, stringify)
3157 (macro_stringify): Update.
3158 (gather_arguments): Change return type. Remove argc_p argument,
3159 add args_ptr argument. Use std::vector.
3160 (substitute_args): Remove argc argument. Accept std::vector.
3161 (expand): Update. Use std::vector.
3162 (scan, macro_expand, macro_expand_next): Update.
3163
3164 2018-02-08 Tom Tromey <tom@tromey.com>
3165
3166 * symtab.c (default_collect_symbol_completion_matches_break_on):
3167 Use unique_xmalloc_ptr.
3168 * macroscope.h: (sal_macro_scope, user_macro_scope)
3169 (default_macro_scope): Return unique_xmalloc_ptr.
3170 * macroscope.c (sal_macro_scope, user_macro_scope)
3171 (default_macro_scope): Return unique_xmalloc_ptr.
3172 * macroexp.h (macro_expand, macro_expand_once): Return
3173 unique_xmalloc_ptr.
3174 * macroexp.c (macro_expand, macro_expand_once): Return
3175 unique_xmalloc_ptr.
3176 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3177 (info_macro_command, info_macros_command): Use
3178 unique_xmalloc_ptr.
3179 * compile/compile-c-support.c (write_macro_definitions): Use
3180 unique_xmalloc_ptr.
3181 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
3182
3183 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
3184
3185 * value.c (value_static_field): Assign field type instead of
3186 containing type when returning an optimized out value.
3187
3188 2018-02-06 Yao Qi <yao.qi@linaro.org>
3189
3190 * ft32-tdep.c (ft32_read_pc): Remove.
3191 (ft32_write_pc): Remove.
3192 (ft32_gdbarch_init): Update.
3193 * m32r-tdep.c (m32r_read_pc): Remove.
3194 (m32r_gdbarch_init): Update.
3195 * mep-tdep.c (mep_read_pc): Remove.
3196 (mep_gdbarch_init): Update.
3197 * microblaze-tdep.c (microblaze_write_pc): Remove.
3198 (microblaze_gdbarch_init): Update.
3199 * mn10300-tdep.c (mn10300_read_pc): Remove.
3200 (mn10300_write_pc): Remove.
3201 (mn10300_gdbarch_init): Update.
3202 * moxie-tdep.c (moxie_read_pc): Remove.
3203 (moxie_write_pc): Remove.
3204 (moxie_gdbarch_init): Update.
3205
3206 2018-02-06 Yao Qi <yao.qi@linaro.org>
3207
3208 * expprint.c (print_subexp_standard): Handle
3209 OP_F77_UNDETERMINED_ARGLIST.
3210 (dump_subexp_body_standard): Likewise.
3211
3212 2018-02-05 Alan Hayward <alan.hayward@arm.com>
3213
3214 * target-descriptions.c (tdesc_element_visitor) Add empty
3215 implementations.
3216 (tdesc_type): Move make_gdb_type from here.
3217 (tdesc_type_builtin): Likewise.
3218 (tdesc_type_vector): Likewise.
3219 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
3220 (make_gdb_type_struct): Move from tdesc_type_with_fields.
3221 (make_gdb_type_union): Likewise.
3222 (make_gdb_type_flags): Likewise.
3223 (make_gdb_type_enum): Likewise.
3224 (make_gdb_type): New function.
3225 (tdesc_register_type): Use static make_gdb_type.
3226
3227 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
3228
3229 * infcmd.c (default_print_one_register_info): Align natural-format
3230 column values consistently one under another.
3231 (pad_to_column): New function.
3232
3233 2018-02-05 Joel Brobecker <brobecker@adacore.com>
3234
3235 * dwarf2read.c (dwarf2_physname): Move commment.
3236
3237 2018-02-01 Leszek Swirski <leszeks@google.com>
3238
3239 * varobj.c (varobj_formatted_print_options): Allow recursive
3240 pretty printing if pretty printing is enabled.
3241
3242 2018-02-01 Leszek Swirski <leszeks@google.com>
3243
3244 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
3245 names after a structop as a filename.
3246
3247 2018-02-01 Yao Qi <yao.qi@linaro.org>
3248
3249 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
3250 (arm_record_coproc_data_proc): Likewise.
3251
3252 2018-02-01 Yao Qi <yao.qi@linaro.org>
3253
3254 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
3255
3256 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
3257
3258 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
3259 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
3260
3261 2018-01-31 Pedro Alves <palves@redhat.com>
3262
3263 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
3264 * inflow.c (child_terminal_save_inferior): Wrap reference to
3265 tcgetpgrp in HAVE_TERMIOS_H.
3266 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
3267 _WIN32.
3268 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
3269 always iterate over all inferiors.
3270 (gdbsim_cntrl_c): Adjust.
3271 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
3272
3273 2018-01-31 Joel Brobecker <brobecker@adacore.com>
3274
3275 * gdbtypes.c (lookup_array_range_type): Make sure the array's
3276 index type is objfile-owned if the element type is as well.
3277
3278 2018-01-31 Joel Brobecker <brobecker@adacore.com>
3279
3280 GDB 8.1 released.
3281
3282 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
3283
3284 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
3285 "features/s390x-linux64.c".
3286 (_initialize_s390_linux_tdep): Remove initialization of tdescs
3287 s390_linux32 and s390x_linux64.
3288 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
3289 default tdesc.
3290 * s390-tdep.c: Include "features/s390-linux32.c" and
3291 "features/s390x-linux64.c".
3292 (s390_tdesc_valid): Add check for tdesc_has_registers.
3293 (s390_gdbarch_init): Make sure there is always a valid tdesc.
3294 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
3295 tdesc_s390x_linux64.
3296 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
3297 tdesc_s390x_linux64 to...
3298 * s390-tdep.h: ...here.
3299
3300 2018-01-30 Pedro Alves <palves@redhat.com>
3301
3302 PR gdb/13211
3303 * config.in, configure: Regenerate.
3304 * configure.ac: Check for getpgid.
3305 * go32-nat.c (go32_pass_ctrlc): New.
3306 (go32_target): Install it.
3307 * inf-child.c (inf_child_target): Install
3308 child_terminal_save_inferior, child_pass_ctrlc and
3309 child_interrupt.
3310 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
3311 (inf_ptrace_target): No longer install it.
3312 * infcmd.c (interrupt_target_1): Adjust.
3313 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
3314 (child_interrupt): Declare.
3315 (inferior::terminal_state): New.
3316 * inflow.c (struct terminal_info): Update comments.
3317 (inferior_process_group): Delete.
3318 (terminal_is_ours): Delete.
3319 (gdb_tty_state): New.
3320 (child_terminal_init): Adjust.
3321 (is_gdb_terminal, sharing_input_terminal_1)
3322 (sharing_input_terminal): New functions.
3323 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
3324 Set the process's actual process group in the foreground if
3325 possible. Handle is_ours_for_output/is_ours distinction. Don't
3326 mark terminal as the inferior's if not sharing GDB's terminal.
3327 Don't check attach_flag.
3328 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
3329 pass down a target_terminal_state.
3330 (child_terminal_save_inferior): New, factored out from ...
3331 (child_terminal_ours_1): ... this. Handle
3332 target_terminal_state::is_ours_for_output.
3333 (child_interrupt, child_pass_ctrlc): New.
3334 (inflow_inferior_exit): Clear the inferior's terminal_state.
3335 (copy_terminal_info): Copy the inferior's terminal state.
3336 (_initialize_inflow): Remove reference to terminal_is_ours.
3337 * inflow.h (inferior_process_group): Delete.
3338 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
3339 * procfs.c (procfs_target): Don't install procfs_interrupt.
3340 (procfs_interrupt): Delete.
3341 * remote.c (remote_serial_quit_handler): Adjust.
3342 (remote_interrupt): Remove ptid parameter. Adjust.
3343 * target-delegates.c: Regenerate.
3344 * target.c: Include "terminal.h".
3345 (target_terminal::terminal_state): Rename to ...
3346 (target_terminal::m_terminal_state): ... this.
3347 (target_terminal::init): Adjust.
3348 (target_terminal::inferior): Adjust to per-inferior
3349 terminal_state.
3350 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
3351 (target_terminal::ours, target_terminal::ours_for_output): Use
3352 target_terminal_is_ours_kind.
3353 (target_interrupt): Remove ptid parameter. Adjust.
3354 (default_target_pass_ctrlc): Adjust.
3355 * target.h (target_ops::to_terminal_save_inferior): New field.
3356 (target_ops::to_interrupt): Remove ptid_t parameter.
3357 (target_interrupt): Remove ptid_t parameter. Update comment.
3358 (target_pass_ctrlc): Update comment.
3359 * target/target.h (target_terminal_state): New scoped enum,
3360 factored out of ...
3361 (target_terminal::terminal_state): ... here.
3362 (target_terminal::inferior): Update comments.
3363 (target_terminal::restore_inferior): New.
3364 (target_terminal::is_inferior, target_terminal::is_ours)
3365 (target_terminal::is_ours_for_output): Adjust.
3366 (target_terminal::scoped_restore_terminal_state): Adjust to
3367 rename, and call restore_inferior() instead of inferior().
3368 (target_terminal::scoped_restore_terminal_state::m_state): Change
3369 type.
3370 (target_terminal::terminal_state): Rename to ...
3371 (target_terminal::m_terminal_state): ... this and change type.
3372
3373 2018-01-30 Pedro Alves <palves@redhat.com>
3374
3375 * linux-nat.c (wait_for_signal): New function.
3376 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
3377 directly.
3378 (async_terminal_is_ours)
3379 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
3380 (linux_nat_add_target): Don't override
3381 to_terminal_inferior/to_terminal_ours.
3382
3383 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
3384
3385 * remote.c (remote_follow_fork): Don't call "detach_inferior".
3386
3387 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
3388
3389 * dwarf2read.c (free_dwo_files): Add forward-declaration.
3390 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
3391 dwarf2_per_objfile_free here.
3392 (dwarf2_per_objfile_free): Remove.
3393 (_initialize_dwarf2_read): Don't register
3394 dwarf2_per_objfile_free as a registry cleanup.
3395
3396 2018-01-27 Eli Zaretskii <eliz@gnu.org>
3397
3398 Avoid compilation errors in MinGW native builds
3399
3400 The error is triggered by including python-internal.h, and the
3401 error message is:
3402
3403 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
3404 from build-gnulib/import/math.h:27,
3405 from d:/usr/Python26/include/pyport.h:235,
3406 from d:/usr/Python26/include/Python.h:58,
3407 from python/python-internal.h:94,
3408 from python/py-arch.c:24:
3409 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
3410 using ::hypot;
3411 ^~~~~
3412
3413 This happens because Python headers define 'hypot' to expand t
3414 '_hypot' in the Windows builds.
3415 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
3416 'hypoth'. This avoids a compilation error.
3417
3418 2018-01-26 Alan Hayward <alan.hayward@arm.com>
3419
3420 * MAINTAINERS (Write After Approval): Fix ordering.
3421
3422 2018-01-26 Alan Hayward <alan.hayward@arm.com>
3423
3424 * MAINTAINERS (Write After Approval): Add Alan Hayward.
3425
3426 2018-01-26 Alan Modra <amodra@gmail.com>
3427
3428 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
3429 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
3430 Remove nop. Make const. Comment.
3431 (powerpc32_plt_stub_so_2): New.
3432 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
3433 Correct count. Update uses.
3434 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
3435 Move common code reading PLT entry word. Correct
3436 powerpc32_plt_stub PLT address calculation.
3437 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
3438 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
3439 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
3440 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
3441 (ppc64_standard_linkage8): Likewise.
3442 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
3443 Correct insns description.
3444 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
3445
3446 2018-01-24 Pedro Alves <palves@redhat.com>
3447
3448 GCC PR libstdc++/83906
3449 * gdbtypes.c (operator==(const dynamic_prop &,
3450 const dynamic_prop &)): New.
3451 (operator==(const range_bounds &, const range_bounds &)): New.
3452 (check_types_equal): Use them instead of memcmp.
3453 * gdbtypes.h (operator==(const dynamic_prop &,
3454 const dynamic_prop &)): Declare.
3455 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
3456 (operator==(const range_bounds &, const range_bounds &)): Declare.
3457 (operator!=(const range_bounds &, const range_bounds &)): Declare.
3458
3459 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3460
3461 * s390-linux-tdep.c (s390_record_address_mask)
3462 (s390_record_calc_disp_common, s390_record_calc_disp)
3463 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
3464 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
3465 (s390_process_record): Move to s390-tdep.c.
3466 (s390_linux_init_abi_any): Adjust.
3467 * s390-tdep.c (s390_record_address_mask)
3468 (s390_record_calc_disp_common, s390_record_calc_disp)
3469 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
3470 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
3471 (s390_process_record): Moved from s390-linux-tdep.c
3472 (s390_gdbarch_init): Adjust.
3473
3474 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3475
3476 * s390-linux-nat.c (s390-tdep.h): New include.
3477 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
3478 (HFILES_NO_SRCDIR): Add s390-tdep.h.
3479 (ALLDEPFILES): Add s390-tdep.c.
3480 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
3481 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
3482 * s390-tdep.h: ...this. New file.
3483 * s390-linux-tdep.c (s390-tdep.h): New include.
3484 (_initialize_s390_tdep): Rename to...
3485 (_initialize_s390_linux_tdep): ...this and adjust.
3486 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
3487 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
3488 s390-tdep.h.
3489 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
3490 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
3491 (s390_is_partial_instruction, s390_software_single_step)
3492 (is_non_branch_ril, s390_displaced_step_copy_insn)
3493 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
3494 (s390_prologue_data, s390_addr, s390_store, s390_load)
3495 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
3496 (s390_register_call_saved, s390_guess_tracepoint_registers)
3497 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
3498 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
3499 (s390_pseudo_register_name, s390_pseudo_register_type)
3500 (s390_pseudo_register_read, s390_pseudo_register_write)
3501 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
3502 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
3503 (s390_addr_bits_remove, s390_address_class_type_flags)
3504 (s390_address_class_type_flags_to_name)
3505 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
3506 (s390_function_arg_float, s390_function_arg_vector)
3507 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
3508 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
3509 (s390_frame_align, s390_register_return_value, s390_return_value)
3510 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
3511 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
3512 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
3513 (s390_trad_frame_prev_register, s390_unwind_cache)
3514 (s390_prologue_frame_unwind_cache)
3515 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
3516 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
3517 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
3518 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
3519 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
3520 (s390_frame_base_address, s390_local_base_address)
3521 (s390_frame_base, s390_gcc_target_options)
3522 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
3523 (s390_validate_reg_range, s390_tdesc_valid)
3524 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
3525 * s390-tdep.c: ...this. New file.
3526
3527 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3528
3529 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
3530 (s390_process_record, s390_gdbarch_tdep_alloc)
3531 (s390_linux_init_abi_any): Use/set new hook.
3532
3533 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3534
3535 * s390-linux-tdep.c (osabi.h): New include.
3536 (s390_linux_init_abi_31, s390_linux_init_abi_64)
3537 (s390_linux_init_abi_any): New functions.
3538 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
3539
3540 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3541
3542 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
3543 tdesc_has_registers check
3544
3545 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3546
3547 * s390-linux-tdep.c (s390_tdesc_valid): New function.
3548 (s390_validate_reg_range): New macro.
3549 (s390_gdbarch_init): Adjust.
3550
3551 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3552
3553 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
3554 (s390_gdbarch_tdep_alloc): Adjust.
3555 (s390_gdbarch_init): Adjust.
3556
3557 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3558
3559 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
3560 <have_tdb>: Change type to bool.
3561 (s390_gdbarch_tdep_alloc): Adjust.
3562 (s390_gdbarch_init): Adjust.
3563
3564 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3565
3566 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
3567 (gdbarch_tdep) <have_upper, have_vx>: New fields.
3568 (s390_gdbarch_tdep_alloc): New function.
3569 (s390_gdbarch_init): Allocate tdep at start and use its fields
3570 instead of separate variables.
3571
3572 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3573
3574 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
3575 when looking for cached gdbarch and add comment for remaining.
3576
3577 2018-01-22 Pedro Alves <palves@redhat.com>
3578 Sergio Durigan Junior <sergiodj@redhat.com>
3579
3580 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
3581 case.
3582
3583 2018-01-22 Maciej W. Rozycki <macro@mips.com>
3584
3585 * MAINTAINERS: Update my company e-mail address.
3586
3587 2018-01-22 Yao Qi <yao.qi@linaro.org>
3588
3589 * regcache.c (cooked_write_test): New function.
3590 (_initialize_regcache): Register the test.
3591
3592 2018-01-22 Yao Qi <yao.qi@linaro.org>
3593
3594 * ia64-tdep.c (ia64_pseudo_register_read): Call
3595 regcache->cooked_read instead of regcache_cooked_read_unsigned.
3596 * m32c-tdep.c (m32c_cat_read): Likewise.
3597 (m32c_r3r2r1r0_read): Likewise.
3598 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
3599 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
3600
3601 2018-01-22 Yao Qi <yao.qi@linaro.org>
3602
3603 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
3604 method raw_read instead of regcache_raw_read.
3605 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
3606 * arm-tdep.c (arm_neon_quad_read): Likewise.
3607 * avr-tdep.c (avr_pseudo_register_read): Likewise.
3608 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
3609 * frv-tdep.c (frv_pseudo_register_read): Likewise.
3610 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
3611 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3612 (i386_pseudo_register_read_into_value): Likewise.
3613 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
3614 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
3615 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
3616 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
3617 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
3618 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
3619 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
3620 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
3621 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
3622
3623 2018-01-22 Yao Qi <yao.qi@linaro.org>
3624
3625 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
3626 * configure.tgt: Remove target mt.
3627 * mt-tdep.c: Remove.
3628 * regcache.c (cooked_read_test): Remove the check for mt.
3629
3630 2018-01-22 Yao Qi <yao.qi@linaro.org>
3631
3632 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
3633 instead of gdbarch_pseudo_register_read_value.
3634
3635 2018-01-22 Joel Brobecker <brobecker@adacore.com>
3636
3637 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
3638 language is Ada.
3639
3640 2018-01-22 Joel Brobecker <brobecker@adacore.com>
3641
3642 * linespec.c (create_sals_line_offset): Remove code that preserved
3643 the symtab_and_line's line number.
3644
3645 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3646
3647 * varobj.c (varobj_create): Don't set valid_block when creating a
3648 floating varobj.
3649
3650 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3651
3652 * varobj.c (varobj_create): Remove out of date comment.
3653
3654 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3655
3656 PR mi/20395
3657 * ada-exp.y (write_var_from_sym): Pass extra parameter when
3658 updating innermost block.
3659 * parse.c (innermost_block_tracker::update): Take extra type
3660 parameter, and check types match before updating innermost block.
3661 (write_dollar_variable): Update innermost block for registers.
3662 * parser-defs.h (enum innermost_block_tracker_type): New enum.
3663 (innermost_block_tracker::innermost_block_tracker): Initialise
3664 m_types member.
3665 (innermost_block_tracker::reset): Take type parameter.
3666 (innermost_block_tracker::update): Take type parameter, and pass
3667 type through as needed.
3668 (innermost_block_tracker::m_types): New member.
3669 * varobj.c (varobj_create): Pass type when reseting innermost
3670 block.
3671
3672 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3673
3674 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
3675 * ada-lang.c (resolve_subexp): Likewise.
3676 * breakpoint.c (set_breakpoint_condition) Likewise.
3677 (watch_command_1) Likewise.
3678 * c-exp.y (variable): Likewise.
3679 * d-exp.y (PrimaryExpression): Likewise.
3680 * f-exp.y (variable): Likewise.
3681 * go-exp.y (variable): Likewise.
3682 * m2-exp.y (variable): Likewise.
3683 * objfiles.c (objfile::~objfile): Likewise.
3684 * p-exp.y (variable): Likewise.
3685 * parse.c (innermost_block): Change type.
3686 * parser-defs.h (class innermost_block_tracker): New.
3687 (innermost_block): Change to innermost_block_tracker.
3688 * printcmd.c (display_command): Switch to innermost_block API.
3689 (do_one_display): Likewise.
3690 * rust-exp.y (do_one_display): Likewise.
3691 * symfile.c (clear_symtab_users): Likewise.
3692 * varobj.c (varobj_create): Switch to innermost_block API, replace
3693 use of innermost_block with block stored on varobj object.
3694
3695 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3696
3697 * expression.h (innermost_block): Remove declaration.
3698 * varobj.c: Add 'parser-defs.h' include.
3699
3700 2018-01-19 Tom Tromey <tom@tromey.com>
3701
3702 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
3703 symbols in the static and global blocks.
3704
3705 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3706
3707 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
3708 gdb_ptrace.h, and move including gdb_wait.h ...
3709 * nat/linux-ptrace.h: ... to here.
3710
3711 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3712
3713 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
3714 inf_ptrace_detach_success.
3715 (inf_ptrace_detach_success): Add inferior parameter, use it
3716 instead of inferior_ptid, pass it to detach_inferior.
3717 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
3718 parameter.
3719 * inferior.c (detach_inferior): Add overload that takes an
3720 inferior object.
3721 * inferior.h (detach_inferior): Likewise.
3722 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
3723 use inferior_ptid, adjust call to inf_ptrace_detach_success.
3724 * linux-thread-db.c (thread_db_detach): Use inf parameter.
3725
3726 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3727
3728 * target.h (struct target_ops) <to_detach>: Add inferior
3729 parameter.
3730 (target_detach): Likewise.
3731 * target.c (dispose_inferior): Pass inferior down.
3732 (target_detach): Pass inferior down. Assert that it is equal to
3733 the current inferior.
3734 * aix-thread.c (aix_thread_detach): Pass inferior down.
3735 * corefile.c (core_file_command): Pass current_inferior() down.
3736 * corelow.c (core_detach): Add inferior parameter.
3737 * darwin-nat.c (darwin_detach): Likewise.
3738 * gnu-nat.c (gnu_detach): Likewise.
3739 * inf-ptrace.c (inf_ptrace_detach): Likewise.
3740 * infcmd.c (detach_command): Pass current_inferior() down to
3741 target_detach.
3742 * infrun.c (follow_fork_inferior): Pass parent_inf to
3743 target_detach.
3744 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
3745 target_detach.
3746 * linux-nat.c (linux_nat_detach): Add inferior parameter.
3747 * linux-thread-db.c (thread_db_detach): Likewise.
3748 * nto-procfs.c (procfs_detach): Likewise.
3749 * procfs.c (procfs_detach): Likewise.
3750 * record.c (record_detach): Likewise.
3751 * record.h (struct inferior): Forward-declare.
3752 (record_detach): Add inferior parameter.
3753 * remote-sim.c (gdbsim_detach): Likewise.
3754 * remote.c (remote_detach_1): Likewise.
3755 (remote_detach): Likewise.
3756 (extended_remote_detach): Likewise.
3757 * sol-thread.c (sol_thread_detach): Likewise.
3758 * target-debug.h (target_debug_print_inferior_p): New macro.
3759 * target-delegates.c: Re-generate.
3760 * top.c (kill_or_detach): Pass inferior down to target_detach.
3761 * windows-nat.c (windows_detach): Add inferior parameter.
3762
3763 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3764
3765 * target.h (struct target_ops) <to_detach>: Remove args
3766 parameter.
3767 (target_detach): Likewise.
3768 * target.c (dispose_inferior): Adjust.
3769 (target_detach): Remove args parameter, adjust.
3770 * aix-thread.c (aix_thread_detach): Adjust.
3771 * corefile.c (core_file_command): Adjust.
3772 * corelow.c (core_detach): Adjust.
3773 * darwin-nat.c (darwin_detach): Adjust.
3774 * gnu-nat.c (gnu_detach): Adjust.
3775 * inf-ptrace.c (inf_ptrace_detach): Adjust.
3776 * infcmd.c (detach_command): Adjust
3777 * infrun.c (follow_fork_inferior): Adjust.
3778 (handle_vfork_child_exec_or_exit): Adjust.
3779 * linux-fork.c (linux_fork_detach): Remove args parameter.
3780 * linux-fork.h (linux_fork_detach): Likewise.
3781 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
3782 * linux-thread-db.c (thread_db_detach): Likewise.
3783 * nto-procfs.c (procfs_detach): Likewise.
3784 * procfs.c (procfs_detach): Likewise.
3785 (do_detach): Remove signo parameter.
3786 * record.c (record_detach): Remove args parameter.
3787 * record.h (record_detach): Likewise.
3788 * remote-sim.c (gdbsim_detach): Likewise.
3789 * remote.c (remote_detach_1): Likewise.
3790 (remote_detach): Likewise.
3791 (extended_remote_detach): Likewise.
3792 * sol-thread.c (sol_thread_detach): Likewise.
3793 * target-delegates.c: Re-generate.
3794 * top.c (struct qt_args) <args>: Remove field.
3795 (kill_or_detach): Don't pass args.
3796 (quit_force): Don't set args.
3797 * windows-nat.c (windows_detach): Remove args parameter.
3798
3799 2018-01-19 Yao Qi <yao.qi@linaro.org>
3800
3801 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
3802 (arm_linux_init_abi): Install it.
3803
3804 2018-01-19 Yao Qi <yao.qi@linaro.org>
3805
3806 * osabi.c (gdb_osabi_names): Extend the regexp for
3807 arm-linux-gnueabihf.
3808
3809 2018-01-18 Yao Qi <yao.qi@linaro.org>
3810
3811 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
3812 m_abbrevs.
3813 (abbrev_table::add_abbrev): Update.
3814 (abbrev_table::lookup_abbrev): Update.
3815
3816 2018-01-18 Yao Qi <yao.qi@linaro.org>
3817
3818 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
3819
3820 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
3821
3822 * compile/compile.c (compile_to_object): Convert "triplet_rx"
3823 to "std::string".
3824
3825 2018-01-17 Tom Tromey <tom@tromey.com>
3826
3827 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
3828
3829 2018-01-17 Tom Tromey <tom@tromey.com>
3830
3831 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
3832 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
3833 (create_array_type_with_stride): Update.
3834 * dwarf2read.c (set_die_type): Update.
3835
3836 2018-01-17 Tom Tromey <tom@tromey.com>
3837
3838 * dwarf2read.c (delayed_method_info): Remove typedef.
3839 (dwarf2_cu::method_info): Now a std::vector.
3840 (add_to_method_list): Update.
3841 (free_delayed_list): Remove.
3842 (compute_delayed_physnames): Update.
3843 (process_full_comp_unit, process_full_type_unit): Clear the method
3844 list. Remove cleanups.
3845 (psymtab_include_file_name): Add name_holder parameter. Use
3846 unique_xmalloc_ptr.
3847 (dwarf_decode_lines): Update.
3848
3849 2018-01-17 Tom Tromey <tom@tromey.com>
3850 Simon Marchi <simon.marchi@ericsson.com>
3851
3852 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
3853 (dwarf2_per_objfile::free_cached_comp_units)
3854 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3855 (init_cutu_and_read_dies_no_follow): Update.
3856 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
3857 (dwarf2_cu::~dwarf2_cu): New.
3858 (free_heap_comp_unit, free_stack_comp_unit): Remove.
3859 (age_cached_comp_units, free_one_cached_comp_unit): Update.
3860
3861 2018-01-17 Tom Tromey <tom@tromey.com>
3862 Simon Marchi <simon.marchi@ericsson.com>
3863
3864 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
3865 (struct die_reader_specs) <abbrev_table>: New member.
3866 (struct abbrev_table): Add constructor.
3867 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
3868 <abbrev_obstack>: Now an auto_obstack.
3869 (abbrev_table_up): New typedef.
3870 (init_cu_die_reader): Add abbrev_table parameter.
3871 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
3872 Add result_dwo_abbrev_table.
3873 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3874 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
3875 Update.
3876 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
3877 parameter.
3878 (skip_children): Update.
3879 (abbrev_table::alloc_abbrev): Rename from
3880 abbrev_table_alloc_abbrev.
3881 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
3882 (abbrev_table::lookup_abbrev): Rename from
3883 abbrev_table_lookup_abbrev.
3884 (abbrev_table_read_table): Return abbrev_table_up.
3885 (abbrev_table_free, abbrev_table_free_cleanup)
3886 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
3887 (load_partial_dies): Update.
3888
3889 2018-01-17 Tom Tromey <tom@tromey.com>
3890
3891 * dwarf2read.c (dwarf2_compute_name): Update comment.
3892 (read_func_scope, read_variable): Update.
3893 (new_symbol): Remove.
3894 (new_symbol_full): Rename to new_symbol.
3895
3896 2018-01-17 Mike Gulick <mgulick@mathworks.com>
3897
3898 PR gdb/16577
3899 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
3900 a warning instead of throwing an error, set section size to 0 and return
3901 NULL.
3902 * gdb_bfd.h (gdb_bfd_map_section): Update description.
3903
3904 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3905
3906 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
3907 std::string.
3908 (linux_ptrace_attach_fail_reason_string): Likewise.
3909 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
3910 Likewise.
3911 (linux_ptrace_attach_fail_reason_string): Likewise.
3912 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
3913
3914 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3915
3916 * linux-nat.c (linux_nat_attach): Remove xstrdup.
3917
3918 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3919
3920 PR gdb/21559
3921 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3922 checking for fs_base/gs_base fields in struct user_regs_struct.
3923 * configure: Regenerate.
3924
3925 2018-01-17 Yao Qi <yao.qi@linaro.org>
3926
3927 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
3928 function.
3929 (aarch64_linux_init_abi): Install it to gdbarch hook
3930 gcc_target_options.
3931
3932 2018-01-15 Pedro Alves <palves@redhat.com>
3933
3934 * common/signals-state-save-restore.c
3935 (save_original_signals_state): Fix typos.
3936
3937 2017-01-12 Tom Tromey <tom@tromey.com>
3938 Sergio Durigan Junior <sergiodj@redhat.com>
3939
3940 * Makefile.in (install-only): Install gdb-add-index.
3941
3942 2018-01-12 John Baldwin <jhb@FreeBSD.org>
3943
3944 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
3945
3946 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3947
3948 * infrun.c (keep_going_pass_signal): Clear step-over info when
3949 insert_breakpoints fails.
3950
3951 2018-01-11 Pedro Alves <palves@redhat.com>
3952
3953 PR gdb/22583
3954 * infrun.c (resume): Rename to ...
3955 (resume_1): ... this.
3956 (resume): Reimplement as wrapper around resume_1.
3957
3958 2018-01-11 Pedro Alves <palves@redhat.com>
3959
3960 PR remote/22597
3961 * remote.c (remote_parse_stop_reply): Default to the last-set
3962 general thread instead of to 'magic_null_ptid'.
3963
3964 2018-01-10 Pedro Alves <palves@redhat.com>
3965
3966 * language.h (language_get_symbol_name_matcher): Rename ...
3967 (get_symbol_name_matcher): ... this.
3968 * language.c (language_get_symbol_name_matcher): Ditto.
3969 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
3970 callers adjusted.
3971
3972 2018-01-10 Pedro Alves <palves@redhat.com>
3973
3974 PR gdb/22670
3975 * dwarf2read.c
3976 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
3977 Adjust to use language_get_symbol_name_matcher instead of
3978 language_defn::la_get_symbol_name_matcher.
3979 * language.c (language_get_symbol_name_matcher): If in Ada mode
3980 and the lookup name is a verbatim match, return Ada's matcher.
3981 * language.h (language_get_symbol_name_matcher): Adjust comment.
3982 (ada_lookup_name_info::verbatim_p):: New method.
3983
3984 2018-01-10 Pedro Alves <palves@redhat.com>
3985
3986 PR gdb/22670
3987 * ada-lang.c (ada_collect_symbol_completion_matches): If the
3988 minsym's language is language_auto or language_cplus, pass down
3989 language_ada instead.
3990 * symtab.c (compare_symbol_name): Don't frob symbol language here.
3991
3992 2018-01-10 Pedro Alves <palves@redhat.com>
3993
3994 PR gdb/22670
3995 * minsyms.c (linkage_name_str): New function.
3996 (iterate_over_minimal_symbols): Use it.
3997
3998 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3999
4000 * NEWS: Document that 'info proc' now works on FreeBSD.
4001
4002 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4003
4004 * configure.ac: Check for kinfo_getfile in libutil.
4005 * configure: Regenerate.
4006 * config.in: Regenerate.
4007 * fbsd-nat.c: Include "fbsd-tdep.h".
4008 (fbsd_fetch_cmdline): New.
4009 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
4010 rather than calling error.
4011 (fbsd_info_proc): New.
4012 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
4013 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
4014 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
4015
4016 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4017
4018 * fbsd-nat.c (struct free_deleter): Remove.
4019 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
4020
4021 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4022
4023 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
4024 NULL for an empty pathname.
4025
4026 2018-01-09 John Baldwin <jhb@FreeBSD.org>
4027
4028 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
4029 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
4030 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
4031 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
4032 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
4033 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
4034 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
4035 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
4036 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
4037 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
4038 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
4039 (fbsd_core_fetch_timeval, fbsd_print_sigset)
4040 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
4041 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
4042 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
4043
4044 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
4045
4046 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
4047 (gnu_xfer_auxv): New function.
4048 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
4049 TARGET_OBJECT_AUXV.
4050
4051 2018-01-08 Yao Qi <yao.qi@linaro.org>
4052 Simon Marchi <simon.marchi@ericsson.com>
4053
4054 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
4055 common/selftest.c.
4056 (COMMON_OBS): Remove selftest.o.
4057 * configure.ac: Append selftest-arch.c and common/selftest.c to
4058 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
4059 * configure: Re-generated.
4060 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
4061 GDB_SELF_TEST.
4062 (maintenance_info_selftests): Likewise.
4063
4064 2018-01-08 Xavier Roirand <roirand@adacore.com>
4065
4066 * ada-valprint.c (val_print_packed_array_elements): Use
4067 proper number of elements when printing an array indexed
4068 by an enumeration type.
4069
4070 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4071
4072 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
4073 (dw2_get_file_names_reader): Adjust.
4074 (lookup_dwo_signatured_type): Adjust.
4075 (lookup_dwp_signatured_type): Adjust.
4076 (lookup_signatured_type): Adjust.
4077 (create_type_unit_group): Adjust.
4078 (get_type_unit_group): Adjust.
4079 (process_psymtab_comp_unit_reader): Adjust.
4080 (build_type_psymtabs_reader): Adjust.
4081 (scan_partial_symbols): Adjust.
4082 (add_partial_symbol): Adjust.
4083 (add_partial_subprogram): Adjust.
4084 (peek_die_abbrev): Adjust.
4085 (fixup_go_packaging): Adjust.
4086 (process_imported_unit_die): Adjust.
4087 (dwarf2_compute_name): Adjust.
4088 (dwarf2_physname): Adjust.
4089 (read_import_statement): Adjust.
4090 (handle_DW_AT_stmt_list): Adjust.
4091 (read_file_scope): Adjust.
4092 (read_func_scope): Adjust.
4093 (read_lexical_block_scope): Adjust.
4094 (read_call_site_scope): Adjust.
4095 (read_variable): Adjust.
4096 (dwarf2_rnglists_process): Adjust.
4097 (dwarf2_ranges_process): Adjust.
4098 (dwarf2_ranges_read): Adjust.
4099 (dwarf2_get_pc_bounds): Adjust.
4100 (dwarf2_record_block_ranges): Adjust.
4101 (dwarf2_add_field): Adjust.
4102 (dwarf2_add_member_fn): Adjust.
4103 (read_structure_type): Adjust.
4104 (process_structure_scope): Adjust.
4105 (read_enumeration_type): Adjust.
4106 (read_array_type): Adjust.
4107 (mark_common_block_symbol_computed): Adjust.
4108 (read_common_block): Adjust.
4109 (read_namespace_type): Adjust.
4110 (read_namespace): Adjust.
4111 (read_module_type): Adjust.
4112 (read_tag_pointer_type): Adjust.
4113 (read_tag_ptr_to_member_type): Adjust.
4114 (read_tag_string_type): Adjust.
4115 (read_subroutine_type): Adjust.
4116 (read_typedef): Adjust.
4117 (read_base_type): Adjust.
4118 (attr_to_dynamic_prop): Adjust.
4119 (read_subrange_type): Adjust.
4120 (read_unspecified_type): Adjust.
4121 (dwarf2_read_abbrevs): Adjust.
4122 (load_partial_dies): Adjust.
4123 (read_partial_die): Adjust.
4124 (find_partial_die): Adjust.
4125 (guess_partial_die_structure_name): Adjust.
4126 (fixup_partial_die): Adjust.
4127 (read_attribute_value): Adjust.
4128 (read_addr_index): Adjust.
4129 (read_addr_index_from_leb128): Adjust.
4130 (read_str_index): Adjust.
4131 (dwarf2_string_attr): Adjust.
4132 (get_debug_line_section): Adjust.
4133 (dwarf_decode_line_header): Adjust.
4134 (lnp_state_machine::check_line_address): Adjust.
4135 (dwarf_decode_lines_1): Adjust.
4136 (dwarf_decode_lines): Adjust.
4137 (dwarf2_start_symtab): Adjust.
4138 (var_decode_location): Adjust.
4139 (new_symbol_full): Adjust.
4140 (dwarf2_const_value_data): Adjust.
4141 (dwarf2_const_value_attr): Adjust.
4142 (dwarf2_const_value): Adjust.
4143 (die_type): Adjust.
4144 (die_containing_type): Adjust.
4145 (build_error_marker_type): Adjust.
4146 (lookup_die_type): Adjust.
4147 (guess_full_die_structure_name): Adjust.
4148 (anonymous_struct_prefix): Adjust.
4149 (determine_prefix): Adjust.
4150 (dwarf2_name): Adjust.
4151 (follow_die_ref_or_sig): Adjust.
4152 (follow_die_offset): Adjust.
4153 (follow_die_ref): Adjust.
4154 (follow_die_sig_1): Adjust.
4155 (follow_die_sig): Adjust.
4156 (get_signatured_type): Adjust.
4157 (get_DW_AT_signature_type): Adjust.
4158 (decode_locdesc): Adjust.
4159 (dwarf_decode_macros): Adjust.
4160 (cu_debug_loc_section): Adjust.
4161 (fill_in_loclist_baton): Adjust.
4162 (dwarf2_symbol_mark_computed): Adjust.
4163 (init_one_comp_unit): Don't assign
4164 dwarf2_cu::dwarf2_per_objfile.
4165 (set_die_type): Adjust.
4166
4167 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4168
4169 * dwarf2read.c (struct mapped_debug_names): Add constructor.
4170 <dwarf2_per_objfile>: New field.
4171 (dwarf2_per_objfile): Remove global.
4172 (get_dwarf2_per_objfile): New function.
4173 (set_dwarf2_per_objfile): New function.
4174 (dwarf2_build_psymtabs_hard): Change objfile parameter to
4175 dwarf2_per_objfile.
4176 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
4177 (read_abbrev_offset): Likewise.
4178 (read_indirect_string): Likewise.
4179 (read_indirect_line_string): Likewise.
4180 (read_indirect_string_at_offset): Likewise.
4181 (read_indirect_string_from_dwz): Likewise.
4182 (dwarf2_find_containing_comp_unit): Change objfile parameter to
4183 dwarf2_per_objfile.
4184 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
4185 (create_all_comp_units): Change objfile parameter to
4186 dwarf2_per_objfile.
4187 (create_all_type_units): Likewise.
4188 (process_queue): Add dwarf2_per_objfile parameter.
4189 (read_and_check_comp_unit_head): Likewise.
4190 (lookup_dwo_unit_in_dwp): Likewise.
4191 (get_dwp_file): Likewise.
4192 (process_cu_includes): Likewise.
4193 (struct free_dwo_file_cleanup_data): New struct.
4194 (dwarf2_has_info): Use get_dwarf2_per_objfile and
4195 set_dwarf2_per_objfile.
4196 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
4197 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
4198 context, adjust calls.
4199 (dw2_instantiate_symtab): Likewise.
4200 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
4201 (dw2_get_cu): Likewise.
4202 (create_cu_from_index_list): Change objfile parameter to
4203 dwarf2_per_objfile.
4204 (create_cus_from_index_list): Get dwarf2_per_objfile from
4205 context, adjust calls.
4206 (create_cus_from_index): Likewise.
4207 (create_signatured_type_table_from_index): Change objfile
4208 parameter to dwarf2_per_objfile.
4209 (create_signatured_type_table_from_debug_names): Change objfile
4210 parameter to dwarf2_per_objfile.
4211 (create_addrmap_from_index): Likewise.
4212 (create_addrmap_from_aranges): Likewise.
4213 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
4214 (dw2_setup): Remove.
4215 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
4216 context.
4217 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
4218 get_dwarf2_per_objfile.
4219 (dw2_forget_cached_source_info): Likewise.
4220 (dw2_map_symtabs_matching_filename): Likewise.
4221 (struct dw2_symtab_iterator) <index>: Remove.
4222 <dwarf2_per_objfile>: New field.
4223 (dw2_symtab_iter_init): Replace index parameter with
4224 dwarf2_per_objfile.
4225 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
4226 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
4227 (dw2_print_stats): Likewise.
4228 (dw2_dump): Likewise.
4229 (dw2_expand_symtabs_for_function): Likewise.
4230 (dw2_expand_all_symtabs): Likewise.
4231 (dw2_expand_symtabs_with_fullname): Likewise.
4232 (dw2_expand_marked_cus): Replace index and objfile parameters
4233 with dwarf2_per_objfile.
4234 (dw_expand_symtabs_matching_file_matcher): Add
4235 dwarf2_per_objfile parameter and adjust calls.
4236 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
4237 adjust calls.
4238 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
4239 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
4240 adjust calls.
4241 (create_cus_from_debug_names_list): Replace objfile parameter
4242 with dwarf2_per_objfile and adjust calls.
4243 (create_cus_from_debug_names): Likewise.
4244 (dwarf2_read_debug_names): Likewise.
4245 (mapped_debug_names::namei_to_name): Adjust call.
4246 (dw2_debug_names_iterator::next): Likewise.
4247 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
4248 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
4249 (dw2_debug_names_dump): Likewise.
4250 (dw2_debug_names_expand_symtabs_for_function): Likewise.
4251 (dw2_debug_names_expand_symtabs_matching): Likewise.
4252 (dwarf2_initialize_objfile): Likewise.
4253 (dwarf2_build_psymtabs): Likewise.
4254 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
4255 this_cu.
4256 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
4257 (read_and_check_comp_unit_head): Likewise.
4258 (read_abbrev_offset): Likewise.
4259 (create_debug_type_hash_table): Likewise.
4260 (create_debug_types_hash_table): Likewise.
4261 (create_all_type_units): Replace objfile parameter with
4262 dwarf2_per_objfile.
4263 (add_type_unit): Add dwarf2_per_objfile parameter.
4264 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
4265 with dwarf2_per_objfile.
4266 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
4267 (lookup_dwp_signatured_type): Likewise.
4268 (lookup_signatured_type): Likewise.
4269 (read_cutu_die_from_dwo): Likewise.
4270 (init_tu_and_read_dwo_dies): Likewise.
4271 (init_cutu_and_read_dies): Likewise.
4272 (init_cutu_and_read_dies_no_follow): Likewise.
4273 (allocate_type_unit_groups_table): Add objfile parameter.
4274 (create_type_unit_group): Use dwarf2_per_objfile from cu.
4275 (get_type_unit_group): Likewise.
4276 (process_psymtab_comp_unit): Update call.
4277 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
4278 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
4279 (print_tu_stats): Likewise.
4280 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
4281 in void* parameter.
4282 (build_type_psymtabs): Change objfile parameter to
4283 dwarf2_per_objfile.
4284 (process_skeletonless_type_unit): Use dwarf2_per_objfile
4285 passed in void* parameter.
4286 (process_skeletonless_type_units): Change objfile parameter to
4287 dwarf2_per_objfile.
4288 (set_partial_user): Likewise.
4289 (dwarf2_build_psymtabs_hard): Likewise.
4290 (read_comp_units_from_section): Likewise.
4291 (create_all_comp_units): Likewise.
4292 (scan_partial_symbols): Update calls.
4293 (add_partial_symbol): Likewise.
4294 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
4295 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
4296 (process_queue): Add dwarf2_per_objfile parameter.
4297 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
4298 (compute_compunit_symtab_includes): Likewise.
4299 (process_cu_includes): Add dwarf2_per_objfile parameter.
4300 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
4301 (process_full_type_unit): Likewise.
4302 (process_imported_unit_die): Update call.
4303 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
4304 (read_file_scope): Likewise.
4305 (allocate_dwo_file_hash_table): Add objfile parameter.
4306 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
4307 (create_cus_hash_table): Likewise.
4308 (create_dwp_hash_table): Likewise.
4309 (create_dwo_unit_in_dwp_v1): Likewise.
4310 (create_dwp_v2_section): Likewise.
4311 (create_dwo_unit_in_dwp_v2): Likewise.
4312 (lookup_dwo_unit_in_dwp): Likewise.
4313 (try_open_dwop_file): Likewise.
4314 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
4315 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
4316 cleanup to include a reference to dwarf2_per_objfile.
4317 (open_dwp_file): Add dwarf2_per_objfile parameter.
4318 (open_and_init_dwp_file): Likewise.
4319 (get_dwp_file): Likewise.
4320 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
4321 (queue_and_load_all_dwo_tus): Update call.
4322 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
4323 data.
4324 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
4325 (dwarf2_ranges_process): Likewise.
4326 (dwarf2_get_pc_bounds): Likewise.
4327 (mark_common_block_symbol_computed): Likewise.
4328 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
4329 (dwarf2_read_abbrevs): Update call.
4330 (read_partial_die): Use dwarf2_per_objfile from cu.
4331 (find_partial_die): Likewise.
4332 (fixup_partial_die): Likewise.
4333 (read_attribute_value): Likewise.
4334 (read_indirect_string_at_offset_from): Add objfile parameter.
4335 (read_indirect_string_at_offset): Add dwarf2_per_objfile
4336 parameter.
4337 (read_indirect_string_from_dwz): Add objfile parameter.
4338 (read_indirect_string): Add objfile parameter.
4339 (read_addr_index_1): Add dwarf2_per_objfile parameter.
4340 (read_addr_index): Use dwarf2_per_objfile from cu.
4341 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
4342 call dw2_setup.
4343 (read_str_index): Use dwarf2_per_objfile from cu.
4344 (get_debug_line_section): Likewise.
4345 (read_formatted_entries): Add dwarf2_per_objfile parameter.
4346 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
4347 (new_symbol_full): Use dwarf2_per_objfile from cu.
4348 (build_error_marker_type): Likewise.
4349 (lookup_die_type): Likewise.
4350 (determine_prefix): Likewise.
4351 (follow_die_offset): Likewise.
4352 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
4353 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
4354 (dwarf2_fetch_die_type_sect_off): Likewise.
4355 (dwarf2_get_die_type): Likewise.
4356 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
4357 (get_signatured_type): Likewise.
4358 (get_DW_AT_signature_type): Likewise.
4359 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
4360 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
4361 (cu_debug_loc_section): Likewise.
4362 (fill_in_loclist_baton): Likewise.
4363 (dwarf2_symbol_mark_computed): Likewise.
4364 (dwarf2_find_containing_comp_unit): Change objfile parameter to
4365 dwarf2_per_objfile.
4366 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
4367 parameter.
4368 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
4369 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
4370 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
4371 (set_die_type): Use dwarf2_free_objfile from cu.
4372 (get_die_type_at_offset): Likewise.
4373 (dwarf2_per_objfile_free): Don't assign global variable.
4374 (debug_names) <constructor>: Add dwarf2_per_objfile
4375 parameter, update m_debugstrlookup construction.
4376 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
4377 parameter.
4378 <m_dwarf2_per_objfile>: New field.
4379 <lookup>: Use m_dwarf2_per_objfile.
4380 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
4381 (psyms_seen_size): Likewise.
4382 (write_gdbindex): Replace objfile parameter with
4383 dwarf2_per_objfile.
4384 (write_debug_names): Likewise.
4385 (write_psymtabs_to_index): Likewise.
4386 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
4387 calls.
4388
4389 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4390
4391 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
4392 <dwarf2_per_objfile>: New field.
4393 (struct dwarf2_per_cu_data) <objfile>: Remove.
4394 <dwarf2_per_objfile>: New field.
4395 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
4396 of objfile.
4397 (create_signatured_type_table_from_index): Likewise.
4398 (create_debug_type_hash_table): Likewise.
4399 (fill_in_sig_entry_from_dwo_entry): Likewise.
4400 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
4401 (create_type_unit_group): Assign dwarf2_per_objfile instead of
4402 objfile.
4403 (create_partial_symtab): Access objfile through
4404 dwarf2_per_objfile.
4405 (process_psymtab_comp_unit_reader): Likewise.
4406 (read_comp_units_from_section): Likewise.
4407 (scan_partial_symbols): Likewise.
4408 (add_partial_symbol): Likewise.
4409 (add_partial_subprogram): Likewise.
4410 (peek_die_abbrev): Likewise.
4411 (fixup_go_packaging): Likewise.
4412 (process_full_comp_unit): Likewise.
4413 (process_full_type_unit): Likewise.
4414 (process_imported_unit_die): Likewise.
4415 (dwarf2_compute_name): Likewise.
4416 (dwarf2_physname): Likewise.
4417 (read_import_statement): Likewise.
4418 (create_cus_hash_table): Assign dwarf2_physname instead of
4419 objfile.
4420 (read_func_scope): Access objfile through dwarf2_per_objfile.
4421 (read_lexical_block_scope): Likewise.
4422 (read_call_site_scope): Likewise.
4423 (read_variable): Likewise.
4424 (dwarf2_rnglists_process): Likewise.
4425 (dwarf2_ranges_process): Likewise.
4426 (dwarf2_ranges_read): Likewise.
4427 (dwarf2_record_block_ranges): Likewise.
4428 (dwarf2_add_field): Likewise.
4429 (dwarf2_add_member_fn): Likewise.
4430 (read_structure_type): Likewise.
4431 (process_structure_scope): Likewise.
4432 (read_enumeration_type): Likewise.
4433 (read_array_type): Likewise.
4434 (read_common_block): Likewise.
4435 (read_namespace_type): Likewise.
4436 (read_namespace): Likewise.
4437 (read_module_type): Likewise.
4438 (read_tag_pointer_type): Likewise.
4439 (read_tag_ptr_to_member_type): Likewise.
4440 (read_tag_string_type): Likewise.
4441 (read_subroutine_type): Likewise.
4442 (read_typedef): Likewise.
4443 (read_base_type): Likewise.
4444 (attr_to_dynamic_prop): Likewise.
4445 (read_subrange_type): Likewise.
4446 (read_unspecified_type): Likewise.
4447 (load_partial_dies): Likewise.
4448 (read_partial_die): Likewise.
4449 (find_partial_die): Likewise.
4450 (guess_partial_die_structure_name): Likewise.
4451 (fixup_partial_die): Likewise.
4452 (read_attribute_value): Likewise.
4453 (read_addr_index_from_leb128): Likewise.
4454 (dwarf2_read_addr_index): Likewise.
4455 (dwarf2_string_attr): Likewise.
4456 (lnp_state_machine::check_line_address): Likewise.
4457 (dwarf_decode_lines_1): Likewise.
4458 (dwarf_decode_lines): Likewise.
4459 (dwarf2_start_symtab): Likewise.
4460 (var_decode_location): Likewise.
4461 (new_symbol_full): Likewise.
4462 (dwarf2_const_value_data): Likewise.
4463 (dwarf2_const_value_attr): Likewise.
4464 (dwarf2_const_value): Likewise.
4465 (die_type): Likewise.
4466 (die_containing_type): Likewise.
4467 (lookup_die_type): Likewise.
4468 (guess_full_die_structure_name): Likewise.
4469 (anonymous_struct_prefix): Likewise.
4470 (dwarf2_name): Likewise.
4471 (follow_die_ref_or_sig): Likewise.
4472 (follow_die_offset): Likewise.
4473 (follow_die_ref): Likewise.
4474 (dwarf2_fetch_die_loc_sect_off): Likewise.
4475 (dwarf2_fetch_constant_bytes): Likewise.
4476 (dwarf2_fetch_die_type_sect_off): Likewise.
4477 (dwarf2_get_die_type): Likewise.
4478 (follow_die_sig): Likewise.
4479 (decode_locdesc): Likewise.
4480 (dwarf2_per_cu_objfile): Likewise.
4481 (dwarf2_per_cu_text_offset): Likewise.
4482 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
4483 objfile.
4484 (set_die_type): Access objfile through
4485 dwarf2_per_objfile.
4486
4487 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4488
4489 * valprint.c (converted_character_d): Remove typedef.
4490 (DEF_VEC_O (converted_character_d)): Remove.
4491 (count_next_character): Use std::vector.
4492 (print_converted_chars_to_obstack): Likewise.
4493 (generic_printstr): Likewise.
4494
4495 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4496
4497 * xml-support.h (struct gdb_xml_value): Add constructor.
4498 <value>: Change type to unique_xmalloc_ptr.
4499 (gdb_xml_value_s): Remove typedef.
4500 (DEF_VEC_O (gdb_xml_value_s)): Remove.
4501 (gdb_xml_element_start_handler): Change parameter type to
4502 std::vector.
4503 (xml_find_attribute): Likewise.
4504 * xml-support.c (xml_find_attribute): Change parameter type to
4505 std::vector and adjust.
4506 (gdb_xml_values_cleanup): Remove.
4507 (gdb_xml_parser::start_element): Adjust to std::vector.
4508 (xinclude_start_include): Change paraeter type to std::vector
4509 and adjust.
4510 * btrace.c (check_xml_btrace_version): Likewise.
4511 (parse_xml_btrace_block): Likewise.
4512 (parse_xml_btrace_pt_config_cpu): Likewise.
4513 (parse_xml_btrace_pt): Likewise.
4514 (parse_xml_btrace_conf_bts): Likewise.
4515 (parse_xml_btrace_conf_pt): Likewise.
4516 * memory-map.c (memory_map_start_memory): Likewise.
4517 (memory_map_start_property): Likewise.
4518 * osdata.c (osdata_start_osdata): Likewise.
4519 (osdata_start_item): Likewise.
4520 (osdata_start_column): Likewise.
4521 * remote.c (start_thread): Likewise.
4522 * solib-aix.c (library_list_start_library): Likewise.
4523 (library_list_start_list): Likewise.
4524 * solib-svr4.c (library_list_start_library): Likewise.
4525 (svr4_library_list_start_list): Likewise.
4526 * solib-target.c (library_list_start_segment): Likewise.
4527 (library_list_start_section): Likewise.
4528 (library_list_start_library): Likewise.
4529 (library_list_start_list): Likewise.
4530 * tracepoint.c (traceframe_info_start_memory): Likewise.
4531 (traceframe_info_start_tvar): Likewise.
4532 * xml-syscall.c (syscall_start_syscall): Likewise.
4533 * xml-tdesc.c (tdesc_start_target): Likewise.
4534 (tdesc_start_feature): Likewise.
4535 (tdesc_start_reg): Likewise.
4536 (tdesc_start_union): Likewise.
4537 (tdesc_start_struct): Likewise.
4538 (tdesc_start_flags): Likewise.
4539 (tdesc_start_enum): Likewise.
4540 (tdesc_start_field): Likewise.
4541 (tdesc_start_enum_value): Likewise.
4542 (tdesc_start_vector): Likewise.
4543
4544 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4545
4546 * extension.h (struct xmethod_worker) <clone>: Remove.
4547 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
4548 Remove.
4549 (python_xmethod_worker::clone): Remove.
4550 * valops.c (find_overload_match): Use std::move instead of
4551 clone.
4552
4553 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4554
4555 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
4556 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
4557 <free_xmethod_worker_data>: Remove.
4558 <get_matching_xmethod_workers>: Chance VEC to std::vector.
4559 <get_xmethod_arg_types>: Remove.
4560 <get_xmethod_result_type>: Remove.
4561 <invoke_xmethod>: Remove.
4562 * extension.c (new_xmethod_worker): Remove.
4563 (clone_xmethod_worker): Remove.
4564 (get_matching_xmethod_workers): Return void, pass std::vector by
4565 pointer.
4566 (get_xmethod_arg_types): Rename to...
4567 (xmethod_worker::get_arg_types): ... this, and adjust.
4568 (get_xmethod_result_type): Rename to...
4569 (xmethod_worker::get_result_type): ... this, and adjust.
4570 (invoke_xmethod): Remove.
4571 (free_xmethod_worker): Remove.
4572 (free_xmethod_worker_vec): Remove.
4573 * extension.h (enum ext_lang_rc): Move here from
4574 extension-priv.h.
4575 (struct xmethod_worker): Add constructor and destructor.
4576 <data>: Remove.
4577 <value>: Remove.
4578 <invoke, clone, do_get_result_type, do_get_arg_types>: New
4579 virtual pure methods.
4580 <get_arg_types, get_result_type>: New methods.
4581 (xmethod_worker_ptr): Remove typedef.
4582 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
4583 (xmethod_worker_vec): Remove typedef.
4584 (xmethod_worker_up): New typedef.
4585 (invoke_xmethod): Remove.
4586 (clone_xmethod_worker): Remove.
4587 (free_xmethod_worker): Remove.
4588 (free_xmethod_worker_vec): Remove.
4589 (get_xmethod_arg_types): Remove.
4590 (get_xmethod_result_type): Remove.
4591 * valops.c (find_method_list): Use std::vector, don't use
4592 intermediate vector.
4593 (value_find_oload_method_list): Use std::vector.
4594 (find_overload_match): Use std::vector.
4595 (find_oload_champ): Use std::vector.
4596 * value.c (value_free): Use operator delete.
4597 (value_of_xmethod): Rename to...
4598 (value_from_xmethod): ... this. Don't assign
4599 xmethod_worker::value, take rvalue-reference.
4600 (result_type_of_xmethod): Adjust.
4601 (call_xmethod): Adjust.
4602 * value.h: Include extension.h.
4603 (struct xmethod_worker): Don't forward-declare.
4604 (value_of_xmethod): Rename to...
4605 (value_from_xmethod): ... this, take rvalue-reference.
4606 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
4607 (struct python_xmethod_worker): ... this, add constructor and
4608 destructor.
4609 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
4610 (gdbpy_free_xmethod_worker_data): Rename to...
4611 (python_xmethod_worker::~python_xmethod_worker): ... this and
4612 adjust.
4613 (gdbpy_clone_xmethod_worker_data): Rename to...
4614 (python_xmethod_worker::clone): ... this and adjust.
4615 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
4616 temporary vector.
4617 (gdbpy_get_xmethod_arg_types): Rename to...
4618 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
4619 (gdbpy_get_xmethod_result_type): Rename to...
4620 (python_xmethod_worker::do_get_result_type): ... this and
4621 adjust.
4622 (gdbpy_invoke_xmethod): Rename to...
4623 (python_xmethod_worker::invoke): ... this and adjust.
4624 (new_python_xmethod_worker): Rename to...
4625 (python_xmethod_worker::python_xmethod_worker): ... this and
4626 adjust.
4627 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
4628 Remove.
4629 (gdbpy_free_xmethod_worker_data): Remove.
4630 (gdbpy_get_matching_xmethod_workers): Use std::vector.
4631 (gdbpy_get_xmethod_arg_types): Remove.
4632 (gdbpy_get_xmethod_result_type): Remove.
4633 (gdbpy_invoke_xmethod): Remove.
4634 * python/python.c (python_extension_ops): Remove obsolete
4635 callbacks.
4636
4637 2018-01-05 Pedro Alves <palves@redhat.com>
4638
4639 PR gdb/18653
4640 * common/signals-state-save-restore.c
4641 (save_original_signals_state): New parameter 'quiet'. Warn if we
4642 find a custom handler preinstalled, instead of internal erroring.
4643 But only warn if !quiet.
4644 * common/signals-state-save-restore.h
4645 (save_original_signals_state): New parameter 'quiet'.
4646 * main.c (captured_main_1): Move save_original_signals_state call
4647 after option handling, and pass QUIET.
4648
4649 2018-01-05 Pedro Alves <palves@redhat.com>
4650
4651 * spu-tdep.c (spu_catch_start): Pass
4652 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
4653
4654 2018-01-05 Pedro Alves <palves@redhat.com>
4655
4656 PR gdb/22670
4657 * ada-lang.c (literal_symbol_name_matcher): New function.
4658 (ada_get_symbol_name_matcher): Use it for
4659 symbol_name_match_type::SEARCH_NAME.
4660 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
4661 it down instead of assuming symbol_name_match_type::FULL.
4662 * block.h (block_lookup_symbol): New parameter 'match_type'.
4663 * c-valprint.c (print_unpacked_pointer): Use
4664 lookup_symbol_search_name instead of lookup_symbol.
4665 * compile/compile-object-load.c (get_out_value_type): Pass down
4666 symbol_name_match_type::SEARCH_NAME.
4667 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
4668 symbol_name_match_type::FULL.
4669 * cp-support.c (cp_get_symbol_name_matcher): Handle
4670 symbol_name_match_type::SEARCH_NAME.
4671 * infrun.c (insert_exception_resume_breakpoint): Use
4672 lookup_symbol_search_name.
4673 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
4674 * psymtab.c (maintenance_check_psymtabs): Use
4675 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
4676 * stack.c (print_frame_args): Use lookup_symbol_search_name and
4677 SYMBOL_SEARCH_NAME.
4678 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
4679 if symbol_name_match_type::SEARCH_NAME.
4680 (lookup_symbol_in_language): Pass down
4681 symbol_name_match_type::FULL.
4682 (lookup_symbol_search_name): New.
4683 (lookup_language_this): Pass down
4684 symbol_name_match_type::SEARCH_NAME.
4685 (lookup_symbol_aux, lookup_local_symbol): New parameter
4686 'match_type'. Pass it down.
4687 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
4688 (lookup_symbol_search_name): New declaration.
4689 (lookup_symbol_in_block): New 'match_type' parameter.
4690
4691 2018-01-05 Pedro Alves <palves@redhat.com>
4692
4693 PR gdb/22670
4694 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
4695 ada_lookup_symbol.
4696 (ada_lookup_symbol): Reimplement in terms of
4697 ada_lookup_symbol_list, bits factored out from
4698 ada_lookup_encoded_symbol.
4699
4700 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4701
4702 * ada-exp.y (write_object_renaming): When subscripting an array
4703 using a symbol as the index, pass the block in call to
4704 ada_lookup_encoded_symbol when looking that symbol up.
4705
4706 2018-01-05 Jerome Guitton <guitton@adacore.com>
4707
4708 * ada-lang.c (ada_array_length): Use ada_index_type instead of
4709 TYPE_INDEX_TYPE.
4710
4711 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4712
4713 * ada-lang.c (ada_to_fixed_value_create): Add handling of
4714 the case where VALUE_LVAL (val0) is not lval_memory.
4715
4716 2018-01-05 Xavier Roirand <roirand@adacore.com>
4717
4718 * ada-valprint.c (print_optional_low_bound): Handle
4719 character-indexed array printing like boolean-indexed array
4720 printing.
4721
4722 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4723
4724 * NEWS: Create a new section for the next release branch.
4725 Rename the section of the current branch, now that it has
4726 been cut.
4727
4728 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4729
4730 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
4731 * version.in: Bump version to 8.1.50.DATE-git.
4732
4733 2018-01-03 Xavier Roirand <roirand@adacore.com>
4734
4735 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
4736 Add field.
4737 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
4738 Add field.
4739 (default_exception_support_info) <catch_handlers_sym>: Add field.
4740 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
4741 (ada_exception_name_addr_1): Add "catch handlers" handling.
4742 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
4743 Update all callers.
4744 (create_excep_cond_exprs) <ex>: Add parameter.
4745 (re_set_exception): Update create_excep_cond_exprs call.
4746 (print_it_exception, print_one_exception, print_mention_exception)
4747 (print_recreate_exception): Add "catch handler" handling.
4748 (allocate_location_catch_handlers, re_set_catch_handlers)
4749 (check_status_catch_handlers, print_it_catch_handlers)
4750 (print_one_catch_handlers, print_mention_catch_handlers)
4751 (print_recreate_catch_handlers): New function.
4752 (catch_handlers_breakpoint_ops): New variable.
4753 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
4754 Add parameter. Add "catch handler" handling.
4755 (ada_exception_sym_name, ada_exception_breakpoint_ops):
4756 Add "catch handler" handling.
4757 (ada_exception_catchpoint_cond_string): Add "catch handler"
4758 handling.
4759 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
4760 call.
4761 (catch_ada_handlers_command): New function.
4762 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
4763 operations structure.
4764 (_initialize_ada_language): Add "catch handlers" command entry.
4765 * NEWS: Document "catch handlers" feature.
4766
4767 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4768
4769 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
4770 account when creating the array type of the slice.
4771 (ada_value_slice): Likewise.
4772
4773 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4774
4775 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
4776 New enum value.
4777 (create_array_type_with_stride): Add byte_stride_prop parameter.
4778 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
4779 New parameter. Update all callers in this file.
4780 (array_type_has_dynamic_stride): New function.
4781 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
4782 of arrays with dynamic byte strides.
4783 * dwarf2read.c (read_array_type): Add support for dynamic
4784 DW_AT_byte_stride attributes.
4785
4786 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4787
4788 * dwarf2read.c (read_unspecified_type): Treat
4789 DW_TAG_enumeration_type DIEs from Ada units as stubs.
4790
4791 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4792
4793 Update copyright year range in all GDB files.
4794
4795 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4796
4797 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
4798 and gdb/testsuite/gdb.base/step-line.c.
4799
4800 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4801
4802 * copyright.py (main): Dump the contents of
4803 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
4804 even if BY_HAND is empty.
4805
4806 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4807
4808 * top.c (print_gdb_version): Update Copyright year in version
4809 message.
4810
4811 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4812
4813 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
4814
4815 For older changes see ChangeLog-2017.
4816 \f
4817 Local Variables:
4818 mode: change-log
4819 left-margin: 8
4820 fill-column: 74
4821 version-control: never
4822 coding: utf-8
4823 End:
This page took 0.123988 seconds and 5 git commands to generate.