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