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