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