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