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