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