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