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