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