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