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