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