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