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