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