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