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