c547ee96258fccf64bc5e549a1bec3ab52dc22a9
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-04 Tom Tromey <tom@tromey.com>
2
3 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
4 variable "size".
5
6 2018-10-04 Tom Tromey <tom@tromey.com>
7
8 * mdebugread.c (parse_partial_symbols): Use std::string.
9
10 2018-10-04 Tom Tromey <tom@tromey.com>
11
12 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
13 * p-valprint.c (pascal_val_print): Split inner "i" variable.
14 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
15 header.
16 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
17 more inner scope.
18 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
19 * varobj.c (varobj_update): Rename inner "newobj",
20 "type_changed".
21 * valprint.c (generic_emit_char): Rename inner "buf".
22 * valops.c (find_overload_match): Rename inner "temp".
23 (value_struct_elt_for_reference): Declare "v" in more inner
24 scope.
25 * v850-tdep.c (v850_push_dummy_call): Rename "len".
26 * unittests/array-view-selftests.c (run_tests): Rename inner
27 "vec".
28 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
29 header.
30 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
31 "tsv" in more inner scope.
32 (print_one_static_tracepoint_marker): Rename inner
33 "tuple_emitter".
34 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
35 (tic6x_push_dummy_call): Don't redeclare "addr".
36 * target-float.c: Declare "dto" lower.
37 * symtab.c (lookup_local_symbol): Rename inner "sym".
38 (find_pc_sect_line): Rename inner "pc".
39 * stack.c (print_frame): Don't redeclare "gdbarch".
40 (return_command): Rename inner "gdbarch".
41 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
42 "sp".
43 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
44 header.
45 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
46 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
47 scope.
48 * remote.c (remote_target::update_thread_list): Don't redeclare
49 "tp".
50 (remote_target::process_initial_stop_replies): Rename inner
51 "thread".
52 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
53 (remote_target::wait_as): Don't redeclare "stop_reply".
54 (remote_target::get_thread_local_address): Rename inner
55 "result".
56 (remote_target::get_tib_address): Likewise.
57
58 * regcache.c (cooked_read_test): Rename "regnum".
59 * record-btrace.c (cmd_record_btrace_start): Rename inner
60 "exception".
61 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
62 loop header.
63 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
64 header.
65 (ppu2spu_sniffer): Rename inner "buf".
66 * parse.c (operator_check_standard): Rename inner "type",
67 "objfile".
68 * p-valprint.c (pascal_val_print): Introduce new scope for
69 "low_bound", "high_bound".
70 * p-exp.y (yylex): Declare "i" in loop header.
71 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
72 Lower declaration of "s".
73 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
74 header.
75 (nios2_push_dummy_call): Rename "len".
76 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
77 "buf".
78 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
79 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
80 (linux_xfer_osdata_modules): Likewise.
81 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
82 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
83 (mips_o64_push_dummy_call): Likewise.
84 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
85 "op".
86 * mi/mi-main.c (list_available_thread_groups): Rename inner
87 "tuple_emitter".
88 (mi_cmd_data_read_memory): Rename inner "opts".
89 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
90 "tuple_emitter".
91 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
92 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
93 more inner scope.
94 (parse_partial_symbols): Rename inner "pst", "p", "name"
95 * main.c (captured_main_1): Rename inner "i"s.
96 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
97 "oso2".
98 * linux-tdep.c (linux_info_proc): Rename inner "filename".
99 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
100 * infrun.c (handle_no_resumed): Don't redeclare "thread".
101 (handle_signal_stop): Rename inner "gdbarch".
102 (handle_command): Declare "signum" in loop header.
103 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
104 "status".
105 (examine_prologue): Rename inner "sol" and "sof".
106 (ia64_extract_return_value): Rename inner "val". Declare another
107 "val" in a more inner scope.
108 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
109 inner scope.
110 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
111 "except".
112 * findvar.c (default_read_var_value): Don't redeclare "addr".
113 * f-exp.y (yylex): Declare "i" in loop header.
114 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
115 Rename inner "type", "expect_type".
116 (evaluate_subexp_for_sizeof): Rename inner "pc".
117 * elfread.c (elf_symfile_read): Rename inner "abfd".
118 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
119 "bytes_read".
120 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
121 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
122 (dwarf_decode_line_header): Rename inner "lh".
123 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
124 "offset". Declare "i" in loop header.
125 (disassemble_dwarf_expression): Rename inner "addr_size".
126 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
127 inner "result".
128 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
129 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
130 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
131 "inner_list_emitter".
132 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
133 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
134 declaration in a block.
135 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
136 * cp-valprint.c (cp_print_value_fields): Don't redeclare
137 "obstack_final_size".
138 * cp-support.c (inspect_type): Declare "i" in loop header.
139 * compile/compile.c (compile_instance::insert_symbol_error):
140 Rename inner "e".
141 * common/agent.c (agent_run_command): Remove inner "ret"
142 declaration.
143 * coffread.c (coff_symfile_read): Rename inner "name".
144 (coff_symfile_read): Rename inner "abfd".
145 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
146 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
147 "high".
148 * c-exp.y (lex_one_token): Move "len" declaration lower.
149 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
150 "gdbarch".
151 (create_exception_master_breakpoint): Likewise. Don't redeclare
152 "b".
153 (watch_command_1): Declare "mark" later.
154 (clear_command): Don't shadow "a" or "b".
155 (delete_command): Rename inner "b".
156 (delete_trace_command): Likewise.
157 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
158 "op".
159 (arm_gdbarch_init): Remove inner "e_flags".
160 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
161 "offset" in inner blocks.
162
163 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
164
165 * dwarf-index-write.c (file_write): Don't write if the vector is
166 empty.
167
168 2018-10-05 Tom de Vries <tdevries@suse.de>
169
170 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
171 PyArg_ParseTuple call.
172
173 2018-10-05 Tom de Vries <tdevries@suse.de>
174
175 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
176 PyArg_ParseTuple call.
177
178 2018-10-04 Joel Brobecker <brobecker@adacore.com>
179
180 * psymtab.c (recursively_search_psymtabs): Reformat parameters
181 to avoid exceeding 80 characters per line limit.
182
183 2018-10-04 Tom Tromey <tom@tromey.com>
184
185 * symfile.c (syms_from_objfile_1, finish_new_objfile)
186 (reread_symbols): Update.
187 * complaints.h (clear_complaints): Remove argument.
188 * complaints.c (enum complaint_series): Remove.
189 (series): Remove global.
190 (complaint_internal): Update.
191 (clear_complaints): Remove argument.
192
193 2018-10-04 Tom Tromey <tom@tromey.com>
194
195 * symfile.c (symbol_file_add_with_addrs): Do not print "no
196 debugging symbols" message if there is a separate debug objfile.
197
198 2018-10-04 Tom Tromey <tom@tromey.com>
199
200 PR cli/19551:
201 * symfile.c (symbol_file_add_with_addrs): Update output.
202 * psymtab.c (require_partial_symbols): Update output.
203
204 2018-10-04 Tom Tromey <tom@tromey.com>
205
206 PR cli/22234:
207 * complaints.c: Emit \n.
208
209 2018-10-04 Tom Tromey <tom@tromey.com>
210
211 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
212 (separate_debug_file_exists, find_separate_debug_file)
213 (add_symbol_file_command, reread_symbols, allocate_symtab)
214 (allocate_compunit_symtab): Use filtered printing, not
215 unfiltered.
216 * psymtab.c (require_partial_symbols, dump_psymtab)
217 (allocate_psymtab): Use filtered printing, not unfiltered.
218
219 2018-10-04 Tom Tromey <tom@tromey.com>
220
221 * complaints.c (complaint_internal): Correctly check complaint
222 count.
223
224 2018-10-04 Tom Tromey <tom@tromey.com>
225
226 * complaints.h (struct complaints): Remove declaration.
227 * complaints.c (clear_complaints): Remove an unused variable.
228
229 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
230
231 * MAINTAINERS (Write After Approval): Add self.
232
233 2018-10-03 Tom Tromey <tom@tromey.com>
234
235 * guile/scm-value.c (gdbscm_value_to_string): Initialize
236 "buffer_contents".
237 * coffread.c (coff_symtab_read): Initialize "newobj".
238
239 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
240
241 * dwarf2read.c (read_func_scope): Remove struct keyword in
242 range-based for.
243
244 2018-10-03 Tom Tromey <tom@tromey.com>
245
246 * README: Mention --enable-ubsan.
247 * NEWS: Mention --enable-ubsan.
248 * acinclude.m4: Include sanitize.m4.
249 * configure: Rebuild.
250 * configure.ac: Call AM_GDB_UBSAN.
251 * sanitize.m4: New file.
252
253 2018-10-03 Tom Tromey <tom@tromey.com>
254
255 * expression.h (enum exp_opcode): Use uint8_t as base type.
256 * expprint.c (op_name): Handle invalid opcodes.
257
258 2018-10-03 Tom Tromey <tom@tromey.com>
259
260 * parse.c (prefixify_expression): Add assert.
261 (parse_exp_in_context_1): Throw exception if the expression is
262 empty.
263
264 2018-10-03 Tom Tromey <tom@tromey.com>
265
266 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
267
268 2018-10-03 Tom Tromey <tom@tromey.com>
269
270 * c-exp.y (parse_number): Work in unsigned. Remove casts.
271
272 2018-10-03 Tom Tromey <tom@tromey.com>
273
274 * dwarf2read.c (read_subrange_type): Make "negative_mask"
275 unsigned.
276
277 2018-10-03 Tom Tromey <tom@tromey.com>
278
279 * findvar.c (extract_integer): Do work in an unsigned type.
280
281 2018-10-03 Tom Tromey <tom@tromey.com>
282
283 * common/enum-flags.h (enum_flags::operator~): Add static assert.
284 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
285 base type.
286 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
287 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
288 type.
289 * c-lang.h (enum c_string_type_values): Use unsigned as base
290 type.
291 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
292
293 2018-10-03 Tom Tromey <tom@tromey.com>
294
295 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
296 <~dwarf2_frame_state_reg_info>: Update.
297 <dwarf2_frame_state_reg_info>: Update.
298 <alloc_regs>: Add assertion. Update.
299 <reg>: Now a std::vector.
300 <num_regs>: Remove.
301 <swap>: Update.
302 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
303 (execute_cfa_program_test, dwarf2_frame_cache): Update.
304
305 2018-10-03 Tom Tromey <tom@tromey.com>
306
307 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
308
309 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
310
311 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
312
313 2018-10-02 Tom Tromey <tom@tromey.com>
314
315 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
316
317 2018-10-02 John Darrington <john@darrington.wattle.id.au>
318
319 * NEWS: Mention changed commands.
320 * ser-uds.c: New file.
321 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
322 * configure: Regenerate.
323 * Makefile.in: Add new file.
324 * serial.c (serial_open): Check if filename is a socket
325 and lookup the appropriate interface accordingly.
326
327 2018-10-01 Alan Hayward <alan.hayward@arm.com>
328
329 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
330 define.
331 (AARCH64_EXTRA_MAGIC): Likewise.
332 (AARCH64_FPSIMD_MAGIC): Likewise.
333 (AARCH64_SVE_MAGIC): Likewise.
334 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
335 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
336 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
337 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
338 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
339 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
340 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
341 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
342 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
343 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
344 (read_aarch64_ctx): Add function.
345 (aarch64_linux_sigframe_init): Detect FP registers.
346
347 2018-10-01 Alan Hayward <alan.hayward@arm.com>
348
349 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
350 (AARCH64_D0_REGNUM): Likewise.
351 (AARCH64_S0_REGNUM): Likewise.
352 (AARCH64_H0_REGNUM): Likewise.
353 (AARCH64_B0_REGNUM): Likewise.
354 (AARCH64_SVE_V0_REGNUM): Likewise.
355 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
356 (AARCH64_D0_REGNUM): Likewise.
357 (AARCH64_S0_REGNUM): Likewise.
358 (AARCH64_H0_REGNUM): Likewise.
359 (AARCH64_B0_REGNUM): Likewise.
360 (AARCH64_SVE_V0_REGNUM): Likewise.
361
362 2018-10-01 Gary Benson <gbenson@redhat.com>
363
364 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
365 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
366 prfpregset_t instead of gdb_prfpregset_t.
367 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
368 * configure, config.in: Rebuild.
369
370 2018-10-01 Gary Benson <gbenson@redhat.com>
371
372 * common/gdb_proc_service.h: New file, factored out from...
373 * gdb_proc_service.h: Moved common code to the above file.
374 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
375
376 2018-10-01 Gary Benson <gbenson@redhat.com>
377
378 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
379 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
380
381 2018-10-01 Gary Benson <gbenson@redhat.com>
382
383 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
384 (AC_CHECK_HEADERS): Check for linux/elf.h.
385 * configure, config.in: Rebuild.
386 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
387 doesn't define elf_fpregset_t.
388
389 2018-10-01 Gary Benson <gbenson@redhat.com>
390
391 * gdb_proc_service.h: Whitespace change.
392
393 2018-10-01 Tom Tromey <tom@tromey.com>
394
395 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
396 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
397 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
398
399 2018-10-01 Tom Tromey <tom@tromey.com>
400
401 * README: Minor change.
402
403 2018-09-30 Pedro Alves <palves@redhat.com>
404
405 * darwin-nat-info.c (darwin_debug_regions_recurse)
406 (info_mach_exceptions_command): Remove unused local variables.
407 * darwin-nat.c (darwin_decode_notify_message)
408 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
409 (darwin_stop_inferior, darwin_setup_exceptions)
410 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
411 (darwin_nat_target::attach, darwin_nat_target::detach)
412 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
413 local variables.
414 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
415 variables.
416
417 2018-09-29 Tom Tromey <tom@tromey.com>
418
419 * README: Remove some leftover text.
420
421 2018-09-29 Tom Tromey <tom@tromey.com>
422
423 * PROBLEMS: Rewrite.
424 * README: Update.
425
426 2018-09-28 John Baldwin <jhb@FreeBSD.org>
427
428 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
429 case with explicit breakpoint kind.
430 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
431 'additional_info' and related logic.
432 (riscv_debug_breakpoints): New variable.
433 (riscv_breakpoint_kind_from_pc): Use the length of the existing
434 instruction to determine the breakpoint kind.
435 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
436 flag. Update description of 'set/show riscv
437 use-compressed-breakpoints' flag.
438
439 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
440
441 (NEWS): Mention changes to frame related commands.
442 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
443 (add_prefix_cmd_suppress_notification): New function.
444 (add_com_suppress_notification): Call
445 add_cmd_suppress_notification.
446 * command.h (add_cmd_suppress_notification): Declare.
447 (add_prefix_cmd_suppress_notification): Declare.
448 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
449 (parse_frame_specification): Moved from stack.c, with
450 simplification to handle a single argument.
451 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
452 switch to the selected frame. Add a header comment.
453 * stack.c: Remove 'safe-ctype.h' include.
454 (find_frame_for_function): Add declaration.
455 (find_frame_for_address): New function.
456 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
457 (frame_selection_by_function_completer): New function.
458 (info_frame_command): Rename to...
459 (info_frame_command_core): ...this, and update parameter types.
460 (select_frame_command): Rename to...
461 (select_frame_command_core): ...this, and update parameter types.
462 (frame_command): Rename to...
463 (frame_command_core): ...this, and update parameter types.
464 (class frame_command_helper): New class to wrap implementations of
465 frame related sub-commands.
466 (frame_apply_cmd_list): New static global.
467 (frame_cmd_list): Make static.
468 (select_frame_cmd_list): New global for sub-commands.
469 (info_frame_cmd_list): New global for sub-commands.
470 (_initialize_stack): Register sub-commands for 'frame',
471 'select-frame', and 'info frame'. Update 'frame apply' commands
472 to use frame_apply_cmd_list. Move function local static
473 frame_apply_list to file static frame_apply_cmd_list for
474 consistency.
475 * stack.h (select_frame_command): Delete declarationn.
476 (select_frame_for_mi): Declare new function.
477
478 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
479
480 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
481 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
482 and NOP.
483
484 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
485
486 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
487
488 2018-09-26 Tom Tromey <tom@tromey.com>
489
490 * valops.c (auto_abandon): Remove dead code.
491
492 2018-09-26 Tom Tromey <tom@tromey.com>
493
494 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
495
496 2018-09-24 Tom Tromey <tom@tromey.com>
497
498 * common/pathstuff.c (get_standard_cache_dir): Make
499 "xdg_cache_home" and "home" const.
500 * top.c (init_history): Make "tmpenv" const.
501 * main.c (get_init_files): Make "homedir" const.
502
503 2018-09-23 Tom Tromey <tom@tromey.com>
504
505 PR python/18852:
506 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
507
508 2018-09-23 Tom Tromey <tom@tromey.com>
509
510 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
511 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
512 * python/python-internal.h (gdbpy_handle_exception): Declare.
513 * python/py-utils.c (gdbpy_handle_exception): New function.
514
515 2018-09-23 Tom Tromey <tom@tromey.com>
516
517 PR python/17284:
518 * python/py-type.c (typy_template_argument): Check for negative
519 argument number.
520
521 2018-09-23 Tom Tromey <tom@tromey.com>
522
523 PR python/14062:
524 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
525
526 2018-09-23 Tom Tromey <tom@tromey.com>
527
528 PR python/18170:
529 * python/py-value.c (valpy_int): Allow conversion from pointer
530 type.
531
532 2018-09-23 Tom Tromey <tom@tromey.com>
533
534 PR python/20126:
535 * python/py-value.c (valpy_int): Respect type sign.
536
537 2018-09-23 Tom Tromey <tom@tromey.com>
538
539 PR python/18352;
540 * python/py-value.c (valpy_float): Allow conversions from int or
541 char.
542 (valpy_int, valpy_long): Allow conversions from float.
543
544 2018-09-23 Tom Tromey <tom@tromey.com>
545
546 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
547 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
548
549 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
550
551 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
552 __sighndlr.
553 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
554
555 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
556
557 * windows-nat.c (windows_nat_target::wait): Remove a spurious
558 target_terminal::ours().
559
560 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
561
562 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
563 of vl to ULONGEST.
564
565 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
566
567 * breakpoint.c (update_inserted_breakpoint_locations): Remove
568 redundant condition.
569
570 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
571
572 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
573
574 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
575 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
576 * sol-thread.c (ps_pdmodel): Don't guard definition.
577
578 * procfs.c: Fix formatting.
579
580 * procfs.c (sysset_t_alloc): Remove.
581 (create_procinfo): Use XNEW instead of sysset_t_alloc.
582 (procfs_debug_inferior): Likewise.
583 (procfs_set_exec_trap): Likewise.
584 (proc_set_traced_sysentry): Don't allocate argp dynamically.
585 (proc_set_traced_sysexit): Likewise.
586
587 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
588 (dead_procinfo): Likewise.
589 (proc_warn): Likewise.
590 (proc_error): Likewise.
591 (proc_get_LDT_entry): Likewise.
592 (do_attach): Likewise.
593 (procfs_target::pid_to_str): Likewise.
594 (iterate_over_mappings): Likewise.
595
596 * procfs.c (create_procinfo): Fix ARI warning.
597 (proc_get_status): Likewise.
598 (proc_stop_process): Likewise.
599 (proc_run_process): Likewise.
600 (proc_kill): Likewise.
601 (proc_get_LDT_entry): Likewise.
602 (procfs_find_LDT_entry): Likewise.
603 (proc_update_threads): Likewise.
604 (proc_iterate_over_threads): Likewise.
605 (do_attach): Likewise.
606 (procfs_xfer_memory): Likewise.
607 (invalidate_cache): Likewise.
608 (procfs_target::resume): Likewise.
609 (procfs_init_inferior): Likewise.
610 (procfs_set_exec_trap): Likewise.
611 (procfs_target::thread_alive): Likewise.
612 (procfs_target::pid_to_exec_file): Likewise.
613 (iterate_over_mappings): Likewise.
614 (procfs_target::make_corefile_notes): Likewise.
615 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
616
617 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
618 (procfs_find_LDT_entry): Likewise.
619 * sol-thread.c (ps_lgetLDT): Likewise.
620
621 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
622
623 PR tdep/17903
624 * procfs.c (procfs_target): Declare pid_to_exec_file.
625 (procfs_target::pid_to_exec_file): New.
626
627 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
628
629 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
630 renaming.
631 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
632 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
633
634 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
635
636 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
637 (supply_fpregset, fill_fpregset): Move ...
638 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
639 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
640 Remove references to ioctl-based procfs.
641 Include <sys/reg.h>.
642 Remove PR_MODEL_NATIVE guards.
643 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
644 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
645
646 2018-09-19 Xavier Roirand <roirand@adacore.com>
647
648 PR gdb/20981:
649 * solib-darwin.c (darwin_get_dyld_bfd): New function.
650 (darwin_solib_get_all_image_info_addr_at_init): Update call.
651 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
652
653 2018-09-19 John Baldwin <jhb@FreeBSD.org>
654
655 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
656 (fbsd_print_sockaddr_in6): Likewise.
657
658 2018-09-19 Richard Bunt <richard.bunt@arm.com>
659 Chris January <chris.january@arm.com>
660
661 * eval.c (skip_undetermined_arglist): Skip argument list helper.
662 (evaluate_subexp_standard): Return a dummy type when
663 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
664 OP_F77_UNDETERMINED_ARGLIST case.
665 * expression.h (enum noside): Update comment.
666
667 2018-09-19 George Vasick <george.vasick@oracle.com>
668
669 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
670
671 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
672 April Chin <april.chin@oracle.com>
673 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
674
675 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
676 uint_t lwpid_t.
677 (create_procinfo): Print pids in /proc without leading zeros.
678
679 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
680
681 * nios2-tdep.c (nios2_gcc_target_options): New.
682 (nios2_gdb_arch_init): Install new hook.
683
684 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
685
686 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
687 New file.
688 * update-gnulib.sh: Apply patch.
689 * configure: Re-generate.
690
691 2018-09-18 John Baldwin <jhb@FreeBSD.org>
692
693 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
694 description. Make "info proc" command descriptions more
695 consistent.
696
697 2018-09-18 John Baldwin <jhb@FreeBSD.org>
698
699 * NEWS: Mention 'info proc files' command.
700
701 2018-09-18 John Baldwin <jhb@FreeBSD.org>
702
703 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
704 descriptors for IP_FILES and IP_ALL.
705
706 2018-09-18 John Baldwin <jhb@FreeBSD.org>
707
708 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
709 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
710 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
711 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
712 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
713 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
714 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
715 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
716 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
717 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
718 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
719 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
720 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
721 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
722 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
723 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
724 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
725 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
726 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
727 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
728 (struct fbsd_sockaddr_un): New types.
729 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
730 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
731 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
732 (fbsd_core_info_proc_files): New functions.
733 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
734 IP_ALL.
735 * fbsd-tdep.h (fbsd_info_proc_files_header)
736 (fbsd_info_proc_files_entry): New.
737
738 2018-09-18 John Baldwin <jhb@FreeBSD.org>
739
740 * defs.h (enum info_proc_what) [IP_FILES]: New value.
741 * infcmd.c (info_proc_cmd_files): New function.
742 (_initialize_infcmd): Register 'info proc files' command.
743
744 2018-09-18 John Baldwin <jhb@FreeBSD.org>
745
746 * gnulib/aclocal-m4-deps.mk: Re-generate.
747 * gnulib/aclocal.m4: Re-generate.
748 * gnulib/config.in: Re-generate.
749 * gnulib/configure: Re-generate.
750 * gnulib/import/Makefile.am: Re-generate.
751 * gnulib/import/Makefile.in: Re-generate.
752 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
753 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
754 * gnulib/import/arpa_inet.in.h: New file.
755 * gnulib/import/inet_ntop.c: New file.
756 * gnulib/import/m4/arpa_inet_h.m4: New file.
757 * gnulib/import/m4/inet_ntop.m4: New file.
758 * gnulib/import/m4/netinet_in_h.m4: New file.
759 * gnulib/import/m4/socklen.m4: New file.
760 * gnulib/import/m4/sockpfaf.m4: New file.
761 * gnulib/import/m4/stdalign.m4: New file.
762 * gnulib/import/m4/sys_uio_h.m4: New file.
763 * gnulib/import/netinet_in.in.h: New file.
764 * gnulib/import/stdalign.in.h: New file.
765 * gnulib/import/sys_socket.c: New file.
766 * gnulib/import/sys_socket.in.h: New file.
767 * gnulib/import/sys_uio.in.h: New file.
768 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
769 module.
770
771 2018-09-18 John Baldwin <jhb@FreeBSD.org>
772
773 * gnulib/aclocal-m4-deps.mk: New file.
774 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
775 deterministically.
776
777 2018-09-18 John Baldwin <jhb@FreeBSD.org>
778
779 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
780 KVE_PATH.
781
782 2018-09-18 Tom Tromey <tom@tromey.com>
783
784 * compile/compile-object-load.c (struct
785 link_hash_table_cleanup_data): Add constructor and destructor.
786 Use DISABLE_COPY_AND_ASSIGN.
787 (~link_hash_table_cleanup_data): Rename from
788 link_hash_table_free. Now a destructor.
789 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
790
791 2018-09-18 Tom Tromey <tom@tromey.com>
792
793 * compile/compile-object-run.c (do_module_cleanup): Use delete.
794 * compile/compile-object-load.c (struct munmap_list): Move to
795 header file.
796 (munmap_list::add): Rename from munmap_list_add; rewrite.
797 (munmap_list::~munmap_list): Rename from munmap_list_free.
798 (munmap_listp_free_cleanup): Remove.
799 (compile_object_load): Update.
800 * compile/compile-object-load.h (struct munmap_list): Move from
801 compile-object-load.c. Rewrite.
802
803 2018-09-18 Alan Hayward <alan.hayward@arm.com>
804
805 * aarch64-tdep.c (pass_in_v): Use register size.
806 (aarch64_extract_return_value): Likewise.
807 (aarch64_store_return_value): Likewise.
808
809 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
810
811 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
812 rlim_t.
813
814 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
815
816 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
817 Fix short help line.
818
819 2018-09-17 Tom Tromey <tom@tromey.com>
820
821 PR python/20445:
822 * configure: Rebuild.
823 * configure.ac: Conditionally use -DNDEBUG for Python.
824
825 2018-09-17 Tom Tromey <tom@tromey.com>
826
827 * configure: Rebuild.
828 * configure.ac: Use gmp as a library dependency when checking for
829 mpfr.
830
831 2018-09-17 Pedro Alves <palves@redhat.com>
832
833 * python/py-inferior.c (find_inferior_object): Delete.
834
835 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
836
837 * compile/compile-cplus-types.c
838 (compile_cplus_instance::enter_scope): Don't use new_scope after
839 std::move.
840
841 2018-09-17 Tom Tromey <tom@tromey.com>
842
843 * common/pathstuff.c (get_standard_cache_dir): Use
844 ~/Library/Caches on macOS.
845 * common/pathstuff.h (get_standard_cache_dir): Update comment.
846
847 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
848
849 PR python/23669
850 * breakpoint.c (commands_cmd_element): New.
851 (_initialize_breakpoint): Assign commands_cmd_element.
852 * breakpoint.h (commands_cmd_element): New.
853 * cli/cli-script.c (while_cmd_element, if_command,
854 define_cmd_element): New.
855 (command_name_equals): Remove.
856 (process_next_line): Compare commands by pointer, not by name.
857 (_initialize_cli_script): Assign the various cmd_list_element
858 variables.
859 * compile/compile.c (compile_cmd_element): New.
860 (_initialize_compile): Assign compile_cmd_element.
861 * compile/compile.h (compile_cmd_element): New.
862 * guile/guile.c (guile_cmd_element): New.
863 (install_gdb_commands): Assign guile_cmd_element.
864 * guile/guile.h (guile_cmd_element): New.
865 * python/python.c (python_cmd_element): New.
866 (_initialize_python): Assign python_cmd_element.
867 * python/python.h (python_cmd_element): New.
868 * tracepoint.c (while_stepping_cmd_element): New.
869 (_initialize_tracepoint): Assign while_stepping_cmd_element.
870 * tracepoint.h (while_stepping_cmd_element): New.
871
872 2018-09-17 Tom Tromey <tom@tromey.com>
873
874 * infrun.c (save_infcall_suspend_state): Return
875 infcall_suspend_state_up.
876 (save_infcall_control_state): Return infcall_control_state_up.
877 * inferior.h (save_infcall_suspend_state)
878 (save_infcall_control_state): Declare later. Return unique
879 pointers.
880
881 2018-09-17 Tom Tromey <tom@tromey.com>
882
883 * infrun.c (struct stop_context): Declare constructor,
884 destructor, "changed" method.
885 (stop_context::stop_context): Rename from save_stop_context.
886 (stop_context::~stop_context): Rename from
887 release_stop_context_cleanup.
888 (normal_stop): Update.
889 (stop_context::changed): Rename from stop_context_changed. Return
890 bool.
891
892 2018-09-17 Tom Tromey <tom@tromey.com>
893
894 * inferior.h (struct infcall_suspend_state_deleter): New.
895 (infcall_suspend_state_up): New typedef.
896 (struct infcall_control_state_deleter): New.
897 (infcall_control_state_up): New typedef.
898 (make_cleanup_restore_infcall_suspend_state)
899 (make_cleanup_restore_infcall_control_state): Don't declare.
900 * infcall.c (call_function_by_hand_dummy): Update.
901 * infrun.c (do_restore_infcall_suspend_state_cleanup)
902 (make_cleanup_restore_infcall_suspend_state): Remove.
903 (do_restore_infcall_control_state_cleanup)
904 (make_cleanup_restore_infcall_control_state): Remove.
905
906 2018-09-17 Tom Tromey <tom@tromey.com>
907
908 * gdbthread.h (struct thread_control_state): Add initializer.
909 (class thread_info) <control>: Remove initializer.
910 * inferior.h (struct inferior_control_state): Add initializer.
911 (class inferior) <control>: Remove initializer.
912 (exit_inferior_1): Update.
913 * infrun.c (struct infcall_control_state): Add constructors.
914 (save_infcall_control_state): Use new.
915 (restore_infcall_control_state, discard_infcall_control_state):
916 Use delete.
917
918 2018-09-17 Tom Tromey <tom@tromey.com>
919
920 * infrun.c (struct infcall_suspend_state) <registers>: Now a
921 unique_ptr.
922 <siginfo_data>: Now a unique_xmalloc_ptr.
923 (save_infcall_suspend_state, restore_infcall_suspend_state)
924 (discard_infcall_suspend_state)
925 (get_infcall_suspend_state_regcache): Update.
926
927 2018-09-17 Tom Tromey <tom@tromey.com>
928
929 * gdbthread.h (struct thread_suspend_state): Add initializers.
930 (class thread_info) <suspend>: Remove initializer.
931 * infrun.c (struct infcall_suspend_state): Add initializers.
932 (save_infcall_suspend_state): Use new.
933 (discard_infcall_suspend_state): Use delete.
934
935 2018-09-16 Tom Tromey <tom@tromey.com>
936
937 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
938 Remove.
939 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
940 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
941 (py_varobj_iter_new): Likewise.
942 (py_varobj_get_iterator): Use gdbpy_ref.
943
944 2018-09-16 Tom Tromey <tom@tromey.com>
945
946 * python/py-threadevent.c (py_get_event_thread): Simplify.
947 * python/py-inferior.c (infpy_thread_from_thread_handle):
948 Return immediately after calling thread_to_thread_object. Use
949 Py_RETURN_NONE.
950 (thread_to_thread_object): Set the exception on a NULL return.
951
952 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
953
954 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
955
956 2018-09-16 Tom Tromey <tom@tromey.com>
957
958 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
959 Remove.
960
961 2018-09-16 Tom Tromey <tom@tromey.com>
962
963 * python/python-internal.h (thread_to_thread_object): Change
964 return type.
965 * python/py-inferior.c (thread_to_thread_object): Return a new
966 reference.
967 (infpy_thread_from_thread_handle): Update.
968 * python/py-infthread.c (gdbpy_selected_thread): Update.
969 * python/py-stopevent.c (create_stop_event_object): Update.
970 * python/py-threadevent.c (py_get_event_thread): Return a new
971 reference.
972 (py_get_event_thread): Update.
973 * python/py-event.h (py_get_event_thread): Change return type.
974 * python/py-continueevent.c (create_continue_event_object):
975 Update.
976
977 2018-09-16 Tom Tromey <tom@tromey.com>
978
979 * python/py-progspace.c (pspy_get_objfiles): Update.
980 * python/python-internal.h (objfile_to_objfile_object): Change
981 return type.
982 * python/py-newobjfileevent.c (create_new_objfile_event_object):
983 Update.
984 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
985 Update.
986 * python/python.c (gdbpy_get_current_objfile): Update.
987 (gdbpy_objfiles): Update.
988 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
989 Update.
990 (objfile_to_objfile_object): Return a new reference.
991 * python/py-symtab.c (stpy_get_objfile): Update.
992 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
993 Update.
994
995 2018-09-16 Tom Tromey <tom@tromey.com>
996
997 * python/py-inferior.c (infpy_get_progspace): Update.
998 * python/python-internal.h (pspace_to_pspace_object): Change
999 return type.
1000 * python/py-newobjfileevent.c
1001 (create_clear_objfiles_event_object): Update.
1002 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1003 Update.
1004 * python/python.c (gdbpy_get_current_progspace): Update.
1005 (gdbpy_progspaces): Update.
1006 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1007 reference.
1008 * python/py-objfile.c (objfpy_get_progspace): Update.
1009 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1010 Update.
1011
1012 2018-09-16 Tom Tromey <tom@tromey.com>
1013
1014 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1015 (solib_name, block_for_pc, find_pc_line): New functions.
1016 (execute_unwinders): Update.
1017 * python/py-block.c (gdbpy_block_for_pc): Remove.
1018 * python/py-inferior.c (infpy_get_progspace): New function.
1019 (inferior_object_getset) <progspace>: Add.
1020 * python/py-progspace.c (pspy_objfiles): Rewrite.
1021 (pspy_solib_name, pspy_block_for_pc)
1022 (pspy_find_pc_line, pspy_is_valid): New functions.
1023 (progspace_object_methods): Add entries for solib_name,
1024 block_for_pc, find_pc_line, is_valid.
1025 * python/python-internal.h (gdbpy_block_for_pc)
1026 (build_objfiles_list): Don't declare.
1027 * python/python.c: Don't include solib.h.
1028 (gdbpy_solib_name, gdbpy_find_pc_line)
1029 (gdbpy_get_current_progspace, build_objfiles_list)
1030 (gdbpy_objfiles): Remove.
1031 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1032 solib_name, find_pc_line>: Remove entries.
1033
1034 2018-09-16 Tom Tromey <tom@tromey.com>
1035
1036 * top.c (new_ui_command): Use GNU style for metasyntactic
1037 variables.
1038 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1039 variables.
1040 * maint.c (maintenance_translate_address): Remove "<>" around
1041 text.
1042 * interps.c (interpreter_exec_cmd): Use GNU style for
1043 metasyntactic variables.
1044 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1045 metasyntactic variables.
1046 * tracepoint.c (tfind_range_command): Use GNU style for
1047 metasyntactic variables.
1048 (tfind_outside_command): Likewise.
1049 (_initialize_tracepoint): Likewise.
1050 * remote.c (extended_remote_target::create_inferior): Use GNU
1051 style for metasyntactic variables.
1052 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1053 metasyntactic variables.
1054 (adi_assign_command): Likewise.
1055
1056 2018-09-16 Tom Tromey <tom@tromey.com>
1057
1058 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1059 metasyntactic variables. Print message if no disassembler options
1060 are available.
1061
1062 2018-09-15 Tom Tromey <tom@tromey.com>
1063
1064 * infcmd.c (get_inferior_args): Return const char *.
1065 * inferior.h (get_inferior_args): Return type now const.
1066 * linux-tdep.c (linux_fill_prpsinfo): Update.
1067 * procfs.c (procfs_target::make_corefile_notes): Update.
1068
1069 2018-09-07 Tom Tromey <tom@tromey.com>
1070
1071 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1072 inside the TRY.
1073
1074 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1075
1076 * nios2-tdep.c (nios2_type_align): New.
1077 (nios2_gdb_arch_init): Install type_align hook.
1078
1079 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1080
1081 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1082 type that is neither object file owned, nor gdbarch owned.
1083 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1084 gdbarch is non-NULL.
1085 (alloc_type_instance): Allocate non-objfile owned types on the
1086 gdbarch obstack.
1087 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1088 using TYPE_ALLOC to ensure memory is allocated on the correct
1089 obstack.
1090 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1091 obstack, or the gdbarch obstack.
1092 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1093
1094 2018-09-14 Tom Tromey <tom@tromey.com>
1095
1096 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1097 block.
1098
1099 2018-09-14 Tom Tromey <tom@tromey.com>
1100
1101 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1102
1103 2018-09-13 Tom Tromey <tom@tromey.com>
1104
1105 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1106 static.
1107
1108 2018-09-13 Tom Tromey <tom@tromey.com>
1109
1110 * exec.c (try_open_exec_file): Use std::string.
1111
1112 2018-09-13 Tom Tromey <tom@tromey.com>
1113
1114 * utils.h (gdb_bfd_errmsg): Return std::string.
1115 * exec.c (exec_file_attach): Update.
1116 * compile/compile-object-load.c (compile_object_load): Update.
1117 * utils.c (gdb_bfd_errmsg): Return std::string.
1118
1119 2018-09-13 Tom Tromey <tom@tromey.com>
1120
1121 * procfs.c (struct procinfo_deleter): New.
1122 (procinfo_up): New typedef.
1123 (do_destroy_procinfo_cleanup): Remove.
1124 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1125
1126 2018-09-13 Tom Tromey <tom@tromey.com>
1127
1128 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1129
1130 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1131 2018-09-13 Tom Tromey <tom@tromey.com>
1132
1133 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1134 (pspy_get_objfiles): New function.
1135 (progspace_object_methods): New.
1136 (pspace_object_type): Add tp_methods callback.
1137 * python/python-internal.h (build_objfiles_list): New
1138 declaration.
1139 * python/python.c (build_objfiles_list): New function.
1140 (gdbpy_objfiles): Implement using build_objfiles_list.
1141 * NEWS: Mention the Progspace.objfiles method.
1142
1143 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1144
1145 * python/py-inferior.c (infpy_get_progspace): New function.
1146 (inferior_object_getset): Add progspace property.
1147 * NEWS: Mention the new property.
1148
1149 2018-09-13 Tom Tromey <tom@tromey.com>
1150
1151 PR rust/23650:
1152 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1153
1154 2018-09-13 Tom Tromey <tom@tromey.com>
1155
1156 PR rust/23626:
1157 * rust-lang.c (rust_enum_variant): Now static.
1158 (rust_empty_enum_p): New function.
1159 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1160 Handle empty enum.
1161
1162 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1163
1164 * python/py-inferior.c (infpy_repr): New.
1165 (inferior_object_type): Register infpy_repr.
1166 * python/py-objfile.c (objfpy_repr): New.
1167 (objfile_object_type): Register objfpy_repr.
1168
1169 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1170
1171 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1172
1173 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1174
1175 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1176 typo.
1177
1178 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1179
1180 * common/common-utils.c: Don't include '<sys/stat.h>'.
1181 (is_regular_file): Move to...
1182 * common/filestuff.c (is_regular_file): ... here.
1183 * common/common-utils.h (is_regular_file): Move to...
1184 * common/filestuff.h (is_regular_file): ... here.
1185
1186 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1187
1188 * skip.c (debug_skip): New variable.
1189 (skiplist_entry::do_skip_file_p): Add debug output.
1190 (skiplist_entry::do_skip_gfile_p): Likewise.
1191 (skiplist_entry::skip_function_p): Likewise.
1192 (_initialize_step_skip): Create debug command.
1193 * NEWS: Mention set/show debug skip.
1194
1195 2018-09-11 Xavier Roirand <roirand@adacore.com>
1196
1197 * darwin-nat.c (should_disable_startup_with_shell):
1198 New function.
1199 (darwin_nat_target::create_inferior): Add call.
1200
1201 2018-09-11 Xavier Roirand <roirand@adacore.com>
1202
1203 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1204 inf_port, msg_state>: Initialize.
1205 (struct darwin_thread_info) <signaled, single_step>: Change
1206 type and initialize.
1207 (struct darwin_thread_info) <event>: Initialize.
1208
1209 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1210
1211 PR gdb/23555
1212 PR gdb/23558
1213 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1214 guesses.
1215
1216 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1217
1218 Revert:
1219 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1220
1221 PR gdb/23555
1222 PR gdb/23558
1223 * gnulib/aclocal.m4: Regenerate.
1224 * gnulib/config.in: Regenerate.
1225 * gnulib/configure: Regenerate.
1226 * gnulib/import/Makefile.am: Update.
1227 * gnulib/import/Makefile.in: Update.
1228 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1229 * gnulib/import/_Noreturn.h: ... this.
1230 * gnulib/import/alloca.in.h: Update.
1231 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1232 * gnulib/import/arg-nonnull.h: ... this.
1233 * gnulib/import/assure.h: Update.
1234 * gnulib/import/at-func.c: Update.
1235 * gnulib/import/basename-lgpl.c: Update.
1236 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1237 * gnulib/import/c++defs.h: ... this.
1238 * gnulib/import/canonicalize-lgpl.c: Update.
1239 * gnulib/import/cdefs.h: Update.
1240 * gnulib/import/chdir-long.c: Update.
1241 * gnulib/import/chdir-long.h: Update.
1242 * gnulib/import/cloexec.c: Update.
1243 * gnulib/import/cloexec.h: Update.
1244 * gnulib/import/close.c: Update.
1245 * gnulib/import/closedir.c: Update.
1246 * gnulib/import/config.charset: Update.
1247 * gnulib/import/dirent-private.h: Update.
1248 * gnulib/import/dirent.in.h: Update.
1249 * gnulib/import/dirfd.c: Update.
1250 * gnulib/import/dirname-lgpl.c: Update.
1251 * gnulib/import/dirname.h: Update.
1252 * gnulib/import/dosname.h: Update.
1253 * gnulib/import/dup-safer-flag.c: Update.
1254 * gnulib/import/dup-safer.c: Update.
1255 * gnulib/import/dup.c: Update.
1256 * gnulib/import/dup2.c: Update.
1257 * gnulib/import/errno.in.h: Update.
1258 * gnulib/import/error.c: Update.
1259 * gnulib/import/error.h: Update.
1260 * gnulib/import/exitfail.c: Update.
1261 * gnulib/import/exitfail.h: Update.
1262 * gnulib/import/extra/update-copyright: Update.
1263 * gnulib/import/fchdir.c: Update.
1264 * gnulib/import/fcntl.c: Update.
1265 * gnulib/import/fcntl.in.h: Update.
1266 * gnulib/import/fd-hook.c: Update.
1267 * gnulib/import/fd-hook.h: Update.
1268 * gnulib/import/fd-safer-flag.c: Update.
1269 * gnulib/import/fd-safer.c: Update.
1270 * gnulib/import/fdopendir.c: Update.
1271 * gnulib/import/filename.h: Update.
1272 * gnulib/import/filenamecat-lgpl.c: Update.
1273 * gnulib/import/filenamecat.h: Update.
1274 * gnulib/import/flexmember.h: Update.
1275 * gnulib/import/float+.h: Update.
1276 * gnulib/import/float.c: Update.
1277 * gnulib/import/float.in.h: Update.
1278 * gnulib/import/fnmatch.c: Update.
1279 * gnulib/import/fnmatch.in.h: Update.
1280 * gnulib/import/fnmatch_loop.c: Update.
1281 * gnulib/import/fpucw.h: Update.
1282 * gnulib/import/frexp.c: Update.
1283 * gnulib/import/frexpl.c: Update.
1284 * gnulib/import/fstat.c: Update.
1285 * gnulib/import/fstatat.c: Update.
1286 * gnulib/import/getcwd-lgpl.c: Update.
1287 * gnulib/import/getcwd.c: Update.
1288 * gnulib/import/getdtablesize.c: Update.
1289 * gnulib/import/getlogin_r.c: Update.
1290 * gnulib/import/getprogname.c: Update.
1291 * gnulib/import/getprogname.h: Update.
1292 * gnulib/import/gettext.h: Update.
1293 * gnulib/import/gettimeofday.c: Update.
1294 * gnulib/import/glob-libc.h: Update.
1295 * gnulib/import/glob.c: Update.
1296 * gnulib/import/glob.in.h: Update.
1297 * gnulib/import/glob_internal.h: Update.
1298 * gnulib/import/glob_pattern_p.c: Update.
1299 * gnulib/import/globfree.c: Update.
1300 * gnulib/import/hard-locale.c: Update.
1301 * gnulib/import/hard-locale.h: Update.
1302 * gnulib/import/intprops.h: Update.
1303 * gnulib/import/inttypes.in.h: Update.
1304 * gnulib/import/isnan.c: Update.
1305 * gnulib/import/isnand-nolibm.h: Update.
1306 * gnulib/import/isnand.c: Update.
1307 * gnulib/import/isnanl-nolibm.h: Update.
1308 * gnulib/import/isnanl.c: Update.
1309 * gnulib/import/itold.c: Update.
1310 * gnulib/import/libc-config.h: Update.
1311 * gnulib/import/limits.in.h: Update.
1312 * gnulib/import/localcharset.c: Update.
1313 * gnulib/import/localcharset.h: Update.
1314 * gnulib/import/localtime-buffer.c: Update.
1315 * gnulib/import/localtime-buffer.h: Update.
1316 * gnulib/import/lstat.c: Update.
1317 * gnulib/import/m4/00gnulib.m4: Update.
1318 * gnulib/import/m4/__inline.m4: Update.
1319 * gnulib/import/m4/absolute-header.m4: Update.
1320 * gnulib/import/m4/alloca.m4: Update.
1321 * gnulib/import/m4/builtin-expect.m4: Update.
1322 * gnulib/import/m4/canonicalize.m4: Update.
1323 * gnulib/import/m4/chdir-long.m4: Update.
1324 * gnulib/import/m4/close.m4: Update.
1325 * gnulib/import/m4/closedir.m4: Update.
1326 * gnulib/import/m4/configmake.m4: Update.
1327 * gnulib/import/m4/d-ino.m4: Update.
1328 * gnulib/import/m4/d-type.m4: Update.
1329 * gnulib/import/m4/dirent_h.m4: Update.
1330 * gnulib/import/m4/dirfd.m4: Update.
1331 * gnulib/import/m4/dirname.m4: Update.
1332 * gnulib/import/m4/double-slash-root.m4: Update.
1333 * gnulib/import/m4/dup.m4: Update.
1334 * gnulib/import/m4/dup2.m4: Update.
1335 * gnulib/import/m4/eealloc.m4: Update.
1336 * gnulib/import/m4/environ.m4: Update.
1337 * gnulib/import/m4/errno_h.m4: Update.
1338 * gnulib/import/m4/error.m4: Update.
1339 * gnulib/import/m4/exponentd.m4: Update.
1340 * gnulib/import/m4/exponentl.m4: Update.
1341 * gnulib/import/m4/extensions.m4: Update.
1342 * gnulib/import/m4/extern-inline.m4: Update.
1343 * gnulib/import/m4/fchdir.m4: Update.
1344 * gnulib/import/m4/fcntl-o.m4: Update.
1345 * gnulib/import/m4/fcntl.m4: Update.
1346 * gnulib/import/m4/fcntl_h.m4: Update.
1347 * gnulib/import/m4/fdopendir.m4: Update.
1348 * gnulib/import/m4/filenamecat.m4: Update.
1349 * gnulib/import/m4/flexmember.m4: Update.
1350 * gnulib/import/m4/float_h.m4: Update.
1351 * gnulib/import/m4/fnmatch.m4: Update.
1352 * gnulib/import/m4/fnmatch_h.m4: Update.
1353 * gnulib/import/m4/fpieee.m4: Update.
1354 * gnulib/import/m4/frexp.m4: Update.
1355 * gnulib/import/m4/frexpl.m4: Update.
1356 * gnulib/import/m4/fstat.m4: Update.
1357 * gnulib/import/m4/fstatat.m4: Update.
1358 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1359 * gnulib/import/m4/getcwd-path-max.m4: Update.
1360 * gnulib/import/m4/getcwd.m4: Update.
1361 * gnulib/import/m4/getdtablesize.m4: Update.
1362 * gnulib/import/m4/getlogin.m4: Update.
1363 * gnulib/import/m4/getlogin_r.m4: Update.
1364 * gnulib/import/m4/getpagesize.m4: Update.
1365 * gnulib/import/m4/getprogname.m4: Update.
1366 * gnulib/import/m4/gettimeofday.m4: Update.
1367 * gnulib/import/m4/glibc21.m4: Update.
1368 * gnulib/import/m4/glob.m4: Update.
1369 * gnulib/import/m4/glob_h.m4: Update.
1370 * gnulib/import/m4/gnulib-cache.m4: Update.
1371 * gnulib/import/m4/gnulib-common.m4: Update.
1372 * gnulib/import/m4/gnulib-comp.m4: Update.
1373 * gnulib/import/m4/gnulib-tool.m4: Update.
1374 * gnulib/import/m4/hard-locale.m4: Update.
1375 * gnulib/import/m4/include_next.m4: Update.
1376 * gnulib/import/m4/inttypes-pri.m4: Update.
1377 * gnulib/import/m4/inttypes.m4: Update.
1378 * gnulib/import/m4/isnand.m4: Update.
1379 * gnulib/import/m4/isnanl.m4: Update.
1380 * gnulib/import/m4/largefile.m4: Update.
1381 * gnulib/import/m4/limits-h.m4: Update.
1382 * gnulib/import/m4/localcharset.m4: Update.
1383 * gnulib/import/m4/locale-fr.m4: Update.
1384 * gnulib/import/m4/locale-ja.m4: Update.
1385 * gnulib/import/m4/locale-zh.m4: Update.
1386 * gnulib/import/m4/localtime-buffer.m4: Update.
1387 * gnulib/import/m4/longlong.m4: Update.
1388 * gnulib/import/m4/lstat.m4: Update.
1389 * gnulib/import/m4/malloc.m4: Update.
1390 * gnulib/import/m4/malloca.m4: Update.
1391 * gnulib/import/m4/math_h.m4: Update.
1392 * gnulib/import/m4/mbrtowc.m4: Update.
1393 * gnulib/import/m4/mbsinit.m4: Update.
1394 * gnulib/import/m4/mbsrtowcs.m4: Update.
1395 * gnulib/import/m4/mbstate_t.m4: Update.
1396 * gnulib/import/m4/memchr.m4: Update.
1397 * gnulib/import/m4/memmem.m4: Update.
1398 * gnulib/import/m4/mempcpy.m4: Update.
1399 * gnulib/import/m4/memrchr.m4: Update.
1400 * gnulib/import/m4/mkdir.m4: Update.
1401 * gnulib/import/m4/mkstemp.m4: Update.
1402 * gnulib/import/m4/mmap-anon.m4: Update.
1403 * gnulib/import/m4/mode_t.m4: Update.
1404 * gnulib/import/m4/msvc-inval.m4: Update.
1405 * gnulib/import/m4/msvc-nothrow.m4: Update.
1406 * gnulib/import/m4/multiarch.m4: Update.
1407 * gnulib/import/m4/nocrash.m4: Update.
1408 * gnulib/import/m4/off_t.m4: Update.
1409 * gnulib/import/m4/onceonly.m4: Update.
1410 * gnulib/import/m4/open-cloexec.m4: Update.
1411 * gnulib/import/m4/open.m4: Update.
1412 * gnulib/import/m4/openat.m4: Update.
1413 * gnulib/import/m4/opendir.m4: Update.
1414 * gnulib/import/m4/pathmax.m4: Update.
1415 * gnulib/import/m4/rawmemchr.m4: Update.
1416 * gnulib/import/m4/readdir.m4: Update.
1417 * gnulib/import/m4/readlink.m4: Update.
1418 * gnulib/import/m4/realloc.m4: Update.
1419 * gnulib/import/m4/rename.m4: Update.
1420 * gnulib/import/m4/rewinddir.m4: Update.
1421 * gnulib/import/m4/rmdir.m4: Update.
1422 * gnulib/import/m4/save-cwd.m4: Update.
1423 * gnulib/import/m4/secure_getenv.m4: Update.
1424 * gnulib/import/m4/setenv.m4: Update.
1425 * gnulib/import/m4/signal_h.m4: Update.
1426 * gnulib/import/m4/ssize_t.m4: Update.
1427 * gnulib/import/m4/stat-time.m4: Update.
1428 * gnulib/import/m4/stat.m4: Update.
1429 * gnulib/import/m4/std-gnu11.m4: Update.
1430 * gnulib/import/m4/stdbool.m4: Update.
1431 * gnulib/import/m4/stddef_h.m4: Update.
1432 * gnulib/import/m4/stdint.m4: Update.
1433 * gnulib/import/m4/stdio_h.m4: Update.
1434 * gnulib/import/m4/stdlib_h.m4: Update.
1435 * gnulib/import/m4/strchrnul.m4: Update.
1436 * gnulib/import/m4/strdup.m4: Update.
1437 * gnulib/import/m4/strerror.m4: Update.
1438 * gnulib/import/m4/string_h.m4: Update.
1439 * gnulib/import/m4/strstr.m4: Update.
1440 * gnulib/import/m4/strtok_r.m4: Update.
1441 * gnulib/import/m4/sys_socket_h.m4: Update.
1442 * gnulib/import/m4/sys_stat_h.m4: Update.
1443 * gnulib/import/m4/sys_time_h.m4: Update.
1444 * gnulib/import/m4/sys_types_h.m4: Update.
1445 * gnulib/import/m4/tempname.m4: Update.
1446 * gnulib/import/m4/time_h.m4: Update.
1447 * gnulib/import/m4/unistd-safer.m4: Update.
1448 * gnulib/import/m4/unistd_h.m4: Update.
1449 * gnulib/import/m4/warn-on-use.m4: Update.
1450 * gnulib/import/m4/wchar_h.m4: Update.
1451 * gnulib/import/m4/wchar_t.m4: Update.
1452 * gnulib/import/m4/wctype_h.m4: Update.
1453 * gnulib/import/m4/wint_t.m4: Update.
1454 * gnulib/import/malloc.c: Update.
1455 * gnulib/import/malloc/scratch_buffer.h: Update.
1456 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1457 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1458 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1459 * gnulib/import/malloca.c: Update.
1460 * gnulib/import/malloca.h: Update.
1461 * gnulib/import/malloca.valgrind: Update.
1462 * gnulib/import/math.in.h: Update.
1463 * gnulib/import/mbrtowc.c: Update.
1464 * gnulib/import/mbsinit.c: Update.
1465 * gnulib/import/mbsrtowcs-impl.h: Update.
1466 * gnulib/import/mbsrtowcs-state.c: Update.
1467 * gnulib/import/mbsrtowcs.c: Update.
1468 * gnulib/import/memchr.c: Update.
1469 * gnulib/import/memmem.c: Update.
1470 * gnulib/import/mempcpy.c: Update.
1471 * gnulib/import/memrchr.c: Update.
1472 * gnulib/import/mkdir.c: Update.
1473 * gnulib/import/mkstemp.c: Update.
1474 * gnulib/import/msvc-inval.c: Update.
1475 * gnulib/import/msvc-inval.h: Update.
1476 * gnulib/import/msvc-nothrow.c: Update.
1477 * gnulib/import/msvc-nothrow.h: Update.
1478 * gnulib/import/open.c: Update.
1479 * gnulib/import/openat-die.c: Update.
1480 * gnulib/import/openat-priv.h: Update.
1481 * gnulib/import/openat-proc.c: Update.
1482 * gnulib/import/openat.c: Update.
1483 * gnulib/import/openat.h: Update.
1484 * gnulib/import/opendir.c: Update.
1485 * gnulib/import/pathmax.h: Update.
1486 * gnulib/import/pipe-safer.c: Update.
1487 * gnulib/import/rawmemchr.c: Update.
1488 * gnulib/import/readdir.c: Update.
1489 * gnulib/import/readlink.c: Update.
1490 * gnulib/import/realloc.c: Update.
1491 * gnulib/import/ref-add.sin: Update.
1492 * gnulib/import/ref-del.sin: Update.
1493 * gnulib/import/rename.c: Update.
1494 * gnulib/import/rewinddir.c: Update.
1495 * gnulib/import/rmdir.c: Update.
1496 * gnulib/import/same-inode.h: Update.
1497 * gnulib/import/save-cwd.c: Update.
1498 * gnulib/import/save-cwd.h: Update.
1499 * gnulib/import/scratch_buffer.h: Update.
1500 * gnulib/import/secure_getenv.c: Update.
1501 * gnulib/import/setenv.c: Update.
1502 * gnulib/import/signal.in.h: Update.
1503 * gnulib/import/stat-time.c: Update.
1504 * gnulib/import/stat-time.h: Update.
1505 * gnulib/import/stat-w32.c: Update.
1506 * gnulib/import/stat-w32.h: Update.
1507 * gnulib/import/stat.c: Update.
1508 * gnulib/import/stdbool.in.h: Update.
1509 * gnulib/import/stddef.in.h: Update.
1510 * gnulib/import/stdint.in.h: Update.
1511 * gnulib/import/stdio.in.h: Update.
1512 * gnulib/import/stdlib.in.h: Update.
1513 * gnulib/import/str-two-way.h: Update.
1514 * gnulib/import/strchrnul.c: Update.
1515 * gnulib/import/strdup.c: Update.
1516 * gnulib/import/streq.h: Update.
1517 * gnulib/import/strerror-override.c: Update.
1518 * gnulib/import/strerror-override.h: Update.
1519 * gnulib/import/strerror.c: Update.
1520 * gnulib/import/string.in.h: Update.
1521 * gnulib/import/stripslash.c: Update.
1522 * gnulib/import/strnlen1.c: Update.
1523 * gnulib/import/strnlen1.h: Update.
1524 * gnulib/import/strstr.c: Update.
1525 * gnulib/import/strtok_r.c: Update.
1526 * gnulib/import/sys_stat.in.h: Update.
1527 * gnulib/import/sys_time.in.h: Update.
1528 * gnulib/import/sys_types.in.h: Update.
1529 * gnulib/import/tempname.c: Update.
1530 * gnulib/import/tempname.h: Update.
1531 * gnulib/import/time.in.h: Update.
1532 * gnulib/import/unistd--.h: Update.
1533 * gnulib/import/unistd-safer.h: Update.
1534 * gnulib/import/unistd.in.h: Update.
1535 * gnulib/import/unsetenv.c: Update.
1536 * gnulib/import/verify.h: Update.
1537 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1538 * gnulib/import/wchar.in.h: Update.
1539 * gnulib/import/wctype.in.h: Update.
1540 * gnulib/import/xalloc-oversized.h: Update.
1541 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1542 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1543
1544 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1545
1546 * record-btrace.c (get_thread_current_frame): Remove
1547 old_inferior_ptid.
1548
1549 2018-09-10 Jerome Guitton <guitton@adacore.com>
1550
1551 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1552 with check_tag to 1 if and only if the type is tagged and the
1553 component being searched cannot been found in the current
1554 view. Otherwise, always call ada_to_fixed_type with
1555 check_tag to 0.
1556
1557 2018-09-10 Xavier Roirand <roirand@adacore.com>
1558
1559 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1560 declaration.
1561 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1562 * ada-varobj.c (ada_varobj_get_number_of_children,
1563 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1564
1565 2018-09-10 Xavier Roirand <roirand@adacore.com>
1566
1567 * ada-valprint.c (ada_value_print): Use type instead of
1568 enclosing type.
1569
1570 2018-09-10 Xavier Roirand <roirand@adacore.com>
1571
1572 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1573 an array of access to unconstrained array.
1574
1575 2018-09-10 Xavier Roirand <roirand@adacore.com>
1576
1577 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1578 (ada_check_typedef): Use it.
1579
1580 2018-09-10 Xavier Roirand <roirand@adacore.com>
1581
1582 * ada-varobj.c (ada_varobj_describe_struct_child)
1583 (ada_varobj_describe_child): Handle union case like struct one.
1584
1585 2018-09-10 Tom Tromey <tom@tromey.com>
1586
1587 PR python/18380:
1588 * python/python.c (_initialize_python): Make example in "python"
1589 help work in Python 3.
1590
1591 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1592
1593 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1594 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1595 $(EXEEXT) to the script, as it is not a program.
1596
1597 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * python/py-prettyprint.c (pretty_print_one_value): Return
1600 gdbpy_ref<>.
1601 (print_string_repr): Adjust.
1602 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1603 * python/python-internal.h (apply_varobj_pretty_printer): Return
1604 gdbpy_ref<>.
1605 * varobj.c (varobj_value_get_print_value): Adjust.
1606
1607 2018-09-08 Tom Tromey <tom@tromey.com>
1608
1609 PR python/16047:
1610 * python/py-prettyprint.c (pretty_print_one_value): Check for
1611 to_string method.
1612
1613 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1614
1615 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1616 replace_operator_with_call.
1617
1618 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1619
1620 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1621
1622 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1623
1624 * ada-typeprint.c (print_range): Print the bounds using TYPE
1625 rather than its TYPE_TARGET_TYPE.
1626
1627 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1628
1629 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1630 call to ada_to_fixed_value_create.
1631
1632 2018-09-08 Jerome Guitton <guitton@adacore.com>
1633
1634 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1635
1636 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1637
1638 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1639 by calls to error.
1640
1641 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1642
1643 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1644 Move update of loop variable "fi".
1645
1646 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1647
1648 * ada-lang.c (value_assign_to_component): In the case of
1649 big-endian targets, extract the bits of the given VAL
1650 using an src_offset of zero if container is not a scalar.
1651
1652 2018-09-06 Simon Ser <contact@emersion.fr>
1653
1654 PR gdb/23105
1655 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1656 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1657 * fbsd-tdep.c (fbsd_make_note_desc): New.
1658 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1659 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1660 * target.h (enum target_object) Add FreeBSD-specific
1661 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1662
1663 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1664
1665 * compile/compile-c.h (generate_c_for_variable_locations):
1666 Change reference to pointer.
1667 * compile/compile-c-support.c (compile_program) <compute>:
1668 Likewise.
1669 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1670 (generate_c_for_for_one_variable): Likewise
1671 (generate_c_for_variable_locations): Likewise
1672 * compile/compile-c-types.c (compile_c_instance::convert_type):
1673 Likewise
1674 * compile/compile-cplus-symbols.c (convert_one_symbol):
1675 std::move the scope passed to enter_scope.
1676 * compile/compile-cplus-types.c
1677 (compile_cplus_instance::enter_scope): Make parameter
1678 rvalue-reference.
1679 (compile_cplus_instance::new_scope): Change reference to
1680 pointer.
1681 (compile_cplus_instance::convert_type): Likewise
1682 (compile_cplus_convert_typedef): std::move the scope passed to
1683 enter_scope.
1684 (compile_cplus_convert_struct_or_union): Likewise.
1685 (compile_cplus_convert_enum): Likewise.
1686 (compile_cplus_convert_namespace): Likewise.
1687 * compile/compile-cplus.h (compile_cplus_instance)
1688 <enter_scope>: Make parameter rvalue-reference.
1689 * compile/compile-internal.h (compile_instance)
1690 <get_cached_type>: Likewise
1691 * compile/compile-loc2c.c (push): Likewise
1692 (pushf): Likewise
1693 (unary): Likewise
1694 (binary): Likewise
1695 (print_label): Likewise
1696 (pushf_register_address): Likewise
1697 (pushf_register): Likewise
1698 (do_compile_dwarf_expr_to_c): Likewise
1699 (compile_dwarf_expr_to_c): Likewise
1700 (compile_dwarf_bounds_to_c): Likewise
1701 * compile/compile.c (compile_instance::get_cached_type):
1702 Likewise
1703 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1704 (compile_dwarf_bounds_to_c): Likewise
1705 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1706 (dwarf2_compile_property_to_c): Likewise
1707 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1708 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1709 Likewise
1710
1711 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1712
1713 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1714 * tui/tui-data.c (init_content_element): Don't initialize it.
1715
1716 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1717
1718 * tui/tui-data.h (struct tui_win_info)
1719 <detail::opaque>: Remove.
1720 * tui/tui-data.c (init_win_info): Remove assignment.
1721
1722 2018-09-05 Tom Tromey <tom@tromey.com>
1723
1724 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1725 -Wformat-nonliteral.
1726 * target-float.c (host_float_ops<T>::to_string)
1727 (host_float_ops<T>::from_string): Use
1728 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1729 * configure: Rebuild.
1730
1731 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1732
1733 * printcmd.c (printf_c_string): Use
1734 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1735 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1736
1737 2018-09-05 Tom Tromey <tom@tromey.com>
1738
1739 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1740
1741 2018-09-05 Tom de Vries <tdevries@suse.de>
1742
1743 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1744 with resolve_abstract_p == true.
1745 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1746 defaulting to false. Propagate resolve_abstract_p to
1747 dwarf2_fetch_die_loc_sect_off.
1748 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1749 parameter, defaulting to false.
1750 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1751 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1752 parameter.
1753 * dwarf2read.h (struct die_info): Forward-declare.
1754 (die_info_ptr): New typedef.
1755 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1756
1757 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1758
1759 GDB 8.2 released.
1760
1761 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1762 Pedro Alves <palves@redhat.com>
1763
1764 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1765 "aclocal-m4-deps.mk". Include file here.
1766 $(srcdir)/aclocal.m4: Add "configure.ac".
1767 * gnulib/aclocal-m4-deps.mk: New file.
1768 * gnulib/update-gnulib.sh: Automatically update
1769 "aclocal-m4-deps.mk".
1770
1771 2018-09-04 Tom Tromey <tom@tromey.com>
1772
1773 * configure: Rebuild.
1774 * configure.ac: Remove multi-ice code.
1775
1776 2018-09-04 Tom Tromey <tom@tromey.com>
1777
1778 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1779 (ada-exp.o): Update.
1780
1781 2018-09-04 Tom Tromey <tom@tromey.com>
1782
1783 * Makefile.in (printcmd.o, target-float.o): Remove.
1784 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1785
1786 2018-09-04 Tom Tromey <tom@tromey.com>
1787
1788 * gnulib/Makefile.in: Remove obsolete comment.
1789 * Makefile.in: Remove obsolete comment.
1790
1791 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1792
1793 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1794 line with '+'.
1795
1796 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1797
1798 * riscv-tdep.c: Add 'prologue-value.h' include.
1799 (struct riscv_unwind_cache): New struct.
1800 (riscv_debug_unwinder): New global.
1801 (riscv_scan_prologue): Update arguments, capture register details
1802 from prologue scan.
1803 (riscv_skip_prologue): Reformat arguments line, move end of
1804 prologue calculation into riscv_scan_prologue.
1805 (riscv_frame_cache): Update return type, create
1806 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1807 details.
1808 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1809 (riscv_frame_prev_register): Use the trad_frame within the
1810 riscv_unwind_cache.
1811 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1812 flag.
1813
1814 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1815
1816 * trad-frame.h (trad_frame_set_realreg): Declare.
1817 (trad_frame_set_addr): Declare.
1818 * trad-frame.c (trad_frame_set_realreg): Define new function.
1819 (trad_frame_set_addr): Define new function.
1820 (trad_frame_set_reg_realreg): Use new function.
1821 (trad_frame_set_reg_addr): Use new function.
1822
1823 2018-09-01 Keith Seitz <keiths@redhat.com>
1824
1825 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1826 pulongest instead of "%lld".
1827 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1828 ATTRIBUTE_UNUSED.
1829
1830 2018-08-31 Tom Tromey <tom@tromey.com>
1831
1832 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1833 variant part type.
1834
1835 2018-08-31 Pedro Alves <palves@redhat.com>
1836
1837 * gdbarch.h: Regenerate.
1838
1839 2018-08-31 Pedro Alves <palves@redhat.com>
1840
1841 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1842 * target.h (Hardware watchpoint interfaces): Describe
1843 continuable/steppable/non-steppable watchpoints.
1844 * gdbarch.h, gdbarch.c: Regenerate.
1845
1846 2018-08-31 Pedro Alves <palves@redhat.com>
1847
1848 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1849 Delete.
1850 * s390-linux-nat.c
1851 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1852 * target.h (target_ops::have_continuable_watchpoint): Delete.
1853 (target_have_continuable_watchpoint): Delete.
1854 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1855 * target-delegates.c: Regenerate.
1856
1857 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1858
1859 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1860 the files present in "gnulib/import/m4/".
1861
1862 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1863
1864 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1865 c.sw, c.swsp, and c.sdsp.
1866
1867 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1868
1869 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1870 (riscv_read_misa_reg): Don't cache value read into inferior data.
1871 (riscv_new_inferior_data): Delete.
1872 (riscv_inferior_data_cleanup): Delete.
1873 (riscv_inferior_data): Delete.
1874 (riscv_invalidate_inferior_data): Delete.
1875 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1876
1877 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1878
1879 * compile/compile-cplus-types.c
1880 (compile_cplus_instance::leave_scope): Take the address of scope
1881 object.
1882 (compile_cplus_instance::convert_qualified_base): Compare quals
1883 to 0.
1884
1885 2018-08-30 Keith Seitz <keiths@redhat.com>
1886
1887 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1888 Use "%s" and host_address_to_string instead of "%p" in printf.
1889
1890 2018-08-29 Keith Seitz <keiths@redhat.com>
1891
1892 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1893 and compile-cplus-types.c.
1894 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1895 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1896 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1897 Declare.
1898 * compile/compile-c-support.c: Include compile-cplus.h.
1899 (load_libcompile): Templatize.
1900 (get_compile_context): "New" function.
1901 (c_get_compile_context): Use get_compile_context.
1902 (cplus_get_compile_context): New function.
1903 (cplus_push_user_expression, cplus_pop_user_expression)
1904 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1905 (cplus_compute_program): Define new structs/functions.
1906 * compile/compile-cplus-symmbols.c: New file.
1907 * compile/compile-cplus-types.c: New file.
1908 * compile/compile-cplus.h: New file.
1909 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1910 Declare.
1911 * compile/compile-object-load.c (get_out_value_type): Use
1912 strncmp_iw when comparing symbol names.
1913 (compile_object_load): Add mst_bss and mst_data.
1914 * compile/compile.c (_initialize_compile): Remove
1915 -Wno-implicit-function-declaration from `compile_args'.
1916 * compile/gcc-cp-plugin.h: New file.
1917 * NEWS: Mention C++ compile support and new debug options.
1918
1919 2018-08-29 Keith Seitz <keiths@redhat.com>
1920
1921 * linespec.c (collect_info::add_symbol): Make virtual.
1922 (struct symbol_searcher_collect_info): New struct.
1923 (symbol_searcher::find_all_symbols): New method.
1924 * symtab.h (class symbol_searcher): New class.
1925
1926 2018-08-29 Keith Seitz <keiths@redhat.com>
1927
1928 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1929 Change to vector of block_symbol. Update all users.
1930 (struct collect_info) <symbols>: Likewise.
1931 (collect_info::add_symbol): Take block_symbol as argument.
1932 Update all callers.
1933 (decode_compound_collector) <m_symbols>: Change type to vector
1934 of block_symbol. Update all users.
1935 (decode_compound_collector::operator ()): Change parameter type
1936 to block_symbol.
1937 (find_method, find_function_symbols, find_linespec_symbols)
1938 (find_label_symbols_in_block, find_label_symbols): Change symbol
1939 vectors to block_symbol vectors.
1940 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1941 block_symbol.
1942
1943 2018-08-29 Keith Seitz <keiths@redhat.com>
1944
1945 * linespec.c (symbolp): Remove typedef and VEC definitions.
1946 (bound_minimal_symbol_d): Likewise.
1947
1948 2018-08-29 Keith Seitz <keiths@redhat.com>
1949
1950 * linespec.c (decode_compound_collector::decode_compound_collector):
1951 Remove initialization for `m_symtabs'.
1952 (decode_compound_collector::release_symbols): Change return type
1953 to std::vector. Update all callers.
1954 (class decode_compound_collector) <m_symbols>: Change type to
1955 std::vector.
1956 (lookup_prefix_sym): Change return type to std::vector. Update all
1957 callers.
1958 (compare_symbols): Remove.
1959 (std_compare_symbols): Rename to `compare_symbols'.
1960 (find_method): Change `sym_classes' parameter to std::vector.
1961 Update all callers. Use std::sort to sort sym_classes.
1962 (find_linespec_symbols): Remove cleanup.
1963
1964 2018-08-29 Keith Seitz <keiths@redhat.com>
1965
1966 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1967 std::vector. Update all users.
1968 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1969 (struct collect_info) <minimal_symbols>: Likewise.
1970 (compare_msymbols): Return bool. Change parameters to const
1971 bound_minimal_symbol references.
1972 (find_method, find_function_symbols, find_linespec_symbols): Change
1973 `minsyms' parameter to std::vector. Update all callers.
1974
1975 2018-08-29 Keith Seitz <keiths@redhat.com>
1976
1977 * linespec.c (struct linespec) <label_symbols>: Change type to
1978 std::vector. Update all users.
1979 (find_label_symbols_in_block): Change `result' parameter to
1980 std::vector. Update all callers.
1981 (find_label_symbols): Return std::vector. Update all callers.
1982
1983 2018-08-29 Keith Seitz <keiths@redhat.com>
1984
1985 * linespec.c (struct linespec) <function_symbols>: Change type to
1986 std::vector. Update all users.
1987 (struct collect_info) <function_symbols>: Likewise.
1988 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1989 (std_compare_symbols): New function.
1990 (find_method, find_function_symbols, find_linespec_symbols)
1991 (find_label_symbols_in_block): Change `symbols' parameter to
1992 std::vector. Update all callers.
1993 (find_label_symbols): Likewise for `function_symbols' and
1994 `label_funcs_ret'.
1995
1996 2018-08-29 Keith Seitz <keiths@redhat.com>
1997
1998 * linespec.c (symtab_vector_up): Define.
1999 (struct linespec) <file_symtabs>: Change type to std::vector *.
2000 Update all uses.
2001 (struct collect_info) <file_symtabs>: Likewise.
2002 (collect_symtabs_from_filename): Return symtab_vector_up.
2003 Update all callers.
2004 (decode_objc): Remove cleanup.
2005 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2006 (symtab_collector::release_symtabs): Return symtab_vector_up.
2007 Update all callers.
2008 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2009 Update all users.
2010 (collect_symtabs_from_filename, symtabs_from_filename): Return
2011 symtab_vector_up. Update all callers.
2012
2013 2018-08-29 Tom Tromey <tom@tromey.com>
2014
2015 * csky-tdep.c (csky_analyze_prologue): Use
2016 core_addr_to_string_nz.
2017
2018 2018-08-29 Tom Tromey <tom@tromey.com>
2019
2020 * windows-nat.c (struct xlate_exception) <them>: Change type to
2021 DWORD.
2022 (xlate): Fix formatting. Remove last entry.
2023 (struct xlate_exception, xlate): Comment out.
2024 (windows_nat_target::resume): Use ranged for.
2025
2026 2018-08-29 Jim Wilson <jimw@sifive.com>
2027
2028 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2029 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2030 of NT_PRFPREG.
2031 (riscv_linux_nat_target::store_registers): Likewise.
2032
2033 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2034
2035 PR gdb/23555
2036 PR gdb/23558
2037 * gnulib/aclocal.m4: Regenerate.
2038 * gnulib/config.in: Regenerate.
2039 * gnulib/configure: Regenerate.
2040 * gnulib/import/Makefile.am: Update.
2041 * gnulib/import/Makefile.in: Update.
2042 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2043 * gnulib/import/_Noreturn.h: ... this.
2044 * gnulib/import/alloca.in.h: Update.
2045 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2046 * gnulib/import/arg-nonnull.h: ... this.
2047 * gnulib/import/assure.h: Update.
2048 * gnulib/import/at-func.c: Update.
2049 * gnulib/import/basename-lgpl.c: Update.
2050 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2051 * gnulib/import/c++defs.h: ... this.
2052 * gnulib/import/canonicalize-lgpl.c: Update.
2053 * gnulib/import/cdefs.h: Update.
2054 * gnulib/import/chdir-long.c: Update.
2055 * gnulib/import/chdir-long.h: Update.
2056 * gnulib/import/cloexec.c: Update.
2057 * gnulib/import/cloexec.h: Update.
2058 * gnulib/import/close.c: Update.
2059 * gnulib/import/closedir.c: Update.
2060 * gnulib/import/config.charset: Update.
2061 * gnulib/import/dirent-private.h: Update.
2062 * gnulib/import/dirent.in.h: Update.
2063 * gnulib/import/dirfd.c: Update.
2064 * gnulib/import/dirname-lgpl.c: Update.
2065 * gnulib/import/dirname.h: Update.
2066 * gnulib/import/dosname.h: Update.
2067 * gnulib/import/dup-safer-flag.c: Update.
2068 * gnulib/import/dup-safer.c: Update.
2069 * gnulib/import/dup.c: Update.
2070 * gnulib/import/dup2.c: Update.
2071 * gnulib/import/errno.in.h: Update.
2072 * gnulib/import/error.c: Update.
2073 * gnulib/import/error.h: Update.
2074 * gnulib/import/exitfail.c: Update.
2075 * gnulib/import/exitfail.h: Update.
2076 * gnulib/import/extra/update-copyright: Update.
2077 * gnulib/import/fchdir.c: Update.
2078 * gnulib/import/fcntl.c: Update.
2079 * gnulib/import/fcntl.in.h: Update.
2080 * gnulib/import/fd-hook.c: Update.
2081 * gnulib/import/fd-hook.h: Update.
2082 * gnulib/import/fd-safer-flag.c: Update.
2083 * gnulib/import/fd-safer.c: Update.
2084 * gnulib/import/fdopendir.c: Update.
2085 * gnulib/import/filename.h: Update.
2086 * gnulib/import/filenamecat-lgpl.c: Update.
2087 * gnulib/import/filenamecat.h: Update.
2088 * gnulib/import/flexmember.h: Update.
2089 * gnulib/import/float+.h: Update.
2090 * gnulib/import/float.c: Update.
2091 * gnulib/import/float.in.h: Update.
2092 * gnulib/import/fnmatch.c: Update.
2093 * gnulib/import/fnmatch.in.h: Update.
2094 * gnulib/import/fnmatch_loop.c: Update.
2095 * gnulib/import/fpucw.h: Update.
2096 * gnulib/import/frexp.c: Update.
2097 * gnulib/import/frexpl.c: Update.
2098 * gnulib/import/fstat.c: Update.
2099 * gnulib/import/fstatat.c: Update.
2100 * gnulib/import/getcwd-lgpl.c: Update.
2101 * gnulib/import/getcwd.c: Update.
2102 * gnulib/import/getdtablesize.c: Update.
2103 * gnulib/import/getlogin_r.c: Update.
2104 * gnulib/import/getprogname.c: Update.
2105 * gnulib/import/getprogname.h: Update.
2106 * gnulib/import/gettext.h: Update.
2107 * gnulib/import/gettimeofday.c: Update.
2108 * gnulib/import/glob-libc.h: Update.
2109 * gnulib/import/glob.c: Update.
2110 * gnulib/import/glob.in.h: Update.
2111 * gnulib/import/glob_internal.h: Update.
2112 * gnulib/import/glob_pattern_p.c: Update.
2113 * gnulib/import/globfree.c: Update.
2114 * gnulib/import/hard-locale.c: Update.
2115 * gnulib/import/hard-locale.h: Update.
2116 * gnulib/import/intprops.h: Update.
2117 * gnulib/import/inttypes.in.h: Update.
2118 * gnulib/import/isnan.c: Update.
2119 * gnulib/import/isnand-nolibm.h: Update.
2120 * gnulib/import/isnand.c: Update.
2121 * gnulib/import/isnanl-nolibm.h: Update.
2122 * gnulib/import/isnanl.c: Update.
2123 * gnulib/import/itold.c: Update.
2124 * gnulib/import/libc-config.h: Update.
2125 * gnulib/import/limits.in.h: Update.
2126 * gnulib/import/localcharset.c: Update.
2127 * gnulib/import/localcharset.h: Update.
2128 * gnulib/import/localtime-buffer.c: Update.
2129 * gnulib/import/localtime-buffer.h: Update.
2130 * gnulib/import/lstat.c: Update.
2131 * gnulib/import/m4/00gnulib.m4: Update.
2132 * gnulib/import/m4/__inline.m4: Update.
2133 * gnulib/import/m4/absolute-header.m4: Update.
2134 * gnulib/import/m4/alloca.m4: Update.
2135 * gnulib/import/m4/builtin-expect.m4: Update.
2136 * gnulib/import/m4/canonicalize.m4: Update.
2137 * gnulib/import/m4/chdir-long.m4: Update.
2138 * gnulib/import/m4/close.m4: Update.
2139 * gnulib/import/m4/closedir.m4: Update.
2140 * gnulib/import/m4/configmake.m4: Update.
2141 * gnulib/import/m4/d-ino.m4: Update.
2142 * gnulib/import/m4/d-type.m4: Update.
2143 * gnulib/import/m4/dirent_h.m4: Update.
2144 * gnulib/import/m4/dirfd.m4: Update.
2145 * gnulib/import/m4/dirname.m4: Update.
2146 * gnulib/import/m4/double-slash-root.m4: Update.
2147 * gnulib/import/m4/dup.m4: Update.
2148 * gnulib/import/m4/dup2.m4: Update.
2149 * gnulib/import/m4/eealloc.m4: Update.
2150 * gnulib/import/m4/environ.m4: Update.
2151 * gnulib/import/m4/errno_h.m4: Update.
2152 * gnulib/import/m4/error.m4: Update.
2153 * gnulib/import/m4/exponentd.m4: Update.
2154 * gnulib/import/m4/exponentl.m4: Update.
2155 * gnulib/import/m4/extensions.m4: Update.
2156 * gnulib/import/m4/extern-inline.m4: Update.
2157 * gnulib/import/m4/fchdir.m4: Update.
2158 * gnulib/import/m4/fcntl-o.m4: Update.
2159 * gnulib/import/m4/fcntl.m4: Update.
2160 * gnulib/import/m4/fcntl_h.m4: Update.
2161 * gnulib/import/m4/fdopendir.m4: Update.
2162 * gnulib/import/m4/filenamecat.m4: Update.
2163 * gnulib/import/m4/flexmember.m4: Update.
2164 * gnulib/import/m4/float_h.m4: Update.
2165 * gnulib/import/m4/fnmatch.m4: Update.
2166 * gnulib/import/m4/fnmatch_h.m4: Update.
2167 * gnulib/import/m4/fpieee.m4: Update.
2168 * gnulib/import/m4/frexp.m4: Update.
2169 * gnulib/import/m4/frexpl.m4: Update.
2170 * gnulib/import/m4/fstat.m4: Update.
2171 * gnulib/import/m4/fstatat.m4: Update.
2172 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2173 * gnulib/import/m4/getcwd-path-max.m4: Update.
2174 * gnulib/import/m4/getcwd.m4: Update.
2175 * gnulib/import/m4/getdtablesize.m4: Update.
2176 * gnulib/import/m4/getlogin.m4: Update.
2177 * gnulib/import/m4/getlogin_r.m4: Update.
2178 * gnulib/import/m4/getpagesize.m4: Update.
2179 * gnulib/import/m4/getprogname.m4: Update.
2180 * gnulib/import/m4/gettimeofday.m4: Update.
2181 * gnulib/import/m4/glibc21.m4: Update.
2182 * gnulib/import/m4/glob.m4: Update.
2183 * gnulib/import/m4/glob_h.m4: Update.
2184 * gnulib/import/m4/gnulib-cache.m4: Update.
2185 * gnulib/import/m4/gnulib-common.m4: Update.
2186 * gnulib/import/m4/gnulib-comp.m4: Update.
2187 * gnulib/import/m4/gnulib-tool.m4: Update.
2188 * gnulib/import/m4/hard-locale.m4: Update.
2189 * gnulib/import/m4/include_next.m4: Update.
2190 * gnulib/import/m4/inttypes-pri.m4: Update.
2191 * gnulib/import/m4/inttypes.m4: Update.
2192 * gnulib/import/m4/isnand.m4: Update.
2193 * gnulib/import/m4/isnanl.m4: Update.
2194 * gnulib/import/m4/largefile.m4: Update.
2195 * gnulib/import/m4/limits-h.m4: Update.
2196 * gnulib/import/m4/localcharset.m4: Update.
2197 * gnulib/import/m4/locale-fr.m4: Update.
2198 * gnulib/import/m4/locale-ja.m4: Update.
2199 * gnulib/import/m4/locale-zh.m4: Update.
2200 * gnulib/import/m4/localtime-buffer.m4: Update.
2201 * gnulib/import/m4/longlong.m4: Update.
2202 * gnulib/import/m4/lstat.m4: Update.
2203 * gnulib/import/m4/malloc.m4: Update.
2204 * gnulib/import/m4/malloca.m4: Update.
2205 * gnulib/import/m4/math_h.m4: Update.
2206 * gnulib/import/m4/mbrtowc.m4: Update.
2207 * gnulib/import/m4/mbsinit.m4: Update.
2208 * gnulib/import/m4/mbsrtowcs.m4: Update.
2209 * gnulib/import/m4/mbstate_t.m4: Update.
2210 * gnulib/import/m4/memchr.m4: Update.
2211 * gnulib/import/m4/memmem.m4: Update.
2212 * gnulib/import/m4/mempcpy.m4: Update.
2213 * gnulib/import/m4/memrchr.m4: Update.
2214 * gnulib/import/m4/mkdir.m4: Update.
2215 * gnulib/import/m4/mkstemp.m4: Update.
2216 * gnulib/import/m4/mmap-anon.m4: Update.
2217 * gnulib/import/m4/mode_t.m4: Update.
2218 * gnulib/import/m4/msvc-inval.m4: Update.
2219 * gnulib/import/m4/msvc-nothrow.m4: Update.
2220 * gnulib/import/m4/multiarch.m4: Update.
2221 * gnulib/import/m4/nocrash.m4: Update.
2222 * gnulib/import/m4/off_t.m4: Update.
2223 * gnulib/import/m4/onceonly.m4: Update.
2224 * gnulib/import/m4/open-cloexec.m4: Update.
2225 * gnulib/import/m4/open.m4: Update.
2226 * gnulib/import/m4/openat.m4: Update.
2227 * gnulib/import/m4/opendir.m4: Update.
2228 * gnulib/import/m4/pathmax.m4: Update.
2229 * gnulib/import/m4/rawmemchr.m4: Update.
2230 * gnulib/import/m4/readdir.m4: Update.
2231 * gnulib/import/m4/readlink.m4: Update.
2232 * gnulib/import/m4/realloc.m4: Update.
2233 * gnulib/import/m4/rename.m4: Update.
2234 * gnulib/import/m4/rewinddir.m4: Update.
2235 * gnulib/import/m4/rmdir.m4: Update.
2236 * gnulib/import/m4/save-cwd.m4: Update.
2237 * gnulib/import/m4/secure_getenv.m4: Update.
2238 * gnulib/import/m4/setenv.m4: Update.
2239 * gnulib/import/m4/signal_h.m4: Update.
2240 * gnulib/import/m4/ssize_t.m4: Update.
2241 * gnulib/import/m4/stat-time.m4: Update.
2242 * gnulib/import/m4/stat.m4: Update.
2243 * gnulib/import/m4/std-gnu11.m4: Update.
2244 * gnulib/import/m4/stdbool.m4: Update.
2245 * gnulib/import/m4/stddef_h.m4: Update.
2246 * gnulib/import/m4/stdint.m4: Update.
2247 * gnulib/import/m4/stdio_h.m4: Update.
2248 * gnulib/import/m4/stdlib_h.m4: Update.
2249 * gnulib/import/m4/strchrnul.m4: Update.
2250 * gnulib/import/m4/strdup.m4: Update.
2251 * gnulib/import/m4/strerror.m4: Update.
2252 * gnulib/import/m4/string_h.m4: Update.
2253 * gnulib/import/m4/strstr.m4: Update.
2254 * gnulib/import/m4/strtok_r.m4: Update.
2255 * gnulib/import/m4/sys_socket_h.m4: Update.
2256 * gnulib/import/m4/sys_stat_h.m4: Update.
2257 * gnulib/import/m4/sys_time_h.m4: Update.
2258 * gnulib/import/m4/sys_types_h.m4: Update.
2259 * gnulib/import/m4/tempname.m4: Update.
2260 * gnulib/import/m4/time_h.m4: Update.
2261 * gnulib/import/m4/unistd-safer.m4: Update.
2262 * gnulib/import/m4/unistd_h.m4: Update.
2263 * gnulib/import/m4/warn-on-use.m4: Update.
2264 * gnulib/import/m4/wchar_h.m4: Update.
2265 * gnulib/import/m4/wchar_t.m4: Update.
2266 * gnulib/import/m4/wctype_h.m4: Update.
2267 * gnulib/import/m4/wint_t.m4: Update.
2268 * gnulib/import/malloc.c: Update.
2269 * gnulib/import/malloc/scratch_buffer.h: Update.
2270 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2271 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2272 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2273 * gnulib/import/malloca.c: Update.
2274 * gnulib/import/malloca.h: Update.
2275 * gnulib/import/malloca.valgrind: Update.
2276 * gnulib/import/math.in.h: Update.
2277 * gnulib/import/mbrtowc.c: Update.
2278 * gnulib/import/mbsinit.c: Update.
2279 * gnulib/import/mbsrtowcs-impl.h: Update.
2280 * gnulib/import/mbsrtowcs-state.c: Update.
2281 * gnulib/import/mbsrtowcs.c: Update.
2282 * gnulib/import/memchr.c: Update.
2283 * gnulib/import/memmem.c: Update.
2284 * gnulib/import/mempcpy.c: Update.
2285 * gnulib/import/memrchr.c: Update.
2286 * gnulib/import/mkdir.c: Update.
2287 * gnulib/import/mkstemp.c: Update.
2288 * gnulib/import/msvc-inval.c: Update.
2289 * gnulib/import/msvc-inval.h: Update.
2290 * gnulib/import/msvc-nothrow.c: Update.
2291 * gnulib/import/msvc-nothrow.h: Update.
2292 * gnulib/import/open.c: Update.
2293 * gnulib/import/openat-die.c: Update.
2294 * gnulib/import/openat-priv.h: Update.
2295 * gnulib/import/openat-proc.c: Update.
2296 * gnulib/import/openat.c: Update.
2297 * gnulib/import/openat.h: Update.
2298 * gnulib/import/opendir.c: Update.
2299 * gnulib/import/pathmax.h: Update.
2300 * gnulib/import/pipe-safer.c: Update.
2301 * gnulib/import/rawmemchr.c: Update.
2302 * gnulib/import/readdir.c: Update.
2303 * gnulib/import/readlink.c: Update.
2304 * gnulib/import/realloc.c: Update.
2305 * gnulib/import/ref-add.sin: Update.
2306 * gnulib/import/ref-del.sin: Update.
2307 * gnulib/import/rename.c: Update.
2308 * gnulib/import/rewinddir.c: Update.
2309 * gnulib/import/rmdir.c: Update.
2310 * gnulib/import/same-inode.h: Update.
2311 * gnulib/import/save-cwd.c: Update.
2312 * gnulib/import/save-cwd.h: Update.
2313 * gnulib/import/scratch_buffer.h: Update.
2314 * gnulib/import/secure_getenv.c: Update.
2315 * gnulib/import/setenv.c: Update.
2316 * gnulib/import/signal.in.h: Update.
2317 * gnulib/import/stat-time.c: Update.
2318 * gnulib/import/stat-time.h: Update.
2319 * gnulib/import/stat-w32.c: Update.
2320 * gnulib/import/stat-w32.h: Update.
2321 * gnulib/import/stat.c: Update.
2322 * gnulib/import/stdbool.in.h: Update.
2323 * gnulib/import/stddef.in.h: Update.
2324 * gnulib/import/stdint.in.h: Update.
2325 * gnulib/import/stdio.in.h: Update.
2326 * gnulib/import/stdlib.in.h: Update.
2327 * gnulib/import/str-two-way.h: Update.
2328 * gnulib/import/strchrnul.c: Update.
2329 * gnulib/import/strdup.c: Update.
2330 * gnulib/import/streq.h: Update.
2331 * gnulib/import/strerror-override.c: Update.
2332 * gnulib/import/strerror-override.h: Update.
2333 * gnulib/import/strerror.c: Update.
2334 * gnulib/import/string.in.h: Update.
2335 * gnulib/import/stripslash.c: Update.
2336 * gnulib/import/strnlen1.c: Update.
2337 * gnulib/import/strnlen1.h: Update.
2338 * gnulib/import/strstr.c: Update.
2339 * gnulib/import/strtok_r.c: Update.
2340 * gnulib/import/sys_stat.in.h: Update.
2341 * gnulib/import/sys_time.in.h: Update.
2342 * gnulib/import/sys_types.in.h: Update.
2343 * gnulib/import/tempname.c: Update.
2344 * gnulib/import/tempname.h: Update.
2345 * gnulib/import/time.in.h: Update.
2346 * gnulib/import/unistd--.h: Update.
2347 * gnulib/import/unistd-safer.h: Update.
2348 * gnulib/import/unistd.in.h: Update.
2349 * gnulib/import/unsetenv.c: Update.
2350 * gnulib/import/verify.h: Update.
2351 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2352 * gnulib/import/wchar.in.h: Update.
2353 * gnulib/import/wctype.in.h: Update.
2354 * gnulib/import/xalloc-oversized.h: Update.
2355 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2356 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2357
2358 2018-08-16 Gary Benson <gbenson@redhat.com>
2359
2360 PR gdb/13000:
2361 * gdb/main.c (captured_main_1): Exit with nonzero status
2362 in batch mode if the last command to be executed failed.
2363 * NEWS: Mention the above.
2364
2365 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2366
2367 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2368 end of warning message.
2369
2370 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2371
2372 PR gdb/22943:
2373 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2374 (aarch64_extract_return_value): Use
2375 aapcs_is_vfp_call_or_return_candidate.
2376 (aarch64_return_in_memory): Likewise.
2377 (aarch64_store_return_value): Likewise.
2378
2379 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2380
2381 * aarch64-tdep.c
2382 (aapcs_is_vfp_call_or_return_candidate): Make static
2383 (pass_in_v_or_stack): Remove function.
2384 (pass_in_v_vfp_candidate): New function.
2385 (aarch64_push_dummy_call): Check for float register candidates.
2386
2387 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2388
2389 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2390 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2391 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2392
2393 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2394
2395 PR build/23399
2396 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2397 (struct ipa_sym_addresses): Rename to...
2398 (struct ipa_sym_addresses_common): ... this.
2399 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2400
2401 2018-08-28 Tom Tromey <tom@tromey.com>
2402
2403 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2404 (token_fifo): Now a std::vector.
2405 (yylex, c_parse): Update.
2406 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2407 (token_fifo): Now a std::vector.
2408 (yylex, d_parse): Update.
2409 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2410 (token_fifo): Now a std::vector.
2411 (yylex, go_parse): Update.
2412
2413 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2414
2415 * parser-defs.h (struct type_stack) <elements>: Change type to
2416 std::vector<union type_stack_elt>.
2417 <depth, size>: Remove.
2418 * parse.c (parse_exp_in_context_1): Adjust.
2419 (type_stack_reserve): Remove.
2420 (check_type_stack_depth): Remove.
2421 (insert_into_type_stack): Adjust to std::vector.
2422 (insert_type): Likewise.
2423 (push_type): Likewise.
2424 (push_type_int): Likewise.
2425 (insert_type_address_space): Likewise.
2426 (pop_type): Likewise.
2427 (pop_type_int): Likewise.
2428 (pop_typelist): Likewise.
2429 (pop_type_stack): Likewise.
2430 (append_type_stack): Likewise.
2431 (push_type_stack): Likewise.
2432 (get_type_stack): Likewise.
2433 (type_stack_cleanup): Likewise.
2434 (push_typelist): Likewise.
2435 (follow_types): Likewise.
2436 (_initialize_parse): Likewise.
2437
2438 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2439
2440 * NEWS: Mention csky target.
2441
2442 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2443 Hafiz Abid Qadeer <abidh@codesourcery.com>
2444 Don Breazeal <donb@codesourcery.com>
2445
2446 * csky-linux-tdep.c: New file.
2447 * csky-tdep.c: Likewise.
2448 * csky-tdep.h: Likewise.
2449 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2450 csky-tdep.o.
2451 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2452 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2453 * configure.tgt: Add csky support.
2454
2455 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2456
2457 * python/py-framefilter.c (py_print_frame): Print frame architecture
2458 when printing on an MI output.
2459
2460 2018-08-27 Tom Tromey <tom@tromey.com>
2461
2462 PR build/23087:
2463 * configure: Rebuild.
2464 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2465
2466 2018-08-27 Tom Tromey <tom@tromey.com>
2467
2468 * aarch64-linux-tdep.c
2469 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2470 casts to int.
2471
2472 2018-08-27 Tom Tromey <tom@tromey.com>
2473
2474 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2475 unsigned.
2476 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2477 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2478 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2479 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2480 unsigned.
2481
2482 2018-08-27 Tom Tromey <tom@tromey.com>
2483
2484 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2485 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2486
2487 2018-08-27 Tom Tromey <tom@tromey.com>
2488
2489 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2490 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2491 ULONGEST_MAX.
2492 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2493 ULONGEST_MAX.
2494 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2495 ULONGEST_MAX.
2496 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2497 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2498 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2499 ULONGEST_MAX.
2500 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2501 (ppc64_linux_sigaction_tramp_frame)
2502 (ppc32_linux_sighandler_tramp_frame)
2503 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2504 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2505 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2506 * mn10300-linux-tdep.c (am33_linux_sigframe)
2507 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2508 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2509 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2510 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2511 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2512 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2513 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2514 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2515 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2516 * microblaze-linux-tdep.c
2517 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2518 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2519 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2520 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2521 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2522 * common/common-types.h (ULONGEST_MAX): New define.
2523 (CORE_ADDR_MAX): Fix formatting.
2524 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2525 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2526 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2527 (arm_linux_rt_sigreturn_tramp_frame)
2528 (arm_eabi_linux_sigreturn_tramp_frame)
2529 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2530 (thumb2_eabi_linux_sigreturn_tramp_frame)
2531 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2532 (arm_linux_restart_syscall_tramp_frame)
2533 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2534 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2535 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2536 ULONGEST_MAX.
2537 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2538
2539 2018-08-27 Tom Tromey <tom@tromey.com>
2540
2541 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2542 CORE_ADDR_MAX.
2543 * mips-tdep.c (mips_deal_with_atomic_sequence)
2544 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2545 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2546 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2547 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2548 CORE_ADDR_MAX.
2549 * aarch64-tdep.c (aarch64_software_single_step): Use
2550 CORE_ADDR_MAX.
2551
2552 2018-08-27 Tom Tromey <tom@tromey.com>
2553
2554 * linespec.c (complete_linespec_component): Add cast to "char".
2555 * completer.c (completion_tracker::build_completion_result): Add
2556 cast to "char".
2557
2558 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2559
2560 * solist.h (struct solist, struct target_so_ops): Fix
2561 indentation.
2562
2563 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2564
2565 * ada-tasks.c (ada_task_info_s): Remove typedef.
2566 (DEF_VEC_O(ada_task_info_s)): Remove.
2567 (struct ada_tasks_inferior_data): Initialize fields.
2568 <task_list>: Make an std::vector.
2569 (get_ada_tasks_inferior_data): Allocate with new.
2570 (ada_get_task_number): Adjust.
2571 (get_task_number_from_id): Likewise.
2572 (valid_task_id): Likewise.
2573 (ada_get_task_info_from_ptid): Likewise.
2574 (iterate_over_live_ada_tasks): Likewise.
2575 (add_ada_task): Likewise.
2576 (read_known_tasks): Likewise.
2577 (ada_build_task_list): Likewise.
2578 (print_ada_task_info): Likewise.
2579 (info_task): Likewise.
2580 (task_command_1): Likewise.
2581
2582 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2583
2584 * ada-lang.c (add_angle_brackets): Return std::string.
2585
2586 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2587
2588 * python/py-threadevent.c (py_get_event_thread): Initialize
2589 pythread.
2590
2591 2018-08-24 Pedro Alves <palves@redhat.com>
2592
2593 * python/py-bpevent.c (create_breakpoint_event_object): Use
2594 copy-initialization.
2595 * python/py-continueevent.c (emit_continue_event): Use
2596 copy-initialization.
2597 * python/py-exitedevent.c (create_exited_event_object): Return a
2598 gdbpy_ref<>.
2599 (emit_exited_event): Use copy-initialization.
2600 * python/py-inferior.c (python_new_inferior)
2601 (python_inferior_deleted, add_thread_object): Use
2602 copy-initialization.
2603 * python/py-infevents.c (create_inferior_call_event_object)
2604 (create_register_changed_event_object)
2605 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2606 (emit_inferior_call_event, emit_memory_changed_event)
2607 (emit_register_changed_event): Use copy-initialization.
2608 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2609 Return a gdbpy_ref<>.
2610 (emit_new_objfile_event): Use copy-initialization.
2611 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2612 (emit_clear_objfiles_event): Use copy-initialization.
2613 * python/py-signalevent.c (create_signal_event_object): Use
2614 copy-initialization.
2615 * python/py-threadevent.c (create_thread_event_object): Use
2616 copy-initialization.
2617
2618 2018-08-24 Pedro Alves <palves@redhat.com>
2619 Simon Marchi <simon.marchi@ericsson.com>
2620
2621 PR gdb/23379
2622 * python/py-continueevent.c: Include "gdbthread.h".
2623 (create_continue_event_object): Add intro comment. Add 'ptid'
2624 parameter. Use it to find thread to pass to
2625 create_thread_event_object.
2626 (emit_continue_event): Pass PTID down to
2627 create_continue_event_object.
2628 * python/py-event.h (py_get_event_thread): Declare.
2629 (create_thread_event_object): Remove default from 'thread'
2630 parameter.
2631 * python/py-stopevent.c (create_stop_event_object): Use
2632 py_get_event_thread.
2633 * python/py-threadevent.c (get_event_thread): Rename to ...
2634 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2635 and use it to find the thread.
2636 (create_thread_event_object): Assert that THREAD isn't null.
2637 Don't find the event thread here.
2638
2639 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2640
2641 * block.h (blockrange, blockranges): New struct declarations.
2642 (struct block): Add new field named `ranges'.
2643 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2644 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2645 macros for accessing ranges in struct block.
2646 (make_blockranges): New declaration.
2647 block.c (make_blockranges): New function.
2648 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2649 for block.
2650 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2651 * blockframe.c (cache_pc_function_block): New static global.
2652 (clear_pc_function_cache): Clear cache_pc_function_block.
2653 (find_pc_partial_function): Move comment to symtab.h. Add
2654 support for non-contiguous blocks.
2655 * cli/cli-cmds.c (block.h): Include.
2656 (print_disassembly): Handle printing of non-contiguous blocks.
2657 (disassemble_current_function): Likewise.
2658 (disassemble_command): Likewise.
2659
2660 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2661 BLOCK_START.
2662 * blockframe.c (get_pc_function_start): Likewise.
2663 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2664 (gcc_symbol_address): Likewise.
2665 * compile/compile-object-run.c (compile_object_run): Likewise.
2666 * compile/compile.c (get_expr_block_and_pc): Likewise.
2667 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2668 (func_addr_to_tail_call_list): Likewise.
2669 * findvar.c (default_read_var_value): Likewise.
2670 * inline-frame.c (inline_frame_this_id): Likewise.
2671 (skip-inline_frames): Likewise.
2672 * infcmd.c (until_next_command): Likewise.
2673 * linespec.c (convert_linespec_to_sals): Likewise.
2674 * parse.c (parse_exp_in_context_1): Likewise.
2675 * printcmd.c (build_address_symbolic): likewise.
2676 (info_address_command): Likewise.
2677 symtab.c (find_function_start_sal): Likewise.
2678 (skip_prologue_sal): Likewise.
2679 (find_function_alias_target): Likewise.
2680 (find_gnu_ifunc): Likewise.
2681 * stack.c (find_frame_funname): Likewise.
2682 * symtab.c (fixup_symbol_section): Likewise.
2683 (find_function_start_sal): Likewise.
2684 (skip_prologue_sal): Likewsie.
2685 (find_function_alias_target): Likewise.
2686 (find_gnu_ifunc): Likewise.
2687 * tracepoint.c (info_scope_command): Likewise.
2688 * value.c (value_fn_field): Likewise.
2689
2690 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2691 in place of find_pc_partial_function.
2692 * blockframe.c (find_function_entry_range_from_pc): New function.
2693 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2694 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2695 for each range in a block.
2696
2697
2698 2018-08-23 Xavier Roirand <roirand@adacore.com>
2699
2700 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2701 incrementation.
2702
2703 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2704
2705 * solib-svr4.c (read_program_headers_from_bfd): Return
2706 gdb::optional<gdb::byte_vector>.
2707 (svr4_exec_displacement): Adjust.
2708
2709 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2710
2711 * solib-svr4.c (read_program_header): Return
2712 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2713 (find_program_interpreter): Return
2714 gdb::optional<gdb::byte_vector>.
2715 (scan_dyntag_auxv): Adjust.
2716 (enable_break): Adjust.
2717 (svr4_exec_displacement): Adjust.
2718
2719 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2720
2721 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2722 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2723
2724 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2725
2726 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2727 string_vprintf.
2728 * guile/scm-utils.c (gdbscm_printf): Likewise.
2729 * serial.c (serial_printf): Likewise.
2730 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2731
2732 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2733
2734 * stack.c (print_frame): Print frame architecture when printing on
2735 an MI output.
2736 * NEWS: Mention new "arch" attribute in frame output.
2737
2738 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2739
2740 * arch/aarch64.h (aarch64_regnum): Update comment.
2741
2742 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2743
2744 * NEWS: Add SVE to 8.2 section.
2745
2746 2018-08-21 Pedro Alves <palves@redhat.com>
2747
2748 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2749 out from gdbscm_parse_function_args.
2750 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2751 gdbscm_parse_function_args_1.
2752
2753 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2754
2755 PR gdb/17816
2756 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2757 operator.
2758
2759 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2760
2761 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2762
2763 2018-08-19 Michael Spang <spang@google.com>
2764
2765 PR gdb/11786
2766 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2767 for PT_TLS segments.
2768
2769 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2770
2771 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2772 dwarf_variable_value.
2773 * dwarf2-frame.c (class dwarf_expr_executor):
2774 Add override for dwarf_variable_value.
2775 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2776 (class symbol_needs_eval_context): Likewise.
2777 (indirect_synthetic_pointer): Add forward declaration.
2778 (sect_variable_value): New function.
2779 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2780 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2781 for DW_OP_GNU_variable_value.
2782
2783 2018-08-16 Tom Tromey <tom@tromey.com>
2784
2785 * top.c (read_command_file): Update.
2786 (command_line_input): Remove "repeat" argument.
2787 * ada-lang.c (get_selections): Update.
2788 * linespec.c (decode_line_2): Update.
2789 * defs.h (command_line_input): Remove argument.
2790 * cli/cli-script.c (read_next_line): Update.
2791 * python/py-gdb-readline.c: Update.
2792
2793 2018-08-17 Tom Tromey <tom@tromey.com>
2794
2795 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2796 command_line_input.
2797
2798 2018-08-15 Tom Tromey <tom@tromey.com>
2799
2800 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2801
2802 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2803
2804 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2805 If used, use find_pc_partial_function to find address range
2806 to disassemble.
2807 * mi/mi-main.c (mi_cmd_list_features): Report
2808 "data-disassemble-a-option" feature.
2809 * NEWS: Mention new -data-disassemble option -a.
2810
2811 2018-08-13 Tom Tromey <tom@tromey.com>
2812
2813 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2814
2815 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2816
2817 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2818 (aarch64_linux_collect_sve_regset): Likewise.
2819 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2820 * regcache.h (regcache_map_entry_size): New function.
2821
2822 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2823
2824 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2825 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2826 (SVE_HEADER_VL_LENGTH): Likewise.
2827 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2828 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2829 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2830 (SVE_HEADER_SIZE_OFFSET): Likewise.
2831 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2832 (SVE_HEADER_VL_OFFSET): Likewise.
2833 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2834 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2835 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2836 (SVE_HEADER_SIZE): Likewise.
2837 (aarch64_linux_core_read_vq): Add function.
2838 (aarch64_linux_core_read_description): Check for SVE section.
2839
2840 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2841
2842 * aarch64-fbsd-tdep.c
2843 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2844 collect_size.
2845 * aarch64-linux-tdep.c
2846 (aarch64_linux_iterate_over_regset_sections): Likewise.
2847 * alpha-linux-tdep.c
2848 (alpha_linux_iterate_over_regset_sections):
2849 * alpha-nbsd-tdep.c
2850 (alphanbsd_iterate_over_regset_sections): Likewise.
2851 * amd64-fbsd-tdep.c
2852 (amd64fbsd_iterate_over_regset_sections): Likewise.
2853 * amd64-linux-tdep.c
2854 (amd64_linux_iterate_over_regset_sections): Likewise.
2855 * arm-bsd-tdep.c
2856 (armbsd_iterate_over_regset_sections): Likewise.
2857 * arm-fbsd-tdep.c
2858 (arm_fbsd_iterate_over_regset_sections): Likewise.
2859 * arm-linux-tdep.c
2860 (arm_linux_iterate_over_regset_sections): Likewise.
2861 * corelow.c (get_core_registers_cb): Likewise.
2862 (core_target::fetch_registers): Likewise.
2863 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2864 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2865 * gdbarch.h (void): Regenerate.
2866 * gdbarch.sh: Add supply_size and collect_size.
2867 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2868 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2869 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2870 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2871 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2872 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2873 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2874 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2875 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2876 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2877 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2878 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2879 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2880 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2881 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2882 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2883 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2884 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2885 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2886 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2887 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2888 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2889 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2890 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2891 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2892 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2893 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2894 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2895 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2896 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2897
2898 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2899
2900 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2901 with string_printf.
2902
2903 2018-08-10 Keith Seitz <keiths@redhat.com>
2904
2905 * compile/compile-c-support.c (add_code_header, add_code_footer):
2906 Move into policy class.
2907 (c_push_user_expression, pop_user_expression_nop)
2908 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2909 (compile_program): New host class.
2910 (c_compile_program): New typedef.
2911 (c_compute_porgram): Use c_compile_program.
2912
2913 2018-08-10 Keith Seitz <keiths@redhat.com>
2914
2915 * compile/compile-internal.h (compile_instance::~compile_instance):
2916 Remove calls to htab_delete.
2917 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2918 * compile.c (compile_instance::compile_instance): Initialize
2919 htab unique pointers.
2920 (compile_instance::get_cached_type, compile_instance::insert_type)
2921 (compile_instance::error_symbol_once): Update for unique_ptr.
2922
2923 2018-08-10 Keith Seitz <keiths@redhat.com>
2924
2925 * compile/compile-c-symbols.c (struct symbol_error)
2926 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2927 (compile_instance::insert_symbol_error)
2928 (compile_instance::error_symbol_once): Move to ...
2929 * compile/compile.c: ... here.
2930
2931 2018-08-10 Keith Seitz <keiths@redhat.com>
2932
2933 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2934 instead of `new_compile_instance'.
2935 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2936 Update description.
2937 If the symbol error map is not initialized, create it.
2938 (generate_c_for_for_one_symbol): Do not check/initialize
2939 the symbol error map.
2940 * compile/compile-c-types.c (compile_c_instance): Make a class.
2941 Update all callers.
2942 (compile_instance::compile_instance): Initialize the type cache.
2943 (get_cached_type): New function.
2944 (insert_type): Update description.
2945 (compile_c_instance::m_default_cflags): Define.
2946 (convert_type): Update description. Use get_cached_type.
2947 (delete_instance): Moved to destructor.
2948 (new_compile_instance): Moved to constructor.
2949 * compile/compile-c.h (compile_c_instance): Make class inheriting
2950 from compile_instance.
2951 <base>: Remove field.
2952 <type_map, symbol_err_map>: Move to base class.
2953 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2954 * compile/compile-internal.h (compile_instance): Make class.
2955 <type_map_t, symbol_err_map_t>: Define.
2956 <fe>: Rename to `m_gcc_fe'.
2957 <scope, block, gcc_target_options>: Add `m_' prefix.
2958 <m_type_map, m_symbol_err_map>: New fields, moved from
2959 compile_c_instance.
2960 <destroy>: Remove.
2961 (convert_type, new_compile_instance): Remove.
2962 * compile/compile.c (cleanup_compile_instance): Remove.
2963 (compile_to_object): Use unique_ptr to eliminate cleanups.
2964 (compile_instance::set_print_callback, compile_instance::version)
2965 (compile_instance::set_verbose)
2966 (compile_instance::set_driver_filename)
2967 (compile_instance::set_triplet_regexp)
2968 (compile_instance::set_arguments)
2969 (compile_instance::set_source_file)
2970 (compile_instance::compile): Define.
2971
2972 2018-08-10 Keith Seitz <keiths@redhat.com>
2973
2974 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2975 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2976 gcc-c-fe.def to define C plugin.
2977 (delete_instance): Delete `c_plugin'.
2978 (new_compile_instance): Initialize `c_plugin'.
2979 * compile/compile-c.h: Include gcc_c_plugin.h.
2980 (struct compile_c_instance) <c_plugin>: New member.
2981 * gcc-c-plugin.h: New file.
2982 Update all callers with API change.
2983
2984 2018-08-10 Keith Seitz <keiths@redhat.com>
2985
2986 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2987 (HFILES_NO_SRCDIR): ... to here.
2988 Add compile-internal.h and compile-c.h.
2989 * compile/compile-c-support.c: Include compile-c.h.
2990 * compile/compile-c-symbols.c: Include compile-c.h.
2991 (generate_c_for_variable_locations): Update comment.
2992 * compile/compile-c-types.c: Include compile-c.h.
2993 * compile/compile-c.h: New file -- moved C language declarations
2994 from other files here.
2995 * compile/compile-internal.h: Do not include hashtab.h or
2996 common/enum-flags.h.
2997 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2998 (gcc_convert_symbol, gcc_symbol_address)
2999 (generate_c_for_variable_locations, c_get_mode_for_size)
3000 (c_get_range_decl_name): Definitions moved to compile-c.h.
3001 * compile/compile-loc2c.c: Include compile-c.h.
3002
3003 2018-08-10 Keith Seitz <keiths@redhat.com>
3004
3005 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3006 (c_symbol_substitution_name): ... this.
3007 Update all callers.
3008
3009 2018-08-10 Keith Seitz <keiths@redhat.com>
3010
3011 * compile/compile-c-support.c (c_compute_program): Use
3012 unique_xmalloc_ptr to eliminate cleanup.
3013 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3014 Return a unique_xmalloc_ptr and eliminate cleanup.
3015 * compile/compile-internal.h (generate_c_for_variable_locations):
3016 Return unique_xmalloc_ptr and update description.
3017
3018 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3019
3020 * corelow.c (core_target::get_core_register_section): Rename
3021 min_size to section_min_size.
3022
3023 2018-08-09 Jim Wilson <jimw@sifive.com>
3024
3025 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3026 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3027 * NEWS: Mention new GNU/Linux RISC-V target.
3028 * configure.host: Add riscv*-*-linux*.
3029 * configure.nat: Add riscv*.
3030 * configure.tgt: Add riscv*-*-linux*.
3031 * riscv-linux-nat.c: New file.
3032 * riscv-linux-tdep.c: New file.
3033
3034 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3035
3036 * infrun.c (resume): Make static, add forward declaration.
3037 (proceed): Update header comment.
3038 * infrun.h (resume): Delete declaration.
3039
3040 2018-08-09 Tom Tromey <tom@tromey.com>
3041
3042 * riscv-tdep.h: Minor formatting fixes.
3043
3044 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3045
3046 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3047 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3048 (test_mkdir_recursive): Likewise.
3049 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3050
3051 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3052
3053 * valarith.c (value_subscripted_rvalue): If an array is not in
3054 memory, and we don't know the upper bound, then we can't know that
3055 the requested element exists or not.
3056
3057 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3058
3059 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3060 (target_options_to_string): Add comment.
3061
3062 2018-08-08 Tom Tromey <tom@tromey.com>
3063
3064 * unittests/scoped_mmap-selftests.c: Check result of "write".
3065
3066 2018-08-08 Jim Wilson <jimw@sifive.com>
3067
3068 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3069 (decode_register_index_short): New.
3070 (decode_j_type_insn, decode_cj_type_insn): New.
3071 (decode_b_type_insn, decode_cb_type_insn): New.
3072 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3073 local xlen. Check xlen when decoding ambiguous compressed insns. In
3074 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3075 is_c_sw_insn instead of is_sw_insn.
3076 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3077 (riscv_software_single_step): New.
3078 * riscv-tdep.h (riscv_software_single_step): Declare.
3079
3080 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3081 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3082
3083 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3084
3085 PR gdb/18050:
3086 * target.c (dispose_inferior): Don't dispose of inferiors that are
3087 already killed.
3088
3089 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3090
3091 * remote.c (remote_target::download_tracepoint): Change char* to
3092 const char*.
3093
3094 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3095
3096 * target.h (target_options_to_string): Return an std::string.
3097 * target.c (str_comma_list_concat_elem): Return void, use
3098 std::string.
3099 (do_option): Likewise.
3100 (target_options_to_string): Return an std::string.
3101 * linux-nat.c (linux_nat_target::wait): Adjust.
3102 * target-debug.h (target_debug_print_options): Adjust.
3103
3104 2018-08-07 Tom Tromey <tom@tromey.com>
3105
3106 * Makefile.in (CPPFLAGS): New variable.
3107 (INTERNAL_CPPFLAGS): Use it.
3108
3109 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3110
3111 * NEWS: Mention the index cache.
3112
3113 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3114
3115 * common/pathstuff.h (get_standard_cache_dir): New.
3116 * common/pathstuff.c (get_standard_cache_dir): New.
3117 * build-id.h (build_id_to_string): New.
3118 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3119 DEBUG_STR_SUFFIX): Move to here.
3120 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3121 DEBUG_STR_SUFFIX): Move from there.
3122 (write_psymtabs_to_index): Make non-static, add basename
3123 parameter. Write to temporary files, rename when done.
3124 (save_gdb_index_command): Adjust call to
3125 write_psymtabs_to_index.
3126 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3127 field.
3128 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3129 (get_gdb_index_contents_from_cache): New.
3130 (get_gdb_index_contents_from_cache_dwz): New.
3131 (dwarf2_initialize_objfile): Read index from cache.
3132 (dwarf2_build_psymtabs): Save to index.
3133 * dwarf-index-cache.h: New file.
3134 * dwarf-index-cache.c: New file.
3135 * dwarf-index-write.h: New file.
3136
3137 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3138
3139 * gnulib/aclocal.m4: Re-generate.
3140 * gnulib/config.in: Re-generate.
3141 * gnulib/configure: Re-generate.
3142 * gnulib/import/Makefile.am: Re-generate.
3143 * gnulib/import/Makefile.in: Re-generate.
3144 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3145 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3146 * gnulib/import/m4/mkdir.m4: New file.
3147 * gnulib/import/mkdir.c: New file.
3148 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3149 module.
3150
3151 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3152
3153 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3154 * common/scoped_mmap.c: New file.
3155 * common/scoped_mmap.h (destroy): New method.
3156 (~scoped_mmap, reset): Use destroy.
3157 (scoped_mmap): New move constructor.
3158 (mmap_file): New declaration.
3159 * unittests/scoped_mmap-selftests.c (test_normal,
3160 test_invalid_filename, run_tests): New functions.
3161 (_initialize_scoped_mmap_selftests): Register selftest.
3162
3163 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3164
3165 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3166 (read_gdb_index_from_buffer): ... this. Remove section
3167 parameter, add buffer parameter.
3168 (get_gdb_index_contents_ftype,
3169 get_gdb_index_contents_dwz_ftype): New typedefs.
3170 (dwarf2_read_gdb_index): Add callback parameters to get the
3171 index contents.
3172 (get_gdb_index_contents_from_section): New.
3173 (dwarf2_initialize_objfile): Update call to
3174 dwarf2_read_gdb_index.
3175
3176 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3177
3178 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3179 (gdb_open_cloexec): Likewise.
3180 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3181 (commandline_from_pid): Likewise.
3182 (linux_xfer_osdata_threads): Likewise.
3183 (linux_xfer_osdata_fds): Likewise.
3184 * ada-lang.c (is_package_name): Likewise.
3185 * auxv.c (procfs_xfer_auxv): Likewise.
3186 * breakpoint.c (print_one_breakpoint_location): Use
3187 uiout::field_fmt.
3188 (print_one_catch_solib): Use string_printf.
3189 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3190 (add_pe_forwarded_sym): Likewise.
3191 * dwarf2read.c (create_type_unit_group): Likewise.
3192 (build_error_marker_type): Likewise.
3193 * infcall.c (get_function_name): Likewise.
3194 * valprint.c (print_converted_chars_to_obstack): Likewise.
3195 * xtensa-tdep.c (xtensa_register_type): Likewise.
3196
3197 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3198
3199 * remote.c (remote_target::download_tracepoint): Fix format
3200 string errors.
3201
3202 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3203
3204 * tracefile.c: Include common/byte-vector.h.
3205 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3206 with trace_regblock_size if needed. Update uses of buf.
3207
3208 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3209
3210 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3211 std::vector<unsigned char>.
3212 * tracepoint.c (collection_list::collection_list): Remove
3213 m_regs_mask initializer from initializer list. Resize
3214 m_regs_mask using the largest remote register number.
3215 (collection_list::add_remote_register): Remove size check on
3216 m_regs_mask. Use at to access element.
3217 (collection_list::stringify): Change type of temp_buf to
3218 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3219 stringify the register mask. Use pack_hex_byte for the register
3220 mask.
3221
3222 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3223
3224 * tracepoint.h (class collection_list) <add_register>: Remove.
3225 <add_remote_register, add_ax_registers, add_local_register>:
3226 Declare.
3227 <add_memrange>: Add scope parameter.
3228 * tracepoint.c (encode_actions_1): Likewise.
3229 (collection_list::add_register): Rename to ...
3230 (collection_list::add_remote_register): ... this. Update
3231 comment.
3232 (collection_list::add_ax_registers, add_local_register): New
3233 methods.
3234 (collection_list::add_memrange): Add scope parameter. Call
3235 add_local_register instead of add_register.
3236 (finalize_tracepoint_aexpr): New function.
3237 (collection_list::collect_symbol): Update calls to add_memrange.
3238 Call add_local_register instead of add_register. Call
3239 add_ax_registers. Call finalize_tracepoint_aexpr.
3240 (encode_actions_1): Get remote regnos for $reg action. Call
3241 add_remote_register, add_ax_registers, and add_local_register.
3242 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3243 (validate_actionline): Call finalize_tracepoint_aexpr.
3244
3245 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3246
3247 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3248 Replace array buf with gdb::char_vector buf, of size
3249 get_remote_packet_size (). Replace references to buf and
3250 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3251 and xsnprintf with snprintf. Raise errors if the buffer is too
3252 small.
3253
3254 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3255
3256 * remote.c (remote_target::download_tracepoint): Fix the has_more
3257 predicate in the QTDP action list iteration.
3258
3259 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3260
3261 * remote.c (remote_target::download_tracepoint): Fix indentation
3262 in for block.
3263
3264 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3265
3266 * proc-api.c (_initialize_proc_api): Remove c, unused.
3267 * procfs.c (procfs_init_inferior): Remove signals, unused.
3268 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3269 unused.
3270
3271 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3272 Andrew Burgess <andrew.burgess@embecosm.com>
3273
3274 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3275 'W_STOPCODE (0)' as this could be ambiguous.
3276
3277 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3278
3279 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3280 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3281 "ai_socktype").
3282
3283 2018-08-02 Tom Tromey <tom@tromey.com>
3284
3285 PR symtab/16842.
3286 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3287 symbols.
3288 (process_structure_scope): Likewise.
3289
3290 2018-08-02 Xavier Roirand <roirand@adacore.com>
3291
3292 PR gdb/22629:
3293 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3294 kill inferior.
3295
3296 2018-08-02 Tom Tromey <tom@tromey.com>
3297
3298 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3299 (darwin_suspend_inferior, darwin_resume_inferior)
3300 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3301 (darwin_check_new_threads): Check result of get_darwin_inferior.
3302
3303 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3304
3305 GDB 8.1.1 released.
3306
3307 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3308
3309 * varobj.c (varobj_get_path_expr_parent): Report an error if
3310 parent is a dynamic varobj.
3311
3312 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3313
3314 * gnulib/aclocal.m4: Re-generate.
3315 * gnulib/config.in: Re-generate.
3316 * gnulib/configure: Re-generate.
3317 * gnulib/import/Makefile.in: Re-generate.
3318 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3319 * gnulib/import/m4/onceonly.m4: Re-generate.
3320
3321 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3322
3323 * target-descriptions.c (struct xml_test_tdesc): New.
3324 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3325 (record_xml_tdesc): Update.
3326 (maintenance_check_xml_descriptions): Update.
3327 * target-descriptions.h (record_xml_tdesc): Update comment.
3328
3329 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3330
3331 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3332 checking array bounds are defined.
3333
3334 2018-07-30 Tom Tromey <tom@tromey.com>
3335
3336 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3337 irreflexivity violation.
3338
3339 2018-07-30 Tom Tromey <tom@tromey.com>
3340
3341 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3342 * value.c (unpack_long): Remove lint code.
3343 * valops.c (value_ind): Remove lint code.
3344 * valarith.c (value_x_binop, value_x_unop, value_equal)
3345 (value_pos): Remove lint code.
3346
3347 2018-07-28 Tom de Vries <tdevries@suse.de>
3348
3349 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3350 with undefined upper bound as <optimized out>.
3351
3352 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3353
3354 * gcore.in: Rename variable "name" to "prefix". Expand
3355 "usage" text.
3356
3357 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3358
3359 * windows-nat.c (windows_nat_target::create_inferior): Update to
3360 call close() in global namespace.
3361
3362 2018-07-26 Tom Tromey <tom@tromey.com>
3363
3364 * dwarf-index-write.c (add_address_entry): Don't add objfile
3365 offsets.
3366 * dbxread.c (find_stab_function): Rename from
3367 find_stab_function_addr. Return a bound_minimal_symbol.
3368 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3369 Don't add objfile offsets.
3370 (end_psymtab): Use raw_text_low, raw_text_high,
3371 MSYMBOL_VALUE_RAW_ADDRESS.
3372 (read_ofile_symtab): Update.
3373 (process_one_symbol): Update.
3374 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3375 offsets.
3376 (dw2_relocate): Remove.
3377 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3378 searching addrmap.
3379 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3380 Update.
3381 (process_psymtab_comp_unit_reader, add_partial_symbol)
3382 (add_partial_subprogram, dwarf2_ranges_read): Update.
3383 (load_partial_dies): Update.
3384 (add_address_entry): Don't add objfile offsets.
3385 (dwarf2_build_include_psymtabs): Update.
3386 (create_addrmap_from_aranges): Don't add objfile offsets.
3387 (dw2_find_pc_sect_compunit_symtab): Update.
3388 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3389 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3390 Update.
3391 (parse_partial_symbols): Don't add objfile offsets. Use
3392 raw_text_low, raw_text_high. Update.
3393 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3394 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3395 or call 'relocate' quick function. Clear psymbol_map.
3396 * psympriv.h (struct partial_symbol) <address>: Add section
3397 offset.
3398 <set_unrelocated_address>: Rename from set_address.
3399 <raw_text_low, raw_text_high>: New methods.
3400 <text_low, text_high>: Add objfile parameter.
3401 (add_psymbol_to_bcache): Add 'section' parameter. Call
3402 set_unrelocated_address.
3403 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3404 (find_pc_psymbol): Update.
3405 (fixup_psymbol_section, relocate_psymtabs): Remove.
3406 (dump_psymtab, psym_functions): Update.
3407 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3408 parameter.
3409 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3410 (start_psymtab_common): Update.
3411 * symfile-debug.c (debug_qf_relocate): Remove.
3412 (debug_sym_quick_functions): Update.
3413 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3414 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3415 Update.
3416
3417 2018-07-26 Tom Tromey <tromey@redhat.com>
3418
3419 * dbxread.c (end_psymtab): Use text_high_valid and
3420 text_low_valid.
3421 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3422 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3423 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3424 Update comment.
3425 <text_low_valid, text_high_valid>: New fields.
3426 <set_text_low, set_text_high>: Update.
3427 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3428
3429 2018-07-26 Tom Tromey <tom@tromey.com>
3430
3431 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3432 Update.
3433 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3434 textlow and texthigh fields.
3435 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3436 Update.
3437 * mdebugread.c (parse_lines, parse_partial_symbols)
3438 (psymtab_to_symtab_1): Update.
3439 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3440 Rename fields. Update comment. Now private.
3441 <text_low, text_high, set_text_low, set_text_high>: New methods.
3442 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3443 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3444 (start_psymtab_common, maintenance_info_psymtabs)
3445 (maintenance_check_psymtabs): Update.
3446 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3447 texthigh fields.
3448 (scan_xcoff_symtab): Update.
3449
3450 2018-07-26 Tom Tromey <tromey@redhat.com>
3451
3452 * psympriv.h (struct partial_symbol) <unrelocated_address,
3453 address, set_address>: New methods.
3454 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3455 (fixup_psymbol_section, relocate_psymtabs): Update.
3456 (print_partial_symbols): Add 'objfile' parameter. Update.
3457 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3458 Update.
3459
3460 2018-07-26 Tom Tromey <tom@tromey.com>
3461
3462 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3463 (debug_names::write_psymbols): Update.
3464 * psympriv.h (struct partial_symbol): Derive from
3465 general_symbol_info.
3466 <obj_section>: New method.
3467 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3468 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3469 (find_pc_sect_psymbol, fixup_psymbol_section)
3470 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3471 (print_partial_symbols, recursively_search_psymtabs)
3472 (compare_psymbols, psymbol_hash, psymbol_compare)
3473 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3474 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3475
3476 2018-07-26 Tom Tromey <tromey@redhat.com>
3477
3478 * dbxread.c (end_psymtab): Remove dead code.
3479
3480 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3481
3482 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3483 DWARF unwinders are disabled.
3484 * dwarf2-frame.c: Add dwarf2read.h include.
3485 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3486 disabled.
3487 (dwarf2_frame_unwinders_enabled_p): Define.
3488 (show_dwarf_unwinders_enabled_p): New function.
3489 (_initialize_dwarf2_frame): Register switch to control DWARF
3490 unwinder use.
3491 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3492 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3493 (show_dwarf_cmdlist): Remove static keyword.
3494 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3495 (show_dwarf_cmdlist): Declare.
3496 * NEWS: Document new feature.
3497
3498 2018-07-26 Tom de Vries <tdevries@suse.de>
3499
3500 PR breakpoints/23366
3501 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3502
3503 2018-07-26 Tom de Vries <tdevries@suse.de>
3504
3505 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3506 DW_AT_count can't be translated to a dynamic prop.
3507
3508 2018-07-25 Tom de Vries <tdevries@suse.de>
3509
3510 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3511 try/catch.
3512
3513 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3514
3515 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3516
3517 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3518
3519 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3520
3521 2018-07-24 Keith Seitz <keiths@redhat.comt
3522
3523 PR symtab/23010
3524 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3525 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3526 instead of add_symbol_to_list.
3527 (read_file_scope): Call prepare_one_comp_unit before reading
3528 any other DIEs.
3529
3530 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3531
3532 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3533
3534 2018-07-24 Tom Tromey <tom@tromey.com>
3535
3536 * utils.c (malloc, realloc, free): Don't declare.
3537 * configure, config.in: Rebuild.
3538 * configure.ac: Don't check for declarations of free, malloc, or
3539 realloc.
3540
3541 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3542
3543 * aarch64-linux-nat.c
3544 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3545 variable.
3546 * arm-linux-nat.c (fetch_regs): Likewise.
3547 (store_regs): Likewise.
3548 (fetch_vfp_regs): Likewise.
3549 (store_vfp_regs): Likewise.
3550 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3551 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3552 (arm_linux_nat_target::insert_watchpoint): Likewise.
3553 (arm_linux_nat_target::remove_watchpoint): Likewise.
3554 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3555 Likewise.
3556 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3557 Likewise.
3558 * ppc-linux-nat.c (fetch_register): Likewise.
3559 (fetch_all_gp_regs): Likewise.
3560 (fetch_ppc_registers): Likewise.
3561 (store_all_gp_regs): Likewise.
3562 (store_ppc_registers): Likewise.
3563 (hwdebug_insert_point): Likewise.
3564 (can_use_watchpoint_cond_accel): Likewise.
3565 * remote-sim.c (gdb_os_write_stdout): Likewise.
3566
3567 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3568 Tom Tromey <tom@tromey.com>
3569
3570 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3571 test for it.
3572 * configure: Rebuild.
3573
3574 2018-07-22 Tom Tromey <tom@tromey.com>
3575
3576 * regformats/regdat.sh: Define xmltarget_${name} inside
3577 #ifndef IN_PROCESS_AGENT.
3578
3579 2018-07-22 Tom Tromey <tom@tromey.com>
3580
3581 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3582
3583 2018-07-22 Tom Tromey <tom@tromey.com>
3584
3585 * symfile.c (reread_symbols): Notify iter, not objfile.
3586
3587 2018-07-22 Tom Tromey <tom@tromey.com>
3588
3589 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3590 Use arch_ops.
3591 (ravenscar_thread_target::prepare_to_store): Likewise.
3592
3593 2018-07-22 Tom Tromey <tom@tromey.com>
3594
3595 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3596 unused variable. Call value_fetch_lazy when needed.
3597 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3598 Remove unused variable. Call value_fetch_lazy when needed.
3599
3600 2018-07-22 Tom Tromey <tom@tromey.com>
3601
3602 * m32c-tdep.c (mark_dma): Return void.
3603 (make_regs): Remove unused declarations.
3604
3605 2018-07-22 Tom Tromey <tom@tromey.com>
3606
3607 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3608 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3609 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3610 bkscm_get_valid_block_smob_arg_unsafe for effect.
3611
3612 2018-07-22 Tom Tromey <tom@tromey.com>
3613
3614 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3615 value_type.
3616
3617 2018-07-22 Tom Tromey <tom@tromey.com>
3618
3619 * windows-nat.c (saved_context): Conditionally define.
3620 * remote.c (remote_target::remote_btrace_maybe_reopen):
3621 Conditionally declare "warned".
3622 * inflow.c (sigquit_ours): Conditionally define.
3623 (new_tty): Move "tty" declaration inside #if.
3624 * guile/guile.c (guile_datadir): Conditionally define.
3625 * charset.c (set_be_le_names): Move some declarations inside #if.
3626 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3627 #if.
3628 (parse_xml_btrace_conf): Likewise.
3629
3630 2018-07-22 Tom Tromey <tom@tromey.com>
3631
3632 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3633
3634 2018-07-22 Tom Tromey <tom@tromey.com>
3635
3636 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3637 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3638 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3639 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3640 * stack.c (frame_apply_level_command): Remove unused variable.
3641 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3642 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3643 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3644 unused variable.
3645 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3646 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3647 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3648 variable.
3649 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3650 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3651 variable.
3652 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3653 Remove unused variable.
3654 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3655 variable.
3656 * common/tdesc.c (print_xml_feature::visit): Remove unused
3657 variable.
3658 * compile/compile-object-load.c (store_regs): Remove unused
3659 variables.
3660 * complaints.c (clear_complaints): Remove unused variable.
3661 * corelow.c (core_target_open): Remove unused variable.
3662 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3663 variable.
3664 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3665 variable.
3666 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3667 variable.
3668 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3669 variable.
3670 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3671 variable.
3672 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3673 variable.
3674 * ia64-tdep.c (examine_prologue): Remove unused variable.
3675 * infcall.c (run_inferior_call): Remove unused variable.
3676 * inferior.c (exit_inferior): Remove unused variable.
3677 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3678 * linespec.c (decode_line_2): Remove unused variable.
3679 * linux-nat.c (super_close): Remove.
3680 * linux-tdep.c (linux_info_proc): Remove unused variable.
3681 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3682 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3683 Remove unused variable.
3684 * parse.c (find_minsym_type_and_address): Remove unused variable.
3685 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3686 variable.
3687 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3688 variable.
3689 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3690 variables.
3691 * record-btrace.c (record_btrace_target::store_registers): Remove
3692 unused variable.
3693 (cmd_show_record_btrace_cpu): Remove unused variable.
3694 * riscv-tdep.c (riscv_register_reggroup_p)
3695 (riscv_push_dummy_call, riscv_return_value): Remove unused
3696 variable.
3697 * rust-exp.y (literal): Remove unused variable.
3698 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3699 unused variable.
3700 <STRUCTOP_ANONYMOUS>: Likewise.
3701 * s390-linux-tdep.c (s390_linux_init_abi_31)
3702 (s390_linux_init_abi_64): Remove unused variable.
3703 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3704 (file_select_thread, net_windows_open, _initialize_ser_windows):
3705 Remove unused variables.
3706 * symtab.c (find_pc_sect_line): Remove unused variable.
3707 * target-memory.c (compute_garbled_blocks): Remove unused
3708 variable.
3709 (target_write_memory_blocks): Remove unused variable.
3710 * target.c (target_stack::unpush): Remove unused variables.
3711 * tracepoint.c (start_tracing, all_tracepoint_actions)
3712 (merge_uploaded_trace_state_variables)
3713 (print_one_static_tracepoint_marker): Remove unused variable.
3714 * unittests/basic_string_view/element_access/char/1.cc (test01):
3715 Remove unused variable.
3716 * windows-nat.c (windows_continue, windows_add_all_dlls)
3717 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3718 Remove unused variables.
3719
3720 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3721
3722 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3723 attr_profile in HAVE_ELF.
3724 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3725 HAVE_ELF.
3726
3727 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3728
3729 * frame.c (frame_register_unwind): Change parameter name.
3730 (frame_unwind_register): Likewise.
3731 (frame_unwind_register_value): Likewise.
3732 (frame_unwind_register_signed): Likewise.
3733 (frame_unwind_register_unsigned): Likewise.
3734 * frame.h (frame_register_unwind): Likewise.
3735 (frame_unwind_register): Likewise.
3736 (frame_unwind_register_value): Likewise.
3737 (frame_unwind_register_signed): Likewise.
3738 (frame_unwind_register_unsigned): Likewise.
3739 (frame_unwind_arch): Likewise.
3740
3741 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3742
3743 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3744 ISA maintenance.
3745
3746 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3747
3748 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3749 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3750 hand.
3751
3752 2018-07-20 Keith Seitz <keiths@redhat.com>
3753
3754 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3755 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3756 m_compunit_symtab, m_language>: Add "m_" prefix.
3757 Update all uses.
3758 * buildsym.c: Update all uses.
3759
3760 2018-07-20 Tom Tromey <tom@tromey.com>
3761
3762 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3763 * buildsym.h (record_line_ftype): Remove typedef.
3764
3765 2018-07-20 Tom Tromey <tom@tromey.com>
3766
3767 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3768 (end_expandable_symtab): Likewise.
3769 (end_symtab_get_static_block): Likewise.
3770 (end_symtab_from_static_block): Likewise.
3771 * buildsym-legacy.c (augment_type_symtab): Remove.
3772 (end_expandable_symtab): Remove.
3773 (end_symtab_get_static_block): Remove.
3774 (end_symtab_from_static_block): Remove.
3775
3776 2018-07-20 Tom Tromey <tom@tromey.com>
3777
3778 * dwarf2read.c: Include buildsym.h.
3779 (struct dwarf2_cu) <builder>: New method.
3780 (fixup_go_packaging): Update.
3781 (process_full_comp_unit, process_full_type_unit): Update. Don't
3782 use scoped_free_pendings.
3783 (using_directives): Add "cu" parameter, remove "language".
3784 (read_import_statement, setup_type_unit_groups, )
3785 (read_func_scope, read_lexical_block_scope)
3786 (dwarf2_record_block_ranges, read_namespace): Update.
3787 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3788 (lnp_state_machine::handle_end_sequence): Update.
3789 (class lnp_state_machine) <m_cu>: New member.
3790 <m_record_line_callback>: Remove.
3791 <m_currently_recording_lines>: New member.
3792 (lnp_state_machine::handle_set_file): Update.
3793 (noop_record_line): Remove.
3794 (dwarf_record_line_p): Add cu parameter.
3795 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3796 (lnp_state_machine::record_line)
3797 (lnp_state_machine::lnp_state_machine)
3798 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3799 (dwarf_decode_lines): Update.
3800 (dwarf2_start_subfile): Add cu parameter.
3801 (dwarf2_start_symtab, new_symbol): Update.
3802 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3803 Remove dwarf2_per_objfile parameter.
3804 (dwarf_decode_macros): Update.
3805
3806 2018-07-20 Tom Tromey <tom@tromey.com>
3807
3808 * stabsread.c (define_symbol): Update.
3809 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3810 * dwarf2read.c (new_symbol): Update.
3811 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3812 * cp-namespace.c: Include buildsym.h.
3813 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3814 * buildsym-legacy.c (get_buildsym_compunit): New function.
3815
3816 2018-07-20 Tom Tromey <tom@tromey.com>
3817
3818 * xcoffread.c: Include buildsym-legacy.h.
3819 * windows-nat.c: Include buildsym-legacy.h.
3820 * stabsread.c: Include buildsym-legacy.h.
3821 * mdebugread.c: Include buildsym-legacy.h.
3822 * buildsym-legacy.h: New file.
3823 * buildsym-legacy.c: New file, from buildsym.c.
3824 * go32-nat.c: Include buildsym-legacy.h.
3825 * dwarf2read.c: Include buildsym-legacy.h.
3826 * dbxread.c: Include buildsym-legacy.h.
3827 * cp-namespace.c: Include buildsym-legacy.h.
3828 * coffread.c: Include buildsym-legacy.h.
3829 * buildsym.h: Move some contents to buildsym-legacy.h.
3830 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3831 buildsym-legacy.c.
3832 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3833
3834 2018-07-20 Tom Tromey <tom@tromey.com>
3835
3836 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3837 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3838 (buildsym_compunit::buildsym_compunit)
3839 (buildsym_compunit::~buildsym_compunit)
3840 (buildsym_compunit::get_macro_table): Define.
3841
3842 2018-07-20 Tom Tromey <tom@tromey.com>
3843
3844 * buildsym.c (reset_symtab_globals): Remove.
3845 (buildsym_compunit::end_symtab_from_static_block): Update.
3846 (buildsym_compunit::augment_type_symtab): Update.
3847 (end_symtab_from_static_block): Call free_buildsym_compunit.
3848 (augment_type_symtab, end_symtab, end_expandable_symtab):
3849 Likewise.
3850
3851 2018-07-20 Tom Tromey <tom@tromey.com>
3852
3853 * arch-utils.c: Do not include buildsym.h.
3854 * mipsread.c: Do not include buildsym.h.
3855 * machoread.c: Do not include buildsym.h.
3856 * elfread.c: Do not include buildsym.h.
3857
3858 2018-07-20 Tom Tromey <tom@tromey.com>
3859
3860 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3861 initialization.
3862 (buildsym_compunit): Add new constructor.
3863 (struct buildsym_compunit) <get_last_source_file, finish_block,
3864 record_block_range, start_subfile, patch_subfile_names,
3865 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3866 set_last_source_start_addr, get_last_source_start_addr,
3867 get_local_using_directives, set_local_using_directives,
3868 get_global_using_directives, outermost_context_p,
3869 get_current_context_stack, get_context_stack_depth,
3870 get_current_subfile, get_local_symbols, get_file_symbols,
3871 get_global_symbols, record_debugformat, record_producer,
3872 push_context, pop_context, end_symtab_get_static_block,
3873 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3874 New public methods.
3875 <record_pending_block, finish_block_internal, make_blockvector,
3876 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3877 private methods.
3878 Update all users.
3879
3880 2018-05-22 Tom Tromey <tom@tromey.com>
3881
3882 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3883 parameter.
3884 (finish_block_internal): Update.
3885
3886 2018-07-20 Tom Tromey <tom@tromey.com>
3887
3888 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3889 parameter.
3890 (finish_block_internal): Update.
3891
3892 2018-07-20 Tom Tromey <tom@tromey.com>
3893
3894 * buildsym.h (EXTERN): Don't define or undef.
3895 * buildsym.c (EXTERN): Don't define.
3896
3897 2018-07-20 Tom Tromey <tom@tromey.com>
3898
3899 * buildsym.c: Remove TODO comment.
3900
3901 2018-07-20 Tom Tromey <tom@tromey.com>
3902
3903 * coffread.c (coff_symtab_read): Update.
3904 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3905 (xcoff_new_init): Update.
3906 * mipsread.c (mipscoff_new_init): Update.
3907 * mdebugread.c (mdebug_build_psymtabs): Update.
3908 * elfread.c (elf_new_init): Update.
3909 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3910 Update.
3911 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3912 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3913 (stabsect_build_psymtabs): Update.
3914 * buildsym.h (buildsym_init): Don't declare.
3915 * buildsym.c: Update comment.
3916 (prepare_for_building): Remove.
3917 (start_symtab, restart_symtab): Update.
3918 (reset_symtab_globals): Update comment.
3919 (buildsym_init): Remove.
3920
3921 2018-07-20 Tom Tromey <tom@tromey.com>
3922
3923 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3924 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3925 (read_enum_type, common_block_start, common_block_end)
3926 (cleanup_undefined_types_1, finish_global_stabs): Update.
3927 * mdebugread.c (psymtab_to_symtab_1): Update.
3928 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3929 (read_lexical_block_scope, new_symbol): Update.
3930 * dbxread.c (process_one_symbol): Update.
3931 * coffread.c (coff_symtab_read, process_coff_symbol)
3932 (coff_read_enum_type): Update.
3933 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3934 declare.
3935 (get_local_symbols, get_file_symbols, get_global_symbols): New
3936 functions.
3937 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3938 m_global_symbols.
3939 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3940 (~scoped_free_pendings): Update.
3941 (finish_block, prepare_for_building, reset_symtab_globals)
3942 (end_symtab_get_static_block, end_symtab_with_blockvector)
3943 (augment_type_symtab, push_context): Update.
3944 (get_local_symbols, get_file_symbols, get_global_symbols): New
3945 functions.
3946 (buildsym_init): Update.
3947
3948 2018-07-20 Tom Tromey <tom@tromey.com>
3949
3950 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3951 (process_full_type_unit): Likewise.
3952 (dwarf2_start_symtab): Set list_in_scope.
3953
3954 2018-07-20 Tom Tromey <tom@tromey.com>
3955
3956 * dwarf2read.c (process_psymtab_comp_unit_reader)
3957 (build_type_psymtabs_reader): Do not set list_in_scope.
3958
3959 2018-07-20 Tom Tromey <tom@tromey.com>
3960
3961 * buildsym.c (free_pendings): Remove.
3962 (add_symbol_to_list, scoped_free_pendings)
3963 (finish_block_internal, buildsym_init): Update.
3964
3965 2018-07-20 Tom Tromey <tom@tromey.com>
3966
3967 * xcoffread.c (read_xcoff_symtab): Update.
3968 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3969 Update.
3970 * dbxread.c (process_one_symbol): Update.
3971 * coffread.c (coff_symtab_read): Update.
3972 * buildsym.h (finish_block): Update.
3973 * buildsym.c (finish_block): Remove "listhead" argument.
3974 (end_symtab_get_static_block): Update.
3975
3976 2018-07-20 Tom Tromey <tom@tromey.com>
3977
3978 * buildsym.h (class scoped_free_pendings): Remove constructor.
3979 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3980 method.
3981 <m_pending_block_obstack, m_pending_blocks>: New members.
3982 (pending_block_obstack, pending_blocks): Remove.
3983 (scoped_free_pendings::scoped_free_pendings): Default.
3984 (~scoped_free_pendings): Update.
3985 (free_pending_blocks): Remove.
3986 (finish_block_internal, record_pending_block, make_blockvector)
3987 (end_symtab_get_static_block, augment_type_symtab, push_context)
3988 (buildsym_init): Update.
3989
3990 2018-07-20 Tom Tromey <tom@tromey.com>
3991
3992 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3993 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3994 members.
3995 (pending_addrmap, pending_addrmap_obstack)
3996 (pending_addrmap_interesting): Remove.
3997 (scoped_free_pendings, record_block_range, make_blockvector)
3998 (prepare_for_building, reset_symtab_globals, buildsym_init):
3999 Update.
4000
4001 2018-07-20 Tom Tromey <tom@tromey.com>
4002
4003 * xcoffread.c (process_linenos): Update.
4004 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4005 * mdebugread.c (psymtab_to_symtab_1): Update.
4006 * dwarf2read.c (setup_type_unit_groups)
4007 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4008 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4009 * dbxread.c (process_one_symbol): Update.
4010 * coffread.c (coff_symtab_read, enter_linenos)
4011 (process_coff_symbol): Update.
4012 * buildsym.h (current_subfile): Don't declare.
4013 (get_current_subfile): Declare.
4014 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4015 member.
4016 (start_subfile, free_buildsym_compunit, push_subfile)
4017 (prepare_for_building, start_symtab): Update.
4018 (get_current_subfile): New function.
4019
4020 2018-07-20 Tom Tromey <tom@tromey.com>
4021
4022 * coffread.c (coff_symtab_read): Update.
4023 * xcoffread.c (read_xcoff_symtab): Update.
4024 * dwarf2read.c (new_symbol): Update.
4025 (read_func_scope, read_lexical_block_scope): Update.
4026 * dbxread.c (process_one_symbol): Update.
4027 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4028 (outermost_context_p): Remove macro.
4029 (outermost_context_p, get_current_context_stack)
4030 (get_context_stack_depth): Declare.
4031 (pop_context): Return struct context_stack.
4032 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4033 member.
4034 (context_stack_size): Remove.
4035 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4036 (prepare_for_building, end_symtab_get_static_block)
4037 (augment_type_symtab, push_context): Update.
4038 (pop_context): Return struct context_stack.
4039 (outermost_context_p, get_current_context_stack)
4040 (get_context_stack_depth): New functions.
4041 (buildsym_init): Update.
4042
4043 2018-07-20 Tom Tromey <tom@tromey.com>
4044
4045 * rust-exp.y: Now a pure parser. Update all rules.
4046 (%union): Move earlier.
4047 (current_parser, work_obstack): Remove globals.
4048 (rust_parser, ~rust_parser): Update.
4049 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4050 lex_character, lex_number, lex_string, lex_identifier,
4051 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4052 convert_name, convert_params_to_expression,
4053 convert_ast_to_expression, ast_basic_type, ast_operation,
4054 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4055 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4056 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4057 ast_array_type, ast_slice_type, ast_reference_type,
4058 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4059 (rust_parse): Update.
4060 (rustyyerror, rustyylex): Add parser parameter.
4061 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4062 (rust_lex_stringish_test, rust_lex_test_sequence)
4063 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4064 (rust_lex_test_push_back, rust_lex_tests): Update.
4065
4066 2018-07-19 Pedro Alves <palves@redhat.com>
4067
4068 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4069 gdb::unique_xmalloc_ptr.
4070 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4071 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4072 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4073 copy-initialization.
4074 * guile/scm-pretty-print.c (ppscm_print_children): Use
4075 gdb::unique_xmalloc_ptr instead of cleanups.
4076 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4077 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4078 gdb::unique_xmalloc_ptr.
4079 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4080 Adjust to use gdb::unique_xmalloc_ptr.
4081 * guile/scm-utils.c (extract_arg): Adjust.
4082 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4083 gdb::unique_xmalloc_ptr instead of a cleanup.
4084
4085 2018-07-19 Tom Tromey <tom@tromey.com>
4086
4087 * utils.c (do_value_free_to_mark)
4088 (make_cleanup_value_free_to_mark): Remove.
4089 * utils.h (make_cleanup_value_free_to_mark): Remove.
4090
4091 2018-07-19 Pedro Alves <palves@redhat.com>
4092
4093 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4094 forwarding reference.
4095
4096 2018-07-18 Pedro Alves <palves@redhat.com>
4097
4098 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4099 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4100 cleanup.
4101
4102 2018-07-18 Pedro Alves <palves@redhat.com>
4103
4104 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4105 exceptions.
4106 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4107 (gdbscm_wrap): New.
4108 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4109 directly instead of a cleanup.
4110 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4111 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4112 (vlscm_binop_gdbthrow): New, factored out from ...
4113 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4114 (vlscm_rich_compare): Use gdbscm_wrap.
4115 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4116 instead of a cleanup.
4117 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4118 cleanup.
4119 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4120 Use xfree directly instead of a cleanup.
4121 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4122 Adjust to use gdbscm_wrap and scoped_value_mark.
4123 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4124 (gdbscm_value_address, gdbscm_value_dereference)
4125 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4126 scoped_value_mark.
4127 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4128 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4129 scoped_value_mark.
4130 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4131 gdbscm_wrap and scoped_value_mark.
4132 (gdbscm_value_to_string): Use xfree directly instead of a
4133 cleanup. Move 'buffer' unique_ptr to TRY scope.
4134 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4135 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4136 scoped_value_mark.
4137 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4138 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4139 scoped_value_mark.
4140 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4141 gdbscm_wrap.
4142
4143 2018-07-18 Tom de Vries <tdevries@suse.de>
4144
4145 * findvar.c (default_read_var_value): Also resolve dynamic type for
4146 LOC_OPTIMIZED_OUT vars.
4147
4148 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4149
4150 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4151 decoding.
4152
4153 2018-07-17 Tom Tromey <tom@tromey.com>
4154
4155 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4156 (compute_enum_list, pascm_set_param_value_x)
4157 (gdbscm_parameter_value): Update.
4158 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4159 (gdbscm_scm_to_host_string): Update.
4160 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4161 Update.
4162 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4163 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4164 * guile/scm-string.c (gdbscm_scm_to_string): Return
4165 unique_xmalloc_ptr.
4166 (gdbscm_scm_to_host_string): Likewise.
4167
4168 2018-07-17 Tom Tromey <tom@tromey.com>
4169
4170 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4171 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4172 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4173 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4174 unique_xmalloc_ptr.
4175
4176 2018-07-17 Tom Tromey <tom@tromey.com>
4177
4178 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4179 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4180 Update.
4181 * guile/scm-cmd.c (cmdscm_function): Update.
4182 * guile/scm-pretty-print.c
4183 (ppscm_print_exception_unless_memory_error): Update.
4184 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4185 Return unique_xmalloc_ptr.
4186
4187 2018-07-17 Tom Tromey <tom@tromey.com>
4188
4189 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4190 Use string_printf.
4191
4192 2018-07-17 Jim Wilson <jimw@sifive.com>
4193
4194 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4195 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4196 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4197 unecessary braces after EF_RISCV_RVC test. Delete call to
4198 set_gdbarch_decr_pc_after_break.
4199
4200 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4201 RISCV_LAST_FP_REGNUM + 1.
4202 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4203
4204 2018-07-17 Tom Tromey <tom@tromey.com>
4205
4206 * configure.ac: Remove --disable-gdbcli.
4207 * configure: Rebuild.
4208 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4209 (SUBDIR_CLI_CFLAGS): Remove.
4210 (SFILES): Use SUBDIR_CLI_SRCS.
4211 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4212
4213 2018-07-17 Tom Tromey <tom@tromey.com>
4214
4215 PR gdb/18624:
4216 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4217
4218 2018-07-16 Jim Wilson <jimw@sifive.com>
4219
4220 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4221
4222 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4223
4224 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4225 variable.
4226 (libunwind_frame_sniffer): Likewise.
4227 (libunwind_frame_prev_register): Likewise.
4228 (libunwind_sigtramp_frame_sniffer): Likewise.
4229 * ia64-tdep.c (ia64_access_reg): Likewise.
4230 (ia64_access_rse_reg): Likewise.
4231 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4232 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4233
4234 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4235
4236 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4237
4238 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4239
4240 * remote-sim.c (gdbsim_target::close,
4241 gdbsim_target::mourn_inferior): Remove unused variables.
4242
4243 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4244
4245 * ia64-tdep.c (ktab_buf): New global.
4246 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4247 (get_kernel_table): Adjust.
4248
4249 2018-07-16 Tom Tromey <tom@tromey.com>
4250
4251 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4252 * dwarf2read.c (using_directives, new_symbol): Use
4253 outermost_context_p.
4254 * dbxread.c (process_one_symbol): Use outermost_context_p.
4255 * coffread.c (coff_symtab_read): Use outermost_context_p.
4256
4257 2018-07-16 Tom Tromey <tom@tromey.com>
4258
4259 * dwarf2read.c (using_directives, read_func_scope)
4260 (read_lexical_block_scope): Update.
4261 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4262 * buildsym.h (local_using_directives, global_using_directives):
4263 Don't declare.
4264 (get_local_using_directives, set_local_using_directives)
4265 (get_global_using_directives): Declare.
4266 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4267 m_global_using_directives>: New members.
4268 (finish_block_internal, prepare_for_building)
4269 (reset_symtab_globals, end_symtab_get_static_block)
4270 (push_context): Update.
4271 (get_local_using_directives, set_local_using_directives)
4272 (get_global_using_directives): New functions.
4273 (buildsym_init): Update.
4274
4275 2018-07-16 Tom Tromey <tom@tromey.com>
4276
4277 * xcoffread.c (xcoff_initial_scan): Don't call
4278 free_pending_blocks.
4279 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4280 * buildsym.h (class scoped_free_pendings): Add constructor.
4281 (free_pending_blocks): Don't declare.
4282 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4283 (free_pending_blocks): Now static.
4284
4285 2018-07-16 Tom Tromey <tom@tromey.com>
4286
4287 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4288 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4289 member.
4290 (struct subfile_stack): Remove.
4291 (subfile_stack): Remove.
4292 (push_subfile, pop_subfile, buildsym_init): Update.
4293
4294 2018-07-16 Tom Tromey <tom@tromey.com>
4295
4296 * buildsym.c (push_subfile): Use gdb_assert.
4297 (pop_subfile): Use gdb_assert.
4298
4299 2018-07-16 Tom Tromey <tom@tromey.com>
4300
4301 * buildsym.h (merge_symbol_lists): Remove.
4302 * buildsym.c (merge_symbol_lists): Remove.
4303
4304 2018-07-16 Tom Tromey <tom@tromey.com>
4305
4306 * stabsread.c (scan_file_globals): Update comment.
4307 * stabsread.h (scan_file_globals): Move from buildsym.h.
4308 * buildsym.h (scan_file_globals): Move to stabsread.h.
4309
4310 2018-07-16 Tom Tromey <tom@tromey.com>
4311
4312 * xcoffread.c (xcoff_new_init): Update.
4313 * mipsread.c (mipscoff_new_init): Update.
4314 * mdebugread.c (mdebug_build_psymtabs): Update.
4315 * elfread.c (elf_new_init): Update.
4316 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4317 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4318 * buildsym.h (buildsym_new_init): Don't declare.
4319 * buildsym.c (buildsym_new_init): Remove.
4320
4321 2018-07-16 Tom Tromey <tom@tromey.com>
4322
4323 * stabsread.h (within_function): Move from buildsym.h.
4324 * stabsread.c (start_stabs): Clear within_function.
4325 * coffread.c (coff_start_symtab): Clear within_function.
4326 * buildsym.h (within_function): Move to stabsread.h.
4327 * buildsym.c (prepare_for_building): Update.
4328
4329 2018-07-16 Tom Tromey <tom@tromey.com>
4330
4331 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4332 * dwarf2read.c (dwarf2_start_symtab): Don't set
4333 processing_gcc_compilation.
4334 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4335
4336 2018-07-16 Tom Tromey <tom@tromey.com>
4337
4338 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4339 (next_symbol_text_func): Move from buildsym.h.
4340 * stabsread.c (hashname): Move from buildsym.c.
4341 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4342 (next_symbol_text_func, hashname): Move to stabsread.h.
4343 * buildsym.c: Don't include bcache.h
4344 (hashname): Move to stasbread.c.
4345
4346 2018-07-16 Tom Tromey <tom@tromey.com>
4347
4348 * buildsym.h (context_stack_size): Don't declare.
4349 * buildsym.c (context_stack_size): New global.
4350
4351 2018-07-16 Tom Tromey <tom@tromey.com>
4352
4353 * dbxread.c (processing_acc_compilation): New global.
4354 * buildsym.h (processing_acc_compilation): Don't declare.
4355
4356 2018-07-16 Tom Tromey <tom@tromey.com>
4357
4358 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4359 * dbxread.c (read_ofile_symtab): Update.
4360 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4361 * buildsym.h (last_source_start_addr): Remove.
4362 (set_last_source_start_addr, get_last_source_start_addr):
4363 Declare.
4364 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4365 parameter.
4366 (struct buildsym_compunit) <m_last_source_start_addr>: New
4367 member.
4368 (prepare_for_building): Remove start_addr parameter.
4369 (start_symtab, restart_symtab, end_symtab_get_static_block)
4370 (end_symtab_with_blockvector): Update.
4371 (set_last_source_start_addr, get_last_source_start_addr): New
4372 functions.
4373
4374 2018-07-16 Tom Tromey <tom@tromey.com>
4375
4376 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4377 member.
4378 (have_line_numbers): Remove.
4379 (record_line, prepare_for_building, end_symtab_get_static_block)
4380 (augment_type_symtab): Update.
4381
4382 2018-07-16 Tom Tromey <tom@tromey.com>
4383
4384 * buildsym.c (~buildsym_compunit): Free the macro table.
4385 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4386 methods.
4387 <m_pending_macros>: New member.
4388 (pending_macros): Remove.
4389 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4390 (reset_symtab_globals, end_symtab_get_static_block)
4391 (end_symtab_with_blockvector, augment_type_symtab)
4392 (buildsym_init): Update.
4393
4394 2018-07-16 Tom Tromey <tom@tromey.com>
4395
4396 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4397 parameter.
4398 (buildsym_compunit::set_last_source_file): New method.
4399 <m_last_source_file>: New member.
4400 (prepare_for_building): Remove "name" parameter.
4401 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4402 (last_source_file): Remove.
4403 (set_last_source_file, get_last_source_file): Update.
4404
4405 2018-07-16 Tom Tromey <tom@tromey.com>
4406
4407 * buildsym.c (prepare_for_building): Add assert.
4408
4409 2018-07-16 Tom Tromey <tom@tromey.com>
4410
4411 * buildsym.c (~buildsym_compunit): Update.
4412 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4413 (start_subfile, patch_subfile_names)
4414 (end_symtab_with_blockvector): Update.
4415
4416 2018-07-16 Tom Tromey <tom@tromey.com>
4417
4418 * buildsym.c (struct buildsym_compunit): Add constructor,
4419 destructor, initializers.
4420 (start_buildsym_compunit): Remove.
4421 (free_buildsym_compunit): Use "delete".
4422 (start_symtab, restart_symtab): Use "new".
4423
4424 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4425
4426 * symfile.c (set_objfile_default_section_offset): Remove struct
4427 keyword.
4428
4429 2018-07-14 Stafford Horne <shorne@gmail.com>
4430
4431 * (Responsible Maintainers): Add myself as or1k maintainer.
4432
4433 2018-07-13 Tom Tromey <tom@tromey.com>
4434
4435 * symfile.c (set_objfile_default_section_offset): Use extra braces
4436 around initializer.
4437
4438 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4439
4440 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4441 non-branching basr.
4442
4443 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4444
4445 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4446 unittests/cli-utils-selftests.c
4447 * unittests/cli-utils-selftests.c: New file.
4448
4449 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4450
4451 * NEWS: Mention new commands. Mention change to 'thread apply'.
4452
4453 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4454
4455 * thread.c (thr_try_catch_cmd): New function.
4456 (thread_apply_all_command): Handle qcs flags.
4457 (thread_apply_command): Handle qcs flags.
4458 (taas_command): New function.
4459 (tfaas_command): New function.
4460 (_initialize_thread): Update to setup the new commands 'taas
4461 and 'tfaas'. Change doc string for 'thread apply'.
4462
4463 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4464
4465 * stack.c: (trailing_outermost_frame): New function, mostly
4466 extracted from backtrace_command_1.
4467 (leading_innermost_frame): New function.
4468 (backtrace_command_1): Update to call trailing_outermost_frame.
4469 (frame_apply_command_count): New function.
4470 (frame_apply_level_command): New function.
4471 (frame_apply_all_command): New function.
4472 (frame_apply_command): New function.
4473 (faas_command): New function.
4474 (frame_cmd_list): New variable.
4475 (_initialize_stack): Update to setup the new commands 'frame apply'
4476 and 'faas'.
4477
4478 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4479
4480 * cli-utils.c (number_or_range_parser::get_number): Only handle
4481 numbers or convenience var as numbers.
4482 (parse_flags): New function.
4483 (parse_flags_qcs): New function.
4484 (number_or_range_parser::finished): Ensure parsing end is detected
4485 before end of string.
4486 * cli-utils.h (parse_flags): New function.
4487 (parse_flags_qcs): New function.
4488 (number_or_range_parser): Remove m_finished bool.
4489 (number_or_range_parser::skip_range): Set m_in_range to false.
4490
4491 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4492
4493 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4494 on Windows.
4495
4496 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4497 Jan Kratochvil <jan.kratochvil@redhat.com>
4498 Paul Fertser <fercerpav@gmail.com>
4499 Tsutomu Seki <sekiriki@gmail.com>
4500 Pedro Alves <palves@redhat.com>
4501
4502 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4503 'unittests/parse-connection-spec-selftests.c'.
4504 (COMMON_SFILES): Add 'common/netstuff.c'.
4505 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4506 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4507 * common/netstuff.c: New file.
4508 * common/netstuff.h: New file.
4509 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4510 (wait_for_connect): Update comment. New parameter
4511 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4512 Use 'sock' directly instead of 'scb->fd'.
4513 (try_connect): New function, with code from 'net_open'.
4514 (net_open): Rewrite main loop to deal with multiple
4515 sockets/addresses. Handle IPv6-style hostnames; implement
4516 support for IPv6 connections.
4517 * unittests/parse-connection-spec-selftests.c: New file.
4518
4519 2018-07-11 Pedro Alves <palves@redhat.com>
4520
4521 PR gdb/23377
4522 * remote.c (remote_target::remote_detach_pid): Call
4523 set_current_process.
4524
4525 2018-07-11 Pedro Alves <palves@redhat.com>
4526
4527 * h8300-tdep.c (h8300_gdbarch_init): Remove
4528 set_gdbarch_ecoff_reg_to_regnum calls.
4529
4530 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4531
4532 PR c++/23373
4533 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4534 offsets/sizes for static members of a class/struct.
4535
4536 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4537
4538 * target-descriptions.c (tdesc_register_bitsize): Rename.
4539 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4540 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4541 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4542
4543 2018-07-10 Tom Tromey <tom@tromey.com>
4544
4545 * breakpoint.c (moribund_locations): Now static and a
4546 std::vector.
4547 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4548 (build_bpstat_chain, update_global_location_list)
4549 (breakpoint_retire_moribund): Update.
4550 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4551 VEC.
4552
4553 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4554
4555 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4556 (riscv_register_reggroup_p): Use new function, remove unneeded
4557 parenthesis.
4558 (riscv_push_dummy_call): Extend assert to compare against xlen or
4559 flen based on register type.
4560
4561 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4562
4563 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4564
4565 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4566
4567 * remote.c (show_hardware_watchpoint_limit): New function.
4568 (show_hardware_watchpoint_length_limit): New function.
4569 (show_hardware_breakpoint_limit): New function.
4570 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4571 where appropriate, update help text.
4572
4573 2018-07-09 Tom Tromey <tom@tromey.com>
4574
4575 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4576 (CLIBS): Don't mention NAT_CLIBS.
4577
4578 2018-07-09 Tom Tromey <tom@tromey.com>
4579
4580 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4581 (LIBGDB_OBS, clean mostlyclean): Update.
4582 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4583
4584 2018-07-09 Tom Tromey <tom@tromey.com>
4585
4586 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4587 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4588 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4589
4590 2018-07-09 Tom Tromey <tom@tromey.com>
4591
4592 * Makefile.in (ALLDEPFILES): Remove exec.c.
4593 (COMMON_OBS): Remove exec.o.
4594 (COMMON_SFILES): Add exec.c.
4595
4596 2018-07-09 Tom Tromey <tom@tromey.com>
4597
4598 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4599
4600 2018-07-09 Tom Tromey <tom@tromey.com>
4601
4602 * Makefile.in (clean mostlyclean): Remove stamp-version.
4603 (version.c): Depend on stamp-version.
4604 (stamp-version): New rule, from version.c rule.
4605
4606 2018-07-09 Tom Tromey <tom@tromey.com>
4607
4608 * Makefile.in (init.c): Depend on stamp-init.
4609 (stamp-init): New rule, from init.c rule.
4610 (clean mostlyclean): Remove stamp-init.
4611
4612 2018-07-09 Tom Tromey <tom@tromey.com>
4613
4614 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4615 SUBDIR_GCC_COMPILE_SRCS.
4616
4617 2018-07-09 Tom Tromey <tom@tromey.com>
4618
4619 * Makefile.in (init.c): Remove some unused sed rules.
4620
4621 2018-07-09 Tom Tromey <tom@tromey.com>
4622
4623 * Makefile.in (TSOBS): Remove.
4624 (INIT_FILES): Update.
4625 (LIBGDB_OBS): Update.
4626 (COMMON_SFILES): Add inflow.c.
4627 (SFILES): Remove inflow.c.
4628
4629 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4630
4631 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4632
4633 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4634
4635 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4636 get_saveloc_name, is_signal_frame_name, step_name,
4637 init_remote_name, create_addr_space_name,
4638 destroy_addr_space_name, search_unwind_table_name,
4639 find_dyn_list_name): Constify.
4640
4641 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4642
4643 * darwin-nat.c (darwin_pthread_kill): New function.
4644 (darwin_resume_thread): Use darwin_pthread_kill.
4645
4646 2018-07-05 Tom de Vries <tdevries@suse.de>
4647
4648 * macroexp.c (macro_buffer) <operator=>: New member function.
4649
4650 2018-07-04 Tom Tromey <tom@tromey.com>
4651
4652 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4653
4654 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4655
4656 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4657 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4658 * maint.c: Likewise.
4659 * top.c: Likewise.
4660
4661 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4662
4663 * NEWS: Create a new section for the next release branch.
4664 Rename the section of the current branch, now that it has
4665 been cut.
4666
4667 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4668
4669 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4670 * version.in: Bump version to 8.2.50.DATE-git.
4671
4672 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4673 Pedro Alves <palves@redhat.com>
4674
4675 * linux-nat.c (linux_init_ptrace): Rename to ...
4676 (linux_init_ptrace_procfs): ... this. Call
4677 linux_proc_init_warnings.
4678 (linux_nat_target::post_attach)
4679 (linux_nat_target::post_startup_inferior): Adjust.
4680 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4681 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4682
4683 2018-07-04 Tom de Vries <tdevries@suse.de>
4684
4685 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4686 check ...
4687 (read_comp_unit_head): ... here.
4688
4689 2018-07-03 Tom Tromey <tom@tromey.com>
4690
4691 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4692 (stop_tracing, tstatus_command)
4693 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4694 (print_one_static_tracepoint_marker): Update.
4695 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4696 std::vector.
4697 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4698 VEC.
4699 (all_tracepoints, static_tracepoints_here): Return std::vector.
4700
4701 2018-07-03 Tom Tromey <tom@tromey.com>
4702
4703 * common/ptid.c (ptid_equal): Remove.
4704 * common/ptid.h (ptid_equal): Don't declare.
4705 * ada-tasks.c: Update.
4706 * breakpoint.c: Update.
4707 * common/agent.c: Update.
4708 * corelow.c: Update.
4709 * darwin-nat-info.c: Update.
4710 * darwin-nat.c: Update.
4711 * dcache.c: Update.
4712 * dtrace-probe.c: Update.
4713 * dummy-frame.c: Update.
4714 * fbsd-nat.c: Update.
4715 * frame.c: Update.
4716 * gdbthread.h: Update.
4717 * gnu-nat.c: Update.
4718 * go32-nat.c: Update.
4719 * inf-loop.c: Update.
4720 * inf-ptrace.c: Update.
4721 * infcall.c: Update.
4722 * infcmd.c: Update.
4723 * inflow.c: Update.
4724 * infrun.c: Update.
4725 * linux-fork.c: Update.
4726 * linux-nat.c: Update.
4727 * linux-thread-db.c: Update.
4728 * mi/mi-cmd-var.c: Update.
4729 * mi/mi-interp.c: Update.
4730 * mi/mi-main.c: Update.
4731 * nto-procfs.c: Update.
4732 * ppc-linux-tdep.c: Update.
4733 * procfs.c: Update.
4734 * python/py-inferior.c: Update.
4735 * python/py-record-btrace.c: Update.
4736 * python/py-record.c: Update.
4737 * ravenscar-thread.c: Update.
4738 * regcache.c: Update.
4739 * remote-sim.c: Update.
4740 * remote.c: Update.
4741 * sol-thread.c: Update.
4742 * solib.c: Update.
4743 * target.c: Update.
4744 * tui/tui-stack.c: Update.
4745 * varobj.c: Update.
4746 * windows-nat.c: Update.
4747 * windows-tdep.c: Update.
4748
4749 2018-07-03 Tom Tromey <tom@tromey.com>
4750
4751 * common/ptid.c (ptid_match): Remove.
4752 * common/ptid.h (ptid_match): Don't declare.
4753 * fbsd-nat.c: Update.
4754 * infcmd.c: Update.
4755 * infrun.c: Update.
4756 * linux-nat.c: Update.
4757 * record-btrace.c: Update.
4758 * regcache.c: Update.
4759 * remote.c: Update.
4760
4761 2018-07-03 Tom Tromey <tom@tromey.com>
4762
4763 * common/ptid.c (ptid_tid_p): Remove.
4764 * common/ptid.h (ptid_tid_p): Don't declare.
4765 * sol-thread.c: Update.
4766
4767 2018-07-03 Tom Tromey <tom@tromey.com>
4768
4769 * common/ptid.c (ptid_lwp_p): Remove.
4770 * common/ptid.h (ptid_lwp_p): Don't declare.
4771 * fbsd-nat.c: Update.
4772 * linux-nat.c: Update.
4773 * nat/linux-procfs.c: Update.
4774 * nat/x86-linux-dregs.c: Update.
4775 * sol-thread.c: Update.
4776
4777 2018-07-03 Tom Tromey <tom@tromey.com>
4778
4779 * common/ptid.c (ptid_is_pid): Remove.
4780 * common/ptid.h (ptid_is_pid): Don't declare.
4781 * infrun.c: Update.
4782 * linux-nat.c: Update.
4783 * mi/mi-interp.c: Update.
4784 * remote.c: Update.
4785 * thread.c: Update.
4786
4787 2018-07-03 Tom Tromey <tom@tromey.com>
4788
4789 * common/ptid.c (ptid_get_tid): Remove.
4790 * common/ptid.h (ptid_get_tid): Don't declare.
4791 * ada-tasks.c: Update.
4792 * aix-thread.c: Update.
4793 * bsd-uthread.c: Update.
4794 * darwin-nat.c: Update.
4795 * fbsd-nat.c: Update.
4796 * i386-darwin-nat.c: Update.
4797 * infrun.c: Update.
4798 * linux-tdep.c: Update.
4799 * nto-procfs.c: Update.
4800 * ppc-ravenscar-thread.c: Update.
4801 * python/py-infthread.c: Update.
4802 * ravenscar-thread.c: Update.
4803 * sol-thread.c: Update.
4804 * sparc-ravenscar-thread.c: Update.
4805 * windows-nat.c: Update.
4806
4807 2018-07-03 Tom Tromey <tom@tromey.com>
4808
4809 * common/ptid.c (ptid_get_lwp): Remove.
4810 * common/ptid.h (ptid_get_lwp): Don't declare.
4811 * aarch64-linux-nat.c: Update.
4812 * ada-tasks.c: Update.
4813 * aix-thread.c: Update.
4814 * amd64-linux-nat.c: Update.
4815 * arm-linux-nat.c: Update.
4816 * corelow.c: Update.
4817 * fbsd-nat.c: Update.
4818 * fbsd-tdep.c: Update.
4819 * gnu-nat.c: Update.
4820 * i386-cygwin-tdep.c: Update.
4821 * i386-gnu-nat.c: Update.
4822 * i386-linux-nat.c: Update.
4823 * ia64-linux-nat.c: Update.
4824 * inf-ptrace.c: Update.
4825 * infrun.c: Update.
4826 * linux-fork.c: Update.
4827 * linux-nat.c: Update.
4828 * linux-tdep.c: Update.
4829 * linux-thread-db.c: Update.
4830 * mips-linux-nat.c: Update.
4831 * nat/aarch64-linux-hw-point.c: Update.
4832 * nat/aarch64-linux.c: Update.
4833 * nat/linux-btrace.c: Update.
4834 * nat/linux-osdata.c: Update.
4835 * nat/linux-procfs.c: Update.
4836 * nat/x86-linux-dregs.c: Update.
4837 * obsd-nat.c: Update.
4838 * ppc-fbsd-nat.c: Update.
4839 * ppc-linux-nat.c: Update.
4840 * procfs.c: Update.
4841 * python/py-infthread.c: Update.
4842 * ravenscar-thread.c: Update.
4843 * remote.c: Update.
4844 * s390-linux-nat.c: Update.
4845 * sol-thread.c: Update.
4846 * sol2-tdep.c: Update.
4847 * spu-linux-nat.c: Update.
4848 * x86-linux-nat.c: Update.
4849 * xtensa-linux-nat.c: Update.
4850
4851 2018-07-03 Tom Tromey <tom@tromey.com>
4852
4853 * common/ptid.c (ptid_get_pid): Remove.
4854 * common/ptid.h (ptid_get_pid): Don't declare.
4855 * aarch64-linux-nat.c: Update.
4856 * ada-lang.c: Update.
4857 * aix-thread.c: Update.
4858 * alpha-bsd-nat.c: Update.
4859 * amd64-fbsd-nat.c: Update.
4860 * amd64-linux-nat.c: Update.
4861 * arm-linux-nat.c: Update.
4862 * arm-nbsd-nat.c: Update.
4863 * auxv.c: Update.
4864 * break-catch-syscall.c: Update.
4865 * breakpoint.c: Update.
4866 * bsd-uthread.c: Update.
4867 * corelow.c: Update.
4868 * ctf.c: Update.
4869 * darwin-nat.c: Update.
4870 * fbsd-nat.c: Update.
4871 * fbsd-tdep.c: Update.
4872 * gcore.c: Update.
4873 * gnu-nat.c: Update.
4874 * hppa-nbsd-nat.c: Update.
4875 * hppa-obsd-nat.c: Update.
4876 * i386-fbsd-nat.c: Update.
4877 * ia64-linux-nat.c: Update.
4878 * inf-ptrace.c: Update.
4879 * infcmd.c: Update.
4880 * inferior.c: Update.
4881 * inferior.h: Update.
4882 * inflow.c: Update.
4883 * infrun.c: Update.
4884 * linux-fork.c: Update.
4885 * linux-nat.c: Update.
4886 * linux-tdep.c: Update.
4887 * linux-thread-db.c: Update.
4888 * m68k-bsd-nat.c: Update.
4889 * mi/mi-interp.c: Update.
4890 * mi/mi-main.c: Update.
4891 * mips-linux-nat.c: Update.
4892 * mips-nbsd-nat.c: Update.
4893 * mips64-obsd-nat.c: Update.
4894 * nat/aarch64-linux-hw-point.c: Update.
4895 * nat/aarch64-linux.c: Update.
4896 * nat/linux-btrace.c: Update.
4897 * nat/linux-osdata.c: Update.
4898 * nat/linux-procfs.c: Update.
4899 * nat/x86-linux-dregs.c: Update.
4900 * nto-procfs.c: Update.
4901 * obsd-nat.c: Update.
4902 * ppc-linux-nat.c: Update.
4903 * ppc-nbsd-nat.c: Update.
4904 * ppc-obsd-nat.c: Update.
4905 * proc-service.c: Update.
4906 * procfs.c: Update.
4907 * python/py-inferior.c: Update.
4908 * python/py-infthread.c: Update.
4909 * ravenscar-thread.c: Update.
4910 * record.c: Update.
4911 * remote-sim.c: Update.
4912 * remote.c: Update.
4913 * rs6000-nat.c: Update.
4914 * s390-linux-nat.c: Update.
4915 * sh-nbsd-nat.c: Update.
4916 * sol-thread.c: Update.
4917 * sparc-nat.c: Update.
4918 * sparc64-tdep.c: Update.
4919 * spu-linux-nat.c: Update.
4920 * spu-tdep.c: Update.
4921 * target-debug.h: Update.
4922 * target.c: Update.
4923 * thread.c: Update.
4924 * tid-parse.c: Update.
4925 * tracefile-tfile.c: Update.
4926 * vax-bsd-nat.c: Update.
4927 * windows-nat.c: Update.
4928 * x86-linux-nat.c: Update.
4929 * x86-nat.c: Update.
4930
4931 2018-07-03 Tom Tromey <tom@tromey.com>
4932
4933 * common/ptid.c (pid_to_ptid): Remove.
4934 * common/ptid.h (pid_to_ptid): Don't declare.
4935 * aix-thread.c: Update.
4936 * arm-linux-nat.c: Update.
4937 * common/ptid.c: Update.
4938 * common/ptid.h: Update.
4939 * corelow.c: Update.
4940 * ctf.c: Update.
4941 * darwin-nat.c: Update.
4942 * fbsd-nat.c: Update.
4943 * fork-child.c: Update.
4944 * gnu-nat.c: Update.
4945 * go32-nat.c: Update.
4946 * inf-ptrace.c: Update.
4947 * infcmd.c: Update.
4948 * inferior.c: Update.
4949 * infrun.c: Update.
4950 * linux-fork.c: Update.
4951 * linux-nat.c: Update.
4952 * nat/aarch64-linux-hw-point.c: Update.
4953 * nat/fork-inferior.c: Update.
4954 * nat/x86-linux-dregs.c: Update.
4955 * nto-procfs.c: Update.
4956 * obsd-nat.c: Update.
4957 * procfs.c: Update.
4958 * progspace.c: Update.
4959 * remote.c: Update.
4960 * rs6000-nat.c: Update.
4961 * s390-linux-nat.c: Update.
4962 * sol-thread.c: Update.
4963 * spu-linux-nat.c: Update.
4964 * target.c: Update.
4965 * top.c: Update.
4966 * tracefile-tfile.c: Update.
4967 * windows-nat.c: Update.
4968
4969 2018-07-03 Tom Tromey <tom@tromey.com>
4970
4971 * common/ptid.h (ptid_build): Don't declare.
4972 * common/ptid.c (ptid_build): Remove.
4973 * aix-thread.c: Update.
4974 * bsd-kvm.c: Update.
4975 * bsd-uthread.c: Update.
4976 * common/agent.c: Update.
4977 * common/ptid.c: Update.
4978 * common/ptid.h: Update.
4979 * corelow.c: Update.
4980 * darwin-nat.c: Update.
4981 * fbsd-nat.c: Update.
4982 * gnu-nat.c: Update.
4983 * linux-fork.c: Update.
4984 * linux-nat.c: Update.
4985 * linux-thread-db.c: Update.
4986 * nat/linux-osdata.c: Update.
4987 * nat/linux-procfs.c: Update.
4988 * nto-procfs.c: Update.
4989 * obsd-nat.c: Update.
4990 * proc-service.c: Update.
4991 * procfs.c: Update.
4992 * ravenscar-thread.c: Update.
4993 * remote-sim.c: Update.
4994 * remote.c: Update.
4995 * sol-thread.c: Update.
4996 * target.c: Update.
4997 * windows-nat.c: Update.
4998
4999 2018-07-03 Tom Tromey <tom@tromey.com>
5000
5001 * infrun.c (follow_exec): Use exit_inferior_silent.
5002 * inferior.c (exit_inferior_num_silent): Remove.
5003 * inferior.h (exit_inferior_num_silent): Don't declare.
5004
5005 2018-07-03 Tom Tromey <tom@tromey.com>
5006
5007 PR cli/23340:
5008 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5009 inferior_ptid on error.
5010
5011 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5012 Simon Marchi <simon.marchi@polymtl.ca>
5013
5014 PR tdep/8282
5015 * disasm.h (gdb_disassembler): Add
5016 `m_disassembler_options_holder'. member
5017 * disasm.c (get_all_disassembler_options): New function.
5018 (gdb_disassembler::gdb_disassembler): Use it.
5019 (gdb_buffered_insn_length_init_dis): Likewise.
5020 (gdb_buffered_insn_length): Adjust accordingly.
5021 (set_disassembler_options): Handle options with arguments.
5022 (show_disassembler_options_sfunc): Likewise. Add a leading new
5023 line if showing options with descriptions.
5024 (disassembler_options_completer): Adapt to using the
5025 `disasm_options_and_args_t' structure.
5026 * mips-tdep.c (mips_disassembler_options): New variable.
5027 (mips_disassembler_options_o32): Likewise.
5028 (mips_disassembler_options_n32): Likewise.
5029 (mips_disassembler_options_n64): Likewise.
5030 (gdb_print_insn_mips): Don't set `disassembler_options'.
5031 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5032 functions.
5033 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5034 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5035 `gdbarch_disassembler_options_implicit' and
5036 `gdbarch_valid_disassembler_options'.
5037 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5038 `disasm_options_and_args_t' structure.
5039 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5040 method.
5041 (valid_disassembler_options): Switch from `disasm_options_t' to
5042 the `disasm_options_and_args_t' structure.
5043 * NEWS: Document `set disassembler-options' support for the MIPS
5044 target.
5045 * gdbarch.h: Regenerate.
5046 * gdbarch.c: Regenerate.
5047
5048 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5049
5050 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5051
5052 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5053
5054 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5055 parameter in call to amd64_target_description.
5056 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5057 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5058 (amd64fbsd_init_abi): Likewise.
5059 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5060 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5061 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5062 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5063
5064 2018-06-29 Pedro Alves <palves@redhat.com>
5065
5066 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5067 "segments" parameter.
5068 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5069 (_initialize_amd64_tdep): Update call to
5070 amd64_create_target_description.
5071 (amd64_target_description): Add "segments" parameter. Adjust
5072 the implementation to use it.
5073 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5074 call to amd64_create_target_description.
5075 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5076 * gdb/arch/amd64.h (amd64_create_target_description): Add
5077 "segments" register.
5078 * gdb/arch/amd64.c (amd64_create_target_description): Add
5079 "segments" parameter. Call create_feature_i386_64bit_segments
5080 only if SEGMENTS is true.
5081 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5082 call to amd64_create_target_description.
5083
5084 2018-06-29 Pedro Alves <palves@redhat.com>
5085
5086 * thread.c (thread_target_id_str): New, factored out from ...
5087 (print_thread_info_1): ... here. Use it to compute the max
5088 "Target Id" column width.
5089
5090 2018-06-29 Pedro Alves <palves@redhat.com>
5091
5092 * remote.c (remote_target::extra_thread_info): Delete
5093 'display_buf' and 'n' locals. from the cache, regardless of
5094 packet mechanims is in use. Use cache for qThreadExtra and qP
5095 methods too.
5096
5097 2018-06-29 Pedro Alves <palves@redhat.com>
5098
5099 * blockframe.c (find_pc_sect_containing_function): New function.
5100 * breakpoint.c (print_breakpoint_location): Don't call
5101 find_pc_sect_function.
5102 * linespec.c (create_sals_line_offset): Record the location's
5103 symbol in the sal.
5104 * linespec.c (convert_address_location_to_sals): Fill in sal's
5105 symbol with find_pc_sect_containing_function.
5106 * symtab.c (find_function_start_sal): Rename to ...
5107 (find_function_start_sal_1): ... this.
5108 (find_function_start_sal): Reimplement as wrapper around
5109 find_function_start_sal_1, and use
5110 find_pc_sect_containing_function to fill in the sal's symbol.
5111 (find_function_start_sal(symbol*, bool)): Adjust.
5112 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5113 comments.
5114 (find_pc_sect_containing_function): Declare.
5115
5116 2018-06-29 Pedro Alves <palves@redhat.com>
5117
5118 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5119 true if the the location has no symbol.
5120
5121 2018-06-28 Tom Tromey <tom@tromey.com>
5122
5123 * NEWS: Mention --enable-codesign.
5124 * silent-rules.mk (ECHO_SIGN): New variable.
5125 * configure.ac: Add --enable-codesign.
5126 * configure: Rebuild.
5127 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5128 (gdb$(EXEEXT)): Optionally invoke codesign.
5129
5130 2018-06-28 Pedro Alves <palves@redhat.com>
5131
5132 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5133 comments.
5134 (switch_to_thread_no_regs): Adjust comment.
5135 * infcmd.c (stop_pc): Delete.
5136 (post_create_inferior, info_program_command): Replace references
5137 to stop_pc with references to thread_info->suspend.stop_pc.
5138 * inferior.h (stop_pc): Delete declaration.
5139 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5140 (handle_inferior_event_1, handle_signal_stop)
5141 (process_event_stop_test, keep_going_stepped_thread)
5142 (handle_step_into_function, handle_step_into_function_backward)
5143 (print_stop_location): Replace references to stop_pc with
5144 references to thread_info->suspend.stop_pc.
5145 (struct infcall_suspend_state) <stop_pc>: Delete field.
5146 (save_infcall_suspend_state, restore_infcall_suspend_state):
5147 Remove references to inf_stat->stop_pc.
5148 * linux-fork.c (fork_load_infrun_state): Likewise.
5149 * record-btrace.c (record_btrace_set_replay): Likewise.
5150 * record-full.c (record_full_goto_entry): Likewise.
5151 * remote.c (print_one_stopped_thread): Likewise.
5152 * target.c (target_resume): Extend comment.
5153 * thread.c (set_executing_thread): New.
5154 (set_executing): Use it.
5155 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5156 Remove references to stop_pc.
5157
5158 2018-06-28 Pedro Alves <palves@redhat.com>
5159
5160 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5161 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5162
5163 2018-06-28 Tom Tromey <tom@tromey.com>
5164
5165 * coffread.c (coff_symfile_finish): Update.
5166 * xcoffread.c (xcoff_symfile_finish): Update.
5167 * elfread.c (elf_symfile_finish): Update.
5168 * symfile.h (dwarf2_free_objfile): Don't declare.
5169 * dwarf2read.c (_initialize_dwarf2_read): Use
5170 register_objfile_data_with_cleanup.
5171 (dwarf2_free_objfile): Now static. Change signature.
5172
5173 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5174
5175 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5176 option "-o" to add-symbol-file-load to add an offset to each
5177 section's load address.
5178 * symfile.c (set_objfile_default_section_offset): New function.
5179
5180 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5181
5182 * symfile.c (add_symbol_file_command): Make sure that sections
5183 with the same name are sorted in the same order.
5184
5185 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5186
5187 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5188 require the second argument. If omitted, load sections at the
5189 addresses specified in the file.
5190
5191 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5192
5193 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5194 (_initialize_symfile): Add option "-o" to symbol-file to add an
5195 offset to each section of the symbol file.
5196
5197 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5198
5199 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5200
5201 2018-06-27 Tom Tromey <tom@tromey.com>
5202
5203 * stack.c (_initialize_stack): Update "func" help text.
5204
5205 2018-06-27 Tom Tromey <tom@tromey.com>
5206
5207 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5208 std::vector.
5209 (unwind_infopy_str, pyuw_create_unwind_info)
5210 (unwind_infopy_add_saved_register, pyuw_sniffer)
5211 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5212 Update.
5213 (struct saved_reg): Add constructor.
5214 <value>: Now a gdbpy_ref<>.
5215
5216 2018-06-27 Tom Tromey <tom@tromey.com>
5217
5218 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5219
5220 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5221
5222 * gdb-gdb.py.in: Format using autopep8.
5223
5224 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5225
5226 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5227 (type_lookup_function): Recognize CORE_ADDR values.
5228
5229 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5230
5231 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5232 print tag_name.
5233
5234 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5235
5236 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5237 <__lt__>: Add.
5238
5239 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5240
5241 * gdb-gdb.py: Move to...
5242 * gdb-gdb.py.in: ... here.
5243 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5244 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5245 dependencies.
5246 (distclean): Remove gdb-gdb.py when cleaning.
5247 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5248 * configure: Re-generate.
5249
5250 2018-06-27 Pedro Alves <palves@redhat.com>
5251
5252 * proc-service.c (get_ps_regcache): New.
5253 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5254 (ps_lsetfpregs): Use it.
5255
5256 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5257
5258 PR gdb/21695
5259 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5260 (dwarf_decode_lines_1): Adjust.
5261
5262 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5263
5264 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5265 override.
5266 <info_proc>: Likewise.
5267
5268 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5269
5270 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5271 to windows_fetch_one_register, and only handle the case of
5272 fetching one register. Move the code that reloads the context
5273 and iterates over all registers if R is negative to...
5274 (windows_nat_target::fetch_registers): ... here.
5275 (do_windows_store_inferior_registers): Rename to
5276 windows_store_one_register, and only handle the case of storing
5277 one register. Move the code that handles the case where r is
5278 negative to...
5279 (windows_nat_target::store_registers) ... here.
5280
5281 2018-06-26 Tom Tromey <tom@tromey.com>
5282
5283 PR rust/22574:
5284 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5285 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5286 Update.
5287 (rust_internal_print_type): Add podata parameter.
5288 (rust_print_type): Update.
5289
5290 2018-06-26 Tom Tromey <tom@tromey.com>
5291
5292 * typeprint.h (struct print_offset_data) <update, finish,
5293 maybe_print_hole>: New methods.
5294 <indentation>: New constant.
5295 * typeprint.c (print_offset_data::indentation): Define.
5296 (print_offset_data::maybe_print_hole, print_offset_data::update)
5297 (print_offset_data::finish): Move from c-typeprint.c and rename.
5298 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5299 (print_spaces_filtered_with_print_options): Update.
5300 (c_print_type_union_field_offset, maybe_print_hole)
5301 (c_print_type_struct_field_offset): Move to typeprint.c and
5302 rename.
5303 (c_type_print_base_struct_union): Update.
5304
5305 2018-06-25 Pedro Alves <palves@redhat.com>
5306
5307 * gdbthread.h (thread_info_ref, delete_thread)
5308 (delete_thread_silent, first_thread_of_inferior)
5309 (any_thread_of_inferior, switch_to_thread)
5310 (enable_thread_stack_temporaries)
5311 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5312 (get_last_thread_stack_temporary)
5313 (value_in_thread_stack_temporaries, can_access_registers_thread):
5314 Spell out "struct thread_info" instead of just "thread_info".
5315 * inferior.h (notice_new_inferior): Likewise.
5316
5317 2018-06-25 Pedro Alves <palves@redhat.com>
5318
5319 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5320 pass thread_info pointer to delete_thread.
5321 (windows_nat_target::detach): Pass inferior pointer to
5322 detach_inferior.
5323 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5324 delete_thread.
5325 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5326 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5327 and pass a thread_info pointer to delete_thread.
5328 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5329 pass thread_info pointer to delete_thread.
5330 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5331 delete_thread_silent call.
5332 * procfs.c (procfs_target::detach): Pass inferior pointer to
5333 detach_inferior.
5334 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5335 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5336 delete_thread_silent call.
5337 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5338 pass thread_info pointer to delete_thread.
5339 (windows_nat_target::detach): Pass inferior pointer to
5340 delete_inferior.
5341
5342 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5343
5344 * regcache.c (readable_regcache::read_part): Fix asserts.
5345 (reg_buffer::raw_collect_part): New function.
5346 (regcache::write_part): Fix asserts.
5347 (reg_buffer::raw_supply_part): New function.
5348 (regcache::transfer_regset_register): New helper function.
5349 (regcache::transfer_regset): Call new functions.
5350 (regcache_supply_regset): Use gdb_byte*.
5351 (regcache::supply_regset): Likewise.
5352 (regcache_collect_regset): Likewise.
5353 (regcache::collect_regset): Likewise.
5354 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5355 (reg_buffer::raw_supply_part): Likewise.
5356 (regcache::transfer_regset_register): Likewise.
5357 (regcache::transfer_regset): Use gdb_byte*.
5358
5359 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5360
5361 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5362
5363 2018-06-21 Pedro Alves <palves@redhat.com>
5364
5365 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5366 instead of a ptid_t. All callers adjusted.
5367 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5368 adjusted.
5369 (print_ada_task_info, display_current_task_id, task_command_1):
5370 Adjust.
5371 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5372 inferior_thread.
5373 (breakpoint_kind): Adjust.
5374 (remove_breakpoints_pid): Rename to ...
5375 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5376 pointer. All callers adjusted.
5377 (bpstat_clear_actions): Use inferior_thread.
5378 (get_bpstat_thread): New.
5379 (bpstat_do_actions): Use it.
5380 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5381 to take a thread_info pointer. All callers adjusted.
5382 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5383 (breakpoint_re_set_thread): Use inferior_thread.
5384 * breakpoint.h (struct inferior): Forward declare.
5385 (bpstat_stop_status): Update.
5386 (remove_breakpoints_pid): Delete.
5387 (remove_breakpoints_inf): New.
5388 * bsd-uthread.c (bsd_uthread_target::wait)
5389 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5390 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5391 (maint_btrace_packet_history_cmd)
5392 (maint_btrace_clear_packet_history_cmd): Adjust.
5393 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5394 inferior_thread.
5395 * cli/cli-interp.c: Include "inferior.h".
5396 * common/refcounted-object.h (struct
5397 refcounted_object_ref_policy): New.
5398 * compile/compile-object-load.c: Include gdbthread.h.
5399 (store_regs): Use inferior_thread.
5400 * corelow.c (core_target::close): Use current_inferior.
5401 (core_target_open): Adjust to use first_thread_of_inferior and use
5402 the current inferior.
5403 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5404 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5405 <thread>: ... this new field. All references adjusted.
5406 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5407 Take a thread_info pointer instead of a ptid_t.
5408 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5409 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5410 thread_info pointer instead of a ptid_t.
5411 * elfread.c: Include "inferior.h".
5412 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5413 Use inferior_thread.
5414 * eval.c (evaluate_subexp): Likewise.
5415 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5416 inferior_thread.
5417 * gdb_proc_service.h (struct thread_info): Forward declare.
5418 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5419 <thread>: ... this new field. All references adjusted.
5420 * gdbarch.h, gdbarch.c: Regenerate.
5421 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5422 'thread' parameter. All implementations and callers adjusted.
5423 * gdbthread.h (thread_info) <set_running>: New method.
5424 (delete_thread, delete_thread_silent): Take a thread_info pointer
5425 instead of a ptid.
5426 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5427 (first_thread_of_process): Delete, replaced by ...
5428 (first_thread_of_inferior): ... this new function. All callers
5429 adjusted.
5430 (any_live_thread_of_process): Delete, replaced by ...
5431 (any_live_thread_of_inferior): ... this new function. All callers
5432 adjusted.
5433 (switch_to_thread, switch_to_no_thread): Declare.
5434 (is_executing): Delete.
5435 (enable_thread_stack_temporaries): Update comment.
5436 <enable_thread_stack_temporaries>: Take a thread_info pointer
5437 instead of a ptid_t. Incref the thread.
5438 <~enable_thread_stack_temporaries>: Decref the thread.
5439 <m_ptid>: Delete
5440 <m_thr>: New.
5441 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5442 (get_last_thread_stack_temporary)
5443 (value_in_thread_stack_temporaries, can_access_registers_thread):
5444 Take a thread_info pointer instead of a ptid_t. All callers
5445 adjusted.
5446 * infcall.c (get_call_return_value): Use inferior_thread.
5447 (run_inferior_call): Work with thread pointers instead of ptid_t.
5448 (call_function_by_hand_dummy): Work with thread pointers instead
5449 of ptid_t. Use thread_info_ref.
5450 * infcmd.c (proceed_thread_callback): Access thread's state
5451 directly.
5452 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5453 access thread's state directly.
5454 (continue_command): Use inferior_thread.
5455 (info_program_command): Use find_thread_ptid and access thread
5456 state directly.
5457 (proceed_after_attach_callback): Use thread state directly.
5458 (notice_new_inferior): Take a thread_info pointer instead of a
5459 ptid_t. All callers adjusted.
5460 (exit_inferior): Take an inferior pointer instead of a pid. All
5461 callers adjusted.
5462 (exit_inferior_silent): New.
5463 (detach_inferior): Delete.
5464 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5465 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5466 (detach_inferior_command, kill_inferior_command): Use
5467 find_inferior_id instead of valid_gdb_inferior_id and
5468 gdb_inferior_id_to_pid.
5469 (inferior_command): Use inferior and thread pointers.
5470 * inferior.h (struct thread_info): Forward declare.
5471 (notice_new_inferior): Take a thread_info pointer instead of a
5472 ptid_t. All callers adjusted.
5473 (detach_inferior): Delete declaration.
5474 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5475 instead of a pid. All callers adjusted.
5476 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5477 (valid_gdb_inferior_id): Delete.
5478 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5479 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5480 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5481 ...
5482 <inf>: ... this new field.
5483 <step_ptid>: Delete, replaced by ...
5484 <step_thread>: ... this new field.
5485 (get_displaced_stepping_state): Take an inferior pointer instead
5486 of a pid. All callers adjusted.
5487 (displaced_step_in_progress_any_inferior): Adjust.
5488 (displaced_step_in_progress_thread): Take a thread pointer instead
5489 of a ptid_t. All callers adjusted.
5490 (displaced_step_in_progress, add_displaced_stepping_state): Take
5491 an inferior pointer instead of a pid. All callers adjusted.
5492 (get_displaced_step_closure_by_addr): Adjust.
5493 (remove_displaced_stepping_state): Take an inferior pointer
5494 instead of a pid. All callers adjusted.
5495 (displaced_step_prepare_throw, displaced_step_prepare)
5496 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5497 All callers adjusted.
5498 (start_step_over): Adjust.
5499 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5500 displaced step queue.
5501 (do_target_resume): Adjust.
5502 (fetch_inferior_event): Use inferior_thread.
5503 (context_switch, get_inferior_stop_soon): Take an
5504 execution_control_state pointer instead of a ptid_t. All callers
5505 adjusted.
5506 (switch_to_thread_cleanup): Delete.
5507 (stop_all_threads): Use scoped_restore_current_thread.
5508 * inline-frame.c: Include "gdbthread.h".
5509 (inline_state) <inline_state>: Take a thread pointer instead of a
5510 ptid_t. All callers adjusted.
5511 <ptid>: Delete, replaced by ...
5512 <thread>: ... this new field.
5513 (find_inline_frame_state): Take a thread pointer instead of a
5514 ptid_t. All callers adjusted.
5515 (skip_inline_frames, step_into_inline_frame)
5516 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5517 pointer instead of a ptid_t. All callers adjusted.
5518 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5519 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5520 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5521 pointers directly.
5522 * linux-nat.c (get_detach_signal): Likewise.
5523 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5524 (thread_db_notice_clone): Adjust.
5525 (thread_db_find_new_threads_silently)
5526 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5527 a thread pointer instead of a ptid_t. All callers adjusted.
5528 * mi/mi-cmd-var.c: Include "inferior.h".
5529 (mi_cmd_var_update_iter): Update to use thread pointers.
5530 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5531 inferior directly.
5532 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5533 out to ...
5534 (mi_output_running): ... this new function.
5535 (mi_on_resume_1): Adjust to use it.
5536 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5537 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5538 directly.
5539 (interrupt_thread_callback): : Adjust to use thread and inferior
5540 pointers.
5541 * proc-service.c: Include "gdbthread.h".
5542 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5543 * progspace-and-thread.c: Include "inferior.h".
5544 * progspace.c: Include "inferior.h".
5545 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5546 hold a reference to an inferior_object.
5547 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5548 inferior_thread.
5549 * python/py-inferior.c (struct inferior_object): Give the type a
5550 tag name instead of a typedef.
5551 (python_on_normal_stop): No need to check if the current thread is
5552 listed.
5553 (inferior_to_inferior_object): Change return type to
5554 inferior_object. All callers adjusted.
5555 (find_thread_object): Delete, bits factored out to ...
5556 (thread_to_thread_object): ... this new function.
5557 * python/py-infthread.c (create_thread_object): Use
5558 inferior_to_inferior_object.
5559 (thpy_is_stopped): Use thread pointer directly.
5560 (gdbpy_selected_thread): Use inferior_thread.
5561 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5562 field, replaced with ...
5563 <thread>: ... this new field. All users adjusted.
5564 (btpy_insn_or_gap_new): Drop const.
5565 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5566 callers adjusted.
5567 * python/py-record.c: Include "gdbthread.h".
5568 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5569 a ptid_t. All callers adjusted.
5570 (gdbpy_current_recording): Use inferior_thread.
5571 * python/py-record.h (recpy_record_object) <ptid>: Delete
5572 field, replaced with ...
5573 <thread>: ... this new field. All users adjusted.
5574 (recpy_element_object) <ptid>: Delete
5575 field, replaced with ...
5576 <thread>: ... this new field. All users adjusted.
5577 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5578 a ptid_t. All callers adjusted.
5579 * python/py-threadevent.c: Include "gdbthread.h".
5580 (get_event_thread): Use thread_to_thread_object.
5581 * python/python-internal.h (struct inferior_object): Forward
5582 declare.
5583 (find_thread_object, find_inferior_object): Delete declarations.
5584 (thread_to_thread_object, inferior_to_inferior_object): New
5585 declarations.
5586 * record-btrace.c: Include "inferior.h".
5587 (require_btrace_thread): Use inferior_thread.
5588 (record_btrace_frame_sniffer)
5589 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5590 (get_thread_current_frame): Use scoped_restore_current_thread and
5591 switch_to_thread.
5592 (get_thread_current_frame): Use thread pointer directly.
5593 (record_btrace_replay_at_breakpoint): Use thread's inferior
5594 pointer directly.
5595 * record-full.c: Include "inferior.h".
5596 * regcache.c: Include "gdbthread.h".
5597 (get_thread_arch_regcache): Use the inferior's address space
5598 directly.
5599 (get_thread_regcache, registers_changed_thread): New.
5600 * regcache.h (get_thread_regcache(thread_info *thread)): New
5601 overload.
5602 (registers_changed_thread): New.
5603 (remote_target) <remote_detach_1>: Swap order of parameters.
5604 (remote_add_thread): <remote_add_thread>: Return the new thread.
5605 (get_remote_thread_info(ptid_t)): New overload.
5606 (remote_target::remote_notice_new_inferior): Use thread pointers
5607 directly.
5608 (remote_target::process_initial_stop_replies): Use
5609 thread_info::set_running.
5610 (remote_target::remote_detach_1, remote_target::detach)
5611 (extended_remote_target::detach): Adjust.
5612 * stack.c (frame_show_address): Use inferior_thread.
5613 * target-debug.h (target_debug_print_thread_info_pp): New.
5614 * target-delegates.c: Regenerate.
5615 * target.c (default_thread_address_space): Delete.
5616 (memory_xfer_partial_1): Use current_inferior.
5617 (target_detach): Use current_inferior.
5618 (target_thread_address_space): Delete.
5619 (generic_mourn_inferior): Use current_inferior.
5620 * target.h (struct target_ops) <thread_address_space>: Delete.
5621 (target_thread_address_space): Delete.
5622 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5623 pointers directly.
5624 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5625 thread pointer instead of a ptid_t. Adjust all callers.
5626 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5627 (first_thread_of_process): Delete, replaced by ...
5628 (first_thread_of_inferior): ... this new function. All callers
5629 adjusted.
5630 (any_thread_of_process): Rename to ...
5631 (any_thread_of_inferior): ... this, and take an inferior pointer.
5632 (any_live_thread_of_process): Rename to ...
5633 (any_live_thread_of_inferior): ... this, and take an inferior
5634 pointer.
5635 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5636 (value_in_thread_stack_temporaries)
5637 (get_last_thread_stack_temporary): Take a thread pointer instead
5638 of a ptid_t. Adjust all callers.
5639 (thread_info::set_running): New.
5640 (validate_registers_access): Use inferior_thread.
5641 (can_access_registers_ptid): Rename to ...
5642 (can_access_registers_thread): ... this, and take a thread
5643 pointer.
5644 (print_thread_info_1): Adjust to compare thread pointers instead
5645 of ptids.
5646 (switch_to_no_thread, switch_to_thread): Make extern.
5647 (scoped_restore_current_thread::~scoped_restore_current_thread):
5648 Use m_thread pointer directly.
5649 (scoped_restore_current_thread::scoped_restore_current_thread):
5650 Use inferior_thread.
5651 (thread_command): Use thread pointer directly.
5652 (thread_num_make_value_helper): Use inferior_thread.
5653 * top.c (execute_command): Use inferior_thread.
5654 * tui/tui-interp.c: Include "inferior.h".
5655 * varobj.c (varobj_create): Use inferior_thread.
5656 (value_of_root_1): Use find_thread_global_id instead of
5657 global_thread_id_to_ptid.
5658
5659 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5660
5661 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5662 possible.
5663 (regcache::write_part): Likewise.
5664 (readable_regcache::cooked_read_part): Update comment.
5665 (readable_regcache::cooked_write_part): Likewise.
5666 * regcache.h: (readable_regcache::read_part): Likewise.
5667 (regcache::write_part): Likewise.
5668
5669 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5670 Dirk Schubert <dirk.schubert@arm.com>
5671
5672 * aarch64-linux-nat.c (post_attach): New.
5673 (aarch64_linux_nat_target::post_attach): Override post_attach to
5674 record the number of hardware debug registers.
5675
5676 2018-06-20 Tom Tromey <tom@tromey.com>
5677
5678 * python/py-param.c (add_setshow_generic): Make parameters const.
5679 (parmpy_init): Update.
5680
5681 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5682
5683 * regcache.h (regcache_cooked_read_ftype): Rename to...
5684 (register_read_ftype): ...this, change type to function_view.
5685 (class reg_buffer) <save>: Remove src parameter.
5686 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5687 parameter non-const in first overload. Remove src parameter in
5688 second overload.
5689 * regcache.c (do_cooked_read): Remove.
5690 (readonly_detached_regcache::readonly_detached_regcache): Make
5691 parameter non-const, adjust call to other constructor.
5692 (reg_buffer::save): Remove src parameter.
5693 * frame.c (do_frame_register_read): Remove.
5694 (frame_save_as_regcache): Use lambda function.
5695 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5696 parameter to ppu2spu_data *.
5697 (ppu2spu_sniffer): Use lambda function.
5698
5699 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5700
5701 * record-full.c (record_full_target::insert_breakpoint): Remove
5702 "struct" keyword, add const.
5703
5704 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5705
5706 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5707 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5708 * configure.ac: Remove AC_PREREQ, add missing quoting.
5709 * gnulib/configure.ac: Modernize usage of
5710 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5711 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5712 (AUTOMAKE_VERSION): Bump to 1.15.1.
5713 * configure: Re-generate.
5714 * config.in: Re-generate.
5715 * aclocal.m4: Re-generate.
5716 * gnulib/aclocal.m4: Re-generate.
5717 * gnulib/config.in: Re-generate.
5718 * gnulib/configure: Re-generate.
5719 * gnulib/import/Makefile.in: Re-generate.
5720
5721 2018-06-19 Pedro Alves <palves@redhat.com>
5722
5723 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5724 (lookup_minimal_symbol_by_pc_section): ... here with
5725 gdb_assert_not_reached added.
5726
5727 2018-06-19 Pedro Alves <palves@redhat.com>
5728
5729 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5730 parameter with a block parameter. Compare location's block symbol
5731 with the frame's block instead of addresses.
5732 (skip_inline_frames): Pass the current block instead of the
5733 frame's address. Break out as soon as we determine the frame
5734 should not be skipped.
5735
5736 2018-06-18 Tom Tromey <tom@tromey.com>
5737
5738 * solib-aix.c (solib_aix_get_section_offsets): Return
5739 unique_xmalloc_ptr.
5740 (solib_aix_solib_create_inferior_hook): Update.
5741
5742 2018-06-18 Tom Tromey <tom@tromey.com>
5743
5744 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5745
5746 2018-06-18 Tom Tromey <tom@tromey.com>
5747
5748 * solib-frv.c (frv_relocate_main_executable): Use
5749 unique_xmalloc_ptr.
5750 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5751 unique_xmalloc_ptr.
5752
5753 2018-06-18 Tom Tromey <tom@tromey.com>
5754
5755 * objfiles.h (inhibit_section_map_updates): Update.
5756 (resume_section_map_updates, resume_section_map_updates_cleanup):
5757 Remove.
5758 * solib-svr4.c (svr4_handle_solib_event): Update.
5759 * objfiles.c (inhibit_section_map_updates): Return
5760 scoped_restore_tmpl<int>.
5761 (resume_section_map_updates, resume_section_map_updates_cleanup):
5762 Remove.
5763
5764 2018-06-18 Tom Tromey <tom@tromey.com>
5765
5766 * valprint.h (read_string): Update.
5767 * valprint.c (read_string): Change type of "buffer".
5768 (val_print_string): Update.
5769 * python/py-value.c (valpy_string): Update.
5770 * language.h (struct language_defn) <la_get_string>: Change
5771 type of "buffer".
5772 (default_get_string, c_get_string): Update.
5773 * language.c (default_get_string): Change type of "buffer".
5774 * guile/scm-value.c (gdbscm_value_to_string): Update.
5775 * c-lang.c (c_get_string): Change type of "buffer".
5776
5777 2018-06-18 Tom Tromey <tom@tromey.com>
5778
5779 * ser-mingw.c (struct pipe_state_destroyer): New.
5780 (pipe_state_up): New typedef.
5781 (cleanup_pipe_state): Remove.
5782 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5783
5784 2018-06-18 Tom Tromey <tom@tromey.com>
5785
5786 * rust-lang.h (rust_yyerror): Don't declare.
5787 * rust-lang.c (rust_language_defn): Update.
5788 * rust-exp.y (yyerror): Now static.
5789 * parse.c (parse_exp_in_context_1): Update.
5790 * p-lang.h (p_yyerror): Don't declare.
5791 * p-lang.c (p_language_defn): Update.
5792 * p-exp.y (yyerror): Now static.
5793 * opencl-lang.c (opencl_language_defn): Update.
5794 * objc-lang.c (objc_language_defn): Update.
5795 * m2-lang.h (m2_yyerror): Don't declare.
5796 * m2-lang.c (m2_language_defn): Update.
5797 * m2-exp.y (yyerror): Now static.
5798 * language.h (struct language_defn) <la_error>: Remove.
5799 * language.c (unk_lang_error): Remove.
5800 (unknown_language_defn, auto_language_defn): Remove.
5801 * go-lang.h (go_yyerror): Don't declare.
5802 * go-lang.c (go_language_defn): Update.
5803 * go-exp.y (yyerror): Now static.
5804 * f-lang.h (f_yyerror): Don't declare.
5805 * f-lang.c (f_language_defn): Update.
5806 * f-exp.y (yyerror): Now static.
5807 * d-lang.h (d_yyerror): Don't declare.
5808 * d-lang.c (d_language_defn): Update.
5809 * d-exp.y (yyerror): Now static.
5810 * c-lang.h (c_yyerror): Don't declare.
5811 * c-lang.c (c_language_defn, cplus_language_defn)
5812 (asm_language_defn, minimal_language_defn): Update.
5813 * c-exp.y (yyerror): Now static.
5814 * ada-lang.h (ada_yyerror): Don't declare.
5815 * ada-lang.c (ada_language_defn): Update.
5816 * ada-exp.y (yyerror): Now static.
5817
5818 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5819
5820 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5821 (store_sveregs_to_thread): Likewise.
5822 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5823 (aarch64_linux_store_inferior_registers): Likewise.
5824 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5825 function.
5826 (aarch64_sve_regs_copy_to_regcache): Likewise.
5827 (aarch64_sve_regs_copy_from_regcache): Likewise.
5828 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5829 declaration.
5830 (aarch64_sve_regs_copy_to_regcache): Likewise.
5831 (aarch64_sve_regs_copy_from_regcache): Likewise.
5832 (sve_context): Structure from Linux headers.
5833 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5834 (SVE_SIG_ZREG_SIZE): Likewise.
5835 (SVE_SIG_PREG_SIZE): Likewise.
5836 (SVE_SIG_FFR_SIZE): Likewise.
5837 (SVE_SIG_REGS_OFFSET): Likewise.
5838 (SVE_SIG_ZREGS_OFFSET): Likewise.
5839 (SVE_SIG_ZREG_OFFSET): Likewise.
5840 (SVE_SIG_ZREGS_SIZE): Likewise.
5841 (SVE_SIG_PREGS_OFFSET): Likewise.
5842 (SVE_SIG_PREG_OFFSET): Likewise.
5843 (SVE_SIG_PREGS_SIZE): Likewise.
5844 (SVE_SIG_FFR_OFFSET): Likewise.
5845 (SVE_SIG_REGS_SIZE): Likewise.
5846 (SVE_SIG_CONTEXT_SIZE): Likewise.
5847 (SVE_PT_REGS_MASK): Likewise.
5848 (SVE_PT_REGS_FPSIMD): Likewise.
5849 (SVE_PT_REGS_SVE): Likewise.
5850 (SVE_PT_VL_INHERIT): Likewise.
5851 (SVE_PT_VL_ONEXEC): Likewise.
5852 (SVE_PT_REGS_OFFSET): Likewise.
5853 (SVE_PT_FPSIMD_OFFSET): Likewise.
5854 (SVE_PT_FPSIMD_SIZE): Likewise.
5855 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5856 (SVE_PT_SVE_PREG_SIZE): Likewise.
5857 (SVE_PT_SVE_FFR_SIZE): Likewise.
5858 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5859 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5860 (__SVE_SIG_TO_PT): Likewise.
5861 (SVE_PT_SVE_OFFSET): Likewise.
5862 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5863 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5864 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5865 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5866 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5867 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5868 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5869 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5870 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5871 (SVE_PT_SVE_SIZE): Likewise.
5872 (SVE_PT_SIZE): Likewise.
5873 (HAS_SVE_STATE): New define.
5874
5875 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5876
5877 * nat/aarch64-sve-linux-sigcontext.h: New file.
5878 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5879 new files.
5880 (SVE_VQ_MIN): Likewise.
5881 (SVE_VQ_MAX): Likewise.
5882 (SVE_VL_MIN): Likewise.
5883 (SVE_VL_MAX): Likewise.
5884 (SVE_NUM_ZREGS): Likewise.
5885 (SVE_NUM_PREGS): Likewise.
5886 (sve_vl_valid): Likewise.
5887 (struct user_sve_header): Likewise.
5888
5889 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5890 Richard Bunt <Richard.Bunt@arm.com>
5891
5892 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5893 was requested by GDB.
5894
5895 2018-06-15 Tom de Vries <tdevries@suse.de>
5896
5897 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5898
5899 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5900
5901 * gnulib/update-gnulib.sh: Print expected versions of
5902 autoconf/aclocal.
5903
5904 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5905
5906 * arch-utils.c (default_type_align): Use type_length_units.
5907 * gdbtypes.c (type_align): Use type_length_units.
5908
5909 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5910
5911 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5912 of 'define' command.
5913
5914 2018-06-14 Tom de Vries <tdevries@suse.de>
5915
5916 PR cli/22573
5917 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5918 get_no_prettyformat_print_options.
5919
5920 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5921
5922 * sparc-nat.h: Include target.h.
5923 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5924 <fetch_registers>: Remove this argument in function call.
5925 <store_registers>: Remove this argument in function call, remove
5926 extra semicolon.
5927 <low_forget_process>: Call sparc64_forget_process instead of
5928 sparc_forget_process.
5929
5930 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5931
5932 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5933 (procfs_target::make_corefile_notes): Adjust to new
5934 target_read_alloc return type.
5935
5936 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5937 Stephen Roberts <stephen.roberts@arm.com>
5938
5939 PR gdb/22882
5940 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5941 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5942 Move should_notify_stop local into more inner scope.
5943
5944 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5945 Stephen Roberts <stephen.roberts@arm.com>
5946
5947 PR gdb/22882
5948 * infrun.c (resume_1): Add call to mark_async_event_handler.
5949
5950 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5951
5952 * infrun.c (do_target_wait): Change old version of $pc printed.
5953
5954 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5955
5956 * dwarf2read.c (read_index_from_section): Rename to...
5957 (read_gdb_index_from_section): ... this, update all callers.
5958 (dwarf2_read_index): Rename to...
5959 (dwarf2_read_gdb_index): ... this, update all callers.
5960
5961 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5962
5963 * gdb/hppa-linux-nat.c
5964 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5965 hppa_linux_nat_target::fetch_registers.
5966
5967 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5968
5969 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5970 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5971 (AARCH64_DWARF_SVE_FFR): Likewise.
5972 (AARCH64_DWARF_SVE_P0): Likewise.
5973 (AARCH64_DWARF_SVE_Z0): Likewise.
5974
5975 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5976
5977 * common/common-regcache.h (raw_compare): New function.
5978 * regcache.c (regcache::raw_compare): Likewise.
5979 * regcache.h (regcache::raw_compare): New declaration.
5980
5981 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5982
5983 * common/common-regcache.h (reg_buffer_common): New structure.
5984 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5985 (reg_buffer::raw_supply): Likewise.
5986 (reg_buffer::raw_supply_integer): Likewise.
5987 (reg_buffer::raw_supply_zeroed): Likewise.
5988 (reg_buffer::raw_collect): Likewise.
5989 (reg_buffer::raw_collect_integer): Likewise.
5990 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5991 (reg_buffer::raw_supply): Likewise.
5992 (reg_buffer::raw_supply_integer): Likewise.
5993 (reg_buffer::raw_supply_zeroed): Likewise.
5994 (reg_buffer::raw_collect): Likewise.
5995 (reg_buffer::raw_collect_integer): Likewise.
5996
5997 2018-06-10 Tom Tromey <tom@tromey.com>
5998
5999 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6000 (class remote_state) <stop_reply_queue>: Now std::vector.
6001 (remote_state::~remote_state)
6002 (remote_target::stop_reply_queue_length): Update.
6003 (struct queue_iter_param, remove_child_of_pending_fork)
6004 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6005 (check_pending_event_prevents_wildcard_vcont_callback)
6006 (remove_stop_reply_for_inferior)
6007 (remove_stop_reply_of_remote_state)
6008 (remote_notif_remove_once_on_match)
6009 (stop_reply_match_ptid_and_ws)
6010 (remote_kill_child_of_pending_fork): Remove.
6011 (remote_target::remove_new_fork_children)
6012 (remote_target::check_pending_events_prevent_wildcard_vcont)
6013 (remote_target::discard_pending_stop_replies)
6014 (remote_target::discard_pending_stop_replies_in_queue)
6015 (remote_target::remote_notif_remove_queued_reply)
6016 (remote_target::queued_stop_reply)
6017 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6018 (remote_target::wait, remote_target::kill_new_fork_children)
6019 (remote_target::async): Update.
6020
6021 2018-06-10 Tom Tromey <tom@tromey.com>
6022
6023 * record-full.c (record_full_arch_list_cleanups): Remove.
6024 (record_full_message): Use try/catch.
6025 (record_full_wait_cleanups): Remove.
6026 (record_full_wait_1): Use try/catch.
6027 (record_full_restore): Likewise.
6028
6029 2018-06-10 Tom Tromey <tom@tromey.com>
6030
6031 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6032 declare VEC. Add constructor.
6033 <in_target_beneath>: Now bool.
6034 (record_full_breakpoints): Now a std::vector, static.
6035 (record_full_sync_record_breakpoints)
6036 (record_full_init_record_breakpoints)
6037 (record_full_target::insert_breakpoint)
6038 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6039
6040 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6041
6042 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6043 * serial.c (serial_interface_lookup): Remove struct keyword.
6044
6045 2018-06-10 Tom Tromey <tom@tromey.com>
6046
6047 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6048 method.
6049 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6050 a method.
6051 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6052 method.
6053 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6054 "beneath" as a method.
6055 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6056 Use "beneath" as a method.
6057
6058 2018-06-10 Tom Tromey <tom@tromey.com>
6059
6060 * tracefile.c (struct trace_file_writer_deleter): New.
6061 <operator()>: Rename from trace_file_writer_xfree.
6062 (trace_file_writer_up): New typedef.
6063 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6064
6065 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6066
6067 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6068 <m_registers, m_register_status>: Change type to
6069 std::unique_ptr.
6070 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6071 XCNEWVEC.
6072
6073 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6074
6075 * common/common-regcache.h (enum register_status): Add
6076 underlying type "signed char".
6077 * regcache.h (reg_buffer) <m_register_status>: Change type to
6078 register_status *.
6079 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6080 register_status instead of signed char.
6081 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6082 (reg_buffer::get_register_status): Remove cast.
6083 (readable_regcache::raw_read): Remove cast.
6084 (readable_regcache::cooked_read): Remove cast.
6085
6086 2018-06-09 Tom Tromey <tom@tromey.com>
6087
6088 * source.c (reverse_search_command, forward_search_command): Use
6089 scoped_fd.
6090
6091 2018-06-09 Tom Tromey <tom@tromey.com>
6092
6093 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6094 (serial_ops_list): Now static, std::vector.
6095 (serial_interface_lookup, serial_add_interface): Update.
6096
6097 2018-06-09 Tom Tromey <tom@tromey.com>
6098
6099 * dwarf2read.c (process_cu_includes): Update.
6100 (process_full_comp_unit): Update.
6101 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6102 std::vector.
6103
6104 2018-06-08 Paul Koning <paul_koning@dell.com>
6105
6106 PR gdb/23252
6107
6108 * python/python.c (do_start_initialization):
6109 Avoid call to internal Python API.
6110 (init__gdb_module): New function.
6111
6112 2018-06-08 Gary Benson <gbenson@redhat.com>
6113
6114 * linux-thread-db.c (valprint.h): New include.
6115 (struct check_thread_db_info): New structure.
6116 (check_thread_db_on_load, tdb_testinfo): New static globals.
6117 (check_thread_db, check_thread_db_callback): New functions.
6118 (try_thread_db_load_1): Run integrity checks if requested.
6119 (maintenance_check_libthread_db): New function.
6120 (_initialize_thread_db): Register "maint check libthread-db"
6121 and "maint set/show check-libthread-db".
6122 * NEWS: Mention the above new commands.
6123
6124 2018-06-08 Tom Tromey <tom@tromey.com>
6125
6126 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6127 now a method.
6128
6129 2018-06-08 Tom Tromey <tom@tromey.com>
6130
6131 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6132
6133 2018-06-08 Tom Tromey <tom@tromey.com>
6134
6135 * common/btrace-common.h (struct btrace_data): Add constructor,
6136 destructor, move assignment operator.
6137 <empty, clear, fini>: New methods.
6138 <format>: Initialize.
6139 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6140 (btrace_data_empty): Don't declare.
6141 * common/btrace-common.c (btrace_data_init): Remove.
6142 (btrace_data::fini): Rename from btrace_data_fini.
6143 (btrace_data::empty): Rename from btrace_data_empty.
6144 (btrace_data::clear): Rename from btrace_data_clear. Return
6145 bool.
6146 * btrace.h (make_cleanup_btrace_data): Don't declare.
6147 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6148 (parse_xml_btrace): Update.
6149 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6150 (maint_btrace_clear_packet_history_cmd): Update.
6151
6152 2018-06-07 Pedro Alves <palves@redhat.com>
6153
6154 * target.h (target_ops) <beneath>: Now a method. All references
6155 updated.
6156 (class target_stack): New.
6157 * target.c (g_target_stack): New.
6158 (g_current_top_target): Delete.
6159 (current_top_target): Get the top target out of g_target_stack.
6160 (target_stack::push, target_stack::unpush): New.
6161 (push_target, unpush_target): Reimplement.
6162 (target_is_pushed): Reimplement in terms of g_target_stack.
6163 (target_ops::beneath, target_stack::find_beneath): New.
6164
6165 2018-06-07 Pedro Alves <palves@redhat.com>
6166
6167 * target.h (find_target_beneath): Delete declaration.
6168 * target.c (find_target_beneath): Delete definition.
6169 * aix-thread.c: All callers of find_target_beneath adjusted to
6170 call target_ops::beneath instead.
6171 * bsd-uthread.c: Likewise.
6172 * linux-thread-db.c: Likewise.
6173 * ravenscar-thread.c: Likewise.
6174 * sol-thread.c: Likewise.
6175 * spu-multiarch.c: Likewise.
6176
6177 2018-06-07 Pedro Alves <palves@redhat.com>
6178
6179 * target.h (target_ops) <beneath>: Now a method. All references
6180 updated.
6181 (target_ops) <m_beneath>: New.
6182 * target.c (target_ops::beneath): New.
6183 * corelow.c: Adjust all references to target_ops::beneath.
6184 * linux-thread-db.c: Likewise.
6185 * make-target-delegates: Likewise.
6186 * record-btrace.c: Likewise.
6187 * record-full.c: Likewise.
6188 * remote.c: Likewise.
6189 * target.c: Likewise.
6190 * target-delegates.c: Regenerate.
6191
6192 2018-06-07 Pedro Alves <palves@redhat.com>
6193
6194 * target.h (target_stack): Delete.
6195 (current_top_target): Declare function.
6196 * target.c (target_stack): Delete.
6197 (g_current_top_target): New.
6198 (current_top_target): New function.
6199 * auxv.c: Use current_top_target instead of target_stack
6200 throughout.
6201 * avr-tdep.c: Likewise.
6202 * breakpoint.c: Likewise.
6203 * corefile.c: Likewise.
6204 * elfread.c: Likewise.
6205 * eval.c: Likewise.
6206 * exceptions.c: Likewise.
6207 * frame.c: Likewise.
6208 * gdbarch-selftests.c: Likewise.
6209 * gnu-v3-abi.c: Likewise.
6210 * ia64-tdep.c: Likewise.
6211 * ia64-vms-tdep.c: Likewise.
6212 * infcall.c: Likewise.
6213 * infcmd.c: Likewise.
6214 * infrun.c: Likewise.
6215 * linespec.c: Likewise.
6216 * linux-tdep.c: Likewise.
6217 * minsyms.c: Likewise.
6218 * ppc-linux-nat.c: Likewise.
6219 * ppc-linux-tdep.c: Likewise.
6220 * procfs.c: Likewise.
6221 * regcache.c: Likewise.
6222 * remote.c: Likewise.
6223 * rs6000-tdep.c: Likewise.
6224 * s390-linux-nat.c: Likewise.
6225 * s390-tdep.c: Likewise.
6226 * solib-aix.c: Likewise.
6227 * solib-darwin.c: Likewise.
6228 * solib-dsbt.c: Likewise.
6229 * solib-spu.c: Likewise.
6230 * solib-svr4.c: Likewise.
6231 * solib-target.c: Likewise.
6232 * sparc-tdep.c: Likewise.
6233 * sparc64-tdep.c: Likewise.
6234 * spu-tdep.c: Likewise.
6235 * symfile.c: Likewise.
6236 * symtab.c: Likewise.
6237 * target-descriptions.c: Likewise.
6238 * target-memory.c: Likewise.
6239 * target.c: Likewise.
6240 * target.h: Likewise.
6241 * tracefile-tfile.c: Likewise.
6242 * tracepoint.c: Likewise.
6243 * valops.c: Likewise.
6244 * valprint.c: Likewise.
6245 * value.c: Likewise.
6246 * windows-tdep.c: Likewise.
6247 * mi/mi-main.c: Likewise.
6248
6249 2018-06-07 Tom Tromey <tom@tromey.com>
6250
6251 * valprint.h (build_address_symbolic): Declare.
6252 * printcmd.c (print_address_symbolic): Update.
6253 (build_address_symbolic): Change "name" and "filename" to
6254 std::string.
6255 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6256 Update.
6257 * defs.h (build_address_symbolic): Remove declaration.
6258
6259 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6260
6261 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6262 (aarch64_vnv_type): Add function.
6263 (aarch64_pseudo_register_name): Add V regs for SVE.
6264 (aarch64_pseudo_register_type): Likewise.
6265 (aarch64_pseudo_register_reggroup_p): Likewise.
6266 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6267 (aarch64_pseudo_read_value): Add V regs for SVE.
6268 (aarch64_pseudo_write_2): Use V0 offset for SVE
6269 (aarch64_pseudo_write): Add V regs for SVE.
6270 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6271
6272 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6273
6274 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6275 (sve_vl_from_vq): Likewise.
6276
6277 2018-06-05 Tom Tromey <tom@tromey.com>
6278
6279 * cli/cli-cmds.c (show_version): Update.
6280 * top.c (print_gdb_version): Add "interactive" parameter.
6281 Update.
6282 * main.c (captured_main_1): Update.
6283 * top.h (print_gdb_version): Add "interactive" parameter and a
6284 comment.
6285
6286 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6287
6288 * common/enum-flags.h: Add trailing semicolon to example in
6289 comment.
6290
6291 2018-06-05 Tom Tromey <tom@tromey.com>
6292
6293 PR cli/12326:
6294 * NEWS: Add entry about pager.
6295 * utils.c (pagination_disabled_for_command): New global.
6296 (prompt_for_continue): Allow "c" response to prompt.
6297 (reinitialize_more_filter): Clear
6298 pagination_disabled_for_command.
6299 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6300
6301 2018-06-04 Tom Tromey <tom@tromey.com>
6302
6303 * ada-lang.h (ada_lookup_symbol_list): Update.
6304 * ada-lang.c (resolve_subexp): Update.
6305 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6306 parameter.
6307 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6308 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6309 results parameter to std::vector.
6310 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6311 Update.
6312 * ada-exp.y (block_lookup): Update.
6313 (select_possible_type_sym): Change type of syms. Remove nsyms
6314 parameter.
6315 (write_var_or_type, write_name_assoc): Update.
6316
6317 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6318
6319 * windows-nat.c (windows_nat_target::xfer_partial): Return
6320 TARGET_XFER_E_IO if we need to delegate to the target beneath
6321 but BENEATH is NULL.
6322
6323 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6324
6325 * Makefile.in (config.status): Add configure.nat as a
6326 dependency.
6327
6328 2018-06-04 Tom Tromey <tom@tromey.com>
6329
6330 * cp-name-parser.y (cpname_state): Add method declarations.
6331 (HANDLE_QUAL): Update.
6332 (cpname_state::d_grab, cpname_state::fill_comp)
6333 (cpname_state::make_operator, cpname_state::make_dtor)
6334 (cpname_state::make_builtin_type, cpname_state::make_name)
6335 (cpname_state::d_qualify, cpname_state::d_int_type)
6336 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6337 (%union): Move earlier.
6338
6339 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6340
6341 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6342
6343 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6344
6345 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6346 (aarch64_pseudo_write_1): Likewise.
6347 (aarch64_pseudo_read_value): Use helper.
6348 (aarch64_pseudo_write): Likewise.
6349
6350 2018-06-04 Pedro Alves <palves@redhat.com>
6351
6352 * darwin-nat.c (darwin_ops): Delete.
6353 (darwin_attach_pid): Use get_native_target.
6354
6355 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6356
6357 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6358 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6359
6360 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6361
6362 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6363 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6364 (aarch64_gdbarch_init): Check for SVE.
6365 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6366
6367 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6368
6369 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6370 * aarch64-tdep.h (aarch64_read_description): Likewise.
6371 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6372 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6373 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6374 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6375 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6376
6377 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6378
6379 * value.c (value_fetch_lazy_bitfield): New.
6380 (value_fetch_lazy_memory): New.
6381 (value_fetch_lazy_register): New.
6382 (value_fetch_lazy): Factor out to smaller functions.
6383
6384 2018-06-01 Tom Tromey <tom@tromey.com>
6385
6386 * cp-name-parser.y (backslashable, represented): Now const.
6387
6388 2018-06-01 Tom Tromey <tom@tromey.com>
6389
6390 * cp-name-parser.y: Include parser-defs.h.
6391 (parser_fprintf): Remove declaration.
6392
6393 2018-06-01 Tom Tromey <tom@tromey.com>
6394
6395 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6396 %parse-param.
6397 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6398 (global_result): Remove globals.
6399 (struct cpname_state): New.
6400 (yyparse): Don't declare.
6401 (yylex, yyerror): Move declarations after %union.
6402 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6403 (make_name): Add state parameter.
6404 Update all callers.
6405 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6406 parameter.
6407 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6408 Update.
6409 (yylex): Add lvalp, state parameters.
6410 (yyerror): Add state parameter.
6411 (cp_demangled_name_to_comp): Update.
6412
6413 2018-06-01 Tom Tromey <tom@tromey.com>
6414
6415 * cp-name-parser.y (parser_fprintf): Declare.
6416 (GDB_YY_REMAP_PREFIX): Define.
6417 Include yy-remap.h. Don't redefine yy* identifiers.
6418
6419 2018-06-01 Tom Tromey <tom@tromey.com>
6420
6421 * python/py-type.c (typy_legacy_template_argument): Update.
6422 * cp-support.h (cp_demangled_name_to_comp): Update.
6423 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6424 parameter to be a "std::string *".
6425 (main): Update.
6426
6427 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6428
6429 * ada-lex.l: Include "diagnostics.h" instead of
6430 "common/diagnostics.h".
6431 * unittests/environ-selftests.c: Likewise.
6432 * common/diagnostics.h: Moved to ../include.
6433
6434 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6435
6436 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6437 to language_mode_manual while calling breakpoint_re_set_one.
6438
6439 2018-06-01 Tom Tromey <tom@tromey.com>
6440
6441 * valops.c (value_cast_structs, destructor_name_p): Update.
6442 * symtab.c (gdb_mangle_name): Update.
6443 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6444 Update.
6445 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6446 (pascal_object_print_value_fields, pascal_object_print_value):
6447 Update.
6448 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6449 * linespec.c (find_methods): Update.
6450 * gdbtypes.h (type_name_no_tag): Remove.
6451 (type_name_or_error): Rename from type_name_no_tag_or_error.
6452 * gdbtypes.c (type_name_no_tag): Remove.
6453 (type_name_or_error): Rename from type_name_no_tag_or_error.
6454 (lookup_struct_elt_type, check_typedef): Update.
6455 * expprint.c (print_subexp_standard): Update.
6456 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6457 * d-namespace.c (d_lookup_nested_symbol): Update.
6458 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6459 (cp_print_class_member): Update.
6460 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6461 * completer.c (add_struct_fields): Update.
6462 * c-typeprint.c (cp_type_print_derivation_info)
6463 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6464 Update.
6465 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6466 (ada_prefer_type, ada_is_exception_sym): Update.
6467
6468 2018-06-01 Tom Tromey <tom@tromey.com>
6469
6470 * valops.c (enum_constant_from_type, value_namespace_elt)
6471 (value_maybe_namespace_elt): Update.
6472 * valarith.c (find_size_for_pointer_math): Update.
6473 * target-descriptions.c (make_gdb_type): Update.
6474 * symmisc.c (print_symbol): Update.
6475 * stabsread.c (define_symbol, read_type)
6476 (complain_about_struct_wipeout, add_undefined_type)
6477 (cleanup_undefined_types_1): Update.
6478 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6479 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6480 (rust_internal_print_type, rust_composite_type)
6481 (rust_evaluate_funcall, rust_evaluate_subexp)
6482 (rust_inclusive_range_type_p): Update.
6483 * python/py-type.c (typy_get_tag): Update.
6484 * p-typeprint.c (pascal_type_print_base): Update.
6485 * mdebugread.c (parse_symbol, parse_type): Update.
6486 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6487 Update.
6488 * guile/scm-type.c (gdbscm_type_tag): Update.
6489 * go-lang.c (sixg_string_p): Update.
6490 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6491 Update.
6492 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6493 (TYPE_TAG_NAME): Remove.
6494 * gdbtypes.c (type_name_no_tag): Simplify.
6495 (check_typedef, check_types_equal, recursive_dump_type)
6496 (copy_type_recursive, arch_composite_type): Update.
6497 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6498 in summary mode when needed.
6499 * eval.c (evaluate_funcall): Update.
6500 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6501 (process_structure_scope, read_enumeration_type)
6502 (read_namespace_type, read_module_type, determine_prefix): Update.
6503 * cp-support.c (inspect_type): Update.
6504 * coffread.c (process_coff_symbol, decode_base_type): Update.
6505 * c-varobj.c (c_is_path_expr_parent): Update.
6506 * c-typeprint.c (c_type_print_base_struct_union): Update.
6507 (c_type_print_base_1): Update. Print struct/class/union/enum in
6508 summary when using C language.
6509 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6510 (gen_maybe_namespace_elt): Update.
6511 * ada-lang.c (ada_type_name): Simplify.
6512 (empty_record, ada_template_to_fixed_record_type_1)
6513 (template_to_static_fixed_type)
6514 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6515
6516 2018-06-01 Tom Tromey <tom@tromey.com>
6517
6518 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6519 c_print_type.
6520 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6521 (c_print_type): Update.
6522 (c_print_type): New overload.
6523 (c_type_print_varspec_prefix, c_type_print_args)
6524 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6525 (c_type_print_base_struct_union, c_type_print_base_1)
6526 (cp_type_print_method_args): Add "language" parameter.
6527 (c_type_print_base): Update.
6528 * c-lang.h (c_print_type): Add new overload.
6529
6530 2018-06-01 Tom Tromey <tom@tromey.com>
6531
6532 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6533 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6534
6535 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6536
6537 * aarch64-tdep.c (aarch64_sve_register_names): New const
6538 var.
6539 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6540 (AARCH64_SVE_Z_REGS_NUM): New define.
6541 (AARCH64_SVE_P_REGS_NUM): Likewise.
6542 (AARCH64_SVE_NUM_REGS): Likewise.
6543
6544 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6545
6546 * nat/linux-ptrace.h [__alpha__]
6547 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6548 definitions.
6549
6550 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6551
6552 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6553 the endianness selected.
6554 * NEWS: Document `set endian auto' mode operation update.
6555
6556 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6557
6558 * Makefile.in: Add new header.
6559 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6560 (sve_vl_from_vg): Likewise.
6561 (sve_vq_from_vl): Likewise.
6562 (sve_vl_from_vq): Likewise.
6563 (sve_vq_from_vg): Likewise.
6564 (sve_vg_from_vq): Likewise.
6565 * configure.nat: Add new c file.
6566 * nat/aarch64-sve-linux-ptrace.c: New file.
6567 * nat/aarch64-sve-linux-ptrace.h: New file.
6568
6569 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6570
6571 * aarch64-linux-nat.c (aarch64_linux_read_description):
6572 Add parmeter zero.
6573 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6574 Likewise.
6575 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6576 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6577 (aarch64_gdbarch_init): Add parmeter zero.
6578 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6579 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6580 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6581 parmeter.
6582 * doc/gdb.texinfo: Describe SVE feature
6583 * features/aarch64-sve.c: New file.
6584
6585 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6586
6587 PR gdb/23210
6588 * gdbarch.sh (significant_addr_bit): Default to zero when
6589 not set by target architecture.
6590 * gdbarch.c: Re-generated.
6591 * utils.c (address_significant): Update.
6592
6593 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6594
6595 * stack.c (func_command): Remove trailing newline in call to error.
6596
6597 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6598
6599 * regcache.h (regcache_raw_collect): Remove, update callers to
6600 use regcache::raw_collect.
6601 * regcache.c (regcache_raw_collect): Remove.
6602
6603 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6604
6605 * regcache.h (regcache_raw_supply): Remove, update callers to
6606 use detached_regcache::raw_supply.
6607 * regcache.c (regcache_raw_supply): Remove.
6608
6609 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6610
6611 * regcache.h (regcache_cooked_write_part): Remove, update
6612 callers to use regcache::cooked_write_part.
6613 * regcache.c (regcache_cooked_write_part): Remove.
6614
6615 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6616
6617 * regcache.h (regcache_cooked_read_part): Remove, update callers
6618 to use readable_regcache::cooked_read_part.
6619 * regcache.c (regcache_cooked_read_part): Remove.
6620
6621 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6622
6623 * regcache.h (regcache_cooked_read_value): Remove, update
6624 callers to use readable_regcache::cooked_read_value.
6625 * regcache.c (regcache_cooked_read_value): Remove.
6626
6627 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6628
6629 * regcache.h (regcache_cooked_write): Remove, update callers to
6630 use regcache::cooked_write.
6631 * regcache.c (regcache_cooked_write): Remove.
6632
6633 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6634
6635 * regcache.h (regcache_invalidate): Remove, update callers to
6636 use detached_regcache::invalidate instead.
6637 * regcache.c (regcache_invalidate): Remove.
6638
6639 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6640
6641 * regcache.h (regcache_raw_write_part): Remove, update callers
6642 to use regcache::raw_write_part instead.
6643 * regcache.c (regcache_raw_write_part): Remove.
6644
6645 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6646
6647 * regcache.h (regcache_raw_read_part): Remove, update callers to
6648 use readable_regcache::raw_read_part instead.
6649 * regcache.c (regcache_raw_read_part): Remove.
6650
6651 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6652
6653 * regcache.h (regcache_cooked_read): Remove, update callers to
6654 use readable_regcache::cooked_read instead.
6655 * regcache.c (regcache_cooked_read): Remove.
6656
6657 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6658
6659 * regcache.h (regcache_raw_write): Remove, update callers to use
6660 regcache::raw_write instead.
6661 * regcache.c (regcache_raw_write): Remove.
6662
6663 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6664
6665 * regcache.h (regcache_raw_read): Remove, update callers to use
6666 readable_regcache::raw_read instead.
6667 * regcache.c (regcache_raw_read): Remove.
6668
6669 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6670
6671 * regcache.h (regcache_raw_update): Remove, update callers to
6672 use readable_regcache::raw_update instead.
6673 * regcache.c (regcache_raw_update): Remove.
6674
6675 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6676
6677 * regcache.h (regcache_register_status): Remove, update callers
6678 to use reg_buffer::get_register_status directly instead.
6679 * regcache.c (regcache_register_status): Remove.
6680
6681 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6682
6683 * regcache.h (regcache_get_ptid): Remove, update all callers to
6684 call regcache::ptid instead.
6685 * regcache.c (regcache_get_ptid): Remove.
6686
6687 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6688
6689 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6690
6691 2018-05-30 Pedro Alves <palves@redhat.com>
6692
6693 * common/common-exceptions.h (exception_rethrow): Use
6694 ATTRIBUTE_NORETURN.
6695
6696 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6697
6698 * breakpoint.c (print_solib_event, check_status_catch_solib):
6699 Remove struct keyword in range-based for loops.
6700 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6701 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6702 Likewise.
6703 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6704 Likewise.
6705 * symfile.c (addr_info_make_relative): Likewise.
6706 * thread.c (value_in_thread_stack_temporaries): Likewise.
6707
6708 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6709
6710 PR gdb/16841
6711 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6712 aggregate type to get its real type before accessing it.
6713
6714 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6715
6716 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6717 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6718 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6719 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6720 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6721 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6722 * printcmd.c (info_address_command): Likewise.
6723
6724 2018-05-29 Tom Tromey <tom@tromey.com>
6725
6726 * windows-nat.c (handle_exception): Update fall-through comment.
6727
6728 2018-05-29 Tom Tromey <tom@tromey.com>
6729
6730 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6731 (struct program_space) <added_solibs>: Now a std::vector.
6732 * breakpoint.c (print_solib_event): Update.
6733 (check_status_catch_solib): Update.
6734 * progspace.c (clear_program_space_solib_cache): Update.
6735 * solib.c (update_solib_list): Update.
6736
6737 2018-05-29 Tom Tromey <tom@tromey.com>
6738
6739 * python/py-type.c (typy_richcompare): Update.
6740 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6741 * gdbtypes.h (types_deeply_equal): Return bool.
6742 (types_equal): Likewise.
6743 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6744 declare VEC.
6745 (check_types_equal): Change worklist to std::vector. Return
6746 bool.
6747 (struct type_equality_entry): Add constructor.
6748 (compare_maybe_null_strings): Return bool.
6749 (check_types_worklist): Return bool. Change worklist to
6750 std::vector.
6751 (types_deeply_equal): Use std::vector.
6752 (types_equal): Return bool.
6753 (compare_maybe_null_strings): Simplify.
6754
6755 2018-05-29 Tom Tromey <tom@tromey.com>
6756
6757 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6758
6759 2018-05-29 Tom Tromey <tom@tromey.com>
6760
6761 * objc-lang.h: Don't include cp-support.h.
6762 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6763 declare VEC.
6764
6765 2018-05-27 Tom Tromey <tom@tromey.com>
6766
6767 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6768
6769 2018-05-25 Tom Tromey <tom@tromey.com>
6770
6771 * value.c (value::location): Initialize.
6772
6773 2018-05-25 Tom Tromey <tom@tromey.com>
6774
6775 * dbxread.c (init_bincl_list): Remove.
6776 (bincl_list): Now a std::vector.
6777 (bincls_allocated, next_bincl): Remove.
6778 (free_bincl_list, do_free_bincl_list_cleanup)
6779 (make_cleanup_free_bincl_list): Remove.
6780 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6781 unique_xmalloc_ptr.
6782 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6783 (struct header_file_location): Add constructor.
6784 (add_bincl_to_list): Remove.
6785
6786 2018-05-25 Tom Tromey <tom@tromey.com>
6787
6788 * tui/tui.c (tui_enable): Update.
6789 * mi/mi-interp.c (mi_interp::init): Update.
6790 * interps.h (class interp) <name>: New method.
6791 <m_name>: Rename from name.
6792 (~scoped_restore_interp): Update.
6793 * interps.c (interp::interp): Update.
6794 (interp_add, interp_set, interp_lookup_existing)
6795 (current_interp_named_p): Update.
6796
6797 2018-05-25 Tom Tromey <tom@tromey.com>
6798
6799 * interps.c (interp_name): Remove.
6800 * mi/mi-interp.c (mi_interp::init): Update.
6801 * interps.h (interp_name): Remove.
6802 (~scoped_restore_interp): Update.
6803 * tui/tui.c (tui_enable): Update.
6804
6805 2018-05-25 Tom Tromey <tom@tromey.com>
6806
6807 * utils.c (fputs_maybe_filtered): Update.
6808 * linespec.c (decode_line_full): Update.
6809 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6810 (mi_print_breakpoint_for_event, mi_solib_loaded)
6811 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6812 (mi_user_selected_context_changed): Update.
6813 * mi/mi-main.c (mi_execute_command): Update.
6814 * cli/cli-script.c (execute_control_command): Update.
6815 * python/python.c (execute_gdb_command): Update.
6816 * solib.c (info_sharedlibrary_command): Update.
6817 * interps.c (interp_ui_out): Remove.
6818 * interps.h (interp_ui_out): Remove.
6819
6820 2018-05-25 Tom Tromey <tom@tromey.com>
6821
6822 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6823 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6824 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6825
6826 2018-05-25 Tom Tromey <tom@tromey.com>
6827
6828 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6829 * interps.c (interp_exec): Use scoped_restore.
6830
6831 2018-05-25 Tom Tromey <tom@tromey.com>
6832
6833 * remote.c (remote_target::remote_file_get): Use
6834 gdb::byte_vector.
6835 (remote_target::remote_file_put): Likewise.
6836
6837 2018-05-25 Tom Tromey <tom@tromey.com>
6838
6839 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6840 a std::string.
6841 (get_pe_section_index, add_pe_exported_sym): Update.
6842 (read_pe_exported_syms): Use gdb::def_vector.
6843
6844 2018-05-25 Tom Tromey <tom@tromey.com>
6845
6846 * frame.c (remove_prev_frame): Remove.
6847 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6848
6849 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6850
6851 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6852 Remove prototypes.
6853 * mips-linux-nat.c (supply_fpregset): Always call
6854 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6855 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6856 `mips_fill_fpregset'.
6857 * mips-linux-tdep.c (mips_supply_fpregset)
6858 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6859 (mips_fill_fpregset_wrapper): Remove functions.
6860 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6861 (mips_linux_fpregset): Remove variable.
6862 (mips_linux_iterate_over_regset_sections): Use
6863 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6864 (mips_linux_o32_sigframe_init): Remove comment.
6865
6866 2018-05-25 Pedro Alves <palves@redhat.com>
6867
6868 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6869 (struct readahead_cache, struct packet_reg, struct
6870 remote_arch_state, class remote_state): Move higher up in the
6871 file.
6872 (remote_target::m_remote_state): Now an object instead of a pointer.
6873 (remote_target::get_remote_state): Adjust.
6874
6875 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6876
6877 * stack.c (select_and_print_frame): Delete.
6878 (struct function_bounds): Move struct within function.
6879 (func_command): Most content moved into new function
6880 find_frame_for_function, use new function, print result, add
6881 function comment.
6882 (find_frame_for_function): New function, now returns a result.
6883
6884 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6885
6886 * stack.c (iterate_over_block_arg_vars): Fix comment.
6887 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6888
6889 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6890
6891 PR gdb/23203
6892 * frame.c
6893 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6894 Define.
6895 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6896 Define.
6897 * frame.h (class scoped_restore_selected_frame): New class.
6898 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6899 of any exception, use scoped_restore_selected_frame to restore the
6900 frame instead.
6901
6902 2018-05-24 Pedro Alves <palves@redhat.com>
6903
6904 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6905 override.
6906
6907 2018-05-23 Tom Tromey <tom@tromey.com>
6908
6909 * complaints.c (struct complaints): Remove.
6910 (symfile_complaint_book): Remove.
6911 (series): New global.
6912 (complaint_internal): Update.
6913 (clear_complaints): Update.
6914
6915 2018-05-23 Tom Tromey <tom@tromey.com>
6916
6917 * complaints.c (counters): New global.
6918 (struct complain): Remove.
6919 (struct complaints) <root>: Remove.
6920 (complaint_sentinel): Remove.
6921 (symfile_complaint_book): Update.
6922 (find_complaint) Remove.
6923 (complaint_internal, clear_complaints): Update.
6924
6925 2018-05-23 Tom Tromey <tom@tromey.com>
6926
6927 * complaints.c (struct complain) <file, line>: Remove.
6928 (find_complaint): Remove file, line parameters.
6929 (complaint_internal): Update.
6930
6931 2018-05-23 Tom Tromey <tom@tromey.com>
6932
6933 * complaints.c (vcomplaint): Remove.
6934 (complaint_internal) Merge in contents of vcomplaint.
6935
6936 2018-05-23 Tom Tromey <tom@tromey.com>
6937
6938 * complaints.c (struct complaints) <explanation>: Remove.
6939 (symfile_explanations): Remove.
6940 (symfile_complaint_book): Update.
6941 (vcomplaint): Update.
6942 (struct explanation): Remove.
6943
6944 2018-05-23 Tom Tromey <tom@tromey.com>
6945
6946 * complaints.c (symfile_complaints): Remove.
6947 (complaint_internal): Remove "complaints" parameter.
6948 (clear_complaints, vcomplaint): Remove "c" parameter.
6949 (get_complaints): Remove.
6950 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6951 (dwarf2_debug_line_missing_file_complaint)
6952 (dwarf2_debug_line_missing_end_sequence_complaint)
6953 (dwarf2_complex_location_expr_complaint)
6954 (dwarf2_const_value_length_mismatch_complaint)
6955 (dwarf2_section_buffer_overflow_complaint)
6956 (dwarf2_macro_malformed_definition_complaint)
6957 (dwarf2_invalid_attrib_class_complaint)
6958 (create_addrmap_from_index, dw2_symtab_iter_next)
6959 (dw2_expand_marked_cus)
6960 (dw2_debug_names_iterator::find_vec_in_debug_names)
6961 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6962 (create_debug_type_hash_table, init_cutu_and_read_dies)
6963 (partial_die_parent_scope, add_partial_enumeration)
6964 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6965 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6966 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6967 (create_cus_hash_table, create_dwp_hash_table)
6968 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6969 (dwarf2_rnglists_process, dwarf2_ranges_process)
6970 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6971 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6972 (handle_struct_member_die, process_structure_scope)
6973 (read_array_type, read_common_block, read_module_type)
6974 (read_tag_pointer_type, read_typedef, read_base_type)
6975 (read_subrange_type, load_partial_dies, partial_die_info::read)
6976 (partial_die_info::read, partial_die_info::read)
6977 (partial_die_info::read, read_checked_initial_length_and_offset)
6978 (dwarf2_string_attr, read_formatted_entries)
6979 (dwarf_decode_line_header)
6980 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6981 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6982 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6983 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6984 (get_signatured_type, get_DW_AT_signature_type)
6985 (decode_locdesc, file_file_name, consume_improper_spaces)
6986 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6987 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6988 (dwarf2_symbol_mark_computed, set_die_type)
6989 (read_attribute_value): Update.
6990 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6991 Update.
6992 * dbxread.c (unknown_symtype_complaint)
6993 (lbrac_mismatch_complaint, repeated_header_complaint)
6994 (set_namestring, function_outside_compilation_unit_complaint)
6995 (read_dbx_symtab, process_one_symbol): Update.
6996 * gdbtypes.c (stub_noname_complaint): Update.
6997 * windows-nat.c (handle_unload_dll): Update.
6998 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6999 (decode_base_type): Update.
7000 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7001 (eb_complaint, record_include_begin, record_include_end)
7002 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7003 (process_xcoff_symbol, read_symbol)
7004 (function_outside_compilation_unit_complaint)
7005 (scan_xcoff_symtab): Update.
7006 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7007 * buildsym.c (finish_block_internal, make_blockvector)
7008 (end_symtab_get_static_block, augment_type_symtab): Update.
7009 * dtrace-probe.c (dtrace_process_dof)
7010 (dtrace_static_probe_ops::get_probes): Update.
7011 * complaints.h (struct complaint): Don't declare.
7012 (symfile_complaints): Remove.
7013 (complaint_internal): Remove "complaints" parameter.
7014 (complaint): Likewise.
7015 (clear_complaints): Likewise.
7016 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7017 (reread_symbols): Update.
7018 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7019 (dwarf2_frame_cache, decode_frame_entry): Update.
7020 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7021 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7022 (info_selectors_command): Update.
7023 * macrotab.c (macro_include, check_for_redefinition)
7024 (macro_undef): Update.
7025 * objfiles.c (filter_overlapping_sections): Update.
7026 * stabsread.c (invalid_cpp_abbrev_complaint)
7027 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7028 (define_symbol, error_type, read_type, rs6000_builtin_type)
7029 (stabs_method_name_from_physname, read_member_functions)
7030 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7031 (attach_fields_to_type, complain_about_struct_wipeout)
7032 (read_range_type, read_args, common_block_start)
7033 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7034 Update.
7035 * mdebugread.c (index_complaint, unknown_ext_complaint)
7036 (basic_type_complaint, bad_tag_guess_complaint)
7037 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7038 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7039 (parse_procedure, parse_lines)
7040 (function_outside_compilation_unit_complaint)
7041 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7042 (bad_tag_guess_complaint, reg_value_complaint): Update.
7043 * cp-support.c (demangled_name_complaint): Update.
7044 * macroscope.c (sal_macro_scope): Update.
7045 * dwarf-index-write.c (class debug_names): Update.
7046
7047 2018-05-23 Tom Tromey <tom@tromey.com>
7048
7049 * complaints.c (clear_complaints): Remove "noisy" parameter.
7050 * complaints.h (clear_complaints): Update.
7051 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7052 (reread_symbols): Update.
7053
7054 2018-05-23 Tom Tromey <tom@tromey.com>
7055
7056 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7057 SUBSEQUENT_MESSAGE.
7058 (vcomplaint, clear_complaints): Update.
7059 (symfile_explanations): Remove some messages.
7060
7061 2018-05-23 Tom Tromey <tom@tromey.com>
7062
7063 * complaints.c (internal_complaint): Remove.
7064 * complaints.h (internal_complaint): Remove.
7065
7066 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7067
7068 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7069
7070 2018-05-22 Pedro Alves <palves@redhat.com>
7071
7072 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7073 (remote_fileio_badfd, remote_fileio_return_errno)
7074 (remote_fileio_return_success, remote_fileio_func_open)
7075 (remote_fileio_func_open, remote_fileio_func_close)
7076 (remote_fileio_func_read, remote_fileio_func_write)
7077 (remote_fileio_func_lseek, remote_fileio_func_rename)
7078 (remote_fileio_func_unlink, remote_fileio_func_stat)
7079 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7080 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7081 remote_target parameter.
7082 (remote_fio_func_map) <func>: Add remote_target parameter.
7083 (do_remote_fileio_request, remote_fileio_request):
7084 * remote-fileio.h (remote_fileio_request):
7085 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7086 remote_target parameter.
7087 (remote_notif_process, handle_notification): Adjust to pass down
7088 the remote.
7089 (remote_notif_state_allocate): Add remote_target parameter. Save
7090 it.
7091 * remote-notif.h (struct remote_target): Forward declare.
7092 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7093 remote_target parameter.
7094 (struct remote_notif_state) <remote>: New field.
7095 (remote_notif_ack, remote_notif_parse): Add remote_target
7096 parameter.
7097 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7098 remote_target parameter.
7099 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7100 (threads_listing_context, rmt_thread_action, protocol_feature)
7101 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7102 (packet_result, struct threads_listing_context, remote_state):
7103 Move definitions and declarations higher up.
7104 (remote_target) <~remote_target>: Declare.
7105 (remote_download_command_source, remote_file_put, remote_file_get)
7106 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7107 (remote_hostio_pread_vFile, remote_hostio_send_command)
7108 (remote_hostio_set_filesystem, remote_hostio_open)
7109 (remote_hostio_close, remote_hostio_unlink, remote_state)
7110 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7111 (get_memory_write_packet_size, get_memory_read_packet_size)
7112 (append_pending_thread_resumptions, remote_detach_1)
7113 (append_resumption, remote_resume_with_vcont)
7114 (add_current_inferior_and_thread, wait_ns, wait_as)
7115 (process_stop_reply, remote_notice_new_inferior)
7116 (process_initial_stop_replies, remote_add_thread)
7117 (btrace_sync_conf, remote_btrace_maybe_reopen)
7118 (remove_new_fork_children, kill_new_fork_children)
7119 (discard_pending_stop_replies, stop_reply_queue_length)
7120 (check_pending_events_prevent_wildcard_vcont)
7121 (discard_pending_stop_replies_in_queue, stop_reply)
7122 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7123 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7124 (remote_interrupt_as, remote_interrupt_ns)
7125 (remote_get_noisy_reply, remote_query_attached)
7126 (remote_add_inferior, remote_current_thread, get_current_thread)
7127 (set_thread, set_general_thread, set_continue_thread)
7128 (set_general_process, write_ptid)
7129 (remote_unpack_thread_info_response, remote_get_threadinfo)
7130 (parse_threadlist_response, remote_get_threadlist)
7131 (remote_threadlist_iterator, remote_get_threads_with_ql)
7132 (remote_get_threads_with_qxfer)
7133 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7134 (get_offsets, remote_check_symbols, remote_supported_packet)
7135 (remote_query_supported, remote_packet_size)
7136 (remote_serial_quit_handler, remote_detach_pid)
7137 (remote_vcont_probe, remote_resume_with_hc)
7138 (send_interrupt_sequence, interrupt_query)
7139 (remote_notif_get_pending_events, fetch_register_using_p)
7140 (send_g_packet, process_g_packet, fetch_registers_using_g)
7141 (store_register_using_P, store_registers_using_G)
7142 (set_remote_traceframe, check_binary_download)
7143 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7144 (remote_xfer_live_readonly_partial, remote_read_bytes)
7145 (remote_send_printf, remote_flash_write, readchar)
7146 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7147 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7148 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7149 (extended_remote_disable_randomization, extended_remote_run)
7150 (send_environment_packet, extended_remote_environment_support)
7151 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7152 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7153 (packet_command): Now methods of ...
7154 (remote_target): ... this class.
7155 (m_remote_state) <remote_target>: New field.
7156 (struct remote_state) <stop_reply_queue,
7157 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7158 fields.
7159 (remote_state::remote_state): Allocate stop_reply_queue.
7160 (remote_state): Delete global.
7161 (get_remote_state_raw): Delete.
7162 (remote_target::get_remote_state): Allocate m_remote_state on
7163 demand.
7164 (get_current_remote_target): New.
7165 (remote_ops, extended_remote_ops): Delete.
7166 (wait_forever_enabled_p, remote_async_inferior_event_token):
7167 Delete, moved to struct remote_state.
7168 (remote_target::close): Delete self. Destruction bits split to
7169 ...
7170 (remote_target::~remote_target): ... this.
7171 (show_memory_packet_size): Adjust to use
7172 get_current_remote_target.
7173 (struct protocol_feature) <func>: Add remote_target parameter.
7174 All callers adjusted.
7175 (curr_quit_handler_target): New.
7176 (remote_serial_quit_handler): Reimplement.
7177 (remote_target::open_1): Adjust to use get_current_remote_target.
7178 Heap-allocate remote_target/extended_remote_target instances.
7179 (vcont_builder::vcont_builder): Add remote_target parameter, and
7180 save it in m_remote. All callers adjusted.
7181 (vcont_builder::m_remote): New field.
7182 (vcont_builder::restart, vcont_builder::flush)
7183 (vcont_builder::push_action): Use it.
7184 (remote_target::commit_resume): Use it.
7185 (struct queue_iter_param) <remote>: New field.
7186 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7187 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7188 (check_pending_event_prevents_wildcard_vcont_callback)
7189 (remote_target::check_pending_events_prevent_wildcard_vcont)
7190 (remote_target::discard_pending_stop_replies)
7191 (remote_target::discard_pending_stop_replies_in_queue)
7192 (remote_target::remote_notif_remove_queued_reply): Fill in
7193 'remote' field.
7194 (remote_notif_get_pending_events): New.
7195 (remote_target::readchar, remote_target::remote_serial_write):
7196 Save/restore curr_quit_handler_target.
7197 (putpkt): New.
7198 (kill_new_fork_children): Fill in 'remote' field.
7199 (packet_command): Use get_current_remote_target, defer to
7200 remote_target method of same name.
7201 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7202 parameter, and save it in m_remote. All callers adjusted.
7203 (scoped_remote_fd::release): Use m_remote.
7204 (scoped_remote_fd::m_remote): New field.
7205 (remote_file_put, remote_file_get, remote_file_delete): Use
7206 get_current_remote_target, defer to remote_target method of same
7207 name.
7208 (remote_btrace_reset): Add remote_state paremeter. Update all
7209 callers.
7210 (remote_async_inferior_event_handler). Pass down 'data'.
7211 (remote_new_objfile): Use get_current_remote_target.
7212 (remote_target::vcont_r_supported): New.
7213 (set_range_stepping): Use get_current_remote_target and
7214 remote_target::vcont_r_supported.
7215 (_initialize_remote): Don't allocate 'remote_state' and
7216 'stop_reply_queue' globals.
7217 * remote.h (struct remote_target): Forward declare.
7218 (getpkt, putpkt, remote_notif_get_pending_events): Add
7219 'remote_target' parameter.
7220
7221 2018-05-22 Pedro Alves <palves@redhat.com>
7222
7223 * remote.c (vcont_builder): Now a class. Make all data members
7224 private.
7225 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7226 Declare methods.
7227 (vcont_builder_restart): Rename to ...
7228 (vcont_builder::restart): ... this.
7229 (vcont_builder_flush): Rename to ...
7230 (vcont_builder::flush): ... this.
7231 (vcont_builder_push_action): Rename to ...
7232 (vcont_builder::push_action): ... this.
7233 (remote_target::commit_resume): Adjust.
7234
7235 2018-05-22 Pedro Alves <palves@redhat.com>
7236
7237 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7238 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7239 (get_fixed_memory_packet_size): New.
7240 (get_memory_packet_size): Use it.
7241 (set_memory_packet_size): Don't override the config size with
7242 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7243 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7244 Don't refer to get_memory_packet_size if not connected to a remote
7245 target. Show "(default)" if configured size is 0.
7246
7247 2018-05-22 Pedro Alves <palves@redhat.com>
7248
7249 * remote.c (remote_target::mourn_inferior): Move
7250 discard_pending_stop_replies call here from ...
7251 (_initialize_remote): ... here.
7252
7253 2018-05-22 Pedro Alves <palves@redhat.com>
7254
7255 * remote.c (compare_section_command): Remove set_general_process
7256 call.
7257
7258 2018-05-22 Pedro Alves <palves@redhat.com>
7259
7260 * remote.c (struct packet_reg, struct remote_arch_state):
7261 Move higher up in the file.
7262 (remote_state) <m_arch_states>: Store remote_arch_state values
7263 instead of remote_arch_state pointers.
7264 (remote_state::get_remote_arch_state): Adjust.
7265
7266 2018-05-22 Pedro Alves <palves@redhat.com>
7267
7268 * remote.c: Include <unordered_map>.
7269 (remote_state): Now a class.
7270 (remote_state) <get_remote_arch_state>: Declare method.
7271 <get_remote_arch_state>: New field.
7272 (remote_arch_state) <remote_arch_state>: Declare ctor.
7273 <regs>: Now a unique_ptr.
7274 (remote_gdbarch_data_handle): Delete.
7275 (get_remote_arch_state): Delete.
7276 (remote_state::get_remote_arch_state): New.
7277 (get_remote_state): Adjust to call remote_state's
7278 get_remote_arch_state method.
7279 (init_remote_state): Delete, bits factored out to ...
7280 (remote_arch_state::remote_arch_state): ... this new method.
7281 (get_remote_packet_size, get_memory_packet_size)
7282 (process_g_packet, remote_target::fetch_registers)
7283 (remote_target::prepare_to_store, store_registers_using_G)
7284 (remote_target::store_registers, remote_target::get_trace_status):
7285 Adjust to call remote_state's method.
7286 (_initialize_remote): Remove reference to
7287 remote_gdbarch_data_handle.
7288
7289 2018-05-22 Pedro Alves <palves@redhat.com>
7290
7291 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7292 pread>: New method declarations.
7293 (remote_target::open_1): Adjust.
7294 (readahead_cache_invalidate): Rename to ...
7295 (readahead_cache::invalidate): ... this, and adjust to be a class
7296 method.
7297 (readahead_cache_invalidate_fd): Rename to ...
7298 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7299 class method.
7300 (remote_hostio_pwrite): Adjust.
7301 (remote_hostio_pread_from_cache): Rename to ...
7302 (readahead_cache::pread): ... this, and adjust to be a class
7303 method.
7304 (remote_hostio_close): Adjust.
7305
7306 2018-05-22 Pedro Alves <palves@redhat.com>
7307
7308 * remote.c (remote_hostio_close_cleanup): Delete.
7309 (class scoped_remote_fd): New.
7310 (remote_file_put, remote_file_get): Use it.
7311
7312 2018-05-22 Pedro Alves <palves@redhat.com>
7313
7314 (struct vCont_action_support): Use bool and initialize all fields.
7315 (struct readahead_cache): Initialize all fields.
7316 (remote_state): Use bool and initialize all fields.
7317 (remote_state::remote_state, remote_state::~remote_state): New.
7318 (new_remote_state): Delete.
7319 (_initialize_remote): Use new to allocate remote_state.
7320
7321 2018-05-22 Pedro Alves <palves@redhat.com>
7322 張俊芝 <zjz@zjz.name>
7323
7324 PR gdb/22973
7325 * c-exp.y: Include "c-support.h".
7326 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7327 of tolower. Use c_ident_is_alpha to scan names.
7328 * c-lang.c: Include "c-support.h".
7329 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7330 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7331 * c-support.h: New file, with bits factored out from ...
7332 * cp-name-parser.y: ... this file.
7333 Include "c-support.h".
7334 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7335 c-support.h and renamed.
7336 (symbol_end, yylex): Adjust.
7337
7338 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7339
7340 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7341 parameter type to CORE_ADDR.
7342 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7343 parameter type in declaration to CORE_ADDR.
7344 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7345 target_auxv_search to get AT_HWCAP and use the result to get the
7346 target description.
7347 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7348 to CORE_ADDR. Remove the cast of the return value to unsigned
7349 long. Fix error predicate of target_auxv_search.
7350 (ppc_linux_nat_target::read_description): Change the type of the
7351 hwcap variable to CORE_ADDR.
7352
7353 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7354
7355 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7356 if the size of fpscr is larger than 32 bits.
7357
7358 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7359
7360 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7361 (ppc32_linux_vsxregmap): New global.
7362 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7363 regcache_supply_regset, and regcache_collect_regset.
7364 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7365 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7366 (fetch_vsx_register, store_vsx_register): Remove.
7367 (fetch_vsx_registers): Add regno parameter. Get regset using
7368 ppc_linux_vsxregset. Use regset to supply registers.
7369 (store_vsx_registers): Add regno parameter. Get regset using
7370 ppc_linux_vsxregset. Use regset to collect registers.
7371 (fetch_register): Call fetch_vsx_registers instead of
7372 fetch_vsx_register.
7373 (store_register): Call store_vsx_registers instead of
7374 store_vsx_register.
7375 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7376 new regno parameter.
7377 (store_ppc_registers): Call store_vsx_registers with -1 for the
7378 new regno parameter.
7379 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7380 (ppc_collect_vsxregset): Remove.
7381
7382 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7383
7384 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7385 offset fields.
7386 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7387 for vector register offset fields.
7388 (ppc64_fbsd_reg_offsets): Likewise.
7389 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7390 to vector register offset fields.
7391 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7392 to vector register offset fields.
7393 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7394 vector register offset fields.
7395 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7396 initializers for vector register offset fields.
7397 (rs6000_aix64_reg_offsets): Likewise.
7398 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7399 (ppc_supply_vrregset): Remove.
7400 (ppc_collect_vrregset): Remove.
7401 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7402 (ppc_linux_vrregset) : New function.
7403 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7404 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7405 (ppc32_linux_vrregset): Remove.
7406 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7407 and use result instead of ppc32_linux_vrregset.
7408 (ppc32_linux_reg_offsets): Remove initializers for vector register
7409 offset fields.
7410 (ppc64_linux_reg_offsets): Likewise.
7411 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7412 * ppc-linux-nat.c: Include regset.h.
7413 (gdb_vrregset_t): Adjust comment to account for little-endian
7414 mode.
7415 (supply_vrregset, fill_vrregset): Remove.
7416 (fetch_altivec_register, store_altivec_register): Remove.
7417 (fetch_altivec_registers): Add regno parameter. Get regset using
7418 ppc_linux_vrregset. Use regset to supply registers.
7419 (store_altivec_registers): Add regno parameter. Get regset using
7420 ppc_linux_vrregset. Use regset to collect registers.
7421 (fetch_register): Call fetch_altivec_registers instead of
7422 fetch_altivec_register.
7423 (store_register): Call store_altivec_registers instead of
7424 store_altivec_register.
7425 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7426 the new regno parameter.
7427 (store_ppc_registers): Call store_altivec_registers with -1 for
7428 the new regno parameter.
7429
7430 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7431
7432 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7433 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7434 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7435 (gdb_vrregset_t): Change array type size to
7436 PPC_LINUX_SIZEOF_VRREGSET.
7437 (gdb_vsxregset_t): Change array type size to
7438 PPC_LINUX_SIZEOF_VSXREGSET.
7439 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7440 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7441 PPC_LINUX_SIZEOF_VSXREGSET.
7442
7443 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7444
7445 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7446 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7447 nat/ppc-linux.c.
7448 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7449 ppc_linux_target_wordsize with tid.
7450 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7451 wordsize with tid.
7452 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7453 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7454 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7455 tid parameter. Remove static specifier.
7456 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7457 (ppc_linux_target_wordsize): New declaration.
7458
7459 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7460
7461 * arch/ppc-linux-common.c: New file.
7462 * arch/ppc-linux-common.h: New file.
7463 * arch/ppc-linux-tdesc.h: New file.
7464 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7465 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7466 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7467 arch/ppc-linux-tdesc.h.
7468 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7469 arch/ppc-linux-tdesc.h.
7470 (ppc_linux_nat_target::read_description): Remove target
7471 description matching code. Fill a ppc_linux_features struct and
7472 call ppc_linux_match_description with it. Move comment about ISA
7473 2.05 to ppc-linux-common.c.
7474 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7475 arch/ppc-linux-tdesc.h.
7476 (ppc_linux_core_read_description): Remove target description
7477 matching code. Fill a ppc_linux_features struct and call
7478 ppc_linux_match_description with it.
7479 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7480 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7481 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7482 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7483 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7484 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7485 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7486 (tdesc_powerpc_e500l): Remove.
7487
7488 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7489
7490 * ada-lang.c (catch_assert_command): Pass empty string instead
7491 of NULL for excep_string argument.
7492
7493 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7494
7495 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7496 the width of the requested register exceeds the width of the
7497 `ptrace' data type.
7498
7499 2018-05-21 Tom Tromey <tom@tromey.com>
7500
7501 * printcmd.c (output_command): Remove.
7502 (output_command_const): Rename to output_command.
7503 * valprint.h (output_command): Rename from output_command_const.
7504 * tracepoint.c (trace_dump_actions): Call output_command.
7505
7506 2018-05-21 Tom Tromey <tom@tromey.com>
7507
7508 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7509 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7510 * ada-lang.h (create_ada_exception_catchpoint): Update.
7511 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7512 std::string.
7513 (create_excep_cond_exprs, ~ada_catchpoint)
7514 (should_stop_exception, print_one_exception)
7515 (print_mention_exception, print_recreate_exception): Update.
7516 (ada_get_next_arg): Remove.
7517 (catch_ada_exception_command_split): Use std::string. Change type
7518 of "excep_string", "cond_string".
7519 (catch_ada_exception_command): Update.
7520 (create_ada_exception_catchpoint): Change type of excep_string.
7521 (ada_exception_sal): Remove excep_string parameter.
7522 (~ada_catchpoint): Remove.
7523
7524 2018-05-21 Tom Tromey <tom@tromey.com>
7525
7526 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7527 cleanup.
7528
7529 2018-05-21 Tom Tromey <tom@tromey.com>
7530
7531 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7532 Return unique_xmalloc_ptr.
7533 (print_it_exception): Update.
7534
7535 2018-05-21 Tom Tromey <tom@tromey.com>
7536
7537 * tracepoint.c (trace_dump_actions): Use std::string.
7538
7539 2018-05-21 Tom Tromey <tom@tromey.com>
7540
7541 * symfile.c (reread_symbols): Use std::string for original_name.
7542
7543 2018-05-21 Tom Tromey <tom@tromey.com>
7544
7545 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7546 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7547 constructor.
7548
7549 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7550
7551 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7552 instance to...
7553 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7554 * objfiles.c (get_objfile_bfd_data): Allocate
7555 objfile_per_bfd_storage with obstack_new when allocating on
7556 obstack.
7557
7558 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7559
7560 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7561 OBSTACK_ZALLOC.
7562 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7563 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7564 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7565 (add_pending): Likewise.
7566 (parse_symbol): Likewise.
7567 (parse_partial_symbols): Likewise.
7568 (psymtab_to_symtab_1): Likewise.
7569 (new_psymtab): Likewise.
7570 (elfmdebug_build_psymtabs): Likewise.
7571 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7572 * objfiles.c (get_objfile_bfd_data): Likewise.
7573 (objfile_register_static_link): Likewise.
7574 * psymtab.c (allocate_psymtab): Likewise.
7575 * stabsread.c (read_member_functions): Likewise.
7576 * xcoffread.c (xcoff_end_psymtab): Likewise.
7577
7578 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7579
7580 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7581 compiler supports std::is_trivially_constructible.
7582 * common/poison.h: Include obstack.h.
7583 (IsMallocable): Define to is_trivially_constructible if the
7584 compiler supports it, define to true_type otherwise.
7585 (xobnew): New.
7586 (XOBNEW): Redefine.
7587 (xobnewvec): New.
7588 (XOBNEWVEC): Redefine.
7589 * gdb_obstack.h (obstack_zalloc): New.
7590 (OBSTACK_ZALLOC): Redefine.
7591 (obstack_calloc): New.
7592 (OBSTACK_CALLOC): Redefine.
7593 (obstack_new): New.
7594 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7595 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7596 gdbarch.c.
7597 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7598 obstack_calloc/obstack_zalloc.
7599 (gdbarch_obstack_zalloc): Remove.
7600 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7601
7602 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7603
7604 * stack.c (backtrace_command_1): Remove useless variable int i.
7605
7606 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7607
7608 * stack.c (print_frame_info): Fix comment.
7609
7610 2018-05-18 Tom Tromey <tom@tromey.com>
7611
7612 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7613 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7614 (~dwarf2_per_objfile): Update
7615 (dwarf2_get_dwz_file): Use new.
7616 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7617 unique_ptr.
7618
7619 2018-05-18 Tom Tromey <tom@tromey.com>
7620
7621 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7622 unique_ptr.
7623 * dwarf2read.c (struct dwp_file): Add constructor and
7624 initializers.
7625 (open_and_init_dwp_file): Return a unique_ptr.
7626 (dwarf2_per_objfile, create_dwp_hash_table)
7627 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7628 (lookup_dwo_unit_in_dwp): Update.
7629 (open_and_init_dwp_file, get_dwp_file): Update.
7630
7631 2018-05-18 Tom Tromey <tom@tromey.com>
7632
7633 * dwarf2read.c (dwarf2_per_objfile): Update.
7634 (struct mapped_index): Add initializers.
7635 (dwarf2_read_index): Use new.
7636 (dw2_symtab_iter_init): Update.
7637 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7638 unique_ptr.
7639
7640 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7641
7642 * dwarf2read.c (mapped_index) <total_size>: Remove.
7643
7644 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7645
7646 * unittests/format_pieces-selftests.c (test_format_specifier):
7647 Add ARI comments.
7648
7649 2018-05-18 Tom Tromey <tom@tromey.com>
7650
7651 * c-typeprint.c (maybe_print_hole): New function.
7652 (c_print_type_struct_field_offset): Update.
7653 (c_type_print_base_struct_union): Call maybe_print_hole.
7654
7655 2018-05-17 Keith Seitz <keiths@redhat.com>
7656
7657 * breakpoint.c (build_bpstat_chain): New function, moved from
7658 bpstat_stop_status.
7659 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7660 If no stop chain is passed, call build_bpstat_chain to build it.
7661 * breakpoint.h (build_bpstat_chain): Declare.
7662 (bpstat_stop_status): Move documentation here from breakpoint.c.
7663 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7664 build the stop chain and pass it to skip_inline_frames.
7665 Pass this stop chain to bpstat_stop_status.
7666 * inline-frame.c: Include breakpoint.h.
7667 (stopped_by_user_bp_inline_frame): New function.
7668 (skip_inline_frames): Add parameter `stop_chain'.
7669 Move documention to inline-frame.h.
7670 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7671 whether the frame should be elided.
7672 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7673 Add moved documentation and update for new parameter.
7674
7675 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7676
7677 PR cli/14975
7678 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7679 unittests/format_pieces-selftests.c.
7680 * common/format.h (format_piece) <operator==>: New.
7681 (format_pieces) <operator[]>: Remove.
7682 * common/format.c (format_pieces::format_pieces): Handle \e.
7683 * unittests/format_pieces-selftests.c: New.
7684
7685 2018-05-17 Tom Tromey <tom@tromey.com>
7686
7687 PR symtab/23010:
7688 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7689 (dw2_instantiate_symtab): Add skip_partial parameter.
7690 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7691 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7692 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7693 (dw2_expand_symtabs_matching_one)
7694 (dw2_find_pc_sect_compunit_symtab)
7695 (dw2_debug_names_lookup_symbol)
7696 (dw2_debug_names_expand_symtabs_for_function): Update.
7697 (init_cutu_and_read_dies): Add skip_partial parameter.
7698 (process_psymtab_comp_unit, build_type_psymtabs_1)
7699 (process_skeletonless_type_unit, load_partial_comp_unit)
7700 (psymtab_to_symtab_1): Update.
7701 (load_full_comp_unit): Add skip_partial parameter.
7702 (process_imported_unit_die, dwarf2_read_addr_index)
7703 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7704 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7705 (read_signatured_type): Update.
7706
7707 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7708
7709 * value.c (release_value): Remove unused variable.
7710 (record_latest_value): Likewise.
7711 (access_value_history): Likewise.
7712 (preserve_values): Likewise.
7713
7714 2018-05-17 Tom Tromey <tom@tromey.com>
7715
7716 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7717 Initialize.
7718
7719 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7720
7721 PR gdb/22286
7722 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7723 Also handle registers whose width is not a multiple of
7724 PTRACE_TYPE_RET.
7725 (linux_nat_trad_target::store_register): Likewise.
7726
7727 2018-05-16 Tom Tromey <tom@tromey.com>
7728
7729 * gdbcore.h (core_bfd): Redefine.
7730 * corelow.c (core_target::close): Update.
7731 (core_target_open): Update.
7732 * progspace.h (struct program_space) <cbfd>: Now a
7733 gdb_bfd_ref_ptr.
7734
7735 2018-05-16 Tom Tromey <tom@tromey.com>
7736
7737 PR cli/19551:
7738 * symfile-add-flags.h (enum symfile_add_flags)
7739 <SYMFILE_NOT_FILENAME>: New constant.
7740 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7741 objfile name from BFD.
7742 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7743 * minidebug.c (find_separate_debug_file_in_section): Put
7744 ".gnu_debugdata" into BFD's file name.
7745
7746 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7747
7748 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7749 Remove.
7750
7751 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7752
7753 PR binutils/21446
7754 * aarch64-tdep.c (aarch64_analyze_prologue,
7755 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7756 Indicate not interested in errors.
7757
7758 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7759
7760 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7761 Supply the MIPS_ZERO_REGNUM register.
7762
7763 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7764
7765 * mips-tdep.c (mask_address_var): Make variable static.
7766
7767 2018-05-14 Tom Tromey <tom@tromey.com>
7768
7769 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7770
7771 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7772
7773 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7774 FXSAVE_ADDR for the mxcsr register.
7775
7776 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7777
7778 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7779
7780 2018-05-11 Pedro Alves <palves@redhat.com>
7781
7782 * corelow.c (core_target) <core_target>: No longer inline.
7783 Initialize m_core_gdbarch, m_core_vec and build the section table
7784 here.
7785 <~core_target>: New.
7786 <core_gdbarch, get_core_register_section>: New methods.
7787 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7788 factored out from ...
7789 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7790 (core_ops): Delete.
7791 (sniff_core_bfd): Add gdbarch parameter.
7792 (core_close): Delete, merged into ...
7793 (core_target::close): ... here. Delete self.
7794 (core_close_cleanup): Delete.
7795 (core_target_open): Allocate a core_target on the heap. Use a
7796 unique_ptr instead of a cleanup. Bits moved into the core_target
7797 ctor. Adjust to use core_target methods instead of globals.
7798 (get_core_register_section): Rename to ...
7799 (core_target::get_core_register_section): ... this and adjust.
7800 (struct get_core_registers_cb_data): New.
7801 (get_core_registers_cb): Use it. Use bool.
7802 (core_target::fetch_registers, core_target::files_info)
7803 (core_target::xfer_partial, core_target::read_description)
7804 (core_target::pid_to, core_target::thread_name): Adjust to
7805 reference class fields instead of globals.
7806 * target.h (struct target_ops_deleter, target_ops_up): New.
7807
7808 2018-05-11 Pedro Alves <palves@redhat.com>
7809
7810 * corefile.c (core_file_command): Move to corelow.c.
7811 * corelow.c (the_core_target): Delete.
7812 (core_file_command): Moved from corefile.c. Check exec_bfd
7813 instead of the_core_target. Use target_detach instead of calling
7814 into the_core_target directly.
7815 (maybe_say_no_core_file_now): New.
7816 (core_target::detach): Use it.
7817 (_initialize_corelow): Remove references to the_core_target.
7818 * gdbcore.h (the_core_target): Delete.
7819
7820 2018-05-11 Tom Tromey <tromey@redhat.com>
7821 Pedro Alves <palves@redhat.com>
7822
7823 * corefile.c (core_bfd): Remove.
7824 * gdbcore.h (core_bfd): Now a macro.
7825 * progspace.h (struct program_space) <cbfd>: New field.
7826
7827 2018-05-11 Tom Tromey <tom@tromey.com>
7828
7829 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7830 gdb::def_vector.
7831
7832 2018-05-10 Tom Tromey <tom@tromey.com>
7833
7834 * configure: Rebuild.
7835 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7836
7837 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7838
7839 PR server/23158:
7840 * regformats/regdat.sh: Adjust script, following the addition
7841 of the new expedite_regs parameter to init_target_desc.
7842
7843 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7844
7845 PR gdb/23127
7846 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7847 set_gdbarch_significant_addr_bit.
7848 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7849 set_gdbarch_significant_addr_bit.
7850 * utils.c (address_significant): Update to sign extend addr.
7851
7852 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7853
7854 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7855 (xtensa_linux_init_abi): Limit tdep->num_regs by
7856 tdep->num_nopriv_regs.
7857 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7858 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7859 not initialized.
7860
7861 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7862
7863 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7864
7865 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7866
7867 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7868 (I387_MXCSR_INIT_VAL): New constant.
7869 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7870 buffer if it was supplied by the inferior.
7871 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7872 (i387_xsave_get_clear_bv): New function.
7873 (i387_supply_xsave): Only read x87 control registers from the
7874 xsave buffer if the feature is enabled, and the state will have
7875 been written, otherwise, provide a suitable default.
7876 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7877 including x87 control registers. Update control registers if they
7878 have changed from the default value, and mark features as enabled
7879 as required.
7880 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7881
7882 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7883
7884 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7885
7886 2018-05-07 Tom Tromey <tom@tromey.com>
7887
7888 * configure: Rebuild.
7889 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7890
7891 2018-05-07 Tom Tromey <tom@tromey.com>
7892
7893 PR tdep/20362:
7894 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7895 bit. Use correct value for VDIV.
7896
7897 2018-05-04 Tom Tromey <tom@tromey.com>
7898
7899 * configure: Rebuild.
7900 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7901
7902 2018-05-04 Tom Tromey <tom@tromey.com>
7903
7904 * linux-record.c (record_linux_system_call) <case
7905 RECORD_SYS_RECVFROM>: Add "break".
7906
7907 2018-05-04 Tom Tromey <tom@tromey.com>
7908
7909 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7910 Add missing "break".
7911 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7912 Add missing "break".
7913
7914 2018-05-04 Tom Tromey <tom@tromey.com>
7915
7916 * rs6000-tdep.c (ppc_process_record_op4)
7917 (ppc_process_record_op63): Add fall-through comment.
7918
7919 2018-05-04 Tom Tromey <tom@tromey.com>
7920
7921 * i386-tdep.c (i386_process_record): Add fall-through comment.
7922
7923 2018-05-04 Tom Tromey <tom@tromey.com>
7924
7925 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7926 comment.
7927
7928 2018-05-04 Tom Tromey <tom@tromey.com>
7929
7930 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7931 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7932 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7933 comment.
7934 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7935 comment.
7936 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7937 comment.
7938
7939 2018-05-04 Tom Tromey <tom@tromey.com>
7940
7941 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7942
7943 2018-05-04 Tom Tromey <tom@tromey.com>
7944
7945 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7946 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7947 * symfile.c (section_is_mapped): Fix fall-through comment.
7948 * stabsread.c (define_symbol, read_member_functions): Fix
7949 fall-through comment.
7950 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7951 comment.
7952 * remote.c (remote_wait_as): Fix fall-through comment.
7953 * p-exp.y (yylex): Fix fall-through comment.
7954 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7955 comment.
7956 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7957 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7958 * jv-exp.y (yylex): Fix fall-through comment.
7959 * go-exp.y (lex_one_token): Fix fall-through comment.
7960 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7961 fall-through comment.
7962 * f-exp.y (yylex): Fix fall-through comment.
7963 * dwarf2read.c (process_die): Fix fall-through comments.
7964 * dbxread.c (process_one_symbol): Fix fall-through comment.
7965 * d-exp.y (lex_one_token): Fix fall-through comment.
7966 * cp-name-parser.y (yylex): Fix fall-through comment.
7967 * coffread.c (coff_symtab_read): Fix fall-through comment.
7968 * c-exp.y (lex_one_token): Fix fall-through comment.
7969 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7970 comment.
7971 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7972 comment.
7973
7974 2018-05-04 Tom Tromey <tom@tromey.com>
7975
7976 PR python/22730:
7977 * NEWS: Mention gdb.execute change.
7978 * gdbcmd.h (execute_control_command): Don't declare.
7979 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7980 execute_control_commands, execute_control_commands_to_string.
7981 * cli/cli-script.h (execute_control_commands)
7982 (execute_control_commands_to_string): Declare.
7983 (execute_control_command): Add from_tty parameter.
7984 * cli/cli-script.c (execute_control_commands)
7985 (execute_control_commands_to_string): New functions.
7986 (execute_user_command): Use execute_control_commands.
7987 (execute_control_command_1): Add "from_tty" parameter. Update.
7988 (execute_control_command): Likewise.
7989
7990 2018-05-04 Tom Tromey <tom@tromey.com>
7991
7992 PR python/22731:
7993 * NEWS: Mention that breakpoint commands are writable.
7994 * python/py-breakpoint.c (bppy_set_commands): New function.
7995 (breakpoint_object_getset) <"commands">: Use it.
7996
7997 2018-05-04 Tom Tromey <tom@tromey.com>
7998
7999 * tracepoint.c (actions_command): Update.
8000 * mi/mi-cmd-break.c (mi_command_line_array)
8001 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8002 (mi_read_next_line): Remove.
8003 (mi_cmd_break_commands): Update.
8004 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8005 function_view.
8006 * cli/cli-script.c (get_command_line): Update.
8007 (process_next_line): Use function_view. Constify.
8008 (recurse_read_control_structure, read_command_lines)
8009 (read_command_lines_1): Change argument types to function_view.
8010 (do_define_command, document_command): Update.
8011 * breakpoint.h (check_tracepoint_command): Don't declare.
8012 * breakpoint.c (check_tracepoint_command): Remove.
8013 (commands_command_1, create_tracepoint_from_upload): Update.
8014
8015 2018-05-04 Tom Tromey <tom@tromey.com>
8016
8017 PR gdb/11750:
8018 * cli/cli-script.h (enum command_control_type) <define_control>:
8019 New constant.
8020 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8021 (build_command_line, execute_control_command_1)
8022 (process_next_line): Likewise.
8023 (do_define_command): New function, extracted from define_command.
8024 (define_command): Use it.
8025
8026 2018-05-04 Tom Tromey <tom@tromey.com>
8027
8028 * tracepoint.c (actions_command): Update.
8029 * cli/cli-script.h (read_command_lines): Update.
8030 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8031 (MAX_TMPBUF): Remove define.
8032 (define_command): Use string_printf.
8033 (document_command): Likewise.
8034 * breakpoint.c (commands_command_1): Update.
8035
8036 2018-05-04 Tom Tromey <tom@tromey.com>
8037
8038 * top.c (execute_command): Update.
8039 * cli/cli-script.h (print_command_lines): Now varargs.
8040 * cli/cli-script.c (print_command_lines): Now varargs.
8041 (execute_control_command_1) <case while_control, case if_control>:
8042 Update.
8043
8044 2018-05-04 Tom Tromey <tom@tromey.com>
8045
8046 * tracepoint.c (all_tracepoint_actions): Rename from
8047 all_tracepoint_actions_and_cleanup. Change return type.
8048 (actions_command, encode_actions_1, encode_actions)
8049 (trace_dump_actions, tdump_command): Update.
8050 * remote.c (remote_download_command_source): Update.
8051 * python/python.c (gdbpy_eval_from_control_command)
8052 (python_command, python_interactive_command): Update.
8053 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8054 * guile/guile.c (guile_command)
8055 (gdbscm_eval_from_control_command, guile_command): Update.
8056 * compile/compile.c (compile_code_command)
8057 (compile_print_command, compile_to_object): Update.
8058 * cli/cli-script.h (struct command_lines_deleter): New.
8059 (counted_command_line): New typedef.
8060 (struct command_line): Add constructor, destructor.
8061 <body_list>: Remove.
8062 <body_list_0, body_list_1>: New members.
8063 (command_line_up): Remove typedef.
8064 (read_command_lines, read_command_lines_1, get_command_line):
8065 Update.
8066 (copy_command_lines): Don't declare.
8067 * cli/cli-script.c (build_command_line): Use "new".
8068 (get_command_line): Return counted_command_line.
8069 (print_command_lines, execute_user_command)
8070 (execute_control_command_1, while_command, if_command): Update.
8071 (realloc_body_list): Remove.
8072 (process_next_line, recurse_read_control_structure): Update.
8073 (read_command_lines, read_command_lines_1): Return counted_command_line.
8074 (free_command_lines): Use "delete".
8075 (copy_command_lines): Remove.
8076 (define_command, document_command, show_user_1): Update.
8077 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8078 a counted_command_line.
8079 * breakpoint.h (counted_command_line): Remove typedef.
8080 (breakpoint_set_commands): Update.
8081 * breakpoint.c (check_no_tracepoint_commands)
8082 (validate_commands_for_breakpoint): Update.
8083 (breakpoint_set_commands): Change commands to be a
8084 counted_command_line.
8085 (commands_command_1, update_dprintf_command_list)
8086 (create_tracepoint_from_upload): Update.
8087
8088 2018-05-04 Tom Tromey <tom@tromey.com>
8089
8090 * cli/cli-decode.h (cmd_list_element): New constructor.
8091 (~cmd_list_element): New destructor.
8092 (struct cmd_list_element): Add initializers.
8093 * cli/cli-decode.c (do_add_cmd): Use "new".
8094 (delete_cmd): Use "delete".
8095
8096 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8097 Pedro Alves <palves@redhat.com>
8098
8099 PR breakpoints/19806 and support for PR external/20207.
8100 * NEWS: Mention Aarch64 watchpoint improvements.
8101 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8102 watchpoints and PR external/20207 watchpoints.
8103 * nat/aarch64-linux-hw-point.c
8104 (kernel_supports_any_contiguous_range): New.
8105 (aarch64_watchpoint_offset): New.
8106 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8107 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8108 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8109 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8110 next_addr_orig_p. Support PR external/20207 watchpoints.
8111 (aarch64_downgrade_regs): New.
8112 (aarch64_dr_state_insert_one_point): New parameters offset and
8113 addr_orig.
8114 (aarch64_dr_state_remove_one_point): Likewise.
8115 (aarch64_handle_breakpoint): Update caller.
8116 (aarch64_handle_aligned_watchpoint): Likewise.
8117 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8118 aligned_offset.
8119 (aarch64_linux_set_debug_regs): Remove const from state. Call
8120 aarch64_downgrade_regs.
8121 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8122 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8123 (DR_CONTROL_MASK): ... this.
8124 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8125 (unsigned int aarch64_watchpoint_offset): New prototype.
8126 (aarch64_linux_set_debug_regs): Remove const from state.
8127 * utils.c (align_up, align_down): Move to ...
8128 * common/common-utils.c (align_up, align_down): ... here.
8129 * utils.h (align_up, align_down): Move to ...
8130 * common/common-utils.h (align_up, align_down): ... here.
8131
8132 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8133
8134 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8135 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8136 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8137 Re-implement to match the ABI as summarized in GCC's
8138 gcc/config/sparc/sparc.c. All callers updated.
8139 (sparc32_store_arguments): Remove assertion.
8140
8141 2018-05-04 Tom Tromey <tom@tromey.com>
8142
8143 * printcmd.c: Don't include tui.h.
8144 (decode_format): Use skip_spaces.
8145
8146 2018-05-04 Tom Tromey <tom@tromey.com>
8147
8148 PR gdb/22619:
8149 * printcmd.c (last_count): New global.
8150 (x_command): Use saved count when repeating.
8151
8152 2018-05-04 Tom Tromey <tom@tromey.com>
8153
8154 * nto-procfs.c (do_closedir_cleanup): Remove.
8155 (procfs_pidlist): Use gdb_dir_up.
8156 * procfs.c (do_closedir_cleanup): Remove.
8157 (proc_update_threads): Use gdb_dir_up.
8158 * common/filestuff.h (struct gdb_dir_deleter): New.
8159 (gdb_dir_up): New typedef.
8160
8161 2018-05-04 Tom Tromey <tom@tromey.com>
8162
8163 * ada-lang.c (print_mention_exception): Use std::string.
8164
8165 2018-05-04 Tom Tromey <tom@tromey.com>
8166
8167 * ada-lang.c (create_excep_cond_exprs): Update.
8168 (ada_exception_catchpoint_cond_string): Use std::string.
8169
8170 2018-05-04 Tom Tromey <tom@tromey.com>
8171
8172 * ada-lang.c (xget_renaming_scope): Return std::string.
8173 (old_renaming_is_invisible): Update.
8174
8175 2018-05-04 Tom Tromey <tom@tromey.com>
8176
8177 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8178 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8179
8180 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8181
8182 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8183
8184 2018-05-04 Tom Tromey <tom@tromey.com>
8185
8186 * remote.c (remote_query_supported_append): Change type.
8187 (remote_check_symbols): Update.
8188
8189 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8190
8191 PR gdb/11420
8192 * configure.ac: Prepend libpython.
8193 * python/python-config.py: Likewise.
8194 * configure: Regenerate.
8195
8196 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8197
8198 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8199
8200 2018-05-03 Pedro Alves <palves@redhat.com>
8201
8202 * s390-linux-nat.c
8203 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8204 override. Write 'true' instead of '1'.
8205 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8206 declaration.
8207
8208 2018-05-02 Pedro Alves <palves@redhat.com>
8209
8210 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8211 add_inf_child_target.
8212 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8213 add_inf_child_target.
8214 * aix-thread.c (aix_thread_target_info): New.
8215 (aix_thread_target) <shortname, longname, doc>: Delete.
8216 <info>: New.
8217 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8218 add_inf_child_target.
8219 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8220 add_inf_child_target.
8221 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8222 add_inf_child_target.
8223 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8224 add_inf_child_target.
8225 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8226 add_inf_child_target.
8227 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8228 add_inf_child_target.
8229 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8230 add_inf_child_target.
8231 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8232 add_inf_child_target.
8233 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8234 add_inf_child_target.
8235 * bfd-target.c (target_bfd_target_info): New.
8236 (target_bfd) <shortname, longname, doc>: Delete.
8237 <info>: New.
8238 * bsd-kvm.c (bsd_kvm_target_info): New.
8239 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8240 <info>: New.
8241 (bsd_kvm_target::open): Rename to ...
8242 (bsd_kvm_target_open): ... this. Adjust.
8243 * bsd-uthread.c (bsd_uthread_target_info): New.
8244 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8245 <info>: New.
8246 * corefile.c (core_file_command): Adjust.
8247 * corelow.c (core_target_info): New.
8248 (core_target) <shortname, longname, doc>: Delete.
8249 <info>: New.
8250 (core_target::open): Rename to ...
8251 (core_target_open): ... this. Adjust.
8252 * ctf.c (ctf_target_info): New.
8253 (ctf_target) <shortname, longname, doc>: Delete.
8254 <info>: New.
8255 (ctf_target::open): Rename to ...
8256 (ctf_target_open): ... this.
8257 (_initialize_ctf): Adjust.
8258 * exec.c (exec_target_info): New.
8259 (exec_target) <shortname, longname, doc>: Delete.
8260 <info>: New.
8261 (exec_target::open): Rename to ...
8262 (exec_target_open): ... this.
8263 * gdbcore.h (core_target_open): Declare.
8264 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8265 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8266 add_inf_child_target.
8267 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8268 add_inf_child_target.
8269 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8270 add_inf_child_target.
8271 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8272 add_inf_child_target.
8273 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8274 add_inf_child_target.
8275 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8276 add_inf_child_target.
8277 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8278 add_inf_child_target.
8279 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8280 add_inf_child_target.
8281 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8282 add_inf_child_target.
8283 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8284 add_inf_child_target.
8285 * inf-child.c (inf_child_target_info): New.
8286 (inf_child_target::info): New.
8287 (inf_child_open_target): Remove 'target' parameter. Use
8288 get_native_target instead.
8289 (inf_child_target::open): Delete.
8290 (add_inf_child_target): New.
8291 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8292 Delete.
8293 <info>: New.
8294 (add_inf_child_target): Declare.
8295 (inf_child_open_target): Declare.
8296 * linux-thread-db.c (thread_db_target_info): New.
8297 (thread_db_target) <shortname, longname, doc>: Delete.
8298 <info>: New.
8299 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8300 add_inf_child_target.
8301 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8302 add_inf_child_target.
8303 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8304 add_inf_child_target.
8305 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8306 add_inf_child_target.
8307 * make-target-delegates (print_class): Adjust.
8308 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8309 add_inf_child_target.
8310 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8311 add_inf_child_target.
8312 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8313 add_inf_child_target.
8314 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8315 add_inf_child_target.
8316 * nto-procfs.c (nto_native_target_info): New.
8317 (nto_procfs_target_native) <shortname, longname, doc>:
8318 Delete.
8319 <info>: New.
8320 (nto_procfs_target_info): New.
8321 (nto_procfs_target_procfs) <shortname, longname, doc>:
8322 Delete.
8323 <info>: New.
8324 (init_procfs_targets): Adjust.
8325 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8326 add_inf_child_target.
8327 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8328 add_inf_child_target.
8329 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8330 add_inf_child_target.
8331 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8332 add_inf_child_target.
8333 * ravenscar-thread.c (ravenscar_target_info): New.
8334 (ravenscar_thread_target) <shortname, longname, doc>:
8335 Delete.
8336 <info>: New.
8337 * record-btrace.c (record_btrace_target_info):
8338 (record_btrace_target) <shortname, longname, doc>: Delete.
8339 <info>: New.
8340 (record_btrace_target::open): Rename to ...
8341 (record_btrace_target_open): ... this. Adjust.
8342 * record-full.c (record_longname, record_doc): New.
8343 (record_full_base_target) <shortname, longname, doc>: Delete.
8344 <info>: New.
8345 (record_full_target_info): New.
8346 (record_full_target): <shortname>: Delete.
8347 <info>: New.
8348 (record_full_core_open_1, record_full_open_1): Update comments.
8349 (record_full_base_target::open): Rename to ...
8350 (record_full_open): ... this.
8351 (cmd_record_full_restore): Update.
8352 (_initialize_record_full): Update.
8353 * remote-sim.c (remote_sim_target_info): New.
8354 (gdbsim_target) <shortname, longname, doc>: Delete.
8355 <info>: New.
8356 (gdbsim_target::open): Rename to ...
8357 (gdbsim_target_open): ... this.
8358 (_initialize_remote_sim): Adjust.
8359 * remote.c (remote_doc): New.
8360 (remote_target_info): New.
8361 (remote_target) <shortname, longname, doc>: Delete.
8362 <info>: New.
8363 (extended_remote_target_info): New.
8364 (extended_remote_target) <shortname, longname, doc>: Delete.
8365 <info>: New.
8366 (remote_target::open_1): Make static. Adjust.
8367 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8368 * s390-linux-nat.c (_initialize_s390_nat): Use
8369 add_inf_child_target.
8370 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8371 add_inf_child_target.
8372 * sol-thread.c (thread_db_target_info): New.
8373 (sol_thread_target) <shortname, longname, doc>: Delete.
8374 <info>: New.
8375 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8376 add_inf_child_target.
8377 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8378 add_inf_child_target.
8379 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8380 add_inf_child_target.
8381 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8382 add_inf_child_target.
8383 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8384 add_inf_child_target.
8385 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8386 add_inf_child_target.
8387 * spu-linux-nat.c (_initialize_spu_nat): Use
8388 add_inf_child_target.
8389 * spu-multiarch.c (spu_multiarch_target_info): New.
8390 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8391 <info>: New.
8392 * target-delegates.c: Regenerate.
8393 * target.c: Include <unordered_map>.
8394 (target_ops_p): Delete.
8395 (DEF_VEC_P(target_ops_p)): Delete.
8396 (target_factories): New.
8397 (test_target_info): New.
8398 (test_target_ops::info): New.
8399 (open_target): Adjust to use target_factories.
8400 (add_target_with_completer): Rename to ...
8401 (add_target): ... this. Change prototype. Register target_info
8402 and open callback in target_factories. Register target_info in
8403 command context instead of target_ops.
8404 (add_target): Delete old implementation.
8405 (add_deprecated_target_alias): Change prototype. Adjust.
8406 (the_native_target): New.
8407 (set_native_target, get_native_target): New.
8408 (find_default_run_target): Use the_native_target.
8409 (find_attach_target, find_run_target): Simplify.
8410 (target_ops::open): Delete.
8411 (dummy_target_info): New.
8412 (dummy_target::shortname, dummy_target::longname)
8413 (dummy_target::doc): Delete.
8414 (dummy_target::info): New.
8415 (debug_target::shortname, debug_target::longname)
8416 (debug_target::doc): Delete.
8417 (debug_target::info): New.
8418 * target.h (struct target_info): New.
8419 (target_ops::~target_ops): Add comment.
8420 (target_ops::info): New.
8421 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8422 longer virtual. Implement in terms of target_info.
8423 (set_native_target, get_native_target): Declare.
8424 (target_open_ftype): New.
8425 (add_target, add_target_with_completer)
8426 (add_deprecated_target_alias): Change prototype.
8427 (test_target) <shortname, longname, doc>: Delete.
8428 <info>: New.
8429 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8430 add_inf_child_target.
8431 * tracefile-tfile.c (tfile_target_info): New.
8432 (tfile_target) <shortname, longname, doc>: Delete.
8433 <info>: New.
8434 (tfile_target::open): Rename to ...
8435 (tfile_target_open): ... this.
8436 (_initialize_tracefile_tfile): Adjust.
8437 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8438 add_inf_child_target.
8439 * windows-nat.c (_initialize_windows_nat): Use
8440 add_inf_child_target.
8441 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8442 add_inf_child_target.
8443
8444 2018-05-02 Pedro Alves <palves@redhat.com>
8445
8446 * linux-nat.h (linux_nat_target) <low_new_thread,
8447 low_delete_thread, low_new_fork, low_forget_process,
8448 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8449 New virtual methods.
8450 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8451 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8452 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8453 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8454 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8455 Delete.
8456 * linux-fork.c (delete_fork): Adjust to call low method.
8457 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8458 (linux_nat_new_fork, linux_nat_forget_process_hook)
8459 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8460 (linux_nat_status_is_event):
8461 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8462 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8463 to call low method.
8464 (sigtrap_is_event): Rename to ...
8465 (linux_nat_target::low_status_is_event): ... this.
8466 (linux_nat_set_status_is_event): Delete.
8467 (save_stop_reason, linux_nat_wait_1)
8468 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8469 low methods.
8470 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8471 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8472 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8473 (linux_nat_set_prepare_to_resume): Delete.
8474 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8475 low virtual methods.
8476 * amd64-linux-nat.c: Likewise.
8477 * arm-linux-nat.c: Likewise.
8478 * i386-linux-nat.c: Likewise.
8479 * ia64-linux-nat.c: Likewise.
8480 * mips-linux-nat.c: Likewise.
8481 * ppc-linux-nat.c: Likewise.
8482 * s390-linux-nat.c: Likewise.
8483 * sparc64-linux-nat.c: Likewise.
8484 * x86-linux-nat.c: Likewise.
8485 * x86-linux-nat.h: Include "nat/x86-linux.h".
8486 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8487 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8488 Override methods.
8489
8490 2018-05-02 Pedro Alves <palves@redhat.com>
8491
8492 * target.h (target_ops)
8493 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8494 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8495 stopped_by_watchpoint, have_continuable_watchpoint,
8496 stopped_data_address, watchpoint_addr_within_range,
8497 can_accel_watchpoint_condition, can_run, thread_alive,
8498 has_all_memory, has_memory, has_stack, has_registers,
8499 has_execution, can_async_p, is_async_p, supports_non_stop,
8500 always_non_stop_p, can_execute_reverse, supports_multi_process,
8501 supports_enable_disable_tracepoint,
8502 supports_disable_randomization, supports_string_tracing,
8503 supports_evaluation_of_breakpoint_conditions,
8504 can_run_breakpoint_commands, filesystem_is_local,
8505 can_download_tracepoint, get_trace_state_variable_value,
8506 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8507 record_is_replaying, record_will_replay,
8508 augmented_libraries_svr4_read>: Adjust to return bool.
8509 * aarch64-linux-nat.c: All implementations adjusted.
8510 * aix-thread.c: All implementations adjusted.
8511 * arm-linux-nat.c: All implementations adjusted.
8512 * breakpoint.c: All implementations adjusted.
8513 * bsd-kvm.c: All implementations adjusted.
8514 * bsd-uthread.c: All implementations adjusted.
8515 * corelow.c: All implementations adjusted.
8516 * ctf.c: All implementations adjusted.
8517 * darwin-nat.c: All implementations adjusted.
8518 * darwin-nat.h: All implementations adjusted.
8519 * exec.c: All implementations adjusted.
8520 * fbsd-nat.c: All implementations adjusted.
8521 * fbsd-nat.h: All implementations adjusted.
8522 * gnu-nat.c: All implementations adjusted.
8523 * gnu-nat.h: All implementations adjusted.
8524 * go32-nat.c: All implementations adjusted.
8525 * ia64-linux-nat.c: All implementations adjusted.
8526 * inf-child.c: All implementations adjusted.
8527 * inf-child.h: All implementations adjusted.
8528 * inf-ptrace.c: All implementations adjusted.
8529 * inf-ptrace.h: All implementations adjusted.
8530 * linux-nat.c: All implementations adjusted.
8531 * linux-nat.h: All implementations adjusted.
8532 * mips-linux-nat.c: All implementations adjusted.
8533 * nto-procfs.c: All implementations adjusted.
8534 * ppc-linux-nat.c: All implementations adjusted.
8535 * procfs.c: All implementations adjusted.
8536 * ravenscar-thread.c: All implementations adjusted.
8537 * record-btrace.c: All implementations adjusted.
8538 * record-full.c: All implementations adjusted.
8539 * remote-sim.c: All implementations adjusted.
8540 * remote.c: All implementations adjusted.
8541 * s390-linux-nat.c: All implementations adjusted.
8542 * sol-thread.c: All implementations adjusted.
8543 * spu-multiarch.c: All implementations adjusted.
8544 * target-delegates.c: All implementations adjusted.
8545 * target.c: All implementations adjusted.
8546 * target.h: All implementations adjusted.
8547 * tracefile-tfile.c: All implementations adjusted.
8548 * tracefile.c: All implementations adjusted.
8549 * tracefile.h: All implementations adjusted.
8550 * windows-nat.c: All implementations adjusted.
8551 * x86-linux-nat.h: All implementations adjusted.
8552 * x86-nat.h: All implementations adjusted.
8553
8554 2018-05-02 Pedro Alves <palves@redhat.com>
8555
8556 * make-target-delegates (scan_target_h): Don't trim lines here.
8557 Replace sequences of tabs and/or whitespace with a single
8558 whitespace.
8559 (top level, parsing methods): Trim each line before processing it
8560 here.
8561
8562 2018-05-02 Pedro Alves <palves@redhat.com>
8563 John Baldwin <jhb@freebsd.org>
8564
8565 * target.h (enum strata) <debug_stratum>: New.
8566 (struct target_ops) <all delegation methods>: Replace by C++
8567 virtual methods, and drop "to_" prefix. All references updated
8568 throughout.
8569 <to_shortname, to_longname, to_doc, to_data,
8570 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8571 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8572 virtual methods. All references updated throughout.
8573 <can_attach, supports_terminal_ours, can_create_inferior,
8574 get_thread_control_capabilities, attach_no_wait>: New
8575 virtual methods.
8576 <insert_breakpoint, remove_breakpoint>: Now
8577 TARGET_DEFAULT_NORETURN methods.
8578 <info_proc>: Now returns bool.
8579 <to_magic>: Delete.
8580 (OPS_MAGIC): Delete.
8581 (current_target): Delete. All references replaced by references
8582 to ...
8583 (target_stack): ... this. New.
8584 (target_shortname, target_longname): Adjust.
8585 (target_can_run): Now a function declaration.
8586 (default_child_has_all_memory, default_child_has_memory)
8587 (default_child_has_stack, default_child_has_registers)
8588 (default_child_has_execution): Remove target_ops parameter.
8589 (complete_target_initialization): Delete.
8590 (memory_breakpoint_target): New template class.
8591 (test_target_ops): Refactor as a C++ class with virtual methods.
8592 * make-target-delegates (NAME_PART): Tighten.
8593 (POINTER_PART, CP_SYMBOL): New.
8594 (SIMPLE_RETURN_PART): Reimplement.
8595 (VEC_RETURN_PART): Expect less.
8596 (RETURN_PART, VIRTUAL_PART): New.
8597 (METHOD): Adjust to C++ virtual methods.
8598 (scan_target_h): Remove reference to C99.
8599 (dname): Output "target_ops::" prefix.
8600 (write_function_header): Adjust to output a C++ class method.
8601 (write_declaration): New.
8602 (write_delegator): Adjust to output a C++ class method.
8603 (tdname): Output "dummy_target::" prefix.
8604 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8605 method.
8606 (tdefault_names, debug_names): Delete.
8607 (return_types, tdefaults, styles, argtypes_array): New.
8608 (top level): All methods are delegators.
8609 (print_class): New.
8610 (top level): Print dummy_target and debug_target classes.
8611 * target-delegates.c: Regenerate.
8612 * target-debug.h (target_debug_print_enum_info_proc_what)
8613 (target_debug_print_thread_control_capabilities)
8614 (target_debug_print_thread_info_p): New.
8615 * target.c (dummy_target): Delete.
8616 (the_dummy_target, the_debug_target): New.
8617 (target_stack): Now extern.
8618 (set_targetdebug): Push/unpush debug target.
8619 (default_child_has_all_memory, default_child_has_memory)
8620 (default_child_has_stack, default_child_has_registers)
8621 (default_child_has_execution): Remove target_ops parameter.
8622 (complete_target_initialization): Delete.
8623 (add_target_with_completer): No longer call
8624 complete_target_initialization.
8625 (target_supports_terminal_ours): Use regular delegation.
8626 (update_current_target): Delete.
8627 (push_target): No longer check magic number. Don't call
8628 update_current_target.
8629 (unpush_target): Don't call update_current_target.
8630 (target_is_pushed): No longer check magic number.
8631 (target_require_runnable): Skip for all stratums over
8632 process_stratum.
8633 (target_ops::info_proc): New.
8634 (target_info_proc): Use find_target_at and
8635 find_default_run_target.
8636 (target_supports_disable_randomization): Use regular delegation.
8637 (target_get_osdata): Use find_target_at.
8638 (target_ops::open, target_ops::close, target_ops::can_attach)
8639 (target_ops::attach, target_ops::can_create_inferior)
8640 (target_ops::create_inferior, target_ops::can_run)
8641 (target_can_run): New.
8642 (default_fileio_target): Use regular delegation.
8643 (target_ops::fileio_open, target_ops::fileio_pwrite)
8644 (target_ops::fileio_pread, target_ops::fileio_fstat)
8645 (target_ops::fileio_close, target_ops::fileio_unlink)
8646 (target_ops::fileio_readlink): New.
8647 (target_fileio_open_1, target_fileio_unlink)
8648 (target_fileio_readlink): Always call the target method. Handle
8649 FILEIO_ENOSYS.
8650 (return_zero, return_zero_has_execution): Delete.
8651 (init_dummy_target): Delete.
8652 (dummy_target::dummy_target, dummy_target::shortname)
8653 (dummy_target::longname, dummy_target::doc)
8654 (debug_target::debug_target, debug_target::shortname)
8655 (debug_target::longname, debug_target::doc): New.
8656 (target_supports_delete_record): Use regular delegation.
8657 (setup_target_debug): Delete.
8658 (maintenance_print_target_stack): Skip debug_stratum.
8659 (initialize_targets): Instantiate the_dummy_target and
8660 the_debug_target.
8661 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8662 use target_stack.
8663 (target_auxv_search, fprint_target_auxv): Adjust.
8664 (info_auxv_command): Adjust to use target_stack.
8665 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8666 * exceptions.c (print_flush): Handle a NULL target_stack.
8667 * regcache.c (target_ops_no_register): Refactor as class with
8668 virtual methods.
8669
8670 * exec.c (exec_target): New class.
8671 (exec_ops): Now an exec_target.
8672 (exec_open, exec_close_1, exec_get_section_table)
8673 (exec_xfer_partial, exec_files_info, exec_has_memory)
8674 (exec_make_note_section): Refactor as exec_target methods.
8675 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8676 Delete.
8677 (exec_target::find_memory_regions): New.
8678 (_initialize_exec): Don't call init_exec_ops.
8679 * gdbcore.h (exec_file_clear): Delete.
8680
8681 * corefile.c (core_target): Delete.
8682 (core_file_command): Adjust.
8683 * corelow.c (core_target): New class.
8684 (the_core_target): New.
8685 (core_close): Remove target_ops parameter.
8686 (core_close_cleanup): Adjust.
8687 (core_target::close): New.
8688 (core_open, core_detach, get_core_registers, core_files_info)
8689 (core_xfer_partial, core_thread_alive, core_read_description)
8690 (core_pid_to_str, core_thread_name, core_has_memory)
8691 (core_has_stack, core_has_registers, core_info_proc): Rework as
8692 core_target methods.
8693 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8694 (_initialize_corelow): Initialize the_core_target.
8695 * gdbcore.h (core_target): Delete.
8696 (the_core_target): New.
8697
8698 * ctf.c: (ctf_target): New class.
8699 (ctf_ops): Now a ctf_target.
8700 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8701 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8702 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8703 methods.
8704 (init_ctf_ops): Delete.
8705 (_initialize_ctf): Don't call it.
8706 * tracefile-tfile.c (tfile_target): New class.
8707 (tfile_ops): Now a tfile_target.
8708 (tfile_open, tfile_close, tfile_files_info)
8709 (tfile_get_tracepoint_status, tfile_trace_find)
8710 (tfile_fetch_registers, tfile_xfer_partial)
8711 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8712 Refactor as tfile_target methods.
8713 (tfile_xfer_partial_features): Remove target_ops parameter.
8714 (init_tfile_ops): Delete.
8715 (_initialize_tracefile_tfile): Don't call it.
8716 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8717 (tracefile_has_stack, tracefile_has_registers)
8718 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8719 tracefile_target methods.
8720 (init_tracefile_ops): Delete.
8721 (tracefile_target::tracefile_target): New.
8722 * tracefile.h: Include "target.h".
8723 (tracefile_target): New class.
8724 (init_tracefile_ops): Delete.
8725
8726 * spu-multiarch.c (spu_multiarch_target): New class.
8727 (spu_ops): Now a spu_multiarch_target.
8728 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8729 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8730 (spu_search_memory, spu_mourn_inferior): Refactor as
8731 spu_multiarch_target methods.
8732 (init_spu_ops): Delete.
8733 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8734 complete_target_initialization.
8735
8736 * ravenscar-thread.c (ravenscar_thread_target): New class.
8737 (ravenscar_ops): Now a ravenscar_thread_target.
8738 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8739 (ravenscar_thread_alive, ravenscar_pid_to_str)
8740 (ravenscar_fetch_registers, ravenscar_store_registers)
8741 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8742 (ravenscar_stopped_by_hw_breakpoint)
8743 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8744 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8745 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8746 methods.
8747 (init_ravenscar_thread_ops): Delete.
8748 (_initialize_ravenscar): Remove references to
8749 init_ravenscar_thread_ops and complete_target_initialization.
8750
8751 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8752 (bsd_uthread_target): New class.
8753 (bsd_uthread_ops): Now a bsd_uthread_target.
8754 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8755 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8756 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8757 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8758 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8759 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8760 (bsd_uthread_target): Delete function.
8761 (_initialize_bsd_uthread): Remove reference to
8762 complete_target_initialization.
8763
8764 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8765 (target_bfd): ... this new class.
8766 (target_bfd_xfer_partial, target_bfd_get_section_table)
8767 (target_bfd_close): Refactor as target_bfd methods.
8768 (target_bfd::~target_bfd): New.
8769 (target_bfd_reopen): Adjust.
8770 (target_bfd::close): New.
8771
8772 * record-btrace.c (record_btrace_target): New class.
8773 (record_btrace_ops): Now a record_btrace_target.
8774 (record_btrace_open, record_btrace_stop_recording)
8775 (record_btrace_disconnect, record_btrace_close)
8776 (record_btrace_async, record_btrace_info)
8777 (record_btrace_insn_history, record_btrace_insn_history_range)
8778 (record_btrace_insn_history_from, record_btrace_call_history)
8779 (record_btrace_call_history_range)
8780 (record_btrace_call_history_from, record_btrace_record_method)
8781 (record_btrace_is_replaying, record_btrace_will_replay)
8782 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8783 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8784 (record_btrace_store_registers, record_btrace_prepare_to_store)
8785 (record_btrace_to_get_unwinder)
8786 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8787 (record_btrace_commit_resume, record_btrace_wait)
8788 (record_btrace_stop, record_btrace_can_execute_reverse)
8789 (record_btrace_stopped_by_sw_breakpoint)
8790 (record_btrace_supports_stopped_by_sw_breakpoint)
8791 (record_btrace_stopped_by_hw_breakpoint)
8792 (record_btrace_supports_stopped_by_hw_breakpoint)
8793 (record_btrace_update_thread_list, record_btrace_thread_alive)
8794 (record_btrace_goto_begin, record_btrace_goto_end)
8795 (record_btrace_goto, record_btrace_stop_replaying_all)
8796 (record_btrace_execution_direction)
8797 (record_btrace_prepare_to_generate_core)
8798 (record_btrace_done_generating_core): Refactor as
8799 record_btrace_target methods.
8800 (init_record_btrace_ops): Delete.
8801 (_initialize_record_btrace): Remove reference to
8802 init_record_btrace_ops.
8803 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8804 the execution_direction global.
8805 (record_full_base_target, record_full_target)
8806 (record_full_core_target): New classes.
8807 (record_full_ops): Now a record_full_target.
8808 (record_full_core_ops): Now a record_full_core_target.
8809 (record_full_target::detach, record_full_target::disconnect)
8810 (record_full_core_target::disconnect)
8811 (record_full_target::mourn_inferior, record_full_target::kill):
8812 New.
8813 (record_full_open, record_full_close, record_full_async): Refactor
8814 as methods of the record_full_base_target class.
8815 (record_full_resume, record_full_commit_resume): Refactor
8816 as methods of the record_full_target class.
8817 (record_full_wait, record_full_stopped_by_watchpoint)
8818 (record_full_stopped_data_address)
8819 (record_full_stopped_by_sw_breakpoint)
8820 (record_full_supports_stopped_by_sw_breakpoint)
8821 (record_full_stopped_by_hw_breakpoint)
8822 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8823 methods of the record_full_base_target class.
8824 (record_full_store_registers, record_full_xfer_partial)
8825 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8826 Refactor as methods of the record_full_target class.
8827 (record_full_can_execute_reverse, record_full_get_bookmark)
8828 (record_full_goto_bookmark, record_full_execution_direction)
8829 (record_full_record_method, record_full_info, record_full_delete)
8830 (record_full_is_replaying, record_full_will_replay)
8831 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8832 (record_full_stop_replaying): Refactor as methods of the
8833 record_full_base_target class.
8834 (record_full_core_resume, record_full_core_kill)
8835 (record_full_core_fetch_registers)
8836 (record_full_core_prepare_to_store)
8837 (record_full_core_store_registers, record_full_core_xfer_partial)
8838 (record_full_core_insert_breakpoint)
8839 (record_full_core_remove_breakpoint)
8840 (record_full_core_has_execution): Refactor
8841 as methods of the record_full_core_target class.
8842 (record_full_base_target::supports_delete_record): New.
8843 (init_record_full_ops): Delete.
8844 (init_record_full_core_ops): Delete.
8845 (record_full_save): Refactor as method of the
8846 record_full_base_target class.
8847 (_initialize_record_full): Remove references to
8848 init_record_full_ops and init_record_full_core_ops.
8849
8850 * remote.c (remote_target, extended_remote_target): New classes.
8851 (remote_ops): Now a remote_target.
8852 (extended_remote_ops): Now an extended_remote_target.
8853 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8854 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8855 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8856 (remote_pass_signals, remote_set_syscall_catchpoint)
8857 (remote_program_signals, )
8858 (remote_thread_always_alive): Remove target_ops parameter.
8859 (remote_thread_alive, remote_thread_name)
8860 (remote_update_thread_list, remote_threads_extra_info)
8861 (remote_static_tracepoint_marker_at)
8862 (remote_static_tracepoint_markers_by_strid)
8863 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8864 (remote_open): Refactor as methods of remote_target.
8865 (extended_remote_open, extended_remote_detach)
8866 (extended_remote_attach, extended_remote_post_attach):
8867 (extended_remote_supports_disable_randomization)
8868 (extended_remote_create_inferior): : Refactor as method of
8869 extended_remote_target.
8870 (remote_set_permissions, remote_open_1, remote_detach)
8871 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8872 (remote_resume, remote_commit_resume, remote_stop)
8873 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8874 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8875 (remote_prepare_to_store, remote_store_registers)
8876 (remote_flash_erase, remote_flash_done, remote_files_info)
8877 (remote_kill, remote_mourn, remote_insert_breakpoint)
8878 (remote_remove_breakpoint, remote_insert_watchpoint)
8879 (remote_watchpoint_addr_within_range)
8880 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8881 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8882 (remote_supports_stopped_by_sw_breakpoint)
8883 (remote_stopped_by_hw_breakpoint)
8884 (remote_supports_stopped_by_hw_breakpoint)
8885 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8886 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8887 (remote_verify_memory): Refactor as methods of remote_target.
8888 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8889 parameter.
8890 (remote_xfer_partial, remote_get_memory_xfer_limit)
8891 (remote_search_memory, remote_rcmd, remote_memory_map)
8892 (remote_pid_to_str, remote_get_thread_local_address)
8893 (remote_get_tib_address, remote_read_description): Refactor as
8894 methods of remote_target.
8895 (remote_target::fileio_open, remote_target::fileio_pwrite)
8896 (remote_target::fileio_pread, remote_target::fileio_close): New.
8897 (remote_hostio_readlink, remote_hostio_fstat)
8898 (remote_filesystem_is_local, remote_can_execute_reverse)
8899 (remote_supports_non_stop, remote_supports_disable_randomization)
8900 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8901 (remote_supports_enable_disable_tracepoint)
8902 (remote_supports_string_tracing)
8903 (remote_can_run_breakpoint_commands, remote_trace_init)
8904 (remote_download_tracepoint, remote_can_download_tracepoint)
8905 (remote_download_trace_state_variable, remote_enable_tracepoint)
8906 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8907 (remote_trace_start, remote_get_trace_status)
8908 (remote_get_tracepoint_status, remote_trace_stop)
8909 (remote_trace_find, remote_get_trace_state_variable_value)
8910 (remote_save_trace_data, remote_get_raw_trace_data)
8911 (remote_set_disconnected_tracing, remote_core_of_thread)
8912 (remote_set_circular_trace_buffer, remote_traceframe_info)
8913 (remote_get_min_fast_tracepoint_insn_len)
8914 (remote_set_trace_buffer_size, remote_set_trace_notes)
8915 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8916 (remote_disable_btrace, remote_teardown_btrace)
8917 (remote_read_btrace, remote_btrace_conf)
8918 (remote_augmented_libraries_svr4_read, remote_load)
8919 (remote_pid_to_exec_file, remote_can_do_single_step)
8920 (remote_execution_direction, remote_thread_handle_to_thread_info):
8921 Refactor as methods of remote_target.
8922 (init_remote_ops, init_extended_remote_ops): Delete.
8923 (remote_can_async_p, remote_is_async_p, remote_async)
8924 (remote_thread_events, remote_upload_tracepoints)
8925 (remote_upload_trace_state_variables): Refactor as methods of
8926 remote_target.
8927 (_initialize_remote): Remove references to init_remote_ops and
8928 init_extended_remote_ops.
8929
8930 * remote-sim.c (gdbsim_target): New class.
8931 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8932 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8933 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8934 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8935 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8936 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8937 Refactor as methods of gdbsim_target.
8938 (gdbsim_ops): Now a gdbsim_target.
8939 (init_gdbsim_ops): Delete.
8940 (gdbsim_cntrl_c): Adjust.
8941 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8942
8943 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8944 (the_amd64_linux_nat_target): New.
8945 (amd64_linux_fetch_inferior_registers)
8946 (amd64_linux_store_inferior_registers): Refactor as methods of
8947 amd64_linux_nat_target.
8948 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8949 * i386-linux-nat.c: Don't include "linux-nat.h".
8950 (i386_linux_nat_target): New class.
8951 (the_i386_linux_nat_target): New.
8952 (i386_linux_fetch_inferior_registers)
8953 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8954 as methods of i386_linux_nat_target.
8955 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8956 * inf-child.c (inf_child_ops): Delete.
8957 (inf_child_fetch_inferior_registers)
8958 (inf_child_store_inferior_registers): Delete.
8959 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8960 methods of inf_child_target.
8961 (inf_child_target::supports_terminal_ours)
8962 (inf_child_target::terminal_init)
8963 (inf_child_target::terminal_inferior)
8964 (inf_child_target::terminal_ours_for_output)
8965 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8966 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8967 New.
8968 (inf_child_open, inf_child_disconnect, inf_child_close)
8969 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8970 (inf_child_post_startup_inferior, inf_child_can_run)
8971 (inf_child_pid_to_exec_file): Refactor as methods of
8972 inf_child_target.
8973 (inf_child_follow_fork): Delete.
8974 (inf_child_target::can_create_inferior)
8975 (inf_child_target::can_attach): New.
8976 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8977 (inf_child_target::has_stack, inf_child_target::has_registers)
8978 (inf_child_target::has_execution): New.
8979 (inf_child_fileio_open, inf_child_fileio_pwrite)
8980 (inf_child_fileio_pread, inf_child_fileio_fstat)
8981 (inf_child_fileio_close, inf_child_fileio_unlink)
8982 (inf_child_fileio_readlink, inf_child_use_agent)
8983 (inf_child_can_use_agent): Refactor as methods of
8984 inf_child_target.
8985 (return_zero, inf_child_target): Delete.
8986 (inf_child_target::inf_child_target): New.
8987 * inf-child.h: Include "target.h".
8988 (inf_child_target): Delete function prototype.
8989 (inf_child_target): New class.
8990 (inf_child_open_target, inf_child_mourn_inferior)
8991 (inf_child_maybe_unpush_target): Delete.
8992 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8993 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8994 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8995 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8996 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8997 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8998 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8999 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9000 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9001 methods of inf_ptrace_target.
9002 (inf_ptrace_target): Delete function.
9003 * inf-ptrace.h: Include "inf-child.h".
9004 (inf_ptrace_target): Delete function declaration.
9005 (inf_ptrace_target): New class.
9006 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9007 * linux-nat.c (linux_target): New.
9008 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9009 (linux_nat_target::~linux_nat_target): New.
9010 (linux_child_post_attach, linux_child_post_startup_inferior)
9011 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9012 (linux_child_remove_fork_catchpoint)
9013 (linux_child_insert_vfork_catchpoint)
9014 (linux_child_remove_vfork_catchpoint)
9015 (linux_child_insert_exec_catchpoint)
9016 (linux_child_remove_exec_catchpoint)
9017 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9018 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9019 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9020 (linux_nat_stopped_data_address)
9021 (linux_nat_stopped_by_sw_breakpoint)
9022 (linux_nat_supports_stopped_by_sw_breakpoint)
9023 (linux_nat_stopped_by_hw_breakpoint)
9024 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9025 (linux_nat_kill, linux_nat_mourn_inferior)
9026 (linux_nat_xfer_partial, linux_nat_thread_alive)
9027 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9028 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9029 (linux_child_static_tracepoint_markers_by_strid)
9030 (linux_nat_is_async_p, linux_nat_can_async_p)
9031 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9032 (linux_nat_supports_multi_process)
9033 (linux_nat_supports_disable_randomization, linux_nat_async)
9034 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9035 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9036 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9037 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9038 methods of linux_nat_target.
9039 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9040 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9041 parameter.
9042 (check_stopped_by_watchpoint): Adjust.
9043 (linux_xfer_partial): Delete.
9044 (linux_target_install_ops, linux_target, linux_nat_add_target):
9045 Delete.
9046 (linux_nat_target::linux_nat_target): New.
9047 * linux-nat.h: Include "inf-ptrace.h".
9048 (linux_nat_target): New.
9049 (linux_target, linux_target_install_ops, linux_nat_add_target):
9050 Delete function declarations.
9051 (linux_target): Declare global.
9052 * linux-thread-db.c (thread_db_target): New.
9053 (thread_db_target::thread_db_target): New.
9054 (thread_db_ops): Delete.
9055 (the_thread_db_target): New.
9056 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9057 (thread_db_update_thread_list, thread_db_pid_to_str)
9058 (thread_db_extra_thread_info)
9059 (thread_db_thread_handle_to_thread_info)
9060 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9061 (thread_db_resume): Refactor as methods of thread_db_target.
9062 (init_thread_db_ops): Delete.
9063 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9064 * x86-linux-nat.c: Don't include "linux-nat.h".
9065 (super_post_startup_inferior): Delete.
9066 (x86_linux_nat_target::~x86_linux_nat_target): New.
9067 (x86_linux_child_post_startup_inferior)
9068 (x86_linux_read_description, x86_linux_enable_btrace)
9069 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9070 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9071 methods of x86_linux_nat_target.
9072 (x86_linux_create_target): Delete. Bits folded ...
9073 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9074 pointer.
9075 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9076 (x86_linux_nat_target): New class.
9077 (x86_linux_create_target): Delete.
9078 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9079 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9080 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9081 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9082 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9083 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9084 make extern.
9085 (x86_use_watchpoints): Delete.
9086 * x86-nat.h: Include "breakpoint.h" and "target.h".
9087 (x86_use_watchpoints): Delete.
9088 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9089 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9090 (x86_insert_watchpoint, x86_remove_watchpoint)
9091 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9092 (x86_stopped_by_hw_breakpoint): New declarations.
9093 (x86_nat_target): New template class.
9094
9095 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9096 (the_ppc_linux_nat_target): New.
9097 (ppc_linux_fetch_inferior_registers)
9098 (ppc_linux_can_use_hw_breakpoint)
9099 (ppc_linux_region_ok_for_hw_watchpoint)
9100 (ppc_linux_ranged_break_num_registers)
9101 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9102 (ppc_linux_insert_mask_watchpoint)
9103 (ppc_linux_remove_mask_watchpoint)
9104 (ppc_linux_can_accel_watchpoint_condition)
9105 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9106 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9107 (ppc_linux_watchpoint_addr_within_range)
9108 (ppc_linux_masked_watch_num_registers)
9109 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9110 (ppc_linux_read_description): Refactor as methods of
9111 ppc_linux_nat_target.
9112 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9113
9114 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9115 (procfs_target): New class.
9116 (the_procfs_target): New.
9117 (procfs_target): Delete function.
9118 (procfs_auxv_parse, procfs_attach, procfs_detach)
9119 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9120 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9121 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9122 (procfs_create_inferior, procfs_update_thread_list)
9123 (procfs_thread_alive, procfs_pid_to_str)
9124 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9125 (procfs_stopped_data_address, procfs_insert_watchpoint)
9126 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9127 (proc_find_memory_regions, procfs_info_proc)
9128 (procfs_make_note_section): Refactor as methods of procfs_target.
9129 (_initialize_procfs): Adjust.
9130 * sol-thread.c (sol_thread_target): New class.
9131 (sol_thread_ops): Now a sol_thread_target.
9132 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9133 (sol_thread_fetch_registers, sol_thread_store_registers)
9134 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9135 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9136 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9137 (init_sol_thread_ops): Delete.
9138 (_initialize_sol_thread): Adjust. Remove references to
9139 init_sol_thread_ops and complete_target_initialization.
9140
9141 * windows-nat.c (windows_nat_target): New class.
9142 (windows_fetch_inferior_registers)
9143 (windows_store_inferior_registers, windows_resume, windows_wait)
9144 (windows_attach, windows_detach, windows_pid_to_exec_file)
9145 (windows_files_info, windows_create_inferior)
9146 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9147 (windows_close, windows_pid_to_str, windows_xfer_partial)
9148 (windows_get_tib_address, windows_get_ada_task_ptid)
9149 (windows_thread_name, windows_thread_alive): Refactor as
9150 windows_nat_target methods.
9151 (do_initial_windows_stuff): Adjust.
9152 (windows_target): Delete function.
9153 (_initialize_windows_nat): Adjust.
9154
9155 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9156 (darwin_mourn_inferior, darwin_kill_inferior)
9157 (darwin_create_inferior, darwin_attach, darwin_detach)
9158 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9159 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9160 (darwin_supports_multi_process): Refactor as darwin_nat_target
9161 methods.
9162 (darwin_resume_to, darwin_files_info): Delete.
9163 (_initialize_darwin_inferior): Rename to ...
9164 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9165 * darwin-nat.h: Include "inf-child.h".
9166 (darwin_nat_target): New class.
9167 (darwin_complete_target): Delete.
9168 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9169 (darwin_target): New.
9170 (i386_darwin_fetch_inferior_registers)
9171 (i386_darwin_store_inferior_registers): Refactor as methods of
9172 darwin_nat_target.
9173 (darwin_complete_target): Delete, with ...
9174 (_initialize_i386_darwin_nat): ... bits factored out here.
9175
9176 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9177 (the_alpha_linux_nat_target): New.
9178 (alpha_linux_register_u_offset): Refactor as
9179 alpha_linux_nat_target method.
9180 (_initialize_alpha_linux_nat): Adjust.
9181 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9182 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9183 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9184 methods of linux_nat_trad_target.
9185 (linux_trad_target): Delete.
9186 * linux-nat-trad.h (linux_trad_target): Delete function.
9187 (linux_nat_trad_target): New class.
9188 * mips-linux-nat.c (mips_linux_nat_target): New class.
9189 (super_fetch_registers, super_store_registers, super_close):
9190 Delete.
9191 (the_mips_linux_nat_target): New.
9192 (mips64_linux_regsets_fetch_registers)
9193 (mips64_linux_regsets_store_registers)
9194 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9195 (mips_linux_register_u_offset, mips_linux_read_description)
9196 (mips_linux_can_use_hw_breakpoint)
9197 (mips_linux_stopped_by_watchpoint)
9198 (mips_linux_stopped_data_address)
9199 (mips_linux_region_ok_for_hw_watchpoint)
9200 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9201 (mips_linux_close): Refactor as methods of mips_linux_nat.
9202 (_initialize_mips_linux_nat): Adjust to C++ification.
9203
9204 * aix-thread.c (aix_thread_target): New class.
9205 (aix_thread_ops): Now an aix_thread_target.
9206 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9207 (aix_thread_fetch_registers, aix_thread_store_registers)
9208 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9209 (aix_thread_thread_alive, aix_thread_pid_to_str)
9210 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9211 Refactor as methods of aix_thread_target.
9212 (init_aix_thread_ops): Delete.
9213 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9214 and complete_target_initialization.
9215 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9216 (rs6000_nat_target): New class.
9217 (the_rs6000_nat_target): New.
9218 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9219 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9220 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9221 (super_create_inferior): Delete.
9222 (_initialize_rs6000_nat): Adjust to C++ification.
9223
9224 * arm-linux-nat.c (arm_linux_nat_target): New class.
9225 (the_arm_linux_nat_target): New.
9226 (arm_linux_fetch_inferior_registers)
9227 (arm_linux_store_inferior_registers, arm_linux_read_description)
9228 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9229 (arm_linux_remove_hw_breakpoint)
9230 (arm_linux_region_ok_for_hw_watchpoint)
9231 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9232 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9233 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9234 arm_linux_nat_target.
9235 (_initialize_arm_linux_nat): Adjust to C++ification.
9236
9237 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9238 (the_aarch64_linux_nat_target): New.
9239 (aarch64_linux_fetch_inferior_registers)
9240 (aarch64_linux_store_inferior_registers)
9241 (aarch64_linux_child_post_startup_inferior)
9242 (aarch64_linux_read_description)
9243 (aarch64_linux_can_use_hw_breakpoint)
9244 (aarch64_linux_insert_hw_breakpoint)
9245 (aarch64_linux_remove_hw_breakpoint)
9246 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9247 (aarch64_linux_region_ok_for_hw_watchpoint)
9248 (aarch64_linux_stopped_data_address)
9249 (aarch64_linux_stopped_by_watchpoint)
9250 (aarch64_linux_watchpoint_addr_within_range)
9251 (aarch64_linux_can_do_single_step): Refactor as methods of
9252 aarch64_linux_nat_target.
9253 (super_post_startup_inferior): Delete.
9254 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9255
9256 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9257 (the_hppa_linux_nat_target): New.
9258 (hppa_linux_fetch_inferior_registers)
9259 (hppa_linux_store_inferior_registers): Refactor as methods of
9260 hppa_linux_nat_target.
9261 (_initialize_hppa_linux_nat): Adjust to C++ification.
9262
9263 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9264 (the_ia64_linux_nat_target): New.
9265 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9266 (ia64_linux_stopped_data_address)
9267 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9268 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9269 ia64_linux_nat_target methods.
9270 (super_xfer_partial): Delete.
9271 (_initialize_ia64_linux_nat): Adjust to C++ification.
9272
9273 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9274 (the_m32r_linux_nat_target): New.
9275 (m32r_linux_fetch_inferior_registers)
9276 (m32r_linux_store_inferior_registers): Refactor as
9277 m32r_linux_nat_target methods.
9278 (_initialize_m32r_linux_nat): Adjust to C++ification.
9279
9280 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9281 (the_m68k_linux_nat_target): New.
9282 (m68k_linux_fetch_inferior_registers)
9283 (m68k_linux_store_inferior_registers): Refactor as
9284 m68k_linux_nat_target methods.
9285 (_initialize_m68k_linux_nat): Adjust to C++ification.
9286
9287 * s390-linux-nat.c (s390_linux_nat_target): New class.
9288 (the_s390_linux_nat_target): New.
9289 (s390_linux_fetch_inferior_registers)
9290 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9291 (s390_insert_watchpoint, s390_remove_watchpoint)
9292 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9293 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9294 (s390_auxv_parse, s390_read_description): Refactor as methods of
9295 s390_linux_nat_target.
9296 (_initialize_s390_nat): Adjust to C++ification.
9297
9298 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9299 (the_sparc_linux_nat_target): New.
9300 (_initialize_sparc_linux_nat): Adjust to C++ification.
9301 * sparc-nat.c (sparc_fetch_inferior_registers)
9302 (sparc_store_inferior_registers): Remove target_ops parameter.
9303 * sparc-nat.h (sparc_fetch_inferior_registers)
9304 (sparc_store_inferior_registers): Remove target_ops parameter.
9305 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9306 (the_sparc64_linux_nat_target): New.
9307 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9308
9309 * spu-linux-nat.c (spu_linux_nat_target): New class.
9310 (the_spu_linux_nat_target): New.
9311 (spu_child_post_startup_inferior, spu_child_post_attach)
9312 (spu_child_wait, spu_fetch_inferior_registers)
9313 (spu_store_inferior_registers, spu_xfer_partial)
9314 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9315 methods.
9316 (_initialize_spu_nat): Adjust to C++ification.
9317
9318 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9319 (the_tilegx_linux_nat_target): New.
9320 (fetch_inferior_registers, store_inferior_registers):
9321 Refactor as methods.
9322 (_initialize_tile_linux_nat): Adjust to C++ification.
9323
9324 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9325 (the_xtensa_linux_nat_target): New.
9326 (xtensa_linux_fetch_inferior_registers)
9327 (xtensa_linux_store_inferior_registers): Refactor as
9328 xtensa_linux_nat_target methods.
9329 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9330
9331 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9332 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9333 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9334 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9335 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9336 (fbsd_stopped_by_sw_breakpoint)
9337 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9338 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9339 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9340 (fbsd_post_startup_inferior, fbsd_post_attach)
9341 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9342 (fbsd_set_syscall_catchpoint)
9343 (super_xfer_partial, super_resume, super_wait)
9344 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9345 (fbsd_handle_debug_trap): Remove target_ops parameter.
9346 (fbsd_nat_add_target): Delete.
9347 * fbsd-nat.h: Include "inf-ptrace.h".
9348 (fbsd_nat_add_target): Delete.
9349 (USE_SIGTRAP_SIGINFO): Define.
9350 (fbsd_nat_target): New class.
9351
9352 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9353 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9354 (amd64bsd_target): Delete.
9355 * amd64-bsd-nat.h: New file.
9356 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9357 "x86-bsd-nat.h".
9358 (amd64_fbsd_nat_target): New class.
9359 (the_amd64_fbsd_nat_target): New.
9360 (amd64fbsd_read_description): Refactor as method of
9361 amd64_fbsd_nat_target.
9362 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9363 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9364 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9365 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9366 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9367 (i386bsd_target): Delete.
9368 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9369 (i386bsd_fetch_inferior_registers)
9370 (i386bsd_store_inferior_registers): Declare.
9371 (i386_bsd_nat_target): New class.
9372 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9373 (the_i386_fbsd_nat_target): New.
9374 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9375 i386_fbsd_nat_target methods.
9376 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9377 (_initialize_i386fbsd_nat): Adjust to C++ification.
9378 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9379 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9380 (_initialize_x86_bsd_nat): Adjust to C++ification.
9381 * x86-bsd-nat.h: Include "x86-nat.h".
9382 (x86bsd_target): Delete declaration.
9383 (x86bsd_nat_target): New class.
9384
9385 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9386 (the_aarch64_fbsd_nat_target): New.
9387 (aarch64_fbsd_fetch_inferior_registers)
9388 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9389 aarch64_fbsd_nat_target.
9390 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9391 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9392 (the_alpha_bsd_nat_target): New.
9393 (alphabsd_fetch_inferior_registers)
9394 (alphabsd_store_inferior_registers): Refactor as
9395 alpha_bsd_nat_target methods.
9396 (_initialize_alphabsd_nat): Refactor as methods of
9397 alpha_bsd_nat_target.
9398 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9399 (the_amd64_nbsd_nat_target): New.
9400 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9401 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9402 (the_amd64_obsd_nat_target): New.
9403 (_initialize_amd64obsd_nat): Adjust to C++ification.
9404 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9405 (the_arm_fbsd_nat_target): New.
9406 (arm_fbsd_fetch_inferior_registers)
9407 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9408 (_initialize_arm_fbsd_nat): Refactor as methods of
9409 arm_fbsd_nat_target.
9410 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9411 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9412 (the_arm_netbsd_nat_target): New.
9413 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9414 arm_netbsd_nat_target.
9415 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9416 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9417 (the_hppa_nbsd_nat_target): New.
9418 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9419 hppa_nbsd_nat_target methods.
9420 (_initialize_hppanbsd_nat): Adjust to C++ification.
9421 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9422 (the_hppa_obsd_nat_target): New.
9423 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9424 methods of hppa_obsd_nat_target.
9425 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9426 add_target.
9427 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9428 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9429 add_target.
9430 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9431 (_initialize_i386obsd_nat): Use add_target.
9432 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9433 (the_m68k_bsd_nat_target): New.
9434 (m68kbsd_fetch_inferior_registers)
9435 (m68kbsd_store_inferior_registers): Refactor as methods of
9436 m68k_bsd_nat_target.
9437 (_initialize_m68kbsd_nat): Adjust to C++ification.
9438 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9439 (the_mips_fbsd_nat_target): New.
9440 (mips_fbsd_fetch_inferior_registers)
9441 (mips_fbsd_store_inferior_registers): Refactor as methods of
9442 mips_fbsd_nat_target.
9443 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9444 add_target.
9445 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9446 (the_mips_nbsd_nat_target): New.
9447 (mipsnbsd_fetch_inferior_registers)
9448 (mipsnbsd_store_inferior_registers): Refactor as methods of
9449 mips_nbsd_nat_target.
9450 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9451 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9452 (the_mips64_obsd_nat_target): New.
9453 (mips64obsd_fetch_inferior_registers)
9454 (mips64obsd_store_inferior_registers): Refactor as methods of
9455 mips64_obsd_nat_target.
9456 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9457 add_target.
9458 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9459 nbsd_nat_target.
9460 * nbsd-nat.h: Include "inf-ptrace.h".
9461 (nbsd_nat_target): New class.
9462 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9463 (obsd_wait): Refactor as methods of obsd_nat_target.
9464 (obsd_add_target): Delete.
9465 * obsd-nat.h: Include "inf-ptrace.h".
9466 (obsd_nat_target): New class.
9467 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9468 (the_ppc_fbsd_nat_target): New.
9469 (ppcfbsd_fetch_inferior_registers)
9470 (ppcfbsd_store_inferior_registers): Refactor as methods of
9471 ppc_fbsd_nat_target.
9472 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9473 add_target.
9474 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9475 (the_ppc_nbsd_nat_target): New.
9476 (ppcnbsd_fetch_inferior_registers)
9477 (ppcnbsd_store_inferior_registers): Refactor as methods of
9478 ppc_nbsd_nat_target.
9479 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9480 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9481 (the_ppc_obsd_nat_target): New.
9482 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9483 methods of ppc_obsd_nat_target.
9484 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9485 add_target.
9486 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9487 (the_sh_nbsd_nat_target): New.
9488 (shnbsd_fetch_inferior_registers)
9489 (shnbsd_store_inferior_registers): Refactor as methods of
9490 sh_nbsd_nat_target.
9491 (_initialize_shnbsd_nat): Adjust to C++ification.
9492 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9493 (inf_ptrace_xfer_partial): Delete.
9494 (sparc_xfer_partial, sparc_target): Delete.
9495 * sparc-nat.h (sparc_fetch_inferior_registers)
9496 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9497 (sparc_target): Delete function declaration.
9498 (sparc_target): New template class.
9499 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9500 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9501 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9502 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9503 add_target.
9504 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9505 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9506 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9507 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9508 add_target.
9509 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9510 (the_vax_bsd_nat_target): New.
9511 (vaxbsd_fetch_inferior_registers)
9512 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9513 methods.
9514 (_initialize_vaxbsd_nat): Adjust to C++ification.
9515
9516 * bsd-kvm.c (bsd_kvm_target): New class.
9517 (bsd_kvm_ops): Now a bsd_kvm_target.
9518 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9519 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9520 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9521 bsd_kvm_target.
9522 (bsd_kvm_return_one): Delete.
9523 (bsd_kvm_add_target): Adjust to C++ification.
9524
9525 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9526 (nto_procfs_target_procfs): New classes.
9527 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9528 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9529 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9530 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9531 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9532 (procfs_remove_hw_breakpoint, procfs_resume)
9533 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9534 (procfs_kill_inferior, procfs_store_registers)
9535 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9536 as methods of nto_procfs_target.
9537 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9538 (nto_native_ops): Delete.
9539 (procfs_open, procfs_native_open): Delete.
9540 (nto_native_ops): Now an nto_procfs_target_native.
9541 (init_procfs_targets): Adjust to C++ification.
9542 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9543 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9544 Refactor as methods of nto_procfs_target.
9545
9546 * go32-nat.c (go32_nat_target): New class.
9547 (the_go32_nat_target): New.
9548 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9549 (go32_store_registers, go32_xfer_partial, go32_files_info)
9550 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9551 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9552 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9553 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9554 (go32_target): Delete.
9555 (_initialize_go32_nat): Adjust to C++ification.
9556
9557 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9558 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9559 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9560 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9561 gnu_nat_target.
9562 (gnu_target): Delete.
9563 * gnu-nat.h (gnu_target): Delete.
9564 (gnu_nat_target): New class.
9565 * i386-gnu-nat.c (gnu_base_target): New.
9566 (i386_gnu_nat_target): New class.
9567 (the_i386_gnu_nat_target): New.
9568 (_initialize_i386gnu_nat): Adjust to C++ification.
9569
9570 2018-05-02 Pedro Alves <palves@redhat.com>
9571
9572 * bfd-target.c (target_bfd_xclose): Rename to ...
9573 (target_bfd_close): ... this.
9574 (target_bfd_reopen): Adjust.
9575 * target.c (target_close): Remove references to to_xclose.
9576 * target.h (target_ops::to_xclose): Delete.
9577 (target_ops::to_close): Update comments.
9578
9579 2018-05-02 Pedro Alves <palves@redhat.com>
9580
9581 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9582 "linux-nat.h".
9583 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9584 * inf-ptrace.c (inf_ptrace_register_u_offset)
9585 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9586 (inf_ptrace_store_register, inf_ptrace_store_registers)
9587 (inf_ptrace_trad_target): Move to ...
9588 * linux-nat-trad.c: ... this new file.
9589 * linux-nat-trad.h: New file.
9590 * linux-nat.c (linux_target_install_ops): Make extern.
9591 (linux_trad_target): Delete.
9592 * linux-nat.h (linux_trad_target): Delete declaration.
9593 (linux_target_install_ops): Declare.
9594 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9595 "linux-nat.h".
9596
9597 2018-05-02 Pedro Alves <palves@redhat.com>
9598
9599 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9600 procfs_target/add_target here.
9601 * procfs.c (procfs_target): Make static.
9602 (_initialize_procfs): Call add_target here.
9603 * procfs.h (struct target_ops): Remove forward declaration.
9604 (procfs_target): Remove declaration.
9605 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9606
9607 2018-05-02 Pedro Alves <palves@redhat.com>
9608
9609 * procfs.c (procfs_stopped_by_watchpoint)
9610 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9611 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9612 Forward declare.
9613 (procfs_use_watchpoints): Delete, move contents...
9614 (procfs_target): ... here.
9615 * procfs.h (procfs_use_watchpoints): Delete declaration.
9616 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9617 procfs_use_watchpoints.
9618 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9619 procfs_use_watchpoints.
9620
9621 2018-05-02 Tom Tromey <tom@tromey.com>
9622
9623 PR python/20084:
9624 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9625 and var_zuinteger_unlimited.
9626 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9627 and PARAM_ZUINTEGER_UNLIMITED.
9628 (set_parameter_value): Handle var_zuinteger and
9629 var_zuinteger_unlimited.
9630 (add_setshow_generic): Likewise.
9631 (parmpy_init): Likewise.
9632
9633 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9634
9635 PR rust/23124
9636 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9637 pointer is not null before dereferencing it.
9638
9639 2018-04-30 Tom Tromey <tom@tromey.com>
9640
9641 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9642 is_mi_like_p.
9643
9644 2018-04-30 Tom Tromey <tom@tromey.com>
9645
9646 * breakpoint.c (mention): Remove use of is_mi_like_p.
9647 (print_mention_ranged_breakpoint): Likewise.
9648 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9649 of is_mi_like_p.
9650
9651 2018-04-30 Tom Tromey <tom@tromey.com>
9652
9653 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9654
9655 2018-04-30 Tom Tromey <tom@tromey.com>
9656
9657 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9658 (info_spu_event_command): Remove some uses of is_mi_like_p.
9659
9660 2018-04-30 Tom Tromey <tom@tromey.com>
9661
9662 * python/py-framefilter.c (py_print_single_arg)
9663 (enumerate_locals, py_print_args, py_print_frame): Remove some
9664 uses of is_mi_like_p.
9665
9666 2018-04-30 Tom Tromey <tom@tromey.com>
9667
9668 * ui-out.c: Update.
9669 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9670 * ui-out.h (ui_out::is_mi_like_p): Now const.
9671 (ui_out::do_is_mi_like_p): Now const.
9672 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9673
9674 2018-04-30 Tom Tromey <tom@tromey.com>
9675
9676 * varobj.c (varobj_set_visualizer): Use new_reference.
9677 * python/python.c (gdbpy_decode_line): Use new_reference.
9678 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9679 new_reference.
9680
9681 2018-04-30 Tom Tromey <tom@tromey.com>
9682
9683 * varobj.c (install_new_value): Use new_reference.
9684 * value.h (value_incref): Return void. Swap intro comment with
9685 value_decref.
9686 * value.c (set_value_parent): Use new_reference.
9687 (value_incref): Return void. Update intro comment.
9688 (release_value): Use new_reference.
9689 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9690
9691 2018-04-30 Tom Tromey <tom@tromey.com>
9692
9693 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9694 * gdb_bfd.h (new_bfd_ref): Remove.
9695 (gdb_bfd_open): Update comment.
9696 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9697 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9698 (gdb_bfd_fdopenr): Use new_reference.
9699 * exec.c (exec_file_attach): Use new_reference.
9700
9701 2018-04-30 Tom Tromey <tom@tromey.com>
9702
9703 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9704 method.
9705
9706 2018-04-30 Tom Tromey <tom@tromey.com>
9707
9708 * jit.c (jit_read_code_entry): Use type_align.
9709 * i386-tdep.c (i386_gdbarch_init): Don't call
9710 set_gdbarch_long_long_align_bit.
9711 * gdbarch.sh: Remove long_long_align_bit.
9712 * gdbarch.c, gdbarch.h: Rebuild.
9713 * arc-tdep.c (arc_type_align): New function.
9714 (arc_gdbarch_init): Use arc_type_align. Don't call
9715 set_gdbarch_long_long_align_bit.
9716
9717 2018-04-30 Tom Tromey <tom@tromey.com>
9718
9719 * rust-lang.c (rust_type_alignment): Remove.
9720 (rust_composite_type): Use type_align.
9721
9722 2018-04-30 Tom Tromey <tom@tromey.com>
9723
9724 * NEWS: Mention Type.align.
9725 * python/py-type.c (typy_get_alignof): New function.
9726 (type_object_getset): Add "alignof".
9727
9728 2018-04-30 Tom Tromey <tom@tromey.com>
9729
9730 PR exp/17095:
9731 * NEWS: Update.
9732 * std-operator.def (UNOP_ALIGNOF): New operator.
9733 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9734 New.
9735 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9736 * c-lang.c (c_op_print_tab): Add alignof.
9737 * c-exp.y (ALIGNOF): New token.
9738 (exp): Add "ALIGNOF" production.
9739 (ident_tokens): Add _Alignof and alignof.
9740
9741 2018-04-30 Tom Tromey <tom@tromey.com>
9742
9743 * i386-tdep.c (i386_type_align): New function.
9744 (i386_gdbarch_init): Update.
9745 * gdbarch.sh (type_align): New method.
9746 * gdbarch.c, gdbarch.h: Rebuild.
9747 * arch-utils.h (default_type_align): Declare.
9748 * arch-utils.c (default_type_align): New function.
9749 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9750 (struct type) <align_log2>: New field.
9751 <instance_flags>: Now a bitfield.
9752 (TYPE_RAW_ALIGN): New macro.
9753 (type_align, type_raw_align, set_type_align): Declare.
9754 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9755 functions.
9756 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9757 (get_alignment, maybe_set_alignment): New functions.
9758 (read_structure_type, read_enumeration_type, read_array_type)
9759 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9760 (read_subrange_type, read_base_type): Set type alignment.
9761
9762 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9763
9764 * dwarf2read.c (read_index_from_section): Use bool.
9765
9766 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9767
9768 PR gdb/22950
9769 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9770 with #ifdef.
9771
9772 2018-04-29 John Reiser <jreiser@BitWagon.com>
9773
9774 PR build/22873
9775 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9776 last step, and do it atomically.
9777
9778 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9779
9780 * compile/compile-c-types.c (convert_int, convert_float):
9781 Update for C FE v1.
9782
9783 2018-04-27 Tom Tromey <tom@tromey.com>
9784
9785 PR rust/22545:
9786 * rust-lang.c (rust_inclusive_range_type_p): New function.
9787 (rust_range): Handle inclusive ranges.
9788 (rust_compute_range): Likewise.
9789 * rust-exp.y (struct rust_op) <inclusive>: New field.
9790 (DOTDOTEQ): New constant.
9791 (range_expr): Add "..=" productions.
9792 (operator_tokens): Add "..=" token.
9793 (ast_range): Add "inclusive" parameter.
9794 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9795 ranges.
9796 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9797 bounds values.
9798 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9799 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9800 Update comments.
9801 * expprint.c (print_subexp_standard): Handle new bounds values.
9802 (dump_subexp_body_standard): Likewise.
9803
9804 2018-04-27 Tom Tromey <tom@tromey.com>
9805
9806 * configure: Rebuild.
9807 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9808 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9809 "OVERRIDE".
9810 (class symbol_needs_eval_context): Likewise.
9811 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9812 (mock_mapped_index::symbol_name_at): Use "override". Remove
9813 "virtual".
9814 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9815 "override".
9816 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9817 * aarch64-tdep.c (instruction_reader::read): Use "override".
9818 (instruction_reader_test::read): Likewise.
9819 * arm-tdep.c (instruction_reader::read): Use "override".
9820 (instruction_reader_thumb::read): Likewise.
9821
9822 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9823
9824 PR remote/9665
9825 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9826 instead of remote_send.
9827 (remote_send): Remove.
9828
9829 2018-04-26 Pedro Alves <palves@redhat.com>
9830
9831 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9832 find_function_start_sal instead of find_pc_line.
9833
9834 2018-04-26 Pedro Alves <palves@redhat.com>
9835
9836 * breakpoint.c (set_breakpoint_location_function): Handle
9837 mst_data_gnu_ifunc.
9838 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9839 * elfread.c (elf_symtab_read): Give data symbols with
9840 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9841 (elf_rel_plt_read): Update comment.
9842 * linespec.c (convert_linespec_to_sals): Handle
9843 mst_data_gnu_ifunc.
9844 (minsym_found): Handle mst_data_gnu_ifunc.
9845 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9846 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9847 * parse.c (find_minsym_type_and_address): Handle
9848 mst_data_gnu_ifunc.
9849 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9850 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9851 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9852 comment.
9853 <mst_data_gnu_ifunc>: New enumerator.
9854
9855 2018-04-26 Pedro Alves <palves@redhat.com>
9856
9857 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9858 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9859 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9860 Handle it.
9861 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9862 (lookup_minimal_symbol_by_pc): Adjust.
9863 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9864 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9865 * minsyms.h (lookup_msym_prefer): New enum.
9866 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9867 parameter by a lookup_msym_prefer parameter.
9868
9869 2018-04-26 Pedro Alves <palves@redhat.com>
9870
9871 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9872 ends in "@plt" instead of looking at the symbol's section.
9873
9874 2018-04-26 Pedro Alves <palves@redhat.com>
9875
9876 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9877 all references.
9878 (find_pc_partial_function_gnu_ifunc): Rename to ...
9879 (find_pc_partial_function): ... this, and remove references to
9880 'is_gnu_ifunc_p'.
9881 (find_pc_partial_function): Delete old implementation.
9882 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9883
9884 2018-04-26 Pedro Alves <palves@redhat.com>
9885
9886 * linespec.c (struct bound_minimal_symbol_search_key): New.
9887 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9888 skip first line if we found a GNU ifunc minimal symbol by name.
9889 (compare_msymbols): Change parameters to work with a destructured
9890 lhs minsym.
9891 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9892 functions.
9893
9894 2018-04-26 Pedro Alves <palves@redhat.com>
9895
9896 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9897 ifunc targets here. Instead, if we have an ifunc minsym, use its
9898 address/name.
9899 (add_location_to_breakpoint): Store the minsym and the objfile in
9900 the breakpoint location.
9901 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9902 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9903 Record the minsym in the sal.
9904 * symtab.h (symtab_and_line) <msymbol>: New field.
9905
9906 2018-04-26 Pedro Alves <palves@redhat.com>
9907
9908 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9909 unless we actually resolved the ifunc.
9910
9911 2018-04-26 Pedro Alves <palves@redhat.com>
9912
9913 * c-exp.y (variable production): Prefer ifunc minsyms over
9914 regular function symbols.
9915 * symtab.c (find_gnu_ifunc): New function.
9916 * minsyms.h (lookup_msym_prefer): New enum.
9917 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9918 parameter by a lookup_msym_prefer parameter.
9919 * symtab.h (find_gnu_ifunc): New declaration.
9920
9921 2018-04-26 Pedro Alves <palves@redhat.com>
9922
9923 * blockframe.c (find_gnu_ifunc_target_type): New function.
9924 (find_function_type): New.
9925 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9926 return a value with a memory address.
9927 (eval_call): For calls to GNU ifunc functions, try to find the
9928 type of the target function from the type that the resolver
9929 returns.
9930 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9931 symbols.
9932 * infcall.c (find_function_return_type): Delete.
9933 (find_function_addr): Add 'function_type' parameter. For calls to
9934 GNU ifunc functions, try to find the type of the target function
9935 from the type that the resolver returns, and return it via
9936 FUNCTION_TYPE.
9937 (call_function_by_hand_dummy): Adjust to use the function type
9938 returned by find_function_addr.
9939 (find_function_addr): Add 'function_type' parameter and move
9940 description here.
9941 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9942 declarations.
9943
9944 2018-04-26 Pedro Alves <palves@redhat.com>
9945
9946 * c-exp.y (variable production): Skip finding an alias for ifunc
9947 symbols.
9948
9949 2018-04-26 Pedro Alves <palves@redhat.com>
9950
9951 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9952
9953 2018-04-25 Pedro Alves <palves@redhat.com>
9954
9955 * infcmd.c (kill_command): Print the pid as string, not the whole
9956 thread's ptid. Add comment. s/has been killed/killed/ in output
9957 message.
9958 * remote.c (remote_detach_1): Print the pid as string, not the
9959 whole thread's ptid.
9960
9961 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9962 Sergio Durigan Junior <sergiodj@redhat.com>
9963 Pedro Alves <palves@redhat.com>
9964
9965 * infcmd.c (kill_command): Print message when inferior has
9966 been killed.
9967 * inferior.c (print_inferior_events): Remove 'static'. Set as
9968 '1'.
9969 (add_inferior): Improve message printed when
9970 'print_inferior_events' is on.
9971 (exit_inferior): Remove message printed when
9972 'print_inferior_events' is on.
9973 (detach_inferior): Improve message printed when
9974 'print_inferior_events' is on.
9975 (initialize_inferiors): Use 'add_inferior_silent' to set
9976 'current_inferior_'.
9977 * inferior.h (print_inferior_events): Declare here as
9978 'extern'.
9979 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9980 '[Detaching...]' messages when 'print_inferior_events' is on.
9981 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9982 as prefix/suffix for messages. Remove periods. Fix erroneous
9983 'Detaching after fork from child...', replace it by '... from
9984 parent...'.
9985 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9986 prefix/suffix when printing 'Detaching...' messages. Print
9987 them when 'print_inferior_events' is on.
9988 * remote.c (remote_detach_1): Print message when detaching
9989 from inferior and '!is_fork_parent'.
9990
9991 2018-04-24 Tom Tromey <tom@tromey.com>
9992
9993 * cli-out.h: Reindent.
9994
9995 2018-04-24 Tom Tromey <tom@tromey.com>
9996
9997 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9998 (cli_ui_out::do_field_string): Use fputs_filtered.
9999 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10000
10001 2018-04-23 Tom Tromey <tom@tromey.com>
10002
10003 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10004 gdb::unique_xmalloc_ptr.
10005
10006 2018-04-23 Tom Tromey <tom@tromey.com>
10007
10008 * configure: Rebuild.
10009
10010 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10011
10012 PR gdb/23095
10013 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10014 prepare_for_testing. Set normal_bp to r_debug_state if target
10015 is bsd.
10016
10017 2018-04-21 Pedro Alves <palves@redhat.com>
10018 Rajendra SY <rajendra.sy@gmail.com>
10019
10020 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10021 * remote.c (extended_remote_attach): In all-stop mode, mark the
10022 thread as executing.
10023
10024 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10025
10026 * thread.c (thread_apply_all_command): Fix comment.
10027 (thread_command): Fix comment.
10028
10029 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10030
10031 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10032 parameter.
10033 * features/aarch64-core.c (create_feature_aarch64_core):
10034 Regenerate.
10035 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10036 Likewise.
10037 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10038 Likewise.
10039 * features/i386/32bit-avx512.c
10040 (create_feature_i386_32bit_avx512): Likewise.
10041 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10042 Likewise.
10043 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10044 Likewise.
10045 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10046 Likewise.
10047 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10048 Likewise.
10049 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10050 Likewise.
10051 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10052 Likewise.
10053 * features/i386/64bit-avx512.c
10054 (create_feature_i386_64bit_avx512): Likewise.
10055 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10056 Likewise.
10057 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10058 Likewise.
10059 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10060 Likewise.
10061 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10062 Likewise.
10063 * features/i386/64bit-segments.c
10064 (create_feature_i386_64bit_segments): Likewise.
10065 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10066 Likewise.
10067 * features/i386/x32-core.c
10068 (create_feature_i386_x32_core): Likewise.
10069 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10070 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10071 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10072 * target-descriptions.c: In generated code, don't pass xml
10073 filename.
10074
10075 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10076
10077 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10078 (print_xml_feature::visit_post): Likewise.
10079 (print_xml_feature::visit): Likewise.
10080 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10081 (print_xml_feature): Add new class.
10082 * regformats/regdat.sh: Null xmltarget on feature targets.
10083 * target-descriptions.c (struct target_desc): Add xmltarget.
10084 (maintenance_check_tdesc_xml_convert): Add unittest function.
10085 (tdesc_get_features_xml): Add function to get xml.
10086 (maintenance_check_xml_descriptions): Test xml generation.
10087 * xml-tdesc.c (string_read_description_xml): Add function.
10088 * xml-tdesc.h (string_read_description_xml): Add declaration.
10089
10090 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10091
10092 * features/Makefile: Add feature marker to targets with new style
10093 target descriptions.
10094 * regformats/aarch64.dat: Regenerate.
10095 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10096 * regformats/i386/amd64-avx-linux.dat: Likewise.
10097 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10098 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10099 * regformats/i386/amd64-linux.dat: Likewise.
10100 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10101 * regformats/i386/amd64.dat: Likewise.
10102 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10103 * regformats/i386/i386-avx-linux.dat: Likewise.
10104 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10105 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10106 * regformats/i386/i386-linux.dat: Likewise.
10107 * regformats/i386/i386-mmx-linux.dat: Likewise.
10108 * regformats/i386/i386-mpx-linux.dat: Likewise.
10109 * regformats/i386/i386.dat: Likewise.
10110 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10111 * regformats/i386/x32-avx-linux.dat: Likewise.
10112 * regformats/i386/x32-linux.dat: Likewise.
10113 * regformats/tic6x-c62x-linux.dat: Likewise.
10114 * regformats/tic6x-c64x-linux.dat: Likewise.
10115 * regformats/tic6x-c64xp-linux.dat: Likewise.
10116 * regformats/regdat.sh: Parse feature marker.
10117
10118 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10119
10120 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10121 (tdesc_osabi_name): Likewise.
10122 * target-descriptions.c (tdesc_architecture_name): Add new
10123 function.
10124 (tdesc_osabi_name): Likewise.
10125
10126 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10127
10128 * common/tdesc.c (tdesc_predefined_type): Move to here.
10129 (tdesc_named_type): Likewise.
10130 (tdesc_create_vector): Likewise.
10131 (tdesc_create_struct): Likewise.
10132 (tdesc_set_struct_size): Likewise.
10133 (tdesc_create_union): Likewise.
10134 (tdesc_create_flags): Likewise.
10135 (tdesc_create_enum): Likewise.
10136 (tdesc_add_field): Likewise.
10137 (tdesc_add_typed_bitfield): Likewise.
10138 (tdesc_add_bitfield): Likewise.
10139 (tdesc_add_flag): Likewise.
10140 (tdesc_add_enum_value): Likewise.
10141 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10142 (struct tdesc_type_vector): Likewise.
10143 (struct tdesc_type_field): Likewise.
10144 (struct tdesc_type_with_fields): Likewise.
10145 (tdesc_create_enum): Add declaration.
10146 (tdesc_add_typed_bitfield): Likewise.
10147 (tdesc_add_enum_value): Likewise.
10148 * target-descriptions.c (tdesc_type_field): Move from here.
10149 (tdesc_type_builtin): Likewise.
10150 (tdesc_type_vector): Likewise.
10151 (tdesc_type_with_fields): Likewise.
10152 (tdesc_predefined_types): Likewise.
10153 (tdesc_named_type): Likewise.
10154 (tdesc_create_vector): Likewise.
10155 (tdesc_create_struct): Likewise.
10156 (tdesc_set_struct_size): Likewise.
10157 (tdesc_create_union): Likewise.
10158 (tdesc_create_flags): Likewise.
10159 (tdesc_create_enum): Likewise.
10160 (tdesc_add_field): Likewise.
10161 (tdesc_add_typed_bitfield): Likewise.
10162 (tdesc_add_bitfield): Likewise.
10163 (tdesc_add_flag): Likewise.
10164 (tdesc_add_enum_value): Likewise.
10165 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10166 (tdesc_add_typed_bitfield): Likewise.
10167 (tdesc_add_enum_value): Likewise.
10168
10169 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10170
10171 * common/tdesc.c (tdesc_feature::accept): Move to here.
10172 (tdesc_feature::operator==): Likewise.
10173 (tdesc_create_reg): Likewise.
10174 * common/tdesc.h (tdesc_type_kind): Likewise.
10175 (struct tdesc_type): Likewise.
10176 (struct tdesc_feature): Likewise.
10177 * regformats/regdat.sh: Create a feature.
10178 * target-descriptions.c (tdesc_type_kind): Move from here.
10179 (tdesc_type): Likewise.
10180 (tdesc_type_up): Likewise.
10181 (tdesc_feature): Likewise.
10182 (tdesc_create_reg): Likewise.
10183
10184 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10185
10186 * Makefile.in: Add arch/tdesc.c
10187 * common/tdesc.c: New file.
10188 * common/tdesc.h (tdesc_element_visitor): Move to here.
10189 (tdesc_element): Likewise.
10190 (tdesc_reg): Likewise.
10191 (tdesc_reg_up): Likewise.
10192 * regformats/regdef.h (reg): Add offset to constructors.
10193 * target-descriptions.c (tdesc_element_visitor): Move from here.
10194 (tdesc_element): Likewise.
10195 (tdesc_reg): Likewise.
10196 (tdesc_reg_up): Likewise.
10197
10198 2018-04-17 Tom Tromey <tom@tromey.com>
10199
10200 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10201 discriminant field.
10202
10203 2018-04-17 Tom Tromey <tom@tromey.com>
10204
10205 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10206
10207 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10208
10209 * symtab.c (print_symbol_info): Skip printing filename and line
10210 number when `last' is NULL.
10211 (symtab_symbol_info): Use empty string instead of NULL for first
10212 invocation of print_symbol_info.
10213 (rbreak_command): Pass NULL to `last' parameter of
10214 print_symbol_info.
10215
10216 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10217
10218 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10219 instead of nullptr.
10220
10221 2018-04-16 Pedro Alves <palves@redhat.com>
10222
10223 * MAINTAINERS (sh): Remove.
10224 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10225 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10226 (ALLDEPFILES): Remove sh64-tdep.c.
10227 * NEWS: Mentions that support for SH-5/SH64 is removed.
10228 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10229 (sh*-*-openbsd*): Ditto.
10230 (sh64-*-elf*): Remove.
10231 (sh*): Remove.
10232 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10233 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10234 * sh-tdep.c: No longer include "sh64-tdep.h".
10235 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10236 * sh64-tdep.c, sh64-tdep.h: Remove files.
10237
10238 2018-04-16 Pedro Alves <palves@redhat.com>
10239
10240 * MAINTAINERS: Remove m88k.
10241 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10242 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10243 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10244 * NEWS: Mention that support for m88k was removed.
10245 * configure.host (m88*-*-*): Remove support.
10246 * configure.nat (m88k-*-*): Remove support.
10247 * configure.tgt (m88*-*-openbsd*): Remove.
10248 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10249
10250 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10251
10252 * configure.tgt (x86_tobjs): New variable.
10253 (amd64_tobjs, i386_tobjs): Use it.
10254
10255 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10256
10257 * symtab.c (print_symbol_info): Precede the symbol definition by
10258 the line number when available.
10259 * NEWS: Advertise this enhancement.
10260
10261 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10262
10263 * NEWS (New options): announce set/show record btrace cpu.
10264 * btrace.c: Include record-btrace.h.
10265 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10266 the vendor is unknown.
10267 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10268 Maybe overwrite the btrace configuration's cpu.
10269 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10270 (btrace_fetch): Add cpu parameter. Update callers.
10271 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10272 Maybe overwrite the btrace configuration's cpu. Skip enabling
10273 errata workarounds if the vendor is unknown.
10274 * python/py-record-btrace.c: Include record-btrace.h.
10275 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10276 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10277 * record-btrace.c (record_btrace_cpu_state_kind): New.
10278 (record_btrace_cpu): New.
10279 (set_record_btrace_cpu_cmdlist): New.
10280 (record_btrace_get_cpu): New.
10281 (require_btrace_thread, record_btrace_info)
10282 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10283 (cmd_set_record_btrace_cpu_none): New.
10284 (cmd_set_record_btrace_cpu_auto): New.
10285 (cmd_set_record_btrace_cpu): New.
10286 (cmd_show_record_btrace_cpu): New.
10287 (_initialize_record_btrace): Initialize set/show record btrace cpu
10288 commands.
10289 * record-btrace.h (record_btrace_get_cpu): New.
10290
10291 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10292
10293 * record.c (set_record_command): Fix typo in message.
10294
10295 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10296
10297 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10298
10299 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10300
10301 * infrun.c (process_event_stop_test): Call
10302 gdbarch_in_indirect_branch_thunk.
10303 * gdbarch.sh (in_indirect_branch_thunk): New.
10304 * gdbarch.c: Regenerated.
10305 * gdbarch.h: Regenerated.
10306 * x86-tdep.h: New.
10307 * x86-tdep.c: New.
10308 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10309 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10310 (ALLDEPFILES): Add x86-tdep.c.
10311 * arch-utils.h (default_in_indirect_branch_thunk): New.
10312 * arch-utils.c (default_in_indirect_branch_thunk): New.
10313 * i386-tdep: Include x86-tdep.h.
10314 (i386_in_indirect_branch_thunk): New.
10315 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10316 function.
10317 * amd64-tdep: Include x86-tdep.h.
10318 (amd64_in_indirect_branch_thunk): New.
10319 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10320
10321 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10322
10323 PR gdb/23053
10324 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10325 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10326 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10327 regression.
10328
10329 2018-04-12 Tom Tromey <tom@tromey.com>
10330
10331 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10332 (rust_evaluate_subexp): Likewise.
10333
10334 2018-04-12 Pedro Alves <palves@redhat.com>
10335
10336 * procfs.c (procfs_detach): Make forward declaration's prototype
10337 match definition's protototype.
10338 (proc_get_LDT_entry): Remove stale do_cleanups call.
10339
10340 2018-04-12 Pedro Alves <palves@redhat.com>
10341
10342 * target.h (target_ops::to_has_exited): Delete.
10343 (target_has_exited): Delete.
10344 * target-delegates.c: Regenerate.
10345
10346 2018-04-11 Pedro Alves <palves@redhat.com>
10347
10348 * target.c (fileio_fh_t::t): Add comment.
10349 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10350 (target_fileio_close): Handle a NULL target.
10351 (invalidate_fileio_fh): New.
10352 (target_close): Call it.
10353 * remote.c (remote_hostio_send_command): No longer check whether
10354 remote_desc is open.
10355
10356 2018-04-11 Pedro Alves <palves@redhat.com>
10357
10358 * target.c (fileio_fh_t): Make it a named struct instead of a
10359 typedef.
10360 (fileio_fh_t::is_closed): New method.
10361 (DEF_VEC_O (fileio_fh_t)): Remove.
10362 (fileio_fhandles): Now a std::vector.
10363 (is_closed_fileio_fh): Delete.
10364 (acquire_fileio_fd): Adjust. Rename parameters.
10365 (release_fileio_fd): Adjust.
10366 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10367 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10368 (target_fileio_close): Adjust.
10369
10370 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10371
10372 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10373 index.
10374
10375 2018-04-10 Pedro Alves <palves@redhat.com>
10376
10377 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10378 (scoped_finish_thread_state): New class.
10379 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10380 cleanup.
10381 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10382 (fetch_inferior_event, normal_stop): Likewise.
10383 * thread.c (finish_thread_state_cleanup): Delete.
10384
10385 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10386 Pedro Alves <palves@redhat.com>
10387
10388 * value.c: Include "selftest.h" and "common/array-view.h".
10389 (struct range) <operator ==>: New.
10390 (test_ranges_contain): New.
10391 (check_ranges_vector): New.
10392 (test_insert_into_bit_range_vector): New.
10393 (_initialize_values): Register selftests.
10394 * common/array-view.h (operator==, operator!=): New.
10395
10396 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10397
10398 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10399 an iterator.
10400 * inline-frame.c: Include <algorithm>.
10401 (struct inline_state): Add constructor.
10402 (inline_state_s): Remove.
10403 (DEF_VEC_O(inline_state_s)): Remove.
10404 (inline_states): Change type to std::vector.
10405 (find_inline_frame_state): Adjust to std::vector.
10406 (allocate_inline_frame_state): Remove.
10407 (clear_inline_frame_state): Adjust to std::vector.
10408 (skip_inline_frames): Adjust to std::vector.
10409
10410 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10411
10412 * tracepoint.h (struct trace_state_variable): Add constructor.
10413 <name>: Change type to std::string.
10414 * tracepoint.c (tsv_s): Remove.
10415 (DEF_VEC_O(tsv_s)): Remove.
10416 (tvariables): Change to std::vector.
10417 (create_trace_state_variable): Adjust to std::vector.
10418 (find_trace_state_variable): Likewise.
10419 (find_trace_state_variable_by_number): Likewise.
10420 (delete_trace_state_variable): Likewise.
10421 (trace_variable_command): Adjust to std::string.
10422 (delete_trace_variable_command): Likewise.
10423 (tvariables_info_1): Adjust to std::vector.
10424 (save_trace_state_variables): Likewise.
10425 (start_tracing): Likewise.
10426 (merge_uploaded_trace_state_variables): Adjust to std::vector
10427 and std::string.
10428 * target.h (struct target_ops)
10429 <to_download_trace_state_variable>: Pass reference to
10430 trace_state_variable.
10431 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10432 * target-delegates.c: Re-generate.
10433 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10434 (mi_tsv_deleted): Likewise.
10435 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10436 * remote.c (remote_download_trace_state_variable): Change
10437 pointer to reference and adjust.
10438 * make-target-delegates (parse_argtypes): Handle references.
10439 (write_function_header): Likewise.
10440 (munge_type): Likewise.
10441
10442 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10443
10444 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10445 string_view-selftests.c.
10446 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10447 testsuite.
10448 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10449 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10450 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10451 * unittests/basic_string_view/element_access/char/1.cc:
10452 Likewise.
10453 * unittests/basic_string_view/element_access/char/empty.cc:
10454 Likewise.
10455 * unittests/basic_string_view/element_access/char/front_back.cc:
10456 Likewise.
10457 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10458 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10459 Likewise.
10460 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10461 Likewise.
10462 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10463 Likewise.
10464 * unittests/basic_string_view/operations/compare/char/1.cc:
10465 Likewise.
10466 * unittests/basic_string_view/operations/compare/char/13650.cc:
10467 Likewise.
10468 * unittests/basic_string_view/operations/copy/char/1.cc:
10469 Likewise.
10470 * unittests/basic_string_view/operations/data/char/1.cc:
10471 Likewise.
10472 * unittests/basic_string_view/operations/find/char/1.cc:
10473 Likewise.
10474 * unittests/basic_string_view/operations/find/char/2.cc:
10475 Likewise.
10476 * unittests/basic_string_view/operations/find/char/3.cc:
10477 Likewise.
10478 * unittests/basic_string_view/operations/find/char/4.cc:
10479 Likewise.
10480 * unittests/basic_string_view/operations/rfind/char/1.cc:
10481 Likewise.
10482 * unittests/basic_string_view/operations/rfind/char/2.cc:
10483 Likewise.
10484 * unittests/basic_string_view/operations/rfind/char/3.cc:
10485 Likewise.
10486 * unittests/basic_string_view/operations/substr/char/1.cc:
10487 Likewise.
10488 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10489 * unittests/string_view-selftests.c: New file.
10490
10491 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10492
10493 * unittests/basic_string_view/capacity/1.cc: New file.
10494 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10495 * unittests/basic_string_view/cons/char/1.cc: New file.
10496 * unittests/basic_string_view/cons/char/2.cc: New file.
10497 * unittests/basic_string_view/cons/char/3.cc: New file.
10498 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10499 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10500 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10501 * unittests/basic_string_view/element_access/char/1.cc: New file.
10502 * unittests/basic_string_view/element_access/char/2.cc: New file.
10503 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10504 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10505 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10506 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10507 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10508 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10509 * unittests/basic_string_view/include.cc: New file.
10510 * unittests/basic_string_view/inserters/char/1.cc: New file.
10511 * unittests/basic_string_view/inserters/char/2.cc: New file.
10512 * unittests/basic_string_view/inserters/char/3.cc: New file.
10513 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10514 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10515 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10516 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10517 * unittests/basic_string_view/literals/types.cc: New file.
10518 * unittests/basic_string_view/literals/values.cc: New file.
10519 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10520 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10521 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10522 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10523 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10524 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10525 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10526 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10527 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10528 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10529 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10530 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10531 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10532 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10533 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10534 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10535 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10536 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10537 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10538 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10539 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10540 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10541 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10542 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10543 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10544 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10545 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10546 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10547 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10548 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10549 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10550 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10551 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10552 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10553 * unittests/basic_string_view/operators/char/2.cc: New file.
10554 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10555 * unittests/basic_string_view/range_access/char/1.cc: New file.
10556 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10557 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10558 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10559 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10560 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10561 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10562 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10563 * unittests/basic_string_view/typedefs.cc: New file.
10564 * unittests/basic_string_view/types/1.cc: New file.
10565
10566 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10567
10568 * common/gdb_string_view.h: Remove libstdc++ implementation
10569 details, adjust to gdb reality.
10570 * common/gdb_string_view.tcc: Likewise.
10571 * cli/cli-script.c (struct string_view): Remove.
10572 (user_args) <m_args>: Change element type to gdb::string_view.
10573 (user_args::insert_args): Adjust.
10574
10575 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10576
10577 * common/gdb_string_view.h: New file.
10578 * common/gdb_string_view.tcc: New file.
10579
10580 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10581
10582 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10583 * configure: Re-generate.
10584
10585 2018-04-09 Pedro Alves <palves@redhat.com>
10586
10587 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10588 (set_target_gdbarch): Call
10589 gdb::observers::architecture_changed.notify instead of
10590 observer_notify_architecture_changed.
10591
10592 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10593
10594 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10595 (do_restore_current_traceframe_cleanup): Remove.
10596 (restore_current_traceframe_cleanup_dtor): Remove.
10597 (make_cleanup_restore_current_traceframe): Remove.
10598 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10599 New.
10600 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10601 * infrun.c (fetch_inferior_event): Use
10602 scoped_restore_current_traceframe.
10603
10604 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10605
10606 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10607 Remove.
10608 <n_allocated_type_units>: Remove.
10609 <all_type_units>: Change to std::vector.
10610 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10611 to std::vector change.
10612 (dwarf2_per_objfile::get_cutu): Likewise.
10613 (dwarf2_per_objfile::get_tu): Likewise.
10614 (create_signatured_type_table_from_index): Likewise.
10615 (create_signatured_type_table_from_debug_names): Likewise.
10616 (dw2_symtab_iter_next): Likewise.
10617 (dw2_print_stats): Likewise.
10618 (dw2_expand_all_symtabs): Likewise.
10619 (dw2_expand_marked_cus): Likewise.
10620 (dw2_debug_names_iterator::next): Likewise.
10621 (dwarf2_initialize_objfile): Likewise.
10622 (add_signatured_type_cu_to_table): Likewise.
10623 (create_all_type_units): Likewise.
10624 (add_type_unit): Likewise.
10625 (struct tu_abbrev_offset): Add constructor.
10626 (build_type_psymtabs_1): Adjust to std::vector change.
10627 (print_tu_stats): Likewise.
10628 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10629 (write_debug_names): Likewise.
10630
10631 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10632
10633 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10634 Make an std::vector.
10635 <n_comp_units>: Remove.
10636 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10637 to std::vector change.
10638 (dwarf2_per_objfile::get_cutu): Likewise.
10639 (dwarf2_per_objfile::get_cu): Likewise.
10640 (create_cus_from_index): Likewise.
10641 (create_addrmap_from_index): Likewise.
10642 (create_addrmap_from_aranges): Likewise.
10643 (dwarf2_read_index): Likewise.
10644 (dw2_find_last_source_symtab): Likewise.
10645 (dw2_map_symtabs_matching_filename): Likewise.
10646 (dw2_symtab_iter_next): Likewise.
10647 (dw2_print_stats): Likewise.
10648 (dw2_expand_all_symtabs): Likewise.
10649 (dw2_expand_symtabs_with_fullname): Likewise.
10650 (dw2_expand_marked_cus): Likewise.
10651 (dw2_map_symbol_filenames): Likewise.
10652 (create_cus_from_debug_names): Likewise.
10653 (dwarf2_read_debug_names): Likewise.
10654 (dw2_debug_names_iterator::next): Likewise.
10655 (dwarf2_initialize_objfile): Likewise.
10656 (set_partial_user): Likewise.
10657 (dwarf2_build_psymtabs_hard): Likewise.
10658 (read_comp_units_from_section): Remove arguments, adjust to
10659 std::vector change.
10660 (create_all_comp_units): Adjust to std::vector and
10661 read_comp_units_from_section changes.
10662 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10663 change.
10664 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10665 (psyms_seen_size): Likewise.
10666 (write_gdbindex): Likewise.
10667 (write_debug_names): Likewise.
10668
10669 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10670
10671 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10672 with dwarf2_per_objfile.
10673 (create_cus_from_index): Likewise.
10674 (create_signatured_type_table_from_index): Likewise.
10675 (dwarf2_read_index): Likewise.
10676 (dwarf2_initialize_objfile): Likewise.
10677 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10678 per_cu rather than get_dwarf2_per_objfile.
10679
10680 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10681
10682 * dwarf2read.h (struct signatured_type): Forward declare.
10683 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10684 New methods.
10685 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10686 (dw2_get_cutu): ...this.
10687 (dwarf2_per_objfile::get_cu): Rename from...
10688 (dw2_get_cu): ...this.
10689 (dwarf2_per_objfile::get_tu): New.
10690 (create_addrmap_from_index): Adjust.
10691 (create_addrmap_from_aranges): Adjust.
10692 (dw2_find_last_source_symtab): Adjust.
10693 (dw2_map_symtabs_matching_filename): Adjust.
10694 (dw2_symtab_iter_next): Adjust.
10695 (dw2_print_stats): Adjust.
10696 (dw2_expand_all_symtabs): Adjust.
10697 (dw2_expand_symtabs_with_fullname): Adjust.
10698 (dw2_expand_marked_cus): Adjust.
10699 (dw_expand_symtabs_matching_file_matcher): Adjust.
10700 (dw2_map_symbol_filenames): Adjust.
10701 (dw2_debug_names_iterator::next): Adjust.
10702 (dwarf2_initialize_objfile): Adjust.
10703 (set_partial_user): Adjust.
10704 (dwarf2_build_psymtabs_hard): Adjust.
10705
10706 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10707
10708 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10709 Remove unused variables.
10710 (dw2_map_symtabs_matching_filename): Likewise.
10711 (dwarf2_record_block_ranges): Likewise.
10712 (dwarf2_read_addr_index): Likewise.
10713 (follow_die_offset): Likewise.
10714
10715 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10716
10717 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10718 to symbol_file_add_main.
10719
10720 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10721
10722 PR mi/22299
10723 * mi/mi-console.c (do_fputc_async_safe): New.
10724 (mi_console_file::write_async_safe): New.
10725 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10726 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10727 New.
10728 * ui-file.c (ui_file::putstrn): Adjust call to
10729 fputstrn_unfiltered.
10730 * utils.c (printchar): Replace do_fputs and do_fprintf
10731 parameters by do_fputc.
10732 (fputstr_filtered): Adjust call to printchar.
10733 (fputstr_unfiltered): Likewise.
10734 (fputstrn_filtered): Likewise.
10735 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10736 printchar.
10737 * utils.h (do_fputc_ftype): New typedef.
10738 (fputstrn_unfiltered): Add do_fputc parameter.
10739
10740 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10741
10742 * regformats/i386/i386-avx.dat: Remove.
10743
10744 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10745
10746 PR gdb/22979
10747 * amd64-tdep.c (amd64_none_init_abi): New function.
10748 (amd64_x32_none_init_abi): New function.
10749 (_initialize_amd64_tdep): Register handlers for x86-64 and
10750 x64_32 with GDB_OSABI_NONE.
10751 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10752 GDB_OSABI_NONE osabi.
10753
10754 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10755
10756 PR gdb/22980
10757 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10758 GDB_OSABI_NONE.
10759 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10760 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10761
10762 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10763
10764 * common/byte-vector.h (char_vector): New type.
10765 * target.h (target_read_alloc): Return
10766 gdb::optional<byte_vector>.
10767 (target_read_stralloc): Return gdb::optional<char_vector>.
10768 (target_get_osdata): Return gdb::optional<char_vector>.
10769 * target.c (target_read_alloc_1): Templatize. Replacement
10770 manual memory management with vector.
10771 (target_read_alloc): Change return type, adjust.
10772 (target_read_stralloc): Change return type, adjust.
10773 (target_get_osdata): Change return type, adjust.
10774 * auxv.c (struct auxv_info) <length>: Remove.
10775 <data>: Change type to gdb::optional<byte_vector>.
10776 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10777 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10778 (target_auxv_search): Adjust.
10779 (fprint_target_auxv): Adjust.
10780 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10781 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10782 (linux_make_corefile_notes): Adjust.
10783 * osdata.c (get_osdata): Adjust.
10784 * remote.c (remote_get_threads_with_qxfer): Adjust.
10785 (remote_memory_map): Adjust.
10786 (remote_traceframe_info): Adjust.
10787 (btrace_read_config): Adjust.
10788 (remote_read_btrace): Adjust.
10789 (remote_pid_to_exec_file): Adjust.
10790 * solib-aix.c (solib_aix_get_library_list): Adjust.
10791 * solib-dsbt.c (decode_loadmap): Don't free buf.
10792 (dsbt_get_initial_loadmaps): Adjust.
10793 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10794 * solib-target.c (solib_target_current_sos): Adjust.
10795 * tracepoint.c (sdata_make_value): Adjust.
10796 * xml-support.c (xinclude_start_include): Adjust.
10797 (xml_fetch_content_from_file): Adjust.
10798 * xml-support.h (xml_fetch_another): Change return type.
10799 (xml_fetch_content_from_file): Change return type.
10800 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10801 * xml-tdesc.c (file_read_description_xml): Adjust.
10802 (fetch_available_features_from_target): Change return type.
10803 (target_fetch_description_xml): Adjust.
10804 (target_read_description_xml): Adjust.
10805
10806 2018-04-06 Tom Tromey <tom@tromey.com>
10807
10808 * value.c (~value): Update.
10809 (struct value) <contents>: Now unique_xmalloc_ptr.
10810 (value_contents_bits_eq, allocate_value_contents)
10811 (value_contents_raw, value_contents_all_raw)
10812 (value_contents_for_printing, value_contents_for_printing_const)
10813 (set_value_enclosing_type): Update.
10814
10815 2018-04-06 Tom Tromey <tom@tromey.com>
10816
10817 * value.c (range_s): Remove typedef, VEC.
10818 (struct range): Add operator<.
10819 (range_lessthan): Remove.
10820 (ranges_contain): Change type.
10821 (~value): Update.
10822 (struct value) <unavailable, optimized_out>: Now std::vector.
10823 (value_entirely_available)
10824 (value_entirely_covered_by_range_vector)
10825 (value_entirely_unavailable, value_entirely_optimized_out):
10826 Update.
10827 (insert_into_bit_range_vector): Change argument type.
10828 (find_first_range_overlap): Likewise.
10829 (struct ranges_and_idx, value_contents_bits_eq)
10830 (require_not_optimized_out, require_available): Update.
10831 (ranges_copy_adjusted): Change argument types.
10832 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10833
10834 2018-04-06 Tom Tromey <tom@tromey.com>
10835
10836 * value.c (~value): Update.
10837 (struct value) <parent>: Now a value_ref_ptr.
10838 (value_parent, set_value_parent, value_address, value_copy):
10839 Update.
10840
10841 2018-04-06 Tom Tromey <tom@tromey.com>
10842
10843 * value.c (struct value): Add constructor, destructor, and member
10844 initializers.
10845 (allocate_value_lazy, value_decref): Update.
10846
10847 2018-04-06 Tom Tromey <tom@tromey.com>
10848
10849 * value.c (struct value) <released, next>: Remove.
10850 (all_values): Now a std::vector.
10851 (allocate_value_lazy): Update.
10852 (value_next): Remove.
10853 (value_mark, value_free_to_mark, release_value)
10854 (value_release_to_mark): Update.
10855
10856 2018-04-06 Tom Tromey <tom@tromey.com>
10857
10858 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10859 (free_value_chain): Remove.
10860 * value.c (free_value_chain): Remove.
10861 (value_release_to_mark): Return a std::vector.
10862 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10863 std::vector.
10864 (check_condition): Update.
10865 * eval.c (fetch_subexp_value): Change "val_chain" to a
10866 std::vector.
10867 * breakpoint.c (update_watchpoint): Update.
10868 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10869
10870 2018-04-06 Tom Tromey <tom@tromey.com>
10871
10872 * value.h (free_all_values): Remove.
10873 * value.c (free_all_values): Remove.
10874
10875 2018-04-06 Tom Tromey <tom@tromey.com>
10876
10877 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10878 (value_history_chain, value_history_count): Remove.
10879 (value_history): New global.
10880 (record_latest_value, access_value_history, show_values)
10881 (preserve_values): Update.
10882
10883 2018-04-06 Tom Tromey <tom@tromey.com>
10884
10885 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10886 * varobj.c (varobj_set_display_format, varobj_set_value)
10887 (install_default_visualizer, construct_visualizer)
10888 (install_new_value, ~varobj, varobj_get_value_type)
10889 (my_value_of_variable, varobj_editable_p): Update.
10890 * c-varobj.c (c_describe_child, c_value_of_variable)
10891 (cplus_number_of_children, cplus_describe_child): Update.
10892 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10893 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10894 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10895
10896 2018-04-06 Tom Tromey <tom@tromey.com>
10897
10898 * printcmd.c (last_examine_address): Change type to
10899 value_ref_ptr.
10900 (do_examine, x_command): Update.
10901
10902 2018-04-06 Tom Tromey <tom@tromey.com>
10903
10904 * value.c (release_value): Update.
10905 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10906 (struct bpstats) <val>: Now a value_ref_ptr.
10907 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10908 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10909 (~watchpoint, print_it_watchpoint, watch_command_1)
10910 (invalidate_bp_value_on_memory_change): Update.
10911
10912 2018-04-06 Tom Tromey <tom@tromey.com>
10913
10914 * varobj.c (varobj_clear_saved_item)
10915 (update_dynamic_varobj_children, install_new_value, ~varobj):
10916 Update.
10917 * value.h (value_incref): Move declaration earlier.
10918 (value_decref): Rename from value_free.
10919 (struct value_ref_policy): New.
10920 (value_ref_ptr): New typedef.
10921 (struct value_deleter): Remove.
10922 (gdb_value_up): Remove typedef.
10923 (release_value): Change return type.
10924 (release_value_or_incref): Remove.
10925 * value.c (set_value_parent): Update.
10926 (value_incref): Change return type.
10927 (value_decref): Rename from value_free.
10928 (value_free_to_mark, free_all_values, free_value_chain): Update.
10929 (release_value): Return value_ref_ptr.
10930 (release_value_or_incref): Remove.
10931 (record_latest_value, set_internalvar, clear_internalvar):
10932 Update.
10933 * stack.c (info_frame_command): Don't call value_free.
10934 * python/py-value.c (valpy_dealloc, valpy_new)
10935 (value_to_value_object): Update.
10936 * printcmd.c (do_examine): Update.
10937 * opencl-lang.c (lval_func_free_closure): Update.
10938 * mi/mi-main.c (register_changed_p): Don't call value_free.
10939 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10940 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10941 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10942 value_free.
10943 * guile/scm-value.c (vlscm_free_value_smob)
10944 (vlscm_scm_from_value): Update.
10945 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10946 (frame_unwind_register_unsigned, get_frame_register_bytes)
10947 (put_frame_register_bytes): Don't call value_free.
10948 * findvar.c (address_from_register): Don't call value_free.
10949 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10950 * dwarf2loc.c (entry_data_value_free_closure)
10951 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10952 (dwarf2_evaluate_loc_desc_full): Update.
10953 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10954 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10955 (~watchpoint, watch_command_1)
10956 (invalidate_bp_value_on_memory_change): Update.
10957 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10958
10959 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10960
10961 PR gdb/23022
10962 * warning.m4: Add -Wno-error=deprecated-register.
10963 * configure: Re-generate.
10964
10965 2018-04-05 Tom Tromey <tom@tromey.com>
10966
10967 * linespec.h: Remove include of "vec.h".
10968
10969 2018-04-05 Tom Tromey <tom@tromey.com>
10970
10971 * linespec.c (typep): Remove typedef.
10972 (find_methods, find_superclass_methods): Take a std::vector.
10973 (find_method): Use std::vector.
10974
10975 2018-04-05 Tom Tromey <tom@tromey.com>
10976
10977 * utils.c (compare_strings): Remove.
10978 * utils.h (compare_strings): Remove.
10979 * objc-lang.h (find_imps): Update.
10980 * objc-lang.c (find_methods): Take a std::vector.
10981 (uniquify_strings, find_imps): Likewise.
10982 * linespec.c (find_methods): Take a std::vector.
10983 (decode_objc): Use std::vector.
10984 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10985 a std::vector.
10986 (find_method, find_function_symbols): Use std::vector.
10987
10988 2018-04-05 Tom Tromey <tom@tromey.com>
10989
10990 * completer.c (completion_tracker::completion_tracker): Remove
10991 cast.
10992 (completion_tracker::discard_completions): Likewise.
10993 * breakpoint.c (ambiguous_names_p): Remove cast.
10994 * ada-lang.c (_initialize_ada_language): Remove cast.
10995 * utils.h (streq): Update.
10996 (streq_hash): Add new declaration.
10997 * utils.c (streq): Return bool.
10998 (streq_hash): New function.
10999
11000 2018-04-05 Tom Tromey <tom@tromey.com>
11001
11002 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11003 Remove a string copy.
11004
11005 2018-04-05 Tom Tromey <tom@tromey.com>
11006
11007 * linespec.c (filter_results): Use std::vector.
11008 (decode_line_2, decode_line_full): Update.
11009
11010 2018-04-05 Tom Tromey <tom@tromey.com>
11011
11012 * linespec.c (canonical_to_fullform): Return std::string.
11013 (filter_results): Update.
11014 (struct decode_line_2_item): Add constructor.
11015 <fullform, displayform>: Now std::string.
11016 (decode_line_2_compare_items): Now a std::sort comparator.
11017 (decode_line_2): Update.
11018
11019 2018-04-05 Tom Tromey <tom@tromey.com>
11020
11021 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11022 (unexpected_linespec_error): Update.
11023 (linespec_parse_basic, parse_linespec): Update.
11024
11025 2018-04-05 Tom Tromey <tom@tromey.com>
11026
11027 * linespec.c (linespec_parse_basic): Reindent.
11028
11029 2018-04-05 Tom Tromey <tom@tromey.com>
11030
11031 * minsyms.h (iterate_over_minimal_symbols): Update.
11032 * minsyms.c (iterate_over_minimal_symbols): Take a
11033 gdb::function_view.
11034 * linespec.c (struct collect_minsyms): Remove.
11035 (compare_msyms): Now a std::sort comparator.
11036 (add_minsym): Add parameters.
11037 (search_minsyms_for_name): Update. Use std::vector.
11038
11039 2018-04-03 Tom Tromey <tom@tromey.com>
11040
11041 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11042 gdb::byte_vector.
11043
11044 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11045
11046 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11047
11048 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11049
11050 PR gdb/16959
11051 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11052 printing static type.
11053
11054 2018-04-01 Tom Tromey <tom@tromey.com>
11055
11056 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11057 (rs6000_xfer_shared_libraries): Update.
11058
11059 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11060
11061 * common/gdb_vecs.h (char_ptr): Remove.
11062 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11063
11064 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11065
11066 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11067 with std::vector.
11068 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11069
11070 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11071
11072 * tracepoint.h (struct uploaded_tp): Initialize fields.
11073 <actions, step_actions, cmd_strings>: Change type to
11074 std::vector<char *>.
11075 * tracepoint.c (get_uploaded_tp): Allocate with new.
11076 (free_uploaded_tps): Free with delete.
11077 (parse_tracepoint_definition): Adjust to std::vector change.
11078 * breakpoint.c (read_uploaded_action): Likewise.
11079 (create_tracepoint_from_upload): Likewise.
11080 * ctf.c (ctf_write_uploaded_tp): Likewise.
11081 (SET_ARRAY_FIELD): Likewise.
11082 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11083
11084 2018-03-30 Tom Tromey <tom@tromey.com>
11085
11086 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11087 std::unique_ptr.
11088 (svr4_keep_data_in_core): Update.
11089 (svr4_read_so_list): Update.
11090
11091 2018-03-30 Tom Tromey <tom@tromey.com>
11092
11093 * windows-nat.c (handle_output_debug_string, handle_exception):
11094 Update.
11095 * target.h (target_read_string): Update.
11096 * target.c (target_read_string): Change "string" to
11097 unique_xmalloc_ptr.
11098 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11099 Update.
11100 * solib-frv.c (frv_current_sos): Update.
11101 * solib-dsbt.c (dsbt_current_sos): Update.
11102 * solib-darwin.c (darwin_current_sos): Update.
11103 * linux-thread-db.c (inferior_has_bug): Update.
11104 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11105 Update. Remove alloca.
11106 * ada-lang.c (ada_main_name): Update.
11107
11108 2018-03-30 Tom Tromey <tom@tromey.com>
11109
11110 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11111 (struct dwo_file_deleter): New.
11112 (dwo_file_up): New typedef.
11113 (open_and_init_dwo_file): Use dwo_file_up.
11114 (free_dwo_file_cleanup): Remove.
11115
11116 2018-03-30 Tom Tromey <tom@tromey.com>
11117
11118 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11119 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11120
11121 2018-03-30 Tom Tromey <tom@tromey.com>
11122
11123 * dwarf2read.c (class free_cached_comp_units): New class.
11124 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11125 (free_cached_comp_units): Remove function.
11126
11127 2018-03-30 Tom Tromey <tom@tromey.com>
11128
11129 * utils.h (make_cleanup_unpush_target): Remove.
11130 * inf-ptrace.c (struct target_unpusher): New.
11131 (target_unpush_up) New typedef.
11132 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11133 target_unpush_up.
11134 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11135
11136 2018-03-27 Tom Tromey <tom@tromey.com>
11137
11138 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11139
11140 2018-03-27 Pedro Alves <palves@redhat.com>
11141 Tom Tromey <tom@tromey.com>
11142
11143 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11144 destructor. Now a class.
11145 (gdb_readline_wrapper_cleanup): Remove function.
11146 (gdb_readline_wrapper): Remove cleanups.
11147
11148 2018-03-27 Tom Tromey <tom@tromey.com>
11149
11150 * typeprint.h (struct type_print_options) <local_typedefs,
11151 global_typedefs>: Remove "struct" keyword.
11152 (class typedef_hash_table): New class.
11153 (recursively_update_typedef_hash, add_template_parameters)
11154 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11155 (find_typedef_in_hash): Don't declare.
11156 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11157 (typedef_hash_table::recursively_update): Rename from
11158 recursively_update_typedef_hash. Now a member.
11159 (typedef_hash_table::add_template_parameters): Rename from
11160 add_template_parameters. Now a member.
11161 (typedef_hash_table::typedef_hash_table): Now a constructor;
11162 rename from create_typedef_hash.
11163 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11164 rename from free_typedef_hash.
11165 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11166 (do_free_global_table): Remove.
11167 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11168 from copy_type_recursive.
11169 (create_global_typedef_table): Remove.
11170 (typedef_hash_table::find_global_typedef): Now a member of
11171 typedef_hash_table.
11172 (typedef_hash_table::find_typedef): Rename from
11173 find_typedef_in_hash; now a member.
11174 (whatis_exp): Update.
11175 * extension.h (struct ext_lang_type_printers): Add constructor and
11176 destructor.
11177 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11178 declare.
11179 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11180 Now a constructor; rename from start_ext_lang_type_printers.
11181 (ext_lang_type_printers): Now a destructor; rename from
11182 free_ext_lang_type_printers.
11183 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11184 Update.
11185 (c_type_print_base_struct_union): Update. Remove cleanups.
11186
11187 2018-03-27 Tom Tromey <tom@tromey.com>
11188
11189 * dwarf-index-write.c: Include <cmath>.
11190
11191 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11192
11193 * NEWS: Add entry describing new "set|show varsize-limit" command.
11194 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11195 command.
11196 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11197 "set variable".
11198
11199 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11200
11201 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11202 dwarf-index-write.c
11203 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11204 * dwarf-index-common.c: New file.
11205 * dwarf-index-common.h: New file.
11206 * dwarf-index-write.c: New file.
11207 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11208 (struct dwarf2_section_info): Move from here.
11209 (dwarf2_section_info_def): Likewise.
11210 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11211 (offset_type): Likewise.
11212 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11213 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11214 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11215 (byte_swap): Likewise.
11216 (MAYBE_SWAP): Likewise.
11217 (dwarf2_per_cu_ptr): Likewise.
11218 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11219 (struct tu_stats): Likewise.
11220 (struct dwarf2_per_objfile): Likewise.
11221 (struct dwarf2_per_cu_data): Likewise.
11222 (struct signatured_type): Likewise.
11223 (sig_type_ptr): Likewise.
11224 (DEF_VEC_P (sig_type_ptr)): Likewise.
11225 (INDEX4_SUFFIX): Likewise.
11226 (INDEX5_SUFFIX): Likewise.
11227 (DEBUG_STR_SUFFIX): Likewise.
11228 (dwarf2_read_section): Make non-static.
11229 (mapped_index_string_hash): Move from here.
11230 (dwarf5_djb_hash): Likewise.
11231 (file_write): Likewise.
11232 (class data_buf): Likewise.
11233 (struct symtab_index_entry): Likewise.
11234 (struct mapped_symtab): Likewise.
11235 (find_slot): Likewise.
11236 (hash_expand): Likewise.
11237 (add_index_entry): Likewise.
11238 (uniquify_cu_indices): Likewise.
11239 (class c_str_view): Likewise.
11240 (class c_str_view_hasher): Likewise.
11241 (class vector_hasher): Likewise.
11242 (write_hash_table): Likewise.
11243 (psym_index_map): Likewise.
11244 (struct addrmap_index_data): Likewise.
11245 (add_address_entry): Likewise.
11246 (add_address_entry_worker): Likewise.
11247 (write_address_map): Likewise.
11248 (symbol_kind): Likewise.
11249 (write_psymbols): Likewise.
11250 (struct signatured_type_index_data): Likewise.
11251 (write_one_signatured_type): Likewise.
11252 (recursively_count_psymbols): Likewise.
11253 (recursively_write_psymbols): Likewise.
11254 (class debug_names): Likewise.
11255 (check_dwarf64_offsets): Likewise.
11256 (psyms_seen_size): Likewise.
11257 (write_gdbindex): Likewise.
11258 (write_debug_names): Likewise.
11259 (assert_file_size): Likewise.
11260 (write_psymtabs_to_index): Likewise.
11261 (save_gdb_index_command): Likewise.
11262 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11263 command.
11264 * dwarf2read.h: New file.
11265
11266 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11267
11268 PR gdb/22670
11269 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11270 symbol name if the CU's language stores symbol names in linkage
11271 format.
11272 * language.h (struct language_defn)
11273 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11274 all instances of this struct.
11275
11276 2018-03-26 Tom Tromey <tom@tromey.com>
11277
11278 * stack.c (backtrace_command_1): Remove verbose code.
11279
11280 2018-03-26 Tom Tromey <tom@tromey.com>
11281
11282 * python/py-framefilter.c (py_print_type): Don't catch
11283 exceptions. Return void.
11284 (py_print_value): Likewise.
11285 (py_print_single_arg): Likewise.
11286 (enumerate_args): Don't catch exceptions.
11287 (py_print_args): Likewise.
11288 (py_print_frame): Likewise.
11289 (gdbpy_apply_frame_filter): Catch exceptions here.
11290
11291 2018-03-26 Tom Tromey <tom@tromey.com>
11292
11293 * stack.c (_initialize_stack): Remove trailing newlines from help
11294 text. Add "Usage" line to "backtrace" help.
11295
11296 2018-03-26 Tom Tromey <tom@tromey.com>
11297
11298 PR python/16486:
11299 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11300
11301 2018-03-26 Tom Tromey <tom@tromey.com>
11302
11303 * python/py-framefilter.c (py_print_single_arg): Return
11304 EXT_LANG_BT_ERROR from catch.
11305
11306 2018-03-26 Tom Tromey <tom@tromey.com>
11307
11308 PR backtrace/15584:
11309 * stack.c (backtrace_command_1): Move some code into no-filters
11310 "if".
11311
11312 2018-03-26 Tom Tromey <tom@tromey.com>
11313
11314 * python/py-framefilter.c (throw_quit_or_print_exception): New
11315 function.
11316 (gdbpy_apply_frame_filter): Use it.
11317
11318 2018-03-26 Tom Tromey <tom@tromey.com>
11319
11320 PR cli/17716:
11321 * python/py-framefilter.c (py_print_type, py_print_value)
11322 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11323 RETURN_MASK_ERROR.
11324
11325 2018-03-26 Tom Tromey <tom@tromey.com>
11326
11327 * python/py-framefilter.c (enumerate_args): Use
11328 gdb::unique_xmalloc_ptr.
11329
11330 2018-03-26 Tom Tromey <tom@tromey.com>
11331
11332 * python/py-framefilter.c (py_print_frame): Return
11333 EXT_LANG_BT_OK.
11334 (gdbpy_apply_frame_filter): Update comment.
11335 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11336 Remove.
11337 <EXT_LANG_BT_NO_FILTERS>: Change value.
11338
11339 2018-03-26 Tom Tromey <tom@tromey.com>
11340
11341 PR backtrace/15582:
11342 * stack.c (backtrace_command): Parse "hide" argument.
11343 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11344 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11345 constant.
11346
11347 2018-03-26 Tom Tromey <tom@tromey.com>
11348
11349 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11350 add "flags".
11351 (backtrace_command): Remove "fulltrace", add "flags".
11352
11353 2018-03-26 Tom Tromey <tom@tromey.com>
11354
11355 * stack.c (backtrace_command): Rewrite command line parsing.
11356
11357 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11358
11359 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11360
11361 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11362
11363 * filename-seen-cache.h: Add include guard.
11364
11365 2018-03-26 Keith Seitz <keiths@redhat.com>
11366
11367 * symfile.c (place_section): Remove "struct" from section_addr_info
11368 in comment.
11369 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11370 "struct" keyword from section_addr_info.
11371
11372 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11373
11374 * regformats/regdef.h (reg): Add constructors.
11375
11376 2018-03-25 Pedro Alves <palves@redhat.com>
11377
11378 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11379 if then/else bodies in var_func_name extraction.
11380
11381 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11382
11383 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11384 lookup_minimal_symbol() to find symbol entry.
11385 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11386
11387 2018-03-23 Keith Seitz <keiths@redhat.com>
11388
11389 PR c++/22968
11390 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11391 nested type definitions for C++, too.
11392
11393 2018-03-23 Tom Tromey <tom@tromey.com>
11394
11395 * machoread.c (struct oso_el): Add a constructor. Don't define as
11396 a typedef.
11397 (macho_register_oso): Remove.
11398 (macho_symtab_read): Take a std::vector.
11399 (oso_el_compare_name): Now a std::sort comparator.
11400 (macho_symfile_read_all_oso): Take a std::vector.
11401 (macho_symfile_read): Use std::vector. Remove cleanups.
11402
11403 2018-03-22 Tom Tromey <tom@tromey.com>
11404
11405 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11406 (record_full_goto_bookmark): Use std::string.
11407
11408 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11409
11410 PR tdep/18295
11411 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11412 a single mask.
11413
11414 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11415
11416 * rs6000-tdep.c (store_insn_p): New function.
11417 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11418 and cr_reg to their unshifted values. Use store_insn_p to
11419 match LR saves using either R1 or fdata->alloca_reg. Use
11420 store_insn_p to match CR saves. Set alloca_reg_offset
11421 when alloca_reg and framep are set. Remove lr_reg shift
11422 when assigning to fdata->lr_register.
11423
11424 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11425
11426 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11427 command line args instead of emitting a warning.
11428
11429 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11430
11431 * tracepoint.h (struct static_tracepoint_marker): Initialize
11432 fields, define default constructor, move constructor and move
11433 assignment, disable the rest.
11434 <str_id, extra>: Make std::string.
11435 (release_static_tracepoint_marker): Remove.
11436 (free_current_marker): Remove.
11437 * tracepoint.c (free_current_marker): Remove.
11438 (parse_static_tracepoint_marker_definition): Adjust to
11439 std::string, use new hex2str overload.
11440 (release_static_tracepoint_marker): Remove.
11441 (print_one_static_tracepoint_marker): Get marker by reference
11442 and adjust to std::string.
11443 (info_static_tracepoint_markers_command): Adjust to std::vector
11444 changes
11445 * target.h (static_tracepoint_marker_p): Remove typedef.
11446 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11447 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11448 bool.
11449 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11450 * target-debug.h
11451 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11452 (target_debug_print_std_vector_static_tracepoint_marker): New.
11453 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11454 to...
11455 (target_debug_print_static_tracepoint_marker_p): ... this.
11456 * target-delegates.c: Re-generate.
11457 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11458 Make std::string.
11459 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11460 (decode_static_tracepoint_spec): Adjust to std::vector.
11461 (tracepoint_print_one_detail): Adjust to std::string.
11462 (strace_marker_decode_location): Adjust to std::string.
11463 (update_static_tracepoint): Adjust to std::string, remove call
11464 to release_static_tracepoint_marker.
11465 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11466 Adjust to std::vector.
11467 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11468 (remote_static_tracepoint_markers_by_strid): Adjust to
11469 std::vector.
11470 * common/rsp-low.h (hex2str): New overload with explicit count
11471 of bytes.
11472 * common/rsp-low.c (hex2str): New overload with explicit count
11473 of bytes.
11474 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11475 (_initialize_rsp_low_selftests): Add test_hex2str test.
11476 * unittests/tracepoint-selftests.c
11477 (test_parse_static_tracepoint_marker_definition): Adjust to
11478 std::string.
11479
11480 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11481
11482 * tracepoint.c (parse_static_tracepoint_marker_definition):
11483 Consider case where the definition is followed by more
11484 definitions.
11485 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11486 tracepoint-selftests.c.
11487 * unittests/tracepoint-selftests.c: New.
11488
11489 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11490
11491 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11492 Carvalho.
11493
11494 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11495
11496 * symtab.c (find_pc_sect_line): fixed indentation.
11497
11498 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11499
11500 * symtab.c (find_pc_sect_line): now uses binary search.
11501
11502 2018-03-19 Tom Tromey <tom@tromey.com>
11503
11504 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11505 "IDENT" production.
11506
11507 2018-03-19 Pedro Alves <palves@redhat.com>
11508 Tom Tromey <tom@tromey.com>
11509
11510 * unittests/observable-selftests.c: New file.
11511 * common/observable.h: New file.
11512 * observable.h: New file.
11513 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11514 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11515 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11516 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11517 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11518 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11519 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11520 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11521 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11522 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11523 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11524 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11525 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11526 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11527 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11528 tui/tui-interp.c, valops.c: Update all users.
11529 * tui/tui-hooks.c (tui_bp_created_observer)
11530 (tui_bp_deleted_observer, tui_bp_modified_observer)
11531 (tui_inferior_exit_observer, tui_before_prompt_observer)
11532 (tui_normal_stop_observer, tui_register_changed_observer):
11533 Remove.
11534 (tui_observers_token): New global.
11535 (attach_or_detach, tui_attach_detach_observers): New functions.
11536 (tui_install_hooks, tui_remove_hooks): Use
11537 tui_attach_detach_observers.
11538 * record-btrace.c (record_btrace_thread_observer): Remove.
11539 (record_btrace_thread_observer_token): New global.
11540 * observer.sh: Remove.
11541 * observer.c: Rename to observable.c.
11542 * observable.c (namespace gdb_observers): Define new objects.
11543 (observer_debug): Move into gdb_observers namespace.
11544 (struct observer, struct observer_list, xalloc_observer_list_node)
11545 (xfree_observer_list_node, generic_observer_attach)
11546 (generic_observer_detach, generic_observer_notify): Remove.
11547 (_initialize_observer): Update.
11548 Don't include observer.inc.
11549 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11550 (clean mostlyclean): Likewise.
11551 (observer.h, observer.inc): Remove targets.
11552 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11553 (COMMON_SFILES): Use observable.c, not observer.c.
11554 * .gitignore: Remove observer.h.
11555
11556 2018-03-18 Tom Tromey <tom@tromey.com>
11557
11558 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11559 gdb::def_vector.
11560 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11561
11562 2018-03-17 Tom Tromey <tom@tromey.com>
11563
11564 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11565
11566 2018-03-17 Tom Tromey <tom@tromey.com>
11567
11568 * target.c (class scoped_target_fd): New.
11569 (target_fileio_close_cleanup): Remove.
11570 (target_fileio_read_alloc_1): Use scoped_target_fd.
11571
11572 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11573
11574 * silent-rules.mk: New.
11575 * Makefile.in: Include silent-rules.mk
11576 (srcdir, VPATH, top_srcdir): Move up.
11577 (COMPILE): Add ECHO_CXX.
11578 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11579 (init.c): Add ECHO_INIT_C.
11580 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11581 (version.c): Add ECHO_GEN.
11582 (printcmd.o): Add ECHO_CXX.
11583 (target-float.o): Add ECHO_CXX.
11584 (ada-exp.o): Add ECHO_CXX.
11585 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11586 (insight$(EXEEXT)): Add ECHO_CXXLD.
11587 * gnulib/configure.ac: Add AM_SILENT_RULES.
11588 * gnulib/aclocal.m4: Re-generate.
11589 * gnulib/configure: Re-generate.
11590 * gnulib/import/Makefile.in: Re-generate.
11591
11592 2018-03-16 Tom Tromey <tom@tromey.com>
11593
11594 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11595 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11596 * utils.c (do_free_section_addr_info)
11597 (make_cleanup_free_section_addr_info): Remove.
11598 * symfile.h (struct other_sections): Add constructor.
11599 (struct section_addr_info): Remove.
11600 (section_addr_info): New typedef.
11601 (struct sym_fns) <sym_offsets>: Change type of parameter.
11602 (build_section_addr_info_from_objfile)
11603 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11604 (default_symfile_offsets, symbol_file_add)
11605 (symbol_file_add_from_bfd)
11606 (build_section_addr_info_from_section_table): Update.
11607 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11608 * symfile.c (alloc_section_addr_info): Remove.
11609 (build_section_addr_info_from_section_table): Change return type.
11610 Update.
11611 (build_section_addr_info_from_bfd)
11612 (build_section_addr_info_from_objfile): Likewise.
11613 (free_section_addr_info): Remove.
11614 (relative_addr_info_to_section_offsets): Change type of "addrs".
11615 (addrs_section_compar): Now a std::sort comparator.
11616 (addrs_section_sort): Change return type.
11617 (addr_info_make_relative): Change type of "addrs". Update.
11618 (default_symfile_offsets, syms_from_objfile_1)
11619 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11620 (symbol_file_add_separate): Update.
11621 (symbol_file_add): Change type of "addrs". Update.
11622 (add_symbol_file_command): Update. Remove cleanups.
11623 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11624 cleanups.
11625 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11626 * solib.c (solib_read_symbols): Update.
11627 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11628 * machoread.c (macho_symfile_offsets): Update.
11629 * jit.c (jit_bfd_try_read_symtab): Update.
11630
11631 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11632
11633 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11634 unittests/utils-selftests.c.
11635 * unittests/utils-selftests.c: New file.
11636
11637 2018-03-14 Tom Tromey <tom@tromey.com>
11638
11639 PR cli/14977:
11640 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11641 for NULL.
11642
11643 2018-03-14 Tom Tromey <tom@tromey.com>
11644
11645 PR cli/19918:
11646 * printcmd.c (printf_pointer): Allow "-" in format.
11647
11648 2018-03-14 Tom Tromey <tom@tromey.com>
11649
11650 * printcmd.c (_initialize_printcmd): Add usage to printf.
11651
11652 2018-03-14 Yao Qi <qiyao@sourceware.org>
11653
11654 * MAINTAINERS: Update my email address.
11655
11656 2018-03-13 Tom Tromey <tom@tromey.com>
11657
11658 * machoread.c (macho_check_dsym): Change filenamep to a
11659 std::string*.
11660 (macho_symfile_read): Update.
11661 * symfile.c (load_command): Use std::string.
11662
11663 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11664
11665 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11666 to error message string.
11667 (riscv_register_name): Use xsnprintf instead of sprintf.
11668 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11669 internal_error.
11670 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11671 error.
11672 (riscv_push_dummy_call): Likewise.
11673
11674 2018-03-12 Tom Tromey <tom@tromey.com>
11675
11676 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11677 Use gdb::byte_vector.
11678 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11679
11680 2018-03-12 Yao Qi <yao.qi@linaro.org>
11681
11682 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11683 parameter type to readable_regcache.
11684 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11685 the declaration.
11686
11687 2018-03-11 Tom Tromey <tom@tromey.com>
11688
11689 * dwarf2read.c (struct nextfield): Add initializers.
11690 (struct nextfnfield): Remove.
11691 (struct fnfieldlist): Add initializers. Remove "length" and
11692 "head", use std::vector.
11693 (struct decl_field_list): Remove.
11694 (struct field_info): Add initializers.
11695 <fields, baseclasses>: Now std::vector.
11696 <nbaseclasses, nfnfields, typedef_field_list_count,
11697 nested_types_list_count>: Remove.
11698 (dwarf2_add_field, dwarf2_add_type_defn)
11699 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11700 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11701 (process_structure_scope): Update.
11702
11703 2018-03-11 Tom Tromey <tom@tromey.com>
11704
11705 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11706 for use by std::sort.
11707 (build_type_psymtabs_1): Use std::vector.
11708
11709 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11710
11711 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11712 and LIBMPFR in the printed configuration.
11713
11714 2018-03-08 Tom Tromey <tom@tromey.com>
11715
11716 * source.c (get_filename_and_charpos): Use scoped_fd.
11717 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11718 (procfs_pidlist): Likewise.
11719 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11720 (iterate_over_mappings): Likewise.
11721
11722 2018-03-08 Tom Tromey <tom@tromey.com>
11723
11724 * infcall.c (struct call_return_meta_info)
11725 <stack_temporaries_enabled>: Remove.
11726 (get_call_return_value, call_function_by_hand_dummy): Update.
11727 * thread.c (disable_thread_stack_temporaries): Remove.
11728 (enable_thread_stack_temporaries): Remove.
11729 (thread_stack_temporaries_enabled_p): Return bool.
11730 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11731 (get_last_thread_stack_temporary): Update.
11732 * eval.c (evaluate_subexp): Update.
11733 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11734 class, not a function.
11735 (value_ptr, value_vec): Remove typedefs.
11736 (class thread_info) <stack_temporaries_enabled>: Now bool.
11737 <stack_temporaries>: Now a std::vector.
11738 (thread_stack_temporaries_enabled_p)
11739 (value_in_thread_stack_temporaries): Return bool.
11740
11741 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11742
11743 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11744 (getpkt_or_notif_sane_1): Likewise.
11745
11746 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11747
11748 * build-id.c (build_id_to_debug_bfd): Use std::string.
11749
11750 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11751
11752 * build-id.c (find_separate_debug_file_by_buildid): Return
11753 std::string.
11754 * build-id.h (find_separate_debug_file_by_buildid): Return
11755 std::string.
11756 * coffread.c (coff_symfile_read): Adjust to std::string.
11757 * elfread.c (elf_symfile_read): Adjust to std::string.
11758 * symfile.c (separate_debug_file_exists): Change parameter to
11759 std::string.
11760 (find_separate_debug_file): Return std::string.
11761 (find_separate_debug_file_by_debuglink): Return std::string.
11762 * symfile.h (find_separate_debug_file_by_debuglink): Return
11763 std::string.
11764
11765 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11766
11767 * common/xml-utils.c (xml_escape_text): Move code to...
11768 (xml_escape_text_append): ... this new function.
11769 * common/xml-utils.h (xml_escape_text_append): New declaration.
11770 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11771 New function.
11772 (_initialize_xml_utils): register test_xml_escape_text_append as
11773 a selftest.
11774
11775 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11776
11777 * defs.h: Remove MAX_REGISTER_SIZE.
11778 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11779 asserts.
11780 * python/py-unwind.c (pyuw_sniffer): Likewise.
11781
11782 2018-03-07 Tom Tromey <tom@tromey.com>
11783
11784 * linux-tdep.c (linux_info_proc): Update.
11785 * target.h (struct target_ops) <to_fileio_readlink>: Return
11786 optional<string>.
11787 (target_fileio_readlink): Return optional<string>.
11788 * remote.c (remote_hostio_readlink): Return optional<string>.
11789 * inf-child.c (inf_child_fileio_readlink): Return
11790 optional<string>.
11791 * target.c (target_fileio_readlink): Return optional<string>.
11792
11793 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11794
11795 * regcache.c (cooked_read_test): Add riscv to the list of
11796 architectures that have a save_reggroup.
11797
11798 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11799
11800 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11801 value is not a dynamic class object.
11802
11803 2018-03-06 Tom Tromey <tom@tromey.com>
11804
11805 * rust-exp.y: Formatting fixes.
11806
11807 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11808
11809 * riscv-tdep.c (riscv_register_name): Remove target description
11810 support.
11811 (riscv_gdbarch_init): Remove target description check.
11812
11813 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11814
11815 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11816 comment.
11817 * riscv-tdep.h: Likewise.
11818
11819 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11820
11821 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11822 (riscv_pseudo_register_write): Delete.
11823 (riscv_gdbarch_init): Remove all use of pseudo registers.
11824
11825 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11826
11827 * record-btrace.c (btrace_print_lines): Replace cleanup
11828 parameter with RAII equivalents.
11829 (btrace_insn_history): Replace cleanup with RAII equivalents.
11830 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11831 make_cleanup_ui_out_tuple_begin_end): Remove.
11832 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11833 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11834 make_cleanup_ui_out_list_begin_end): Remove.
11835
11836 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11837
11838 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11839 parameter types to std::vector. Use bool.
11840 (record_btrace_wait): Replace VEC(tp_t) with
11841 std::vector<thread_info *>.
11842 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11843
11844 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11845
11846 * record-btrace.c (record_btrace_disable_callback): Remove.
11847 (struct scoped_btrace_disable): New.
11848 (record_btrace_open): Use scoped_btrace_disable.
11849
11850 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11851
11852 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11853 reading values from registers.
11854
11855 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11856
11857 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11858 where appropriate.
11859
11860 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11861
11862 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11863 change parameter type. Use GDB's print functions, and use
11864 core_addr_to_string where appropriate.
11865 (riscv_push_dummy_call): Use core_addr_to_string where
11866 appropriate, update call to riscv_print_arg_location, and reindent
11867 a few lines.
11868 (riscv_return_value): Update call to riscv_print_arg_location.
11869
11870 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11871 Tim Newsome <tim@sifive.com>
11872 Albert Ou <a0u@eecs.berkeley.edu>
11873 Darius Rad <darius@bluespec.com>
11874
11875 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11876 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11877 (ALLDEPFILES): Add riscv-tdep.c
11878 * configure.tgt: Add riscv support.
11879 * riscv-tdep.c: New file.
11880 * riscv-tdep.h: New file.
11881 * NEWS: Mention new target.
11882 * MAINTAINERS: Add entry for riscv.
11883
11884 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11885
11886 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11887 fields within aggregates.
11888
11889 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11890
11891 * record-btrace.c (btrace_print_lines): Change type of flags to
11892 gdb_disassembly_flags.
11893
11894 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11895
11896 * fbsd-nat.c: Include "inf-ptrace.h".
11897 (USE_SIGTRAP_SIGINFO): Conditionally define.
11898 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11899 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11900 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11901 function.
11902 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11903 Likewise.
11904 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11905 Likewise.
11906 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11907 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11908 "supports_stopped_by_hw_breakpoint" target methods.
11909
11910 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11911
11912 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11913 * fbsd-nat.c (debug_fbsd_nat): New variable.
11914 (show_fbsd_nat_debug): New function.
11915 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11916 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11917
11918 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11919
11920 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11921 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11922 prototype.
11923 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11924 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11925 method.
11926
11927 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11928
11929 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11930 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11931
11932 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11933
11934 * charset.c (struct charset_vector): New.
11935 (charsets): Change type to charset_vector.
11936 (find_charset_names): Adjust.
11937 (add_one): Adjust.
11938 (_initialize_charset): Adjust.
11939
11940 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11941
11942 * progspace.h (struct program_space) <deleted_solibs>: Change
11943 type to std::vector<std::string>.
11944 * progspace.c (clear_program_space_solib_cache): Adjust.
11945 * breakpoint.c (print_solib_event): Adjust.
11946 (check_status_catch_solib): Adjust.
11947 * solib.c (update_solib_list): Adjust.
11948 * ui-out.h (class ui_out) <field_string>: New overload.
11949 * ui-out.c (ui_out::field_string): New overload.
11950
11951 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11952
11953 * progspace.h (struct program_space): Add constructor and
11954 destructor, initialize fields.
11955 (add_program_space): Remove.
11956 * progspace.c (add_program_space): Rename to...
11957 (program_space::program_space): ... this.
11958 (release_program_space): Rename to...
11959 (program_space::~program_space): ... this.
11960 (delete_program_space): Use delete to delete program_space.
11961 (initialize_progspace): Use new to allocate program_space.
11962 * inferior.c (add_inferior_with_spaces): Likewise.
11963 (clone_inferior_command): Likewise.
11964 * infrun.c (follow_fork_inferior): Likewise.
11965 (handle_vfork_child_exec_or_exit): Likewise.
11966
11967 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11968
11969 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11970 (delim_string_to_char_ptr_vec): Return std::vector of
11971 gdb::unique_xmalloc_ptr.
11972 (dirnames_to_char_ptr_vec_append): Take std::vector of
11973 gdb::unique_xmalloc_ptr.
11974 (dirnames_to_char_ptr_vec): Return std::vector of
11975 gdb::unique_xmalloc_ptr.
11976 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11977 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11978 (delim_string_to_char_ptr_vec): Return an std::vector of
11979 gdb::unique_xmalloc_ptr, adjust the code.
11980 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11981 gdb::unique_xmalloc_ptr, adjust the code.
11982 (dirnames_to_char_ptr_vec): Return an std::vector of
11983 gdb::unique_xmalloc_ptr, adjust the code.
11984 * auto-load.c (auto_load_safe_path_vec): Change type to
11985 std::vector of gdb::unique_xmalloc_ptr.
11986 (auto_load_expand_dir_vars): Return an std::vector of
11987 gdb::unique_xmalloc_ptr, adjust the code.
11988 (auto_load_safe_path_vec_update): Adjust.
11989 (filename_is_in_auto_load_safe_path_vec): Adjust.
11990 (auto_load_objfile_script_1): Adjust.
11991 * build-id.c (build_id_to_debug_bfd): Adjust.
11992 * linux-thread-db.c (thread_db_load_search): Adjust.
11993 * source.c (add_path): Adjust.
11994 (openp): Adjust.
11995 * symfile.c (find_separate_debug_file): Adjust.
11996 * utils.c (do_free_char_ptr_vec): Remove.
11997 (make_cleanup_free_char_ptr_vec): Remove.
11998
11999 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12000
12001 PR gdb/22907
12002 * common/pathstuff.c: Conditionally include "<windows.h>".
12003
12004 2018-03-01 Georg Sauthoff <mail@georg.so>
12005
12006 PR gdb/22888
12007 * gcore.in: Quote variables and switch interpreter to bash.
12008
12009 2018-03-01 Tom Tromey <tom@tromey.com>
12010
12011 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12012 assertion. Add assertion for discriminant_index.
12013 (quirk_rust_enum): Use correct base type name in univariant case.
12014
12015 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12016
12017 * record.c (get_call_history_modifiers): Return a
12018 record_print_flags.
12019 (cmd_record_call_history): Adjust.
12020 * record-btrace.c (record_btrace_call_history): Adjust.
12021 (record_btrace_call_history_range): Adjust.
12022 (record_btrace_call_history_from): Adjust.
12023 * target-debug.h (target_debug_print_record_print_flags): New.
12024 * target-delegates.c: Re-generate.
12025 * target.c (target_call_history): Change flags type.
12026 (target_call_history_from): Likewise.
12027 (target_call_history_range): Likewise.
12028 * target.h (struct target_ops) <target_call_history>: Likewise.
12029 (target_call_history_from): Likewise.
12030 (target_call_history_range): Likewise.
12031
12032 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12033 Simon Marchi <simon.marchi@polymtl.ca>
12034
12035 * common/common-utils.c: Include "sys/stat.h".
12036 (is_regular_file): Move here from "source.c"; change return
12037 type to "bool".
12038 * common/common-utils.h (is_regular_file): New prototype.
12039 * common/pathstuff.c (contains_dir_separator): New function.
12040 * common/pathstuff.h (contains_dir_separator): New prototype.
12041 * source.c: Don't include "sys/stat.h".
12042 (is_regular_file): Move to "common/common-utils.c".
12043
12044 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12045
12046 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12047 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12048 * auto-load.c: Include "common/pathstuff.h".
12049 * common/common-def.h (current_directory): Move here.
12050 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12051 function.
12052 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12053 prototype.
12054 * common/pathstuff.c: New file.
12055 * common/pathstuff.h: New file.
12056 * compile/compile.c: Include "common/pathstuff.h".
12057 * defs.h (current_directory): Move to "common/common-defs.h".
12058 * dwarf2read.c: Include "common/pathstuff.h".
12059 * exec.c: Likewise.
12060 * guile/scm-safe-call.c: Likewise.
12061 * linux-thread-db.c: Likewise.
12062 * main.c: Likewise.
12063 * nto-tdep.c: Likewise.
12064 * objfiles.c: Likewise.
12065 * source.c: Likewise.
12066 * symtab.c: Likewise.
12067 * utils.c: Include "common/pathstuff.h".
12068 (gdb_realpath): Move to "common/pathstuff.c".
12069 (gdb_realpath_keepfile): Likewise.
12070 (gdb_abspath): Likewise.
12071 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12072 (gdb_realpath_keepfile): Likewise.
12073 (gdb_abspath): Likewise.
12074
12075 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12076
12077 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12078 wildcard process pid for super_resume for kernels with a
12079 specific bug.
12080
12081 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12082
12083 * compile/compile.c (get_args): Add additional comments
12084 explaining function.
12085
12086 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12087 Tom Tromey <tom@tromey.com>
12088
12089 * target.h (memory_write_request_s): Remove typedef. Don't define
12090 VEC.
12091 (target_write_memory_blocks): Change argument to std::vector.
12092 (struct memory_write_request): Add constructor.
12093 * target-memory.c (compare_block_starting_address): Return bool.
12094 Change argument types.
12095 (claim_memory): Change arguments to use std::vector.
12096 (split_regular_and_flash_blocks, blocks_to_erase)
12097 (compute_garbled_blocks): Likewise.
12098 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12099 (target_write_memory_blocks): Change argument to std::vector.
12100 * symfile.c (struct load_section_data): Add constructor and
12101 destructor. Use std::vector for "requests".
12102 (struct load_progress_data): Add initializers.
12103 (load_section_callback): Update. Use "new".
12104 (clear_memory_write_data): Remove.
12105 (generic_load): Update.
12106
12107 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12108
12109 * arch/aarch64.h: Use common/tdesc.h.
12110
12111 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12112
12113 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12114 architecture with a 64-bit ABI.
12115
12116 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12117
12118 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12119 ahead of target description loading.
12120
12121 2018-02-26 Tom Tromey <tom@tromey.com>
12122
12123 * stack.c (backtrace_command_1): Update.
12124 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12125 of "flags".
12126 * python/py-framefilter.c (py_print_frame)
12127 (gdbpy_apply_frame_filter): Change type of "flags".
12128 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12129 of "flags".
12130 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12131 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12132 * extension.h (enum frame_filter_flag): Rename from
12133 frame_filter_flags.
12134 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12135 (apply_ext_lang_frame_filter): Change type of "flags".
12136 * extension.c (apply_ext_lang_frame_filter): Change type of
12137 "flags".
12138 * extension-priv.h (struct extension_language_ops)
12139 <apply_frame_filter>: Change type of "flags".
12140
12141 2018-02-26 Tom Tromey <tom@tromey.com>
12142
12143 PR python/16497:
12144 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12145 off-by-one in py_end computation.
12146 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12147 PRINT_MORE_FRAMES.
12148 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12149 constant.
12150
12151 2018-02-26 Tom Tromey <tom@tromey.com>
12152
12153 * dwarf2read.c (struct variant_field): New.
12154 (struct nextfield) <variant>: New field.
12155 (dwarf2_add_field): Handle DW_TAG_variant_part.
12156 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12157 discriminated union.
12158 (read_structure_type): Handle DW_TAG_variant_part.
12159 (handle_struct_member_die): New function, extracted from
12160 process_structure_scope. Handle DW_TAG_variant.
12161 (process_structure_scope): Handle discriminated unions. Call
12162 handle_struct_member_die.
12163
12164 2018-02-26 Tom Tromey <tom@tromey.com>
12165
12166 * rust-lang.h (rust_last_path_segment): Declare.
12167 * rust-lang.c (rust_last_path_segment): Now public. Change
12168 contract.
12169 (struct disr_info): Remove.
12170 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12171 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12172 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12173 (rust_enum_p, rust_enum_variant): New function.
12174 (rust_underscore_fields): Remove "offset" parameter.
12175 (rust_print_enum): New function.
12176 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12177 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12178 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12179 enums.
12180 (rust_internal_print_type): New function, from rust_print_type.
12181 Remove enum code.
12182 (rust_print_type): Call rust_internal_print_type.
12183 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12184 Update enum handling.
12185 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12186 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12187 (rust_union_quirks): New functions.
12188 (process_full_comp_unit, process_full_type_unit): Call
12189 rust_union_quirks.
12190 (process_structure_scope): Update rust_unions if necessary.
12191
12192 2018-02-26 Tom Tromey <tom@tromey.com>
12193
12194 * value.h (value_union_variant): Declare.
12195 * valops.c (value_union_variant): New function.
12196 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12197 (struct discriminant_info): New.
12198 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12199 enumerator.
12200 (struct main_type) <flag_discriminated_union>: New field.
12201
12202 2018-02-26 Tom Tromey <tom@tromey.com>
12203
12204 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12205 unittests/unpack-selftests.c.
12206 * unittests/unpack-selftests.c: New file.
12207 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12208
12209 2018-02-26 Yao Qi <yao.qi@linaro.org>
12210
12211 * dwarf2read.c (struct partial_die_info) <read>: New method.
12212 (read_partial_die): Remove the declaration.
12213 (load_partial_dies): Update.
12214 (partial_die_info::partial_die_info):
12215 (read_partial_die): Change it to partial_die_info::read.
12216
12217 2018-02-26 Yao Qi <yao.qi@linaro.org>
12218
12219 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12220 (fixup_partial_die): Remove declaration.
12221 (scan_partial_symbols): Update.
12222 (partial_die_parent_scope): Likewise.
12223 (partial_die_full_name): Likewise.
12224 (fixup_partial_die): Change it to partial_die_info::fixup.
12225
12226 2018-02-26 Yao Qi <yao.qi@linaro.org>
12227
12228 * dwarf2read.c (read_partial_die): Update the declaration.
12229 (load_partial_dies): Caller update.
12230 (read_partial_die): Remove one argument abbrev_len.
12231
12232 2018-02-26 Yao Qi <yao.qi@linaro.org>
12233
12234 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12235 assignment operator.
12236 (load_partial_dies): Use ctor and copy ctor.
12237 (read_partial_die): Update.
12238 (dwarf2_cu::find_partial_die): Use ctor.
12239
12240 2018-02-26 Yao Qi <yao.qi@linaro.org>
12241
12242 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12243 (find_partial_die_in_comp_unit): Change it to
12244 dwarf2_cu::find_partial_die.
12245 (find_partial_die): Update.
12246
12247 2018-02-26 Yao Qi <yao.qi@linaro.org>
12248
12249 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12250 is NULL.
12251
12252 2018-02-26 Yao Qi <yao.qi@linaro.org>
12253
12254 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12255
12256 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12257
12258 * arch/amd64.h: Use common/tdesc.h.
12259 * arch/i386.c: Likewise.
12260 * arch/i386.h: Likewise.
12261 * arch/tic6x.c: Likewise.
12262 * arch/tdesc.h: Move file from here...
12263 * common/tdesc.h: ...to here.
12264 * features/aarch64-core.c: Regenerate.
12265 * features/aarch64-fpu.c: Regenerate.
12266 * features/i386/32bit-avx.c: Regenerate.
12267 * features/i386/32bit-avx512.c: Regenerate.
12268 * features/i386/32bit-core.c: Regenerate.
12269 * features/i386/32bit-linux.c: Regenerate.
12270 * features/i386/32bit-mpx.c: Regenerate.
12271 * features/i386/32bit-pkeys.c: Regenerate.
12272 * features/i386/32bit-sse.c: Regenerate.
12273 * features/i386/64bit-avx.c: Regenerate.
12274 * features/i386/64bit-avx512.c: Regenerate.
12275 * features/i386/64bit-core.c: Regenerate.
12276 * features/i386/64bit-linux.c: Regenerate.
12277 * features/i386/64bit-mpx.c: Regenerate.
12278 * features/i386/64bit-pkeys.c: Regenerate.
12279 * features/i386/64bit-segments.c: Regenerate.
12280 * features/i386/64bit-sse.c: Regenerate.
12281 * features/i386/x32-core.c: Regenerate.
12282 * features/tic6x-c6xp.c: Regenerate.
12283 * features/tic6x-core.c: Regenerate.
12284 * features/tic6x-gp.c: Regenerate.
12285 * target-descriptions.c: Use common/tdesc.h.
12286 * target-descriptions.h: Likewise.
12287
12288 2018-02-24 Tom Tromey <tom@tromey.com>
12289
12290 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12291 (try_thread_db_load_from_dir, thread_db_load_search): Use
12292 std::string.
12293 (info_auto_load_libthread_db_compare): Return bool. Change
12294 argument types.
12295 (info_auto_load_libthread_db): Use std::vector, std::string.
12296 Remove cleanups.
12297
12298 2018-02-24 Tom Tromey <tom@tromey.com>
12299
12300 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12301 std::string.
12302 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12303 std::string*.
12304 * gdbarch.c: Rebuild.
12305 * gdbarch.h: Rebuild.
12306 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12307 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12308 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12309 std::string*.
12310
12311 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12312
12313 * gdbtypes.h (sect_offset): Change type to uint64_t.
12314 (sect_offset_str): New function.
12315 * dwarf2read.c (create_addrmap_from_aranges): Use
12316 sect_offset_str.
12317 (error_check_comp_unit_head): Likewise.
12318 (create_debug_type_hash_table): Likewise.
12319 (read_cutu_die_from_dwo): Likewise.
12320 (init_cutu_and_read_dies): Likewise.
12321 (init_cutu_and_read_dies_no_follow): Likewise.
12322 (process_psymtab_comp_unit_reader): Likewise.
12323 (partial_die_parent_scope): Likewise.
12324 (peek_die_abbrev): Likewise.
12325 (process_queue): Likewise.
12326 (dwarf2_physname): Likewise.
12327 (read_namespace_alias): Likewise.
12328 (read_import_statement): Likewise.
12329 (create_dwo_cu_reader): Likewise.
12330 (create_cus_hash_table): Likewise.
12331 (lookup_dwo_cutu): Likewise.
12332 (inherit_abstract_dies): Likewise.
12333 (read_func_scope): Likewise.
12334 (read_call_site_scope): Likewise.
12335 (dwarf2_add_member_fn): Likewise.
12336 (read_common_block): Likewise.
12337 (read_module_type): Likewise.
12338 (read_typedef): Likewise.
12339 (read_subrange_type): Likewise.
12340 (load_partial_dies): Likewise.
12341 (read_partial_die): Likewise.
12342 (find_partial_die): Likewise.
12343 (read_str_index): Likewise.
12344 (dwarf2_string_attr): Likewise.
12345 (build_error_marker_type): Likewise.
12346 (lookup_die_type): Likewise.
12347 (dump_die_shallow): Likewise.
12348 (follow_die_ref): Likewise.
12349 (dwarf2_fetch_die_loc_sect_off): Likewise.
12350 (dwarf2_fetch_constant_bytes): Likewise.
12351 (follow_die_sig): Likewise.
12352 (get_signatured_type): Likewise.
12353 (get_DW_AT_signature_type): Likewise.
12354 (dwarf2_find_containing_comp_unit): Likewise.
12355 (set_die_type): Likewise.
12356
12357 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12358
12359 * arch/aarch64.c: Include "common-defs.h".
12360 * arch/amd64.c: Likewise.
12361 * arch/i386.c: Likewise.
12362
12363 2018-02-21 Tom Tromey <tom@tromey.com>
12364
12365 * value.h: (extract_field_op): Update.
12366 * eval.c (extract_field_op): Return a const char *.
12367 * expression.h (parse_expression_for_completion): Update.
12368 * completer.c (complete_expression): Update.
12369 (add_struct_fields): Make fieldname const.
12370 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12371 (mark_completion_tag, parse_exp_in_context_1): Update.
12372 (parse_expression_for_completion): Change "name" to
12373 unique_xmalloc_ptr*.
12374
12375 2018-02-21 Tom Tromey <tom@tromey.com>
12376
12377 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12378
12379 2018-02-21 Yao Qi <yao.qi@linaro.org>
12380
12381 * avr-tdep.c (avr_read_pc): Change parameter type to
12382 readable_regcache.
12383 * gdbarch.sh (read_pc): Likewise.
12384 * gdbarch.c: Re-generated.
12385 * gdbarch.h: Re-generated.
12386 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12387 readable_regcache.
12388 * ia64-tdep.c (ia64_read_pc): Likewise.
12389 * mips-tdep.c (mips_read_pc): Likewise.
12390 * spu-tdep.c (spu_read_pc): Likewise.
12391
12392 2018-02-21 Yao Qi <yao.qi@linaro.org>
12393
12394 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12395 * regcache-dump.c: New file.
12396 * regcache.c: Move register_dump to regcache-dump.c.
12397 (maintenance_print_registers): Likewise.
12398 (maintenance_print_raw_registers): Likewise.
12399 (maintenance_print_cooked_registers): Likewise.
12400 (maintenance_print_register_groups): Likewise.
12401 (maintenance_print_remote_registers): Likewise.
12402 (_initialize_regcache): Likewise.
12403 * regcache.h (register_dump): Moved from regcache.c.
12404
12405 2018-02-21 Yao Qi <yao.qi@linaro.org>
12406
12407 * regcache.c (regcache::regcache): Update.
12408 (regcache::invalidate): Move it to detached_regcache::invalidate.
12409 (get_thread_arch_aspace_regcache): Update.
12410 (regcache::raw_update): Update.
12411 (regcache::cooked_read): Remove some code.
12412 (regcache::cooked_read_value): Likewise.
12413 (regcache::raw_write): Remove assert on m_readonly_p.
12414 (regcache::raw_supply_integer): Move it to
12415 detached_regcache::raw_supply_integer.
12416 (regcache::raw_supply_zeroed): Likewise.
12417 * regcache.h (detached_regcache) <raw_supply_integer>: New
12418 declaration.
12419 <raw_supply_zeroed, invalidate>: Likewise.
12420 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12421 <invalidate>: Likewise.
12422 <m_readonly_p>: Removed.
12423
12424 2018-02-21 Yao Qi <yao.qi@linaro.org>
12425
12426 * infcmd.c (get_return_value): Let stop_regs point to
12427 get_current_regcache.
12428 * regcache.c (regcache::regcache): Remove.
12429 (register_dump_reg_buffer): New class.
12430 (regcache_print): Adjust.
12431 * regcache.h (regcache): Remove constructors.
12432
12433 2018-02-21 Yao Qi <yao.qi@linaro.org>
12434
12435 * regcache.c (class register_dump): New class.
12436 (register_dump_regcache, register_dump_none): New class.
12437 (register_dump_remote, register_dump_groups): New class.
12438 (regcache_print): Update.
12439 * regcache.h (regcache_dump_what): Move it to regcache.c.
12440 (regcache) <dump>: Remove.
12441
12442 2018-02-21 Yao Qi <yao.qi@linaro.org>
12443
12444 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12445 reg_buffer_rw *.
12446 (jit_unwind_reg_set_impl): Call raw_supply.
12447 (jit_frame_sniffer): Use reg_buffer_rw.
12448 * record-full.c (record_full_core_regbuf): Change its type.
12449 (record_full_core_open_1): Use reg_buffer_rw.
12450 (record_full_close): Likewise.
12451 (record_full_core_fetch_registers): Use regcache->raw_supply.
12452 (record_full_core_store_registers): Likewise.
12453 * regcache.c (regcache::get_register_status): Move it to
12454 reg_buffer.
12455 (regcache_raw_set_cached_value): Remove.
12456 (regcache::raw_set_cached_value): Remove.
12457 (regcache::raw_write): Call raw_supply.
12458 (regcache::raw_supply): Move it to reg_buffer_rw.
12459 * regcache.h (regcache_raw_set_cached_value): Remove.
12460 (reg_buffer_rw): New class.
12461
12462 2018-02-21 Yao Qi <yao.qi@linaro.org>
12463
12464 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12465 readonly_detached_regcache.
12466 (dummy_frame_prev_register): Use regcache->cooked_read.
12467 * frame.c (frame_save_as_regcache): Change return type.
12468 (frame_pop): Update.
12469 * frame.h (frame_save_as_regcache): Update declaration.
12470 * inferior.h (get_infcall_suspend_state_regcache): Update
12471 declaration.
12472 * infrun.c (infcall_suspend_state) <registers>: use
12473 readonly_detached_regcache.
12474 (save_infcall_suspend_state): Don't use regcache_dup.
12475 (get_infcall_suspend_state_regcache): Change return type.
12476 * linux-fork.c (struct fork_info) <savedregs>: Change to
12477 readonly_detached_regcache.
12478 <pc>: New field.
12479 (fork_save_infrun_state): Don't use regcache_dup.
12480 (info_checkpoints_command): Adjust.
12481 * mi/mi-main.c (register_changed_p): Update declaration.
12482 (mi_cmd_data_list_changed_registers): Use
12483 readonly_detached_regcache.
12484 (register_changed_p): Change parameter type to
12485 readonly_detached_regcache.
12486 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12487 readonly_detached_regcache.
12488 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12489 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12490 New.
12491 (regcache::save): Move it to reg_buffer.
12492 (regcache::restore): Change parameter type.
12493 (regcache_dup): Remove.
12494 * regcache.h (reg_buffer) <save>: New method.
12495 (readonly_detached_regcache): New class.
12496 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12497 readonly_detached_regcache.
12498 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12499
12500 2018-02-21 Yao Qi <yao.qi@linaro.org>
12501
12502 * frame.c (frame_save_as_regcache): Use regcache method save.
12503 (frame_pop): Use regcache method restore.
12504 * infrun.c (restore_infcall_suspend_state): Likewise.
12505 * linux-fork.c (fork_load_infrun_state): Likewise.
12506 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12507 save.
12508 * regcache.c (regcache_save): Remove.
12509 (regcache::restore): More asserts.
12510 (regcache_cpy): Remove.
12511 * regcache.h (regcache_save): Remove the declaration.
12512 (regcache::restore): Move from private to public.
12513 Remove the friend declaration of regcache_cpy.
12514 (regcache_cpy): Remove declaration.
12515
12516 2018-02-21 Yao Qi <yao.qi@linaro.org>
12517
12518 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12519 parameter type to 'readable_regcache *'.
12520 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12521 * arm-tdep.c (arm_neon_quad_read): Likewise.
12522 (arm_pseudo_read): Likewise.
12523 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12524 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12525 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12526 * gdbarch.c: Re-generated.
12527 * gdbarch.h: Re-generated.
12528 * gdbarch.sh (pseudo_register_read): Change parameter type to
12529 'readable_regcache *'.
12530 (pseudo_register_read_value): Likewise.
12531 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12532 (h8300_pseudo_register_read): Likewise.
12533 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12534 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12535 (i386_pseudo_register_read_into_value): Likewise.
12536 (i386_pseudo_register_read_value): Likewise.
12537 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12538 declaration.
12539 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12540 * m32c-tdep.c (m32c_raw_read): Likewise.
12541 (m32c_read_flg): Likewise.
12542 (m32c_banked_register): Likewise.
12543 (m32c_banked_read): Likewise.
12544 (m32c_sb_read): Likewise.
12545 (m32c_part_read): Likewise.
12546 (m32c_cat_read): Likewise.
12547 (m32c_r3r2r1r0_read): Likewise.
12548 (m32c_pseudo_register_read): Likewise.
12549 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12550 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12551 (mep_pseudo_cr64_read): Likewise.
12552 (mep_pseudo_register_read): Likewise.
12553 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12554 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12555 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12556 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12557 (regcache::cooked_read): Likewise.
12558 (regcache::cooked_read_value): Likewise.
12559 (regcache_cooked_read_signed):
12560 (regcache::cooked_read): Likewise.
12561 * regcache.h (readable_regcache): New class.
12562 (regcache): Inherit readable_regcache. Move some methods to
12563 readable_regcache.
12564 * rl78-tdep.c (rl78_pseudo_register_read): Change
12565 parameter type to 'readable_regcache *'.
12566 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12567 (e500_pseudo_register_read): Change parameter type to
12568 'readable_regcache *'.
12569 (dfp_pseudo_register_read): Likewise.
12570 (vsx_pseudo_register_read): Likewise.
12571 (efpr_pseudo_register_read): Likewise.
12572 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12573 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12574 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12575 (sh64_pseudo_register_read): Likewise.
12576 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12577 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12578 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12579 (spu_pseudo_register_read): Likewise.
12580 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12581 (xtensa_pseudo_register_read): Likewise.
12582
12583 2018-02-21 Yao Qi <yao.qi@linaro.org>
12584
12585 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12586 (regcache::arch): Move it to reg_buffer::arch.
12587 (regcache::register_buffer): Likewise.
12588 (regcache::assert_regnum): Likewise.
12589 (regcache::num_raw_registers): Likewise.
12590 * regcache.h (reg_buffer): New class.
12591 (regcache): Inherit reg_buffer.
12592
12593 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12594
12595 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12596 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12597
12598 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12599
12600 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12601
12602 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12603
12604 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12605 (SFILES): Remove common/*.c files.
12606 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12607 * common/common.host: Add common reference.
12608 * configure.ac: Likewise.
12609 * configure: Regenerate.
12610
12611 2018-02-16 Yao Qi <yao.qi@linaro.org>
12612
12613 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12614 (block_initialize_namespace): Use new.
12615 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12616 (dwarf2_free_objfile): Use delete.
12617 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12618 (copy_type_recursive): Use new.
12619 * gdb_obstack.h (allocate_on_obstack): New.
12620
12621 2018-02-15 Yao Qi <yao.qi@linaro.org>
12622
12623 PR gdb/22849
12624 * inferior.c (exit_inferior_1): Reset inf->control.
12625
12626 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12627
12628 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12629 declaration.
12630
12631 2018-02-14 Pedro Alves <palves@redhat.com>
12632
12633 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12634 frame_cleanup_after_sniffer on exception.
12635
12636 2018-02-14 Tom Tromey <tom@tromey.com>
12637
12638 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12639 const.
12640 (solib_bfd_open): Make pathname const.
12641 * solib.c (solib_bfd_open): Make pathname const.
12642 * solib-spu.c (spu_bfd_fopen): Make name const.
12643 (spu_bfd_open): Make pathname const.
12644 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12645 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12646
12647 2018-02-14 Tom Tromey <tom@tromey.com>
12648
12649 * symfile.c (symfile_bfd_open): Update.
12650 * source.h (openp, source_full_path_of, find_and_open_source):
12651 Change argument type to unique_xmalloc_ptr.
12652 * source.c (openp): Take a unique_xmalloc_ptr.
12653 (source_full_path_of, find_and_open_source): Likewise.
12654 (open_source_file, symtab_to_fullname): Update.
12655 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12656 unique_xmalloc_ptr.
12657 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12658 (exec_file_find): Update.
12659 * psymtab.c (psymtab_to_fullname): Update.
12660 * nto-tdep.h (nto_find_and_open_solib): Update.
12661 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12662 unique_xmalloc_ptr.
12663 * exec.c (exec_file_attach): Update.
12664 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12665 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12666
12667 2018-02-14 Tom Tromey <tom@tromey.com>
12668
12669 * solib.c: Include source.h.
12670 * nto-tdep.c: Include source.h.
12671 * mi/mi-cmd-env.c: Include source.h.
12672 * infcmd.c: Include source.h.
12673 * exec.c: Include source.h.
12674 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12675 (add_path, directory_switch, source_path, init_source_path): Move
12676 declarations...
12677 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12678 (add_path, directory_switch, source_path, init_source_path):
12679 ...here.
12680
12681 2018-02-14 Tom Tromey <tom@tromey.com>
12682
12683 * solist.h (exec_file_find, solib_find): Return
12684 unique_xmalloc_ptr.
12685 (solib_bfd_fopen): Take a const char *.
12686 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12687 (exec_file_find, solib_find): Likewise.
12688 (solib_bfd_fopen): Do not take ownership of "pathname".
12689 (solib_bfd_open): Use unique_xmalloc_ptr.
12690 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12691 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12692 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12693 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12694
12695 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12696
12697 * ada-lang.c (name_match_type_from_name): Remove reference to
12698 ada_name_for_lookup in function's documentation.
12699 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12700
12701 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12702
12703 * defs.h (enum openp_flags): New enum.
12704 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12705 Move to enum openp_flags.
12706 (openp_flags): New enum flags.
12707 (openp): Change parameter type to openp_flags.
12708 * source.c (openp): Change parameter type to openp_flags.
12709 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12710 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12711
12712 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12713
12714 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12715 per-command.
12716
12717 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12718
12719 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12720 into...
12721 (class dwarf2_queue_guard): ...the destructor of this new class.
12722 (dw2_do_instantiate_symtab): Create instance of the new class
12723 dwarf2_queue_guard, remove cleanup.
12724
12725 2018-02-09 Tom Tromey <tom@tromey.com>
12726
12727 * source.c (find_source_lines): Don't reference past the end of
12728 the vector.
12729
12730 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12731
12732 * remote.c (remote_btrace_maybe_reopen): Change error message.
12733 * btrace.c (btrace_enable): Likewise.
12734 (parse_xml_btrace): Likewise.
12735 (parse_xml_btrace_conf): Likewise.
12736
12737 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12738
12739 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12740 (linux_enable_pt, linux_enable_bts): Call
12741 diagnose_perf_event_open_fail.
12742
12743 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12744
12745 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12746 Remove parameter and change return type. Update callers. Move it.
12747 (linux_enable_bts, linux_enable_pt): Improve error message.
12748 (linux_enable_pt): Remove zero buffer size check.
12749 (linux_enable_btrace): Improve error messages. Remove NULL return
12750 check.
12751
12752 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12753
12754 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12755 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12756 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12757 (linux_supports_pt, linux_supports_btrace): Remove.
12758 (linux_enable_bts): Call cpu_supports_bts.
12759 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12760 * remote.c (remote_supports_btrace): Remove.
12761 (init_remote_ops): Remove remote_supports_btrace.
12762 * target-delegates.c: Regenerated.
12763 * target.c (target_supports_btrace): Remove.
12764 * target.h (target_ops) <to_supports_btrace>: Remove
12765 (target_supports_btrace): Remove.
12766 * x86-linux-nat.c (x86_linux_create_target): Remove
12767 linux_supports_btrace.
12768
12769 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12770
12771 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12772 btrace failed.
12773 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12774 exception and use message in own exception.
12775
12776 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12777
12778 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12779 (perf_event_pt_event_type): Use gdb_file_up.
12780 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12781 scoped_fd, and scoped_mmap.
12782
12783 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12784
12785 * common/scoped_mmap.h: New.
12786 * unittests/scoped_mmap-selftest.c: New.
12787 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12788 unittests/scoped_mmap-selftest.c.
12789
12790 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12791
12792 * common/scoped_fd.h: New.
12793 * unittests/scoped_fd-selftest.c: New.
12794 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12795 unittests/scoped_fd-selftest.c.
12796
12797 2018-02-09 Tom Tromey <tom@tromey.com>
12798
12799 * auto-load.c (auto_load_section_scripts): Use
12800 gdb::unique_xmalloc_ptr.
12801
12802 2018-02-09 Tom Tromey <tom@tromey.com>
12803
12804 * auto-load.c (execute_script_contents): Use std::string.
12805
12806 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12807
12808 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12809 Python function, rather than a new command.
12810
12811 2018-02-08 Tom Tromey <tom@tromey.com>
12812
12813 * solib.c (solib_find_1): Use std::string.
12814 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12815
12816 2018-02-08 Tom Tromey <tom@tromey.com>
12817
12818 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12819
12820 2018-02-08 Tom Tromey <tom@tromey.com>
12821
12822 * source.c (find_source_lines): Use gdb::def_vector.
12823
12824 2018-02-08 Tom Tromey <tom@tromey.com>
12825
12826 * macrocmd.c (struct temporary_macro_definition): New.
12827 (macro_define_command): Use temporary_macro_definition. Remove
12828 cleanups.
12829 (free_macro_definition_ptr): Remove.
12830
12831 2018-02-08 Tom Tromey <tom@tromey.com>
12832
12833 * macroexp.c (maybe_expand): Use std::string.
12834
12835 2018-02-08 Tom Tromey <tom@tromey.com>
12836
12837 * macroexp.c (struct macro_buffer): Add initializers for some
12838 members.
12839 (init_buffer, init_shared_buffer, free_buffer)
12840 (free_buffer_return_text): Remove.
12841 (macro_buffer): New constructors.
12842 (~macro_buffer): New destructor.
12843 (macro_buffer::set_shared): New method.
12844 (macro_buffer::resize_buffer, macro_buffer::appendc)
12845 (macro_buffer::appendmem): Now methods, not free functions.
12846 (set_token, append_tokens_without_splicing, stringify)
12847 (macro_stringify): Update.
12848 (gather_arguments): Change return type. Remove argc_p argument,
12849 add args_ptr argument. Use std::vector.
12850 (substitute_args): Remove argc argument. Accept std::vector.
12851 (expand): Update. Use std::vector.
12852 (scan, macro_expand, macro_expand_next): Update.
12853
12854 2018-02-08 Tom Tromey <tom@tromey.com>
12855
12856 * symtab.c (default_collect_symbol_completion_matches_break_on):
12857 Use unique_xmalloc_ptr.
12858 * macroscope.h: (sal_macro_scope, user_macro_scope)
12859 (default_macro_scope): Return unique_xmalloc_ptr.
12860 * macroscope.c (sal_macro_scope, user_macro_scope)
12861 (default_macro_scope): Return unique_xmalloc_ptr.
12862 * macroexp.h (macro_expand, macro_expand_once): Return
12863 unique_xmalloc_ptr.
12864 * macroexp.c (macro_expand, macro_expand_once): Return
12865 unique_xmalloc_ptr.
12866 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12867 (info_macro_command, info_macros_command): Use
12868 unique_xmalloc_ptr.
12869 * compile/compile-c-support.c (write_macro_definitions): Use
12870 unique_xmalloc_ptr.
12871 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12872
12873 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12874
12875 * value.c (value_static_field): Assign field type instead of
12876 containing type when returning an optimized out value.
12877
12878 2018-02-06 Yao Qi <yao.qi@linaro.org>
12879
12880 * ft32-tdep.c (ft32_read_pc): Remove.
12881 (ft32_write_pc): Remove.
12882 (ft32_gdbarch_init): Update.
12883 * m32r-tdep.c (m32r_read_pc): Remove.
12884 (m32r_gdbarch_init): Update.
12885 * mep-tdep.c (mep_read_pc): Remove.
12886 (mep_gdbarch_init): Update.
12887 * microblaze-tdep.c (microblaze_write_pc): Remove.
12888 (microblaze_gdbarch_init): Update.
12889 * mn10300-tdep.c (mn10300_read_pc): Remove.
12890 (mn10300_write_pc): Remove.
12891 (mn10300_gdbarch_init): Update.
12892 * moxie-tdep.c (moxie_read_pc): Remove.
12893 (moxie_write_pc): Remove.
12894 (moxie_gdbarch_init): Update.
12895
12896 2018-02-06 Yao Qi <yao.qi@linaro.org>
12897
12898 * expprint.c (print_subexp_standard): Handle
12899 OP_F77_UNDETERMINED_ARGLIST.
12900 (dump_subexp_body_standard): Likewise.
12901
12902 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12903
12904 * target-descriptions.c (tdesc_element_visitor) Add empty
12905 implementations.
12906 (tdesc_type): Move make_gdb_type from here.
12907 (tdesc_type_builtin): Likewise.
12908 (tdesc_type_vector): Likewise.
12909 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12910 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12911 (make_gdb_type_union): Likewise.
12912 (make_gdb_type_flags): Likewise.
12913 (make_gdb_type_enum): Likewise.
12914 (make_gdb_type): New function.
12915 (tdesc_register_type): Use static make_gdb_type.
12916
12917 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12918
12919 * infcmd.c (default_print_one_register_info): Align natural-format
12920 column values consistently one under another.
12921 (pad_to_column): New function.
12922
12923 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12924
12925 * dwarf2read.c (dwarf2_physname): Move commment.
12926
12927 2018-02-01 Leszek Swirski <leszeks@google.com>
12928
12929 * varobj.c (varobj_formatted_print_options): Allow recursive
12930 pretty printing if pretty printing is enabled.
12931
12932 2018-02-01 Leszek Swirski <leszeks@google.com>
12933
12934 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12935 names after a structop as a filename.
12936
12937 2018-02-01 Yao Qi <yao.qi@linaro.org>
12938
12939 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12940 (arm_record_coproc_data_proc): Likewise.
12941
12942 2018-02-01 Yao Qi <yao.qi@linaro.org>
12943
12944 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12945
12946 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12947
12948 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12949 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12950
12951 2018-01-31 Pedro Alves <palves@redhat.com>
12952
12953 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12954 * inflow.c (child_terminal_save_inferior): Wrap reference to
12955 tcgetpgrp in HAVE_TERMIOS_H.
12956 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12957 _WIN32.
12958 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12959 always iterate over all inferiors.
12960 (gdbsim_cntrl_c): Adjust.
12961 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12962
12963 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12964
12965 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12966 index type is objfile-owned if the element type is as well.
12967
12968 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12969
12970 GDB 8.1 released.
12971
12972 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12973
12974 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12975 "features/s390x-linux64.c".
12976 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12977 s390_linux32 and s390x_linux64.
12978 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12979 default tdesc.
12980 * s390-tdep.c: Include "features/s390-linux32.c" and
12981 "features/s390x-linux64.c".
12982 (s390_tdesc_valid): Add check for tdesc_has_registers.
12983 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12984 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12985 tdesc_s390x_linux64.
12986 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12987 tdesc_s390x_linux64 to...
12988 * s390-tdep.h: ...here.
12989
12990 2018-01-30 Pedro Alves <palves@redhat.com>
12991
12992 PR gdb/13211
12993 * config.in, configure: Regenerate.
12994 * configure.ac: Check for getpgid.
12995 * go32-nat.c (go32_pass_ctrlc): New.
12996 (go32_target): Install it.
12997 * inf-child.c (inf_child_target): Install
12998 child_terminal_save_inferior, child_pass_ctrlc and
12999 child_interrupt.
13000 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13001 (inf_ptrace_target): No longer install it.
13002 * infcmd.c (interrupt_target_1): Adjust.
13003 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13004 (child_interrupt): Declare.
13005 (inferior::terminal_state): New.
13006 * inflow.c (struct terminal_info): Update comments.
13007 (inferior_process_group): Delete.
13008 (terminal_is_ours): Delete.
13009 (gdb_tty_state): New.
13010 (child_terminal_init): Adjust.
13011 (is_gdb_terminal, sharing_input_terminal_1)
13012 (sharing_input_terminal): New functions.
13013 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13014 Set the process's actual process group in the foreground if
13015 possible. Handle is_ours_for_output/is_ours distinction. Don't
13016 mark terminal as the inferior's if not sharing GDB's terminal.
13017 Don't check attach_flag.
13018 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13019 pass down a target_terminal_state.
13020 (child_terminal_save_inferior): New, factored out from ...
13021 (child_terminal_ours_1): ... this. Handle
13022 target_terminal_state::is_ours_for_output.
13023 (child_interrupt, child_pass_ctrlc): New.
13024 (inflow_inferior_exit): Clear the inferior's terminal_state.
13025 (copy_terminal_info): Copy the inferior's terminal state.
13026 (_initialize_inflow): Remove reference to terminal_is_ours.
13027 * inflow.h (inferior_process_group): Delete.
13028 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13029 * procfs.c (procfs_target): Don't install procfs_interrupt.
13030 (procfs_interrupt): Delete.
13031 * remote.c (remote_serial_quit_handler): Adjust.
13032 (remote_interrupt): Remove ptid parameter. Adjust.
13033 * target-delegates.c: Regenerate.
13034 * target.c: Include "terminal.h".
13035 (target_terminal::terminal_state): Rename to ...
13036 (target_terminal::m_terminal_state): ... this.
13037 (target_terminal::init): Adjust.
13038 (target_terminal::inferior): Adjust to per-inferior
13039 terminal_state.
13040 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13041 (target_terminal::ours, target_terminal::ours_for_output): Use
13042 target_terminal_is_ours_kind.
13043 (target_interrupt): Remove ptid parameter. Adjust.
13044 (default_target_pass_ctrlc): Adjust.
13045 * target.h (target_ops::to_terminal_save_inferior): New field.
13046 (target_ops::to_interrupt): Remove ptid_t parameter.
13047 (target_interrupt): Remove ptid_t parameter. Update comment.
13048 (target_pass_ctrlc): Update comment.
13049 * target/target.h (target_terminal_state): New scoped enum,
13050 factored out of ...
13051 (target_terminal::terminal_state): ... here.
13052 (target_terminal::inferior): Update comments.
13053 (target_terminal::restore_inferior): New.
13054 (target_terminal::is_inferior, target_terminal::is_ours)
13055 (target_terminal::is_ours_for_output): Adjust.
13056 (target_terminal::scoped_restore_terminal_state): Adjust to
13057 rename, and call restore_inferior() instead of inferior().
13058 (target_terminal::scoped_restore_terminal_state::m_state): Change
13059 type.
13060 (target_terminal::terminal_state): Rename to ...
13061 (target_terminal::m_terminal_state): ... this and change type.
13062
13063 2018-01-30 Pedro Alves <palves@redhat.com>
13064
13065 * linux-nat.c (wait_for_signal): New function.
13066 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13067 directly.
13068 (async_terminal_is_ours)
13069 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13070 (linux_nat_add_target): Don't override
13071 to_terminal_inferior/to_terminal_ours.
13072
13073 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13074
13075 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13076
13077 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13078
13079 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13080 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13081 dwarf2_per_objfile_free here.
13082 (dwarf2_per_objfile_free): Remove.
13083 (_initialize_dwarf2_read): Don't register
13084 dwarf2_per_objfile_free as a registry cleanup.
13085
13086 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13087
13088 Avoid compilation errors in MinGW native builds
13089
13090 The error is triggered by including python-internal.h, and the
13091 error message is:
13092
13093 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13094 from build-gnulib/import/math.h:27,
13095 from d:/usr/Python26/include/pyport.h:235,
13096 from d:/usr/Python26/include/Python.h:58,
13097 from python/python-internal.h:94,
13098 from python/py-arch.c:24:
13099 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13100 using ::hypot;
13101 ^~~~~
13102
13103 This happens because Python headers define 'hypot' to expand t
13104 '_hypot' in the Windows builds.
13105 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13106 'hypoth'. This avoids a compilation error.
13107
13108 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13109
13110 * MAINTAINERS (Write After Approval): Fix ordering.
13111
13112 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13113
13114 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13115
13116 2018-01-26 Alan Modra <amodra@gmail.com>
13117
13118 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13119 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13120 Remove nop. Make const. Comment.
13121 (powerpc32_plt_stub_so_2): New.
13122 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13123 Correct count. Update uses.
13124 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13125 Move common code reading PLT entry word. Correct
13126 powerpc32_plt_stub PLT address calculation.
13127 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13128 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13129 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13130 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13131 (ppc64_standard_linkage8): Likewise.
13132 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13133 Correct insns description.
13134 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13135
13136 2018-01-24 Pedro Alves <palves@redhat.com>
13137
13138 GCC PR libstdc++/83906
13139 * gdbtypes.c (operator==(const dynamic_prop &,
13140 const dynamic_prop &)): New.
13141 (operator==(const range_bounds &, const range_bounds &)): New.
13142 (check_types_equal): Use them instead of memcmp.
13143 * gdbtypes.h (operator==(const dynamic_prop &,
13144 const dynamic_prop &)): Declare.
13145 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13146 (operator==(const range_bounds &, const range_bounds &)): Declare.
13147 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13148
13149 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13150
13151 * s390-linux-tdep.c (s390_record_address_mask)
13152 (s390_record_calc_disp_common, s390_record_calc_disp)
13153 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13154 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13155 (s390_process_record): Move to s390-tdep.c.
13156 (s390_linux_init_abi_any): Adjust.
13157 * s390-tdep.c (s390_record_address_mask)
13158 (s390_record_calc_disp_common, s390_record_calc_disp)
13159 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13160 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13161 (s390_process_record): Moved from s390-linux-tdep.c
13162 (s390_gdbarch_init): Adjust.
13163
13164 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13165
13166 * s390-linux-nat.c (s390-tdep.h): New include.
13167 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13168 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13169 (ALLDEPFILES): Add s390-tdep.c.
13170 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13171 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13172 * s390-tdep.h: ...this. New file.
13173 * s390-linux-tdep.c (s390-tdep.h): New include.
13174 (_initialize_s390_tdep): Rename to...
13175 (_initialize_s390_linux_tdep): ...this and adjust.
13176 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13177 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13178 s390-tdep.h.
13179 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13180 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13181 (s390_is_partial_instruction, s390_software_single_step)
13182 (is_non_branch_ril, s390_displaced_step_copy_insn)
13183 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13184 (s390_prologue_data, s390_addr, s390_store, s390_load)
13185 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13186 (s390_register_call_saved, s390_guess_tracepoint_registers)
13187 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13188 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13189 (s390_pseudo_register_name, s390_pseudo_register_type)
13190 (s390_pseudo_register_read, s390_pseudo_register_write)
13191 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13192 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13193 (s390_addr_bits_remove, s390_address_class_type_flags)
13194 (s390_address_class_type_flags_to_name)
13195 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13196 (s390_function_arg_float, s390_function_arg_vector)
13197 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13198 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13199 (s390_frame_align, s390_register_return_value, s390_return_value)
13200 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13201 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13202 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13203 (s390_trad_frame_prev_register, s390_unwind_cache)
13204 (s390_prologue_frame_unwind_cache)
13205 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13206 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13207 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13208 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13209 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13210 (s390_frame_base_address, s390_local_base_address)
13211 (s390_frame_base, s390_gcc_target_options)
13212 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13213 (s390_validate_reg_range, s390_tdesc_valid)
13214 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13215 * s390-tdep.c: ...this. New file.
13216
13217 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13218
13219 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13220 (s390_process_record, s390_gdbarch_tdep_alloc)
13221 (s390_linux_init_abi_any): Use/set new hook.
13222
13223 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13224
13225 * s390-linux-tdep.c (osabi.h): New include.
13226 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13227 (s390_linux_init_abi_any): New functions.
13228 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13229
13230 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13231
13232 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13233 tdesc_has_registers check
13234
13235 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13236
13237 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13238 (s390_validate_reg_range): New macro.
13239 (s390_gdbarch_init): Adjust.
13240
13241 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13242
13243 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13244 (s390_gdbarch_tdep_alloc): Adjust.
13245 (s390_gdbarch_init): Adjust.
13246
13247 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13248
13249 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13250 <have_tdb>: Change type to bool.
13251 (s390_gdbarch_tdep_alloc): Adjust.
13252 (s390_gdbarch_init): Adjust.
13253
13254 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13255
13256 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13257 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13258 (s390_gdbarch_tdep_alloc): New function.
13259 (s390_gdbarch_init): Allocate tdep at start and use its fields
13260 instead of separate variables.
13261
13262 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13263
13264 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13265 when looking for cached gdbarch and add comment for remaining.
13266
13267 2018-01-22 Pedro Alves <palves@redhat.com>
13268 Sergio Durigan Junior <sergiodj@redhat.com>
13269
13270 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13271 case.
13272
13273 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13274
13275 * MAINTAINERS: Update my company e-mail address.
13276
13277 2018-01-22 Yao Qi <yao.qi@linaro.org>
13278
13279 * regcache.c (cooked_write_test): New function.
13280 (_initialize_regcache): Register the test.
13281
13282 2018-01-22 Yao Qi <yao.qi@linaro.org>
13283
13284 * ia64-tdep.c (ia64_pseudo_register_read): Call
13285 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13286 * m32c-tdep.c (m32c_cat_read): Likewise.
13287 (m32c_r3r2r1r0_read): Likewise.
13288 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13289 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13290
13291 2018-01-22 Yao Qi <yao.qi@linaro.org>
13292
13293 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13294 method raw_read instead of regcache_raw_read.
13295 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13296 * arm-tdep.c (arm_neon_quad_read): Likewise.
13297 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13298 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13299 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13300 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13301 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13302 (i386_pseudo_register_read_into_value): Likewise.
13303 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13304 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13305 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13306 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13307 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13308 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13309 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13310 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13311 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13312
13313 2018-01-22 Yao Qi <yao.qi@linaro.org>
13314
13315 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13316 * configure.tgt: Remove target mt.
13317 * mt-tdep.c: Remove.
13318 * regcache.c (cooked_read_test): Remove the check for mt.
13319
13320 2018-01-22 Yao Qi <yao.qi@linaro.org>
13321
13322 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13323 instead of gdbarch_pseudo_register_read_value.
13324
13325 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13326
13327 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13328 language is Ada.
13329
13330 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13331
13332 * linespec.c (create_sals_line_offset): Remove code that preserved
13333 the symtab_and_line's line number.
13334
13335 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13336
13337 * varobj.c (varobj_create): Don't set valid_block when creating a
13338 floating varobj.
13339
13340 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13341
13342 * varobj.c (varobj_create): Remove out of date comment.
13343
13344 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13345
13346 PR mi/20395
13347 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13348 updating innermost block.
13349 * parse.c (innermost_block_tracker::update): Take extra type
13350 parameter, and check types match before updating innermost block.
13351 (write_dollar_variable): Update innermost block for registers.
13352 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13353 (innermost_block_tracker::innermost_block_tracker): Initialise
13354 m_types member.
13355 (innermost_block_tracker::reset): Take type parameter.
13356 (innermost_block_tracker::update): Take type parameter, and pass
13357 type through as needed.
13358 (innermost_block_tracker::m_types): New member.
13359 * varobj.c (varobj_create): Pass type when reseting innermost
13360 block.
13361
13362 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13363
13364 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13365 * ada-lang.c (resolve_subexp): Likewise.
13366 * breakpoint.c (set_breakpoint_condition) Likewise.
13367 (watch_command_1) Likewise.
13368 * c-exp.y (variable): Likewise.
13369 * d-exp.y (PrimaryExpression): Likewise.
13370 * f-exp.y (variable): Likewise.
13371 * go-exp.y (variable): Likewise.
13372 * m2-exp.y (variable): Likewise.
13373 * objfiles.c (objfile::~objfile): Likewise.
13374 * p-exp.y (variable): Likewise.
13375 * parse.c (innermost_block): Change type.
13376 * parser-defs.h (class innermost_block_tracker): New.
13377 (innermost_block): Change to innermost_block_tracker.
13378 * printcmd.c (display_command): Switch to innermost_block API.
13379 (do_one_display): Likewise.
13380 * rust-exp.y (do_one_display): Likewise.
13381 * symfile.c (clear_symtab_users): Likewise.
13382 * varobj.c (varobj_create): Switch to innermost_block API, replace
13383 use of innermost_block with block stored on varobj object.
13384
13385 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13386
13387 * expression.h (innermost_block): Remove declaration.
13388 * varobj.c: Add 'parser-defs.h' include.
13389
13390 2018-01-19 Tom Tromey <tom@tromey.com>
13391
13392 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13393 symbols in the static and global blocks.
13394
13395 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13396
13397 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13398 gdb_ptrace.h, and move including gdb_wait.h ...
13399 * nat/linux-ptrace.h: ... to here.
13400
13401 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13402
13403 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13404 inf_ptrace_detach_success.
13405 (inf_ptrace_detach_success): Add inferior parameter, use it
13406 instead of inferior_ptid, pass it to detach_inferior.
13407 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13408 parameter.
13409 * inferior.c (detach_inferior): Add overload that takes an
13410 inferior object.
13411 * inferior.h (detach_inferior): Likewise.
13412 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13413 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13414 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13415
13416 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13417
13418 * target.h (struct target_ops) <to_detach>: Add inferior
13419 parameter.
13420 (target_detach): Likewise.
13421 * target.c (dispose_inferior): Pass inferior down.
13422 (target_detach): Pass inferior down. Assert that it is equal to
13423 the current inferior.
13424 * aix-thread.c (aix_thread_detach): Pass inferior down.
13425 * corefile.c (core_file_command): Pass current_inferior() down.
13426 * corelow.c (core_detach): Add inferior parameter.
13427 * darwin-nat.c (darwin_detach): Likewise.
13428 * gnu-nat.c (gnu_detach): Likewise.
13429 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13430 * infcmd.c (detach_command): Pass current_inferior() down to
13431 target_detach.
13432 * infrun.c (follow_fork_inferior): Pass parent_inf to
13433 target_detach.
13434 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13435 target_detach.
13436 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13437 * linux-thread-db.c (thread_db_detach): Likewise.
13438 * nto-procfs.c (procfs_detach): Likewise.
13439 * procfs.c (procfs_detach): Likewise.
13440 * record.c (record_detach): Likewise.
13441 * record.h (struct inferior): Forward-declare.
13442 (record_detach): Add inferior parameter.
13443 * remote-sim.c (gdbsim_detach): Likewise.
13444 * remote.c (remote_detach_1): Likewise.
13445 (remote_detach): Likewise.
13446 (extended_remote_detach): Likewise.
13447 * sol-thread.c (sol_thread_detach): Likewise.
13448 * target-debug.h (target_debug_print_inferior_p): New macro.
13449 * target-delegates.c: Re-generate.
13450 * top.c (kill_or_detach): Pass inferior down to target_detach.
13451 * windows-nat.c (windows_detach): Add inferior parameter.
13452
13453 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13454
13455 * target.h (struct target_ops) <to_detach>: Remove args
13456 parameter.
13457 (target_detach): Likewise.
13458 * target.c (dispose_inferior): Adjust.
13459 (target_detach): Remove args parameter, adjust.
13460 * aix-thread.c (aix_thread_detach): Adjust.
13461 * corefile.c (core_file_command): Adjust.
13462 * corelow.c (core_detach): Adjust.
13463 * darwin-nat.c (darwin_detach): Adjust.
13464 * gnu-nat.c (gnu_detach): Adjust.
13465 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13466 * infcmd.c (detach_command): Adjust
13467 * infrun.c (follow_fork_inferior): Adjust.
13468 (handle_vfork_child_exec_or_exit): Adjust.
13469 * linux-fork.c (linux_fork_detach): Remove args parameter.
13470 * linux-fork.h (linux_fork_detach): Likewise.
13471 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13472 * linux-thread-db.c (thread_db_detach): Likewise.
13473 * nto-procfs.c (procfs_detach): Likewise.
13474 * procfs.c (procfs_detach): Likewise.
13475 (do_detach): Remove signo parameter.
13476 * record.c (record_detach): Remove args parameter.
13477 * record.h (record_detach): Likewise.
13478 * remote-sim.c (gdbsim_detach): Likewise.
13479 * remote.c (remote_detach_1): Likewise.
13480 (remote_detach): Likewise.
13481 (extended_remote_detach): Likewise.
13482 * sol-thread.c (sol_thread_detach): Likewise.
13483 * target-delegates.c: Re-generate.
13484 * top.c (struct qt_args) <args>: Remove field.
13485 (kill_or_detach): Don't pass args.
13486 (quit_force): Don't set args.
13487 * windows-nat.c (windows_detach): Remove args parameter.
13488
13489 2018-01-19 Yao Qi <yao.qi@linaro.org>
13490
13491 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13492 (arm_linux_init_abi): Install it.
13493
13494 2018-01-19 Yao Qi <yao.qi@linaro.org>
13495
13496 * osabi.c (gdb_osabi_names): Extend the regexp for
13497 arm-linux-gnueabihf.
13498
13499 2018-01-18 Yao Qi <yao.qi@linaro.org>
13500
13501 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13502 m_abbrevs.
13503 (abbrev_table::add_abbrev): Update.
13504 (abbrev_table::lookup_abbrev): Update.
13505
13506 2018-01-18 Yao Qi <yao.qi@linaro.org>
13507
13508 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13509
13510 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13511
13512 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13513 to "std::string".
13514
13515 2018-01-17 Tom Tromey <tom@tromey.com>
13516
13517 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13518
13519 2018-01-17 Tom Tromey <tom@tromey.com>
13520
13521 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13522 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13523 (create_array_type_with_stride): Update.
13524 * dwarf2read.c (set_die_type): Update.
13525
13526 2018-01-17 Tom Tromey <tom@tromey.com>
13527
13528 * dwarf2read.c (delayed_method_info): Remove typedef.
13529 (dwarf2_cu::method_info): Now a std::vector.
13530 (add_to_method_list): Update.
13531 (free_delayed_list): Remove.
13532 (compute_delayed_physnames): Update.
13533 (process_full_comp_unit, process_full_type_unit): Clear the method
13534 list. Remove cleanups.
13535 (psymtab_include_file_name): Add name_holder parameter. Use
13536 unique_xmalloc_ptr.
13537 (dwarf_decode_lines): Update.
13538
13539 2018-01-17 Tom Tromey <tom@tromey.com>
13540 Simon Marchi <simon.marchi@ericsson.com>
13541
13542 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13543 (dwarf2_per_objfile::free_cached_comp_units)
13544 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13545 (init_cutu_and_read_dies_no_follow): Update.
13546 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13547 (dwarf2_cu::~dwarf2_cu): New.
13548 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13549 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13550
13551 2018-01-17 Tom Tromey <tom@tromey.com>
13552 Simon Marchi <simon.marchi@ericsson.com>
13553
13554 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13555 (struct die_reader_specs) <abbrev_table>: New member.
13556 (struct abbrev_table): Add constructor.
13557 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13558 <abbrev_obstack>: Now an auto_obstack.
13559 (abbrev_table_up): New typedef.
13560 (init_cu_die_reader): Add abbrev_table parameter.
13561 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13562 Add result_dwo_abbrev_table.
13563 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13564 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13565 Update.
13566 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13567 parameter.
13568 (skip_children): Update.
13569 (abbrev_table::alloc_abbrev): Rename from
13570 abbrev_table_alloc_abbrev.
13571 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13572 (abbrev_table::lookup_abbrev): Rename from
13573 abbrev_table_lookup_abbrev.
13574 (abbrev_table_read_table): Return abbrev_table_up.
13575 (abbrev_table_free, abbrev_table_free_cleanup)
13576 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13577 (load_partial_dies): Update.
13578
13579 2018-01-17 Tom Tromey <tom@tromey.com>
13580
13581 * dwarf2read.c (dwarf2_compute_name): Update comment.
13582 (read_func_scope, read_variable): Update.
13583 (new_symbol): Remove.
13584 (new_symbol_full): Rename to new_symbol.
13585
13586 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13587
13588 PR gdb/16577
13589 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13590 a warning instead of throwing an error, set section size to 0 and return
13591 NULL.
13592 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13593
13594 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13595
13596 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13597 std::string.
13598 (linux_ptrace_attach_fail_reason_string): Likewise.
13599 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13600 Likewise.
13601 (linux_ptrace_attach_fail_reason_string): Likewise.
13602 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13603
13604 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13605
13606 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13607
13608 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13609
13610 PR gdb/21559
13611 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13612 checking for fs_base/gs_base fields in struct user_regs_struct.
13613 * configure: Regenerate.
13614
13615 2018-01-17 Yao Qi <yao.qi@linaro.org>
13616
13617 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13618 function.
13619 (aarch64_linux_init_abi): Install it to gdbarch hook
13620 gcc_target_options.
13621
13622 2018-01-15 Pedro Alves <palves@redhat.com>
13623
13624 * common/signals-state-save-restore.c
13625 (save_original_signals_state): Fix typos.
13626
13627 2017-01-12 Tom Tromey <tom@tromey.com>
13628 Sergio Durigan Junior <sergiodj@redhat.com>
13629
13630 * Makefile.in (install-only): Install gdb-add-index.
13631
13632 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13633
13634 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13635
13636 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13637
13638 * infrun.c (keep_going_pass_signal): Clear step-over info when
13639 insert_breakpoints fails.
13640
13641 2018-01-11 Pedro Alves <palves@redhat.com>
13642
13643 PR gdb/22583
13644 * infrun.c (resume): Rename to ...
13645 (resume_1): ... this.
13646 (resume): Reimplement as wrapper around resume_1.
13647
13648 2018-01-11 Pedro Alves <palves@redhat.com>
13649
13650 PR remote/22597
13651 * remote.c (remote_parse_stop_reply): Default to the last-set
13652 general thread instead of to 'magic_null_ptid'.
13653
13654 2018-01-10 Pedro Alves <palves@redhat.com>
13655
13656 * language.h (language_get_symbol_name_matcher): Rename ...
13657 (get_symbol_name_matcher): ... this.
13658 * language.c (language_get_symbol_name_matcher): Ditto.
13659 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13660 callers adjusted.
13661
13662 2018-01-10 Pedro Alves <palves@redhat.com>
13663
13664 PR gdb/22670
13665 * dwarf2read.c
13666 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13667 Adjust to use language_get_symbol_name_matcher instead of
13668 language_defn::la_get_symbol_name_matcher.
13669 * language.c (language_get_symbol_name_matcher): If in Ada mode
13670 and the lookup name is a verbatim match, return Ada's matcher.
13671 * language.h (language_get_symbol_name_matcher): Adjust comment.
13672 (ada_lookup_name_info::verbatim_p):: New method.
13673
13674 2018-01-10 Pedro Alves <palves@redhat.com>
13675
13676 PR gdb/22670
13677 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13678 minsym's language is language_auto or language_cplus, pass down
13679 language_ada instead.
13680 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13681
13682 2018-01-10 Pedro Alves <palves@redhat.com>
13683
13684 PR gdb/22670
13685 * minsyms.c (linkage_name_str): New function.
13686 (iterate_over_minimal_symbols): Use it.
13687
13688 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13689
13690 * NEWS: Document that 'info proc' now works on FreeBSD.
13691
13692 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13693
13694 * configure.ac: Check for kinfo_getfile in libutil.
13695 * configure: Regenerate.
13696 * config.in: Regenerate.
13697 * fbsd-nat.c: Include "fbsd-tdep.h".
13698 (fbsd_fetch_cmdline): New.
13699 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13700 rather than calling error.
13701 (fbsd_info_proc): New.
13702 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13703 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13704 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13705
13706 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13707
13708 * fbsd-nat.c (struct free_deleter): Remove.
13709 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13710
13711 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13712
13713 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13714 NULL for an empty pathname.
13715
13716 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13717
13718 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13719 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13720 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13721 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13722 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13723 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13724 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13725 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13726 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13727 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13728 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13729 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13730 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13731 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13732 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13733
13734 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13735
13736 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13737 (gnu_xfer_auxv): New function.
13738 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13739 TARGET_OBJECT_AUXV.
13740
13741 2018-01-08 Yao Qi <yao.qi@linaro.org>
13742 Simon Marchi <simon.marchi@ericsson.com>
13743
13744 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13745 common/selftest.c.
13746 (COMMON_OBS): Remove selftest.o.
13747 * configure.ac: Append selftest-arch.c and common/selftest.c to
13748 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13749 * configure: Re-generated.
13750 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13751 GDB_SELF_TEST.
13752 (maintenance_info_selftests): Likewise.
13753
13754 2018-01-08 Xavier Roirand <roirand@adacore.com>
13755
13756 * ada-valprint.c (val_print_packed_array_elements): Use
13757 proper number of elements when printing an array indexed
13758 by an enumeration type.
13759
13760 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13761
13762 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13763 (dw2_get_file_names_reader): Adjust.
13764 (lookup_dwo_signatured_type): Adjust.
13765 (lookup_dwp_signatured_type): Adjust.
13766 (lookup_signatured_type): Adjust.
13767 (create_type_unit_group): Adjust.
13768 (get_type_unit_group): Adjust.
13769 (process_psymtab_comp_unit_reader): Adjust.
13770 (build_type_psymtabs_reader): Adjust.
13771 (scan_partial_symbols): Adjust.
13772 (add_partial_symbol): Adjust.
13773 (add_partial_subprogram): Adjust.
13774 (peek_die_abbrev): Adjust.
13775 (fixup_go_packaging): Adjust.
13776 (process_imported_unit_die): Adjust.
13777 (dwarf2_compute_name): Adjust.
13778 (dwarf2_physname): Adjust.
13779 (read_import_statement): Adjust.
13780 (handle_DW_AT_stmt_list): Adjust.
13781 (read_file_scope): Adjust.
13782 (read_func_scope): Adjust.
13783 (read_lexical_block_scope): Adjust.
13784 (read_call_site_scope): Adjust.
13785 (read_variable): Adjust.
13786 (dwarf2_rnglists_process): Adjust.
13787 (dwarf2_ranges_process): Adjust.
13788 (dwarf2_ranges_read): Adjust.
13789 (dwarf2_get_pc_bounds): Adjust.
13790 (dwarf2_record_block_ranges): Adjust.
13791 (dwarf2_add_field): Adjust.
13792 (dwarf2_add_member_fn): Adjust.
13793 (read_structure_type): Adjust.
13794 (process_structure_scope): Adjust.
13795 (read_enumeration_type): Adjust.
13796 (read_array_type): Adjust.
13797 (mark_common_block_symbol_computed): Adjust.
13798 (read_common_block): Adjust.
13799 (read_namespace_type): Adjust.
13800 (read_namespace): Adjust.
13801 (read_module_type): Adjust.
13802 (read_tag_pointer_type): Adjust.
13803 (read_tag_ptr_to_member_type): Adjust.
13804 (read_tag_string_type): Adjust.
13805 (read_subroutine_type): Adjust.
13806 (read_typedef): Adjust.
13807 (read_base_type): Adjust.
13808 (attr_to_dynamic_prop): Adjust.
13809 (read_subrange_type): Adjust.
13810 (read_unspecified_type): Adjust.
13811 (dwarf2_read_abbrevs): Adjust.
13812 (load_partial_dies): Adjust.
13813 (read_partial_die): Adjust.
13814 (find_partial_die): Adjust.
13815 (guess_partial_die_structure_name): Adjust.
13816 (fixup_partial_die): Adjust.
13817 (read_attribute_value): Adjust.
13818 (read_addr_index): Adjust.
13819 (read_addr_index_from_leb128): Adjust.
13820 (read_str_index): Adjust.
13821 (dwarf2_string_attr): Adjust.
13822 (get_debug_line_section): Adjust.
13823 (dwarf_decode_line_header): Adjust.
13824 (lnp_state_machine::check_line_address): Adjust.
13825 (dwarf_decode_lines_1): Adjust.
13826 (dwarf_decode_lines): Adjust.
13827 (dwarf2_start_symtab): Adjust.
13828 (var_decode_location): Adjust.
13829 (new_symbol_full): Adjust.
13830 (dwarf2_const_value_data): Adjust.
13831 (dwarf2_const_value_attr): Adjust.
13832 (dwarf2_const_value): Adjust.
13833 (die_type): Adjust.
13834 (die_containing_type): Adjust.
13835 (build_error_marker_type): Adjust.
13836 (lookup_die_type): Adjust.
13837 (guess_full_die_structure_name): Adjust.
13838 (anonymous_struct_prefix): Adjust.
13839 (determine_prefix): Adjust.
13840 (dwarf2_name): Adjust.
13841 (follow_die_ref_or_sig): Adjust.
13842 (follow_die_offset): Adjust.
13843 (follow_die_ref): Adjust.
13844 (follow_die_sig_1): Adjust.
13845 (follow_die_sig): Adjust.
13846 (get_signatured_type): Adjust.
13847 (get_DW_AT_signature_type): Adjust.
13848 (decode_locdesc): Adjust.
13849 (dwarf_decode_macros): Adjust.
13850 (cu_debug_loc_section): Adjust.
13851 (fill_in_loclist_baton): Adjust.
13852 (dwarf2_symbol_mark_computed): Adjust.
13853 (init_one_comp_unit): Don't assign
13854 dwarf2_cu::dwarf2_per_objfile.
13855 (set_die_type): Adjust.
13856
13857 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13858
13859 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13860 <dwarf2_per_objfile>: New field.
13861 (dwarf2_per_objfile): Remove global.
13862 (get_dwarf2_per_objfile): New function.
13863 (set_dwarf2_per_objfile): New function.
13864 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13865 dwarf2_per_objfile.
13866 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13867 (read_abbrev_offset): Likewise.
13868 (read_indirect_string): Likewise.
13869 (read_indirect_line_string): Likewise.
13870 (read_indirect_string_at_offset): Likewise.
13871 (read_indirect_string_from_dwz): Likewise.
13872 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13873 dwarf2_per_objfile.
13874 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13875 (create_all_comp_units): Change objfile parameter to
13876 dwarf2_per_objfile.
13877 (create_all_type_units): Likewise.
13878 (process_queue): Add dwarf2_per_objfile parameter.
13879 (read_and_check_comp_unit_head): Likewise.
13880 (lookup_dwo_unit_in_dwp): Likewise.
13881 (get_dwp_file): Likewise.
13882 (process_cu_includes): Likewise.
13883 (struct free_dwo_file_cleanup_data): New struct.
13884 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13885 set_dwarf2_per_objfile.
13886 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13887 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13888 context, adjust calls.
13889 (dw2_instantiate_symtab): Likewise.
13890 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13891 (dw2_get_cu): Likewise.
13892 (create_cu_from_index_list): Change objfile parameter to
13893 dwarf2_per_objfile.
13894 (create_cus_from_index_list): Get dwarf2_per_objfile from
13895 context, adjust calls.
13896 (create_cus_from_index): Likewise.
13897 (create_signatured_type_table_from_index): Change objfile
13898 parameter to dwarf2_per_objfile.
13899 (create_signatured_type_table_from_debug_names): Change objfile
13900 parameter to dwarf2_per_objfile.
13901 (create_addrmap_from_index): Likewise.
13902 (create_addrmap_from_aranges): Likewise.
13903 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13904 (dw2_setup): Remove.
13905 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13906 context.
13907 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13908 get_dwarf2_per_objfile.
13909 (dw2_forget_cached_source_info): Likewise.
13910 (dw2_map_symtabs_matching_filename): Likewise.
13911 (struct dw2_symtab_iterator) <index>: Remove.
13912 <dwarf2_per_objfile>: New field.
13913 (dw2_symtab_iter_init): Replace index parameter with
13914 dwarf2_per_objfile.
13915 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13916 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13917 (dw2_print_stats): Likewise.
13918 (dw2_dump): Likewise.
13919 (dw2_expand_symtabs_for_function): Likewise.
13920 (dw2_expand_all_symtabs): Likewise.
13921 (dw2_expand_symtabs_with_fullname): Likewise.
13922 (dw2_expand_marked_cus): Replace index and objfile parameters
13923 with dwarf2_per_objfile.
13924 (dw_expand_symtabs_matching_file_matcher): Add
13925 dwarf2_per_objfile parameter and adjust calls.
13926 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13927 adjust calls.
13928 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13929 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13930 adjust calls.
13931 (create_cus_from_debug_names_list): Replace objfile parameter
13932 with dwarf2_per_objfile and adjust calls.
13933 (create_cus_from_debug_names): Likewise.
13934 (dwarf2_read_debug_names): Likewise.
13935 (mapped_debug_names::namei_to_name): Adjust call.
13936 (dw2_debug_names_iterator::next): Likewise.
13937 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13938 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13939 (dw2_debug_names_dump): Likewise.
13940 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13941 (dw2_debug_names_expand_symtabs_matching): Likewise.
13942 (dwarf2_initialize_objfile): Likewise.
13943 (dwarf2_build_psymtabs): Likewise.
13944 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13945 this_cu.
13946 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13947 (read_and_check_comp_unit_head): Likewise.
13948 (read_abbrev_offset): Likewise.
13949 (create_debug_type_hash_table): Likewise.
13950 (create_debug_types_hash_table): Likewise.
13951 (create_all_type_units): Replace objfile parameter with
13952 dwarf2_per_objfile.
13953 (add_type_unit): Add dwarf2_per_objfile parameter.
13954 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13955 with dwarf2_per_objfile.
13956 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13957 (lookup_dwp_signatured_type): Likewise.
13958 (lookup_signatured_type): Likewise.
13959 (read_cutu_die_from_dwo): Likewise.
13960 (init_tu_and_read_dwo_dies): Likewise.
13961 (init_cutu_and_read_dies): Likewise.
13962 (init_cutu_and_read_dies_no_follow): Likewise.
13963 (allocate_type_unit_groups_table): Add objfile parameter.
13964 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13965 (get_type_unit_group): Likewise.
13966 (process_psymtab_comp_unit): Update call.
13967 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13968 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13969 (print_tu_stats): Likewise.
13970 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13971 in void* parameter.
13972 (build_type_psymtabs): Change objfile parameter to
13973 dwarf2_per_objfile.
13974 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13975 passed in void* parameter.
13976 (process_skeletonless_type_units): Change objfile parameter to
13977 dwarf2_per_objfile.
13978 (set_partial_user): Likewise.
13979 (dwarf2_build_psymtabs_hard): Likewise.
13980 (read_comp_units_from_section): Likewise.
13981 (create_all_comp_units): Likewise.
13982 (scan_partial_symbols): Update calls.
13983 (add_partial_symbol): Likewise.
13984 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13985 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13986 (process_queue): Add dwarf2_per_objfile parameter.
13987 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13988 (compute_compunit_symtab_includes): Likewise.
13989 (process_cu_includes): Add dwarf2_per_objfile parameter.
13990 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13991 (process_full_type_unit): Likewise.
13992 (process_imported_unit_die): Update call.
13993 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13994 (read_file_scope): Likewise.
13995 (allocate_dwo_file_hash_table): Add objfile parameter.
13996 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13997 (create_cus_hash_table): Likewise.
13998 (create_dwp_hash_table): Likewise.
13999 (create_dwo_unit_in_dwp_v1): Likewise.
14000 (create_dwp_v2_section): Likewise.
14001 (create_dwo_unit_in_dwp_v2): Likewise.
14002 (lookup_dwo_unit_in_dwp): Likewise.
14003 (try_open_dwop_file): Likewise.
14004 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14005 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14006 cleanup to include a reference to dwarf2_per_objfile.
14007 (open_dwp_file): Add dwarf2_per_objfile parameter.
14008 (open_and_init_dwp_file): Likewise.
14009 (get_dwp_file): Likewise.
14010 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14011 (queue_and_load_all_dwo_tus): Update call.
14012 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14013 data.
14014 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14015 (dwarf2_ranges_process): Likewise.
14016 (dwarf2_get_pc_bounds): Likewise.
14017 (mark_common_block_symbol_computed): Likewise.
14018 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14019 (dwarf2_read_abbrevs): Update call.
14020 (read_partial_die): Use dwarf2_per_objfile from cu.
14021 (find_partial_die): Likewise.
14022 (fixup_partial_die): Likewise.
14023 (read_attribute_value): Likewise.
14024 (read_indirect_string_at_offset_from): Add objfile parameter.
14025 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14026 parameter.
14027 (read_indirect_string_from_dwz): Add objfile parameter.
14028 (read_indirect_string): Add objfile parameter.
14029 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14030 (read_addr_index): Use dwarf2_per_objfile from cu.
14031 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14032 call dw2_setup.
14033 (read_str_index): Use dwarf2_per_objfile from cu.
14034 (get_debug_line_section): Likewise.
14035 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14036 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14037 (new_symbol_full): Use dwarf2_per_objfile from cu.
14038 (build_error_marker_type): Likewise.
14039 (lookup_die_type): Likewise.
14040 (determine_prefix): Likewise.
14041 (follow_die_offset): Likewise.
14042 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14043 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14044 (dwarf2_fetch_die_type_sect_off): Likewise.
14045 (dwarf2_get_die_type): Likewise.
14046 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14047 (get_signatured_type): Likewise.
14048 (get_DW_AT_signature_type): Likewise.
14049 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14050 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14051 (cu_debug_loc_section): Likewise.
14052 (fill_in_loclist_baton): Likewise.
14053 (dwarf2_symbol_mark_computed): Likewise.
14054 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14055 dwarf2_per_objfile.
14056 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14057 parameter.
14058 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14059 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14060 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14061 (set_die_type): Use dwarf2_free_objfile from cu.
14062 (get_die_type_at_offset): Likewise.
14063 (dwarf2_per_objfile_free): Don't assign global variable.
14064 (debug_names) <constructor>: Add dwarf2_per_objfile
14065 parameter, update m_debugstrlookup construction.
14066 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14067 parameter.
14068 <m_dwarf2_per_objfile>: New field.
14069 <lookup>: Use m_dwarf2_per_objfile.
14070 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14071 (psyms_seen_size): Likewise.
14072 (write_gdbindex): Replace objfile parameter with
14073 dwarf2_per_objfile.
14074 (write_debug_names): Likewise.
14075 (write_psymtabs_to_index): Likewise.
14076 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14077 calls.
14078
14079 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14080
14081 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14082 <dwarf2_per_objfile>: New field.
14083 (struct dwarf2_per_cu_data) <objfile>: Remove.
14084 <dwarf2_per_objfile>: New field.
14085 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14086 of objfile.
14087 (create_signatured_type_table_from_index): Likewise.
14088 (create_debug_type_hash_table): Likewise.
14089 (fill_in_sig_entry_from_dwo_entry): Likewise.
14090 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14091 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14092 objfile.
14093 (create_partial_symtab): Access objfile through
14094 dwarf2_per_objfile.
14095 (process_psymtab_comp_unit_reader): Likewise.
14096 (read_comp_units_from_section): Likewise.
14097 (scan_partial_symbols): Likewise.
14098 (add_partial_symbol): Likewise.
14099 (add_partial_subprogram): Likewise.
14100 (peek_die_abbrev): Likewise.
14101 (fixup_go_packaging): Likewise.
14102 (process_full_comp_unit): Likewise.
14103 (process_full_type_unit): Likewise.
14104 (process_imported_unit_die): Likewise.
14105 (dwarf2_compute_name): Likewise.
14106 (dwarf2_physname): Likewise.
14107 (read_import_statement): Likewise.
14108 (create_cus_hash_table): Assign dwarf2_physname instead of
14109 objfile.
14110 (read_func_scope): Access objfile through dwarf2_per_objfile.
14111 (read_lexical_block_scope): Likewise.
14112 (read_call_site_scope): Likewise.
14113 (read_variable): Likewise.
14114 (dwarf2_rnglists_process): Likewise.
14115 (dwarf2_ranges_process): Likewise.
14116 (dwarf2_ranges_read): Likewise.
14117 (dwarf2_record_block_ranges): Likewise.
14118 (dwarf2_add_field): Likewise.
14119 (dwarf2_add_member_fn): Likewise.
14120 (read_structure_type): Likewise.
14121 (process_structure_scope): Likewise.
14122 (read_enumeration_type): Likewise.
14123 (read_array_type): Likewise.
14124 (read_common_block): Likewise.
14125 (read_namespace_type): Likewise.
14126 (read_namespace): Likewise.
14127 (read_module_type): Likewise.
14128 (read_tag_pointer_type): Likewise.
14129 (read_tag_ptr_to_member_type): Likewise.
14130 (read_tag_string_type): Likewise.
14131 (read_subroutine_type): Likewise.
14132 (read_typedef): Likewise.
14133 (read_base_type): Likewise.
14134 (attr_to_dynamic_prop): Likewise.
14135 (read_subrange_type): Likewise.
14136 (read_unspecified_type): Likewise.
14137 (load_partial_dies): Likewise.
14138 (read_partial_die): Likewise.
14139 (find_partial_die): Likewise.
14140 (guess_partial_die_structure_name): Likewise.
14141 (fixup_partial_die): Likewise.
14142 (read_attribute_value): Likewise.
14143 (read_addr_index_from_leb128): Likewise.
14144 (dwarf2_read_addr_index): Likewise.
14145 (dwarf2_string_attr): Likewise.
14146 (lnp_state_machine::check_line_address): Likewise.
14147 (dwarf_decode_lines_1): Likewise.
14148 (dwarf_decode_lines): Likewise.
14149 (dwarf2_start_symtab): Likewise.
14150 (var_decode_location): Likewise.
14151 (new_symbol_full): Likewise.
14152 (dwarf2_const_value_data): Likewise.
14153 (dwarf2_const_value_attr): Likewise.
14154 (dwarf2_const_value): Likewise.
14155 (die_type): Likewise.
14156 (die_containing_type): Likewise.
14157 (lookup_die_type): Likewise.
14158 (guess_full_die_structure_name): Likewise.
14159 (anonymous_struct_prefix): Likewise.
14160 (dwarf2_name): Likewise.
14161 (follow_die_ref_or_sig): Likewise.
14162 (follow_die_offset): Likewise.
14163 (follow_die_ref): Likewise.
14164 (dwarf2_fetch_die_loc_sect_off): Likewise.
14165 (dwarf2_fetch_constant_bytes): Likewise.
14166 (dwarf2_fetch_die_type_sect_off): Likewise.
14167 (dwarf2_get_die_type): Likewise.
14168 (follow_die_sig): Likewise.
14169 (decode_locdesc): Likewise.
14170 (dwarf2_per_cu_objfile): Likewise.
14171 (dwarf2_per_cu_text_offset): Likewise.
14172 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14173 objfile.
14174 (set_die_type): Access objfile through
14175 dwarf2_per_objfile.
14176
14177 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14178
14179 * valprint.c (converted_character_d): Remove typedef.
14180 (DEF_VEC_O (converted_character_d)): Remove.
14181 (count_next_character): Use std::vector.
14182 (print_converted_chars_to_obstack): Likewise.
14183 (generic_printstr): Likewise.
14184
14185 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14186
14187 * xml-support.h (struct gdb_xml_value): Add constructor.
14188 <value>: Change type to unique_xmalloc_ptr.
14189 (gdb_xml_value_s): Remove typedef.
14190 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14191 (gdb_xml_element_start_handler): Change parameter type to
14192 std::vector.
14193 (xml_find_attribute): Likewise.
14194 * xml-support.c (xml_find_attribute): Change parameter type to
14195 std::vector and adjust.
14196 (gdb_xml_values_cleanup): Remove.
14197 (gdb_xml_parser::start_element): Adjust to std::vector.
14198 (xinclude_start_include): Change paraeter type to std::vector
14199 and adjust.
14200 * btrace.c (check_xml_btrace_version): Likewise.
14201 (parse_xml_btrace_block): Likewise.
14202 (parse_xml_btrace_pt_config_cpu): Likewise.
14203 (parse_xml_btrace_pt): Likewise.
14204 (parse_xml_btrace_conf_bts): Likewise.
14205 (parse_xml_btrace_conf_pt): Likewise.
14206 * memory-map.c (memory_map_start_memory): Likewise.
14207 (memory_map_start_property): Likewise.
14208 * osdata.c (osdata_start_osdata): Likewise.
14209 (osdata_start_item): Likewise.
14210 (osdata_start_column): Likewise.
14211 * remote.c (start_thread): Likewise.
14212 * solib-aix.c (library_list_start_library): Likewise.
14213 (library_list_start_list): Likewise.
14214 * solib-svr4.c (library_list_start_library): Likewise.
14215 (svr4_library_list_start_list): Likewise.
14216 * solib-target.c (library_list_start_segment): Likewise.
14217 (library_list_start_section): Likewise.
14218 (library_list_start_library): Likewise.
14219 (library_list_start_list): Likewise.
14220 * tracepoint.c (traceframe_info_start_memory): Likewise.
14221 (traceframe_info_start_tvar): Likewise.
14222 * xml-syscall.c (syscall_start_syscall): Likewise.
14223 * xml-tdesc.c (tdesc_start_target): Likewise.
14224 (tdesc_start_feature): Likewise.
14225 (tdesc_start_reg): Likewise.
14226 (tdesc_start_union): Likewise.
14227 (tdesc_start_struct): Likewise.
14228 (tdesc_start_flags): Likewise.
14229 (tdesc_start_enum): Likewise.
14230 (tdesc_start_field): Likewise.
14231 (tdesc_start_enum_value): Likewise.
14232 (tdesc_start_vector): Likewise.
14233
14234 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14235
14236 * extension.h (struct xmethod_worker) <clone>: Remove.
14237 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14238 Remove.
14239 (python_xmethod_worker::clone): Remove.
14240 * valops.c (find_overload_match): Use std::move instead of
14241 clone.
14242
14243 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14244
14245 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14246 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14247 <free_xmethod_worker_data>: Remove.
14248 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14249 <get_xmethod_arg_types>: Remove.
14250 <get_xmethod_result_type>: Remove.
14251 <invoke_xmethod>: Remove.
14252 * extension.c (new_xmethod_worker): Remove.
14253 (clone_xmethod_worker): Remove.
14254 (get_matching_xmethod_workers): Return void, pass std::vector by
14255 pointer.
14256 (get_xmethod_arg_types): Rename to...
14257 (xmethod_worker::get_arg_types): ... this, and adjust.
14258 (get_xmethod_result_type): Rename to...
14259 (xmethod_worker::get_result_type): ... this, and adjust.
14260 (invoke_xmethod): Remove.
14261 (free_xmethod_worker): Remove.
14262 (free_xmethod_worker_vec): Remove.
14263 * extension.h (enum ext_lang_rc): Move here from
14264 extension-priv.h.
14265 (struct xmethod_worker): Add constructor and destructor.
14266 <data>: Remove.
14267 <value>: Remove.
14268 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14269 virtual pure methods.
14270 <get_arg_types, get_result_type>: New methods.
14271 (xmethod_worker_ptr): Remove typedef.
14272 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14273 (xmethod_worker_vec): Remove typedef.
14274 (xmethod_worker_up): New typedef.
14275 (invoke_xmethod): Remove.
14276 (clone_xmethod_worker): Remove.
14277 (free_xmethod_worker): Remove.
14278 (free_xmethod_worker_vec): Remove.
14279 (get_xmethod_arg_types): Remove.
14280 (get_xmethod_result_type): Remove.
14281 * valops.c (find_method_list): Use std::vector, don't use
14282 intermediate vector.
14283 (value_find_oload_method_list): Use std::vector.
14284 (find_overload_match): Use std::vector.
14285 (find_oload_champ): Use std::vector.
14286 * value.c (value_free): Use operator delete.
14287 (value_of_xmethod): Rename to...
14288 (value_from_xmethod): ... this. Don't assign
14289 xmethod_worker::value, take rvalue-reference.
14290 (result_type_of_xmethod): Adjust.
14291 (call_xmethod): Adjust.
14292 * value.h: Include extension.h.
14293 (struct xmethod_worker): Don't forward-declare.
14294 (value_of_xmethod): Rename to...
14295 (value_from_xmethod): ... this, take rvalue-reference.
14296 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14297 (struct python_xmethod_worker): ... this, add constructor and
14298 destructor.
14299 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14300 (gdbpy_free_xmethod_worker_data): Rename to...
14301 (python_xmethod_worker::~python_xmethod_worker): ... this and
14302 adjust.
14303 (gdbpy_clone_xmethod_worker_data): Rename to...
14304 (python_xmethod_worker::clone): ... this and adjust.
14305 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14306 temporary vector.
14307 (gdbpy_get_xmethod_arg_types): Rename to...
14308 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14309 (gdbpy_get_xmethod_result_type): Rename to...
14310 (python_xmethod_worker::do_get_result_type): ... this and
14311 adjust.
14312 (gdbpy_invoke_xmethod): Rename to...
14313 (python_xmethod_worker::invoke): ... this and adjust.
14314 (new_python_xmethod_worker): Rename to...
14315 (python_xmethod_worker::python_xmethod_worker): ... this and
14316 adjust.
14317 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14318 Remove.
14319 (gdbpy_free_xmethod_worker_data): Remove.
14320 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14321 (gdbpy_get_xmethod_arg_types): Remove.
14322 (gdbpy_get_xmethod_result_type): Remove.
14323 (gdbpy_invoke_xmethod): Remove.
14324 * python/python.c (python_extension_ops): Remove obsolete
14325 callbacks.
14326
14327 2018-01-05 Pedro Alves <palves@redhat.com>
14328
14329 PR gdb/18653
14330 * common/signals-state-save-restore.c
14331 (save_original_signals_state): New parameter 'quiet'. Warn if we
14332 find a custom handler preinstalled, instead of internal erroring.
14333 But only warn if !quiet.
14334 * common/signals-state-save-restore.h
14335 (save_original_signals_state): New parameter 'quiet'.
14336 * main.c (captured_main_1): Move save_original_signals_state call
14337 after option handling, and pass QUIET.
14338
14339 2018-01-05 Pedro Alves <palves@redhat.com>
14340
14341 * spu-tdep.c (spu_catch_start): Pass
14342 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14343
14344 2018-01-05 Pedro Alves <palves@redhat.com>
14345
14346 PR gdb/22670
14347 * ada-lang.c (literal_symbol_name_matcher): New function.
14348 (ada_get_symbol_name_matcher): Use it for
14349 symbol_name_match_type::SEARCH_NAME.
14350 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14351 it down instead of assuming symbol_name_match_type::FULL.
14352 * block.h (block_lookup_symbol): New parameter 'match_type'.
14353 * c-valprint.c (print_unpacked_pointer): Use
14354 lookup_symbol_search_name instead of lookup_symbol.
14355 * compile/compile-object-load.c (get_out_value_type): Pass down
14356 symbol_name_match_type::SEARCH_NAME.
14357 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14358 symbol_name_match_type::FULL.
14359 * cp-support.c (cp_get_symbol_name_matcher): Handle
14360 symbol_name_match_type::SEARCH_NAME.
14361 * infrun.c (insert_exception_resume_breakpoint): Use
14362 lookup_symbol_search_name.
14363 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14364 * psymtab.c (maintenance_check_psymtabs): Use
14365 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14366 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14367 SYMBOL_SEARCH_NAME.
14368 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14369 if symbol_name_match_type::SEARCH_NAME.
14370 (lookup_symbol_in_language): Pass down
14371 symbol_name_match_type::FULL.
14372 (lookup_symbol_search_name): New.
14373 (lookup_language_this): Pass down
14374 symbol_name_match_type::SEARCH_NAME.
14375 (lookup_symbol_aux, lookup_local_symbol): New parameter
14376 'match_type'. Pass it down.
14377 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14378 (lookup_symbol_search_name): New declaration.
14379 (lookup_symbol_in_block): New 'match_type' parameter.
14380
14381 2018-01-05 Pedro Alves <palves@redhat.com>
14382
14383 PR gdb/22670
14384 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14385 ada_lookup_symbol.
14386 (ada_lookup_symbol): Reimplement in terms of
14387 ada_lookup_symbol_list, bits factored out from
14388 ada_lookup_encoded_symbol.
14389
14390 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14391
14392 * ada-exp.y (write_object_renaming): When subscripting an array
14393 using a symbol as the index, pass the block in call to
14394 ada_lookup_encoded_symbol when looking that symbol up.
14395
14396 2018-01-05 Jerome Guitton <guitton@adacore.com>
14397
14398 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14399 TYPE_INDEX_TYPE.
14400
14401 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14402
14403 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14404 the case where VALUE_LVAL (val0) is not lval_memory.
14405
14406 2018-01-05 Xavier Roirand <roirand@adacore.com>
14407
14408 * ada-valprint.c (print_optional_low_bound): Handle
14409 character-indexed array printing like boolean-indexed array
14410 printing.
14411
14412 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14413
14414 * NEWS: Create a new section for the next release branch.
14415 Rename the section of the current branch, now that it has
14416 been cut.
14417
14418 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14419
14420 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14421 * version.in: Bump version to 8.1.50.DATE-git.
14422
14423 2018-01-03 Xavier Roirand <roirand@adacore.com>
14424
14425 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14426 Add field.
14427 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14428 Add field.
14429 (default_exception_support_info) <catch_handlers_sym>: Add field.
14430 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14431 (ada_exception_name_addr_1): Add "catch handlers" handling.
14432 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14433 Update all callers.
14434 (create_excep_cond_exprs) <ex>: Add parameter.
14435 (re_set_exception): Update create_excep_cond_exprs call.
14436 (print_it_exception, print_one_exception, print_mention_exception)
14437 (print_recreate_exception): Add "catch handler" handling.
14438 (allocate_location_catch_handlers, re_set_catch_handlers)
14439 (check_status_catch_handlers, print_it_catch_handlers)
14440 (print_one_catch_handlers, print_mention_catch_handlers)
14441 (print_recreate_catch_handlers): New function.
14442 (catch_handlers_breakpoint_ops): New variable.
14443 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14444 Add parameter. Add "catch handler" handling.
14445 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14446 Add "catch handler" handling.
14447 (ada_exception_catchpoint_cond_string): Add "catch handler"
14448 handling.
14449 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14450 call.
14451 (catch_ada_handlers_command): New function.
14452 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14453 operations structure.
14454 (_initialize_ada_language): Add "catch handlers" command entry.
14455 * NEWS: Document "catch handlers" feature.
14456
14457 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14458
14459 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14460 account when creating the array type of the slice.
14461 (ada_value_slice): Likewise.
14462
14463 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14464
14465 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14466 New enum value.
14467 (create_array_type_with_stride): Add byte_stride_prop parameter.
14468 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14469 New parameter. Update all callers in this file.
14470 (array_type_has_dynamic_stride): New function.
14471 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14472 of arrays with dynamic byte strides.
14473 * dwarf2read.c (read_array_type): Add support for dynamic
14474 DW_AT_byte_stride attributes.
14475
14476 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14477
14478 * dwarf2read.c (read_unspecified_type): Treat
14479 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14480
14481 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14482
14483 Update copyright year range in all GDB files.
14484
14485 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
14486
14487 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14488 and gdb/testsuite/gdb.base/step-line.c.
14489
14490 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14491
14492 * copyright.py (main): Dump the contents of
14493 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14494 even if BY_HAND is empty.
14495
14496 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14497
14498 * top.c (print_gdb_version): Update Copyright year in version
14499 message.
14500
14501 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14502
14503 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14504
14505 For older changes see ChangeLog-2017.
14506 \f
14507 Local Variables:
14508 mode: change-log
14509 left-margin: 8
14510 fill-column: 74
14511 version-control: never
14512 coding: utf-8
14513 End:
This page took 0.340519 seconds and 3 git commands to generate.