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