Use std::string in mdebugread.c
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-04 Tom Tromey <tom@tromey.com>
2
3 * mdebugread.c (parse_partial_symbols): Use std::string.
4
5 2018-10-04 Tom Tromey <tom@tromey.com>
6
7 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
8 * p-valprint.c (pascal_val_print): Split inner "i" variable.
9 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
10 header.
11 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
12 more inner scope.
13 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
14 * varobj.c (varobj_update): Rename inner "newobj",
15 "type_changed".
16 * valprint.c (generic_emit_char): Rename inner "buf".
17 * valops.c (find_overload_match): Rename inner "temp".
18 (value_struct_elt_for_reference): Declare "v" in more inner
19 scope.
20 * v850-tdep.c (v850_push_dummy_call): Rename "len".
21 * unittests/array-view-selftests.c (run_tests): Rename inner
22 "vec".
23 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
24 header.
25 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
26 "tsv" in more inner scope.
27 (print_one_static_tracepoint_marker): Rename inner
28 "tuple_emitter".
29 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
30 (tic6x_push_dummy_call): Don't redeclare "addr".
31 * target-float.c: Declare "dto" lower.
32 * symtab.c (lookup_local_symbol): Rename inner "sym".
33 (find_pc_sect_line): Rename inner "pc".
34 * stack.c (print_frame): Don't redeclare "gdbarch".
35 (return_command): Rename inner "gdbarch".
36 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
37 "sp".
38 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
39 header.
40 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
41 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
42 scope.
43 * remote.c (remote_target::update_thread_list): Don't redeclare
44 "tp".
45 (remote_target::process_initial_stop_replies): Rename inner
46 "thread".
47 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
48 (remote_target::wait_as): Don't redeclare "stop_reply".
49 (remote_target::get_thread_local_address): Rename inner
50 "result".
51 (remote_target::get_tib_address): Likewise.
52
53 * regcache.c (cooked_read_test): Rename "regnum".
54 * record-btrace.c (cmd_record_btrace_start): Rename inner
55 "exception".
56 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
57 loop header.
58 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
59 header.
60 (ppu2spu_sniffer): Rename inner "buf".
61 * parse.c (operator_check_standard): Rename inner "type",
62 "objfile".
63 * p-valprint.c (pascal_val_print): Introduce new scope for
64 "low_bound", "high_bound".
65 * p-exp.y (yylex): Declare "i" in loop header.
66 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
67 Lower declaration of "s".
68 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
69 header.
70 (nios2_push_dummy_call): Rename "len".
71 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
72 "buf".
73 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
74 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
75 (linux_xfer_osdata_modules): Likewise.
76 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
77 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
78 (mips_o64_push_dummy_call): Likewise.
79 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
80 "op".
81 * mi/mi-main.c (list_available_thread_groups): Rename inner
82 "tuple_emitter".
83 (mi_cmd_data_read_memory): Rename inner "opts".
84 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
85 "tuple_emitter".
86 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
87 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
88 more inner scope.
89 (parse_partial_symbols): Rename inner "pst", "p", "name"
90 * main.c (captured_main_1): Rename inner "i"s.
91 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
92 "oso2".
93 * linux-tdep.c (linux_info_proc): Rename inner "filename".
94 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
95 * infrun.c (handle_no_resumed): Don't redeclare "thread".
96 (handle_signal_stop): Rename inner "gdbarch".
97 (handle_command): Declare "signum" in loop header.
98 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
99 "status".
100 (examine_prologue): Rename inner "sol" and "sof".
101 (ia64_extract_return_value): Rename inner "val". Declare another
102 "val" in a more inner scope.
103 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
104 inner scope.
105 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
106 "except".
107 * findvar.c (default_read_var_value): Don't redeclare "addr".
108 * f-exp.y (yylex): Declare "i" in loop header.
109 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
110 Rename inner "type", "expect_type".
111 (evaluate_subexp_for_sizeof): Rename inner "pc".
112 * elfread.c (elf_symfile_read): Rename inner "abfd".
113 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
114 "bytes_read".
115 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
116 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
117 (dwarf_decode_line_header): Rename inner "lh".
118 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
119 "offset". Declare "i" in loop header.
120 (disassemble_dwarf_expression): Rename inner "addr_size".
121 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
122 inner "result".
123 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
124 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
125 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
126 "inner_list_emitter".
127 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
128 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
129 declaration in a block.
130 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
131 * cp-valprint.c (cp_print_value_fields): Don't redeclare
132 "obstack_final_size".
133 * cp-support.c (inspect_type): Declare "i" in loop header.
134 * compile/compile.c (compile_instance::insert_symbol_error):
135 Rename inner "e".
136 * common/agent.c (agent_run_command): Remove inner "ret"
137 declaration.
138 * coffread.c (coff_symfile_read): Rename inner "name".
139 (coff_symfile_read): Rename inner "abfd".
140 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
141 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
142 "high".
143 * c-exp.y (lex_one_token): Move "len" declaration lower.
144 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
145 "gdbarch".
146 (create_exception_master_breakpoint): Likewise. Don't redeclare
147 "b".
148 (watch_command_1): Declare "mark" later.
149 (clear_command): Don't shadow "a" or "b".
150 (delete_command): Rename inner "b".
151 (delete_trace_command): Likewise.
152 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
153 "op".
154 (arm_gdbarch_init): Remove inner "e_flags".
155 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
156 "offset" in inner blocks.
157
158 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
159
160 * dwarf-index-write.c (file_write): Don't write if the vector is
161 empty.
162
163 2018-10-05 Tom de Vries <tdevries@suse.de>
164
165 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
166 PyArg_ParseTuple call.
167
168 2018-10-05 Tom de Vries <tdevries@suse.de>
169
170 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
171 PyArg_ParseTuple call.
172
173 2018-10-04 Joel Brobecker <brobecker@adacore.com>
174
175 * psymtab.c (recursively_search_psymtabs): Reformat parameters
176 to avoid exceeding 80 characters per line limit.
177
178 2018-10-04 Tom Tromey <tom@tromey.com>
179
180 * symfile.c (syms_from_objfile_1, finish_new_objfile)
181 (reread_symbols): Update.
182 * complaints.h (clear_complaints): Remove argument.
183 * complaints.c (enum complaint_series): Remove.
184 (series): Remove global.
185 (complaint_internal): Update.
186 (clear_complaints): Remove argument.
187
188 2018-10-04 Tom Tromey <tom@tromey.com>
189
190 * symfile.c (symbol_file_add_with_addrs): Do not print "no
191 debugging symbols" message if there is a separate debug objfile.
192
193 2018-10-04 Tom Tromey <tom@tromey.com>
194
195 PR cli/19551:
196 * symfile.c (symbol_file_add_with_addrs): Update output.
197 * psymtab.c (require_partial_symbols): Update output.
198
199 2018-10-04 Tom Tromey <tom@tromey.com>
200
201 PR cli/22234:
202 * complaints.c: Emit \n.
203
204 2018-10-04 Tom Tromey <tom@tromey.com>
205
206 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
207 (separate_debug_file_exists, find_separate_debug_file)
208 (add_symbol_file_command, reread_symbols, allocate_symtab)
209 (allocate_compunit_symtab): Use filtered printing, not
210 unfiltered.
211 * psymtab.c (require_partial_symbols, dump_psymtab)
212 (allocate_psymtab): Use filtered printing, not unfiltered.
213
214 2018-10-04 Tom Tromey <tom@tromey.com>
215
216 * complaints.c (complaint_internal): Correctly check complaint
217 count.
218
219 2018-10-04 Tom Tromey <tom@tromey.com>
220
221 * complaints.h (struct complaints): Remove declaration.
222 * complaints.c (clear_complaints): Remove an unused variable.
223
224 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
225
226 * MAINTAINERS (Write After Approval): Add self.
227
228 2018-10-03 Tom Tromey <tom@tromey.com>
229
230 * guile/scm-value.c (gdbscm_value_to_string): Initialize
231 "buffer_contents".
232 * coffread.c (coff_symtab_read): Initialize "newobj".
233
234 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
235
236 * dwarf2read.c (read_func_scope): Remove struct keyword in
237 range-based for.
238
239 2018-10-03 Tom Tromey <tom@tromey.com>
240
241 * README: Mention --enable-ubsan.
242 * NEWS: Mention --enable-ubsan.
243 * acinclude.m4: Include sanitize.m4.
244 * configure: Rebuild.
245 * configure.ac: Call AM_GDB_UBSAN.
246 * sanitize.m4: New file.
247
248 2018-10-03 Tom Tromey <tom@tromey.com>
249
250 * expression.h (enum exp_opcode): Use uint8_t as base type.
251 * expprint.c (op_name): Handle invalid opcodes.
252
253 2018-10-03 Tom Tromey <tom@tromey.com>
254
255 * parse.c (prefixify_expression): Add assert.
256 (parse_exp_in_context_1): Throw exception if the expression is
257 empty.
258
259 2018-10-03 Tom Tromey <tom@tromey.com>
260
261 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
262
263 2018-10-03 Tom Tromey <tom@tromey.com>
264
265 * c-exp.y (parse_number): Work in unsigned. Remove casts.
266
267 2018-10-03 Tom Tromey <tom@tromey.com>
268
269 * dwarf2read.c (read_subrange_type): Make "negative_mask"
270 unsigned.
271
272 2018-10-03 Tom Tromey <tom@tromey.com>
273
274 * findvar.c (extract_integer): Do work in an unsigned type.
275
276 2018-10-03 Tom Tromey <tom@tromey.com>
277
278 * common/enum-flags.h (enum_flags::operator~): Add static assert.
279 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
280 base type.
281 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
282 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
283 type.
284 * c-lang.h (enum c_string_type_values): Use unsigned as base
285 type.
286 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
287
288 2018-10-03 Tom Tromey <tom@tromey.com>
289
290 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
291 <~dwarf2_frame_state_reg_info>: Update.
292 <dwarf2_frame_state_reg_info>: Update.
293 <alloc_regs>: Add assertion. Update.
294 <reg>: Now a std::vector.
295 <num_regs>: Remove.
296 <swap>: Update.
297 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
298 (execute_cfa_program_test, dwarf2_frame_cache): Update.
299
300 2018-10-03 Tom Tromey <tom@tromey.com>
301
302 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
303
304 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
305
306 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
307
308 2018-10-02 Tom Tromey <tom@tromey.com>
309
310 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
311
312 2018-10-02 John Darrington <john@darrington.wattle.id.au>
313
314 * NEWS: Mention changed commands.
315 * ser-uds.c: New file.
316 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
317 * configure: Regenerate.
318 * Makefile.in: Add new file.
319 * serial.c (serial_open): Check if filename is a socket
320 and lookup the appropriate interface accordingly.
321
322 2018-10-01 Alan Hayward <alan.hayward@arm.com>
323
324 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
325 define.
326 (AARCH64_EXTRA_MAGIC): Likewise.
327 (AARCH64_FPSIMD_MAGIC): Likewise.
328 (AARCH64_SVE_MAGIC): Likewise.
329 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
330 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
331 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
332 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
333 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
334 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
335 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
336 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
337 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
338 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
339 (read_aarch64_ctx): Add function.
340 (aarch64_linux_sigframe_init): Detect FP registers.
341
342 2018-10-01 Alan Hayward <alan.hayward@arm.com>
343
344 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
345 (AARCH64_D0_REGNUM): Likewise.
346 (AARCH64_S0_REGNUM): Likewise.
347 (AARCH64_H0_REGNUM): Likewise.
348 (AARCH64_B0_REGNUM): Likewise.
349 (AARCH64_SVE_V0_REGNUM): Likewise.
350 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
351 (AARCH64_D0_REGNUM): Likewise.
352 (AARCH64_S0_REGNUM): Likewise.
353 (AARCH64_H0_REGNUM): Likewise.
354 (AARCH64_B0_REGNUM): Likewise.
355 (AARCH64_SVE_V0_REGNUM): Likewise.
356
357 2018-10-01 Gary Benson <gbenson@redhat.com>
358
359 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
360 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
361 prfpregset_t instead of gdb_prfpregset_t.
362 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
363 * configure, config.in: Rebuild.
364
365 2018-10-01 Gary Benson <gbenson@redhat.com>
366
367 * common/gdb_proc_service.h: New file, factored out from...
368 * gdb_proc_service.h: Moved common code to the above file.
369 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
370
371 2018-10-01 Gary Benson <gbenson@redhat.com>
372
373 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
374 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
375
376 2018-10-01 Gary Benson <gbenson@redhat.com>
377
378 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
379 (AC_CHECK_HEADERS): Check for linux/elf.h.
380 * configure, config.in: Rebuild.
381 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
382 doesn't define elf_fpregset_t.
383
384 2018-10-01 Gary Benson <gbenson@redhat.com>
385
386 * gdb_proc_service.h: Whitespace change.
387
388 2018-10-01 Tom Tromey <tom@tromey.com>
389
390 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
391 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
392 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
393
394 2018-10-01 Tom Tromey <tom@tromey.com>
395
396 * README: Minor change.
397
398 2018-09-30 Pedro Alves <palves@redhat.com>
399
400 * darwin-nat-info.c (darwin_debug_regions_recurse)
401 (info_mach_exceptions_command): Remove unused local variables.
402 * darwin-nat.c (darwin_decode_notify_message)
403 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
404 (darwin_stop_inferior, darwin_setup_exceptions)
405 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
406 (darwin_nat_target::attach, darwin_nat_target::detach)
407 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
408 local variables.
409 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
410 variables.
411
412 2018-09-29 Tom Tromey <tom@tromey.com>
413
414 * README: Remove some leftover text.
415
416 2018-09-29 Tom Tromey <tom@tromey.com>
417
418 * PROBLEMS: Rewrite.
419 * README: Update.
420
421 2018-09-28 John Baldwin <jhb@FreeBSD.org>
422
423 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
424 case with explicit breakpoint kind.
425 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
426 'additional_info' and related logic.
427 (riscv_debug_breakpoints): New variable.
428 (riscv_breakpoint_kind_from_pc): Use the length of the existing
429 instruction to determine the breakpoint kind.
430 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
431 flag. Update description of 'set/show riscv
432 use-compressed-breakpoints' flag.
433
434 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
435
436 (NEWS): Mention changes to frame related commands.
437 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
438 (add_prefix_cmd_suppress_notification): New function.
439 (add_com_suppress_notification): Call
440 add_cmd_suppress_notification.
441 * command.h (add_cmd_suppress_notification): Declare.
442 (add_prefix_cmd_suppress_notification): Declare.
443 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
444 (parse_frame_specification): Moved from stack.c, with
445 simplification to handle a single argument.
446 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
447 switch to the selected frame. Add a header comment.
448 * stack.c: Remove 'safe-ctype.h' include.
449 (find_frame_for_function): Add declaration.
450 (find_frame_for_address): New function.
451 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
452 (frame_selection_by_function_completer): New function.
453 (info_frame_command): Rename to...
454 (info_frame_command_core): ...this, and update parameter types.
455 (select_frame_command): Rename to...
456 (select_frame_command_core): ...this, and update parameter types.
457 (frame_command): Rename to...
458 (frame_command_core): ...this, and update parameter types.
459 (class frame_command_helper): New class to wrap implementations of
460 frame related sub-commands.
461 (frame_apply_cmd_list): New static global.
462 (frame_cmd_list): Make static.
463 (select_frame_cmd_list): New global for sub-commands.
464 (info_frame_cmd_list): New global for sub-commands.
465 (_initialize_stack): Register sub-commands for 'frame',
466 'select-frame', and 'info frame'. Update 'frame apply' commands
467 to use frame_apply_cmd_list. Move function local static
468 frame_apply_list to file static frame_apply_cmd_list for
469 consistency.
470 * stack.h (select_frame_command): Delete declarationn.
471 (select_frame_for_mi): Declare new function.
472
473 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
474
475 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
476 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
477 and NOP.
478
479 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
480
481 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
482
483 2018-09-26 Tom Tromey <tom@tromey.com>
484
485 * valops.c (auto_abandon): Remove dead code.
486
487 2018-09-26 Tom Tromey <tom@tromey.com>
488
489 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
490
491 2018-09-24 Tom Tromey <tom@tromey.com>
492
493 * common/pathstuff.c (get_standard_cache_dir): Make
494 "xdg_cache_home" and "home" const.
495 * top.c (init_history): Make "tmpenv" const.
496 * main.c (get_init_files): Make "homedir" const.
497
498 2018-09-23 Tom Tromey <tom@tromey.com>
499
500 PR python/18852:
501 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
502
503 2018-09-23 Tom Tromey <tom@tromey.com>
504
505 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
506 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
507 * python/python-internal.h (gdbpy_handle_exception): Declare.
508 * python/py-utils.c (gdbpy_handle_exception): New function.
509
510 2018-09-23 Tom Tromey <tom@tromey.com>
511
512 PR python/17284:
513 * python/py-type.c (typy_template_argument): Check for negative
514 argument number.
515
516 2018-09-23 Tom Tromey <tom@tromey.com>
517
518 PR python/14062:
519 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
520
521 2018-09-23 Tom Tromey <tom@tromey.com>
522
523 PR python/18170:
524 * python/py-value.c (valpy_int): Allow conversion from pointer
525 type.
526
527 2018-09-23 Tom Tromey <tom@tromey.com>
528
529 PR python/20126:
530 * python/py-value.c (valpy_int): Respect type sign.
531
532 2018-09-23 Tom Tromey <tom@tromey.com>
533
534 PR python/18352;
535 * python/py-value.c (valpy_float): Allow conversions from int or
536 char.
537 (valpy_int, valpy_long): Allow conversions from float.
538
539 2018-09-23 Tom Tromey <tom@tromey.com>
540
541 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
542 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
543
544 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
545
546 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
547 __sighndlr.
548 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
549
550 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
551
552 * windows-nat.c (windows_nat_target::wait): Remove a spurious
553 target_terminal::ours().
554
555 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
556
557 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
558 of vl to ULONGEST.
559
560 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
561
562 * breakpoint.c (update_inserted_breakpoint_locations): Remove
563 redundant condition.
564
565 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
566
567 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
568
569 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
570 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
571 * sol-thread.c (ps_pdmodel): Don't guard definition.
572
573 * procfs.c: Fix formatting.
574
575 * procfs.c (sysset_t_alloc): Remove.
576 (create_procinfo): Use XNEW instead of sysset_t_alloc.
577 (procfs_debug_inferior): Likewise.
578 (procfs_set_exec_trap): Likewise.
579 (proc_set_traced_sysentry): Don't allocate argp dynamically.
580 (proc_set_traced_sysexit): Likewise.
581
582 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
583 (dead_procinfo): Likewise.
584 (proc_warn): Likewise.
585 (proc_error): Likewise.
586 (proc_get_LDT_entry): Likewise.
587 (do_attach): Likewise.
588 (procfs_target::pid_to_str): Likewise.
589 (iterate_over_mappings): Likewise.
590
591 * procfs.c (create_procinfo): Fix ARI warning.
592 (proc_get_status): Likewise.
593 (proc_stop_process): Likewise.
594 (proc_run_process): Likewise.
595 (proc_kill): Likewise.
596 (proc_get_LDT_entry): Likewise.
597 (procfs_find_LDT_entry): Likewise.
598 (proc_update_threads): Likewise.
599 (proc_iterate_over_threads): Likewise.
600 (do_attach): Likewise.
601 (procfs_xfer_memory): Likewise.
602 (invalidate_cache): Likewise.
603 (procfs_target::resume): Likewise.
604 (procfs_init_inferior): Likewise.
605 (procfs_set_exec_trap): Likewise.
606 (procfs_target::thread_alive): Likewise.
607 (procfs_target::pid_to_exec_file): Likewise.
608 (iterate_over_mappings): Likewise.
609 (procfs_target::make_corefile_notes): Likewise.
610 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
611
612 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
613 (procfs_find_LDT_entry): Likewise.
614 * sol-thread.c (ps_lgetLDT): Likewise.
615
616 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
617
618 PR tdep/17903
619 * procfs.c (procfs_target): Declare pid_to_exec_file.
620 (procfs_target::pid_to_exec_file): New.
621
622 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
623
624 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
625 renaming.
626 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
627 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
628
629 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
630
631 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
632 (supply_fpregset, fill_fpregset): Move ...
633 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
634 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
635 Remove references to ioctl-based procfs.
636 Include <sys/reg.h>.
637 Remove PR_MODEL_NATIVE guards.
638 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
639 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
640
641 2018-09-19 Xavier Roirand <roirand@adacore.com>
642
643 PR gdb/20981:
644 * solib-darwin.c (darwin_get_dyld_bfd): New function.
645 (darwin_solib_get_all_image_info_addr_at_init): Update call.
646 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
647
648 2018-09-19 John Baldwin <jhb@FreeBSD.org>
649
650 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
651 (fbsd_print_sockaddr_in6): Likewise.
652
653 2018-09-19 Richard Bunt <richard.bunt@arm.com>
654 Chris January <chris.january@arm.com>
655
656 * eval.c (skip_undetermined_arglist): Skip argument list helper.
657 (evaluate_subexp_standard): Return a dummy type when
658 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
659 OP_F77_UNDETERMINED_ARGLIST case.
660 * expression.h (enum noside): Update comment.
661
662 2018-09-19 George Vasick <george.vasick@oracle.com>
663
664 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
665
666 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
667 April Chin <april.chin@oracle.com>
668 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
669
670 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
671 uint_t lwpid_t.
672 (create_procinfo): Print pids in /proc without leading zeros.
673
674 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
675
676 * nios2-tdep.c (nios2_gcc_target_options): New.
677 (nios2_gdb_arch_init): Install new hook.
678
679 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
680
681 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
682 New file.
683 * update-gnulib.sh: Apply patch.
684 * configure: Re-generate.
685
686 2018-09-18 John Baldwin <jhb@FreeBSD.org>
687
688 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
689 description. Make "info proc" command descriptions more
690 consistent.
691
692 2018-09-18 John Baldwin <jhb@FreeBSD.org>
693
694 * NEWS: Mention 'info proc files' command.
695
696 2018-09-18 John Baldwin <jhb@FreeBSD.org>
697
698 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
699 descriptors for IP_FILES and IP_ALL.
700
701 2018-09-18 John Baldwin <jhb@FreeBSD.org>
702
703 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
704 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
705 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
706 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
707 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
708 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
709 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
710 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
711 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
712 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
713 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
714 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
715 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
716 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
717 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
718 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
719 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
720 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
721 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
722 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
723 (struct fbsd_sockaddr_un): New types.
724 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
725 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
726 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
727 (fbsd_core_info_proc_files): New functions.
728 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
729 IP_ALL.
730 * fbsd-tdep.h (fbsd_info_proc_files_header)
731 (fbsd_info_proc_files_entry): New.
732
733 2018-09-18 John Baldwin <jhb@FreeBSD.org>
734
735 * defs.h (enum info_proc_what) [IP_FILES]: New value.
736 * infcmd.c (info_proc_cmd_files): New function.
737 (_initialize_infcmd): Register 'info proc files' command.
738
739 2018-09-18 John Baldwin <jhb@FreeBSD.org>
740
741 * gnulib/aclocal-m4-deps.mk: Re-generate.
742 * gnulib/aclocal.m4: Re-generate.
743 * gnulib/config.in: Re-generate.
744 * gnulib/configure: Re-generate.
745 * gnulib/import/Makefile.am: Re-generate.
746 * gnulib/import/Makefile.in: Re-generate.
747 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
748 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
749 * gnulib/import/arpa_inet.in.h: New file.
750 * gnulib/import/inet_ntop.c: New file.
751 * gnulib/import/m4/arpa_inet_h.m4: New file.
752 * gnulib/import/m4/inet_ntop.m4: New file.
753 * gnulib/import/m4/netinet_in_h.m4: New file.
754 * gnulib/import/m4/socklen.m4: New file.
755 * gnulib/import/m4/sockpfaf.m4: New file.
756 * gnulib/import/m4/stdalign.m4: New file.
757 * gnulib/import/m4/sys_uio_h.m4: New file.
758 * gnulib/import/netinet_in.in.h: New file.
759 * gnulib/import/stdalign.in.h: New file.
760 * gnulib/import/sys_socket.c: New file.
761 * gnulib/import/sys_socket.in.h: New file.
762 * gnulib/import/sys_uio.in.h: New file.
763 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
764 module.
765
766 2018-09-18 John Baldwin <jhb@FreeBSD.org>
767
768 * gnulib/aclocal-m4-deps.mk: New file.
769 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
770 deterministically.
771
772 2018-09-18 John Baldwin <jhb@FreeBSD.org>
773
774 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
775 KVE_PATH.
776
777 2018-09-18 Tom Tromey <tom@tromey.com>
778
779 * compile/compile-object-load.c (struct
780 link_hash_table_cleanup_data): Add constructor and destructor.
781 Use DISABLE_COPY_AND_ASSIGN.
782 (~link_hash_table_cleanup_data): Rename from
783 link_hash_table_free. Now a destructor.
784 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
785
786 2018-09-18 Tom Tromey <tom@tromey.com>
787
788 * compile/compile-object-run.c (do_module_cleanup): Use delete.
789 * compile/compile-object-load.c (struct munmap_list): Move to
790 header file.
791 (munmap_list::add): Rename from munmap_list_add; rewrite.
792 (munmap_list::~munmap_list): Rename from munmap_list_free.
793 (munmap_listp_free_cleanup): Remove.
794 (compile_object_load): Update.
795 * compile/compile-object-load.h (struct munmap_list): Move from
796 compile-object-load.c. Rewrite.
797
798 2018-09-18 Alan Hayward <alan.hayward@arm.com>
799
800 * aarch64-tdep.c (pass_in_v): Use register size.
801 (aarch64_extract_return_value): Likewise.
802 (aarch64_store_return_value): Likewise.
803
804 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
805
806 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
807 rlim_t.
808
809 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
810
811 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
812 Fix short help line.
813
814 2018-09-17 Tom Tromey <tom@tromey.com>
815
816 PR python/20445:
817 * configure: Rebuild.
818 * configure.ac: Conditionally use -DNDEBUG for Python.
819
820 2018-09-17 Tom Tromey <tom@tromey.com>
821
822 * configure: Rebuild.
823 * configure.ac: Use gmp as a library dependency when checking for
824 mpfr.
825
826 2018-09-17 Pedro Alves <palves@redhat.com>
827
828 * python/py-inferior.c (find_inferior_object): Delete.
829
830 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
831
832 * compile/compile-cplus-types.c
833 (compile_cplus_instance::enter_scope): Don't use new_scope after
834 std::move.
835
836 2018-09-17 Tom Tromey <tom@tromey.com>
837
838 * common/pathstuff.c (get_standard_cache_dir): Use
839 ~/Library/Caches on macOS.
840 * common/pathstuff.h (get_standard_cache_dir): Update comment.
841
842 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
843
844 PR python/23669
845 * breakpoint.c (commands_cmd_element): New.
846 (_initialize_breakpoint): Assign commands_cmd_element.
847 * breakpoint.h (commands_cmd_element): New.
848 * cli/cli-script.c (while_cmd_element, if_command,
849 define_cmd_element): New.
850 (command_name_equals): Remove.
851 (process_next_line): Compare commands by pointer, not by name.
852 (_initialize_cli_script): Assign the various cmd_list_element
853 variables.
854 * compile/compile.c (compile_cmd_element): New.
855 (_initialize_compile): Assign compile_cmd_element.
856 * compile/compile.h (compile_cmd_element): New.
857 * guile/guile.c (guile_cmd_element): New.
858 (install_gdb_commands): Assign guile_cmd_element.
859 * guile/guile.h (guile_cmd_element): New.
860 * python/python.c (python_cmd_element): New.
861 (_initialize_python): Assign python_cmd_element.
862 * python/python.h (python_cmd_element): New.
863 * tracepoint.c (while_stepping_cmd_element): New.
864 (_initialize_tracepoint): Assign while_stepping_cmd_element.
865 * tracepoint.h (while_stepping_cmd_element): New.
866
867 2018-09-17 Tom Tromey <tom@tromey.com>
868
869 * infrun.c (save_infcall_suspend_state): Return
870 infcall_suspend_state_up.
871 (save_infcall_control_state): Return infcall_control_state_up.
872 * inferior.h (save_infcall_suspend_state)
873 (save_infcall_control_state): Declare later. Return unique
874 pointers.
875
876 2018-09-17 Tom Tromey <tom@tromey.com>
877
878 * infrun.c (struct stop_context): Declare constructor,
879 destructor, "changed" method.
880 (stop_context::stop_context): Rename from save_stop_context.
881 (stop_context::~stop_context): Rename from
882 release_stop_context_cleanup.
883 (normal_stop): Update.
884 (stop_context::changed): Rename from stop_context_changed. Return
885 bool.
886
887 2018-09-17 Tom Tromey <tom@tromey.com>
888
889 * inferior.h (struct infcall_suspend_state_deleter): New.
890 (infcall_suspend_state_up): New typedef.
891 (struct infcall_control_state_deleter): New.
892 (infcall_control_state_up): New typedef.
893 (make_cleanup_restore_infcall_suspend_state)
894 (make_cleanup_restore_infcall_control_state): Don't declare.
895 * infcall.c (call_function_by_hand_dummy): Update.
896 * infrun.c (do_restore_infcall_suspend_state_cleanup)
897 (make_cleanup_restore_infcall_suspend_state): Remove.
898 (do_restore_infcall_control_state_cleanup)
899 (make_cleanup_restore_infcall_control_state): Remove.
900
901 2018-09-17 Tom Tromey <tom@tromey.com>
902
903 * gdbthread.h (struct thread_control_state): Add initializer.
904 (class thread_info) <control>: Remove initializer.
905 * inferior.h (struct inferior_control_state): Add initializer.
906 (class inferior) <control>: Remove initializer.
907 (exit_inferior_1): Update.
908 * infrun.c (struct infcall_control_state): Add constructors.
909 (save_infcall_control_state): Use new.
910 (restore_infcall_control_state, discard_infcall_control_state):
911 Use delete.
912
913 2018-09-17 Tom Tromey <tom@tromey.com>
914
915 * infrun.c (struct infcall_suspend_state) <registers>: Now a
916 unique_ptr.
917 <siginfo_data>: Now a unique_xmalloc_ptr.
918 (save_infcall_suspend_state, restore_infcall_suspend_state)
919 (discard_infcall_suspend_state)
920 (get_infcall_suspend_state_regcache): Update.
921
922 2018-09-17 Tom Tromey <tom@tromey.com>
923
924 * gdbthread.h (struct thread_suspend_state): Add initializers.
925 (class thread_info) <suspend>: Remove initializer.
926 * infrun.c (struct infcall_suspend_state): Add initializers.
927 (save_infcall_suspend_state): Use new.
928 (discard_infcall_suspend_state): Use delete.
929
930 2018-09-16 Tom Tromey <tom@tromey.com>
931
932 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
933 Remove.
934 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
935 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
936 (py_varobj_iter_new): Likewise.
937 (py_varobj_get_iterator): Use gdbpy_ref.
938
939 2018-09-16 Tom Tromey <tom@tromey.com>
940
941 * python/py-threadevent.c (py_get_event_thread): Simplify.
942 * python/py-inferior.c (infpy_thread_from_thread_handle):
943 Return immediately after calling thread_to_thread_object. Use
944 Py_RETURN_NONE.
945 (thread_to_thread_object): Set the exception on a NULL return.
946
947 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
948
949 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
950
951 2018-09-16 Tom Tromey <tom@tromey.com>
952
953 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
954 Remove.
955
956 2018-09-16 Tom Tromey <tom@tromey.com>
957
958 * python/python-internal.h (thread_to_thread_object): Change
959 return type.
960 * python/py-inferior.c (thread_to_thread_object): Return a new
961 reference.
962 (infpy_thread_from_thread_handle): Update.
963 * python/py-infthread.c (gdbpy_selected_thread): Update.
964 * python/py-stopevent.c (create_stop_event_object): Update.
965 * python/py-threadevent.c (py_get_event_thread): Return a new
966 reference.
967 (py_get_event_thread): Update.
968 * python/py-event.h (py_get_event_thread): Change return type.
969 * python/py-continueevent.c (create_continue_event_object):
970 Update.
971
972 2018-09-16 Tom Tromey <tom@tromey.com>
973
974 * python/py-progspace.c (pspy_get_objfiles): Update.
975 * python/python-internal.h (objfile_to_objfile_object): Change
976 return type.
977 * python/py-newobjfileevent.c (create_new_objfile_event_object):
978 Update.
979 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
980 Update.
981 * python/python.c (gdbpy_get_current_objfile): Update.
982 (gdbpy_objfiles): Update.
983 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
984 Update.
985 (objfile_to_objfile_object): Return a new reference.
986 * python/py-symtab.c (stpy_get_objfile): Update.
987 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
988 Update.
989
990 2018-09-16 Tom Tromey <tom@tromey.com>
991
992 * python/py-inferior.c (infpy_get_progspace): Update.
993 * python/python-internal.h (pspace_to_pspace_object): Change
994 return type.
995 * python/py-newobjfileevent.c
996 (create_clear_objfiles_event_object): Update.
997 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
998 Update.
999 * python/python.c (gdbpy_get_current_progspace): Update.
1000 (gdbpy_progspaces): Update.
1001 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1002 reference.
1003 * python/py-objfile.c (objfpy_get_progspace): Update.
1004 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1005 Update.
1006
1007 2018-09-16 Tom Tromey <tom@tromey.com>
1008
1009 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1010 (solib_name, block_for_pc, find_pc_line): New functions.
1011 (execute_unwinders): Update.
1012 * python/py-block.c (gdbpy_block_for_pc): Remove.
1013 * python/py-inferior.c (infpy_get_progspace): New function.
1014 (inferior_object_getset) <progspace>: Add.
1015 * python/py-progspace.c (pspy_objfiles): Rewrite.
1016 (pspy_solib_name, pspy_block_for_pc)
1017 (pspy_find_pc_line, pspy_is_valid): New functions.
1018 (progspace_object_methods): Add entries for solib_name,
1019 block_for_pc, find_pc_line, is_valid.
1020 * python/python-internal.h (gdbpy_block_for_pc)
1021 (build_objfiles_list): Don't declare.
1022 * python/python.c: Don't include solib.h.
1023 (gdbpy_solib_name, gdbpy_find_pc_line)
1024 (gdbpy_get_current_progspace, build_objfiles_list)
1025 (gdbpy_objfiles): Remove.
1026 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1027 solib_name, find_pc_line>: Remove entries.
1028
1029 2018-09-16 Tom Tromey <tom@tromey.com>
1030
1031 * top.c (new_ui_command): Use GNU style for metasyntactic
1032 variables.
1033 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1034 variables.
1035 * maint.c (maintenance_translate_address): Remove "<>" around
1036 text.
1037 * interps.c (interpreter_exec_cmd): Use GNU style for
1038 metasyntactic variables.
1039 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1040 metasyntactic variables.
1041 * tracepoint.c (tfind_range_command): Use GNU style for
1042 metasyntactic variables.
1043 (tfind_outside_command): Likewise.
1044 (_initialize_tracepoint): Likewise.
1045 * remote.c (extended_remote_target::create_inferior): Use GNU
1046 style for metasyntactic variables.
1047 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1048 metasyntactic variables.
1049 (adi_assign_command): Likewise.
1050
1051 2018-09-16 Tom Tromey <tom@tromey.com>
1052
1053 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1054 metasyntactic variables. Print message if no disassembler options
1055 are available.
1056
1057 2018-09-15 Tom Tromey <tom@tromey.com>
1058
1059 * infcmd.c (get_inferior_args): Return const char *.
1060 * inferior.h (get_inferior_args): Return type now const.
1061 * linux-tdep.c (linux_fill_prpsinfo): Update.
1062 * procfs.c (procfs_target::make_corefile_notes): Update.
1063
1064 2018-09-07 Tom Tromey <tom@tromey.com>
1065
1066 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1067 inside the TRY.
1068
1069 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1070
1071 * nios2-tdep.c (nios2_type_align): New.
1072 (nios2_gdb_arch_init): Install type_align hook.
1073
1074 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1075
1076 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1077 type that is neither object file owned, nor gdbarch owned.
1078 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1079 gdbarch is non-NULL.
1080 (alloc_type_instance): Allocate non-objfile owned types on the
1081 gdbarch obstack.
1082 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1083 using TYPE_ALLOC to ensure memory is allocated on the correct
1084 obstack.
1085 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1086 obstack, or the gdbarch obstack.
1087 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1088
1089 2018-09-14 Tom Tromey <tom@tromey.com>
1090
1091 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1092 block.
1093
1094 2018-09-14 Tom Tromey <tom@tromey.com>
1095
1096 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1097
1098 2018-09-13 Tom Tromey <tom@tromey.com>
1099
1100 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1101 static.
1102
1103 2018-09-13 Tom Tromey <tom@tromey.com>
1104
1105 * exec.c (try_open_exec_file): Use std::string.
1106
1107 2018-09-13 Tom Tromey <tom@tromey.com>
1108
1109 * utils.h (gdb_bfd_errmsg): Return std::string.
1110 * exec.c (exec_file_attach): Update.
1111 * compile/compile-object-load.c (compile_object_load): Update.
1112 * utils.c (gdb_bfd_errmsg): Return std::string.
1113
1114 2018-09-13 Tom Tromey <tom@tromey.com>
1115
1116 * procfs.c (struct procinfo_deleter): New.
1117 (procinfo_up): New typedef.
1118 (do_destroy_procinfo_cleanup): Remove.
1119 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1120
1121 2018-09-13 Tom Tromey <tom@tromey.com>
1122
1123 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1124
1125 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1126 2018-09-13 Tom Tromey <tom@tromey.com>
1127
1128 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1129 (pspy_get_objfiles): New function.
1130 (progspace_object_methods): New.
1131 (pspace_object_type): Add tp_methods callback.
1132 * python/python-internal.h (build_objfiles_list): New
1133 declaration.
1134 * python/python.c (build_objfiles_list): New function.
1135 (gdbpy_objfiles): Implement using build_objfiles_list.
1136 * NEWS: Mention the Progspace.objfiles method.
1137
1138 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1139
1140 * python/py-inferior.c (infpy_get_progspace): New function.
1141 (inferior_object_getset): Add progspace property.
1142 * NEWS: Mention the new property.
1143
1144 2018-09-13 Tom Tromey <tom@tromey.com>
1145
1146 PR rust/23650:
1147 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1148
1149 2018-09-13 Tom Tromey <tom@tromey.com>
1150
1151 PR rust/23626:
1152 * rust-lang.c (rust_enum_variant): Now static.
1153 (rust_empty_enum_p): New function.
1154 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1155 Handle empty enum.
1156
1157 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1158
1159 * python/py-inferior.c (infpy_repr): New.
1160 (inferior_object_type): Register infpy_repr.
1161 * python/py-objfile.c (objfpy_repr): New.
1162 (objfile_object_type): Register objfpy_repr.
1163
1164 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1165
1166 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1167
1168 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1169
1170 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1171 typo.
1172
1173 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1174
1175 * common/common-utils.c: Don't include '<sys/stat.h>'.
1176 (is_regular_file): Move to...
1177 * common/filestuff.c (is_regular_file): ... here.
1178 * common/common-utils.h (is_regular_file): Move to...
1179 * common/filestuff.h (is_regular_file): ... here.
1180
1181 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1182
1183 * skip.c (debug_skip): New variable.
1184 (skiplist_entry::do_skip_file_p): Add debug output.
1185 (skiplist_entry::do_skip_gfile_p): Likewise.
1186 (skiplist_entry::skip_function_p): Likewise.
1187 (_initialize_step_skip): Create debug command.
1188 * NEWS: Mention set/show debug skip.
1189
1190 2018-09-11 Xavier Roirand <roirand@adacore.com>
1191
1192 * darwin-nat.c (should_disable_startup_with_shell):
1193 New function.
1194 (darwin_nat_target::create_inferior): Add call.
1195
1196 2018-09-11 Xavier Roirand <roirand@adacore.com>
1197
1198 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1199 inf_port, msg_state>: Initialize.
1200 (struct darwin_thread_info) <signaled, single_step>: Change
1201 type and initialize.
1202 (struct darwin_thread_info) <event>: Initialize.
1203
1204 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1205
1206 PR gdb/23555
1207 PR gdb/23558
1208 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1209 guesses.
1210
1211 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1212
1213 Revert:
1214 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1215
1216 PR gdb/23555
1217 PR gdb/23558
1218 * gnulib/aclocal.m4: Regenerate.
1219 * gnulib/config.in: Regenerate.
1220 * gnulib/configure: Regenerate.
1221 * gnulib/import/Makefile.am: Update.
1222 * gnulib/import/Makefile.in: Update.
1223 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1224 * gnulib/import/_Noreturn.h: ... this.
1225 * gnulib/import/alloca.in.h: Update.
1226 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1227 * gnulib/import/arg-nonnull.h: ... this.
1228 * gnulib/import/assure.h: Update.
1229 * gnulib/import/at-func.c: Update.
1230 * gnulib/import/basename-lgpl.c: Update.
1231 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1232 * gnulib/import/c++defs.h: ... this.
1233 * gnulib/import/canonicalize-lgpl.c: Update.
1234 * gnulib/import/cdefs.h: Update.
1235 * gnulib/import/chdir-long.c: Update.
1236 * gnulib/import/chdir-long.h: Update.
1237 * gnulib/import/cloexec.c: Update.
1238 * gnulib/import/cloexec.h: Update.
1239 * gnulib/import/close.c: Update.
1240 * gnulib/import/closedir.c: Update.
1241 * gnulib/import/config.charset: Update.
1242 * gnulib/import/dirent-private.h: Update.
1243 * gnulib/import/dirent.in.h: Update.
1244 * gnulib/import/dirfd.c: Update.
1245 * gnulib/import/dirname-lgpl.c: Update.
1246 * gnulib/import/dirname.h: Update.
1247 * gnulib/import/dosname.h: Update.
1248 * gnulib/import/dup-safer-flag.c: Update.
1249 * gnulib/import/dup-safer.c: Update.
1250 * gnulib/import/dup.c: Update.
1251 * gnulib/import/dup2.c: Update.
1252 * gnulib/import/errno.in.h: Update.
1253 * gnulib/import/error.c: Update.
1254 * gnulib/import/error.h: Update.
1255 * gnulib/import/exitfail.c: Update.
1256 * gnulib/import/exitfail.h: Update.
1257 * gnulib/import/extra/update-copyright: Update.
1258 * gnulib/import/fchdir.c: Update.
1259 * gnulib/import/fcntl.c: Update.
1260 * gnulib/import/fcntl.in.h: Update.
1261 * gnulib/import/fd-hook.c: Update.
1262 * gnulib/import/fd-hook.h: Update.
1263 * gnulib/import/fd-safer-flag.c: Update.
1264 * gnulib/import/fd-safer.c: Update.
1265 * gnulib/import/fdopendir.c: Update.
1266 * gnulib/import/filename.h: Update.
1267 * gnulib/import/filenamecat-lgpl.c: Update.
1268 * gnulib/import/filenamecat.h: Update.
1269 * gnulib/import/flexmember.h: Update.
1270 * gnulib/import/float+.h: Update.
1271 * gnulib/import/float.c: Update.
1272 * gnulib/import/float.in.h: Update.
1273 * gnulib/import/fnmatch.c: Update.
1274 * gnulib/import/fnmatch.in.h: Update.
1275 * gnulib/import/fnmatch_loop.c: Update.
1276 * gnulib/import/fpucw.h: Update.
1277 * gnulib/import/frexp.c: Update.
1278 * gnulib/import/frexpl.c: Update.
1279 * gnulib/import/fstat.c: Update.
1280 * gnulib/import/fstatat.c: Update.
1281 * gnulib/import/getcwd-lgpl.c: Update.
1282 * gnulib/import/getcwd.c: Update.
1283 * gnulib/import/getdtablesize.c: Update.
1284 * gnulib/import/getlogin_r.c: Update.
1285 * gnulib/import/getprogname.c: Update.
1286 * gnulib/import/getprogname.h: Update.
1287 * gnulib/import/gettext.h: Update.
1288 * gnulib/import/gettimeofday.c: Update.
1289 * gnulib/import/glob-libc.h: Update.
1290 * gnulib/import/glob.c: Update.
1291 * gnulib/import/glob.in.h: Update.
1292 * gnulib/import/glob_internal.h: Update.
1293 * gnulib/import/glob_pattern_p.c: Update.
1294 * gnulib/import/globfree.c: Update.
1295 * gnulib/import/hard-locale.c: Update.
1296 * gnulib/import/hard-locale.h: Update.
1297 * gnulib/import/intprops.h: Update.
1298 * gnulib/import/inttypes.in.h: Update.
1299 * gnulib/import/isnan.c: Update.
1300 * gnulib/import/isnand-nolibm.h: Update.
1301 * gnulib/import/isnand.c: Update.
1302 * gnulib/import/isnanl-nolibm.h: Update.
1303 * gnulib/import/isnanl.c: Update.
1304 * gnulib/import/itold.c: Update.
1305 * gnulib/import/libc-config.h: Update.
1306 * gnulib/import/limits.in.h: Update.
1307 * gnulib/import/localcharset.c: Update.
1308 * gnulib/import/localcharset.h: Update.
1309 * gnulib/import/localtime-buffer.c: Update.
1310 * gnulib/import/localtime-buffer.h: Update.
1311 * gnulib/import/lstat.c: Update.
1312 * gnulib/import/m4/00gnulib.m4: Update.
1313 * gnulib/import/m4/__inline.m4: Update.
1314 * gnulib/import/m4/absolute-header.m4: Update.
1315 * gnulib/import/m4/alloca.m4: Update.
1316 * gnulib/import/m4/builtin-expect.m4: Update.
1317 * gnulib/import/m4/canonicalize.m4: Update.
1318 * gnulib/import/m4/chdir-long.m4: Update.
1319 * gnulib/import/m4/close.m4: Update.
1320 * gnulib/import/m4/closedir.m4: Update.
1321 * gnulib/import/m4/configmake.m4: Update.
1322 * gnulib/import/m4/d-ino.m4: Update.
1323 * gnulib/import/m4/d-type.m4: Update.
1324 * gnulib/import/m4/dirent_h.m4: Update.
1325 * gnulib/import/m4/dirfd.m4: Update.
1326 * gnulib/import/m4/dirname.m4: Update.
1327 * gnulib/import/m4/double-slash-root.m4: Update.
1328 * gnulib/import/m4/dup.m4: Update.
1329 * gnulib/import/m4/dup2.m4: Update.
1330 * gnulib/import/m4/eealloc.m4: Update.
1331 * gnulib/import/m4/environ.m4: Update.
1332 * gnulib/import/m4/errno_h.m4: Update.
1333 * gnulib/import/m4/error.m4: Update.
1334 * gnulib/import/m4/exponentd.m4: Update.
1335 * gnulib/import/m4/exponentl.m4: Update.
1336 * gnulib/import/m4/extensions.m4: Update.
1337 * gnulib/import/m4/extern-inline.m4: Update.
1338 * gnulib/import/m4/fchdir.m4: Update.
1339 * gnulib/import/m4/fcntl-o.m4: Update.
1340 * gnulib/import/m4/fcntl.m4: Update.
1341 * gnulib/import/m4/fcntl_h.m4: Update.
1342 * gnulib/import/m4/fdopendir.m4: Update.
1343 * gnulib/import/m4/filenamecat.m4: Update.
1344 * gnulib/import/m4/flexmember.m4: Update.
1345 * gnulib/import/m4/float_h.m4: Update.
1346 * gnulib/import/m4/fnmatch.m4: Update.
1347 * gnulib/import/m4/fnmatch_h.m4: Update.
1348 * gnulib/import/m4/fpieee.m4: Update.
1349 * gnulib/import/m4/frexp.m4: Update.
1350 * gnulib/import/m4/frexpl.m4: Update.
1351 * gnulib/import/m4/fstat.m4: Update.
1352 * gnulib/import/m4/fstatat.m4: Update.
1353 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1354 * gnulib/import/m4/getcwd-path-max.m4: Update.
1355 * gnulib/import/m4/getcwd.m4: Update.
1356 * gnulib/import/m4/getdtablesize.m4: Update.
1357 * gnulib/import/m4/getlogin.m4: Update.
1358 * gnulib/import/m4/getlogin_r.m4: Update.
1359 * gnulib/import/m4/getpagesize.m4: Update.
1360 * gnulib/import/m4/getprogname.m4: Update.
1361 * gnulib/import/m4/gettimeofday.m4: Update.
1362 * gnulib/import/m4/glibc21.m4: Update.
1363 * gnulib/import/m4/glob.m4: Update.
1364 * gnulib/import/m4/glob_h.m4: Update.
1365 * gnulib/import/m4/gnulib-cache.m4: Update.
1366 * gnulib/import/m4/gnulib-common.m4: Update.
1367 * gnulib/import/m4/gnulib-comp.m4: Update.
1368 * gnulib/import/m4/gnulib-tool.m4: Update.
1369 * gnulib/import/m4/hard-locale.m4: Update.
1370 * gnulib/import/m4/include_next.m4: Update.
1371 * gnulib/import/m4/inttypes-pri.m4: Update.
1372 * gnulib/import/m4/inttypes.m4: Update.
1373 * gnulib/import/m4/isnand.m4: Update.
1374 * gnulib/import/m4/isnanl.m4: Update.
1375 * gnulib/import/m4/largefile.m4: Update.
1376 * gnulib/import/m4/limits-h.m4: Update.
1377 * gnulib/import/m4/localcharset.m4: Update.
1378 * gnulib/import/m4/locale-fr.m4: Update.
1379 * gnulib/import/m4/locale-ja.m4: Update.
1380 * gnulib/import/m4/locale-zh.m4: Update.
1381 * gnulib/import/m4/localtime-buffer.m4: Update.
1382 * gnulib/import/m4/longlong.m4: Update.
1383 * gnulib/import/m4/lstat.m4: Update.
1384 * gnulib/import/m4/malloc.m4: Update.
1385 * gnulib/import/m4/malloca.m4: Update.
1386 * gnulib/import/m4/math_h.m4: Update.
1387 * gnulib/import/m4/mbrtowc.m4: Update.
1388 * gnulib/import/m4/mbsinit.m4: Update.
1389 * gnulib/import/m4/mbsrtowcs.m4: Update.
1390 * gnulib/import/m4/mbstate_t.m4: Update.
1391 * gnulib/import/m4/memchr.m4: Update.
1392 * gnulib/import/m4/memmem.m4: Update.
1393 * gnulib/import/m4/mempcpy.m4: Update.
1394 * gnulib/import/m4/memrchr.m4: Update.
1395 * gnulib/import/m4/mkdir.m4: Update.
1396 * gnulib/import/m4/mkstemp.m4: Update.
1397 * gnulib/import/m4/mmap-anon.m4: Update.
1398 * gnulib/import/m4/mode_t.m4: Update.
1399 * gnulib/import/m4/msvc-inval.m4: Update.
1400 * gnulib/import/m4/msvc-nothrow.m4: Update.
1401 * gnulib/import/m4/multiarch.m4: Update.
1402 * gnulib/import/m4/nocrash.m4: Update.
1403 * gnulib/import/m4/off_t.m4: Update.
1404 * gnulib/import/m4/onceonly.m4: Update.
1405 * gnulib/import/m4/open-cloexec.m4: Update.
1406 * gnulib/import/m4/open.m4: Update.
1407 * gnulib/import/m4/openat.m4: Update.
1408 * gnulib/import/m4/opendir.m4: Update.
1409 * gnulib/import/m4/pathmax.m4: Update.
1410 * gnulib/import/m4/rawmemchr.m4: Update.
1411 * gnulib/import/m4/readdir.m4: Update.
1412 * gnulib/import/m4/readlink.m4: Update.
1413 * gnulib/import/m4/realloc.m4: Update.
1414 * gnulib/import/m4/rename.m4: Update.
1415 * gnulib/import/m4/rewinddir.m4: Update.
1416 * gnulib/import/m4/rmdir.m4: Update.
1417 * gnulib/import/m4/save-cwd.m4: Update.
1418 * gnulib/import/m4/secure_getenv.m4: Update.
1419 * gnulib/import/m4/setenv.m4: Update.
1420 * gnulib/import/m4/signal_h.m4: Update.
1421 * gnulib/import/m4/ssize_t.m4: Update.
1422 * gnulib/import/m4/stat-time.m4: Update.
1423 * gnulib/import/m4/stat.m4: Update.
1424 * gnulib/import/m4/std-gnu11.m4: Update.
1425 * gnulib/import/m4/stdbool.m4: Update.
1426 * gnulib/import/m4/stddef_h.m4: Update.
1427 * gnulib/import/m4/stdint.m4: Update.
1428 * gnulib/import/m4/stdio_h.m4: Update.
1429 * gnulib/import/m4/stdlib_h.m4: Update.
1430 * gnulib/import/m4/strchrnul.m4: Update.
1431 * gnulib/import/m4/strdup.m4: Update.
1432 * gnulib/import/m4/strerror.m4: Update.
1433 * gnulib/import/m4/string_h.m4: Update.
1434 * gnulib/import/m4/strstr.m4: Update.
1435 * gnulib/import/m4/strtok_r.m4: Update.
1436 * gnulib/import/m4/sys_socket_h.m4: Update.
1437 * gnulib/import/m4/sys_stat_h.m4: Update.
1438 * gnulib/import/m4/sys_time_h.m4: Update.
1439 * gnulib/import/m4/sys_types_h.m4: Update.
1440 * gnulib/import/m4/tempname.m4: Update.
1441 * gnulib/import/m4/time_h.m4: Update.
1442 * gnulib/import/m4/unistd-safer.m4: Update.
1443 * gnulib/import/m4/unistd_h.m4: Update.
1444 * gnulib/import/m4/warn-on-use.m4: Update.
1445 * gnulib/import/m4/wchar_h.m4: Update.
1446 * gnulib/import/m4/wchar_t.m4: Update.
1447 * gnulib/import/m4/wctype_h.m4: Update.
1448 * gnulib/import/m4/wint_t.m4: Update.
1449 * gnulib/import/malloc.c: Update.
1450 * gnulib/import/malloc/scratch_buffer.h: Update.
1451 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1452 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1453 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1454 * gnulib/import/malloca.c: Update.
1455 * gnulib/import/malloca.h: Update.
1456 * gnulib/import/malloca.valgrind: Update.
1457 * gnulib/import/math.in.h: Update.
1458 * gnulib/import/mbrtowc.c: Update.
1459 * gnulib/import/mbsinit.c: Update.
1460 * gnulib/import/mbsrtowcs-impl.h: Update.
1461 * gnulib/import/mbsrtowcs-state.c: Update.
1462 * gnulib/import/mbsrtowcs.c: Update.
1463 * gnulib/import/memchr.c: Update.
1464 * gnulib/import/memmem.c: Update.
1465 * gnulib/import/mempcpy.c: Update.
1466 * gnulib/import/memrchr.c: Update.
1467 * gnulib/import/mkdir.c: Update.
1468 * gnulib/import/mkstemp.c: Update.
1469 * gnulib/import/msvc-inval.c: Update.
1470 * gnulib/import/msvc-inval.h: Update.
1471 * gnulib/import/msvc-nothrow.c: Update.
1472 * gnulib/import/msvc-nothrow.h: Update.
1473 * gnulib/import/open.c: Update.
1474 * gnulib/import/openat-die.c: Update.
1475 * gnulib/import/openat-priv.h: Update.
1476 * gnulib/import/openat-proc.c: Update.
1477 * gnulib/import/openat.c: Update.
1478 * gnulib/import/openat.h: Update.
1479 * gnulib/import/opendir.c: Update.
1480 * gnulib/import/pathmax.h: Update.
1481 * gnulib/import/pipe-safer.c: Update.
1482 * gnulib/import/rawmemchr.c: Update.
1483 * gnulib/import/readdir.c: Update.
1484 * gnulib/import/readlink.c: Update.
1485 * gnulib/import/realloc.c: Update.
1486 * gnulib/import/ref-add.sin: Update.
1487 * gnulib/import/ref-del.sin: Update.
1488 * gnulib/import/rename.c: Update.
1489 * gnulib/import/rewinddir.c: Update.
1490 * gnulib/import/rmdir.c: Update.
1491 * gnulib/import/same-inode.h: Update.
1492 * gnulib/import/save-cwd.c: Update.
1493 * gnulib/import/save-cwd.h: Update.
1494 * gnulib/import/scratch_buffer.h: Update.
1495 * gnulib/import/secure_getenv.c: Update.
1496 * gnulib/import/setenv.c: Update.
1497 * gnulib/import/signal.in.h: Update.
1498 * gnulib/import/stat-time.c: Update.
1499 * gnulib/import/stat-time.h: Update.
1500 * gnulib/import/stat-w32.c: Update.
1501 * gnulib/import/stat-w32.h: Update.
1502 * gnulib/import/stat.c: Update.
1503 * gnulib/import/stdbool.in.h: Update.
1504 * gnulib/import/stddef.in.h: Update.
1505 * gnulib/import/stdint.in.h: Update.
1506 * gnulib/import/stdio.in.h: Update.
1507 * gnulib/import/stdlib.in.h: Update.
1508 * gnulib/import/str-two-way.h: Update.
1509 * gnulib/import/strchrnul.c: Update.
1510 * gnulib/import/strdup.c: Update.
1511 * gnulib/import/streq.h: Update.
1512 * gnulib/import/strerror-override.c: Update.
1513 * gnulib/import/strerror-override.h: Update.
1514 * gnulib/import/strerror.c: Update.
1515 * gnulib/import/string.in.h: Update.
1516 * gnulib/import/stripslash.c: Update.
1517 * gnulib/import/strnlen1.c: Update.
1518 * gnulib/import/strnlen1.h: Update.
1519 * gnulib/import/strstr.c: Update.
1520 * gnulib/import/strtok_r.c: Update.
1521 * gnulib/import/sys_stat.in.h: Update.
1522 * gnulib/import/sys_time.in.h: Update.
1523 * gnulib/import/sys_types.in.h: Update.
1524 * gnulib/import/tempname.c: Update.
1525 * gnulib/import/tempname.h: Update.
1526 * gnulib/import/time.in.h: Update.
1527 * gnulib/import/unistd--.h: Update.
1528 * gnulib/import/unistd-safer.h: Update.
1529 * gnulib/import/unistd.in.h: Update.
1530 * gnulib/import/unsetenv.c: Update.
1531 * gnulib/import/verify.h: Update.
1532 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1533 * gnulib/import/wchar.in.h: Update.
1534 * gnulib/import/wctype.in.h: Update.
1535 * gnulib/import/xalloc-oversized.h: Update.
1536 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1537 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1538
1539 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1540
1541 * record-btrace.c (get_thread_current_frame): Remove
1542 old_inferior_ptid.
1543
1544 2018-09-10 Jerome Guitton <guitton@adacore.com>
1545
1546 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1547 with check_tag to 1 if and only if the type is tagged and the
1548 component being searched cannot been found in the current
1549 view. Otherwise, always call ada_to_fixed_type with
1550 check_tag to 0.
1551
1552 2018-09-10 Xavier Roirand <roirand@adacore.com>
1553
1554 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1555 declaration.
1556 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1557 * ada-varobj.c (ada_varobj_get_number_of_children,
1558 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1559
1560 2018-09-10 Xavier Roirand <roirand@adacore.com>
1561
1562 * ada-valprint.c (ada_value_print): Use type instead of
1563 enclosing type.
1564
1565 2018-09-10 Xavier Roirand <roirand@adacore.com>
1566
1567 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1568 an array of access to unconstrained array.
1569
1570 2018-09-10 Xavier Roirand <roirand@adacore.com>
1571
1572 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1573 (ada_check_typedef): Use it.
1574
1575 2018-09-10 Xavier Roirand <roirand@adacore.com>
1576
1577 * ada-varobj.c (ada_varobj_describe_struct_child)
1578 (ada_varobj_describe_child): Handle union case like struct one.
1579
1580 2018-09-10 Tom Tromey <tom@tromey.com>
1581
1582 PR python/18380:
1583 * python/python.c (_initialize_python): Make example in "python"
1584 help work in Python 3.
1585
1586 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1587
1588 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1589 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1590 $(EXEEXT) to the script, as it is not a program.
1591
1592 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1593
1594 * python/py-prettyprint.c (pretty_print_one_value): Return
1595 gdbpy_ref<>.
1596 (print_string_repr): Adjust.
1597 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1598 * python/python-internal.h (apply_varobj_pretty_printer): Return
1599 gdbpy_ref<>.
1600 * varobj.c (varobj_value_get_print_value): Adjust.
1601
1602 2018-09-08 Tom Tromey <tom@tromey.com>
1603
1604 PR python/16047:
1605 * python/py-prettyprint.c (pretty_print_one_value): Check for
1606 to_string method.
1607
1608 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1609
1610 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1611 replace_operator_with_call.
1612
1613 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1614
1615 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1616
1617 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1618
1619 * ada-typeprint.c (print_range): Print the bounds using TYPE
1620 rather than its TYPE_TARGET_TYPE.
1621
1622 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1623
1624 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1625 call to ada_to_fixed_value_create.
1626
1627 2018-09-08 Jerome Guitton <guitton@adacore.com>
1628
1629 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1630
1631 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1632
1633 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1634 by calls to error.
1635
1636 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1637
1638 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1639 Move update of loop variable "fi".
1640
1641 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1642
1643 * ada-lang.c (value_assign_to_component): In the case of
1644 big-endian targets, extract the bits of the given VAL
1645 using an src_offset of zero if container is not a scalar.
1646
1647 2018-09-06 Simon Ser <contact@emersion.fr>
1648
1649 PR gdb/23105
1650 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1651 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1652 * fbsd-tdep.c (fbsd_make_note_desc): New.
1653 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1654 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1655 * target.h (enum target_object) Add FreeBSD-specific
1656 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1657
1658 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * compile/compile-c.h (generate_c_for_variable_locations):
1661 Change reference to pointer.
1662 * compile/compile-c-support.c (compile_program) <compute>:
1663 Likewise.
1664 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1665 (generate_c_for_for_one_variable): Likewise
1666 (generate_c_for_variable_locations): Likewise
1667 * compile/compile-c-types.c (compile_c_instance::convert_type):
1668 Likewise
1669 * compile/compile-cplus-symbols.c (convert_one_symbol):
1670 std::move the scope passed to enter_scope.
1671 * compile/compile-cplus-types.c
1672 (compile_cplus_instance::enter_scope): Make parameter
1673 rvalue-reference.
1674 (compile_cplus_instance::new_scope): Change reference to
1675 pointer.
1676 (compile_cplus_instance::convert_type): Likewise
1677 (compile_cplus_convert_typedef): std::move the scope passed to
1678 enter_scope.
1679 (compile_cplus_convert_struct_or_union): Likewise.
1680 (compile_cplus_convert_enum): Likewise.
1681 (compile_cplus_convert_namespace): Likewise.
1682 * compile/compile-cplus.h (compile_cplus_instance)
1683 <enter_scope>: Make parameter rvalue-reference.
1684 * compile/compile-internal.h (compile_instance)
1685 <get_cached_type>: Likewise
1686 * compile/compile-loc2c.c (push): Likewise
1687 (pushf): Likewise
1688 (unary): Likewise
1689 (binary): Likewise
1690 (print_label): Likewise
1691 (pushf_register_address): Likewise
1692 (pushf_register): Likewise
1693 (do_compile_dwarf_expr_to_c): Likewise
1694 (compile_dwarf_expr_to_c): Likewise
1695 (compile_dwarf_bounds_to_c): Likewise
1696 * compile/compile.c (compile_instance::get_cached_type):
1697 Likewise
1698 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1699 (compile_dwarf_bounds_to_c): Likewise
1700 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1701 (dwarf2_compile_property_to_c): Likewise
1702 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1703 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1704 Likewise
1705
1706 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1707
1708 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1709 * tui/tui-data.c (init_content_element): Don't initialize it.
1710
1711 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1712
1713 * tui/tui-data.h (struct tui_win_info)
1714 <detail::opaque>: Remove.
1715 * tui/tui-data.c (init_win_info): Remove assignment.
1716
1717 2018-09-05 Tom Tromey <tom@tromey.com>
1718
1719 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1720 -Wformat-nonliteral.
1721 * target-float.c (host_float_ops<T>::to_string)
1722 (host_float_ops<T>::from_string): Use
1723 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1724 * configure: Rebuild.
1725
1726 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1727
1728 * printcmd.c (printf_c_string): Use
1729 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1730 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1731
1732 2018-09-05 Tom Tromey <tom@tromey.com>
1733
1734 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1735
1736 2018-09-05 Tom de Vries <tdevries@suse.de>
1737
1738 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1739 with resolve_abstract_p == true.
1740 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1741 defaulting to false. Propagate resolve_abstract_p to
1742 dwarf2_fetch_die_loc_sect_off.
1743 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1744 parameter, defaulting to false.
1745 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1746 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1747 parameter.
1748 * dwarf2read.h (struct die_info): Forward-declare.
1749 (die_info_ptr): New typedef.
1750 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1751
1752 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1753
1754 GDB 8.2 released.
1755
1756 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1757 Pedro Alves <palves@redhat.com>
1758
1759 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1760 "aclocal-m4-deps.mk". Include file here.
1761 $(srcdir)/aclocal.m4: Add "configure.ac".
1762 * gnulib/aclocal-m4-deps.mk: New file.
1763 * gnulib/update-gnulib.sh: Automatically update
1764 "aclocal-m4-deps.mk".
1765
1766 2018-09-04 Tom Tromey <tom@tromey.com>
1767
1768 * configure: Rebuild.
1769 * configure.ac: Remove multi-ice code.
1770
1771 2018-09-04 Tom Tromey <tom@tromey.com>
1772
1773 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1774 (ada-exp.o): Update.
1775
1776 2018-09-04 Tom Tromey <tom@tromey.com>
1777
1778 * Makefile.in (printcmd.o, target-float.o): Remove.
1779 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1780
1781 2018-09-04 Tom Tromey <tom@tromey.com>
1782
1783 * gnulib/Makefile.in: Remove obsolete comment.
1784 * Makefile.in: Remove obsolete comment.
1785
1786 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1787
1788 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1789 line with '+'.
1790
1791 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1792
1793 * riscv-tdep.c: Add 'prologue-value.h' include.
1794 (struct riscv_unwind_cache): New struct.
1795 (riscv_debug_unwinder): New global.
1796 (riscv_scan_prologue): Update arguments, capture register details
1797 from prologue scan.
1798 (riscv_skip_prologue): Reformat arguments line, move end of
1799 prologue calculation into riscv_scan_prologue.
1800 (riscv_frame_cache): Update return type, create
1801 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1802 details.
1803 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1804 (riscv_frame_prev_register): Use the trad_frame within the
1805 riscv_unwind_cache.
1806 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1807 flag.
1808
1809 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1810
1811 * trad-frame.h (trad_frame_set_realreg): Declare.
1812 (trad_frame_set_addr): Declare.
1813 * trad-frame.c (trad_frame_set_realreg): Define new function.
1814 (trad_frame_set_addr): Define new function.
1815 (trad_frame_set_reg_realreg): Use new function.
1816 (trad_frame_set_reg_addr): Use new function.
1817
1818 2018-09-01 Keith Seitz <keiths@redhat.com>
1819
1820 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1821 pulongest instead of "%lld".
1822 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1823 ATTRIBUTE_UNUSED.
1824
1825 2018-08-31 Tom Tromey <tom@tromey.com>
1826
1827 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1828 variant part type.
1829
1830 2018-08-31 Pedro Alves <palves@redhat.com>
1831
1832 * gdbarch.h: Regenerate.
1833
1834 2018-08-31 Pedro Alves <palves@redhat.com>
1835
1836 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1837 * target.h (Hardware watchpoint interfaces): Describe
1838 continuable/steppable/non-steppable watchpoints.
1839 * gdbarch.h, gdbarch.c: Regenerate.
1840
1841 2018-08-31 Pedro Alves <palves@redhat.com>
1842
1843 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1844 Delete.
1845 * s390-linux-nat.c
1846 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1847 * target.h (target_ops::have_continuable_watchpoint): Delete.
1848 (target_have_continuable_watchpoint): Delete.
1849 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1850 * target-delegates.c: Regenerate.
1851
1852 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1853
1854 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1855 the files present in "gnulib/import/m4/".
1856
1857 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1858
1859 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1860 c.sw, c.swsp, and c.sdsp.
1861
1862 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1863
1864 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1865 (riscv_read_misa_reg): Don't cache value read into inferior data.
1866 (riscv_new_inferior_data): Delete.
1867 (riscv_inferior_data_cleanup): Delete.
1868 (riscv_inferior_data): Delete.
1869 (riscv_invalidate_inferior_data): Delete.
1870 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1871
1872 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1873
1874 * compile/compile-cplus-types.c
1875 (compile_cplus_instance::leave_scope): Take the address of scope
1876 object.
1877 (compile_cplus_instance::convert_qualified_base): Compare quals
1878 to 0.
1879
1880 2018-08-30 Keith Seitz <keiths@redhat.com>
1881
1882 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1883 Use "%s" and host_address_to_string instead of "%p" in printf.
1884
1885 2018-08-29 Keith Seitz <keiths@redhat.com>
1886
1887 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1888 and compile-cplus-types.c.
1889 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1890 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1891 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1892 Declare.
1893 * compile/compile-c-support.c: Include compile-cplus.h.
1894 (load_libcompile): Templatize.
1895 (get_compile_context): "New" function.
1896 (c_get_compile_context): Use get_compile_context.
1897 (cplus_get_compile_context): New function.
1898 (cplus_push_user_expression, cplus_pop_user_expression)
1899 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1900 (cplus_compute_program): Define new structs/functions.
1901 * compile/compile-cplus-symmbols.c: New file.
1902 * compile/compile-cplus-types.c: New file.
1903 * compile/compile-cplus.h: New file.
1904 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1905 Declare.
1906 * compile/compile-object-load.c (get_out_value_type): Use
1907 strncmp_iw when comparing symbol names.
1908 (compile_object_load): Add mst_bss and mst_data.
1909 * compile/compile.c (_initialize_compile): Remove
1910 -Wno-implicit-function-declaration from `compile_args'.
1911 * compile/gcc-cp-plugin.h: New file.
1912 * NEWS: Mention C++ compile support and new debug options.
1913
1914 2018-08-29 Keith Seitz <keiths@redhat.com>
1915
1916 * linespec.c (collect_info::add_symbol): Make virtual.
1917 (struct symbol_searcher_collect_info): New struct.
1918 (symbol_searcher::find_all_symbols): New method.
1919 * symtab.h (class symbol_searcher): New class.
1920
1921 2018-08-29 Keith Seitz <keiths@redhat.com>
1922
1923 * linespec.c (struct linespec) <function_symbols, label_symbols>:
1924 Change to vector of block_symbol. Update all users.
1925 (struct collect_info) <symbols>: Likewise.
1926 (collect_info::add_symbol): Take block_symbol as argument.
1927 Update all callers.
1928 (decode_compound_collector) <m_symbols>: Change type to vector
1929 of block_symbol. Update all users.
1930 (decode_compound_collector::operator ()): Change parameter type
1931 to block_symbol.
1932 (find_method, find_function_symbols, find_linespec_symbols)
1933 (find_label_symbols_in_block, find_label_symbols): Change symbol
1934 vectors to block_symbol vectors.
1935 * symtab.h (symbol_found_callback_ftype): Change parameter type to
1936 block_symbol.
1937
1938 2018-08-29 Keith Seitz <keiths@redhat.com>
1939
1940 * linespec.c (symbolp): Remove typedef and VEC definitions.
1941 (bound_minimal_symbol_d): Likewise.
1942
1943 2018-08-29 Keith Seitz <keiths@redhat.com>
1944
1945 * linespec.c (decode_compound_collector::decode_compound_collector):
1946 Remove initialization for `m_symtabs'.
1947 (decode_compound_collector::release_symbols): Change return type
1948 to std::vector. Update all callers.
1949 (class decode_compound_collector) <m_symbols>: Change type to
1950 std::vector.
1951 (lookup_prefix_sym): Change return type to std::vector. Update all
1952 callers.
1953 (compare_symbols): Remove.
1954 (std_compare_symbols): Rename to `compare_symbols'.
1955 (find_method): Change `sym_classes' parameter to std::vector.
1956 Update all callers. Use std::sort to sort sym_classes.
1957 (find_linespec_symbols): Remove cleanup.
1958
1959 2018-08-29 Keith Seitz <keiths@redhat.com>
1960
1961 * linespec.c (struct linespec) <minimal_symbols>: Change type to
1962 std::vector. Update all users.
1963 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1964 (struct collect_info) <minimal_symbols>: Likewise.
1965 (compare_msymbols): Return bool. Change parameters to const
1966 bound_minimal_symbol references.
1967 (find_method, find_function_symbols, find_linespec_symbols): Change
1968 `minsyms' parameter to std::vector. Update all callers.
1969
1970 2018-08-29 Keith Seitz <keiths@redhat.com>
1971
1972 * linespec.c (struct linespec) <label_symbols>: Change type to
1973 std::vector. Update all users.
1974 (find_label_symbols_in_block): Change `result' parameter to
1975 std::vector. Update all callers.
1976 (find_label_symbols): Return std::vector. Update all callers.
1977
1978 2018-08-29 Keith Seitz <keiths@redhat.com>
1979
1980 * linespec.c (struct linespec) <function_symbols>: Change type to
1981 std::vector. Update all users.
1982 (struct collect_info) <function_symbols>: Likewise.
1983 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1984 (std_compare_symbols): New function.
1985 (find_method, find_function_symbols, find_linespec_symbols)
1986 (find_label_symbols_in_block): Change `symbols' parameter to
1987 std::vector. Update all callers.
1988 (find_label_symbols): Likewise for `function_symbols' and
1989 `label_funcs_ret'.
1990
1991 2018-08-29 Keith Seitz <keiths@redhat.com>
1992
1993 * linespec.c (symtab_vector_up): Define.
1994 (struct linespec) <file_symtabs>: Change type to std::vector *.
1995 Update all uses.
1996 (struct collect_info) <file_symtabs>: Likewise.
1997 (collect_symtabs_from_filename): Return symtab_vector_up.
1998 Update all callers.
1999 (decode_objc): Remove cleanup.
2000 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2001 (symtab_collector::release_symtabs): Return symtab_vector_up.
2002 Update all callers.
2003 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2004 Update all users.
2005 (collect_symtabs_from_filename, symtabs_from_filename): Return
2006 symtab_vector_up. Update all callers.
2007
2008 2018-08-29 Tom Tromey <tom@tromey.com>
2009
2010 * csky-tdep.c (csky_analyze_prologue): Use
2011 core_addr_to_string_nz.
2012
2013 2018-08-29 Tom Tromey <tom@tromey.com>
2014
2015 * windows-nat.c (struct xlate_exception) <them>: Change type to
2016 DWORD.
2017 (xlate): Fix formatting. Remove last entry.
2018 (struct xlate_exception, xlate): Comment out.
2019 (windows_nat_target::resume): Use ranged for.
2020
2021 2018-08-29 Jim Wilson <jimw@sifive.com>
2022
2023 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2024 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2025 of NT_PRFPREG.
2026 (riscv_linux_nat_target::store_registers): Likewise.
2027
2028 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2029
2030 PR gdb/23555
2031 PR gdb/23558
2032 * gnulib/aclocal.m4: Regenerate.
2033 * gnulib/config.in: Regenerate.
2034 * gnulib/configure: Regenerate.
2035 * gnulib/import/Makefile.am: Update.
2036 * gnulib/import/Makefile.in: Update.
2037 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2038 * gnulib/import/_Noreturn.h: ... this.
2039 * gnulib/import/alloca.in.h: Update.
2040 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2041 * gnulib/import/arg-nonnull.h: ... this.
2042 * gnulib/import/assure.h: Update.
2043 * gnulib/import/at-func.c: Update.
2044 * gnulib/import/basename-lgpl.c: Update.
2045 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2046 * gnulib/import/c++defs.h: ... this.
2047 * gnulib/import/canonicalize-lgpl.c: Update.
2048 * gnulib/import/cdefs.h: Update.
2049 * gnulib/import/chdir-long.c: Update.
2050 * gnulib/import/chdir-long.h: Update.
2051 * gnulib/import/cloexec.c: Update.
2052 * gnulib/import/cloexec.h: Update.
2053 * gnulib/import/close.c: Update.
2054 * gnulib/import/closedir.c: Update.
2055 * gnulib/import/config.charset: Update.
2056 * gnulib/import/dirent-private.h: Update.
2057 * gnulib/import/dirent.in.h: Update.
2058 * gnulib/import/dirfd.c: Update.
2059 * gnulib/import/dirname-lgpl.c: Update.
2060 * gnulib/import/dirname.h: Update.
2061 * gnulib/import/dosname.h: Update.
2062 * gnulib/import/dup-safer-flag.c: Update.
2063 * gnulib/import/dup-safer.c: Update.
2064 * gnulib/import/dup.c: Update.
2065 * gnulib/import/dup2.c: Update.
2066 * gnulib/import/errno.in.h: Update.
2067 * gnulib/import/error.c: Update.
2068 * gnulib/import/error.h: Update.
2069 * gnulib/import/exitfail.c: Update.
2070 * gnulib/import/exitfail.h: Update.
2071 * gnulib/import/extra/update-copyright: Update.
2072 * gnulib/import/fchdir.c: Update.
2073 * gnulib/import/fcntl.c: Update.
2074 * gnulib/import/fcntl.in.h: Update.
2075 * gnulib/import/fd-hook.c: Update.
2076 * gnulib/import/fd-hook.h: Update.
2077 * gnulib/import/fd-safer-flag.c: Update.
2078 * gnulib/import/fd-safer.c: Update.
2079 * gnulib/import/fdopendir.c: Update.
2080 * gnulib/import/filename.h: Update.
2081 * gnulib/import/filenamecat-lgpl.c: Update.
2082 * gnulib/import/filenamecat.h: Update.
2083 * gnulib/import/flexmember.h: Update.
2084 * gnulib/import/float+.h: Update.
2085 * gnulib/import/float.c: Update.
2086 * gnulib/import/float.in.h: Update.
2087 * gnulib/import/fnmatch.c: Update.
2088 * gnulib/import/fnmatch.in.h: Update.
2089 * gnulib/import/fnmatch_loop.c: Update.
2090 * gnulib/import/fpucw.h: Update.
2091 * gnulib/import/frexp.c: Update.
2092 * gnulib/import/frexpl.c: Update.
2093 * gnulib/import/fstat.c: Update.
2094 * gnulib/import/fstatat.c: Update.
2095 * gnulib/import/getcwd-lgpl.c: Update.
2096 * gnulib/import/getcwd.c: Update.
2097 * gnulib/import/getdtablesize.c: Update.
2098 * gnulib/import/getlogin_r.c: Update.
2099 * gnulib/import/getprogname.c: Update.
2100 * gnulib/import/getprogname.h: Update.
2101 * gnulib/import/gettext.h: Update.
2102 * gnulib/import/gettimeofday.c: Update.
2103 * gnulib/import/glob-libc.h: Update.
2104 * gnulib/import/glob.c: Update.
2105 * gnulib/import/glob.in.h: Update.
2106 * gnulib/import/glob_internal.h: Update.
2107 * gnulib/import/glob_pattern_p.c: Update.
2108 * gnulib/import/globfree.c: Update.
2109 * gnulib/import/hard-locale.c: Update.
2110 * gnulib/import/hard-locale.h: Update.
2111 * gnulib/import/intprops.h: Update.
2112 * gnulib/import/inttypes.in.h: Update.
2113 * gnulib/import/isnan.c: Update.
2114 * gnulib/import/isnand-nolibm.h: Update.
2115 * gnulib/import/isnand.c: Update.
2116 * gnulib/import/isnanl-nolibm.h: Update.
2117 * gnulib/import/isnanl.c: Update.
2118 * gnulib/import/itold.c: Update.
2119 * gnulib/import/libc-config.h: Update.
2120 * gnulib/import/limits.in.h: Update.
2121 * gnulib/import/localcharset.c: Update.
2122 * gnulib/import/localcharset.h: Update.
2123 * gnulib/import/localtime-buffer.c: Update.
2124 * gnulib/import/localtime-buffer.h: Update.
2125 * gnulib/import/lstat.c: Update.
2126 * gnulib/import/m4/00gnulib.m4: Update.
2127 * gnulib/import/m4/__inline.m4: Update.
2128 * gnulib/import/m4/absolute-header.m4: Update.
2129 * gnulib/import/m4/alloca.m4: Update.
2130 * gnulib/import/m4/builtin-expect.m4: Update.
2131 * gnulib/import/m4/canonicalize.m4: Update.
2132 * gnulib/import/m4/chdir-long.m4: Update.
2133 * gnulib/import/m4/close.m4: Update.
2134 * gnulib/import/m4/closedir.m4: Update.
2135 * gnulib/import/m4/configmake.m4: Update.
2136 * gnulib/import/m4/d-ino.m4: Update.
2137 * gnulib/import/m4/d-type.m4: Update.
2138 * gnulib/import/m4/dirent_h.m4: Update.
2139 * gnulib/import/m4/dirfd.m4: Update.
2140 * gnulib/import/m4/dirname.m4: Update.
2141 * gnulib/import/m4/double-slash-root.m4: Update.
2142 * gnulib/import/m4/dup.m4: Update.
2143 * gnulib/import/m4/dup2.m4: Update.
2144 * gnulib/import/m4/eealloc.m4: Update.
2145 * gnulib/import/m4/environ.m4: Update.
2146 * gnulib/import/m4/errno_h.m4: Update.
2147 * gnulib/import/m4/error.m4: Update.
2148 * gnulib/import/m4/exponentd.m4: Update.
2149 * gnulib/import/m4/exponentl.m4: Update.
2150 * gnulib/import/m4/extensions.m4: Update.
2151 * gnulib/import/m4/extern-inline.m4: Update.
2152 * gnulib/import/m4/fchdir.m4: Update.
2153 * gnulib/import/m4/fcntl-o.m4: Update.
2154 * gnulib/import/m4/fcntl.m4: Update.
2155 * gnulib/import/m4/fcntl_h.m4: Update.
2156 * gnulib/import/m4/fdopendir.m4: Update.
2157 * gnulib/import/m4/filenamecat.m4: Update.
2158 * gnulib/import/m4/flexmember.m4: Update.
2159 * gnulib/import/m4/float_h.m4: Update.
2160 * gnulib/import/m4/fnmatch.m4: Update.
2161 * gnulib/import/m4/fnmatch_h.m4: Update.
2162 * gnulib/import/m4/fpieee.m4: Update.
2163 * gnulib/import/m4/frexp.m4: Update.
2164 * gnulib/import/m4/frexpl.m4: Update.
2165 * gnulib/import/m4/fstat.m4: Update.
2166 * gnulib/import/m4/fstatat.m4: Update.
2167 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2168 * gnulib/import/m4/getcwd-path-max.m4: Update.
2169 * gnulib/import/m4/getcwd.m4: Update.
2170 * gnulib/import/m4/getdtablesize.m4: Update.
2171 * gnulib/import/m4/getlogin.m4: Update.
2172 * gnulib/import/m4/getlogin_r.m4: Update.
2173 * gnulib/import/m4/getpagesize.m4: Update.
2174 * gnulib/import/m4/getprogname.m4: Update.
2175 * gnulib/import/m4/gettimeofday.m4: Update.
2176 * gnulib/import/m4/glibc21.m4: Update.
2177 * gnulib/import/m4/glob.m4: Update.
2178 * gnulib/import/m4/glob_h.m4: Update.
2179 * gnulib/import/m4/gnulib-cache.m4: Update.
2180 * gnulib/import/m4/gnulib-common.m4: Update.
2181 * gnulib/import/m4/gnulib-comp.m4: Update.
2182 * gnulib/import/m4/gnulib-tool.m4: Update.
2183 * gnulib/import/m4/hard-locale.m4: Update.
2184 * gnulib/import/m4/include_next.m4: Update.
2185 * gnulib/import/m4/inttypes-pri.m4: Update.
2186 * gnulib/import/m4/inttypes.m4: Update.
2187 * gnulib/import/m4/isnand.m4: Update.
2188 * gnulib/import/m4/isnanl.m4: Update.
2189 * gnulib/import/m4/largefile.m4: Update.
2190 * gnulib/import/m4/limits-h.m4: Update.
2191 * gnulib/import/m4/localcharset.m4: Update.
2192 * gnulib/import/m4/locale-fr.m4: Update.
2193 * gnulib/import/m4/locale-ja.m4: Update.
2194 * gnulib/import/m4/locale-zh.m4: Update.
2195 * gnulib/import/m4/localtime-buffer.m4: Update.
2196 * gnulib/import/m4/longlong.m4: Update.
2197 * gnulib/import/m4/lstat.m4: Update.
2198 * gnulib/import/m4/malloc.m4: Update.
2199 * gnulib/import/m4/malloca.m4: Update.
2200 * gnulib/import/m4/math_h.m4: Update.
2201 * gnulib/import/m4/mbrtowc.m4: Update.
2202 * gnulib/import/m4/mbsinit.m4: Update.
2203 * gnulib/import/m4/mbsrtowcs.m4: Update.
2204 * gnulib/import/m4/mbstate_t.m4: Update.
2205 * gnulib/import/m4/memchr.m4: Update.
2206 * gnulib/import/m4/memmem.m4: Update.
2207 * gnulib/import/m4/mempcpy.m4: Update.
2208 * gnulib/import/m4/memrchr.m4: Update.
2209 * gnulib/import/m4/mkdir.m4: Update.
2210 * gnulib/import/m4/mkstemp.m4: Update.
2211 * gnulib/import/m4/mmap-anon.m4: Update.
2212 * gnulib/import/m4/mode_t.m4: Update.
2213 * gnulib/import/m4/msvc-inval.m4: Update.
2214 * gnulib/import/m4/msvc-nothrow.m4: Update.
2215 * gnulib/import/m4/multiarch.m4: Update.
2216 * gnulib/import/m4/nocrash.m4: Update.
2217 * gnulib/import/m4/off_t.m4: Update.
2218 * gnulib/import/m4/onceonly.m4: Update.
2219 * gnulib/import/m4/open-cloexec.m4: Update.
2220 * gnulib/import/m4/open.m4: Update.
2221 * gnulib/import/m4/openat.m4: Update.
2222 * gnulib/import/m4/opendir.m4: Update.
2223 * gnulib/import/m4/pathmax.m4: Update.
2224 * gnulib/import/m4/rawmemchr.m4: Update.
2225 * gnulib/import/m4/readdir.m4: Update.
2226 * gnulib/import/m4/readlink.m4: Update.
2227 * gnulib/import/m4/realloc.m4: Update.
2228 * gnulib/import/m4/rename.m4: Update.
2229 * gnulib/import/m4/rewinddir.m4: Update.
2230 * gnulib/import/m4/rmdir.m4: Update.
2231 * gnulib/import/m4/save-cwd.m4: Update.
2232 * gnulib/import/m4/secure_getenv.m4: Update.
2233 * gnulib/import/m4/setenv.m4: Update.
2234 * gnulib/import/m4/signal_h.m4: Update.
2235 * gnulib/import/m4/ssize_t.m4: Update.
2236 * gnulib/import/m4/stat-time.m4: Update.
2237 * gnulib/import/m4/stat.m4: Update.
2238 * gnulib/import/m4/std-gnu11.m4: Update.
2239 * gnulib/import/m4/stdbool.m4: Update.
2240 * gnulib/import/m4/stddef_h.m4: Update.
2241 * gnulib/import/m4/stdint.m4: Update.
2242 * gnulib/import/m4/stdio_h.m4: Update.
2243 * gnulib/import/m4/stdlib_h.m4: Update.
2244 * gnulib/import/m4/strchrnul.m4: Update.
2245 * gnulib/import/m4/strdup.m4: Update.
2246 * gnulib/import/m4/strerror.m4: Update.
2247 * gnulib/import/m4/string_h.m4: Update.
2248 * gnulib/import/m4/strstr.m4: Update.
2249 * gnulib/import/m4/strtok_r.m4: Update.
2250 * gnulib/import/m4/sys_socket_h.m4: Update.
2251 * gnulib/import/m4/sys_stat_h.m4: Update.
2252 * gnulib/import/m4/sys_time_h.m4: Update.
2253 * gnulib/import/m4/sys_types_h.m4: Update.
2254 * gnulib/import/m4/tempname.m4: Update.
2255 * gnulib/import/m4/time_h.m4: Update.
2256 * gnulib/import/m4/unistd-safer.m4: Update.
2257 * gnulib/import/m4/unistd_h.m4: Update.
2258 * gnulib/import/m4/warn-on-use.m4: Update.
2259 * gnulib/import/m4/wchar_h.m4: Update.
2260 * gnulib/import/m4/wchar_t.m4: Update.
2261 * gnulib/import/m4/wctype_h.m4: Update.
2262 * gnulib/import/m4/wint_t.m4: Update.
2263 * gnulib/import/malloc.c: Update.
2264 * gnulib/import/malloc/scratch_buffer.h: Update.
2265 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2266 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2267 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2268 * gnulib/import/malloca.c: Update.
2269 * gnulib/import/malloca.h: Update.
2270 * gnulib/import/malloca.valgrind: Update.
2271 * gnulib/import/math.in.h: Update.
2272 * gnulib/import/mbrtowc.c: Update.
2273 * gnulib/import/mbsinit.c: Update.
2274 * gnulib/import/mbsrtowcs-impl.h: Update.
2275 * gnulib/import/mbsrtowcs-state.c: Update.
2276 * gnulib/import/mbsrtowcs.c: Update.
2277 * gnulib/import/memchr.c: Update.
2278 * gnulib/import/memmem.c: Update.
2279 * gnulib/import/mempcpy.c: Update.
2280 * gnulib/import/memrchr.c: Update.
2281 * gnulib/import/mkdir.c: Update.
2282 * gnulib/import/mkstemp.c: Update.
2283 * gnulib/import/msvc-inval.c: Update.
2284 * gnulib/import/msvc-inval.h: Update.
2285 * gnulib/import/msvc-nothrow.c: Update.
2286 * gnulib/import/msvc-nothrow.h: Update.
2287 * gnulib/import/open.c: Update.
2288 * gnulib/import/openat-die.c: Update.
2289 * gnulib/import/openat-priv.h: Update.
2290 * gnulib/import/openat-proc.c: Update.
2291 * gnulib/import/openat.c: Update.
2292 * gnulib/import/openat.h: Update.
2293 * gnulib/import/opendir.c: Update.
2294 * gnulib/import/pathmax.h: Update.
2295 * gnulib/import/pipe-safer.c: Update.
2296 * gnulib/import/rawmemchr.c: Update.
2297 * gnulib/import/readdir.c: Update.
2298 * gnulib/import/readlink.c: Update.
2299 * gnulib/import/realloc.c: Update.
2300 * gnulib/import/ref-add.sin: Update.
2301 * gnulib/import/ref-del.sin: Update.
2302 * gnulib/import/rename.c: Update.
2303 * gnulib/import/rewinddir.c: Update.
2304 * gnulib/import/rmdir.c: Update.
2305 * gnulib/import/same-inode.h: Update.
2306 * gnulib/import/save-cwd.c: Update.
2307 * gnulib/import/save-cwd.h: Update.
2308 * gnulib/import/scratch_buffer.h: Update.
2309 * gnulib/import/secure_getenv.c: Update.
2310 * gnulib/import/setenv.c: Update.
2311 * gnulib/import/signal.in.h: Update.
2312 * gnulib/import/stat-time.c: Update.
2313 * gnulib/import/stat-time.h: Update.
2314 * gnulib/import/stat-w32.c: Update.
2315 * gnulib/import/stat-w32.h: Update.
2316 * gnulib/import/stat.c: Update.
2317 * gnulib/import/stdbool.in.h: Update.
2318 * gnulib/import/stddef.in.h: Update.
2319 * gnulib/import/stdint.in.h: Update.
2320 * gnulib/import/stdio.in.h: Update.
2321 * gnulib/import/stdlib.in.h: Update.
2322 * gnulib/import/str-two-way.h: Update.
2323 * gnulib/import/strchrnul.c: Update.
2324 * gnulib/import/strdup.c: Update.
2325 * gnulib/import/streq.h: Update.
2326 * gnulib/import/strerror-override.c: Update.
2327 * gnulib/import/strerror-override.h: Update.
2328 * gnulib/import/strerror.c: Update.
2329 * gnulib/import/string.in.h: Update.
2330 * gnulib/import/stripslash.c: Update.
2331 * gnulib/import/strnlen1.c: Update.
2332 * gnulib/import/strnlen1.h: Update.
2333 * gnulib/import/strstr.c: Update.
2334 * gnulib/import/strtok_r.c: Update.
2335 * gnulib/import/sys_stat.in.h: Update.
2336 * gnulib/import/sys_time.in.h: Update.
2337 * gnulib/import/sys_types.in.h: Update.
2338 * gnulib/import/tempname.c: Update.
2339 * gnulib/import/tempname.h: Update.
2340 * gnulib/import/time.in.h: Update.
2341 * gnulib/import/unistd--.h: Update.
2342 * gnulib/import/unistd-safer.h: Update.
2343 * gnulib/import/unistd.in.h: Update.
2344 * gnulib/import/unsetenv.c: Update.
2345 * gnulib/import/verify.h: Update.
2346 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2347 * gnulib/import/wchar.in.h: Update.
2348 * gnulib/import/wctype.in.h: Update.
2349 * gnulib/import/xalloc-oversized.h: Update.
2350 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2351 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2352
2353 2018-08-16 Gary Benson <gbenson@redhat.com>
2354
2355 PR gdb/13000:
2356 * gdb/main.c (captured_main_1): Exit with nonzero status
2357 in batch mode if the last command to be executed failed.
2358 * NEWS: Mention the above.
2359
2360 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2363 end of warning message.
2364
2365 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2366
2367 PR gdb/22943:
2368 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2369 (aarch64_extract_return_value): Use
2370 aapcs_is_vfp_call_or_return_candidate.
2371 (aarch64_return_in_memory): Likewise.
2372 (aarch64_store_return_value): Likewise.
2373
2374 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2375
2376 * aarch64-tdep.c
2377 (aapcs_is_vfp_call_or_return_candidate): Make static
2378 (pass_in_v_or_stack): Remove function.
2379 (pass_in_v_vfp_candidate): New function.
2380 (aarch64_push_dummy_call): Check for float register candidates.
2381
2382 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2383
2384 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2385 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2386 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2387
2388 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2389
2390 PR build/23399
2391 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2392 (struct ipa_sym_addresses): Rename to...
2393 (struct ipa_sym_addresses_common): ... this.
2394 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2395
2396 2018-08-28 Tom Tromey <tom@tromey.com>
2397
2398 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2399 (token_fifo): Now a std::vector.
2400 (yylex, c_parse): Update.
2401 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2402 (token_fifo): Now a std::vector.
2403 (yylex, d_parse): Update.
2404 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2405 (token_fifo): Now a std::vector.
2406 (yylex, go_parse): Update.
2407
2408 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2409
2410 * parser-defs.h (struct type_stack) <elements>: Change type to
2411 std::vector<union type_stack_elt>.
2412 <depth, size>: Remove.
2413 * parse.c (parse_exp_in_context_1): Adjust.
2414 (type_stack_reserve): Remove.
2415 (check_type_stack_depth): Remove.
2416 (insert_into_type_stack): Adjust to std::vector.
2417 (insert_type): Likewise.
2418 (push_type): Likewise.
2419 (push_type_int): Likewise.
2420 (insert_type_address_space): Likewise.
2421 (pop_type): Likewise.
2422 (pop_type_int): Likewise.
2423 (pop_typelist): Likewise.
2424 (pop_type_stack): Likewise.
2425 (append_type_stack): Likewise.
2426 (push_type_stack): Likewise.
2427 (get_type_stack): Likewise.
2428 (type_stack_cleanup): Likewise.
2429 (push_typelist): Likewise.
2430 (follow_types): Likewise.
2431 (_initialize_parse): Likewise.
2432
2433 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2434
2435 * NEWS: Mention csky target.
2436
2437 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2438 Hafiz Abid Qadeer <abidh@codesourcery.com>
2439 Don Breazeal <donb@codesourcery.com>
2440
2441 * csky-linux-tdep.c: New file.
2442 * csky-tdep.c: Likewise.
2443 * csky-tdep.h: Likewise.
2444 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2445 csky-tdep.o.
2446 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2447 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2448 * configure.tgt: Add csky support.
2449
2450 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2451
2452 * python/py-framefilter.c (py_print_frame): Print frame architecture
2453 when printing on an MI output.
2454
2455 2018-08-27 Tom Tromey <tom@tromey.com>
2456
2457 PR build/23087:
2458 * configure: Rebuild.
2459 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2460
2461 2018-08-27 Tom Tromey <tom@tromey.com>
2462
2463 * aarch64-linux-tdep.c
2464 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2465 casts to int.
2466
2467 2018-08-27 Tom Tromey <tom@tromey.com>
2468
2469 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2470 unsigned.
2471 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2472 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2473 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2474 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2475 unsigned.
2476
2477 2018-08-27 Tom Tromey <tom@tromey.com>
2478
2479 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2480 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2481
2482 2018-08-27 Tom Tromey <tom@tromey.com>
2483
2484 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2485 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2486 ULONGEST_MAX.
2487 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2488 ULONGEST_MAX.
2489 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2490 ULONGEST_MAX.
2491 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2492 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2493 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2494 ULONGEST_MAX.
2495 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2496 (ppc64_linux_sigaction_tramp_frame)
2497 (ppc32_linux_sighandler_tramp_frame)
2498 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2499 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2500 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2501 * mn10300-linux-tdep.c (am33_linux_sigframe)
2502 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2503 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2504 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2505 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2506 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2507 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2508 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2509 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2510 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2511 * microblaze-linux-tdep.c
2512 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2513 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2514 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2515 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2516 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2517 * common/common-types.h (ULONGEST_MAX): New define.
2518 (CORE_ADDR_MAX): Fix formatting.
2519 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2520 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2521 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2522 (arm_linux_rt_sigreturn_tramp_frame)
2523 (arm_eabi_linux_sigreturn_tramp_frame)
2524 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2525 (thumb2_eabi_linux_sigreturn_tramp_frame)
2526 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2527 (arm_linux_restart_syscall_tramp_frame)
2528 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2529 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2530 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2531 ULONGEST_MAX.
2532 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2533
2534 2018-08-27 Tom Tromey <tom@tromey.com>
2535
2536 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2537 CORE_ADDR_MAX.
2538 * mips-tdep.c (mips_deal_with_atomic_sequence)
2539 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2540 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2541 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2542 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2543 CORE_ADDR_MAX.
2544 * aarch64-tdep.c (aarch64_software_single_step): Use
2545 CORE_ADDR_MAX.
2546
2547 2018-08-27 Tom Tromey <tom@tromey.com>
2548
2549 * linespec.c (complete_linespec_component): Add cast to "char".
2550 * completer.c (completion_tracker::build_completion_result): Add
2551 cast to "char".
2552
2553 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2554
2555 * solist.h (struct solist, struct target_so_ops): Fix
2556 indentation.
2557
2558 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2559
2560 * ada-tasks.c (ada_task_info_s): Remove typedef.
2561 (DEF_VEC_O(ada_task_info_s)): Remove.
2562 (struct ada_tasks_inferior_data): Initialize fields.
2563 <task_list>: Make an std::vector.
2564 (get_ada_tasks_inferior_data): Allocate with new.
2565 (ada_get_task_number): Adjust.
2566 (get_task_number_from_id): Likewise.
2567 (valid_task_id): Likewise.
2568 (ada_get_task_info_from_ptid): Likewise.
2569 (iterate_over_live_ada_tasks): Likewise.
2570 (add_ada_task): Likewise.
2571 (read_known_tasks): Likewise.
2572 (ada_build_task_list): Likewise.
2573 (print_ada_task_info): Likewise.
2574 (info_task): Likewise.
2575 (task_command_1): Likewise.
2576
2577 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2578
2579 * ada-lang.c (add_angle_brackets): Return std::string.
2580
2581 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2582
2583 * python/py-threadevent.c (py_get_event_thread): Initialize
2584 pythread.
2585
2586 2018-08-24 Pedro Alves <palves@redhat.com>
2587
2588 * python/py-bpevent.c (create_breakpoint_event_object): Use
2589 copy-initialization.
2590 * python/py-continueevent.c (emit_continue_event): Use
2591 copy-initialization.
2592 * python/py-exitedevent.c (create_exited_event_object): Return a
2593 gdbpy_ref<>.
2594 (emit_exited_event): Use copy-initialization.
2595 * python/py-inferior.c (python_new_inferior)
2596 (python_inferior_deleted, add_thread_object): Use
2597 copy-initialization.
2598 * python/py-infevents.c (create_inferior_call_event_object)
2599 (create_register_changed_event_object)
2600 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2601 (emit_inferior_call_event, emit_memory_changed_event)
2602 (emit_register_changed_event): Use copy-initialization.
2603 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2604 Return a gdbpy_ref<>.
2605 (emit_new_objfile_event): Use copy-initialization.
2606 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2607 (emit_clear_objfiles_event): Use copy-initialization.
2608 * python/py-signalevent.c (create_signal_event_object): Use
2609 copy-initialization.
2610 * python/py-threadevent.c (create_thread_event_object): Use
2611 copy-initialization.
2612
2613 2018-08-24 Pedro Alves <palves@redhat.com>
2614 Simon Marchi <simon.marchi@ericsson.com>
2615
2616 PR gdb/23379
2617 * python/py-continueevent.c: Include "gdbthread.h".
2618 (create_continue_event_object): Add intro comment. Add 'ptid'
2619 parameter. Use it to find thread to pass to
2620 create_thread_event_object.
2621 (emit_continue_event): Pass PTID down to
2622 create_continue_event_object.
2623 * python/py-event.h (py_get_event_thread): Declare.
2624 (create_thread_event_object): Remove default from 'thread'
2625 parameter.
2626 * python/py-stopevent.c (create_stop_event_object): Use
2627 py_get_event_thread.
2628 * python/py-threadevent.c (get_event_thread): Rename to ...
2629 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2630 and use it to find the thread.
2631 (create_thread_event_object): Assert that THREAD isn't null.
2632 Don't find the event thread here.
2633
2634 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2635
2636 * block.h (blockrange, blockranges): New struct declarations.
2637 (struct block): Add new field named `ranges'.
2638 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2639 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2640 macros for accessing ranges in struct block.
2641 (make_blockranges): New declaration.
2642 block.c (make_blockranges): New function.
2643 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2644 for block.
2645 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2646 * blockframe.c (cache_pc_function_block): New static global.
2647 (clear_pc_function_cache): Clear cache_pc_function_block.
2648 (find_pc_partial_function): Move comment to symtab.h. Add
2649 support for non-contiguous blocks.
2650 * cli/cli-cmds.c (block.h): Include.
2651 (print_disassembly): Handle printing of non-contiguous blocks.
2652 (disassemble_current_function): Likewise.
2653 (disassemble_command): Likewise.
2654
2655 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2656 BLOCK_START.
2657 * blockframe.c (get_pc_function_start): Likewise.
2658 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2659 (gcc_symbol_address): Likewise.
2660 * compile/compile-object-run.c (compile_object_run): Likewise.
2661 * compile/compile.c (get_expr_block_and_pc): Likewise.
2662 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2663 (func_addr_to_tail_call_list): Likewise.
2664 * findvar.c (default_read_var_value): Likewise.
2665 * inline-frame.c (inline_frame_this_id): Likewise.
2666 (skip-inline_frames): Likewise.
2667 * infcmd.c (until_next_command): Likewise.
2668 * linespec.c (convert_linespec_to_sals): Likewise.
2669 * parse.c (parse_exp_in_context_1): Likewise.
2670 * printcmd.c (build_address_symbolic): likewise.
2671 (info_address_command): Likewise.
2672 symtab.c (find_function_start_sal): Likewise.
2673 (skip_prologue_sal): Likewise.
2674 (find_function_alias_target): Likewise.
2675 (find_gnu_ifunc): Likewise.
2676 * stack.c (find_frame_funname): Likewise.
2677 * symtab.c (fixup_symbol_section): Likewise.
2678 (find_function_start_sal): Likewise.
2679 (skip_prologue_sal): Likewsie.
2680 (find_function_alias_target): Likewise.
2681 (find_gnu_ifunc): Likewise.
2682 * tracepoint.c (info_scope_command): Likewise.
2683 * value.c (value_fn_field): Likewise.
2684
2685 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2686 in place of find_pc_partial_function.
2687 * blockframe.c (find_function_entry_range_from_pc): New function.
2688 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2689 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2690 for each range in a block.
2691
2692
2693 2018-08-23 Xavier Roirand <roirand@adacore.com>
2694
2695 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2696 incrementation.
2697
2698 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2699
2700 * solib-svr4.c (read_program_headers_from_bfd): Return
2701 gdb::optional<gdb::byte_vector>.
2702 (svr4_exec_displacement): Adjust.
2703
2704 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2705
2706 * solib-svr4.c (read_program_header): Return
2707 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2708 (find_program_interpreter): Return
2709 gdb::optional<gdb::byte_vector>.
2710 (scan_dyntag_auxv): Adjust.
2711 (enable_break): Adjust.
2712 (svr4_exec_displacement): Adjust.
2713
2714 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2715
2716 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2717 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2718
2719 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2720
2721 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2722 string_vprintf.
2723 * guile/scm-utils.c (gdbscm_printf): Likewise.
2724 * serial.c (serial_printf): Likewise.
2725 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2726
2727 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2728
2729 * stack.c (print_frame): Print frame architecture when printing on
2730 an MI output.
2731 * NEWS: Mention new "arch" attribute in frame output.
2732
2733 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2734
2735 * arch/aarch64.h (aarch64_regnum): Update comment.
2736
2737 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2738
2739 * NEWS: Add SVE to 8.2 section.
2740
2741 2018-08-21 Pedro Alves <palves@redhat.com>
2742
2743 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2744 out from gdbscm_parse_function_args.
2745 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2746 gdbscm_parse_function_args_1.
2747
2748 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2749
2750 PR gdb/17816
2751 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2752 operator.
2753
2754 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2755
2756 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2757
2758 2018-08-19 Michael Spang <spang@google.com>
2759
2760 PR gdb/11786
2761 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2762 for PT_TLS segments.
2763
2764 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2765
2766 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2767 dwarf_variable_value.
2768 * dwarf2-frame.c (class dwarf_expr_executor):
2769 Add override for dwarf_variable_value.
2770 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2771 (class symbol_needs_eval_context): Likewise.
2772 (indirect_synthetic_pointer): Add forward declaration.
2773 (sect_variable_value): New function.
2774 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2775 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2776 for DW_OP_GNU_variable_value.
2777
2778 2018-08-16 Tom Tromey <tom@tromey.com>
2779
2780 * top.c (read_command_file): Update.
2781 (command_line_input): Remove "repeat" argument.
2782 * ada-lang.c (get_selections): Update.
2783 * linespec.c (decode_line_2): Update.
2784 * defs.h (command_line_input): Remove argument.
2785 * cli/cli-script.c (read_next_line): Update.
2786 * python/py-gdb-readline.c: Update.
2787
2788 2018-08-17 Tom Tromey <tom@tromey.com>
2789
2790 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2791 command_line_input.
2792
2793 2018-08-15 Tom Tromey <tom@tromey.com>
2794
2795 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2796
2797 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2798
2799 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2800 If used, use find_pc_partial_function to find address range
2801 to disassemble.
2802 * mi/mi-main.c (mi_cmd_list_features): Report
2803 "data-disassemble-a-option" feature.
2804 * NEWS: Mention new -data-disassemble option -a.
2805
2806 2018-08-13 Tom Tromey <tom@tromey.com>
2807
2808 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2809
2810 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2811
2812 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2813 (aarch64_linux_collect_sve_regset): Likewise.
2814 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2815 * regcache.h (regcache_map_entry_size): New function.
2816
2817 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2818
2819 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2820 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2821 (SVE_HEADER_VL_LENGTH): Likewise.
2822 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2823 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2824 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2825 (SVE_HEADER_SIZE_OFFSET): Likewise.
2826 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2827 (SVE_HEADER_VL_OFFSET): Likewise.
2828 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2829 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2830 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2831 (SVE_HEADER_SIZE): Likewise.
2832 (aarch64_linux_core_read_vq): Add function.
2833 (aarch64_linux_core_read_description): Check for SVE section.
2834
2835 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2836
2837 * aarch64-fbsd-tdep.c
2838 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2839 collect_size.
2840 * aarch64-linux-tdep.c
2841 (aarch64_linux_iterate_over_regset_sections): Likewise.
2842 * alpha-linux-tdep.c
2843 (alpha_linux_iterate_over_regset_sections):
2844 * alpha-nbsd-tdep.c
2845 (alphanbsd_iterate_over_regset_sections): Likewise.
2846 * amd64-fbsd-tdep.c
2847 (amd64fbsd_iterate_over_regset_sections): Likewise.
2848 * amd64-linux-tdep.c
2849 (amd64_linux_iterate_over_regset_sections): Likewise.
2850 * arm-bsd-tdep.c
2851 (armbsd_iterate_over_regset_sections): Likewise.
2852 * arm-fbsd-tdep.c
2853 (arm_fbsd_iterate_over_regset_sections): Likewise.
2854 * arm-linux-tdep.c
2855 (arm_linux_iterate_over_regset_sections): Likewise.
2856 * corelow.c (get_core_registers_cb): Likewise.
2857 (core_target::fetch_registers): Likewise.
2858 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2859 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2860 * gdbarch.h (void): Regenerate.
2861 * gdbarch.sh: Add supply_size and collect_size.
2862 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2863 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2864 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2865 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2866 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2867 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2868 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2869 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2870 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2871 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2872 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2873 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2874 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2875 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2876 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2877 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2878 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2879 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2880 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2881 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2882 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2883 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2884 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2885 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2886 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2887 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2888 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2889 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2890 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2891 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2892
2893 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2894
2895 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2896 with string_printf.
2897
2898 2018-08-10 Keith Seitz <keiths@redhat.com>
2899
2900 * compile/compile-c-support.c (add_code_header, add_code_footer):
2901 Move into policy class.
2902 (c_push_user_expression, pop_user_expression_nop)
2903 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2904 (compile_program): New host class.
2905 (c_compile_program): New typedef.
2906 (c_compute_porgram): Use c_compile_program.
2907
2908 2018-08-10 Keith Seitz <keiths@redhat.com>
2909
2910 * compile/compile-internal.h (compile_instance::~compile_instance):
2911 Remove calls to htab_delete.
2912 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2913 * compile.c (compile_instance::compile_instance): Initialize
2914 htab unique pointers.
2915 (compile_instance::get_cached_type, compile_instance::insert_type)
2916 (compile_instance::error_symbol_once): Update for unique_ptr.
2917
2918 2018-08-10 Keith Seitz <keiths@redhat.com>
2919
2920 * compile/compile-c-symbols.c (struct symbol_error)
2921 (hash_symbol_error, eq_symbol_error, del_symbol_error)
2922 (compile_instance::insert_symbol_error)
2923 (compile_instance::error_symbol_once): Move to ...
2924 * compile/compile.c: ... here.
2925
2926 2018-08-10 Keith Seitz <keiths@redhat.com>
2927
2928 * compile/compile-c-support.c (c_get_compile_context): Use `new'
2929 instead of `new_compile_instance'.
2930 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2931 Update description.
2932 If the symbol error map is not initialized, create it.
2933 (generate_c_for_for_one_symbol): Do not check/initialize
2934 the symbol error map.
2935 * compile/compile-c-types.c (compile_c_instance): Make a class.
2936 Update all callers.
2937 (compile_instance::compile_instance): Initialize the type cache.
2938 (get_cached_type): New function.
2939 (insert_type): Update description.
2940 (compile_c_instance::m_default_cflags): Define.
2941 (convert_type): Update description. Use get_cached_type.
2942 (delete_instance): Moved to destructor.
2943 (new_compile_instance): Moved to constructor.
2944 * compile/compile-c.h (compile_c_instance): Make class inheriting
2945 from compile_instance.
2946 <base>: Remove field.
2947 <type_map, symbol_err_map>: Move to base class.
2948 <c_plugin>: Rename to `m_plugin' and remove pointer type.
2949 * compile/compile-internal.h (compile_instance): Make class.
2950 <type_map_t, symbol_err_map_t>: Define.
2951 <fe>: Rename to `m_gcc_fe'.
2952 <scope, block, gcc_target_options>: Add `m_' prefix.
2953 <m_type_map, m_symbol_err_map>: New fields, moved from
2954 compile_c_instance.
2955 <destroy>: Remove.
2956 (convert_type, new_compile_instance): Remove.
2957 * compile/compile.c (cleanup_compile_instance): Remove.
2958 (compile_to_object): Use unique_ptr to eliminate cleanups.
2959 (compile_instance::set_print_callback, compile_instance::version)
2960 (compile_instance::set_verbose)
2961 (compile_instance::set_driver_filename)
2962 (compile_instance::set_triplet_regexp)
2963 (compile_instance::set_arguments)
2964 (compile_instance::set_source_file)
2965 (compile_instance::compile): Define.
2966
2967 2018-08-10 Keith Seitz <keiths@redhat.com>
2968
2969 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2970 * compile/compile-c-types.c: Define GCC_METHODN macros and include
2971 gcc-c-fe.def to define C plugin.
2972 (delete_instance): Delete `c_plugin'.
2973 (new_compile_instance): Initialize `c_plugin'.
2974 * compile/compile-c.h: Include gcc_c_plugin.h.
2975 (struct compile_c_instance) <c_plugin>: New member.
2976 * gcc-c-plugin.h: New file.
2977 Update all callers with API change.
2978
2979 2018-08-10 Keith Seitz <keiths@redhat.com>
2980
2981 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2982 (HFILES_NO_SRCDIR): ... to here.
2983 Add compile-internal.h and compile-c.h.
2984 * compile/compile-c-support.c: Include compile-c.h.
2985 * compile/compile-c-symbols.c: Include compile-c.h.
2986 (generate_c_for_variable_locations): Update comment.
2987 * compile/compile-c-types.c: Include compile-c.h.
2988 * compile/compile-c.h: New file -- moved C language declarations
2989 from other files here.
2990 * compile/compile-internal.h: Do not include hashtab.h or
2991 common/enum-flags.h.
2992 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2993 (gcc_convert_symbol, gcc_symbol_address)
2994 (generate_c_for_variable_locations, c_get_mode_for_size)
2995 (c_get_range_decl_name): Definitions moved to compile-c.h.
2996 * compile/compile-loc2c.c: Include compile-c.h.
2997
2998 2018-08-10 Keith Seitz <keiths@redhat.com>
2999
3000 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3001 (c_symbol_substitution_name): ... this.
3002 Update all callers.
3003
3004 2018-08-10 Keith Seitz <keiths@redhat.com>
3005
3006 * compile/compile-c-support.c (c_compute_program): Use
3007 unique_xmalloc_ptr to eliminate cleanup.
3008 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3009 Return a unique_xmalloc_ptr and eliminate cleanup.
3010 * compile/compile-internal.h (generate_c_for_variable_locations):
3011 Return unique_xmalloc_ptr and update description.
3012
3013 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3014
3015 * corelow.c (core_target::get_core_register_section): Rename
3016 min_size to section_min_size.
3017
3018 2018-08-09 Jim Wilson <jimw@sifive.com>
3019
3020 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3021 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3022 * NEWS: Mention new GNU/Linux RISC-V target.
3023 * configure.host: Add riscv*-*-linux*.
3024 * configure.nat: Add riscv*.
3025 * configure.tgt: Add riscv*-*-linux*.
3026 * riscv-linux-nat.c: New file.
3027 * riscv-linux-tdep.c: New file.
3028
3029 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3030
3031 * infrun.c (resume): Make static, add forward declaration.
3032 (proceed): Update header comment.
3033 * infrun.h (resume): Delete declaration.
3034
3035 2018-08-09 Tom Tromey <tom@tromey.com>
3036
3037 * riscv-tdep.h: Minor formatting fixes.
3038
3039 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3040
3041 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3042 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3043 (test_mkdir_recursive): Likewise.
3044 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3045
3046 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3047
3048 * valarith.c (value_subscripted_rvalue): If an array is not in
3049 memory, and we don't know the upper bound, then we can't know that
3050 the requested element exists or not.
3051
3052 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3053
3054 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3055 (target_options_to_string): Add comment.
3056
3057 2018-08-08 Tom Tromey <tom@tromey.com>
3058
3059 * unittests/scoped_mmap-selftests.c: Check result of "write".
3060
3061 2018-08-08 Jim Wilson <jimw@sifive.com>
3062
3063 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3064 (decode_register_index_short): New.
3065 (decode_j_type_insn, decode_cj_type_insn): New.
3066 (decode_b_type_insn, decode_cb_type_insn): New.
3067 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3068 local xlen. Check xlen when decoding ambiguous compressed insns. In
3069 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3070 is_c_sw_insn instead of is_sw_insn.
3071 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3072 (riscv_software_single_step): New.
3073 * riscv-tdep.h (riscv_software_single_step): Declare.
3074
3075 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3076 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3077
3078 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3079
3080 PR gdb/18050:
3081 * target.c (dispose_inferior): Don't dispose of inferiors that are
3082 already killed.
3083
3084 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3085
3086 * remote.c (remote_target::download_tracepoint): Change char* to
3087 const char*.
3088
3089 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3090
3091 * target.h (target_options_to_string): Return an std::string.
3092 * target.c (str_comma_list_concat_elem): Return void, use
3093 std::string.
3094 (do_option): Likewise.
3095 (target_options_to_string): Return an std::string.
3096 * linux-nat.c (linux_nat_target::wait): Adjust.
3097 * target-debug.h (target_debug_print_options): Adjust.
3098
3099 2018-08-07 Tom Tromey <tom@tromey.com>
3100
3101 * Makefile.in (CPPFLAGS): New variable.
3102 (INTERNAL_CPPFLAGS): Use it.
3103
3104 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3105
3106 * NEWS: Mention the index cache.
3107
3108 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3109
3110 * common/pathstuff.h (get_standard_cache_dir): New.
3111 * common/pathstuff.c (get_standard_cache_dir): New.
3112 * build-id.h (build_id_to_string): New.
3113 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3114 DEBUG_STR_SUFFIX): Move to here.
3115 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3116 DEBUG_STR_SUFFIX): Move from there.
3117 (write_psymtabs_to_index): Make non-static, add basename
3118 parameter. Write to temporary files, rename when done.
3119 (save_gdb_index_command): Adjust call to
3120 write_psymtabs_to_index.
3121 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3122 field.
3123 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3124 (get_gdb_index_contents_from_cache): New.
3125 (get_gdb_index_contents_from_cache_dwz): New.
3126 (dwarf2_initialize_objfile): Read index from cache.
3127 (dwarf2_build_psymtabs): Save to index.
3128 * dwarf-index-cache.h: New file.
3129 * dwarf-index-cache.c: New file.
3130 * dwarf-index-write.h: New file.
3131
3132 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3133
3134 * gnulib/aclocal.m4: Re-generate.
3135 * gnulib/config.in: Re-generate.
3136 * gnulib/configure: Re-generate.
3137 * gnulib/import/Makefile.am: Re-generate.
3138 * gnulib/import/Makefile.in: Re-generate.
3139 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3140 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3141 * gnulib/import/m4/mkdir.m4: New file.
3142 * gnulib/import/mkdir.c: New file.
3143 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3144 module.
3145
3146 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3147
3148 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3149 * common/scoped_mmap.c: New file.
3150 * common/scoped_mmap.h (destroy): New method.
3151 (~scoped_mmap, reset): Use destroy.
3152 (scoped_mmap): New move constructor.
3153 (mmap_file): New declaration.
3154 * unittests/scoped_mmap-selftests.c (test_normal,
3155 test_invalid_filename, run_tests): New functions.
3156 (_initialize_scoped_mmap_selftests): Register selftest.
3157
3158 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3159
3160 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3161 (read_gdb_index_from_buffer): ... this. Remove section
3162 parameter, add buffer parameter.
3163 (get_gdb_index_contents_ftype,
3164 get_gdb_index_contents_dwz_ftype): New typedefs.
3165 (dwarf2_read_gdb_index): Add callback parameters to get the
3166 index contents.
3167 (get_gdb_index_contents_from_section): New.
3168 (dwarf2_initialize_objfile): Update call to
3169 dwarf2_read_gdb_index.
3170
3171 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3172
3173 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3174 (gdb_open_cloexec): Likewise.
3175 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3176 (commandline_from_pid): Likewise.
3177 (linux_xfer_osdata_threads): Likewise.
3178 (linux_xfer_osdata_fds): Likewise.
3179 * ada-lang.c (is_package_name): Likewise.
3180 * auxv.c (procfs_xfer_auxv): Likewise.
3181 * breakpoint.c (print_one_breakpoint_location): Use
3182 uiout::field_fmt.
3183 (print_one_catch_solib): Use string_printf.
3184 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3185 (add_pe_forwarded_sym): Likewise.
3186 * dwarf2read.c (create_type_unit_group): Likewise.
3187 (build_error_marker_type): Likewise.
3188 * infcall.c (get_function_name): Likewise.
3189 * valprint.c (print_converted_chars_to_obstack): Likewise.
3190 * xtensa-tdep.c (xtensa_register_type): Likewise.
3191
3192 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3193
3194 * remote.c (remote_target::download_tracepoint): Fix format
3195 string errors.
3196
3197 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3198
3199 * tracefile.c: Include common/byte-vector.h.
3200 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3201 with trace_regblock_size if needed. Update uses of buf.
3202
3203 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3204
3205 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3206 std::vector<unsigned char>.
3207 * tracepoint.c (collection_list::collection_list): Remove
3208 m_regs_mask initializer from initializer list. Resize
3209 m_regs_mask using the largest remote register number.
3210 (collection_list::add_remote_register): Remove size check on
3211 m_regs_mask. Use at to access element.
3212 (collection_list::stringify): Change type of temp_buf to
3213 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3214 stringify the register mask. Use pack_hex_byte for the register
3215 mask.
3216
3217 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3218
3219 * tracepoint.h (class collection_list) <add_register>: Remove.
3220 <add_remote_register, add_ax_registers, add_local_register>:
3221 Declare.
3222 <add_memrange>: Add scope parameter.
3223 * tracepoint.c (encode_actions_1): Likewise.
3224 (collection_list::add_register): Rename to ...
3225 (collection_list::add_remote_register): ... this. Update
3226 comment.
3227 (collection_list::add_ax_registers, add_local_register): New
3228 methods.
3229 (collection_list::add_memrange): Add scope parameter. Call
3230 add_local_register instead of add_register.
3231 (finalize_tracepoint_aexpr): New function.
3232 (collection_list::collect_symbol): Update calls to add_memrange.
3233 Call add_local_register instead of add_register. Call
3234 add_ax_registers. Call finalize_tracepoint_aexpr.
3235 (encode_actions_1): Get remote regnos for $reg action. Call
3236 add_remote_register, add_ax_registers, and add_local_register.
3237 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3238 (validate_actionline): Call finalize_tracepoint_aexpr.
3239
3240 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3241
3242 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3243 Replace array buf with gdb::char_vector buf, of size
3244 get_remote_packet_size (). Replace references to buf and
3245 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3246 and xsnprintf with snprintf. Raise errors if the buffer is too
3247 small.
3248
3249 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3250
3251 * remote.c (remote_target::download_tracepoint): Fix the has_more
3252 predicate in the QTDP action list iteration.
3253
3254 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3255
3256 * remote.c (remote_target::download_tracepoint): Fix indentation
3257 in for block.
3258
3259 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3260
3261 * proc-api.c (_initialize_proc_api): Remove c, unused.
3262 * procfs.c (procfs_init_inferior): Remove signals, unused.
3263 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3264 unused.
3265
3266 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3267 Andrew Burgess <andrew.burgess@embecosm.com>
3268
3269 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3270 'W_STOPCODE (0)' as this could be ambiguous.
3271
3272 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3273
3274 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3275 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3276 "ai_socktype").
3277
3278 2018-08-02 Tom Tromey <tom@tromey.com>
3279
3280 PR symtab/16842.
3281 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3282 symbols.
3283 (process_structure_scope): Likewise.
3284
3285 2018-08-02 Xavier Roirand <roirand@adacore.com>
3286
3287 PR gdb/22629:
3288 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3289 kill inferior.
3290
3291 2018-08-02 Tom Tromey <tom@tromey.com>
3292
3293 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3294 (darwin_suspend_inferior, darwin_resume_inferior)
3295 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3296 (darwin_check_new_threads): Check result of get_darwin_inferior.
3297
3298 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3299
3300 GDB 8.1.1 released.
3301
3302 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3303
3304 * varobj.c (varobj_get_path_expr_parent): Report an error if
3305 parent is a dynamic varobj.
3306
3307 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3308
3309 * gnulib/aclocal.m4: Re-generate.
3310 * gnulib/config.in: Re-generate.
3311 * gnulib/configure: Re-generate.
3312 * gnulib/import/Makefile.in: Re-generate.
3313 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3314 * gnulib/import/m4/onceonly.m4: Re-generate.
3315
3316 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3317
3318 * target-descriptions.c (struct xml_test_tdesc): New.
3319 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3320 (record_xml_tdesc): Update.
3321 (maintenance_check_xml_descriptions): Update.
3322 * target-descriptions.h (record_xml_tdesc): Update comment.
3323
3324 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3325
3326 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3327 checking array bounds are defined.
3328
3329 2018-07-30 Tom Tromey <tom@tromey.com>
3330
3331 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3332 irreflexivity violation.
3333
3334 2018-07-30 Tom Tromey <tom@tromey.com>
3335
3336 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3337 * value.c (unpack_long): Remove lint code.
3338 * valops.c (value_ind): Remove lint code.
3339 * valarith.c (value_x_binop, value_x_unop, value_equal)
3340 (value_pos): Remove lint code.
3341
3342 2018-07-28 Tom de Vries <tdevries@suse.de>
3343
3344 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3345 with undefined upper bound as <optimized out>.
3346
3347 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3348
3349 * gcore.in: Rename variable "name" to "prefix". Expand
3350 "usage" text.
3351
3352 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3353
3354 * windows-nat.c (windows_nat_target::create_inferior): Update to
3355 call close() in global namespace.
3356
3357 2018-07-26 Tom Tromey <tom@tromey.com>
3358
3359 * dwarf-index-write.c (add_address_entry): Don't add objfile
3360 offsets.
3361 * dbxread.c (find_stab_function): Rename from
3362 find_stab_function_addr. Return a bound_minimal_symbol.
3363 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3364 Don't add objfile offsets.
3365 (end_psymtab): Use raw_text_low, raw_text_high,
3366 MSYMBOL_VALUE_RAW_ADDRESS.
3367 (read_ofile_symtab): Update.
3368 (process_one_symbol): Update.
3369 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3370 offsets.
3371 (dw2_relocate): Remove.
3372 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3373 searching addrmap.
3374 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3375 Update.
3376 (process_psymtab_comp_unit_reader, add_partial_symbol)
3377 (add_partial_subprogram, dwarf2_ranges_read): Update.
3378 (load_partial_dies): Update.
3379 (add_address_entry): Don't add objfile offsets.
3380 (dwarf2_build_include_psymtabs): Update.
3381 (create_addrmap_from_aranges): Don't add objfile offsets.
3382 (dw2_find_pc_sect_compunit_symtab): Update.
3383 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3384 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3385 Update.
3386 (parse_partial_symbols): Don't add objfile offsets. Use
3387 raw_text_low, raw_text_high. Update.
3388 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3389 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3390 or call 'relocate' quick function. Clear psymbol_map.
3391 * psympriv.h (struct partial_symbol) <address>: Add section
3392 offset.
3393 <set_unrelocated_address>: Rename from set_address.
3394 <raw_text_low, raw_text_high>: New methods.
3395 <text_low, text_high>: Add objfile parameter.
3396 (add_psymbol_to_bcache): Add 'section' parameter. Call
3397 set_unrelocated_address.
3398 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3399 (find_pc_psymbol): Update.
3400 (fixup_psymbol_section, relocate_psymtabs): Remove.
3401 (dump_psymtab, psym_functions): Update.
3402 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3403 parameter.
3404 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3405 (start_psymtab_common): Update.
3406 * symfile-debug.c (debug_qf_relocate): Remove.
3407 (debug_sym_quick_functions): Update.
3408 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3409 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3410 Update.
3411
3412 2018-07-26 Tom Tromey <tromey@redhat.com>
3413
3414 * dbxread.c (end_psymtab): Use text_high_valid and
3415 text_low_valid.
3416 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3417 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3418 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3419 Update comment.
3420 <text_low_valid, text_high_valid>: New fields.
3421 <set_text_low, set_text_high>: Update.
3422 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3423
3424 2018-07-26 Tom Tromey <tom@tromey.com>
3425
3426 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3427 Update.
3428 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3429 textlow and texthigh fields.
3430 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3431 Update.
3432 * mdebugread.c (parse_lines, parse_partial_symbols)
3433 (psymtab_to_symtab_1): Update.
3434 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3435 Rename fields. Update comment. Now private.
3436 <text_low, text_high, set_text_low, set_text_high>: New methods.
3437 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3438 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3439 (start_psymtab_common, maintenance_info_psymtabs)
3440 (maintenance_check_psymtabs): Update.
3441 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3442 texthigh fields.
3443 (scan_xcoff_symtab): Update.
3444
3445 2018-07-26 Tom Tromey <tromey@redhat.com>
3446
3447 * psympriv.h (struct partial_symbol) <unrelocated_address,
3448 address, set_address>: New methods.
3449 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3450 (fixup_psymbol_section, relocate_psymtabs): Update.
3451 (print_partial_symbols): Add 'objfile' parameter. Update.
3452 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3453 Update.
3454
3455 2018-07-26 Tom Tromey <tom@tromey.com>
3456
3457 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3458 (debug_names::write_psymbols): Update.
3459 * psympriv.h (struct partial_symbol): Derive from
3460 general_symbol_info.
3461 <obj_section>: New method.
3462 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3463 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3464 (find_pc_sect_psymbol, fixup_psymbol_section)
3465 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3466 (print_partial_symbols, recursively_search_psymtabs)
3467 (compare_psymbols, psymbol_hash, psymbol_compare)
3468 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3469 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3470
3471 2018-07-26 Tom Tromey <tromey@redhat.com>
3472
3473 * dbxread.c (end_psymtab): Remove dead code.
3474
3475 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3476
3477 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3478 DWARF unwinders are disabled.
3479 * dwarf2-frame.c: Add dwarf2read.h include.
3480 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3481 disabled.
3482 (dwarf2_frame_unwinders_enabled_p): Define.
3483 (show_dwarf_unwinders_enabled_p): New function.
3484 (_initialize_dwarf2_frame): Register switch to control DWARF
3485 unwinder use.
3486 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3487 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3488 (show_dwarf_cmdlist): Remove static keyword.
3489 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3490 (show_dwarf_cmdlist): Declare.
3491 * NEWS: Document new feature.
3492
3493 2018-07-26 Tom de Vries <tdevries@suse.de>
3494
3495 PR breakpoints/23366
3496 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3497
3498 2018-07-26 Tom de Vries <tdevries@suse.de>
3499
3500 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3501 DW_AT_count can't be translated to a dynamic prop.
3502
3503 2018-07-25 Tom de Vries <tdevries@suse.de>
3504
3505 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3506 try/catch.
3507
3508 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3509
3510 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3511
3512 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3513
3514 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3515
3516 2018-07-24 Keith Seitz <keiths@redhat.comt
3517
3518 PR symtab/23010
3519 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3520 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3521 instead of add_symbol_to_list.
3522 (read_file_scope): Call prepare_one_comp_unit before reading
3523 any other DIEs.
3524
3525 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3526
3527 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3528
3529 2018-07-24 Tom Tromey <tom@tromey.com>
3530
3531 * utils.c (malloc, realloc, free): Don't declare.
3532 * configure, config.in: Rebuild.
3533 * configure.ac: Don't check for declarations of free, malloc, or
3534 realloc.
3535
3536 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3537
3538 * aarch64-linux-nat.c
3539 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3540 variable.
3541 * arm-linux-nat.c (fetch_regs): Likewise.
3542 (store_regs): Likewise.
3543 (fetch_vfp_regs): Likewise.
3544 (store_vfp_regs): Likewise.
3545 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3546 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3547 (arm_linux_nat_target::insert_watchpoint): Likewise.
3548 (arm_linux_nat_target::remove_watchpoint): Likewise.
3549 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3550 Likewise.
3551 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3552 Likewise.
3553 * ppc-linux-nat.c (fetch_register): Likewise.
3554 (fetch_all_gp_regs): Likewise.
3555 (fetch_ppc_registers): Likewise.
3556 (store_all_gp_regs): Likewise.
3557 (store_ppc_registers): Likewise.
3558 (hwdebug_insert_point): Likewise.
3559 (can_use_watchpoint_cond_accel): Likewise.
3560 * remote-sim.c (gdb_os_write_stdout): Likewise.
3561
3562 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3563 Tom Tromey <tom@tromey.com>
3564
3565 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3566 test for it.
3567 * configure: Rebuild.
3568
3569 2018-07-22 Tom Tromey <tom@tromey.com>
3570
3571 * regformats/regdat.sh: Define xmltarget_${name} inside
3572 #ifndef IN_PROCESS_AGENT.
3573
3574 2018-07-22 Tom Tromey <tom@tromey.com>
3575
3576 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3577
3578 2018-07-22 Tom Tromey <tom@tromey.com>
3579
3580 * symfile.c (reread_symbols): Notify iter, not objfile.
3581
3582 2018-07-22 Tom Tromey <tom@tromey.com>
3583
3584 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3585 Use arch_ops.
3586 (ravenscar_thread_target::prepare_to_store): Likewise.
3587
3588 2018-07-22 Tom Tromey <tom@tromey.com>
3589
3590 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3591 unused variable. Call value_fetch_lazy when needed.
3592 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3593 Remove unused variable. Call value_fetch_lazy when needed.
3594
3595 2018-07-22 Tom Tromey <tom@tromey.com>
3596
3597 * m32c-tdep.c (mark_dma): Return void.
3598 (make_regs): Remove unused declarations.
3599
3600 2018-07-22 Tom Tromey <tom@tromey.com>
3601
3602 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3603 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3604 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3605 bkscm_get_valid_block_smob_arg_unsafe for effect.
3606
3607 2018-07-22 Tom Tromey <tom@tromey.com>
3608
3609 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3610 value_type.
3611
3612 2018-07-22 Tom Tromey <tom@tromey.com>
3613
3614 * windows-nat.c (saved_context): Conditionally define.
3615 * remote.c (remote_target::remote_btrace_maybe_reopen):
3616 Conditionally declare "warned".
3617 * inflow.c (sigquit_ours): Conditionally define.
3618 (new_tty): Move "tty" declaration inside #if.
3619 * guile/guile.c (guile_datadir): Conditionally define.
3620 * charset.c (set_be_le_names): Move some declarations inside #if.
3621 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3622 #if.
3623 (parse_xml_btrace_conf): Likewise.
3624
3625 2018-07-22 Tom Tromey <tom@tromey.com>
3626
3627 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3628
3629 2018-07-22 Tom Tromey <tom@tromey.com>
3630
3631 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3632 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3633 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3634 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3635 * stack.c (frame_apply_level_command): Remove unused variable.
3636 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3637 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3638 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3639 unused variable.
3640 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3641 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3642 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3643 variable.
3644 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3645 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3646 variable.
3647 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3648 Remove unused variable.
3649 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3650 variable.
3651 * common/tdesc.c (print_xml_feature::visit): Remove unused
3652 variable.
3653 * compile/compile-object-load.c (store_regs): Remove unused
3654 variables.
3655 * complaints.c (clear_complaints): Remove unused variable.
3656 * corelow.c (core_target_open): Remove unused variable.
3657 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3658 variable.
3659 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3660 variable.
3661 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3662 variable.
3663 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3664 variable.
3665 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3666 variable.
3667 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3668 variable.
3669 * ia64-tdep.c (examine_prologue): Remove unused variable.
3670 * infcall.c (run_inferior_call): Remove unused variable.
3671 * inferior.c (exit_inferior): Remove unused variable.
3672 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3673 * linespec.c (decode_line_2): Remove unused variable.
3674 * linux-nat.c (super_close): Remove.
3675 * linux-tdep.c (linux_info_proc): Remove unused variable.
3676 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3677 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3678 Remove unused variable.
3679 * parse.c (find_minsym_type_and_address): Remove unused variable.
3680 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3681 variable.
3682 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3683 variable.
3684 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3685 variables.
3686 * record-btrace.c (record_btrace_target::store_registers): Remove
3687 unused variable.
3688 (cmd_show_record_btrace_cpu): Remove unused variable.
3689 * riscv-tdep.c (riscv_register_reggroup_p)
3690 (riscv_push_dummy_call, riscv_return_value): Remove unused
3691 variable.
3692 * rust-exp.y (literal): Remove unused variable.
3693 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3694 unused variable.
3695 <STRUCTOP_ANONYMOUS>: Likewise.
3696 * s390-linux-tdep.c (s390_linux_init_abi_31)
3697 (s390_linux_init_abi_64): Remove unused variable.
3698 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3699 (file_select_thread, net_windows_open, _initialize_ser_windows):
3700 Remove unused variables.
3701 * symtab.c (find_pc_sect_line): Remove unused variable.
3702 * target-memory.c (compute_garbled_blocks): Remove unused
3703 variable.
3704 (target_write_memory_blocks): Remove unused variable.
3705 * target.c (target_stack::unpush): Remove unused variables.
3706 * tracepoint.c (start_tracing, all_tracepoint_actions)
3707 (merge_uploaded_trace_state_variables)
3708 (print_one_static_tracepoint_marker): Remove unused variable.
3709 * unittests/basic_string_view/element_access/char/1.cc (test01):
3710 Remove unused variable.
3711 * windows-nat.c (windows_continue, windows_add_all_dlls)
3712 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3713 Remove unused variables.
3714
3715 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3716
3717 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3718 attr_profile in HAVE_ELF.
3719 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3720 HAVE_ELF.
3721
3722 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3723
3724 * frame.c (frame_register_unwind): Change parameter name.
3725 (frame_unwind_register): Likewise.
3726 (frame_unwind_register_value): Likewise.
3727 (frame_unwind_register_signed): Likewise.
3728 (frame_unwind_register_unsigned): Likewise.
3729 * frame.h (frame_register_unwind): Likewise.
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_unwind_arch): Likewise.
3735
3736 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3737
3738 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3739 ISA maintenance.
3740
3741 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3742
3743 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3744 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3745 hand.
3746
3747 2018-07-20 Keith Seitz <keiths@redhat.com>
3748
3749 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3750 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3751 m_compunit_symtab, m_language>: Add "m_" prefix.
3752 Update all uses.
3753 * buildsym.c: Update all uses.
3754
3755 2018-07-20 Tom Tromey <tom@tromey.com>
3756
3757 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3758 * buildsym.h (record_line_ftype): Remove typedef.
3759
3760 2018-07-20 Tom Tromey <tom@tromey.com>
3761
3762 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3763 (end_expandable_symtab): Likewise.
3764 (end_symtab_get_static_block): Likewise.
3765 (end_symtab_from_static_block): Likewise.
3766 * buildsym-legacy.c (augment_type_symtab): Remove.
3767 (end_expandable_symtab): Remove.
3768 (end_symtab_get_static_block): Remove.
3769 (end_symtab_from_static_block): Remove.
3770
3771 2018-07-20 Tom Tromey <tom@tromey.com>
3772
3773 * dwarf2read.c: Include buildsym.h.
3774 (struct dwarf2_cu) <builder>: New method.
3775 (fixup_go_packaging): Update.
3776 (process_full_comp_unit, process_full_type_unit): Update. Don't
3777 use scoped_free_pendings.
3778 (using_directives): Add "cu" parameter, remove "language".
3779 (read_import_statement, setup_type_unit_groups, )
3780 (read_func_scope, read_lexical_block_scope)
3781 (dwarf2_record_block_ranges, read_namespace): Update.
3782 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3783 (lnp_state_machine::handle_end_sequence): Update.
3784 (class lnp_state_machine) <m_cu>: New member.
3785 <m_record_line_callback>: Remove.
3786 <m_currently_recording_lines>: New member.
3787 (lnp_state_machine::handle_set_file): Update.
3788 (noop_record_line): Remove.
3789 (dwarf_record_line_p): Add cu parameter.
3790 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3791 (lnp_state_machine::record_line)
3792 (lnp_state_machine::lnp_state_machine)
3793 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3794 (dwarf_decode_lines): Update.
3795 (dwarf2_start_subfile): Add cu parameter.
3796 (dwarf2_start_symtab, new_symbol): Update.
3797 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3798 Remove dwarf2_per_objfile parameter.
3799 (dwarf_decode_macros): Update.
3800
3801 2018-07-20 Tom Tromey <tom@tromey.com>
3802
3803 * stabsread.c (define_symbol): Update.
3804 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3805 * dwarf2read.c (new_symbol): Update.
3806 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3807 * cp-namespace.c: Include buildsym.h.
3808 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3809 * buildsym-legacy.c (get_buildsym_compunit): New function.
3810
3811 2018-07-20 Tom Tromey <tom@tromey.com>
3812
3813 * xcoffread.c: Include buildsym-legacy.h.
3814 * windows-nat.c: Include buildsym-legacy.h.
3815 * stabsread.c: Include buildsym-legacy.h.
3816 * mdebugread.c: Include buildsym-legacy.h.
3817 * buildsym-legacy.h: New file.
3818 * buildsym-legacy.c: New file, from buildsym.c.
3819 * go32-nat.c: Include buildsym-legacy.h.
3820 * dwarf2read.c: Include buildsym-legacy.h.
3821 * dbxread.c: Include buildsym-legacy.h.
3822 * cp-namespace.c: Include buildsym-legacy.h.
3823 * coffread.c: Include buildsym-legacy.h.
3824 * buildsym.h: Move some contents to buildsym-legacy.h.
3825 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3826 buildsym-legacy.c.
3827 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3828
3829 2018-07-20 Tom Tromey <tom@tromey.com>
3830
3831 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3832 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3833 (buildsym_compunit::buildsym_compunit)
3834 (buildsym_compunit::~buildsym_compunit)
3835 (buildsym_compunit::get_macro_table): Define.
3836
3837 2018-07-20 Tom Tromey <tom@tromey.com>
3838
3839 * buildsym.c (reset_symtab_globals): Remove.
3840 (buildsym_compunit::end_symtab_from_static_block): Update.
3841 (buildsym_compunit::augment_type_symtab): Update.
3842 (end_symtab_from_static_block): Call free_buildsym_compunit.
3843 (augment_type_symtab, end_symtab, end_expandable_symtab):
3844 Likewise.
3845
3846 2018-07-20 Tom Tromey <tom@tromey.com>
3847
3848 * arch-utils.c: Do not include buildsym.h.
3849 * mipsread.c: Do not include buildsym.h.
3850 * machoread.c: Do not include buildsym.h.
3851 * elfread.c: Do not include buildsym.h.
3852
3853 2018-07-20 Tom Tromey <tom@tromey.com>
3854
3855 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3856 initialization.
3857 (buildsym_compunit): Add new constructor.
3858 (struct buildsym_compunit) <get_last_source_file, finish_block,
3859 record_block_range, start_subfile, patch_subfile_names,
3860 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3861 set_last_source_start_addr, get_last_source_start_addr,
3862 get_local_using_directives, set_local_using_directives,
3863 get_global_using_directives, outermost_context_p,
3864 get_current_context_stack, get_context_stack_depth,
3865 get_current_subfile, get_local_symbols, get_file_symbols,
3866 get_global_symbols, record_debugformat, record_producer,
3867 push_context, pop_context, end_symtab_get_static_block,
3868 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3869 New public methods.
3870 <record_pending_block, finish_block_internal, make_blockvector,
3871 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3872 private methods.
3873 Update all users.
3874
3875 2018-05-22 Tom Tromey <tom@tromey.com>
3876
3877 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3878 parameter.
3879 (finish_block_internal): Update.
3880
3881 2018-07-20 Tom Tromey <tom@tromey.com>
3882
3883 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3884 parameter.
3885 (finish_block_internal): Update.
3886
3887 2018-07-20 Tom Tromey <tom@tromey.com>
3888
3889 * buildsym.h (EXTERN): Don't define or undef.
3890 * buildsym.c (EXTERN): Don't define.
3891
3892 2018-07-20 Tom Tromey <tom@tromey.com>
3893
3894 * buildsym.c: Remove TODO comment.
3895
3896 2018-07-20 Tom Tromey <tom@tromey.com>
3897
3898 * coffread.c (coff_symtab_read): Update.
3899 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3900 (xcoff_new_init): Update.
3901 * mipsread.c (mipscoff_new_init): Update.
3902 * mdebugread.c (mdebug_build_psymtabs): Update.
3903 * elfread.c (elf_new_init): Update.
3904 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3905 Update.
3906 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3907 (coffstab_build_psymtabs, elfstab_build_psymtabs)
3908 (stabsect_build_psymtabs): Update.
3909 * buildsym.h (buildsym_init): Don't declare.
3910 * buildsym.c: Update comment.
3911 (prepare_for_building): Remove.
3912 (start_symtab, restart_symtab): Update.
3913 (reset_symtab_globals): Update comment.
3914 (buildsym_init): Remove.
3915
3916 2018-07-20 Tom Tromey <tom@tromey.com>
3917
3918 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3919 * stabsread.c (patch_block_stabs, define_symbol, read_type)
3920 (read_enum_type, common_block_start, common_block_end)
3921 (cleanup_undefined_types_1, finish_global_stabs): Update.
3922 * mdebugread.c (psymtab_to_symtab_1): Update.
3923 * dwarf2read.c (fixup_go_packaging, read_func_scope)
3924 (read_lexical_block_scope, new_symbol): Update.
3925 * dbxread.c (process_one_symbol): Update.
3926 * coffread.c (coff_symtab_read, process_coff_symbol)
3927 (coff_read_enum_type): Update.
3928 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3929 declare.
3930 (get_local_symbols, get_file_symbols, get_global_symbols): New
3931 functions.
3932 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3933 m_global_symbols.
3934 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3935 (~scoped_free_pendings): Update.
3936 (finish_block, prepare_for_building, reset_symtab_globals)
3937 (end_symtab_get_static_block, end_symtab_with_blockvector)
3938 (augment_type_symtab, push_context): Update.
3939 (get_local_symbols, get_file_symbols, get_global_symbols): New
3940 functions.
3941 (buildsym_init): Update.
3942
3943 2018-07-20 Tom Tromey <tom@tromey.com>
3944
3945 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3946 (process_full_type_unit): Likewise.
3947 (dwarf2_start_symtab): Set list_in_scope.
3948
3949 2018-07-20 Tom Tromey <tom@tromey.com>
3950
3951 * dwarf2read.c (process_psymtab_comp_unit_reader)
3952 (build_type_psymtabs_reader): Do not set list_in_scope.
3953
3954 2018-07-20 Tom Tromey <tom@tromey.com>
3955
3956 * buildsym.c (free_pendings): Remove.
3957 (add_symbol_to_list, scoped_free_pendings)
3958 (finish_block_internal, buildsym_init): Update.
3959
3960 2018-07-20 Tom Tromey <tom@tromey.com>
3961
3962 * xcoffread.c (read_xcoff_symtab): Update.
3963 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3964 Update.
3965 * dbxread.c (process_one_symbol): Update.
3966 * coffread.c (coff_symtab_read): Update.
3967 * buildsym.h (finish_block): Update.
3968 * buildsym.c (finish_block): Remove "listhead" argument.
3969 (end_symtab_get_static_block): Update.
3970
3971 2018-07-20 Tom Tromey <tom@tromey.com>
3972
3973 * buildsym.h (class scoped_free_pendings): Remove constructor.
3974 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3975 method.
3976 <m_pending_block_obstack, m_pending_blocks>: New members.
3977 (pending_block_obstack, pending_blocks): Remove.
3978 (scoped_free_pendings::scoped_free_pendings): Default.
3979 (~scoped_free_pendings): Update.
3980 (free_pending_blocks): Remove.
3981 (finish_block_internal, record_pending_block, make_blockvector)
3982 (end_symtab_get_static_block, augment_type_symtab, push_context)
3983 (buildsym_init): Update.
3984
3985 2018-07-20 Tom Tromey <tom@tromey.com>
3986
3987 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3988 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3989 members.
3990 (pending_addrmap, pending_addrmap_obstack)
3991 (pending_addrmap_interesting): Remove.
3992 (scoped_free_pendings, record_block_range, make_blockvector)
3993 (prepare_for_building, reset_symtab_globals, buildsym_init):
3994 Update.
3995
3996 2018-07-20 Tom Tromey <tom@tromey.com>
3997
3998 * xcoffread.c (process_linenos): Update.
3999 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4000 * mdebugread.c (psymtab_to_symtab_1): Update.
4001 * dwarf2read.c (setup_type_unit_groups)
4002 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4003 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4004 * dbxread.c (process_one_symbol): Update.
4005 * coffread.c (coff_symtab_read, enter_linenos)
4006 (process_coff_symbol): Update.
4007 * buildsym.h (current_subfile): Don't declare.
4008 (get_current_subfile): Declare.
4009 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4010 member.
4011 (start_subfile, free_buildsym_compunit, push_subfile)
4012 (prepare_for_building, start_symtab): Update.
4013 (get_current_subfile): New function.
4014
4015 2018-07-20 Tom Tromey <tom@tromey.com>
4016
4017 * coffread.c (coff_symtab_read): Update.
4018 * xcoffread.c (read_xcoff_symtab): Update.
4019 * dwarf2read.c (new_symbol): Update.
4020 (read_func_scope, read_lexical_block_scope): Update.
4021 * dbxread.c (process_one_symbol): Update.
4022 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4023 (outermost_context_p): Remove macro.
4024 (outermost_context_p, get_current_context_stack)
4025 (get_context_stack_depth): Declare.
4026 (pop_context): Return struct context_stack.
4027 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4028 member.
4029 (context_stack_size): Remove.
4030 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4031 (prepare_for_building, end_symtab_get_static_block)
4032 (augment_type_symtab, push_context): Update.
4033 (pop_context): Return struct context_stack.
4034 (outermost_context_p, get_current_context_stack)
4035 (get_context_stack_depth): New functions.
4036 (buildsym_init): Update.
4037
4038 2018-07-20 Tom Tromey <tom@tromey.com>
4039
4040 * rust-exp.y: Now a pure parser. Update all rules.
4041 (%union): Move earlier.
4042 (current_parser, work_obstack): Remove globals.
4043 (rust_parser, ~rust_parser): Update.
4044 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4045 lex_character, lex_number, lex_string, lex_identifier,
4046 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4047 convert_name, convert_params_to_expression,
4048 convert_ast_to_expression, ast_basic_type, ast_operation,
4049 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4050 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4051 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4052 ast_array_type, ast_slice_type, ast_reference_type,
4053 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4054 (rust_parse): Update.
4055 (rustyyerror, rustyylex): Add parser parameter.
4056 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4057 (rust_lex_stringish_test, rust_lex_test_sequence)
4058 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4059 (rust_lex_test_push_back, rust_lex_tests): Update.
4060
4061 2018-07-19 Pedro Alves <palves@redhat.com>
4062
4063 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4064 gdb::unique_xmalloc_ptr.
4065 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4066 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4067 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4068 copy-initialization.
4069 * guile/scm-pretty-print.c (ppscm_print_children): Use
4070 gdb::unique_xmalloc_ptr instead of cleanups.
4071 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4072 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4073 gdb::unique_xmalloc_ptr.
4074 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4075 Adjust to use gdb::unique_xmalloc_ptr.
4076 * guile/scm-utils.c (extract_arg): Adjust.
4077 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4078 gdb::unique_xmalloc_ptr instead of a cleanup.
4079
4080 2018-07-19 Tom Tromey <tom@tromey.com>
4081
4082 * utils.c (do_value_free_to_mark)
4083 (make_cleanup_value_free_to_mark): Remove.
4084 * utils.h (make_cleanup_value_free_to_mark): Remove.
4085
4086 2018-07-19 Pedro Alves <palves@redhat.com>
4087
4088 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4089 forwarding reference.
4090
4091 2018-07-18 Pedro Alves <palves@redhat.com>
4092
4093 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4094 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4095 cleanup.
4096
4097 2018-07-18 Pedro Alves <palves@redhat.com>
4098
4099 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4100 exceptions.
4101 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4102 (gdbscm_wrap): New.
4103 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4104 directly instead of a cleanup.
4105 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4106 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4107 (vlscm_binop_gdbthrow): New, factored out from ...
4108 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4109 (vlscm_rich_compare): Use gdbscm_wrap.
4110 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4111 instead of a cleanup.
4112 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4113 cleanup.
4114 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4115 Use xfree directly instead of a cleanup.
4116 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4117 Adjust to use gdbscm_wrap and scoped_value_mark.
4118 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4119 (gdbscm_value_address, gdbscm_value_dereference)
4120 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4121 scoped_value_mark.
4122 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4123 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4124 scoped_value_mark.
4125 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4126 gdbscm_wrap and scoped_value_mark.
4127 (gdbscm_value_to_string): Use xfree directly instead of a
4128 cleanup. Move 'buffer' unique_ptr to TRY scope.
4129 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4130 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4131 scoped_value_mark.
4132 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4133 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4134 scoped_value_mark.
4135 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4136 gdbscm_wrap.
4137
4138 2018-07-18 Tom de Vries <tdevries@suse.de>
4139
4140 * findvar.c (default_read_var_value): Also resolve dynamic type for
4141 LOC_OPTIMIZED_OUT vars.
4142
4143 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4144
4145 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4146 decoding.
4147
4148 2018-07-17 Tom Tromey <tom@tromey.com>
4149
4150 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4151 (compute_enum_list, pascm_set_param_value_x)
4152 (gdbscm_parameter_value): Update.
4153 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4154 (gdbscm_scm_to_host_string): Update.
4155 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4156 Update.
4157 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4158 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4159 * guile/scm-string.c (gdbscm_scm_to_string): Return
4160 unique_xmalloc_ptr.
4161 (gdbscm_scm_to_host_string): Likewise.
4162
4163 2018-07-17 Tom Tromey <tom@tromey.com>
4164
4165 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4166 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4167 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4168 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4169 unique_xmalloc_ptr.
4170
4171 2018-07-17 Tom Tromey <tom@tromey.com>
4172
4173 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4174 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4175 Update.
4176 * guile/scm-cmd.c (cmdscm_function): Update.
4177 * guile/scm-pretty-print.c
4178 (ppscm_print_exception_unless_memory_error): Update.
4179 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4180 Return unique_xmalloc_ptr.
4181
4182 2018-07-17 Tom Tromey <tom@tromey.com>
4183
4184 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4185 Use string_printf.
4186
4187 2018-07-17 Jim Wilson <jimw@sifive.com>
4188
4189 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4190 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4191 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4192 unecessary braces after EF_RISCV_RVC test. Delete call to
4193 set_gdbarch_decr_pc_after_break.
4194
4195 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4196 RISCV_LAST_FP_REGNUM + 1.
4197 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4198
4199 2018-07-17 Tom Tromey <tom@tromey.com>
4200
4201 * configure.ac: Remove --disable-gdbcli.
4202 * configure: Rebuild.
4203 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4204 (SUBDIR_CLI_CFLAGS): Remove.
4205 (SFILES): Use SUBDIR_CLI_SRCS.
4206 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4207
4208 2018-07-17 Tom Tromey <tom@tromey.com>
4209
4210 PR gdb/18624:
4211 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4212
4213 2018-07-16 Jim Wilson <jimw@sifive.com>
4214
4215 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4216
4217 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4218
4219 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4220 variable.
4221 (libunwind_frame_sniffer): Likewise.
4222 (libunwind_frame_prev_register): Likewise.
4223 (libunwind_sigtramp_frame_sniffer): Likewise.
4224 * ia64-tdep.c (ia64_access_reg): Likewise.
4225 (ia64_access_rse_reg): Likewise.
4226 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4227 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4228
4229 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4230
4231 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4232
4233 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4234
4235 * remote-sim.c (gdbsim_target::close,
4236 gdbsim_target::mourn_inferior): Remove unused variables.
4237
4238 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4239
4240 * ia64-tdep.c (ktab_buf): New global.
4241 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4242 (get_kernel_table): Adjust.
4243
4244 2018-07-16 Tom Tromey <tom@tromey.com>
4245
4246 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4247 * dwarf2read.c (using_directives, new_symbol): Use
4248 outermost_context_p.
4249 * dbxread.c (process_one_symbol): Use outermost_context_p.
4250 * coffread.c (coff_symtab_read): Use outermost_context_p.
4251
4252 2018-07-16 Tom Tromey <tom@tromey.com>
4253
4254 * dwarf2read.c (using_directives, read_func_scope)
4255 (read_lexical_block_scope): Update.
4256 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4257 * buildsym.h (local_using_directives, global_using_directives):
4258 Don't declare.
4259 (get_local_using_directives, set_local_using_directives)
4260 (get_global_using_directives): Declare.
4261 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4262 m_global_using_directives>: New members.
4263 (finish_block_internal, prepare_for_building)
4264 (reset_symtab_globals, end_symtab_get_static_block)
4265 (push_context): Update.
4266 (get_local_using_directives, set_local_using_directives)
4267 (get_global_using_directives): New functions.
4268 (buildsym_init): Update.
4269
4270 2018-07-16 Tom Tromey <tom@tromey.com>
4271
4272 * xcoffread.c (xcoff_initial_scan): Don't call
4273 free_pending_blocks.
4274 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4275 * buildsym.h (class scoped_free_pendings): Add constructor.
4276 (free_pending_blocks): Don't declare.
4277 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4278 (free_pending_blocks): Now static.
4279
4280 2018-07-16 Tom Tromey <tom@tromey.com>
4281
4282 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4283 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4284 member.
4285 (struct subfile_stack): Remove.
4286 (subfile_stack): Remove.
4287 (push_subfile, pop_subfile, buildsym_init): Update.
4288
4289 2018-07-16 Tom Tromey <tom@tromey.com>
4290
4291 * buildsym.c (push_subfile): Use gdb_assert.
4292 (pop_subfile): Use gdb_assert.
4293
4294 2018-07-16 Tom Tromey <tom@tromey.com>
4295
4296 * buildsym.h (merge_symbol_lists): Remove.
4297 * buildsym.c (merge_symbol_lists): Remove.
4298
4299 2018-07-16 Tom Tromey <tom@tromey.com>
4300
4301 * stabsread.c (scan_file_globals): Update comment.
4302 * stabsread.h (scan_file_globals): Move from buildsym.h.
4303 * buildsym.h (scan_file_globals): Move to stabsread.h.
4304
4305 2018-07-16 Tom Tromey <tom@tromey.com>
4306
4307 * xcoffread.c (xcoff_new_init): Update.
4308 * mipsread.c (mipscoff_new_init): Update.
4309 * mdebugread.c (mdebug_build_psymtabs): Update.
4310 * elfread.c (elf_new_init): Update.
4311 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4312 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4313 * buildsym.h (buildsym_new_init): Don't declare.
4314 * buildsym.c (buildsym_new_init): Remove.
4315
4316 2018-07-16 Tom Tromey <tom@tromey.com>
4317
4318 * stabsread.h (within_function): Move from buildsym.h.
4319 * stabsread.c (start_stabs): Clear within_function.
4320 * coffread.c (coff_start_symtab): Clear within_function.
4321 * buildsym.h (within_function): Move to stabsread.h.
4322 * buildsym.c (prepare_for_building): Update.
4323
4324 2018-07-16 Tom Tromey <tom@tromey.com>
4325
4326 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4327 * dwarf2read.c (dwarf2_start_symtab): Don't set
4328 processing_gcc_compilation.
4329 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4330
4331 2018-07-16 Tom Tromey <tom@tromey.com>
4332
4333 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4334 (next_symbol_text_func): Move from buildsym.h.
4335 * stabsread.c (hashname): Move from buildsym.c.
4336 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4337 (next_symbol_text_func, hashname): Move to stabsread.h.
4338 * buildsym.c: Don't include bcache.h
4339 (hashname): Move to stasbread.c.
4340
4341 2018-07-16 Tom Tromey <tom@tromey.com>
4342
4343 * buildsym.h (context_stack_size): Don't declare.
4344 * buildsym.c (context_stack_size): New global.
4345
4346 2018-07-16 Tom Tromey <tom@tromey.com>
4347
4348 * dbxread.c (processing_acc_compilation): New global.
4349 * buildsym.h (processing_acc_compilation): Don't declare.
4350
4351 2018-07-16 Tom Tromey <tom@tromey.com>
4352
4353 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4354 * dbxread.c (read_ofile_symtab): Update.
4355 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4356 * buildsym.h (last_source_start_addr): Remove.
4357 (set_last_source_start_addr, get_last_source_start_addr):
4358 Declare.
4359 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4360 parameter.
4361 (struct buildsym_compunit) <m_last_source_start_addr>: New
4362 member.
4363 (prepare_for_building): Remove start_addr parameter.
4364 (start_symtab, restart_symtab, end_symtab_get_static_block)
4365 (end_symtab_with_blockvector): Update.
4366 (set_last_source_start_addr, get_last_source_start_addr): New
4367 functions.
4368
4369 2018-07-16 Tom Tromey <tom@tromey.com>
4370
4371 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4372 member.
4373 (have_line_numbers): Remove.
4374 (record_line, prepare_for_building, end_symtab_get_static_block)
4375 (augment_type_symtab): Update.
4376
4377 2018-07-16 Tom Tromey <tom@tromey.com>
4378
4379 * buildsym.c (~buildsym_compunit): Free the macro table.
4380 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4381 methods.
4382 <m_pending_macros>: New member.
4383 (pending_macros): Remove.
4384 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4385 (reset_symtab_globals, end_symtab_get_static_block)
4386 (end_symtab_with_blockvector, augment_type_symtab)
4387 (buildsym_init): Update.
4388
4389 2018-07-16 Tom Tromey <tom@tromey.com>
4390
4391 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4392 parameter.
4393 (buildsym_compunit::set_last_source_file): New method.
4394 <m_last_source_file>: New member.
4395 (prepare_for_building): Remove "name" parameter.
4396 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4397 (last_source_file): Remove.
4398 (set_last_source_file, get_last_source_file): Update.
4399
4400 2018-07-16 Tom Tromey <tom@tromey.com>
4401
4402 * buildsym.c (prepare_for_building): Add assert.
4403
4404 2018-07-16 Tom Tromey <tom@tromey.com>
4405
4406 * buildsym.c (~buildsym_compunit): Update.
4407 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4408 (start_subfile, patch_subfile_names)
4409 (end_symtab_with_blockvector): Update.
4410
4411 2018-07-16 Tom Tromey <tom@tromey.com>
4412
4413 * buildsym.c (struct buildsym_compunit): Add constructor,
4414 destructor, initializers.
4415 (start_buildsym_compunit): Remove.
4416 (free_buildsym_compunit): Use "delete".
4417 (start_symtab, restart_symtab): Use "new".
4418
4419 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4420
4421 * symfile.c (set_objfile_default_section_offset): Remove struct
4422 keyword.
4423
4424 2018-07-14 Stafford Horne <shorne@gmail.com>
4425
4426 * (Responsible Maintainers): Add myself as or1k maintainer.
4427
4428 2018-07-13 Tom Tromey <tom@tromey.com>
4429
4430 * symfile.c (set_objfile_default_section_offset): Use extra braces
4431 around initializer.
4432
4433 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4434
4435 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4436 non-branching basr.
4437
4438 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4439
4440 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4441 unittests/cli-utils-selftests.c
4442 * unittests/cli-utils-selftests.c: New file.
4443
4444 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4445
4446 * NEWS: Mention new commands. Mention change to 'thread apply'.
4447
4448 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4449
4450 * thread.c (thr_try_catch_cmd): New function.
4451 (thread_apply_all_command): Handle qcs flags.
4452 (thread_apply_command): Handle qcs flags.
4453 (taas_command): New function.
4454 (tfaas_command): New function.
4455 (_initialize_thread): Update to setup the new commands 'taas
4456 and 'tfaas'. Change doc string for 'thread apply'.
4457
4458 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4459
4460 * stack.c: (trailing_outermost_frame): New function, mostly
4461 extracted from backtrace_command_1.
4462 (leading_innermost_frame): New function.
4463 (backtrace_command_1): Update to call trailing_outermost_frame.
4464 (frame_apply_command_count): New function.
4465 (frame_apply_level_command): New function.
4466 (frame_apply_all_command): New function.
4467 (frame_apply_command): New function.
4468 (faas_command): New function.
4469 (frame_cmd_list): New variable.
4470 (_initialize_stack): Update to setup the new commands 'frame apply'
4471 and 'faas'.
4472
4473 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4474
4475 * cli-utils.c (number_or_range_parser::get_number): Only handle
4476 numbers or convenience var as numbers.
4477 (parse_flags): New function.
4478 (parse_flags_qcs): New function.
4479 (number_or_range_parser::finished): Ensure parsing end is detected
4480 before end of string.
4481 * cli-utils.h (parse_flags): New function.
4482 (parse_flags_qcs): New function.
4483 (number_or_range_parser): Remove m_finished bool.
4484 (number_or_range_parser::skip_range): Set m_in_range to false.
4485
4486 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4487
4488 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4489 on Windows.
4490
4491 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4492 Jan Kratochvil <jan.kratochvil@redhat.com>
4493 Paul Fertser <fercerpav@gmail.com>
4494 Tsutomu Seki <sekiriki@gmail.com>
4495 Pedro Alves <palves@redhat.com>
4496
4497 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4498 'unittests/parse-connection-spec-selftests.c'.
4499 (COMMON_SFILES): Add 'common/netstuff.c'.
4500 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4501 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4502 * common/netstuff.c: New file.
4503 * common/netstuff.h: New file.
4504 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4505 (wait_for_connect): Update comment. New parameter
4506 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4507 Use 'sock' directly instead of 'scb->fd'.
4508 (try_connect): New function, with code from 'net_open'.
4509 (net_open): Rewrite main loop to deal with multiple
4510 sockets/addresses. Handle IPv6-style hostnames; implement
4511 support for IPv6 connections.
4512 * unittests/parse-connection-spec-selftests.c: New file.
4513
4514 2018-07-11 Pedro Alves <palves@redhat.com>
4515
4516 PR gdb/23377
4517 * remote.c (remote_target::remote_detach_pid): Call
4518 set_current_process.
4519
4520 2018-07-11 Pedro Alves <palves@redhat.com>
4521
4522 * h8300-tdep.c (h8300_gdbarch_init): Remove
4523 set_gdbarch_ecoff_reg_to_regnum calls.
4524
4525 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4526
4527 PR c++/23373
4528 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4529 offsets/sizes for static members of a class/struct.
4530
4531 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4532
4533 * target-descriptions.c (tdesc_register_bitsize): Rename.
4534 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4535 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4536 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4537
4538 2018-07-10 Tom Tromey <tom@tromey.com>
4539
4540 * breakpoint.c (moribund_locations): Now static and a
4541 std::vector.
4542 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4543 (build_bpstat_chain, update_global_location_list)
4544 (breakpoint_retire_moribund): Update.
4545 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4546 VEC.
4547
4548 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4549
4550 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4551 (riscv_register_reggroup_p): Use new function, remove unneeded
4552 parenthesis.
4553 (riscv_push_dummy_call): Extend assert to compare against xlen or
4554 flen based on register type.
4555
4556 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4557
4558 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4559
4560 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4561
4562 * remote.c (show_hardware_watchpoint_limit): New function.
4563 (show_hardware_watchpoint_length_limit): New function.
4564 (show_hardware_breakpoint_limit): New function.
4565 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4566 where appropriate, update help text.
4567
4568 2018-07-09 Tom Tromey <tom@tromey.com>
4569
4570 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4571 (CLIBS): Don't mention NAT_CLIBS.
4572
4573 2018-07-09 Tom Tromey <tom@tromey.com>
4574
4575 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4576 (LIBGDB_OBS, clean mostlyclean): Update.
4577 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4578
4579 2018-07-09 Tom Tromey <tom@tromey.com>
4580
4581 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4582 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4583 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4584
4585 2018-07-09 Tom Tromey <tom@tromey.com>
4586
4587 * Makefile.in (ALLDEPFILES): Remove exec.c.
4588 (COMMON_OBS): Remove exec.o.
4589 (COMMON_SFILES): Add exec.c.
4590
4591 2018-07-09 Tom Tromey <tom@tromey.com>
4592
4593 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4594
4595 2018-07-09 Tom Tromey <tom@tromey.com>
4596
4597 * Makefile.in (clean mostlyclean): Remove stamp-version.
4598 (version.c): Depend on stamp-version.
4599 (stamp-version): New rule, from version.c rule.
4600
4601 2018-07-09 Tom Tromey <tom@tromey.com>
4602
4603 * Makefile.in (init.c): Depend on stamp-init.
4604 (stamp-init): New rule, from init.c rule.
4605 (clean mostlyclean): Remove stamp-init.
4606
4607 2018-07-09 Tom Tromey <tom@tromey.com>
4608
4609 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4610 SUBDIR_GCC_COMPILE_SRCS.
4611
4612 2018-07-09 Tom Tromey <tom@tromey.com>
4613
4614 * Makefile.in (init.c): Remove some unused sed rules.
4615
4616 2018-07-09 Tom Tromey <tom@tromey.com>
4617
4618 * Makefile.in (TSOBS): Remove.
4619 (INIT_FILES): Update.
4620 (LIBGDB_OBS): Update.
4621 (COMMON_SFILES): Add inflow.c.
4622 (SFILES): Remove inflow.c.
4623
4624 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4625
4626 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4627
4628 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4629
4630 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4631 get_saveloc_name, is_signal_frame_name, step_name,
4632 init_remote_name, create_addr_space_name,
4633 destroy_addr_space_name, search_unwind_table_name,
4634 find_dyn_list_name): Constify.
4635
4636 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4637
4638 * darwin-nat.c (darwin_pthread_kill): New function.
4639 (darwin_resume_thread): Use darwin_pthread_kill.
4640
4641 2018-07-05 Tom de Vries <tdevries@suse.de>
4642
4643 * macroexp.c (macro_buffer) <operator=>: New member function.
4644
4645 2018-07-04 Tom Tromey <tom@tromey.com>
4646
4647 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4648
4649 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4650
4651 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4652 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4653 * maint.c: Likewise.
4654 * top.c: Likewise.
4655
4656 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4657
4658 * NEWS: Create a new section for the next release branch.
4659 Rename the section of the current branch, now that it has
4660 been cut.
4661
4662 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4663
4664 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4665 * version.in: Bump version to 8.2.50.DATE-git.
4666
4667 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4668 Pedro Alves <palves@redhat.com>
4669
4670 * linux-nat.c (linux_init_ptrace): Rename to ...
4671 (linux_init_ptrace_procfs): ... this. Call
4672 linux_proc_init_warnings.
4673 (linux_nat_target::post_attach)
4674 (linux_nat_target::post_startup_inferior): Adjust.
4675 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4676 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4677
4678 2018-07-04 Tom de Vries <tdevries@suse.de>
4679
4680 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4681 check ...
4682 (read_comp_unit_head): ... here.
4683
4684 2018-07-03 Tom Tromey <tom@tromey.com>
4685
4686 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4687 (stop_tracing, tstatus_command)
4688 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4689 (print_one_static_tracepoint_marker): Update.
4690 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4691 std::vector.
4692 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4693 VEC.
4694 (all_tracepoints, static_tracepoints_here): Return std::vector.
4695
4696 2018-07-03 Tom Tromey <tom@tromey.com>
4697
4698 * common/ptid.c (ptid_equal): Remove.
4699 * common/ptid.h (ptid_equal): Don't declare.
4700 * ada-tasks.c: Update.
4701 * breakpoint.c: Update.
4702 * common/agent.c: Update.
4703 * corelow.c: Update.
4704 * darwin-nat-info.c: Update.
4705 * darwin-nat.c: Update.
4706 * dcache.c: Update.
4707 * dtrace-probe.c: Update.
4708 * dummy-frame.c: Update.
4709 * fbsd-nat.c: Update.
4710 * frame.c: Update.
4711 * gdbthread.h: Update.
4712 * gnu-nat.c: Update.
4713 * go32-nat.c: Update.
4714 * inf-loop.c: Update.
4715 * inf-ptrace.c: Update.
4716 * infcall.c: Update.
4717 * infcmd.c: Update.
4718 * inflow.c: Update.
4719 * infrun.c: Update.
4720 * linux-fork.c: Update.
4721 * linux-nat.c: Update.
4722 * linux-thread-db.c: Update.
4723 * mi/mi-cmd-var.c: Update.
4724 * mi/mi-interp.c: Update.
4725 * mi/mi-main.c: Update.
4726 * nto-procfs.c: Update.
4727 * ppc-linux-tdep.c: Update.
4728 * procfs.c: Update.
4729 * python/py-inferior.c: Update.
4730 * python/py-record-btrace.c: Update.
4731 * python/py-record.c: Update.
4732 * ravenscar-thread.c: Update.
4733 * regcache.c: Update.
4734 * remote-sim.c: Update.
4735 * remote.c: Update.
4736 * sol-thread.c: Update.
4737 * solib.c: Update.
4738 * target.c: Update.
4739 * tui/tui-stack.c: Update.
4740 * varobj.c: Update.
4741 * windows-nat.c: Update.
4742 * windows-tdep.c: Update.
4743
4744 2018-07-03 Tom Tromey <tom@tromey.com>
4745
4746 * common/ptid.c (ptid_match): Remove.
4747 * common/ptid.h (ptid_match): Don't declare.
4748 * fbsd-nat.c: Update.
4749 * infcmd.c: Update.
4750 * infrun.c: Update.
4751 * linux-nat.c: Update.
4752 * record-btrace.c: Update.
4753 * regcache.c: Update.
4754 * remote.c: Update.
4755
4756 2018-07-03 Tom Tromey <tom@tromey.com>
4757
4758 * common/ptid.c (ptid_tid_p): Remove.
4759 * common/ptid.h (ptid_tid_p): Don't declare.
4760 * sol-thread.c: Update.
4761
4762 2018-07-03 Tom Tromey <tom@tromey.com>
4763
4764 * common/ptid.c (ptid_lwp_p): Remove.
4765 * common/ptid.h (ptid_lwp_p): Don't declare.
4766 * fbsd-nat.c: Update.
4767 * linux-nat.c: Update.
4768 * nat/linux-procfs.c: Update.
4769 * nat/x86-linux-dregs.c: Update.
4770 * sol-thread.c: Update.
4771
4772 2018-07-03 Tom Tromey <tom@tromey.com>
4773
4774 * common/ptid.c (ptid_is_pid): Remove.
4775 * common/ptid.h (ptid_is_pid): Don't declare.
4776 * infrun.c: Update.
4777 * linux-nat.c: Update.
4778 * mi/mi-interp.c: Update.
4779 * remote.c: Update.
4780 * thread.c: Update.
4781
4782 2018-07-03 Tom Tromey <tom@tromey.com>
4783
4784 * common/ptid.c (ptid_get_tid): Remove.
4785 * common/ptid.h (ptid_get_tid): Don't declare.
4786 * ada-tasks.c: Update.
4787 * aix-thread.c: Update.
4788 * bsd-uthread.c: Update.
4789 * darwin-nat.c: Update.
4790 * fbsd-nat.c: Update.
4791 * i386-darwin-nat.c: Update.
4792 * infrun.c: Update.
4793 * linux-tdep.c: Update.
4794 * nto-procfs.c: Update.
4795 * ppc-ravenscar-thread.c: Update.
4796 * python/py-infthread.c: Update.
4797 * ravenscar-thread.c: Update.
4798 * sol-thread.c: Update.
4799 * sparc-ravenscar-thread.c: Update.
4800 * windows-nat.c: Update.
4801
4802 2018-07-03 Tom Tromey <tom@tromey.com>
4803
4804 * common/ptid.c (ptid_get_lwp): Remove.
4805 * common/ptid.h (ptid_get_lwp): Don't declare.
4806 * aarch64-linux-nat.c: Update.
4807 * ada-tasks.c: Update.
4808 * aix-thread.c: Update.
4809 * amd64-linux-nat.c: Update.
4810 * arm-linux-nat.c: Update.
4811 * corelow.c: Update.
4812 * fbsd-nat.c: Update.
4813 * fbsd-tdep.c: Update.
4814 * gnu-nat.c: Update.
4815 * i386-cygwin-tdep.c: Update.
4816 * i386-gnu-nat.c: Update.
4817 * i386-linux-nat.c: Update.
4818 * ia64-linux-nat.c: Update.
4819 * inf-ptrace.c: Update.
4820 * infrun.c: Update.
4821 * linux-fork.c: Update.
4822 * linux-nat.c: Update.
4823 * linux-tdep.c: Update.
4824 * linux-thread-db.c: Update.
4825 * mips-linux-nat.c: Update.
4826 * nat/aarch64-linux-hw-point.c: Update.
4827 * nat/aarch64-linux.c: Update.
4828 * nat/linux-btrace.c: Update.
4829 * nat/linux-osdata.c: Update.
4830 * nat/linux-procfs.c: Update.
4831 * nat/x86-linux-dregs.c: Update.
4832 * obsd-nat.c: Update.
4833 * ppc-fbsd-nat.c: Update.
4834 * ppc-linux-nat.c: Update.
4835 * procfs.c: Update.
4836 * python/py-infthread.c: Update.
4837 * ravenscar-thread.c: Update.
4838 * remote.c: Update.
4839 * s390-linux-nat.c: Update.
4840 * sol-thread.c: Update.
4841 * sol2-tdep.c: Update.
4842 * spu-linux-nat.c: Update.
4843 * x86-linux-nat.c: Update.
4844 * xtensa-linux-nat.c: Update.
4845
4846 2018-07-03 Tom Tromey <tom@tromey.com>
4847
4848 * common/ptid.c (ptid_get_pid): Remove.
4849 * common/ptid.h (ptid_get_pid): Don't declare.
4850 * aarch64-linux-nat.c: Update.
4851 * ada-lang.c: Update.
4852 * aix-thread.c: Update.
4853 * alpha-bsd-nat.c: Update.
4854 * amd64-fbsd-nat.c: Update.
4855 * amd64-linux-nat.c: Update.
4856 * arm-linux-nat.c: Update.
4857 * arm-nbsd-nat.c: Update.
4858 * auxv.c: Update.
4859 * break-catch-syscall.c: Update.
4860 * breakpoint.c: Update.
4861 * bsd-uthread.c: Update.
4862 * corelow.c: Update.
4863 * ctf.c: Update.
4864 * darwin-nat.c: Update.
4865 * fbsd-nat.c: Update.
4866 * fbsd-tdep.c: Update.
4867 * gcore.c: Update.
4868 * gnu-nat.c: Update.
4869 * hppa-nbsd-nat.c: Update.
4870 * hppa-obsd-nat.c: Update.
4871 * i386-fbsd-nat.c: Update.
4872 * ia64-linux-nat.c: Update.
4873 * inf-ptrace.c: Update.
4874 * infcmd.c: Update.
4875 * inferior.c: Update.
4876 * inferior.h: Update.
4877 * inflow.c: Update.
4878 * infrun.c: Update.
4879 * linux-fork.c: Update.
4880 * linux-nat.c: Update.
4881 * linux-tdep.c: Update.
4882 * linux-thread-db.c: Update.
4883 * m68k-bsd-nat.c: Update.
4884 * mi/mi-interp.c: Update.
4885 * mi/mi-main.c: Update.
4886 * mips-linux-nat.c: Update.
4887 * mips-nbsd-nat.c: Update.
4888 * mips64-obsd-nat.c: Update.
4889 * nat/aarch64-linux-hw-point.c: Update.
4890 * nat/aarch64-linux.c: Update.
4891 * nat/linux-btrace.c: Update.
4892 * nat/linux-osdata.c: Update.
4893 * nat/linux-procfs.c: Update.
4894 * nat/x86-linux-dregs.c: Update.
4895 * nto-procfs.c: Update.
4896 * obsd-nat.c: Update.
4897 * ppc-linux-nat.c: Update.
4898 * ppc-nbsd-nat.c: Update.
4899 * ppc-obsd-nat.c: Update.
4900 * proc-service.c: Update.
4901 * procfs.c: Update.
4902 * python/py-inferior.c: Update.
4903 * python/py-infthread.c: Update.
4904 * ravenscar-thread.c: Update.
4905 * record.c: Update.
4906 * remote-sim.c: Update.
4907 * remote.c: Update.
4908 * rs6000-nat.c: Update.
4909 * s390-linux-nat.c: Update.
4910 * sh-nbsd-nat.c: Update.
4911 * sol-thread.c: Update.
4912 * sparc-nat.c: Update.
4913 * sparc64-tdep.c: Update.
4914 * spu-linux-nat.c: Update.
4915 * spu-tdep.c: Update.
4916 * target-debug.h: Update.
4917 * target.c: Update.
4918 * thread.c: Update.
4919 * tid-parse.c: Update.
4920 * tracefile-tfile.c: Update.
4921 * vax-bsd-nat.c: Update.
4922 * windows-nat.c: Update.
4923 * x86-linux-nat.c: Update.
4924 * x86-nat.c: Update.
4925
4926 2018-07-03 Tom Tromey <tom@tromey.com>
4927
4928 * common/ptid.c (pid_to_ptid): Remove.
4929 * common/ptid.h (pid_to_ptid): Don't declare.
4930 * aix-thread.c: Update.
4931 * arm-linux-nat.c: Update.
4932 * common/ptid.c: Update.
4933 * common/ptid.h: Update.
4934 * corelow.c: Update.
4935 * ctf.c: Update.
4936 * darwin-nat.c: Update.
4937 * fbsd-nat.c: Update.
4938 * fork-child.c: Update.
4939 * gnu-nat.c: Update.
4940 * go32-nat.c: Update.
4941 * inf-ptrace.c: Update.
4942 * infcmd.c: Update.
4943 * inferior.c: Update.
4944 * infrun.c: Update.
4945 * linux-fork.c: Update.
4946 * linux-nat.c: Update.
4947 * nat/aarch64-linux-hw-point.c: Update.
4948 * nat/fork-inferior.c: Update.
4949 * nat/x86-linux-dregs.c: Update.
4950 * nto-procfs.c: Update.
4951 * obsd-nat.c: Update.
4952 * procfs.c: Update.
4953 * progspace.c: Update.
4954 * remote.c: Update.
4955 * rs6000-nat.c: Update.
4956 * s390-linux-nat.c: Update.
4957 * sol-thread.c: Update.
4958 * spu-linux-nat.c: Update.
4959 * target.c: Update.
4960 * top.c: Update.
4961 * tracefile-tfile.c: Update.
4962 * windows-nat.c: Update.
4963
4964 2018-07-03 Tom Tromey <tom@tromey.com>
4965
4966 * common/ptid.h (ptid_build): Don't declare.
4967 * common/ptid.c (ptid_build): Remove.
4968 * aix-thread.c: Update.
4969 * bsd-kvm.c: Update.
4970 * bsd-uthread.c: Update.
4971 * common/agent.c: Update.
4972 * common/ptid.c: Update.
4973 * common/ptid.h: Update.
4974 * corelow.c: Update.
4975 * darwin-nat.c: Update.
4976 * fbsd-nat.c: Update.
4977 * gnu-nat.c: Update.
4978 * linux-fork.c: Update.
4979 * linux-nat.c: Update.
4980 * linux-thread-db.c: Update.
4981 * nat/linux-osdata.c: Update.
4982 * nat/linux-procfs.c: Update.
4983 * nto-procfs.c: Update.
4984 * obsd-nat.c: Update.
4985 * proc-service.c: Update.
4986 * procfs.c: Update.
4987 * ravenscar-thread.c: Update.
4988 * remote-sim.c: Update.
4989 * remote.c: Update.
4990 * sol-thread.c: Update.
4991 * target.c: Update.
4992 * windows-nat.c: Update.
4993
4994 2018-07-03 Tom Tromey <tom@tromey.com>
4995
4996 * infrun.c (follow_exec): Use exit_inferior_silent.
4997 * inferior.c (exit_inferior_num_silent): Remove.
4998 * inferior.h (exit_inferior_num_silent): Don't declare.
4999
5000 2018-07-03 Tom Tromey <tom@tromey.com>
5001
5002 PR cli/23340:
5003 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5004 inferior_ptid on error.
5005
5006 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5007 Simon Marchi <simon.marchi@polymtl.ca>
5008
5009 PR tdep/8282
5010 * disasm.h (gdb_disassembler): Add
5011 `m_disassembler_options_holder'. member
5012 * disasm.c (get_all_disassembler_options): New function.
5013 (gdb_disassembler::gdb_disassembler): Use it.
5014 (gdb_buffered_insn_length_init_dis): Likewise.
5015 (gdb_buffered_insn_length): Adjust accordingly.
5016 (set_disassembler_options): Handle options with arguments.
5017 (show_disassembler_options_sfunc): Likewise. Add a leading new
5018 line if showing options with descriptions.
5019 (disassembler_options_completer): Adapt to using the
5020 `disasm_options_and_args_t' structure.
5021 * mips-tdep.c (mips_disassembler_options): New variable.
5022 (mips_disassembler_options_o32): Likewise.
5023 (mips_disassembler_options_n32): Likewise.
5024 (mips_disassembler_options_n64): Likewise.
5025 (gdb_print_insn_mips): Don't set `disassembler_options'.
5026 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5027 functions.
5028 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5029 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5030 `gdbarch_disassembler_options_implicit' and
5031 `gdbarch_valid_disassembler_options'.
5032 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5033 `disasm_options_and_args_t' structure.
5034 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5035 method.
5036 (valid_disassembler_options): Switch from `disasm_options_t' to
5037 the `disasm_options_and_args_t' structure.
5038 * NEWS: Document `set disassembler-options' support for the MIPS
5039 target.
5040 * gdbarch.h: Regenerate.
5041 * gdbarch.c: Regenerate.
5042
5043 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5044
5045 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5046
5047 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5048
5049 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5050 parameter in call to amd64_target_description.
5051 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5052 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5053 (amd64fbsd_init_abi): Likewise.
5054 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5055 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5056 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5057 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5058
5059 2018-06-29 Pedro Alves <palves@redhat.com>
5060
5061 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5062 "segments" parameter.
5063 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5064 (_initialize_amd64_tdep): Update call to
5065 amd64_create_target_description.
5066 (amd64_target_description): Add "segments" parameter. Adjust
5067 the implementation to use it.
5068 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5069 call to amd64_create_target_description.
5070 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5071 * gdb/arch/amd64.h (amd64_create_target_description): Add
5072 "segments" register.
5073 * gdb/arch/amd64.c (amd64_create_target_description): Add
5074 "segments" parameter. Call create_feature_i386_64bit_segments
5075 only if SEGMENTS is true.
5076 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5077 call to amd64_create_target_description.
5078
5079 2018-06-29 Pedro Alves <palves@redhat.com>
5080
5081 * thread.c (thread_target_id_str): New, factored out from ...
5082 (print_thread_info_1): ... here. Use it to compute the max
5083 "Target Id" column width.
5084
5085 2018-06-29 Pedro Alves <palves@redhat.com>
5086
5087 * remote.c (remote_target::extra_thread_info): Delete
5088 'display_buf' and 'n' locals. from the cache, regardless of
5089 packet mechanims is in use. Use cache for qThreadExtra and qP
5090 methods too.
5091
5092 2018-06-29 Pedro Alves <palves@redhat.com>
5093
5094 * blockframe.c (find_pc_sect_containing_function): New function.
5095 * breakpoint.c (print_breakpoint_location): Don't call
5096 find_pc_sect_function.
5097 * linespec.c (create_sals_line_offset): Record the location's
5098 symbol in the sal.
5099 * linespec.c (convert_address_location_to_sals): Fill in sal's
5100 symbol with find_pc_sect_containing_function.
5101 * symtab.c (find_function_start_sal): Rename to ...
5102 (find_function_start_sal_1): ... this.
5103 (find_function_start_sal): Reimplement as wrapper around
5104 find_function_start_sal_1, and use
5105 find_pc_sect_containing_function to fill in the sal's symbol.
5106 (find_function_start_sal(symbol*, bool)): Adjust.
5107 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5108 comments.
5109 (find_pc_sect_containing_function): Declare.
5110
5111 2018-06-29 Pedro Alves <palves@redhat.com>
5112
5113 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5114 true if the the location has no symbol.
5115
5116 2018-06-28 Tom Tromey <tom@tromey.com>
5117
5118 * NEWS: Mention --enable-codesign.
5119 * silent-rules.mk (ECHO_SIGN): New variable.
5120 * configure.ac: Add --enable-codesign.
5121 * configure: Rebuild.
5122 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5123 (gdb$(EXEEXT)): Optionally invoke codesign.
5124
5125 2018-06-28 Pedro Alves <palves@redhat.com>
5126
5127 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5128 comments.
5129 (switch_to_thread_no_regs): Adjust comment.
5130 * infcmd.c (stop_pc): Delete.
5131 (post_create_inferior, info_program_command): Replace references
5132 to stop_pc with references to thread_info->suspend.stop_pc.
5133 * inferior.h (stop_pc): Delete declaration.
5134 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5135 (handle_inferior_event_1, handle_signal_stop)
5136 (process_event_stop_test, keep_going_stepped_thread)
5137 (handle_step_into_function, handle_step_into_function_backward)
5138 (print_stop_location): Replace references to stop_pc with
5139 references to thread_info->suspend.stop_pc.
5140 (struct infcall_suspend_state) <stop_pc>: Delete field.
5141 (save_infcall_suspend_state, restore_infcall_suspend_state):
5142 Remove references to inf_stat->stop_pc.
5143 * linux-fork.c (fork_load_infrun_state): Likewise.
5144 * record-btrace.c (record_btrace_set_replay): Likewise.
5145 * record-full.c (record_full_goto_entry): Likewise.
5146 * remote.c (print_one_stopped_thread): Likewise.
5147 * target.c (target_resume): Extend comment.
5148 * thread.c (set_executing_thread): New.
5149 (set_executing): Use it.
5150 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5151 Remove references to stop_pc.
5152
5153 2018-06-28 Pedro Alves <palves@redhat.com>
5154
5155 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5156 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5157
5158 2018-06-28 Tom Tromey <tom@tromey.com>
5159
5160 * coffread.c (coff_symfile_finish): Update.
5161 * xcoffread.c (xcoff_symfile_finish): Update.
5162 * elfread.c (elf_symfile_finish): Update.
5163 * symfile.h (dwarf2_free_objfile): Don't declare.
5164 * dwarf2read.c (_initialize_dwarf2_read): Use
5165 register_objfile_data_with_cleanup.
5166 (dwarf2_free_objfile): Now static. Change signature.
5167
5168 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5169
5170 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5171 option "-o" to add-symbol-file-load to add an offset to each
5172 section's load address.
5173 * symfile.c (set_objfile_default_section_offset): New function.
5174
5175 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5176
5177 * symfile.c (add_symbol_file_command): Make sure that sections
5178 with the same name are sorted in the same order.
5179
5180 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5181
5182 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5183 require the second argument. If omitted, load sections at the
5184 addresses specified in the file.
5185
5186 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5187
5188 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5189 (_initialize_symfile): Add option "-o" to symbol-file to add an
5190 offset to each section of the symbol file.
5191
5192 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5193
5194 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5195
5196 2018-06-27 Tom Tromey <tom@tromey.com>
5197
5198 * stack.c (_initialize_stack): Update "func" help text.
5199
5200 2018-06-27 Tom Tromey <tom@tromey.com>
5201
5202 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5203 std::vector.
5204 (unwind_infopy_str, pyuw_create_unwind_info)
5205 (unwind_infopy_add_saved_register, pyuw_sniffer)
5206 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5207 Update.
5208 (struct saved_reg): Add constructor.
5209 <value>: Now a gdbpy_ref<>.
5210
5211 2018-06-27 Tom Tromey <tom@tromey.com>
5212
5213 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5214
5215 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5216
5217 * gdb-gdb.py.in: Format using autopep8.
5218
5219 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5220
5221 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5222 (type_lookup_function): Recognize CORE_ADDR values.
5223
5224 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5225
5226 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5227 print tag_name.
5228
5229 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5230
5231 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5232 <__lt__>: Add.
5233
5234 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5235
5236 * gdb-gdb.py: Move to...
5237 * gdb-gdb.py.in: ... here.
5238 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5239 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5240 dependencies.
5241 (distclean): Remove gdb-gdb.py when cleaning.
5242 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5243 * configure: Re-generate.
5244
5245 2018-06-27 Pedro Alves <palves@redhat.com>
5246
5247 * proc-service.c (get_ps_regcache): New.
5248 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5249 (ps_lsetfpregs): Use it.
5250
5251 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5252
5253 PR gdb/21695
5254 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5255 (dwarf_decode_lines_1): Adjust.
5256
5257 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5258
5259 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5260 override.
5261 <info_proc>: Likewise.
5262
5263 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5264
5265 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5266 to windows_fetch_one_register, and only handle the case of
5267 fetching one register. Move the code that reloads the context
5268 and iterates over all registers if R is negative to...
5269 (windows_nat_target::fetch_registers): ... here.
5270 (do_windows_store_inferior_registers): Rename to
5271 windows_store_one_register, and only handle the case of storing
5272 one register. Move the code that handles the case where r is
5273 negative to...
5274 (windows_nat_target::store_registers) ... here.
5275
5276 2018-06-26 Tom Tromey <tom@tromey.com>
5277
5278 PR rust/22574:
5279 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5280 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5281 Update.
5282 (rust_internal_print_type): Add podata parameter.
5283 (rust_print_type): Update.
5284
5285 2018-06-26 Tom Tromey <tom@tromey.com>
5286
5287 * typeprint.h (struct print_offset_data) <update, finish,
5288 maybe_print_hole>: New methods.
5289 <indentation>: New constant.
5290 * typeprint.c (print_offset_data::indentation): Define.
5291 (print_offset_data::maybe_print_hole, print_offset_data::update)
5292 (print_offset_data::finish): Move from c-typeprint.c and rename.
5293 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5294 (print_spaces_filtered_with_print_options): Update.
5295 (c_print_type_union_field_offset, maybe_print_hole)
5296 (c_print_type_struct_field_offset): Move to typeprint.c and
5297 rename.
5298 (c_type_print_base_struct_union): Update.
5299
5300 2018-06-25 Pedro Alves <palves@redhat.com>
5301
5302 * gdbthread.h (thread_info_ref, delete_thread)
5303 (delete_thread_silent, first_thread_of_inferior)
5304 (any_thread_of_inferior, switch_to_thread)
5305 (enable_thread_stack_temporaries)
5306 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5307 (get_last_thread_stack_temporary)
5308 (value_in_thread_stack_temporaries, can_access_registers_thread):
5309 Spell out "struct thread_info" instead of just "thread_info".
5310 * inferior.h (notice_new_inferior): Likewise.
5311
5312 2018-06-25 Pedro Alves <palves@redhat.com>
5313
5314 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5315 pass thread_info pointer to delete_thread.
5316 (windows_nat_target::detach): Pass inferior pointer to
5317 detach_inferior.
5318 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5319 delete_thread.
5320 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5321 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5322 and pass a thread_info pointer to delete_thread.
5323 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5324 pass thread_info pointer to delete_thread.
5325 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5326 delete_thread_silent call.
5327 * procfs.c (procfs_target::detach): Pass inferior pointer to
5328 detach_inferior.
5329 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5330 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5331 delete_thread_silent call.
5332 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5333 pass thread_info pointer to delete_thread.
5334 (windows_nat_target::detach): Pass inferior pointer to
5335 delete_inferior.
5336
5337 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5338
5339 * regcache.c (readable_regcache::read_part): Fix asserts.
5340 (reg_buffer::raw_collect_part): New function.
5341 (regcache::write_part): Fix asserts.
5342 (reg_buffer::raw_supply_part): New function.
5343 (regcache::transfer_regset_register): New helper function.
5344 (regcache::transfer_regset): Call new functions.
5345 (regcache_supply_regset): Use gdb_byte*.
5346 (regcache::supply_regset): Likewise.
5347 (regcache_collect_regset): Likewise.
5348 (regcache::collect_regset): Likewise.
5349 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5350 (reg_buffer::raw_supply_part): Likewise.
5351 (regcache::transfer_regset_register): Likewise.
5352 (regcache::transfer_regset): Use gdb_byte*.
5353
5354 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5355
5356 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5357
5358 2018-06-21 Pedro Alves <palves@redhat.com>
5359
5360 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5361 instead of a ptid_t. All callers adjusted.
5362 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5363 adjusted.
5364 (print_ada_task_info, display_current_task_id, task_command_1):
5365 Adjust.
5366 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5367 inferior_thread.
5368 (breakpoint_kind): Adjust.
5369 (remove_breakpoints_pid): Rename to ...
5370 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5371 pointer. All callers adjusted.
5372 (bpstat_clear_actions): Use inferior_thread.
5373 (get_bpstat_thread): New.
5374 (bpstat_do_actions): Use it.
5375 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5376 to take a thread_info pointer. All callers adjusted.
5377 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5378 (breakpoint_re_set_thread): Use inferior_thread.
5379 * breakpoint.h (struct inferior): Forward declare.
5380 (bpstat_stop_status): Update.
5381 (remove_breakpoints_pid): Delete.
5382 (remove_breakpoints_inf): New.
5383 * bsd-uthread.c (bsd_uthread_target::wait)
5384 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5385 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5386 (maint_btrace_packet_history_cmd)
5387 (maint_btrace_clear_packet_history_cmd): Adjust.
5388 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5389 inferior_thread.
5390 * cli/cli-interp.c: Include "inferior.h".
5391 * common/refcounted-object.h (struct
5392 refcounted_object_ref_policy): New.
5393 * compile/compile-object-load.c: Include gdbthread.h.
5394 (store_regs): Use inferior_thread.
5395 * corelow.c (core_target::close): Use current_inferior.
5396 (core_target_open): Adjust to use first_thread_of_inferior and use
5397 the current inferior.
5398 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5399 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5400 <thread>: ... this new field. All references adjusted.
5401 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5402 Take a thread_info pointer instead of a ptid_t.
5403 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5404 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5405 thread_info pointer instead of a ptid_t.
5406 * elfread.c: Include "inferior.h".
5407 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5408 Use inferior_thread.
5409 * eval.c (evaluate_subexp): Likewise.
5410 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5411 inferior_thread.
5412 * gdb_proc_service.h (struct thread_info): Forward declare.
5413 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5414 <thread>: ... this new field. All references adjusted.
5415 * gdbarch.h, gdbarch.c: Regenerate.
5416 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5417 'thread' parameter. All implementations and callers adjusted.
5418 * gdbthread.h (thread_info) <set_running>: New method.
5419 (delete_thread, delete_thread_silent): Take a thread_info pointer
5420 instead of a ptid.
5421 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5422 (first_thread_of_process): Delete, replaced by ...
5423 (first_thread_of_inferior): ... this new function. All callers
5424 adjusted.
5425 (any_live_thread_of_process): Delete, replaced by ...
5426 (any_live_thread_of_inferior): ... this new function. All callers
5427 adjusted.
5428 (switch_to_thread, switch_to_no_thread): Declare.
5429 (is_executing): Delete.
5430 (enable_thread_stack_temporaries): Update comment.
5431 <enable_thread_stack_temporaries>: Take a thread_info pointer
5432 instead of a ptid_t. Incref the thread.
5433 <~enable_thread_stack_temporaries>: Decref the thread.
5434 <m_ptid>: Delete
5435 <m_thr>: New.
5436 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5437 (get_last_thread_stack_temporary)
5438 (value_in_thread_stack_temporaries, can_access_registers_thread):
5439 Take a thread_info pointer instead of a ptid_t. All callers
5440 adjusted.
5441 * infcall.c (get_call_return_value): Use inferior_thread.
5442 (run_inferior_call): Work with thread pointers instead of ptid_t.
5443 (call_function_by_hand_dummy): Work with thread pointers instead
5444 of ptid_t. Use thread_info_ref.
5445 * infcmd.c (proceed_thread_callback): Access thread's state
5446 directly.
5447 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5448 access thread's state directly.
5449 (continue_command): Use inferior_thread.
5450 (info_program_command): Use find_thread_ptid and access thread
5451 state directly.
5452 (proceed_after_attach_callback): Use thread state directly.
5453 (notice_new_inferior): Take a thread_info pointer instead of a
5454 ptid_t. All callers adjusted.
5455 (exit_inferior): Take an inferior pointer instead of a pid. All
5456 callers adjusted.
5457 (exit_inferior_silent): New.
5458 (detach_inferior): Delete.
5459 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5460 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5461 (detach_inferior_command, kill_inferior_command): Use
5462 find_inferior_id instead of valid_gdb_inferior_id and
5463 gdb_inferior_id_to_pid.
5464 (inferior_command): Use inferior and thread pointers.
5465 * inferior.h (struct thread_info): Forward declare.
5466 (notice_new_inferior): Take a thread_info pointer instead of a
5467 ptid_t. All callers adjusted.
5468 (detach_inferior): Delete declaration.
5469 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5470 instead of a pid. All callers adjusted.
5471 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5472 (valid_gdb_inferior_id): Delete.
5473 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5474 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5475 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5476 ...
5477 <inf>: ... this new field.
5478 <step_ptid>: Delete, replaced by ...
5479 <step_thread>: ... this new field.
5480 (get_displaced_stepping_state): Take an inferior pointer instead
5481 of a pid. All callers adjusted.
5482 (displaced_step_in_progress_any_inferior): Adjust.
5483 (displaced_step_in_progress_thread): Take a thread pointer instead
5484 of a ptid_t. All callers adjusted.
5485 (displaced_step_in_progress, add_displaced_stepping_state): Take
5486 an inferior pointer instead of a pid. All callers adjusted.
5487 (get_displaced_step_closure_by_addr): Adjust.
5488 (remove_displaced_stepping_state): Take an inferior pointer
5489 instead of a pid. All callers adjusted.
5490 (displaced_step_prepare_throw, displaced_step_prepare)
5491 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5492 All callers adjusted.
5493 (start_step_over): Adjust.
5494 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5495 displaced step queue.
5496 (do_target_resume): Adjust.
5497 (fetch_inferior_event): Use inferior_thread.
5498 (context_switch, get_inferior_stop_soon): Take an
5499 execution_control_state pointer instead of a ptid_t. All callers
5500 adjusted.
5501 (switch_to_thread_cleanup): Delete.
5502 (stop_all_threads): Use scoped_restore_current_thread.
5503 * inline-frame.c: Include "gdbthread.h".
5504 (inline_state) <inline_state>: Take a thread pointer instead of a
5505 ptid_t. All callers adjusted.
5506 <ptid>: Delete, replaced by ...
5507 <thread>: ... this new field.
5508 (find_inline_frame_state): Take a thread pointer instead of a
5509 ptid_t. All callers adjusted.
5510 (skip_inline_frames, step_into_inline_frame)
5511 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5512 pointer instead of a ptid_t. All callers adjusted.
5513 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5514 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5515 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5516 pointers directly.
5517 * linux-nat.c (get_detach_signal): Likewise.
5518 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5519 (thread_db_notice_clone): Adjust.
5520 (thread_db_find_new_threads_silently)
5521 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5522 a thread pointer instead of a ptid_t. All callers adjusted.
5523 * mi/mi-cmd-var.c: Include "inferior.h".
5524 (mi_cmd_var_update_iter): Update to use thread pointers.
5525 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5526 inferior directly.
5527 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5528 out to ...
5529 (mi_output_running): ... this new function.
5530 (mi_on_resume_1): Adjust to use it.
5531 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5532 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5533 directly.
5534 (interrupt_thread_callback): : Adjust to use thread and inferior
5535 pointers.
5536 * proc-service.c: Include "gdbthread.h".
5537 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5538 * progspace-and-thread.c: Include "inferior.h".
5539 * progspace.c: Include "inferior.h".
5540 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5541 hold a reference to an inferior_object.
5542 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5543 inferior_thread.
5544 * python/py-inferior.c (struct inferior_object): Give the type a
5545 tag name instead of a typedef.
5546 (python_on_normal_stop): No need to check if the current thread is
5547 listed.
5548 (inferior_to_inferior_object): Change return type to
5549 inferior_object. All callers adjusted.
5550 (find_thread_object): Delete, bits factored out to ...
5551 (thread_to_thread_object): ... this new function.
5552 * python/py-infthread.c (create_thread_object): Use
5553 inferior_to_inferior_object.
5554 (thpy_is_stopped): Use thread pointer directly.
5555 (gdbpy_selected_thread): Use inferior_thread.
5556 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5557 field, replaced with ...
5558 <thread>: ... this new field. All users adjusted.
5559 (btpy_insn_or_gap_new): Drop const.
5560 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5561 callers adjusted.
5562 * python/py-record.c: Include "gdbthread.h".
5563 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5564 a ptid_t. All callers adjusted.
5565 (gdbpy_current_recording): Use inferior_thread.
5566 * python/py-record.h (recpy_record_object) <ptid>: Delete
5567 field, replaced with ...
5568 <thread>: ... this new field. All users adjusted.
5569 (recpy_element_object) <ptid>: Delete
5570 field, replaced with ...
5571 <thread>: ... this new field. All users adjusted.
5572 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5573 a ptid_t. All callers adjusted.
5574 * python/py-threadevent.c: Include "gdbthread.h".
5575 (get_event_thread): Use thread_to_thread_object.
5576 * python/python-internal.h (struct inferior_object): Forward
5577 declare.
5578 (find_thread_object, find_inferior_object): Delete declarations.
5579 (thread_to_thread_object, inferior_to_inferior_object): New
5580 declarations.
5581 * record-btrace.c: Include "inferior.h".
5582 (require_btrace_thread): Use inferior_thread.
5583 (record_btrace_frame_sniffer)
5584 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5585 (get_thread_current_frame): Use scoped_restore_current_thread and
5586 switch_to_thread.
5587 (get_thread_current_frame): Use thread pointer directly.
5588 (record_btrace_replay_at_breakpoint): Use thread's inferior
5589 pointer directly.
5590 * record-full.c: Include "inferior.h".
5591 * regcache.c: Include "gdbthread.h".
5592 (get_thread_arch_regcache): Use the inferior's address space
5593 directly.
5594 (get_thread_regcache, registers_changed_thread): New.
5595 * regcache.h (get_thread_regcache(thread_info *thread)): New
5596 overload.
5597 (registers_changed_thread): New.
5598 (remote_target) <remote_detach_1>: Swap order of parameters.
5599 (remote_add_thread): <remote_add_thread>: Return the new thread.
5600 (get_remote_thread_info(ptid_t)): New overload.
5601 (remote_target::remote_notice_new_inferior): Use thread pointers
5602 directly.
5603 (remote_target::process_initial_stop_replies): Use
5604 thread_info::set_running.
5605 (remote_target::remote_detach_1, remote_target::detach)
5606 (extended_remote_target::detach): Adjust.
5607 * stack.c (frame_show_address): Use inferior_thread.
5608 * target-debug.h (target_debug_print_thread_info_pp): New.
5609 * target-delegates.c: Regenerate.
5610 * target.c (default_thread_address_space): Delete.
5611 (memory_xfer_partial_1): Use current_inferior.
5612 (target_detach): Use current_inferior.
5613 (target_thread_address_space): Delete.
5614 (generic_mourn_inferior): Use current_inferior.
5615 * target.h (struct target_ops) <thread_address_space>: Delete.
5616 (target_thread_address_space): Delete.
5617 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5618 pointers directly.
5619 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5620 thread pointer instead of a ptid_t. Adjust all callers.
5621 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5622 (first_thread_of_process): Delete, replaced by ...
5623 (first_thread_of_inferior): ... this new function. All callers
5624 adjusted.
5625 (any_thread_of_process): Rename to ...
5626 (any_thread_of_inferior): ... this, and take an inferior pointer.
5627 (any_live_thread_of_process): Rename to ...
5628 (any_live_thread_of_inferior): ... this, and take an inferior
5629 pointer.
5630 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5631 (value_in_thread_stack_temporaries)
5632 (get_last_thread_stack_temporary): Take a thread pointer instead
5633 of a ptid_t. Adjust all callers.
5634 (thread_info::set_running): New.
5635 (validate_registers_access): Use inferior_thread.
5636 (can_access_registers_ptid): Rename to ...
5637 (can_access_registers_thread): ... this, and take a thread
5638 pointer.
5639 (print_thread_info_1): Adjust to compare thread pointers instead
5640 of ptids.
5641 (switch_to_no_thread, switch_to_thread): Make extern.
5642 (scoped_restore_current_thread::~scoped_restore_current_thread):
5643 Use m_thread pointer directly.
5644 (scoped_restore_current_thread::scoped_restore_current_thread):
5645 Use inferior_thread.
5646 (thread_command): Use thread pointer directly.
5647 (thread_num_make_value_helper): Use inferior_thread.
5648 * top.c (execute_command): Use inferior_thread.
5649 * tui/tui-interp.c: Include "inferior.h".
5650 * varobj.c (varobj_create): Use inferior_thread.
5651 (value_of_root_1): Use find_thread_global_id instead of
5652 global_thread_id_to_ptid.
5653
5654 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5655
5656 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5657 possible.
5658 (regcache::write_part): Likewise.
5659 (readable_regcache::cooked_read_part): Update comment.
5660 (readable_regcache::cooked_write_part): Likewise.
5661 * regcache.h: (readable_regcache::read_part): Likewise.
5662 (regcache::write_part): Likewise.
5663
5664 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5665 Dirk Schubert <dirk.schubert@arm.com>
5666
5667 * aarch64-linux-nat.c (post_attach): New.
5668 (aarch64_linux_nat_target::post_attach): Override post_attach to
5669 record the number of hardware debug registers.
5670
5671 2018-06-20 Tom Tromey <tom@tromey.com>
5672
5673 * python/py-param.c (add_setshow_generic): Make parameters const.
5674 (parmpy_init): Update.
5675
5676 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5677
5678 * regcache.h (regcache_cooked_read_ftype): Rename to...
5679 (register_read_ftype): ...this, change type to function_view.
5680 (class reg_buffer) <save>: Remove src parameter.
5681 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5682 parameter non-const in first overload. Remove src parameter in
5683 second overload.
5684 * regcache.c (do_cooked_read): Remove.
5685 (readonly_detached_regcache::readonly_detached_regcache): Make
5686 parameter non-const, adjust call to other constructor.
5687 (reg_buffer::save): Remove src parameter.
5688 * frame.c (do_frame_register_read): Remove.
5689 (frame_save_as_regcache): Use lambda function.
5690 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5691 parameter to ppu2spu_data *.
5692 (ppu2spu_sniffer): Use lambda function.
5693
5694 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5695
5696 * record-full.c (record_full_target::insert_breakpoint): Remove
5697 "struct" keyword, add const.
5698
5699 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5700
5701 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5702 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5703 * configure.ac: Remove AC_PREREQ, add missing quoting.
5704 * gnulib/configure.ac: Modernize usage of
5705 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5706 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5707 (AUTOMAKE_VERSION): Bump to 1.15.1.
5708 * configure: Re-generate.
5709 * config.in: Re-generate.
5710 * aclocal.m4: Re-generate.
5711 * gnulib/aclocal.m4: Re-generate.
5712 * gnulib/config.in: Re-generate.
5713 * gnulib/configure: Re-generate.
5714 * gnulib/import/Makefile.in: Re-generate.
5715
5716 2018-06-19 Pedro Alves <palves@redhat.com>
5717
5718 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5719 (lookup_minimal_symbol_by_pc_section): ... here with
5720 gdb_assert_not_reached added.
5721
5722 2018-06-19 Pedro Alves <palves@redhat.com>
5723
5724 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5725 parameter with a block parameter. Compare location's block symbol
5726 with the frame's block instead of addresses.
5727 (skip_inline_frames): Pass the current block instead of the
5728 frame's address. Break out as soon as we determine the frame
5729 should not be skipped.
5730
5731 2018-06-18 Tom Tromey <tom@tromey.com>
5732
5733 * solib-aix.c (solib_aix_get_section_offsets): Return
5734 unique_xmalloc_ptr.
5735 (solib_aix_solib_create_inferior_hook): Update.
5736
5737 2018-06-18 Tom Tromey <tom@tromey.com>
5738
5739 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5740
5741 2018-06-18 Tom Tromey <tom@tromey.com>
5742
5743 * solib-frv.c (frv_relocate_main_executable): Use
5744 unique_xmalloc_ptr.
5745 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5746 unique_xmalloc_ptr.
5747
5748 2018-06-18 Tom Tromey <tom@tromey.com>
5749
5750 * objfiles.h (inhibit_section_map_updates): Update.
5751 (resume_section_map_updates, resume_section_map_updates_cleanup):
5752 Remove.
5753 * solib-svr4.c (svr4_handle_solib_event): Update.
5754 * objfiles.c (inhibit_section_map_updates): Return
5755 scoped_restore_tmpl<int>.
5756 (resume_section_map_updates, resume_section_map_updates_cleanup):
5757 Remove.
5758
5759 2018-06-18 Tom Tromey <tom@tromey.com>
5760
5761 * valprint.h (read_string): Update.
5762 * valprint.c (read_string): Change type of "buffer".
5763 (val_print_string): Update.
5764 * python/py-value.c (valpy_string): Update.
5765 * language.h (struct language_defn) <la_get_string>: Change
5766 type of "buffer".
5767 (default_get_string, c_get_string): Update.
5768 * language.c (default_get_string): Change type of "buffer".
5769 * guile/scm-value.c (gdbscm_value_to_string): Update.
5770 * c-lang.c (c_get_string): Change type of "buffer".
5771
5772 2018-06-18 Tom Tromey <tom@tromey.com>
5773
5774 * ser-mingw.c (struct pipe_state_destroyer): New.
5775 (pipe_state_up): New typedef.
5776 (cleanup_pipe_state): Remove.
5777 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5778
5779 2018-06-18 Tom Tromey <tom@tromey.com>
5780
5781 * rust-lang.h (rust_yyerror): Don't declare.
5782 * rust-lang.c (rust_language_defn): Update.
5783 * rust-exp.y (yyerror): Now static.
5784 * parse.c (parse_exp_in_context_1): Update.
5785 * p-lang.h (p_yyerror): Don't declare.
5786 * p-lang.c (p_language_defn): Update.
5787 * p-exp.y (yyerror): Now static.
5788 * opencl-lang.c (opencl_language_defn): Update.
5789 * objc-lang.c (objc_language_defn): Update.
5790 * m2-lang.h (m2_yyerror): Don't declare.
5791 * m2-lang.c (m2_language_defn): Update.
5792 * m2-exp.y (yyerror): Now static.
5793 * language.h (struct language_defn) <la_error>: Remove.
5794 * language.c (unk_lang_error): Remove.
5795 (unknown_language_defn, auto_language_defn): Remove.
5796 * go-lang.h (go_yyerror): Don't declare.
5797 * go-lang.c (go_language_defn): Update.
5798 * go-exp.y (yyerror): Now static.
5799 * f-lang.h (f_yyerror): Don't declare.
5800 * f-lang.c (f_language_defn): Update.
5801 * f-exp.y (yyerror): Now static.
5802 * d-lang.h (d_yyerror): Don't declare.
5803 * d-lang.c (d_language_defn): Update.
5804 * d-exp.y (yyerror): Now static.
5805 * c-lang.h (c_yyerror): Don't declare.
5806 * c-lang.c (c_language_defn, cplus_language_defn)
5807 (asm_language_defn, minimal_language_defn): Update.
5808 * c-exp.y (yyerror): Now static.
5809 * ada-lang.h (ada_yyerror): Don't declare.
5810 * ada-lang.c (ada_language_defn): Update.
5811 * ada-exp.y (yyerror): Now static.
5812
5813 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5814
5815 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5816 (store_sveregs_to_thread): Likewise.
5817 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5818 (aarch64_linux_store_inferior_registers): Likewise.
5819 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5820 function.
5821 (aarch64_sve_regs_copy_to_regcache): Likewise.
5822 (aarch64_sve_regs_copy_from_regcache): Likewise.
5823 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5824 declaration.
5825 (aarch64_sve_regs_copy_to_regcache): Likewise.
5826 (aarch64_sve_regs_copy_from_regcache): Likewise.
5827 (sve_context): Structure from Linux headers.
5828 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5829 (SVE_SIG_ZREG_SIZE): Likewise.
5830 (SVE_SIG_PREG_SIZE): Likewise.
5831 (SVE_SIG_FFR_SIZE): Likewise.
5832 (SVE_SIG_REGS_OFFSET): Likewise.
5833 (SVE_SIG_ZREGS_OFFSET): Likewise.
5834 (SVE_SIG_ZREG_OFFSET): Likewise.
5835 (SVE_SIG_ZREGS_SIZE): Likewise.
5836 (SVE_SIG_PREGS_OFFSET): Likewise.
5837 (SVE_SIG_PREG_OFFSET): Likewise.
5838 (SVE_SIG_PREGS_SIZE): Likewise.
5839 (SVE_SIG_FFR_OFFSET): Likewise.
5840 (SVE_SIG_REGS_SIZE): Likewise.
5841 (SVE_SIG_CONTEXT_SIZE): Likewise.
5842 (SVE_PT_REGS_MASK): Likewise.
5843 (SVE_PT_REGS_FPSIMD): Likewise.
5844 (SVE_PT_REGS_SVE): Likewise.
5845 (SVE_PT_VL_INHERIT): Likewise.
5846 (SVE_PT_VL_ONEXEC): Likewise.
5847 (SVE_PT_REGS_OFFSET): Likewise.
5848 (SVE_PT_FPSIMD_OFFSET): Likewise.
5849 (SVE_PT_FPSIMD_SIZE): Likewise.
5850 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5851 (SVE_PT_SVE_PREG_SIZE): Likewise.
5852 (SVE_PT_SVE_FFR_SIZE): Likewise.
5853 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5854 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5855 (__SVE_SIG_TO_PT): Likewise.
5856 (SVE_PT_SVE_OFFSET): Likewise.
5857 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5858 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5859 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5860 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5861 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5862 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5863 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5864 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5865 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5866 (SVE_PT_SVE_SIZE): Likewise.
5867 (SVE_PT_SIZE): Likewise.
5868 (HAS_SVE_STATE): New define.
5869
5870 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5871
5872 * nat/aarch64-sve-linux-sigcontext.h: New file.
5873 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5874 new files.
5875 (SVE_VQ_MIN): Likewise.
5876 (SVE_VQ_MAX): Likewise.
5877 (SVE_VL_MIN): Likewise.
5878 (SVE_VL_MAX): Likewise.
5879 (SVE_NUM_ZREGS): Likewise.
5880 (SVE_NUM_PREGS): Likewise.
5881 (sve_vl_valid): Likewise.
5882 (struct user_sve_header): Likewise.
5883
5884 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5885 Richard Bunt <Richard.Bunt@arm.com>
5886
5887 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5888 was requested by GDB.
5889
5890 2018-06-15 Tom de Vries <tdevries@suse.de>
5891
5892 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5893
5894 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5895
5896 * gnulib/update-gnulib.sh: Print expected versions of
5897 autoconf/aclocal.
5898
5899 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5900
5901 * arch-utils.c (default_type_align): Use type_length_units.
5902 * gdbtypes.c (type_align): Use type_length_units.
5903
5904 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5905
5906 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5907 of 'define' command.
5908
5909 2018-06-14 Tom de Vries <tdevries@suse.de>
5910
5911 PR cli/22573
5912 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5913 get_no_prettyformat_print_options.
5914
5915 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
5916
5917 * sparc-nat.h: Include target.h.
5918 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5919 <fetch_registers>: Remove this argument in function call.
5920 <store_registers>: Remove this argument in function call, remove
5921 extra semicolon.
5922 <low_forget_process>: Call sparc64_forget_process instead of
5923 sparc_forget_process.
5924
5925 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5926
5927 * procfs.c (_initialize_procfs): Use add_inf_child_target.
5928 (procfs_target::make_corefile_notes): Adjust to new
5929 target_read_alloc return type.
5930
5931 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5932 Stephen Roberts <stephen.roberts@arm.com>
5933
5934 PR gdb/22882
5935 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5936 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5937 Move should_notify_stop local into more inner scope.
5938
5939 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5940 Stephen Roberts <stephen.roberts@arm.com>
5941
5942 PR gdb/22882
5943 * infrun.c (resume_1): Add call to mark_async_event_handler.
5944
5945 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
5946
5947 * infrun.c (do_target_wait): Change old version of $pc printed.
5948
5949 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
5950
5951 * dwarf2read.c (read_index_from_section): Rename to...
5952 (read_gdb_index_from_section): ... this, update all callers.
5953 (dwarf2_read_index): Rename to...
5954 (dwarf2_read_gdb_index): ... this, update all callers.
5955
5956 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
5957
5958 * gdb/hppa-linux-nat.c
5959 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5960 hppa_linux_nat_target::fetch_registers.
5961
5962 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5963
5964 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5965 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5966 (AARCH64_DWARF_SVE_FFR): Likewise.
5967 (AARCH64_DWARF_SVE_P0): Likewise.
5968 (AARCH64_DWARF_SVE_Z0): Likewise.
5969
5970 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5971
5972 * common/common-regcache.h (raw_compare): New function.
5973 * regcache.c (regcache::raw_compare): Likewise.
5974 * regcache.h (regcache::raw_compare): New declaration.
5975
5976 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5977
5978 * common/common-regcache.h (reg_buffer_common): New structure.
5979 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5980 (reg_buffer::raw_supply): Likewise.
5981 (reg_buffer::raw_supply_integer): Likewise.
5982 (reg_buffer::raw_supply_zeroed): Likewise.
5983 (reg_buffer::raw_collect): Likewise.
5984 (reg_buffer::raw_collect_integer): Likewise.
5985 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5986 (reg_buffer::raw_supply): Likewise.
5987 (reg_buffer::raw_supply_integer): Likewise.
5988 (reg_buffer::raw_supply_zeroed): Likewise.
5989 (reg_buffer::raw_collect): Likewise.
5990 (reg_buffer::raw_collect_integer): Likewise.
5991
5992 2018-06-10 Tom Tromey <tom@tromey.com>
5993
5994 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
5995 (class remote_state) <stop_reply_queue>: Now std::vector.
5996 (remote_state::~remote_state)
5997 (remote_target::stop_reply_queue_length): Update.
5998 (struct queue_iter_param, remove_child_of_pending_fork)
5999 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6000 (check_pending_event_prevents_wildcard_vcont_callback)
6001 (remove_stop_reply_for_inferior)
6002 (remove_stop_reply_of_remote_state)
6003 (remote_notif_remove_once_on_match)
6004 (stop_reply_match_ptid_and_ws)
6005 (remote_kill_child_of_pending_fork): Remove.
6006 (remote_target::remove_new_fork_children)
6007 (remote_target::check_pending_events_prevent_wildcard_vcont)
6008 (remote_target::discard_pending_stop_replies)
6009 (remote_target::discard_pending_stop_replies_in_queue)
6010 (remote_target::remote_notif_remove_queued_reply)
6011 (remote_target::queued_stop_reply)
6012 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6013 (remote_target::wait, remote_target::kill_new_fork_children)
6014 (remote_target::async): Update.
6015
6016 2018-06-10 Tom Tromey <tom@tromey.com>
6017
6018 * record-full.c (record_full_arch_list_cleanups): Remove.
6019 (record_full_message): Use try/catch.
6020 (record_full_wait_cleanups): Remove.
6021 (record_full_wait_1): Use try/catch.
6022 (record_full_restore): Likewise.
6023
6024 2018-06-10 Tom Tromey <tom@tromey.com>
6025
6026 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6027 declare VEC. Add constructor.
6028 <in_target_beneath>: Now bool.
6029 (record_full_breakpoints): Now a std::vector, static.
6030 (record_full_sync_record_breakpoints)
6031 (record_full_init_record_breakpoints)
6032 (record_full_target::insert_breakpoint)
6033 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6034
6035 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6036
6037 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6038 * serial.c (serial_interface_lookup): Remove struct keyword.
6039
6040 2018-06-10 Tom Tromey <tom@tromey.com>
6041
6042 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6043 method.
6044 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6045 a method.
6046 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6047 method.
6048 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6049 "beneath" as a method.
6050 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6051 Use "beneath" as a method.
6052
6053 2018-06-10 Tom Tromey <tom@tromey.com>
6054
6055 * tracefile.c (struct trace_file_writer_deleter): New.
6056 <operator()>: Rename from trace_file_writer_xfree.
6057 (trace_file_writer_up): New typedef.
6058 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6059
6060 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6061
6062 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6063 <m_registers, m_register_status>: Change type to
6064 std::unique_ptr.
6065 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6066 XCNEWVEC.
6067
6068 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6069
6070 * common/common-regcache.h (enum register_status): Add
6071 underlying type "signed char".
6072 * regcache.h (reg_buffer) <m_register_status>: Change type to
6073 register_status *.
6074 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6075 register_status instead of signed char.
6076 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6077 (reg_buffer::get_register_status): Remove cast.
6078 (readable_regcache::raw_read): Remove cast.
6079 (readable_regcache::cooked_read): Remove cast.
6080
6081 2018-06-09 Tom Tromey <tom@tromey.com>
6082
6083 * source.c (reverse_search_command, forward_search_command): Use
6084 scoped_fd.
6085
6086 2018-06-09 Tom Tromey <tom@tromey.com>
6087
6088 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6089 (serial_ops_list): Now static, std::vector.
6090 (serial_interface_lookup, serial_add_interface): Update.
6091
6092 2018-06-09 Tom Tromey <tom@tromey.com>
6093
6094 * dwarf2read.c (process_cu_includes): Update.
6095 (process_full_comp_unit): Update.
6096 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6097 std::vector.
6098
6099 2018-06-08 Paul Koning <paul_koning@dell.com>
6100
6101 PR gdb/23252
6102
6103 * python/python.c (do_start_initialization):
6104 Avoid call to internal Python API.
6105 (init__gdb_module): New function.
6106
6107 2018-06-08 Gary Benson <gbenson@redhat.com>
6108
6109 * linux-thread-db.c (valprint.h): New include.
6110 (struct check_thread_db_info): New structure.
6111 (check_thread_db_on_load, tdb_testinfo): New static globals.
6112 (check_thread_db, check_thread_db_callback): New functions.
6113 (try_thread_db_load_1): Run integrity checks if requested.
6114 (maintenance_check_libthread_db): New function.
6115 (_initialize_thread_db): Register "maint check libthread-db"
6116 and "maint set/show check-libthread-db".
6117 * NEWS: Mention the above new commands.
6118
6119 2018-06-08 Tom Tromey <tom@tromey.com>
6120
6121 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6122 now a method.
6123
6124 2018-06-08 Tom Tromey <tom@tromey.com>
6125
6126 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6127
6128 2018-06-08 Tom Tromey <tom@tromey.com>
6129
6130 * common/btrace-common.h (struct btrace_data): Add constructor,
6131 destructor, move assignment operator.
6132 <empty, clear, fini>: New methods.
6133 <format>: Initialize.
6134 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6135 (btrace_data_empty): Don't declare.
6136 * common/btrace-common.c (btrace_data_init): Remove.
6137 (btrace_data::fini): Rename from btrace_data_fini.
6138 (btrace_data::empty): Rename from btrace_data_empty.
6139 (btrace_data::clear): Rename from btrace_data_clear. Return
6140 bool.
6141 * btrace.h (make_cleanup_btrace_data): Don't declare.
6142 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6143 (parse_xml_btrace): Update.
6144 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6145 (maint_btrace_clear_packet_history_cmd): Update.
6146
6147 2018-06-07 Pedro Alves <palves@redhat.com>
6148
6149 * target.h (target_ops) <beneath>: Now a method. All references
6150 updated.
6151 (class target_stack): New.
6152 * target.c (g_target_stack): New.
6153 (g_current_top_target): Delete.
6154 (current_top_target): Get the top target out of g_target_stack.
6155 (target_stack::push, target_stack::unpush): New.
6156 (push_target, unpush_target): Reimplement.
6157 (target_is_pushed): Reimplement in terms of g_target_stack.
6158 (target_ops::beneath, target_stack::find_beneath): New.
6159
6160 2018-06-07 Pedro Alves <palves@redhat.com>
6161
6162 * target.h (find_target_beneath): Delete declaration.
6163 * target.c (find_target_beneath): Delete definition.
6164 * aix-thread.c: All callers of find_target_beneath adjusted to
6165 call target_ops::beneath instead.
6166 * bsd-uthread.c: Likewise.
6167 * linux-thread-db.c: Likewise.
6168 * ravenscar-thread.c: Likewise.
6169 * sol-thread.c: Likewise.
6170 * spu-multiarch.c: Likewise.
6171
6172 2018-06-07 Pedro Alves <palves@redhat.com>
6173
6174 * target.h (target_ops) <beneath>: Now a method. All references
6175 updated.
6176 (target_ops) <m_beneath>: New.
6177 * target.c (target_ops::beneath): New.
6178 * corelow.c: Adjust all references to target_ops::beneath.
6179 * linux-thread-db.c: Likewise.
6180 * make-target-delegates: Likewise.
6181 * record-btrace.c: Likewise.
6182 * record-full.c: Likewise.
6183 * remote.c: Likewise.
6184 * target.c: Likewise.
6185 * target-delegates.c: Regenerate.
6186
6187 2018-06-07 Pedro Alves <palves@redhat.com>
6188
6189 * target.h (target_stack): Delete.
6190 (current_top_target): Declare function.
6191 * target.c (target_stack): Delete.
6192 (g_current_top_target): New.
6193 (current_top_target): New function.
6194 * auxv.c: Use current_top_target instead of target_stack
6195 throughout.
6196 * avr-tdep.c: Likewise.
6197 * breakpoint.c: Likewise.
6198 * corefile.c: Likewise.
6199 * elfread.c: Likewise.
6200 * eval.c: Likewise.
6201 * exceptions.c: Likewise.
6202 * frame.c: Likewise.
6203 * gdbarch-selftests.c: Likewise.
6204 * gnu-v3-abi.c: Likewise.
6205 * ia64-tdep.c: Likewise.
6206 * ia64-vms-tdep.c: Likewise.
6207 * infcall.c: Likewise.
6208 * infcmd.c: Likewise.
6209 * infrun.c: Likewise.
6210 * linespec.c: Likewise.
6211 * linux-tdep.c: Likewise.
6212 * minsyms.c: Likewise.
6213 * ppc-linux-nat.c: Likewise.
6214 * ppc-linux-tdep.c: Likewise.
6215 * procfs.c: Likewise.
6216 * regcache.c: Likewise.
6217 * remote.c: Likewise.
6218 * rs6000-tdep.c: Likewise.
6219 * s390-linux-nat.c: Likewise.
6220 * s390-tdep.c: Likewise.
6221 * solib-aix.c: Likewise.
6222 * solib-darwin.c: Likewise.
6223 * solib-dsbt.c: Likewise.
6224 * solib-spu.c: Likewise.
6225 * solib-svr4.c: Likewise.
6226 * solib-target.c: Likewise.
6227 * sparc-tdep.c: Likewise.
6228 * sparc64-tdep.c: Likewise.
6229 * spu-tdep.c: Likewise.
6230 * symfile.c: Likewise.
6231 * symtab.c: Likewise.
6232 * target-descriptions.c: Likewise.
6233 * target-memory.c: Likewise.
6234 * target.c: Likewise.
6235 * target.h: Likewise.
6236 * tracefile-tfile.c: Likewise.
6237 * tracepoint.c: Likewise.
6238 * valops.c: Likewise.
6239 * valprint.c: Likewise.
6240 * value.c: Likewise.
6241 * windows-tdep.c: Likewise.
6242 * mi/mi-main.c: Likewise.
6243
6244 2018-06-07 Tom Tromey <tom@tromey.com>
6245
6246 * valprint.h (build_address_symbolic): Declare.
6247 * printcmd.c (print_address_symbolic): Update.
6248 (build_address_symbolic): Change "name" and "filename" to
6249 std::string.
6250 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6251 Update.
6252 * defs.h (build_address_symbolic): Remove declaration.
6253
6254 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6255
6256 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6257 (aarch64_vnv_type): Add function.
6258 (aarch64_pseudo_register_name): Add V regs for SVE.
6259 (aarch64_pseudo_register_type): Likewise.
6260 (aarch64_pseudo_register_reggroup_p): Likewise.
6261 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6262 (aarch64_pseudo_read_value): Add V regs for SVE.
6263 (aarch64_pseudo_write_2): Use V0 offset for SVE
6264 (aarch64_pseudo_write): Add V regs for SVE.
6265 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6266
6267 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6268
6269 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6270 (sve_vl_from_vq): Likewise.
6271
6272 2018-06-05 Tom Tromey <tom@tromey.com>
6273
6274 * cli/cli-cmds.c (show_version): Update.
6275 * top.c (print_gdb_version): Add "interactive" parameter.
6276 Update.
6277 * main.c (captured_main_1): Update.
6278 * top.h (print_gdb_version): Add "interactive" parameter and a
6279 comment.
6280
6281 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6282
6283 * common/enum-flags.h: Add trailing semicolon to example in
6284 comment.
6285
6286 2018-06-05 Tom Tromey <tom@tromey.com>
6287
6288 PR cli/12326:
6289 * NEWS: Add entry about pager.
6290 * utils.c (pagination_disabled_for_command): New global.
6291 (prompt_for_continue): Allow "c" response to prompt.
6292 (reinitialize_more_filter): Clear
6293 pagination_disabled_for_command.
6294 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6295
6296 2018-06-04 Tom Tromey <tom@tromey.com>
6297
6298 * ada-lang.h (ada_lookup_symbol_list): Update.
6299 * ada-lang.c (resolve_subexp): Update.
6300 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6301 parameter.
6302 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6303 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6304 results parameter to std::vector.
6305 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6306 Update.
6307 * ada-exp.y (block_lookup): Update.
6308 (select_possible_type_sym): Change type of syms. Remove nsyms
6309 parameter.
6310 (write_var_or_type, write_name_assoc): Update.
6311
6312 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6313
6314 * windows-nat.c (windows_nat_target::xfer_partial): Return
6315 TARGET_XFER_E_IO if we need to delegate to the target beneath
6316 but BENEATH is NULL.
6317
6318 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * Makefile.in (config.status): Add configure.nat as a
6321 dependency.
6322
6323 2018-06-04 Tom Tromey <tom@tromey.com>
6324
6325 * cp-name-parser.y (cpname_state): Add method declarations.
6326 (HANDLE_QUAL): Update.
6327 (cpname_state::d_grab, cpname_state::fill_comp)
6328 (cpname_state::make_operator, cpname_state::make_dtor)
6329 (cpname_state::make_builtin_type, cpname_state::make_name)
6330 (cpname_state::d_qualify, cpname_state::d_int_type)
6331 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6332 (%union): Move earlier.
6333
6334 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6335
6336 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6337
6338 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6339
6340 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6341 (aarch64_pseudo_write_1): Likewise.
6342 (aarch64_pseudo_read_value): Use helper.
6343 (aarch64_pseudo_write): Likewise.
6344
6345 2018-06-04 Pedro Alves <palves@redhat.com>
6346
6347 * darwin-nat.c (darwin_ops): Delete.
6348 (darwin_attach_pid): Use get_native_target.
6349
6350 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6351
6352 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6353 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6354
6355 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6356
6357 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6358 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6359 (aarch64_gdbarch_init): Check for SVE.
6360 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6361
6362 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6363
6364 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6365 * aarch64-tdep.h (aarch64_read_description): Likewise.
6366 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6367 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6368 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6369 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6370 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6371
6372 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6373
6374 * value.c (value_fetch_lazy_bitfield): New.
6375 (value_fetch_lazy_memory): New.
6376 (value_fetch_lazy_register): New.
6377 (value_fetch_lazy): Factor out to smaller functions.
6378
6379 2018-06-01 Tom Tromey <tom@tromey.com>
6380
6381 * cp-name-parser.y (backslashable, represented): Now const.
6382
6383 2018-06-01 Tom Tromey <tom@tromey.com>
6384
6385 * cp-name-parser.y: Include parser-defs.h.
6386 (parser_fprintf): Remove declaration.
6387
6388 2018-06-01 Tom Tromey <tom@tromey.com>
6389
6390 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6391 %parse-param.
6392 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6393 (global_result): Remove globals.
6394 (struct cpname_state): New.
6395 (yyparse): Don't declare.
6396 (yylex, yyerror): Move declarations after %union.
6397 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6398 (make_name): Add state parameter.
6399 Update all callers.
6400 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6401 parameter.
6402 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6403 Update.
6404 (yylex): Add lvalp, state parameters.
6405 (yyerror): Add state parameter.
6406 (cp_demangled_name_to_comp): Update.
6407
6408 2018-06-01 Tom Tromey <tom@tromey.com>
6409
6410 * cp-name-parser.y (parser_fprintf): Declare.
6411 (GDB_YY_REMAP_PREFIX): Define.
6412 Include yy-remap.h. Don't redefine yy* identifiers.
6413
6414 2018-06-01 Tom Tromey <tom@tromey.com>
6415
6416 * python/py-type.c (typy_legacy_template_argument): Update.
6417 * cp-support.h (cp_demangled_name_to_comp): Update.
6418 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6419 parameter to be a "std::string *".
6420 (main): Update.
6421
6422 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6423
6424 * ada-lex.l: Include "diagnostics.h" instead of
6425 "common/diagnostics.h".
6426 * unittests/environ-selftests.c: Likewise.
6427 * common/diagnostics.h: Moved to ../include.
6428
6429 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6430
6431 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6432 to language_mode_manual while calling breakpoint_re_set_one.
6433
6434 2018-06-01 Tom Tromey <tom@tromey.com>
6435
6436 * valops.c (value_cast_structs, destructor_name_p): Update.
6437 * symtab.c (gdb_mangle_name): Update.
6438 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6439 Update.
6440 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6441 (pascal_object_print_value_fields, pascal_object_print_value):
6442 Update.
6443 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6444 * linespec.c (find_methods): Update.
6445 * gdbtypes.h (type_name_no_tag): Remove.
6446 (type_name_or_error): Rename from type_name_no_tag_or_error.
6447 * gdbtypes.c (type_name_no_tag): Remove.
6448 (type_name_or_error): Rename from type_name_no_tag_or_error.
6449 (lookup_struct_elt_type, check_typedef): Update.
6450 * expprint.c (print_subexp_standard): Update.
6451 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6452 * d-namespace.c (d_lookup_nested_symbol): Update.
6453 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6454 (cp_print_class_member): Update.
6455 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6456 * completer.c (add_struct_fields): Update.
6457 * c-typeprint.c (cp_type_print_derivation_info)
6458 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6459 Update.
6460 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6461 (ada_prefer_type, ada_is_exception_sym): Update.
6462
6463 2018-06-01 Tom Tromey <tom@tromey.com>
6464
6465 * valops.c (enum_constant_from_type, value_namespace_elt)
6466 (value_maybe_namespace_elt): Update.
6467 * valarith.c (find_size_for_pointer_math): Update.
6468 * target-descriptions.c (make_gdb_type): Update.
6469 * symmisc.c (print_symbol): Update.
6470 * stabsread.c (define_symbol, read_type)
6471 (complain_about_struct_wipeout, add_undefined_type)
6472 (cleanup_undefined_types_1): Update.
6473 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6474 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6475 (rust_internal_print_type, rust_composite_type)
6476 (rust_evaluate_funcall, rust_evaluate_subexp)
6477 (rust_inclusive_range_type_p): Update.
6478 * python/py-type.c (typy_get_tag): Update.
6479 * p-typeprint.c (pascal_type_print_base): Update.
6480 * mdebugread.c (parse_symbol, parse_type): Update.
6481 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6482 Update.
6483 * guile/scm-type.c (gdbscm_type_tag): Update.
6484 * go-lang.c (sixg_string_p): Update.
6485 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6486 Update.
6487 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6488 (TYPE_TAG_NAME): Remove.
6489 * gdbtypes.c (type_name_no_tag): Simplify.
6490 (check_typedef, check_types_equal, recursive_dump_type)
6491 (copy_type_recursive, arch_composite_type): Update.
6492 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6493 in summary mode when needed.
6494 * eval.c (evaluate_funcall): Update.
6495 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6496 (process_structure_scope, read_enumeration_type)
6497 (read_namespace_type, read_module_type, determine_prefix): Update.
6498 * cp-support.c (inspect_type): Update.
6499 * coffread.c (process_coff_symbol, decode_base_type): Update.
6500 * c-varobj.c (c_is_path_expr_parent): Update.
6501 * c-typeprint.c (c_type_print_base_struct_union): Update.
6502 (c_type_print_base_1): Update. Print struct/class/union/enum in
6503 summary when using C language.
6504 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6505 (gen_maybe_namespace_elt): Update.
6506 * ada-lang.c (ada_type_name): Simplify.
6507 (empty_record, ada_template_to_fixed_record_type_1)
6508 (template_to_static_fixed_type)
6509 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6510
6511 2018-06-01 Tom Tromey <tom@tromey.com>
6512
6513 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6514 c_print_type.
6515 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6516 (c_print_type): Update.
6517 (c_print_type): New overload.
6518 (c_type_print_varspec_prefix, c_type_print_args)
6519 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6520 (c_type_print_base_struct_union, c_type_print_base_1)
6521 (cp_type_print_method_args): Add "language" parameter.
6522 (c_type_print_base): Update.
6523 * c-lang.h (c_print_type): Add new overload.
6524
6525 2018-06-01 Tom Tromey <tom@tromey.com>
6526
6527 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6528 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6529
6530 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6531
6532 * aarch64-tdep.c (aarch64_sve_register_names): New const
6533 var.
6534 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6535 (AARCH64_SVE_Z_REGS_NUM): New define.
6536 (AARCH64_SVE_P_REGS_NUM): Likewise.
6537 (AARCH64_SVE_NUM_REGS): Likewise.
6538
6539 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6540
6541 * nat/linux-ptrace.h [__alpha__]
6542 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6543 definitions.
6544
6545 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6546
6547 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6548 the endianness selected.
6549 * NEWS: Document `set endian auto' mode operation update.
6550
6551 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6552
6553 * Makefile.in: Add new header.
6554 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6555 (sve_vl_from_vg): Likewise.
6556 (sve_vq_from_vl): Likewise.
6557 (sve_vl_from_vq): Likewise.
6558 (sve_vq_from_vg): Likewise.
6559 (sve_vg_from_vq): Likewise.
6560 * configure.nat: Add new c file.
6561 * nat/aarch64-sve-linux-ptrace.c: New file.
6562 * nat/aarch64-sve-linux-ptrace.h: New file.
6563
6564 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6565
6566 * aarch64-linux-nat.c (aarch64_linux_read_description):
6567 Add parmeter zero.
6568 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6569 Likewise.
6570 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6571 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6572 (aarch64_gdbarch_init): Add parmeter zero.
6573 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6574 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6575 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6576 parmeter.
6577 * doc/gdb.texinfo: Describe SVE feature
6578 * features/aarch64-sve.c: New file.
6579
6580 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6581
6582 PR gdb/23210
6583 * gdbarch.sh (significant_addr_bit): Default to zero when
6584 not set by target architecture.
6585 * gdbarch.c: Re-generated.
6586 * utils.c (address_significant): Update.
6587
6588 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6589
6590 * stack.c (func_command): Remove trailing newline in call to error.
6591
6592 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6593
6594 * regcache.h (regcache_raw_collect): Remove, update callers to
6595 use regcache::raw_collect.
6596 * regcache.c (regcache_raw_collect): Remove.
6597
6598 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6599
6600 * regcache.h (regcache_raw_supply): Remove, update callers to
6601 use detached_regcache::raw_supply.
6602 * regcache.c (regcache_raw_supply): Remove.
6603
6604 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6605
6606 * regcache.h (regcache_cooked_write_part): Remove, update
6607 callers to use regcache::cooked_write_part.
6608 * regcache.c (regcache_cooked_write_part): Remove.
6609
6610 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6611
6612 * regcache.h (regcache_cooked_read_part): Remove, update callers
6613 to use readable_regcache::cooked_read_part.
6614 * regcache.c (regcache_cooked_read_part): Remove.
6615
6616 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6617
6618 * regcache.h (regcache_cooked_read_value): Remove, update
6619 callers to use readable_regcache::cooked_read_value.
6620 * regcache.c (regcache_cooked_read_value): Remove.
6621
6622 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6623
6624 * regcache.h (regcache_cooked_write): Remove, update callers to
6625 use regcache::cooked_write.
6626 * regcache.c (regcache_cooked_write): Remove.
6627
6628 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6629
6630 * regcache.h (regcache_invalidate): Remove, update callers to
6631 use detached_regcache::invalidate instead.
6632 * regcache.c (regcache_invalidate): Remove.
6633
6634 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6635
6636 * regcache.h (regcache_raw_write_part): Remove, update callers
6637 to use regcache::raw_write_part instead.
6638 * regcache.c (regcache_raw_write_part): Remove.
6639
6640 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6641
6642 * regcache.h (regcache_raw_read_part): Remove, update callers to
6643 use readable_regcache::raw_read_part instead.
6644 * regcache.c (regcache_raw_read_part): Remove.
6645
6646 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6647
6648 * regcache.h (regcache_cooked_read): Remove, update callers to
6649 use readable_regcache::cooked_read instead.
6650 * regcache.c (regcache_cooked_read): Remove.
6651
6652 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6653
6654 * regcache.h (regcache_raw_write): Remove, update callers to use
6655 regcache::raw_write instead.
6656 * regcache.c (regcache_raw_write): Remove.
6657
6658 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6659
6660 * regcache.h (regcache_raw_read): Remove, update callers to use
6661 readable_regcache::raw_read instead.
6662 * regcache.c (regcache_raw_read): Remove.
6663
6664 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6665
6666 * regcache.h (regcache_raw_update): Remove, update callers to
6667 use readable_regcache::raw_update instead.
6668 * regcache.c (regcache_raw_update): Remove.
6669
6670 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6671
6672 * regcache.h (regcache_register_status): Remove, update callers
6673 to use reg_buffer::get_register_status directly instead.
6674 * regcache.c (regcache_register_status): Remove.
6675
6676 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6677
6678 * regcache.h (regcache_get_ptid): Remove, update all callers to
6679 call regcache::ptid instead.
6680 * regcache.c (regcache_get_ptid): Remove.
6681
6682 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6683
6684 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6685
6686 2018-05-30 Pedro Alves <palves@redhat.com>
6687
6688 * common/common-exceptions.h (exception_rethrow): Use
6689 ATTRIBUTE_NORETURN.
6690
6691 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6692
6693 * breakpoint.c (print_solib_event, check_status_catch_solib):
6694 Remove struct keyword in range-based for loops.
6695 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6696 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6697 Likewise.
6698 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6699 Likewise.
6700 * symfile.c (addr_info_make_relative): Likewise.
6701 * thread.c (value_in_thread_stack_temporaries): Likewise.
6702
6703 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6704
6705 PR gdb/16841
6706 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6707 aggregate type to get its real type before accessing it.
6708
6709 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6710
6711 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6712 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6713 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6714 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6715 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6716 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6717 * printcmd.c (info_address_command): Likewise.
6718
6719 2018-05-29 Tom Tromey <tom@tromey.com>
6720
6721 * windows-nat.c (handle_exception): Update fall-through comment.
6722
6723 2018-05-29 Tom Tromey <tom@tromey.com>
6724
6725 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6726 (struct program_space) <added_solibs>: Now a std::vector.
6727 * breakpoint.c (print_solib_event): Update.
6728 (check_status_catch_solib): Update.
6729 * progspace.c (clear_program_space_solib_cache): Update.
6730 * solib.c (update_solib_list): Update.
6731
6732 2018-05-29 Tom Tromey <tom@tromey.com>
6733
6734 * python/py-type.c (typy_richcompare): Update.
6735 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6736 * gdbtypes.h (types_deeply_equal): Return bool.
6737 (types_equal): Likewise.
6738 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6739 declare VEC.
6740 (check_types_equal): Change worklist to std::vector. Return
6741 bool.
6742 (struct type_equality_entry): Add constructor.
6743 (compare_maybe_null_strings): Return bool.
6744 (check_types_worklist): Return bool. Change worklist to
6745 std::vector.
6746 (types_deeply_equal): Use std::vector.
6747 (types_equal): Return bool.
6748 (compare_maybe_null_strings): Simplify.
6749
6750 2018-05-29 Tom Tromey <tom@tromey.com>
6751
6752 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6753
6754 2018-05-29 Tom Tromey <tom@tromey.com>
6755
6756 * objc-lang.h: Don't include cp-support.h.
6757 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6758 declare VEC.
6759
6760 2018-05-27 Tom Tromey <tom@tromey.com>
6761
6762 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6763
6764 2018-05-25 Tom Tromey <tom@tromey.com>
6765
6766 * value.c (value::location): Initialize.
6767
6768 2018-05-25 Tom Tromey <tom@tromey.com>
6769
6770 * dbxread.c (init_bincl_list): Remove.
6771 (bincl_list): Now a std::vector.
6772 (bincls_allocated, next_bincl): Remove.
6773 (free_bincl_list, do_free_bincl_list_cleanup)
6774 (make_cleanup_free_bincl_list): Remove.
6775 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6776 unique_xmalloc_ptr.
6777 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6778 (struct header_file_location): Add constructor.
6779 (add_bincl_to_list): Remove.
6780
6781 2018-05-25 Tom Tromey <tom@tromey.com>
6782
6783 * tui/tui.c (tui_enable): Update.
6784 * mi/mi-interp.c (mi_interp::init): Update.
6785 * interps.h (class interp) <name>: New method.
6786 <m_name>: Rename from name.
6787 (~scoped_restore_interp): Update.
6788 * interps.c (interp::interp): Update.
6789 (interp_add, interp_set, interp_lookup_existing)
6790 (current_interp_named_p): Update.
6791
6792 2018-05-25 Tom Tromey <tom@tromey.com>
6793
6794 * interps.c (interp_name): Remove.
6795 * mi/mi-interp.c (mi_interp::init): Update.
6796 * interps.h (interp_name): Remove.
6797 (~scoped_restore_interp): Update.
6798 * tui/tui.c (tui_enable): Update.
6799
6800 2018-05-25 Tom Tromey <tom@tromey.com>
6801
6802 * utils.c (fputs_maybe_filtered): Update.
6803 * linespec.c (decode_line_full): Update.
6804 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6805 (mi_print_breakpoint_for_event, mi_solib_loaded)
6806 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6807 (mi_user_selected_context_changed): Update.
6808 * mi/mi-main.c (mi_execute_command): Update.
6809 * cli/cli-script.c (execute_control_command): Update.
6810 * python/python.c (execute_gdb_command): Update.
6811 * solib.c (info_sharedlibrary_command): Update.
6812 * interps.c (interp_ui_out): Remove.
6813 * interps.h (interp_ui_out): Remove.
6814
6815 2018-05-25 Tom Tromey <tom@tromey.com>
6816
6817 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6818 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6819 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6820
6821 2018-05-25 Tom Tromey <tom@tromey.com>
6822
6823 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6824 * interps.c (interp_exec): Use scoped_restore.
6825
6826 2018-05-25 Tom Tromey <tom@tromey.com>
6827
6828 * remote.c (remote_target::remote_file_get): Use
6829 gdb::byte_vector.
6830 (remote_target::remote_file_put): Likewise.
6831
6832 2018-05-25 Tom Tromey <tom@tromey.com>
6833
6834 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6835 a std::string.
6836 (get_pe_section_index, add_pe_exported_sym): Update.
6837 (read_pe_exported_syms): Use gdb::def_vector.
6838
6839 2018-05-25 Tom Tromey <tom@tromey.com>
6840
6841 * frame.c (remove_prev_frame): Remove.
6842 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6843
6844 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6845
6846 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6847 Remove prototypes.
6848 * mips-linux-nat.c (supply_fpregset): Always call
6849 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6850 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6851 `mips_fill_fpregset'.
6852 * mips-linux-tdep.c (mips_supply_fpregset)
6853 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6854 (mips_fill_fpregset_wrapper): Remove functions.
6855 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6856 (mips_linux_fpregset): Remove variable.
6857 (mips_linux_iterate_over_regset_sections): Use
6858 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6859 (mips_linux_o32_sigframe_init): Remove comment.
6860
6861 2018-05-25 Pedro Alves <palves@redhat.com>
6862
6863 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6864 (struct readahead_cache, struct packet_reg, struct
6865 remote_arch_state, class remote_state): Move higher up in the
6866 file.
6867 (remote_target::m_remote_state): Now an object instead of a pointer.
6868 (remote_target::get_remote_state): Adjust.
6869
6870 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6871
6872 * stack.c (select_and_print_frame): Delete.
6873 (struct function_bounds): Move struct within function.
6874 (func_command): Most content moved into new function
6875 find_frame_for_function, use new function, print result, add
6876 function comment.
6877 (find_frame_for_function): New function, now returns a result.
6878
6879 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6880
6881 * stack.c (iterate_over_block_arg_vars): Fix comment.
6882 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6883
6884 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6885
6886 PR gdb/23203
6887 * frame.c
6888 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6889 Define.
6890 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6891 Define.
6892 * frame.h (class scoped_restore_selected_frame): New class.
6893 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6894 of any exception, use scoped_restore_selected_frame to restore the
6895 frame instead.
6896
6897 2018-05-24 Pedro Alves <palves@redhat.com>
6898
6899 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6900 override.
6901
6902 2018-05-23 Tom Tromey <tom@tromey.com>
6903
6904 * complaints.c (struct complaints): Remove.
6905 (symfile_complaint_book): Remove.
6906 (series): New global.
6907 (complaint_internal): Update.
6908 (clear_complaints): Update.
6909
6910 2018-05-23 Tom Tromey <tom@tromey.com>
6911
6912 * complaints.c (counters): New global.
6913 (struct complain): Remove.
6914 (struct complaints) <root>: Remove.
6915 (complaint_sentinel): Remove.
6916 (symfile_complaint_book): Update.
6917 (find_complaint) Remove.
6918 (complaint_internal, clear_complaints): Update.
6919
6920 2018-05-23 Tom Tromey <tom@tromey.com>
6921
6922 * complaints.c (struct complain) <file, line>: Remove.
6923 (find_complaint): Remove file, line parameters.
6924 (complaint_internal): Update.
6925
6926 2018-05-23 Tom Tromey <tom@tromey.com>
6927
6928 * complaints.c (vcomplaint): Remove.
6929 (complaint_internal) Merge in contents of vcomplaint.
6930
6931 2018-05-23 Tom Tromey <tom@tromey.com>
6932
6933 * complaints.c (struct complaints) <explanation>: Remove.
6934 (symfile_explanations): Remove.
6935 (symfile_complaint_book): Update.
6936 (vcomplaint): Update.
6937 (struct explanation): Remove.
6938
6939 2018-05-23 Tom Tromey <tom@tromey.com>
6940
6941 * complaints.c (symfile_complaints): Remove.
6942 (complaint_internal): Remove "complaints" parameter.
6943 (clear_complaints, vcomplaint): Remove "c" parameter.
6944 (get_complaints): Remove.
6945 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6946 (dwarf2_debug_line_missing_file_complaint)
6947 (dwarf2_debug_line_missing_end_sequence_complaint)
6948 (dwarf2_complex_location_expr_complaint)
6949 (dwarf2_const_value_length_mismatch_complaint)
6950 (dwarf2_section_buffer_overflow_complaint)
6951 (dwarf2_macro_malformed_definition_complaint)
6952 (dwarf2_invalid_attrib_class_complaint)
6953 (create_addrmap_from_index, dw2_symtab_iter_next)
6954 (dw2_expand_marked_cus)
6955 (dw2_debug_names_iterator::find_vec_in_debug_names)
6956 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6957 (create_debug_type_hash_table, init_cutu_and_read_dies)
6958 (partial_die_parent_scope, add_partial_enumeration)
6959 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6960 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6961 (read_import_statement, read_file_scope, create_dwo_cu_reader)
6962 (create_cus_hash_table, create_dwp_hash_table)
6963 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6964 (dwarf2_rnglists_process, dwarf2_ranges_process)
6965 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6966 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6967 (handle_struct_member_die, process_structure_scope)
6968 (read_array_type, read_common_block, read_module_type)
6969 (read_tag_pointer_type, read_typedef, read_base_type)
6970 (read_subrange_type, load_partial_dies, partial_die_info::read)
6971 (partial_die_info::read, partial_die_info::read)
6972 (partial_die_info::read, read_checked_initial_length_and_offset)
6973 (dwarf2_string_attr, read_formatted_entries)
6974 (dwarf_decode_line_header)
6975 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6976 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6977 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6978 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6979 (get_signatured_type, get_DW_AT_signature_type)
6980 (decode_locdesc, file_file_name, consume_improper_spaces)
6981 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6982 (dwarf_decode_macro_bytes, dwarf_decode_macros)
6983 (dwarf2_symbol_mark_computed, set_die_type)
6984 (read_attribute_value): Update.
6985 * stap-probe.c (handle_stap_probe, get_stap_base_address):
6986 Update.
6987 * dbxread.c (unknown_symtype_complaint)
6988 (lbrac_mismatch_complaint, repeated_header_complaint)
6989 (set_namestring, function_outside_compilation_unit_complaint)
6990 (read_dbx_symtab, process_one_symbol): Update.
6991 * gdbtypes.c (stub_noname_complaint): Update.
6992 * windows-nat.c (handle_unload_dll): Update.
6993 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6994 (decode_base_type): Update.
6995 * xcoffread.c (bf_notfound_complaint, ef_complaint)
6996 (eb_complaint, record_include_begin, record_include_end)
6997 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6998 (process_xcoff_symbol, read_symbol)
6999 (function_outside_compilation_unit_complaint)
7000 (scan_xcoff_symtab): Update.
7001 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7002 * buildsym.c (finish_block_internal, make_blockvector)
7003 (end_symtab_get_static_block, augment_type_symtab): Update.
7004 * dtrace-probe.c (dtrace_process_dof)
7005 (dtrace_static_probe_ops::get_probes): Update.
7006 * complaints.h (struct complaint): Don't declare.
7007 (symfile_complaints): Remove.
7008 (complaint_internal): Remove "complaints" parameter.
7009 (complaint): Likewise.
7010 (clear_complaints): Likewise.
7011 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7012 (reread_symbols): Update.
7013 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7014 (dwarf2_frame_cache, decode_frame_entry): Update.
7015 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7016 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7017 (info_selectors_command): Update.
7018 * macrotab.c (macro_include, check_for_redefinition)
7019 (macro_undef): Update.
7020 * objfiles.c (filter_overlapping_sections): Update.
7021 * stabsread.c (invalid_cpp_abbrev_complaint)
7022 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7023 (define_symbol, error_type, read_type, rs6000_builtin_type)
7024 (stabs_method_name_from_physname, read_member_functions)
7025 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7026 (attach_fields_to_type, complain_about_struct_wipeout)
7027 (read_range_type, read_args, common_block_start)
7028 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7029 Update.
7030 * mdebugread.c (index_complaint, unknown_ext_complaint)
7031 (basic_type_complaint, bad_tag_guess_complaint)
7032 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7033 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7034 (parse_procedure, parse_lines)
7035 (function_outside_compilation_unit_complaint)
7036 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7037 (bad_tag_guess_complaint, reg_value_complaint): Update.
7038 * cp-support.c (demangled_name_complaint): Update.
7039 * macroscope.c (sal_macro_scope): Update.
7040 * dwarf-index-write.c (class debug_names): Update.
7041
7042 2018-05-23 Tom Tromey <tom@tromey.com>
7043
7044 * complaints.c (clear_complaints): Remove "noisy" parameter.
7045 * complaints.h (clear_complaints): Update.
7046 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7047 (reread_symbols): Update.
7048
7049 2018-05-23 Tom Tromey <tom@tromey.com>
7050
7051 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7052 SUBSEQUENT_MESSAGE.
7053 (vcomplaint, clear_complaints): Update.
7054 (symfile_explanations): Remove some messages.
7055
7056 2018-05-23 Tom Tromey <tom@tromey.com>
7057
7058 * complaints.c (internal_complaint): Remove.
7059 * complaints.h (internal_complaint): Remove.
7060
7061 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7062
7063 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7064
7065 2018-05-22 Pedro Alves <palves@redhat.com>
7066
7067 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7068 (remote_fileio_badfd, remote_fileio_return_errno)
7069 (remote_fileio_return_success, remote_fileio_func_open)
7070 (remote_fileio_func_open, remote_fileio_func_close)
7071 (remote_fileio_func_read, remote_fileio_func_write)
7072 (remote_fileio_func_lseek, remote_fileio_func_rename)
7073 (remote_fileio_func_unlink, remote_fileio_func_stat)
7074 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7075 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7076 remote_target parameter.
7077 (remote_fio_func_map) <func>: Add remote_target parameter.
7078 (do_remote_fileio_request, remote_fileio_request):
7079 * remote-fileio.h (remote_fileio_request):
7080 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7081 remote_target parameter.
7082 (remote_notif_process, handle_notification): Adjust to pass down
7083 the remote.
7084 (remote_notif_state_allocate): Add remote_target parameter. Save
7085 it.
7086 * remote-notif.h (struct remote_target): Forward declare.
7087 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7088 remote_target parameter.
7089 (struct remote_notif_state) <remote>: New field.
7090 (remote_notif_ack, remote_notif_parse): Add remote_target
7091 parameter.
7092 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7093 remote_target parameter.
7094 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7095 (threads_listing_context, rmt_thread_action, protocol_feature)
7096 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7097 (packet_result, struct threads_listing_context, remote_state):
7098 Move definitions and declarations higher up.
7099 (remote_target) <~remote_target>: Declare.
7100 (remote_download_command_source, remote_file_put, remote_file_get)
7101 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7102 (remote_hostio_pread_vFile, remote_hostio_send_command)
7103 (remote_hostio_set_filesystem, remote_hostio_open)
7104 (remote_hostio_close, remote_hostio_unlink, remote_state)
7105 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7106 (get_memory_write_packet_size, get_memory_read_packet_size)
7107 (append_pending_thread_resumptions, remote_detach_1)
7108 (append_resumption, remote_resume_with_vcont)
7109 (add_current_inferior_and_thread, wait_ns, wait_as)
7110 (process_stop_reply, remote_notice_new_inferior)
7111 (process_initial_stop_replies, remote_add_thread)
7112 (btrace_sync_conf, remote_btrace_maybe_reopen)
7113 (remove_new_fork_children, kill_new_fork_children)
7114 (discard_pending_stop_replies, stop_reply_queue_length)
7115 (check_pending_events_prevent_wildcard_vcont)
7116 (discard_pending_stop_replies_in_queue, stop_reply)
7117 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7118 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7119 (remote_interrupt_as, remote_interrupt_ns)
7120 (remote_get_noisy_reply, remote_query_attached)
7121 (remote_add_inferior, remote_current_thread, get_current_thread)
7122 (set_thread, set_general_thread, set_continue_thread)
7123 (set_general_process, write_ptid)
7124 (remote_unpack_thread_info_response, remote_get_threadinfo)
7125 (parse_threadlist_response, remote_get_threadlist)
7126 (remote_threadlist_iterator, remote_get_threads_with_ql)
7127 (remote_get_threads_with_qxfer)
7128 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7129 (get_offsets, remote_check_symbols, remote_supported_packet)
7130 (remote_query_supported, remote_packet_size)
7131 (remote_serial_quit_handler, remote_detach_pid)
7132 (remote_vcont_probe, remote_resume_with_hc)
7133 (send_interrupt_sequence, interrupt_query)
7134 (remote_notif_get_pending_events, fetch_register_using_p)
7135 (send_g_packet, process_g_packet, fetch_registers_using_g)
7136 (store_register_using_P, store_registers_using_G)
7137 (set_remote_traceframe, check_binary_download)
7138 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7139 (remote_xfer_live_readonly_partial, remote_read_bytes)
7140 (remote_send_printf, remote_flash_write, readchar)
7141 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7142 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7143 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7144 (extended_remote_disable_randomization, extended_remote_run)
7145 (send_environment_packet, extended_remote_environment_support)
7146 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7147 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7148 (packet_command): Now methods of ...
7149 (remote_target): ... this class.
7150 (m_remote_state) <remote_target>: New field.
7151 (struct remote_state) <stop_reply_queue,
7152 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7153 fields.
7154 (remote_state::remote_state): Allocate stop_reply_queue.
7155 (remote_state): Delete global.
7156 (get_remote_state_raw): Delete.
7157 (remote_target::get_remote_state): Allocate m_remote_state on
7158 demand.
7159 (get_current_remote_target): New.
7160 (remote_ops, extended_remote_ops): Delete.
7161 (wait_forever_enabled_p, remote_async_inferior_event_token):
7162 Delete, moved to struct remote_state.
7163 (remote_target::close): Delete self. Destruction bits split to
7164 ...
7165 (remote_target::~remote_target): ... this.
7166 (show_memory_packet_size): Adjust to use
7167 get_current_remote_target.
7168 (struct protocol_feature) <func>: Add remote_target parameter.
7169 All callers adjusted.
7170 (curr_quit_handler_target): New.
7171 (remote_serial_quit_handler): Reimplement.
7172 (remote_target::open_1): Adjust to use get_current_remote_target.
7173 Heap-allocate remote_target/extended_remote_target instances.
7174 (vcont_builder::vcont_builder): Add remote_target parameter, and
7175 save it in m_remote. All callers adjusted.
7176 (vcont_builder::m_remote): New field.
7177 (vcont_builder::restart, vcont_builder::flush)
7178 (vcont_builder::push_action): Use it.
7179 (remote_target::commit_resume): Use it.
7180 (struct queue_iter_param) <remote>: New field.
7181 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7182 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7183 (check_pending_event_prevents_wildcard_vcont_callback)
7184 (remote_target::check_pending_events_prevent_wildcard_vcont)
7185 (remote_target::discard_pending_stop_replies)
7186 (remote_target::discard_pending_stop_replies_in_queue)
7187 (remote_target::remote_notif_remove_queued_reply): Fill in
7188 'remote' field.
7189 (remote_notif_get_pending_events): New.
7190 (remote_target::readchar, remote_target::remote_serial_write):
7191 Save/restore curr_quit_handler_target.
7192 (putpkt): New.
7193 (kill_new_fork_children): Fill in 'remote' field.
7194 (packet_command): Use get_current_remote_target, defer to
7195 remote_target method of same name.
7196 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7197 parameter, and save it in m_remote. All callers adjusted.
7198 (scoped_remote_fd::release): Use m_remote.
7199 (scoped_remote_fd::m_remote): New field.
7200 (remote_file_put, remote_file_get, remote_file_delete): Use
7201 get_current_remote_target, defer to remote_target method of same
7202 name.
7203 (remote_btrace_reset): Add remote_state paremeter. Update all
7204 callers.
7205 (remote_async_inferior_event_handler). Pass down 'data'.
7206 (remote_new_objfile): Use get_current_remote_target.
7207 (remote_target::vcont_r_supported): New.
7208 (set_range_stepping): Use get_current_remote_target and
7209 remote_target::vcont_r_supported.
7210 (_initialize_remote): Don't allocate 'remote_state' and
7211 'stop_reply_queue' globals.
7212 * remote.h (struct remote_target): Forward declare.
7213 (getpkt, putpkt, remote_notif_get_pending_events): Add
7214 'remote_target' parameter.
7215
7216 2018-05-22 Pedro Alves <palves@redhat.com>
7217
7218 * remote.c (vcont_builder): Now a class. Make all data members
7219 private.
7220 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7221 Declare methods.
7222 (vcont_builder_restart): Rename to ...
7223 (vcont_builder::restart): ... this.
7224 (vcont_builder_flush): Rename to ...
7225 (vcont_builder::flush): ... this.
7226 (vcont_builder_push_action): Rename to ...
7227 (vcont_builder::push_action): ... this.
7228 (remote_target::commit_resume): Adjust.
7229
7230 2018-05-22 Pedro Alves <palves@redhat.com>
7231
7232 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7233 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7234 (get_fixed_memory_packet_size): New.
7235 (get_memory_packet_size): Use it.
7236 (set_memory_packet_size): Don't override the config size with
7237 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7238 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7239 Don't refer to get_memory_packet_size if not connected to a remote
7240 target. Show "(default)" if configured size is 0.
7241
7242 2018-05-22 Pedro Alves <palves@redhat.com>
7243
7244 * remote.c (remote_target::mourn_inferior): Move
7245 discard_pending_stop_replies call here from ...
7246 (_initialize_remote): ... here.
7247
7248 2018-05-22 Pedro Alves <palves@redhat.com>
7249
7250 * remote.c (compare_section_command): Remove set_general_process
7251 call.
7252
7253 2018-05-22 Pedro Alves <palves@redhat.com>
7254
7255 * remote.c (struct packet_reg, struct remote_arch_state):
7256 Move higher up in the file.
7257 (remote_state) <m_arch_states>: Store remote_arch_state values
7258 instead of remote_arch_state pointers.
7259 (remote_state::get_remote_arch_state): Adjust.
7260
7261 2018-05-22 Pedro Alves <palves@redhat.com>
7262
7263 * remote.c: Include <unordered_map>.
7264 (remote_state): Now a class.
7265 (remote_state) <get_remote_arch_state>: Declare method.
7266 <get_remote_arch_state>: New field.
7267 (remote_arch_state) <remote_arch_state>: Declare ctor.
7268 <regs>: Now a unique_ptr.
7269 (remote_gdbarch_data_handle): Delete.
7270 (get_remote_arch_state): Delete.
7271 (remote_state::get_remote_arch_state): New.
7272 (get_remote_state): Adjust to call remote_state's
7273 get_remote_arch_state method.
7274 (init_remote_state): Delete, bits factored out to ...
7275 (remote_arch_state::remote_arch_state): ... this new method.
7276 (get_remote_packet_size, get_memory_packet_size)
7277 (process_g_packet, remote_target::fetch_registers)
7278 (remote_target::prepare_to_store, store_registers_using_G)
7279 (remote_target::store_registers, remote_target::get_trace_status):
7280 Adjust to call remote_state's method.
7281 (_initialize_remote): Remove reference to
7282 remote_gdbarch_data_handle.
7283
7284 2018-05-22 Pedro Alves <palves@redhat.com>
7285
7286 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7287 pread>: New method declarations.
7288 (remote_target::open_1): Adjust.
7289 (readahead_cache_invalidate): Rename to ...
7290 (readahead_cache::invalidate): ... this, and adjust to be a class
7291 method.
7292 (readahead_cache_invalidate_fd): Rename to ...
7293 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7294 class method.
7295 (remote_hostio_pwrite): Adjust.
7296 (remote_hostio_pread_from_cache): Rename to ...
7297 (readahead_cache::pread): ... this, and adjust to be a class
7298 method.
7299 (remote_hostio_close): Adjust.
7300
7301 2018-05-22 Pedro Alves <palves@redhat.com>
7302
7303 * remote.c (remote_hostio_close_cleanup): Delete.
7304 (class scoped_remote_fd): New.
7305 (remote_file_put, remote_file_get): Use it.
7306
7307 2018-05-22 Pedro Alves <palves@redhat.com>
7308
7309 (struct vCont_action_support): Use bool and initialize all fields.
7310 (struct readahead_cache): Initialize all fields.
7311 (remote_state): Use bool and initialize all fields.
7312 (remote_state::remote_state, remote_state::~remote_state): New.
7313 (new_remote_state): Delete.
7314 (_initialize_remote): Use new to allocate remote_state.
7315
7316 2018-05-22 Pedro Alves <palves@redhat.com>
7317 張俊芝 <zjz@zjz.name>
7318
7319 PR gdb/22973
7320 * c-exp.y: Include "c-support.h".
7321 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7322 of tolower. Use c_ident_is_alpha to scan names.
7323 * c-lang.c: Include "c-support.h".
7324 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7325 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7326 * c-support.h: New file, with bits factored out from ...
7327 * cp-name-parser.y: ... this file.
7328 Include "c-support.h".
7329 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7330 c-support.h and renamed.
7331 (symbol_end, yylex): Adjust.
7332
7333 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7334
7335 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7336 parameter type to CORE_ADDR.
7337 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7338 parameter type in declaration to CORE_ADDR.
7339 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7340 target_auxv_search to get AT_HWCAP and use the result to get the
7341 target description.
7342 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7343 to CORE_ADDR. Remove the cast of the return value to unsigned
7344 long. Fix error predicate of target_auxv_search.
7345 (ppc_linux_nat_target::read_description): Change the type of the
7346 hwcap variable to CORE_ADDR.
7347
7348 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7349
7350 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7351 if the size of fpscr is larger than 32 bits.
7352
7353 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7354
7355 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7356 (ppc32_linux_vsxregmap): New global.
7357 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7358 regcache_supply_regset, and regcache_collect_regset.
7359 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7360 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7361 (fetch_vsx_register, store_vsx_register): Remove.
7362 (fetch_vsx_registers): Add regno parameter. Get regset using
7363 ppc_linux_vsxregset. Use regset to supply registers.
7364 (store_vsx_registers): Add regno parameter. Get regset using
7365 ppc_linux_vsxregset. Use regset to collect registers.
7366 (fetch_register): Call fetch_vsx_registers instead of
7367 fetch_vsx_register.
7368 (store_register): Call store_vsx_registers instead of
7369 store_vsx_register.
7370 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7371 new regno parameter.
7372 (store_ppc_registers): Call store_vsx_registers with -1 for the
7373 new regno parameter.
7374 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7375 (ppc_collect_vsxregset): Remove.
7376
7377 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7378
7379 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7380 offset fields.
7381 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7382 for vector register offset fields.
7383 (ppc64_fbsd_reg_offsets): Likewise.
7384 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7385 to vector register offset fields.
7386 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7387 to vector register offset fields.
7388 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7389 vector register offset fields.
7390 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7391 initializers for vector register offset fields.
7392 (rs6000_aix64_reg_offsets): Likewise.
7393 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7394 (ppc_supply_vrregset): Remove.
7395 (ppc_collect_vrregset): Remove.
7396 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7397 (ppc_linux_vrregset) : New function.
7398 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7399 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7400 (ppc32_linux_vrregset): Remove.
7401 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7402 and use result instead of ppc32_linux_vrregset.
7403 (ppc32_linux_reg_offsets): Remove initializers for vector register
7404 offset fields.
7405 (ppc64_linux_reg_offsets): Likewise.
7406 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7407 * ppc-linux-nat.c: Include regset.h.
7408 (gdb_vrregset_t): Adjust comment to account for little-endian
7409 mode.
7410 (supply_vrregset, fill_vrregset): Remove.
7411 (fetch_altivec_register, store_altivec_register): Remove.
7412 (fetch_altivec_registers): Add regno parameter. Get regset using
7413 ppc_linux_vrregset. Use regset to supply registers.
7414 (store_altivec_registers): Add regno parameter. Get regset using
7415 ppc_linux_vrregset. Use regset to collect registers.
7416 (fetch_register): Call fetch_altivec_registers instead of
7417 fetch_altivec_register.
7418 (store_register): Call store_altivec_registers instead of
7419 store_altivec_register.
7420 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7421 the new regno parameter.
7422 (store_ppc_registers): Call store_altivec_registers with -1 for
7423 the new regno parameter.
7424
7425 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7426
7427 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7428 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7429 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7430 (gdb_vrregset_t): Change array type size to
7431 PPC_LINUX_SIZEOF_VRREGSET.
7432 (gdb_vsxregset_t): Change array type size to
7433 PPC_LINUX_SIZEOF_VSXREGSET.
7434 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7435 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7436 PPC_LINUX_SIZEOF_VSXREGSET.
7437
7438 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7439
7440 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7441 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7442 nat/ppc-linux.c.
7443 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7444 ppc_linux_target_wordsize with tid.
7445 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7446 wordsize with tid.
7447 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7448 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7449 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7450 tid parameter. Remove static specifier.
7451 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7452 (ppc_linux_target_wordsize): New declaration.
7453
7454 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7455
7456 * arch/ppc-linux-common.c: New file.
7457 * arch/ppc-linux-common.h: New file.
7458 * arch/ppc-linux-tdesc.h: New file.
7459 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7460 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7461 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7462 arch/ppc-linux-tdesc.h.
7463 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7464 arch/ppc-linux-tdesc.h.
7465 (ppc_linux_nat_target::read_description): Remove target
7466 description matching code. Fill a ppc_linux_features struct and
7467 call ppc_linux_match_description with it. Move comment about ISA
7468 2.05 to ppc-linux-common.c.
7469 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7470 arch/ppc-linux-tdesc.h.
7471 (ppc_linux_core_read_description): Remove target description
7472 matching code. Fill a ppc_linux_features struct and call
7473 ppc_linux_match_description with it.
7474 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7475 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7476 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7477 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7478 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7479 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7480 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7481 (tdesc_powerpc_e500l): Remove.
7482
7483 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7484
7485 * ada-lang.c (catch_assert_command): Pass empty string instead
7486 of NULL for excep_string argument.
7487
7488 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7489
7490 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7491 the width of the requested register exceeds the width of the
7492 `ptrace' data type.
7493
7494 2018-05-21 Tom Tromey <tom@tromey.com>
7495
7496 * printcmd.c (output_command): Remove.
7497 (output_command_const): Rename to output_command.
7498 * valprint.h (output_command): Rename from output_command_const.
7499 * tracepoint.c (trace_dump_actions): Call output_command.
7500
7501 2018-05-21 Tom Tromey <tom@tromey.com>
7502
7503 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7504 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7505 * ada-lang.h (create_ada_exception_catchpoint): Update.
7506 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7507 std::string.
7508 (create_excep_cond_exprs, ~ada_catchpoint)
7509 (should_stop_exception, print_one_exception)
7510 (print_mention_exception, print_recreate_exception): Update.
7511 (ada_get_next_arg): Remove.
7512 (catch_ada_exception_command_split): Use std::string. Change type
7513 of "excep_string", "cond_string".
7514 (catch_ada_exception_command): Update.
7515 (create_ada_exception_catchpoint): Change type of excep_string.
7516 (ada_exception_sal): Remove excep_string parameter.
7517 (~ada_catchpoint): Remove.
7518
7519 2018-05-21 Tom Tromey <tom@tromey.com>
7520
7521 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7522 cleanup.
7523
7524 2018-05-21 Tom Tromey <tom@tromey.com>
7525
7526 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7527 Return unique_xmalloc_ptr.
7528 (print_it_exception): Update.
7529
7530 2018-05-21 Tom Tromey <tom@tromey.com>
7531
7532 * tracepoint.c (trace_dump_actions): Use std::string.
7533
7534 2018-05-21 Tom Tromey <tom@tromey.com>
7535
7536 * symfile.c (reread_symbols): Use std::string for original_name.
7537
7538 2018-05-21 Tom Tromey <tom@tromey.com>
7539
7540 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7541 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7542 constructor.
7543
7544 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7545
7546 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7547 instance to...
7548 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7549 * objfiles.c (get_objfile_bfd_data): Allocate
7550 objfile_per_bfd_storage with obstack_new when allocating on
7551 obstack.
7552
7553 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7554
7555 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7556 OBSTACK_ZALLOC.
7557 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7558 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7559 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7560 (add_pending): Likewise.
7561 (parse_symbol): Likewise.
7562 (parse_partial_symbols): Likewise.
7563 (psymtab_to_symtab_1): Likewise.
7564 (new_psymtab): Likewise.
7565 (elfmdebug_build_psymtabs): Likewise.
7566 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7567 * objfiles.c (get_objfile_bfd_data): Likewise.
7568 (objfile_register_static_link): Likewise.
7569 * psymtab.c (allocate_psymtab): Likewise.
7570 * stabsread.c (read_member_functions): Likewise.
7571 * xcoffread.c (xcoff_end_psymtab): Likewise.
7572
7573 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7574
7575 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7576 compiler supports std::is_trivially_constructible.
7577 * common/poison.h: Include obstack.h.
7578 (IsMallocable): Define to is_trivially_constructible if the
7579 compiler supports it, define to true_type otherwise.
7580 (xobnew): New.
7581 (XOBNEW): Redefine.
7582 (xobnewvec): New.
7583 (XOBNEWVEC): Redefine.
7584 * gdb_obstack.h (obstack_zalloc): New.
7585 (OBSTACK_ZALLOC): Redefine.
7586 (obstack_calloc): New.
7587 (OBSTACK_CALLOC): Redefine.
7588 (obstack_new): New.
7589 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7590 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7591 gdbarch.c.
7592 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7593 obstack_calloc/obstack_zalloc.
7594 (gdbarch_obstack_zalloc): Remove.
7595 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7596
7597 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7598
7599 * stack.c (backtrace_command_1): Remove useless variable int i.
7600
7601 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7602
7603 * stack.c (print_frame_info): Fix comment.
7604
7605 2018-05-18 Tom Tromey <tom@tromey.com>
7606
7607 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7608 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7609 (~dwarf2_per_objfile): Update
7610 (dwarf2_get_dwz_file): Use new.
7611 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7612 unique_ptr.
7613
7614 2018-05-18 Tom Tromey <tom@tromey.com>
7615
7616 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7617 unique_ptr.
7618 * dwarf2read.c (struct dwp_file): Add constructor and
7619 initializers.
7620 (open_and_init_dwp_file): Return a unique_ptr.
7621 (dwarf2_per_objfile, create_dwp_hash_table)
7622 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7623 (lookup_dwo_unit_in_dwp): Update.
7624 (open_and_init_dwp_file, get_dwp_file): Update.
7625
7626 2018-05-18 Tom Tromey <tom@tromey.com>
7627
7628 * dwarf2read.c (dwarf2_per_objfile): Update.
7629 (struct mapped_index): Add initializers.
7630 (dwarf2_read_index): Use new.
7631 (dw2_symtab_iter_init): Update.
7632 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7633 unique_ptr.
7634
7635 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7636
7637 * dwarf2read.c (mapped_index) <total_size>: Remove.
7638
7639 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7640
7641 * unittests/format_pieces-selftests.c (test_format_specifier):
7642 Add ARI comments.
7643
7644 2018-05-18 Tom Tromey <tom@tromey.com>
7645
7646 * c-typeprint.c (maybe_print_hole): New function.
7647 (c_print_type_struct_field_offset): Update.
7648 (c_type_print_base_struct_union): Call maybe_print_hole.
7649
7650 2018-05-17 Keith Seitz <keiths@redhat.com>
7651
7652 * breakpoint.c (build_bpstat_chain): New function, moved from
7653 bpstat_stop_status.
7654 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7655 If no stop chain is passed, call build_bpstat_chain to build it.
7656 * breakpoint.h (build_bpstat_chain): Declare.
7657 (bpstat_stop_status): Move documentation here from breakpoint.c.
7658 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7659 build the stop chain and pass it to skip_inline_frames.
7660 Pass this stop chain to bpstat_stop_status.
7661 * inline-frame.c: Include breakpoint.h.
7662 (stopped_by_user_bp_inline_frame): New function.
7663 (skip_inline_frames): Add parameter `stop_chain'.
7664 Move documention to inline-frame.h.
7665 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7666 whether the frame should be elided.
7667 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7668 Add moved documentation and update for new parameter.
7669
7670 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7671
7672 PR cli/14975
7673 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7674 unittests/format_pieces-selftests.c.
7675 * common/format.h (format_piece) <operator==>: New.
7676 (format_pieces) <operator[]>: Remove.
7677 * common/format.c (format_pieces::format_pieces): Handle \e.
7678 * unittests/format_pieces-selftests.c: New.
7679
7680 2018-05-17 Tom Tromey <tom@tromey.com>
7681
7682 PR symtab/23010:
7683 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7684 (dw2_instantiate_symtab): Add skip_partial parameter.
7685 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7686 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7687 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7688 (dw2_expand_symtabs_matching_one)
7689 (dw2_find_pc_sect_compunit_symtab)
7690 (dw2_debug_names_lookup_symbol)
7691 (dw2_debug_names_expand_symtabs_for_function): Update.
7692 (init_cutu_and_read_dies): Add skip_partial parameter.
7693 (process_psymtab_comp_unit, build_type_psymtabs_1)
7694 (process_skeletonless_type_unit, load_partial_comp_unit)
7695 (psymtab_to_symtab_1): Update.
7696 (load_full_comp_unit): Add skip_partial parameter.
7697 (process_imported_unit_die, dwarf2_read_addr_index)
7698 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7699 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7700 (read_signatured_type): Update.
7701
7702 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7703
7704 * value.c (release_value): Remove unused variable.
7705 (record_latest_value): Likewise.
7706 (access_value_history): Likewise.
7707 (preserve_values): Likewise.
7708
7709 2018-05-17 Tom Tromey <tom@tromey.com>
7710
7711 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7712 Initialize.
7713
7714 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7715
7716 PR gdb/22286
7717 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7718 Also handle registers whose width is not a multiple of
7719 PTRACE_TYPE_RET.
7720 (linux_nat_trad_target::store_register): Likewise.
7721
7722 2018-05-16 Tom Tromey <tom@tromey.com>
7723
7724 * gdbcore.h (core_bfd): Redefine.
7725 * corelow.c (core_target::close): Update.
7726 (core_target_open): Update.
7727 * progspace.h (struct program_space) <cbfd>: Now a
7728 gdb_bfd_ref_ptr.
7729
7730 2018-05-16 Tom Tromey <tom@tromey.com>
7731
7732 PR cli/19551:
7733 * symfile-add-flags.h (enum symfile_add_flags)
7734 <SYMFILE_NOT_FILENAME>: New constant.
7735 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7736 objfile name from BFD.
7737 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7738 * minidebug.c (find_separate_debug_file_in_section): Put
7739 ".gnu_debugdata" into BFD's file name.
7740
7741 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7742
7743 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7744 Remove.
7745
7746 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7747
7748 PR binutils/21446
7749 * aarch64-tdep.c (aarch64_analyze_prologue,
7750 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7751 Indicate not interested in errors.
7752
7753 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7754
7755 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7756 Supply the MIPS_ZERO_REGNUM register.
7757
7758 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7759
7760 * mips-tdep.c (mask_address_var): Make variable static.
7761
7762 2018-05-14 Tom Tromey <tom@tromey.com>
7763
7764 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7765
7766 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7767
7768 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7769 FXSAVE_ADDR for the mxcsr register.
7770
7771 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7772
7773 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7774
7775 2018-05-11 Pedro Alves <palves@redhat.com>
7776
7777 * corelow.c (core_target) <core_target>: No longer inline.
7778 Initialize m_core_gdbarch, m_core_vec and build the section table
7779 here.
7780 <~core_target>: New.
7781 <core_gdbarch, get_core_register_section>: New methods.
7782 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7783 factored out from ...
7784 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7785 (core_ops): Delete.
7786 (sniff_core_bfd): Add gdbarch parameter.
7787 (core_close): Delete, merged into ...
7788 (core_target::close): ... here. Delete self.
7789 (core_close_cleanup): Delete.
7790 (core_target_open): Allocate a core_target on the heap. Use a
7791 unique_ptr instead of a cleanup. Bits moved into the core_target
7792 ctor. Adjust to use core_target methods instead of globals.
7793 (get_core_register_section): Rename to ...
7794 (core_target::get_core_register_section): ... this and adjust.
7795 (struct get_core_registers_cb_data): New.
7796 (get_core_registers_cb): Use it. Use bool.
7797 (core_target::fetch_registers, core_target::files_info)
7798 (core_target::xfer_partial, core_target::read_description)
7799 (core_target::pid_to, core_target::thread_name): Adjust to
7800 reference class fields instead of globals.
7801 * target.h (struct target_ops_deleter, target_ops_up): New.
7802
7803 2018-05-11 Pedro Alves <palves@redhat.com>
7804
7805 * corefile.c (core_file_command): Move to corelow.c.
7806 * corelow.c (the_core_target): Delete.
7807 (core_file_command): Moved from corefile.c. Check exec_bfd
7808 instead of the_core_target. Use target_detach instead of calling
7809 into the_core_target directly.
7810 (maybe_say_no_core_file_now): New.
7811 (core_target::detach): Use it.
7812 (_initialize_corelow): Remove references to the_core_target.
7813 * gdbcore.h (the_core_target): Delete.
7814
7815 2018-05-11 Tom Tromey <tromey@redhat.com>
7816 Pedro Alves <palves@redhat.com>
7817
7818 * corefile.c (core_bfd): Remove.
7819 * gdbcore.h (core_bfd): Now a macro.
7820 * progspace.h (struct program_space) <cbfd>: New field.
7821
7822 2018-05-11 Tom Tromey <tom@tromey.com>
7823
7824 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7825 gdb::def_vector.
7826
7827 2018-05-10 Tom Tromey <tom@tromey.com>
7828
7829 * configure: Rebuild.
7830 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7831
7832 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7833
7834 PR server/23158:
7835 * regformats/regdat.sh: Adjust script, following the addition
7836 of the new expedite_regs parameter to init_target_desc.
7837
7838 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7839
7840 PR gdb/23127
7841 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7842 set_gdbarch_significant_addr_bit.
7843 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7844 set_gdbarch_significant_addr_bit.
7845 * utils.c (address_significant): Update to sign extend addr.
7846
7847 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7848
7849 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7850 (xtensa_linux_init_abi): Limit tdep->num_regs by
7851 tdep->num_nopriv_regs.
7852 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7853 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7854 not initialized.
7855
7856 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7857
7858 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7859
7860 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7861
7862 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7863 (I387_MXCSR_INIT_VAL): New constant.
7864 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7865 buffer if it was supplied by the inferior.
7866 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7867 (i387_xsave_get_clear_bv): New function.
7868 (i387_supply_xsave): Only read x87 control registers from the
7869 xsave buffer if the feature is enabled, and the state will have
7870 been written, otherwise, provide a suitable default.
7871 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7872 including x87 control registers. Update control registers if they
7873 have changed from the default value, and mark features as enabled
7874 as required.
7875 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7876
7877 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7878
7879 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7880
7881 2018-05-07 Tom Tromey <tom@tromey.com>
7882
7883 * configure: Rebuild.
7884 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7885
7886 2018-05-07 Tom Tromey <tom@tromey.com>
7887
7888 PR tdep/20362:
7889 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7890 bit. Use correct value for VDIV.
7891
7892 2018-05-04 Tom Tromey <tom@tromey.com>
7893
7894 * configure: Rebuild.
7895 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7896
7897 2018-05-04 Tom Tromey <tom@tromey.com>
7898
7899 * linux-record.c (record_linux_system_call) <case
7900 RECORD_SYS_RECVFROM>: Add "break".
7901
7902 2018-05-04 Tom Tromey <tom@tromey.com>
7903
7904 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7905 Add missing "break".
7906 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7907 Add missing "break".
7908
7909 2018-05-04 Tom Tromey <tom@tromey.com>
7910
7911 * rs6000-tdep.c (ppc_process_record_op4)
7912 (ppc_process_record_op63): Add fall-through comment.
7913
7914 2018-05-04 Tom Tromey <tom@tromey.com>
7915
7916 * i386-tdep.c (i386_process_record): Add fall-through comment.
7917
7918 2018-05-04 Tom Tromey <tom@tromey.com>
7919
7920 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7921 comment.
7922
7923 2018-05-04 Tom Tromey <tom@tromey.com>
7924
7925 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7926 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7927 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7928 comment.
7929 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7930 comment.
7931 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7932 comment.
7933
7934 2018-05-04 Tom Tromey <tom@tromey.com>
7935
7936 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7937
7938 2018-05-04 Tom Tromey <tom@tromey.com>
7939
7940 * s390-tdep.c (s390_process_record): Fix fall-through comments.
7941 * xcoffread.c (scan_xcoff_symtab): Move comment later.
7942 * symfile.c (section_is_mapped): Fix fall-through comment.
7943 * stabsread.c (define_symbol, read_member_functions): Fix
7944 fall-through comment.
7945 * s390-linux-tdep.c (s390_process_record): Fix fall-through
7946 comment.
7947 * remote.c (remote_wait_as): Fix fall-through comment.
7948 * p-exp.y (yylex): Fix fall-through comment.
7949 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7950 comment.
7951 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7952 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7953 * jv-exp.y (yylex): Fix fall-through comment.
7954 * go-exp.y (lex_one_token): Fix fall-through comment.
7955 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7956 fall-through comment.
7957 * f-exp.y (yylex): Fix fall-through comment.
7958 * dwarf2read.c (process_die): Fix fall-through comments.
7959 * dbxread.c (process_one_symbol): Fix fall-through comment.
7960 * d-exp.y (lex_one_token): Fix fall-through comment.
7961 * cp-name-parser.y (yylex): Fix fall-through comment.
7962 * coffread.c (coff_symtab_read): Fix fall-through comment.
7963 * c-exp.y (lex_one_token): Fix fall-through comment.
7964 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7965 comment.
7966 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7967 comment.
7968
7969 2018-05-04 Tom Tromey <tom@tromey.com>
7970
7971 PR python/22730:
7972 * NEWS: Mention gdb.execute change.
7973 * gdbcmd.h (execute_control_command): Don't declare.
7974 * python/python.c (execute_gdb_command): Use read_command_lines_1,
7975 execute_control_commands, execute_control_commands_to_string.
7976 * cli/cli-script.h (execute_control_commands)
7977 (execute_control_commands_to_string): Declare.
7978 (execute_control_command): Add from_tty parameter.
7979 * cli/cli-script.c (execute_control_commands)
7980 (execute_control_commands_to_string): New functions.
7981 (execute_user_command): Use execute_control_commands.
7982 (execute_control_command_1): Add "from_tty" parameter. Update.
7983 (execute_control_command): Likewise.
7984
7985 2018-05-04 Tom Tromey <tom@tromey.com>
7986
7987 PR python/22731:
7988 * NEWS: Mention that breakpoint commands are writable.
7989 * python/py-breakpoint.c (bppy_set_commands): New function.
7990 (breakpoint_object_getset) <"commands">: Use it.
7991
7992 2018-05-04 Tom Tromey <tom@tromey.com>
7993
7994 * tracepoint.c (actions_command): Update.
7995 * mi/mi-cmd-break.c (mi_command_line_array)
7996 (mi_command_line_array_cnt, mi_command_line_array_ptr)
7997 (mi_read_next_line): Remove.
7998 (mi_cmd_break_commands): Update.
7999 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8000 function_view.
8001 * cli/cli-script.c (get_command_line): Update.
8002 (process_next_line): Use function_view. Constify.
8003 (recurse_read_control_structure, read_command_lines)
8004 (read_command_lines_1): Change argument types to function_view.
8005 (do_define_command, document_command): Update.
8006 * breakpoint.h (check_tracepoint_command): Don't declare.
8007 * breakpoint.c (check_tracepoint_command): Remove.
8008 (commands_command_1, create_tracepoint_from_upload): Update.
8009
8010 2018-05-04 Tom Tromey <tom@tromey.com>
8011
8012 PR gdb/11750:
8013 * cli/cli-script.h (enum command_control_type) <define_control>:
8014 New constant.
8015 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8016 (build_command_line, execute_control_command_1)
8017 (process_next_line): Likewise.
8018 (do_define_command): New function, extracted from define_command.
8019 (define_command): Use it.
8020
8021 2018-05-04 Tom Tromey <tom@tromey.com>
8022
8023 * tracepoint.c (actions_command): Update.
8024 * cli/cli-script.h (read_command_lines): Update.
8025 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8026 (MAX_TMPBUF): Remove define.
8027 (define_command): Use string_printf.
8028 (document_command): Likewise.
8029 * breakpoint.c (commands_command_1): Update.
8030
8031 2018-05-04 Tom Tromey <tom@tromey.com>
8032
8033 * top.c (execute_command): Update.
8034 * cli/cli-script.h (print_command_lines): Now varargs.
8035 * cli/cli-script.c (print_command_lines): Now varargs.
8036 (execute_control_command_1) <case while_control, case if_control>:
8037 Update.
8038
8039 2018-05-04 Tom Tromey <tom@tromey.com>
8040
8041 * tracepoint.c (all_tracepoint_actions): Rename from
8042 all_tracepoint_actions_and_cleanup. Change return type.
8043 (actions_command, encode_actions_1, encode_actions)
8044 (trace_dump_actions, tdump_command): Update.
8045 * remote.c (remote_download_command_source): Update.
8046 * python/python.c (gdbpy_eval_from_control_command)
8047 (python_command, python_interactive_command): Update.
8048 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8049 * guile/guile.c (guile_command)
8050 (gdbscm_eval_from_control_command, guile_command): Update.
8051 * compile/compile.c (compile_code_command)
8052 (compile_print_command, compile_to_object): Update.
8053 * cli/cli-script.h (struct command_lines_deleter): New.
8054 (counted_command_line): New typedef.
8055 (struct command_line): Add constructor, destructor.
8056 <body_list>: Remove.
8057 <body_list_0, body_list_1>: New members.
8058 (command_line_up): Remove typedef.
8059 (read_command_lines, read_command_lines_1, get_command_line):
8060 Update.
8061 (copy_command_lines): Don't declare.
8062 * cli/cli-script.c (build_command_line): Use "new".
8063 (get_command_line): Return counted_command_line.
8064 (print_command_lines, execute_user_command)
8065 (execute_control_command_1, while_command, if_command): Update.
8066 (realloc_body_list): Remove.
8067 (process_next_line, recurse_read_control_structure): Update.
8068 (read_command_lines, read_command_lines_1): Return counted_command_line.
8069 (free_command_lines): Use "delete".
8070 (copy_command_lines): Remove.
8071 (define_command, document_command, show_user_1): Update.
8072 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8073 a counted_command_line.
8074 * breakpoint.h (counted_command_line): Remove typedef.
8075 (breakpoint_set_commands): Update.
8076 * breakpoint.c (check_no_tracepoint_commands)
8077 (validate_commands_for_breakpoint): Update.
8078 (breakpoint_set_commands): Change commands to be a
8079 counted_command_line.
8080 (commands_command_1, update_dprintf_command_list)
8081 (create_tracepoint_from_upload): Update.
8082
8083 2018-05-04 Tom Tromey <tom@tromey.com>
8084
8085 * cli/cli-decode.h (cmd_list_element): New constructor.
8086 (~cmd_list_element): New destructor.
8087 (struct cmd_list_element): Add initializers.
8088 * cli/cli-decode.c (do_add_cmd): Use "new".
8089 (delete_cmd): Use "delete".
8090
8091 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8092 Pedro Alves <palves@redhat.com>
8093
8094 PR breakpoints/19806 and support for PR external/20207.
8095 * NEWS: Mention Aarch64 watchpoint improvements.
8096 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8097 watchpoints and PR external/20207 watchpoints.
8098 * nat/aarch64-linux-hw-point.c
8099 (kernel_supports_any_contiguous_range): New.
8100 (aarch64_watchpoint_offset): New.
8101 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8102 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8103 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8104 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8105 next_addr_orig_p. Support PR external/20207 watchpoints.
8106 (aarch64_downgrade_regs): New.
8107 (aarch64_dr_state_insert_one_point): New parameters offset and
8108 addr_orig.
8109 (aarch64_dr_state_remove_one_point): Likewise.
8110 (aarch64_handle_breakpoint): Update caller.
8111 (aarch64_handle_aligned_watchpoint): Likewise.
8112 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8113 aligned_offset.
8114 (aarch64_linux_set_debug_regs): Remove const from state. Call
8115 aarch64_downgrade_regs.
8116 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8117 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8118 (DR_CONTROL_MASK): ... this.
8119 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8120 (unsigned int aarch64_watchpoint_offset): New prototype.
8121 (aarch64_linux_set_debug_regs): Remove const from state.
8122 * utils.c (align_up, align_down): Move to ...
8123 * common/common-utils.c (align_up, align_down): ... here.
8124 * utils.h (align_up, align_down): Move to ...
8125 * common/common-utils.h (align_up, align_down): ... here.
8126
8127 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8128
8129 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8130 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8131 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8132 Re-implement to match the ABI as summarized in GCC's
8133 gcc/config/sparc/sparc.c. All callers updated.
8134 (sparc32_store_arguments): Remove assertion.
8135
8136 2018-05-04 Tom Tromey <tom@tromey.com>
8137
8138 * printcmd.c: Don't include tui.h.
8139 (decode_format): Use skip_spaces.
8140
8141 2018-05-04 Tom Tromey <tom@tromey.com>
8142
8143 PR gdb/22619:
8144 * printcmd.c (last_count): New global.
8145 (x_command): Use saved count when repeating.
8146
8147 2018-05-04 Tom Tromey <tom@tromey.com>
8148
8149 * nto-procfs.c (do_closedir_cleanup): Remove.
8150 (procfs_pidlist): Use gdb_dir_up.
8151 * procfs.c (do_closedir_cleanup): Remove.
8152 (proc_update_threads): Use gdb_dir_up.
8153 * common/filestuff.h (struct gdb_dir_deleter): New.
8154 (gdb_dir_up): New typedef.
8155
8156 2018-05-04 Tom Tromey <tom@tromey.com>
8157
8158 * ada-lang.c (print_mention_exception): Use std::string.
8159
8160 2018-05-04 Tom Tromey <tom@tromey.com>
8161
8162 * ada-lang.c (create_excep_cond_exprs): Update.
8163 (ada_exception_catchpoint_cond_string): Use std::string.
8164
8165 2018-05-04 Tom Tromey <tom@tromey.com>
8166
8167 * ada-lang.c (xget_renaming_scope): Return std::string.
8168 (old_renaming_is_invisible): Update.
8169
8170 2018-05-04 Tom Tromey <tom@tromey.com>
8171
8172 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8173 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8174
8175 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8176
8177 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8178
8179 2018-05-04 Tom Tromey <tom@tromey.com>
8180
8181 * remote.c (remote_query_supported_append): Change type.
8182 (remote_check_symbols): Update.
8183
8184 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8185
8186 PR gdb/11420
8187 * configure.ac: Prepend libpython.
8188 * python/python-config.py: Likewise.
8189 * configure: Regenerate.
8190
8191 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8192
8193 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8194
8195 2018-05-03 Pedro Alves <palves@redhat.com>
8196
8197 * s390-linux-nat.c
8198 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8199 override. Write 'true' instead of '1'.
8200 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8201 declaration.
8202
8203 2018-05-02 Pedro Alves <palves@redhat.com>
8204
8205 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8206 add_inf_child_target.
8207 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8208 add_inf_child_target.
8209 * aix-thread.c (aix_thread_target_info): New.
8210 (aix_thread_target) <shortname, longname, doc>: Delete.
8211 <info>: New.
8212 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8213 add_inf_child_target.
8214 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8215 add_inf_child_target.
8216 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8217 add_inf_child_target.
8218 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8219 add_inf_child_target.
8220 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8221 add_inf_child_target.
8222 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8223 add_inf_child_target.
8224 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8225 add_inf_child_target.
8226 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8227 add_inf_child_target.
8228 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8229 add_inf_child_target.
8230 * bfd-target.c (target_bfd_target_info): New.
8231 (target_bfd) <shortname, longname, doc>: Delete.
8232 <info>: New.
8233 * bsd-kvm.c (bsd_kvm_target_info): New.
8234 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8235 <info>: New.
8236 (bsd_kvm_target::open): Rename to ...
8237 (bsd_kvm_target_open): ... this. Adjust.
8238 * bsd-uthread.c (bsd_uthread_target_info): New.
8239 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8240 <info>: New.
8241 * corefile.c (core_file_command): Adjust.
8242 * corelow.c (core_target_info): New.
8243 (core_target) <shortname, longname, doc>: Delete.
8244 <info>: New.
8245 (core_target::open): Rename to ...
8246 (core_target_open): ... this. Adjust.
8247 * ctf.c (ctf_target_info): New.
8248 (ctf_target) <shortname, longname, doc>: Delete.
8249 <info>: New.
8250 (ctf_target::open): Rename to ...
8251 (ctf_target_open): ... this.
8252 (_initialize_ctf): Adjust.
8253 * exec.c (exec_target_info): New.
8254 (exec_target) <shortname, longname, doc>: Delete.
8255 <info>: New.
8256 (exec_target::open): Rename to ...
8257 (exec_target_open): ... this.
8258 * gdbcore.h (core_target_open): Declare.
8259 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8260 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8261 add_inf_child_target.
8262 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8263 add_inf_child_target.
8264 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8265 add_inf_child_target.
8266 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8267 add_inf_child_target.
8268 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8269 add_inf_child_target.
8270 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8271 add_inf_child_target.
8272 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8273 add_inf_child_target.
8274 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8275 add_inf_child_target.
8276 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8277 add_inf_child_target.
8278 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8279 add_inf_child_target.
8280 * inf-child.c (inf_child_target_info): New.
8281 (inf_child_target::info): New.
8282 (inf_child_open_target): Remove 'target' parameter. Use
8283 get_native_target instead.
8284 (inf_child_target::open): Delete.
8285 (add_inf_child_target): New.
8286 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8287 Delete.
8288 <info>: New.
8289 (add_inf_child_target): Declare.
8290 (inf_child_open_target): Declare.
8291 * linux-thread-db.c (thread_db_target_info): New.
8292 (thread_db_target) <shortname, longname, doc>: Delete.
8293 <info>: New.
8294 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8295 add_inf_child_target.
8296 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8297 add_inf_child_target.
8298 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8299 add_inf_child_target.
8300 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8301 add_inf_child_target.
8302 * make-target-delegates (print_class): Adjust.
8303 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8304 add_inf_child_target.
8305 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8306 add_inf_child_target.
8307 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8308 add_inf_child_target.
8309 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8310 add_inf_child_target.
8311 * nto-procfs.c (nto_native_target_info): New.
8312 (nto_procfs_target_native) <shortname, longname, doc>:
8313 Delete.
8314 <info>: New.
8315 (nto_procfs_target_info): New.
8316 (nto_procfs_target_procfs) <shortname, longname, doc>:
8317 Delete.
8318 <info>: New.
8319 (init_procfs_targets): Adjust.
8320 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8321 add_inf_child_target.
8322 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8323 add_inf_child_target.
8324 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8325 add_inf_child_target.
8326 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8327 add_inf_child_target.
8328 * ravenscar-thread.c (ravenscar_target_info): New.
8329 (ravenscar_thread_target) <shortname, longname, doc>:
8330 Delete.
8331 <info>: New.
8332 * record-btrace.c (record_btrace_target_info):
8333 (record_btrace_target) <shortname, longname, doc>: Delete.
8334 <info>: New.
8335 (record_btrace_target::open): Rename to ...
8336 (record_btrace_target_open): ... this. Adjust.
8337 * record-full.c (record_longname, record_doc): New.
8338 (record_full_base_target) <shortname, longname, doc>: Delete.
8339 <info>: New.
8340 (record_full_target_info): New.
8341 (record_full_target): <shortname>: Delete.
8342 <info>: New.
8343 (record_full_core_open_1, record_full_open_1): Update comments.
8344 (record_full_base_target::open): Rename to ...
8345 (record_full_open): ... this.
8346 (cmd_record_full_restore): Update.
8347 (_initialize_record_full): Update.
8348 * remote-sim.c (remote_sim_target_info): New.
8349 (gdbsim_target) <shortname, longname, doc>: Delete.
8350 <info>: New.
8351 (gdbsim_target::open): Rename to ...
8352 (gdbsim_target_open): ... this.
8353 (_initialize_remote_sim): Adjust.
8354 * remote.c (remote_doc): New.
8355 (remote_target_info): New.
8356 (remote_target) <shortname, longname, doc>: Delete.
8357 <info>: New.
8358 (extended_remote_target_info): New.
8359 (extended_remote_target) <shortname, longname, doc>: Delete.
8360 <info>: New.
8361 (remote_target::open_1): Make static. Adjust.
8362 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8363 * s390-linux-nat.c (_initialize_s390_nat): Use
8364 add_inf_child_target.
8365 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8366 add_inf_child_target.
8367 * sol-thread.c (thread_db_target_info): New.
8368 (sol_thread_target) <shortname, longname, doc>: Delete.
8369 <info>: New.
8370 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8371 add_inf_child_target.
8372 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8373 add_inf_child_target.
8374 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8375 add_inf_child_target.
8376 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8377 add_inf_child_target.
8378 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8379 add_inf_child_target.
8380 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8381 add_inf_child_target.
8382 * spu-linux-nat.c (_initialize_spu_nat): Use
8383 add_inf_child_target.
8384 * spu-multiarch.c (spu_multiarch_target_info): New.
8385 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8386 <info>: New.
8387 * target-delegates.c: Regenerate.
8388 * target.c: Include <unordered_map>.
8389 (target_ops_p): Delete.
8390 (DEF_VEC_P(target_ops_p)): Delete.
8391 (target_factories): New.
8392 (test_target_info): New.
8393 (test_target_ops::info): New.
8394 (open_target): Adjust to use target_factories.
8395 (add_target_with_completer): Rename to ...
8396 (add_target): ... this. Change prototype. Register target_info
8397 and open callback in target_factories. Register target_info in
8398 command context instead of target_ops.
8399 (add_target): Delete old implementation.
8400 (add_deprecated_target_alias): Change prototype. Adjust.
8401 (the_native_target): New.
8402 (set_native_target, get_native_target): New.
8403 (find_default_run_target): Use the_native_target.
8404 (find_attach_target, find_run_target): Simplify.
8405 (target_ops::open): Delete.
8406 (dummy_target_info): New.
8407 (dummy_target::shortname, dummy_target::longname)
8408 (dummy_target::doc): Delete.
8409 (dummy_target::info): New.
8410 (debug_target::shortname, debug_target::longname)
8411 (debug_target::doc): Delete.
8412 (debug_target::info): New.
8413 * target.h (struct target_info): New.
8414 (target_ops::~target_ops): Add comment.
8415 (target_ops::info): New.
8416 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8417 longer virtual. Implement in terms of target_info.
8418 (set_native_target, get_native_target): Declare.
8419 (target_open_ftype): New.
8420 (add_target, add_target_with_completer)
8421 (add_deprecated_target_alias): Change prototype.
8422 (test_target) <shortname, longname, doc>: Delete.
8423 <info>: New.
8424 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8425 add_inf_child_target.
8426 * tracefile-tfile.c (tfile_target_info): New.
8427 (tfile_target) <shortname, longname, doc>: Delete.
8428 <info>: New.
8429 (tfile_target::open): Rename to ...
8430 (tfile_target_open): ... this.
8431 (_initialize_tracefile_tfile): Adjust.
8432 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8433 add_inf_child_target.
8434 * windows-nat.c (_initialize_windows_nat): Use
8435 add_inf_child_target.
8436 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8437 add_inf_child_target.
8438
8439 2018-05-02 Pedro Alves <palves@redhat.com>
8440
8441 * linux-nat.h (linux_nat_target) <low_new_thread,
8442 low_delete_thread, low_new_fork, low_forget_process,
8443 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8444 New virtual methods.
8445 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8446 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8447 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8448 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8449 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8450 Delete.
8451 * linux-fork.c (delete_fork): Adjust to call low method.
8452 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8453 (linux_nat_new_fork, linux_nat_forget_process_hook)
8454 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8455 (linux_nat_status_is_event):
8456 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8457 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8458 to call low method.
8459 (sigtrap_is_event): Rename to ...
8460 (linux_nat_target::low_status_is_event): ... this.
8461 (linux_nat_set_status_is_event): Delete.
8462 (save_stop_reason, linux_nat_wait_1)
8463 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8464 low methods.
8465 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8466 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8467 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8468 (linux_nat_set_prepare_to_resume): Delete.
8469 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8470 low virtual methods.
8471 * amd64-linux-nat.c: Likewise.
8472 * arm-linux-nat.c: Likewise.
8473 * i386-linux-nat.c: Likewise.
8474 * ia64-linux-nat.c: Likewise.
8475 * mips-linux-nat.c: Likewise.
8476 * ppc-linux-nat.c: Likewise.
8477 * s390-linux-nat.c: Likewise.
8478 * sparc64-linux-nat.c: Likewise.
8479 * x86-linux-nat.c: Likewise.
8480 * x86-linux-nat.h: Include "nat/x86-linux.h".
8481 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8482 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8483 Override methods.
8484
8485 2018-05-02 Pedro Alves <palves@redhat.com>
8486
8487 * target.h (target_ops)
8488 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8489 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8490 stopped_by_watchpoint, have_continuable_watchpoint,
8491 stopped_data_address, watchpoint_addr_within_range,
8492 can_accel_watchpoint_condition, can_run, thread_alive,
8493 has_all_memory, has_memory, has_stack, has_registers,
8494 has_execution, can_async_p, is_async_p, supports_non_stop,
8495 always_non_stop_p, can_execute_reverse, supports_multi_process,
8496 supports_enable_disable_tracepoint,
8497 supports_disable_randomization, supports_string_tracing,
8498 supports_evaluation_of_breakpoint_conditions,
8499 can_run_breakpoint_commands, filesystem_is_local,
8500 can_download_tracepoint, get_trace_state_variable_value,
8501 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8502 record_is_replaying, record_will_replay,
8503 augmented_libraries_svr4_read>: Adjust to return bool.
8504 * aarch64-linux-nat.c: All implementations adjusted.
8505 * aix-thread.c: All implementations adjusted.
8506 * arm-linux-nat.c: All implementations adjusted.
8507 * breakpoint.c: All implementations adjusted.
8508 * bsd-kvm.c: All implementations adjusted.
8509 * bsd-uthread.c: All implementations adjusted.
8510 * corelow.c: All implementations adjusted.
8511 * ctf.c: All implementations adjusted.
8512 * darwin-nat.c: All implementations adjusted.
8513 * darwin-nat.h: All implementations adjusted.
8514 * exec.c: All implementations adjusted.
8515 * fbsd-nat.c: All implementations adjusted.
8516 * fbsd-nat.h: All implementations adjusted.
8517 * gnu-nat.c: All implementations adjusted.
8518 * gnu-nat.h: All implementations adjusted.
8519 * go32-nat.c: All implementations adjusted.
8520 * ia64-linux-nat.c: All implementations adjusted.
8521 * inf-child.c: All implementations adjusted.
8522 * inf-child.h: All implementations adjusted.
8523 * inf-ptrace.c: All implementations adjusted.
8524 * inf-ptrace.h: All implementations adjusted.
8525 * linux-nat.c: All implementations adjusted.
8526 * linux-nat.h: All implementations adjusted.
8527 * mips-linux-nat.c: All implementations adjusted.
8528 * nto-procfs.c: All implementations adjusted.
8529 * ppc-linux-nat.c: All implementations adjusted.
8530 * procfs.c: All implementations adjusted.
8531 * ravenscar-thread.c: All implementations adjusted.
8532 * record-btrace.c: All implementations adjusted.
8533 * record-full.c: All implementations adjusted.
8534 * remote-sim.c: All implementations adjusted.
8535 * remote.c: All implementations adjusted.
8536 * s390-linux-nat.c: All implementations adjusted.
8537 * sol-thread.c: All implementations adjusted.
8538 * spu-multiarch.c: All implementations adjusted.
8539 * target-delegates.c: All implementations adjusted.
8540 * target.c: All implementations adjusted.
8541 * target.h: All implementations adjusted.
8542 * tracefile-tfile.c: All implementations adjusted.
8543 * tracefile.c: All implementations adjusted.
8544 * tracefile.h: All implementations adjusted.
8545 * windows-nat.c: All implementations adjusted.
8546 * x86-linux-nat.h: All implementations adjusted.
8547 * x86-nat.h: All implementations adjusted.
8548
8549 2018-05-02 Pedro Alves <palves@redhat.com>
8550
8551 * make-target-delegates (scan_target_h): Don't trim lines here.
8552 Replace sequences of tabs and/or whitespace with a single
8553 whitespace.
8554 (top level, parsing methods): Trim each line before processing it
8555 here.
8556
8557 2018-05-02 Pedro Alves <palves@redhat.com>
8558 John Baldwin <jhb@freebsd.org>
8559
8560 * target.h (enum strata) <debug_stratum>: New.
8561 (struct target_ops) <all delegation methods>: Replace by C++
8562 virtual methods, and drop "to_" prefix. All references updated
8563 throughout.
8564 <to_shortname, to_longname, to_doc, to_data,
8565 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8566 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8567 virtual methods. All references updated throughout.
8568 <can_attach, supports_terminal_ours, can_create_inferior,
8569 get_thread_control_capabilities, attach_no_wait>: New
8570 virtual methods.
8571 <insert_breakpoint, remove_breakpoint>: Now
8572 TARGET_DEFAULT_NORETURN methods.
8573 <info_proc>: Now returns bool.
8574 <to_magic>: Delete.
8575 (OPS_MAGIC): Delete.
8576 (current_target): Delete. All references replaced by references
8577 to ...
8578 (target_stack): ... this. New.
8579 (target_shortname, target_longname): Adjust.
8580 (target_can_run): Now a function declaration.
8581 (default_child_has_all_memory, default_child_has_memory)
8582 (default_child_has_stack, default_child_has_registers)
8583 (default_child_has_execution): Remove target_ops parameter.
8584 (complete_target_initialization): Delete.
8585 (memory_breakpoint_target): New template class.
8586 (test_target_ops): Refactor as a C++ class with virtual methods.
8587 * make-target-delegates (NAME_PART): Tighten.
8588 (POINTER_PART, CP_SYMBOL): New.
8589 (SIMPLE_RETURN_PART): Reimplement.
8590 (VEC_RETURN_PART): Expect less.
8591 (RETURN_PART, VIRTUAL_PART): New.
8592 (METHOD): Adjust to C++ virtual methods.
8593 (scan_target_h): Remove reference to C99.
8594 (dname): Output "target_ops::" prefix.
8595 (write_function_header): Adjust to output a C++ class method.
8596 (write_declaration): New.
8597 (write_delegator): Adjust to output a C++ class method.
8598 (tdname): Output "dummy_target::" prefix.
8599 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8600 method.
8601 (tdefault_names, debug_names): Delete.
8602 (return_types, tdefaults, styles, argtypes_array): New.
8603 (top level): All methods are delegators.
8604 (print_class): New.
8605 (top level): Print dummy_target and debug_target classes.
8606 * target-delegates.c: Regenerate.
8607 * target-debug.h (target_debug_print_enum_info_proc_what)
8608 (target_debug_print_thread_control_capabilities)
8609 (target_debug_print_thread_info_p): New.
8610 * target.c (dummy_target): Delete.
8611 (the_dummy_target, the_debug_target): New.
8612 (target_stack): Now extern.
8613 (set_targetdebug): Push/unpush debug target.
8614 (default_child_has_all_memory, default_child_has_memory)
8615 (default_child_has_stack, default_child_has_registers)
8616 (default_child_has_execution): Remove target_ops parameter.
8617 (complete_target_initialization): Delete.
8618 (add_target_with_completer): No longer call
8619 complete_target_initialization.
8620 (target_supports_terminal_ours): Use regular delegation.
8621 (update_current_target): Delete.
8622 (push_target): No longer check magic number. Don't call
8623 update_current_target.
8624 (unpush_target): Don't call update_current_target.
8625 (target_is_pushed): No longer check magic number.
8626 (target_require_runnable): Skip for all stratums over
8627 process_stratum.
8628 (target_ops::info_proc): New.
8629 (target_info_proc): Use find_target_at and
8630 find_default_run_target.
8631 (target_supports_disable_randomization): Use regular delegation.
8632 (target_get_osdata): Use find_target_at.
8633 (target_ops::open, target_ops::close, target_ops::can_attach)
8634 (target_ops::attach, target_ops::can_create_inferior)
8635 (target_ops::create_inferior, target_ops::can_run)
8636 (target_can_run): New.
8637 (default_fileio_target): Use regular delegation.
8638 (target_ops::fileio_open, target_ops::fileio_pwrite)
8639 (target_ops::fileio_pread, target_ops::fileio_fstat)
8640 (target_ops::fileio_close, target_ops::fileio_unlink)
8641 (target_ops::fileio_readlink): New.
8642 (target_fileio_open_1, target_fileio_unlink)
8643 (target_fileio_readlink): Always call the target method. Handle
8644 FILEIO_ENOSYS.
8645 (return_zero, return_zero_has_execution): Delete.
8646 (init_dummy_target): Delete.
8647 (dummy_target::dummy_target, dummy_target::shortname)
8648 (dummy_target::longname, dummy_target::doc)
8649 (debug_target::debug_target, debug_target::shortname)
8650 (debug_target::longname, debug_target::doc): New.
8651 (target_supports_delete_record): Use regular delegation.
8652 (setup_target_debug): Delete.
8653 (maintenance_print_target_stack): Skip debug_stratum.
8654 (initialize_targets): Instantiate the_dummy_target and
8655 the_debug_target.
8656 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8657 use target_stack.
8658 (target_auxv_search, fprint_target_auxv): Adjust.
8659 (info_auxv_command): Adjust to use target_stack.
8660 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8661 * exceptions.c (print_flush): Handle a NULL target_stack.
8662 * regcache.c (target_ops_no_register): Refactor as class with
8663 virtual methods.
8664
8665 * exec.c (exec_target): New class.
8666 (exec_ops): Now an exec_target.
8667 (exec_open, exec_close_1, exec_get_section_table)
8668 (exec_xfer_partial, exec_files_info, exec_has_memory)
8669 (exec_make_note_section): Refactor as exec_target methods.
8670 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8671 Delete.
8672 (exec_target::find_memory_regions): New.
8673 (_initialize_exec): Don't call init_exec_ops.
8674 * gdbcore.h (exec_file_clear): Delete.
8675
8676 * corefile.c (core_target): Delete.
8677 (core_file_command): Adjust.
8678 * corelow.c (core_target): New class.
8679 (the_core_target): New.
8680 (core_close): Remove target_ops parameter.
8681 (core_close_cleanup): Adjust.
8682 (core_target::close): New.
8683 (core_open, core_detach, get_core_registers, core_files_info)
8684 (core_xfer_partial, core_thread_alive, core_read_description)
8685 (core_pid_to_str, core_thread_name, core_has_memory)
8686 (core_has_stack, core_has_registers, core_info_proc): Rework as
8687 core_target methods.
8688 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8689 (_initialize_corelow): Initialize the_core_target.
8690 * gdbcore.h (core_target): Delete.
8691 (the_core_target): New.
8692
8693 * ctf.c: (ctf_target): New class.
8694 (ctf_ops): Now a ctf_target.
8695 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8696 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8697 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8698 methods.
8699 (init_ctf_ops): Delete.
8700 (_initialize_ctf): Don't call it.
8701 * tracefile-tfile.c (tfile_target): New class.
8702 (tfile_ops): Now a tfile_target.
8703 (tfile_open, tfile_close, tfile_files_info)
8704 (tfile_get_tracepoint_status, tfile_trace_find)
8705 (tfile_fetch_registers, tfile_xfer_partial)
8706 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8707 Refactor as tfile_target methods.
8708 (tfile_xfer_partial_features): Remove target_ops parameter.
8709 (init_tfile_ops): Delete.
8710 (_initialize_tracefile_tfile): Don't call it.
8711 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8712 (tracefile_has_stack, tracefile_has_registers)
8713 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8714 tracefile_target methods.
8715 (init_tracefile_ops): Delete.
8716 (tracefile_target::tracefile_target): New.
8717 * tracefile.h: Include "target.h".
8718 (tracefile_target): New class.
8719 (init_tracefile_ops): Delete.
8720
8721 * spu-multiarch.c (spu_multiarch_target): New class.
8722 (spu_ops): Now a spu_multiarch_target.
8723 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8724 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8725 (spu_search_memory, spu_mourn_inferior): Refactor as
8726 spu_multiarch_target methods.
8727 (init_spu_ops): Delete.
8728 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8729 complete_target_initialization.
8730
8731 * ravenscar-thread.c (ravenscar_thread_target): New class.
8732 (ravenscar_ops): Now a ravenscar_thread_target.
8733 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8734 (ravenscar_thread_alive, ravenscar_pid_to_str)
8735 (ravenscar_fetch_registers, ravenscar_store_registers)
8736 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8737 (ravenscar_stopped_by_hw_breakpoint)
8738 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8739 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8740 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8741 methods.
8742 (init_ravenscar_thread_ops): Delete.
8743 (_initialize_ravenscar): Remove references to
8744 init_ravenscar_thread_ops and complete_target_initialization.
8745
8746 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8747 (bsd_uthread_target): New class.
8748 (bsd_uthread_ops): Now a bsd_uthread_target.
8749 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8750 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8751 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8752 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8753 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8754 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8755 (bsd_uthread_target): Delete function.
8756 (_initialize_bsd_uthread): Remove reference to
8757 complete_target_initialization.
8758
8759 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8760 (target_bfd): ... this new class.
8761 (target_bfd_xfer_partial, target_bfd_get_section_table)
8762 (target_bfd_close): Refactor as target_bfd methods.
8763 (target_bfd::~target_bfd): New.
8764 (target_bfd_reopen): Adjust.
8765 (target_bfd::close): New.
8766
8767 * record-btrace.c (record_btrace_target): New class.
8768 (record_btrace_ops): Now a record_btrace_target.
8769 (record_btrace_open, record_btrace_stop_recording)
8770 (record_btrace_disconnect, record_btrace_close)
8771 (record_btrace_async, record_btrace_info)
8772 (record_btrace_insn_history, record_btrace_insn_history_range)
8773 (record_btrace_insn_history_from, record_btrace_call_history)
8774 (record_btrace_call_history_range)
8775 (record_btrace_call_history_from, record_btrace_record_method)
8776 (record_btrace_is_replaying, record_btrace_will_replay)
8777 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8778 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8779 (record_btrace_store_registers, record_btrace_prepare_to_store)
8780 (record_btrace_to_get_unwinder)
8781 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8782 (record_btrace_commit_resume, record_btrace_wait)
8783 (record_btrace_stop, record_btrace_can_execute_reverse)
8784 (record_btrace_stopped_by_sw_breakpoint)
8785 (record_btrace_supports_stopped_by_sw_breakpoint)
8786 (record_btrace_stopped_by_hw_breakpoint)
8787 (record_btrace_supports_stopped_by_hw_breakpoint)
8788 (record_btrace_update_thread_list, record_btrace_thread_alive)
8789 (record_btrace_goto_begin, record_btrace_goto_end)
8790 (record_btrace_goto, record_btrace_stop_replaying_all)
8791 (record_btrace_execution_direction)
8792 (record_btrace_prepare_to_generate_core)
8793 (record_btrace_done_generating_core): Refactor as
8794 record_btrace_target methods.
8795 (init_record_btrace_ops): Delete.
8796 (_initialize_record_btrace): Remove reference to
8797 init_record_btrace_ops.
8798 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8799 the execution_direction global.
8800 (record_full_base_target, record_full_target)
8801 (record_full_core_target): New classes.
8802 (record_full_ops): Now a record_full_target.
8803 (record_full_core_ops): Now a record_full_core_target.
8804 (record_full_target::detach, record_full_target::disconnect)
8805 (record_full_core_target::disconnect)
8806 (record_full_target::mourn_inferior, record_full_target::kill):
8807 New.
8808 (record_full_open, record_full_close, record_full_async): Refactor
8809 as methods of the record_full_base_target class.
8810 (record_full_resume, record_full_commit_resume): Refactor
8811 as methods of the record_full_target class.
8812 (record_full_wait, record_full_stopped_by_watchpoint)
8813 (record_full_stopped_data_address)
8814 (record_full_stopped_by_sw_breakpoint)
8815 (record_full_supports_stopped_by_sw_breakpoint)
8816 (record_full_stopped_by_hw_breakpoint)
8817 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8818 methods of the record_full_base_target class.
8819 (record_full_store_registers, record_full_xfer_partial)
8820 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8821 Refactor as methods of the record_full_target class.
8822 (record_full_can_execute_reverse, record_full_get_bookmark)
8823 (record_full_goto_bookmark, record_full_execution_direction)
8824 (record_full_record_method, record_full_info, record_full_delete)
8825 (record_full_is_replaying, record_full_will_replay)
8826 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8827 (record_full_stop_replaying): Refactor as methods of the
8828 record_full_base_target class.
8829 (record_full_core_resume, record_full_core_kill)
8830 (record_full_core_fetch_registers)
8831 (record_full_core_prepare_to_store)
8832 (record_full_core_store_registers, record_full_core_xfer_partial)
8833 (record_full_core_insert_breakpoint)
8834 (record_full_core_remove_breakpoint)
8835 (record_full_core_has_execution): Refactor
8836 as methods of the record_full_core_target class.
8837 (record_full_base_target::supports_delete_record): New.
8838 (init_record_full_ops): Delete.
8839 (init_record_full_core_ops): Delete.
8840 (record_full_save): Refactor as method of the
8841 record_full_base_target class.
8842 (_initialize_record_full): Remove references to
8843 init_record_full_ops and init_record_full_core_ops.
8844
8845 * remote.c (remote_target, extended_remote_target): New classes.
8846 (remote_ops): Now a remote_target.
8847 (extended_remote_ops): Now an extended_remote_target.
8848 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8849 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8850 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8851 (remote_pass_signals, remote_set_syscall_catchpoint)
8852 (remote_program_signals, )
8853 (remote_thread_always_alive): Remove target_ops parameter.
8854 (remote_thread_alive, remote_thread_name)
8855 (remote_update_thread_list, remote_threads_extra_info)
8856 (remote_static_tracepoint_marker_at)
8857 (remote_static_tracepoint_markers_by_strid)
8858 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8859 (remote_open): Refactor as methods of remote_target.
8860 (extended_remote_open, extended_remote_detach)
8861 (extended_remote_attach, extended_remote_post_attach):
8862 (extended_remote_supports_disable_randomization)
8863 (extended_remote_create_inferior): : Refactor as method of
8864 extended_remote_target.
8865 (remote_set_permissions, remote_open_1, remote_detach)
8866 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8867 (remote_resume, remote_commit_resume, remote_stop)
8868 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8869 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8870 (remote_prepare_to_store, remote_store_registers)
8871 (remote_flash_erase, remote_flash_done, remote_files_info)
8872 (remote_kill, remote_mourn, remote_insert_breakpoint)
8873 (remote_remove_breakpoint, remote_insert_watchpoint)
8874 (remote_watchpoint_addr_within_range)
8875 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8876 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8877 (remote_supports_stopped_by_sw_breakpoint)
8878 (remote_stopped_by_hw_breakpoint)
8879 (remote_supports_stopped_by_hw_breakpoint)
8880 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8881 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8882 (remote_verify_memory): Refactor as methods of remote_target.
8883 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8884 parameter.
8885 (remote_xfer_partial, remote_get_memory_xfer_limit)
8886 (remote_search_memory, remote_rcmd, remote_memory_map)
8887 (remote_pid_to_str, remote_get_thread_local_address)
8888 (remote_get_tib_address, remote_read_description): Refactor as
8889 methods of remote_target.
8890 (remote_target::fileio_open, remote_target::fileio_pwrite)
8891 (remote_target::fileio_pread, remote_target::fileio_close): New.
8892 (remote_hostio_readlink, remote_hostio_fstat)
8893 (remote_filesystem_is_local, remote_can_execute_reverse)
8894 (remote_supports_non_stop, remote_supports_disable_randomization)
8895 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8896 (remote_supports_enable_disable_tracepoint)
8897 (remote_supports_string_tracing)
8898 (remote_can_run_breakpoint_commands, remote_trace_init)
8899 (remote_download_tracepoint, remote_can_download_tracepoint)
8900 (remote_download_trace_state_variable, remote_enable_tracepoint)
8901 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8902 (remote_trace_start, remote_get_trace_status)
8903 (remote_get_tracepoint_status, remote_trace_stop)
8904 (remote_trace_find, remote_get_trace_state_variable_value)
8905 (remote_save_trace_data, remote_get_raw_trace_data)
8906 (remote_set_disconnected_tracing, remote_core_of_thread)
8907 (remote_set_circular_trace_buffer, remote_traceframe_info)
8908 (remote_get_min_fast_tracepoint_insn_len)
8909 (remote_set_trace_buffer_size, remote_set_trace_notes)
8910 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8911 (remote_disable_btrace, remote_teardown_btrace)
8912 (remote_read_btrace, remote_btrace_conf)
8913 (remote_augmented_libraries_svr4_read, remote_load)
8914 (remote_pid_to_exec_file, remote_can_do_single_step)
8915 (remote_execution_direction, remote_thread_handle_to_thread_info):
8916 Refactor as methods of remote_target.
8917 (init_remote_ops, init_extended_remote_ops): Delete.
8918 (remote_can_async_p, remote_is_async_p, remote_async)
8919 (remote_thread_events, remote_upload_tracepoints)
8920 (remote_upload_trace_state_variables): Refactor as methods of
8921 remote_target.
8922 (_initialize_remote): Remove references to init_remote_ops and
8923 init_extended_remote_ops.
8924
8925 * remote-sim.c (gdbsim_target): New class.
8926 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8927 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8928 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8929 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8930 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8931 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8932 Refactor as methods of gdbsim_target.
8933 (gdbsim_ops): Now a gdbsim_target.
8934 (init_gdbsim_ops): Delete.
8935 (gdbsim_cntrl_c): Adjust.
8936 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8937
8938 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8939 (the_amd64_linux_nat_target): New.
8940 (amd64_linux_fetch_inferior_registers)
8941 (amd64_linux_store_inferior_registers): Refactor as methods of
8942 amd64_linux_nat_target.
8943 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
8944 * i386-linux-nat.c: Don't include "linux-nat.h".
8945 (i386_linux_nat_target): New class.
8946 (the_i386_linux_nat_target): New.
8947 (i386_linux_fetch_inferior_registers)
8948 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8949 as methods of i386_linux_nat_target.
8950 (_initialize_i386_linux_nat): Adjust. Set linux_target.
8951 * inf-child.c (inf_child_ops): Delete.
8952 (inf_child_fetch_inferior_registers)
8953 (inf_child_store_inferior_registers): Delete.
8954 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8955 methods of inf_child_target.
8956 (inf_child_target::supports_terminal_ours)
8957 (inf_child_target::terminal_init)
8958 (inf_child_target::terminal_inferior)
8959 (inf_child_target::terminal_ours_for_output)
8960 (inf_child_target::terminal_ours, inf_child_target::interrupt)
8961 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8962 New.
8963 (inf_child_open, inf_child_disconnect, inf_child_close)
8964 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8965 (inf_child_post_startup_inferior, inf_child_can_run)
8966 (inf_child_pid_to_exec_file): Refactor as methods of
8967 inf_child_target.
8968 (inf_child_follow_fork): Delete.
8969 (inf_child_target::can_create_inferior)
8970 (inf_child_target::can_attach): New.
8971 (inf_child_target::has_all_memory, inf_child_target::has_memory)
8972 (inf_child_target::has_stack, inf_child_target::has_registers)
8973 (inf_child_target::has_execution): New.
8974 (inf_child_fileio_open, inf_child_fileio_pwrite)
8975 (inf_child_fileio_pread, inf_child_fileio_fstat)
8976 (inf_child_fileio_close, inf_child_fileio_unlink)
8977 (inf_child_fileio_readlink, inf_child_use_agent)
8978 (inf_child_can_use_agent): Refactor as methods of
8979 inf_child_target.
8980 (return_zero, inf_child_target): Delete.
8981 (inf_child_target::inf_child_target): New.
8982 * inf-child.h: Include "target.h".
8983 (inf_child_target): Delete function prototype.
8984 (inf_child_target): New class.
8985 (inf_child_open_target, inf_child_mourn_inferior)
8986 (inf_child_maybe_unpush_target): Delete.
8987 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8988 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8989 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8990 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8991 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8992 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8993 (inf_ptrace_wait, inf_ptrace_xfer_partial)
8994 (inf_ptrace_thread_alive, inf_ptrace_files_info)
8995 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8996 methods of inf_ptrace_target.
8997 (inf_ptrace_target): Delete function.
8998 * inf-ptrace.h: Include "inf-child.h".
8999 (inf_ptrace_target): Delete function declaration.
9000 (inf_ptrace_target): New class.
9001 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9002 * linux-nat.c (linux_target): New.
9003 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9004 (linux_nat_target::~linux_nat_target): New.
9005 (linux_child_post_attach, linux_child_post_startup_inferior)
9006 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9007 (linux_child_remove_fork_catchpoint)
9008 (linux_child_insert_vfork_catchpoint)
9009 (linux_child_remove_vfork_catchpoint)
9010 (linux_child_insert_exec_catchpoint)
9011 (linux_child_remove_exec_catchpoint)
9012 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9013 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9014 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9015 (linux_nat_stopped_data_address)
9016 (linux_nat_stopped_by_sw_breakpoint)
9017 (linux_nat_supports_stopped_by_sw_breakpoint)
9018 (linux_nat_stopped_by_hw_breakpoint)
9019 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9020 (linux_nat_kill, linux_nat_mourn_inferior)
9021 (linux_nat_xfer_partial, linux_nat_thread_alive)
9022 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9023 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9024 (linux_child_static_tracepoint_markers_by_strid)
9025 (linux_nat_is_async_p, linux_nat_can_async_p)
9026 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9027 (linux_nat_supports_multi_process)
9028 (linux_nat_supports_disable_randomization, linux_nat_async)
9029 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9030 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9031 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9032 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9033 methods of linux_nat_target.
9034 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9035 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9036 parameter.
9037 (check_stopped_by_watchpoint): Adjust.
9038 (linux_xfer_partial): Delete.
9039 (linux_target_install_ops, linux_target, linux_nat_add_target):
9040 Delete.
9041 (linux_nat_target::linux_nat_target): New.
9042 * linux-nat.h: Include "inf-ptrace.h".
9043 (linux_nat_target): New.
9044 (linux_target, linux_target_install_ops, linux_nat_add_target):
9045 Delete function declarations.
9046 (linux_target): Declare global.
9047 * linux-thread-db.c (thread_db_target): New.
9048 (thread_db_target::thread_db_target): New.
9049 (thread_db_ops): Delete.
9050 (the_thread_db_target): New.
9051 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9052 (thread_db_update_thread_list, thread_db_pid_to_str)
9053 (thread_db_extra_thread_info)
9054 (thread_db_thread_handle_to_thread_info)
9055 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9056 (thread_db_resume): Refactor as methods of thread_db_target.
9057 (init_thread_db_ops): Delete.
9058 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9059 * x86-linux-nat.c: Don't include "linux-nat.h".
9060 (super_post_startup_inferior): Delete.
9061 (x86_linux_nat_target::~x86_linux_nat_target): New.
9062 (x86_linux_child_post_startup_inferior)
9063 (x86_linux_read_description, x86_linux_enable_btrace)
9064 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9065 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9066 methods of x86_linux_nat_target.
9067 (x86_linux_create_target): Delete. Bits folded ...
9068 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9069 pointer.
9070 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9071 (x86_linux_nat_target): New class.
9072 (x86_linux_create_target): Delete.
9073 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9074 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9075 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9076 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9077 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9078 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9079 make extern.
9080 (x86_use_watchpoints): Delete.
9081 * x86-nat.h: Include "breakpoint.h" and "target.h".
9082 (x86_use_watchpoints): Delete.
9083 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9084 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9085 (x86_insert_watchpoint, x86_remove_watchpoint)
9086 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9087 (x86_stopped_by_hw_breakpoint): New declarations.
9088 (x86_nat_target): New template class.
9089
9090 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9091 (the_ppc_linux_nat_target): New.
9092 (ppc_linux_fetch_inferior_registers)
9093 (ppc_linux_can_use_hw_breakpoint)
9094 (ppc_linux_region_ok_for_hw_watchpoint)
9095 (ppc_linux_ranged_break_num_registers)
9096 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9097 (ppc_linux_insert_mask_watchpoint)
9098 (ppc_linux_remove_mask_watchpoint)
9099 (ppc_linux_can_accel_watchpoint_condition)
9100 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9101 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9102 (ppc_linux_watchpoint_addr_within_range)
9103 (ppc_linux_masked_watch_num_registers)
9104 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9105 (ppc_linux_read_description): Refactor as methods of
9106 ppc_linux_nat_target.
9107 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9108
9109 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9110 (procfs_target): New class.
9111 (the_procfs_target): New.
9112 (procfs_target): Delete function.
9113 (procfs_auxv_parse, procfs_attach, procfs_detach)
9114 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9115 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9116 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9117 (procfs_create_inferior, procfs_update_thread_list)
9118 (procfs_thread_alive, procfs_pid_to_str)
9119 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9120 (procfs_stopped_data_address, procfs_insert_watchpoint)
9121 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9122 (proc_find_memory_regions, procfs_info_proc)
9123 (procfs_make_note_section): Refactor as methods of procfs_target.
9124 (_initialize_procfs): Adjust.
9125 * sol-thread.c (sol_thread_target): New class.
9126 (sol_thread_ops): Now a sol_thread_target.
9127 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9128 (sol_thread_fetch_registers, sol_thread_store_registers)
9129 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9130 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9131 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9132 (init_sol_thread_ops): Delete.
9133 (_initialize_sol_thread): Adjust. Remove references to
9134 init_sol_thread_ops and complete_target_initialization.
9135
9136 * windows-nat.c (windows_nat_target): New class.
9137 (windows_fetch_inferior_registers)
9138 (windows_store_inferior_registers, windows_resume, windows_wait)
9139 (windows_attach, windows_detach, windows_pid_to_exec_file)
9140 (windows_files_info, windows_create_inferior)
9141 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9142 (windows_close, windows_pid_to_str, windows_xfer_partial)
9143 (windows_get_tib_address, windows_get_ada_task_ptid)
9144 (windows_thread_name, windows_thread_alive): Refactor as
9145 windows_nat_target methods.
9146 (do_initial_windows_stuff): Adjust.
9147 (windows_target): Delete function.
9148 (_initialize_windows_nat): Adjust.
9149
9150 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9151 (darwin_mourn_inferior, darwin_kill_inferior)
9152 (darwin_create_inferior, darwin_attach, darwin_detach)
9153 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9154 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9155 (darwin_supports_multi_process): Refactor as darwin_nat_target
9156 methods.
9157 (darwin_resume_to, darwin_files_info): Delete.
9158 (_initialize_darwin_inferior): Rename to ...
9159 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9160 * darwin-nat.h: Include "inf-child.h".
9161 (darwin_nat_target): New class.
9162 (darwin_complete_target): Delete.
9163 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9164 (darwin_target): New.
9165 (i386_darwin_fetch_inferior_registers)
9166 (i386_darwin_store_inferior_registers): Refactor as methods of
9167 darwin_nat_target.
9168 (darwin_complete_target): Delete, with ...
9169 (_initialize_i386_darwin_nat): ... bits factored out here.
9170
9171 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9172 (the_alpha_linux_nat_target): New.
9173 (alpha_linux_register_u_offset): Refactor as
9174 alpha_linux_nat_target method.
9175 (_initialize_alpha_linux_nat): Adjust.
9176 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9177 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9178 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9179 methods of linux_nat_trad_target.
9180 (linux_trad_target): Delete.
9181 * linux-nat-trad.h (linux_trad_target): Delete function.
9182 (linux_nat_trad_target): New class.
9183 * mips-linux-nat.c (mips_linux_nat_target): New class.
9184 (super_fetch_registers, super_store_registers, super_close):
9185 Delete.
9186 (the_mips_linux_nat_target): New.
9187 (mips64_linux_regsets_fetch_registers)
9188 (mips64_linux_regsets_store_registers)
9189 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9190 (mips_linux_register_u_offset, mips_linux_read_description)
9191 (mips_linux_can_use_hw_breakpoint)
9192 (mips_linux_stopped_by_watchpoint)
9193 (mips_linux_stopped_data_address)
9194 (mips_linux_region_ok_for_hw_watchpoint)
9195 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9196 (mips_linux_close): Refactor as methods of mips_linux_nat.
9197 (_initialize_mips_linux_nat): Adjust to C++ification.
9198
9199 * aix-thread.c (aix_thread_target): New class.
9200 (aix_thread_ops): Now an aix_thread_target.
9201 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9202 (aix_thread_fetch_registers, aix_thread_store_registers)
9203 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9204 (aix_thread_thread_alive, aix_thread_pid_to_str)
9205 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9206 Refactor as methods of aix_thread_target.
9207 (init_aix_thread_ops): Delete.
9208 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9209 and complete_target_initialization.
9210 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9211 (rs6000_nat_target): New class.
9212 (the_rs6000_nat_target): New.
9213 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9214 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9215 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9216 (super_create_inferior): Delete.
9217 (_initialize_rs6000_nat): Adjust to C++ification.
9218
9219 * arm-linux-nat.c (arm_linux_nat_target): New class.
9220 (the_arm_linux_nat_target): New.
9221 (arm_linux_fetch_inferior_registers)
9222 (arm_linux_store_inferior_registers, arm_linux_read_description)
9223 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9224 (arm_linux_remove_hw_breakpoint)
9225 (arm_linux_region_ok_for_hw_watchpoint)
9226 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9227 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9228 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9229 arm_linux_nat_target.
9230 (_initialize_arm_linux_nat): Adjust to C++ification.
9231
9232 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9233 (the_aarch64_linux_nat_target): New.
9234 (aarch64_linux_fetch_inferior_registers)
9235 (aarch64_linux_store_inferior_registers)
9236 (aarch64_linux_child_post_startup_inferior)
9237 (aarch64_linux_read_description)
9238 (aarch64_linux_can_use_hw_breakpoint)
9239 (aarch64_linux_insert_hw_breakpoint)
9240 (aarch64_linux_remove_hw_breakpoint)
9241 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9242 (aarch64_linux_region_ok_for_hw_watchpoint)
9243 (aarch64_linux_stopped_data_address)
9244 (aarch64_linux_stopped_by_watchpoint)
9245 (aarch64_linux_watchpoint_addr_within_range)
9246 (aarch64_linux_can_do_single_step): Refactor as methods of
9247 aarch64_linux_nat_target.
9248 (super_post_startup_inferior): Delete.
9249 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9250
9251 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9252 (the_hppa_linux_nat_target): New.
9253 (hppa_linux_fetch_inferior_registers)
9254 (hppa_linux_store_inferior_registers): Refactor as methods of
9255 hppa_linux_nat_target.
9256 (_initialize_hppa_linux_nat): Adjust to C++ification.
9257
9258 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9259 (the_ia64_linux_nat_target): New.
9260 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9261 (ia64_linux_stopped_data_address)
9262 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9263 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9264 ia64_linux_nat_target methods.
9265 (super_xfer_partial): Delete.
9266 (_initialize_ia64_linux_nat): Adjust to C++ification.
9267
9268 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9269 (the_m32r_linux_nat_target): New.
9270 (m32r_linux_fetch_inferior_registers)
9271 (m32r_linux_store_inferior_registers): Refactor as
9272 m32r_linux_nat_target methods.
9273 (_initialize_m32r_linux_nat): Adjust to C++ification.
9274
9275 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9276 (the_m68k_linux_nat_target): New.
9277 (m68k_linux_fetch_inferior_registers)
9278 (m68k_linux_store_inferior_registers): Refactor as
9279 m68k_linux_nat_target methods.
9280 (_initialize_m68k_linux_nat): Adjust to C++ification.
9281
9282 * s390-linux-nat.c (s390_linux_nat_target): New class.
9283 (the_s390_linux_nat_target): New.
9284 (s390_linux_fetch_inferior_registers)
9285 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9286 (s390_insert_watchpoint, s390_remove_watchpoint)
9287 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9288 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9289 (s390_auxv_parse, s390_read_description): Refactor as methods of
9290 s390_linux_nat_target.
9291 (_initialize_s390_nat): Adjust to C++ification.
9292
9293 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9294 (the_sparc_linux_nat_target): New.
9295 (_initialize_sparc_linux_nat): Adjust to C++ification.
9296 * sparc-nat.c (sparc_fetch_inferior_registers)
9297 (sparc_store_inferior_registers): Remove target_ops parameter.
9298 * sparc-nat.h (sparc_fetch_inferior_registers)
9299 (sparc_store_inferior_registers): Remove target_ops parameter.
9300 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9301 (the_sparc64_linux_nat_target): New.
9302 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9303
9304 * spu-linux-nat.c (spu_linux_nat_target): New class.
9305 (the_spu_linux_nat_target): New.
9306 (spu_child_post_startup_inferior, spu_child_post_attach)
9307 (spu_child_wait, spu_fetch_inferior_registers)
9308 (spu_store_inferior_registers, spu_xfer_partial)
9309 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9310 methods.
9311 (_initialize_spu_nat): Adjust to C++ification.
9312
9313 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9314 (the_tilegx_linux_nat_target): New.
9315 (fetch_inferior_registers, store_inferior_registers):
9316 Refactor as methods.
9317 (_initialize_tile_linux_nat): Adjust to C++ification.
9318
9319 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9320 (the_xtensa_linux_nat_target): New.
9321 (xtensa_linux_fetch_inferior_registers)
9322 (xtensa_linux_store_inferior_registers): Refactor as
9323 xtensa_linux_nat_target methods.
9324 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9325
9326 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9327 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9328 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9329 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9330 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9331 (fbsd_stopped_by_sw_breakpoint)
9332 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9333 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9334 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9335 (fbsd_post_startup_inferior, fbsd_post_attach)
9336 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9337 (fbsd_set_syscall_catchpoint)
9338 (super_xfer_partial, super_resume, super_wait)
9339 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9340 (fbsd_handle_debug_trap): Remove target_ops parameter.
9341 (fbsd_nat_add_target): Delete.
9342 * fbsd-nat.h: Include "inf-ptrace.h".
9343 (fbsd_nat_add_target): Delete.
9344 (USE_SIGTRAP_SIGINFO): Define.
9345 (fbsd_nat_target): New class.
9346
9347 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9348 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9349 (amd64bsd_target): Delete.
9350 * amd64-bsd-nat.h: New file.
9351 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9352 "x86-bsd-nat.h".
9353 (amd64_fbsd_nat_target): New class.
9354 (the_amd64_fbsd_nat_target): New.
9355 (amd64fbsd_read_description): Refactor as method of
9356 amd64_fbsd_nat_target.
9357 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9358 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9359 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9360 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9361 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9362 (i386bsd_target): Delete.
9363 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9364 (i386bsd_fetch_inferior_registers)
9365 (i386bsd_store_inferior_registers): Declare.
9366 (i386_bsd_nat_target): New class.
9367 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9368 (the_i386_fbsd_nat_target): New.
9369 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9370 i386_fbsd_nat_target methods.
9371 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9372 (_initialize_i386fbsd_nat): Adjust to C++ification.
9373 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9374 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9375 (_initialize_x86_bsd_nat): Adjust to C++ification.
9376 * x86-bsd-nat.h: Include "x86-nat.h".
9377 (x86bsd_target): Delete declaration.
9378 (x86bsd_nat_target): New class.
9379
9380 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9381 (the_aarch64_fbsd_nat_target): New.
9382 (aarch64_fbsd_fetch_inferior_registers)
9383 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9384 aarch64_fbsd_nat_target.
9385 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9386 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9387 (the_alpha_bsd_nat_target): New.
9388 (alphabsd_fetch_inferior_registers)
9389 (alphabsd_store_inferior_registers): Refactor as
9390 alpha_bsd_nat_target methods.
9391 (_initialize_alphabsd_nat): Refactor as methods of
9392 alpha_bsd_nat_target.
9393 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9394 (the_amd64_nbsd_nat_target): New.
9395 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9396 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9397 (the_amd64_obsd_nat_target): New.
9398 (_initialize_amd64obsd_nat): Adjust to C++ification.
9399 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9400 (the_arm_fbsd_nat_target): New.
9401 (arm_fbsd_fetch_inferior_registers)
9402 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9403 (_initialize_arm_fbsd_nat): Refactor as methods of
9404 arm_fbsd_nat_target.
9405 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9406 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9407 (the_arm_netbsd_nat_target): New.
9408 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9409 arm_netbsd_nat_target.
9410 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9411 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9412 (the_hppa_nbsd_nat_target): New.
9413 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9414 hppa_nbsd_nat_target methods.
9415 (_initialize_hppanbsd_nat): Adjust to C++ification.
9416 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9417 (the_hppa_obsd_nat_target): New.
9418 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9419 methods of hppa_obsd_nat_target.
9420 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9421 add_target.
9422 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9423 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9424 add_target.
9425 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9426 (_initialize_i386obsd_nat): Use add_target.
9427 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9428 (the_m68k_bsd_nat_target): New.
9429 (m68kbsd_fetch_inferior_registers)
9430 (m68kbsd_store_inferior_registers): Refactor as methods of
9431 m68k_bsd_nat_target.
9432 (_initialize_m68kbsd_nat): Adjust to C++ification.
9433 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9434 (the_mips_fbsd_nat_target): New.
9435 (mips_fbsd_fetch_inferior_registers)
9436 (mips_fbsd_store_inferior_registers): Refactor as methods of
9437 mips_fbsd_nat_target.
9438 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9439 add_target.
9440 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9441 (the_mips_nbsd_nat_target): New.
9442 (mipsnbsd_fetch_inferior_registers)
9443 (mipsnbsd_store_inferior_registers): Refactor as methods of
9444 mips_nbsd_nat_target.
9445 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9446 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9447 (the_mips64_obsd_nat_target): New.
9448 (mips64obsd_fetch_inferior_registers)
9449 (mips64obsd_store_inferior_registers): Refactor as methods of
9450 mips64_obsd_nat_target.
9451 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9452 add_target.
9453 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9454 nbsd_nat_target.
9455 * nbsd-nat.h: Include "inf-ptrace.h".
9456 (nbsd_nat_target): New class.
9457 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9458 (obsd_wait): Refactor as methods of obsd_nat_target.
9459 (obsd_add_target): Delete.
9460 * obsd-nat.h: Include "inf-ptrace.h".
9461 (obsd_nat_target): New class.
9462 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9463 (the_ppc_fbsd_nat_target): New.
9464 (ppcfbsd_fetch_inferior_registers)
9465 (ppcfbsd_store_inferior_registers): Refactor as methods of
9466 ppc_fbsd_nat_target.
9467 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9468 add_target.
9469 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9470 (the_ppc_nbsd_nat_target): New.
9471 (ppcnbsd_fetch_inferior_registers)
9472 (ppcnbsd_store_inferior_registers): Refactor as methods of
9473 ppc_nbsd_nat_target.
9474 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9475 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9476 (the_ppc_obsd_nat_target): New.
9477 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9478 methods of ppc_obsd_nat_target.
9479 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9480 add_target.
9481 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9482 (the_sh_nbsd_nat_target): New.
9483 (shnbsd_fetch_inferior_registers)
9484 (shnbsd_store_inferior_registers): Refactor as methods of
9485 sh_nbsd_nat_target.
9486 (_initialize_shnbsd_nat): Adjust to C++ification.
9487 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9488 (inf_ptrace_xfer_partial): Delete.
9489 (sparc_xfer_partial, sparc_target): Delete.
9490 * sparc-nat.h (sparc_fetch_inferior_registers)
9491 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9492 (sparc_target): Delete function declaration.
9493 (sparc_target): New template class.
9494 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9495 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9496 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9497 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9498 add_target.
9499 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9500 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9501 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9502 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9503 add_target.
9504 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9505 (the_vax_bsd_nat_target): New.
9506 (vaxbsd_fetch_inferior_registers)
9507 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9508 methods.
9509 (_initialize_vaxbsd_nat): Adjust to C++ification.
9510
9511 * bsd-kvm.c (bsd_kvm_target): New class.
9512 (bsd_kvm_ops): Now a bsd_kvm_target.
9513 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9514 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9515 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9516 bsd_kvm_target.
9517 (bsd_kvm_return_one): Delete.
9518 (bsd_kvm_add_target): Adjust to C++ification.
9519
9520 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9521 (nto_procfs_target_procfs): New classes.
9522 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9523 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9524 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9525 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9526 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9527 (procfs_remove_hw_breakpoint, procfs_resume)
9528 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9529 (procfs_kill_inferior, procfs_store_registers)
9530 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9531 as methods of nto_procfs_target.
9532 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9533 (nto_native_ops): Delete.
9534 (procfs_open, procfs_native_open): Delete.
9535 (nto_native_ops): Now an nto_procfs_target_native.
9536 (init_procfs_targets): Adjust to C++ification.
9537 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9538 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9539 Refactor as methods of nto_procfs_target.
9540
9541 * go32-nat.c (go32_nat_target): New class.
9542 (the_go32_nat_target): New.
9543 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9544 (go32_store_registers, go32_xfer_partial, go32_files_info)
9545 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9546 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9547 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9548 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9549 (go32_target): Delete.
9550 (_initialize_go32_nat): Adjust to C++ification.
9551
9552 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9553 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9554 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9555 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9556 gnu_nat_target.
9557 (gnu_target): Delete.
9558 * gnu-nat.h (gnu_target): Delete.
9559 (gnu_nat_target): New class.
9560 * i386-gnu-nat.c (gnu_base_target): New.
9561 (i386_gnu_nat_target): New class.
9562 (the_i386_gnu_nat_target): New.
9563 (_initialize_i386gnu_nat): Adjust to C++ification.
9564
9565 2018-05-02 Pedro Alves <palves@redhat.com>
9566
9567 * bfd-target.c (target_bfd_xclose): Rename to ...
9568 (target_bfd_close): ... this.
9569 (target_bfd_reopen): Adjust.
9570 * target.c (target_close): Remove references to to_xclose.
9571 * target.h (target_ops::to_xclose): Delete.
9572 (target_ops::to_close): Update comments.
9573
9574 2018-05-02 Pedro Alves <palves@redhat.com>
9575
9576 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9577 "linux-nat.h".
9578 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9579 * inf-ptrace.c (inf_ptrace_register_u_offset)
9580 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9581 (inf_ptrace_store_register, inf_ptrace_store_registers)
9582 (inf_ptrace_trad_target): Move to ...
9583 * linux-nat-trad.c: ... this new file.
9584 * linux-nat-trad.h: New file.
9585 * linux-nat.c (linux_target_install_ops): Make extern.
9586 (linux_trad_target): Delete.
9587 * linux-nat.h (linux_trad_target): Delete declaration.
9588 (linux_target_install_ops): Declare.
9589 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9590 "linux-nat.h".
9591
9592 2018-05-02 Pedro Alves <palves@redhat.com>
9593
9594 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9595 procfs_target/add_target here.
9596 * procfs.c (procfs_target): Make static.
9597 (_initialize_procfs): Call add_target here.
9598 * procfs.h (struct target_ops): Remove forward declaration.
9599 (procfs_target): Remove declaration.
9600 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9601
9602 2018-05-02 Pedro Alves <palves@redhat.com>
9603
9604 * procfs.c (procfs_stopped_by_watchpoint)
9605 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9606 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9607 Forward declare.
9608 (procfs_use_watchpoints): Delete, move contents...
9609 (procfs_target): ... here.
9610 * procfs.h (procfs_use_watchpoints): Delete declaration.
9611 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9612 procfs_use_watchpoints.
9613 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9614 procfs_use_watchpoints.
9615
9616 2018-05-02 Tom Tromey <tom@tromey.com>
9617
9618 PR python/20084:
9619 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9620 and var_zuinteger_unlimited.
9621 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9622 and PARAM_ZUINTEGER_UNLIMITED.
9623 (set_parameter_value): Handle var_zuinteger and
9624 var_zuinteger_unlimited.
9625 (add_setshow_generic): Likewise.
9626 (parmpy_init): Likewise.
9627
9628 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9629
9630 PR rust/23124
9631 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9632 pointer is not null before dereferencing it.
9633
9634 2018-04-30 Tom Tromey <tom@tromey.com>
9635
9636 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9637 is_mi_like_p.
9638
9639 2018-04-30 Tom Tromey <tom@tromey.com>
9640
9641 * breakpoint.c (mention): Remove use of is_mi_like_p.
9642 (print_mention_ranged_breakpoint): Likewise.
9643 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9644 of is_mi_like_p.
9645
9646 2018-04-30 Tom Tromey <tom@tromey.com>
9647
9648 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9649
9650 2018-04-30 Tom Tromey <tom@tromey.com>
9651
9652 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9653 (info_spu_event_command): Remove some uses of is_mi_like_p.
9654
9655 2018-04-30 Tom Tromey <tom@tromey.com>
9656
9657 * python/py-framefilter.c (py_print_single_arg)
9658 (enumerate_locals, py_print_args, py_print_frame): Remove some
9659 uses of is_mi_like_p.
9660
9661 2018-04-30 Tom Tromey <tom@tromey.com>
9662
9663 * ui-out.c: Update.
9664 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9665 * ui-out.h (ui_out::is_mi_like_p): Now const.
9666 (ui_out::do_is_mi_like_p): Now const.
9667 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9668
9669 2018-04-30 Tom Tromey <tom@tromey.com>
9670
9671 * varobj.c (varobj_set_visualizer): Use new_reference.
9672 * python/python.c (gdbpy_decode_line): Use new_reference.
9673 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9674 new_reference.
9675
9676 2018-04-30 Tom Tromey <tom@tromey.com>
9677
9678 * varobj.c (install_new_value): Use new_reference.
9679 * value.h (value_incref): Return void. Swap intro comment with
9680 value_decref.
9681 * value.c (set_value_parent): Use new_reference.
9682 (value_incref): Return void. Update intro comment.
9683 (release_value): Use new_reference.
9684 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9685
9686 2018-04-30 Tom Tromey <tom@tromey.com>
9687
9688 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9689 * gdb_bfd.h (new_bfd_ref): Remove.
9690 (gdb_bfd_open): Update comment.
9691 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9692 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9693 (gdb_bfd_fdopenr): Use new_reference.
9694 * exec.c (exec_file_attach): Use new_reference.
9695
9696 2018-04-30 Tom Tromey <tom@tromey.com>
9697
9698 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9699 method.
9700
9701 2018-04-30 Tom Tromey <tom@tromey.com>
9702
9703 * jit.c (jit_read_code_entry): Use type_align.
9704 * i386-tdep.c (i386_gdbarch_init): Don't call
9705 set_gdbarch_long_long_align_bit.
9706 * gdbarch.sh: Remove long_long_align_bit.
9707 * gdbarch.c, gdbarch.h: Rebuild.
9708 * arc-tdep.c (arc_type_align): New function.
9709 (arc_gdbarch_init): Use arc_type_align. Don't call
9710 set_gdbarch_long_long_align_bit.
9711
9712 2018-04-30 Tom Tromey <tom@tromey.com>
9713
9714 * rust-lang.c (rust_type_alignment): Remove.
9715 (rust_composite_type): Use type_align.
9716
9717 2018-04-30 Tom Tromey <tom@tromey.com>
9718
9719 * NEWS: Mention Type.align.
9720 * python/py-type.c (typy_get_alignof): New function.
9721 (type_object_getset): Add "alignof".
9722
9723 2018-04-30 Tom Tromey <tom@tromey.com>
9724
9725 PR exp/17095:
9726 * NEWS: Update.
9727 * std-operator.def (UNOP_ALIGNOF): New operator.
9728 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9729 New.
9730 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9731 * c-lang.c (c_op_print_tab): Add alignof.
9732 * c-exp.y (ALIGNOF): New token.
9733 (exp): Add "ALIGNOF" production.
9734 (ident_tokens): Add _Alignof and alignof.
9735
9736 2018-04-30 Tom Tromey <tom@tromey.com>
9737
9738 * i386-tdep.c (i386_type_align): New function.
9739 (i386_gdbarch_init): Update.
9740 * gdbarch.sh (type_align): New method.
9741 * gdbarch.c, gdbarch.h: Rebuild.
9742 * arch-utils.h (default_type_align): Declare.
9743 * arch-utils.c (default_type_align): New function.
9744 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9745 (struct type) <align_log2>: New field.
9746 <instance_flags>: Now a bitfield.
9747 (TYPE_RAW_ALIGN): New macro.
9748 (type_align, type_raw_align, set_type_align): Declare.
9749 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9750 functions.
9751 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9752 (get_alignment, maybe_set_alignment): New functions.
9753 (read_structure_type, read_enumeration_type, read_array_type)
9754 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9755 (read_subrange_type, read_base_type): Set type alignment.
9756
9757 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9758
9759 * dwarf2read.c (read_index_from_section): Use bool.
9760
9761 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9762
9763 PR gdb/22950
9764 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9765 with #ifdef.
9766
9767 2018-04-29 John Reiser <jreiser@BitWagon.com>
9768
9769 PR build/22873
9770 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9771 last step, and do it atomically.
9772
9773 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9774
9775 * compile/compile-c-types.c (convert_int, convert_float):
9776 Update for C FE v1.
9777
9778 2018-04-27 Tom Tromey <tom@tromey.com>
9779
9780 PR rust/22545:
9781 * rust-lang.c (rust_inclusive_range_type_p): New function.
9782 (rust_range): Handle inclusive ranges.
9783 (rust_compute_range): Likewise.
9784 * rust-exp.y (struct rust_op) <inclusive>: New field.
9785 (DOTDOTEQ): New constant.
9786 (range_expr): Add "..=" productions.
9787 (operator_tokens): Add "..=" token.
9788 (ast_range): Add "inclusive" parameter.
9789 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9790 ranges.
9791 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9792 bounds values.
9793 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9794 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9795 Update comments.
9796 * expprint.c (print_subexp_standard): Handle new bounds values.
9797 (dump_subexp_body_standard): Likewise.
9798
9799 2018-04-27 Tom Tromey <tom@tromey.com>
9800
9801 * configure: Rebuild.
9802 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9803 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9804 "OVERRIDE".
9805 (class symbol_needs_eval_context): Likewise.
9806 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9807 (mock_mapped_index::symbol_name_at): Use "override". Remove
9808 "virtual".
9809 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9810 "override".
9811 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9812 * aarch64-tdep.c (instruction_reader::read): Use "override".
9813 (instruction_reader_test::read): Likewise.
9814 * arm-tdep.c (instruction_reader::read): Use "override".
9815 (instruction_reader_thumb::read): Likewise.
9816
9817 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9818
9819 PR remote/9665
9820 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9821 instead of remote_send.
9822 (remote_send): Remove.
9823
9824 2018-04-26 Pedro Alves <palves@redhat.com>
9825
9826 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9827 find_function_start_sal instead of find_pc_line.
9828
9829 2018-04-26 Pedro Alves <palves@redhat.com>
9830
9831 * breakpoint.c (set_breakpoint_location_function): Handle
9832 mst_data_gnu_ifunc.
9833 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9834 * elfread.c (elf_symtab_read): Give data symbols with
9835 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9836 (elf_rel_plt_read): Update comment.
9837 * linespec.c (convert_linespec_to_sals): Handle
9838 mst_data_gnu_ifunc.
9839 (minsym_found): Handle mst_data_gnu_ifunc.
9840 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9841 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9842 * parse.c (find_minsym_type_and_address): Handle
9843 mst_data_gnu_ifunc.
9844 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9845 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9846 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9847 comment.
9848 <mst_data_gnu_ifunc>: New enumerator.
9849
9850 2018-04-26 Pedro Alves <palves@redhat.com>
9851
9852 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9853 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9854 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9855 Handle it.
9856 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9857 (lookup_minimal_symbol_by_pc): Adjust.
9858 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9859 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9860 * minsyms.h (lookup_msym_prefer): New enum.
9861 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9862 parameter by a lookup_msym_prefer parameter.
9863
9864 2018-04-26 Pedro Alves <palves@redhat.com>
9865
9866 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9867 ends in "@plt" instead of looking at the symbol's section.
9868
9869 2018-04-26 Pedro Alves <palves@redhat.com>
9870
9871 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9872 all references.
9873 (find_pc_partial_function_gnu_ifunc): Rename to ...
9874 (find_pc_partial_function): ... this, and remove references to
9875 'is_gnu_ifunc_p'.
9876 (find_pc_partial_function): Delete old implementation.
9877 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9878
9879 2018-04-26 Pedro Alves <palves@redhat.com>
9880
9881 * linespec.c (struct bound_minimal_symbol_search_key): New.
9882 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9883 skip first line if we found a GNU ifunc minimal symbol by name.
9884 (compare_msymbols): Change parameters to work with a destructured
9885 lhs minsym.
9886 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9887 functions.
9888
9889 2018-04-26 Pedro Alves <palves@redhat.com>
9890
9891 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9892 ifunc targets here. Instead, if we have an ifunc minsym, use its
9893 address/name.
9894 (add_location_to_breakpoint): Store the minsym and the objfile in
9895 the breakpoint location.
9896 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9897 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9898 Record the minsym in the sal.
9899 * symtab.h (symtab_and_line) <msymbol>: New field.
9900
9901 2018-04-26 Pedro Alves <palves@redhat.com>
9902
9903 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9904 unless we actually resolved the ifunc.
9905
9906 2018-04-26 Pedro Alves <palves@redhat.com>
9907
9908 * c-exp.y (variable production): Prefer ifunc minsyms over
9909 regular function symbols.
9910 * symtab.c (find_gnu_ifunc): New function.
9911 * minsyms.h (lookup_msym_prefer): New enum.
9912 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9913 parameter by a lookup_msym_prefer parameter.
9914 * symtab.h (find_gnu_ifunc): New declaration.
9915
9916 2018-04-26 Pedro Alves <palves@redhat.com>
9917
9918 * blockframe.c (find_gnu_ifunc_target_type): New function.
9919 (find_function_type): New.
9920 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9921 return a value with a memory address.
9922 (eval_call): For calls to GNU ifunc functions, try to find the
9923 type of the target function from the type that the resolver
9924 returns.
9925 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9926 symbols.
9927 * infcall.c (find_function_return_type): Delete.
9928 (find_function_addr): Add 'function_type' parameter. For calls to
9929 GNU ifunc functions, try to find the type of the target function
9930 from the type that the resolver returns, and return it via
9931 FUNCTION_TYPE.
9932 (call_function_by_hand_dummy): Adjust to use the function type
9933 returned by find_function_addr.
9934 (find_function_addr): Add 'function_type' parameter and move
9935 description here.
9936 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9937 declarations.
9938
9939 2018-04-26 Pedro Alves <palves@redhat.com>
9940
9941 * c-exp.y (variable production): Skip finding an alias for ifunc
9942 symbols.
9943
9944 2018-04-26 Pedro Alves <palves@redhat.com>
9945
9946 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9947
9948 2018-04-25 Pedro Alves <palves@redhat.com>
9949
9950 * infcmd.c (kill_command): Print the pid as string, not the whole
9951 thread's ptid. Add comment. s/has been killed/killed/ in output
9952 message.
9953 * remote.c (remote_detach_1): Print the pid as string, not the
9954 whole thread's ptid.
9955
9956 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9957 Sergio Durigan Junior <sergiodj@redhat.com>
9958 Pedro Alves <palves@redhat.com>
9959
9960 * infcmd.c (kill_command): Print message when inferior has
9961 been killed.
9962 * inferior.c (print_inferior_events): Remove 'static'. Set as
9963 '1'.
9964 (add_inferior): Improve message printed when
9965 'print_inferior_events' is on.
9966 (exit_inferior): Remove message printed when
9967 'print_inferior_events' is on.
9968 (detach_inferior): Improve message printed when
9969 'print_inferior_events' is on.
9970 (initialize_inferiors): Use 'add_inferior_silent' to set
9971 'current_inferior_'.
9972 * inferior.h (print_inferior_events): Declare here as
9973 'extern'.
9974 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9975 '[Detaching...]' messages when 'print_inferior_events' is on.
9976 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
9977 as prefix/suffix for messages. Remove periods. Fix erroneous
9978 'Detaching after fork from child...', replace it by '... from
9979 parent...'.
9980 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9981 prefix/suffix when printing 'Detaching...' messages. Print
9982 them when 'print_inferior_events' is on.
9983 * remote.c (remote_detach_1): Print message when detaching
9984 from inferior and '!is_fork_parent'.
9985
9986 2018-04-24 Tom Tromey <tom@tromey.com>
9987
9988 * cli-out.h: Reindent.
9989
9990 2018-04-24 Tom Tromey <tom@tromey.com>
9991
9992 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9993 (cli_ui_out::do_field_string): Use fputs_filtered.
9994 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9995
9996 2018-04-23 Tom Tromey <tom@tromey.com>
9997
9998 * guile/scm-frame.c (gdbscm_frame_read_var): Use
9999 gdb::unique_xmalloc_ptr.
10000
10001 2018-04-23 Tom Tromey <tom@tromey.com>
10002
10003 * configure: Rebuild.
10004
10005 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10006
10007 PR gdb/23095
10008 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10009 prepare_for_testing. Set normal_bp to r_debug_state if target
10010 is bsd.
10011
10012 2018-04-21 Pedro Alves <palves@redhat.com>
10013 Rajendra SY <rajendra.sy@gmail.com>
10014
10015 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10016 * remote.c (extended_remote_attach): In all-stop mode, mark the
10017 thread as executing.
10018
10019 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10020
10021 * thread.c (thread_apply_all_command): Fix comment.
10022 (thread_command): Fix comment.
10023
10024 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10025
10026 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10027 parameter.
10028 * features/aarch64-core.c (create_feature_aarch64_core):
10029 Regenerate.
10030 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10031 Likewise.
10032 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10033 Likewise.
10034 * features/i386/32bit-avx512.c
10035 (create_feature_i386_32bit_avx512): Likewise.
10036 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10037 Likewise.
10038 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10039 Likewise.
10040 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10041 Likewise.
10042 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10043 Likewise.
10044 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10045 Likewise.
10046 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10047 Likewise.
10048 * features/i386/64bit-avx512.c
10049 (create_feature_i386_64bit_avx512): Likewise.
10050 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10051 Likewise.
10052 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10053 Likewise.
10054 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10055 Likewise.
10056 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10057 Likewise.
10058 * features/i386/64bit-segments.c
10059 (create_feature_i386_64bit_segments): Likewise.
10060 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10061 Likewise.
10062 * features/i386/x32-core.c
10063 (create_feature_i386_x32_core): Likewise.
10064 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10065 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10066 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10067 * target-descriptions.c: In generated code, don't pass xml
10068 filename.
10069
10070 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10071
10072 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10073 (print_xml_feature::visit_post): Likewise.
10074 (print_xml_feature::visit): Likewise.
10075 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10076 (print_xml_feature): Add new class.
10077 * regformats/regdat.sh: Null xmltarget on feature targets.
10078 * target-descriptions.c (struct target_desc): Add xmltarget.
10079 (maintenance_check_tdesc_xml_convert): Add unittest function.
10080 (tdesc_get_features_xml): Add function to get xml.
10081 (maintenance_check_xml_descriptions): Test xml generation.
10082 * xml-tdesc.c (string_read_description_xml): Add function.
10083 * xml-tdesc.h (string_read_description_xml): Add declaration.
10084
10085 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10086
10087 * features/Makefile: Add feature marker to targets with new style
10088 target descriptions.
10089 * regformats/aarch64.dat: Regenerate.
10090 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10091 * regformats/i386/amd64-avx-linux.dat: Likewise.
10092 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10093 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10094 * regformats/i386/amd64-linux.dat: Likewise.
10095 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10096 * regformats/i386/amd64.dat: Likewise.
10097 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10098 * regformats/i386/i386-avx-linux.dat: Likewise.
10099 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10100 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10101 * regformats/i386/i386-linux.dat: Likewise.
10102 * regformats/i386/i386-mmx-linux.dat: Likewise.
10103 * regformats/i386/i386-mpx-linux.dat: Likewise.
10104 * regformats/i386/i386.dat: Likewise.
10105 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10106 * regformats/i386/x32-avx-linux.dat: Likewise.
10107 * regformats/i386/x32-linux.dat: Likewise.
10108 * regformats/tic6x-c62x-linux.dat: Likewise.
10109 * regformats/tic6x-c64x-linux.dat: Likewise.
10110 * regformats/tic6x-c64xp-linux.dat: Likewise.
10111 * regformats/regdat.sh: Parse feature marker.
10112
10113 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10114
10115 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10116 (tdesc_osabi_name): Likewise.
10117 * target-descriptions.c (tdesc_architecture_name): Add new
10118 function.
10119 (tdesc_osabi_name): Likewise.
10120
10121 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10122
10123 * common/tdesc.c (tdesc_predefined_type): Move to here.
10124 (tdesc_named_type): Likewise.
10125 (tdesc_create_vector): Likewise.
10126 (tdesc_create_struct): Likewise.
10127 (tdesc_set_struct_size): Likewise.
10128 (tdesc_create_union): Likewise.
10129 (tdesc_create_flags): Likewise.
10130 (tdesc_create_enum): Likewise.
10131 (tdesc_add_field): Likewise.
10132 (tdesc_add_typed_bitfield): Likewise.
10133 (tdesc_add_bitfield): Likewise.
10134 (tdesc_add_flag): Likewise.
10135 (tdesc_add_enum_value): Likewise.
10136 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10137 (struct tdesc_type_vector): Likewise.
10138 (struct tdesc_type_field): Likewise.
10139 (struct tdesc_type_with_fields): Likewise.
10140 (tdesc_create_enum): Add declaration.
10141 (tdesc_add_typed_bitfield): Likewise.
10142 (tdesc_add_enum_value): Likewise.
10143 * target-descriptions.c (tdesc_type_field): Move from here.
10144 (tdesc_type_builtin): Likewise.
10145 (tdesc_type_vector): Likewise.
10146 (tdesc_type_with_fields): Likewise.
10147 (tdesc_predefined_types): Likewise.
10148 (tdesc_named_type): Likewise.
10149 (tdesc_create_vector): Likewise.
10150 (tdesc_create_struct): Likewise.
10151 (tdesc_set_struct_size): Likewise.
10152 (tdesc_create_union): Likewise.
10153 (tdesc_create_flags): Likewise.
10154 (tdesc_create_enum): Likewise.
10155 (tdesc_add_field): Likewise.
10156 (tdesc_add_typed_bitfield): Likewise.
10157 (tdesc_add_bitfield): Likewise.
10158 (tdesc_add_flag): Likewise.
10159 (tdesc_add_enum_value): Likewise.
10160 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10161 (tdesc_add_typed_bitfield): Likewise.
10162 (tdesc_add_enum_value): Likewise.
10163
10164 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10165
10166 * common/tdesc.c (tdesc_feature::accept): Move to here.
10167 (tdesc_feature::operator==): Likewise.
10168 (tdesc_create_reg): Likewise.
10169 * common/tdesc.h (tdesc_type_kind): Likewise.
10170 (struct tdesc_type): Likewise.
10171 (struct tdesc_feature): Likewise.
10172 * regformats/regdat.sh: Create a feature.
10173 * target-descriptions.c (tdesc_type_kind): Move from here.
10174 (tdesc_type): Likewise.
10175 (tdesc_type_up): Likewise.
10176 (tdesc_feature): Likewise.
10177 (tdesc_create_reg): Likewise.
10178
10179 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10180
10181 * Makefile.in: Add arch/tdesc.c
10182 * common/tdesc.c: New file.
10183 * common/tdesc.h (tdesc_element_visitor): Move to here.
10184 (tdesc_element): Likewise.
10185 (tdesc_reg): Likewise.
10186 (tdesc_reg_up): Likewise.
10187 * regformats/regdef.h (reg): Add offset to constructors.
10188 * target-descriptions.c (tdesc_element_visitor): Move from here.
10189 (tdesc_element): Likewise.
10190 (tdesc_reg): Likewise.
10191 (tdesc_reg_up): Likewise.
10192
10193 2018-04-17 Tom Tromey <tom@tromey.com>
10194
10195 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10196 discriminant field.
10197
10198 2018-04-17 Tom Tromey <tom@tromey.com>
10199
10200 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10201
10202 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10203
10204 * symtab.c (print_symbol_info): Skip printing filename and line
10205 number when `last' is NULL.
10206 (symtab_symbol_info): Use empty string instead of NULL for first
10207 invocation of print_symbol_info.
10208 (rbreak_command): Pass NULL to `last' parameter of
10209 print_symbol_info.
10210
10211 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10212
10213 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10214 instead of nullptr.
10215
10216 2018-04-16 Pedro Alves <palves@redhat.com>
10217
10218 * MAINTAINERS (sh): Remove.
10219 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10220 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10221 (ALLDEPFILES): Remove sh64-tdep.c.
10222 * NEWS: Mentions that support for SH-5/SH64 is removed.
10223 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10224 (sh*-*-openbsd*): Ditto.
10225 (sh64-*-elf*): Remove.
10226 (sh*): Remove.
10227 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10228 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10229 * sh-tdep.c: No longer include "sh64-tdep.h".
10230 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10231 * sh64-tdep.c, sh64-tdep.h: Remove files.
10232
10233 2018-04-16 Pedro Alves <palves@redhat.com>
10234
10235 * MAINTAINERS: Remove m88k.
10236 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10237 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10238 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10239 * NEWS: Mention that support for m88k was removed.
10240 * configure.host (m88*-*-*): Remove support.
10241 * configure.nat (m88k-*-*): Remove support.
10242 * configure.tgt (m88*-*-openbsd*): Remove.
10243 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10244
10245 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10246
10247 * configure.tgt (x86_tobjs): New variable.
10248 (amd64_tobjs, i386_tobjs): Use it.
10249
10250 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10251
10252 * symtab.c (print_symbol_info): Precede the symbol definition by
10253 the line number when available.
10254 * NEWS: Advertise this enhancement.
10255
10256 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10257
10258 * NEWS (New options): announce set/show record btrace cpu.
10259 * btrace.c: Include record-btrace.h.
10260 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10261 the vendor is unknown.
10262 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10263 Maybe overwrite the btrace configuration's cpu.
10264 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10265 (btrace_fetch): Add cpu parameter. Update callers.
10266 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10267 Maybe overwrite the btrace configuration's cpu. Skip enabling
10268 errata workarounds if the vendor is unknown.
10269 * python/py-record-btrace.c: Include record-btrace.h.
10270 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10271 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10272 * record-btrace.c (record_btrace_cpu_state_kind): New.
10273 (record_btrace_cpu): New.
10274 (set_record_btrace_cpu_cmdlist): New.
10275 (record_btrace_get_cpu): New.
10276 (require_btrace_thread, record_btrace_info)
10277 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10278 (cmd_set_record_btrace_cpu_none): New.
10279 (cmd_set_record_btrace_cpu_auto): New.
10280 (cmd_set_record_btrace_cpu): New.
10281 (cmd_show_record_btrace_cpu): New.
10282 (_initialize_record_btrace): Initialize set/show record btrace cpu
10283 commands.
10284 * record-btrace.h (record_btrace_get_cpu): New.
10285
10286 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10287
10288 * record.c (set_record_command): Fix typo in message.
10289
10290 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10291
10292 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10293
10294 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10295
10296 * infrun.c (process_event_stop_test): Call
10297 gdbarch_in_indirect_branch_thunk.
10298 * gdbarch.sh (in_indirect_branch_thunk): New.
10299 * gdbarch.c: Regenerated.
10300 * gdbarch.h: Regenerated.
10301 * x86-tdep.h: New.
10302 * x86-tdep.c: New.
10303 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10304 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10305 (ALLDEPFILES): Add x86-tdep.c.
10306 * arch-utils.h (default_in_indirect_branch_thunk): New.
10307 * arch-utils.c (default_in_indirect_branch_thunk): New.
10308 * i386-tdep: Include x86-tdep.h.
10309 (i386_in_indirect_branch_thunk): New.
10310 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10311 function.
10312 * amd64-tdep: Include x86-tdep.h.
10313 (amd64_in_indirect_branch_thunk): New.
10314 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10315
10316 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10317
10318 PR gdb/23053
10319 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10320 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10321 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10322 regression.
10323
10324 2018-04-12 Tom Tromey <tom@tromey.com>
10325
10326 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10327 (rust_evaluate_subexp): Likewise.
10328
10329 2018-04-12 Pedro Alves <palves@redhat.com>
10330
10331 * procfs.c (procfs_detach): Make forward declaration's prototype
10332 match definition's protototype.
10333 (proc_get_LDT_entry): Remove stale do_cleanups call.
10334
10335 2018-04-12 Pedro Alves <palves@redhat.com>
10336
10337 * target.h (target_ops::to_has_exited): Delete.
10338 (target_has_exited): Delete.
10339 * target-delegates.c: Regenerate.
10340
10341 2018-04-11 Pedro Alves <palves@redhat.com>
10342
10343 * target.c (fileio_fh_t::t): Add comment.
10344 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10345 (target_fileio_close): Handle a NULL target.
10346 (invalidate_fileio_fh): New.
10347 (target_close): Call it.
10348 * remote.c (remote_hostio_send_command): No longer check whether
10349 remote_desc is open.
10350
10351 2018-04-11 Pedro Alves <palves@redhat.com>
10352
10353 * target.c (fileio_fh_t): Make it a named struct instead of a
10354 typedef.
10355 (fileio_fh_t::is_closed): New method.
10356 (DEF_VEC_O (fileio_fh_t)): Remove.
10357 (fileio_fhandles): Now a std::vector.
10358 (is_closed_fileio_fh): Delete.
10359 (acquire_fileio_fd): Adjust. Rename parameters.
10360 (release_fileio_fd): Adjust.
10361 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10362 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10363 (target_fileio_close): Adjust.
10364
10365 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10366
10367 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10368 index.
10369
10370 2018-04-10 Pedro Alves <palves@redhat.com>
10371
10372 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10373 (scoped_finish_thread_state): New class.
10374 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10375 cleanup.
10376 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10377 (fetch_inferior_event, normal_stop): Likewise.
10378 * thread.c (finish_thread_state_cleanup): Delete.
10379
10380 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10381 Pedro Alves <palves@redhat.com>
10382
10383 * value.c: Include "selftest.h" and "common/array-view.h".
10384 (struct range) <operator ==>: New.
10385 (test_ranges_contain): New.
10386 (check_ranges_vector): New.
10387 (test_insert_into_bit_range_vector): New.
10388 (_initialize_values): Register selftests.
10389 * common/array-view.h (operator==, operator!=): New.
10390
10391 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10392
10393 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10394 an iterator.
10395 * inline-frame.c: Include <algorithm>.
10396 (struct inline_state): Add constructor.
10397 (inline_state_s): Remove.
10398 (DEF_VEC_O(inline_state_s)): Remove.
10399 (inline_states): Change type to std::vector.
10400 (find_inline_frame_state): Adjust to std::vector.
10401 (allocate_inline_frame_state): Remove.
10402 (clear_inline_frame_state): Adjust to std::vector.
10403 (skip_inline_frames): Adjust to std::vector.
10404
10405 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10406
10407 * tracepoint.h (struct trace_state_variable): Add constructor.
10408 <name>: Change type to std::string.
10409 * tracepoint.c (tsv_s): Remove.
10410 (DEF_VEC_O(tsv_s)): Remove.
10411 (tvariables): Change to std::vector.
10412 (create_trace_state_variable): Adjust to std::vector.
10413 (find_trace_state_variable): Likewise.
10414 (find_trace_state_variable_by_number): Likewise.
10415 (delete_trace_state_variable): Likewise.
10416 (trace_variable_command): Adjust to std::string.
10417 (delete_trace_variable_command): Likewise.
10418 (tvariables_info_1): Adjust to std::vector.
10419 (save_trace_state_variables): Likewise.
10420 (start_tracing): Likewise.
10421 (merge_uploaded_trace_state_variables): Adjust to std::vector
10422 and std::string.
10423 * target.h (struct target_ops)
10424 <to_download_trace_state_variable>: Pass reference to
10425 trace_state_variable.
10426 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10427 * target-delegates.c: Re-generate.
10428 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10429 (mi_tsv_deleted): Likewise.
10430 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10431 * remote.c (remote_download_trace_state_variable): Change
10432 pointer to reference and adjust.
10433 * make-target-delegates (parse_argtypes): Handle references.
10434 (write_function_header): Likewise.
10435 (munge_type): Likewise.
10436
10437 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10438
10439 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10440 string_view-selftests.c.
10441 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10442 testsuite.
10443 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10444 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10445 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10446 * unittests/basic_string_view/element_access/char/1.cc:
10447 Likewise.
10448 * unittests/basic_string_view/element_access/char/empty.cc:
10449 Likewise.
10450 * unittests/basic_string_view/element_access/char/front_back.cc:
10451 Likewise.
10452 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10453 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10454 Likewise.
10455 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10456 Likewise.
10457 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10458 Likewise.
10459 * unittests/basic_string_view/operations/compare/char/1.cc:
10460 Likewise.
10461 * unittests/basic_string_view/operations/compare/char/13650.cc:
10462 Likewise.
10463 * unittests/basic_string_view/operations/copy/char/1.cc:
10464 Likewise.
10465 * unittests/basic_string_view/operations/data/char/1.cc:
10466 Likewise.
10467 * unittests/basic_string_view/operations/find/char/1.cc:
10468 Likewise.
10469 * unittests/basic_string_view/operations/find/char/2.cc:
10470 Likewise.
10471 * unittests/basic_string_view/operations/find/char/3.cc:
10472 Likewise.
10473 * unittests/basic_string_view/operations/find/char/4.cc:
10474 Likewise.
10475 * unittests/basic_string_view/operations/rfind/char/1.cc:
10476 Likewise.
10477 * unittests/basic_string_view/operations/rfind/char/2.cc:
10478 Likewise.
10479 * unittests/basic_string_view/operations/rfind/char/3.cc:
10480 Likewise.
10481 * unittests/basic_string_view/operations/substr/char/1.cc:
10482 Likewise.
10483 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10484 * unittests/string_view-selftests.c: New file.
10485
10486 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10487
10488 * unittests/basic_string_view/capacity/1.cc: New file.
10489 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10490 * unittests/basic_string_view/cons/char/1.cc: New file.
10491 * unittests/basic_string_view/cons/char/2.cc: New file.
10492 * unittests/basic_string_view/cons/char/3.cc: New file.
10493 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10494 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10495 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10496 * unittests/basic_string_view/element_access/char/1.cc: New file.
10497 * unittests/basic_string_view/element_access/char/2.cc: New file.
10498 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10499 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10500 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10501 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10502 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10503 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10504 * unittests/basic_string_view/include.cc: New file.
10505 * unittests/basic_string_view/inserters/char/1.cc: New file.
10506 * unittests/basic_string_view/inserters/char/2.cc: New file.
10507 * unittests/basic_string_view/inserters/char/3.cc: New file.
10508 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10509 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10510 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10511 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10512 * unittests/basic_string_view/literals/types.cc: New file.
10513 * unittests/basic_string_view/literals/values.cc: New file.
10514 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10515 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10516 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10517 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10518 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10519 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10520 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10521 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10522 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10523 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10524 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10525 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10526 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10527 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10528 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10529 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10530 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10531 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10532 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10533 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10534 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10535 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10536 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10537 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10538 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10539 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10540 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10541 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10542 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10543 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10544 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10545 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10546 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10547 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10548 * unittests/basic_string_view/operators/char/2.cc: New file.
10549 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10550 * unittests/basic_string_view/range_access/char/1.cc: New file.
10551 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10552 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10553 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10554 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10555 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10556 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10557 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10558 * unittests/basic_string_view/typedefs.cc: New file.
10559 * unittests/basic_string_view/types/1.cc: New file.
10560
10561 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10562
10563 * common/gdb_string_view.h: Remove libstdc++ implementation
10564 details, adjust to gdb reality.
10565 * common/gdb_string_view.tcc: Likewise.
10566 * cli/cli-script.c (struct string_view): Remove.
10567 (user_args) <m_args>: Change element type to gdb::string_view.
10568 (user_args::insert_args): Adjust.
10569
10570 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10571
10572 * common/gdb_string_view.h: New file.
10573 * common/gdb_string_view.tcc: New file.
10574
10575 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10576
10577 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10578 * configure: Re-generate.
10579
10580 2018-04-09 Pedro Alves <palves@redhat.com>
10581
10582 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10583 (set_target_gdbarch): Call
10584 gdb::observers::architecture_changed.notify instead of
10585 observer_notify_architecture_changed.
10586
10587 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10588
10589 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10590 (do_restore_current_traceframe_cleanup): Remove.
10591 (restore_current_traceframe_cleanup_dtor): Remove.
10592 (make_cleanup_restore_current_traceframe): Remove.
10593 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10594 New.
10595 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10596 * infrun.c (fetch_inferior_event): Use
10597 scoped_restore_current_traceframe.
10598
10599 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10600
10601 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10602 Remove.
10603 <n_allocated_type_units>: Remove.
10604 <all_type_units>: Change to std::vector.
10605 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10606 to std::vector change.
10607 (dwarf2_per_objfile::get_cutu): Likewise.
10608 (dwarf2_per_objfile::get_tu): Likewise.
10609 (create_signatured_type_table_from_index): Likewise.
10610 (create_signatured_type_table_from_debug_names): Likewise.
10611 (dw2_symtab_iter_next): Likewise.
10612 (dw2_print_stats): Likewise.
10613 (dw2_expand_all_symtabs): Likewise.
10614 (dw2_expand_marked_cus): Likewise.
10615 (dw2_debug_names_iterator::next): Likewise.
10616 (dwarf2_initialize_objfile): Likewise.
10617 (add_signatured_type_cu_to_table): Likewise.
10618 (create_all_type_units): Likewise.
10619 (add_type_unit): Likewise.
10620 (struct tu_abbrev_offset): Add constructor.
10621 (build_type_psymtabs_1): Adjust to std::vector change.
10622 (print_tu_stats): Likewise.
10623 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10624 (write_debug_names): Likewise.
10625
10626 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10627
10628 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10629 Make an std::vector.
10630 <n_comp_units>: Remove.
10631 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10632 to std::vector change.
10633 (dwarf2_per_objfile::get_cutu): Likewise.
10634 (dwarf2_per_objfile::get_cu): Likewise.
10635 (create_cus_from_index): Likewise.
10636 (create_addrmap_from_index): Likewise.
10637 (create_addrmap_from_aranges): Likewise.
10638 (dwarf2_read_index): Likewise.
10639 (dw2_find_last_source_symtab): Likewise.
10640 (dw2_map_symtabs_matching_filename): Likewise.
10641 (dw2_symtab_iter_next): Likewise.
10642 (dw2_print_stats): Likewise.
10643 (dw2_expand_all_symtabs): Likewise.
10644 (dw2_expand_symtabs_with_fullname): Likewise.
10645 (dw2_expand_marked_cus): Likewise.
10646 (dw2_map_symbol_filenames): Likewise.
10647 (create_cus_from_debug_names): Likewise.
10648 (dwarf2_read_debug_names): Likewise.
10649 (dw2_debug_names_iterator::next): Likewise.
10650 (dwarf2_initialize_objfile): Likewise.
10651 (set_partial_user): Likewise.
10652 (dwarf2_build_psymtabs_hard): Likewise.
10653 (read_comp_units_from_section): Remove arguments, adjust to
10654 std::vector change.
10655 (create_all_comp_units): Adjust to std::vector and
10656 read_comp_units_from_section changes.
10657 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10658 change.
10659 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10660 (psyms_seen_size): Likewise.
10661 (write_gdbindex): Likewise.
10662 (write_debug_names): Likewise.
10663
10664 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10665
10666 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10667 with dwarf2_per_objfile.
10668 (create_cus_from_index): Likewise.
10669 (create_signatured_type_table_from_index): Likewise.
10670 (dwarf2_read_index): Likewise.
10671 (dwarf2_initialize_objfile): Likewise.
10672 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10673 per_cu rather than get_dwarf2_per_objfile.
10674
10675 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10676
10677 * dwarf2read.h (struct signatured_type): Forward declare.
10678 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10679 New methods.
10680 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10681 (dw2_get_cutu): ...this.
10682 (dwarf2_per_objfile::get_cu): Rename from...
10683 (dw2_get_cu): ...this.
10684 (dwarf2_per_objfile::get_tu): New.
10685 (create_addrmap_from_index): Adjust.
10686 (create_addrmap_from_aranges): Adjust.
10687 (dw2_find_last_source_symtab): Adjust.
10688 (dw2_map_symtabs_matching_filename): Adjust.
10689 (dw2_symtab_iter_next): Adjust.
10690 (dw2_print_stats): Adjust.
10691 (dw2_expand_all_symtabs): Adjust.
10692 (dw2_expand_symtabs_with_fullname): Adjust.
10693 (dw2_expand_marked_cus): Adjust.
10694 (dw_expand_symtabs_matching_file_matcher): Adjust.
10695 (dw2_map_symbol_filenames): Adjust.
10696 (dw2_debug_names_iterator::next): Adjust.
10697 (dwarf2_initialize_objfile): Adjust.
10698 (set_partial_user): Adjust.
10699 (dwarf2_build_psymtabs_hard): Adjust.
10700
10701 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10702
10703 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10704 Remove unused variables.
10705 (dw2_map_symtabs_matching_filename): Likewise.
10706 (dwarf2_record_block_ranges): Likewise.
10707 (dwarf2_read_addr_index): Likewise.
10708 (follow_die_offset): Likewise.
10709
10710 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10711
10712 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10713 to symbol_file_add_main.
10714
10715 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10716
10717 PR mi/22299
10718 * mi/mi-console.c (do_fputc_async_safe): New.
10719 (mi_console_file::write_async_safe): New.
10720 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10721 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10722 New.
10723 * ui-file.c (ui_file::putstrn): Adjust call to
10724 fputstrn_unfiltered.
10725 * utils.c (printchar): Replace do_fputs and do_fprintf
10726 parameters by do_fputc.
10727 (fputstr_filtered): Adjust call to printchar.
10728 (fputstr_unfiltered): Likewise.
10729 (fputstrn_filtered): Likewise.
10730 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10731 printchar.
10732 * utils.h (do_fputc_ftype): New typedef.
10733 (fputstrn_unfiltered): Add do_fputc parameter.
10734
10735 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10736
10737 * regformats/i386/i386-avx.dat: Remove.
10738
10739 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10740
10741 PR gdb/22979
10742 * amd64-tdep.c (amd64_none_init_abi): New function.
10743 (amd64_x32_none_init_abi): New function.
10744 (_initialize_amd64_tdep): Register handlers for x86-64 and
10745 x64_32 with GDB_OSABI_NONE.
10746 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10747 GDB_OSABI_NONE osabi.
10748
10749 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10750
10751 PR gdb/22980
10752 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10753 GDB_OSABI_NONE.
10754 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10755 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10756
10757 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10758
10759 * common/byte-vector.h (char_vector): New type.
10760 * target.h (target_read_alloc): Return
10761 gdb::optional<byte_vector>.
10762 (target_read_stralloc): Return gdb::optional<char_vector>.
10763 (target_get_osdata): Return gdb::optional<char_vector>.
10764 * target.c (target_read_alloc_1): Templatize. Replacement
10765 manual memory management with vector.
10766 (target_read_alloc): Change return type, adjust.
10767 (target_read_stralloc): Change return type, adjust.
10768 (target_get_osdata): Change return type, adjust.
10769 * auxv.c (struct auxv_info) <length>: Remove.
10770 <data>: Change type to gdb::optional<byte_vector>.
10771 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10772 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10773 (target_auxv_search): Adjust.
10774 (fprint_target_auxv): Adjust.
10775 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10776 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10777 (linux_make_corefile_notes): Adjust.
10778 * osdata.c (get_osdata): Adjust.
10779 * remote.c (remote_get_threads_with_qxfer): Adjust.
10780 (remote_memory_map): Adjust.
10781 (remote_traceframe_info): Adjust.
10782 (btrace_read_config): Adjust.
10783 (remote_read_btrace): Adjust.
10784 (remote_pid_to_exec_file): Adjust.
10785 * solib-aix.c (solib_aix_get_library_list): Adjust.
10786 * solib-dsbt.c (decode_loadmap): Don't free buf.
10787 (dsbt_get_initial_loadmaps): Adjust.
10788 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10789 * solib-target.c (solib_target_current_sos): Adjust.
10790 * tracepoint.c (sdata_make_value): Adjust.
10791 * xml-support.c (xinclude_start_include): Adjust.
10792 (xml_fetch_content_from_file): Adjust.
10793 * xml-support.h (xml_fetch_another): Change return type.
10794 (xml_fetch_content_from_file): Change return type.
10795 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10796 * xml-tdesc.c (file_read_description_xml): Adjust.
10797 (fetch_available_features_from_target): Change return type.
10798 (target_fetch_description_xml): Adjust.
10799 (target_read_description_xml): Adjust.
10800
10801 2018-04-06 Tom Tromey <tom@tromey.com>
10802
10803 * value.c (~value): Update.
10804 (struct value) <contents>: Now unique_xmalloc_ptr.
10805 (value_contents_bits_eq, allocate_value_contents)
10806 (value_contents_raw, value_contents_all_raw)
10807 (value_contents_for_printing, value_contents_for_printing_const)
10808 (set_value_enclosing_type): Update.
10809
10810 2018-04-06 Tom Tromey <tom@tromey.com>
10811
10812 * value.c (range_s): Remove typedef, VEC.
10813 (struct range): Add operator<.
10814 (range_lessthan): Remove.
10815 (ranges_contain): Change type.
10816 (~value): Update.
10817 (struct value) <unavailable, optimized_out>: Now std::vector.
10818 (value_entirely_available)
10819 (value_entirely_covered_by_range_vector)
10820 (value_entirely_unavailable, value_entirely_optimized_out):
10821 Update.
10822 (insert_into_bit_range_vector): Change argument type.
10823 (find_first_range_overlap): Likewise.
10824 (struct ranges_and_idx, value_contents_bits_eq)
10825 (require_not_optimized_out, require_available): Update.
10826 (ranges_copy_adjusted): Change argument types.
10827 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10828
10829 2018-04-06 Tom Tromey <tom@tromey.com>
10830
10831 * value.c (~value): Update.
10832 (struct value) <parent>: Now a value_ref_ptr.
10833 (value_parent, set_value_parent, value_address, value_copy):
10834 Update.
10835
10836 2018-04-06 Tom Tromey <tom@tromey.com>
10837
10838 * value.c (struct value): Add constructor, destructor, and member
10839 initializers.
10840 (allocate_value_lazy, value_decref): Update.
10841
10842 2018-04-06 Tom Tromey <tom@tromey.com>
10843
10844 * value.c (struct value) <released, next>: Remove.
10845 (all_values): Now a std::vector.
10846 (allocate_value_lazy): Update.
10847 (value_next): Remove.
10848 (value_mark, value_free_to_mark, release_value)
10849 (value_release_to_mark): Update.
10850
10851 2018-04-06 Tom Tromey <tom@tromey.com>
10852
10853 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10854 (free_value_chain): Remove.
10855 * value.c (free_value_chain): Remove.
10856 (value_release_to_mark): Return a std::vector.
10857 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10858 std::vector.
10859 (check_condition): Update.
10860 * eval.c (fetch_subexp_value): Change "val_chain" to a
10861 std::vector.
10862 * breakpoint.c (update_watchpoint): Update.
10863 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10864
10865 2018-04-06 Tom Tromey <tom@tromey.com>
10866
10867 * value.h (free_all_values): Remove.
10868 * value.c (free_all_values): Remove.
10869
10870 2018-04-06 Tom Tromey <tom@tromey.com>
10871
10872 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10873 (value_history_chain, value_history_count): Remove.
10874 (value_history): New global.
10875 (record_latest_value, access_value_history, show_values)
10876 (preserve_values): Update.
10877
10878 2018-04-06 Tom Tromey <tom@tromey.com>
10879
10880 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10881 * varobj.c (varobj_set_display_format, varobj_set_value)
10882 (install_default_visualizer, construct_visualizer)
10883 (install_new_value, ~varobj, varobj_get_value_type)
10884 (my_value_of_variable, varobj_editable_p): Update.
10885 * c-varobj.c (c_describe_child, c_value_of_variable)
10886 (cplus_number_of_children, cplus_describe_child): Update.
10887 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10888 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10889 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10890
10891 2018-04-06 Tom Tromey <tom@tromey.com>
10892
10893 * printcmd.c (last_examine_address): Change type to
10894 value_ref_ptr.
10895 (do_examine, x_command): Update.
10896
10897 2018-04-06 Tom Tromey <tom@tromey.com>
10898
10899 * value.c (release_value): Update.
10900 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10901 (struct bpstats) <val>: Now a value_ref_ptr.
10902 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10903 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10904 (~watchpoint, print_it_watchpoint, watch_command_1)
10905 (invalidate_bp_value_on_memory_change): Update.
10906
10907 2018-04-06 Tom Tromey <tom@tromey.com>
10908
10909 * varobj.c (varobj_clear_saved_item)
10910 (update_dynamic_varobj_children, install_new_value, ~varobj):
10911 Update.
10912 * value.h (value_incref): Move declaration earlier.
10913 (value_decref): Rename from value_free.
10914 (struct value_ref_policy): New.
10915 (value_ref_ptr): New typedef.
10916 (struct value_deleter): Remove.
10917 (gdb_value_up): Remove typedef.
10918 (release_value): Change return type.
10919 (release_value_or_incref): Remove.
10920 * value.c (set_value_parent): Update.
10921 (value_incref): Change return type.
10922 (value_decref): Rename from value_free.
10923 (value_free_to_mark, free_all_values, free_value_chain): Update.
10924 (release_value): Return value_ref_ptr.
10925 (release_value_or_incref): Remove.
10926 (record_latest_value, set_internalvar, clear_internalvar):
10927 Update.
10928 * stack.c (info_frame_command): Don't call value_free.
10929 * python/py-value.c (valpy_dealloc, valpy_new)
10930 (value_to_value_object): Update.
10931 * printcmd.c (do_examine): Update.
10932 * opencl-lang.c (lval_func_free_closure): Update.
10933 * mi/mi-main.c (register_changed_p): Don't call value_free.
10934 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10935 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10936 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10937 value_free.
10938 * guile/scm-value.c (vlscm_free_value_smob)
10939 (vlscm_scm_from_value): Update.
10940 * frame.c (frame_register_unwind, frame_unwind_register_signed)
10941 (frame_unwind_register_unsigned, get_frame_register_bytes)
10942 (put_frame_register_bytes): Don't call value_free.
10943 * findvar.c (address_from_register): Don't call value_free.
10944 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10945 * dwarf2loc.c (entry_data_value_free_closure)
10946 (value_of_dwarf_reg_entry, free_pieced_value_closure)
10947 (dwarf2_evaluate_loc_desc_full): Update.
10948 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10949 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10950 (~watchpoint, watch_command_1)
10951 (invalidate_bp_value_on_memory_change): Update.
10952 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10953
10954 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
10955
10956 PR gdb/23022
10957 * warning.m4: Add -Wno-error=deprecated-register.
10958 * configure: Re-generate.
10959
10960 2018-04-05 Tom Tromey <tom@tromey.com>
10961
10962 * linespec.h: Remove include of "vec.h".
10963
10964 2018-04-05 Tom Tromey <tom@tromey.com>
10965
10966 * linespec.c (typep): Remove typedef.
10967 (find_methods, find_superclass_methods): Take a std::vector.
10968 (find_method): Use std::vector.
10969
10970 2018-04-05 Tom Tromey <tom@tromey.com>
10971
10972 * utils.c (compare_strings): Remove.
10973 * utils.h (compare_strings): Remove.
10974 * objc-lang.h (find_imps): Update.
10975 * objc-lang.c (find_methods): Take a std::vector.
10976 (uniquify_strings, find_imps): Likewise.
10977 * linespec.c (find_methods): Take a std::vector.
10978 (decode_objc): Use std::vector.
10979 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10980 a std::vector.
10981 (find_method, find_function_symbols): Use std::vector.
10982
10983 2018-04-05 Tom Tromey <tom@tromey.com>
10984
10985 * completer.c (completion_tracker::completion_tracker): Remove
10986 cast.
10987 (completion_tracker::discard_completions): Likewise.
10988 * breakpoint.c (ambiguous_names_p): Remove cast.
10989 * ada-lang.c (_initialize_ada_language): Remove cast.
10990 * utils.h (streq): Update.
10991 (streq_hash): Add new declaration.
10992 * utils.c (streq): Return bool.
10993 (streq_hash): New function.
10994
10995 2018-04-05 Tom Tromey <tom@tromey.com>
10996
10997 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10998 Remove a string copy.
10999
11000 2018-04-05 Tom Tromey <tom@tromey.com>
11001
11002 * linespec.c (filter_results): Use std::vector.
11003 (decode_line_2, decode_line_full): Update.
11004
11005 2018-04-05 Tom Tromey <tom@tromey.com>
11006
11007 * linespec.c (canonical_to_fullform): Return std::string.
11008 (filter_results): Update.
11009 (struct decode_line_2_item): Add constructor.
11010 <fullform, displayform>: Now std::string.
11011 (decode_line_2_compare_items): Now a std::sort comparator.
11012 (decode_line_2): Update.
11013
11014 2018-04-05 Tom Tromey <tom@tromey.com>
11015
11016 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11017 (unexpected_linespec_error): Update.
11018 (linespec_parse_basic, parse_linespec): Update.
11019
11020 2018-04-05 Tom Tromey <tom@tromey.com>
11021
11022 * linespec.c (linespec_parse_basic): Reindent.
11023
11024 2018-04-05 Tom Tromey <tom@tromey.com>
11025
11026 * minsyms.h (iterate_over_minimal_symbols): Update.
11027 * minsyms.c (iterate_over_minimal_symbols): Take a
11028 gdb::function_view.
11029 * linespec.c (struct collect_minsyms): Remove.
11030 (compare_msyms): Now a std::sort comparator.
11031 (add_minsym): Add parameters.
11032 (search_minsyms_for_name): Update. Use std::vector.
11033
11034 2018-04-03 Tom Tromey <tom@tromey.com>
11035
11036 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11037 gdb::byte_vector.
11038
11039 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11040
11041 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11042
11043 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11044
11045 PR gdb/16959
11046 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11047 printing static type.
11048
11049 2018-04-01 Tom Tromey <tom@tromey.com>
11050
11051 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11052 (rs6000_xfer_shared_libraries): Update.
11053
11054 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11055
11056 * common/gdb_vecs.h (char_ptr): Remove.
11057 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11058
11059 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11060
11061 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11062 with std::vector.
11063 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11064
11065 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11066
11067 * tracepoint.h (struct uploaded_tp): Initialize fields.
11068 <actions, step_actions, cmd_strings>: Change type to
11069 std::vector<char *>.
11070 * tracepoint.c (get_uploaded_tp): Allocate with new.
11071 (free_uploaded_tps): Free with delete.
11072 (parse_tracepoint_definition): Adjust to std::vector change.
11073 * breakpoint.c (read_uploaded_action): Likewise.
11074 (create_tracepoint_from_upload): Likewise.
11075 * ctf.c (ctf_write_uploaded_tp): Likewise.
11076 (SET_ARRAY_FIELD): Likewise.
11077 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11078
11079 2018-03-30 Tom Tromey <tom@tromey.com>
11080
11081 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11082 std::unique_ptr.
11083 (svr4_keep_data_in_core): Update.
11084 (svr4_read_so_list): Update.
11085
11086 2018-03-30 Tom Tromey <tom@tromey.com>
11087
11088 * windows-nat.c (handle_output_debug_string, handle_exception):
11089 Update.
11090 * target.h (target_read_string): Update.
11091 * target.c (target_read_string): Change "string" to
11092 unique_xmalloc_ptr.
11093 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11094 Update.
11095 * solib-frv.c (frv_current_sos): Update.
11096 * solib-dsbt.c (dsbt_current_sos): Update.
11097 * solib-darwin.c (darwin_current_sos): Update.
11098 * linux-thread-db.c (inferior_has_bug): Update.
11099 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11100 Update. Remove alloca.
11101 * ada-lang.c (ada_main_name): Update.
11102
11103 2018-03-30 Tom Tromey <tom@tromey.com>
11104
11105 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11106 (struct dwo_file_deleter): New.
11107 (dwo_file_up): New typedef.
11108 (open_and_init_dwo_file): Use dwo_file_up.
11109 (free_dwo_file_cleanup): Remove.
11110
11111 2018-03-30 Tom Tromey <tom@tromey.com>
11112
11113 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11114 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11115
11116 2018-03-30 Tom Tromey <tom@tromey.com>
11117
11118 * dwarf2read.c (class free_cached_comp_units): New class.
11119 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11120 (free_cached_comp_units): Remove function.
11121
11122 2018-03-30 Tom Tromey <tom@tromey.com>
11123
11124 * utils.h (make_cleanup_unpush_target): Remove.
11125 * inf-ptrace.c (struct target_unpusher): New.
11126 (target_unpush_up) New typedef.
11127 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11128 target_unpush_up.
11129 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11130
11131 2018-03-27 Tom Tromey <tom@tromey.com>
11132
11133 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11134
11135 2018-03-27 Pedro Alves <palves@redhat.com>
11136 Tom Tromey <tom@tromey.com>
11137
11138 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11139 destructor. Now a class.
11140 (gdb_readline_wrapper_cleanup): Remove function.
11141 (gdb_readline_wrapper): Remove cleanups.
11142
11143 2018-03-27 Tom Tromey <tom@tromey.com>
11144
11145 * typeprint.h (struct type_print_options) <local_typedefs,
11146 global_typedefs>: Remove "struct" keyword.
11147 (class typedef_hash_table): New class.
11148 (recursively_update_typedef_hash, add_template_parameters)
11149 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11150 (find_typedef_in_hash): Don't declare.
11151 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11152 (typedef_hash_table::recursively_update): Rename from
11153 recursively_update_typedef_hash. Now a member.
11154 (typedef_hash_table::add_template_parameters): Rename from
11155 add_template_parameters. Now a member.
11156 (typedef_hash_table::typedef_hash_table): Now a constructor;
11157 rename from create_typedef_hash.
11158 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11159 rename from free_typedef_hash.
11160 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11161 (do_free_global_table): Remove.
11162 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11163 from copy_type_recursive.
11164 (create_global_typedef_table): Remove.
11165 (typedef_hash_table::find_global_typedef): Now a member of
11166 typedef_hash_table.
11167 (typedef_hash_table::find_typedef): Rename from
11168 find_typedef_in_hash; now a member.
11169 (whatis_exp): Update.
11170 * extension.h (struct ext_lang_type_printers): Add constructor and
11171 destructor.
11172 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11173 declare.
11174 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11175 Now a constructor; rename from start_ext_lang_type_printers.
11176 (ext_lang_type_printers): Now a destructor; rename from
11177 free_ext_lang_type_printers.
11178 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11179 Update.
11180 (c_type_print_base_struct_union): Update. Remove cleanups.
11181
11182 2018-03-27 Tom Tromey <tom@tromey.com>
11183
11184 * dwarf-index-write.c: Include <cmath>.
11185
11186 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11187
11188 * NEWS: Add entry describing new "set|show varsize-limit" command.
11189 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11190 command.
11191 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11192 "set variable".
11193
11194 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11195
11196 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11197 dwarf-index-write.c
11198 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11199 * dwarf-index-common.c: New file.
11200 * dwarf-index-common.h: New file.
11201 * dwarf-index-write.c: New file.
11202 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11203 (struct dwarf2_section_info): Move from here.
11204 (dwarf2_section_info_def): Likewise.
11205 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11206 (offset_type): Likewise.
11207 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11208 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11209 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11210 (byte_swap): Likewise.
11211 (MAYBE_SWAP): Likewise.
11212 (dwarf2_per_cu_ptr): Likewise.
11213 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11214 (struct tu_stats): Likewise.
11215 (struct dwarf2_per_objfile): Likewise.
11216 (struct dwarf2_per_cu_data): Likewise.
11217 (struct signatured_type): Likewise.
11218 (sig_type_ptr): Likewise.
11219 (DEF_VEC_P (sig_type_ptr)): Likewise.
11220 (INDEX4_SUFFIX): Likewise.
11221 (INDEX5_SUFFIX): Likewise.
11222 (DEBUG_STR_SUFFIX): Likewise.
11223 (dwarf2_read_section): Make non-static.
11224 (mapped_index_string_hash): Move from here.
11225 (dwarf5_djb_hash): Likewise.
11226 (file_write): Likewise.
11227 (class data_buf): Likewise.
11228 (struct symtab_index_entry): Likewise.
11229 (struct mapped_symtab): Likewise.
11230 (find_slot): Likewise.
11231 (hash_expand): Likewise.
11232 (add_index_entry): Likewise.
11233 (uniquify_cu_indices): Likewise.
11234 (class c_str_view): Likewise.
11235 (class c_str_view_hasher): Likewise.
11236 (class vector_hasher): Likewise.
11237 (write_hash_table): Likewise.
11238 (psym_index_map): Likewise.
11239 (struct addrmap_index_data): Likewise.
11240 (add_address_entry): Likewise.
11241 (add_address_entry_worker): Likewise.
11242 (write_address_map): Likewise.
11243 (symbol_kind): Likewise.
11244 (write_psymbols): Likewise.
11245 (struct signatured_type_index_data): Likewise.
11246 (write_one_signatured_type): Likewise.
11247 (recursively_count_psymbols): Likewise.
11248 (recursively_write_psymbols): Likewise.
11249 (class debug_names): Likewise.
11250 (check_dwarf64_offsets): Likewise.
11251 (psyms_seen_size): Likewise.
11252 (write_gdbindex): Likewise.
11253 (write_debug_names): Likewise.
11254 (assert_file_size): Likewise.
11255 (write_psymtabs_to_index): Likewise.
11256 (save_gdb_index_command): Likewise.
11257 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11258 command.
11259 * dwarf2read.h: New file.
11260
11261 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11262
11263 PR gdb/22670
11264 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11265 symbol name if the CU's language stores symbol names in linkage
11266 format.
11267 * language.h (struct language_defn)
11268 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11269 all instances of this struct.
11270
11271 2018-03-26 Tom Tromey <tom@tromey.com>
11272
11273 * stack.c (backtrace_command_1): Remove verbose code.
11274
11275 2018-03-26 Tom Tromey <tom@tromey.com>
11276
11277 * python/py-framefilter.c (py_print_type): Don't catch
11278 exceptions. Return void.
11279 (py_print_value): Likewise.
11280 (py_print_single_arg): Likewise.
11281 (enumerate_args): Don't catch exceptions.
11282 (py_print_args): Likewise.
11283 (py_print_frame): Likewise.
11284 (gdbpy_apply_frame_filter): Catch exceptions here.
11285
11286 2018-03-26 Tom Tromey <tom@tromey.com>
11287
11288 * stack.c (_initialize_stack): Remove trailing newlines from help
11289 text. Add "Usage" line to "backtrace" help.
11290
11291 2018-03-26 Tom Tromey <tom@tromey.com>
11292
11293 PR python/16486:
11294 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11295
11296 2018-03-26 Tom Tromey <tom@tromey.com>
11297
11298 * python/py-framefilter.c (py_print_single_arg): Return
11299 EXT_LANG_BT_ERROR from catch.
11300
11301 2018-03-26 Tom Tromey <tom@tromey.com>
11302
11303 PR backtrace/15584:
11304 * stack.c (backtrace_command_1): Move some code into no-filters
11305 "if".
11306
11307 2018-03-26 Tom Tromey <tom@tromey.com>
11308
11309 * python/py-framefilter.c (throw_quit_or_print_exception): New
11310 function.
11311 (gdbpy_apply_frame_filter): Use it.
11312
11313 2018-03-26 Tom Tromey <tom@tromey.com>
11314
11315 PR cli/17716:
11316 * python/py-framefilter.c (py_print_type, py_print_value)
11317 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11318 RETURN_MASK_ERROR.
11319
11320 2018-03-26 Tom Tromey <tom@tromey.com>
11321
11322 * python/py-framefilter.c (enumerate_args): Use
11323 gdb::unique_xmalloc_ptr.
11324
11325 2018-03-26 Tom Tromey <tom@tromey.com>
11326
11327 * python/py-framefilter.c (py_print_frame): Return
11328 EXT_LANG_BT_OK.
11329 (gdbpy_apply_frame_filter): Update comment.
11330 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11331 Remove.
11332 <EXT_LANG_BT_NO_FILTERS>: Change value.
11333
11334 2018-03-26 Tom Tromey <tom@tromey.com>
11335
11336 PR backtrace/15582:
11337 * stack.c (backtrace_command): Parse "hide" argument.
11338 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11339 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11340 constant.
11341
11342 2018-03-26 Tom Tromey <tom@tromey.com>
11343
11344 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11345 add "flags".
11346 (backtrace_command): Remove "fulltrace", add "flags".
11347
11348 2018-03-26 Tom Tromey <tom@tromey.com>
11349
11350 * stack.c (backtrace_command): Rewrite command line parsing.
11351
11352 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11353
11354 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11355
11356 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11357
11358 * filename-seen-cache.h: Add include guard.
11359
11360 2018-03-26 Keith Seitz <keiths@redhat.com>
11361
11362 * symfile.c (place_section): Remove "struct" from section_addr_info
11363 in comment.
11364 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11365 "struct" keyword from section_addr_info.
11366
11367 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11368
11369 * regformats/regdef.h (reg): Add constructors.
11370
11371 2018-03-25 Pedro Alves <palves@redhat.com>
11372
11373 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11374 if then/else bodies in var_func_name extraction.
11375
11376 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11377
11378 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11379 lookup_minimal_symbol() to find symbol entry.
11380 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11381
11382 2018-03-23 Keith Seitz <keiths@redhat.com>
11383
11384 PR c++/22968
11385 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11386 nested type definitions for C++, too.
11387
11388 2018-03-23 Tom Tromey <tom@tromey.com>
11389
11390 * machoread.c (struct oso_el): Add a constructor. Don't define as
11391 a typedef.
11392 (macho_register_oso): Remove.
11393 (macho_symtab_read): Take a std::vector.
11394 (oso_el_compare_name): Now a std::sort comparator.
11395 (macho_symfile_read_all_oso): Take a std::vector.
11396 (macho_symfile_read): Use std::vector. Remove cleanups.
11397
11398 2018-03-22 Tom Tromey <tom@tromey.com>
11399
11400 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11401 (record_full_goto_bookmark): Use std::string.
11402
11403 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11404
11405 PR tdep/18295
11406 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11407 a single mask.
11408
11409 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11410
11411 * rs6000-tdep.c (store_insn_p): New function.
11412 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11413 and cr_reg to their unshifted values. Use store_insn_p to
11414 match LR saves using either R1 or fdata->alloca_reg. Use
11415 store_insn_p to match CR saves. Set alloca_reg_offset
11416 when alloca_reg and framep are set. Remove lr_reg shift
11417 when assigning to fdata->lr_register.
11418
11419 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11420
11421 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11422 command line args instead of emitting a warning.
11423
11424 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11425
11426 * tracepoint.h (struct static_tracepoint_marker): Initialize
11427 fields, define default constructor, move constructor and move
11428 assignment, disable the rest.
11429 <str_id, extra>: Make std::string.
11430 (release_static_tracepoint_marker): Remove.
11431 (free_current_marker): Remove.
11432 * tracepoint.c (free_current_marker): Remove.
11433 (parse_static_tracepoint_marker_definition): Adjust to
11434 std::string, use new hex2str overload.
11435 (release_static_tracepoint_marker): Remove.
11436 (print_one_static_tracepoint_marker): Get marker by reference
11437 and adjust to std::string.
11438 (info_static_tracepoint_markers_command): Adjust to std::vector
11439 changes
11440 * target.h (static_tracepoint_marker_p): Remove typedef.
11441 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11442 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11443 bool.
11444 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11445 * target-debug.h
11446 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11447 (target_debug_print_std_vector_static_tracepoint_marker): New.
11448 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11449 to...
11450 (target_debug_print_static_tracepoint_marker_p): ... this.
11451 * target-delegates.c: Re-generate.
11452 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11453 Make std::string.
11454 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11455 (decode_static_tracepoint_spec): Adjust to std::vector.
11456 (tracepoint_print_one_detail): Adjust to std::string.
11457 (strace_marker_decode_location): Adjust to std::string.
11458 (update_static_tracepoint): Adjust to std::string, remove call
11459 to release_static_tracepoint_marker.
11460 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11461 Adjust to std::vector.
11462 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11463 (remote_static_tracepoint_markers_by_strid): Adjust to
11464 std::vector.
11465 * common/rsp-low.h (hex2str): New overload with explicit count
11466 of bytes.
11467 * common/rsp-low.c (hex2str): New overload with explicit count
11468 of bytes.
11469 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11470 (_initialize_rsp_low_selftests): Add test_hex2str test.
11471 * unittests/tracepoint-selftests.c
11472 (test_parse_static_tracepoint_marker_definition): Adjust to
11473 std::string.
11474
11475 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11476
11477 * tracepoint.c (parse_static_tracepoint_marker_definition):
11478 Consider case where the definition is followed by more
11479 definitions.
11480 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11481 tracepoint-selftests.c.
11482 * unittests/tracepoint-selftests.c: New.
11483
11484 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11485
11486 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11487 Carvalho.
11488
11489 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11490
11491 * symtab.c (find_pc_sect_line): fixed indentation.
11492
11493 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11494
11495 * symtab.c (find_pc_sect_line): now uses binary search.
11496
11497 2018-03-19 Tom Tromey <tom@tromey.com>
11498
11499 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11500 "IDENT" production.
11501
11502 2018-03-19 Pedro Alves <palves@redhat.com>
11503 Tom Tromey <tom@tromey.com>
11504
11505 * unittests/observable-selftests.c: New file.
11506 * common/observable.h: New file.
11507 * observable.h: New file.
11508 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11509 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11510 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11511 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11512 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11513 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11514 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11515 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11516 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11517 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11518 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11519 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11520 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11521 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11522 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11523 tui/tui-interp.c, valops.c: Update all users.
11524 * tui/tui-hooks.c (tui_bp_created_observer)
11525 (tui_bp_deleted_observer, tui_bp_modified_observer)
11526 (tui_inferior_exit_observer, tui_before_prompt_observer)
11527 (tui_normal_stop_observer, tui_register_changed_observer):
11528 Remove.
11529 (tui_observers_token): New global.
11530 (attach_or_detach, tui_attach_detach_observers): New functions.
11531 (tui_install_hooks, tui_remove_hooks): Use
11532 tui_attach_detach_observers.
11533 * record-btrace.c (record_btrace_thread_observer): Remove.
11534 (record_btrace_thread_observer_token): New global.
11535 * observer.sh: Remove.
11536 * observer.c: Rename to observable.c.
11537 * observable.c (namespace gdb_observers): Define new objects.
11538 (observer_debug): Move into gdb_observers namespace.
11539 (struct observer, struct observer_list, xalloc_observer_list_node)
11540 (xfree_observer_list_node, generic_observer_attach)
11541 (generic_observer_detach, generic_observer_notify): Remove.
11542 (_initialize_observer): Update.
11543 Don't include observer.inc.
11544 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11545 (clean mostlyclean): Likewise.
11546 (observer.h, observer.inc): Remove targets.
11547 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11548 (COMMON_SFILES): Use observable.c, not observer.c.
11549 * .gitignore: Remove observer.h.
11550
11551 2018-03-18 Tom Tromey <tom@tromey.com>
11552
11553 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11554 gdb::def_vector.
11555 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11556
11557 2018-03-17 Tom Tromey <tom@tromey.com>
11558
11559 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11560
11561 2018-03-17 Tom Tromey <tom@tromey.com>
11562
11563 * target.c (class scoped_target_fd): New.
11564 (target_fileio_close_cleanup): Remove.
11565 (target_fileio_read_alloc_1): Use scoped_target_fd.
11566
11567 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11568
11569 * silent-rules.mk: New.
11570 * Makefile.in: Include silent-rules.mk
11571 (srcdir, VPATH, top_srcdir): Move up.
11572 (COMPILE): Add ECHO_CXX.
11573 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11574 (init.c): Add ECHO_INIT_C.
11575 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11576 (version.c): Add ECHO_GEN.
11577 (printcmd.o): Add ECHO_CXX.
11578 (target-float.o): Add ECHO_CXX.
11579 (ada-exp.o): Add ECHO_CXX.
11580 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11581 (insight$(EXEEXT)): Add ECHO_CXXLD.
11582 * gnulib/configure.ac: Add AM_SILENT_RULES.
11583 * gnulib/aclocal.m4: Re-generate.
11584 * gnulib/configure: Re-generate.
11585 * gnulib/import/Makefile.in: Re-generate.
11586
11587 2018-03-16 Tom Tromey <tom@tromey.com>
11588
11589 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11590 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11591 * utils.c (do_free_section_addr_info)
11592 (make_cleanup_free_section_addr_info): Remove.
11593 * symfile.h (struct other_sections): Add constructor.
11594 (struct section_addr_info): Remove.
11595 (section_addr_info): New typedef.
11596 (struct sym_fns) <sym_offsets>: Change type of parameter.
11597 (build_section_addr_info_from_objfile)
11598 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11599 (default_symfile_offsets, symbol_file_add)
11600 (symbol_file_add_from_bfd)
11601 (build_section_addr_info_from_section_table): Update.
11602 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11603 * symfile.c (alloc_section_addr_info): Remove.
11604 (build_section_addr_info_from_section_table): Change return type.
11605 Update.
11606 (build_section_addr_info_from_bfd)
11607 (build_section_addr_info_from_objfile): Likewise.
11608 (free_section_addr_info): Remove.
11609 (relative_addr_info_to_section_offsets): Change type of "addrs".
11610 (addrs_section_compar): Now a std::sort comparator.
11611 (addrs_section_sort): Change return type.
11612 (addr_info_make_relative): Change type of "addrs". Update.
11613 (default_symfile_offsets, syms_from_objfile_1)
11614 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11615 (symbol_file_add_separate): Update.
11616 (symbol_file_add): Change type of "addrs". Update.
11617 (add_symbol_file_command): Update. Remove cleanups.
11618 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11619 cleanups.
11620 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11621 * solib.c (solib_read_symbols): Update.
11622 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11623 * machoread.c (macho_symfile_offsets): Update.
11624 * jit.c (jit_bfd_try_read_symtab): Update.
11625
11626 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11627
11628 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11629 unittests/utils-selftests.c.
11630 * unittests/utils-selftests.c: New file.
11631
11632 2018-03-14 Tom Tromey <tom@tromey.com>
11633
11634 PR cli/14977:
11635 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11636 for NULL.
11637
11638 2018-03-14 Tom Tromey <tom@tromey.com>
11639
11640 PR cli/19918:
11641 * printcmd.c (printf_pointer): Allow "-" in format.
11642
11643 2018-03-14 Tom Tromey <tom@tromey.com>
11644
11645 * printcmd.c (_initialize_printcmd): Add usage to printf.
11646
11647 2018-03-14 Yao Qi <qiyao@sourceware.org>
11648
11649 * MAINTAINERS: Update my email address.
11650
11651 2018-03-13 Tom Tromey <tom@tromey.com>
11652
11653 * machoread.c (macho_check_dsym): Change filenamep to a
11654 std::string*.
11655 (macho_symfile_read): Update.
11656 * symfile.c (load_command): Use std::string.
11657
11658 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11659
11660 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11661 to error message string.
11662 (riscv_register_name): Use xsnprintf instead of sprintf.
11663 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11664 internal_error.
11665 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11666 error.
11667 (riscv_push_dummy_call): Likewise.
11668
11669 2018-03-12 Tom Tromey <tom@tromey.com>
11670
11671 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11672 Use gdb::byte_vector.
11673 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11674
11675 2018-03-12 Yao Qi <yao.qi@linaro.org>
11676
11677 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11678 parameter type to readable_regcache.
11679 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11680 the declaration.
11681
11682 2018-03-11 Tom Tromey <tom@tromey.com>
11683
11684 * dwarf2read.c (struct nextfield): Add initializers.
11685 (struct nextfnfield): Remove.
11686 (struct fnfieldlist): Add initializers. Remove "length" and
11687 "head", use std::vector.
11688 (struct decl_field_list): Remove.
11689 (struct field_info): Add initializers.
11690 <fields, baseclasses>: Now std::vector.
11691 <nbaseclasses, nfnfields, typedef_field_list_count,
11692 nested_types_list_count>: Remove.
11693 (dwarf2_add_field, dwarf2_add_type_defn)
11694 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11695 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11696 (process_structure_scope): Update.
11697
11698 2018-03-11 Tom Tromey <tom@tromey.com>
11699
11700 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11701 for use by std::sort.
11702 (build_type_psymtabs_1): Use std::vector.
11703
11704 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11705
11706 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11707 and LIBMPFR in the printed configuration.
11708
11709 2018-03-08 Tom Tromey <tom@tromey.com>
11710
11711 * source.c (get_filename_and_charpos): Use scoped_fd.
11712 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11713 (procfs_pidlist): Likewise.
11714 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11715 (iterate_over_mappings): Likewise.
11716
11717 2018-03-08 Tom Tromey <tom@tromey.com>
11718
11719 * infcall.c (struct call_return_meta_info)
11720 <stack_temporaries_enabled>: Remove.
11721 (get_call_return_value, call_function_by_hand_dummy): Update.
11722 * thread.c (disable_thread_stack_temporaries): Remove.
11723 (enable_thread_stack_temporaries): Remove.
11724 (thread_stack_temporaries_enabled_p): Return bool.
11725 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11726 (get_last_thread_stack_temporary): Update.
11727 * eval.c (evaluate_subexp): Update.
11728 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11729 class, not a function.
11730 (value_ptr, value_vec): Remove typedefs.
11731 (class thread_info) <stack_temporaries_enabled>: Now bool.
11732 <stack_temporaries>: Now a std::vector.
11733 (thread_stack_temporaries_enabled_p)
11734 (value_in_thread_stack_temporaries): Return bool.
11735
11736 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11737
11738 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11739 (getpkt_or_notif_sane_1): Likewise.
11740
11741 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11742
11743 * build-id.c (build_id_to_debug_bfd): Use std::string.
11744
11745 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11746
11747 * build-id.c (find_separate_debug_file_by_buildid): Return
11748 std::string.
11749 * build-id.h (find_separate_debug_file_by_buildid): Return
11750 std::string.
11751 * coffread.c (coff_symfile_read): Adjust to std::string.
11752 * elfread.c (elf_symfile_read): Adjust to std::string.
11753 * symfile.c (separate_debug_file_exists): Change parameter to
11754 std::string.
11755 (find_separate_debug_file): Return std::string.
11756 (find_separate_debug_file_by_debuglink): Return std::string.
11757 * symfile.h (find_separate_debug_file_by_debuglink): Return
11758 std::string.
11759
11760 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11761
11762 * common/xml-utils.c (xml_escape_text): Move code to...
11763 (xml_escape_text_append): ... this new function.
11764 * common/xml-utils.h (xml_escape_text_append): New declaration.
11765 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11766 New function.
11767 (_initialize_xml_utils): register test_xml_escape_text_append as
11768 a selftest.
11769
11770 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11771
11772 * defs.h: Remove MAX_REGISTER_SIZE.
11773 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11774 asserts.
11775 * python/py-unwind.c (pyuw_sniffer): Likewise.
11776
11777 2018-03-07 Tom Tromey <tom@tromey.com>
11778
11779 * linux-tdep.c (linux_info_proc): Update.
11780 * target.h (struct target_ops) <to_fileio_readlink>: Return
11781 optional<string>.
11782 (target_fileio_readlink): Return optional<string>.
11783 * remote.c (remote_hostio_readlink): Return optional<string>.
11784 * inf-child.c (inf_child_fileio_readlink): Return
11785 optional<string>.
11786 * target.c (target_fileio_readlink): Return optional<string>.
11787
11788 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11789
11790 * regcache.c (cooked_read_test): Add riscv to the list of
11791 architectures that have a save_reggroup.
11792
11793 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11794
11795 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11796 value is not a dynamic class object.
11797
11798 2018-03-06 Tom Tromey <tom@tromey.com>
11799
11800 * rust-exp.y: Formatting fixes.
11801
11802 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11803
11804 * riscv-tdep.c (riscv_register_name): Remove target description
11805 support.
11806 (riscv_gdbarch_init): Remove target description check.
11807
11808 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11809
11810 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11811 comment.
11812 * riscv-tdep.h: Likewise.
11813
11814 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11815
11816 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11817 (riscv_pseudo_register_write): Delete.
11818 (riscv_gdbarch_init): Remove all use of pseudo registers.
11819
11820 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11821
11822 * record-btrace.c (btrace_print_lines): Replace cleanup
11823 parameter with RAII equivalents.
11824 (btrace_insn_history): Replace cleanup with RAII equivalents.
11825 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11826 make_cleanup_ui_out_tuple_begin_end): Remove.
11827 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11828 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11829 make_cleanup_ui_out_list_begin_end): Remove.
11830
11831 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11832
11833 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11834 parameter types to std::vector. Use bool.
11835 (record_btrace_wait): Replace VEC(tp_t) with
11836 std::vector<thread_info *>.
11837 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11838
11839 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11840
11841 * record-btrace.c (record_btrace_disable_callback): Remove.
11842 (struct scoped_btrace_disable): New.
11843 (record_btrace_open): Use scoped_btrace_disable.
11844
11845 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11846
11847 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11848 reading values from registers.
11849
11850 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11851
11852 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11853 where appropriate.
11854
11855 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11856
11857 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11858 change parameter type. Use GDB's print functions, and use
11859 core_addr_to_string where appropriate.
11860 (riscv_push_dummy_call): Use core_addr_to_string where
11861 appropriate, update call to riscv_print_arg_location, and reindent
11862 a few lines.
11863 (riscv_return_value): Update call to riscv_print_arg_location.
11864
11865 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11866 Tim Newsome <tim@sifive.com>
11867 Albert Ou <a0u@eecs.berkeley.edu>
11868 Darius Rad <darius@bluespec.com>
11869
11870 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11871 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11872 (ALLDEPFILES): Add riscv-tdep.c
11873 * configure.tgt: Add riscv support.
11874 * riscv-tdep.c: New file.
11875 * riscv-tdep.h: New file.
11876 * NEWS: Mention new target.
11877 * MAINTAINERS: Add entry for riscv.
11878
11879 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11880
11881 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11882 fields within aggregates.
11883
11884 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11885
11886 * record-btrace.c (btrace_print_lines): Change type of flags to
11887 gdb_disassembly_flags.
11888
11889 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11890
11891 * fbsd-nat.c: Include "inf-ptrace.h".
11892 (USE_SIGTRAP_SIGINFO): Conditionally define.
11893 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11894 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11895 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11896 function.
11897 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11898 Likewise.
11899 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11900 Likewise.
11901 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11902 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11903 "supports_stopped_by_hw_breakpoint" target methods.
11904
11905 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11906
11907 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11908 * fbsd-nat.c (debug_fbsd_nat): New variable.
11909 (show_fbsd_nat_debug): New function.
11910 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11911 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11912
11913 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11914
11915 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11916 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11917 prototype.
11918 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11919 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11920 method.
11921
11922 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11923
11924 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11925 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11926
11927 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11928
11929 * charset.c (struct charset_vector): New.
11930 (charsets): Change type to charset_vector.
11931 (find_charset_names): Adjust.
11932 (add_one): Adjust.
11933 (_initialize_charset): Adjust.
11934
11935 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11936
11937 * progspace.h (struct program_space) <deleted_solibs>: Change
11938 type to std::vector<std::string>.
11939 * progspace.c (clear_program_space_solib_cache): Adjust.
11940 * breakpoint.c (print_solib_event): Adjust.
11941 (check_status_catch_solib): Adjust.
11942 * solib.c (update_solib_list): Adjust.
11943 * ui-out.h (class ui_out) <field_string>: New overload.
11944 * ui-out.c (ui_out::field_string): New overload.
11945
11946 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11947
11948 * progspace.h (struct program_space): Add constructor and
11949 destructor, initialize fields.
11950 (add_program_space): Remove.
11951 * progspace.c (add_program_space): Rename to...
11952 (program_space::program_space): ... this.
11953 (release_program_space): Rename to...
11954 (program_space::~program_space): ... this.
11955 (delete_program_space): Use delete to delete program_space.
11956 (initialize_progspace): Use new to allocate program_space.
11957 * inferior.c (add_inferior_with_spaces): Likewise.
11958 (clone_inferior_command): Likewise.
11959 * infrun.c (follow_fork_inferior): Likewise.
11960 (handle_vfork_child_exec_or_exit): Likewise.
11961
11962 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
11963
11964 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11965 (delim_string_to_char_ptr_vec): Return std::vector of
11966 gdb::unique_xmalloc_ptr.
11967 (dirnames_to_char_ptr_vec_append): Take std::vector of
11968 gdb::unique_xmalloc_ptr.
11969 (dirnames_to_char_ptr_vec): Return std::vector of
11970 gdb::unique_xmalloc_ptr.
11971 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11972 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11973 (delim_string_to_char_ptr_vec): Return an std::vector of
11974 gdb::unique_xmalloc_ptr, adjust the code.
11975 (dirnames_to_char_ptr_vec_append): Take an std::vector of
11976 gdb::unique_xmalloc_ptr, adjust the code.
11977 (dirnames_to_char_ptr_vec): Return an std::vector of
11978 gdb::unique_xmalloc_ptr, adjust the code.
11979 * auto-load.c (auto_load_safe_path_vec): Change type to
11980 std::vector of gdb::unique_xmalloc_ptr.
11981 (auto_load_expand_dir_vars): Return an std::vector of
11982 gdb::unique_xmalloc_ptr, adjust the code.
11983 (auto_load_safe_path_vec_update): Adjust.
11984 (filename_is_in_auto_load_safe_path_vec): Adjust.
11985 (auto_load_objfile_script_1): Adjust.
11986 * build-id.c (build_id_to_debug_bfd): Adjust.
11987 * linux-thread-db.c (thread_db_load_search): Adjust.
11988 * source.c (add_path): Adjust.
11989 (openp): Adjust.
11990 * symfile.c (find_separate_debug_file): Adjust.
11991 * utils.c (do_free_char_ptr_vec): Remove.
11992 (make_cleanup_free_char_ptr_vec): Remove.
11993
11994 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
11995
11996 PR gdb/22907
11997 * common/pathstuff.c: Conditionally include "<windows.h>".
11998
11999 2018-03-01 Georg Sauthoff <mail@georg.so>
12000
12001 PR gdb/22888
12002 * gcore.in: Quote variables and switch interpreter to bash.
12003
12004 2018-03-01 Tom Tromey <tom@tromey.com>
12005
12006 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12007 assertion. Add assertion for discriminant_index.
12008 (quirk_rust_enum): Use correct base type name in univariant case.
12009
12010 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12011
12012 * record.c (get_call_history_modifiers): Return a
12013 record_print_flags.
12014 (cmd_record_call_history): Adjust.
12015 * record-btrace.c (record_btrace_call_history): Adjust.
12016 (record_btrace_call_history_range): Adjust.
12017 (record_btrace_call_history_from): Adjust.
12018 * target-debug.h (target_debug_print_record_print_flags): New.
12019 * target-delegates.c: Re-generate.
12020 * target.c (target_call_history): Change flags type.
12021 (target_call_history_from): Likewise.
12022 (target_call_history_range): Likewise.
12023 * target.h (struct target_ops) <target_call_history>: Likewise.
12024 (target_call_history_from): Likewise.
12025 (target_call_history_range): Likewise.
12026
12027 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12028 Simon Marchi <simon.marchi@polymtl.ca>
12029
12030 * common/common-utils.c: Include "sys/stat.h".
12031 (is_regular_file): Move here from "source.c"; change return
12032 type to "bool".
12033 * common/common-utils.h (is_regular_file): New prototype.
12034 * common/pathstuff.c (contains_dir_separator): New function.
12035 * common/pathstuff.h (contains_dir_separator): New prototype.
12036 * source.c: Don't include "sys/stat.h".
12037 (is_regular_file): Move to "common/common-utils.c".
12038
12039 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12040
12041 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12042 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12043 * auto-load.c: Include "common/pathstuff.h".
12044 * common/common-def.h (current_directory): Move here.
12045 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12046 function.
12047 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12048 prototype.
12049 * common/pathstuff.c: New file.
12050 * common/pathstuff.h: New file.
12051 * compile/compile.c: Include "common/pathstuff.h".
12052 * defs.h (current_directory): Move to "common/common-defs.h".
12053 * dwarf2read.c: Include "common/pathstuff.h".
12054 * exec.c: Likewise.
12055 * guile/scm-safe-call.c: Likewise.
12056 * linux-thread-db.c: Likewise.
12057 * main.c: Likewise.
12058 * nto-tdep.c: Likewise.
12059 * objfiles.c: Likewise.
12060 * source.c: Likewise.
12061 * symtab.c: Likewise.
12062 * utils.c: Include "common/pathstuff.h".
12063 (gdb_realpath): Move to "common/pathstuff.c".
12064 (gdb_realpath_keepfile): Likewise.
12065 (gdb_abspath): Likewise.
12066 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12067 (gdb_realpath_keepfile): Likewise.
12068 (gdb_abspath): Likewise.
12069
12070 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12071
12072 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12073 wildcard process pid for super_resume for kernels with a
12074 specific bug.
12075
12076 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12077
12078 * compile/compile.c (get_args): Add additional comments
12079 explaining function.
12080
12081 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12082 Tom Tromey <tom@tromey.com>
12083
12084 * target.h (memory_write_request_s): Remove typedef. Don't define
12085 VEC.
12086 (target_write_memory_blocks): Change argument to std::vector.
12087 (struct memory_write_request): Add constructor.
12088 * target-memory.c (compare_block_starting_address): Return bool.
12089 Change argument types.
12090 (claim_memory): Change arguments to use std::vector.
12091 (split_regular_and_flash_blocks, blocks_to_erase)
12092 (compute_garbled_blocks): Likewise.
12093 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12094 (target_write_memory_blocks): Change argument to std::vector.
12095 * symfile.c (struct load_section_data): Add constructor and
12096 destructor. Use std::vector for "requests".
12097 (struct load_progress_data): Add initializers.
12098 (load_section_callback): Update. Use "new".
12099 (clear_memory_write_data): Remove.
12100 (generic_load): Update.
12101
12102 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12103
12104 * arch/aarch64.h: Use common/tdesc.h.
12105
12106 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12107
12108 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12109 architecture with a 64-bit ABI.
12110
12111 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12112
12113 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12114 ahead of target description loading.
12115
12116 2018-02-26 Tom Tromey <tom@tromey.com>
12117
12118 * stack.c (backtrace_command_1): Update.
12119 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12120 of "flags".
12121 * python/py-framefilter.c (py_print_frame)
12122 (gdbpy_apply_frame_filter): Change type of "flags".
12123 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12124 of "flags".
12125 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12126 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12127 * extension.h (enum frame_filter_flag): Rename from
12128 frame_filter_flags.
12129 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12130 (apply_ext_lang_frame_filter): Change type of "flags".
12131 * extension.c (apply_ext_lang_frame_filter): Change type of
12132 "flags".
12133 * extension-priv.h (struct extension_language_ops)
12134 <apply_frame_filter>: Change type of "flags".
12135
12136 2018-02-26 Tom Tromey <tom@tromey.com>
12137
12138 PR python/16497:
12139 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12140 off-by-one in py_end computation.
12141 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12142 PRINT_MORE_FRAMES.
12143 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12144 constant.
12145
12146 2018-02-26 Tom Tromey <tom@tromey.com>
12147
12148 * dwarf2read.c (struct variant_field): New.
12149 (struct nextfield) <variant>: New field.
12150 (dwarf2_add_field): Handle DW_TAG_variant_part.
12151 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12152 discriminated union.
12153 (read_structure_type): Handle DW_TAG_variant_part.
12154 (handle_struct_member_die): New function, extracted from
12155 process_structure_scope. Handle DW_TAG_variant.
12156 (process_structure_scope): Handle discriminated unions. Call
12157 handle_struct_member_die.
12158
12159 2018-02-26 Tom Tromey <tom@tromey.com>
12160
12161 * rust-lang.h (rust_last_path_segment): Declare.
12162 * rust-lang.c (rust_last_path_segment): Now public. Change
12163 contract.
12164 (struct disr_info): Remove.
12165 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12166 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12167 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12168 (rust_enum_p, rust_enum_variant): New function.
12169 (rust_underscore_fields): Remove "offset" parameter.
12170 (rust_print_enum): New function.
12171 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12172 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12173 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12174 enums.
12175 (rust_internal_print_type): New function, from rust_print_type.
12176 Remove enum code.
12177 (rust_print_type): Call rust_internal_print_type.
12178 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12179 Update enum handling.
12180 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12181 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12182 (rust_union_quirks): New functions.
12183 (process_full_comp_unit, process_full_type_unit): Call
12184 rust_union_quirks.
12185 (process_structure_scope): Update rust_unions if necessary.
12186
12187 2018-02-26 Tom Tromey <tom@tromey.com>
12188
12189 * value.h (value_union_variant): Declare.
12190 * valops.c (value_union_variant): New function.
12191 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12192 (struct discriminant_info): New.
12193 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12194 enumerator.
12195 (struct main_type) <flag_discriminated_union>: New field.
12196
12197 2018-02-26 Tom Tromey <tom@tromey.com>
12198
12199 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12200 unittests/unpack-selftests.c.
12201 * unittests/unpack-selftests.c: New file.
12202 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12203
12204 2018-02-26 Yao Qi <yao.qi@linaro.org>
12205
12206 * dwarf2read.c (struct partial_die_info) <read>: New method.
12207 (read_partial_die): Remove the declaration.
12208 (load_partial_dies): Update.
12209 (partial_die_info::partial_die_info):
12210 (read_partial_die): Change it to partial_die_info::read.
12211
12212 2018-02-26 Yao Qi <yao.qi@linaro.org>
12213
12214 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12215 (fixup_partial_die): Remove declaration.
12216 (scan_partial_symbols): Update.
12217 (partial_die_parent_scope): Likewise.
12218 (partial_die_full_name): Likewise.
12219 (fixup_partial_die): Change it to partial_die_info::fixup.
12220
12221 2018-02-26 Yao Qi <yao.qi@linaro.org>
12222
12223 * dwarf2read.c (read_partial_die): Update the declaration.
12224 (load_partial_dies): Caller update.
12225 (read_partial_die): Remove one argument abbrev_len.
12226
12227 2018-02-26 Yao Qi <yao.qi@linaro.org>
12228
12229 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12230 assignment operator.
12231 (load_partial_dies): Use ctor and copy ctor.
12232 (read_partial_die): Update.
12233 (dwarf2_cu::find_partial_die): Use ctor.
12234
12235 2018-02-26 Yao Qi <yao.qi@linaro.org>
12236
12237 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12238 (find_partial_die_in_comp_unit): Change it to
12239 dwarf2_cu::find_partial_die.
12240 (find_partial_die): Update.
12241
12242 2018-02-26 Yao Qi <yao.qi@linaro.org>
12243
12244 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12245 is NULL.
12246
12247 2018-02-26 Yao Qi <yao.qi@linaro.org>
12248
12249 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12250
12251 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12252
12253 * arch/amd64.h: Use common/tdesc.h.
12254 * arch/i386.c: Likewise.
12255 * arch/i386.h: Likewise.
12256 * arch/tic6x.c: Likewise.
12257 * arch/tdesc.h: Move file from here...
12258 * common/tdesc.h: ...to here.
12259 * features/aarch64-core.c: Regenerate.
12260 * features/aarch64-fpu.c: Regenerate.
12261 * features/i386/32bit-avx.c: Regenerate.
12262 * features/i386/32bit-avx512.c: Regenerate.
12263 * features/i386/32bit-core.c: Regenerate.
12264 * features/i386/32bit-linux.c: Regenerate.
12265 * features/i386/32bit-mpx.c: Regenerate.
12266 * features/i386/32bit-pkeys.c: Regenerate.
12267 * features/i386/32bit-sse.c: Regenerate.
12268 * features/i386/64bit-avx.c: Regenerate.
12269 * features/i386/64bit-avx512.c: Regenerate.
12270 * features/i386/64bit-core.c: Regenerate.
12271 * features/i386/64bit-linux.c: Regenerate.
12272 * features/i386/64bit-mpx.c: Regenerate.
12273 * features/i386/64bit-pkeys.c: Regenerate.
12274 * features/i386/64bit-segments.c: Regenerate.
12275 * features/i386/64bit-sse.c: Regenerate.
12276 * features/i386/x32-core.c: Regenerate.
12277 * features/tic6x-c6xp.c: Regenerate.
12278 * features/tic6x-core.c: Regenerate.
12279 * features/tic6x-gp.c: Regenerate.
12280 * target-descriptions.c: Use common/tdesc.h.
12281 * target-descriptions.h: Likewise.
12282
12283 2018-02-24 Tom Tromey <tom@tromey.com>
12284
12285 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12286 (try_thread_db_load_from_dir, thread_db_load_search): Use
12287 std::string.
12288 (info_auto_load_libthread_db_compare): Return bool. Change
12289 argument types.
12290 (info_auto_load_libthread_db): Use std::vector, std::string.
12291 Remove cleanups.
12292
12293 2018-02-24 Tom Tromey <tom@tromey.com>
12294
12295 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12296 std::string.
12297 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12298 std::string*.
12299 * gdbarch.c: Rebuild.
12300 * gdbarch.h: Rebuild.
12301 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12302 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12303 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12304 std::string*.
12305
12306 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12307
12308 * gdbtypes.h (sect_offset): Change type to uint64_t.
12309 (sect_offset_str): New function.
12310 * dwarf2read.c (create_addrmap_from_aranges): Use
12311 sect_offset_str.
12312 (error_check_comp_unit_head): Likewise.
12313 (create_debug_type_hash_table): Likewise.
12314 (read_cutu_die_from_dwo): Likewise.
12315 (init_cutu_and_read_dies): Likewise.
12316 (init_cutu_and_read_dies_no_follow): Likewise.
12317 (process_psymtab_comp_unit_reader): Likewise.
12318 (partial_die_parent_scope): Likewise.
12319 (peek_die_abbrev): Likewise.
12320 (process_queue): Likewise.
12321 (dwarf2_physname): Likewise.
12322 (read_namespace_alias): Likewise.
12323 (read_import_statement): Likewise.
12324 (create_dwo_cu_reader): Likewise.
12325 (create_cus_hash_table): Likewise.
12326 (lookup_dwo_cutu): Likewise.
12327 (inherit_abstract_dies): Likewise.
12328 (read_func_scope): Likewise.
12329 (read_call_site_scope): Likewise.
12330 (dwarf2_add_member_fn): Likewise.
12331 (read_common_block): Likewise.
12332 (read_module_type): Likewise.
12333 (read_typedef): Likewise.
12334 (read_subrange_type): Likewise.
12335 (load_partial_dies): Likewise.
12336 (read_partial_die): Likewise.
12337 (find_partial_die): Likewise.
12338 (read_str_index): Likewise.
12339 (dwarf2_string_attr): Likewise.
12340 (build_error_marker_type): Likewise.
12341 (lookup_die_type): Likewise.
12342 (dump_die_shallow): Likewise.
12343 (follow_die_ref): Likewise.
12344 (dwarf2_fetch_die_loc_sect_off): Likewise.
12345 (dwarf2_fetch_constant_bytes): Likewise.
12346 (follow_die_sig): Likewise.
12347 (get_signatured_type): Likewise.
12348 (get_DW_AT_signature_type): Likewise.
12349 (dwarf2_find_containing_comp_unit): Likewise.
12350 (set_die_type): Likewise.
12351
12352 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12353
12354 * arch/aarch64.c: Include "common-defs.h".
12355 * arch/amd64.c: Likewise.
12356 * arch/i386.c: Likewise.
12357
12358 2018-02-21 Tom Tromey <tom@tromey.com>
12359
12360 * value.h: (extract_field_op): Update.
12361 * eval.c (extract_field_op): Return a const char *.
12362 * expression.h (parse_expression_for_completion): Update.
12363 * completer.c (complete_expression): Update.
12364 (add_struct_fields): Make fieldname const.
12365 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12366 (mark_completion_tag, parse_exp_in_context_1): Update.
12367 (parse_expression_for_completion): Change "name" to
12368 unique_xmalloc_ptr*.
12369
12370 2018-02-21 Tom Tromey <tom@tromey.com>
12371
12372 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12373
12374 2018-02-21 Yao Qi <yao.qi@linaro.org>
12375
12376 * avr-tdep.c (avr_read_pc): Change parameter type to
12377 readable_regcache.
12378 * gdbarch.sh (read_pc): Likewise.
12379 * gdbarch.c: Re-generated.
12380 * gdbarch.h: Re-generated.
12381 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12382 readable_regcache.
12383 * ia64-tdep.c (ia64_read_pc): Likewise.
12384 * mips-tdep.c (mips_read_pc): Likewise.
12385 * spu-tdep.c (spu_read_pc): Likewise.
12386
12387 2018-02-21 Yao Qi <yao.qi@linaro.org>
12388
12389 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12390 * regcache-dump.c: New file.
12391 * regcache.c: Move register_dump to regcache-dump.c.
12392 (maintenance_print_registers): Likewise.
12393 (maintenance_print_raw_registers): Likewise.
12394 (maintenance_print_cooked_registers): Likewise.
12395 (maintenance_print_register_groups): Likewise.
12396 (maintenance_print_remote_registers): Likewise.
12397 (_initialize_regcache): Likewise.
12398 * regcache.h (register_dump): Moved from regcache.c.
12399
12400 2018-02-21 Yao Qi <yao.qi@linaro.org>
12401
12402 * regcache.c (regcache::regcache): Update.
12403 (regcache::invalidate): Move it to detached_regcache::invalidate.
12404 (get_thread_arch_aspace_regcache): Update.
12405 (regcache::raw_update): Update.
12406 (regcache::cooked_read): Remove some code.
12407 (regcache::cooked_read_value): Likewise.
12408 (regcache::raw_write): Remove assert on m_readonly_p.
12409 (regcache::raw_supply_integer): Move it to
12410 detached_regcache::raw_supply_integer.
12411 (regcache::raw_supply_zeroed): Likewise.
12412 * regcache.h (detached_regcache) <raw_supply_integer>: New
12413 declaration.
12414 <raw_supply_zeroed, invalidate>: Likewise.
12415 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12416 <invalidate>: Likewise.
12417 <m_readonly_p>: Removed.
12418
12419 2018-02-21 Yao Qi <yao.qi@linaro.org>
12420
12421 * infcmd.c (get_return_value): Let stop_regs point to
12422 get_current_regcache.
12423 * regcache.c (regcache::regcache): Remove.
12424 (register_dump_reg_buffer): New class.
12425 (regcache_print): Adjust.
12426 * regcache.h (regcache): Remove constructors.
12427
12428 2018-02-21 Yao Qi <yao.qi@linaro.org>
12429
12430 * regcache.c (class register_dump): New class.
12431 (register_dump_regcache, register_dump_none): New class.
12432 (register_dump_remote, register_dump_groups): New class.
12433 (regcache_print): Update.
12434 * regcache.h (regcache_dump_what): Move it to regcache.c.
12435 (regcache) <dump>: Remove.
12436
12437 2018-02-21 Yao Qi <yao.qi@linaro.org>
12438
12439 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12440 reg_buffer_rw *.
12441 (jit_unwind_reg_set_impl): Call raw_supply.
12442 (jit_frame_sniffer): Use reg_buffer_rw.
12443 * record-full.c (record_full_core_regbuf): Change its type.
12444 (record_full_core_open_1): Use reg_buffer_rw.
12445 (record_full_close): Likewise.
12446 (record_full_core_fetch_registers): Use regcache->raw_supply.
12447 (record_full_core_store_registers): Likewise.
12448 * regcache.c (regcache::get_register_status): Move it to
12449 reg_buffer.
12450 (regcache_raw_set_cached_value): Remove.
12451 (regcache::raw_set_cached_value): Remove.
12452 (regcache::raw_write): Call raw_supply.
12453 (regcache::raw_supply): Move it to reg_buffer_rw.
12454 * regcache.h (regcache_raw_set_cached_value): Remove.
12455 (reg_buffer_rw): New class.
12456
12457 2018-02-21 Yao Qi <yao.qi@linaro.org>
12458
12459 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12460 readonly_detached_regcache.
12461 (dummy_frame_prev_register): Use regcache->cooked_read.
12462 * frame.c (frame_save_as_regcache): Change return type.
12463 (frame_pop): Update.
12464 * frame.h (frame_save_as_regcache): Update declaration.
12465 * inferior.h (get_infcall_suspend_state_regcache): Update
12466 declaration.
12467 * infrun.c (infcall_suspend_state) <registers>: use
12468 readonly_detached_regcache.
12469 (save_infcall_suspend_state): Don't use regcache_dup.
12470 (get_infcall_suspend_state_regcache): Change return type.
12471 * linux-fork.c (struct fork_info) <savedregs>: Change to
12472 readonly_detached_regcache.
12473 <pc>: New field.
12474 (fork_save_infrun_state): Don't use regcache_dup.
12475 (info_checkpoints_command): Adjust.
12476 * mi/mi-main.c (register_changed_p): Update declaration.
12477 (mi_cmd_data_list_changed_registers): Use
12478 readonly_detached_regcache.
12479 (register_changed_p): Change parameter type to
12480 readonly_detached_regcache.
12481 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12482 readonly_detached_regcache.
12483 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12484 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12485 New.
12486 (regcache::save): Move it to reg_buffer.
12487 (regcache::restore): Change parameter type.
12488 (regcache_dup): Remove.
12489 * regcache.h (reg_buffer) <save>: New method.
12490 (readonly_detached_regcache): New class.
12491 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12492 readonly_detached_regcache.
12493 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12494
12495 2018-02-21 Yao Qi <yao.qi@linaro.org>
12496
12497 * frame.c (frame_save_as_regcache): Use regcache method save.
12498 (frame_pop): Use regcache method restore.
12499 * infrun.c (restore_infcall_suspend_state): Likewise.
12500 * linux-fork.c (fork_load_infrun_state): Likewise.
12501 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12502 save.
12503 * regcache.c (regcache_save): Remove.
12504 (regcache::restore): More asserts.
12505 (regcache_cpy): Remove.
12506 * regcache.h (regcache_save): Remove the declaration.
12507 (regcache::restore): Move from private to public.
12508 Remove the friend declaration of regcache_cpy.
12509 (regcache_cpy): Remove declaration.
12510
12511 2018-02-21 Yao Qi <yao.qi@linaro.org>
12512
12513 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12514 parameter type to 'readable_regcache *'.
12515 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12516 * arm-tdep.c (arm_neon_quad_read): Likewise.
12517 (arm_pseudo_read): Likewise.
12518 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12519 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12520 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12521 * gdbarch.c: Re-generated.
12522 * gdbarch.h: Re-generated.
12523 * gdbarch.sh (pseudo_register_read): Change parameter type to
12524 'readable_regcache *'.
12525 (pseudo_register_read_value): Likewise.
12526 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12527 (h8300_pseudo_register_read): Likewise.
12528 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12529 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12530 (i386_pseudo_register_read_into_value): Likewise.
12531 (i386_pseudo_register_read_value): Likewise.
12532 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12533 declaration.
12534 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12535 * m32c-tdep.c (m32c_raw_read): Likewise.
12536 (m32c_read_flg): Likewise.
12537 (m32c_banked_register): Likewise.
12538 (m32c_banked_read): Likewise.
12539 (m32c_sb_read): Likewise.
12540 (m32c_part_read): Likewise.
12541 (m32c_cat_read): Likewise.
12542 (m32c_r3r2r1r0_read): Likewise.
12543 (m32c_pseudo_register_read): Likewise.
12544 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12545 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12546 (mep_pseudo_cr64_read): Likewise.
12547 (mep_pseudo_register_read): Likewise.
12548 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12549 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12550 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12551 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12552 (regcache::cooked_read): Likewise.
12553 (regcache::cooked_read_value): Likewise.
12554 (regcache_cooked_read_signed):
12555 (regcache::cooked_read): Likewise.
12556 * regcache.h (readable_regcache): New class.
12557 (regcache): Inherit readable_regcache. Move some methods to
12558 readable_regcache.
12559 * rl78-tdep.c (rl78_pseudo_register_read): Change
12560 parameter type to 'readable_regcache *'.
12561 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12562 (e500_pseudo_register_read): Change parameter type to
12563 'readable_regcache *'.
12564 (dfp_pseudo_register_read): Likewise.
12565 (vsx_pseudo_register_read): Likewise.
12566 (efpr_pseudo_register_read): Likewise.
12567 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12568 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12569 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12570 (sh64_pseudo_register_read): Likewise.
12571 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12572 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12573 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12574 (spu_pseudo_register_read): Likewise.
12575 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12576 (xtensa_pseudo_register_read): Likewise.
12577
12578 2018-02-21 Yao Qi <yao.qi@linaro.org>
12579
12580 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12581 (regcache::arch): Move it to reg_buffer::arch.
12582 (regcache::register_buffer): Likewise.
12583 (regcache::assert_regnum): Likewise.
12584 (regcache::num_raw_registers): Likewise.
12585 * regcache.h (reg_buffer): New class.
12586 (regcache): Inherit reg_buffer.
12587
12588 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12589
12590 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12591 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12592
12593 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12594
12595 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12596
12597 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12598
12599 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12600 (SFILES): Remove common/*.c files.
12601 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12602 * common/common.host: Add common reference.
12603 * configure.ac: Likewise.
12604 * configure: Regenerate.
12605
12606 2018-02-16 Yao Qi <yao.qi@linaro.org>
12607
12608 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12609 (block_initialize_namespace): Use new.
12610 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12611 (dwarf2_free_objfile): Use delete.
12612 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12613 (copy_type_recursive): Use new.
12614 * gdb_obstack.h (allocate_on_obstack): New.
12615
12616 2018-02-15 Yao Qi <yao.qi@linaro.org>
12617
12618 PR gdb/22849
12619 * inferior.c (exit_inferior_1): Reset inf->control.
12620
12621 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12622
12623 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12624 declaration.
12625
12626 2018-02-14 Pedro Alves <palves@redhat.com>
12627
12628 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12629 frame_cleanup_after_sniffer on exception.
12630
12631 2018-02-14 Tom Tromey <tom@tromey.com>
12632
12633 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12634 const.
12635 (solib_bfd_open): Make pathname const.
12636 * solib.c (solib_bfd_open): Make pathname const.
12637 * solib-spu.c (spu_bfd_fopen): Make name const.
12638 (spu_bfd_open): Make pathname const.
12639 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12640 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12641
12642 2018-02-14 Tom Tromey <tom@tromey.com>
12643
12644 * symfile.c (symfile_bfd_open): Update.
12645 * source.h (openp, source_full_path_of, find_and_open_source):
12646 Change argument type to unique_xmalloc_ptr.
12647 * source.c (openp): Take a unique_xmalloc_ptr.
12648 (source_full_path_of, find_and_open_source): Likewise.
12649 (open_source_file, symtab_to_fullname): Update.
12650 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12651 unique_xmalloc_ptr.
12652 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12653 (exec_file_find): Update.
12654 * psymtab.c (psymtab_to_fullname): Update.
12655 * nto-tdep.h (nto_find_and_open_solib): Update.
12656 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12657 unique_xmalloc_ptr.
12658 * exec.c (exec_file_attach): Update.
12659 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12660 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12661
12662 2018-02-14 Tom Tromey <tom@tromey.com>
12663
12664 * solib.c: Include source.h.
12665 * nto-tdep.c: Include source.h.
12666 * mi/mi-cmd-env.c: Include source.h.
12667 * infcmd.c: Include source.h.
12668 * exec.c: Include source.h.
12669 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12670 (add_path, directory_switch, source_path, init_source_path): Move
12671 declarations...
12672 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12673 (add_path, directory_switch, source_path, init_source_path):
12674 ...here.
12675
12676 2018-02-14 Tom Tromey <tom@tromey.com>
12677
12678 * solist.h (exec_file_find, solib_find): Return
12679 unique_xmalloc_ptr.
12680 (solib_bfd_fopen): Take a const char *.
12681 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12682 (exec_file_find, solib_find): Likewise.
12683 (solib_bfd_fopen): Do not take ownership of "pathname".
12684 (solib_bfd_open): Use unique_xmalloc_ptr.
12685 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12686 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12687 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12688 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12689
12690 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12691
12692 * ada-lang.c (name_match_type_from_name): Remove reference to
12693 ada_name_for_lookup in function's documentation.
12694 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12695
12696 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12697
12698 * defs.h (enum openp_flags): New enum.
12699 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12700 Move to enum openp_flags.
12701 (openp_flags): New enum flags.
12702 (openp): Change parameter type to openp_flags.
12703 * source.c (openp): Change parameter type to openp_flags.
12704 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12705 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12706
12707 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12708
12709 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12710 per-command.
12711
12712 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12713
12714 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12715 into...
12716 (class dwarf2_queue_guard): ...the destructor of this new class.
12717 (dw2_do_instantiate_symtab): Create instance of the new class
12718 dwarf2_queue_guard, remove cleanup.
12719
12720 2018-02-09 Tom Tromey <tom@tromey.com>
12721
12722 * source.c (find_source_lines): Don't reference past the end of
12723 the vector.
12724
12725 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12726
12727 * remote.c (remote_btrace_maybe_reopen): Change error message.
12728 * btrace.c (btrace_enable): Likewise.
12729 (parse_xml_btrace): Likewise.
12730 (parse_xml_btrace_conf): Likewise.
12731
12732 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12733
12734 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12735 (linux_enable_pt, linux_enable_bts): Call
12736 diagnose_perf_event_open_fail.
12737
12738 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12739
12740 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12741 Remove parameter and change return type. Update callers. Move it.
12742 (linux_enable_bts, linux_enable_pt): Improve error message.
12743 (linux_enable_pt): Remove zero buffer size check.
12744 (linux_enable_btrace): Improve error messages. Remove NULL return
12745 check.
12746
12747 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12748
12749 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12750 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12751 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12752 (linux_supports_pt, linux_supports_btrace): Remove.
12753 (linux_enable_bts): Call cpu_supports_bts.
12754 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12755 * remote.c (remote_supports_btrace): Remove.
12756 (init_remote_ops): Remove remote_supports_btrace.
12757 * target-delegates.c: Regenerated.
12758 * target.c (target_supports_btrace): Remove.
12759 * target.h (target_ops) <to_supports_btrace>: Remove
12760 (target_supports_btrace): Remove.
12761 * x86-linux-nat.c (x86_linux_create_target): Remove
12762 linux_supports_btrace.
12763
12764 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12765
12766 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12767 btrace failed.
12768 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12769 exception and use message in own exception.
12770
12771 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12772
12773 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12774 (perf_event_pt_event_type): Use gdb_file_up.
12775 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12776 scoped_fd, and scoped_mmap.
12777
12778 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12779
12780 * common/scoped_mmap.h: New.
12781 * unittests/scoped_mmap-selftest.c: New.
12782 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12783 unittests/scoped_mmap-selftest.c.
12784
12785 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12786
12787 * common/scoped_fd.h: New.
12788 * unittests/scoped_fd-selftest.c: New.
12789 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12790 unittests/scoped_fd-selftest.c.
12791
12792 2018-02-09 Tom Tromey <tom@tromey.com>
12793
12794 * auto-load.c (auto_load_section_scripts): Use
12795 gdb::unique_xmalloc_ptr.
12796
12797 2018-02-09 Tom Tromey <tom@tromey.com>
12798
12799 * auto-load.c (execute_script_contents): Use std::string.
12800
12801 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12802
12803 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12804 Python function, rather than a new command.
12805
12806 2018-02-08 Tom Tromey <tom@tromey.com>
12807
12808 * solib.c (solib_find_1): Use std::string.
12809 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12810
12811 2018-02-08 Tom Tromey <tom@tromey.com>
12812
12813 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12814
12815 2018-02-08 Tom Tromey <tom@tromey.com>
12816
12817 * source.c (find_source_lines): Use gdb::def_vector.
12818
12819 2018-02-08 Tom Tromey <tom@tromey.com>
12820
12821 * macrocmd.c (struct temporary_macro_definition): New.
12822 (macro_define_command): Use temporary_macro_definition. Remove
12823 cleanups.
12824 (free_macro_definition_ptr): Remove.
12825
12826 2018-02-08 Tom Tromey <tom@tromey.com>
12827
12828 * macroexp.c (maybe_expand): Use std::string.
12829
12830 2018-02-08 Tom Tromey <tom@tromey.com>
12831
12832 * macroexp.c (struct macro_buffer): Add initializers for some
12833 members.
12834 (init_buffer, init_shared_buffer, free_buffer)
12835 (free_buffer_return_text): Remove.
12836 (macro_buffer): New constructors.
12837 (~macro_buffer): New destructor.
12838 (macro_buffer::set_shared): New method.
12839 (macro_buffer::resize_buffer, macro_buffer::appendc)
12840 (macro_buffer::appendmem): Now methods, not free functions.
12841 (set_token, append_tokens_without_splicing, stringify)
12842 (macro_stringify): Update.
12843 (gather_arguments): Change return type. Remove argc_p argument,
12844 add args_ptr argument. Use std::vector.
12845 (substitute_args): Remove argc argument. Accept std::vector.
12846 (expand): Update. Use std::vector.
12847 (scan, macro_expand, macro_expand_next): Update.
12848
12849 2018-02-08 Tom Tromey <tom@tromey.com>
12850
12851 * symtab.c (default_collect_symbol_completion_matches_break_on):
12852 Use unique_xmalloc_ptr.
12853 * macroscope.h: (sal_macro_scope, user_macro_scope)
12854 (default_macro_scope): Return unique_xmalloc_ptr.
12855 * macroscope.c (sal_macro_scope, user_macro_scope)
12856 (default_macro_scope): Return unique_xmalloc_ptr.
12857 * macroexp.h (macro_expand, macro_expand_once): Return
12858 unique_xmalloc_ptr.
12859 * macroexp.c (macro_expand, macro_expand_once): Return
12860 unique_xmalloc_ptr.
12861 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12862 (info_macro_command, info_macros_command): Use
12863 unique_xmalloc_ptr.
12864 * compile/compile-c-support.c (write_macro_definitions): Use
12865 unique_xmalloc_ptr.
12866 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12867
12868 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12869
12870 * value.c (value_static_field): Assign field type instead of
12871 containing type when returning an optimized out value.
12872
12873 2018-02-06 Yao Qi <yao.qi@linaro.org>
12874
12875 * ft32-tdep.c (ft32_read_pc): Remove.
12876 (ft32_write_pc): Remove.
12877 (ft32_gdbarch_init): Update.
12878 * m32r-tdep.c (m32r_read_pc): Remove.
12879 (m32r_gdbarch_init): Update.
12880 * mep-tdep.c (mep_read_pc): Remove.
12881 (mep_gdbarch_init): Update.
12882 * microblaze-tdep.c (microblaze_write_pc): Remove.
12883 (microblaze_gdbarch_init): Update.
12884 * mn10300-tdep.c (mn10300_read_pc): Remove.
12885 (mn10300_write_pc): Remove.
12886 (mn10300_gdbarch_init): Update.
12887 * moxie-tdep.c (moxie_read_pc): Remove.
12888 (moxie_write_pc): Remove.
12889 (moxie_gdbarch_init): Update.
12890
12891 2018-02-06 Yao Qi <yao.qi@linaro.org>
12892
12893 * expprint.c (print_subexp_standard): Handle
12894 OP_F77_UNDETERMINED_ARGLIST.
12895 (dump_subexp_body_standard): Likewise.
12896
12897 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12898
12899 * target-descriptions.c (tdesc_element_visitor) Add empty
12900 implementations.
12901 (tdesc_type): Move make_gdb_type from here.
12902 (tdesc_type_builtin): Likewise.
12903 (tdesc_type_vector): Likewise.
12904 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12905 (make_gdb_type_struct): Move from tdesc_type_with_fields.
12906 (make_gdb_type_union): Likewise.
12907 (make_gdb_type_flags): Likewise.
12908 (make_gdb_type_enum): Likewise.
12909 (make_gdb_type): New function.
12910 (tdesc_register_type): Use static make_gdb_type.
12911
12912 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
12913
12914 * infcmd.c (default_print_one_register_info): Align natural-format
12915 column values consistently one under another.
12916 (pad_to_column): New function.
12917
12918 2018-02-05 Joel Brobecker <brobecker@adacore.com>
12919
12920 * dwarf2read.c (dwarf2_physname): Move commment.
12921
12922 2018-02-01 Leszek Swirski <leszeks@google.com>
12923
12924 * varobj.c (varobj_formatted_print_options): Allow recursive
12925 pretty printing if pretty printing is enabled.
12926
12927 2018-02-01 Leszek Swirski <leszeks@google.com>
12928
12929 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12930 names after a structop as a filename.
12931
12932 2018-02-01 Yao Qi <yao.qi@linaro.org>
12933
12934 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12935 (arm_record_coproc_data_proc): Likewise.
12936
12937 2018-02-01 Yao Qi <yao.qi@linaro.org>
12938
12939 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12940
12941 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
12942
12943 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12944 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12945
12946 2018-01-31 Pedro Alves <palves@redhat.com>
12947
12948 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12949 * inflow.c (child_terminal_save_inferior): Wrap reference to
12950 tcgetpgrp in HAVE_TERMIOS_H.
12951 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12952 _WIN32.
12953 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12954 always iterate over all inferiors.
12955 (gdbsim_cntrl_c): Adjust.
12956 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12957
12958 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12959
12960 * gdbtypes.c (lookup_array_range_type): Make sure the array's
12961 index type is objfile-owned if the element type is as well.
12962
12963 2018-01-31 Joel Brobecker <brobecker@adacore.com>
12964
12965 GDB 8.1 released.
12966
12967 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
12968
12969 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12970 "features/s390x-linux64.c".
12971 (_initialize_s390_linux_tdep): Remove initialization of tdescs
12972 s390_linux32 and s390x_linux64.
12973 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12974 default tdesc.
12975 * s390-tdep.c: Include "features/s390-linux32.c" and
12976 "features/s390x-linux64.c".
12977 (s390_tdesc_valid): Add check for tdesc_has_registers.
12978 (s390_gdbarch_init): Make sure there is always a valid tdesc.
12979 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12980 tdesc_s390x_linux64.
12981 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12982 tdesc_s390x_linux64 to...
12983 * s390-tdep.h: ...here.
12984
12985 2018-01-30 Pedro Alves <palves@redhat.com>
12986
12987 PR gdb/13211
12988 * config.in, configure: Regenerate.
12989 * configure.ac: Check for getpgid.
12990 * go32-nat.c (go32_pass_ctrlc): New.
12991 (go32_target): Install it.
12992 * inf-child.c (inf_child_target): Install
12993 child_terminal_save_inferior, child_pass_ctrlc and
12994 child_interrupt.
12995 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12996 (inf_ptrace_target): No longer install it.
12997 * infcmd.c (interrupt_target_1): Adjust.
12998 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12999 (child_interrupt): Declare.
13000 (inferior::terminal_state): New.
13001 * inflow.c (struct terminal_info): Update comments.
13002 (inferior_process_group): Delete.
13003 (terminal_is_ours): Delete.
13004 (gdb_tty_state): New.
13005 (child_terminal_init): Adjust.
13006 (is_gdb_terminal, sharing_input_terminal_1)
13007 (sharing_input_terminal): New functions.
13008 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13009 Set the process's actual process group in the foreground if
13010 possible. Handle is_ours_for_output/is_ours distinction. Don't
13011 mark terminal as the inferior's if not sharing GDB's terminal.
13012 Don't check attach_flag.
13013 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13014 pass down a target_terminal_state.
13015 (child_terminal_save_inferior): New, factored out from ...
13016 (child_terminal_ours_1): ... this. Handle
13017 target_terminal_state::is_ours_for_output.
13018 (child_interrupt, child_pass_ctrlc): New.
13019 (inflow_inferior_exit): Clear the inferior's terminal_state.
13020 (copy_terminal_info): Copy the inferior's terminal state.
13021 (_initialize_inflow): Remove reference to terminal_is_ours.
13022 * inflow.h (inferior_process_group): Delete.
13023 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13024 * procfs.c (procfs_target): Don't install procfs_interrupt.
13025 (procfs_interrupt): Delete.
13026 * remote.c (remote_serial_quit_handler): Adjust.
13027 (remote_interrupt): Remove ptid parameter. Adjust.
13028 * target-delegates.c: Regenerate.
13029 * target.c: Include "terminal.h".
13030 (target_terminal::terminal_state): Rename to ...
13031 (target_terminal::m_terminal_state): ... this.
13032 (target_terminal::init): Adjust.
13033 (target_terminal::inferior): Adjust to per-inferior
13034 terminal_state.
13035 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13036 (target_terminal::ours, target_terminal::ours_for_output): Use
13037 target_terminal_is_ours_kind.
13038 (target_interrupt): Remove ptid parameter. Adjust.
13039 (default_target_pass_ctrlc): Adjust.
13040 * target.h (target_ops::to_terminal_save_inferior): New field.
13041 (target_ops::to_interrupt): Remove ptid_t parameter.
13042 (target_interrupt): Remove ptid_t parameter. Update comment.
13043 (target_pass_ctrlc): Update comment.
13044 * target/target.h (target_terminal_state): New scoped enum,
13045 factored out of ...
13046 (target_terminal::terminal_state): ... here.
13047 (target_terminal::inferior): Update comments.
13048 (target_terminal::restore_inferior): New.
13049 (target_terminal::is_inferior, target_terminal::is_ours)
13050 (target_terminal::is_ours_for_output): Adjust.
13051 (target_terminal::scoped_restore_terminal_state): Adjust to
13052 rename, and call restore_inferior() instead of inferior().
13053 (target_terminal::scoped_restore_terminal_state::m_state): Change
13054 type.
13055 (target_terminal::terminal_state): Rename to ...
13056 (target_terminal::m_terminal_state): ... this and change type.
13057
13058 2018-01-30 Pedro Alves <palves@redhat.com>
13059
13060 * linux-nat.c (wait_for_signal): New function.
13061 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13062 directly.
13063 (async_terminal_is_ours)
13064 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13065 (linux_nat_add_target): Don't override
13066 to_terminal_inferior/to_terminal_ours.
13067
13068 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13069
13070 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13071
13072 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13073
13074 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13075 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13076 dwarf2_per_objfile_free here.
13077 (dwarf2_per_objfile_free): Remove.
13078 (_initialize_dwarf2_read): Don't register
13079 dwarf2_per_objfile_free as a registry cleanup.
13080
13081 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13082
13083 Avoid compilation errors in MinGW native builds
13084
13085 The error is triggered by including python-internal.h, and the
13086 error message is:
13087
13088 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13089 from build-gnulib/import/math.h:27,
13090 from d:/usr/Python26/include/pyport.h:235,
13091 from d:/usr/Python26/include/Python.h:58,
13092 from python/python-internal.h:94,
13093 from python/py-arch.c:24:
13094 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13095 using ::hypot;
13096 ^~~~~
13097
13098 This happens because Python headers define 'hypot' to expand t
13099 '_hypot' in the Windows builds.
13100 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13101 'hypoth'. This avoids a compilation error.
13102
13103 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13104
13105 * MAINTAINERS (Write After Approval): Fix ordering.
13106
13107 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13108
13109 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13110
13111 2018-01-26 Alan Modra <amodra@gmail.com>
13112
13113 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13114 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13115 Remove nop. Make const. Comment.
13116 (powerpc32_plt_stub_so_2): New.
13117 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13118 Correct count. Update uses.
13119 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13120 Move common code reading PLT entry word. Correct
13121 powerpc32_plt_stub PLT address calculation.
13122 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13123 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13124 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13125 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13126 (ppc64_standard_linkage8): Likewise.
13127 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13128 Correct insns description.
13129 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13130
13131 2018-01-24 Pedro Alves <palves@redhat.com>
13132
13133 GCC PR libstdc++/83906
13134 * gdbtypes.c (operator==(const dynamic_prop &,
13135 const dynamic_prop &)): New.
13136 (operator==(const range_bounds &, const range_bounds &)): New.
13137 (check_types_equal): Use them instead of memcmp.
13138 * gdbtypes.h (operator==(const dynamic_prop &,
13139 const dynamic_prop &)): Declare.
13140 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13141 (operator==(const range_bounds &, const range_bounds &)): Declare.
13142 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13143
13144 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13145
13146 * s390-linux-tdep.c (s390_record_address_mask)
13147 (s390_record_calc_disp_common, s390_record_calc_disp)
13148 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13149 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13150 (s390_process_record): Move to s390-tdep.c.
13151 (s390_linux_init_abi_any): Adjust.
13152 * s390-tdep.c (s390_record_address_mask)
13153 (s390_record_calc_disp_common, s390_record_calc_disp)
13154 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13155 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13156 (s390_process_record): Moved from s390-linux-tdep.c
13157 (s390_gdbarch_init): Adjust.
13158
13159 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13160
13161 * s390-linux-nat.c (s390-tdep.h): New include.
13162 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13163 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13164 (ALLDEPFILES): Add s390-tdep.c.
13165 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13166 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13167 * s390-tdep.h: ...this. New file.
13168 * s390-linux-tdep.c (s390-tdep.h): New include.
13169 (_initialize_s390_tdep): Rename to...
13170 (_initialize_s390_linux_tdep): ...this and adjust.
13171 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13172 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13173 s390-tdep.h.
13174 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13175 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13176 (s390_is_partial_instruction, s390_software_single_step)
13177 (is_non_branch_ril, s390_displaced_step_copy_insn)
13178 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13179 (s390_prologue_data, s390_addr, s390_store, s390_load)
13180 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13181 (s390_register_call_saved, s390_guess_tracepoint_registers)
13182 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13183 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13184 (s390_pseudo_register_name, s390_pseudo_register_type)
13185 (s390_pseudo_register_read, s390_pseudo_register_write)
13186 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13187 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13188 (s390_addr_bits_remove, s390_address_class_type_flags)
13189 (s390_address_class_type_flags_to_name)
13190 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13191 (s390_function_arg_float, s390_function_arg_vector)
13192 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13193 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13194 (s390_frame_align, s390_register_return_value, s390_return_value)
13195 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13196 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13197 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13198 (s390_trad_frame_prev_register, s390_unwind_cache)
13199 (s390_prologue_frame_unwind_cache)
13200 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13201 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13202 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13203 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13204 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13205 (s390_frame_base_address, s390_local_base_address)
13206 (s390_frame_base, s390_gcc_target_options)
13207 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13208 (s390_validate_reg_range, s390_tdesc_valid)
13209 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13210 * s390-tdep.c: ...this. New file.
13211
13212 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13213
13214 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13215 (s390_process_record, s390_gdbarch_tdep_alloc)
13216 (s390_linux_init_abi_any): Use/set new hook.
13217
13218 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13219
13220 * s390-linux-tdep.c (osabi.h): New include.
13221 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13222 (s390_linux_init_abi_any): New functions.
13223 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13224
13225 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13226
13227 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13228 tdesc_has_registers check
13229
13230 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13231
13232 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13233 (s390_validate_reg_range): New macro.
13234 (s390_gdbarch_init): Adjust.
13235
13236 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13237
13238 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13239 (s390_gdbarch_tdep_alloc): Adjust.
13240 (s390_gdbarch_init): Adjust.
13241
13242 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13243
13244 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13245 <have_tdb>: Change type to bool.
13246 (s390_gdbarch_tdep_alloc): Adjust.
13247 (s390_gdbarch_init): Adjust.
13248
13249 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13250
13251 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13252 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13253 (s390_gdbarch_tdep_alloc): New function.
13254 (s390_gdbarch_init): Allocate tdep at start and use its fields
13255 instead of separate variables.
13256
13257 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13258
13259 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13260 when looking for cached gdbarch and add comment for remaining.
13261
13262 2018-01-22 Pedro Alves <palves@redhat.com>
13263 Sergio Durigan Junior <sergiodj@redhat.com>
13264
13265 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13266 case.
13267
13268 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13269
13270 * MAINTAINERS: Update my company e-mail address.
13271
13272 2018-01-22 Yao Qi <yao.qi@linaro.org>
13273
13274 * regcache.c (cooked_write_test): New function.
13275 (_initialize_regcache): Register the test.
13276
13277 2018-01-22 Yao Qi <yao.qi@linaro.org>
13278
13279 * ia64-tdep.c (ia64_pseudo_register_read): Call
13280 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13281 * m32c-tdep.c (m32c_cat_read): Likewise.
13282 (m32c_r3r2r1r0_read): Likewise.
13283 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13284 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13285
13286 2018-01-22 Yao Qi <yao.qi@linaro.org>
13287
13288 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13289 method raw_read instead of regcache_raw_read.
13290 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13291 * arm-tdep.c (arm_neon_quad_read): Likewise.
13292 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13293 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13294 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13295 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13296 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13297 (i386_pseudo_register_read_into_value): Likewise.
13298 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13299 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13300 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13301 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13302 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13303 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13304 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13305 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13306 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13307
13308 2018-01-22 Yao Qi <yao.qi@linaro.org>
13309
13310 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13311 * configure.tgt: Remove target mt.
13312 * mt-tdep.c: Remove.
13313 * regcache.c (cooked_read_test): Remove the check for mt.
13314
13315 2018-01-22 Yao Qi <yao.qi@linaro.org>
13316
13317 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13318 instead of gdbarch_pseudo_register_read_value.
13319
13320 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13321
13322 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13323 language is Ada.
13324
13325 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13326
13327 * linespec.c (create_sals_line_offset): Remove code that preserved
13328 the symtab_and_line's line number.
13329
13330 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13331
13332 * varobj.c (varobj_create): Don't set valid_block when creating a
13333 floating varobj.
13334
13335 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13336
13337 * varobj.c (varobj_create): Remove out of date comment.
13338
13339 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13340
13341 PR mi/20395
13342 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13343 updating innermost block.
13344 * parse.c (innermost_block_tracker::update): Take extra type
13345 parameter, and check types match before updating innermost block.
13346 (write_dollar_variable): Update innermost block for registers.
13347 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13348 (innermost_block_tracker::innermost_block_tracker): Initialise
13349 m_types member.
13350 (innermost_block_tracker::reset): Take type parameter.
13351 (innermost_block_tracker::update): Take type parameter, and pass
13352 type through as needed.
13353 (innermost_block_tracker::m_types): New member.
13354 * varobj.c (varobj_create): Pass type when reseting innermost
13355 block.
13356
13357 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13358
13359 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13360 * ada-lang.c (resolve_subexp): Likewise.
13361 * breakpoint.c (set_breakpoint_condition) Likewise.
13362 (watch_command_1) Likewise.
13363 * c-exp.y (variable): Likewise.
13364 * d-exp.y (PrimaryExpression): Likewise.
13365 * f-exp.y (variable): Likewise.
13366 * go-exp.y (variable): Likewise.
13367 * m2-exp.y (variable): Likewise.
13368 * objfiles.c (objfile::~objfile): Likewise.
13369 * p-exp.y (variable): Likewise.
13370 * parse.c (innermost_block): Change type.
13371 * parser-defs.h (class innermost_block_tracker): New.
13372 (innermost_block): Change to innermost_block_tracker.
13373 * printcmd.c (display_command): Switch to innermost_block API.
13374 (do_one_display): Likewise.
13375 * rust-exp.y (do_one_display): Likewise.
13376 * symfile.c (clear_symtab_users): Likewise.
13377 * varobj.c (varobj_create): Switch to innermost_block API, replace
13378 use of innermost_block with block stored on varobj object.
13379
13380 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13381
13382 * expression.h (innermost_block): Remove declaration.
13383 * varobj.c: Add 'parser-defs.h' include.
13384
13385 2018-01-19 Tom Tromey <tom@tromey.com>
13386
13387 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13388 symbols in the static and global blocks.
13389
13390 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13391
13392 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13393 gdb_ptrace.h, and move including gdb_wait.h ...
13394 * nat/linux-ptrace.h: ... to here.
13395
13396 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13397
13398 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13399 inf_ptrace_detach_success.
13400 (inf_ptrace_detach_success): Add inferior parameter, use it
13401 instead of inferior_ptid, pass it to detach_inferior.
13402 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13403 parameter.
13404 * inferior.c (detach_inferior): Add overload that takes an
13405 inferior object.
13406 * inferior.h (detach_inferior): Likewise.
13407 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13408 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13409 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13410
13411 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13412
13413 * target.h (struct target_ops) <to_detach>: Add inferior
13414 parameter.
13415 (target_detach): Likewise.
13416 * target.c (dispose_inferior): Pass inferior down.
13417 (target_detach): Pass inferior down. Assert that it is equal to
13418 the current inferior.
13419 * aix-thread.c (aix_thread_detach): Pass inferior down.
13420 * corefile.c (core_file_command): Pass current_inferior() down.
13421 * corelow.c (core_detach): Add inferior parameter.
13422 * darwin-nat.c (darwin_detach): Likewise.
13423 * gnu-nat.c (gnu_detach): Likewise.
13424 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13425 * infcmd.c (detach_command): Pass current_inferior() down to
13426 target_detach.
13427 * infrun.c (follow_fork_inferior): Pass parent_inf to
13428 target_detach.
13429 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13430 target_detach.
13431 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13432 * linux-thread-db.c (thread_db_detach): Likewise.
13433 * nto-procfs.c (procfs_detach): Likewise.
13434 * procfs.c (procfs_detach): Likewise.
13435 * record.c (record_detach): Likewise.
13436 * record.h (struct inferior): Forward-declare.
13437 (record_detach): Add inferior parameter.
13438 * remote-sim.c (gdbsim_detach): Likewise.
13439 * remote.c (remote_detach_1): Likewise.
13440 (remote_detach): Likewise.
13441 (extended_remote_detach): Likewise.
13442 * sol-thread.c (sol_thread_detach): Likewise.
13443 * target-debug.h (target_debug_print_inferior_p): New macro.
13444 * target-delegates.c: Re-generate.
13445 * top.c (kill_or_detach): Pass inferior down to target_detach.
13446 * windows-nat.c (windows_detach): Add inferior parameter.
13447
13448 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13449
13450 * target.h (struct target_ops) <to_detach>: Remove args
13451 parameter.
13452 (target_detach): Likewise.
13453 * target.c (dispose_inferior): Adjust.
13454 (target_detach): Remove args parameter, adjust.
13455 * aix-thread.c (aix_thread_detach): Adjust.
13456 * corefile.c (core_file_command): Adjust.
13457 * corelow.c (core_detach): Adjust.
13458 * darwin-nat.c (darwin_detach): Adjust.
13459 * gnu-nat.c (gnu_detach): Adjust.
13460 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13461 * infcmd.c (detach_command): Adjust
13462 * infrun.c (follow_fork_inferior): Adjust.
13463 (handle_vfork_child_exec_or_exit): Adjust.
13464 * linux-fork.c (linux_fork_detach): Remove args parameter.
13465 * linux-fork.h (linux_fork_detach): Likewise.
13466 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13467 * linux-thread-db.c (thread_db_detach): Likewise.
13468 * nto-procfs.c (procfs_detach): Likewise.
13469 * procfs.c (procfs_detach): Likewise.
13470 (do_detach): Remove signo parameter.
13471 * record.c (record_detach): Remove args parameter.
13472 * record.h (record_detach): Likewise.
13473 * remote-sim.c (gdbsim_detach): Likewise.
13474 * remote.c (remote_detach_1): Likewise.
13475 (remote_detach): Likewise.
13476 (extended_remote_detach): Likewise.
13477 * sol-thread.c (sol_thread_detach): Likewise.
13478 * target-delegates.c: Re-generate.
13479 * top.c (struct qt_args) <args>: Remove field.
13480 (kill_or_detach): Don't pass args.
13481 (quit_force): Don't set args.
13482 * windows-nat.c (windows_detach): Remove args parameter.
13483
13484 2018-01-19 Yao Qi <yao.qi@linaro.org>
13485
13486 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13487 (arm_linux_init_abi): Install it.
13488
13489 2018-01-19 Yao Qi <yao.qi@linaro.org>
13490
13491 * osabi.c (gdb_osabi_names): Extend the regexp for
13492 arm-linux-gnueabihf.
13493
13494 2018-01-18 Yao Qi <yao.qi@linaro.org>
13495
13496 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13497 m_abbrevs.
13498 (abbrev_table::add_abbrev): Update.
13499 (abbrev_table::lookup_abbrev): Update.
13500
13501 2018-01-18 Yao Qi <yao.qi@linaro.org>
13502
13503 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13504
13505 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13506
13507 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13508 to "std::string".
13509
13510 2018-01-17 Tom Tromey <tom@tromey.com>
13511
13512 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13513
13514 2018-01-17 Tom Tromey <tom@tromey.com>
13515
13516 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13517 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13518 (create_array_type_with_stride): Update.
13519 * dwarf2read.c (set_die_type): Update.
13520
13521 2018-01-17 Tom Tromey <tom@tromey.com>
13522
13523 * dwarf2read.c (delayed_method_info): Remove typedef.
13524 (dwarf2_cu::method_info): Now a std::vector.
13525 (add_to_method_list): Update.
13526 (free_delayed_list): Remove.
13527 (compute_delayed_physnames): Update.
13528 (process_full_comp_unit, process_full_type_unit): Clear the method
13529 list. Remove cleanups.
13530 (psymtab_include_file_name): Add name_holder parameter. Use
13531 unique_xmalloc_ptr.
13532 (dwarf_decode_lines): Update.
13533
13534 2018-01-17 Tom Tromey <tom@tromey.com>
13535 Simon Marchi <simon.marchi@ericsson.com>
13536
13537 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13538 (dwarf2_per_objfile::free_cached_comp_units)
13539 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13540 (init_cutu_and_read_dies_no_follow): Update.
13541 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13542 (dwarf2_cu::~dwarf2_cu): New.
13543 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13544 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13545
13546 2018-01-17 Tom Tromey <tom@tromey.com>
13547 Simon Marchi <simon.marchi@ericsson.com>
13548
13549 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13550 (struct die_reader_specs) <abbrev_table>: New member.
13551 (struct abbrev_table): Add constructor.
13552 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13553 <abbrev_obstack>: Now an auto_obstack.
13554 (abbrev_table_up): New typedef.
13555 (init_cu_die_reader): Add abbrev_table parameter.
13556 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13557 Add result_dwo_abbrev_table.
13558 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13559 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13560 Update.
13561 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13562 parameter.
13563 (skip_children): Update.
13564 (abbrev_table::alloc_abbrev): Rename from
13565 abbrev_table_alloc_abbrev.
13566 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13567 (abbrev_table::lookup_abbrev): Rename from
13568 abbrev_table_lookup_abbrev.
13569 (abbrev_table_read_table): Return abbrev_table_up.
13570 (abbrev_table_free, abbrev_table_free_cleanup)
13571 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13572 (load_partial_dies): Update.
13573
13574 2018-01-17 Tom Tromey <tom@tromey.com>
13575
13576 * dwarf2read.c (dwarf2_compute_name): Update comment.
13577 (read_func_scope, read_variable): Update.
13578 (new_symbol): Remove.
13579 (new_symbol_full): Rename to new_symbol.
13580
13581 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13582
13583 PR gdb/16577
13584 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13585 a warning instead of throwing an error, set section size to 0 and return
13586 NULL.
13587 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13588
13589 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13590
13591 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13592 std::string.
13593 (linux_ptrace_attach_fail_reason_string): Likewise.
13594 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13595 Likewise.
13596 (linux_ptrace_attach_fail_reason_string): Likewise.
13597 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13598
13599 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13600
13601 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13602
13603 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13604
13605 PR gdb/21559
13606 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13607 checking for fs_base/gs_base fields in struct user_regs_struct.
13608 * configure: Regenerate.
13609
13610 2018-01-17 Yao Qi <yao.qi@linaro.org>
13611
13612 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13613 function.
13614 (aarch64_linux_init_abi): Install it to gdbarch hook
13615 gcc_target_options.
13616
13617 2018-01-15 Pedro Alves <palves@redhat.com>
13618
13619 * common/signals-state-save-restore.c
13620 (save_original_signals_state): Fix typos.
13621
13622 2017-01-12 Tom Tromey <tom@tromey.com>
13623 Sergio Durigan Junior <sergiodj@redhat.com>
13624
13625 * Makefile.in (install-only): Install gdb-add-index.
13626
13627 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13628
13629 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13630
13631 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13632
13633 * infrun.c (keep_going_pass_signal): Clear step-over info when
13634 insert_breakpoints fails.
13635
13636 2018-01-11 Pedro Alves <palves@redhat.com>
13637
13638 PR gdb/22583
13639 * infrun.c (resume): Rename to ...
13640 (resume_1): ... this.
13641 (resume): Reimplement as wrapper around resume_1.
13642
13643 2018-01-11 Pedro Alves <palves@redhat.com>
13644
13645 PR remote/22597
13646 * remote.c (remote_parse_stop_reply): Default to the last-set
13647 general thread instead of to 'magic_null_ptid'.
13648
13649 2018-01-10 Pedro Alves <palves@redhat.com>
13650
13651 * language.h (language_get_symbol_name_matcher): Rename ...
13652 (get_symbol_name_matcher): ... this.
13653 * language.c (language_get_symbol_name_matcher): Ditto.
13654 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13655 callers adjusted.
13656
13657 2018-01-10 Pedro Alves <palves@redhat.com>
13658
13659 PR gdb/22670
13660 * dwarf2read.c
13661 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13662 Adjust to use language_get_symbol_name_matcher instead of
13663 language_defn::la_get_symbol_name_matcher.
13664 * language.c (language_get_symbol_name_matcher): If in Ada mode
13665 and the lookup name is a verbatim match, return Ada's matcher.
13666 * language.h (language_get_symbol_name_matcher): Adjust comment.
13667 (ada_lookup_name_info::verbatim_p):: New method.
13668
13669 2018-01-10 Pedro Alves <palves@redhat.com>
13670
13671 PR gdb/22670
13672 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13673 minsym's language is language_auto or language_cplus, pass down
13674 language_ada instead.
13675 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13676
13677 2018-01-10 Pedro Alves <palves@redhat.com>
13678
13679 PR gdb/22670
13680 * minsyms.c (linkage_name_str): New function.
13681 (iterate_over_minimal_symbols): Use it.
13682
13683 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13684
13685 * NEWS: Document that 'info proc' now works on FreeBSD.
13686
13687 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13688
13689 * configure.ac: Check for kinfo_getfile in libutil.
13690 * configure: Regenerate.
13691 * config.in: Regenerate.
13692 * fbsd-nat.c: Include "fbsd-tdep.h".
13693 (fbsd_fetch_cmdline): New.
13694 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13695 rather than calling error.
13696 (fbsd_info_proc): New.
13697 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13698 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13699 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13700
13701 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13702
13703 * fbsd-nat.c (struct free_deleter): Remove.
13704 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13705
13706 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13707
13708 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13709 NULL for an empty pathname.
13710
13711 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13712
13713 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13714 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13715 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13716 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13717 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13718 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13719 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13720 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13721 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13722 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13723 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13724 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13725 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13726 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13727 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13728
13729 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13730
13731 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13732 (gnu_xfer_auxv): New function.
13733 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13734 TARGET_OBJECT_AUXV.
13735
13736 2018-01-08 Yao Qi <yao.qi@linaro.org>
13737 Simon Marchi <simon.marchi@ericsson.com>
13738
13739 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13740 common/selftest.c.
13741 (COMMON_OBS): Remove selftest.o.
13742 * configure.ac: Append selftest-arch.c and common/selftest.c to
13743 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13744 * configure: Re-generated.
13745 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13746 GDB_SELF_TEST.
13747 (maintenance_info_selftests): Likewise.
13748
13749 2018-01-08 Xavier Roirand <roirand@adacore.com>
13750
13751 * ada-valprint.c (val_print_packed_array_elements): Use
13752 proper number of elements when printing an array indexed
13753 by an enumeration type.
13754
13755 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13756
13757 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13758 (dw2_get_file_names_reader): Adjust.
13759 (lookup_dwo_signatured_type): Adjust.
13760 (lookup_dwp_signatured_type): Adjust.
13761 (lookup_signatured_type): Adjust.
13762 (create_type_unit_group): Adjust.
13763 (get_type_unit_group): Adjust.
13764 (process_psymtab_comp_unit_reader): Adjust.
13765 (build_type_psymtabs_reader): Adjust.
13766 (scan_partial_symbols): Adjust.
13767 (add_partial_symbol): Adjust.
13768 (add_partial_subprogram): Adjust.
13769 (peek_die_abbrev): Adjust.
13770 (fixup_go_packaging): Adjust.
13771 (process_imported_unit_die): Adjust.
13772 (dwarf2_compute_name): Adjust.
13773 (dwarf2_physname): Adjust.
13774 (read_import_statement): Adjust.
13775 (handle_DW_AT_stmt_list): Adjust.
13776 (read_file_scope): Adjust.
13777 (read_func_scope): Adjust.
13778 (read_lexical_block_scope): Adjust.
13779 (read_call_site_scope): Adjust.
13780 (read_variable): Adjust.
13781 (dwarf2_rnglists_process): Adjust.
13782 (dwarf2_ranges_process): Adjust.
13783 (dwarf2_ranges_read): Adjust.
13784 (dwarf2_get_pc_bounds): Adjust.
13785 (dwarf2_record_block_ranges): Adjust.
13786 (dwarf2_add_field): Adjust.
13787 (dwarf2_add_member_fn): Adjust.
13788 (read_structure_type): Adjust.
13789 (process_structure_scope): Adjust.
13790 (read_enumeration_type): Adjust.
13791 (read_array_type): Adjust.
13792 (mark_common_block_symbol_computed): Adjust.
13793 (read_common_block): Adjust.
13794 (read_namespace_type): Adjust.
13795 (read_namespace): Adjust.
13796 (read_module_type): Adjust.
13797 (read_tag_pointer_type): Adjust.
13798 (read_tag_ptr_to_member_type): Adjust.
13799 (read_tag_string_type): Adjust.
13800 (read_subroutine_type): Adjust.
13801 (read_typedef): Adjust.
13802 (read_base_type): Adjust.
13803 (attr_to_dynamic_prop): Adjust.
13804 (read_subrange_type): Adjust.
13805 (read_unspecified_type): Adjust.
13806 (dwarf2_read_abbrevs): Adjust.
13807 (load_partial_dies): Adjust.
13808 (read_partial_die): Adjust.
13809 (find_partial_die): Adjust.
13810 (guess_partial_die_structure_name): Adjust.
13811 (fixup_partial_die): Adjust.
13812 (read_attribute_value): Adjust.
13813 (read_addr_index): Adjust.
13814 (read_addr_index_from_leb128): Adjust.
13815 (read_str_index): Adjust.
13816 (dwarf2_string_attr): Adjust.
13817 (get_debug_line_section): Adjust.
13818 (dwarf_decode_line_header): Adjust.
13819 (lnp_state_machine::check_line_address): Adjust.
13820 (dwarf_decode_lines_1): Adjust.
13821 (dwarf_decode_lines): Adjust.
13822 (dwarf2_start_symtab): Adjust.
13823 (var_decode_location): Adjust.
13824 (new_symbol_full): Adjust.
13825 (dwarf2_const_value_data): Adjust.
13826 (dwarf2_const_value_attr): Adjust.
13827 (dwarf2_const_value): Adjust.
13828 (die_type): Adjust.
13829 (die_containing_type): Adjust.
13830 (build_error_marker_type): Adjust.
13831 (lookup_die_type): Adjust.
13832 (guess_full_die_structure_name): Adjust.
13833 (anonymous_struct_prefix): Adjust.
13834 (determine_prefix): Adjust.
13835 (dwarf2_name): Adjust.
13836 (follow_die_ref_or_sig): Adjust.
13837 (follow_die_offset): Adjust.
13838 (follow_die_ref): Adjust.
13839 (follow_die_sig_1): Adjust.
13840 (follow_die_sig): Adjust.
13841 (get_signatured_type): Adjust.
13842 (get_DW_AT_signature_type): Adjust.
13843 (decode_locdesc): Adjust.
13844 (dwarf_decode_macros): Adjust.
13845 (cu_debug_loc_section): Adjust.
13846 (fill_in_loclist_baton): Adjust.
13847 (dwarf2_symbol_mark_computed): Adjust.
13848 (init_one_comp_unit): Don't assign
13849 dwarf2_cu::dwarf2_per_objfile.
13850 (set_die_type): Adjust.
13851
13852 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13853
13854 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13855 <dwarf2_per_objfile>: New field.
13856 (dwarf2_per_objfile): Remove global.
13857 (get_dwarf2_per_objfile): New function.
13858 (set_dwarf2_per_objfile): New function.
13859 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13860 dwarf2_per_objfile.
13861 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13862 (read_abbrev_offset): Likewise.
13863 (read_indirect_string): Likewise.
13864 (read_indirect_line_string): Likewise.
13865 (read_indirect_string_at_offset): Likewise.
13866 (read_indirect_string_from_dwz): Likewise.
13867 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13868 dwarf2_per_objfile.
13869 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13870 (create_all_comp_units): Change objfile parameter to
13871 dwarf2_per_objfile.
13872 (create_all_type_units): Likewise.
13873 (process_queue): Add dwarf2_per_objfile parameter.
13874 (read_and_check_comp_unit_head): Likewise.
13875 (lookup_dwo_unit_in_dwp): Likewise.
13876 (get_dwp_file): Likewise.
13877 (process_cu_includes): Likewise.
13878 (struct free_dwo_file_cleanup_data): New struct.
13879 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13880 set_dwarf2_per_objfile.
13881 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13882 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13883 context, adjust calls.
13884 (dw2_instantiate_symtab): Likewise.
13885 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13886 (dw2_get_cu): Likewise.
13887 (create_cu_from_index_list): Change objfile parameter to
13888 dwarf2_per_objfile.
13889 (create_cus_from_index_list): Get dwarf2_per_objfile from
13890 context, adjust calls.
13891 (create_cus_from_index): Likewise.
13892 (create_signatured_type_table_from_index): Change objfile
13893 parameter to dwarf2_per_objfile.
13894 (create_signatured_type_table_from_debug_names): Change objfile
13895 parameter to dwarf2_per_objfile.
13896 (create_addrmap_from_index): Likewise.
13897 (create_addrmap_from_aranges): Likewise.
13898 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13899 (dw2_setup): Remove.
13900 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13901 context.
13902 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13903 get_dwarf2_per_objfile.
13904 (dw2_forget_cached_source_info): Likewise.
13905 (dw2_map_symtabs_matching_filename): Likewise.
13906 (struct dw2_symtab_iterator) <index>: Remove.
13907 <dwarf2_per_objfile>: New field.
13908 (dw2_symtab_iter_init): Replace index parameter with
13909 dwarf2_per_objfile.
13910 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13911 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13912 (dw2_print_stats): Likewise.
13913 (dw2_dump): Likewise.
13914 (dw2_expand_symtabs_for_function): Likewise.
13915 (dw2_expand_all_symtabs): Likewise.
13916 (dw2_expand_symtabs_with_fullname): Likewise.
13917 (dw2_expand_marked_cus): Replace index and objfile parameters
13918 with dwarf2_per_objfile.
13919 (dw_expand_symtabs_matching_file_matcher): Add
13920 dwarf2_per_objfile parameter and adjust calls.
13921 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13922 adjust calls.
13923 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13924 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13925 adjust calls.
13926 (create_cus_from_debug_names_list): Replace objfile parameter
13927 with dwarf2_per_objfile and adjust calls.
13928 (create_cus_from_debug_names): Likewise.
13929 (dwarf2_read_debug_names): Likewise.
13930 (mapped_debug_names::namei_to_name): Adjust call.
13931 (dw2_debug_names_iterator::next): Likewise.
13932 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13933 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13934 (dw2_debug_names_dump): Likewise.
13935 (dw2_debug_names_expand_symtabs_for_function): Likewise.
13936 (dw2_debug_names_expand_symtabs_matching): Likewise.
13937 (dwarf2_initialize_objfile): Likewise.
13938 (dwarf2_build_psymtabs): Likewise.
13939 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13940 this_cu.
13941 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13942 (read_and_check_comp_unit_head): Likewise.
13943 (read_abbrev_offset): Likewise.
13944 (create_debug_type_hash_table): Likewise.
13945 (create_debug_types_hash_table): Likewise.
13946 (create_all_type_units): Replace objfile parameter with
13947 dwarf2_per_objfile.
13948 (add_type_unit): Add dwarf2_per_objfile parameter.
13949 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13950 with dwarf2_per_objfile.
13951 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13952 (lookup_dwp_signatured_type): Likewise.
13953 (lookup_signatured_type): Likewise.
13954 (read_cutu_die_from_dwo): Likewise.
13955 (init_tu_and_read_dwo_dies): Likewise.
13956 (init_cutu_and_read_dies): Likewise.
13957 (init_cutu_and_read_dies_no_follow): Likewise.
13958 (allocate_type_unit_groups_table): Add objfile parameter.
13959 (create_type_unit_group): Use dwarf2_per_objfile from cu.
13960 (get_type_unit_group): Likewise.
13961 (process_psymtab_comp_unit): Update call.
13962 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13963 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13964 (print_tu_stats): Likewise.
13965 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13966 in void* parameter.
13967 (build_type_psymtabs): Change objfile parameter to
13968 dwarf2_per_objfile.
13969 (process_skeletonless_type_unit): Use dwarf2_per_objfile
13970 passed in void* parameter.
13971 (process_skeletonless_type_units): Change objfile parameter to
13972 dwarf2_per_objfile.
13973 (set_partial_user): Likewise.
13974 (dwarf2_build_psymtabs_hard): Likewise.
13975 (read_comp_units_from_section): Likewise.
13976 (create_all_comp_units): Likewise.
13977 (scan_partial_symbols): Update calls.
13978 (add_partial_symbol): Likewise.
13979 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13980 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13981 (process_queue): Add dwarf2_per_objfile parameter.
13982 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13983 (compute_compunit_symtab_includes): Likewise.
13984 (process_cu_includes): Add dwarf2_per_objfile parameter.
13985 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13986 (process_full_type_unit): Likewise.
13987 (process_imported_unit_die): Update call.
13988 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13989 (read_file_scope): Likewise.
13990 (allocate_dwo_file_hash_table): Add objfile parameter.
13991 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13992 (create_cus_hash_table): Likewise.
13993 (create_dwp_hash_table): Likewise.
13994 (create_dwo_unit_in_dwp_v1): Likewise.
13995 (create_dwp_v2_section): Likewise.
13996 (create_dwo_unit_in_dwp_v2): Likewise.
13997 (lookup_dwo_unit_in_dwp): Likewise.
13998 (try_open_dwop_file): Likewise.
13999 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14000 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14001 cleanup to include a reference to dwarf2_per_objfile.
14002 (open_dwp_file): Add dwarf2_per_objfile parameter.
14003 (open_and_init_dwp_file): Likewise.
14004 (get_dwp_file): Likewise.
14005 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14006 (queue_and_load_all_dwo_tus): Update call.
14007 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14008 data.
14009 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14010 (dwarf2_ranges_process): Likewise.
14011 (dwarf2_get_pc_bounds): Likewise.
14012 (mark_common_block_symbol_computed): Likewise.
14013 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14014 (dwarf2_read_abbrevs): Update call.
14015 (read_partial_die): Use dwarf2_per_objfile from cu.
14016 (find_partial_die): Likewise.
14017 (fixup_partial_die): Likewise.
14018 (read_attribute_value): Likewise.
14019 (read_indirect_string_at_offset_from): Add objfile parameter.
14020 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14021 parameter.
14022 (read_indirect_string_from_dwz): Add objfile parameter.
14023 (read_indirect_string): Add objfile parameter.
14024 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14025 (read_addr_index): Use dwarf2_per_objfile from cu.
14026 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14027 call dw2_setup.
14028 (read_str_index): Use dwarf2_per_objfile from cu.
14029 (get_debug_line_section): Likewise.
14030 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14031 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14032 (new_symbol_full): Use dwarf2_per_objfile from cu.
14033 (build_error_marker_type): Likewise.
14034 (lookup_die_type): Likewise.
14035 (determine_prefix): Likewise.
14036 (follow_die_offset): Likewise.
14037 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14038 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14039 (dwarf2_fetch_die_type_sect_off): Likewise.
14040 (dwarf2_get_die_type): Likewise.
14041 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14042 (get_signatured_type): Likewise.
14043 (get_DW_AT_signature_type): Likewise.
14044 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14045 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14046 (cu_debug_loc_section): Likewise.
14047 (fill_in_loclist_baton): Likewise.
14048 (dwarf2_symbol_mark_computed): Likewise.
14049 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14050 dwarf2_per_objfile.
14051 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14052 parameter.
14053 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14054 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14055 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14056 (set_die_type): Use dwarf2_free_objfile from cu.
14057 (get_die_type_at_offset): Likewise.
14058 (dwarf2_per_objfile_free): Don't assign global variable.
14059 (debug_names) <constructor>: Add dwarf2_per_objfile
14060 parameter, update m_debugstrlookup construction.
14061 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14062 parameter.
14063 <m_dwarf2_per_objfile>: New field.
14064 <lookup>: Use m_dwarf2_per_objfile.
14065 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14066 (psyms_seen_size): Likewise.
14067 (write_gdbindex): Replace objfile parameter with
14068 dwarf2_per_objfile.
14069 (write_debug_names): Likewise.
14070 (write_psymtabs_to_index): Likewise.
14071 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14072 calls.
14073
14074 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14075
14076 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14077 <dwarf2_per_objfile>: New field.
14078 (struct dwarf2_per_cu_data) <objfile>: Remove.
14079 <dwarf2_per_objfile>: New field.
14080 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14081 of objfile.
14082 (create_signatured_type_table_from_index): Likewise.
14083 (create_debug_type_hash_table): Likewise.
14084 (fill_in_sig_entry_from_dwo_entry): Likewise.
14085 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14086 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14087 objfile.
14088 (create_partial_symtab): Access objfile through
14089 dwarf2_per_objfile.
14090 (process_psymtab_comp_unit_reader): Likewise.
14091 (read_comp_units_from_section): Likewise.
14092 (scan_partial_symbols): Likewise.
14093 (add_partial_symbol): Likewise.
14094 (add_partial_subprogram): Likewise.
14095 (peek_die_abbrev): Likewise.
14096 (fixup_go_packaging): Likewise.
14097 (process_full_comp_unit): Likewise.
14098 (process_full_type_unit): Likewise.
14099 (process_imported_unit_die): Likewise.
14100 (dwarf2_compute_name): Likewise.
14101 (dwarf2_physname): Likewise.
14102 (read_import_statement): Likewise.
14103 (create_cus_hash_table): Assign dwarf2_physname instead of
14104 objfile.
14105 (read_func_scope): Access objfile through dwarf2_per_objfile.
14106 (read_lexical_block_scope): Likewise.
14107 (read_call_site_scope): Likewise.
14108 (read_variable): Likewise.
14109 (dwarf2_rnglists_process): Likewise.
14110 (dwarf2_ranges_process): Likewise.
14111 (dwarf2_ranges_read): Likewise.
14112 (dwarf2_record_block_ranges): Likewise.
14113 (dwarf2_add_field): Likewise.
14114 (dwarf2_add_member_fn): Likewise.
14115 (read_structure_type): Likewise.
14116 (process_structure_scope): Likewise.
14117 (read_enumeration_type): Likewise.
14118 (read_array_type): Likewise.
14119 (read_common_block): Likewise.
14120 (read_namespace_type): Likewise.
14121 (read_namespace): Likewise.
14122 (read_module_type): Likewise.
14123 (read_tag_pointer_type): Likewise.
14124 (read_tag_ptr_to_member_type): Likewise.
14125 (read_tag_string_type): Likewise.
14126 (read_subroutine_type): Likewise.
14127 (read_typedef): Likewise.
14128 (read_base_type): Likewise.
14129 (attr_to_dynamic_prop): Likewise.
14130 (read_subrange_type): Likewise.
14131 (read_unspecified_type): Likewise.
14132 (load_partial_dies): Likewise.
14133 (read_partial_die): Likewise.
14134 (find_partial_die): Likewise.
14135 (guess_partial_die_structure_name): Likewise.
14136 (fixup_partial_die): Likewise.
14137 (read_attribute_value): Likewise.
14138 (read_addr_index_from_leb128): Likewise.
14139 (dwarf2_read_addr_index): Likewise.
14140 (dwarf2_string_attr): Likewise.
14141 (lnp_state_machine::check_line_address): Likewise.
14142 (dwarf_decode_lines_1): Likewise.
14143 (dwarf_decode_lines): Likewise.
14144 (dwarf2_start_symtab): Likewise.
14145 (var_decode_location): Likewise.
14146 (new_symbol_full): Likewise.
14147 (dwarf2_const_value_data): Likewise.
14148 (dwarf2_const_value_attr): Likewise.
14149 (dwarf2_const_value): Likewise.
14150 (die_type): Likewise.
14151 (die_containing_type): Likewise.
14152 (lookup_die_type): Likewise.
14153 (guess_full_die_structure_name): Likewise.
14154 (anonymous_struct_prefix): Likewise.
14155 (dwarf2_name): Likewise.
14156 (follow_die_ref_or_sig): Likewise.
14157 (follow_die_offset): Likewise.
14158 (follow_die_ref): Likewise.
14159 (dwarf2_fetch_die_loc_sect_off): Likewise.
14160 (dwarf2_fetch_constant_bytes): Likewise.
14161 (dwarf2_fetch_die_type_sect_off): Likewise.
14162 (dwarf2_get_die_type): Likewise.
14163 (follow_die_sig): Likewise.
14164 (decode_locdesc): Likewise.
14165 (dwarf2_per_cu_objfile): Likewise.
14166 (dwarf2_per_cu_text_offset): Likewise.
14167 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14168 objfile.
14169 (set_die_type): Access objfile through
14170 dwarf2_per_objfile.
14171
14172 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14173
14174 * valprint.c (converted_character_d): Remove typedef.
14175 (DEF_VEC_O (converted_character_d)): Remove.
14176 (count_next_character): Use std::vector.
14177 (print_converted_chars_to_obstack): Likewise.
14178 (generic_printstr): Likewise.
14179
14180 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14181
14182 * xml-support.h (struct gdb_xml_value): Add constructor.
14183 <value>: Change type to unique_xmalloc_ptr.
14184 (gdb_xml_value_s): Remove typedef.
14185 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14186 (gdb_xml_element_start_handler): Change parameter type to
14187 std::vector.
14188 (xml_find_attribute): Likewise.
14189 * xml-support.c (xml_find_attribute): Change parameter type to
14190 std::vector and adjust.
14191 (gdb_xml_values_cleanup): Remove.
14192 (gdb_xml_parser::start_element): Adjust to std::vector.
14193 (xinclude_start_include): Change paraeter type to std::vector
14194 and adjust.
14195 * btrace.c (check_xml_btrace_version): Likewise.
14196 (parse_xml_btrace_block): Likewise.
14197 (parse_xml_btrace_pt_config_cpu): Likewise.
14198 (parse_xml_btrace_pt): Likewise.
14199 (parse_xml_btrace_conf_bts): Likewise.
14200 (parse_xml_btrace_conf_pt): Likewise.
14201 * memory-map.c (memory_map_start_memory): Likewise.
14202 (memory_map_start_property): Likewise.
14203 * osdata.c (osdata_start_osdata): Likewise.
14204 (osdata_start_item): Likewise.
14205 (osdata_start_column): Likewise.
14206 * remote.c (start_thread): Likewise.
14207 * solib-aix.c (library_list_start_library): Likewise.
14208 (library_list_start_list): Likewise.
14209 * solib-svr4.c (library_list_start_library): Likewise.
14210 (svr4_library_list_start_list): Likewise.
14211 * solib-target.c (library_list_start_segment): Likewise.
14212 (library_list_start_section): Likewise.
14213 (library_list_start_library): Likewise.
14214 (library_list_start_list): Likewise.
14215 * tracepoint.c (traceframe_info_start_memory): Likewise.
14216 (traceframe_info_start_tvar): Likewise.
14217 * xml-syscall.c (syscall_start_syscall): Likewise.
14218 * xml-tdesc.c (tdesc_start_target): Likewise.
14219 (tdesc_start_feature): Likewise.
14220 (tdesc_start_reg): Likewise.
14221 (tdesc_start_union): Likewise.
14222 (tdesc_start_struct): Likewise.
14223 (tdesc_start_flags): Likewise.
14224 (tdesc_start_enum): Likewise.
14225 (tdesc_start_field): Likewise.
14226 (tdesc_start_enum_value): Likewise.
14227 (tdesc_start_vector): Likewise.
14228
14229 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14230
14231 * extension.h (struct xmethod_worker) <clone>: Remove.
14232 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14233 Remove.
14234 (python_xmethod_worker::clone): Remove.
14235 * valops.c (find_overload_match): Use std::move instead of
14236 clone.
14237
14238 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14239
14240 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14241 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14242 <free_xmethod_worker_data>: Remove.
14243 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14244 <get_xmethod_arg_types>: Remove.
14245 <get_xmethod_result_type>: Remove.
14246 <invoke_xmethod>: Remove.
14247 * extension.c (new_xmethod_worker): Remove.
14248 (clone_xmethod_worker): Remove.
14249 (get_matching_xmethod_workers): Return void, pass std::vector by
14250 pointer.
14251 (get_xmethod_arg_types): Rename to...
14252 (xmethod_worker::get_arg_types): ... this, and adjust.
14253 (get_xmethod_result_type): Rename to...
14254 (xmethod_worker::get_result_type): ... this, and adjust.
14255 (invoke_xmethod): Remove.
14256 (free_xmethod_worker): Remove.
14257 (free_xmethod_worker_vec): Remove.
14258 * extension.h (enum ext_lang_rc): Move here from
14259 extension-priv.h.
14260 (struct xmethod_worker): Add constructor and destructor.
14261 <data>: Remove.
14262 <value>: Remove.
14263 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14264 virtual pure methods.
14265 <get_arg_types, get_result_type>: New methods.
14266 (xmethod_worker_ptr): Remove typedef.
14267 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14268 (xmethod_worker_vec): Remove typedef.
14269 (xmethod_worker_up): New typedef.
14270 (invoke_xmethod): Remove.
14271 (clone_xmethod_worker): Remove.
14272 (free_xmethod_worker): Remove.
14273 (free_xmethod_worker_vec): Remove.
14274 (get_xmethod_arg_types): Remove.
14275 (get_xmethod_result_type): Remove.
14276 * valops.c (find_method_list): Use std::vector, don't use
14277 intermediate vector.
14278 (value_find_oload_method_list): Use std::vector.
14279 (find_overload_match): Use std::vector.
14280 (find_oload_champ): Use std::vector.
14281 * value.c (value_free): Use operator delete.
14282 (value_of_xmethod): Rename to...
14283 (value_from_xmethod): ... this. Don't assign
14284 xmethod_worker::value, take rvalue-reference.
14285 (result_type_of_xmethod): Adjust.
14286 (call_xmethod): Adjust.
14287 * value.h: Include extension.h.
14288 (struct xmethod_worker): Don't forward-declare.
14289 (value_of_xmethod): Rename to...
14290 (value_from_xmethod): ... this, take rvalue-reference.
14291 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14292 (struct python_xmethod_worker): ... this, add constructor and
14293 destructor.
14294 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14295 (gdbpy_free_xmethod_worker_data): Rename to...
14296 (python_xmethod_worker::~python_xmethod_worker): ... this and
14297 adjust.
14298 (gdbpy_clone_xmethod_worker_data): Rename to...
14299 (python_xmethod_worker::clone): ... this and adjust.
14300 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14301 temporary vector.
14302 (gdbpy_get_xmethod_arg_types): Rename to...
14303 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14304 (gdbpy_get_xmethod_result_type): Rename to...
14305 (python_xmethod_worker::do_get_result_type): ... this and
14306 adjust.
14307 (gdbpy_invoke_xmethod): Rename to...
14308 (python_xmethod_worker::invoke): ... this and adjust.
14309 (new_python_xmethod_worker): Rename to...
14310 (python_xmethod_worker::python_xmethod_worker): ... this and
14311 adjust.
14312 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14313 Remove.
14314 (gdbpy_free_xmethod_worker_data): Remove.
14315 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14316 (gdbpy_get_xmethod_arg_types): Remove.
14317 (gdbpy_get_xmethod_result_type): Remove.
14318 (gdbpy_invoke_xmethod): Remove.
14319 * python/python.c (python_extension_ops): Remove obsolete
14320 callbacks.
14321
14322 2018-01-05 Pedro Alves <palves@redhat.com>
14323
14324 PR gdb/18653
14325 * common/signals-state-save-restore.c
14326 (save_original_signals_state): New parameter 'quiet'. Warn if we
14327 find a custom handler preinstalled, instead of internal erroring.
14328 But only warn if !quiet.
14329 * common/signals-state-save-restore.h
14330 (save_original_signals_state): New parameter 'quiet'.
14331 * main.c (captured_main_1): Move save_original_signals_state call
14332 after option handling, and pass QUIET.
14333
14334 2018-01-05 Pedro Alves <palves@redhat.com>
14335
14336 * spu-tdep.c (spu_catch_start): Pass
14337 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14338
14339 2018-01-05 Pedro Alves <palves@redhat.com>
14340
14341 PR gdb/22670
14342 * ada-lang.c (literal_symbol_name_matcher): New function.
14343 (ada_get_symbol_name_matcher): Use it for
14344 symbol_name_match_type::SEARCH_NAME.
14345 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14346 it down instead of assuming symbol_name_match_type::FULL.
14347 * block.h (block_lookup_symbol): New parameter 'match_type'.
14348 * c-valprint.c (print_unpacked_pointer): Use
14349 lookup_symbol_search_name instead of lookup_symbol.
14350 * compile/compile-object-load.c (get_out_value_type): Pass down
14351 symbol_name_match_type::SEARCH_NAME.
14352 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14353 symbol_name_match_type::FULL.
14354 * cp-support.c (cp_get_symbol_name_matcher): Handle
14355 symbol_name_match_type::SEARCH_NAME.
14356 * infrun.c (insert_exception_resume_breakpoint): Use
14357 lookup_symbol_search_name.
14358 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14359 * psymtab.c (maintenance_check_psymtabs): Use
14360 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14361 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14362 SYMBOL_SEARCH_NAME.
14363 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14364 if symbol_name_match_type::SEARCH_NAME.
14365 (lookup_symbol_in_language): Pass down
14366 symbol_name_match_type::FULL.
14367 (lookup_symbol_search_name): New.
14368 (lookup_language_this): Pass down
14369 symbol_name_match_type::SEARCH_NAME.
14370 (lookup_symbol_aux, lookup_local_symbol): New parameter
14371 'match_type'. Pass it down.
14372 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14373 (lookup_symbol_search_name): New declaration.
14374 (lookup_symbol_in_block): New 'match_type' parameter.
14375
14376 2018-01-05 Pedro Alves <palves@redhat.com>
14377
14378 PR gdb/22670
14379 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14380 ada_lookup_symbol.
14381 (ada_lookup_symbol): Reimplement in terms of
14382 ada_lookup_symbol_list, bits factored out from
14383 ada_lookup_encoded_symbol.
14384
14385 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14386
14387 * ada-exp.y (write_object_renaming): When subscripting an array
14388 using a symbol as the index, pass the block in call to
14389 ada_lookup_encoded_symbol when looking that symbol up.
14390
14391 2018-01-05 Jerome Guitton <guitton@adacore.com>
14392
14393 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14394 TYPE_INDEX_TYPE.
14395
14396 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14397
14398 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14399 the case where VALUE_LVAL (val0) is not lval_memory.
14400
14401 2018-01-05 Xavier Roirand <roirand@adacore.com>
14402
14403 * ada-valprint.c (print_optional_low_bound): Handle
14404 character-indexed array printing like boolean-indexed array
14405 printing.
14406
14407 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14408
14409 * NEWS: Create a new section for the next release branch.
14410 Rename the section of the current branch, now that it has
14411 been cut.
14412
14413 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14414
14415 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14416 * version.in: Bump version to 8.1.50.DATE-git.
14417
14418 2018-01-03 Xavier Roirand <roirand@adacore.com>
14419
14420 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14421 Add field.
14422 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14423 Add field.
14424 (default_exception_support_info) <catch_handlers_sym>: Add field.
14425 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14426 (ada_exception_name_addr_1): Add "catch handlers" handling.
14427 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14428 Update all callers.
14429 (create_excep_cond_exprs) <ex>: Add parameter.
14430 (re_set_exception): Update create_excep_cond_exprs call.
14431 (print_it_exception, print_one_exception, print_mention_exception)
14432 (print_recreate_exception): Add "catch handler" handling.
14433 (allocate_location_catch_handlers, re_set_catch_handlers)
14434 (check_status_catch_handlers, print_it_catch_handlers)
14435 (print_one_catch_handlers, print_mention_catch_handlers)
14436 (print_recreate_catch_handlers): New function.
14437 (catch_handlers_breakpoint_ops): New variable.
14438 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14439 Add parameter. Add "catch handler" handling.
14440 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14441 Add "catch handler" handling.
14442 (ada_exception_catchpoint_cond_string): Add "catch handler"
14443 handling.
14444 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14445 call.
14446 (catch_ada_handlers_command): New function.
14447 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14448 operations structure.
14449 (_initialize_ada_language): Add "catch handlers" command entry.
14450 * NEWS: Document "catch handlers" feature.
14451
14452 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14453
14454 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14455 account when creating the array type of the slice.
14456 (ada_value_slice): Likewise.
14457
14458 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14459
14460 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14461 New enum value.
14462 (create_array_type_with_stride): Add byte_stride_prop parameter.
14463 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14464 New parameter. Update all callers in this file.
14465 (array_type_has_dynamic_stride): New function.
14466 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14467 of arrays with dynamic byte strides.
14468 * dwarf2read.c (read_array_type): Add support for dynamic
14469 DW_AT_byte_stride attributes.
14470
14471 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14472
14473 * dwarf2read.c (read_unspecified_type): Treat
14474 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14475
14476 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14477
14478 Update copyright year range in all GDB files.
14479
14480 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
14481
14482 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14483 and gdb/testsuite/gdb.base/step-line.c.
14484
14485 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14486
14487 * copyright.py (main): Dump the contents of
14488 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14489 even if BY_HAND is empty.
14490
14491 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14492
14493 * top.c (print_gdb_version): Update Copyright year in version
14494 message.
14495
14496 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14497
14498 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14499
14500 For older changes see ChangeLog-2017.
14501 \f
14502 Local Variables:
14503 mode: change-log
14504 left-margin: 8
14505 fill-column: 74
14506 version-control: never
14507 coding: utf-8
14508 End:
This page took 0.334997 seconds and 4 git commands to generate.