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