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