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