Eliminate remaining gdb/guile cleanups
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-07-19 Pedro Alves <palves@redhat.com>
2
3 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4 gdb::unique_xmalloc_ptr.
5 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
7 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
8 copy-initialization.
9 * guile/scm-pretty-print.c (ppscm_print_children): Use
10 gdb::unique_xmalloc_ptr instead of cleanups.
11 (gdbscm_apply_val_pretty_printer): Remove cleanups.
12 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
13 gdb::unique_xmalloc_ptr.
14 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
15 Adjust to use gdb::unique_xmalloc_ptr.
16 * guile/scm-utils.c (extract_arg): Adjust.
17 * guile/scm-value.c (gdbscm_value_field): Adjust to use
18 gdb::unique_xmalloc_ptr instead of a cleanup.
19
20 2018-07-19 Tom Tromey <tom@tromey.com>
21
22 * utils.c (do_value_free_to_mark)
23 (make_cleanup_value_free_to_mark): Remove.
24 * utils.h (make_cleanup_value_free_to_mark): Remove.
25
26 2018-07-19 Pedro Alves <palves@redhat.com>
27
28 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
29 forwarding reference.
30
31 2018-07-18 Pedro Alves <palves@redhat.com>
32
33 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
34 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
35 cleanup.
36
37 2018-07-18 Pedro Alves <palves@redhat.com>
38
39 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
40 exceptions.
41 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
42 (gdbscm_wrap): New.
43 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
44 directly instead of a cleanup.
45 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
46 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
47 (vlscm_binop_gdbthrow): New, factored out from ...
48 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
49 (vlscm_rich_compare): Use gdbscm_wrap.
50 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
51 instead of a cleanup.
52 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
53 cleanup.
54 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
55 Use xfree directly instead of a cleanup.
56 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
57 Adjust to use gdbscm_wrap and scoped_value_mark.
58 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
59 (gdbscm_value_address, gdbscm_value_dereference)
60 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
61 scoped_value_mark.
62 (gdbscm_value_dynamic_type): Use scoped_value_mark.
63 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
64 scoped_value_mark.
65 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
66 gdbscm_wrap and scoped_value_mark.
67 (gdbscm_value_to_string): Use xfree directly instead of a
68 cleanup. Move 'buffer' unique_ptr to TRY scope.
69 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
70 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
71 scoped_value_mark.
72 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
73 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
74 scoped_value_mark.
75 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
76 gdbscm_wrap.
77
78 2018-07-18 Tom de Vries <tdevries@suse.de>
79
80 * findvar.c (default_read_var_value): Also resolve dynamic type for
81 LOC_OPTIMIZED_OUT vars.
82
83 2018-07-18 Maciej W. Rozycki <macro@mips.com>
84
85 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
86 decoding.
87
88 2018-07-17 Tom Tromey <tom@tromey.com>
89
90 * guile/scm-param.c (pascm_set_func, pascm_show_func)
91 (compute_enum_list, pascm_set_param_value_x)
92 (gdbscm_parameter_value): Update.
93 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
94 (gdbscm_scm_to_host_string): Update.
95 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
96 Update.
97 * guile/scm-cmd.c (cmdscm_add_completion): Update.
98 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
99 * guile/scm-string.c (gdbscm_scm_to_string): Return
100 unique_xmalloc_ptr.
101 (gdbscm_scm_to_host_string): Likewise.
102
103 2018-07-17 Tom Tromey <tom@tromey.com>
104
105 * guile/guile.c (gdbscm_eval_from_control_command): Update.
106 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
107 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
108 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
109 unique_xmalloc_ptr.
110
111 2018-07-17 Tom Tromey <tom@tromey.com>
112
113 * guile/scm-param.c (pascm_signal_setshow_error): Update.
114 * guile/guile-internal.h (gdbscm_exception_message_to_string):
115 Update.
116 * guile/scm-cmd.c (cmdscm_function): Update.
117 * guile/scm-pretty-print.c
118 (ppscm_print_exception_unless_memory_error): Update.
119 * guile/scm-exception.c (gdbscm_exception_message_to_string):
120 Return unique_xmalloc_ptr.
121
122 2018-07-17 Tom Tromey <tom@tromey.com>
123
124 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
125 Use string_printf.
126
127 2018-07-17 Jim Wilson <jimw@sifive.com>
128
129 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
130 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
131 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
132 unecessary braces after EF_RISCV_RVC test. Delete call to
133 set_gdbarch_decr_pc_after_break.
134
135 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
136 RISCV_LAST_FP_REGNUM + 1.
137 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
138
139 2018-07-17 Tom Tromey <tom@tromey.com>
140
141 * configure.ac: Remove --disable-gdbcli.
142 * configure: Rebuild.
143 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
144 (SUBDIR_CLI_CFLAGS): Remove.
145 (SFILES): Use SUBDIR_CLI_SRCS.
146 (COMMON_OBS): Use SUBDIR_CLI_OBS.
147
148 2018-07-17 Tom Tromey <tom@tromey.com>
149
150 PR gdb/18624:
151 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
152
153 2018-07-16 Jim Wilson <jimw@sifive.com>
154
155 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
156
157 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
158
159 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
160 variable.
161 (libunwind_frame_sniffer): Likewise.
162 (libunwind_frame_prev_register): Likewise.
163 (libunwind_sigtramp_frame_sniffer): Likewise.
164 * ia64-tdep.c (ia64_access_reg): Likewise.
165 (ia64_access_rse_reg): Likewise.
166 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
167 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
168
169 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
170
171 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
172
173 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
174
175 * remote-sim.c (gdbsim_target::close,
176 gdbsim_target::mourn_inferior): Remove unused variables.
177
178 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
179
180 * ia64-tdep.c (ktab_buf): New global.
181 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
182 (get_kernel_table): Adjust.
183
184 2018-07-16 Tom Tromey <tom@tromey.com>
185
186 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
187 * dwarf2read.c (using_directives, new_symbol): Use
188 outermost_context_p.
189 * dbxread.c (process_one_symbol): Use outermost_context_p.
190 * coffread.c (coff_symtab_read): Use outermost_context_p.
191
192 2018-07-16 Tom Tromey <tom@tromey.com>
193
194 * dwarf2read.c (using_directives, read_func_scope)
195 (read_lexical_block_scope): Update.
196 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
197 * buildsym.h (local_using_directives, global_using_directives):
198 Don't declare.
199 (get_local_using_directives, set_local_using_directives)
200 (get_global_using_directives): Declare.
201 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
202 m_global_using_directives>: New members.
203 (finish_block_internal, prepare_for_building)
204 (reset_symtab_globals, end_symtab_get_static_block)
205 (push_context): Update.
206 (get_local_using_directives, set_local_using_directives)
207 (get_global_using_directives): New functions.
208 (buildsym_init): Update.
209
210 2018-07-16 Tom Tromey <tom@tromey.com>
211
212 * xcoffread.c (xcoff_initial_scan): Don't call
213 free_pending_blocks.
214 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
215 * buildsym.h (class scoped_free_pendings): Add constructor.
216 (free_pending_blocks): Don't declare.
217 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
218 (free_pending_blocks): Now static.
219
220 2018-07-16 Tom Tromey <tom@tromey.com>
221
222 * buildsym.h (push_subfile, pop_subfile): Update declarations.
223 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
224 member.
225 (struct subfile_stack): Remove.
226 (subfile_stack): Remove.
227 (push_subfile, pop_subfile, buildsym_init): Update.
228
229 2018-07-16 Tom Tromey <tom@tromey.com>
230
231 * buildsym.c (push_subfile): Use gdb_assert.
232 (pop_subfile): Use gdb_assert.
233
234 2018-07-16 Tom Tromey <tom@tromey.com>
235
236 * buildsym.h (merge_symbol_lists): Remove.
237 * buildsym.c (merge_symbol_lists): Remove.
238
239 2018-07-16 Tom Tromey <tom@tromey.com>
240
241 * stabsread.c (scan_file_globals): Update comment.
242 * stabsread.h (scan_file_globals): Move from buildsym.h.
243 * buildsym.h (scan_file_globals): Move to stabsread.h.
244
245 2018-07-16 Tom Tromey <tom@tromey.com>
246
247 * xcoffread.c (xcoff_new_init): Update.
248 * mipsread.c (mipscoff_new_init): Update.
249 * mdebugread.c (mdebug_build_psymtabs): Update.
250 * elfread.c (elf_new_init): Update.
251 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
252 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
253 * buildsym.h (buildsym_new_init): Don't declare.
254 * buildsym.c (buildsym_new_init): Remove.
255
256 2018-07-16 Tom Tromey <tom@tromey.com>
257
258 * stabsread.h (within_function): Move from buildsym.h.
259 * stabsread.c (start_stabs): Clear within_function.
260 * coffread.c (coff_start_symtab): Clear within_function.
261 * buildsym.h (within_function): Move to stabsread.h.
262 * buildsym.c (prepare_for_building): Update.
263
264 2018-07-16 Tom Tromey <tom@tromey.com>
265
266 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
267 * dwarf2read.c (dwarf2_start_symtab): Don't set
268 processing_gcc_compilation.
269 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
270
271 2018-07-16 Tom Tromey <tom@tromey.com>
272
273 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
274 (next_symbol_text_func): Move from buildsym.h.
275 * stabsread.c (hashname): Move from buildsym.c.
276 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
277 (next_symbol_text_func, hashname): Move to stabsread.h.
278 * buildsym.c: Don't include bcache.h
279 (hashname): Move to stasbread.c.
280
281 2018-07-16 Tom Tromey <tom@tromey.com>
282
283 * buildsym.h (context_stack_size): Don't declare.
284 * buildsym.c (context_stack_size): New global.
285
286 2018-07-16 Tom Tromey <tom@tromey.com>
287
288 * dbxread.c (processing_acc_compilation): New global.
289 * buildsym.h (processing_acc_compilation): Don't declare.
290
291 2018-07-16 Tom Tromey <tom@tromey.com>
292
293 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
294 * dbxread.c (read_ofile_symtab): Update.
295 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
296 * buildsym.h (last_source_start_addr): Remove.
297 (set_last_source_start_addr, get_last_source_start_addr):
298 Declare.
299 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
300 parameter.
301 (struct buildsym_compunit) <m_last_source_start_addr>: New
302 member.
303 (prepare_for_building): Remove start_addr parameter.
304 (start_symtab, restart_symtab, end_symtab_get_static_block)
305 (end_symtab_with_blockvector): Update.
306 (set_last_source_start_addr, get_last_source_start_addr): New
307 functions.
308
309 2018-07-16 Tom Tromey <tom@tromey.com>
310
311 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
312 member.
313 (have_line_numbers): Remove.
314 (record_line, prepare_for_building, end_symtab_get_static_block)
315 (augment_type_symtab): Update.
316
317 2018-07-16 Tom Tromey <tom@tromey.com>
318
319 * buildsym.c (~buildsym_compunit): Free the macro table.
320 (struct buildsym_compunit) <get_macro_table, release_macros>: New
321 methods.
322 <m_pending_macros>: New member.
323 (pending_macros): Remove.
324 (~scoped_free_pendings, get_macro_table, prepare_for_building)
325 (reset_symtab_globals, end_symtab_get_static_block)
326 (end_symtab_with_blockvector, augment_type_symtab)
327 (buildsym_init): Update.
328
329 2018-07-16 Tom Tromey <tom@tromey.com>
330
331 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
332 parameter.
333 (buildsym_compunit::set_last_source_file): New method.
334 <m_last_source_file>: New member.
335 (prepare_for_building): Remove "name" parameter.
336 (start_symtab, restart_symtab, reset_symtab_globals): Update.
337 (last_source_file): Remove.
338 (set_last_source_file, get_last_source_file): Update.
339
340 2018-07-16 Tom Tromey <tom@tromey.com>
341
342 * buildsym.c (prepare_for_building): Add assert.
343
344 2018-07-16 Tom Tromey <tom@tromey.com>
345
346 * buildsym.c (~buildsym_compunit): Update.
347 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
348 (start_subfile, patch_subfile_names)
349 (end_symtab_with_blockvector): Update.
350
351 2018-07-16 Tom Tromey <tom@tromey.com>
352
353 * buildsym.c (struct buildsym_compunit): Add constructor,
354 destructor, initializers.
355 (start_buildsym_compunit): Remove.
356 (free_buildsym_compunit): Use "delete".
357 (start_symtab, restart_symtab): Use "new".
358
359 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
360
361 * symfile.c (set_objfile_default_section_offset): Remove struct
362 keyword.
363
364 2018-07-14 Stafford Horne <shorne@gmail.com>
365
366 * (Responsible Maintainers): Add myself as or1k maintainer.
367
368 2018-07-13 Tom Tromey <tom@tromey.com>
369
370 * symfile.c (set_objfile_default_section_offset): Use extra braces
371 around initializer.
372
373 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
374
375 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
376 non-branching basr.
377
378 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
379
380 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
381 unittests/cli-utils-selftests.c
382 * unittests/cli-utils-selftests.c: New file.
383
384 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
385
386 * NEWS: Mention new commands. Mention change to 'thread apply'.
387
388 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
389
390 * thread.c (thr_try_catch_cmd): New function.
391 (thread_apply_all_command): Handle qcs flags.
392 (thread_apply_command): Handle qcs flags.
393 (taas_command): New function.
394 (tfaas_command): New function.
395 (_initialize_thread): Update to setup the new commands 'taas
396 and 'tfaas'. Change doc string for 'thread apply'.
397
398 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
399
400 * stack.c: (trailing_outermost_frame): New function, mostly
401 extracted from backtrace_command_1.
402 (leading_innermost_frame): New function.
403 (backtrace_command_1): Update to call trailing_outermost_frame.
404 (frame_apply_command_count): New function.
405 (frame_apply_level_command): New function.
406 (frame_apply_all_command): New function.
407 (frame_apply_command): New function.
408 (faas_command): New function.
409 (frame_cmd_list): New variable.
410 (_initialize_stack): Update to setup the new commands 'frame apply'
411 and 'faas'.
412
413 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
414
415 * cli-utils.c (number_or_range_parser::get_number): Only handle
416 numbers or convenience var as numbers.
417 (parse_flags): New function.
418 (parse_flags_qcs): New function.
419 (number_or_range_parser::finished): Ensure parsing end is detected
420 before end of string.
421 * cli-utils.h (parse_flags): New function.
422 (parse_flags_qcs): New function.
423 (number_or_range_parser): Remove m_finished bool.
424 (number_or_range_parser::skip_range): Set m_in_range to false.
425
426 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
427
428 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
429 on Windows.
430
431 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
432 Jan Kratochvil <jan.kratochvil@redhat.com>
433 Paul Fertser <fercerpav@gmail.com>
434 Tsutomu Seki <sekiriki@gmail.com>
435 Pedro Alves <palves@redhat.com>
436
437 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
438 'unittests/parse-connection-spec-selftests.c'.
439 (COMMON_SFILES): Add 'common/netstuff.c'.
440 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
441 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
442 * common/netstuff.c: New file.
443 * common/netstuff.h: New file.
444 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
445 (wait_for_connect): Update comment. New parameter
446 'gdb::optional<int> sock' instead of 'struct serial *scb'.
447 Use 'sock' directly instead of 'scb->fd'.
448 (try_connect): New function, with code from 'net_open'.
449 (net_open): Rewrite main loop to deal with multiple
450 sockets/addresses. Handle IPv6-style hostnames; implement
451 support for IPv6 connections.
452 * unittests/parse-connection-spec-selftests.c: New file.
453
454 2018-07-11 Pedro Alves <palves@redhat.com>
455
456 PR gdb/23377
457 * remote.c (remote_target::remote_detach_pid): Call
458 set_current_process.
459
460 2018-07-11 Pedro Alves <palves@redhat.com>
461
462 * h8300-tdep.c (h8300_gdbarch_init): Remove
463 set_gdbarch_ecoff_reg_to_regnum calls.
464
465 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
466
467 PR c++/23373
468 * c-typeprint.c (c_type_print_base_struct_union): Don't print
469 offsets/sizes for static members of a class/struct.
470
471 2018-07-11 Alan Hayward <alan.hayward@arm.com>
472
473 * target-descriptions.c (tdesc_register_bitsize): Rename.
474 * target-descriptions.h (tdesc_register_bitsize): Likewise.
475 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
476 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
477
478 2018-07-10 Tom Tromey <tom@tromey.com>
479
480 * breakpoint.c (moribund_locations): Now static and a
481 std::vector.
482 (breakpoint_init_inferior, moribund_breakpoint_here_p)
483 (build_bpstat_chain, update_global_location_list)
484 (breakpoint_retire_moribund): Update.
485 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
486 VEC.
487
488 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
489
490 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
491 (riscv_register_reggroup_p): Use new function, remove unneeded
492 parenthesis.
493 (riscv_push_dummy_call): Extend assert to compare against xlen or
494 flen based on register type.
495
496 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
497
498 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
499
500 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
501
502 * remote.c (show_hardware_watchpoint_limit): New function.
503 (show_hardware_watchpoint_length_limit): New function.
504 (show_hardware_breakpoint_limit): New function.
505 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
506 where appropriate, update help text.
507
508 2018-07-09 Tom Tromey <tom@tromey.com>
509
510 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
511 (CLIBS): Don't mention NAT_CLIBS.
512
513 2018-07-09 Tom Tromey <tom@tromey.com>
514
515 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
516 (LIBGDB_OBS, clean mostlyclean): Update.
517 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
518
519 2018-07-09 Tom Tromey <tom@tromey.com>
520
521 * Makefile.in (%.c: %.y): Use ECHO_YACC.
522 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
523 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
524
525 2018-07-09 Tom Tromey <tom@tromey.com>
526
527 * Makefile.in (ALLDEPFILES): Remove exec.c.
528 (COMMON_OBS): Remove exec.o.
529 (COMMON_SFILES): Add exec.c.
530
531 2018-07-09 Tom Tromey <tom@tromey.com>
532
533 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
534
535 2018-07-09 Tom Tromey <tom@tromey.com>
536
537 * Makefile.in (clean mostlyclean): Remove stamp-version.
538 (version.c): Depend on stamp-version.
539 (stamp-version): New rule, from version.c rule.
540
541 2018-07-09 Tom Tromey <tom@tromey.com>
542
543 * Makefile.in (init.c): Depend on stamp-init.
544 (stamp-init): New rule, from init.c rule.
545 (clean mostlyclean): Remove stamp-init.
546
547 2018-07-09 Tom Tromey <tom@tromey.com>
548
549 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
550 SUBDIR_GCC_COMPILE_SRCS.
551
552 2018-07-09 Tom Tromey <tom@tromey.com>
553
554 * Makefile.in (init.c): Remove some unused sed rules.
555
556 2018-07-09 Tom Tromey <tom@tromey.com>
557
558 * Makefile.in (TSOBS): Remove.
559 (INIT_FILES): Update.
560 (LIBGDB_OBS): Update.
561 (COMMON_SFILES): Add inflow.c.
562 (SFILES): Remove inflow.c.
563
564 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
565
566 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
567
568 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
569
570 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
571 get_saveloc_name, is_signal_frame_name, step_name,
572 init_remote_name, create_addr_space_name,
573 destroy_addr_space_name, search_unwind_table_name,
574 find_dyn_list_name): Constify.
575
576 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * darwin-nat.c (darwin_pthread_kill): New function.
579 (darwin_resume_thread): Use darwin_pthread_kill.
580
581 2018-07-05 Tom de Vries <tdevries@suse.de>
582
583 * macroexp.c (macro_buffer) <operator=>: New member function.
584
585 2018-07-04 Tom Tromey <tom@tromey.com>
586
587 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
588
589 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
590
591 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
592 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
593 * maint.c: Likewise.
594 * top.c: Likewise.
595
596 2018-07-04 Joel Brobecker <brobecker@adacore.com>
597
598 * NEWS: Create a new section for the next release branch.
599 Rename the section of the current branch, now that it has
600 been cut.
601
602 2018-07-04 Joel Brobecker <brobecker@adacore.com>
603
604 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
605 * version.in: Bump version to 8.2.50.DATE-git.
606
607 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
608 Pedro Alves <palves@redhat.com>
609
610 * linux-nat.c (linux_init_ptrace): Rename to ...
611 (linux_init_ptrace_procfs): ... this. Call
612 linux_proc_init_warnings.
613 (linux_nat_target::post_attach)
614 (linux_nat_target::post_startup_inferior): Adjust.
615 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
616 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
617
618 2018-07-04 Tom de Vries <tdevries@suse.de>
619
620 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
621 check ...
622 (read_comp_unit_head): ... here.
623
624 2018-07-03 Tom Tromey <tom@tromey.com>
625
626 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
627 (stop_tracing, tstatus_command)
628 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
629 (print_one_static_tracepoint_marker): Update.
630 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
631 std::vector.
632 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
633 VEC.
634 (all_tracepoints, static_tracepoints_here): Return std::vector.
635
636 2018-07-03 Tom Tromey <tom@tromey.com>
637
638 * common/ptid.c (ptid_equal): Remove.
639 * common/ptid.h (ptid_equal): Don't declare.
640 * ada-tasks.c: Update.
641 * breakpoint.c: Update.
642 * common/agent.c: Update.
643 * corelow.c: Update.
644 * darwin-nat-info.c: Update.
645 * darwin-nat.c: Update.
646 * dcache.c: Update.
647 * dtrace-probe.c: Update.
648 * dummy-frame.c: Update.
649 * fbsd-nat.c: Update.
650 * frame.c: Update.
651 * gdbthread.h: Update.
652 * gnu-nat.c: Update.
653 * go32-nat.c: Update.
654 * inf-loop.c: Update.
655 * inf-ptrace.c: Update.
656 * infcall.c: Update.
657 * infcmd.c: Update.
658 * inflow.c: Update.
659 * infrun.c: Update.
660 * linux-fork.c: Update.
661 * linux-nat.c: Update.
662 * linux-thread-db.c: Update.
663 * mi/mi-cmd-var.c: Update.
664 * mi/mi-interp.c: Update.
665 * mi/mi-main.c: Update.
666 * nto-procfs.c: Update.
667 * ppc-linux-tdep.c: Update.
668 * procfs.c: Update.
669 * python/py-inferior.c: Update.
670 * python/py-record-btrace.c: Update.
671 * python/py-record.c: Update.
672 * ravenscar-thread.c: Update.
673 * regcache.c: Update.
674 * remote-sim.c: Update.
675 * remote.c: Update.
676 * sol-thread.c: Update.
677 * solib.c: Update.
678 * target.c: Update.
679 * tui/tui-stack.c: Update.
680 * varobj.c: Update.
681 * windows-nat.c: Update.
682 * windows-tdep.c: Update.
683
684 2018-07-03 Tom Tromey <tom@tromey.com>
685
686 * common/ptid.c (ptid_match): Remove.
687 * common/ptid.h (ptid_match): Don't declare.
688 * fbsd-nat.c: Update.
689 * infcmd.c: Update.
690 * infrun.c: Update.
691 * linux-nat.c: Update.
692 * record-btrace.c: Update.
693 * regcache.c: Update.
694 * remote.c: Update.
695
696 2018-07-03 Tom Tromey <tom@tromey.com>
697
698 * common/ptid.c (ptid_tid_p): Remove.
699 * common/ptid.h (ptid_tid_p): Don't declare.
700 * sol-thread.c: Update.
701
702 2018-07-03 Tom Tromey <tom@tromey.com>
703
704 * common/ptid.c (ptid_lwp_p): Remove.
705 * common/ptid.h (ptid_lwp_p): Don't declare.
706 * fbsd-nat.c: Update.
707 * linux-nat.c: Update.
708 * nat/linux-procfs.c: Update.
709 * nat/x86-linux-dregs.c: Update.
710 * sol-thread.c: Update.
711
712 2018-07-03 Tom Tromey <tom@tromey.com>
713
714 * common/ptid.c (ptid_is_pid): Remove.
715 * common/ptid.h (ptid_is_pid): Don't declare.
716 * infrun.c: Update.
717 * linux-nat.c: Update.
718 * mi/mi-interp.c: Update.
719 * remote.c: Update.
720 * thread.c: Update.
721
722 2018-07-03 Tom Tromey <tom@tromey.com>
723
724 * common/ptid.c (ptid_get_tid): Remove.
725 * common/ptid.h (ptid_get_tid): Don't declare.
726 * ada-tasks.c: Update.
727 * aix-thread.c: Update.
728 * bsd-uthread.c: Update.
729 * darwin-nat.c: Update.
730 * fbsd-nat.c: Update.
731 * i386-darwin-nat.c: Update.
732 * infrun.c: Update.
733 * linux-tdep.c: Update.
734 * nto-procfs.c: Update.
735 * ppc-ravenscar-thread.c: Update.
736 * python/py-infthread.c: Update.
737 * ravenscar-thread.c: Update.
738 * sol-thread.c: Update.
739 * sparc-ravenscar-thread.c: Update.
740 * windows-nat.c: Update.
741
742 2018-07-03 Tom Tromey <tom@tromey.com>
743
744 * common/ptid.c (ptid_get_lwp): Remove.
745 * common/ptid.h (ptid_get_lwp): Don't declare.
746 * aarch64-linux-nat.c: Update.
747 * ada-tasks.c: Update.
748 * aix-thread.c: Update.
749 * amd64-linux-nat.c: Update.
750 * arm-linux-nat.c: Update.
751 * corelow.c: Update.
752 * fbsd-nat.c: Update.
753 * fbsd-tdep.c: Update.
754 * gnu-nat.c: Update.
755 * i386-cygwin-tdep.c: Update.
756 * i386-gnu-nat.c: Update.
757 * i386-linux-nat.c: Update.
758 * ia64-linux-nat.c: Update.
759 * inf-ptrace.c: Update.
760 * infrun.c: Update.
761 * linux-fork.c: Update.
762 * linux-nat.c: Update.
763 * linux-tdep.c: Update.
764 * linux-thread-db.c: Update.
765 * mips-linux-nat.c: Update.
766 * nat/aarch64-linux-hw-point.c: Update.
767 * nat/aarch64-linux.c: Update.
768 * nat/linux-btrace.c: Update.
769 * nat/linux-osdata.c: Update.
770 * nat/linux-procfs.c: Update.
771 * nat/x86-linux-dregs.c: Update.
772 * obsd-nat.c: Update.
773 * ppc-fbsd-nat.c: Update.
774 * ppc-linux-nat.c: Update.
775 * procfs.c: Update.
776 * python/py-infthread.c: Update.
777 * ravenscar-thread.c: Update.
778 * remote.c: Update.
779 * s390-linux-nat.c: Update.
780 * sol-thread.c: Update.
781 * sol2-tdep.c: Update.
782 * spu-linux-nat.c: Update.
783 * x86-linux-nat.c: Update.
784 * xtensa-linux-nat.c: Update.
785
786 2018-07-03 Tom Tromey <tom@tromey.com>
787
788 * common/ptid.c (ptid_get_pid): Remove.
789 * common/ptid.h (ptid_get_pid): Don't declare.
790 * aarch64-linux-nat.c: Update.
791 * ada-lang.c: Update.
792 * aix-thread.c: Update.
793 * alpha-bsd-nat.c: Update.
794 * amd64-fbsd-nat.c: Update.
795 * amd64-linux-nat.c: Update.
796 * arm-linux-nat.c: Update.
797 * arm-nbsd-nat.c: Update.
798 * auxv.c: Update.
799 * break-catch-syscall.c: Update.
800 * breakpoint.c: Update.
801 * bsd-uthread.c: Update.
802 * corelow.c: Update.
803 * ctf.c: Update.
804 * darwin-nat.c: Update.
805 * fbsd-nat.c: Update.
806 * fbsd-tdep.c: Update.
807 * gcore.c: Update.
808 * gnu-nat.c: Update.
809 * hppa-nbsd-nat.c: Update.
810 * hppa-obsd-nat.c: Update.
811 * i386-fbsd-nat.c: Update.
812 * ia64-linux-nat.c: Update.
813 * inf-ptrace.c: Update.
814 * infcmd.c: Update.
815 * inferior.c: Update.
816 * inferior.h: Update.
817 * inflow.c: Update.
818 * infrun.c: Update.
819 * linux-fork.c: Update.
820 * linux-nat.c: Update.
821 * linux-tdep.c: Update.
822 * linux-thread-db.c: Update.
823 * m68k-bsd-nat.c: Update.
824 * mi/mi-interp.c: Update.
825 * mi/mi-main.c: Update.
826 * mips-linux-nat.c: Update.
827 * mips-nbsd-nat.c: Update.
828 * mips64-obsd-nat.c: Update.
829 * nat/aarch64-linux-hw-point.c: Update.
830 * nat/aarch64-linux.c: Update.
831 * nat/linux-btrace.c: Update.
832 * nat/linux-osdata.c: Update.
833 * nat/linux-procfs.c: Update.
834 * nat/x86-linux-dregs.c: Update.
835 * nto-procfs.c: Update.
836 * obsd-nat.c: Update.
837 * ppc-linux-nat.c: Update.
838 * ppc-nbsd-nat.c: Update.
839 * ppc-obsd-nat.c: Update.
840 * proc-service.c: Update.
841 * procfs.c: Update.
842 * python/py-inferior.c: Update.
843 * python/py-infthread.c: Update.
844 * ravenscar-thread.c: Update.
845 * record.c: Update.
846 * remote-sim.c: Update.
847 * remote.c: Update.
848 * rs6000-nat.c: Update.
849 * s390-linux-nat.c: Update.
850 * sh-nbsd-nat.c: Update.
851 * sol-thread.c: Update.
852 * sparc-nat.c: Update.
853 * sparc64-tdep.c: Update.
854 * spu-linux-nat.c: Update.
855 * spu-tdep.c: Update.
856 * target-debug.h: Update.
857 * target.c: Update.
858 * thread.c: Update.
859 * tid-parse.c: Update.
860 * tracefile-tfile.c: Update.
861 * vax-bsd-nat.c: Update.
862 * windows-nat.c: Update.
863 * x86-linux-nat.c: Update.
864 * x86-nat.c: Update.
865
866 2018-07-03 Tom Tromey <tom@tromey.com>
867
868 * common/ptid.c (pid_to_ptid): Remove.
869 * common/ptid.h (pid_to_ptid): Don't declare.
870 * aix-thread.c: Update.
871 * arm-linux-nat.c: Update.
872 * common/ptid.c: Update.
873 * common/ptid.h: Update.
874 * corelow.c: Update.
875 * ctf.c: Update.
876 * darwin-nat.c: Update.
877 * fbsd-nat.c: Update.
878 * fork-child.c: Update.
879 * gnu-nat.c: Update.
880 * go32-nat.c: Update.
881 * inf-ptrace.c: Update.
882 * infcmd.c: Update.
883 * inferior.c: Update.
884 * infrun.c: Update.
885 * linux-fork.c: Update.
886 * linux-nat.c: Update.
887 * nat/aarch64-linux-hw-point.c: Update.
888 * nat/fork-inferior.c: Update.
889 * nat/x86-linux-dregs.c: Update.
890 * nto-procfs.c: Update.
891 * obsd-nat.c: Update.
892 * procfs.c: Update.
893 * progspace.c: Update.
894 * remote.c: Update.
895 * rs6000-nat.c: Update.
896 * s390-linux-nat.c: Update.
897 * sol-thread.c: Update.
898 * spu-linux-nat.c: Update.
899 * target.c: Update.
900 * top.c: Update.
901 * tracefile-tfile.c: Update.
902 * windows-nat.c: Update.
903
904 2018-07-03 Tom Tromey <tom@tromey.com>
905
906 * common/ptid.h (ptid_build): Don't declare.
907 * common/ptid.c (ptid_build): Remove.
908 * aix-thread.c: Update.
909 * bsd-kvm.c: Update.
910 * bsd-uthread.c: Update.
911 * common/agent.c: Update.
912 * common/ptid.c: Update.
913 * common/ptid.h: Update.
914 * corelow.c: Update.
915 * darwin-nat.c: Update.
916 * fbsd-nat.c: Update.
917 * gnu-nat.c: Update.
918 * linux-fork.c: Update.
919 * linux-nat.c: Update.
920 * linux-thread-db.c: Update.
921 * nat/linux-osdata.c: Update.
922 * nat/linux-procfs.c: Update.
923 * nto-procfs.c: Update.
924 * obsd-nat.c: Update.
925 * proc-service.c: Update.
926 * procfs.c: Update.
927 * ravenscar-thread.c: Update.
928 * remote-sim.c: Update.
929 * remote.c: Update.
930 * sol-thread.c: Update.
931 * target.c: Update.
932 * windows-nat.c: Update.
933
934 2018-07-03 Tom Tromey <tom@tromey.com>
935
936 * infrun.c (follow_exec): Use exit_inferior_silent.
937 * inferior.c (exit_inferior_num_silent): Remove.
938 * inferior.h (exit_inferior_num_silent): Don't declare.
939
940 2018-07-03 Tom Tromey <tom@tromey.com>
941
942 PR cli/23340:
943 * darwin-nat.c (darwin_attach_pid): Reset inferior and
944 inferior_ptid on error.
945
946 2018-07-02 Maciej W. Rozycki <macro@mips.com>
947 Simon Marchi <simon.marchi@polymtl.ca>
948
949 PR tdep/8282
950 * disasm.h (gdb_disassembler): Add
951 `m_disassembler_options_holder'. member
952 * disasm.c (get_all_disassembler_options): New function.
953 (gdb_disassembler::gdb_disassembler): Use it.
954 (gdb_buffered_insn_length_init_dis): Likewise.
955 (gdb_buffered_insn_length): Adjust accordingly.
956 (set_disassembler_options): Handle options with arguments.
957 (show_disassembler_options_sfunc): Likewise. Add a leading new
958 line if showing options with descriptions.
959 (disassembler_options_completer): Adapt to using the
960 `disasm_options_and_args_t' structure.
961 * mips-tdep.c (mips_disassembler_options): New variable.
962 (mips_disassembler_options_o32): Likewise.
963 (mips_disassembler_options_n32): Likewise.
964 (mips_disassembler_options_n64): Likewise.
965 (gdb_print_insn_mips): Don't set `disassembler_options'.
966 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
967 functions.
968 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
969 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
970 `gdbarch_disassembler_options_implicit' and
971 `gdbarch_valid_disassembler_options'.
972 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
973 `disasm_options_and_args_t' structure.
974 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
975 method.
976 (valid_disassembler_options): Switch from `disasm_options_t' to
977 the `disasm_options_and_args_t' structure.
978 * NEWS: Document `set disassembler-options' support for the MIPS
979 target.
980 * gdbarch.h: Regenerate.
981 * gdbarch.c: Regenerate.
982
983 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
984
985 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
986
987 2018-06-29 Joel Brobecker <brobecker@adacore.com>
988
989 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
990 parameter in call to amd64_target_description.
991 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
992 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
993 (amd64fbsd_init_abi): Likewise.
994 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
995 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
996 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
997 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
998
999 2018-06-29 Pedro Alves <palves@redhat.com>
1000
1001 * gdb/amd64-tdep.h (amd64_create_target_description): Add
1002 "segments" parameter.
1003 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1004 (_initialize_amd64_tdep): Update call to
1005 amd64_create_target_description.
1006 (amd64_target_description): Add "segments" parameter. Adjust
1007 the implementation to use it.
1008 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1009 call to amd64_create_target_description.
1010 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1011 * gdb/arch/amd64.h (amd64_create_target_description): Add
1012 "segments" register.
1013 * gdb/arch/amd64.c (amd64_create_target_description): Add
1014 "segments" parameter. Call create_feature_i386_64bit_segments
1015 only if SEGMENTS is true.
1016 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1017 call to amd64_create_target_description.
1018
1019 2018-06-29 Pedro Alves <palves@redhat.com>
1020
1021 * thread.c (thread_target_id_str): New, factored out from ...
1022 (print_thread_info_1): ... here. Use it to compute the max
1023 "Target Id" column width.
1024
1025 2018-06-29 Pedro Alves <palves@redhat.com>
1026
1027 * remote.c (remote_target::extra_thread_info): Delete
1028 'display_buf' and 'n' locals. from the cache, regardless of
1029 packet mechanims is in use. Use cache for qThreadExtra and qP
1030 methods too.
1031
1032 2018-06-29 Pedro Alves <palves@redhat.com>
1033
1034 * blockframe.c (find_pc_sect_containing_function): New function.
1035 * breakpoint.c (print_breakpoint_location): Don't call
1036 find_pc_sect_function.
1037 * linespec.c (create_sals_line_offset): Record the location's
1038 symbol in the sal.
1039 * linespec.c (convert_address_location_to_sals): Fill in sal's
1040 symbol with find_pc_sect_containing_function.
1041 * symtab.c (find_function_start_sal): Rename to ...
1042 (find_function_start_sal_1): ... this.
1043 (find_function_start_sal): Reimplement as wrapper around
1044 find_function_start_sal_1, and use
1045 find_pc_sect_containing_function to fill in the sal's symbol.
1046 (find_function_start_sal(symbol*, bool)): Adjust.
1047 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1048 comments.
1049 (find_pc_sect_containing_function): Declare.
1050
1051 2018-06-29 Pedro Alves <palves@redhat.com>
1052
1053 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1054 true if the the location has no symbol.
1055
1056 2018-06-28 Tom Tromey <tom@tromey.com>
1057
1058 * NEWS: Mention --enable-codesign.
1059 * silent-rules.mk (ECHO_SIGN): New variable.
1060 * configure.ac: Add --enable-codesign.
1061 * configure: Rebuild.
1062 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1063 (gdb$(EXEEXT)): Optionally invoke codesign.
1064
1065 2018-06-28 Pedro Alves <palves@redhat.com>
1066
1067 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1068 comments.
1069 (switch_to_thread_no_regs): Adjust comment.
1070 * infcmd.c (stop_pc): Delete.
1071 (post_create_inferior, info_program_command): Replace references
1072 to stop_pc with references to thread_info->suspend.stop_pc.
1073 * inferior.h (stop_pc): Delete declaration.
1074 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1075 (handle_inferior_event_1, handle_signal_stop)
1076 (process_event_stop_test, keep_going_stepped_thread)
1077 (handle_step_into_function, handle_step_into_function_backward)
1078 (print_stop_location): Replace references to stop_pc with
1079 references to thread_info->suspend.stop_pc.
1080 (struct infcall_suspend_state) <stop_pc>: Delete field.
1081 (save_infcall_suspend_state, restore_infcall_suspend_state):
1082 Remove references to inf_stat->stop_pc.
1083 * linux-fork.c (fork_load_infrun_state): Likewise.
1084 * record-btrace.c (record_btrace_set_replay): Likewise.
1085 * record-full.c (record_full_goto_entry): Likewise.
1086 * remote.c (print_one_stopped_thread): Likewise.
1087 * target.c (target_resume): Extend comment.
1088 * thread.c (set_executing_thread): New.
1089 (set_executing): Use it.
1090 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1091 Remove references to stop_pc.
1092
1093 2018-06-28 Pedro Alves <palves@redhat.com>
1094
1095 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1096 Moving fetching stop_pc until after ecs->event_thread is refreshed.
1097
1098 2018-06-28 Tom Tromey <tom@tromey.com>
1099
1100 * coffread.c (coff_symfile_finish): Update.
1101 * xcoffread.c (xcoff_symfile_finish): Update.
1102 * elfread.c (elf_symfile_finish): Update.
1103 * symfile.h (dwarf2_free_objfile): Don't declare.
1104 * dwarf2read.c (_initialize_dwarf2_read): Use
1105 register_objfile_data_with_cleanup.
1106 (dwarf2_free_objfile): Now static. Change signature.
1107
1108 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1109
1110 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1111 option "-o" to add-symbol-file-load to add an offset to each
1112 section's load address.
1113 * symfile.c (set_objfile_default_section_offset): New function.
1114
1115 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1116
1117 * symfile.c (add_symbol_file_command): Make sure that sections
1118 with the same name are sorted in the same order.
1119
1120 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1121
1122 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1123 require the second argument. If omitted, load sections at the
1124 addresses specified in the file.
1125
1126 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1127
1128 * symfile.c (symbol_file_command, symbol_file_add_main_1)
1129 (_initialize_symfile): Add option "-o" to symbol-file to add an
1130 offset to each section of the symbol file.
1131
1132 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
1133
1134 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1135
1136 2018-06-27 Tom Tromey <tom@tromey.com>
1137
1138 * stack.c (_initialize_stack): Update "func" help text.
1139
1140 2018-06-27 Tom Tromey <tom@tromey.com>
1141
1142 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1143 std::vector.
1144 (unwind_infopy_str, pyuw_create_unwind_info)
1145 (unwind_infopy_add_saved_register, pyuw_sniffer)
1146 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1147 Update.
1148 (struct saved_reg): Add constructor.
1149 <value>: Now a gdbpy_ref<>.
1150
1151 2018-06-27 Tom Tromey <tom@tromey.com>
1152
1153 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1154
1155 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1156
1157 * gdb-gdb.py.in: Format using autopep8.
1158
1159 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1160
1161 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1162 (type_lookup_function): Recognize CORE_ADDR values.
1163
1164 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1165
1166 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1167 print tag_name.
1168
1169 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1170
1171 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1172 <__lt__>: Add.
1173
1174 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1175
1176 * gdb-gdb.py: Move to...
1177 * gdb-gdb.py.in: ... here.
1178 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1179 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1180 dependencies.
1181 (distclean): Remove gdb-gdb.py when cleaning.
1182 (gdb-gdb.py, gdb-gdb.gdb): New rules.
1183 * configure: Re-generate.
1184
1185 2018-06-27 Pedro Alves <palves@redhat.com>
1186
1187 * proc-service.c (get_ps_regcache): New.
1188 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1189 (ps_lsetfpregs): Use it.
1190
1191 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
1192
1193 PR gdb/21695
1194 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1195 (dwarf_decode_lines_1): Adjust.
1196
1197 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
1198
1199 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1200 override.
1201 <info_proc>: Likewise.
1202
1203 2018-06-26 Joel Brobecker <brobecker@adacore.com>
1204
1205 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1206 to windows_fetch_one_register, and only handle the case of
1207 fetching one register. Move the code that reloads the context
1208 and iterates over all registers if R is negative to...
1209 (windows_nat_target::fetch_registers): ... here.
1210 (do_windows_store_inferior_registers): Rename to
1211 windows_store_one_register, and only handle the case of storing
1212 one register. Move the code that handles the case where r is
1213 negative to...
1214 (windows_nat_target::store_registers) ... here.
1215
1216 2018-06-26 Tom Tromey <tom@tromey.com>
1217
1218 PR rust/22574:
1219 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1220 * rust-lang.c (rust_print_struct_def): Add podata parameter.
1221 Update.
1222 (rust_internal_print_type): Add podata parameter.
1223 (rust_print_type): Update.
1224
1225 2018-06-26 Tom Tromey <tom@tromey.com>
1226
1227 * typeprint.h (struct print_offset_data) <update, finish,
1228 maybe_print_hole>: New methods.
1229 <indentation>: New constant.
1230 * typeprint.c (print_offset_data::indentation): Define.
1231 (print_offset_data::maybe_print_hole, print_offset_data::update)
1232 (print_offset_data::finish): Move from c-typeprint.c and rename.
1233 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1234 (print_spaces_filtered_with_print_options): Update.
1235 (c_print_type_union_field_offset, maybe_print_hole)
1236 (c_print_type_struct_field_offset): Move to typeprint.c and
1237 rename.
1238 (c_type_print_base_struct_union): Update.
1239
1240 2018-06-25 Pedro Alves <palves@redhat.com>
1241
1242 * gdbthread.h (thread_info_ref, delete_thread)
1243 (delete_thread_silent, first_thread_of_inferior)
1244 (any_thread_of_inferior, switch_to_thread)
1245 (enable_thread_stack_temporaries)
1246 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1247 (get_last_thread_stack_temporary)
1248 (value_in_thread_stack_temporaries, can_access_registers_thread):
1249 Spell out "struct thread_info" instead of just "thread_info".
1250 * inferior.h (notice_new_inferior): Likewise.
1251
1252 2018-06-25 Pedro Alves <palves@redhat.com>
1253
1254 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1255 pass thread_info pointer to delete_thread.
1256 (windows_nat_target::detach): Pass inferior pointer to
1257 detach_inferior.
1258 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1259 delete_thread.
1260 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1261 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1262 and pass a thread_info pointer to delete_thread.
1263 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1264 pass thread_info pointer to delete_thread.
1265 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1266 delete_thread_silent call.
1267 * procfs.c (procfs_target::detach): Pass inferior pointer to
1268 detach_inferior.
1269 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1270 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1271 delete_thread_silent call.
1272 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1273 pass thread_info pointer to delete_thread.
1274 (windows_nat_target::detach): Pass inferior pointer to
1275 delete_inferior.
1276
1277 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1278
1279 * regcache.c (readable_regcache::read_part): Fix asserts.
1280 (reg_buffer::raw_collect_part): New function.
1281 (regcache::write_part): Fix asserts.
1282 (reg_buffer::raw_supply_part): New function.
1283 (regcache::transfer_regset_register): New helper function.
1284 (regcache::transfer_regset): Call new functions.
1285 (regcache_supply_regset): Use gdb_byte*.
1286 (regcache::supply_regset): Likewise.
1287 (regcache_collect_regset): Likewise.
1288 (regcache::collect_regset): Likewise.
1289 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1290 (reg_buffer::raw_supply_part): Likewise.
1291 (regcache::transfer_regset_register): Likewise.
1292 (regcache::transfer_regset): Use gdb_byte*.
1293
1294 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1295
1296 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1297
1298 2018-06-21 Pedro Alves <palves@redhat.com>
1299
1300 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1301 instead of a ptid_t. All callers adjusted.
1302 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1303 adjusted.
1304 (print_ada_task_info, display_current_task_id, task_command_1):
1305 Adjust.
1306 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1307 inferior_thread.
1308 (breakpoint_kind): Adjust.
1309 (remove_breakpoints_pid): Rename to ...
1310 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1311 pointer. All callers adjusted.
1312 (bpstat_clear_actions): Use inferior_thread.
1313 (get_bpstat_thread): New.
1314 (bpstat_do_actions): Use it.
1315 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1316 to take a thread_info pointer. All callers adjusted.
1317 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1318 (breakpoint_re_set_thread): Use inferior_thread.
1319 * breakpoint.h (struct inferior): Forward declare.
1320 (bpstat_stop_status): Update.
1321 (remove_breakpoints_pid): Delete.
1322 (remove_breakpoints_inf): New.
1323 * bsd-uthread.c (bsd_uthread_target::wait)
1324 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1325 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1326 (maint_btrace_packet_history_cmd)
1327 (maint_btrace_clear_packet_history_cmd): Adjust.
1328 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1329 inferior_thread.
1330 * cli/cli-interp.c: Include "inferior.h".
1331 * common/refcounted-object.h (struct
1332 refcounted_object_ref_policy): New.
1333 * compile/compile-object-load.c: Include gdbthread.h.
1334 (store_regs): Use inferior_thread.
1335 * corelow.c (core_target::close): Use current_inferior.
1336 (core_target_open): Adjust to use first_thread_of_inferior and use
1337 the current inferior.
1338 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1339 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1340 <thread>: ... this new field. All references adjusted.
1341 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1342 Take a thread_info pointer instead of a ptid_t.
1343 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1344 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1345 thread_info pointer instead of a ptid_t.
1346 * elfread.c: Include "inferior.h".
1347 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1348 Use inferior_thread.
1349 * eval.c (evaluate_subexp): Likewise.
1350 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1351 inferior_thread.
1352 * gdb_proc_service.h (struct thread_info): Forward declare.
1353 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1354 <thread>: ... this new field. All references adjusted.
1355 * gdbarch.h, gdbarch.c: Regenerate.
1356 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1357 'thread' parameter. All implementations and callers adjusted.
1358 * gdbthread.h (thread_info) <set_running>: New method.
1359 (delete_thread, delete_thread_silent): Take a thread_info pointer
1360 instead of a ptid.
1361 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1362 (first_thread_of_process): Delete, replaced by ...
1363 (first_thread_of_inferior): ... this new function. All callers
1364 adjusted.
1365 (any_live_thread_of_process): Delete, replaced by ...
1366 (any_live_thread_of_inferior): ... this new function. All callers
1367 adjusted.
1368 (switch_to_thread, switch_to_no_thread): Declare.
1369 (is_executing): Delete.
1370 (enable_thread_stack_temporaries): Update comment.
1371 <enable_thread_stack_temporaries>: Take a thread_info pointer
1372 instead of a ptid_t. Incref the thread.
1373 <~enable_thread_stack_temporaries>: Decref the thread.
1374 <m_ptid>: Delete
1375 <m_thr>: New.
1376 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1377 (get_last_thread_stack_temporary)
1378 (value_in_thread_stack_temporaries, can_access_registers_thread):
1379 Take a thread_info pointer instead of a ptid_t. All callers
1380 adjusted.
1381 * infcall.c (get_call_return_value): Use inferior_thread.
1382 (run_inferior_call): Work with thread pointers instead of ptid_t.
1383 (call_function_by_hand_dummy): Work with thread pointers instead
1384 of ptid_t. Use thread_info_ref.
1385 * infcmd.c (proceed_thread_callback): Access thread's state
1386 directly.
1387 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1388 access thread's state directly.
1389 (continue_command): Use inferior_thread.
1390 (info_program_command): Use find_thread_ptid and access thread
1391 state directly.
1392 (proceed_after_attach_callback): Use thread state directly.
1393 (notice_new_inferior): Take a thread_info pointer instead of a
1394 ptid_t. All callers adjusted.
1395 (exit_inferior): Take an inferior pointer instead of a pid. All
1396 callers adjusted.
1397 (exit_inferior_silent): New.
1398 (detach_inferior): Delete.
1399 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1400 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1401 (detach_inferior_command, kill_inferior_command): Use
1402 find_inferior_id instead of valid_gdb_inferior_id and
1403 gdb_inferior_id_to_pid.
1404 (inferior_command): Use inferior and thread pointers.
1405 * inferior.h (struct thread_info): Forward declare.
1406 (notice_new_inferior): Take a thread_info pointer instead of a
1407 ptid_t. All callers adjusted.
1408 (detach_inferior): Delete declaration.
1409 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1410 instead of a pid. All callers adjusted.
1411 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1412 (valid_gdb_inferior_id): Delete.
1413 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1414 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1415 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1416 ...
1417 <inf>: ... this new field.
1418 <step_ptid>: Delete, replaced by ...
1419 <step_thread>: ... this new field.
1420 (get_displaced_stepping_state): Take an inferior pointer instead
1421 of a pid. All callers adjusted.
1422 (displaced_step_in_progress_any_inferior): Adjust.
1423 (displaced_step_in_progress_thread): Take a thread pointer instead
1424 of a ptid_t. All callers adjusted.
1425 (displaced_step_in_progress, add_displaced_stepping_state): Take
1426 an inferior pointer instead of a pid. All callers adjusted.
1427 (get_displaced_step_closure_by_addr): Adjust.
1428 (remove_displaced_stepping_state): Take an inferior pointer
1429 instead of a pid. All callers adjusted.
1430 (displaced_step_prepare_throw, displaced_step_prepare)
1431 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1432 All callers adjusted.
1433 (start_step_over): Adjust.
1434 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1435 displaced step queue.
1436 (do_target_resume): Adjust.
1437 (fetch_inferior_event): Use inferior_thread.
1438 (context_switch, get_inferior_stop_soon): Take an
1439 execution_control_state pointer instead of a ptid_t. All callers
1440 adjusted.
1441 (switch_to_thread_cleanup): Delete.
1442 (stop_all_threads): Use scoped_restore_current_thread.
1443 * inline-frame.c: Include "gdbthread.h".
1444 (inline_state) <inline_state>: Take a thread pointer instead of a
1445 ptid_t. All callers adjusted.
1446 <ptid>: Delete, replaced by ...
1447 <thread>: ... this new field.
1448 (find_inline_frame_state): Take a thread pointer instead of a
1449 ptid_t. All callers adjusted.
1450 (skip_inline_frames, step_into_inline_frame)
1451 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1452 pointer instead of a ptid_t. All callers adjusted.
1453 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1454 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1455 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1456 pointers directly.
1457 * linux-nat.c (get_detach_signal): Likewise.
1458 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1459 (thread_db_notice_clone): Adjust.
1460 (thread_db_find_new_threads_silently)
1461 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1462 a thread pointer instead of a ptid_t. All callers adjusted.
1463 * mi/mi-cmd-var.c: Include "inferior.h".
1464 (mi_cmd_var_update_iter): Update to use thread pointers.
1465 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1466 inferior directly.
1467 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1468 out to ...
1469 (mi_output_running): ... this new function.
1470 (mi_on_resume_1): Adjust to use it.
1471 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1472 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1473 directly.
1474 (interrupt_thread_callback): : Adjust to use thread and inferior
1475 pointers.
1476 * proc-service.c: Include "gdbthread.h".
1477 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1478 * progspace-and-thread.c: Include "inferior.h".
1479 * progspace.c: Include "inferior.h".
1480 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1481 hold a reference to an inferior_object.
1482 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1483 inferior_thread.
1484 * python/py-inferior.c (struct inferior_object): Give the type a
1485 tag name instead of a typedef.
1486 (python_on_normal_stop): No need to check if the current thread is
1487 listed.
1488 (inferior_to_inferior_object): Change return type to
1489 inferior_object. All callers adjusted.
1490 (find_thread_object): Delete, bits factored out to ...
1491 (thread_to_thread_object): ... this new function.
1492 * python/py-infthread.c (create_thread_object): Use
1493 inferior_to_inferior_object.
1494 (thpy_is_stopped): Use thread pointer directly.
1495 (gdbpy_selected_thread): Use inferior_thread.
1496 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1497 field, replaced with ...
1498 <thread>: ... this new field. All users adjusted.
1499 (btpy_insn_or_gap_new): Drop const.
1500 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1501 callers adjusted.
1502 * python/py-record.c: Include "gdbthread.h".
1503 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1504 a ptid_t. All callers adjusted.
1505 (gdbpy_current_recording): Use inferior_thread.
1506 * python/py-record.h (recpy_record_object) <ptid>: Delete
1507 field, replaced with ...
1508 <thread>: ... this new field. All users adjusted.
1509 (recpy_element_object) <ptid>: Delete
1510 field, replaced with ...
1511 <thread>: ... this new field. All users adjusted.
1512 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1513 a ptid_t. All callers adjusted.
1514 * python/py-threadevent.c: Include "gdbthread.h".
1515 (get_event_thread): Use thread_to_thread_object.
1516 * python/python-internal.h (struct inferior_object): Forward
1517 declare.
1518 (find_thread_object, find_inferior_object): Delete declarations.
1519 (thread_to_thread_object, inferior_to_inferior_object): New
1520 declarations.
1521 * record-btrace.c: Include "inferior.h".
1522 (require_btrace_thread): Use inferior_thread.
1523 (record_btrace_frame_sniffer)
1524 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1525 (get_thread_current_frame): Use scoped_restore_current_thread and
1526 switch_to_thread.
1527 (get_thread_current_frame): Use thread pointer directly.
1528 (record_btrace_replay_at_breakpoint): Use thread's inferior
1529 pointer directly.
1530 * record-full.c: Include "inferior.h".
1531 * regcache.c: Include "gdbthread.h".
1532 (get_thread_arch_regcache): Use the inferior's address space
1533 directly.
1534 (get_thread_regcache, registers_changed_thread): New.
1535 * regcache.h (get_thread_regcache(thread_info *thread)): New
1536 overload.
1537 (registers_changed_thread): New.
1538 (remote_target) <remote_detach_1>: Swap order of parameters.
1539 (remote_add_thread): <remote_add_thread>: Return the new thread.
1540 (get_remote_thread_info(ptid_t)): New overload.
1541 (remote_target::remote_notice_new_inferior): Use thread pointers
1542 directly.
1543 (remote_target::process_initial_stop_replies): Use
1544 thread_info::set_running.
1545 (remote_target::remote_detach_1, remote_target::detach)
1546 (extended_remote_target::detach): Adjust.
1547 * stack.c (frame_show_address): Use inferior_thread.
1548 * target-debug.h (target_debug_print_thread_info_pp): New.
1549 * target-delegates.c: Regenerate.
1550 * target.c (default_thread_address_space): Delete.
1551 (memory_xfer_partial_1): Use current_inferior.
1552 (target_detach): Use current_inferior.
1553 (target_thread_address_space): Delete.
1554 (generic_mourn_inferior): Use current_inferior.
1555 * target.h (struct target_ops) <thread_address_space>: Delete.
1556 (target_thread_address_space): Delete.
1557 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1558 pointers directly.
1559 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1560 thread pointer instead of a ptid_t. Adjust all callers.
1561 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1562 (first_thread_of_process): Delete, replaced by ...
1563 (first_thread_of_inferior): ... this new function. All callers
1564 adjusted.
1565 (any_thread_of_process): Rename to ...
1566 (any_thread_of_inferior): ... this, and take an inferior pointer.
1567 (any_live_thread_of_process): Rename to ...
1568 (any_live_thread_of_inferior): ... this, and take an inferior
1569 pointer.
1570 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1571 (value_in_thread_stack_temporaries)
1572 (get_last_thread_stack_temporary): Take a thread pointer instead
1573 of a ptid_t. Adjust all callers.
1574 (thread_info::set_running): New.
1575 (validate_registers_access): Use inferior_thread.
1576 (can_access_registers_ptid): Rename to ...
1577 (can_access_registers_thread): ... this, and take a thread
1578 pointer.
1579 (print_thread_info_1): Adjust to compare thread pointers instead
1580 of ptids.
1581 (switch_to_no_thread, switch_to_thread): Make extern.
1582 (scoped_restore_current_thread::~scoped_restore_current_thread):
1583 Use m_thread pointer directly.
1584 (scoped_restore_current_thread::scoped_restore_current_thread):
1585 Use inferior_thread.
1586 (thread_command): Use thread pointer directly.
1587 (thread_num_make_value_helper): Use inferior_thread.
1588 * top.c (execute_command): Use inferior_thread.
1589 * tui/tui-interp.c: Include "inferior.h".
1590 * varobj.c (varobj_create): Use inferior_thread.
1591 (value_of_root_1): Use find_thread_global_id instead of
1592 global_thread_id_to_ptid.
1593
1594 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1595
1596 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1597 possible.
1598 (regcache::write_part): Likewise.
1599 (readable_regcache::cooked_read_part): Update comment.
1600 (readable_regcache::cooked_write_part): Likewise.
1601 * regcache.h: (readable_regcache::read_part): Likewise.
1602 (regcache::write_part): Likewise.
1603
1604 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1605 Dirk Schubert <dirk.schubert@arm.com>
1606
1607 * aarch64-linux-nat.c (post_attach): New.
1608 (aarch64_linux_nat_target::post_attach): Override post_attach to
1609 record the number of hardware debug registers.
1610
1611 2018-06-20 Tom Tromey <tom@tromey.com>
1612
1613 * python/py-param.c (add_setshow_generic): Make parameters const.
1614 (parmpy_init): Update.
1615
1616 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1617
1618 * regcache.h (regcache_cooked_read_ftype): Rename to...
1619 (register_read_ftype): ...this, change type to function_view.
1620 (class reg_buffer) <save>: Remove src parameter.
1621 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1622 parameter non-const in first overload. Remove src parameter in
1623 second overload.
1624 * regcache.c (do_cooked_read): Remove.
1625 (readonly_detached_regcache::readonly_detached_regcache): Make
1626 parameter non-const, adjust call to other constructor.
1627 (reg_buffer::save): Remove src parameter.
1628 * frame.c (do_frame_register_read): Remove.
1629 (frame_save_as_regcache): Use lambda function.
1630 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1631 parameter to ppu2spu_data *.
1632 (ppu2spu_sniffer): Use lambda function.
1633
1634 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1635
1636 * record-full.c (record_full_target::insert_breakpoint): Remove
1637 "struct" keyword, add const.
1638
1639 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1640
1641 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1642 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1643 * configure.ac: Remove AC_PREREQ, add missing quoting.
1644 * gnulib/configure.ac: Modernize usage of
1645 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1646 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1647 (AUTOMAKE_VERSION): Bump to 1.15.1.
1648 * configure: Re-generate.
1649 * config.in: Re-generate.
1650 * aclocal.m4: Re-generate.
1651 * gnulib/aclocal.m4: Re-generate.
1652 * gnulib/config.in: Re-generate.
1653 * gnulib/configure: Re-generate.
1654 * gnulib/import/Makefile.in: Re-generate.
1655
1656 2018-06-19 Pedro Alves <palves@redhat.com>
1657
1658 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1659 (lookup_minimal_symbol_by_pc_section): ... here with
1660 gdb_assert_not_reached added.
1661
1662 2018-06-19 Pedro Alves <palves@redhat.com>
1663
1664 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1665 parameter with a block parameter. Compare location's block symbol
1666 with the frame's block instead of addresses.
1667 (skip_inline_frames): Pass the current block instead of the
1668 frame's address. Break out as soon as we determine the frame
1669 should not be skipped.
1670
1671 2018-06-18 Tom Tromey <tom@tromey.com>
1672
1673 * solib-aix.c (solib_aix_get_section_offsets): Return
1674 unique_xmalloc_ptr.
1675 (solib_aix_solib_create_inferior_hook): Update.
1676
1677 2018-06-18 Tom Tromey <tom@tromey.com>
1678
1679 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1680
1681 2018-06-18 Tom Tromey <tom@tromey.com>
1682
1683 * solib-frv.c (frv_relocate_main_executable): Use
1684 unique_xmalloc_ptr.
1685 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1686 unique_xmalloc_ptr.
1687
1688 2018-06-18 Tom Tromey <tom@tromey.com>
1689
1690 * objfiles.h (inhibit_section_map_updates): Update.
1691 (resume_section_map_updates, resume_section_map_updates_cleanup):
1692 Remove.
1693 * solib-svr4.c (svr4_handle_solib_event): Update.
1694 * objfiles.c (inhibit_section_map_updates): Return
1695 scoped_restore_tmpl<int>.
1696 (resume_section_map_updates, resume_section_map_updates_cleanup):
1697 Remove.
1698
1699 2018-06-18 Tom Tromey <tom@tromey.com>
1700
1701 * valprint.h (read_string): Update.
1702 * valprint.c (read_string): Change type of "buffer".
1703 (val_print_string): Update.
1704 * python/py-value.c (valpy_string): Update.
1705 * language.h (struct language_defn) <la_get_string>: Change
1706 type of "buffer".
1707 (default_get_string, c_get_string): Update.
1708 * language.c (default_get_string): Change type of "buffer".
1709 * guile/scm-value.c (gdbscm_value_to_string): Update.
1710 * c-lang.c (c_get_string): Change type of "buffer".
1711
1712 2018-06-18 Tom Tromey <tom@tromey.com>
1713
1714 * ser-mingw.c (struct pipe_state_destroyer): New.
1715 (pipe_state_up): New typedef.
1716 (cleanup_pipe_state): Remove.
1717 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1718
1719 2018-06-18 Tom Tromey <tom@tromey.com>
1720
1721 * rust-lang.h (rust_yyerror): Don't declare.
1722 * rust-lang.c (rust_language_defn): Update.
1723 * rust-exp.y (yyerror): Now static.
1724 * parse.c (parse_exp_in_context_1): Update.
1725 * p-lang.h (p_yyerror): Don't declare.
1726 * p-lang.c (p_language_defn): Update.
1727 * p-exp.y (yyerror): Now static.
1728 * opencl-lang.c (opencl_language_defn): Update.
1729 * objc-lang.c (objc_language_defn): Update.
1730 * m2-lang.h (m2_yyerror): Don't declare.
1731 * m2-lang.c (m2_language_defn): Update.
1732 * m2-exp.y (yyerror): Now static.
1733 * language.h (struct language_defn) <la_error>: Remove.
1734 * language.c (unk_lang_error): Remove.
1735 (unknown_language_defn, auto_language_defn): Remove.
1736 * go-lang.h (go_yyerror): Don't declare.
1737 * go-lang.c (go_language_defn): Update.
1738 * go-exp.y (yyerror): Now static.
1739 * f-lang.h (f_yyerror): Don't declare.
1740 * f-lang.c (f_language_defn): Update.
1741 * f-exp.y (yyerror): Now static.
1742 * d-lang.h (d_yyerror): Don't declare.
1743 * d-lang.c (d_language_defn): Update.
1744 * d-exp.y (yyerror): Now static.
1745 * c-lang.h (c_yyerror): Don't declare.
1746 * c-lang.c (c_language_defn, cplus_language_defn)
1747 (asm_language_defn, minimal_language_defn): Update.
1748 * c-exp.y (yyerror): Now static.
1749 * ada-lang.h (ada_yyerror): Don't declare.
1750 * ada-lang.c (ada_language_defn): Update.
1751 * ada-exp.y (yyerror): Now static.
1752
1753 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1754
1755 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1756 (store_sveregs_to_thread): Likewise.
1757 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1758 (aarch64_linux_store_inferior_registers): Likewise.
1759 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1760 function.
1761 (aarch64_sve_regs_copy_to_regcache): Likewise.
1762 (aarch64_sve_regs_copy_from_regcache): Likewise.
1763 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1764 declaration.
1765 (aarch64_sve_regs_copy_to_regcache): Likewise.
1766 (aarch64_sve_regs_copy_from_regcache): Likewise.
1767 (sve_context): Structure from Linux headers.
1768 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1769 (SVE_SIG_ZREG_SIZE): Likewise.
1770 (SVE_SIG_PREG_SIZE): Likewise.
1771 (SVE_SIG_FFR_SIZE): Likewise.
1772 (SVE_SIG_REGS_OFFSET): Likewise.
1773 (SVE_SIG_ZREGS_OFFSET): Likewise.
1774 (SVE_SIG_ZREG_OFFSET): Likewise.
1775 (SVE_SIG_ZREGS_SIZE): Likewise.
1776 (SVE_SIG_PREGS_OFFSET): Likewise.
1777 (SVE_SIG_PREG_OFFSET): Likewise.
1778 (SVE_SIG_PREGS_SIZE): Likewise.
1779 (SVE_SIG_FFR_OFFSET): Likewise.
1780 (SVE_SIG_REGS_SIZE): Likewise.
1781 (SVE_SIG_CONTEXT_SIZE): Likewise.
1782 (SVE_PT_REGS_MASK): Likewise.
1783 (SVE_PT_REGS_FPSIMD): Likewise.
1784 (SVE_PT_REGS_SVE): Likewise.
1785 (SVE_PT_VL_INHERIT): Likewise.
1786 (SVE_PT_VL_ONEXEC): Likewise.
1787 (SVE_PT_REGS_OFFSET): Likewise.
1788 (SVE_PT_FPSIMD_OFFSET): Likewise.
1789 (SVE_PT_FPSIMD_SIZE): Likewise.
1790 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1791 (SVE_PT_SVE_PREG_SIZE): Likewise.
1792 (SVE_PT_SVE_FFR_SIZE): Likewise.
1793 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1794 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1795 (__SVE_SIG_TO_PT): Likewise.
1796 (SVE_PT_SVE_OFFSET): Likewise.
1797 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1798 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1799 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1800 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1801 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1802 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1803 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1804 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1805 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1806 (SVE_PT_SVE_SIZE): Likewise.
1807 (SVE_PT_SIZE): Likewise.
1808 (HAS_SVE_STATE): New define.
1809
1810 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1811
1812 * nat/aarch64-sve-linux-sigcontext.h: New file.
1813 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1814 new files.
1815 (SVE_VQ_MIN): Likewise.
1816 (SVE_VQ_MAX): Likewise.
1817 (SVE_VL_MIN): Likewise.
1818 (SVE_VL_MAX): Likewise.
1819 (SVE_NUM_ZREGS): Likewise.
1820 (SVE_NUM_PREGS): Likewise.
1821 (sve_vl_valid): Likewise.
1822 (struct user_sve_header): Likewise.
1823
1824 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1825 Richard Bunt <Richard.Bunt@arm.com>
1826
1827 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1828 was requested by GDB.
1829
1830 2018-06-15 Tom de Vries <tdevries@suse.de>
1831
1832 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1833
1834 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1835
1836 * gnulib/update-gnulib.sh: Print expected versions of
1837 autoconf/aclocal.
1838
1839 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1840
1841 * arch-utils.c (default_type_align): Use type_length_units.
1842 * gdbtypes.c (type_align): Use type_length_units.
1843
1844 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1845
1846 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1847 of 'define' command.
1848
1849 2018-06-14 Tom de Vries <tdevries@suse.de>
1850
1851 PR cli/22573
1852 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1853 get_no_prettyformat_print_options.
1854
1855 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1856
1857 * sparc-nat.h: Include target.h.
1858 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1859 <fetch_registers>: Remove this argument in function call.
1860 <store_registers>: Remove this argument in function call, remove
1861 extra semicolon.
1862 <low_forget_process>: Call sparc64_forget_process instead of
1863 sparc_forget_process.
1864
1865 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1866
1867 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1868 (procfs_target::make_corefile_notes): Adjust to new
1869 target_read_alloc return type.
1870
1871 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1872 Stephen Roberts <stephen.roberts@arm.com>
1873
1874 PR gdb/22882
1875 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1876 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1877 Move should_notify_stop local into more inner scope.
1878
1879 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1880 Stephen Roberts <stephen.roberts@arm.com>
1881
1882 PR gdb/22882
1883 * infrun.c (resume_1): Add call to mark_async_event_handler.
1884
1885 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1886
1887 * infrun.c (do_target_wait): Change old version of $pc printed.
1888
1889 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1890
1891 * dwarf2read.c (read_index_from_section): Rename to...
1892 (read_gdb_index_from_section): ... this, update all callers.
1893 (dwarf2_read_index): Rename to...
1894 (dwarf2_read_gdb_index): ... this, update all callers.
1895
1896 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1897
1898 * gdb/hppa-linux-nat.c
1899 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1900 hppa_linux_nat_target::fetch_registers.
1901
1902 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1903
1904 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1905 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1906 (AARCH64_DWARF_SVE_FFR): Likewise.
1907 (AARCH64_DWARF_SVE_P0): Likewise.
1908 (AARCH64_DWARF_SVE_Z0): Likewise.
1909
1910 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1911
1912 * common/common-regcache.h (raw_compare): New function.
1913 * regcache.c (regcache::raw_compare): Likewise.
1914 * regcache.h (regcache::raw_compare): New declaration.
1915
1916 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1917
1918 * common/common-regcache.h (reg_buffer_common): New structure.
1919 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1920 (reg_buffer::raw_supply): Likewise.
1921 (reg_buffer::raw_supply_integer): Likewise.
1922 (reg_buffer::raw_supply_zeroed): Likewise.
1923 (reg_buffer::raw_collect): Likewise.
1924 (reg_buffer::raw_collect_integer): Likewise.
1925 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1926 (reg_buffer::raw_supply): Likewise.
1927 (reg_buffer::raw_supply_integer): Likewise.
1928 (reg_buffer::raw_supply_zeroed): Likewise.
1929 (reg_buffer::raw_collect): Likewise.
1930 (reg_buffer::raw_collect_integer): Likewise.
1931
1932 2018-06-10 Tom Tromey <tom@tromey.com>
1933
1934 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1935 (class remote_state) <stop_reply_queue>: Now std::vector.
1936 (remote_state::~remote_state)
1937 (remote_target::stop_reply_queue_length): Update.
1938 (struct queue_iter_param, remove_child_of_pending_fork)
1939 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1940 (check_pending_event_prevents_wildcard_vcont_callback)
1941 (remove_stop_reply_for_inferior)
1942 (remove_stop_reply_of_remote_state)
1943 (remote_notif_remove_once_on_match)
1944 (stop_reply_match_ptid_and_ws)
1945 (remote_kill_child_of_pending_fork): Remove.
1946 (remote_target::remove_new_fork_children)
1947 (remote_target::check_pending_events_prevent_wildcard_vcont)
1948 (remote_target::discard_pending_stop_replies)
1949 (remote_target::discard_pending_stop_replies_in_queue)
1950 (remote_target::remote_notif_remove_queued_reply)
1951 (remote_target::queued_stop_reply)
1952 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1953 (remote_target::wait, remote_target::kill_new_fork_children)
1954 (remote_target::async): Update.
1955
1956 2018-06-10 Tom Tromey <tom@tromey.com>
1957
1958 * record-full.c (record_full_arch_list_cleanups): Remove.
1959 (record_full_message): Use try/catch.
1960 (record_full_wait_cleanups): Remove.
1961 (record_full_wait_1): Use try/catch.
1962 (record_full_restore): Likewise.
1963
1964 2018-06-10 Tom Tromey <tom@tromey.com>
1965
1966 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1967 declare VEC. Add constructor.
1968 <in_target_beneath>: Now bool.
1969 (record_full_breakpoints): Now a std::vector, static.
1970 (record_full_sync_record_breakpoints)
1971 (record_full_init_record_breakpoints)
1972 (record_full_target::insert_breakpoint)
1973 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1974
1975 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1976
1977 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1978 * serial.c (serial_interface_lookup): Remove struct keyword.
1979
1980 2018-06-10 Tom Tromey <tom@tromey.com>
1981
1982 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1983 method.
1984 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1985 a method.
1986 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1987 method.
1988 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1989 "beneath" as a method.
1990 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1991 Use "beneath" as a method.
1992
1993 2018-06-10 Tom Tromey <tom@tromey.com>
1994
1995 * tracefile.c (struct trace_file_writer_deleter): New.
1996 <operator()>: Rename from trace_file_writer_xfree.
1997 (trace_file_writer_up): New typedef.
1998 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1999
2000 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2001
2002 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2003 <m_registers, m_register_status>: Change type to
2004 std::unique_ptr.
2005 * regcache.c (reg_buffer::reg_buffer): Use new instead of
2006 XCNEWVEC.
2007
2008 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
2009
2010 * common/common-regcache.h (enum register_status): Add
2011 underlying type "signed char".
2012 * regcache.h (reg_buffer) <m_register_status>: Change type to
2013 register_status *.
2014 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2015 register_status instead of signed char.
2016 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2017 (reg_buffer::get_register_status): Remove cast.
2018 (readable_regcache::raw_read): Remove cast.
2019 (readable_regcache::cooked_read): Remove cast.
2020
2021 2018-06-09 Tom Tromey <tom@tromey.com>
2022
2023 * source.c (reverse_search_command, forward_search_command): Use
2024 scoped_fd.
2025
2026 2018-06-09 Tom Tromey <tom@tromey.com>
2027
2028 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
2029 (serial_ops_list): Now static, std::vector.
2030 (serial_interface_lookup, serial_add_interface): Update.
2031
2032 2018-06-09 Tom Tromey <tom@tromey.com>
2033
2034 * dwarf2read.c (process_cu_includes): Update.
2035 (process_full_comp_unit): Update.
2036 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2037 std::vector.
2038
2039 2018-06-08 Paul Koning <paul_koning@dell.com>
2040
2041 PR gdb/23252
2042
2043 * python/python.c (do_start_initialization):
2044 Avoid call to internal Python API.
2045 (init__gdb_module): New function.
2046
2047 2018-06-08 Gary Benson <gbenson@redhat.com>
2048
2049 * linux-thread-db.c (valprint.h): New include.
2050 (struct check_thread_db_info): New structure.
2051 (check_thread_db_on_load, tdb_testinfo): New static globals.
2052 (check_thread_db, check_thread_db_callback): New functions.
2053 (try_thread_db_load_1): Run integrity checks if requested.
2054 (maintenance_check_libthread_db): New function.
2055 (_initialize_thread_db): Register "maint check libthread-db"
2056 and "maint set/show check-libthread-db".
2057 * NEWS: Mention the above new commands.
2058
2059 2018-06-08 Tom Tromey <tom@tromey.com>
2060
2061 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2062 now a method.
2063
2064 2018-06-08 Tom Tromey <tom@tromey.com>
2065
2066 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2067
2068 2018-06-08 Tom Tromey <tom@tromey.com>
2069
2070 * common/btrace-common.h (struct btrace_data): Add constructor,
2071 destructor, move assignment operator.
2072 <empty, clear, fini>: New methods.
2073 <format>: Initialize.
2074 (btrace_data_init, btrace_data_fini, btrace_data_clear)
2075 (btrace_data_empty): Don't declare.
2076 * common/btrace-common.c (btrace_data_init): Remove.
2077 (btrace_data::fini): Rename from btrace_data_fini.
2078 (btrace_data::empty): Rename from btrace_data_empty.
2079 (btrace_data::clear): Rename from btrace_data_clear. Return
2080 bool.
2081 * btrace.h (make_cleanup_btrace_data): Don't declare.
2082 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2083 (parse_xml_btrace): Update.
2084 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2085 (maint_btrace_clear_packet_history_cmd): Update.
2086
2087 2018-06-07 Pedro Alves <palves@redhat.com>
2088
2089 * target.h (target_ops) <beneath>: Now a method. All references
2090 updated.
2091 (class target_stack): New.
2092 * target.c (g_target_stack): New.
2093 (g_current_top_target): Delete.
2094 (current_top_target): Get the top target out of g_target_stack.
2095 (target_stack::push, target_stack::unpush): New.
2096 (push_target, unpush_target): Reimplement.
2097 (target_is_pushed): Reimplement in terms of g_target_stack.
2098 (target_ops::beneath, target_stack::find_beneath): New.
2099
2100 2018-06-07 Pedro Alves <palves@redhat.com>
2101
2102 * target.h (find_target_beneath): Delete declaration.
2103 * target.c (find_target_beneath): Delete definition.
2104 * aix-thread.c: All callers of find_target_beneath adjusted to
2105 call target_ops::beneath instead.
2106 * bsd-uthread.c: Likewise.
2107 * linux-thread-db.c: Likewise.
2108 * ravenscar-thread.c: Likewise.
2109 * sol-thread.c: Likewise.
2110 * spu-multiarch.c: Likewise.
2111
2112 2018-06-07 Pedro Alves <palves@redhat.com>
2113
2114 * target.h (target_ops) <beneath>: Now a method. All references
2115 updated.
2116 (target_ops) <m_beneath>: New.
2117 * target.c (target_ops::beneath): New.
2118 * corelow.c: Adjust all references to target_ops::beneath.
2119 * linux-thread-db.c: Likewise.
2120 * make-target-delegates: Likewise.
2121 * record-btrace.c: Likewise.
2122 * record-full.c: Likewise.
2123 * remote.c: Likewise.
2124 * target.c: Likewise.
2125 * target-delegates.c: Regenerate.
2126
2127 2018-06-07 Pedro Alves <palves@redhat.com>
2128
2129 * target.h (target_stack): Delete.
2130 (current_top_target): Declare function.
2131 * target.c (target_stack): Delete.
2132 (g_current_top_target): New.
2133 (current_top_target): New function.
2134 * auxv.c: Use current_top_target instead of target_stack
2135 throughout.
2136 * avr-tdep.c: Likewise.
2137 * breakpoint.c: Likewise.
2138 * corefile.c: Likewise.
2139 * elfread.c: Likewise.
2140 * eval.c: Likewise.
2141 * exceptions.c: Likewise.
2142 * frame.c: Likewise.
2143 * gdbarch-selftests.c: Likewise.
2144 * gnu-v3-abi.c: Likewise.
2145 * ia64-tdep.c: Likewise.
2146 * ia64-vms-tdep.c: Likewise.
2147 * infcall.c: Likewise.
2148 * infcmd.c: Likewise.
2149 * infrun.c: Likewise.
2150 * linespec.c: Likewise.
2151 * linux-tdep.c: Likewise.
2152 * minsyms.c: Likewise.
2153 * ppc-linux-nat.c: Likewise.
2154 * ppc-linux-tdep.c: Likewise.
2155 * procfs.c: Likewise.
2156 * regcache.c: Likewise.
2157 * remote.c: Likewise.
2158 * rs6000-tdep.c: Likewise.
2159 * s390-linux-nat.c: Likewise.
2160 * s390-tdep.c: Likewise.
2161 * solib-aix.c: Likewise.
2162 * solib-darwin.c: Likewise.
2163 * solib-dsbt.c: Likewise.
2164 * solib-spu.c: Likewise.
2165 * solib-svr4.c: Likewise.
2166 * solib-target.c: Likewise.
2167 * sparc-tdep.c: Likewise.
2168 * sparc64-tdep.c: Likewise.
2169 * spu-tdep.c: Likewise.
2170 * symfile.c: Likewise.
2171 * symtab.c: Likewise.
2172 * target-descriptions.c: Likewise.
2173 * target-memory.c: Likewise.
2174 * target.c: Likewise.
2175 * target.h: Likewise.
2176 * tracefile-tfile.c: Likewise.
2177 * tracepoint.c: Likewise.
2178 * valops.c: Likewise.
2179 * valprint.c: Likewise.
2180 * value.c: Likewise.
2181 * windows-tdep.c: Likewise.
2182 * mi/mi-main.c: Likewise.
2183
2184 2018-06-07 Tom Tromey <tom@tromey.com>
2185
2186 * valprint.h (build_address_symbolic): Declare.
2187 * printcmd.c (print_address_symbolic): Update.
2188 (build_address_symbolic): Change "name" and "filename" to
2189 std::string.
2190 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2191 Update.
2192 * defs.h (build_address_symbolic): Remove declaration.
2193
2194 2018-06-07 Alan Hayward <alan.hayward@arm.com>
2195
2196 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2197 (aarch64_vnv_type): Add function.
2198 (aarch64_pseudo_register_name): Add V regs for SVE.
2199 (aarch64_pseudo_register_type): Likewise.
2200 (aarch64_pseudo_register_reggroup_p): Likewise.
2201 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2202 (aarch64_pseudo_read_value): Add V regs for SVE.
2203 (aarch64_pseudo_write_2): Use V0 offset for SVE
2204 (aarch64_pseudo_write): Add V regs for SVE.
2205 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2206
2207 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
2208
2209 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2210 (sve_vl_from_vq): Likewise.
2211
2212 2018-06-05 Tom Tromey <tom@tromey.com>
2213
2214 * cli/cli-cmds.c (show_version): Update.
2215 * top.c (print_gdb_version): Add "interactive" parameter.
2216 Update.
2217 * main.c (captured_main_1): Update.
2218 * top.h (print_gdb_version): Add "interactive" parameter and a
2219 comment.
2220
2221 2018-06-05 David Malcolm <dmalcolm@redhat.com>
2222
2223 * common/enum-flags.h: Add trailing semicolon to example in
2224 comment.
2225
2226 2018-06-05 Tom Tromey <tom@tromey.com>
2227
2228 PR cli/12326:
2229 * NEWS: Add entry about pager.
2230 * utils.c (pagination_disabled_for_command): New global.
2231 (prompt_for_continue): Allow "c" response to prompt.
2232 (reinitialize_more_filter): Clear
2233 pagination_disabled_for_command.
2234 (fputs_maybe_filtered): Check pagination_disabled_for_command.
2235
2236 2018-06-04 Tom Tromey <tom@tromey.com>
2237
2238 * ada-lang.h (ada_lookup_symbol_list): Update.
2239 * ada-lang.c (resolve_subexp): Update.
2240 (symbols_are_identical_enums): Change type of syms. Remove nsyms
2241 parameter.
2242 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2243 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2244 results parameter to std::vector.
2245 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2246 Update.
2247 * ada-exp.y (block_lookup): Update.
2248 (select_possible_type_sym): Change type of syms. Remove nsyms
2249 parameter.
2250 (write_var_or_type, write_name_assoc): Update.
2251
2252 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2253
2254 * windows-nat.c (windows_nat_target::xfer_partial): Return
2255 TARGET_XFER_E_IO if we need to delegate to the target beneath
2256 but BENEATH is NULL.
2257
2258 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2259
2260 * Makefile.in (config.status): Add configure.nat as a
2261 dependency.
2262
2263 2018-06-04 Tom Tromey <tom@tromey.com>
2264
2265 * cp-name-parser.y (cpname_state): Add method declarations.
2266 (HANDLE_QUAL): Update.
2267 (cpname_state::d_grab, cpname_state::fill_comp)
2268 (cpname_state::make_operator, cpname_state::make_dtor)
2269 (cpname_state::make_builtin_type, cpname_state::make_name)
2270 (cpname_state::d_qualify, cpname_state::d_int_type)
2271 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2272 (%union): Move earlier.
2273
2274 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2275
2276 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2277
2278 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2279
2280 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2281 (aarch64_pseudo_write_1): Likewise.
2282 (aarch64_pseudo_read_value): Use helper.
2283 (aarch64_pseudo_write): Likewise.
2284
2285 2018-06-04 Pedro Alves <palves@redhat.com>
2286
2287 * darwin-nat.c (darwin_ops): Delete.
2288 (darwin_attach_pid): Use get_native_target.
2289
2290 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2291
2292 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2293 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2294
2295 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2296
2297 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2298 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2299 (aarch64_gdbarch_init): Check for SVE.
2300 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2301
2302 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2303
2304 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2305 * aarch64-tdep.h (aarch64_read_description): Likewise.
2306 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2307 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2308 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2309 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2310 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2311
2312 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2313
2314 * value.c (value_fetch_lazy_bitfield): New.
2315 (value_fetch_lazy_memory): New.
2316 (value_fetch_lazy_register): New.
2317 (value_fetch_lazy): Factor out to smaller functions.
2318
2319 2018-06-01 Tom Tromey <tom@tromey.com>
2320
2321 * cp-name-parser.y (backslashable, represented): Now const.
2322
2323 2018-06-01 Tom Tromey <tom@tromey.com>
2324
2325 * cp-name-parser.y: Include parser-defs.h.
2326 (parser_fprintf): Remove declaration.
2327
2328 2018-06-01 Tom Tromey <tom@tromey.com>
2329
2330 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2331 %parse-param.
2332 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2333 (global_result): Remove globals.
2334 (struct cpname_state): New.
2335 (yyparse): Don't declare.
2336 (yylex, yyerror): Move declarations after %union.
2337 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2338 (make_name): Add state parameter.
2339 Update all callers.
2340 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2341 parameter.
2342 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2343 Update.
2344 (yylex): Add lvalp, state parameters.
2345 (yyerror): Add state parameter.
2346 (cp_demangled_name_to_comp): Update.
2347
2348 2018-06-01 Tom Tromey <tom@tromey.com>
2349
2350 * cp-name-parser.y (parser_fprintf): Declare.
2351 (GDB_YY_REMAP_PREFIX): Define.
2352 Include yy-remap.h. Don't redefine yy* identifiers.
2353
2354 2018-06-01 Tom Tromey <tom@tromey.com>
2355
2356 * python/py-type.c (typy_legacy_template_argument): Update.
2357 * cp-support.h (cp_demangled_name_to_comp): Update.
2358 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2359 parameter to be a "std::string *".
2360 (main): Update.
2361
2362 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2363
2364 * ada-lex.l: Include "diagnostics.h" instead of
2365 "common/diagnostics.h".
2366 * unittests/environ-selftests.c: Likewise.
2367 * common/diagnostics.h: Moved to ../include.
2368
2369 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2370
2371 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2372 to language_mode_manual while calling breakpoint_re_set_one.
2373
2374 2018-06-01 Tom Tromey <tom@tromey.com>
2375
2376 * valops.c (value_cast_structs, destructor_name_p): Update.
2377 * symtab.c (gdb_mangle_name): Update.
2378 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2379 Update.
2380 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2381 (pascal_object_print_value_fields, pascal_object_print_value):
2382 Update.
2383 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2384 * linespec.c (find_methods): Update.
2385 * gdbtypes.h (type_name_no_tag): Remove.
2386 (type_name_or_error): Rename from type_name_no_tag_or_error.
2387 * gdbtypes.c (type_name_no_tag): Remove.
2388 (type_name_or_error): Rename from type_name_no_tag_or_error.
2389 (lookup_struct_elt_type, check_typedef): Update.
2390 * expprint.c (print_subexp_standard): Update.
2391 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2392 * d-namespace.c (d_lookup_nested_symbol): Update.
2393 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2394 (cp_print_class_member): Update.
2395 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2396 * completer.c (add_struct_fields): Update.
2397 * c-typeprint.c (cp_type_print_derivation_info)
2398 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2399 Update.
2400 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2401 (ada_prefer_type, ada_is_exception_sym): Update.
2402
2403 2018-06-01 Tom Tromey <tom@tromey.com>
2404
2405 * valops.c (enum_constant_from_type, value_namespace_elt)
2406 (value_maybe_namespace_elt): Update.
2407 * valarith.c (find_size_for_pointer_math): Update.
2408 * target-descriptions.c (make_gdb_type): Update.
2409 * symmisc.c (print_symbol): Update.
2410 * stabsread.c (define_symbol, read_type)
2411 (complain_about_struct_wipeout, add_undefined_type)
2412 (cleanup_undefined_types_1): Update.
2413 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2414 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2415 (rust_internal_print_type, rust_composite_type)
2416 (rust_evaluate_funcall, rust_evaluate_subexp)
2417 (rust_inclusive_range_type_p): Update.
2418 * python/py-type.c (typy_get_tag): Update.
2419 * p-typeprint.c (pascal_type_print_base): Update.
2420 * mdebugread.c (parse_symbol, parse_type): Update.
2421 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2422 Update.
2423 * guile/scm-type.c (gdbscm_type_tag): Update.
2424 * go-lang.c (sixg_string_p): Update.
2425 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2426 Update.
2427 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2428 (TYPE_TAG_NAME): Remove.
2429 * gdbtypes.c (type_name_no_tag): Simplify.
2430 (check_typedef, check_types_equal, recursive_dump_type)
2431 (copy_type_recursive, arch_composite_type): Update.
2432 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2433 in summary mode when needed.
2434 * eval.c (evaluate_funcall): Update.
2435 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2436 (process_structure_scope, read_enumeration_type)
2437 (read_namespace_type, read_module_type, determine_prefix): Update.
2438 * cp-support.c (inspect_type): Update.
2439 * coffread.c (process_coff_symbol, decode_base_type): Update.
2440 * c-varobj.c (c_is_path_expr_parent): Update.
2441 * c-typeprint.c (c_type_print_base_struct_union): Update.
2442 (c_type_print_base_1): Update. Print struct/class/union/enum in
2443 summary when using C language.
2444 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2445 (gen_maybe_namespace_elt): Update.
2446 * ada-lang.c (ada_type_name): Simplify.
2447 (empty_record, ada_template_to_fixed_record_type_1)
2448 (template_to_static_fixed_type)
2449 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2450
2451 2018-06-01 Tom Tromey <tom@tromey.com>
2452
2453 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2454 c_print_type.
2455 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2456 (c_print_type): Update.
2457 (c_print_type): New overload.
2458 (c_type_print_varspec_prefix, c_type_print_args)
2459 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2460 (c_type_print_base_struct_union, c_type_print_base_1)
2461 (cp_type_print_method_args): Add "language" parameter.
2462 (c_type_print_base): Update.
2463 * c-lang.h (c_print_type): Add new overload.
2464
2465 2018-06-01 Tom Tromey <tom@tromey.com>
2466
2467 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2468 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2469
2470 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2471
2472 * aarch64-tdep.c (aarch64_sve_register_names): New const
2473 var.
2474 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2475 (AARCH64_SVE_Z_REGS_NUM): New define.
2476 (AARCH64_SVE_P_REGS_NUM): Likewise.
2477 (AARCH64_SVE_NUM_REGS): Likewise.
2478
2479 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2480
2481 * nat/linux-ptrace.h [__alpha__]
2482 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2483 definitions.
2484
2485 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2486
2487 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2488 the endianness selected.
2489 * NEWS: Document `set endian auto' mode operation update.
2490
2491 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2492
2493 * Makefile.in: Add new header.
2494 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2495 (sve_vl_from_vg): Likewise.
2496 (sve_vq_from_vl): Likewise.
2497 (sve_vl_from_vq): Likewise.
2498 (sve_vq_from_vg): Likewise.
2499 (sve_vg_from_vq): Likewise.
2500 * configure.nat: Add new c file.
2501 * nat/aarch64-sve-linux-ptrace.c: New file.
2502 * nat/aarch64-sve-linux-ptrace.h: New file.
2503
2504 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2505
2506 * aarch64-linux-nat.c (aarch64_linux_read_description):
2507 Add parmeter zero.
2508 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2509 Likewise.
2510 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2511 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2512 (aarch64_gdbarch_init): Add parmeter zero.
2513 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2514 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2515 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2516 parmeter.
2517 * doc/gdb.texinfo: Describe SVE feature
2518 * features/aarch64-sve.c: New file.
2519
2520 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2521
2522 PR gdb/23210
2523 * gdbarch.sh (significant_addr_bit): Default to zero when
2524 not set by target architecture.
2525 * gdbarch.c: Re-generated.
2526 * utils.c (address_significant): Update.
2527
2528 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2529
2530 * stack.c (func_command): Remove trailing newline in call to error.
2531
2532 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2533
2534 * regcache.h (regcache_raw_collect): Remove, update callers to
2535 use regcache::raw_collect.
2536 * regcache.c (regcache_raw_collect): Remove.
2537
2538 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2539
2540 * regcache.h (regcache_raw_supply): Remove, update callers to
2541 use detached_regcache::raw_supply.
2542 * regcache.c (regcache_raw_supply): Remove.
2543
2544 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2545
2546 * regcache.h (regcache_cooked_write_part): Remove, update
2547 callers to use regcache::cooked_write_part.
2548 * regcache.c (regcache_cooked_write_part): Remove.
2549
2550 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2551
2552 * regcache.h (regcache_cooked_read_part): Remove, update callers
2553 to use readable_regcache::cooked_read_part.
2554 * regcache.c (regcache_cooked_read_part): Remove.
2555
2556 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2557
2558 * regcache.h (regcache_cooked_read_value): Remove, update
2559 callers to use readable_regcache::cooked_read_value.
2560 * regcache.c (regcache_cooked_read_value): Remove.
2561
2562 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2563
2564 * regcache.h (regcache_cooked_write): Remove, update callers to
2565 use regcache::cooked_write.
2566 * regcache.c (regcache_cooked_write): Remove.
2567
2568 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2569
2570 * regcache.h (regcache_invalidate): Remove, update callers to
2571 use detached_regcache::invalidate instead.
2572 * regcache.c (regcache_invalidate): Remove.
2573
2574 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2575
2576 * regcache.h (regcache_raw_write_part): Remove, update callers
2577 to use regcache::raw_write_part instead.
2578 * regcache.c (regcache_raw_write_part): Remove.
2579
2580 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2581
2582 * regcache.h (regcache_raw_read_part): Remove, update callers to
2583 use readable_regcache::raw_read_part instead.
2584 * regcache.c (regcache_raw_read_part): Remove.
2585
2586 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2587
2588 * regcache.h (regcache_cooked_read): Remove, update callers to
2589 use readable_regcache::cooked_read instead.
2590 * regcache.c (regcache_cooked_read): Remove.
2591
2592 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2593
2594 * regcache.h (regcache_raw_write): Remove, update callers to use
2595 regcache::raw_write instead.
2596 * regcache.c (regcache_raw_write): Remove.
2597
2598 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * regcache.h (regcache_raw_read): Remove, update callers to use
2601 readable_regcache::raw_read instead.
2602 * regcache.c (regcache_raw_read): Remove.
2603
2604 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2605
2606 * regcache.h (regcache_raw_update): Remove, update callers to
2607 use readable_regcache::raw_update instead.
2608 * regcache.c (regcache_raw_update): Remove.
2609
2610 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2611
2612 * regcache.h (regcache_register_status): Remove, update callers
2613 to use reg_buffer::get_register_status directly instead.
2614 * regcache.c (regcache_register_status): Remove.
2615
2616 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * regcache.h (regcache_get_ptid): Remove, update all callers to
2619 call regcache::ptid instead.
2620 * regcache.c (regcache_get_ptid): Remove.
2621
2622 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2623
2624 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2625
2626 2018-05-30 Pedro Alves <palves@redhat.com>
2627
2628 * common/common-exceptions.h (exception_rethrow): Use
2629 ATTRIBUTE_NORETURN.
2630
2631 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2632
2633 * breakpoint.c (print_solib_event, check_status_catch_solib):
2634 Remove struct keyword in range-based for loops.
2635 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2636 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2637 Likewise.
2638 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2639 Likewise.
2640 * symfile.c (addr_info_make_relative): Likewise.
2641 * thread.c (value_in_thread_stack_temporaries): Likewise.
2642
2643 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2644
2645 PR gdb/16841
2646 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2647 aggregate type to get its real type before accessing it.
2648
2649 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2650
2651 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2652 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2653 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2654 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2655 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2656 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2657 * printcmd.c (info_address_command): Likewise.
2658
2659 2018-05-29 Tom Tromey <tom@tromey.com>
2660
2661 * windows-nat.c (handle_exception): Update fall-through comment.
2662
2663 2018-05-29 Tom Tromey <tom@tromey.com>
2664
2665 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2666 (struct program_space) <added_solibs>: Now a std::vector.
2667 * breakpoint.c (print_solib_event): Update.
2668 (check_status_catch_solib): Update.
2669 * progspace.c (clear_program_space_solib_cache): Update.
2670 * solib.c (update_solib_list): Update.
2671
2672 2018-05-29 Tom Tromey <tom@tromey.com>
2673
2674 * python/py-type.c (typy_richcompare): Update.
2675 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2676 * gdbtypes.h (types_deeply_equal): Return bool.
2677 (types_equal): Likewise.
2678 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2679 declare VEC.
2680 (check_types_equal): Change worklist to std::vector. Return
2681 bool.
2682 (struct type_equality_entry): Add constructor.
2683 (compare_maybe_null_strings): Return bool.
2684 (check_types_worklist): Return bool. Change worklist to
2685 std::vector.
2686 (types_deeply_equal): Use std::vector.
2687 (types_equal): Return bool.
2688 (compare_maybe_null_strings): Simplify.
2689
2690 2018-05-29 Tom Tromey <tom@tromey.com>
2691
2692 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2693
2694 2018-05-29 Tom Tromey <tom@tromey.com>
2695
2696 * objc-lang.h: Don't include cp-support.h.
2697 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2698 declare VEC.
2699
2700 2018-05-27 Tom Tromey <tom@tromey.com>
2701
2702 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2703
2704 2018-05-25 Tom Tromey <tom@tromey.com>
2705
2706 * value.c (value::location): Initialize.
2707
2708 2018-05-25 Tom Tromey <tom@tromey.com>
2709
2710 * dbxread.c (init_bincl_list): Remove.
2711 (bincl_list): Now a std::vector.
2712 (bincls_allocated, next_bincl): Remove.
2713 (free_bincl_list, do_free_bincl_list_cleanup)
2714 (make_cleanup_free_bincl_list): Remove.
2715 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2716 unique_xmalloc_ptr.
2717 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2718 (struct header_file_location): Add constructor.
2719 (add_bincl_to_list): Remove.
2720
2721 2018-05-25 Tom Tromey <tom@tromey.com>
2722
2723 * tui/tui.c (tui_enable): Update.
2724 * mi/mi-interp.c (mi_interp::init): Update.
2725 * interps.h (class interp) <name>: New method.
2726 <m_name>: Rename from name.
2727 (~scoped_restore_interp): Update.
2728 * interps.c (interp::interp): Update.
2729 (interp_add, interp_set, interp_lookup_existing)
2730 (current_interp_named_p): Update.
2731
2732 2018-05-25 Tom Tromey <tom@tromey.com>
2733
2734 * interps.c (interp_name): Remove.
2735 * mi/mi-interp.c (mi_interp::init): Update.
2736 * interps.h (interp_name): Remove.
2737 (~scoped_restore_interp): Update.
2738 * tui/tui.c (tui_enable): Update.
2739
2740 2018-05-25 Tom Tromey <tom@tromey.com>
2741
2742 * utils.c (fputs_maybe_filtered): Update.
2743 * linespec.c (decode_line_full): Update.
2744 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2745 (mi_print_breakpoint_for_event, mi_solib_loaded)
2746 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2747 (mi_user_selected_context_changed): Update.
2748 * mi/mi-main.c (mi_execute_command): Update.
2749 * cli/cli-script.c (execute_control_command): Update.
2750 * python/python.c (execute_gdb_command): Update.
2751 * solib.c (info_sharedlibrary_command): Update.
2752 * interps.c (interp_ui_out): Remove.
2753 * interps.h (interp_ui_out): Remove.
2754
2755 2018-05-25 Tom Tromey <tom@tromey.com>
2756
2757 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2758 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2759 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2760
2761 2018-05-25 Tom Tromey <tom@tromey.com>
2762
2763 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2764 * interps.c (interp_exec): Use scoped_restore.
2765
2766 2018-05-25 Tom Tromey <tom@tromey.com>
2767
2768 * remote.c (remote_target::remote_file_get): Use
2769 gdb::byte_vector.
2770 (remote_target::remote_file_put): Likewise.
2771
2772 2018-05-25 Tom Tromey <tom@tromey.com>
2773
2774 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2775 a std::string.
2776 (get_pe_section_index, add_pe_exported_sym): Update.
2777 (read_pe_exported_syms): Use gdb::def_vector.
2778
2779 2018-05-25 Tom Tromey <tom@tromey.com>
2780
2781 * frame.c (remove_prev_frame): Remove.
2782 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2783
2784 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2785
2786 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2787 Remove prototypes.
2788 * mips-linux-nat.c (supply_fpregset): Always call
2789 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2790 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2791 `mips_fill_fpregset'.
2792 * mips-linux-tdep.c (mips_supply_fpregset)
2793 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2794 (mips_fill_fpregset_wrapper): Remove functions.
2795 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2796 (mips_linux_fpregset): Remove variable.
2797 (mips_linux_iterate_over_regset_sections): Use
2798 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2799 (mips_linux_o32_sigframe_init): Remove comment.
2800
2801 2018-05-25 Pedro Alves <palves@redhat.com>
2802
2803 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2804 (struct readahead_cache, struct packet_reg, struct
2805 remote_arch_state, class remote_state): Move higher up in the
2806 file.
2807 (remote_target::m_remote_state): Now an object instead of a pointer.
2808 (remote_target::get_remote_state): Adjust.
2809
2810 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2811
2812 * stack.c (select_and_print_frame): Delete.
2813 (struct function_bounds): Move struct within function.
2814 (func_command): Most content moved into new function
2815 find_frame_for_function, use new function, print result, add
2816 function comment.
2817 (find_frame_for_function): New function, now returns a result.
2818
2819 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2820
2821 * stack.c (iterate_over_block_arg_vars): Fix comment.
2822 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2823
2824 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2825
2826 PR gdb/23203
2827 * frame.c
2828 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2829 Define.
2830 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2831 Define.
2832 * frame.h (class scoped_restore_selected_frame): New class.
2833 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2834 of any exception, use scoped_restore_selected_frame to restore the
2835 frame instead.
2836
2837 2018-05-24 Pedro Alves <palves@redhat.com>
2838
2839 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2840 override.
2841
2842 2018-05-23 Tom Tromey <tom@tromey.com>
2843
2844 * complaints.c (struct complaints): Remove.
2845 (symfile_complaint_book): Remove.
2846 (series): New global.
2847 (complaint_internal): Update.
2848 (clear_complaints): Update.
2849
2850 2018-05-23 Tom Tromey <tom@tromey.com>
2851
2852 * complaints.c (counters): New global.
2853 (struct complain): Remove.
2854 (struct complaints) <root>: Remove.
2855 (complaint_sentinel): Remove.
2856 (symfile_complaint_book): Update.
2857 (find_complaint) Remove.
2858 (complaint_internal, clear_complaints): Update.
2859
2860 2018-05-23 Tom Tromey <tom@tromey.com>
2861
2862 * complaints.c (struct complain) <file, line>: Remove.
2863 (find_complaint): Remove file, line parameters.
2864 (complaint_internal): Update.
2865
2866 2018-05-23 Tom Tromey <tom@tromey.com>
2867
2868 * complaints.c (vcomplaint): Remove.
2869 (complaint_internal) Merge in contents of vcomplaint.
2870
2871 2018-05-23 Tom Tromey <tom@tromey.com>
2872
2873 * complaints.c (struct complaints) <explanation>: Remove.
2874 (symfile_explanations): Remove.
2875 (symfile_complaint_book): Update.
2876 (vcomplaint): Update.
2877 (struct explanation): Remove.
2878
2879 2018-05-23 Tom Tromey <tom@tromey.com>
2880
2881 * complaints.c (symfile_complaints): Remove.
2882 (complaint_internal): Remove "complaints" parameter.
2883 (clear_complaints, vcomplaint): Remove "c" parameter.
2884 (get_complaints): Remove.
2885 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2886 (dwarf2_debug_line_missing_file_complaint)
2887 (dwarf2_debug_line_missing_end_sequence_complaint)
2888 (dwarf2_complex_location_expr_complaint)
2889 (dwarf2_const_value_length_mismatch_complaint)
2890 (dwarf2_section_buffer_overflow_complaint)
2891 (dwarf2_macro_malformed_definition_complaint)
2892 (dwarf2_invalid_attrib_class_complaint)
2893 (create_addrmap_from_index, dw2_symtab_iter_next)
2894 (dw2_expand_marked_cus)
2895 (dw2_debug_names_iterator::find_vec_in_debug_names)
2896 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2897 (create_debug_type_hash_table, init_cutu_and_read_dies)
2898 (partial_die_parent_scope, add_partial_enumeration)
2899 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2900 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2901 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2902 (create_cus_hash_table, create_dwp_hash_table)
2903 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2904 (dwarf2_rnglists_process, dwarf2_ranges_process)
2905 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2906 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2907 (handle_struct_member_die, process_structure_scope)
2908 (read_array_type, read_common_block, read_module_type)
2909 (read_tag_pointer_type, read_typedef, read_base_type)
2910 (read_subrange_type, load_partial_dies, partial_die_info::read)
2911 (partial_die_info::read, partial_die_info::read)
2912 (partial_die_info::read, read_checked_initial_length_and_offset)
2913 (dwarf2_string_attr, read_formatted_entries)
2914 (dwarf_decode_line_header)
2915 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2916 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2917 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2918 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2919 (get_signatured_type, get_DW_AT_signature_type)
2920 (decode_locdesc, file_file_name, consume_improper_spaces)
2921 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2922 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2923 (dwarf2_symbol_mark_computed, set_die_type)
2924 (read_attribute_value): Update.
2925 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2926 Update.
2927 * dbxread.c (unknown_symtype_complaint)
2928 (lbrac_mismatch_complaint, repeated_header_complaint)
2929 (set_namestring, function_outside_compilation_unit_complaint)
2930 (read_dbx_symtab, process_one_symbol): Update.
2931 * gdbtypes.c (stub_noname_complaint): Update.
2932 * windows-nat.c (handle_unload_dll): Update.
2933 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2934 (decode_base_type): Update.
2935 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2936 (eb_complaint, record_include_begin, record_include_end)
2937 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2938 (process_xcoff_symbol, read_symbol)
2939 (function_outside_compilation_unit_complaint)
2940 (scan_xcoff_symtab): Update.
2941 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2942 * buildsym.c (finish_block_internal, make_blockvector)
2943 (end_symtab_get_static_block, augment_type_symtab): Update.
2944 * dtrace-probe.c (dtrace_process_dof)
2945 (dtrace_static_probe_ops::get_probes): Update.
2946 * complaints.h (struct complaint): Don't declare.
2947 (symfile_complaints): Remove.
2948 (complaint_internal): Remove "complaints" parameter.
2949 (complaint): Likewise.
2950 (clear_complaints): Likewise.
2951 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2952 (reread_symbols): Update.
2953 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2954 (dwarf2_frame_cache, decode_frame_entry): Update.
2955 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2956 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2957 (info_selectors_command): Update.
2958 * macrotab.c (macro_include, check_for_redefinition)
2959 (macro_undef): Update.
2960 * objfiles.c (filter_overlapping_sections): Update.
2961 * stabsread.c (invalid_cpp_abbrev_complaint)
2962 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2963 (define_symbol, error_type, read_type, rs6000_builtin_type)
2964 (stabs_method_name_from_physname, read_member_functions)
2965 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2966 (attach_fields_to_type, complain_about_struct_wipeout)
2967 (read_range_type, read_args, common_block_start)
2968 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2969 Update.
2970 * mdebugread.c (index_complaint, unknown_ext_complaint)
2971 (basic_type_complaint, bad_tag_guess_complaint)
2972 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2973 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2974 (parse_procedure, parse_lines)
2975 (function_outside_compilation_unit_complaint)
2976 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2977 (bad_tag_guess_complaint, reg_value_complaint): Update.
2978 * cp-support.c (demangled_name_complaint): Update.
2979 * macroscope.c (sal_macro_scope): Update.
2980 * dwarf-index-write.c (class debug_names): Update.
2981
2982 2018-05-23 Tom Tromey <tom@tromey.com>
2983
2984 * complaints.c (clear_complaints): Remove "noisy" parameter.
2985 * complaints.h (clear_complaints): Update.
2986 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2987 (reread_symbols): Update.
2988
2989 2018-05-23 Tom Tromey <tom@tromey.com>
2990
2991 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2992 SUBSEQUENT_MESSAGE.
2993 (vcomplaint, clear_complaints): Update.
2994 (symfile_explanations): Remove some messages.
2995
2996 2018-05-23 Tom Tromey <tom@tromey.com>
2997
2998 * complaints.c (internal_complaint): Remove.
2999 * complaints.h (internal_complaint): Remove.
3000
3001 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3002
3003 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3004
3005 2018-05-22 Pedro Alves <palves@redhat.com>
3006
3007 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3008 (remote_fileio_badfd, remote_fileio_return_errno)
3009 (remote_fileio_return_success, remote_fileio_func_open)
3010 (remote_fileio_func_open, remote_fileio_func_close)
3011 (remote_fileio_func_read, remote_fileio_func_write)
3012 (remote_fileio_func_lseek, remote_fileio_func_rename)
3013 (remote_fileio_func_unlink, remote_fileio_func_stat)
3014 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3015 (remote_fileio_func_isatty, remote_fileio_func_system): Add
3016 remote_target parameter.
3017 (remote_fio_func_map) <func>: Add remote_target parameter.
3018 (do_remote_fileio_request, remote_fileio_request):
3019 * remote-fileio.h (remote_fileio_request):
3020 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3021 remote_target parameter.
3022 (remote_notif_process, handle_notification): Adjust to pass down
3023 the remote.
3024 (remote_notif_state_allocate): Add remote_target parameter. Save
3025 it.
3026 * remote-notif.h (struct remote_target): Forward declare.
3027 (struct notif_client) <parse, ack, can_get_pending_events>: Add
3028 remote_target parameter.
3029 (struct remote_notif_state) <remote>: New field.
3030 (remote_notif_ack, remote_notif_parse): Add remote_target
3031 parameter.
3032 (remote_notif_state_allocate, remote_notif_state_allocate): Add
3033 remote_target parameter.
3034 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3035 (threads_listing_context, rmt_thread_action, protocol_feature)
3036 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3037 (packet_result, struct threads_listing_context, remote_state):
3038 Move definitions and declarations higher up.
3039 (remote_target) <~remote_target>: Declare.
3040 (remote_download_command_source, remote_file_put, remote_file_get)
3041 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3042 (remote_hostio_pread_vFile, remote_hostio_send_command)
3043 (remote_hostio_set_filesystem, remote_hostio_open)
3044 (remote_hostio_close, remote_hostio_unlink, remote_state)
3045 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3046 (get_memory_write_packet_size, get_memory_read_packet_size)
3047 (append_pending_thread_resumptions, remote_detach_1)
3048 (append_resumption, remote_resume_with_vcont)
3049 (add_current_inferior_and_thread, wait_ns, wait_as)
3050 (process_stop_reply, remote_notice_new_inferior)
3051 (process_initial_stop_replies, remote_add_thread)
3052 (btrace_sync_conf, remote_btrace_maybe_reopen)
3053 (remove_new_fork_children, kill_new_fork_children)
3054 (discard_pending_stop_replies, stop_reply_queue_length)
3055 (check_pending_events_prevent_wildcard_vcont)
3056 (discard_pending_stop_replies_in_queue, stop_reply)
3057 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3058 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3059 (remote_interrupt_as, remote_interrupt_ns)
3060 (remote_get_noisy_reply, remote_query_attached)
3061 (remote_add_inferior, remote_current_thread, get_current_thread)
3062 (set_thread, set_general_thread, set_continue_thread)
3063 (set_general_process, write_ptid)
3064 (remote_unpack_thread_info_response, remote_get_threadinfo)
3065 (parse_threadlist_response, remote_get_threadlist)
3066 (remote_threadlist_iterator, remote_get_threads_with_ql)
3067 (remote_get_threads_with_qxfer)
3068 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3069 (get_offsets, remote_check_symbols, remote_supported_packet)
3070 (remote_query_supported, remote_packet_size)
3071 (remote_serial_quit_handler, remote_detach_pid)
3072 (remote_vcont_probe, remote_resume_with_hc)
3073 (send_interrupt_sequence, interrupt_query)
3074 (remote_notif_get_pending_events, fetch_register_using_p)
3075 (send_g_packet, process_g_packet, fetch_registers_using_g)
3076 (store_register_using_P, store_registers_using_G)
3077 (set_remote_traceframe, check_binary_download)
3078 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3079 (remote_xfer_live_readonly_partial, remote_read_bytes)
3080 (remote_send_printf, remote_flash_write, readchar)
3081 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3082 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3083 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3084 (extended_remote_disable_randomization, extended_remote_run)
3085 (send_environment_packet, extended_remote_environment_support)
3086 (extended_remote_set_inferior_cwd, remote_write_qxfer)
3087 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3088 (packet_command): Now methods of ...
3089 (remote_target): ... this class.
3090 (m_remote_state) <remote_target>: New field.
3091 (struct remote_state) <stop_reply_queue,
3092 remote_async_inferior_event_token, wait_forever_enabled_p>: New
3093 fields.
3094 (remote_state::remote_state): Allocate stop_reply_queue.
3095 (remote_state): Delete global.
3096 (get_remote_state_raw): Delete.
3097 (remote_target::get_remote_state): Allocate m_remote_state on
3098 demand.
3099 (get_current_remote_target): New.
3100 (remote_ops, extended_remote_ops): Delete.
3101 (wait_forever_enabled_p, remote_async_inferior_event_token):
3102 Delete, moved to struct remote_state.
3103 (remote_target::close): Delete self. Destruction bits split to
3104 ...
3105 (remote_target::~remote_target): ... this.
3106 (show_memory_packet_size): Adjust to use
3107 get_current_remote_target.
3108 (struct protocol_feature) <func>: Add remote_target parameter.
3109 All callers adjusted.
3110 (curr_quit_handler_target): New.
3111 (remote_serial_quit_handler): Reimplement.
3112 (remote_target::open_1): Adjust to use get_current_remote_target.
3113 Heap-allocate remote_target/extended_remote_target instances.
3114 (vcont_builder::vcont_builder): Add remote_target parameter, and
3115 save it in m_remote. All callers adjusted.
3116 (vcont_builder::m_remote): New field.
3117 (vcont_builder::restart, vcont_builder::flush)
3118 (vcont_builder::push_action): Use it.
3119 (remote_target::commit_resume): Use it.
3120 (struct queue_iter_param) <remote>: New field.
3121 (remote_target::remove_new_fork_children): Fill in 'remote' field.
3122 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3123 (check_pending_event_prevents_wildcard_vcont_callback)
3124 (remote_target::check_pending_events_prevent_wildcard_vcont)
3125 (remote_target::discard_pending_stop_replies)
3126 (remote_target::discard_pending_stop_replies_in_queue)
3127 (remote_target::remote_notif_remove_queued_reply): Fill in
3128 'remote' field.
3129 (remote_notif_get_pending_events): New.
3130 (remote_target::readchar, remote_target::remote_serial_write):
3131 Save/restore curr_quit_handler_target.
3132 (putpkt): New.
3133 (kill_new_fork_children): Fill in 'remote' field.
3134 (packet_command): Use get_current_remote_target, defer to
3135 remote_target method of same name.
3136 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3137 parameter, and save it in m_remote. All callers adjusted.
3138 (scoped_remote_fd::release): Use m_remote.
3139 (scoped_remote_fd::m_remote): New field.
3140 (remote_file_put, remote_file_get, remote_file_delete): Use
3141 get_current_remote_target, defer to remote_target method of same
3142 name.
3143 (remote_btrace_reset): Add remote_state paremeter. Update all
3144 callers.
3145 (remote_async_inferior_event_handler). Pass down 'data'.
3146 (remote_new_objfile): Use get_current_remote_target.
3147 (remote_target::vcont_r_supported): New.
3148 (set_range_stepping): Use get_current_remote_target and
3149 remote_target::vcont_r_supported.
3150 (_initialize_remote): Don't allocate 'remote_state' and
3151 'stop_reply_queue' globals.
3152 * remote.h (struct remote_target): Forward declare.
3153 (getpkt, putpkt, remote_notif_get_pending_events): Add
3154 'remote_target' parameter.
3155
3156 2018-05-22 Pedro Alves <palves@redhat.com>
3157
3158 * remote.c (vcont_builder): Now a class. Make all data members
3159 private.
3160 (vcont_builder) <vcont_builder, restart, flush, push_action>:
3161 Declare methods.
3162 (vcont_builder_restart): Rename to ...
3163 (vcont_builder::restart): ... this.
3164 (vcont_builder_flush): Rename to ...
3165 (vcont_builder::flush): ... this.
3166 (vcont_builder_push_action): Rename to ...
3167 (vcont_builder::push_action): ... this.
3168 (remote_target::commit_resume): Adjust.
3169
3170 2018-05-22 Pedro Alves <palves@redhat.com>
3171
3172 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3173 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3174 (get_fixed_memory_packet_size): New.
3175 (get_memory_packet_size): Use it.
3176 (set_memory_packet_size): Don't override the config size with
3177 DEFAULT_MAX_MEMORY_PACKET_SIZE.
3178 (show_memory_packet_size): Use get_fixed_memory_packet_size.
3179 Don't refer to get_memory_packet_size if not connected to a remote
3180 target. Show "(default)" if configured size is 0.
3181
3182 2018-05-22 Pedro Alves <palves@redhat.com>
3183
3184 * remote.c (remote_target::mourn_inferior): Move
3185 discard_pending_stop_replies call here from ...
3186 (_initialize_remote): ... here.
3187
3188 2018-05-22 Pedro Alves <palves@redhat.com>
3189
3190 * remote.c (compare_section_command): Remove set_general_process
3191 call.
3192
3193 2018-05-22 Pedro Alves <palves@redhat.com>
3194
3195 * remote.c (struct packet_reg, struct remote_arch_state):
3196 Move higher up in the file.
3197 (remote_state) <m_arch_states>: Store remote_arch_state values
3198 instead of remote_arch_state pointers.
3199 (remote_state::get_remote_arch_state): Adjust.
3200
3201 2018-05-22 Pedro Alves <palves@redhat.com>
3202
3203 * remote.c: Include <unordered_map>.
3204 (remote_state): Now a class.
3205 (remote_state) <get_remote_arch_state>: Declare method.
3206 <get_remote_arch_state>: New field.
3207 (remote_arch_state) <remote_arch_state>: Declare ctor.
3208 <regs>: Now a unique_ptr.
3209 (remote_gdbarch_data_handle): Delete.
3210 (get_remote_arch_state): Delete.
3211 (remote_state::get_remote_arch_state): New.
3212 (get_remote_state): Adjust to call remote_state's
3213 get_remote_arch_state method.
3214 (init_remote_state): Delete, bits factored out to ...
3215 (remote_arch_state::remote_arch_state): ... this new method.
3216 (get_remote_packet_size, get_memory_packet_size)
3217 (process_g_packet, remote_target::fetch_registers)
3218 (remote_target::prepare_to_store, store_registers_using_G)
3219 (remote_target::store_registers, remote_target::get_trace_status):
3220 Adjust to call remote_state's method.
3221 (_initialize_remote): Remove reference to
3222 remote_gdbarch_data_handle.
3223
3224 2018-05-22 Pedro Alves <palves@redhat.com>
3225
3226 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3227 pread>: New method declarations.
3228 (remote_target::open_1): Adjust.
3229 (readahead_cache_invalidate): Rename to ...
3230 (readahead_cache::invalidate): ... this, and adjust to be a class
3231 method.
3232 (readahead_cache_invalidate_fd): Rename to ...
3233 (readahead_cache::invalidate_fd): ... this, and adjust to be a
3234 class method.
3235 (remote_hostio_pwrite): Adjust.
3236 (remote_hostio_pread_from_cache): Rename to ...
3237 (readahead_cache::pread): ... this, and adjust to be a class
3238 method.
3239 (remote_hostio_close): Adjust.
3240
3241 2018-05-22 Pedro Alves <palves@redhat.com>
3242
3243 * remote.c (remote_hostio_close_cleanup): Delete.
3244 (class scoped_remote_fd): New.
3245 (remote_file_put, remote_file_get): Use it.
3246
3247 2018-05-22 Pedro Alves <palves@redhat.com>
3248
3249 (struct vCont_action_support): Use bool and initialize all fields.
3250 (struct readahead_cache): Initialize all fields.
3251 (remote_state): Use bool and initialize all fields.
3252 (remote_state::remote_state, remote_state::~remote_state): New.
3253 (new_remote_state): Delete.
3254 (_initialize_remote): Use new to allocate remote_state.
3255
3256 2018-05-22 Pedro Alves <palves@redhat.com>
3257 張俊芝 <zjz@zjz.name>
3258
3259 PR gdb/22973
3260 * c-exp.y: Include "c-support.h".
3261 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3262 of tolower. Use c_ident_is_alpha to scan names.
3263 * c-lang.c: Include "c-support.h".
3264 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3265 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3266 * c-support.h: New file, with bits factored out from ...
3267 * cp-name-parser.y: ... this file.
3268 Include "c-support.h".
3269 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3270 c-support.h and renamed.
3271 (symbol_end, yylex): Adjust.
3272
3273 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3274
3275 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3276 parameter type to CORE_ADDR.
3277 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3278 parameter type in declaration to CORE_ADDR.
3279 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3280 target_auxv_search to get AT_HWCAP and use the result to get the
3281 target description.
3282 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3283 to CORE_ADDR. Remove the cast of the return value to unsigned
3284 long. Fix error predicate of target_auxv_search.
3285 (ppc_linux_nat_target::read_description): Change the type of the
3286 hwcap variable to CORE_ADDR.
3287
3288 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3289
3290 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3291 if the size of fpscr is larger than 32 bits.
3292
3293 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3294
3295 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3296 (ppc32_linux_vsxregmap): New global.
3297 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3298 regcache_supply_regset, and regcache_collect_regset.
3299 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3300 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3301 (fetch_vsx_register, store_vsx_register): Remove.
3302 (fetch_vsx_registers): Add regno parameter. Get regset using
3303 ppc_linux_vsxregset. Use regset to supply registers.
3304 (store_vsx_registers): Add regno parameter. Get regset using
3305 ppc_linux_vsxregset. Use regset to collect registers.
3306 (fetch_register): Call fetch_vsx_registers instead of
3307 fetch_vsx_register.
3308 (store_register): Call store_vsx_registers instead of
3309 store_vsx_register.
3310 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3311 new regno parameter.
3312 (store_ppc_registers): Call store_vsx_registers with -1 for the
3313 new regno parameter.
3314 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3315 (ppc_collect_vsxregset): Remove.
3316
3317 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3318
3319 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3320 offset fields.
3321 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3322 for vector register offset fields.
3323 (ppc64_fbsd_reg_offsets): Likewise.
3324 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3325 to vector register offset fields.
3326 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3327 to vector register offset fields.
3328 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3329 vector register offset fields.
3330 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3331 initializers for vector register offset fields.
3332 (rs6000_aix64_reg_offsets): Likewise.
3333 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3334 (ppc_supply_vrregset): Remove.
3335 (ppc_collect_vrregset): Remove.
3336 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3337 (ppc_linux_vrregset) : New function.
3338 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3339 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3340 (ppc32_linux_vrregset): Remove.
3341 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3342 and use result instead of ppc32_linux_vrregset.
3343 (ppc32_linux_reg_offsets): Remove initializers for vector register
3344 offset fields.
3345 (ppc64_linux_reg_offsets): Likewise.
3346 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3347 * ppc-linux-nat.c: Include regset.h.
3348 (gdb_vrregset_t): Adjust comment to account for little-endian
3349 mode.
3350 (supply_vrregset, fill_vrregset): Remove.
3351 (fetch_altivec_register, store_altivec_register): Remove.
3352 (fetch_altivec_registers): Add regno parameter. Get regset using
3353 ppc_linux_vrregset. Use regset to supply registers.
3354 (store_altivec_registers): Add regno parameter. Get regset using
3355 ppc_linux_vrregset. Use regset to collect registers.
3356 (fetch_register): Call fetch_altivec_registers instead of
3357 fetch_altivec_register.
3358 (store_register): Call store_altivec_registers instead of
3359 store_altivec_register.
3360 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3361 the new regno parameter.
3362 (store_ppc_registers): Call store_altivec_registers with -1 for
3363 the new regno parameter.
3364
3365 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3366
3367 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3368 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3369 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3370 (gdb_vrregset_t): Change array type size to
3371 PPC_LINUX_SIZEOF_VRREGSET.
3372 (gdb_vsxregset_t): Change array type size to
3373 PPC_LINUX_SIZEOF_VSXREGSET.
3374 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3375 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3376 PPC_LINUX_SIZEOF_VSXREGSET.
3377
3378 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3379
3380 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3381 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3382 nat/ppc-linux.c.
3383 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3384 ppc_linux_target_wordsize with tid.
3385 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3386 wordsize with tid.
3387 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3388 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3389 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3390 tid parameter. Remove static specifier.
3391 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3392 (ppc_linux_target_wordsize): New declaration.
3393
3394 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3395
3396 * arch/ppc-linux-common.c: New file.
3397 * arch/ppc-linux-common.h: New file.
3398 * arch/ppc-linux-tdesc.h: New file.
3399 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3400 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3401 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3402 arch/ppc-linux-tdesc.h.
3403 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3404 arch/ppc-linux-tdesc.h.
3405 (ppc_linux_nat_target::read_description): Remove target
3406 description matching code. Fill a ppc_linux_features struct and
3407 call ppc_linux_match_description with it. Move comment about ISA
3408 2.05 to ppc-linux-common.c.
3409 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3410 arch/ppc-linux-tdesc.h.
3411 (ppc_linux_core_read_description): Remove target description
3412 matching code. Fill a ppc_linux_features struct and call
3413 ppc_linux_match_description with it.
3414 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3415 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3416 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3417 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3418 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3419 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3420 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3421 (tdesc_powerpc_e500l): Remove.
3422
3423 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3424
3425 * ada-lang.c (catch_assert_command): Pass empty string instead
3426 of NULL for excep_string argument.
3427
3428 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3429
3430 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3431 the width of the requested register exceeds the width of the
3432 `ptrace' data type.
3433
3434 2018-05-21 Tom Tromey <tom@tromey.com>
3435
3436 * printcmd.c (output_command): Remove.
3437 (output_command_const): Rename to output_command.
3438 * valprint.h (output_command): Rename from output_command_const.
3439 * tracepoint.c (trace_dump_actions): Call output_command.
3440
3441 2018-05-21 Tom Tromey <tom@tromey.com>
3442
3443 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3444 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3445 * ada-lang.h (create_ada_exception_catchpoint): Update.
3446 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3447 std::string.
3448 (create_excep_cond_exprs, ~ada_catchpoint)
3449 (should_stop_exception, print_one_exception)
3450 (print_mention_exception, print_recreate_exception): Update.
3451 (ada_get_next_arg): Remove.
3452 (catch_ada_exception_command_split): Use std::string. Change type
3453 of "excep_string", "cond_string".
3454 (catch_ada_exception_command): Update.
3455 (create_ada_exception_catchpoint): Change type of excep_string.
3456 (ada_exception_sal): Remove excep_string parameter.
3457 (~ada_catchpoint): Remove.
3458
3459 2018-05-21 Tom Tromey <tom@tromey.com>
3460
3461 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3462 cleanup.
3463
3464 2018-05-21 Tom Tromey <tom@tromey.com>
3465
3466 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3467 Return unique_xmalloc_ptr.
3468 (print_it_exception): Update.
3469
3470 2018-05-21 Tom Tromey <tom@tromey.com>
3471
3472 * tracepoint.c (trace_dump_actions): Use std::string.
3473
3474 2018-05-21 Tom Tromey <tom@tromey.com>
3475
3476 * symfile.c (reread_symbols): Use std::string for original_name.
3477
3478 2018-05-21 Tom Tromey <tom@tromey.com>
3479
3480 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3481 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3482 constructor.
3483
3484 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3485
3486 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3487 instance to...
3488 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3489 * objfiles.c (get_objfile_bfd_data): Allocate
3490 objfile_per_bfd_storage with obstack_new when allocating on
3491 obstack.
3492
3493 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3494
3495 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3496 OBSTACK_ZALLOC.
3497 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3498 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3499 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3500 (add_pending): Likewise.
3501 (parse_symbol): Likewise.
3502 (parse_partial_symbols): Likewise.
3503 (psymtab_to_symtab_1): Likewise.
3504 (new_psymtab): Likewise.
3505 (elfmdebug_build_psymtabs): Likewise.
3506 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3507 * objfiles.c (get_objfile_bfd_data): Likewise.
3508 (objfile_register_static_link): Likewise.
3509 * psymtab.c (allocate_psymtab): Likewise.
3510 * stabsread.c (read_member_functions): Likewise.
3511 * xcoffread.c (xcoff_end_psymtab): Likewise.
3512
3513 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3514
3515 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3516 compiler supports std::is_trivially_constructible.
3517 * common/poison.h: Include obstack.h.
3518 (IsMallocable): Define to is_trivially_constructible if the
3519 compiler supports it, define to true_type otherwise.
3520 (xobnew): New.
3521 (XOBNEW): Redefine.
3522 (xobnewvec): New.
3523 (XOBNEWVEC): Redefine.
3524 * gdb_obstack.h (obstack_zalloc): New.
3525 (OBSTACK_ZALLOC): Redefine.
3526 (obstack_calloc): New.
3527 (OBSTACK_CALLOC): Redefine.
3528 (obstack_new): New.
3529 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3530 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3531 gdbarch.c.
3532 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3533 obstack_calloc/obstack_zalloc.
3534 (gdbarch_obstack_zalloc): Remove.
3535 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3536
3537 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3538
3539 * stack.c (backtrace_command_1): Remove useless variable int i.
3540
3541 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3542
3543 * stack.c (print_frame_info): Fix comment.
3544
3545 2018-05-18 Tom Tromey <tom@tromey.com>
3546
3547 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3548 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3549 (~dwarf2_per_objfile): Update
3550 (dwarf2_get_dwz_file): Use new.
3551 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3552 unique_ptr.
3553
3554 2018-05-18 Tom Tromey <tom@tromey.com>
3555
3556 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3557 unique_ptr.
3558 * dwarf2read.c (struct dwp_file): Add constructor and
3559 initializers.
3560 (open_and_init_dwp_file): Return a unique_ptr.
3561 (dwarf2_per_objfile, create_dwp_hash_table)
3562 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3563 (lookup_dwo_unit_in_dwp): Update.
3564 (open_and_init_dwp_file, get_dwp_file): Update.
3565
3566 2018-05-18 Tom Tromey <tom@tromey.com>
3567
3568 * dwarf2read.c (dwarf2_per_objfile): Update.
3569 (struct mapped_index): Add initializers.
3570 (dwarf2_read_index): Use new.
3571 (dw2_symtab_iter_init): Update.
3572 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3573 unique_ptr.
3574
3575 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3576
3577 * dwarf2read.c (mapped_index) <total_size>: Remove.
3578
3579 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3580
3581 * unittests/format_pieces-selftests.c (test_format_specifier):
3582 Add ARI comments.
3583
3584 2018-05-18 Tom Tromey <tom@tromey.com>
3585
3586 * c-typeprint.c (maybe_print_hole): New function.
3587 (c_print_type_struct_field_offset): Update.
3588 (c_type_print_base_struct_union): Call maybe_print_hole.
3589
3590 2018-05-17 Keith Seitz <keiths@redhat.com>
3591
3592 * breakpoint.c (build_bpstat_chain): New function, moved from
3593 bpstat_stop_status.
3594 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3595 If no stop chain is passed, call build_bpstat_chain to build it.
3596 * breakpoint.h (build_bpstat_chain): Declare.
3597 (bpstat_stop_status): Move documentation here from breakpoint.c.
3598 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3599 build the stop chain and pass it to skip_inline_frames.
3600 Pass this stop chain to bpstat_stop_status.
3601 * inline-frame.c: Include breakpoint.h.
3602 (stopped_by_user_bp_inline_frame): New function.
3603 (skip_inline_frames): Add parameter `stop_chain'.
3604 Move documention to inline-frame.h.
3605 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3606 whether the frame should be elided.
3607 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3608 Add moved documentation and update for new parameter.
3609
3610 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3611
3612 PR cli/14975
3613 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3614 unittests/format_pieces-selftests.c.
3615 * common/format.h (format_piece) <operator==>: New.
3616 (format_pieces) <operator[]>: Remove.
3617 * common/format.c (format_pieces::format_pieces): Handle \e.
3618 * unittests/format_pieces-selftests.c: New.
3619
3620 2018-05-17 Tom Tromey <tom@tromey.com>
3621
3622 PR symtab/23010:
3623 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3624 (dw2_instantiate_symtab): Add skip_partial parameter.
3625 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3626 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3627 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3628 (dw2_expand_symtabs_matching_one)
3629 (dw2_find_pc_sect_compunit_symtab)
3630 (dw2_debug_names_lookup_symbol)
3631 (dw2_debug_names_expand_symtabs_for_function): Update.
3632 (init_cutu_and_read_dies): Add skip_partial parameter.
3633 (process_psymtab_comp_unit, build_type_psymtabs_1)
3634 (process_skeletonless_type_unit, load_partial_comp_unit)
3635 (psymtab_to_symtab_1): Update.
3636 (load_full_comp_unit): Add skip_partial parameter.
3637 (process_imported_unit_die, dwarf2_read_addr_index)
3638 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3639 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3640 (read_signatured_type): Update.
3641
3642 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3643
3644 * value.c (release_value): Remove unused variable.
3645 (record_latest_value): Likewise.
3646 (access_value_history): Likewise.
3647 (preserve_values): Likewise.
3648
3649 2018-05-17 Tom Tromey <tom@tromey.com>
3650
3651 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3652 Initialize.
3653
3654 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3655
3656 PR gdb/22286
3657 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3658 Also handle registers whose width is not a multiple of
3659 PTRACE_TYPE_RET.
3660 (linux_nat_trad_target::store_register): Likewise.
3661
3662 2018-05-16 Tom Tromey <tom@tromey.com>
3663
3664 * gdbcore.h (core_bfd): Redefine.
3665 * corelow.c (core_target::close): Update.
3666 (core_target_open): Update.
3667 * progspace.h (struct program_space) <cbfd>: Now a
3668 gdb_bfd_ref_ptr.
3669
3670 2018-05-16 Tom Tromey <tom@tromey.com>
3671
3672 PR cli/19551:
3673 * symfile-add-flags.h (enum symfile_add_flags)
3674 <SYMFILE_NOT_FILENAME>: New constant.
3675 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3676 objfile name from BFD.
3677 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3678 * minidebug.c (find_separate_debug_file_in_section): Put
3679 ".gnu_debugdata" into BFD's file name.
3680
3681 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3682
3683 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3684 Remove.
3685
3686 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3687
3688 PR binutils/21446
3689 * aarch64-tdep.c (aarch64_analyze_prologue,
3690 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3691 Indicate not interested in errors.
3692
3693 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3694
3695 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3696 Supply the MIPS_ZERO_REGNUM register.
3697
3698 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3699
3700 * mips-tdep.c (mask_address_var): Make variable static.
3701
3702 2018-05-14 Tom Tromey <tom@tromey.com>
3703
3704 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3705
3706 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3707
3708 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3709 FXSAVE_ADDR for the mxcsr register.
3710
3711 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3712
3713 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3714
3715 2018-05-11 Pedro Alves <palves@redhat.com>
3716
3717 * corelow.c (core_target) <core_target>: No longer inline.
3718 Initialize m_core_gdbarch, m_core_vec and build the section table
3719 here.
3720 <~core_target>: New.
3721 <core_gdbarch, get_core_register_section>: New methods.
3722 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3723 factored out from ...
3724 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3725 (core_ops): Delete.
3726 (sniff_core_bfd): Add gdbarch parameter.
3727 (core_close): Delete, merged into ...
3728 (core_target::close): ... here. Delete self.
3729 (core_close_cleanup): Delete.
3730 (core_target_open): Allocate a core_target on the heap. Use a
3731 unique_ptr instead of a cleanup. Bits moved into the core_target
3732 ctor. Adjust to use core_target methods instead of globals.
3733 (get_core_register_section): Rename to ...
3734 (core_target::get_core_register_section): ... this and adjust.
3735 (struct get_core_registers_cb_data): New.
3736 (get_core_registers_cb): Use it. Use bool.
3737 (core_target::fetch_registers, core_target::files_info)
3738 (core_target::xfer_partial, core_target::read_description)
3739 (core_target::pid_to, core_target::thread_name): Adjust to
3740 reference class fields instead of globals.
3741 * target.h (struct target_ops_deleter, target_ops_up): New.
3742
3743 2018-05-11 Pedro Alves <palves@redhat.com>
3744
3745 * corefile.c (core_file_command): Move to corelow.c.
3746 * corelow.c (the_core_target): Delete.
3747 (core_file_command): Moved from corefile.c. Check exec_bfd
3748 instead of the_core_target. Use target_detach instead of calling
3749 into the_core_target directly.
3750 (maybe_say_no_core_file_now): New.
3751 (core_target::detach): Use it.
3752 (_initialize_corelow): Remove references to the_core_target.
3753 * gdbcore.h (the_core_target): Delete.
3754
3755 2018-05-11 Tom Tromey <tromey@redhat.com>
3756 Pedro Alves <palves@redhat.com>
3757
3758 * corefile.c (core_bfd): Remove.
3759 * gdbcore.h (core_bfd): Now a macro.
3760 * progspace.h (struct program_space) <cbfd>: New field.
3761
3762 2018-05-11 Tom Tromey <tom@tromey.com>
3763
3764 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3765 gdb::def_vector.
3766
3767 2018-05-10 Tom Tromey <tom@tromey.com>
3768
3769 * configure: Rebuild.
3770 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3771
3772 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3773
3774 PR server/23158:
3775 * regformats/regdat.sh: Adjust script, following the addition
3776 of the new expedite_regs parameter to init_target_desc.
3777
3778 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3779
3780 PR gdb/23127
3781 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3782 set_gdbarch_significant_addr_bit.
3783 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3784 set_gdbarch_significant_addr_bit.
3785 * utils.c (address_significant): Update to sign extend addr.
3786
3787 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3788
3789 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3790 (xtensa_linux_init_abi): Limit tdep->num_regs by
3791 tdep->num_nopriv_regs.
3792 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3793 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3794 not initialized.
3795
3796 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3797
3798 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3799
3800 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3801
3802 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3803 (I387_MXCSR_INIT_VAL): New constant.
3804 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3805 buffer if it was supplied by the inferior.
3806 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3807 (i387_xsave_get_clear_bv): New function.
3808 (i387_supply_xsave): Only read x87 control registers from the
3809 xsave buffer if the feature is enabled, and the state will have
3810 been written, otherwise, provide a suitable default.
3811 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3812 including x87 control registers. Update control registers if they
3813 have changed from the default value, and mark features as enabled
3814 as required.
3815 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3816
3817 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3818
3819 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3820
3821 2018-05-07 Tom Tromey <tom@tromey.com>
3822
3823 * configure: Rebuild.
3824 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3825
3826 2018-05-07 Tom Tromey <tom@tromey.com>
3827
3828 PR tdep/20362:
3829 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3830 bit. Use correct value for VDIV.
3831
3832 2018-05-04 Tom Tromey <tom@tromey.com>
3833
3834 * configure: Rebuild.
3835 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3836
3837 2018-05-04 Tom Tromey <tom@tromey.com>
3838
3839 * linux-record.c (record_linux_system_call) <case
3840 RECORD_SYS_RECVFROM>: Add "break".
3841
3842 2018-05-04 Tom Tromey <tom@tromey.com>
3843
3844 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3845 Add missing "break".
3846 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3847 Add missing "break".
3848
3849 2018-05-04 Tom Tromey <tom@tromey.com>
3850
3851 * rs6000-tdep.c (ppc_process_record_op4)
3852 (ppc_process_record_op63): Add fall-through comment.
3853
3854 2018-05-04 Tom Tromey <tom@tromey.com>
3855
3856 * i386-tdep.c (i386_process_record): Add fall-through comment.
3857
3858 2018-05-04 Tom Tromey <tom@tromey.com>
3859
3860 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3861 comment.
3862
3863 2018-05-04 Tom Tromey <tom@tromey.com>
3864
3865 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3866 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3867 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3868 comment.
3869 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3870 comment.
3871 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3872 comment.
3873
3874 2018-05-04 Tom Tromey <tom@tromey.com>
3875
3876 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3877
3878 2018-05-04 Tom Tromey <tom@tromey.com>
3879
3880 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3881 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3882 * symfile.c (section_is_mapped): Fix fall-through comment.
3883 * stabsread.c (define_symbol, read_member_functions): Fix
3884 fall-through comment.
3885 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3886 comment.
3887 * remote.c (remote_wait_as): Fix fall-through comment.
3888 * p-exp.y (yylex): Fix fall-through comment.
3889 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3890 comment.
3891 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3892 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3893 * jv-exp.y (yylex): Fix fall-through comment.
3894 * go-exp.y (lex_one_token): Fix fall-through comment.
3895 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3896 fall-through comment.
3897 * f-exp.y (yylex): Fix fall-through comment.
3898 * dwarf2read.c (process_die): Fix fall-through comments.
3899 * dbxread.c (process_one_symbol): Fix fall-through comment.
3900 * d-exp.y (lex_one_token): Fix fall-through comment.
3901 * cp-name-parser.y (yylex): Fix fall-through comment.
3902 * coffread.c (coff_symtab_read): Fix fall-through comment.
3903 * c-exp.y (lex_one_token): Fix fall-through comment.
3904 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3905 comment.
3906 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3907 comment.
3908
3909 2018-05-04 Tom Tromey <tom@tromey.com>
3910
3911 PR python/22730:
3912 * NEWS: Mention gdb.execute change.
3913 * gdbcmd.h (execute_control_command): Don't declare.
3914 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3915 execute_control_commands, execute_control_commands_to_string.
3916 * cli/cli-script.h (execute_control_commands)
3917 (execute_control_commands_to_string): Declare.
3918 (execute_control_command): Add from_tty parameter.
3919 * cli/cli-script.c (execute_control_commands)
3920 (execute_control_commands_to_string): New functions.
3921 (execute_user_command): Use execute_control_commands.
3922 (execute_control_command_1): Add "from_tty" parameter. Update.
3923 (execute_control_command): Likewise.
3924
3925 2018-05-04 Tom Tromey <tom@tromey.com>
3926
3927 PR python/22731:
3928 * NEWS: Mention that breakpoint commands are writable.
3929 * python/py-breakpoint.c (bppy_set_commands): New function.
3930 (breakpoint_object_getset) <"commands">: Use it.
3931
3932 2018-05-04 Tom Tromey <tom@tromey.com>
3933
3934 * tracepoint.c (actions_command): Update.
3935 * mi/mi-cmd-break.c (mi_command_line_array)
3936 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3937 (mi_read_next_line): Remove.
3938 (mi_cmd_break_commands): Update.
3939 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3940 function_view.
3941 * cli/cli-script.c (get_command_line): Update.
3942 (process_next_line): Use function_view. Constify.
3943 (recurse_read_control_structure, read_command_lines)
3944 (read_command_lines_1): Change argument types to function_view.
3945 (do_define_command, document_command): Update.
3946 * breakpoint.h (check_tracepoint_command): Don't declare.
3947 * breakpoint.c (check_tracepoint_command): Remove.
3948 (commands_command_1, create_tracepoint_from_upload): Update.
3949
3950 2018-05-04 Tom Tromey <tom@tromey.com>
3951
3952 PR gdb/11750:
3953 * cli/cli-script.h (enum command_control_type) <define_control>:
3954 New constant.
3955 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3956 (build_command_line, execute_control_command_1)
3957 (process_next_line): Likewise.
3958 (do_define_command): New function, extracted from define_command.
3959 (define_command): Use it.
3960
3961 2018-05-04 Tom Tromey <tom@tromey.com>
3962
3963 * tracepoint.c (actions_command): Update.
3964 * cli/cli-script.h (read_command_lines): Update.
3965 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3966 (MAX_TMPBUF): Remove define.
3967 (define_command): Use string_printf.
3968 (document_command): Likewise.
3969 * breakpoint.c (commands_command_1): Update.
3970
3971 2018-05-04 Tom Tromey <tom@tromey.com>
3972
3973 * top.c (execute_command): Update.
3974 * cli/cli-script.h (print_command_lines): Now varargs.
3975 * cli/cli-script.c (print_command_lines): Now varargs.
3976 (execute_control_command_1) <case while_control, case if_control>:
3977 Update.
3978
3979 2018-05-04 Tom Tromey <tom@tromey.com>
3980
3981 * tracepoint.c (all_tracepoint_actions): Rename from
3982 all_tracepoint_actions_and_cleanup. Change return type.
3983 (actions_command, encode_actions_1, encode_actions)
3984 (trace_dump_actions, tdump_command): Update.
3985 * remote.c (remote_download_command_source): Update.
3986 * python/python.c (gdbpy_eval_from_control_command)
3987 (python_command, python_interactive_command): Update.
3988 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3989 * guile/guile.c (guile_command)
3990 (gdbscm_eval_from_control_command, guile_command): Update.
3991 * compile/compile.c (compile_code_command)
3992 (compile_print_command, compile_to_object): Update.
3993 * cli/cli-script.h (struct command_lines_deleter): New.
3994 (counted_command_line): New typedef.
3995 (struct command_line): Add constructor, destructor.
3996 <body_list>: Remove.
3997 <body_list_0, body_list_1>: New members.
3998 (command_line_up): Remove typedef.
3999 (read_command_lines, read_command_lines_1, get_command_line):
4000 Update.
4001 (copy_command_lines): Don't declare.
4002 * cli/cli-script.c (build_command_line): Use "new".
4003 (get_command_line): Return counted_command_line.
4004 (print_command_lines, execute_user_command)
4005 (execute_control_command_1, while_command, if_command): Update.
4006 (realloc_body_list): Remove.
4007 (process_next_line, recurse_read_control_structure): Update.
4008 (read_command_lines, read_command_lines_1): Return counted_command_line.
4009 (free_command_lines): Use "delete".
4010 (copy_command_lines): Remove.
4011 (define_command, document_command, show_user_1): Update.
4012 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4013 a counted_command_line.
4014 * breakpoint.h (counted_command_line): Remove typedef.
4015 (breakpoint_set_commands): Update.
4016 * breakpoint.c (check_no_tracepoint_commands)
4017 (validate_commands_for_breakpoint): Update.
4018 (breakpoint_set_commands): Change commands to be a
4019 counted_command_line.
4020 (commands_command_1, update_dprintf_command_list)
4021 (create_tracepoint_from_upload): Update.
4022
4023 2018-05-04 Tom Tromey <tom@tromey.com>
4024
4025 * cli/cli-decode.h (cmd_list_element): New constructor.
4026 (~cmd_list_element): New destructor.
4027 (struct cmd_list_element): Add initializers.
4028 * cli/cli-decode.c (do_add_cmd): Use "new".
4029 (delete_cmd): Use "delete".
4030
4031 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4032 Pedro Alves <palves@redhat.com>
4033
4034 PR breakpoints/19806 and support for PR external/20207.
4035 * NEWS: Mention Aarch64 watchpoint improvements.
4036 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4037 watchpoints and PR external/20207 watchpoints.
4038 * nat/aarch64-linux-hw-point.c
4039 (kernel_supports_any_contiguous_range): New.
4040 (aarch64_watchpoint_offset): New.
4041 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4042 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4043 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4044 (aarch64_align_watchpoint): New parameters aligned_offset_p and
4045 next_addr_orig_p. Support PR external/20207 watchpoints.
4046 (aarch64_downgrade_regs): New.
4047 (aarch64_dr_state_insert_one_point): New parameters offset and
4048 addr_orig.
4049 (aarch64_dr_state_remove_one_point): Likewise.
4050 (aarch64_handle_breakpoint): Update caller.
4051 (aarch64_handle_aligned_watchpoint): Likewise.
4052 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4053 aligned_offset.
4054 (aarch64_linux_set_debug_regs): Remove const from state. Call
4055 aarch64_downgrade_regs.
4056 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4057 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4058 (DR_CONTROL_MASK): ... this.
4059 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4060 (unsigned int aarch64_watchpoint_offset): New prototype.
4061 (aarch64_linux_set_debug_regs): Remove const from state.
4062 * utils.c (align_up, align_down): Move to ...
4063 * common/common-utils.c (align_up, align_down): ... here.
4064 * utils.h (align_up, align_down): Move to ...
4065 * common/common-utils.h (align_up, align_down): ... here.
4066
4067 2018-05-04 Joel Brobecker <brobecker@adacore.com>
4068
4069 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4070 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4071 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4072 Re-implement to match the ABI as summarized in GCC's
4073 gcc/config/sparc/sparc.c. All callers updated.
4074 (sparc32_store_arguments): Remove assertion.
4075
4076 2018-05-04 Tom Tromey <tom@tromey.com>
4077
4078 * printcmd.c: Don't include tui.h.
4079 (decode_format): Use skip_spaces.
4080
4081 2018-05-04 Tom Tromey <tom@tromey.com>
4082
4083 PR gdb/22619:
4084 * printcmd.c (last_count): New global.
4085 (x_command): Use saved count when repeating.
4086
4087 2018-05-04 Tom Tromey <tom@tromey.com>
4088
4089 * nto-procfs.c (do_closedir_cleanup): Remove.
4090 (procfs_pidlist): Use gdb_dir_up.
4091 * procfs.c (do_closedir_cleanup): Remove.
4092 (proc_update_threads): Use gdb_dir_up.
4093 * common/filestuff.h (struct gdb_dir_deleter): New.
4094 (gdb_dir_up): New typedef.
4095
4096 2018-05-04 Tom Tromey <tom@tromey.com>
4097
4098 * ada-lang.c (print_mention_exception): Use std::string.
4099
4100 2018-05-04 Tom Tromey <tom@tromey.com>
4101
4102 * ada-lang.c (create_excep_cond_exprs): Update.
4103 (ada_exception_catchpoint_cond_string): Use std::string.
4104
4105 2018-05-04 Tom Tromey <tom@tromey.com>
4106
4107 * ada-lang.c (xget_renaming_scope): Return std::string.
4108 (old_renaming_is_invisible): Update.
4109
4110 2018-05-04 Tom Tromey <tom@tromey.com>
4111
4112 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4113 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4114
4115 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
4116
4117 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4118
4119 2018-05-04 Tom Tromey <tom@tromey.com>
4120
4121 * remote.c (remote_query_supported_append): Change type.
4122 (remote_check_symbols): Update.
4123
4124 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
4125
4126 PR gdb/11420
4127 * configure.ac: Prepend libpython.
4128 * python/python-config.py: Likewise.
4129 * configure: Regenerate.
4130
4131 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
4132
4133 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4134
4135 2018-05-03 Pedro Alves <palves@redhat.com>
4136
4137 * s390-linux-nat.c
4138 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4139 override. Write 'true' instead of '1'.
4140 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4141 declaration.
4142
4143 2018-05-02 Pedro Alves <palves@redhat.com>
4144
4145 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4146 add_inf_child_target.
4147 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4148 add_inf_child_target.
4149 * aix-thread.c (aix_thread_target_info): New.
4150 (aix_thread_target) <shortname, longname, doc>: Delete.
4151 <info>: New.
4152 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4153 add_inf_child_target.
4154 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4155 add_inf_child_target.
4156 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4157 add_inf_child_target.
4158 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4159 add_inf_child_target.
4160 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4161 add_inf_child_target.
4162 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4163 add_inf_child_target.
4164 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4165 add_inf_child_target.
4166 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4167 add_inf_child_target.
4168 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4169 add_inf_child_target.
4170 * bfd-target.c (target_bfd_target_info): New.
4171 (target_bfd) <shortname, longname, doc>: Delete.
4172 <info>: New.
4173 * bsd-kvm.c (bsd_kvm_target_info): New.
4174 (bsd_kvm_target) <shortname, longname, doc>: Delete.
4175 <info>: New.
4176 (bsd_kvm_target::open): Rename to ...
4177 (bsd_kvm_target_open): ... this. Adjust.
4178 * bsd-uthread.c (bsd_uthread_target_info): New.
4179 (bsd_uthread_target) <shortname, longname, doc>: Delete.
4180 <info>: New.
4181 * corefile.c (core_file_command): Adjust.
4182 * corelow.c (core_target_info): New.
4183 (core_target) <shortname, longname, doc>: Delete.
4184 <info>: New.
4185 (core_target::open): Rename to ...
4186 (core_target_open): ... this. Adjust.
4187 * ctf.c (ctf_target_info): New.
4188 (ctf_target) <shortname, longname, doc>: Delete.
4189 <info>: New.
4190 (ctf_target::open): Rename to ...
4191 (ctf_target_open): ... this.
4192 (_initialize_ctf): Adjust.
4193 * exec.c (exec_target_info): New.
4194 (exec_target) <shortname, longname, doc>: Delete.
4195 <info>: New.
4196 (exec_target::open): Rename to ...
4197 (exec_target_open): ... this.
4198 * gdbcore.h (core_target_open): Declare.
4199 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4200 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4201 add_inf_child_target.
4202 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4203 add_inf_child_target.
4204 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4205 add_inf_child_target.
4206 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4207 add_inf_child_target.
4208 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4209 add_inf_child_target.
4210 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4211 add_inf_child_target.
4212 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4213 add_inf_child_target.
4214 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4215 add_inf_child_target.
4216 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4217 add_inf_child_target.
4218 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4219 add_inf_child_target.
4220 * inf-child.c (inf_child_target_info): New.
4221 (inf_child_target::info): New.
4222 (inf_child_open_target): Remove 'target' parameter. Use
4223 get_native_target instead.
4224 (inf_child_target::open): Delete.
4225 (add_inf_child_target): New.
4226 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4227 Delete.
4228 <info>: New.
4229 (add_inf_child_target): Declare.
4230 (inf_child_open_target): Declare.
4231 * linux-thread-db.c (thread_db_target_info): New.
4232 (thread_db_target) <shortname, longname, doc>: Delete.
4233 <info>: New.
4234 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4235 add_inf_child_target.
4236 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4237 add_inf_child_target.
4238 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4239 add_inf_child_target.
4240 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4241 add_inf_child_target.
4242 * make-target-delegates (print_class): Adjust.
4243 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4244 add_inf_child_target.
4245 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4246 add_inf_child_target.
4247 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4248 add_inf_child_target.
4249 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4250 add_inf_child_target.
4251 * nto-procfs.c (nto_native_target_info): New.
4252 (nto_procfs_target_native) <shortname, longname, doc>:
4253 Delete.
4254 <info>: New.
4255 (nto_procfs_target_info): New.
4256 (nto_procfs_target_procfs) <shortname, longname, doc>:
4257 Delete.
4258 <info>: New.
4259 (init_procfs_targets): Adjust.
4260 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4261 add_inf_child_target.
4262 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4263 add_inf_child_target.
4264 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4265 add_inf_child_target.
4266 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4267 add_inf_child_target.
4268 * ravenscar-thread.c (ravenscar_target_info): New.
4269 (ravenscar_thread_target) <shortname, longname, doc>:
4270 Delete.
4271 <info>: New.
4272 * record-btrace.c (record_btrace_target_info):
4273 (record_btrace_target) <shortname, longname, doc>: Delete.
4274 <info>: New.
4275 (record_btrace_target::open): Rename to ...
4276 (record_btrace_target_open): ... this. Adjust.
4277 * record-full.c (record_longname, record_doc): New.
4278 (record_full_base_target) <shortname, longname, doc>: Delete.
4279 <info>: New.
4280 (record_full_target_info): New.
4281 (record_full_target): <shortname>: Delete.
4282 <info>: New.
4283 (record_full_core_open_1, record_full_open_1): Update comments.
4284 (record_full_base_target::open): Rename to ...
4285 (record_full_open): ... this.
4286 (cmd_record_full_restore): Update.
4287 (_initialize_record_full): Update.
4288 * remote-sim.c (remote_sim_target_info): New.
4289 (gdbsim_target) <shortname, longname, doc>: Delete.
4290 <info>: New.
4291 (gdbsim_target::open): Rename to ...
4292 (gdbsim_target_open): ... this.
4293 (_initialize_remote_sim): Adjust.
4294 * remote.c (remote_doc): New.
4295 (remote_target_info): New.
4296 (remote_target) <shortname, longname, doc>: Delete.
4297 <info>: New.
4298 (extended_remote_target_info): New.
4299 (extended_remote_target) <shortname, longname, doc>: Delete.
4300 <info>: New.
4301 (remote_target::open_1): Make static. Adjust.
4302 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4303 * s390-linux-nat.c (_initialize_s390_nat): Use
4304 add_inf_child_target.
4305 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4306 add_inf_child_target.
4307 * sol-thread.c (thread_db_target_info): New.
4308 (sol_thread_target) <shortname, longname, doc>: Delete.
4309 <info>: New.
4310 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4311 add_inf_child_target.
4312 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4313 add_inf_child_target.
4314 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4315 add_inf_child_target.
4316 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4317 add_inf_child_target.
4318 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4319 add_inf_child_target.
4320 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4321 add_inf_child_target.
4322 * spu-linux-nat.c (_initialize_spu_nat): Use
4323 add_inf_child_target.
4324 * spu-multiarch.c (spu_multiarch_target_info): New.
4325 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4326 <info>: New.
4327 * target-delegates.c: Regenerate.
4328 * target.c: Include <unordered_map>.
4329 (target_ops_p): Delete.
4330 (DEF_VEC_P(target_ops_p)): Delete.
4331 (target_factories): New.
4332 (test_target_info): New.
4333 (test_target_ops::info): New.
4334 (open_target): Adjust to use target_factories.
4335 (add_target_with_completer): Rename to ...
4336 (add_target): ... this. Change prototype. Register target_info
4337 and open callback in target_factories. Register target_info in
4338 command context instead of target_ops.
4339 (add_target): Delete old implementation.
4340 (add_deprecated_target_alias): Change prototype. Adjust.
4341 (the_native_target): New.
4342 (set_native_target, get_native_target): New.
4343 (find_default_run_target): Use the_native_target.
4344 (find_attach_target, find_run_target): Simplify.
4345 (target_ops::open): Delete.
4346 (dummy_target_info): New.
4347 (dummy_target::shortname, dummy_target::longname)
4348 (dummy_target::doc): Delete.
4349 (dummy_target::info): New.
4350 (debug_target::shortname, debug_target::longname)
4351 (debug_target::doc): Delete.
4352 (debug_target::info): New.
4353 * target.h (struct target_info): New.
4354 (target_ops::~target_ops): Add comment.
4355 (target_ops::info): New.
4356 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4357 longer virtual. Implement in terms of target_info.
4358 (set_native_target, get_native_target): Declare.
4359 (target_open_ftype): New.
4360 (add_target, add_target_with_completer)
4361 (add_deprecated_target_alias): Change prototype.
4362 (test_target) <shortname, longname, doc>: Delete.
4363 <info>: New.
4364 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4365 add_inf_child_target.
4366 * tracefile-tfile.c (tfile_target_info): New.
4367 (tfile_target) <shortname, longname, doc>: Delete.
4368 <info>: New.
4369 (tfile_target::open): Rename to ...
4370 (tfile_target_open): ... this.
4371 (_initialize_tracefile_tfile): Adjust.
4372 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4373 add_inf_child_target.
4374 * windows-nat.c (_initialize_windows_nat): Use
4375 add_inf_child_target.
4376 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4377 add_inf_child_target.
4378
4379 2018-05-02 Pedro Alves <palves@redhat.com>
4380
4381 * linux-nat.h (linux_nat_target) <low_new_thread,
4382 low_delete_thread, low_new_fork, low_forget_process,
4383 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4384 New virtual methods.
4385 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4386 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4387 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4388 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4389 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4390 Delete.
4391 * linux-fork.c (delete_fork): Adjust to call low method.
4392 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4393 (linux_nat_new_fork, linux_nat_forget_process_hook)
4394 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4395 (linux_nat_status_is_event):
4396 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4397 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4398 to call low method.
4399 (sigtrap_is_event): Rename to ...
4400 (linux_nat_target::low_status_is_event): ... this.
4401 (linux_nat_set_status_is_event): Delete.
4402 (save_stop_reason, linux_nat_wait_1)
4403 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4404 low methods.
4405 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4406 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4407 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4408 (linux_nat_set_prepare_to_resume): Delete.
4409 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4410 low virtual methods.
4411 * amd64-linux-nat.c: Likewise.
4412 * arm-linux-nat.c: Likewise.
4413 * i386-linux-nat.c: Likewise.
4414 * ia64-linux-nat.c: Likewise.
4415 * mips-linux-nat.c: Likewise.
4416 * ppc-linux-nat.c: Likewise.
4417 * s390-linux-nat.c: Likewise.
4418 * sparc64-linux-nat.c: Likewise.
4419 * x86-linux-nat.c: Likewise.
4420 * x86-linux-nat.h: Include "nat/x86-linux.h".
4421 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4422 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4423 Override methods.
4424
4425 2018-05-02 Pedro Alves <palves@redhat.com>
4426
4427 * target.h (target_ops)
4428 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4429 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4430 stopped_by_watchpoint, have_continuable_watchpoint,
4431 stopped_data_address, watchpoint_addr_within_range,
4432 can_accel_watchpoint_condition, can_run, thread_alive,
4433 has_all_memory, has_memory, has_stack, has_registers,
4434 has_execution, can_async_p, is_async_p, supports_non_stop,
4435 always_non_stop_p, can_execute_reverse, supports_multi_process,
4436 supports_enable_disable_tracepoint,
4437 supports_disable_randomization, supports_string_tracing,
4438 supports_evaluation_of_breakpoint_conditions,
4439 can_run_breakpoint_commands, filesystem_is_local,
4440 can_download_tracepoint, get_trace_state_variable_value,
4441 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4442 record_is_replaying, record_will_replay,
4443 augmented_libraries_svr4_read>: Adjust to return bool.
4444 * aarch64-linux-nat.c: All implementations adjusted.
4445 * aix-thread.c: All implementations adjusted.
4446 * arm-linux-nat.c: All implementations adjusted.
4447 * breakpoint.c: All implementations adjusted.
4448 * bsd-kvm.c: All implementations adjusted.
4449 * bsd-uthread.c: All implementations adjusted.
4450 * corelow.c: All implementations adjusted.
4451 * ctf.c: All implementations adjusted.
4452 * darwin-nat.c: All implementations adjusted.
4453 * darwin-nat.h: All implementations adjusted.
4454 * exec.c: All implementations adjusted.
4455 * fbsd-nat.c: All implementations adjusted.
4456 * fbsd-nat.h: All implementations adjusted.
4457 * gnu-nat.c: All implementations adjusted.
4458 * gnu-nat.h: All implementations adjusted.
4459 * go32-nat.c: All implementations adjusted.
4460 * ia64-linux-nat.c: All implementations adjusted.
4461 * inf-child.c: All implementations adjusted.
4462 * inf-child.h: All implementations adjusted.
4463 * inf-ptrace.c: All implementations adjusted.
4464 * inf-ptrace.h: All implementations adjusted.
4465 * linux-nat.c: All implementations adjusted.
4466 * linux-nat.h: All implementations adjusted.
4467 * mips-linux-nat.c: All implementations adjusted.
4468 * nto-procfs.c: All implementations adjusted.
4469 * ppc-linux-nat.c: All implementations adjusted.
4470 * procfs.c: All implementations adjusted.
4471 * ravenscar-thread.c: All implementations adjusted.
4472 * record-btrace.c: All implementations adjusted.
4473 * record-full.c: All implementations adjusted.
4474 * remote-sim.c: All implementations adjusted.
4475 * remote.c: All implementations adjusted.
4476 * s390-linux-nat.c: All implementations adjusted.
4477 * sol-thread.c: All implementations adjusted.
4478 * spu-multiarch.c: All implementations adjusted.
4479 * target-delegates.c: All implementations adjusted.
4480 * target.c: All implementations adjusted.
4481 * target.h: All implementations adjusted.
4482 * tracefile-tfile.c: All implementations adjusted.
4483 * tracefile.c: All implementations adjusted.
4484 * tracefile.h: All implementations adjusted.
4485 * windows-nat.c: All implementations adjusted.
4486 * x86-linux-nat.h: All implementations adjusted.
4487 * x86-nat.h: All implementations adjusted.
4488
4489 2018-05-02 Pedro Alves <palves@redhat.com>
4490
4491 * make-target-delegates (scan_target_h): Don't trim lines here.
4492 Replace sequences of tabs and/or whitespace with a single
4493 whitespace.
4494 (top level, parsing methods): Trim each line before processing it
4495 here.
4496
4497 2018-05-02 Pedro Alves <palves@redhat.com>
4498 John Baldwin <jhb@freebsd.org>
4499
4500 * target.h (enum strata) <debug_stratum>: New.
4501 (struct target_ops) <all delegation methods>: Replace by C++
4502 virtual methods, and drop "to_" prefix. All references updated
4503 throughout.
4504 <to_shortname, to_longname, to_doc, to_data,
4505 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4506 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4507 virtual methods. All references updated throughout.
4508 <can_attach, supports_terminal_ours, can_create_inferior,
4509 get_thread_control_capabilities, attach_no_wait>: New
4510 virtual methods.
4511 <insert_breakpoint, remove_breakpoint>: Now
4512 TARGET_DEFAULT_NORETURN methods.
4513 <info_proc>: Now returns bool.
4514 <to_magic>: Delete.
4515 (OPS_MAGIC): Delete.
4516 (current_target): Delete. All references replaced by references
4517 to ...
4518 (target_stack): ... this. New.
4519 (target_shortname, target_longname): Adjust.
4520 (target_can_run): Now a function declaration.
4521 (default_child_has_all_memory, default_child_has_memory)
4522 (default_child_has_stack, default_child_has_registers)
4523 (default_child_has_execution): Remove target_ops parameter.
4524 (complete_target_initialization): Delete.
4525 (memory_breakpoint_target): New template class.
4526 (test_target_ops): Refactor as a C++ class with virtual methods.
4527 * make-target-delegates (NAME_PART): Tighten.
4528 (POINTER_PART, CP_SYMBOL): New.
4529 (SIMPLE_RETURN_PART): Reimplement.
4530 (VEC_RETURN_PART): Expect less.
4531 (RETURN_PART, VIRTUAL_PART): New.
4532 (METHOD): Adjust to C++ virtual methods.
4533 (scan_target_h): Remove reference to C99.
4534 (dname): Output "target_ops::" prefix.
4535 (write_function_header): Adjust to output a C++ class method.
4536 (write_declaration): New.
4537 (write_delegator): Adjust to output a C++ class method.
4538 (tdname): Output "dummy_target::" prefix.
4539 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4540 method.
4541 (tdefault_names, debug_names): Delete.
4542 (return_types, tdefaults, styles, argtypes_array): New.
4543 (top level): All methods are delegators.
4544 (print_class): New.
4545 (top level): Print dummy_target and debug_target classes.
4546 * target-delegates.c: Regenerate.
4547 * target-debug.h (target_debug_print_enum_info_proc_what)
4548 (target_debug_print_thread_control_capabilities)
4549 (target_debug_print_thread_info_p): New.
4550 * target.c (dummy_target): Delete.
4551 (the_dummy_target, the_debug_target): New.
4552 (target_stack): Now extern.
4553 (set_targetdebug): Push/unpush debug target.
4554 (default_child_has_all_memory, default_child_has_memory)
4555 (default_child_has_stack, default_child_has_registers)
4556 (default_child_has_execution): Remove target_ops parameter.
4557 (complete_target_initialization): Delete.
4558 (add_target_with_completer): No longer call
4559 complete_target_initialization.
4560 (target_supports_terminal_ours): Use regular delegation.
4561 (update_current_target): Delete.
4562 (push_target): No longer check magic number. Don't call
4563 update_current_target.
4564 (unpush_target): Don't call update_current_target.
4565 (target_is_pushed): No longer check magic number.
4566 (target_require_runnable): Skip for all stratums over
4567 process_stratum.
4568 (target_ops::info_proc): New.
4569 (target_info_proc): Use find_target_at and
4570 find_default_run_target.
4571 (target_supports_disable_randomization): Use regular delegation.
4572 (target_get_osdata): Use find_target_at.
4573 (target_ops::open, target_ops::close, target_ops::can_attach)
4574 (target_ops::attach, target_ops::can_create_inferior)
4575 (target_ops::create_inferior, target_ops::can_run)
4576 (target_can_run): New.
4577 (default_fileio_target): Use regular delegation.
4578 (target_ops::fileio_open, target_ops::fileio_pwrite)
4579 (target_ops::fileio_pread, target_ops::fileio_fstat)
4580 (target_ops::fileio_close, target_ops::fileio_unlink)
4581 (target_ops::fileio_readlink): New.
4582 (target_fileio_open_1, target_fileio_unlink)
4583 (target_fileio_readlink): Always call the target method. Handle
4584 FILEIO_ENOSYS.
4585 (return_zero, return_zero_has_execution): Delete.
4586 (init_dummy_target): Delete.
4587 (dummy_target::dummy_target, dummy_target::shortname)
4588 (dummy_target::longname, dummy_target::doc)
4589 (debug_target::debug_target, debug_target::shortname)
4590 (debug_target::longname, debug_target::doc): New.
4591 (target_supports_delete_record): Use regular delegation.
4592 (setup_target_debug): Delete.
4593 (maintenance_print_target_stack): Skip debug_stratum.
4594 (initialize_targets): Instantiate the_dummy_target and
4595 the_debug_target.
4596 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4597 use target_stack.
4598 (target_auxv_search, fprint_target_auxv): Adjust.
4599 (info_auxv_command): Adjust to use target_stack.
4600 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4601 * exceptions.c (print_flush): Handle a NULL target_stack.
4602 * regcache.c (target_ops_no_register): Refactor as class with
4603 virtual methods.
4604
4605 * exec.c (exec_target): New class.
4606 (exec_ops): Now an exec_target.
4607 (exec_open, exec_close_1, exec_get_section_table)
4608 (exec_xfer_partial, exec_files_info, exec_has_memory)
4609 (exec_make_note_section): Refactor as exec_target methods.
4610 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4611 Delete.
4612 (exec_target::find_memory_regions): New.
4613 (_initialize_exec): Don't call init_exec_ops.
4614 * gdbcore.h (exec_file_clear): Delete.
4615
4616 * corefile.c (core_target): Delete.
4617 (core_file_command): Adjust.
4618 * corelow.c (core_target): New class.
4619 (the_core_target): New.
4620 (core_close): Remove target_ops parameter.
4621 (core_close_cleanup): Adjust.
4622 (core_target::close): New.
4623 (core_open, core_detach, get_core_registers, core_files_info)
4624 (core_xfer_partial, core_thread_alive, core_read_description)
4625 (core_pid_to_str, core_thread_name, core_has_memory)
4626 (core_has_stack, core_has_registers, core_info_proc): Rework as
4627 core_target methods.
4628 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4629 (_initialize_corelow): Initialize the_core_target.
4630 * gdbcore.h (core_target): Delete.
4631 (the_core_target): New.
4632
4633 * ctf.c: (ctf_target): New class.
4634 (ctf_ops): Now a ctf_target.
4635 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4636 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4637 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4638 methods.
4639 (init_ctf_ops): Delete.
4640 (_initialize_ctf): Don't call it.
4641 * tracefile-tfile.c (tfile_target): New class.
4642 (tfile_ops): Now a tfile_target.
4643 (tfile_open, tfile_close, tfile_files_info)
4644 (tfile_get_tracepoint_status, tfile_trace_find)
4645 (tfile_fetch_registers, tfile_xfer_partial)
4646 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4647 Refactor as tfile_target methods.
4648 (tfile_xfer_partial_features): Remove target_ops parameter.
4649 (init_tfile_ops): Delete.
4650 (_initialize_tracefile_tfile): Don't call it.
4651 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4652 (tracefile_has_stack, tracefile_has_registers)
4653 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4654 tracefile_target methods.
4655 (init_tracefile_ops): Delete.
4656 (tracefile_target::tracefile_target): New.
4657 * tracefile.h: Include "target.h".
4658 (tracefile_target): New class.
4659 (init_tracefile_ops): Delete.
4660
4661 * spu-multiarch.c (spu_multiarch_target): New class.
4662 (spu_ops): Now a spu_multiarch_target.
4663 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4664 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4665 (spu_search_memory, spu_mourn_inferior): Refactor as
4666 spu_multiarch_target methods.
4667 (init_spu_ops): Delete.
4668 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4669 complete_target_initialization.
4670
4671 * ravenscar-thread.c (ravenscar_thread_target): New class.
4672 (ravenscar_ops): Now a ravenscar_thread_target.
4673 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4674 (ravenscar_thread_alive, ravenscar_pid_to_str)
4675 (ravenscar_fetch_registers, ravenscar_store_registers)
4676 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4677 (ravenscar_stopped_by_hw_breakpoint)
4678 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4679 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4680 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4681 methods.
4682 (init_ravenscar_thread_ops): Delete.
4683 (_initialize_ravenscar): Remove references to
4684 init_ravenscar_thread_ops and complete_target_initialization.
4685
4686 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4687 (bsd_uthread_target): New class.
4688 (bsd_uthread_ops): Now a bsd_uthread_target.
4689 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4690 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4691 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4692 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4693 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4694 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4695 (bsd_uthread_target): Delete function.
4696 (_initialize_bsd_uthread): Remove reference to
4697 complete_target_initialization.
4698
4699 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4700 (target_bfd): ... this new class.
4701 (target_bfd_xfer_partial, target_bfd_get_section_table)
4702 (target_bfd_close): Refactor as target_bfd methods.
4703 (target_bfd::~target_bfd): New.
4704 (target_bfd_reopen): Adjust.
4705 (target_bfd::close): New.
4706
4707 * record-btrace.c (record_btrace_target): New class.
4708 (record_btrace_ops): Now a record_btrace_target.
4709 (record_btrace_open, record_btrace_stop_recording)
4710 (record_btrace_disconnect, record_btrace_close)
4711 (record_btrace_async, record_btrace_info)
4712 (record_btrace_insn_history, record_btrace_insn_history_range)
4713 (record_btrace_insn_history_from, record_btrace_call_history)
4714 (record_btrace_call_history_range)
4715 (record_btrace_call_history_from, record_btrace_record_method)
4716 (record_btrace_is_replaying, record_btrace_will_replay)
4717 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4718 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4719 (record_btrace_store_registers, record_btrace_prepare_to_store)
4720 (record_btrace_to_get_unwinder)
4721 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4722 (record_btrace_commit_resume, record_btrace_wait)
4723 (record_btrace_stop, record_btrace_can_execute_reverse)
4724 (record_btrace_stopped_by_sw_breakpoint)
4725 (record_btrace_supports_stopped_by_sw_breakpoint)
4726 (record_btrace_stopped_by_hw_breakpoint)
4727 (record_btrace_supports_stopped_by_hw_breakpoint)
4728 (record_btrace_update_thread_list, record_btrace_thread_alive)
4729 (record_btrace_goto_begin, record_btrace_goto_end)
4730 (record_btrace_goto, record_btrace_stop_replaying_all)
4731 (record_btrace_execution_direction)
4732 (record_btrace_prepare_to_generate_core)
4733 (record_btrace_done_generating_core): Refactor as
4734 record_btrace_target methods.
4735 (init_record_btrace_ops): Delete.
4736 (_initialize_record_btrace): Remove reference to
4737 init_record_btrace_ops.
4738 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4739 the execution_direction global.
4740 (record_full_base_target, record_full_target)
4741 (record_full_core_target): New classes.
4742 (record_full_ops): Now a record_full_target.
4743 (record_full_core_ops): Now a record_full_core_target.
4744 (record_full_target::detach, record_full_target::disconnect)
4745 (record_full_core_target::disconnect)
4746 (record_full_target::mourn_inferior, record_full_target::kill):
4747 New.
4748 (record_full_open, record_full_close, record_full_async): Refactor
4749 as methods of the record_full_base_target class.
4750 (record_full_resume, record_full_commit_resume): Refactor
4751 as methods of the record_full_target class.
4752 (record_full_wait, record_full_stopped_by_watchpoint)
4753 (record_full_stopped_data_address)
4754 (record_full_stopped_by_sw_breakpoint)
4755 (record_full_supports_stopped_by_sw_breakpoint)
4756 (record_full_stopped_by_hw_breakpoint)
4757 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4758 methods of the record_full_base_target class.
4759 (record_full_store_registers, record_full_xfer_partial)
4760 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4761 Refactor as methods of the record_full_target class.
4762 (record_full_can_execute_reverse, record_full_get_bookmark)
4763 (record_full_goto_bookmark, record_full_execution_direction)
4764 (record_full_record_method, record_full_info, record_full_delete)
4765 (record_full_is_replaying, record_full_will_replay)
4766 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4767 (record_full_stop_replaying): Refactor as methods of the
4768 record_full_base_target class.
4769 (record_full_core_resume, record_full_core_kill)
4770 (record_full_core_fetch_registers)
4771 (record_full_core_prepare_to_store)
4772 (record_full_core_store_registers, record_full_core_xfer_partial)
4773 (record_full_core_insert_breakpoint)
4774 (record_full_core_remove_breakpoint)
4775 (record_full_core_has_execution): Refactor
4776 as methods of the record_full_core_target class.
4777 (record_full_base_target::supports_delete_record): New.
4778 (init_record_full_ops): Delete.
4779 (init_record_full_core_ops): Delete.
4780 (record_full_save): Refactor as method of the
4781 record_full_base_target class.
4782 (_initialize_record_full): Remove references to
4783 init_record_full_ops and init_record_full_core_ops.
4784
4785 * remote.c (remote_target, extended_remote_target): New classes.
4786 (remote_ops): Now a remote_target.
4787 (extended_remote_ops): Now an extended_remote_target.
4788 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4789 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4790 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4791 (remote_pass_signals, remote_set_syscall_catchpoint)
4792 (remote_program_signals, )
4793 (remote_thread_always_alive): Remove target_ops parameter.
4794 (remote_thread_alive, remote_thread_name)
4795 (remote_update_thread_list, remote_threads_extra_info)
4796 (remote_static_tracepoint_marker_at)
4797 (remote_static_tracepoint_markers_by_strid)
4798 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4799 (remote_open): Refactor as methods of remote_target.
4800 (extended_remote_open, extended_remote_detach)
4801 (extended_remote_attach, extended_remote_post_attach):
4802 (extended_remote_supports_disable_randomization)
4803 (extended_remote_create_inferior): : Refactor as method of
4804 extended_remote_target.
4805 (remote_set_permissions, remote_open_1, remote_detach)
4806 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4807 (remote_resume, remote_commit_resume, remote_stop)
4808 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4809 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4810 (remote_prepare_to_store, remote_store_registers)
4811 (remote_flash_erase, remote_flash_done, remote_files_info)
4812 (remote_kill, remote_mourn, remote_insert_breakpoint)
4813 (remote_remove_breakpoint, remote_insert_watchpoint)
4814 (remote_watchpoint_addr_within_range)
4815 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4816 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4817 (remote_supports_stopped_by_sw_breakpoint)
4818 (remote_stopped_by_hw_breakpoint)
4819 (remote_supports_stopped_by_hw_breakpoint)
4820 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4821 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4822 (remote_verify_memory): Refactor as methods of remote_target.
4823 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4824 parameter.
4825 (remote_xfer_partial, remote_get_memory_xfer_limit)
4826 (remote_search_memory, remote_rcmd, remote_memory_map)
4827 (remote_pid_to_str, remote_get_thread_local_address)
4828 (remote_get_tib_address, remote_read_description): Refactor as
4829 methods of remote_target.
4830 (remote_target::fileio_open, remote_target::fileio_pwrite)
4831 (remote_target::fileio_pread, remote_target::fileio_close): New.
4832 (remote_hostio_readlink, remote_hostio_fstat)
4833 (remote_filesystem_is_local, remote_can_execute_reverse)
4834 (remote_supports_non_stop, remote_supports_disable_randomization)
4835 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4836 (remote_supports_enable_disable_tracepoint)
4837 (remote_supports_string_tracing)
4838 (remote_can_run_breakpoint_commands, remote_trace_init)
4839 (remote_download_tracepoint, remote_can_download_tracepoint)
4840 (remote_download_trace_state_variable, remote_enable_tracepoint)
4841 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4842 (remote_trace_start, remote_get_trace_status)
4843 (remote_get_tracepoint_status, remote_trace_stop)
4844 (remote_trace_find, remote_get_trace_state_variable_value)
4845 (remote_save_trace_data, remote_get_raw_trace_data)
4846 (remote_set_disconnected_tracing, remote_core_of_thread)
4847 (remote_set_circular_trace_buffer, remote_traceframe_info)
4848 (remote_get_min_fast_tracepoint_insn_len)
4849 (remote_set_trace_buffer_size, remote_set_trace_notes)
4850 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4851 (remote_disable_btrace, remote_teardown_btrace)
4852 (remote_read_btrace, remote_btrace_conf)
4853 (remote_augmented_libraries_svr4_read, remote_load)
4854 (remote_pid_to_exec_file, remote_can_do_single_step)
4855 (remote_execution_direction, remote_thread_handle_to_thread_info):
4856 Refactor as methods of remote_target.
4857 (init_remote_ops, init_extended_remote_ops): Delete.
4858 (remote_can_async_p, remote_is_async_p, remote_async)
4859 (remote_thread_events, remote_upload_tracepoints)
4860 (remote_upload_trace_state_variables): Refactor as methods of
4861 remote_target.
4862 (_initialize_remote): Remove references to init_remote_ops and
4863 init_extended_remote_ops.
4864
4865 * remote-sim.c (gdbsim_target): New class.
4866 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4867 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4868 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4869 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4870 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4871 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4872 Refactor as methods of gdbsim_target.
4873 (gdbsim_ops): Now a gdbsim_target.
4874 (init_gdbsim_ops): Delete.
4875 (gdbsim_cntrl_c): Adjust.
4876 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4877
4878 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4879 (the_amd64_linux_nat_target): New.
4880 (amd64_linux_fetch_inferior_registers)
4881 (amd64_linux_store_inferior_registers): Refactor as methods of
4882 amd64_linux_nat_target.
4883 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4884 * i386-linux-nat.c: Don't include "linux-nat.h".
4885 (i386_linux_nat_target): New class.
4886 (the_i386_linux_nat_target): New.
4887 (i386_linux_fetch_inferior_registers)
4888 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4889 as methods of i386_linux_nat_target.
4890 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4891 * inf-child.c (inf_child_ops): Delete.
4892 (inf_child_fetch_inferior_registers)
4893 (inf_child_store_inferior_registers): Delete.
4894 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4895 methods of inf_child_target.
4896 (inf_child_target::supports_terminal_ours)
4897 (inf_child_target::terminal_init)
4898 (inf_child_target::terminal_inferior)
4899 (inf_child_target::terminal_ours_for_output)
4900 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4901 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4902 New.
4903 (inf_child_open, inf_child_disconnect, inf_child_close)
4904 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4905 (inf_child_post_startup_inferior, inf_child_can_run)
4906 (inf_child_pid_to_exec_file): Refactor as methods of
4907 inf_child_target.
4908 (inf_child_follow_fork): Delete.
4909 (inf_child_target::can_create_inferior)
4910 (inf_child_target::can_attach): New.
4911 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4912 (inf_child_target::has_stack, inf_child_target::has_registers)
4913 (inf_child_target::has_execution): New.
4914 (inf_child_fileio_open, inf_child_fileio_pwrite)
4915 (inf_child_fileio_pread, inf_child_fileio_fstat)
4916 (inf_child_fileio_close, inf_child_fileio_unlink)
4917 (inf_child_fileio_readlink, inf_child_use_agent)
4918 (inf_child_can_use_agent): Refactor as methods of
4919 inf_child_target.
4920 (return_zero, inf_child_target): Delete.
4921 (inf_child_target::inf_child_target): New.
4922 * inf-child.h: Include "target.h".
4923 (inf_child_target): Delete function prototype.
4924 (inf_child_target): New class.
4925 (inf_child_open_target, inf_child_mourn_inferior)
4926 (inf_child_maybe_unpush_target): Delete.
4927 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4928 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4929 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4930 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4931 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4932 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4933 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4934 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4935 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4936 methods of inf_ptrace_target.
4937 (inf_ptrace_target): Delete function.
4938 * inf-ptrace.h: Include "inf-child.h".
4939 (inf_ptrace_target): Delete function declaration.
4940 (inf_ptrace_target): New class.
4941 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4942 * linux-nat.c (linux_target): New.
4943 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4944 (linux_nat_target::~linux_nat_target): New.
4945 (linux_child_post_attach, linux_child_post_startup_inferior)
4946 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4947 (linux_child_remove_fork_catchpoint)
4948 (linux_child_insert_vfork_catchpoint)
4949 (linux_child_remove_vfork_catchpoint)
4950 (linux_child_insert_exec_catchpoint)
4951 (linux_child_remove_exec_catchpoint)
4952 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4953 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4954 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4955 (linux_nat_stopped_data_address)
4956 (linux_nat_stopped_by_sw_breakpoint)
4957 (linux_nat_supports_stopped_by_sw_breakpoint)
4958 (linux_nat_stopped_by_hw_breakpoint)
4959 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4960 (linux_nat_kill, linux_nat_mourn_inferior)
4961 (linux_nat_xfer_partial, linux_nat_thread_alive)
4962 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4963 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4964 (linux_child_static_tracepoint_markers_by_strid)
4965 (linux_nat_is_async_p, linux_nat_can_async_p)
4966 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4967 (linux_nat_supports_multi_process)
4968 (linux_nat_supports_disable_randomization, linux_nat_async)
4969 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4970 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4971 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4972 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4973 methods of linux_nat_target.
4974 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4975 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4976 parameter.
4977 (check_stopped_by_watchpoint): Adjust.
4978 (linux_xfer_partial): Delete.
4979 (linux_target_install_ops, linux_target, linux_nat_add_target):
4980 Delete.
4981 (linux_nat_target::linux_nat_target): New.
4982 * linux-nat.h: Include "inf-ptrace.h".
4983 (linux_nat_target): New.
4984 (linux_target, linux_target_install_ops, linux_nat_add_target):
4985 Delete function declarations.
4986 (linux_target): Declare global.
4987 * linux-thread-db.c (thread_db_target): New.
4988 (thread_db_target::thread_db_target): New.
4989 (thread_db_ops): Delete.
4990 (the_thread_db_target): New.
4991 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4992 (thread_db_update_thread_list, thread_db_pid_to_str)
4993 (thread_db_extra_thread_info)
4994 (thread_db_thread_handle_to_thread_info)
4995 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4996 (thread_db_resume): Refactor as methods of thread_db_target.
4997 (init_thread_db_ops): Delete.
4998 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4999 * x86-linux-nat.c: Don't include "linux-nat.h".
5000 (super_post_startup_inferior): Delete.
5001 (x86_linux_nat_target::~x86_linux_nat_target): New.
5002 (x86_linux_child_post_startup_inferior)
5003 (x86_linux_read_description, x86_linux_enable_btrace)
5004 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5005 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5006 methods of x86_linux_nat_target.
5007 (x86_linux_create_target): Delete. Bits folded ...
5008 (x86_linux_add_target): ... here. Now takes a linux_nat_target
5009 pointer.
5010 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5011 (x86_linux_nat_target): New class.
5012 (x86_linux_create_target): Delete.
5013 (x86_linux_add_target): Now takes a linux_nat_target pointer.
5014 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5015 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5016 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5017 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5018 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5019 make extern.
5020 (x86_use_watchpoints): Delete.
5021 * x86-nat.h: Include "breakpoint.h" and "target.h".
5022 (x86_use_watchpoints): Delete.
5023 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5024 (x86_stopped_by_watchpoint, x86_stopped_data_address)
5025 (x86_insert_watchpoint, x86_remove_watchpoint)
5026 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5027 (x86_stopped_by_hw_breakpoint): New declarations.
5028 (x86_nat_target): New template class.
5029
5030 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5031 (the_ppc_linux_nat_target): New.
5032 (ppc_linux_fetch_inferior_registers)
5033 (ppc_linux_can_use_hw_breakpoint)
5034 (ppc_linux_region_ok_for_hw_watchpoint)
5035 (ppc_linux_ranged_break_num_registers)
5036 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5037 (ppc_linux_insert_mask_watchpoint)
5038 (ppc_linux_remove_mask_watchpoint)
5039 (ppc_linux_can_accel_watchpoint_condition)
5040 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5041 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5042 (ppc_linux_watchpoint_addr_within_range)
5043 (ppc_linux_masked_watch_num_registers)
5044 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5045 (ppc_linux_read_description): Refactor as methods of
5046 ppc_linux_nat_target.
5047 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
5048
5049 * procfs.c (procfs_xfer_partial): Delete forward declaration.
5050 (procfs_target): New class.
5051 (the_procfs_target): New.
5052 (procfs_target): Delete function.
5053 (procfs_auxv_parse, procfs_attach, procfs_detach)
5054 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5055 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5056 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5057 (procfs_create_inferior, procfs_update_thread_list)
5058 (procfs_thread_alive, procfs_pid_to_str)
5059 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5060 (procfs_stopped_data_address, procfs_insert_watchpoint)
5061 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5062 (proc_find_memory_regions, procfs_info_proc)
5063 (procfs_make_note_section): Refactor as methods of procfs_target.
5064 (_initialize_procfs): Adjust.
5065 * sol-thread.c (sol_thread_target): New class.
5066 (sol_thread_ops): Now a sol_thread_target.
5067 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5068 (sol_thread_fetch_registers, sol_thread_store_registers)
5069 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5070 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5071 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5072 (init_sol_thread_ops): Delete.
5073 (_initialize_sol_thread): Adjust. Remove references to
5074 init_sol_thread_ops and complete_target_initialization.
5075
5076 * windows-nat.c (windows_nat_target): New class.
5077 (windows_fetch_inferior_registers)
5078 (windows_store_inferior_registers, windows_resume, windows_wait)
5079 (windows_attach, windows_detach, windows_pid_to_exec_file)
5080 (windows_files_info, windows_create_inferior)
5081 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5082 (windows_close, windows_pid_to_str, windows_xfer_partial)
5083 (windows_get_tib_address, windows_get_ada_task_ptid)
5084 (windows_thread_name, windows_thread_alive): Refactor as
5085 windows_nat_target methods.
5086 (do_initial_windows_stuff): Adjust.
5087 (windows_target): Delete function.
5088 (_initialize_windows_nat): Adjust.
5089
5090 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5091 (darwin_mourn_inferior, darwin_kill_inferior)
5092 (darwin_create_inferior, darwin_attach, darwin_detach)
5093 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5094 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5095 (darwin_supports_multi_process): Refactor as darwin_nat_target
5096 methods.
5097 (darwin_resume_to, darwin_files_info): Delete.
5098 (_initialize_darwin_inferior): Rename to ...
5099 (_initialize_darwin_nat): ... this. Adjust to C++ification.
5100 * darwin-nat.h: Include "inf-child.h".
5101 (darwin_nat_target): New class.
5102 (darwin_complete_target): Delete.
5103 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5104 (darwin_target): New.
5105 (i386_darwin_fetch_inferior_registers)
5106 (i386_darwin_store_inferior_registers): Refactor as methods of
5107 darwin_nat_target.
5108 (darwin_complete_target): Delete, with ...
5109 (_initialize_i386_darwin_nat): ... bits factored out here.
5110
5111 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5112 (the_alpha_linux_nat_target): New.
5113 (alpha_linux_register_u_offset): Refactor as
5114 alpha_linux_nat_target method.
5115 (_initialize_alpha_linux_nat): Adjust.
5116 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5117 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5118 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5119 methods of linux_nat_trad_target.
5120 (linux_trad_target): Delete.
5121 * linux-nat-trad.h (linux_trad_target): Delete function.
5122 (linux_nat_trad_target): New class.
5123 * mips-linux-nat.c (mips_linux_nat_target): New class.
5124 (super_fetch_registers, super_store_registers, super_close):
5125 Delete.
5126 (the_mips_linux_nat_target): New.
5127 (mips64_linux_regsets_fetch_registers)
5128 (mips64_linux_regsets_store_registers)
5129 (mips64_linux_fetch_registers, mips64_linux_store_registers)
5130 (mips_linux_register_u_offset, mips_linux_read_description)
5131 (mips_linux_can_use_hw_breakpoint)
5132 (mips_linux_stopped_by_watchpoint)
5133 (mips_linux_stopped_data_address)
5134 (mips_linux_region_ok_for_hw_watchpoint)
5135 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5136 (mips_linux_close): Refactor as methods of mips_linux_nat.
5137 (_initialize_mips_linux_nat): Adjust to C++ification.
5138
5139 * aix-thread.c (aix_thread_target): New class.
5140 (aix_thread_ops): Now an aix_thread_target.
5141 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5142 (aix_thread_fetch_registers, aix_thread_store_registers)
5143 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5144 (aix_thread_thread_alive, aix_thread_pid_to_str)
5145 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5146 Refactor as methods of aix_thread_target.
5147 (init_aix_thread_ops): Delete.
5148 (_initialize_aix_thread): Remove references to init_aix_thread_ops
5149 and complete_target_initialization.
5150 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5151 (rs6000_nat_target): New class.
5152 (the_rs6000_nat_target): New.
5153 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5154 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5155 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5156 (super_create_inferior): Delete.
5157 (_initialize_rs6000_nat): Adjust to C++ification.
5158
5159 * arm-linux-nat.c (arm_linux_nat_target): New class.
5160 (the_arm_linux_nat_target): New.
5161 (arm_linux_fetch_inferior_registers)
5162 (arm_linux_store_inferior_registers, arm_linux_read_description)
5163 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5164 (arm_linux_remove_hw_breakpoint)
5165 (arm_linux_region_ok_for_hw_watchpoint)
5166 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5167 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5168 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5169 arm_linux_nat_target.
5170 (_initialize_arm_linux_nat): Adjust to C++ification.
5171
5172 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5173 (the_aarch64_linux_nat_target): New.
5174 (aarch64_linux_fetch_inferior_registers)
5175 (aarch64_linux_store_inferior_registers)
5176 (aarch64_linux_child_post_startup_inferior)
5177 (aarch64_linux_read_description)
5178 (aarch64_linux_can_use_hw_breakpoint)
5179 (aarch64_linux_insert_hw_breakpoint)
5180 (aarch64_linux_remove_hw_breakpoint)
5181 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5182 (aarch64_linux_region_ok_for_hw_watchpoint)
5183 (aarch64_linux_stopped_data_address)
5184 (aarch64_linux_stopped_by_watchpoint)
5185 (aarch64_linux_watchpoint_addr_within_range)
5186 (aarch64_linux_can_do_single_step): Refactor as methods of
5187 aarch64_linux_nat_target.
5188 (super_post_startup_inferior): Delete.
5189 (_initialize_aarch64_linux_nat): Adjust to C++ification.
5190
5191 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5192 (the_hppa_linux_nat_target): New.
5193 (hppa_linux_fetch_inferior_registers)
5194 (hppa_linux_store_inferior_registers): Refactor as methods of
5195 hppa_linux_nat_target.
5196 (_initialize_hppa_linux_nat): Adjust to C++ification.
5197
5198 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5199 (the_ia64_linux_nat_target): New.
5200 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5201 (ia64_linux_stopped_data_address)
5202 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5203 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5204 ia64_linux_nat_target methods.
5205 (super_xfer_partial): Delete.
5206 (_initialize_ia64_linux_nat): Adjust to C++ification.
5207
5208 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5209 (the_m32r_linux_nat_target): New.
5210 (m32r_linux_fetch_inferior_registers)
5211 (m32r_linux_store_inferior_registers): Refactor as
5212 m32r_linux_nat_target methods.
5213 (_initialize_m32r_linux_nat): Adjust to C++ification.
5214
5215 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5216 (the_m68k_linux_nat_target): New.
5217 (m68k_linux_fetch_inferior_registers)
5218 (m68k_linux_store_inferior_registers): Refactor as
5219 m68k_linux_nat_target methods.
5220 (_initialize_m68k_linux_nat): Adjust to C++ification.
5221
5222 * s390-linux-nat.c (s390_linux_nat_target): New class.
5223 (the_s390_linux_nat_target): New.
5224 (s390_linux_fetch_inferior_registers)
5225 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5226 (s390_insert_watchpoint, s390_remove_watchpoint)
5227 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5228 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5229 (s390_auxv_parse, s390_read_description): Refactor as methods of
5230 s390_linux_nat_target.
5231 (_initialize_s390_nat): Adjust to C++ification.
5232
5233 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5234 (the_sparc_linux_nat_target): New.
5235 (_initialize_sparc_linux_nat): Adjust to C++ification.
5236 * sparc-nat.c (sparc_fetch_inferior_registers)
5237 (sparc_store_inferior_registers): Remove target_ops parameter.
5238 * sparc-nat.h (sparc_fetch_inferior_registers)
5239 (sparc_store_inferior_registers): Remove target_ops parameter.
5240 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5241 (the_sparc64_linux_nat_target): New.
5242 (_initialize_sparc64_linux_nat): Adjust to C++ification.
5243
5244 * spu-linux-nat.c (spu_linux_nat_target): New class.
5245 (the_spu_linux_nat_target): New.
5246 (spu_child_post_startup_inferior, spu_child_post_attach)
5247 (spu_child_wait, spu_fetch_inferior_registers)
5248 (spu_store_inferior_registers, spu_xfer_partial)
5249 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5250 methods.
5251 (_initialize_spu_nat): Adjust to C++ification.
5252
5253 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5254 (the_tilegx_linux_nat_target): New.
5255 (fetch_inferior_registers, store_inferior_registers):
5256 Refactor as methods.
5257 (_initialize_tile_linux_nat): Adjust to C++ification.
5258
5259 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5260 (the_xtensa_linux_nat_target): New.
5261 (xtensa_linux_fetch_inferior_registers)
5262 (xtensa_linux_store_inferior_registers): Refactor as
5263 xtensa_linux_nat_target methods.
5264 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5265
5266 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5267 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5268 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5269 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5270 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5271 (fbsd_stopped_by_sw_breakpoint)
5272 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5273 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5274 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5275 (fbsd_post_startup_inferior, fbsd_post_attach)
5276 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5277 (fbsd_set_syscall_catchpoint)
5278 (super_xfer_partial, super_resume, super_wait)
5279 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5280 (fbsd_handle_debug_trap): Remove target_ops parameter.
5281 (fbsd_nat_add_target): Delete.
5282 * fbsd-nat.h: Include "inf-ptrace.h".
5283 (fbsd_nat_add_target): Delete.
5284 (USE_SIGTRAP_SIGINFO): Define.
5285 (fbsd_nat_target): New class.
5286
5287 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5288 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5289 (amd64bsd_target): Delete.
5290 * amd64-bsd-nat.h: New file.
5291 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5292 "x86-bsd-nat.h".
5293 (amd64_fbsd_nat_target): New class.
5294 (the_amd64_fbsd_nat_target): New.
5295 (amd64fbsd_read_description): Refactor as method of
5296 amd64_fbsd_nat_target.
5297 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5298 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5299 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5300 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5301 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5302 (i386bsd_target): Delete.
5303 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5304 (i386bsd_fetch_inferior_registers)
5305 (i386bsd_store_inferior_registers): Declare.
5306 (i386_bsd_nat_target): New class.
5307 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5308 (the_i386_fbsd_nat_target): New.
5309 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5310 i386_fbsd_nat_target methods.
5311 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5312 (_initialize_i386fbsd_nat): Adjust to C++ification.
5313 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5314 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5315 (_initialize_x86_bsd_nat): Adjust to C++ification.
5316 * x86-bsd-nat.h: Include "x86-nat.h".
5317 (x86bsd_target): Delete declaration.
5318 (x86bsd_nat_target): New class.
5319
5320 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5321 (the_aarch64_fbsd_nat_target): New.
5322 (aarch64_fbsd_fetch_inferior_registers)
5323 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5324 aarch64_fbsd_nat_target.
5325 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5326 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5327 (the_alpha_bsd_nat_target): New.
5328 (alphabsd_fetch_inferior_registers)
5329 (alphabsd_store_inferior_registers): Refactor as
5330 alpha_bsd_nat_target methods.
5331 (_initialize_alphabsd_nat): Refactor as methods of
5332 alpha_bsd_nat_target.
5333 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5334 (the_amd64_nbsd_nat_target): New.
5335 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5336 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5337 (the_amd64_obsd_nat_target): New.
5338 (_initialize_amd64obsd_nat): Adjust to C++ification.
5339 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5340 (the_arm_fbsd_nat_target): New.
5341 (arm_fbsd_fetch_inferior_registers)
5342 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5343 (_initialize_arm_fbsd_nat): Refactor as methods of
5344 arm_fbsd_nat_target.
5345 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5346 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5347 (the_arm_netbsd_nat_target): New.
5348 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5349 arm_netbsd_nat_target.
5350 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5351 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5352 (the_hppa_nbsd_nat_target): New.
5353 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5354 hppa_nbsd_nat_target methods.
5355 (_initialize_hppanbsd_nat): Adjust to C++ification.
5356 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5357 (the_hppa_obsd_nat_target): New.
5358 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5359 methods of hppa_obsd_nat_target.
5360 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5361 add_target.
5362 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5363 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5364 add_target.
5365 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5366 (_initialize_i386obsd_nat): Use add_target.
5367 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5368 (the_m68k_bsd_nat_target): New.
5369 (m68kbsd_fetch_inferior_registers)
5370 (m68kbsd_store_inferior_registers): Refactor as methods of
5371 m68k_bsd_nat_target.
5372 (_initialize_m68kbsd_nat): Adjust to C++ification.
5373 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5374 (the_mips_fbsd_nat_target): New.
5375 (mips_fbsd_fetch_inferior_registers)
5376 (mips_fbsd_store_inferior_registers): Refactor as methods of
5377 mips_fbsd_nat_target.
5378 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5379 add_target.
5380 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5381 (the_mips_nbsd_nat_target): New.
5382 (mipsnbsd_fetch_inferior_registers)
5383 (mipsnbsd_store_inferior_registers): Refactor as methods of
5384 mips_nbsd_nat_target.
5385 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5386 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5387 (the_mips64_obsd_nat_target): New.
5388 (mips64obsd_fetch_inferior_registers)
5389 (mips64obsd_store_inferior_registers): Refactor as methods of
5390 mips64_obsd_nat_target.
5391 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5392 add_target.
5393 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5394 nbsd_nat_target.
5395 * nbsd-nat.h: Include "inf-ptrace.h".
5396 (nbsd_nat_target): New class.
5397 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5398 (obsd_wait): Refactor as methods of obsd_nat_target.
5399 (obsd_add_target): Delete.
5400 * obsd-nat.h: Include "inf-ptrace.h".
5401 (obsd_nat_target): New class.
5402 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5403 (the_ppc_fbsd_nat_target): New.
5404 (ppcfbsd_fetch_inferior_registers)
5405 (ppcfbsd_store_inferior_registers): Refactor as methods of
5406 ppc_fbsd_nat_target.
5407 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5408 add_target.
5409 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5410 (the_ppc_nbsd_nat_target): New.
5411 (ppcnbsd_fetch_inferior_registers)
5412 (ppcnbsd_store_inferior_registers): Refactor as methods of
5413 ppc_nbsd_nat_target.
5414 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5415 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5416 (the_ppc_obsd_nat_target): New.
5417 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5418 methods of ppc_obsd_nat_target.
5419 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5420 add_target.
5421 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5422 (the_sh_nbsd_nat_target): New.
5423 (shnbsd_fetch_inferior_registers)
5424 (shnbsd_store_inferior_registers): Refactor as methods of
5425 sh_nbsd_nat_target.
5426 (_initialize_shnbsd_nat): Adjust to C++ification.
5427 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5428 (inf_ptrace_xfer_partial): Delete.
5429 (sparc_xfer_partial, sparc_target): Delete.
5430 * sparc-nat.h (sparc_fetch_inferior_registers)
5431 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5432 (sparc_target): Delete function declaration.
5433 (sparc_target): New template class.
5434 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5435 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5436 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5437 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5438 add_target.
5439 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5440 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5441 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5442 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5443 add_target.
5444 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5445 (the_vax_bsd_nat_target): New.
5446 (vaxbsd_fetch_inferior_registers)
5447 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5448 methods.
5449 (_initialize_vaxbsd_nat): Adjust to C++ification.
5450
5451 * bsd-kvm.c (bsd_kvm_target): New class.
5452 (bsd_kvm_ops): Now a bsd_kvm_target.
5453 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5454 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5455 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5456 bsd_kvm_target.
5457 (bsd_kvm_return_one): Delete.
5458 (bsd_kvm_add_target): Adjust to C++ification.
5459
5460 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5461 (nto_procfs_target_procfs): New classes.
5462 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5463 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5464 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5465 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5466 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5467 (procfs_remove_hw_breakpoint, procfs_resume)
5468 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5469 (procfs_kill_inferior, procfs_store_registers)
5470 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5471 as methods of nto_procfs_target.
5472 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5473 (nto_native_ops): Delete.
5474 (procfs_open, procfs_native_open): Delete.
5475 (nto_native_ops): Now an nto_procfs_target_native.
5476 (init_procfs_targets): Adjust to C++ification.
5477 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5478 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5479 Refactor as methods of nto_procfs_target.
5480
5481 * go32-nat.c (go32_nat_target): New class.
5482 (the_go32_nat_target): New.
5483 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5484 (go32_store_registers, go32_xfer_partial, go32_files_info)
5485 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5486 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5487 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5488 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5489 (go32_target): Delete.
5490 (_initialize_go32_nat): Adjust to C++ification.
5491
5492 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5493 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5494 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5495 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5496 gnu_nat_target.
5497 (gnu_target): Delete.
5498 * gnu-nat.h (gnu_target): Delete.
5499 (gnu_nat_target): New class.
5500 * i386-gnu-nat.c (gnu_base_target): New.
5501 (i386_gnu_nat_target): New class.
5502 (the_i386_gnu_nat_target): New.
5503 (_initialize_i386gnu_nat): Adjust to C++ification.
5504
5505 2018-05-02 Pedro Alves <palves@redhat.com>
5506
5507 * bfd-target.c (target_bfd_xclose): Rename to ...
5508 (target_bfd_close): ... this.
5509 (target_bfd_reopen): Adjust.
5510 * target.c (target_close): Remove references to to_xclose.
5511 * target.h (target_ops::to_xclose): Delete.
5512 (target_ops::to_close): Update comments.
5513
5514 2018-05-02 Pedro Alves <palves@redhat.com>
5515
5516 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5517 "linux-nat.h".
5518 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5519 * inf-ptrace.c (inf_ptrace_register_u_offset)
5520 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5521 (inf_ptrace_store_register, inf_ptrace_store_registers)
5522 (inf_ptrace_trad_target): Move to ...
5523 * linux-nat-trad.c: ... this new file.
5524 * linux-nat-trad.h: New file.
5525 * linux-nat.c (linux_target_install_ops): Make extern.
5526 (linux_trad_target): Delete.
5527 * linux-nat.h (linux_trad_target): Delete declaration.
5528 (linux_target_install_ops): Declare.
5529 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5530 "linux-nat.h".
5531
5532 2018-05-02 Pedro Alves <palves@redhat.com>
5533
5534 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5535 procfs_target/add_target here.
5536 * procfs.c (procfs_target): Make static.
5537 (_initialize_procfs): Call add_target here.
5538 * procfs.h (struct target_ops): Remove forward declaration.
5539 (procfs_target): Remove declaration.
5540 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5541
5542 2018-05-02 Pedro Alves <palves@redhat.com>
5543
5544 * procfs.c (procfs_stopped_by_watchpoint)
5545 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5546 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5547 Forward declare.
5548 (procfs_use_watchpoints): Delete, move contents...
5549 (procfs_target): ... here.
5550 * procfs.h (procfs_use_watchpoints): Delete declaration.
5551 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5552 procfs_use_watchpoints.
5553 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5554 procfs_use_watchpoints.
5555
5556 2018-05-02 Tom Tromey <tom@tromey.com>
5557
5558 PR python/20084:
5559 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5560 and var_zuinteger_unlimited.
5561 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5562 and PARAM_ZUINTEGER_UNLIMITED.
5563 (set_parameter_value): Handle var_zuinteger and
5564 var_zuinteger_unlimited.
5565 (add_setshow_generic): Likewise.
5566 (parmpy_init): Likewise.
5567
5568 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5569
5570 PR rust/23124
5571 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5572 pointer is not null before dereferencing it.
5573
5574 2018-04-30 Tom Tromey <tom@tromey.com>
5575
5576 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5577 is_mi_like_p.
5578
5579 2018-04-30 Tom Tromey <tom@tromey.com>
5580
5581 * breakpoint.c (mention): Remove use of is_mi_like_p.
5582 (print_mention_ranged_breakpoint): Likewise.
5583 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5584 of is_mi_like_p.
5585
5586 2018-04-30 Tom Tromey <tom@tromey.com>
5587
5588 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5589
5590 2018-04-30 Tom Tromey <tom@tromey.com>
5591
5592 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5593 (info_spu_event_command): Remove some uses of is_mi_like_p.
5594
5595 2018-04-30 Tom Tromey <tom@tromey.com>
5596
5597 * python/py-framefilter.c (py_print_single_arg)
5598 (enumerate_locals, py_print_args, py_print_frame): Remove some
5599 uses of is_mi_like_p.
5600
5601 2018-04-30 Tom Tromey <tom@tromey.com>
5602
5603 * ui-out.c: Update.
5604 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5605 * ui-out.h (ui_out::is_mi_like_p): Now const.
5606 (ui_out::do_is_mi_like_p): Now const.
5607 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5608
5609 2018-04-30 Tom Tromey <tom@tromey.com>
5610
5611 * varobj.c (varobj_set_visualizer): Use new_reference.
5612 * python/python.c (gdbpy_decode_line): Use new_reference.
5613 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5614 new_reference.
5615
5616 2018-04-30 Tom Tromey <tom@tromey.com>
5617
5618 * varobj.c (install_new_value): Use new_reference.
5619 * value.h (value_incref): Return void. Swap intro comment with
5620 value_decref.
5621 * value.c (set_value_parent): Use new_reference.
5622 (value_incref): Return void. Update intro comment.
5623 (release_value): Use new_reference.
5624 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5625
5626 2018-04-30 Tom Tromey <tom@tromey.com>
5627
5628 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5629 * gdb_bfd.h (new_bfd_ref): Remove.
5630 (gdb_bfd_open): Update comment.
5631 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5632 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5633 (gdb_bfd_fdopenr): Use new_reference.
5634 * exec.c (exec_file_attach): Use new_reference.
5635
5636 2018-04-30 Tom Tromey <tom@tromey.com>
5637
5638 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5639 method.
5640
5641 2018-04-30 Tom Tromey <tom@tromey.com>
5642
5643 * jit.c (jit_read_code_entry): Use type_align.
5644 * i386-tdep.c (i386_gdbarch_init): Don't call
5645 set_gdbarch_long_long_align_bit.
5646 * gdbarch.sh: Remove long_long_align_bit.
5647 * gdbarch.c, gdbarch.h: Rebuild.
5648 * arc-tdep.c (arc_type_align): New function.
5649 (arc_gdbarch_init): Use arc_type_align. Don't call
5650 set_gdbarch_long_long_align_bit.
5651
5652 2018-04-30 Tom Tromey <tom@tromey.com>
5653
5654 * rust-lang.c (rust_type_alignment): Remove.
5655 (rust_composite_type): Use type_align.
5656
5657 2018-04-30 Tom Tromey <tom@tromey.com>
5658
5659 * NEWS: Mention Type.align.
5660 * python/py-type.c (typy_get_alignof): New function.
5661 (type_object_getset): Add "alignof".
5662
5663 2018-04-30 Tom Tromey <tom@tromey.com>
5664
5665 PR exp/17095:
5666 * NEWS: Update.
5667 * std-operator.def (UNOP_ALIGNOF): New operator.
5668 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5669 New.
5670 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5671 * c-lang.c (c_op_print_tab): Add alignof.
5672 * c-exp.y (ALIGNOF): New token.
5673 (exp): Add "ALIGNOF" production.
5674 (ident_tokens): Add _Alignof and alignof.
5675
5676 2018-04-30 Tom Tromey <tom@tromey.com>
5677
5678 * i386-tdep.c (i386_type_align): New function.
5679 (i386_gdbarch_init): Update.
5680 * gdbarch.sh (type_align): New method.
5681 * gdbarch.c, gdbarch.h: Rebuild.
5682 * arch-utils.h (default_type_align): Declare.
5683 * arch-utils.c (default_type_align): New function.
5684 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5685 (struct type) <align_log2>: New field.
5686 <instance_flags>: Now a bitfield.
5687 (TYPE_RAW_ALIGN): New macro.
5688 (type_align, type_raw_align, set_type_align): Declare.
5689 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5690 functions.
5691 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5692 (get_alignment, maybe_set_alignment): New functions.
5693 (read_structure_type, read_enumeration_type, read_array_type)
5694 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5695 (read_subrange_type, read_base_type): Set type alignment.
5696
5697 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5698
5699 * dwarf2read.c (read_index_from_section): Use bool.
5700
5701 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5702
5703 PR gdb/22950
5704 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5705 with #ifdef.
5706
5707 2018-04-29 John Reiser <jreiser@BitWagon.com>
5708
5709 PR build/22873
5710 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5711 last step, and do it atomically.
5712
5713 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5714
5715 * compile/compile-c-types.c (convert_int, convert_float):
5716 Update for C FE v1.
5717
5718 2018-04-27 Tom Tromey <tom@tromey.com>
5719
5720 PR rust/22545:
5721 * rust-lang.c (rust_inclusive_range_type_p): New function.
5722 (rust_range): Handle inclusive ranges.
5723 (rust_compute_range): Likewise.
5724 * rust-exp.y (struct rust_op) <inclusive>: New field.
5725 (DOTDOTEQ): New constant.
5726 (range_expr): Add "..=" productions.
5727 (operator_tokens): Add "..=" token.
5728 (ast_range): Add "inclusive" parameter.
5729 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5730 ranges.
5731 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5732 bounds values.
5733 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5734 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5735 Update comments.
5736 * expprint.c (print_subexp_standard): Handle new bounds values.
5737 (dump_subexp_body_standard): Likewise.
5738
5739 2018-04-27 Tom Tromey <tom@tromey.com>
5740
5741 * configure: Rebuild.
5742 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5743 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5744 "OVERRIDE".
5745 (class symbol_needs_eval_context): Likewise.
5746 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5747 (mock_mapped_index::symbol_name_at): Use "override". Remove
5748 "virtual".
5749 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5750 "override".
5751 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5752 * aarch64-tdep.c (instruction_reader::read): Use "override".
5753 (instruction_reader_test::read): Likewise.
5754 * arm-tdep.c (instruction_reader::read): Use "override".
5755 (instruction_reader_thumb::read): Likewise.
5756
5757 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5758
5759 PR remote/9665
5760 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5761 instead of remote_send.
5762 (remote_send): Remove.
5763
5764 2018-04-26 Pedro Alves <palves@redhat.com>
5765
5766 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5767 find_function_start_sal instead of find_pc_line.
5768
5769 2018-04-26 Pedro Alves <palves@redhat.com>
5770
5771 * breakpoint.c (set_breakpoint_location_function): Handle
5772 mst_data_gnu_ifunc.
5773 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5774 * elfread.c (elf_symtab_read): Give data symbols with
5775 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5776 (elf_rel_plt_read): Update comment.
5777 * linespec.c (convert_linespec_to_sals): Handle
5778 mst_data_gnu_ifunc.
5779 (minsym_found): Handle mst_data_gnu_ifunc.
5780 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5781 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5782 * parse.c (find_minsym_type_and_address): Handle
5783 mst_data_gnu_ifunc.
5784 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5785 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5786 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5787 comment.
5788 <mst_data_gnu_ifunc>: New enumerator.
5789
5790 2018-04-26 Pedro Alves <palves@redhat.com>
5791
5792 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5793 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5794 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5795 Handle it.
5796 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5797 (lookup_minimal_symbol_by_pc): Adjust.
5798 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5799 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5800 * minsyms.h (lookup_msym_prefer): New enum.
5801 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5802 parameter by a lookup_msym_prefer parameter.
5803
5804 2018-04-26 Pedro Alves <palves@redhat.com>
5805
5806 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5807 ends in "@plt" instead of looking at the symbol's section.
5808
5809 2018-04-26 Pedro Alves <palves@redhat.com>
5810
5811 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5812 all references.
5813 (find_pc_partial_function_gnu_ifunc): Rename to ...
5814 (find_pc_partial_function): ... this, and remove references to
5815 'is_gnu_ifunc_p'.
5816 (find_pc_partial_function): Delete old implementation.
5817 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5818
5819 2018-04-26 Pedro Alves <palves@redhat.com>
5820
5821 * linespec.c (struct bound_minimal_symbol_search_key): New.
5822 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5823 skip first line if we found a GNU ifunc minimal symbol by name.
5824 (compare_msymbols): Change parameters to work with a destructured
5825 lhs minsym.
5826 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5827 functions.
5828
5829 2018-04-26 Pedro Alves <palves@redhat.com>
5830
5831 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5832 ifunc targets here. Instead, if we have an ifunc minsym, use its
5833 address/name.
5834 (add_location_to_breakpoint): Store the minsym and the objfile in
5835 the breakpoint location.
5836 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5837 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5838 Record the minsym in the sal.
5839 * symtab.h (symtab_and_line) <msymbol>: New field.
5840
5841 2018-04-26 Pedro Alves <palves@redhat.com>
5842
5843 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5844 unless we actually resolved the ifunc.
5845
5846 2018-04-26 Pedro Alves <palves@redhat.com>
5847
5848 * c-exp.y (variable production): Prefer ifunc minsyms over
5849 regular function symbols.
5850 * symtab.c (find_gnu_ifunc): New function.
5851 * minsyms.h (lookup_msym_prefer): New enum.
5852 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5853 parameter by a lookup_msym_prefer parameter.
5854 * symtab.h (find_gnu_ifunc): New declaration.
5855
5856 2018-04-26 Pedro Alves <palves@redhat.com>
5857
5858 * blockframe.c (find_gnu_ifunc_target_type): New function.
5859 (find_function_type): New.
5860 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5861 return a value with a memory address.
5862 (eval_call): For calls to GNU ifunc functions, try to find the
5863 type of the target function from the type that the resolver
5864 returns.
5865 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5866 symbols.
5867 * infcall.c (find_function_return_type): Delete.
5868 (find_function_addr): Add 'function_type' parameter. For calls to
5869 GNU ifunc functions, try to find the type of the target function
5870 from the type that the resolver returns, and return it via
5871 FUNCTION_TYPE.
5872 (call_function_by_hand_dummy): Adjust to use the function type
5873 returned by find_function_addr.
5874 (find_function_addr): Add 'function_type' parameter and move
5875 description here.
5876 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5877 declarations.
5878
5879 2018-04-26 Pedro Alves <palves@redhat.com>
5880
5881 * c-exp.y (variable production): Skip finding an alias for ifunc
5882 symbols.
5883
5884 2018-04-26 Pedro Alves <palves@redhat.com>
5885
5886 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5887
5888 2018-04-25 Pedro Alves <palves@redhat.com>
5889
5890 * infcmd.c (kill_command): Print the pid as string, not the whole
5891 thread's ptid. Add comment. s/has been killed/killed/ in output
5892 message.
5893 * remote.c (remote_detach_1): Print the pid as string, not the
5894 whole thread's ptid.
5895
5896 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5897 Sergio Durigan Junior <sergiodj@redhat.com>
5898 Pedro Alves <palves@redhat.com>
5899
5900 * infcmd.c (kill_command): Print message when inferior has
5901 been killed.
5902 * inferior.c (print_inferior_events): Remove 'static'. Set as
5903 '1'.
5904 (add_inferior): Improve message printed when
5905 'print_inferior_events' is on.
5906 (exit_inferior): Remove message printed when
5907 'print_inferior_events' is on.
5908 (detach_inferior): Improve message printed when
5909 'print_inferior_events' is on.
5910 (initialize_inferiors): Use 'add_inferior_silent' to set
5911 'current_inferior_'.
5912 * inferior.h (print_inferior_events): Declare here as
5913 'extern'.
5914 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5915 '[Detaching...]' messages when 'print_inferior_events' is on.
5916 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5917 as prefix/suffix for messages. Remove periods. Fix erroneous
5918 'Detaching after fork from child...', replace it by '... from
5919 parent...'.
5920 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5921 prefix/suffix when printing 'Detaching...' messages. Print
5922 them when 'print_inferior_events' is on.
5923 * remote.c (remote_detach_1): Print message when detaching
5924 from inferior and '!is_fork_parent'.
5925
5926 2018-04-24 Tom Tromey <tom@tromey.com>
5927
5928 * cli-out.h: Reindent.
5929
5930 2018-04-24 Tom Tromey <tom@tromey.com>
5931
5932 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5933 (cli_ui_out::do_field_string): Use fputs_filtered.
5934 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5935
5936 2018-04-23 Tom Tromey <tom@tromey.com>
5937
5938 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5939 gdb::unique_xmalloc_ptr.
5940
5941 2018-04-23 Tom Tromey <tom@tromey.com>
5942
5943 * configure: Rebuild.
5944
5945 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5946
5947 PR gdb/23095
5948 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5949 prepare_for_testing. Set normal_bp to r_debug_state if target
5950 is bsd.
5951
5952 2018-04-21 Pedro Alves <palves@redhat.com>
5953 Rajendra SY <rajendra.sy@gmail.com>
5954
5955 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5956 * remote.c (extended_remote_attach): In all-stop mode, mark the
5957 thread as executing.
5958
5959 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5960
5961 * thread.c (thread_apply_all_command): Fix comment.
5962 (thread_command): Fix comment.
5963
5964 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5965
5966 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5967 parameter.
5968 * features/aarch64-core.c (create_feature_aarch64_core):
5969 Regenerate.
5970 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5971 Likewise.
5972 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5973 Likewise.
5974 * features/i386/32bit-avx512.c
5975 (create_feature_i386_32bit_avx512): Likewise.
5976 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5977 Likewise.
5978 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5979 Likewise.
5980 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5981 Likewise.
5982 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5983 Likewise.
5984 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5985 Likewise.
5986 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5987 Likewise.
5988 * features/i386/64bit-avx512.c
5989 (create_feature_i386_64bit_avx512): Likewise.
5990 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5991 Likewise.
5992 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5993 Likewise.
5994 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5995 Likewise.
5996 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5997 Likewise.
5998 * features/i386/64bit-segments.c
5999 (create_feature_i386_64bit_segments): Likewise.
6000 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6001 Likewise.
6002 * features/i386/x32-core.c
6003 (create_feature_i386_x32_core): Likewise.
6004 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6005 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6006 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6007 * target-descriptions.c: In generated code, don't pass xml
6008 filename.
6009
6010 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6011
6012 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6013 (print_xml_feature::visit_post): Likewise.
6014 (print_xml_feature::visit): Likewise.
6015 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6016 (print_xml_feature): Add new class.
6017 * regformats/regdat.sh: Null xmltarget on feature targets.
6018 * target-descriptions.c (struct target_desc): Add xmltarget.
6019 (maintenance_check_tdesc_xml_convert): Add unittest function.
6020 (tdesc_get_features_xml): Add function to get xml.
6021 (maintenance_check_xml_descriptions): Test xml generation.
6022 * xml-tdesc.c (string_read_description_xml): Add function.
6023 * xml-tdesc.h (string_read_description_xml): Add declaration.
6024
6025 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6026
6027 * features/Makefile: Add feature marker to targets with new style
6028 target descriptions.
6029 * regformats/aarch64.dat: Regenerate.
6030 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6031 * regformats/i386/amd64-avx-linux.dat: Likewise.
6032 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6033 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6034 * regformats/i386/amd64-linux.dat: Likewise.
6035 * regformats/i386/amd64-mpx-linux.dat: Likewise.
6036 * regformats/i386/amd64.dat: Likewise.
6037 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6038 * regformats/i386/i386-avx-linux.dat: Likewise.
6039 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6040 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6041 * regformats/i386/i386-linux.dat: Likewise.
6042 * regformats/i386/i386-mmx-linux.dat: Likewise.
6043 * regformats/i386/i386-mpx-linux.dat: Likewise.
6044 * regformats/i386/i386.dat: Likewise.
6045 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6046 * regformats/i386/x32-avx-linux.dat: Likewise.
6047 * regformats/i386/x32-linux.dat: Likewise.
6048 * regformats/tic6x-c62x-linux.dat: Likewise.
6049 * regformats/tic6x-c64x-linux.dat: Likewise.
6050 * regformats/tic6x-c64xp-linux.dat: Likewise.
6051 * regformats/regdat.sh: Parse feature marker.
6052
6053 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6054
6055 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6056 (tdesc_osabi_name): Likewise.
6057 * target-descriptions.c (tdesc_architecture_name): Add new
6058 function.
6059 (tdesc_osabi_name): Likewise.
6060
6061 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6062
6063 * common/tdesc.c (tdesc_predefined_type): Move to here.
6064 (tdesc_named_type): Likewise.
6065 (tdesc_create_vector): Likewise.
6066 (tdesc_create_struct): Likewise.
6067 (tdesc_set_struct_size): Likewise.
6068 (tdesc_create_union): Likewise.
6069 (tdesc_create_flags): Likewise.
6070 (tdesc_create_enum): Likewise.
6071 (tdesc_add_field): Likewise.
6072 (tdesc_add_typed_bitfield): Likewise.
6073 (tdesc_add_bitfield): Likewise.
6074 (tdesc_add_flag): Likewise.
6075 (tdesc_add_enum_value): Likewise.
6076 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6077 (struct tdesc_type_vector): Likewise.
6078 (struct tdesc_type_field): Likewise.
6079 (struct tdesc_type_with_fields): Likewise.
6080 (tdesc_create_enum): Add declaration.
6081 (tdesc_add_typed_bitfield): Likewise.
6082 (tdesc_add_enum_value): Likewise.
6083 * target-descriptions.c (tdesc_type_field): Move from here.
6084 (tdesc_type_builtin): Likewise.
6085 (tdesc_type_vector): Likewise.
6086 (tdesc_type_with_fields): Likewise.
6087 (tdesc_predefined_types): Likewise.
6088 (tdesc_named_type): Likewise.
6089 (tdesc_create_vector): Likewise.
6090 (tdesc_create_struct): Likewise.
6091 (tdesc_set_struct_size): Likewise.
6092 (tdesc_create_union): Likewise.
6093 (tdesc_create_flags): Likewise.
6094 (tdesc_create_enum): Likewise.
6095 (tdesc_add_field): Likewise.
6096 (tdesc_add_typed_bitfield): Likewise.
6097 (tdesc_add_bitfield): Likewise.
6098 (tdesc_add_flag): Likewise.
6099 (tdesc_add_enum_value): Likewise.
6100 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6101 (tdesc_add_typed_bitfield): Likewise.
6102 (tdesc_add_enum_value): Likewise.
6103
6104 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6105
6106 * common/tdesc.c (tdesc_feature::accept): Move to here.
6107 (tdesc_feature::operator==): Likewise.
6108 (tdesc_create_reg): Likewise.
6109 * common/tdesc.h (tdesc_type_kind): Likewise.
6110 (struct tdesc_type): Likewise.
6111 (struct tdesc_feature): Likewise.
6112 * regformats/regdat.sh: Create a feature.
6113 * target-descriptions.c (tdesc_type_kind): Move from here.
6114 (tdesc_type): Likewise.
6115 (tdesc_type_up): Likewise.
6116 (tdesc_feature): Likewise.
6117 (tdesc_create_reg): Likewise.
6118
6119 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6120
6121 * Makefile.in: Add arch/tdesc.c
6122 * common/tdesc.c: New file.
6123 * common/tdesc.h (tdesc_element_visitor): Move to here.
6124 (tdesc_element): Likewise.
6125 (tdesc_reg): Likewise.
6126 (tdesc_reg_up): Likewise.
6127 * regformats/regdef.h (reg): Add offset to constructors.
6128 * target-descriptions.c (tdesc_element_visitor): Move from here.
6129 (tdesc_element): Likewise.
6130 (tdesc_reg): Likewise.
6131 (tdesc_reg_up): Likewise.
6132
6133 2018-04-17 Tom Tromey <tom@tromey.com>
6134
6135 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6136 discriminant field.
6137
6138 2018-04-17 Tom Tromey <tom@tromey.com>
6139
6140 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6141
6142 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
6143
6144 * symtab.c (print_symbol_info): Skip printing filename and line
6145 number when `last' is NULL.
6146 (symtab_symbol_info): Use empty string instead of NULL for first
6147 invocation of print_symbol_info.
6148 (rbreak_command): Pass NULL to `last' parameter of
6149 print_symbol_info.
6150
6151 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
6152
6153 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6154 instead of nullptr.
6155
6156 2018-04-16 Pedro Alves <palves@redhat.com>
6157
6158 * MAINTAINERS (sh): Remove.
6159 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6160 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6161 (ALLDEPFILES): Remove sh64-tdep.c.
6162 * NEWS: Mentions that support for SH-5/SH64 is removed.
6163 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6164 (sh*-*-openbsd*): Ditto.
6165 (sh64-*-elf*): Remove.
6166 (sh*): Remove.
6167 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6168 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6169 * sh-tdep.c: No longer include "sh64-tdep.h".
6170 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6171 * sh64-tdep.c, sh64-tdep.h: Remove files.
6172
6173 2018-04-16 Pedro Alves <palves@redhat.com>
6174
6175 * MAINTAINERS: Remove m88k.
6176 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6177 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6178 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6179 * NEWS: Mention that support for m88k was removed.
6180 * configure.host (m88*-*-*): Remove support.
6181 * configure.nat (m88k-*-*): Remove support.
6182 * configure.tgt (m88*-*-openbsd*): Remove.
6183 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6184
6185 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
6186
6187 * configure.tgt (x86_tobjs): New variable.
6188 (amd64_tobjs, i386_tobjs): Use it.
6189
6190 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
6191
6192 * symtab.c (print_symbol_info): Precede the symbol definition by
6193 the line number when available.
6194 * NEWS: Advertise this enhancement.
6195
6196 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6197
6198 * NEWS (New options): announce set/show record btrace cpu.
6199 * btrace.c: Include record-btrace.h.
6200 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6201 the vendor is unknown.
6202 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
6203 Maybe overwrite the btrace configuration's cpu.
6204 (btrace_compute_ftrace): Add cpu parameter. Update callers.
6205 (btrace_fetch): Add cpu parameter. Update callers.
6206 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6207 Maybe overwrite the btrace configuration's cpu. Skip enabling
6208 errata workarounds if the vendor is unknown.
6209 * python/py-record-btrace.c: Include record-btrace.h.
6210 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6211 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6212 * record-btrace.c (record_btrace_cpu_state_kind): New.
6213 (record_btrace_cpu): New.
6214 (set_record_btrace_cpu_cmdlist): New.
6215 (record_btrace_get_cpu): New.
6216 (require_btrace_thread, record_btrace_info)
6217 (record_btrace_resume_thread): Call record_btrace_get_cpu.
6218 (cmd_set_record_btrace_cpu_none): New.
6219 (cmd_set_record_btrace_cpu_auto): New.
6220 (cmd_set_record_btrace_cpu): New.
6221 (cmd_show_record_btrace_cpu): New.
6222 (_initialize_record_btrace): Initialize set/show record btrace cpu
6223 commands.
6224 * record-btrace.h (record_btrace_get_cpu): New.
6225
6226 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6227
6228 * record.c (set_record_command): Fix typo in message.
6229
6230 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6231
6232 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6233
6234 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6235
6236 * infrun.c (process_event_stop_test): Call
6237 gdbarch_in_indirect_branch_thunk.
6238 * gdbarch.sh (in_indirect_branch_thunk): New.
6239 * gdbarch.c: Regenerated.
6240 * gdbarch.h: Regenerated.
6241 * x86-tdep.h: New.
6242 * x86-tdep.c: New.
6243 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6244 (HFILES_NO_SRCDIR): Add x86-tdep.h.
6245 (ALLDEPFILES): Add x86-tdep.c.
6246 * arch-utils.h (default_in_indirect_branch_thunk): New.
6247 * arch-utils.c (default_in_indirect_branch_thunk): New.
6248 * i386-tdep: Include x86-tdep.h.
6249 (i386_in_indirect_branch_thunk): New.
6250 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6251 function.
6252 * amd64-tdep: Include x86-tdep.h.
6253 (amd64_in_indirect_branch_thunk): New.
6254 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6255
6256 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6257
6258 PR gdb/23053
6259 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6260 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6261 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6262 regression.
6263
6264 2018-04-12 Tom Tromey <tom@tromey.com>
6265
6266 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6267 (rust_evaluate_subexp): Likewise.
6268
6269 2018-04-12 Pedro Alves <palves@redhat.com>
6270
6271 * procfs.c (procfs_detach): Make forward declaration's prototype
6272 match definition's protototype.
6273 (proc_get_LDT_entry): Remove stale do_cleanups call.
6274
6275 2018-04-12 Pedro Alves <palves@redhat.com>
6276
6277 * target.h (target_ops::to_has_exited): Delete.
6278 (target_has_exited): Delete.
6279 * target-delegates.c: Regenerate.
6280
6281 2018-04-11 Pedro Alves <palves@redhat.com>
6282
6283 * target.c (fileio_fh_t::t): Add comment.
6284 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6285 (target_fileio_close): Handle a NULL target.
6286 (invalidate_fileio_fh): New.
6287 (target_close): Call it.
6288 * remote.c (remote_hostio_send_command): No longer check whether
6289 remote_desc is open.
6290
6291 2018-04-11 Pedro Alves <palves@redhat.com>
6292
6293 * target.c (fileio_fh_t): Make it a named struct instead of a
6294 typedef.
6295 (fileio_fh_t::is_closed): New method.
6296 (DEF_VEC_O (fileio_fh_t)): Remove.
6297 (fileio_fhandles): Now a std::vector.
6298 (is_closed_fileio_fh): Delete.
6299 (acquire_fileio_fd): Adjust. Rename parameters.
6300 (release_fileio_fd): Adjust.
6301 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6302 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6303 (target_fileio_close): Adjust.
6304
6305 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6306
6307 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6308 index.
6309
6310 2018-04-10 Pedro Alves <palves@redhat.com>
6311
6312 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6313 (scoped_finish_thread_state): New class.
6314 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6315 cleanup.
6316 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6317 (fetch_inferior_event, normal_stop): Likewise.
6318 * thread.c (finish_thread_state_cleanup): Delete.
6319
6320 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6321 Pedro Alves <palves@redhat.com>
6322
6323 * value.c: Include "selftest.h" and "common/array-view.h".
6324 (struct range) <operator ==>: New.
6325 (test_ranges_contain): New.
6326 (check_ranges_vector): New.
6327 (test_insert_into_bit_range_vector): New.
6328 (_initialize_values): Register selftests.
6329 * common/array-view.h (operator==, operator!=): New.
6330
6331 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6332
6333 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6334 an iterator.
6335 * inline-frame.c: Include <algorithm>.
6336 (struct inline_state): Add constructor.
6337 (inline_state_s): Remove.
6338 (DEF_VEC_O(inline_state_s)): Remove.
6339 (inline_states): Change type to std::vector.
6340 (find_inline_frame_state): Adjust to std::vector.
6341 (allocate_inline_frame_state): Remove.
6342 (clear_inline_frame_state): Adjust to std::vector.
6343 (skip_inline_frames): Adjust to std::vector.
6344
6345 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6346
6347 * tracepoint.h (struct trace_state_variable): Add constructor.
6348 <name>: Change type to std::string.
6349 * tracepoint.c (tsv_s): Remove.
6350 (DEF_VEC_O(tsv_s)): Remove.
6351 (tvariables): Change to std::vector.
6352 (create_trace_state_variable): Adjust to std::vector.
6353 (find_trace_state_variable): Likewise.
6354 (find_trace_state_variable_by_number): Likewise.
6355 (delete_trace_state_variable): Likewise.
6356 (trace_variable_command): Adjust to std::string.
6357 (delete_trace_variable_command): Likewise.
6358 (tvariables_info_1): Adjust to std::vector.
6359 (save_trace_state_variables): Likewise.
6360 (start_tracing): Likewise.
6361 (merge_uploaded_trace_state_variables): Adjust to std::vector
6362 and std::string.
6363 * target.h (struct target_ops)
6364 <to_download_trace_state_variable>: Pass reference to
6365 trace_state_variable.
6366 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6367 * target-delegates.c: Re-generate.
6368 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6369 (mi_tsv_deleted): Likewise.
6370 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6371 * remote.c (remote_download_trace_state_variable): Change
6372 pointer to reference and adjust.
6373 * make-target-delegates (parse_argtypes): Handle references.
6374 (write_function_header): Likewise.
6375 (munge_type): Likewise.
6376
6377 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6378
6379 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6380 string_view-selftests.c.
6381 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6382 testsuite.
6383 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6384 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6385 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6386 * unittests/basic_string_view/element_access/char/1.cc:
6387 Likewise.
6388 * unittests/basic_string_view/element_access/char/empty.cc:
6389 Likewise.
6390 * unittests/basic_string_view/element_access/char/front_back.cc:
6391 Likewise.
6392 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6393 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6394 Likewise.
6395 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6396 Likewise.
6397 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6398 Likewise.
6399 * unittests/basic_string_view/operations/compare/char/1.cc:
6400 Likewise.
6401 * unittests/basic_string_view/operations/compare/char/13650.cc:
6402 Likewise.
6403 * unittests/basic_string_view/operations/copy/char/1.cc:
6404 Likewise.
6405 * unittests/basic_string_view/operations/data/char/1.cc:
6406 Likewise.
6407 * unittests/basic_string_view/operations/find/char/1.cc:
6408 Likewise.
6409 * unittests/basic_string_view/operations/find/char/2.cc:
6410 Likewise.
6411 * unittests/basic_string_view/operations/find/char/3.cc:
6412 Likewise.
6413 * unittests/basic_string_view/operations/find/char/4.cc:
6414 Likewise.
6415 * unittests/basic_string_view/operations/rfind/char/1.cc:
6416 Likewise.
6417 * unittests/basic_string_view/operations/rfind/char/2.cc:
6418 Likewise.
6419 * unittests/basic_string_view/operations/rfind/char/3.cc:
6420 Likewise.
6421 * unittests/basic_string_view/operations/substr/char/1.cc:
6422 Likewise.
6423 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6424 * unittests/string_view-selftests.c: New file.
6425
6426 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6427
6428 * unittests/basic_string_view/capacity/1.cc: New file.
6429 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6430 * unittests/basic_string_view/cons/char/1.cc: New file.
6431 * unittests/basic_string_view/cons/char/2.cc: New file.
6432 * unittests/basic_string_view/cons/char/3.cc: New file.
6433 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6434 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6435 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6436 * unittests/basic_string_view/element_access/char/1.cc: New file.
6437 * unittests/basic_string_view/element_access/char/2.cc: New file.
6438 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6439 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6440 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6441 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6442 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6443 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6444 * unittests/basic_string_view/include.cc: New file.
6445 * unittests/basic_string_view/inserters/char/1.cc: New file.
6446 * unittests/basic_string_view/inserters/char/2.cc: New file.
6447 * unittests/basic_string_view/inserters/char/3.cc: New file.
6448 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6449 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6450 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6451 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6452 * unittests/basic_string_view/literals/types.cc: New file.
6453 * unittests/basic_string_view/literals/values.cc: New file.
6454 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6455 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6456 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6457 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6458 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6459 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6460 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6461 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6462 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6463 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6464 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6465 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6466 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6467 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6468 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6469 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6470 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6471 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6472 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6473 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6474 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6475 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6476 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6477 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6478 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6479 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6480 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6481 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6482 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6483 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6484 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6485 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6486 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6487 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6488 * unittests/basic_string_view/operators/char/2.cc: New file.
6489 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6490 * unittests/basic_string_view/range_access/char/1.cc: New file.
6491 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6492 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6493 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6494 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6495 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6496 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6497 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6498 * unittests/basic_string_view/typedefs.cc: New file.
6499 * unittests/basic_string_view/types/1.cc: New file.
6500
6501 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6502
6503 * common/gdb_string_view.h: Remove libstdc++ implementation
6504 details, adjust to gdb reality.
6505 * common/gdb_string_view.tcc: Likewise.
6506 * cli/cli-script.c (struct string_view): Remove.
6507 (user_args) <m_args>: Change element type to gdb::string_view.
6508 (user_args::insert_args): Adjust.
6509
6510 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6511
6512 * common/gdb_string_view.h: New file.
6513 * common/gdb_string_view.tcc: New file.
6514
6515 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6516
6517 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6518 * configure: Re-generate.
6519
6520 2018-04-09 Pedro Alves <palves@redhat.com>
6521
6522 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6523 (set_target_gdbarch): Call
6524 gdb::observers::architecture_changed.notify instead of
6525 observer_notify_architecture_changed.
6526
6527 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6528
6529 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6530 (do_restore_current_traceframe_cleanup): Remove.
6531 (restore_current_traceframe_cleanup_dtor): Remove.
6532 (make_cleanup_restore_current_traceframe): Remove.
6533 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6534 New.
6535 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6536 * infrun.c (fetch_inferior_event): Use
6537 scoped_restore_current_traceframe.
6538
6539 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6540
6541 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6542 Remove.
6543 <n_allocated_type_units>: Remove.
6544 <all_type_units>: Change to std::vector.
6545 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6546 to std::vector change.
6547 (dwarf2_per_objfile::get_cutu): Likewise.
6548 (dwarf2_per_objfile::get_tu): Likewise.
6549 (create_signatured_type_table_from_index): Likewise.
6550 (create_signatured_type_table_from_debug_names): Likewise.
6551 (dw2_symtab_iter_next): Likewise.
6552 (dw2_print_stats): Likewise.
6553 (dw2_expand_all_symtabs): Likewise.
6554 (dw2_expand_marked_cus): Likewise.
6555 (dw2_debug_names_iterator::next): Likewise.
6556 (dwarf2_initialize_objfile): Likewise.
6557 (add_signatured_type_cu_to_table): Likewise.
6558 (create_all_type_units): Likewise.
6559 (add_type_unit): Likewise.
6560 (struct tu_abbrev_offset): Add constructor.
6561 (build_type_psymtabs_1): Adjust to std::vector change.
6562 (print_tu_stats): Likewise.
6563 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6564 (write_debug_names): Likewise.
6565
6566 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6567
6568 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6569 Make an std::vector.
6570 <n_comp_units>: Remove.
6571 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6572 to std::vector change.
6573 (dwarf2_per_objfile::get_cutu): Likewise.
6574 (dwarf2_per_objfile::get_cu): Likewise.
6575 (create_cus_from_index): Likewise.
6576 (create_addrmap_from_index): Likewise.
6577 (create_addrmap_from_aranges): Likewise.
6578 (dwarf2_read_index): Likewise.
6579 (dw2_find_last_source_symtab): Likewise.
6580 (dw2_map_symtabs_matching_filename): Likewise.
6581 (dw2_symtab_iter_next): Likewise.
6582 (dw2_print_stats): Likewise.
6583 (dw2_expand_all_symtabs): Likewise.
6584 (dw2_expand_symtabs_with_fullname): Likewise.
6585 (dw2_expand_marked_cus): Likewise.
6586 (dw2_map_symbol_filenames): Likewise.
6587 (create_cus_from_debug_names): Likewise.
6588 (dwarf2_read_debug_names): Likewise.
6589 (dw2_debug_names_iterator::next): Likewise.
6590 (dwarf2_initialize_objfile): Likewise.
6591 (set_partial_user): Likewise.
6592 (dwarf2_build_psymtabs_hard): Likewise.
6593 (read_comp_units_from_section): Remove arguments, adjust to
6594 std::vector change.
6595 (create_all_comp_units): Adjust to std::vector and
6596 read_comp_units_from_section changes.
6597 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6598 change.
6599 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6600 (psyms_seen_size): Likewise.
6601 (write_gdbindex): Likewise.
6602 (write_debug_names): Likewise.
6603
6604 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6605
6606 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6607 with dwarf2_per_objfile.
6608 (create_cus_from_index): Likewise.
6609 (create_signatured_type_table_from_index): Likewise.
6610 (dwarf2_read_index): Likewise.
6611 (dwarf2_initialize_objfile): Likewise.
6612 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6613 per_cu rather than get_dwarf2_per_objfile.
6614
6615 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6616
6617 * dwarf2read.h (struct signatured_type): Forward declare.
6618 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6619 New methods.
6620 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6621 (dw2_get_cutu): ...this.
6622 (dwarf2_per_objfile::get_cu): Rename from...
6623 (dw2_get_cu): ...this.
6624 (dwarf2_per_objfile::get_tu): New.
6625 (create_addrmap_from_index): Adjust.
6626 (create_addrmap_from_aranges): Adjust.
6627 (dw2_find_last_source_symtab): Adjust.
6628 (dw2_map_symtabs_matching_filename): Adjust.
6629 (dw2_symtab_iter_next): Adjust.
6630 (dw2_print_stats): Adjust.
6631 (dw2_expand_all_symtabs): Adjust.
6632 (dw2_expand_symtabs_with_fullname): Adjust.
6633 (dw2_expand_marked_cus): Adjust.
6634 (dw_expand_symtabs_matching_file_matcher): Adjust.
6635 (dw2_map_symbol_filenames): Adjust.
6636 (dw2_debug_names_iterator::next): Adjust.
6637 (dwarf2_initialize_objfile): Adjust.
6638 (set_partial_user): Adjust.
6639 (dwarf2_build_psymtabs_hard): Adjust.
6640
6641 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6642
6643 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6644 Remove unused variables.
6645 (dw2_map_symtabs_matching_filename): Likewise.
6646 (dwarf2_record_block_ranges): Likewise.
6647 (dwarf2_read_addr_index): Likewise.
6648 (follow_die_offset): Likewise.
6649
6650 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6651
6652 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6653 to symbol_file_add_main.
6654
6655 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6656
6657 PR mi/22299
6658 * mi/mi-console.c (do_fputc_async_safe): New.
6659 (mi_console_file::write_async_safe): New.
6660 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6661 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6662 New.
6663 * ui-file.c (ui_file::putstrn): Adjust call to
6664 fputstrn_unfiltered.
6665 * utils.c (printchar): Replace do_fputs and do_fprintf
6666 parameters by do_fputc.
6667 (fputstr_filtered): Adjust call to printchar.
6668 (fputstr_unfiltered): Likewise.
6669 (fputstrn_filtered): Likewise.
6670 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6671 printchar.
6672 * utils.h (do_fputc_ftype): New typedef.
6673 (fputstrn_unfiltered): Add do_fputc parameter.
6674
6675 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6676
6677 * regformats/i386/i386-avx.dat: Remove.
6678
6679 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6680
6681 PR gdb/22979
6682 * amd64-tdep.c (amd64_none_init_abi): New function.
6683 (amd64_x32_none_init_abi): New function.
6684 (_initialize_amd64_tdep): Register handlers for x86-64 and
6685 x64_32 with GDB_OSABI_NONE.
6686 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6687 GDB_OSABI_NONE osabi.
6688
6689 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6690
6691 PR gdb/22980
6692 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6693 GDB_OSABI_NONE.
6694 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6695 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6696
6697 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6698
6699 * common/byte-vector.h (char_vector): New type.
6700 * target.h (target_read_alloc): Return
6701 gdb::optional<byte_vector>.
6702 (target_read_stralloc): Return gdb::optional<char_vector>.
6703 (target_get_osdata): Return gdb::optional<char_vector>.
6704 * target.c (target_read_alloc_1): Templatize. Replacement
6705 manual memory management with vector.
6706 (target_read_alloc): Change return type, adjust.
6707 (target_read_stralloc): Change return type, adjust.
6708 (target_get_osdata): Change return type, adjust.
6709 * auxv.c (struct auxv_info) <length>: Remove.
6710 <data>: Change type to gdb::optional<byte_vector>.
6711 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6712 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6713 (target_auxv_search): Adjust.
6714 (fprint_target_auxv): Adjust.
6715 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6716 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6717 (linux_make_corefile_notes): Adjust.
6718 * osdata.c (get_osdata): Adjust.
6719 * remote.c (remote_get_threads_with_qxfer): Adjust.
6720 (remote_memory_map): Adjust.
6721 (remote_traceframe_info): Adjust.
6722 (btrace_read_config): Adjust.
6723 (remote_read_btrace): Adjust.
6724 (remote_pid_to_exec_file): Adjust.
6725 * solib-aix.c (solib_aix_get_library_list): Adjust.
6726 * solib-dsbt.c (decode_loadmap): Don't free buf.
6727 (dsbt_get_initial_loadmaps): Adjust.
6728 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6729 * solib-target.c (solib_target_current_sos): Adjust.
6730 * tracepoint.c (sdata_make_value): Adjust.
6731 * xml-support.c (xinclude_start_include): Adjust.
6732 (xml_fetch_content_from_file): Adjust.
6733 * xml-support.h (xml_fetch_another): Change return type.
6734 (xml_fetch_content_from_file): Change return type.
6735 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6736 * xml-tdesc.c (file_read_description_xml): Adjust.
6737 (fetch_available_features_from_target): Change return type.
6738 (target_fetch_description_xml): Adjust.
6739 (target_read_description_xml): Adjust.
6740
6741 2018-04-06 Tom Tromey <tom@tromey.com>
6742
6743 * value.c (~value): Update.
6744 (struct value) <contents>: Now unique_xmalloc_ptr.
6745 (value_contents_bits_eq, allocate_value_contents)
6746 (value_contents_raw, value_contents_all_raw)
6747 (value_contents_for_printing, value_contents_for_printing_const)
6748 (set_value_enclosing_type): Update.
6749
6750 2018-04-06 Tom Tromey <tom@tromey.com>
6751
6752 * value.c (range_s): Remove typedef, VEC.
6753 (struct range): Add operator<.
6754 (range_lessthan): Remove.
6755 (ranges_contain): Change type.
6756 (~value): Update.
6757 (struct value) <unavailable, optimized_out>: Now std::vector.
6758 (value_entirely_available)
6759 (value_entirely_covered_by_range_vector)
6760 (value_entirely_unavailable, value_entirely_optimized_out):
6761 Update.
6762 (insert_into_bit_range_vector): Change argument type.
6763 (find_first_range_overlap): Likewise.
6764 (struct ranges_and_idx, value_contents_bits_eq)
6765 (require_not_optimized_out, require_available): Update.
6766 (ranges_copy_adjusted): Change argument types.
6767 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6768
6769 2018-04-06 Tom Tromey <tom@tromey.com>
6770
6771 * value.c (~value): Update.
6772 (struct value) <parent>: Now a value_ref_ptr.
6773 (value_parent, set_value_parent, value_address, value_copy):
6774 Update.
6775
6776 2018-04-06 Tom Tromey <tom@tromey.com>
6777
6778 * value.c (struct value): Add constructor, destructor, and member
6779 initializers.
6780 (allocate_value_lazy, value_decref): Update.
6781
6782 2018-04-06 Tom Tromey <tom@tromey.com>
6783
6784 * value.c (struct value) <released, next>: Remove.
6785 (all_values): Now a std::vector.
6786 (allocate_value_lazy): Update.
6787 (value_next): Remove.
6788 (value_mark, value_free_to_mark, release_value)
6789 (value_release_to_mark): Update.
6790
6791 2018-04-06 Tom Tromey <tom@tromey.com>
6792
6793 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6794 (free_value_chain): Remove.
6795 * value.c (free_value_chain): Remove.
6796 (value_release_to_mark): Return a std::vector.
6797 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6798 std::vector.
6799 (check_condition): Update.
6800 * eval.c (fetch_subexp_value): Change "val_chain" to a
6801 std::vector.
6802 * breakpoint.c (update_watchpoint): Update.
6803 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6804
6805 2018-04-06 Tom Tromey <tom@tromey.com>
6806
6807 * value.h (free_all_values): Remove.
6808 * value.c (free_all_values): Remove.
6809
6810 2018-04-06 Tom Tromey <tom@tromey.com>
6811
6812 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6813 (value_history_chain, value_history_count): Remove.
6814 (value_history): New global.
6815 (record_latest_value, access_value_history, show_values)
6816 (preserve_values): Update.
6817
6818 2018-04-06 Tom Tromey <tom@tromey.com>
6819
6820 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6821 * varobj.c (varobj_set_display_format, varobj_set_value)
6822 (install_default_visualizer, construct_visualizer)
6823 (install_new_value, ~varobj, varobj_get_value_type)
6824 (my_value_of_variable, varobj_editable_p): Update.
6825 * c-varobj.c (c_describe_child, c_value_of_variable)
6826 (cplus_number_of_children, cplus_describe_child): Update.
6827 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6828 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6829 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6830
6831 2018-04-06 Tom Tromey <tom@tromey.com>
6832
6833 * printcmd.c (last_examine_address): Change type to
6834 value_ref_ptr.
6835 (do_examine, x_command): Update.
6836
6837 2018-04-06 Tom Tromey <tom@tromey.com>
6838
6839 * value.c (release_value): Update.
6840 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6841 (struct bpstats) <val>: Now a value_ref_ptr.
6842 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6843 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6844 (~watchpoint, print_it_watchpoint, watch_command_1)
6845 (invalidate_bp_value_on_memory_change): Update.
6846
6847 2018-04-06 Tom Tromey <tom@tromey.com>
6848
6849 * varobj.c (varobj_clear_saved_item)
6850 (update_dynamic_varobj_children, install_new_value, ~varobj):
6851 Update.
6852 * value.h (value_incref): Move declaration earlier.
6853 (value_decref): Rename from value_free.
6854 (struct value_ref_policy): New.
6855 (value_ref_ptr): New typedef.
6856 (struct value_deleter): Remove.
6857 (gdb_value_up): Remove typedef.
6858 (release_value): Change return type.
6859 (release_value_or_incref): Remove.
6860 * value.c (set_value_parent): Update.
6861 (value_incref): Change return type.
6862 (value_decref): Rename from value_free.
6863 (value_free_to_mark, free_all_values, free_value_chain): Update.
6864 (release_value): Return value_ref_ptr.
6865 (release_value_or_incref): Remove.
6866 (record_latest_value, set_internalvar, clear_internalvar):
6867 Update.
6868 * stack.c (info_frame_command): Don't call value_free.
6869 * python/py-value.c (valpy_dealloc, valpy_new)
6870 (value_to_value_object): Update.
6871 * printcmd.c (do_examine): Update.
6872 * opencl-lang.c (lval_func_free_closure): Update.
6873 * mi/mi-main.c (register_changed_p): Don't call value_free.
6874 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6875 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6876 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6877 value_free.
6878 * guile/scm-value.c (vlscm_free_value_smob)
6879 (vlscm_scm_from_value): Update.
6880 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6881 (frame_unwind_register_unsigned, get_frame_register_bytes)
6882 (put_frame_register_bytes): Don't call value_free.
6883 * findvar.c (address_from_register): Don't call value_free.
6884 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6885 * dwarf2loc.c (entry_data_value_free_closure)
6886 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6887 (dwarf2_evaluate_loc_desc_full): Update.
6888 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6889 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6890 (~watchpoint, watch_command_1)
6891 (invalidate_bp_value_on_memory_change): Update.
6892 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6893
6894 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6895
6896 PR gdb/23022
6897 * warning.m4: Add -Wno-error=deprecated-register.
6898 * configure: Re-generate.
6899
6900 2018-04-05 Tom Tromey <tom@tromey.com>
6901
6902 * linespec.h: Remove include of "vec.h".
6903
6904 2018-04-05 Tom Tromey <tom@tromey.com>
6905
6906 * linespec.c (typep): Remove typedef.
6907 (find_methods, find_superclass_methods): Take a std::vector.
6908 (find_method): Use std::vector.
6909
6910 2018-04-05 Tom Tromey <tom@tromey.com>
6911
6912 * utils.c (compare_strings): Remove.
6913 * utils.h (compare_strings): Remove.
6914 * objc-lang.h (find_imps): Update.
6915 * objc-lang.c (find_methods): Take a std::vector.
6916 (uniquify_strings, find_imps): Likewise.
6917 * linespec.c (find_methods): Take a std::vector.
6918 (decode_objc): Use std::vector.
6919 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6920 a std::vector.
6921 (find_method, find_function_symbols): Use std::vector.
6922
6923 2018-04-05 Tom Tromey <tom@tromey.com>
6924
6925 * completer.c (completion_tracker::completion_tracker): Remove
6926 cast.
6927 (completion_tracker::discard_completions): Likewise.
6928 * breakpoint.c (ambiguous_names_p): Remove cast.
6929 * ada-lang.c (_initialize_ada_language): Remove cast.
6930 * utils.h (streq): Update.
6931 (streq_hash): Add new declaration.
6932 * utils.c (streq): Return bool.
6933 (streq_hash): New function.
6934
6935 2018-04-05 Tom Tromey <tom@tromey.com>
6936
6937 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6938 Remove a string copy.
6939
6940 2018-04-05 Tom Tromey <tom@tromey.com>
6941
6942 * linespec.c (filter_results): Use std::vector.
6943 (decode_line_2, decode_line_full): Update.
6944
6945 2018-04-05 Tom Tromey <tom@tromey.com>
6946
6947 * linespec.c (canonical_to_fullform): Return std::string.
6948 (filter_results): Update.
6949 (struct decode_line_2_item): Add constructor.
6950 <fullform, displayform>: Now std::string.
6951 (decode_line_2_compare_items): Now a std::sort comparator.
6952 (decode_line_2): Update.
6953
6954 2018-04-05 Tom Tromey <tom@tromey.com>
6955
6956 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6957 (unexpected_linespec_error): Update.
6958 (linespec_parse_basic, parse_linespec): Update.
6959
6960 2018-04-05 Tom Tromey <tom@tromey.com>
6961
6962 * linespec.c (linespec_parse_basic): Reindent.
6963
6964 2018-04-05 Tom Tromey <tom@tromey.com>
6965
6966 * minsyms.h (iterate_over_minimal_symbols): Update.
6967 * minsyms.c (iterate_over_minimal_symbols): Take a
6968 gdb::function_view.
6969 * linespec.c (struct collect_minsyms): Remove.
6970 (compare_msyms): Now a std::sort comparator.
6971 (add_minsym): Add parameters.
6972 (search_minsyms_for_name): Update. Use std::vector.
6973
6974 2018-04-03 Tom Tromey <tom@tromey.com>
6975
6976 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6977 gdb::byte_vector.
6978
6979 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6980
6981 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6982
6983 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6984
6985 PR gdb/16959
6986 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6987 printing static type.
6988
6989 2018-04-01 Tom Tromey <tom@tromey.com>
6990
6991 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6992 (rs6000_xfer_shared_libraries): Update.
6993
6994 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6995
6996 * common/gdb_vecs.h (char_ptr): Remove.
6997 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6998
6999 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7000
7001 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7002 with std::vector.
7003 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7004
7005 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
7006
7007 * tracepoint.h (struct uploaded_tp): Initialize fields.
7008 <actions, step_actions, cmd_strings>: Change type to
7009 std::vector<char *>.
7010 * tracepoint.c (get_uploaded_tp): Allocate with new.
7011 (free_uploaded_tps): Free with delete.
7012 (parse_tracepoint_definition): Adjust to std::vector change.
7013 * breakpoint.c (read_uploaded_action): Likewise.
7014 (create_tracepoint_from_upload): Likewise.
7015 * ctf.c (ctf_write_uploaded_tp): Likewise.
7016 (SET_ARRAY_FIELD): Likewise.
7017 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7018
7019 2018-03-30 Tom Tromey <tom@tromey.com>
7020
7021 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
7022 std::unique_ptr.
7023 (svr4_keep_data_in_core): Update.
7024 (svr4_read_so_list): Update.
7025
7026 2018-03-30 Tom Tromey <tom@tromey.com>
7027
7028 * windows-nat.c (handle_output_debug_string, handle_exception):
7029 Update.
7030 * target.h (target_read_string): Update.
7031 * target.c (target_read_string): Change "string" to
7032 unique_xmalloc_ptr.
7033 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7034 Update.
7035 * solib-frv.c (frv_current_sos): Update.
7036 * solib-dsbt.c (dsbt_current_sos): Update.
7037 * solib-darwin.c (darwin_current_sos): Update.
7038 * linux-thread-db.c (inferior_has_bug): Update.
7039 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7040 Update. Remove alloca.
7041 * ada-lang.c (ada_main_name): Update.
7042
7043 2018-03-30 Tom Tromey <tom@tromey.com>
7044
7045 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7046 (struct dwo_file_deleter): New.
7047 (dwo_file_up): New typedef.
7048 (open_and_init_dwo_file): Use dwo_file_up.
7049 (free_dwo_file_cleanup): Remove.
7050
7051 2018-03-30 Tom Tromey <tom@tromey.com>
7052
7053 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7054 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7055
7056 2018-03-30 Tom Tromey <tom@tromey.com>
7057
7058 * dwarf2read.c (class free_cached_comp_units): New class.
7059 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7060 (free_cached_comp_units): Remove function.
7061
7062 2018-03-30 Tom Tromey <tom@tromey.com>
7063
7064 * utils.h (make_cleanup_unpush_target): Remove.
7065 * inf-ptrace.c (struct target_unpusher): New.
7066 (target_unpush_up) New typedef.
7067 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7068 target_unpush_up.
7069 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7070
7071 2018-03-27 Tom Tromey <tom@tromey.com>
7072
7073 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7074
7075 2018-03-27 Pedro Alves <palves@redhat.com>
7076 Tom Tromey <tom@tromey.com>
7077
7078 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7079 destructor. Now a class.
7080 (gdb_readline_wrapper_cleanup): Remove function.
7081 (gdb_readline_wrapper): Remove cleanups.
7082
7083 2018-03-27 Tom Tromey <tom@tromey.com>
7084
7085 * typeprint.h (struct type_print_options) <local_typedefs,
7086 global_typedefs>: Remove "struct" keyword.
7087 (class typedef_hash_table): New class.
7088 (recursively_update_typedef_hash, add_template_parameters)
7089 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7090 (find_typedef_in_hash): Don't declare.
7091 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7092 (typedef_hash_table::recursively_update): Rename from
7093 recursively_update_typedef_hash. Now a member.
7094 (typedef_hash_table::add_template_parameters): Rename from
7095 add_template_parameters. Now a member.
7096 (typedef_hash_table::typedef_hash_table): Now a constructor;
7097 rename from create_typedef_hash.
7098 (typedef_hash_table::~typedef_hash_table): Now a destructor;
7099 rename from free_typedef_hash.
7100 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7101 (do_free_global_table): Remove.
7102 (typedef_hash_table::typedef_hash_table): New constructor; renamed
7103 from copy_type_recursive.
7104 (create_global_typedef_table): Remove.
7105 (typedef_hash_table::find_global_typedef): Now a member of
7106 typedef_hash_table.
7107 (typedef_hash_table::find_typedef): Rename from
7108 find_typedef_in_hash; now a member.
7109 (whatis_exp): Update.
7110 * extension.h (struct ext_lang_type_printers): Add constructor and
7111 destructor.
7112 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7113 declare.
7114 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7115 Now a constructor; rename from start_ext_lang_type_printers.
7116 (ext_lang_type_printers): Now a destructor; rename from
7117 free_ext_lang_type_printers.
7118 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7119 Update.
7120 (c_type_print_base_struct_union): Update. Remove cleanups.
7121
7122 2018-03-27 Tom Tromey <tom@tromey.com>
7123
7124 * dwarf-index-write.c: Include <cmath>.
7125
7126 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7127
7128 * NEWS: Add entry describing new "set|show varsize-limit" command.
7129 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7130 command.
7131 * printcmd.c (_initialize_printcmd): Add "set var" alias of
7132 "set variable".
7133
7134 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
7135
7136 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7137 dwarf-index-write.c
7138 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7139 * dwarf-index-common.c: New file.
7140 * dwarf-index-common.h: New file.
7141 * dwarf-index-write.c: New file.
7142 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7143 (struct dwarf2_section_info): Move from here.
7144 (dwarf2_section_info_def): Likewise.
7145 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7146 (offset_type): Likewise.
7147 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7148 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7149 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7150 (byte_swap): Likewise.
7151 (MAYBE_SWAP): Likewise.
7152 (dwarf2_per_cu_ptr): Likewise.
7153 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7154 (struct tu_stats): Likewise.
7155 (struct dwarf2_per_objfile): Likewise.
7156 (struct dwarf2_per_cu_data): Likewise.
7157 (struct signatured_type): Likewise.
7158 (sig_type_ptr): Likewise.
7159 (DEF_VEC_P (sig_type_ptr)): Likewise.
7160 (INDEX4_SUFFIX): Likewise.
7161 (INDEX5_SUFFIX): Likewise.
7162 (DEBUG_STR_SUFFIX): Likewise.
7163 (dwarf2_read_section): Make non-static.
7164 (mapped_index_string_hash): Move from here.
7165 (dwarf5_djb_hash): Likewise.
7166 (file_write): Likewise.
7167 (class data_buf): Likewise.
7168 (struct symtab_index_entry): Likewise.
7169 (struct mapped_symtab): Likewise.
7170 (find_slot): Likewise.
7171 (hash_expand): Likewise.
7172 (add_index_entry): Likewise.
7173 (uniquify_cu_indices): Likewise.
7174 (class c_str_view): Likewise.
7175 (class c_str_view_hasher): Likewise.
7176 (class vector_hasher): Likewise.
7177 (write_hash_table): Likewise.
7178 (psym_index_map): Likewise.
7179 (struct addrmap_index_data): Likewise.
7180 (add_address_entry): Likewise.
7181 (add_address_entry_worker): Likewise.
7182 (write_address_map): Likewise.
7183 (symbol_kind): Likewise.
7184 (write_psymbols): Likewise.
7185 (struct signatured_type_index_data): Likewise.
7186 (write_one_signatured_type): Likewise.
7187 (recursively_count_psymbols): Likewise.
7188 (recursively_write_psymbols): Likewise.
7189 (class debug_names): Likewise.
7190 (check_dwarf64_offsets): Likewise.
7191 (psyms_seen_size): Likewise.
7192 (write_gdbindex): Likewise.
7193 (write_debug_names): Likewise.
7194 (assert_file_size): Likewise.
7195 (write_psymtabs_to_index): Likewise.
7196 (save_gdb_index_command): Likewise.
7197 (_initialize_dwarf2_read): Don't register the "save gdb-index"
7198 command.
7199 * dwarf2read.h: New file.
7200
7201 2018-03-27 Joel Brobecker <brobecker@adacore.com>
7202
7203 PR gdb/22670
7204 * dwarf2read.c (dwarf2_physname): Do not return the demangled
7205 symbol name if the CU's language stores symbol names in linkage
7206 format.
7207 * language.h (struct language_defn)
7208 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
7209 all instances of this struct.
7210
7211 2018-03-26 Tom Tromey <tom@tromey.com>
7212
7213 * stack.c (backtrace_command_1): Remove verbose code.
7214
7215 2018-03-26 Tom Tromey <tom@tromey.com>
7216
7217 * python/py-framefilter.c (py_print_type): Don't catch
7218 exceptions. Return void.
7219 (py_print_value): Likewise.
7220 (py_print_single_arg): Likewise.
7221 (enumerate_args): Don't catch exceptions.
7222 (py_print_args): Likewise.
7223 (py_print_frame): Likewise.
7224 (gdbpy_apply_frame_filter): Catch exceptions here.
7225
7226 2018-03-26 Tom Tromey <tom@tromey.com>
7227
7228 * stack.c (_initialize_stack): Remove trailing newlines from help
7229 text. Add "Usage" line to "backtrace" help.
7230
7231 2018-03-26 Tom Tromey <tom@tromey.com>
7232
7233 PR python/16486:
7234 * python/py-framefilter.c (py_print_args): Call wrap_hint.
7235
7236 2018-03-26 Tom Tromey <tom@tromey.com>
7237
7238 * python/py-framefilter.c (py_print_single_arg): Return
7239 EXT_LANG_BT_ERROR from catch.
7240
7241 2018-03-26 Tom Tromey <tom@tromey.com>
7242
7243 PR backtrace/15584:
7244 * stack.c (backtrace_command_1): Move some code into no-filters
7245 "if".
7246
7247 2018-03-26 Tom Tromey <tom@tromey.com>
7248
7249 * python/py-framefilter.c (throw_quit_or_print_exception): New
7250 function.
7251 (gdbpy_apply_frame_filter): Use it.
7252
7253 2018-03-26 Tom Tromey <tom@tromey.com>
7254
7255 PR cli/17716:
7256 * python/py-framefilter.c (py_print_type, py_print_value)
7257 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7258 RETURN_MASK_ERROR.
7259
7260 2018-03-26 Tom Tromey <tom@tromey.com>
7261
7262 * python/py-framefilter.c (enumerate_args): Use
7263 gdb::unique_xmalloc_ptr.
7264
7265 2018-03-26 Tom Tromey <tom@tromey.com>
7266
7267 * python/py-framefilter.c (py_print_frame): Return
7268 EXT_LANG_BT_OK.
7269 (gdbpy_apply_frame_filter): Update comment.
7270 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7271 Remove.
7272 <EXT_LANG_BT_NO_FILTERS>: Change value.
7273
7274 2018-03-26 Tom Tromey <tom@tromey.com>
7275
7276 PR backtrace/15582:
7277 * stack.c (backtrace_command): Parse "hide" argument.
7278 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7279 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7280 constant.
7281
7282 2018-03-26 Tom Tromey <tom@tromey.com>
7283
7284 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7285 add "flags".
7286 (backtrace_command): Remove "fulltrace", add "flags".
7287
7288 2018-03-26 Tom Tromey <tom@tromey.com>
7289
7290 * stack.c (backtrace_command): Rewrite command line parsing.
7291
7292 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7293
7294 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7295
7296 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7297
7298 * filename-seen-cache.h: Add include guard.
7299
7300 2018-03-26 Keith Seitz <keiths@redhat.com>
7301
7302 * symfile.c (place_section): Remove "struct" from section_addr_info
7303 in comment.
7304 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7305 "struct" keyword from section_addr_info.
7306
7307 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7308
7309 * regformats/regdef.h (reg): Add constructors.
7310
7311 2018-03-25 Pedro Alves <palves@redhat.com>
7312
7313 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7314 if then/else bodies in var_func_name extraction.
7315
7316 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7317
7318 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7319 lookup_minimal_symbol() to find symbol entry.
7320 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7321
7322 2018-03-23 Keith Seitz <keiths@redhat.com>
7323
7324 PR c++/22968
7325 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7326 nested type definitions for C++, too.
7327
7328 2018-03-23 Tom Tromey <tom@tromey.com>
7329
7330 * machoread.c (struct oso_el): Add a constructor. Don't define as
7331 a typedef.
7332 (macho_register_oso): Remove.
7333 (macho_symtab_read): Take a std::vector.
7334 (oso_el_compare_name): Now a std::sort comparator.
7335 (macho_symfile_read_all_oso): Take a std::vector.
7336 (macho_symfile_read): Use std::vector. Remove cleanups.
7337
7338 2018-03-22 Tom Tromey <tom@tromey.com>
7339
7340 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7341 (record_full_goto_bookmark): Use std::string.
7342
7343 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7344
7345 PR tdep/18295
7346 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7347 a single mask.
7348
7349 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7350
7351 * rs6000-tdep.c (store_insn_p): New function.
7352 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7353 and cr_reg to their unshifted values. Use store_insn_p to
7354 match LR saves using either R1 or fdata->alloca_reg. Use
7355 store_insn_p to match CR saves. Set alloca_reg_offset
7356 when alloca_reg and framep are set. Remove lr_reg shift
7357 when assigning to fdata->lr_register.
7358
7359 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7360
7361 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7362 command line args instead of emitting a warning.
7363
7364 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7365
7366 * tracepoint.h (struct static_tracepoint_marker): Initialize
7367 fields, define default constructor, move constructor and move
7368 assignment, disable the rest.
7369 <str_id, extra>: Make std::string.
7370 (release_static_tracepoint_marker): Remove.
7371 (free_current_marker): Remove.
7372 * tracepoint.c (free_current_marker): Remove.
7373 (parse_static_tracepoint_marker_definition): Adjust to
7374 std::string, use new hex2str overload.
7375 (release_static_tracepoint_marker): Remove.
7376 (print_one_static_tracepoint_marker): Get marker by reference
7377 and adjust to std::string.
7378 (info_static_tracepoint_markers_command): Adjust to std::vector
7379 changes
7380 * target.h (static_tracepoint_marker_p): Remove typedef.
7381 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7382 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7383 bool.
7384 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7385 * target-debug.h
7386 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7387 (target_debug_print_std_vector_static_tracepoint_marker): New.
7388 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7389 to...
7390 (target_debug_print_static_tracepoint_marker_p): ... this.
7391 * target-delegates.c: Re-generate.
7392 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7393 Make std::string.
7394 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7395 (decode_static_tracepoint_spec): Adjust to std::vector.
7396 (tracepoint_print_one_detail): Adjust to std::string.
7397 (strace_marker_decode_location): Adjust to std::string.
7398 (update_static_tracepoint): Adjust to std::string, remove call
7399 to release_static_tracepoint_marker.
7400 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7401 Adjust to std::vector.
7402 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7403 (remote_static_tracepoint_markers_by_strid): Adjust to
7404 std::vector.
7405 * common/rsp-low.h (hex2str): New overload with explicit count
7406 of bytes.
7407 * common/rsp-low.c (hex2str): New overload with explicit count
7408 of bytes.
7409 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7410 (_initialize_rsp_low_selftests): Add test_hex2str test.
7411 * unittests/tracepoint-selftests.c
7412 (test_parse_static_tracepoint_marker_definition): Adjust to
7413 std::string.
7414
7415 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7416
7417 * tracepoint.c (parse_static_tracepoint_marker_definition):
7418 Consider case where the definition is followed by more
7419 definitions.
7420 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7421 tracepoint-selftests.c.
7422 * unittests/tracepoint-selftests.c: New.
7423
7424 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7425
7426 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7427 Carvalho.
7428
7429 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7430
7431 * symtab.c (find_pc_sect_line): fixed indentation.
7432
7433 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7434
7435 * symtab.c (find_pc_sect_line): now uses binary search.
7436
7437 2018-03-19 Tom Tromey <tom@tromey.com>
7438
7439 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7440 "IDENT" production.
7441
7442 2018-03-19 Pedro Alves <palves@redhat.com>
7443 Tom Tromey <tom@tromey.com>
7444
7445 * unittests/observable-selftests.c: New file.
7446 * common/observable.h: New file.
7447 * observable.h: New file.
7448 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7449 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7450 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7451 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7452 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7453 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7454 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7455 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7456 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7457 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7458 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7459 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7460 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7461 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7462 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7463 tui/tui-interp.c, valops.c: Update all users.
7464 * tui/tui-hooks.c (tui_bp_created_observer)
7465 (tui_bp_deleted_observer, tui_bp_modified_observer)
7466 (tui_inferior_exit_observer, tui_before_prompt_observer)
7467 (tui_normal_stop_observer, tui_register_changed_observer):
7468 Remove.
7469 (tui_observers_token): New global.
7470 (attach_or_detach, tui_attach_detach_observers): New functions.
7471 (tui_install_hooks, tui_remove_hooks): Use
7472 tui_attach_detach_observers.
7473 * record-btrace.c (record_btrace_thread_observer): Remove.
7474 (record_btrace_thread_observer_token): New global.
7475 * observer.sh: Remove.
7476 * observer.c: Rename to observable.c.
7477 * observable.c (namespace gdb_observers): Define new objects.
7478 (observer_debug): Move into gdb_observers namespace.
7479 (struct observer, struct observer_list, xalloc_observer_list_node)
7480 (xfree_observer_list_node, generic_observer_attach)
7481 (generic_observer_detach, generic_observer_notify): Remove.
7482 (_initialize_observer): Update.
7483 Don't include observer.inc.
7484 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7485 (clean mostlyclean): Likewise.
7486 (observer.h, observer.inc): Remove targets.
7487 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7488 (COMMON_SFILES): Use observable.c, not observer.c.
7489 * .gitignore: Remove observer.h.
7490
7491 2018-03-18 Tom Tromey <tom@tromey.com>
7492
7493 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7494 gdb::def_vector.
7495 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7496
7497 2018-03-17 Tom Tromey <tom@tromey.com>
7498
7499 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7500
7501 2018-03-17 Tom Tromey <tom@tromey.com>
7502
7503 * target.c (class scoped_target_fd): New.
7504 (target_fileio_close_cleanup): Remove.
7505 (target_fileio_read_alloc_1): Use scoped_target_fd.
7506
7507 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7508
7509 * silent-rules.mk: New.
7510 * Makefile.in: Include silent-rules.mk
7511 (srcdir, VPATH, top_srcdir): Move up.
7512 (COMPILE): Add ECHO_CXX.
7513 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7514 (init.c): Add ECHO_INIT_C.
7515 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7516 (version.c): Add ECHO_GEN.
7517 (printcmd.o): Add ECHO_CXX.
7518 (target-float.o): Add ECHO_CXX.
7519 (ada-exp.o): Add ECHO_CXX.
7520 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7521 (insight$(EXEEXT)): Add ECHO_CXXLD.
7522 * gnulib/configure.ac: Add AM_SILENT_RULES.
7523 * gnulib/aclocal.m4: Re-generate.
7524 * gnulib/configure: Re-generate.
7525 * gnulib/import/Makefile.in: Re-generate.
7526
7527 2018-03-16 Tom Tromey <tom@tromey.com>
7528
7529 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7530 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7531 * utils.c (do_free_section_addr_info)
7532 (make_cleanup_free_section_addr_info): Remove.
7533 * symfile.h (struct other_sections): Add constructor.
7534 (struct section_addr_info): Remove.
7535 (section_addr_info): New typedef.
7536 (struct sym_fns) <sym_offsets>: Change type of parameter.
7537 (build_section_addr_info_from_objfile)
7538 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7539 (default_symfile_offsets, symbol_file_add)
7540 (symbol_file_add_from_bfd)
7541 (build_section_addr_info_from_section_table): Update.
7542 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7543 * symfile.c (alloc_section_addr_info): Remove.
7544 (build_section_addr_info_from_section_table): Change return type.
7545 Update.
7546 (build_section_addr_info_from_bfd)
7547 (build_section_addr_info_from_objfile): Likewise.
7548 (free_section_addr_info): Remove.
7549 (relative_addr_info_to_section_offsets): Change type of "addrs".
7550 (addrs_section_compar): Now a std::sort comparator.
7551 (addrs_section_sort): Change return type.
7552 (addr_info_make_relative): Change type of "addrs". Update.
7553 (default_symfile_offsets, syms_from_objfile_1)
7554 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7555 (symbol_file_add_separate): Update.
7556 (symbol_file_add): Change type of "addrs". Update.
7557 (add_symbol_file_command): Update. Remove cleanups.
7558 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7559 cleanups.
7560 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7561 * solib.c (solib_read_symbols): Update.
7562 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7563 * machoread.c (macho_symfile_offsets): Update.
7564 * jit.c (jit_bfd_try_read_symtab): Update.
7565
7566 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7567
7568 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7569 unittests/utils-selftests.c.
7570 * unittests/utils-selftests.c: New file.
7571
7572 2018-03-14 Tom Tromey <tom@tromey.com>
7573
7574 PR cli/14977:
7575 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7576 for NULL.
7577
7578 2018-03-14 Tom Tromey <tom@tromey.com>
7579
7580 PR cli/19918:
7581 * printcmd.c (printf_pointer): Allow "-" in format.
7582
7583 2018-03-14 Tom Tromey <tom@tromey.com>
7584
7585 * printcmd.c (_initialize_printcmd): Add usage to printf.
7586
7587 2018-03-14 Yao Qi <qiyao@sourceware.org>
7588
7589 * MAINTAINERS: Update my email address.
7590
7591 2018-03-13 Tom Tromey <tom@tromey.com>
7592
7593 * machoread.c (macho_check_dsym): Change filenamep to a
7594 std::string*.
7595 (macho_symfile_read): Update.
7596 * symfile.c (load_command): Use std::string.
7597
7598 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7599
7600 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7601 to error message string.
7602 (riscv_register_name): Use xsnprintf instead of sprintf.
7603 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7604 internal_error.
7605 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7606 error.
7607 (riscv_push_dummy_call): Likewise.
7608
7609 2018-03-12 Tom Tromey <tom@tromey.com>
7610
7611 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7612 Use gdb::byte_vector.
7613 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7614
7615 2018-03-12 Yao Qi <yao.qi@linaro.org>
7616
7617 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7618 parameter type to readable_regcache.
7619 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7620 the declaration.
7621
7622 2018-03-11 Tom Tromey <tom@tromey.com>
7623
7624 * dwarf2read.c (struct nextfield): Add initializers.
7625 (struct nextfnfield): Remove.
7626 (struct fnfieldlist): Add initializers. Remove "length" and
7627 "head", use std::vector.
7628 (struct decl_field_list): Remove.
7629 (struct field_info): Add initializers.
7630 <fields, baseclasses>: Now std::vector.
7631 <nbaseclasses, nfnfields, typedef_field_list_count,
7632 nested_types_list_count>: Remove.
7633 (dwarf2_add_field, dwarf2_add_type_defn)
7634 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7635 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7636 (process_structure_scope): Update.
7637
7638 2018-03-11 Tom Tromey <tom@tromey.com>
7639
7640 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7641 for use by std::sort.
7642 (build_type_psymtabs_1): Use std::vector.
7643
7644 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7645
7646 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7647 and LIBMPFR in the printed configuration.
7648
7649 2018-03-08 Tom Tromey <tom@tromey.com>
7650
7651 * source.c (get_filename_and_charpos): Use scoped_fd.
7652 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7653 (procfs_pidlist): Likewise.
7654 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7655 (iterate_over_mappings): Likewise.
7656
7657 2018-03-08 Tom Tromey <tom@tromey.com>
7658
7659 * infcall.c (struct call_return_meta_info)
7660 <stack_temporaries_enabled>: Remove.
7661 (get_call_return_value, call_function_by_hand_dummy): Update.
7662 * thread.c (disable_thread_stack_temporaries): Remove.
7663 (enable_thread_stack_temporaries): Remove.
7664 (thread_stack_temporaries_enabled_p): Return bool.
7665 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7666 (get_last_thread_stack_temporary): Update.
7667 * eval.c (evaluate_subexp): Update.
7668 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7669 class, not a function.
7670 (value_ptr, value_vec): Remove typedefs.
7671 (class thread_info) <stack_temporaries_enabled>: Now bool.
7672 <stack_temporaries>: Now a std::vector.
7673 (thread_stack_temporaries_enabled_p)
7674 (value_in_thread_stack_temporaries): Return bool.
7675
7676 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7677
7678 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7679 (getpkt_or_notif_sane_1): Likewise.
7680
7681 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7682
7683 * build-id.c (build_id_to_debug_bfd): Use std::string.
7684
7685 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7686
7687 * build-id.c (find_separate_debug_file_by_buildid): Return
7688 std::string.
7689 * build-id.h (find_separate_debug_file_by_buildid): Return
7690 std::string.
7691 * coffread.c (coff_symfile_read): Adjust to std::string.
7692 * elfread.c (elf_symfile_read): Adjust to std::string.
7693 * symfile.c (separate_debug_file_exists): Change parameter to
7694 std::string.
7695 (find_separate_debug_file): Return std::string.
7696 (find_separate_debug_file_by_debuglink): Return std::string.
7697 * symfile.h (find_separate_debug_file_by_debuglink): Return
7698 std::string.
7699
7700 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7701
7702 * common/xml-utils.c (xml_escape_text): Move code to...
7703 (xml_escape_text_append): ... this new function.
7704 * common/xml-utils.h (xml_escape_text_append): New declaration.
7705 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7706 New function.
7707 (_initialize_xml_utils): register test_xml_escape_text_append as
7708 a selftest.
7709
7710 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7711
7712 * defs.h: Remove MAX_REGISTER_SIZE.
7713 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7714 asserts.
7715 * python/py-unwind.c (pyuw_sniffer): Likewise.
7716
7717 2018-03-07 Tom Tromey <tom@tromey.com>
7718
7719 * linux-tdep.c (linux_info_proc): Update.
7720 * target.h (struct target_ops) <to_fileio_readlink>: Return
7721 optional<string>.
7722 (target_fileio_readlink): Return optional<string>.
7723 * remote.c (remote_hostio_readlink): Return optional<string>.
7724 * inf-child.c (inf_child_fileio_readlink): Return
7725 optional<string>.
7726 * target.c (target_fileio_readlink): Return optional<string>.
7727
7728 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7729
7730 * regcache.c (cooked_read_test): Add riscv to the list of
7731 architectures that have a save_reggroup.
7732
7733 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7734
7735 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7736 value is not a dynamic class object.
7737
7738 2018-03-06 Tom Tromey <tom@tromey.com>
7739
7740 * rust-exp.y: Formatting fixes.
7741
7742 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7743
7744 * riscv-tdep.c (riscv_register_name): Remove target description
7745 support.
7746 (riscv_gdbarch_init): Remove target description check.
7747
7748 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7749
7750 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7751 comment.
7752 * riscv-tdep.h: Likewise.
7753
7754 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7755
7756 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7757 (riscv_pseudo_register_write): Delete.
7758 (riscv_gdbarch_init): Remove all use of pseudo registers.
7759
7760 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7761
7762 * record-btrace.c (btrace_print_lines): Replace cleanup
7763 parameter with RAII equivalents.
7764 (btrace_insn_history): Replace cleanup with RAII equivalents.
7765 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7766 make_cleanup_ui_out_tuple_begin_end): Remove.
7767 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7768 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7769 make_cleanup_ui_out_list_begin_end): Remove.
7770
7771 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7772
7773 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7774 parameter types to std::vector. Use bool.
7775 (record_btrace_wait): Replace VEC(tp_t) with
7776 std::vector<thread_info *>.
7777 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7778
7779 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7780
7781 * record-btrace.c (record_btrace_disable_callback): Remove.
7782 (struct scoped_btrace_disable): New.
7783 (record_btrace_open): Use scoped_btrace_disable.
7784
7785 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7786
7787 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7788 reading values from registers.
7789
7790 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7791
7792 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7793 where appropriate.
7794
7795 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7796
7797 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7798 change parameter type. Use GDB's print functions, and use
7799 core_addr_to_string where appropriate.
7800 (riscv_push_dummy_call): Use core_addr_to_string where
7801 appropriate, update call to riscv_print_arg_location, and reindent
7802 a few lines.
7803 (riscv_return_value): Update call to riscv_print_arg_location.
7804
7805 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7806 Tim Newsome <tim@sifive.com>
7807 Albert Ou <a0u@eecs.berkeley.edu>
7808 Darius Rad <darius@bluespec.com>
7809
7810 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7811 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7812 (ALLDEPFILES): Add riscv-tdep.c
7813 * configure.tgt: Add riscv support.
7814 * riscv-tdep.c: New file.
7815 * riscv-tdep.h: New file.
7816 * NEWS: Mention new target.
7817 * MAINTAINERS: Add entry for riscv.
7818
7819 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7820
7821 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7822 fields within aggregates.
7823
7824 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7825
7826 * record-btrace.c (btrace_print_lines): Change type of flags to
7827 gdb_disassembly_flags.
7828
7829 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7830
7831 * fbsd-nat.c: Include "inf-ptrace.h".
7832 (USE_SIGTRAP_SIGINFO): Conditionally define.
7833 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7834 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7835 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7836 function.
7837 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7838 Likewise.
7839 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7840 Likewise.
7841 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7842 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7843 "supports_stopped_by_hw_breakpoint" target methods.
7844
7845 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7846
7847 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7848 * fbsd-nat.c (debug_fbsd_nat): New variable.
7849 (show_fbsd_nat_debug): New function.
7850 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7851 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7852
7853 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7854
7855 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7856 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7857 prototype.
7858 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7859 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7860 method.
7861
7862 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7863
7864 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7865 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7866
7867 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7868
7869 * charset.c (struct charset_vector): New.
7870 (charsets): Change type to charset_vector.
7871 (find_charset_names): Adjust.
7872 (add_one): Adjust.
7873 (_initialize_charset): Adjust.
7874
7875 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7876
7877 * progspace.h (struct program_space) <deleted_solibs>: Change
7878 type to std::vector<std::string>.
7879 * progspace.c (clear_program_space_solib_cache): Adjust.
7880 * breakpoint.c (print_solib_event): Adjust.
7881 (check_status_catch_solib): Adjust.
7882 * solib.c (update_solib_list): Adjust.
7883 * ui-out.h (class ui_out) <field_string>: New overload.
7884 * ui-out.c (ui_out::field_string): New overload.
7885
7886 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7887
7888 * progspace.h (struct program_space): Add constructor and
7889 destructor, initialize fields.
7890 (add_program_space): Remove.
7891 * progspace.c (add_program_space): Rename to...
7892 (program_space::program_space): ... this.
7893 (release_program_space): Rename to...
7894 (program_space::~program_space): ... this.
7895 (delete_program_space): Use delete to delete program_space.
7896 (initialize_progspace): Use new to allocate program_space.
7897 * inferior.c (add_inferior_with_spaces): Likewise.
7898 (clone_inferior_command): Likewise.
7899 * infrun.c (follow_fork_inferior): Likewise.
7900 (handle_vfork_child_exec_or_exit): Likewise.
7901
7902 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7903
7904 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7905 (delim_string_to_char_ptr_vec): Return std::vector of
7906 gdb::unique_xmalloc_ptr.
7907 (dirnames_to_char_ptr_vec_append): Take std::vector of
7908 gdb::unique_xmalloc_ptr.
7909 (dirnames_to_char_ptr_vec): Return std::vector of
7910 gdb::unique_xmalloc_ptr.
7911 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7912 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7913 (delim_string_to_char_ptr_vec): Return an std::vector of
7914 gdb::unique_xmalloc_ptr, adjust the code.
7915 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7916 gdb::unique_xmalloc_ptr, adjust the code.
7917 (dirnames_to_char_ptr_vec): Return an std::vector of
7918 gdb::unique_xmalloc_ptr, adjust the code.
7919 * auto-load.c (auto_load_safe_path_vec): Change type to
7920 std::vector of gdb::unique_xmalloc_ptr.
7921 (auto_load_expand_dir_vars): Return an std::vector of
7922 gdb::unique_xmalloc_ptr, adjust the code.
7923 (auto_load_safe_path_vec_update): Adjust.
7924 (filename_is_in_auto_load_safe_path_vec): Adjust.
7925 (auto_load_objfile_script_1): Adjust.
7926 * build-id.c (build_id_to_debug_bfd): Adjust.
7927 * linux-thread-db.c (thread_db_load_search): Adjust.
7928 * source.c (add_path): Adjust.
7929 (openp): Adjust.
7930 * symfile.c (find_separate_debug_file): Adjust.
7931 * utils.c (do_free_char_ptr_vec): Remove.
7932 (make_cleanup_free_char_ptr_vec): Remove.
7933
7934 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7935
7936 PR gdb/22907
7937 * common/pathstuff.c: Conditionally include "<windows.h>".
7938
7939 2018-03-01 Georg Sauthoff <mail@georg.so>
7940
7941 PR gdb/22888
7942 * gcore.in: Quote variables and switch interpreter to bash.
7943
7944 2018-03-01 Tom Tromey <tom@tromey.com>
7945
7946 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7947 assertion. Add assertion for discriminant_index.
7948 (quirk_rust_enum): Use correct base type name in univariant case.
7949
7950 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7951
7952 * record.c (get_call_history_modifiers): Return a
7953 record_print_flags.
7954 (cmd_record_call_history): Adjust.
7955 * record-btrace.c (record_btrace_call_history): Adjust.
7956 (record_btrace_call_history_range): Adjust.
7957 (record_btrace_call_history_from): Adjust.
7958 * target-debug.h (target_debug_print_record_print_flags): New.
7959 * target-delegates.c: Re-generate.
7960 * target.c (target_call_history): Change flags type.
7961 (target_call_history_from): Likewise.
7962 (target_call_history_range): Likewise.
7963 * target.h (struct target_ops) <target_call_history>: Likewise.
7964 (target_call_history_from): Likewise.
7965 (target_call_history_range): Likewise.
7966
7967 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7968 Simon Marchi <simon.marchi@polymtl.ca>
7969
7970 * common/common-utils.c: Include "sys/stat.h".
7971 (is_regular_file): Move here from "source.c"; change return
7972 type to "bool".
7973 * common/common-utils.h (is_regular_file): New prototype.
7974 * common/pathstuff.c (contains_dir_separator): New function.
7975 * common/pathstuff.h (contains_dir_separator): New prototype.
7976 * source.c: Don't include "sys/stat.h".
7977 (is_regular_file): Move to "common/common-utils.c".
7978
7979 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7980
7981 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7982 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7983 * auto-load.c: Include "common/pathstuff.h".
7984 * common/common-def.h (current_directory): Move here.
7985 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7986 function.
7987 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7988 prototype.
7989 * common/pathstuff.c: New file.
7990 * common/pathstuff.h: New file.
7991 * compile/compile.c: Include "common/pathstuff.h".
7992 * defs.h (current_directory): Move to "common/common-defs.h".
7993 * dwarf2read.c: Include "common/pathstuff.h".
7994 * exec.c: Likewise.
7995 * guile/scm-safe-call.c: Likewise.
7996 * linux-thread-db.c: Likewise.
7997 * main.c: Likewise.
7998 * nto-tdep.c: Likewise.
7999 * objfiles.c: Likewise.
8000 * source.c: Likewise.
8001 * symtab.c: Likewise.
8002 * utils.c: Include "common/pathstuff.h".
8003 (gdb_realpath): Move to "common/pathstuff.c".
8004 (gdb_realpath_keepfile): Likewise.
8005 (gdb_abspath): Likewise.
8006 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8007 (gdb_realpath_keepfile): Likewise.
8008 (gdb_abspath): Likewise.
8009
8010 2018-02-28 John Baldwin <jhb@FreeBSD.org>
8011
8012 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8013 wildcard process pid for super_resume for kernels with a
8014 specific bug.
8015
8016 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
8017
8018 * compile/compile.c (get_args): Add additional comments
8019 explaining function.
8020
8021 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
8022 Tom Tromey <tom@tromey.com>
8023
8024 * target.h (memory_write_request_s): Remove typedef. Don't define
8025 VEC.
8026 (target_write_memory_blocks): Change argument to std::vector.
8027 (struct memory_write_request): Add constructor.
8028 * target-memory.c (compare_block_starting_address): Return bool.
8029 Change argument types.
8030 (claim_memory): Change arguments to use std::vector.
8031 (split_regular_and_flash_blocks, blocks_to_erase)
8032 (compute_garbled_blocks): Likewise.
8033 (cleanup_request_data, cleanup_write_requests_vector): Remove.
8034 (target_write_memory_blocks): Change argument to std::vector.
8035 * symfile.c (struct load_section_data): Add constructor and
8036 destructor. Use std::vector for "requests".
8037 (struct load_progress_data): Add initializers.
8038 (load_section_callback): Update. Use "new".
8039 (clear_memory_write_data): Remove.
8040 (generic_load): Update.
8041
8042 2018-02-27 Alan Hayward <alan.hayward@arm.com>
8043
8044 * arch/aarch64.h: Use common/tdesc.h.
8045
8046 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8047
8048 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8049 architecture with a 64-bit ABI.
8050
8051 2018-02-26 Maciej W. Rozycki <macro@mips.com>
8052
8053 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8054 ahead of target description loading.
8055
8056 2018-02-26 Tom Tromey <tom@tromey.com>
8057
8058 * stack.c (backtrace_command_1): Update.
8059 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8060 of "flags".
8061 * python/py-framefilter.c (py_print_frame)
8062 (gdbpy_apply_frame_filter): Change type of "flags".
8063 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8064 of "flags".
8065 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8066 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8067 * extension.h (enum frame_filter_flag): Rename from
8068 frame_filter_flags.
8069 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8070 (apply_ext_lang_frame_filter): Change type of "flags".
8071 * extension.c (apply_ext_lang_frame_filter): Change type of
8072 "flags".
8073 * extension-priv.h (struct extension_language_ops)
8074 <apply_frame_filter>: Change type of "flags".
8075
8076 2018-02-26 Tom Tromey <tom@tromey.com>
8077
8078 PR python/16497:
8079 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
8080 off-by-one in py_end computation.
8081 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8082 PRINT_MORE_FRAMES.
8083 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8084 constant.
8085
8086 2018-02-26 Tom Tromey <tom@tromey.com>
8087
8088 * dwarf2read.c (struct variant_field): New.
8089 (struct nextfield) <variant>: New field.
8090 (dwarf2_add_field): Handle DW_TAG_variant_part.
8091 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8092 discriminated union.
8093 (read_structure_type): Handle DW_TAG_variant_part.
8094 (handle_struct_member_die): New function, extracted from
8095 process_structure_scope. Handle DW_TAG_variant.
8096 (process_structure_scope): Handle discriminated unions. Call
8097 handle_struct_member_die.
8098
8099 2018-02-26 Tom Tromey <tom@tromey.com>
8100
8101 * rust-lang.h (rust_last_path_segment): Declare.
8102 * rust-lang.c (rust_last_path_segment): Now public. Change
8103 contract.
8104 (struct disr_info): Remove.
8105 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8106 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8107 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8108 (rust_enum_p, rust_enum_variant): New function.
8109 (rust_underscore_fields): Remove "offset" parameter.
8110 (rust_print_enum): New function.
8111 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8112 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8113 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
8114 enums.
8115 (rust_internal_print_type): New function, from rust_print_type.
8116 Remove enum code.
8117 (rust_print_type): Call rust_internal_print_type.
8118 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8119 Update enum handling.
8120 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8121 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8122 (rust_union_quirks): New functions.
8123 (process_full_comp_unit, process_full_type_unit): Call
8124 rust_union_quirks.
8125 (process_structure_scope): Update rust_unions if necessary.
8126
8127 2018-02-26 Tom Tromey <tom@tromey.com>
8128
8129 * value.h (value_union_variant): Declare.
8130 * valops.c (value_union_variant): New function.
8131 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8132 (struct discriminant_info): New.
8133 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8134 enumerator.
8135 (struct main_type) <flag_discriminated_union>: New field.
8136
8137 2018-02-26 Tom Tromey <tom@tromey.com>
8138
8139 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8140 unittests/unpack-selftests.c.
8141 * unittests/unpack-selftests.c: New file.
8142 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8143
8144 2018-02-26 Yao Qi <yao.qi@linaro.org>
8145
8146 * dwarf2read.c (struct partial_die_info) <read>: New method.
8147 (read_partial_die): Remove the declaration.
8148 (load_partial_dies): Update.
8149 (partial_die_info::partial_die_info):
8150 (read_partial_die): Change it to partial_die_info::read.
8151
8152 2018-02-26 Yao Qi <yao.qi@linaro.org>
8153
8154 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8155 (fixup_partial_die): Remove declaration.
8156 (scan_partial_symbols): Update.
8157 (partial_die_parent_scope): Likewise.
8158 (partial_die_full_name): Likewise.
8159 (fixup_partial_die): Change it to partial_die_info::fixup.
8160
8161 2018-02-26 Yao Qi <yao.qi@linaro.org>
8162
8163 * dwarf2read.c (read_partial_die): Update the declaration.
8164 (load_partial_dies): Caller update.
8165 (read_partial_die): Remove one argument abbrev_len.
8166
8167 2018-02-26 Yao Qi <yao.qi@linaro.org>
8168
8169 * dwarf2read.c (struct partial_die_info): Add ctor, delete
8170 assignment operator.
8171 (load_partial_dies): Use ctor and copy ctor.
8172 (read_partial_die): Update.
8173 (dwarf2_cu::find_partial_die): Use ctor.
8174
8175 2018-02-26 Yao Qi <yao.qi@linaro.org>
8176
8177 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8178 (find_partial_die_in_comp_unit): Change it to
8179 dwarf2_cu::find_partial_die.
8180 (find_partial_die): Update.
8181
8182 2018-02-26 Yao Qi <yao.qi@linaro.org>
8183
8184 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8185 is NULL.
8186
8187 2018-02-26 Yao Qi <yao.qi@linaro.org>
8188
8189 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8190
8191 2018-02-26 Alan Hayward <alan.hayward@arm.com>
8192
8193 * arch/amd64.h: Use common/tdesc.h.
8194 * arch/i386.c: Likewise.
8195 * arch/i386.h: Likewise.
8196 * arch/tic6x.c: Likewise.
8197 * arch/tdesc.h: Move file from here...
8198 * common/tdesc.h: ...to here.
8199 * features/aarch64-core.c: Regenerate.
8200 * features/aarch64-fpu.c: Regenerate.
8201 * features/i386/32bit-avx.c: Regenerate.
8202 * features/i386/32bit-avx512.c: Regenerate.
8203 * features/i386/32bit-core.c: Regenerate.
8204 * features/i386/32bit-linux.c: Regenerate.
8205 * features/i386/32bit-mpx.c: Regenerate.
8206 * features/i386/32bit-pkeys.c: Regenerate.
8207 * features/i386/32bit-sse.c: Regenerate.
8208 * features/i386/64bit-avx.c: Regenerate.
8209 * features/i386/64bit-avx512.c: Regenerate.
8210 * features/i386/64bit-core.c: Regenerate.
8211 * features/i386/64bit-linux.c: Regenerate.
8212 * features/i386/64bit-mpx.c: Regenerate.
8213 * features/i386/64bit-pkeys.c: Regenerate.
8214 * features/i386/64bit-segments.c: Regenerate.
8215 * features/i386/64bit-sse.c: Regenerate.
8216 * features/i386/x32-core.c: Regenerate.
8217 * features/tic6x-c6xp.c: Regenerate.
8218 * features/tic6x-core.c: Regenerate.
8219 * features/tic6x-gp.c: Regenerate.
8220 * target-descriptions.c: Use common/tdesc.h.
8221 * target-descriptions.h: Likewise.
8222
8223 2018-02-24 Tom Tromey <tom@tromey.com>
8224
8225 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8226 (try_thread_db_load_from_dir, thread_db_load_search): Use
8227 std::string.
8228 (info_auto_load_libthread_db_compare): Return bool. Change
8229 argument types.
8230 (info_auto_load_libthread_db): Use std::vector, std::string.
8231 Remove cleanups.
8232
8233 2018-02-24 Tom Tromey <tom@tromey.com>
8234
8235 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8236 std::string.
8237 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8238 std::string*.
8239 * gdbarch.c: Rebuild.
8240 * gdbarch.h: Rebuild.
8241 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8242 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8243 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8244 std::string*.
8245
8246 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
8247
8248 * gdbtypes.h (sect_offset): Change type to uint64_t.
8249 (sect_offset_str): New function.
8250 * dwarf2read.c (create_addrmap_from_aranges): Use
8251 sect_offset_str.
8252 (error_check_comp_unit_head): Likewise.
8253 (create_debug_type_hash_table): Likewise.
8254 (read_cutu_die_from_dwo): Likewise.
8255 (init_cutu_and_read_dies): Likewise.
8256 (init_cutu_and_read_dies_no_follow): Likewise.
8257 (process_psymtab_comp_unit_reader): Likewise.
8258 (partial_die_parent_scope): Likewise.
8259 (peek_die_abbrev): Likewise.
8260 (process_queue): Likewise.
8261 (dwarf2_physname): Likewise.
8262 (read_namespace_alias): Likewise.
8263 (read_import_statement): Likewise.
8264 (create_dwo_cu_reader): Likewise.
8265 (create_cus_hash_table): Likewise.
8266 (lookup_dwo_cutu): Likewise.
8267 (inherit_abstract_dies): Likewise.
8268 (read_func_scope): Likewise.
8269 (read_call_site_scope): Likewise.
8270 (dwarf2_add_member_fn): Likewise.
8271 (read_common_block): Likewise.
8272 (read_module_type): Likewise.
8273 (read_typedef): Likewise.
8274 (read_subrange_type): Likewise.
8275 (load_partial_dies): Likewise.
8276 (read_partial_die): Likewise.
8277 (find_partial_die): Likewise.
8278 (read_str_index): Likewise.
8279 (dwarf2_string_attr): Likewise.
8280 (build_error_marker_type): Likewise.
8281 (lookup_die_type): Likewise.
8282 (dump_die_shallow): Likewise.
8283 (follow_die_ref): Likewise.
8284 (dwarf2_fetch_die_loc_sect_off): Likewise.
8285 (dwarf2_fetch_constant_bytes): Likewise.
8286 (follow_die_sig): Likewise.
8287 (get_signatured_type): Likewise.
8288 (get_DW_AT_signature_type): Likewise.
8289 (dwarf2_find_containing_comp_unit): Likewise.
8290 (set_die_type): Likewise.
8291
8292 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8293
8294 * arch/aarch64.c: Include "common-defs.h".
8295 * arch/amd64.c: Likewise.
8296 * arch/i386.c: Likewise.
8297
8298 2018-02-21 Tom Tromey <tom@tromey.com>
8299
8300 * value.h: (extract_field_op): Update.
8301 * eval.c (extract_field_op): Return a const char *.
8302 * expression.h (parse_expression_for_completion): Update.
8303 * completer.c (complete_expression): Update.
8304 (add_struct_fields): Make fieldname const.
8305 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8306 (mark_completion_tag, parse_exp_in_context_1): Update.
8307 (parse_expression_for_completion): Change "name" to
8308 unique_xmalloc_ptr*.
8309
8310 2018-02-21 Tom Tromey <tom@tromey.com>
8311
8312 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8313
8314 2018-02-21 Yao Qi <yao.qi@linaro.org>
8315
8316 * avr-tdep.c (avr_read_pc): Change parameter type to
8317 readable_regcache.
8318 * gdbarch.sh (read_pc): Likewise.
8319 * gdbarch.c: Re-generated.
8320 * gdbarch.h: Re-generated.
8321 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8322 readable_regcache.
8323 * ia64-tdep.c (ia64_read_pc): Likewise.
8324 * mips-tdep.c (mips_read_pc): Likewise.
8325 * spu-tdep.c (spu_read_pc): Likewise.
8326
8327 2018-02-21 Yao Qi <yao.qi@linaro.org>
8328
8329 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8330 * regcache-dump.c: New file.
8331 * regcache.c: Move register_dump to regcache-dump.c.
8332 (maintenance_print_registers): Likewise.
8333 (maintenance_print_raw_registers): Likewise.
8334 (maintenance_print_cooked_registers): Likewise.
8335 (maintenance_print_register_groups): Likewise.
8336 (maintenance_print_remote_registers): Likewise.
8337 (_initialize_regcache): Likewise.
8338 * regcache.h (register_dump): Moved from regcache.c.
8339
8340 2018-02-21 Yao Qi <yao.qi@linaro.org>
8341
8342 * regcache.c (regcache::regcache): Update.
8343 (regcache::invalidate): Move it to detached_regcache::invalidate.
8344 (get_thread_arch_aspace_regcache): Update.
8345 (regcache::raw_update): Update.
8346 (regcache::cooked_read): Remove some code.
8347 (regcache::cooked_read_value): Likewise.
8348 (regcache::raw_write): Remove assert on m_readonly_p.
8349 (regcache::raw_supply_integer): Move it to
8350 detached_regcache::raw_supply_integer.
8351 (regcache::raw_supply_zeroed): Likewise.
8352 * regcache.h (detached_regcache) <raw_supply_integer>: New
8353 declaration.
8354 <raw_supply_zeroed, invalidate>: Likewise.
8355 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8356 <invalidate>: Likewise.
8357 <m_readonly_p>: Removed.
8358
8359 2018-02-21 Yao Qi <yao.qi@linaro.org>
8360
8361 * infcmd.c (get_return_value): Let stop_regs point to
8362 get_current_regcache.
8363 * regcache.c (regcache::regcache): Remove.
8364 (register_dump_reg_buffer): New class.
8365 (regcache_print): Adjust.
8366 * regcache.h (regcache): Remove constructors.
8367
8368 2018-02-21 Yao Qi <yao.qi@linaro.org>
8369
8370 * regcache.c (class register_dump): New class.
8371 (register_dump_regcache, register_dump_none): New class.
8372 (register_dump_remote, register_dump_groups): New class.
8373 (regcache_print): Update.
8374 * regcache.h (regcache_dump_what): Move it to regcache.c.
8375 (regcache) <dump>: Remove.
8376
8377 2018-02-21 Yao Qi <yao.qi@linaro.org>
8378
8379 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8380 reg_buffer_rw *.
8381 (jit_unwind_reg_set_impl): Call raw_supply.
8382 (jit_frame_sniffer): Use reg_buffer_rw.
8383 * record-full.c (record_full_core_regbuf): Change its type.
8384 (record_full_core_open_1): Use reg_buffer_rw.
8385 (record_full_close): Likewise.
8386 (record_full_core_fetch_registers): Use regcache->raw_supply.
8387 (record_full_core_store_registers): Likewise.
8388 * regcache.c (regcache::get_register_status): Move it to
8389 reg_buffer.
8390 (regcache_raw_set_cached_value): Remove.
8391 (regcache::raw_set_cached_value): Remove.
8392 (regcache::raw_write): Call raw_supply.
8393 (regcache::raw_supply): Move it to reg_buffer_rw.
8394 * regcache.h (regcache_raw_set_cached_value): Remove.
8395 (reg_buffer_rw): New class.
8396
8397 2018-02-21 Yao Qi <yao.qi@linaro.org>
8398
8399 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8400 readonly_detached_regcache.
8401 (dummy_frame_prev_register): Use regcache->cooked_read.
8402 * frame.c (frame_save_as_regcache): Change return type.
8403 (frame_pop): Update.
8404 * frame.h (frame_save_as_regcache): Update declaration.
8405 * inferior.h (get_infcall_suspend_state_regcache): Update
8406 declaration.
8407 * infrun.c (infcall_suspend_state) <registers>: use
8408 readonly_detached_regcache.
8409 (save_infcall_suspend_state): Don't use regcache_dup.
8410 (get_infcall_suspend_state_regcache): Change return type.
8411 * linux-fork.c (struct fork_info) <savedregs>: Change to
8412 readonly_detached_regcache.
8413 <pc>: New field.
8414 (fork_save_infrun_state): Don't use regcache_dup.
8415 (info_checkpoints_command): Adjust.
8416 * mi/mi-main.c (register_changed_p): Update declaration.
8417 (mi_cmd_data_list_changed_registers): Use
8418 readonly_detached_regcache.
8419 (register_changed_p): Change parameter type to
8420 readonly_detached_regcache.
8421 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8422 readonly_detached_regcache.
8423 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8424 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8425 New.
8426 (regcache::save): Move it to reg_buffer.
8427 (regcache::restore): Change parameter type.
8428 (regcache_dup): Remove.
8429 * regcache.h (reg_buffer) <save>: New method.
8430 (readonly_detached_regcache): New class.
8431 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8432 readonly_detached_regcache.
8433 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8434
8435 2018-02-21 Yao Qi <yao.qi@linaro.org>
8436
8437 * frame.c (frame_save_as_regcache): Use regcache method save.
8438 (frame_pop): Use regcache method restore.
8439 * infrun.c (restore_infcall_suspend_state): Likewise.
8440 * linux-fork.c (fork_load_infrun_state): Likewise.
8441 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8442 save.
8443 * regcache.c (regcache_save): Remove.
8444 (regcache::restore): More asserts.
8445 (regcache_cpy): Remove.
8446 * regcache.h (regcache_save): Remove the declaration.
8447 (regcache::restore): Move from private to public.
8448 Remove the friend declaration of regcache_cpy.
8449 (regcache_cpy): Remove declaration.
8450
8451 2018-02-21 Yao Qi <yao.qi@linaro.org>
8452
8453 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8454 parameter type to 'readable_regcache *'.
8455 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8456 * arm-tdep.c (arm_neon_quad_read): Likewise.
8457 (arm_pseudo_read): Likewise.
8458 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8459 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8460 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8461 * gdbarch.c: Re-generated.
8462 * gdbarch.h: Re-generated.
8463 * gdbarch.sh (pseudo_register_read): Change parameter type to
8464 'readable_regcache *'.
8465 (pseudo_register_read_value): Likewise.
8466 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8467 (h8300_pseudo_register_read): Likewise.
8468 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8469 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8470 (i386_pseudo_register_read_into_value): Likewise.
8471 (i386_pseudo_register_read_value): Likewise.
8472 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8473 declaration.
8474 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8475 * m32c-tdep.c (m32c_raw_read): Likewise.
8476 (m32c_read_flg): Likewise.
8477 (m32c_banked_register): Likewise.
8478 (m32c_banked_read): Likewise.
8479 (m32c_sb_read): Likewise.
8480 (m32c_part_read): Likewise.
8481 (m32c_cat_read): Likewise.
8482 (m32c_r3r2r1r0_read): Likewise.
8483 (m32c_pseudo_register_read): Likewise.
8484 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8485 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8486 (mep_pseudo_cr64_read): Likewise.
8487 (mep_pseudo_register_read): Likewise.
8488 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8489 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8490 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8491 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8492 (regcache::cooked_read): Likewise.
8493 (regcache::cooked_read_value): Likewise.
8494 (regcache_cooked_read_signed):
8495 (regcache::cooked_read): Likewise.
8496 * regcache.h (readable_regcache): New class.
8497 (regcache): Inherit readable_regcache. Move some methods to
8498 readable_regcache.
8499 * rl78-tdep.c (rl78_pseudo_register_read): Change
8500 parameter type to 'readable_regcache *'.
8501 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8502 (e500_pseudo_register_read): Change parameter type to
8503 'readable_regcache *'.
8504 (dfp_pseudo_register_read): Likewise.
8505 (vsx_pseudo_register_read): Likewise.
8506 (efpr_pseudo_register_read): Likewise.
8507 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8508 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8509 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8510 (sh64_pseudo_register_read): Likewise.
8511 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8512 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8513 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8514 (spu_pseudo_register_read): Likewise.
8515 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8516 (xtensa_pseudo_register_read): Likewise.
8517
8518 2018-02-21 Yao Qi <yao.qi@linaro.org>
8519
8520 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8521 (regcache::arch): Move it to reg_buffer::arch.
8522 (regcache::register_buffer): Likewise.
8523 (regcache::assert_regnum): Likewise.
8524 (regcache::num_raw_registers): Likewise.
8525 * regcache.h (reg_buffer): New class.
8526 (regcache): Inherit reg_buffer.
8527
8528 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8529
8530 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8531 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8532
8533 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8534
8535 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8536
8537 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8538
8539 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8540 (SFILES): Remove common/*.c files.
8541 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8542 * common/common.host: Add common reference.
8543 * configure.ac: Likewise.
8544 * configure: Regenerate.
8545
8546 2018-02-16 Yao Qi <yao.qi@linaro.org>
8547
8548 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8549 (block_initialize_namespace): Use new.
8550 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8551 (dwarf2_free_objfile): Use delete.
8552 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8553 (copy_type_recursive): Use new.
8554 * gdb_obstack.h (allocate_on_obstack): New.
8555
8556 2018-02-15 Yao Qi <yao.qi@linaro.org>
8557
8558 PR gdb/22849
8559 * inferior.c (exit_inferior_1): Reset inf->control.
8560
8561 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8562
8563 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8564 declaration.
8565
8566 2018-02-14 Pedro Alves <palves@redhat.com>
8567
8568 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8569 frame_cleanup_after_sniffer on exception.
8570
8571 2018-02-14 Tom Tromey <tom@tromey.com>
8572
8573 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8574 const.
8575 (solib_bfd_open): Make pathname const.
8576 * solib.c (solib_bfd_open): Make pathname const.
8577 * solib-spu.c (spu_bfd_fopen): Make name const.
8578 (spu_bfd_open): Make pathname const.
8579 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8580 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8581
8582 2018-02-14 Tom Tromey <tom@tromey.com>
8583
8584 * symfile.c (symfile_bfd_open): Update.
8585 * source.h (openp, source_full_path_of, find_and_open_source):
8586 Change argument type to unique_xmalloc_ptr.
8587 * source.c (openp): Take a unique_xmalloc_ptr.
8588 (source_full_path_of, find_and_open_source): Likewise.
8589 (open_source_file, symtab_to_fullname): Update.
8590 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8591 unique_xmalloc_ptr.
8592 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8593 (exec_file_find): Update.
8594 * psymtab.c (psymtab_to_fullname): Update.
8595 * nto-tdep.h (nto_find_and_open_solib): Update.
8596 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8597 unique_xmalloc_ptr.
8598 * exec.c (exec_file_attach): Update.
8599 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8600 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8601
8602 2018-02-14 Tom Tromey <tom@tromey.com>
8603
8604 * solib.c: Include source.h.
8605 * nto-tdep.c: Include source.h.
8606 * mi/mi-cmd-env.c: Include source.h.
8607 * infcmd.c: Include source.h.
8608 * exec.c: Include source.h.
8609 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8610 (add_path, directory_switch, source_path, init_source_path): Move
8611 declarations...
8612 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8613 (add_path, directory_switch, source_path, init_source_path):
8614 ...here.
8615
8616 2018-02-14 Tom Tromey <tom@tromey.com>
8617
8618 * solist.h (exec_file_find, solib_find): Return
8619 unique_xmalloc_ptr.
8620 (solib_bfd_fopen): Take a const char *.
8621 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8622 (exec_file_find, solib_find): Likewise.
8623 (solib_bfd_fopen): Do not take ownership of "pathname".
8624 (solib_bfd_open): Use unique_xmalloc_ptr.
8625 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8626 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8627 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8628 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8629
8630 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8631
8632 * ada-lang.c (name_match_type_from_name): Remove reference to
8633 ada_name_for_lookup in function's documentation.
8634 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8635
8636 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8637
8638 * defs.h (enum openp_flags): New enum.
8639 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8640 Move to enum openp_flags.
8641 (openp_flags): New enum flags.
8642 (openp): Change parameter type to openp_flags.
8643 * source.c (openp): Change parameter type to openp_flags.
8644 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8645 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8646
8647 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8648
8649 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8650 per-command.
8651
8652 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8653
8654 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8655 into...
8656 (class dwarf2_queue_guard): ...the destructor of this new class.
8657 (dw2_do_instantiate_symtab): Create instance of the new class
8658 dwarf2_queue_guard, remove cleanup.
8659
8660 2018-02-09 Tom Tromey <tom@tromey.com>
8661
8662 * source.c (find_source_lines): Don't reference past the end of
8663 the vector.
8664
8665 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8666
8667 * remote.c (remote_btrace_maybe_reopen): Change error message.
8668 * btrace.c (btrace_enable): Likewise.
8669 (parse_xml_btrace): Likewise.
8670 (parse_xml_btrace_conf): Likewise.
8671
8672 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8673
8674 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8675 (linux_enable_pt, linux_enable_bts): Call
8676 diagnose_perf_event_open_fail.
8677
8678 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8679
8680 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8681 Remove parameter and change return type. Update callers. Move it.
8682 (linux_enable_bts, linux_enable_pt): Improve error message.
8683 (linux_enable_pt): Remove zero buffer size check.
8684 (linux_enable_btrace): Improve error messages. Remove NULL return
8685 check.
8686
8687 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8688
8689 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8690 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8691 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8692 (linux_supports_pt, linux_supports_btrace): Remove.
8693 (linux_enable_bts): Call cpu_supports_bts.
8694 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8695 * remote.c (remote_supports_btrace): Remove.
8696 (init_remote_ops): Remove remote_supports_btrace.
8697 * target-delegates.c: Regenerated.
8698 * target.c (target_supports_btrace): Remove.
8699 * target.h (target_ops) <to_supports_btrace>: Remove
8700 (target_supports_btrace): Remove.
8701 * x86-linux-nat.c (x86_linux_create_target): Remove
8702 linux_supports_btrace.
8703
8704 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8705
8706 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8707 btrace failed.
8708 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8709 exception and use message in own exception.
8710
8711 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8712
8713 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8714 (perf_event_pt_event_type): Use gdb_file_up.
8715 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8716 scoped_fd, and scoped_mmap.
8717
8718 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8719
8720 * common/scoped_mmap.h: New.
8721 * unittests/scoped_mmap-selftest.c: New.
8722 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8723 unittests/scoped_mmap-selftest.c.
8724
8725 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8726
8727 * common/scoped_fd.h: New.
8728 * unittests/scoped_fd-selftest.c: New.
8729 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8730 unittests/scoped_fd-selftest.c.
8731
8732 2018-02-09 Tom Tromey <tom@tromey.com>
8733
8734 * auto-load.c (auto_load_section_scripts): Use
8735 gdb::unique_xmalloc_ptr.
8736
8737 2018-02-09 Tom Tromey <tom@tromey.com>
8738
8739 * auto-load.c (execute_script_contents): Use std::string.
8740
8741 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8742
8743 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8744 Python function, rather than a new command.
8745
8746 2018-02-08 Tom Tromey <tom@tromey.com>
8747
8748 * solib.c (solib_find_1): Use std::string.
8749 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8750
8751 2018-02-08 Tom Tromey <tom@tromey.com>
8752
8753 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8754
8755 2018-02-08 Tom Tromey <tom@tromey.com>
8756
8757 * source.c (find_source_lines): Use gdb::def_vector.
8758
8759 2018-02-08 Tom Tromey <tom@tromey.com>
8760
8761 * macrocmd.c (struct temporary_macro_definition): New.
8762 (macro_define_command): Use temporary_macro_definition. Remove
8763 cleanups.
8764 (free_macro_definition_ptr): Remove.
8765
8766 2018-02-08 Tom Tromey <tom@tromey.com>
8767
8768 * macroexp.c (maybe_expand): Use std::string.
8769
8770 2018-02-08 Tom Tromey <tom@tromey.com>
8771
8772 * macroexp.c (struct macro_buffer): Add initializers for some
8773 members.
8774 (init_buffer, init_shared_buffer, free_buffer)
8775 (free_buffer_return_text): Remove.
8776 (macro_buffer): New constructors.
8777 (~macro_buffer): New destructor.
8778 (macro_buffer::set_shared): New method.
8779 (macro_buffer::resize_buffer, macro_buffer::appendc)
8780 (macro_buffer::appendmem): Now methods, not free functions.
8781 (set_token, append_tokens_without_splicing, stringify)
8782 (macro_stringify): Update.
8783 (gather_arguments): Change return type. Remove argc_p argument,
8784 add args_ptr argument. Use std::vector.
8785 (substitute_args): Remove argc argument. Accept std::vector.
8786 (expand): Update. Use std::vector.
8787 (scan, macro_expand, macro_expand_next): Update.
8788
8789 2018-02-08 Tom Tromey <tom@tromey.com>
8790
8791 * symtab.c (default_collect_symbol_completion_matches_break_on):
8792 Use unique_xmalloc_ptr.
8793 * macroscope.h: (sal_macro_scope, user_macro_scope)
8794 (default_macro_scope): Return unique_xmalloc_ptr.
8795 * macroscope.c (sal_macro_scope, user_macro_scope)
8796 (default_macro_scope): Return unique_xmalloc_ptr.
8797 * macroexp.h (macro_expand, macro_expand_once): Return
8798 unique_xmalloc_ptr.
8799 * macroexp.c (macro_expand, macro_expand_once): Return
8800 unique_xmalloc_ptr.
8801 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8802 (info_macro_command, info_macros_command): Use
8803 unique_xmalloc_ptr.
8804 * compile/compile-c-support.c (write_macro_definitions): Use
8805 unique_xmalloc_ptr.
8806 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8807
8808 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8809
8810 * value.c (value_static_field): Assign field type instead of
8811 containing type when returning an optimized out value.
8812
8813 2018-02-06 Yao Qi <yao.qi@linaro.org>
8814
8815 * ft32-tdep.c (ft32_read_pc): Remove.
8816 (ft32_write_pc): Remove.
8817 (ft32_gdbarch_init): Update.
8818 * m32r-tdep.c (m32r_read_pc): Remove.
8819 (m32r_gdbarch_init): Update.
8820 * mep-tdep.c (mep_read_pc): Remove.
8821 (mep_gdbarch_init): Update.
8822 * microblaze-tdep.c (microblaze_write_pc): Remove.
8823 (microblaze_gdbarch_init): Update.
8824 * mn10300-tdep.c (mn10300_read_pc): Remove.
8825 (mn10300_write_pc): Remove.
8826 (mn10300_gdbarch_init): Update.
8827 * moxie-tdep.c (moxie_read_pc): Remove.
8828 (moxie_write_pc): Remove.
8829 (moxie_gdbarch_init): Update.
8830
8831 2018-02-06 Yao Qi <yao.qi@linaro.org>
8832
8833 * expprint.c (print_subexp_standard): Handle
8834 OP_F77_UNDETERMINED_ARGLIST.
8835 (dump_subexp_body_standard): Likewise.
8836
8837 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8838
8839 * target-descriptions.c (tdesc_element_visitor) Add empty
8840 implementations.
8841 (tdesc_type): Move make_gdb_type from here.
8842 (tdesc_type_builtin): Likewise.
8843 (tdesc_type_vector): Likewise.
8844 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8845 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8846 (make_gdb_type_union): Likewise.
8847 (make_gdb_type_flags): Likewise.
8848 (make_gdb_type_enum): Likewise.
8849 (make_gdb_type): New function.
8850 (tdesc_register_type): Use static make_gdb_type.
8851
8852 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8853
8854 * infcmd.c (default_print_one_register_info): Align natural-format
8855 column values consistently one under another.
8856 (pad_to_column): New function.
8857
8858 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8859
8860 * dwarf2read.c (dwarf2_physname): Move commment.
8861
8862 2018-02-01 Leszek Swirski <leszeks@google.com>
8863
8864 * varobj.c (varobj_formatted_print_options): Allow recursive
8865 pretty printing if pretty printing is enabled.
8866
8867 2018-02-01 Leszek Swirski <leszeks@google.com>
8868
8869 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8870 names after a structop as a filename.
8871
8872 2018-02-01 Yao Qi <yao.qi@linaro.org>
8873
8874 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8875 (arm_record_coproc_data_proc): Likewise.
8876
8877 2018-02-01 Yao Qi <yao.qi@linaro.org>
8878
8879 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8880
8881 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8882
8883 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8884 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8885
8886 2018-01-31 Pedro Alves <palves@redhat.com>
8887
8888 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8889 * inflow.c (child_terminal_save_inferior): Wrap reference to
8890 tcgetpgrp in HAVE_TERMIOS_H.
8891 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8892 _WIN32.
8893 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8894 always iterate over all inferiors.
8895 (gdbsim_cntrl_c): Adjust.
8896 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8897
8898 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8899
8900 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8901 index type is objfile-owned if the element type is as well.
8902
8903 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8904
8905 GDB 8.1 released.
8906
8907 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8908
8909 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8910 "features/s390x-linux64.c".
8911 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8912 s390_linux32 and s390x_linux64.
8913 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8914 default tdesc.
8915 * s390-tdep.c: Include "features/s390-linux32.c" and
8916 "features/s390x-linux64.c".
8917 (s390_tdesc_valid): Add check for tdesc_has_registers.
8918 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8919 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8920 tdesc_s390x_linux64.
8921 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8922 tdesc_s390x_linux64 to...
8923 * s390-tdep.h: ...here.
8924
8925 2018-01-30 Pedro Alves <palves@redhat.com>
8926
8927 PR gdb/13211
8928 * config.in, configure: Regenerate.
8929 * configure.ac: Check for getpgid.
8930 * go32-nat.c (go32_pass_ctrlc): New.
8931 (go32_target): Install it.
8932 * inf-child.c (inf_child_target): Install
8933 child_terminal_save_inferior, child_pass_ctrlc and
8934 child_interrupt.
8935 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8936 (inf_ptrace_target): No longer install it.
8937 * infcmd.c (interrupt_target_1): Adjust.
8938 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8939 (child_interrupt): Declare.
8940 (inferior::terminal_state): New.
8941 * inflow.c (struct terminal_info): Update comments.
8942 (inferior_process_group): Delete.
8943 (terminal_is_ours): Delete.
8944 (gdb_tty_state): New.
8945 (child_terminal_init): Adjust.
8946 (is_gdb_terminal, sharing_input_terminal_1)
8947 (sharing_input_terminal): New functions.
8948 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8949 Set the process's actual process group in the foreground if
8950 possible. Handle is_ours_for_output/is_ours distinction. Don't
8951 mark terminal as the inferior's if not sharing GDB's terminal.
8952 Don't check attach_flag.
8953 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8954 pass down a target_terminal_state.
8955 (child_terminal_save_inferior): New, factored out from ...
8956 (child_terminal_ours_1): ... this. Handle
8957 target_terminal_state::is_ours_for_output.
8958 (child_interrupt, child_pass_ctrlc): New.
8959 (inflow_inferior_exit): Clear the inferior's terminal_state.
8960 (copy_terminal_info): Copy the inferior's terminal state.
8961 (_initialize_inflow): Remove reference to terminal_is_ours.
8962 * inflow.h (inferior_process_group): Delete.
8963 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8964 * procfs.c (procfs_target): Don't install procfs_interrupt.
8965 (procfs_interrupt): Delete.
8966 * remote.c (remote_serial_quit_handler): Adjust.
8967 (remote_interrupt): Remove ptid parameter. Adjust.
8968 * target-delegates.c: Regenerate.
8969 * target.c: Include "terminal.h".
8970 (target_terminal::terminal_state): Rename to ...
8971 (target_terminal::m_terminal_state): ... this.
8972 (target_terminal::init): Adjust.
8973 (target_terminal::inferior): Adjust to per-inferior
8974 terminal_state.
8975 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8976 (target_terminal::ours, target_terminal::ours_for_output): Use
8977 target_terminal_is_ours_kind.
8978 (target_interrupt): Remove ptid parameter. Adjust.
8979 (default_target_pass_ctrlc): Adjust.
8980 * target.h (target_ops::to_terminal_save_inferior): New field.
8981 (target_ops::to_interrupt): Remove ptid_t parameter.
8982 (target_interrupt): Remove ptid_t parameter. Update comment.
8983 (target_pass_ctrlc): Update comment.
8984 * target/target.h (target_terminal_state): New scoped enum,
8985 factored out of ...
8986 (target_terminal::terminal_state): ... here.
8987 (target_terminal::inferior): Update comments.
8988 (target_terminal::restore_inferior): New.
8989 (target_terminal::is_inferior, target_terminal::is_ours)
8990 (target_terminal::is_ours_for_output): Adjust.
8991 (target_terminal::scoped_restore_terminal_state): Adjust to
8992 rename, and call restore_inferior() instead of inferior().
8993 (target_terminal::scoped_restore_terminal_state::m_state): Change
8994 type.
8995 (target_terminal::terminal_state): Rename to ...
8996 (target_terminal::m_terminal_state): ... this and change type.
8997
8998 2018-01-30 Pedro Alves <palves@redhat.com>
8999
9000 * linux-nat.c (wait_for_signal): New function.
9001 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9002 directly.
9003 (async_terminal_is_ours)
9004 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9005 (linux_nat_add_target): Don't override
9006 to_terminal_inferior/to_terminal_ours.
9007
9008 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
9009
9010 * remote.c (remote_follow_fork): Don't call "detach_inferior".
9011
9012 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
9013
9014 * dwarf2read.c (free_dwo_files): Add forward-declaration.
9015 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9016 dwarf2_per_objfile_free here.
9017 (dwarf2_per_objfile_free): Remove.
9018 (_initialize_dwarf2_read): Don't register
9019 dwarf2_per_objfile_free as a registry cleanup.
9020
9021 2018-01-27 Eli Zaretskii <eliz@gnu.org>
9022
9023 Avoid compilation errors in MinGW native builds
9024
9025 The error is triggered by including python-internal.h, and the
9026 error message is:
9027
9028 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9029 from build-gnulib/import/math.h:27,
9030 from d:/usr/Python26/include/pyport.h:235,
9031 from d:/usr/Python26/include/Python.h:58,
9032 from python/python-internal.h:94,
9033 from python/py-arch.c:24:
9034 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9035 using ::hypot;
9036 ^~~~~
9037
9038 This happens because Python headers define 'hypot' to expand t
9039 '_hypot' in the Windows builds.
9040 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9041 'hypoth'. This avoids a compilation error.
9042
9043 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9044
9045 * MAINTAINERS (Write After Approval): Fix ordering.
9046
9047 2018-01-26 Alan Hayward <alan.hayward@arm.com>
9048
9049 * MAINTAINERS (Write After Approval): Add Alan Hayward.
9050
9051 2018-01-26 Alan Modra <amodra@gmail.com>
9052
9053 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9054 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9055 Remove nop. Make const. Comment.
9056 (powerpc32_plt_stub_so_2): New.
9057 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9058 Correct count. Update uses.
9059 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9060 Move common code reading PLT entry word. Correct
9061 powerpc32_plt_stub PLT address calculation.
9062 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9063 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9064 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9065 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9066 (ppc64_standard_linkage8): Likewise.
9067 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9068 Correct insns description.
9069 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9070
9071 2018-01-24 Pedro Alves <palves@redhat.com>
9072
9073 GCC PR libstdc++/83906
9074 * gdbtypes.c (operator==(const dynamic_prop &,
9075 const dynamic_prop &)): New.
9076 (operator==(const range_bounds &, const range_bounds &)): New.
9077 (check_types_equal): Use them instead of memcmp.
9078 * gdbtypes.h (operator==(const dynamic_prop &,
9079 const dynamic_prop &)): Declare.
9080 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9081 (operator==(const range_bounds &, const range_bounds &)): Declare.
9082 (operator!=(const range_bounds &, const range_bounds &)): Declare.
9083
9084 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9085
9086 * s390-linux-tdep.c (s390_record_address_mask)
9087 (s390_record_calc_disp_common, s390_record_calc_disp)
9088 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9089 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9090 (s390_process_record): Move to s390-tdep.c.
9091 (s390_linux_init_abi_any): Adjust.
9092 * s390-tdep.c (s390_record_address_mask)
9093 (s390_record_calc_disp_common, s390_record_calc_disp)
9094 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9095 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9096 (s390_process_record): Moved from s390-linux-tdep.c
9097 (s390_gdbarch_init): Adjust.
9098
9099 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9100
9101 * s390-linux-nat.c (s390-tdep.h): New include.
9102 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9103 (HFILES_NO_SRCDIR): Add s390-tdep.h.
9104 (ALLDEPFILES): Add s390-tdep.c.
9105 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9106 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9107 * s390-tdep.h: ...this. New file.
9108 * s390-linux-tdep.c (s390-tdep.h): New include.
9109 (_initialize_s390_tdep): Rename to...
9110 (_initialize_s390_linux_tdep): ...this and adjust.
9111 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9112 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9113 s390-tdep.h.
9114 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9115 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9116 (s390_is_partial_instruction, s390_software_single_step)
9117 (is_non_branch_ril, s390_displaced_step_copy_insn)
9118 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9119 (s390_prologue_data, s390_addr, s390_store, s390_load)
9120 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9121 (s390_register_call_saved, s390_guess_tracepoint_registers)
9122 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9123 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9124 (s390_pseudo_register_name, s390_pseudo_register_type)
9125 (s390_pseudo_register_read, s390_pseudo_register_write)
9126 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9127 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9128 (s390_addr_bits_remove, s390_address_class_type_flags)
9129 (s390_address_class_type_flags_to_name)
9130 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9131 (s390_function_arg_float, s390_function_arg_vector)
9132 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9133 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9134 (s390_frame_align, s390_register_return_value, s390_return_value)
9135 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9136 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9137 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9138 (s390_trad_frame_prev_register, s390_unwind_cache)
9139 (s390_prologue_frame_unwind_cache)
9140 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9141 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9142 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9143 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9144 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9145 (s390_frame_base_address, s390_local_base_address)
9146 (s390_frame_base, s390_gcc_target_options)
9147 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9148 (s390_validate_reg_range, s390_tdesc_valid)
9149 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9150 * s390-tdep.c: ...this. New file.
9151
9152 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9153
9154 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9155 (s390_process_record, s390_gdbarch_tdep_alloc)
9156 (s390_linux_init_abi_any): Use/set new hook.
9157
9158 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9159
9160 * s390-linux-tdep.c (osabi.h): New include.
9161 (s390_linux_init_abi_31, s390_linux_init_abi_64)
9162 (s390_linux_init_abi_any): New functions.
9163 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9164
9165 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9166
9167 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9168 tdesc_has_registers check
9169
9170 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9171
9172 * s390-linux-tdep.c (s390_tdesc_valid): New function.
9173 (s390_validate_reg_range): New macro.
9174 (s390_gdbarch_init): Adjust.
9175
9176 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9177
9178 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9179 (s390_gdbarch_tdep_alloc): Adjust.
9180 (s390_gdbarch_init): Adjust.
9181
9182 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9183
9184 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9185 <have_tdb>: Change type to bool.
9186 (s390_gdbarch_tdep_alloc): Adjust.
9187 (s390_gdbarch_init): Adjust.
9188
9189 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9190
9191 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9192 (gdbarch_tdep) <have_upper, have_vx>: New fields.
9193 (s390_gdbarch_tdep_alloc): New function.
9194 (s390_gdbarch_init): Allocate tdep at start and use its fields
9195 instead of separate variables.
9196
9197 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
9198
9199 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9200 when looking for cached gdbarch and add comment for remaining.
9201
9202 2018-01-22 Pedro Alves <palves@redhat.com>
9203 Sergio Durigan Junior <sergiodj@redhat.com>
9204
9205 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9206 case.
9207
9208 2018-01-22 Maciej W. Rozycki <macro@mips.com>
9209
9210 * MAINTAINERS: Update my company e-mail address.
9211
9212 2018-01-22 Yao Qi <yao.qi@linaro.org>
9213
9214 * regcache.c (cooked_write_test): New function.
9215 (_initialize_regcache): Register the test.
9216
9217 2018-01-22 Yao Qi <yao.qi@linaro.org>
9218
9219 * ia64-tdep.c (ia64_pseudo_register_read): Call
9220 regcache->cooked_read instead of regcache_cooked_read_unsigned.
9221 * m32c-tdep.c (m32c_cat_read): Likewise.
9222 (m32c_r3r2r1r0_read): Likewise.
9223 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9224 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9225
9226 2018-01-22 Yao Qi <yao.qi@linaro.org>
9227
9228 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9229 method raw_read instead of regcache_raw_read.
9230 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9231 * arm-tdep.c (arm_neon_quad_read): Likewise.
9232 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9233 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9234 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9235 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9236 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9237 (i386_pseudo_register_read_into_value): Likewise.
9238 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9239 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9240 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9241 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9242 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9243 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9244 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9245 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9246 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9247
9248 2018-01-22 Yao Qi <yao.qi@linaro.org>
9249
9250 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9251 * configure.tgt: Remove target mt.
9252 * mt-tdep.c: Remove.
9253 * regcache.c (cooked_read_test): Remove the check for mt.
9254
9255 2018-01-22 Yao Qi <yao.qi@linaro.org>
9256
9257 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9258 instead of gdbarch_pseudo_register_read_value.
9259
9260 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9261
9262 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9263 language is Ada.
9264
9265 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9266
9267 * linespec.c (create_sals_line_offset): Remove code that preserved
9268 the symtab_and_line's line number.
9269
9270 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9271
9272 * varobj.c (varobj_create): Don't set valid_block when creating a
9273 floating varobj.
9274
9275 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9276
9277 * varobj.c (varobj_create): Remove out of date comment.
9278
9279 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9280
9281 PR mi/20395
9282 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9283 updating innermost block.
9284 * parse.c (innermost_block_tracker::update): Take extra type
9285 parameter, and check types match before updating innermost block.
9286 (write_dollar_variable): Update innermost block for registers.
9287 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9288 (innermost_block_tracker::innermost_block_tracker): Initialise
9289 m_types member.
9290 (innermost_block_tracker::reset): Take type parameter.
9291 (innermost_block_tracker::update): Take type parameter, and pass
9292 type through as needed.
9293 (innermost_block_tracker::m_types): New member.
9294 * varobj.c (varobj_create): Pass type when reseting innermost
9295 block.
9296
9297 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9298
9299 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9300 * ada-lang.c (resolve_subexp): Likewise.
9301 * breakpoint.c (set_breakpoint_condition) Likewise.
9302 (watch_command_1) Likewise.
9303 * c-exp.y (variable): Likewise.
9304 * d-exp.y (PrimaryExpression): Likewise.
9305 * f-exp.y (variable): Likewise.
9306 * go-exp.y (variable): Likewise.
9307 * m2-exp.y (variable): Likewise.
9308 * objfiles.c (objfile::~objfile): Likewise.
9309 * p-exp.y (variable): Likewise.
9310 * parse.c (innermost_block): Change type.
9311 * parser-defs.h (class innermost_block_tracker): New.
9312 (innermost_block): Change to innermost_block_tracker.
9313 * printcmd.c (display_command): Switch to innermost_block API.
9314 (do_one_display): Likewise.
9315 * rust-exp.y (do_one_display): Likewise.
9316 * symfile.c (clear_symtab_users): Likewise.
9317 * varobj.c (varobj_create): Switch to innermost_block API, replace
9318 use of innermost_block with block stored on varobj object.
9319
9320 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9321
9322 * expression.h (innermost_block): Remove declaration.
9323 * varobj.c: Add 'parser-defs.h' include.
9324
9325 2018-01-19 Tom Tromey <tom@tromey.com>
9326
9327 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9328 symbols in the static and global blocks.
9329
9330 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9331
9332 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9333 gdb_ptrace.h, and move including gdb_wait.h ...
9334 * nat/linux-ptrace.h: ... to here.
9335
9336 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9337
9338 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9339 inf_ptrace_detach_success.
9340 (inf_ptrace_detach_success): Add inferior parameter, use it
9341 instead of inferior_ptid, pass it to detach_inferior.
9342 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9343 parameter.
9344 * inferior.c (detach_inferior): Add overload that takes an
9345 inferior object.
9346 * inferior.h (detach_inferior): Likewise.
9347 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9348 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9349 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9350
9351 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9352
9353 * target.h (struct target_ops) <to_detach>: Add inferior
9354 parameter.
9355 (target_detach): Likewise.
9356 * target.c (dispose_inferior): Pass inferior down.
9357 (target_detach): Pass inferior down. Assert that it is equal to
9358 the current inferior.
9359 * aix-thread.c (aix_thread_detach): Pass inferior down.
9360 * corefile.c (core_file_command): Pass current_inferior() down.
9361 * corelow.c (core_detach): Add inferior parameter.
9362 * darwin-nat.c (darwin_detach): Likewise.
9363 * gnu-nat.c (gnu_detach): Likewise.
9364 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9365 * infcmd.c (detach_command): Pass current_inferior() down to
9366 target_detach.
9367 * infrun.c (follow_fork_inferior): Pass parent_inf to
9368 target_detach.
9369 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9370 target_detach.
9371 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9372 * linux-thread-db.c (thread_db_detach): Likewise.
9373 * nto-procfs.c (procfs_detach): Likewise.
9374 * procfs.c (procfs_detach): Likewise.
9375 * record.c (record_detach): Likewise.
9376 * record.h (struct inferior): Forward-declare.
9377 (record_detach): Add inferior parameter.
9378 * remote-sim.c (gdbsim_detach): Likewise.
9379 * remote.c (remote_detach_1): Likewise.
9380 (remote_detach): Likewise.
9381 (extended_remote_detach): Likewise.
9382 * sol-thread.c (sol_thread_detach): Likewise.
9383 * target-debug.h (target_debug_print_inferior_p): New macro.
9384 * target-delegates.c: Re-generate.
9385 * top.c (kill_or_detach): Pass inferior down to target_detach.
9386 * windows-nat.c (windows_detach): Add inferior parameter.
9387
9388 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9389
9390 * target.h (struct target_ops) <to_detach>: Remove args
9391 parameter.
9392 (target_detach): Likewise.
9393 * target.c (dispose_inferior): Adjust.
9394 (target_detach): Remove args parameter, adjust.
9395 * aix-thread.c (aix_thread_detach): Adjust.
9396 * corefile.c (core_file_command): Adjust.
9397 * corelow.c (core_detach): Adjust.
9398 * darwin-nat.c (darwin_detach): Adjust.
9399 * gnu-nat.c (gnu_detach): Adjust.
9400 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9401 * infcmd.c (detach_command): Adjust
9402 * infrun.c (follow_fork_inferior): Adjust.
9403 (handle_vfork_child_exec_or_exit): Adjust.
9404 * linux-fork.c (linux_fork_detach): Remove args parameter.
9405 * linux-fork.h (linux_fork_detach): Likewise.
9406 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9407 * linux-thread-db.c (thread_db_detach): Likewise.
9408 * nto-procfs.c (procfs_detach): Likewise.
9409 * procfs.c (procfs_detach): Likewise.
9410 (do_detach): Remove signo parameter.
9411 * record.c (record_detach): Remove args parameter.
9412 * record.h (record_detach): Likewise.
9413 * remote-sim.c (gdbsim_detach): Likewise.
9414 * remote.c (remote_detach_1): Likewise.
9415 (remote_detach): Likewise.
9416 (extended_remote_detach): Likewise.
9417 * sol-thread.c (sol_thread_detach): Likewise.
9418 * target-delegates.c: Re-generate.
9419 * top.c (struct qt_args) <args>: Remove field.
9420 (kill_or_detach): Don't pass args.
9421 (quit_force): Don't set args.
9422 * windows-nat.c (windows_detach): Remove args parameter.
9423
9424 2018-01-19 Yao Qi <yao.qi@linaro.org>
9425
9426 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9427 (arm_linux_init_abi): Install it.
9428
9429 2018-01-19 Yao Qi <yao.qi@linaro.org>
9430
9431 * osabi.c (gdb_osabi_names): Extend the regexp for
9432 arm-linux-gnueabihf.
9433
9434 2018-01-18 Yao Qi <yao.qi@linaro.org>
9435
9436 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9437 m_abbrevs.
9438 (abbrev_table::add_abbrev): Update.
9439 (abbrev_table::lookup_abbrev): Update.
9440
9441 2018-01-18 Yao Qi <yao.qi@linaro.org>
9442
9443 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9444
9445 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9446
9447 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9448 to "std::string".
9449
9450 2018-01-17 Tom Tromey <tom@tromey.com>
9451
9452 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9453
9454 2018-01-17 Tom Tromey <tom@tromey.com>
9455
9456 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9457 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9458 (create_array_type_with_stride): Update.
9459 * dwarf2read.c (set_die_type): Update.
9460
9461 2018-01-17 Tom Tromey <tom@tromey.com>
9462
9463 * dwarf2read.c (delayed_method_info): Remove typedef.
9464 (dwarf2_cu::method_info): Now a std::vector.
9465 (add_to_method_list): Update.
9466 (free_delayed_list): Remove.
9467 (compute_delayed_physnames): Update.
9468 (process_full_comp_unit, process_full_type_unit): Clear the method
9469 list. Remove cleanups.
9470 (psymtab_include_file_name): Add name_holder parameter. Use
9471 unique_xmalloc_ptr.
9472 (dwarf_decode_lines): Update.
9473
9474 2018-01-17 Tom Tromey <tom@tromey.com>
9475 Simon Marchi <simon.marchi@ericsson.com>
9476
9477 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9478 (dwarf2_per_objfile::free_cached_comp_units)
9479 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9480 (init_cutu_and_read_dies_no_follow): Update.
9481 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9482 (dwarf2_cu::~dwarf2_cu): New.
9483 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9484 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9485
9486 2018-01-17 Tom Tromey <tom@tromey.com>
9487 Simon Marchi <simon.marchi@ericsson.com>
9488
9489 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9490 (struct die_reader_specs) <abbrev_table>: New member.
9491 (struct abbrev_table): Add constructor.
9492 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9493 <abbrev_obstack>: Now an auto_obstack.
9494 (abbrev_table_up): New typedef.
9495 (init_cu_die_reader): Add abbrev_table parameter.
9496 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9497 Add result_dwo_abbrev_table.
9498 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9499 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9500 Update.
9501 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9502 parameter.
9503 (skip_children): Update.
9504 (abbrev_table::alloc_abbrev): Rename from
9505 abbrev_table_alloc_abbrev.
9506 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9507 (abbrev_table::lookup_abbrev): Rename from
9508 abbrev_table_lookup_abbrev.
9509 (abbrev_table_read_table): Return abbrev_table_up.
9510 (abbrev_table_free, abbrev_table_free_cleanup)
9511 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9512 (load_partial_dies): Update.
9513
9514 2018-01-17 Tom Tromey <tom@tromey.com>
9515
9516 * dwarf2read.c (dwarf2_compute_name): Update comment.
9517 (read_func_scope, read_variable): Update.
9518 (new_symbol): Remove.
9519 (new_symbol_full): Rename to new_symbol.
9520
9521 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9522
9523 PR gdb/16577
9524 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9525 a warning instead of throwing an error, set section size to 0 and return
9526 NULL.
9527 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9528
9529 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9530
9531 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9532 std::string.
9533 (linux_ptrace_attach_fail_reason_string): Likewise.
9534 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9535 Likewise.
9536 (linux_ptrace_attach_fail_reason_string): Likewise.
9537 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9538
9539 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9540
9541 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9542
9543 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9544
9545 PR gdb/21559
9546 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9547 checking for fs_base/gs_base fields in struct user_regs_struct.
9548 * configure: Regenerate.
9549
9550 2018-01-17 Yao Qi <yao.qi@linaro.org>
9551
9552 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9553 function.
9554 (aarch64_linux_init_abi): Install it to gdbarch hook
9555 gcc_target_options.
9556
9557 2018-01-15 Pedro Alves <palves@redhat.com>
9558
9559 * common/signals-state-save-restore.c
9560 (save_original_signals_state): Fix typos.
9561
9562 2017-01-12 Tom Tromey <tom@tromey.com>
9563 Sergio Durigan Junior <sergiodj@redhat.com>
9564
9565 * Makefile.in (install-only): Install gdb-add-index.
9566
9567 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9568
9569 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9570
9571 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9572
9573 * infrun.c (keep_going_pass_signal): Clear step-over info when
9574 insert_breakpoints fails.
9575
9576 2018-01-11 Pedro Alves <palves@redhat.com>
9577
9578 PR gdb/22583
9579 * infrun.c (resume): Rename to ...
9580 (resume_1): ... this.
9581 (resume): Reimplement as wrapper around resume_1.
9582
9583 2018-01-11 Pedro Alves <palves@redhat.com>
9584
9585 PR remote/22597
9586 * remote.c (remote_parse_stop_reply): Default to the last-set
9587 general thread instead of to 'magic_null_ptid'.
9588
9589 2018-01-10 Pedro Alves <palves@redhat.com>
9590
9591 * language.h (language_get_symbol_name_matcher): Rename ...
9592 (get_symbol_name_matcher): ... this.
9593 * language.c (language_get_symbol_name_matcher): Ditto.
9594 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9595 callers adjusted.
9596
9597 2018-01-10 Pedro Alves <palves@redhat.com>
9598
9599 PR gdb/22670
9600 * dwarf2read.c
9601 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9602 Adjust to use language_get_symbol_name_matcher instead of
9603 language_defn::la_get_symbol_name_matcher.
9604 * language.c (language_get_symbol_name_matcher): If in Ada mode
9605 and the lookup name is a verbatim match, return Ada's matcher.
9606 * language.h (language_get_symbol_name_matcher): Adjust comment.
9607 (ada_lookup_name_info::verbatim_p):: New method.
9608
9609 2018-01-10 Pedro Alves <palves@redhat.com>
9610
9611 PR gdb/22670
9612 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9613 minsym's language is language_auto or language_cplus, pass down
9614 language_ada instead.
9615 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9616
9617 2018-01-10 Pedro Alves <palves@redhat.com>
9618
9619 PR gdb/22670
9620 * minsyms.c (linkage_name_str): New function.
9621 (iterate_over_minimal_symbols): Use it.
9622
9623 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9624
9625 * NEWS: Document that 'info proc' now works on FreeBSD.
9626
9627 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9628
9629 * configure.ac: Check for kinfo_getfile in libutil.
9630 * configure: Regenerate.
9631 * config.in: Regenerate.
9632 * fbsd-nat.c: Include "fbsd-tdep.h".
9633 (fbsd_fetch_cmdline): New.
9634 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9635 rather than calling error.
9636 (fbsd_info_proc): New.
9637 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9638 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9639 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9640
9641 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9642
9643 * fbsd-nat.c (struct free_deleter): Remove.
9644 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9645
9646 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9647
9648 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9649 NULL for an empty pathname.
9650
9651 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9652
9653 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9654 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9655 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9656 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9657 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9658 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9659 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9660 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9661 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9662 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9663 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9664 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9665 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9666 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9667 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9668
9669 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9670
9671 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9672 (gnu_xfer_auxv): New function.
9673 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9674 TARGET_OBJECT_AUXV.
9675
9676 2018-01-08 Yao Qi <yao.qi@linaro.org>
9677 Simon Marchi <simon.marchi@ericsson.com>
9678
9679 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9680 common/selftest.c.
9681 (COMMON_OBS): Remove selftest.o.
9682 * configure.ac: Append selftest-arch.c and common/selftest.c to
9683 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9684 * configure: Re-generated.
9685 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9686 GDB_SELF_TEST.
9687 (maintenance_info_selftests): Likewise.
9688
9689 2018-01-08 Xavier Roirand <roirand@adacore.com>
9690
9691 * ada-valprint.c (val_print_packed_array_elements): Use
9692 proper number of elements when printing an array indexed
9693 by an enumeration type.
9694
9695 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9696
9697 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9698 (dw2_get_file_names_reader): Adjust.
9699 (lookup_dwo_signatured_type): Adjust.
9700 (lookup_dwp_signatured_type): Adjust.
9701 (lookup_signatured_type): Adjust.
9702 (create_type_unit_group): Adjust.
9703 (get_type_unit_group): Adjust.
9704 (process_psymtab_comp_unit_reader): Adjust.
9705 (build_type_psymtabs_reader): Adjust.
9706 (scan_partial_symbols): Adjust.
9707 (add_partial_symbol): Adjust.
9708 (add_partial_subprogram): Adjust.
9709 (peek_die_abbrev): Adjust.
9710 (fixup_go_packaging): Adjust.
9711 (process_imported_unit_die): Adjust.
9712 (dwarf2_compute_name): Adjust.
9713 (dwarf2_physname): Adjust.
9714 (read_import_statement): Adjust.
9715 (handle_DW_AT_stmt_list): Adjust.
9716 (read_file_scope): Adjust.
9717 (read_func_scope): Adjust.
9718 (read_lexical_block_scope): Adjust.
9719 (read_call_site_scope): Adjust.
9720 (read_variable): Adjust.
9721 (dwarf2_rnglists_process): Adjust.
9722 (dwarf2_ranges_process): Adjust.
9723 (dwarf2_ranges_read): Adjust.
9724 (dwarf2_get_pc_bounds): Adjust.
9725 (dwarf2_record_block_ranges): Adjust.
9726 (dwarf2_add_field): Adjust.
9727 (dwarf2_add_member_fn): Adjust.
9728 (read_structure_type): Adjust.
9729 (process_structure_scope): Adjust.
9730 (read_enumeration_type): Adjust.
9731 (read_array_type): Adjust.
9732 (mark_common_block_symbol_computed): Adjust.
9733 (read_common_block): Adjust.
9734 (read_namespace_type): Adjust.
9735 (read_namespace): Adjust.
9736 (read_module_type): Adjust.
9737 (read_tag_pointer_type): Adjust.
9738 (read_tag_ptr_to_member_type): Adjust.
9739 (read_tag_string_type): Adjust.
9740 (read_subroutine_type): Adjust.
9741 (read_typedef): Adjust.
9742 (read_base_type): Adjust.
9743 (attr_to_dynamic_prop): Adjust.
9744 (read_subrange_type): Adjust.
9745 (read_unspecified_type): Adjust.
9746 (dwarf2_read_abbrevs): Adjust.
9747 (load_partial_dies): Adjust.
9748 (read_partial_die): Adjust.
9749 (find_partial_die): Adjust.
9750 (guess_partial_die_structure_name): Adjust.
9751 (fixup_partial_die): Adjust.
9752 (read_attribute_value): Adjust.
9753 (read_addr_index): Adjust.
9754 (read_addr_index_from_leb128): Adjust.
9755 (read_str_index): Adjust.
9756 (dwarf2_string_attr): Adjust.
9757 (get_debug_line_section): Adjust.
9758 (dwarf_decode_line_header): Adjust.
9759 (lnp_state_machine::check_line_address): Adjust.
9760 (dwarf_decode_lines_1): Adjust.
9761 (dwarf_decode_lines): Adjust.
9762 (dwarf2_start_symtab): Adjust.
9763 (var_decode_location): Adjust.
9764 (new_symbol_full): Adjust.
9765 (dwarf2_const_value_data): Adjust.
9766 (dwarf2_const_value_attr): Adjust.
9767 (dwarf2_const_value): Adjust.
9768 (die_type): Adjust.
9769 (die_containing_type): Adjust.
9770 (build_error_marker_type): Adjust.
9771 (lookup_die_type): Adjust.
9772 (guess_full_die_structure_name): Adjust.
9773 (anonymous_struct_prefix): Adjust.
9774 (determine_prefix): Adjust.
9775 (dwarf2_name): Adjust.
9776 (follow_die_ref_or_sig): Adjust.
9777 (follow_die_offset): Adjust.
9778 (follow_die_ref): Adjust.
9779 (follow_die_sig_1): Adjust.
9780 (follow_die_sig): Adjust.
9781 (get_signatured_type): Adjust.
9782 (get_DW_AT_signature_type): Adjust.
9783 (decode_locdesc): Adjust.
9784 (dwarf_decode_macros): Adjust.
9785 (cu_debug_loc_section): Adjust.
9786 (fill_in_loclist_baton): Adjust.
9787 (dwarf2_symbol_mark_computed): Adjust.
9788 (init_one_comp_unit): Don't assign
9789 dwarf2_cu::dwarf2_per_objfile.
9790 (set_die_type): Adjust.
9791
9792 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9793
9794 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9795 <dwarf2_per_objfile>: New field.
9796 (dwarf2_per_objfile): Remove global.
9797 (get_dwarf2_per_objfile): New function.
9798 (set_dwarf2_per_objfile): New function.
9799 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9800 dwarf2_per_objfile.
9801 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9802 (read_abbrev_offset): Likewise.
9803 (read_indirect_string): Likewise.
9804 (read_indirect_line_string): Likewise.
9805 (read_indirect_string_at_offset): Likewise.
9806 (read_indirect_string_from_dwz): Likewise.
9807 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9808 dwarf2_per_objfile.
9809 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9810 (create_all_comp_units): Change objfile parameter to
9811 dwarf2_per_objfile.
9812 (create_all_type_units): Likewise.
9813 (process_queue): Add dwarf2_per_objfile parameter.
9814 (read_and_check_comp_unit_head): Likewise.
9815 (lookup_dwo_unit_in_dwp): Likewise.
9816 (get_dwp_file): Likewise.
9817 (process_cu_includes): Likewise.
9818 (struct free_dwo_file_cleanup_data): New struct.
9819 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9820 set_dwarf2_per_objfile.
9821 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9822 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9823 context, adjust calls.
9824 (dw2_instantiate_symtab): Likewise.
9825 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9826 (dw2_get_cu): Likewise.
9827 (create_cu_from_index_list): Change objfile parameter to
9828 dwarf2_per_objfile.
9829 (create_cus_from_index_list): Get dwarf2_per_objfile from
9830 context, adjust calls.
9831 (create_cus_from_index): Likewise.
9832 (create_signatured_type_table_from_index): Change objfile
9833 parameter to dwarf2_per_objfile.
9834 (create_signatured_type_table_from_debug_names): Change objfile
9835 parameter to dwarf2_per_objfile.
9836 (create_addrmap_from_index): Likewise.
9837 (create_addrmap_from_aranges): Likewise.
9838 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9839 (dw2_setup): Remove.
9840 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9841 context.
9842 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9843 get_dwarf2_per_objfile.
9844 (dw2_forget_cached_source_info): Likewise.
9845 (dw2_map_symtabs_matching_filename): Likewise.
9846 (struct dw2_symtab_iterator) <index>: Remove.
9847 <dwarf2_per_objfile>: New field.
9848 (dw2_symtab_iter_init): Replace index parameter with
9849 dwarf2_per_objfile.
9850 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9851 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9852 (dw2_print_stats): Likewise.
9853 (dw2_dump): Likewise.
9854 (dw2_expand_symtabs_for_function): Likewise.
9855 (dw2_expand_all_symtabs): Likewise.
9856 (dw2_expand_symtabs_with_fullname): Likewise.
9857 (dw2_expand_marked_cus): Replace index and objfile parameters
9858 with dwarf2_per_objfile.
9859 (dw_expand_symtabs_matching_file_matcher): Add
9860 dwarf2_per_objfile parameter and adjust calls.
9861 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9862 adjust calls.
9863 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9864 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9865 adjust calls.
9866 (create_cus_from_debug_names_list): Replace objfile parameter
9867 with dwarf2_per_objfile and adjust calls.
9868 (create_cus_from_debug_names): Likewise.
9869 (dwarf2_read_debug_names): Likewise.
9870 (mapped_debug_names::namei_to_name): Adjust call.
9871 (dw2_debug_names_iterator::next): Likewise.
9872 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9873 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9874 (dw2_debug_names_dump): Likewise.
9875 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9876 (dw2_debug_names_expand_symtabs_matching): Likewise.
9877 (dwarf2_initialize_objfile): Likewise.
9878 (dwarf2_build_psymtabs): Likewise.
9879 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9880 this_cu.
9881 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9882 (read_and_check_comp_unit_head): Likewise.
9883 (read_abbrev_offset): Likewise.
9884 (create_debug_type_hash_table): Likewise.
9885 (create_debug_types_hash_table): Likewise.
9886 (create_all_type_units): Replace objfile parameter with
9887 dwarf2_per_objfile.
9888 (add_type_unit): Add dwarf2_per_objfile parameter.
9889 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9890 with dwarf2_per_objfile.
9891 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9892 (lookup_dwp_signatured_type): Likewise.
9893 (lookup_signatured_type): Likewise.
9894 (read_cutu_die_from_dwo): Likewise.
9895 (init_tu_and_read_dwo_dies): Likewise.
9896 (init_cutu_and_read_dies): Likewise.
9897 (init_cutu_and_read_dies_no_follow): Likewise.
9898 (allocate_type_unit_groups_table): Add objfile parameter.
9899 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9900 (get_type_unit_group): Likewise.
9901 (process_psymtab_comp_unit): Update call.
9902 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9903 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9904 (print_tu_stats): Likewise.
9905 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9906 in void* parameter.
9907 (build_type_psymtabs): Change objfile parameter to
9908 dwarf2_per_objfile.
9909 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9910 passed in void* parameter.
9911 (process_skeletonless_type_units): Change objfile parameter to
9912 dwarf2_per_objfile.
9913 (set_partial_user): Likewise.
9914 (dwarf2_build_psymtabs_hard): Likewise.
9915 (read_comp_units_from_section): Likewise.
9916 (create_all_comp_units): Likewise.
9917 (scan_partial_symbols): Update calls.
9918 (add_partial_symbol): Likewise.
9919 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9920 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9921 (process_queue): Add dwarf2_per_objfile parameter.
9922 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9923 (compute_compunit_symtab_includes): Likewise.
9924 (process_cu_includes): Add dwarf2_per_objfile parameter.
9925 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9926 (process_full_type_unit): Likewise.
9927 (process_imported_unit_die): Update call.
9928 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9929 (read_file_scope): Likewise.
9930 (allocate_dwo_file_hash_table): Add objfile parameter.
9931 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9932 (create_cus_hash_table): Likewise.
9933 (create_dwp_hash_table): Likewise.
9934 (create_dwo_unit_in_dwp_v1): Likewise.
9935 (create_dwp_v2_section): Likewise.
9936 (create_dwo_unit_in_dwp_v2): Likewise.
9937 (lookup_dwo_unit_in_dwp): Likewise.
9938 (try_open_dwop_file): Likewise.
9939 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9940 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9941 cleanup to include a reference to dwarf2_per_objfile.
9942 (open_dwp_file): Add dwarf2_per_objfile parameter.
9943 (open_and_init_dwp_file): Likewise.
9944 (get_dwp_file): Likewise.
9945 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9946 (queue_and_load_all_dwo_tus): Update call.
9947 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9948 data.
9949 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9950 (dwarf2_ranges_process): Likewise.
9951 (dwarf2_get_pc_bounds): Likewise.
9952 (mark_common_block_symbol_computed): Likewise.
9953 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9954 (dwarf2_read_abbrevs): Update call.
9955 (read_partial_die): Use dwarf2_per_objfile from cu.
9956 (find_partial_die): Likewise.
9957 (fixup_partial_die): Likewise.
9958 (read_attribute_value): Likewise.
9959 (read_indirect_string_at_offset_from): Add objfile parameter.
9960 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9961 parameter.
9962 (read_indirect_string_from_dwz): Add objfile parameter.
9963 (read_indirect_string): Add objfile parameter.
9964 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9965 (read_addr_index): Use dwarf2_per_objfile from cu.
9966 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9967 call dw2_setup.
9968 (read_str_index): Use dwarf2_per_objfile from cu.
9969 (get_debug_line_section): Likewise.
9970 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9971 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9972 (new_symbol_full): Use dwarf2_per_objfile from cu.
9973 (build_error_marker_type): Likewise.
9974 (lookup_die_type): Likewise.
9975 (determine_prefix): Likewise.
9976 (follow_die_offset): Likewise.
9977 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9978 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9979 (dwarf2_fetch_die_type_sect_off): Likewise.
9980 (dwarf2_get_die_type): Likewise.
9981 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9982 (get_signatured_type): Likewise.
9983 (get_DW_AT_signature_type): Likewise.
9984 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9985 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9986 (cu_debug_loc_section): Likewise.
9987 (fill_in_loclist_baton): Likewise.
9988 (dwarf2_symbol_mark_computed): Likewise.
9989 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9990 dwarf2_per_objfile.
9991 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9992 parameter.
9993 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9994 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9995 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9996 (set_die_type): Use dwarf2_free_objfile from cu.
9997 (get_die_type_at_offset): Likewise.
9998 (dwarf2_per_objfile_free): Don't assign global variable.
9999 (debug_names) <constructor>: Add dwarf2_per_objfile
10000 parameter, update m_debugstrlookup construction.
10001 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10002 parameter.
10003 <m_dwarf2_per_objfile>: New field.
10004 <lookup>: Use m_dwarf2_per_objfile.
10005 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10006 (psyms_seen_size): Likewise.
10007 (write_gdbindex): Replace objfile parameter with
10008 dwarf2_per_objfile.
10009 (write_debug_names): Likewise.
10010 (write_psymtabs_to_index): Likewise.
10011 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10012 calls.
10013
10014 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10015
10016 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10017 <dwarf2_per_objfile>: New field.
10018 (struct dwarf2_per_cu_data) <objfile>: Remove.
10019 <dwarf2_per_objfile>: New field.
10020 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10021 of objfile.
10022 (create_signatured_type_table_from_index): Likewise.
10023 (create_debug_type_hash_table): Likewise.
10024 (fill_in_sig_entry_from_dwo_entry): Likewise.
10025 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10026 (create_type_unit_group): Assign dwarf2_per_objfile instead of
10027 objfile.
10028 (create_partial_symtab): Access objfile through
10029 dwarf2_per_objfile.
10030 (process_psymtab_comp_unit_reader): Likewise.
10031 (read_comp_units_from_section): Likewise.
10032 (scan_partial_symbols): Likewise.
10033 (add_partial_symbol): Likewise.
10034 (add_partial_subprogram): Likewise.
10035 (peek_die_abbrev): Likewise.
10036 (fixup_go_packaging): Likewise.
10037 (process_full_comp_unit): Likewise.
10038 (process_full_type_unit): Likewise.
10039 (process_imported_unit_die): Likewise.
10040 (dwarf2_compute_name): Likewise.
10041 (dwarf2_physname): Likewise.
10042 (read_import_statement): Likewise.
10043 (create_cus_hash_table): Assign dwarf2_physname instead of
10044 objfile.
10045 (read_func_scope): Access objfile through dwarf2_per_objfile.
10046 (read_lexical_block_scope): Likewise.
10047 (read_call_site_scope): Likewise.
10048 (read_variable): Likewise.
10049 (dwarf2_rnglists_process): Likewise.
10050 (dwarf2_ranges_process): Likewise.
10051 (dwarf2_ranges_read): Likewise.
10052 (dwarf2_record_block_ranges): Likewise.
10053 (dwarf2_add_field): Likewise.
10054 (dwarf2_add_member_fn): Likewise.
10055 (read_structure_type): Likewise.
10056 (process_structure_scope): Likewise.
10057 (read_enumeration_type): Likewise.
10058 (read_array_type): Likewise.
10059 (read_common_block): Likewise.
10060 (read_namespace_type): Likewise.
10061 (read_namespace): Likewise.
10062 (read_module_type): Likewise.
10063 (read_tag_pointer_type): Likewise.
10064 (read_tag_ptr_to_member_type): Likewise.
10065 (read_tag_string_type): Likewise.
10066 (read_subroutine_type): Likewise.
10067 (read_typedef): Likewise.
10068 (read_base_type): Likewise.
10069 (attr_to_dynamic_prop): Likewise.
10070 (read_subrange_type): Likewise.
10071 (read_unspecified_type): Likewise.
10072 (load_partial_dies): Likewise.
10073 (read_partial_die): Likewise.
10074 (find_partial_die): Likewise.
10075 (guess_partial_die_structure_name): Likewise.
10076 (fixup_partial_die): Likewise.
10077 (read_attribute_value): Likewise.
10078 (read_addr_index_from_leb128): Likewise.
10079 (dwarf2_read_addr_index): Likewise.
10080 (dwarf2_string_attr): Likewise.
10081 (lnp_state_machine::check_line_address): Likewise.
10082 (dwarf_decode_lines_1): Likewise.
10083 (dwarf_decode_lines): Likewise.
10084 (dwarf2_start_symtab): Likewise.
10085 (var_decode_location): Likewise.
10086 (new_symbol_full): Likewise.
10087 (dwarf2_const_value_data): Likewise.
10088 (dwarf2_const_value_attr): Likewise.
10089 (dwarf2_const_value): Likewise.
10090 (die_type): Likewise.
10091 (die_containing_type): Likewise.
10092 (lookup_die_type): Likewise.
10093 (guess_full_die_structure_name): Likewise.
10094 (anonymous_struct_prefix): Likewise.
10095 (dwarf2_name): Likewise.
10096 (follow_die_ref_or_sig): Likewise.
10097 (follow_die_offset): Likewise.
10098 (follow_die_ref): Likewise.
10099 (dwarf2_fetch_die_loc_sect_off): Likewise.
10100 (dwarf2_fetch_constant_bytes): Likewise.
10101 (dwarf2_fetch_die_type_sect_off): Likewise.
10102 (dwarf2_get_die_type): Likewise.
10103 (follow_die_sig): Likewise.
10104 (decode_locdesc): Likewise.
10105 (dwarf2_per_cu_objfile): Likewise.
10106 (dwarf2_per_cu_text_offset): Likewise.
10107 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10108 objfile.
10109 (set_die_type): Access objfile through
10110 dwarf2_per_objfile.
10111
10112 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10113
10114 * valprint.c (converted_character_d): Remove typedef.
10115 (DEF_VEC_O (converted_character_d)): Remove.
10116 (count_next_character): Use std::vector.
10117 (print_converted_chars_to_obstack): Likewise.
10118 (generic_printstr): Likewise.
10119
10120 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10121
10122 * xml-support.h (struct gdb_xml_value): Add constructor.
10123 <value>: Change type to unique_xmalloc_ptr.
10124 (gdb_xml_value_s): Remove typedef.
10125 (DEF_VEC_O (gdb_xml_value_s)): Remove.
10126 (gdb_xml_element_start_handler): Change parameter type to
10127 std::vector.
10128 (xml_find_attribute): Likewise.
10129 * xml-support.c (xml_find_attribute): Change parameter type to
10130 std::vector and adjust.
10131 (gdb_xml_values_cleanup): Remove.
10132 (gdb_xml_parser::start_element): Adjust to std::vector.
10133 (xinclude_start_include): Change paraeter type to std::vector
10134 and adjust.
10135 * btrace.c (check_xml_btrace_version): Likewise.
10136 (parse_xml_btrace_block): Likewise.
10137 (parse_xml_btrace_pt_config_cpu): Likewise.
10138 (parse_xml_btrace_pt): Likewise.
10139 (parse_xml_btrace_conf_bts): Likewise.
10140 (parse_xml_btrace_conf_pt): Likewise.
10141 * memory-map.c (memory_map_start_memory): Likewise.
10142 (memory_map_start_property): Likewise.
10143 * osdata.c (osdata_start_osdata): Likewise.
10144 (osdata_start_item): Likewise.
10145 (osdata_start_column): Likewise.
10146 * remote.c (start_thread): Likewise.
10147 * solib-aix.c (library_list_start_library): Likewise.
10148 (library_list_start_list): Likewise.
10149 * solib-svr4.c (library_list_start_library): Likewise.
10150 (svr4_library_list_start_list): Likewise.
10151 * solib-target.c (library_list_start_segment): Likewise.
10152 (library_list_start_section): Likewise.
10153 (library_list_start_library): Likewise.
10154 (library_list_start_list): Likewise.
10155 * tracepoint.c (traceframe_info_start_memory): Likewise.
10156 (traceframe_info_start_tvar): Likewise.
10157 * xml-syscall.c (syscall_start_syscall): Likewise.
10158 * xml-tdesc.c (tdesc_start_target): Likewise.
10159 (tdesc_start_feature): Likewise.
10160 (tdesc_start_reg): Likewise.
10161 (tdesc_start_union): Likewise.
10162 (tdesc_start_struct): Likewise.
10163 (tdesc_start_flags): Likewise.
10164 (tdesc_start_enum): Likewise.
10165 (tdesc_start_field): Likewise.
10166 (tdesc_start_enum_value): Likewise.
10167 (tdesc_start_vector): Likewise.
10168
10169 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10170
10171 * extension.h (struct xmethod_worker) <clone>: Remove.
10172 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10173 Remove.
10174 (python_xmethod_worker::clone): Remove.
10175 * valops.c (find_overload_match): Use std::move instead of
10176 clone.
10177
10178 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10179
10180 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10181 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10182 <free_xmethod_worker_data>: Remove.
10183 <get_matching_xmethod_workers>: Chance VEC to std::vector.
10184 <get_xmethod_arg_types>: Remove.
10185 <get_xmethod_result_type>: Remove.
10186 <invoke_xmethod>: Remove.
10187 * extension.c (new_xmethod_worker): Remove.
10188 (clone_xmethod_worker): Remove.
10189 (get_matching_xmethod_workers): Return void, pass std::vector by
10190 pointer.
10191 (get_xmethod_arg_types): Rename to...
10192 (xmethod_worker::get_arg_types): ... this, and adjust.
10193 (get_xmethod_result_type): Rename to...
10194 (xmethod_worker::get_result_type): ... this, and adjust.
10195 (invoke_xmethod): Remove.
10196 (free_xmethod_worker): Remove.
10197 (free_xmethod_worker_vec): Remove.
10198 * extension.h (enum ext_lang_rc): Move here from
10199 extension-priv.h.
10200 (struct xmethod_worker): Add constructor and destructor.
10201 <data>: Remove.
10202 <value>: Remove.
10203 <invoke, clone, do_get_result_type, do_get_arg_types>: New
10204 virtual pure methods.
10205 <get_arg_types, get_result_type>: New methods.
10206 (xmethod_worker_ptr): Remove typedef.
10207 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10208 (xmethod_worker_vec): Remove typedef.
10209 (xmethod_worker_up): New typedef.
10210 (invoke_xmethod): Remove.
10211 (clone_xmethod_worker): Remove.
10212 (free_xmethod_worker): Remove.
10213 (free_xmethod_worker_vec): Remove.
10214 (get_xmethod_arg_types): Remove.
10215 (get_xmethod_result_type): Remove.
10216 * valops.c (find_method_list): Use std::vector, don't use
10217 intermediate vector.
10218 (value_find_oload_method_list): Use std::vector.
10219 (find_overload_match): Use std::vector.
10220 (find_oload_champ): Use std::vector.
10221 * value.c (value_free): Use operator delete.
10222 (value_of_xmethod): Rename to...
10223 (value_from_xmethod): ... this. Don't assign
10224 xmethod_worker::value, take rvalue-reference.
10225 (result_type_of_xmethod): Adjust.
10226 (call_xmethod): Adjust.
10227 * value.h: Include extension.h.
10228 (struct xmethod_worker): Don't forward-declare.
10229 (value_of_xmethod): Rename to...
10230 (value_from_xmethod): ... this, take rvalue-reference.
10231 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10232 (struct python_xmethod_worker): ... this, add constructor and
10233 destructor.
10234 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10235 (gdbpy_free_xmethod_worker_data): Rename to...
10236 (python_xmethod_worker::~python_xmethod_worker): ... this and
10237 adjust.
10238 (gdbpy_clone_xmethod_worker_data): Rename to...
10239 (python_xmethod_worker::clone): ... this and adjust.
10240 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10241 temporary vector.
10242 (gdbpy_get_xmethod_arg_types): Rename to...
10243 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10244 (gdbpy_get_xmethod_result_type): Rename to...
10245 (python_xmethod_worker::do_get_result_type): ... this and
10246 adjust.
10247 (gdbpy_invoke_xmethod): Rename to...
10248 (python_xmethod_worker::invoke): ... this and adjust.
10249 (new_python_xmethod_worker): Rename to...
10250 (python_xmethod_worker::python_xmethod_worker): ... this and
10251 adjust.
10252 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10253 Remove.
10254 (gdbpy_free_xmethod_worker_data): Remove.
10255 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10256 (gdbpy_get_xmethod_arg_types): Remove.
10257 (gdbpy_get_xmethod_result_type): Remove.
10258 (gdbpy_invoke_xmethod): Remove.
10259 * python/python.c (python_extension_ops): Remove obsolete
10260 callbacks.
10261
10262 2018-01-05 Pedro Alves <palves@redhat.com>
10263
10264 PR gdb/18653
10265 * common/signals-state-save-restore.c
10266 (save_original_signals_state): New parameter 'quiet'. Warn if we
10267 find a custom handler preinstalled, instead of internal erroring.
10268 But only warn if !quiet.
10269 * common/signals-state-save-restore.h
10270 (save_original_signals_state): New parameter 'quiet'.
10271 * main.c (captured_main_1): Move save_original_signals_state call
10272 after option handling, and pass QUIET.
10273
10274 2018-01-05 Pedro Alves <palves@redhat.com>
10275
10276 * spu-tdep.c (spu_catch_start): Pass
10277 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10278
10279 2018-01-05 Pedro Alves <palves@redhat.com>
10280
10281 PR gdb/22670
10282 * ada-lang.c (literal_symbol_name_matcher): New function.
10283 (ada_get_symbol_name_matcher): Use it for
10284 symbol_name_match_type::SEARCH_NAME.
10285 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10286 it down instead of assuming symbol_name_match_type::FULL.
10287 * block.h (block_lookup_symbol): New parameter 'match_type'.
10288 * c-valprint.c (print_unpacked_pointer): Use
10289 lookup_symbol_search_name instead of lookup_symbol.
10290 * compile/compile-object-load.c (get_out_value_type): Pass down
10291 symbol_name_match_type::SEARCH_NAME.
10292 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10293 symbol_name_match_type::FULL.
10294 * cp-support.c (cp_get_symbol_name_matcher): Handle
10295 symbol_name_match_type::SEARCH_NAME.
10296 * infrun.c (insert_exception_resume_breakpoint): Use
10297 lookup_symbol_search_name.
10298 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10299 * psymtab.c (maintenance_check_psymtabs): Use
10300 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10301 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10302 SYMBOL_SEARCH_NAME.
10303 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10304 if symbol_name_match_type::SEARCH_NAME.
10305 (lookup_symbol_in_language): Pass down
10306 symbol_name_match_type::FULL.
10307 (lookup_symbol_search_name): New.
10308 (lookup_language_this): Pass down
10309 symbol_name_match_type::SEARCH_NAME.
10310 (lookup_symbol_aux, lookup_local_symbol): New parameter
10311 'match_type'. Pass it down.
10312 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10313 (lookup_symbol_search_name): New declaration.
10314 (lookup_symbol_in_block): New 'match_type' parameter.
10315
10316 2018-01-05 Pedro Alves <palves@redhat.com>
10317
10318 PR gdb/22670
10319 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10320 ada_lookup_symbol.
10321 (ada_lookup_symbol): Reimplement in terms of
10322 ada_lookup_symbol_list, bits factored out from
10323 ada_lookup_encoded_symbol.
10324
10325 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10326
10327 * ada-exp.y (write_object_renaming): When subscripting an array
10328 using a symbol as the index, pass the block in call to
10329 ada_lookup_encoded_symbol when looking that symbol up.
10330
10331 2018-01-05 Jerome Guitton <guitton@adacore.com>
10332
10333 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10334 TYPE_INDEX_TYPE.
10335
10336 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10337
10338 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10339 the case where VALUE_LVAL (val0) is not lval_memory.
10340
10341 2018-01-05 Xavier Roirand <roirand@adacore.com>
10342
10343 * ada-valprint.c (print_optional_low_bound): Handle
10344 character-indexed array printing like boolean-indexed array
10345 printing.
10346
10347 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10348
10349 * NEWS: Create a new section for the next release branch.
10350 Rename the section of the current branch, now that it has
10351 been cut.
10352
10353 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10354
10355 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10356 * version.in: Bump version to 8.1.50.DATE-git.
10357
10358 2018-01-03 Xavier Roirand <roirand@adacore.com>
10359
10360 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10361 Add field.
10362 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10363 Add field.
10364 (default_exception_support_info) <catch_handlers_sym>: Add field.
10365 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10366 (ada_exception_name_addr_1): Add "catch handlers" handling.
10367 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10368 Update all callers.
10369 (create_excep_cond_exprs) <ex>: Add parameter.
10370 (re_set_exception): Update create_excep_cond_exprs call.
10371 (print_it_exception, print_one_exception, print_mention_exception)
10372 (print_recreate_exception): Add "catch handler" handling.
10373 (allocate_location_catch_handlers, re_set_catch_handlers)
10374 (check_status_catch_handlers, print_it_catch_handlers)
10375 (print_one_catch_handlers, print_mention_catch_handlers)
10376 (print_recreate_catch_handlers): New function.
10377 (catch_handlers_breakpoint_ops): New variable.
10378 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10379 Add parameter. Add "catch handler" handling.
10380 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10381 Add "catch handler" handling.
10382 (ada_exception_catchpoint_cond_string): Add "catch handler"
10383 handling.
10384 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10385 call.
10386 (catch_ada_handlers_command): New function.
10387 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10388 operations structure.
10389 (_initialize_ada_language): Add "catch handlers" command entry.
10390 * NEWS: Document "catch handlers" feature.
10391
10392 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10393
10394 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10395 account when creating the array type of the slice.
10396 (ada_value_slice): Likewise.
10397
10398 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10399
10400 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10401 New enum value.
10402 (create_array_type_with_stride): Add byte_stride_prop parameter.
10403 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10404 New parameter. Update all callers in this file.
10405 (array_type_has_dynamic_stride): New function.
10406 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10407 of arrays with dynamic byte strides.
10408 * dwarf2read.c (read_array_type): Add support for dynamic
10409 DW_AT_byte_stride attributes.
10410
10411 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10412
10413 * dwarf2read.c (read_unspecified_type): Treat
10414 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10415
10416 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10417
10418 Update copyright year range in all GDB files.
10419
10420 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10421
10422 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10423 and gdb/testsuite/gdb.base/step-line.c.
10424
10425 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10426
10427 * copyright.py (main): Dump the contents of
10428 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10429 even if BY_HAND is empty.
10430
10431 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10432
10433 * top.c (print_gdb_version): Update Copyright year in version
10434 message.
10435
10436 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10437
10438 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10439
10440 For older changes see ChangeLog-2017.
10441 \f
10442 Local Variables:
10443 mode: change-log
10444 left-margin: 8
10445 fill-column: 74
10446 version-control: never
10447 coding: utf-8
10448 End:
This page took 0.231929 seconds and 5 git commands to generate.