GDB: Work around buggy dwarf line information produced by Codewarrior Version 5.0...
[binutils-gdb.git] / gdb / ChangeLog
1 2018-10-08 John Darrington <john@darrington.wattle.id.au>
2
3 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
4 (check_producer): Check if the producer is codewarrior.
5 (producer_is_codewarrior): New function.
6 (lnp_state_machine::record_line): Ignore is_stmt flag for records
7 produced by codewarrior.
8 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
9
10 2018-10-06 Tom Tromey <tom@tromey.com>
11
12 PR python/19399:
13 * python/py-inferior.c: Add "architecture" entry.
14 (infpy_architecture): New function.
15
16 2018-10-06 Tom Tromey <tom@tromey.com>
17
18 PR python/21765:
19 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
20 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
21 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
22 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
23
24 2018-10-06 Tom Tromey <tom@tromey.com>
25
26 PR build/17077:
27 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
28 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
29 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
30 #include.
31
32 2018-10-06 Tom Tromey <tom@tromey.com>
33
34 * python/py-breakpoint.c (bppy_get_location): Handle a
35 bp_breakpoint without a location.
36
37 2018-10-06 Tom Tromey <tom@tromey.com>
38
39 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
40 (_RegEx): Reformat help text.
41 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
42 (AnyCallerIs, AnyCallerMatches): Reformat help text.
43 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
44 text.
45 * python/lib/gdb/command/xmethods.py (InfoXMethod)
46 (EnableXMethod, DisableXMethod): Remove help indentation.
47 Capitalize meta-syntactic variables.
48 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
49 (EnableUnwinder, DisableUnwinder): Remove help indentation.
50 Capitalize meta-syntactic variables.
51 * python/lib/gdb/command/explore.py (ExploreCommand)
52 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
53 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
54 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
55 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
56 Remove help indentation.
57 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
58 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
59 (DisableFrameFilter, SetFrameFilterPriority)
60 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
61
62 2018-10-06 Tom Tromey <tom@tromey.com>
63
64 PR tui/28819:
65 * tui/tui-io.c (gdb_wgetch): New function.
66 (tui_mld_getc, tui_getc): Use it.
67
68 2018-10-05 Tom Tromey <tom@tromey.com>
69
70 * sol-thread.c (sol_thread_target::wait): Rename inner
71 "save_ptid".
72
73 2018-10-04 Tom Tromey <tom@tromey.com>
74
75 * configure: Rebuild.
76 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
77
78 2018-10-04 Tom Tromey <tom@tromey.com>
79
80 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
81 declaration of "block".
82
83 2018-10-04 Tom Tromey <tom@tromey.com>
84
85 * common/filestuff.c (fdwalk): Remove inner declaration of
86 "result".
87
88 2018-10-04 Tom Tromey <tom@tromey.com>
89
90 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
91 "structs_addr" and hoist declaration.
92
93 2018-10-04 Tom Tromey <tom@tromey.com>
94
95 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
96 variable "size".
97
98 2018-10-04 Tom Tromey <tom@tromey.com>
99
100 * mdebugread.c (parse_partial_symbols): Use std::string.
101
102 2018-10-04 Tom Tromey <tom@tromey.com>
103
104 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
105 * p-valprint.c (pascal_val_print): Split inner "i" variable.
106 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
107 header.
108 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
109 more inner scope.
110 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
111 * varobj.c (varobj_update): Rename inner "newobj",
112 "type_changed".
113 * valprint.c (generic_emit_char): Rename inner "buf".
114 * valops.c (find_overload_match): Rename inner "temp".
115 (value_struct_elt_for_reference): Declare "v" in more inner
116 scope.
117 * v850-tdep.c (v850_push_dummy_call): Rename "len".
118 * unittests/array-view-selftests.c (run_tests): Rename inner
119 "vec".
120 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
121 header.
122 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
123 "tsv" in more inner scope.
124 (print_one_static_tracepoint_marker): Rename inner
125 "tuple_emitter".
126 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
127 (tic6x_push_dummy_call): Don't redeclare "addr".
128 * target-float.c: Declare "dto" lower.
129 * symtab.c (lookup_local_symbol): Rename inner "sym".
130 (find_pc_sect_line): Rename inner "pc".
131 * stack.c (print_frame): Don't redeclare "gdbarch".
132 (return_command): Rename inner "gdbarch".
133 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
134 "sp".
135 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
136 header.
137 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
138 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
139 scope.
140 * remote.c (remote_target::update_thread_list): Don't redeclare
141 "tp".
142 (remote_target::process_initial_stop_replies): Rename inner
143 "thread".
144 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
145 (remote_target::wait_as): Don't redeclare "stop_reply".
146 (remote_target::get_thread_local_address): Rename inner
147 "result".
148 (remote_target::get_tib_address): Likewise.
149
150 * regcache.c (cooked_read_test): Rename "regnum".
151 * record-btrace.c (cmd_record_btrace_start): Rename inner
152 "exception".
153 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
154 loop header.
155 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
156 header.
157 (ppu2spu_sniffer): Rename inner "buf".
158 * parse.c (operator_check_standard): Rename inner "type",
159 "objfile".
160 * p-valprint.c (pascal_val_print): Introduce new scope for
161 "low_bound", "high_bound".
162 * p-exp.y (yylex): Declare "i" in loop header.
163 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
164 Lower declaration of "s".
165 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
166 header.
167 (nios2_push_dummy_call): Rename "len".
168 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
169 "buf".
170 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
171 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
172 (linux_xfer_osdata_modules): Likewise.
173 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
174 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
175 (mips_o64_push_dummy_call): Likewise.
176 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
177 "op".
178 * mi/mi-main.c (list_available_thread_groups): Rename inner
179 "tuple_emitter".
180 (mi_cmd_data_read_memory): Rename inner "opts".
181 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
182 "tuple_emitter".
183 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
184 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
185 more inner scope.
186 (parse_partial_symbols): Rename inner "pst", "p", "name"
187 * main.c (captured_main_1): Rename inner "i"s.
188 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
189 "oso2".
190 * linux-tdep.c (linux_info_proc): Rename inner "filename".
191 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
192 * infrun.c (handle_no_resumed): Don't redeclare "thread".
193 (handle_signal_stop): Rename inner "gdbarch".
194 (handle_command): Declare "signum" in loop header.
195 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
196 "status".
197 (examine_prologue): Rename inner "sol" and "sof".
198 (ia64_extract_return_value): Rename inner "val". Declare another
199 "val" in a more inner scope.
200 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
201 inner scope.
202 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
203 "except".
204 * findvar.c (default_read_var_value): Don't redeclare "addr".
205 * f-exp.y (yylex): Declare "i" in loop header.
206 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
207 Rename inner "type", "expect_type".
208 (evaluate_subexp_for_sizeof): Rename inner "pc".
209 * elfread.c (elf_symfile_read): Rename inner "abfd".
210 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
211 "bytes_read".
212 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
213 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
214 (dwarf_decode_line_header): Rename inner "lh".
215 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
216 "offset". Declare "i" in loop header.
217 (disassemble_dwarf_expression): Rename inner "addr_size".
218 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
219 inner "result".
220 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
221 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
222 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
223 "inner_list_emitter".
224 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
225 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
226 declaration in a block.
227 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
228 * cp-valprint.c (cp_print_value_fields): Don't redeclare
229 "obstack_final_size".
230 * cp-support.c (inspect_type): Declare "i" in loop header.
231 * compile/compile.c (compile_instance::insert_symbol_error):
232 Rename inner "e".
233 * common/agent.c (agent_run_command): Remove inner "ret"
234 declaration.
235 * coffread.c (coff_symfile_read): Rename inner "name".
236 (coff_symfile_read): Rename inner "abfd".
237 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
238 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
239 "high".
240 * c-exp.y (lex_one_token): Move "len" declaration lower.
241 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
242 "gdbarch".
243 (create_exception_master_breakpoint): Likewise. Don't redeclare
244 "b".
245 (watch_command_1): Declare "mark" later.
246 (clear_command): Don't shadow "a" or "b".
247 (delete_command): Rename inner "b".
248 (delete_trace_command): Likewise.
249 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
250 "op".
251 (arm_gdbarch_init): Remove inner "e_flags".
252 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
253 "offset" in inner blocks.
254
255 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
256
257 * dwarf-index-write.c (file_write): Don't write if the vector is
258 empty.
259
260 2018-10-05 Tom de Vries <tdevries@suse.de>
261
262 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
263 PyArg_ParseTuple call.
264
265 2018-10-05 Tom de Vries <tdevries@suse.de>
266
267 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
268 PyArg_ParseTuple call.
269
270 2018-10-04 Joel Brobecker <brobecker@adacore.com>
271
272 * psymtab.c (recursively_search_psymtabs): Reformat parameters
273 to avoid exceeding 80 characters per line limit.
274
275 2018-10-04 Tom Tromey <tom@tromey.com>
276
277 * symfile.c (syms_from_objfile_1, finish_new_objfile)
278 (reread_symbols): Update.
279 * complaints.h (clear_complaints): Remove argument.
280 * complaints.c (enum complaint_series): Remove.
281 (series): Remove global.
282 (complaint_internal): Update.
283 (clear_complaints): Remove argument.
284
285 2018-10-04 Tom Tromey <tom@tromey.com>
286
287 * symfile.c (symbol_file_add_with_addrs): Do not print "no
288 debugging symbols" message if there is a separate debug objfile.
289
290 2018-10-04 Tom Tromey <tom@tromey.com>
291
292 PR cli/19551:
293 * symfile.c (symbol_file_add_with_addrs): Update output.
294 * psymtab.c (require_partial_symbols): Update output.
295
296 2018-10-04 Tom Tromey <tom@tromey.com>
297
298 PR cli/22234:
299 * complaints.c: Emit \n.
300
301 2018-10-04 Tom Tromey <tom@tromey.com>
302
303 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
304 (separate_debug_file_exists, find_separate_debug_file)
305 (add_symbol_file_command, reread_symbols, allocate_symtab)
306 (allocate_compunit_symtab): Use filtered printing, not
307 unfiltered.
308 * psymtab.c (require_partial_symbols, dump_psymtab)
309 (allocate_psymtab): Use filtered printing, not unfiltered.
310
311 2018-10-04 Tom Tromey <tom@tromey.com>
312
313 * complaints.c (complaint_internal): Correctly check complaint
314 count.
315
316 2018-10-04 Tom Tromey <tom@tromey.com>
317
318 * complaints.h (struct complaints): Remove declaration.
319 * complaints.c (clear_complaints): Remove an unused variable.
320
321 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
322
323 * MAINTAINERS (Write After Approval): Add self.
324
325 2018-10-03 Tom Tromey <tom@tromey.com>
326
327 * guile/scm-value.c (gdbscm_value_to_string): Initialize
328 "buffer_contents".
329 * coffread.c (coff_symtab_read): Initialize "newobj".
330
331 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * dwarf2read.c (read_func_scope): Remove struct keyword in
334 range-based for.
335
336 2018-10-03 Tom Tromey <tom@tromey.com>
337
338 * README: Mention --enable-ubsan.
339 * NEWS: Mention --enable-ubsan.
340 * acinclude.m4: Include sanitize.m4.
341 * configure: Rebuild.
342 * configure.ac: Call AM_GDB_UBSAN.
343 * sanitize.m4: New file.
344
345 2018-10-03 Tom Tromey <tom@tromey.com>
346
347 * expression.h (enum exp_opcode): Use uint8_t as base type.
348 * expprint.c (op_name): Handle invalid opcodes.
349
350 2018-10-03 Tom Tromey <tom@tromey.com>
351
352 * parse.c (prefixify_expression): Add assert.
353 (parse_exp_in_context_1): Throw exception if the expression is
354 empty.
355
356 2018-10-03 Tom Tromey <tom@tromey.com>
357
358 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
359
360 2018-10-03 Tom Tromey <tom@tromey.com>
361
362 * c-exp.y (parse_number): Work in unsigned. Remove casts.
363
364 2018-10-03 Tom Tromey <tom@tromey.com>
365
366 * dwarf2read.c (read_subrange_type): Make "negative_mask"
367 unsigned.
368
369 2018-10-03 Tom Tromey <tom@tromey.com>
370
371 * findvar.c (extract_integer): Do work in an unsigned type.
372
373 2018-10-03 Tom Tromey <tom@tromey.com>
374
375 * common/enum-flags.h (enum_flags::operator~): Add static assert.
376 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
377 base type.
378 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
379 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
380 type.
381 * c-lang.h (enum c_string_type_values): Use unsigned as base
382 type.
383 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
384
385 2018-10-03 Tom Tromey <tom@tromey.com>
386
387 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
388 <~dwarf2_frame_state_reg_info>: Update.
389 <dwarf2_frame_state_reg_info>: Update.
390 <alloc_regs>: Add assertion. Update.
391 <reg>: Now a std::vector.
392 <num_regs>: Remove.
393 <swap>: Update.
394 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
395 (execute_cfa_program_test, dwarf2_frame_cache): Update.
396
397 2018-10-03 Tom Tromey <tom@tromey.com>
398
399 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
400
401 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
402
403 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
404
405 2018-10-02 Tom Tromey <tom@tromey.com>
406
407 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
408
409 2018-10-02 John Darrington <john@darrington.wattle.id.au>
410
411 * NEWS: Mention changed commands.
412 * ser-uds.c: New file.
413 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
414 * configure: Regenerate.
415 * Makefile.in: Add new file.
416 * serial.c (serial_open): Check if filename is a socket
417 and lookup the appropriate interface accordingly.
418
419 2018-10-01 Alan Hayward <alan.hayward@arm.com>
420
421 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
422 define.
423 (AARCH64_EXTRA_MAGIC): Likewise.
424 (AARCH64_FPSIMD_MAGIC): Likewise.
425 (AARCH64_SVE_MAGIC): Likewise.
426 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
427 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
428 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
429 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
430 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
431 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
432 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
433 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
434 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
435 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
436 (read_aarch64_ctx): Add function.
437 (aarch64_linux_sigframe_init): Detect FP registers.
438
439 2018-10-01 Alan Hayward <alan.hayward@arm.com>
440
441 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
442 (AARCH64_D0_REGNUM): Likewise.
443 (AARCH64_S0_REGNUM): Likewise.
444 (AARCH64_H0_REGNUM): Likewise.
445 (AARCH64_B0_REGNUM): Likewise.
446 (AARCH64_SVE_V0_REGNUM): Likewise.
447 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
448 (AARCH64_D0_REGNUM): Likewise.
449 (AARCH64_S0_REGNUM): Likewise.
450 (AARCH64_H0_REGNUM): Likewise.
451 (AARCH64_B0_REGNUM): Likewise.
452 (AARCH64_SVE_V0_REGNUM): Likewise.
453
454 2018-10-01 Gary Benson <gbenson@redhat.com>
455
456 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
457 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
458 prfpregset_t instead of gdb_prfpregset_t.
459 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
460 * configure, config.in: Rebuild.
461
462 2018-10-01 Gary Benson <gbenson@redhat.com>
463
464 * common/gdb_proc_service.h: New file, factored out from...
465 * gdb_proc_service.h: Moved common code to the above file.
466 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
467
468 2018-10-01 Gary Benson <gbenson@redhat.com>
469
470 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
471 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
472
473 2018-10-01 Gary Benson <gbenson@redhat.com>
474
475 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
476 (AC_CHECK_HEADERS): Check for linux/elf.h.
477 * configure, config.in: Rebuild.
478 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
479 doesn't define elf_fpregset_t.
480
481 2018-10-01 Gary Benson <gbenson@redhat.com>
482
483 * gdb_proc_service.h: Whitespace change.
484
485 2018-10-01 Tom Tromey <tom@tromey.com>
486
487 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
488 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
489 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
490
491 2018-10-01 Tom Tromey <tom@tromey.com>
492
493 * README: Minor change.
494
495 2018-09-30 Pedro Alves <palves@redhat.com>
496
497 * darwin-nat-info.c (darwin_debug_regions_recurse)
498 (info_mach_exceptions_command): Remove unused local variables.
499 * darwin-nat.c (darwin_decode_notify_message)
500 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
501 (darwin_stop_inferior, darwin_setup_exceptions)
502 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
503 (darwin_nat_target::attach, darwin_nat_target::detach)
504 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
505 local variables.
506 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
507 variables.
508
509 2018-09-29 Tom Tromey <tom@tromey.com>
510
511 * README: Remove some leftover text.
512
513 2018-09-29 Tom Tromey <tom@tromey.com>
514
515 * PROBLEMS: Rewrite.
516 * README: Update.
517
518 2018-09-28 John Baldwin <jhb@FreeBSD.org>
519
520 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
521 case with explicit breakpoint kind.
522 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
523 'additional_info' and related logic.
524 (riscv_debug_breakpoints): New variable.
525 (riscv_breakpoint_kind_from_pc): Use the length of the existing
526 instruction to determine the breakpoint kind.
527 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
528 flag. Update description of 'set/show riscv
529 use-compressed-breakpoints' flag.
530
531 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
532
533 (NEWS): Mention changes to frame related commands.
534 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
535 (add_prefix_cmd_suppress_notification): New function.
536 (add_com_suppress_notification): Call
537 add_cmd_suppress_notification.
538 * command.h (add_cmd_suppress_notification): Declare.
539 (add_prefix_cmd_suppress_notification): Declare.
540 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
541 (parse_frame_specification): Moved from stack.c, with
542 simplification to handle a single argument.
543 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
544 switch to the selected frame. Add a header comment.
545 * stack.c: Remove 'safe-ctype.h' include.
546 (find_frame_for_function): Add declaration.
547 (find_frame_for_address): New function.
548 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
549 (frame_selection_by_function_completer): New function.
550 (info_frame_command): Rename to...
551 (info_frame_command_core): ...this, and update parameter types.
552 (select_frame_command): Rename to...
553 (select_frame_command_core): ...this, and update parameter types.
554 (frame_command): Rename to...
555 (frame_command_core): ...this, and update parameter types.
556 (class frame_command_helper): New class to wrap implementations of
557 frame related sub-commands.
558 (frame_apply_cmd_list): New static global.
559 (frame_cmd_list): Make static.
560 (select_frame_cmd_list): New global for sub-commands.
561 (info_frame_cmd_list): New global for sub-commands.
562 (_initialize_stack): Register sub-commands for 'frame',
563 'select-frame', and 'info frame'. Update 'frame apply' commands
564 to use frame_apply_cmd_list. Move function local static
565 frame_apply_list to file static frame_apply_cmd_list for
566 consistency.
567 * stack.h (select_frame_command): Delete declarationn.
568 (select_frame_for_mi): Declare new function.
569
570 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
571
572 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
573 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
574 and NOP.
575
576 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
577
578 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
579
580 2018-09-26 Tom Tromey <tom@tromey.com>
581
582 * valops.c (auto_abandon): Remove dead code.
583
584 2018-09-26 Tom Tromey <tom@tromey.com>
585
586 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
587
588 2018-09-24 Tom Tromey <tom@tromey.com>
589
590 * common/pathstuff.c (get_standard_cache_dir): Make
591 "xdg_cache_home" and "home" const.
592 * top.c (init_history): Make "tmpenv" const.
593 * main.c (get_init_files): Make "homedir" const.
594
595 2018-09-23 Tom Tromey <tom@tromey.com>
596
597 PR python/18852:
598 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
599
600 2018-09-23 Tom Tromey <tom@tromey.com>
601
602 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
603 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
604 * python/python-internal.h (gdbpy_handle_exception): Declare.
605 * python/py-utils.c (gdbpy_handle_exception): New function.
606
607 2018-09-23 Tom Tromey <tom@tromey.com>
608
609 PR python/17284:
610 * python/py-type.c (typy_template_argument): Check for negative
611 argument number.
612
613 2018-09-23 Tom Tromey <tom@tromey.com>
614
615 PR python/14062:
616 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
617
618 2018-09-23 Tom Tromey <tom@tromey.com>
619
620 PR python/18170:
621 * python/py-value.c (valpy_int): Allow conversion from pointer
622 type.
623
624 2018-09-23 Tom Tromey <tom@tromey.com>
625
626 PR python/20126:
627 * python/py-value.c (valpy_int): Respect type sign.
628
629 2018-09-23 Tom Tromey <tom@tromey.com>
630
631 PR python/18352;
632 * python/py-value.c (valpy_float): Allow conversions from int or
633 char.
634 (valpy_int, valpy_long): Allow conversions from float.
635
636 2018-09-23 Tom Tromey <tom@tromey.com>
637
638 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
639 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
640
641 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
642
643 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
644 __sighndlr.
645 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
646
647 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
648
649 * windows-nat.c (windows_nat_target::wait): Remove a spurious
650 target_terminal::ours().
651
652 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
653
654 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
655 of vl to ULONGEST.
656
657 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
658
659 * breakpoint.c (update_inserted_breakpoint_locations): Remove
660 redundant condition.
661
662 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
663
664 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
665
666 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
667 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
668 * sol-thread.c (ps_pdmodel): Don't guard definition.
669
670 * procfs.c: Fix formatting.
671
672 * procfs.c (sysset_t_alloc): Remove.
673 (create_procinfo): Use XNEW instead of sysset_t_alloc.
674 (procfs_debug_inferior): Likewise.
675 (procfs_set_exec_trap): Likewise.
676 (proc_set_traced_sysentry): Don't allocate argp dynamically.
677 (proc_set_traced_sysexit): Likewise.
678
679 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
680 (dead_procinfo): Likewise.
681 (proc_warn): Likewise.
682 (proc_error): Likewise.
683 (proc_get_LDT_entry): Likewise.
684 (do_attach): Likewise.
685 (procfs_target::pid_to_str): Likewise.
686 (iterate_over_mappings): Likewise.
687
688 * procfs.c (create_procinfo): Fix ARI warning.
689 (proc_get_status): Likewise.
690 (proc_stop_process): Likewise.
691 (proc_run_process): Likewise.
692 (proc_kill): Likewise.
693 (proc_get_LDT_entry): Likewise.
694 (procfs_find_LDT_entry): Likewise.
695 (proc_update_threads): Likewise.
696 (proc_iterate_over_threads): Likewise.
697 (do_attach): Likewise.
698 (procfs_xfer_memory): Likewise.
699 (invalidate_cache): Likewise.
700 (procfs_target::resume): Likewise.
701 (procfs_init_inferior): Likewise.
702 (procfs_set_exec_trap): Likewise.
703 (procfs_target::thread_alive): Likewise.
704 (procfs_target::pid_to_exec_file): Likewise.
705 (iterate_over_mappings): Likewise.
706 (procfs_target::make_corefile_notes): Likewise.
707 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
708
709 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
710 (procfs_find_LDT_entry): Likewise.
711 * sol-thread.c (ps_lgetLDT): Likewise.
712
713 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
714
715 PR tdep/17903
716 * procfs.c (procfs_target): Declare pid_to_exec_file.
717 (procfs_target::pid_to_exec_file): New.
718
719 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
720
721 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
722 renaming.
723 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
724 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
725
726 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
727
728 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
729 (supply_fpregset, fill_fpregset): Move ...
730 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
731 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
732 Remove references to ioctl-based procfs.
733 Include <sys/reg.h>.
734 Remove PR_MODEL_NATIVE guards.
735 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
736 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
737
738 2018-09-19 Xavier Roirand <roirand@adacore.com>
739
740 PR gdb/20981:
741 * solib-darwin.c (darwin_get_dyld_bfd): New function.
742 (darwin_solib_get_all_image_info_addr_at_init): Update call.
743 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
744
745 2018-09-19 John Baldwin <jhb@FreeBSD.org>
746
747 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
748 (fbsd_print_sockaddr_in6): Likewise.
749
750 2018-09-19 Richard Bunt <richard.bunt@arm.com>
751 Chris January <chris.january@arm.com>
752
753 * eval.c (skip_undetermined_arglist): Skip argument list helper.
754 (evaluate_subexp_standard): Return a dummy type when
755 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
756 OP_F77_UNDETERMINED_ARGLIST case.
757 * expression.h (enum noside): Update comment.
758
759 2018-09-19 George Vasick <george.vasick@oracle.com>
760
761 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
762
763 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
764 April Chin <april.chin@oracle.com>
765 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
766
767 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
768 uint_t lwpid_t.
769 (create_procinfo): Print pids in /proc without leading zeros.
770
771 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
772
773 * nios2-tdep.c (nios2_gcc_target_options): New.
774 (nios2_gdb_arch_init): Install new hook.
775
776 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
777
778 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
779 New file.
780 * update-gnulib.sh: Apply patch.
781 * configure: Re-generate.
782
783 2018-09-18 John Baldwin <jhb@FreeBSD.org>
784
785 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
786 description. Make "info proc" command descriptions more
787 consistent.
788
789 2018-09-18 John Baldwin <jhb@FreeBSD.org>
790
791 * NEWS: Mention 'info proc files' command.
792
793 2018-09-18 John Baldwin <jhb@FreeBSD.org>
794
795 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
796 descriptors for IP_FILES and IP_ALL.
797
798 2018-09-18 John Baldwin <jhb@FreeBSD.org>
799
800 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
801 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
802 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
803 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
804 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
805 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
806 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
807 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
808 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
809 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
810 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
811 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
812 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
813 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
814 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
815 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
816 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
817 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
818 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
819 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
820 (struct fbsd_sockaddr_un): New types.
821 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
822 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
823 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
824 (fbsd_core_info_proc_files): New functions.
825 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
826 IP_ALL.
827 * fbsd-tdep.h (fbsd_info_proc_files_header)
828 (fbsd_info_proc_files_entry): New.
829
830 2018-09-18 John Baldwin <jhb@FreeBSD.org>
831
832 * defs.h (enum info_proc_what) [IP_FILES]: New value.
833 * infcmd.c (info_proc_cmd_files): New function.
834 (_initialize_infcmd): Register 'info proc files' command.
835
836 2018-09-18 John Baldwin <jhb@FreeBSD.org>
837
838 * gnulib/aclocal-m4-deps.mk: Re-generate.
839 * gnulib/aclocal.m4: Re-generate.
840 * gnulib/config.in: Re-generate.
841 * gnulib/configure: Re-generate.
842 * gnulib/import/Makefile.am: Re-generate.
843 * gnulib/import/Makefile.in: Re-generate.
844 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
845 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
846 * gnulib/import/arpa_inet.in.h: New file.
847 * gnulib/import/inet_ntop.c: New file.
848 * gnulib/import/m4/arpa_inet_h.m4: New file.
849 * gnulib/import/m4/inet_ntop.m4: New file.
850 * gnulib/import/m4/netinet_in_h.m4: New file.
851 * gnulib/import/m4/socklen.m4: New file.
852 * gnulib/import/m4/sockpfaf.m4: New file.
853 * gnulib/import/m4/stdalign.m4: New file.
854 * gnulib/import/m4/sys_uio_h.m4: New file.
855 * gnulib/import/netinet_in.in.h: New file.
856 * gnulib/import/stdalign.in.h: New file.
857 * gnulib/import/sys_socket.c: New file.
858 * gnulib/import/sys_socket.in.h: New file.
859 * gnulib/import/sys_uio.in.h: New file.
860 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
861 module.
862
863 2018-09-18 John Baldwin <jhb@FreeBSD.org>
864
865 * gnulib/aclocal-m4-deps.mk: New file.
866 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
867 deterministically.
868
869 2018-09-18 John Baldwin <jhb@FreeBSD.org>
870
871 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
872 KVE_PATH.
873
874 2018-09-18 Tom Tromey <tom@tromey.com>
875
876 * compile/compile-object-load.c (struct
877 link_hash_table_cleanup_data): Add constructor and destructor.
878 Use DISABLE_COPY_AND_ASSIGN.
879 (~link_hash_table_cleanup_data): Rename from
880 link_hash_table_free. Now a destructor.
881 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
882
883 2018-09-18 Tom Tromey <tom@tromey.com>
884
885 * compile/compile-object-run.c (do_module_cleanup): Use delete.
886 * compile/compile-object-load.c (struct munmap_list): Move to
887 header file.
888 (munmap_list::add): Rename from munmap_list_add; rewrite.
889 (munmap_list::~munmap_list): Rename from munmap_list_free.
890 (munmap_listp_free_cleanup): Remove.
891 (compile_object_load): Update.
892 * compile/compile-object-load.h (struct munmap_list): Move from
893 compile-object-load.c. Rewrite.
894
895 2018-09-18 Alan Hayward <alan.hayward@arm.com>
896
897 * aarch64-tdep.c (pass_in_v): Use register size.
898 (aarch64_extract_return_value): Likewise.
899 (aarch64_store_return_value): Likewise.
900
901 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
902
903 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
904 rlim_t.
905
906 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
907
908 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
909 Fix short help line.
910
911 2018-09-17 Tom Tromey <tom@tromey.com>
912
913 PR python/20445:
914 * configure: Rebuild.
915 * configure.ac: Conditionally use -DNDEBUG for Python.
916
917 2018-09-17 Tom Tromey <tom@tromey.com>
918
919 * configure: Rebuild.
920 * configure.ac: Use gmp as a library dependency when checking for
921 mpfr.
922
923 2018-09-17 Pedro Alves <palves@redhat.com>
924
925 * python/py-inferior.c (find_inferior_object): Delete.
926
927 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
928
929 * compile/compile-cplus-types.c
930 (compile_cplus_instance::enter_scope): Don't use new_scope after
931 std::move.
932
933 2018-09-17 Tom Tromey <tom@tromey.com>
934
935 * common/pathstuff.c (get_standard_cache_dir): Use
936 ~/Library/Caches on macOS.
937 * common/pathstuff.h (get_standard_cache_dir): Update comment.
938
939 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
940
941 PR python/23669
942 * breakpoint.c (commands_cmd_element): New.
943 (_initialize_breakpoint): Assign commands_cmd_element.
944 * breakpoint.h (commands_cmd_element): New.
945 * cli/cli-script.c (while_cmd_element, if_command,
946 define_cmd_element): New.
947 (command_name_equals): Remove.
948 (process_next_line): Compare commands by pointer, not by name.
949 (_initialize_cli_script): Assign the various cmd_list_element
950 variables.
951 * compile/compile.c (compile_cmd_element): New.
952 (_initialize_compile): Assign compile_cmd_element.
953 * compile/compile.h (compile_cmd_element): New.
954 * guile/guile.c (guile_cmd_element): New.
955 (install_gdb_commands): Assign guile_cmd_element.
956 * guile/guile.h (guile_cmd_element): New.
957 * python/python.c (python_cmd_element): New.
958 (_initialize_python): Assign python_cmd_element.
959 * python/python.h (python_cmd_element): New.
960 * tracepoint.c (while_stepping_cmd_element): New.
961 (_initialize_tracepoint): Assign while_stepping_cmd_element.
962 * tracepoint.h (while_stepping_cmd_element): New.
963
964 2018-09-17 Tom Tromey <tom@tromey.com>
965
966 * infrun.c (save_infcall_suspend_state): Return
967 infcall_suspend_state_up.
968 (save_infcall_control_state): Return infcall_control_state_up.
969 * inferior.h (save_infcall_suspend_state)
970 (save_infcall_control_state): Declare later. Return unique
971 pointers.
972
973 2018-09-17 Tom Tromey <tom@tromey.com>
974
975 * infrun.c (struct stop_context): Declare constructor,
976 destructor, "changed" method.
977 (stop_context::stop_context): Rename from save_stop_context.
978 (stop_context::~stop_context): Rename from
979 release_stop_context_cleanup.
980 (normal_stop): Update.
981 (stop_context::changed): Rename from stop_context_changed. Return
982 bool.
983
984 2018-09-17 Tom Tromey <tom@tromey.com>
985
986 * inferior.h (struct infcall_suspend_state_deleter): New.
987 (infcall_suspend_state_up): New typedef.
988 (struct infcall_control_state_deleter): New.
989 (infcall_control_state_up): New typedef.
990 (make_cleanup_restore_infcall_suspend_state)
991 (make_cleanup_restore_infcall_control_state): Don't declare.
992 * infcall.c (call_function_by_hand_dummy): Update.
993 * infrun.c (do_restore_infcall_suspend_state_cleanup)
994 (make_cleanup_restore_infcall_suspend_state): Remove.
995 (do_restore_infcall_control_state_cleanup)
996 (make_cleanup_restore_infcall_control_state): Remove.
997
998 2018-09-17 Tom Tromey <tom@tromey.com>
999
1000 * gdbthread.h (struct thread_control_state): Add initializer.
1001 (class thread_info) <control>: Remove initializer.
1002 * inferior.h (struct inferior_control_state): Add initializer.
1003 (class inferior) <control>: Remove initializer.
1004 (exit_inferior_1): Update.
1005 * infrun.c (struct infcall_control_state): Add constructors.
1006 (save_infcall_control_state): Use new.
1007 (restore_infcall_control_state, discard_infcall_control_state):
1008 Use delete.
1009
1010 2018-09-17 Tom Tromey <tom@tromey.com>
1011
1012 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1013 unique_ptr.
1014 <siginfo_data>: Now a unique_xmalloc_ptr.
1015 (save_infcall_suspend_state, restore_infcall_suspend_state)
1016 (discard_infcall_suspend_state)
1017 (get_infcall_suspend_state_regcache): Update.
1018
1019 2018-09-17 Tom Tromey <tom@tromey.com>
1020
1021 * gdbthread.h (struct thread_suspend_state): Add initializers.
1022 (class thread_info) <suspend>: Remove initializer.
1023 * infrun.c (struct infcall_suspend_state): Add initializers.
1024 (save_infcall_suspend_state): Use new.
1025 (discard_infcall_suspend_state): Use delete.
1026
1027 2018-09-16 Tom Tromey <tom@tromey.com>
1028
1029 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1030 Remove.
1031 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1032 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1033 (py_varobj_iter_new): Likewise.
1034 (py_varobj_get_iterator): Use gdbpy_ref.
1035
1036 2018-09-16 Tom Tromey <tom@tromey.com>
1037
1038 * python/py-threadevent.c (py_get_event_thread): Simplify.
1039 * python/py-inferior.c (infpy_thread_from_thread_handle):
1040 Return immediately after calling thread_to_thread_object. Use
1041 Py_RETURN_NONE.
1042 (thread_to_thread_object): Set the exception on a NULL return.
1043
1044 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1045
1046 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1047
1048 2018-09-16 Tom Tromey <tom@tromey.com>
1049
1050 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1051 Remove.
1052
1053 2018-09-16 Tom Tromey <tom@tromey.com>
1054
1055 * python/python-internal.h (thread_to_thread_object): Change
1056 return type.
1057 * python/py-inferior.c (thread_to_thread_object): Return a new
1058 reference.
1059 (infpy_thread_from_thread_handle): Update.
1060 * python/py-infthread.c (gdbpy_selected_thread): Update.
1061 * python/py-stopevent.c (create_stop_event_object): Update.
1062 * python/py-threadevent.c (py_get_event_thread): Return a new
1063 reference.
1064 (py_get_event_thread): Update.
1065 * python/py-event.h (py_get_event_thread): Change return type.
1066 * python/py-continueevent.c (create_continue_event_object):
1067 Update.
1068
1069 2018-09-16 Tom Tromey <tom@tromey.com>
1070
1071 * python/py-progspace.c (pspy_get_objfiles): Update.
1072 * python/python-internal.h (objfile_to_objfile_object): Change
1073 return type.
1074 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1075 Update.
1076 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1077 Update.
1078 * python/python.c (gdbpy_get_current_objfile): Update.
1079 (gdbpy_objfiles): Update.
1080 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1081 Update.
1082 (objfile_to_objfile_object): Return a new reference.
1083 * python/py-symtab.c (stpy_get_objfile): Update.
1084 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1085 Update.
1086
1087 2018-09-16 Tom Tromey <tom@tromey.com>
1088
1089 * python/py-inferior.c (infpy_get_progspace): Update.
1090 * python/python-internal.h (pspace_to_pspace_object): Change
1091 return type.
1092 * python/py-newobjfileevent.c
1093 (create_clear_objfiles_event_object): Update.
1094 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1095 Update.
1096 * python/python.c (gdbpy_get_current_progspace): Update.
1097 (gdbpy_progspaces): Update.
1098 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1099 reference.
1100 * python/py-objfile.c (objfpy_get_progspace): Update.
1101 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1102 Update.
1103
1104 2018-09-16 Tom Tromey <tom@tromey.com>
1105
1106 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1107 (solib_name, block_for_pc, find_pc_line): New functions.
1108 (execute_unwinders): Update.
1109 * python/py-block.c (gdbpy_block_for_pc): Remove.
1110 * python/py-inferior.c (infpy_get_progspace): New function.
1111 (inferior_object_getset) <progspace>: Add.
1112 * python/py-progspace.c (pspy_objfiles): Rewrite.
1113 (pspy_solib_name, pspy_block_for_pc)
1114 (pspy_find_pc_line, pspy_is_valid): New functions.
1115 (progspace_object_methods): Add entries for solib_name,
1116 block_for_pc, find_pc_line, is_valid.
1117 * python/python-internal.h (gdbpy_block_for_pc)
1118 (build_objfiles_list): Don't declare.
1119 * python/python.c: Don't include solib.h.
1120 (gdbpy_solib_name, gdbpy_find_pc_line)
1121 (gdbpy_get_current_progspace, build_objfiles_list)
1122 (gdbpy_objfiles): Remove.
1123 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1124 solib_name, find_pc_line>: Remove entries.
1125
1126 2018-09-16 Tom Tromey <tom@tromey.com>
1127
1128 * top.c (new_ui_command): Use GNU style for metasyntactic
1129 variables.
1130 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1131 variables.
1132 * maint.c (maintenance_translate_address): Remove "<>" around
1133 text.
1134 * interps.c (interpreter_exec_cmd): Use GNU style for
1135 metasyntactic variables.
1136 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1137 metasyntactic variables.
1138 * tracepoint.c (tfind_range_command): Use GNU style for
1139 metasyntactic variables.
1140 (tfind_outside_command): Likewise.
1141 (_initialize_tracepoint): Likewise.
1142 * remote.c (extended_remote_target::create_inferior): Use GNU
1143 style for metasyntactic variables.
1144 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1145 metasyntactic variables.
1146 (adi_assign_command): Likewise.
1147
1148 2018-09-16 Tom Tromey <tom@tromey.com>
1149
1150 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1151 metasyntactic variables. Print message if no disassembler options
1152 are available.
1153
1154 2018-09-15 Tom Tromey <tom@tromey.com>
1155
1156 * infcmd.c (get_inferior_args): Return const char *.
1157 * inferior.h (get_inferior_args): Return type now const.
1158 * linux-tdep.c (linux_fill_prpsinfo): Update.
1159 * procfs.c (procfs_target::make_corefile_notes): Update.
1160
1161 2018-09-07 Tom Tromey <tom@tromey.com>
1162
1163 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1164 inside the TRY.
1165
1166 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1167
1168 * nios2-tdep.c (nios2_type_align): New.
1169 (nios2_gdb_arch_init): Install type_align hook.
1170
1171 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1172
1173 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1174 type that is neither object file owned, nor gdbarch owned.
1175 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1176 gdbarch is non-NULL.
1177 (alloc_type_instance): Allocate non-objfile owned types on the
1178 gdbarch obstack.
1179 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1180 using TYPE_ALLOC to ensure memory is allocated on the correct
1181 obstack.
1182 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1183 obstack, or the gdbarch obstack.
1184 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1185
1186 2018-09-14 Tom Tromey <tom@tromey.com>
1187
1188 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1189 block.
1190
1191 2018-09-14 Tom Tromey <tom@tromey.com>
1192
1193 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1194
1195 2018-09-13 Tom Tromey <tom@tromey.com>
1196
1197 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1198 static.
1199
1200 2018-09-13 Tom Tromey <tom@tromey.com>
1201
1202 * exec.c (try_open_exec_file): Use std::string.
1203
1204 2018-09-13 Tom Tromey <tom@tromey.com>
1205
1206 * utils.h (gdb_bfd_errmsg): Return std::string.
1207 * exec.c (exec_file_attach): Update.
1208 * compile/compile-object-load.c (compile_object_load): Update.
1209 * utils.c (gdb_bfd_errmsg): Return std::string.
1210
1211 2018-09-13 Tom Tromey <tom@tromey.com>
1212
1213 * procfs.c (struct procinfo_deleter): New.
1214 (procinfo_up): New typedef.
1215 (do_destroy_procinfo_cleanup): Remove.
1216 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1217
1218 2018-09-13 Tom Tromey <tom@tromey.com>
1219
1220 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1221
1222 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1223 2018-09-13 Tom Tromey <tom@tromey.com>
1224
1225 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1226 (pspy_get_objfiles): New function.
1227 (progspace_object_methods): New.
1228 (pspace_object_type): Add tp_methods callback.
1229 * python/python-internal.h (build_objfiles_list): New
1230 declaration.
1231 * python/python.c (build_objfiles_list): New function.
1232 (gdbpy_objfiles): Implement using build_objfiles_list.
1233 * NEWS: Mention the Progspace.objfiles method.
1234
1235 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1236
1237 * python/py-inferior.c (infpy_get_progspace): New function.
1238 (inferior_object_getset): Add progspace property.
1239 * NEWS: Mention the new property.
1240
1241 2018-09-13 Tom Tromey <tom@tromey.com>
1242
1243 PR rust/23650:
1244 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1245
1246 2018-09-13 Tom Tromey <tom@tromey.com>
1247
1248 PR rust/23626:
1249 * rust-lang.c (rust_enum_variant): Now static.
1250 (rust_empty_enum_p): New function.
1251 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1252 Handle empty enum.
1253
1254 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1255
1256 * python/py-inferior.c (infpy_repr): New.
1257 (inferior_object_type): Register infpy_repr.
1258 * python/py-objfile.c (objfpy_repr): New.
1259 (objfile_object_type): Register objfpy_repr.
1260
1261 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1262
1263 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1264
1265 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1266
1267 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1268 typo.
1269
1270 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1271
1272 * common/common-utils.c: Don't include '<sys/stat.h>'.
1273 (is_regular_file): Move to...
1274 * common/filestuff.c (is_regular_file): ... here.
1275 * common/common-utils.h (is_regular_file): Move to...
1276 * common/filestuff.h (is_regular_file): ... here.
1277
1278 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * skip.c (debug_skip): New variable.
1281 (skiplist_entry::do_skip_file_p): Add debug output.
1282 (skiplist_entry::do_skip_gfile_p): Likewise.
1283 (skiplist_entry::skip_function_p): Likewise.
1284 (_initialize_step_skip): Create debug command.
1285 * NEWS: Mention set/show debug skip.
1286
1287 2018-09-11 Xavier Roirand <roirand@adacore.com>
1288
1289 * darwin-nat.c (should_disable_startup_with_shell):
1290 New function.
1291 (darwin_nat_target::create_inferior): Add call.
1292
1293 2018-09-11 Xavier Roirand <roirand@adacore.com>
1294
1295 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1296 inf_port, msg_state>: Initialize.
1297 (struct darwin_thread_info) <signaled, single_step>: Change
1298 type and initialize.
1299 (struct darwin_thread_info) <event>: Initialize.
1300
1301 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1302
1303 PR gdb/23555
1304 PR gdb/23558
1305 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1306 guesses.
1307
1308 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1309
1310 Revert:
1311 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1312
1313 PR gdb/23555
1314 PR gdb/23558
1315 * gnulib/aclocal.m4: Regenerate.
1316 * gnulib/config.in: Regenerate.
1317 * gnulib/configure: Regenerate.
1318 * gnulib/import/Makefile.am: Update.
1319 * gnulib/import/Makefile.in: Update.
1320 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1321 * gnulib/import/_Noreturn.h: ... this.
1322 * gnulib/import/alloca.in.h: Update.
1323 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1324 * gnulib/import/arg-nonnull.h: ... this.
1325 * gnulib/import/assure.h: Update.
1326 * gnulib/import/at-func.c: Update.
1327 * gnulib/import/basename-lgpl.c: Update.
1328 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1329 * gnulib/import/c++defs.h: ... this.
1330 * gnulib/import/canonicalize-lgpl.c: Update.
1331 * gnulib/import/cdefs.h: Update.
1332 * gnulib/import/chdir-long.c: Update.
1333 * gnulib/import/chdir-long.h: Update.
1334 * gnulib/import/cloexec.c: Update.
1335 * gnulib/import/cloexec.h: Update.
1336 * gnulib/import/close.c: Update.
1337 * gnulib/import/closedir.c: Update.
1338 * gnulib/import/config.charset: Update.
1339 * gnulib/import/dirent-private.h: Update.
1340 * gnulib/import/dirent.in.h: Update.
1341 * gnulib/import/dirfd.c: Update.
1342 * gnulib/import/dirname-lgpl.c: Update.
1343 * gnulib/import/dirname.h: Update.
1344 * gnulib/import/dosname.h: Update.
1345 * gnulib/import/dup-safer-flag.c: Update.
1346 * gnulib/import/dup-safer.c: Update.
1347 * gnulib/import/dup.c: Update.
1348 * gnulib/import/dup2.c: Update.
1349 * gnulib/import/errno.in.h: Update.
1350 * gnulib/import/error.c: Update.
1351 * gnulib/import/error.h: Update.
1352 * gnulib/import/exitfail.c: Update.
1353 * gnulib/import/exitfail.h: Update.
1354 * gnulib/import/extra/update-copyright: Update.
1355 * gnulib/import/fchdir.c: Update.
1356 * gnulib/import/fcntl.c: Update.
1357 * gnulib/import/fcntl.in.h: Update.
1358 * gnulib/import/fd-hook.c: Update.
1359 * gnulib/import/fd-hook.h: Update.
1360 * gnulib/import/fd-safer-flag.c: Update.
1361 * gnulib/import/fd-safer.c: Update.
1362 * gnulib/import/fdopendir.c: Update.
1363 * gnulib/import/filename.h: Update.
1364 * gnulib/import/filenamecat-lgpl.c: Update.
1365 * gnulib/import/filenamecat.h: Update.
1366 * gnulib/import/flexmember.h: Update.
1367 * gnulib/import/float+.h: Update.
1368 * gnulib/import/float.c: Update.
1369 * gnulib/import/float.in.h: Update.
1370 * gnulib/import/fnmatch.c: Update.
1371 * gnulib/import/fnmatch.in.h: Update.
1372 * gnulib/import/fnmatch_loop.c: Update.
1373 * gnulib/import/fpucw.h: Update.
1374 * gnulib/import/frexp.c: Update.
1375 * gnulib/import/frexpl.c: Update.
1376 * gnulib/import/fstat.c: Update.
1377 * gnulib/import/fstatat.c: Update.
1378 * gnulib/import/getcwd-lgpl.c: Update.
1379 * gnulib/import/getcwd.c: Update.
1380 * gnulib/import/getdtablesize.c: Update.
1381 * gnulib/import/getlogin_r.c: Update.
1382 * gnulib/import/getprogname.c: Update.
1383 * gnulib/import/getprogname.h: Update.
1384 * gnulib/import/gettext.h: Update.
1385 * gnulib/import/gettimeofday.c: Update.
1386 * gnulib/import/glob-libc.h: Update.
1387 * gnulib/import/glob.c: Update.
1388 * gnulib/import/glob.in.h: Update.
1389 * gnulib/import/glob_internal.h: Update.
1390 * gnulib/import/glob_pattern_p.c: Update.
1391 * gnulib/import/globfree.c: Update.
1392 * gnulib/import/hard-locale.c: Update.
1393 * gnulib/import/hard-locale.h: Update.
1394 * gnulib/import/intprops.h: Update.
1395 * gnulib/import/inttypes.in.h: Update.
1396 * gnulib/import/isnan.c: Update.
1397 * gnulib/import/isnand-nolibm.h: Update.
1398 * gnulib/import/isnand.c: Update.
1399 * gnulib/import/isnanl-nolibm.h: Update.
1400 * gnulib/import/isnanl.c: Update.
1401 * gnulib/import/itold.c: Update.
1402 * gnulib/import/libc-config.h: Update.
1403 * gnulib/import/limits.in.h: Update.
1404 * gnulib/import/localcharset.c: Update.
1405 * gnulib/import/localcharset.h: Update.
1406 * gnulib/import/localtime-buffer.c: Update.
1407 * gnulib/import/localtime-buffer.h: Update.
1408 * gnulib/import/lstat.c: Update.
1409 * gnulib/import/m4/00gnulib.m4: Update.
1410 * gnulib/import/m4/__inline.m4: Update.
1411 * gnulib/import/m4/absolute-header.m4: Update.
1412 * gnulib/import/m4/alloca.m4: Update.
1413 * gnulib/import/m4/builtin-expect.m4: Update.
1414 * gnulib/import/m4/canonicalize.m4: Update.
1415 * gnulib/import/m4/chdir-long.m4: Update.
1416 * gnulib/import/m4/close.m4: Update.
1417 * gnulib/import/m4/closedir.m4: Update.
1418 * gnulib/import/m4/configmake.m4: Update.
1419 * gnulib/import/m4/d-ino.m4: Update.
1420 * gnulib/import/m4/d-type.m4: Update.
1421 * gnulib/import/m4/dirent_h.m4: Update.
1422 * gnulib/import/m4/dirfd.m4: Update.
1423 * gnulib/import/m4/dirname.m4: Update.
1424 * gnulib/import/m4/double-slash-root.m4: Update.
1425 * gnulib/import/m4/dup.m4: Update.
1426 * gnulib/import/m4/dup2.m4: Update.
1427 * gnulib/import/m4/eealloc.m4: Update.
1428 * gnulib/import/m4/environ.m4: Update.
1429 * gnulib/import/m4/errno_h.m4: Update.
1430 * gnulib/import/m4/error.m4: Update.
1431 * gnulib/import/m4/exponentd.m4: Update.
1432 * gnulib/import/m4/exponentl.m4: Update.
1433 * gnulib/import/m4/extensions.m4: Update.
1434 * gnulib/import/m4/extern-inline.m4: Update.
1435 * gnulib/import/m4/fchdir.m4: Update.
1436 * gnulib/import/m4/fcntl-o.m4: Update.
1437 * gnulib/import/m4/fcntl.m4: Update.
1438 * gnulib/import/m4/fcntl_h.m4: Update.
1439 * gnulib/import/m4/fdopendir.m4: Update.
1440 * gnulib/import/m4/filenamecat.m4: Update.
1441 * gnulib/import/m4/flexmember.m4: Update.
1442 * gnulib/import/m4/float_h.m4: Update.
1443 * gnulib/import/m4/fnmatch.m4: Update.
1444 * gnulib/import/m4/fnmatch_h.m4: Update.
1445 * gnulib/import/m4/fpieee.m4: Update.
1446 * gnulib/import/m4/frexp.m4: Update.
1447 * gnulib/import/m4/frexpl.m4: Update.
1448 * gnulib/import/m4/fstat.m4: Update.
1449 * gnulib/import/m4/fstatat.m4: Update.
1450 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1451 * gnulib/import/m4/getcwd-path-max.m4: Update.
1452 * gnulib/import/m4/getcwd.m4: Update.
1453 * gnulib/import/m4/getdtablesize.m4: Update.
1454 * gnulib/import/m4/getlogin.m4: Update.
1455 * gnulib/import/m4/getlogin_r.m4: Update.
1456 * gnulib/import/m4/getpagesize.m4: Update.
1457 * gnulib/import/m4/getprogname.m4: Update.
1458 * gnulib/import/m4/gettimeofday.m4: Update.
1459 * gnulib/import/m4/glibc21.m4: Update.
1460 * gnulib/import/m4/glob.m4: Update.
1461 * gnulib/import/m4/glob_h.m4: Update.
1462 * gnulib/import/m4/gnulib-cache.m4: Update.
1463 * gnulib/import/m4/gnulib-common.m4: Update.
1464 * gnulib/import/m4/gnulib-comp.m4: Update.
1465 * gnulib/import/m4/gnulib-tool.m4: Update.
1466 * gnulib/import/m4/hard-locale.m4: Update.
1467 * gnulib/import/m4/include_next.m4: Update.
1468 * gnulib/import/m4/inttypes-pri.m4: Update.
1469 * gnulib/import/m4/inttypes.m4: Update.
1470 * gnulib/import/m4/isnand.m4: Update.
1471 * gnulib/import/m4/isnanl.m4: Update.
1472 * gnulib/import/m4/largefile.m4: Update.
1473 * gnulib/import/m4/limits-h.m4: Update.
1474 * gnulib/import/m4/localcharset.m4: Update.
1475 * gnulib/import/m4/locale-fr.m4: Update.
1476 * gnulib/import/m4/locale-ja.m4: Update.
1477 * gnulib/import/m4/locale-zh.m4: Update.
1478 * gnulib/import/m4/localtime-buffer.m4: Update.
1479 * gnulib/import/m4/longlong.m4: Update.
1480 * gnulib/import/m4/lstat.m4: Update.
1481 * gnulib/import/m4/malloc.m4: Update.
1482 * gnulib/import/m4/malloca.m4: Update.
1483 * gnulib/import/m4/math_h.m4: Update.
1484 * gnulib/import/m4/mbrtowc.m4: Update.
1485 * gnulib/import/m4/mbsinit.m4: Update.
1486 * gnulib/import/m4/mbsrtowcs.m4: Update.
1487 * gnulib/import/m4/mbstate_t.m4: Update.
1488 * gnulib/import/m4/memchr.m4: Update.
1489 * gnulib/import/m4/memmem.m4: Update.
1490 * gnulib/import/m4/mempcpy.m4: Update.
1491 * gnulib/import/m4/memrchr.m4: Update.
1492 * gnulib/import/m4/mkdir.m4: Update.
1493 * gnulib/import/m4/mkstemp.m4: Update.
1494 * gnulib/import/m4/mmap-anon.m4: Update.
1495 * gnulib/import/m4/mode_t.m4: Update.
1496 * gnulib/import/m4/msvc-inval.m4: Update.
1497 * gnulib/import/m4/msvc-nothrow.m4: Update.
1498 * gnulib/import/m4/multiarch.m4: Update.
1499 * gnulib/import/m4/nocrash.m4: Update.
1500 * gnulib/import/m4/off_t.m4: Update.
1501 * gnulib/import/m4/onceonly.m4: Update.
1502 * gnulib/import/m4/open-cloexec.m4: Update.
1503 * gnulib/import/m4/open.m4: Update.
1504 * gnulib/import/m4/openat.m4: Update.
1505 * gnulib/import/m4/opendir.m4: Update.
1506 * gnulib/import/m4/pathmax.m4: Update.
1507 * gnulib/import/m4/rawmemchr.m4: Update.
1508 * gnulib/import/m4/readdir.m4: Update.
1509 * gnulib/import/m4/readlink.m4: Update.
1510 * gnulib/import/m4/realloc.m4: Update.
1511 * gnulib/import/m4/rename.m4: Update.
1512 * gnulib/import/m4/rewinddir.m4: Update.
1513 * gnulib/import/m4/rmdir.m4: Update.
1514 * gnulib/import/m4/save-cwd.m4: Update.
1515 * gnulib/import/m4/secure_getenv.m4: Update.
1516 * gnulib/import/m4/setenv.m4: Update.
1517 * gnulib/import/m4/signal_h.m4: Update.
1518 * gnulib/import/m4/ssize_t.m4: Update.
1519 * gnulib/import/m4/stat-time.m4: Update.
1520 * gnulib/import/m4/stat.m4: Update.
1521 * gnulib/import/m4/std-gnu11.m4: Update.
1522 * gnulib/import/m4/stdbool.m4: Update.
1523 * gnulib/import/m4/stddef_h.m4: Update.
1524 * gnulib/import/m4/stdint.m4: Update.
1525 * gnulib/import/m4/stdio_h.m4: Update.
1526 * gnulib/import/m4/stdlib_h.m4: Update.
1527 * gnulib/import/m4/strchrnul.m4: Update.
1528 * gnulib/import/m4/strdup.m4: Update.
1529 * gnulib/import/m4/strerror.m4: Update.
1530 * gnulib/import/m4/string_h.m4: Update.
1531 * gnulib/import/m4/strstr.m4: Update.
1532 * gnulib/import/m4/strtok_r.m4: Update.
1533 * gnulib/import/m4/sys_socket_h.m4: Update.
1534 * gnulib/import/m4/sys_stat_h.m4: Update.
1535 * gnulib/import/m4/sys_time_h.m4: Update.
1536 * gnulib/import/m4/sys_types_h.m4: Update.
1537 * gnulib/import/m4/tempname.m4: Update.
1538 * gnulib/import/m4/time_h.m4: Update.
1539 * gnulib/import/m4/unistd-safer.m4: Update.
1540 * gnulib/import/m4/unistd_h.m4: Update.
1541 * gnulib/import/m4/warn-on-use.m4: Update.
1542 * gnulib/import/m4/wchar_h.m4: Update.
1543 * gnulib/import/m4/wchar_t.m4: Update.
1544 * gnulib/import/m4/wctype_h.m4: Update.
1545 * gnulib/import/m4/wint_t.m4: Update.
1546 * gnulib/import/malloc.c: Update.
1547 * gnulib/import/malloc/scratch_buffer.h: Update.
1548 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1549 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1550 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1551 * gnulib/import/malloca.c: Update.
1552 * gnulib/import/malloca.h: Update.
1553 * gnulib/import/malloca.valgrind: Update.
1554 * gnulib/import/math.in.h: Update.
1555 * gnulib/import/mbrtowc.c: Update.
1556 * gnulib/import/mbsinit.c: Update.
1557 * gnulib/import/mbsrtowcs-impl.h: Update.
1558 * gnulib/import/mbsrtowcs-state.c: Update.
1559 * gnulib/import/mbsrtowcs.c: Update.
1560 * gnulib/import/memchr.c: Update.
1561 * gnulib/import/memmem.c: Update.
1562 * gnulib/import/mempcpy.c: Update.
1563 * gnulib/import/memrchr.c: Update.
1564 * gnulib/import/mkdir.c: Update.
1565 * gnulib/import/mkstemp.c: Update.
1566 * gnulib/import/msvc-inval.c: Update.
1567 * gnulib/import/msvc-inval.h: Update.
1568 * gnulib/import/msvc-nothrow.c: Update.
1569 * gnulib/import/msvc-nothrow.h: Update.
1570 * gnulib/import/open.c: Update.
1571 * gnulib/import/openat-die.c: Update.
1572 * gnulib/import/openat-priv.h: Update.
1573 * gnulib/import/openat-proc.c: Update.
1574 * gnulib/import/openat.c: Update.
1575 * gnulib/import/openat.h: Update.
1576 * gnulib/import/opendir.c: Update.
1577 * gnulib/import/pathmax.h: Update.
1578 * gnulib/import/pipe-safer.c: Update.
1579 * gnulib/import/rawmemchr.c: Update.
1580 * gnulib/import/readdir.c: Update.
1581 * gnulib/import/readlink.c: Update.
1582 * gnulib/import/realloc.c: Update.
1583 * gnulib/import/ref-add.sin: Update.
1584 * gnulib/import/ref-del.sin: Update.
1585 * gnulib/import/rename.c: Update.
1586 * gnulib/import/rewinddir.c: Update.
1587 * gnulib/import/rmdir.c: Update.
1588 * gnulib/import/same-inode.h: Update.
1589 * gnulib/import/save-cwd.c: Update.
1590 * gnulib/import/save-cwd.h: Update.
1591 * gnulib/import/scratch_buffer.h: Update.
1592 * gnulib/import/secure_getenv.c: Update.
1593 * gnulib/import/setenv.c: Update.
1594 * gnulib/import/signal.in.h: Update.
1595 * gnulib/import/stat-time.c: Update.
1596 * gnulib/import/stat-time.h: Update.
1597 * gnulib/import/stat-w32.c: Update.
1598 * gnulib/import/stat-w32.h: Update.
1599 * gnulib/import/stat.c: Update.
1600 * gnulib/import/stdbool.in.h: Update.
1601 * gnulib/import/stddef.in.h: Update.
1602 * gnulib/import/stdint.in.h: Update.
1603 * gnulib/import/stdio.in.h: Update.
1604 * gnulib/import/stdlib.in.h: Update.
1605 * gnulib/import/str-two-way.h: Update.
1606 * gnulib/import/strchrnul.c: Update.
1607 * gnulib/import/strdup.c: Update.
1608 * gnulib/import/streq.h: Update.
1609 * gnulib/import/strerror-override.c: Update.
1610 * gnulib/import/strerror-override.h: Update.
1611 * gnulib/import/strerror.c: Update.
1612 * gnulib/import/string.in.h: Update.
1613 * gnulib/import/stripslash.c: Update.
1614 * gnulib/import/strnlen1.c: Update.
1615 * gnulib/import/strnlen1.h: Update.
1616 * gnulib/import/strstr.c: Update.
1617 * gnulib/import/strtok_r.c: Update.
1618 * gnulib/import/sys_stat.in.h: Update.
1619 * gnulib/import/sys_time.in.h: Update.
1620 * gnulib/import/sys_types.in.h: Update.
1621 * gnulib/import/tempname.c: Update.
1622 * gnulib/import/tempname.h: Update.
1623 * gnulib/import/time.in.h: Update.
1624 * gnulib/import/unistd--.h: Update.
1625 * gnulib/import/unistd-safer.h: Update.
1626 * gnulib/import/unistd.in.h: Update.
1627 * gnulib/import/unsetenv.c: Update.
1628 * gnulib/import/verify.h: Update.
1629 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1630 * gnulib/import/wchar.in.h: Update.
1631 * gnulib/import/wctype.in.h: Update.
1632 * gnulib/import/xalloc-oversized.h: Update.
1633 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1634 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1635
1636 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1637
1638 * record-btrace.c (get_thread_current_frame): Remove
1639 old_inferior_ptid.
1640
1641 2018-09-10 Jerome Guitton <guitton@adacore.com>
1642
1643 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1644 with check_tag to 1 if and only if the type is tagged and the
1645 component being searched cannot been found in the current
1646 view. Otherwise, always call ada_to_fixed_type with
1647 check_tag to 0.
1648
1649 2018-09-10 Xavier Roirand <roirand@adacore.com>
1650
1651 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1652 declaration.
1653 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1654 * ada-varobj.c (ada_varobj_get_number_of_children,
1655 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1656
1657 2018-09-10 Xavier Roirand <roirand@adacore.com>
1658
1659 * ada-valprint.c (ada_value_print): Use type instead of
1660 enclosing type.
1661
1662 2018-09-10 Xavier Roirand <roirand@adacore.com>
1663
1664 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1665 an array of access to unconstrained array.
1666
1667 2018-09-10 Xavier Roirand <roirand@adacore.com>
1668
1669 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1670 (ada_check_typedef): Use it.
1671
1672 2018-09-10 Xavier Roirand <roirand@adacore.com>
1673
1674 * ada-varobj.c (ada_varobj_describe_struct_child)
1675 (ada_varobj_describe_child): Handle union case like struct one.
1676
1677 2018-09-10 Tom Tromey <tom@tromey.com>
1678
1679 PR python/18380:
1680 * python/python.c (_initialize_python): Make example in "python"
1681 help work in Python 3.
1682
1683 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1684
1685 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1686 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1687 $(EXEEXT) to the script, as it is not a program.
1688
1689 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1690
1691 * python/py-prettyprint.c (pretty_print_one_value): Return
1692 gdbpy_ref<>.
1693 (print_string_repr): Adjust.
1694 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1695 * python/python-internal.h (apply_varobj_pretty_printer): Return
1696 gdbpy_ref<>.
1697 * varobj.c (varobj_value_get_print_value): Adjust.
1698
1699 2018-09-08 Tom Tromey <tom@tromey.com>
1700
1701 PR python/16047:
1702 * python/py-prettyprint.c (pretty_print_one_value): Check for
1703 to_string method.
1704
1705 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1706
1707 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1708 replace_operator_with_call.
1709
1710 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1711
1712 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1713
1714 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1715
1716 * ada-typeprint.c (print_range): Print the bounds using TYPE
1717 rather than its TYPE_TARGET_TYPE.
1718
1719 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1720
1721 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1722 call to ada_to_fixed_value_create.
1723
1724 2018-09-08 Jerome Guitton <guitton@adacore.com>
1725
1726 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1727
1728 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1729
1730 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1731 by calls to error.
1732
1733 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1734
1735 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1736 Move update of loop variable "fi".
1737
1738 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1739
1740 * ada-lang.c (value_assign_to_component): In the case of
1741 big-endian targets, extract the bits of the given VAL
1742 using an src_offset of zero if container is not a scalar.
1743
1744 2018-09-06 Simon Ser <contact@emersion.fr>
1745
1746 PR gdb/23105
1747 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1748 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1749 * fbsd-tdep.c (fbsd_make_note_desc): New.
1750 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1751 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1752 * target.h (enum target_object) Add FreeBSD-specific
1753 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1754
1755 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1756
1757 * compile/compile-c.h (generate_c_for_variable_locations):
1758 Change reference to pointer.
1759 * compile/compile-c-support.c (compile_program) <compute>:
1760 Likewise.
1761 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1762 (generate_c_for_for_one_variable): Likewise
1763 (generate_c_for_variable_locations): Likewise
1764 * compile/compile-c-types.c (compile_c_instance::convert_type):
1765 Likewise
1766 * compile/compile-cplus-symbols.c (convert_one_symbol):
1767 std::move the scope passed to enter_scope.
1768 * compile/compile-cplus-types.c
1769 (compile_cplus_instance::enter_scope): Make parameter
1770 rvalue-reference.
1771 (compile_cplus_instance::new_scope): Change reference to
1772 pointer.
1773 (compile_cplus_instance::convert_type): Likewise
1774 (compile_cplus_convert_typedef): std::move the scope passed to
1775 enter_scope.
1776 (compile_cplus_convert_struct_or_union): Likewise.
1777 (compile_cplus_convert_enum): Likewise.
1778 (compile_cplus_convert_namespace): Likewise.
1779 * compile/compile-cplus.h (compile_cplus_instance)
1780 <enter_scope>: Make parameter rvalue-reference.
1781 * compile/compile-internal.h (compile_instance)
1782 <get_cached_type>: Likewise
1783 * compile/compile-loc2c.c (push): Likewise
1784 (pushf): Likewise
1785 (unary): Likewise
1786 (binary): Likewise
1787 (print_label): Likewise
1788 (pushf_register_address): Likewise
1789 (pushf_register): Likewise
1790 (do_compile_dwarf_expr_to_c): Likewise
1791 (compile_dwarf_expr_to_c): Likewise
1792 (compile_dwarf_bounds_to_c): Likewise
1793 * compile/compile.c (compile_instance::get_cached_type):
1794 Likewise
1795 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1796 (compile_dwarf_bounds_to_c): Likewise
1797 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1798 (dwarf2_compile_property_to_c): Likewise
1799 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1800 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1801 Likewise
1802
1803 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1804
1805 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1806 * tui/tui-data.c (init_content_element): Don't initialize it.
1807
1808 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1809
1810 * tui/tui-data.h (struct tui_win_info)
1811 <detail::opaque>: Remove.
1812 * tui/tui-data.c (init_win_info): Remove assignment.
1813
1814 2018-09-05 Tom Tromey <tom@tromey.com>
1815
1816 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1817 -Wformat-nonliteral.
1818 * target-float.c (host_float_ops<T>::to_string)
1819 (host_float_ops<T>::from_string): Use
1820 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1821 * configure: Rebuild.
1822
1823 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * printcmd.c (printf_c_string): Use
1826 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1827 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1828
1829 2018-09-05 Tom Tromey <tom@tromey.com>
1830
1831 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1832
1833 2018-09-05 Tom de Vries <tdevries@suse.de>
1834
1835 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1836 with resolve_abstract_p == true.
1837 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1838 defaulting to false. Propagate resolve_abstract_p to
1839 dwarf2_fetch_die_loc_sect_off.
1840 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1841 parameter, defaulting to false.
1842 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1843 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1844 parameter.
1845 * dwarf2read.h (struct die_info): Forward-declare.
1846 (die_info_ptr): New typedef.
1847 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1848
1849 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1850
1851 GDB 8.2 released.
1852
1853 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1854 Pedro Alves <palves@redhat.com>
1855
1856 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1857 "aclocal-m4-deps.mk". Include file here.
1858 $(srcdir)/aclocal.m4: Add "configure.ac".
1859 * gnulib/aclocal-m4-deps.mk: New file.
1860 * gnulib/update-gnulib.sh: Automatically update
1861 "aclocal-m4-deps.mk".
1862
1863 2018-09-04 Tom Tromey <tom@tromey.com>
1864
1865 * configure: Rebuild.
1866 * configure.ac: Remove multi-ice code.
1867
1868 2018-09-04 Tom Tromey <tom@tromey.com>
1869
1870 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1871 (ada-exp.o): Update.
1872
1873 2018-09-04 Tom Tromey <tom@tromey.com>
1874
1875 * Makefile.in (printcmd.o, target-float.o): Remove.
1876 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1877
1878 2018-09-04 Tom Tromey <tom@tromey.com>
1879
1880 * gnulib/Makefile.in: Remove obsolete comment.
1881 * Makefile.in: Remove obsolete comment.
1882
1883 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1884
1885 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1886 line with '+'.
1887
1888 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1889
1890 * riscv-tdep.c: Add 'prologue-value.h' include.
1891 (struct riscv_unwind_cache): New struct.
1892 (riscv_debug_unwinder): New global.
1893 (riscv_scan_prologue): Update arguments, capture register details
1894 from prologue scan.
1895 (riscv_skip_prologue): Reformat arguments line, move end of
1896 prologue calculation into riscv_scan_prologue.
1897 (riscv_frame_cache): Update return type, create
1898 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1899 details.
1900 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1901 (riscv_frame_prev_register): Use the trad_frame within the
1902 riscv_unwind_cache.
1903 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1904 flag.
1905
1906 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1907
1908 * trad-frame.h (trad_frame_set_realreg): Declare.
1909 (trad_frame_set_addr): Declare.
1910 * trad-frame.c (trad_frame_set_realreg): Define new function.
1911 (trad_frame_set_addr): Define new function.
1912 (trad_frame_set_reg_realreg): Use new function.
1913 (trad_frame_set_reg_addr): Use new function.
1914
1915 2018-09-01 Keith Seitz <keiths@redhat.com>
1916
1917 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1918 pulongest instead of "%lld".
1919 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1920 ATTRIBUTE_UNUSED.
1921
1922 2018-08-31 Tom Tromey <tom@tromey.com>
1923
1924 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1925 variant part type.
1926
1927 2018-08-31 Pedro Alves <palves@redhat.com>
1928
1929 * gdbarch.h: Regenerate.
1930
1931 2018-08-31 Pedro Alves <palves@redhat.com>
1932
1933 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1934 * target.h (Hardware watchpoint interfaces): Describe
1935 continuable/steppable/non-steppable watchpoints.
1936 * gdbarch.h, gdbarch.c: Regenerate.
1937
1938 2018-08-31 Pedro Alves <palves@redhat.com>
1939
1940 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1941 Delete.
1942 * s390-linux-nat.c
1943 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1944 * target.h (target_ops::have_continuable_watchpoint): Delete.
1945 (target_have_continuable_watchpoint): Delete.
1946 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1947 * target-delegates.c: Regenerate.
1948
1949 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1950
1951 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1952 the files present in "gnulib/import/m4/".
1953
1954 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1955
1956 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1957 c.sw, c.swsp, and c.sdsp.
1958
1959 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1960
1961 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1962 (riscv_read_misa_reg): Don't cache value read into inferior data.
1963 (riscv_new_inferior_data): Delete.
1964 (riscv_inferior_data_cleanup): Delete.
1965 (riscv_inferior_data): Delete.
1966 (riscv_invalidate_inferior_data): Delete.
1967 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1968
1969 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1970
1971 * compile/compile-cplus-types.c
1972 (compile_cplus_instance::leave_scope): Take the address of scope
1973 object.
1974 (compile_cplus_instance::convert_qualified_base): Compare quals
1975 to 0.
1976
1977 2018-08-30 Keith Seitz <keiths@redhat.com>
1978
1979 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1980 Use "%s" and host_address_to_string instead of "%p" in printf.
1981
1982 2018-08-29 Keith Seitz <keiths@redhat.com>
1983
1984 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1985 and compile-cplus-types.c.
1986 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1987 * c-lang.c (cplus_language_defn): Set C++ compile functions.
1988 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1989 Declare.
1990 * compile/compile-c-support.c: Include compile-cplus.h.
1991 (load_libcompile): Templatize.
1992 (get_compile_context): "New" function.
1993 (c_get_compile_context): Use get_compile_context.
1994 (cplus_get_compile_context): New function.
1995 (cplus_push_user_expression, cplus_pop_user_expression)
1996 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1997 (cplus_compute_program): Define new structs/functions.
1998 * compile/compile-cplus-symmbols.c: New file.
1999 * compile/compile-cplus-types.c: New file.
2000 * compile/compile-cplus.h: New file.
2001 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2002 Declare.
2003 * compile/compile-object-load.c (get_out_value_type): Use
2004 strncmp_iw when comparing symbol names.
2005 (compile_object_load): Add mst_bss and mst_data.
2006 * compile/compile.c (_initialize_compile): Remove
2007 -Wno-implicit-function-declaration from `compile_args'.
2008 * compile/gcc-cp-plugin.h: New file.
2009 * NEWS: Mention C++ compile support and new debug options.
2010
2011 2018-08-29 Keith Seitz <keiths@redhat.com>
2012
2013 * linespec.c (collect_info::add_symbol): Make virtual.
2014 (struct symbol_searcher_collect_info): New struct.
2015 (symbol_searcher::find_all_symbols): New method.
2016 * symtab.h (class symbol_searcher): New class.
2017
2018 2018-08-29 Keith Seitz <keiths@redhat.com>
2019
2020 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2021 Change to vector of block_symbol. Update all users.
2022 (struct collect_info) <symbols>: Likewise.
2023 (collect_info::add_symbol): Take block_symbol as argument.
2024 Update all callers.
2025 (decode_compound_collector) <m_symbols>: Change type to vector
2026 of block_symbol. Update all users.
2027 (decode_compound_collector::operator ()): Change parameter type
2028 to block_symbol.
2029 (find_method, find_function_symbols, find_linespec_symbols)
2030 (find_label_symbols_in_block, find_label_symbols): Change symbol
2031 vectors to block_symbol vectors.
2032 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2033 block_symbol.
2034
2035 2018-08-29 Keith Seitz <keiths@redhat.com>
2036
2037 * linespec.c (symbolp): Remove typedef and VEC definitions.
2038 (bound_minimal_symbol_d): Likewise.
2039
2040 2018-08-29 Keith Seitz <keiths@redhat.com>
2041
2042 * linespec.c (decode_compound_collector::decode_compound_collector):
2043 Remove initialization for `m_symtabs'.
2044 (decode_compound_collector::release_symbols): Change return type
2045 to std::vector. Update all callers.
2046 (class decode_compound_collector) <m_symbols>: Change type to
2047 std::vector.
2048 (lookup_prefix_sym): Change return type to std::vector. Update all
2049 callers.
2050 (compare_symbols): Remove.
2051 (std_compare_symbols): Rename to `compare_symbols'.
2052 (find_method): Change `sym_classes' parameter to std::vector.
2053 Update all callers. Use std::sort to sort sym_classes.
2054 (find_linespec_symbols): Remove cleanup.
2055
2056 2018-08-29 Keith Seitz <keiths@redhat.com>
2057
2058 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2059 std::vector. Update all users.
2060 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2061 (struct collect_info) <minimal_symbols>: Likewise.
2062 (compare_msymbols): Return bool. Change parameters to const
2063 bound_minimal_symbol references.
2064 (find_method, find_function_symbols, find_linespec_symbols): Change
2065 `minsyms' parameter to std::vector. Update all callers.
2066
2067 2018-08-29 Keith Seitz <keiths@redhat.com>
2068
2069 * linespec.c (struct linespec) <label_symbols>: Change type to
2070 std::vector. Update all users.
2071 (find_label_symbols_in_block): Change `result' parameter to
2072 std::vector. Update all callers.
2073 (find_label_symbols): Return std::vector. Update all callers.
2074
2075 2018-08-29 Keith Seitz <keiths@redhat.com>
2076
2077 * linespec.c (struct linespec) <function_symbols>: Change type to
2078 std::vector. Update all users.
2079 (struct collect_info) <function_symbols>: Likewise.
2080 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2081 (std_compare_symbols): New function.
2082 (find_method, find_function_symbols, find_linespec_symbols)
2083 (find_label_symbols_in_block): Change `symbols' parameter to
2084 std::vector. Update all callers.
2085 (find_label_symbols): Likewise for `function_symbols' and
2086 `label_funcs_ret'.
2087
2088 2018-08-29 Keith Seitz <keiths@redhat.com>
2089
2090 * linespec.c (symtab_vector_up): Define.
2091 (struct linespec) <file_symtabs>: Change type to std::vector *.
2092 Update all uses.
2093 (struct collect_info) <file_symtabs>: Likewise.
2094 (collect_symtabs_from_filename): Return symtab_vector_up.
2095 Update all callers.
2096 (decode_objc): Remove cleanup.
2097 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2098 (symtab_collector::release_symtabs): Return symtab_vector_up.
2099 Update all callers.
2100 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2101 Update all users.
2102 (collect_symtabs_from_filename, symtabs_from_filename): Return
2103 symtab_vector_up. Update all callers.
2104
2105 2018-08-29 Tom Tromey <tom@tromey.com>
2106
2107 * csky-tdep.c (csky_analyze_prologue): Use
2108 core_addr_to_string_nz.
2109
2110 2018-08-29 Tom Tromey <tom@tromey.com>
2111
2112 * windows-nat.c (struct xlate_exception) <them>: Change type to
2113 DWORD.
2114 (xlate): Fix formatting. Remove last entry.
2115 (struct xlate_exception, xlate): Comment out.
2116 (windows_nat_target::resume): Use ranged for.
2117
2118 2018-08-29 Jim Wilson <jimw@sifive.com>
2119
2120 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2121 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2122 of NT_PRFPREG.
2123 (riscv_linux_nat_target::store_registers): Likewise.
2124
2125 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2126
2127 PR gdb/23555
2128 PR gdb/23558
2129 * gnulib/aclocal.m4: Regenerate.
2130 * gnulib/config.in: Regenerate.
2131 * gnulib/configure: Regenerate.
2132 * gnulib/import/Makefile.am: Update.
2133 * gnulib/import/Makefile.in: Update.
2134 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2135 * gnulib/import/_Noreturn.h: ... this.
2136 * gnulib/import/alloca.in.h: Update.
2137 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2138 * gnulib/import/arg-nonnull.h: ... this.
2139 * gnulib/import/assure.h: Update.
2140 * gnulib/import/at-func.c: Update.
2141 * gnulib/import/basename-lgpl.c: Update.
2142 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2143 * gnulib/import/c++defs.h: ... this.
2144 * gnulib/import/canonicalize-lgpl.c: Update.
2145 * gnulib/import/cdefs.h: Update.
2146 * gnulib/import/chdir-long.c: Update.
2147 * gnulib/import/chdir-long.h: Update.
2148 * gnulib/import/cloexec.c: Update.
2149 * gnulib/import/cloexec.h: Update.
2150 * gnulib/import/close.c: Update.
2151 * gnulib/import/closedir.c: Update.
2152 * gnulib/import/config.charset: Update.
2153 * gnulib/import/dirent-private.h: Update.
2154 * gnulib/import/dirent.in.h: Update.
2155 * gnulib/import/dirfd.c: Update.
2156 * gnulib/import/dirname-lgpl.c: Update.
2157 * gnulib/import/dirname.h: Update.
2158 * gnulib/import/dosname.h: Update.
2159 * gnulib/import/dup-safer-flag.c: Update.
2160 * gnulib/import/dup-safer.c: Update.
2161 * gnulib/import/dup.c: Update.
2162 * gnulib/import/dup2.c: Update.
2163 * gnulib/import/errno.in.h: Update.
2164 * gnulib/import/error.c: Update.
2165 * gnulib/import/error.h: Update.
2166 * gnulib/import/exitfail.c: Update.
2167 * gnulib/import/exitfail.h: Update.
2168 * gnulib/import/extra/update-copyright: Update.
2169 * gnulib/import/fchdir.c: Update.
2170 * gnulib/import/fcntl.c: Update.
2171 * gnulib/import/fcntl.in.h: Update.
2172 * gnulib/import/fd-hook.c: Update.
2173 * gnulib/import/fd-hook.h: Update.
2174 * gnulib/import/fd-safer-flag.c: Update.
2175 * gnulib/import/fd-safer.c: Update.
2176 * gnulib/import/fdopendir.c: Update.
2177 * gnulib/import/filename.h: Update.
2178 * gnulib/import/filenamecat-lgpl.c: Update.
2179 * gnulib/import/filenamecat.h: Update.
2180 * gnulib/import/flexmember.h: Update.
2181 * gnulib/import/float+.h: Update.
2182 * gnulib/import/float.c: Update.
2183 * gnulib/import/float.in.h: Update.
2184 * gnulib/import/fnmatch.c: Update.
2185 * gnulib/import/fnmatch.in.h: Update.
2186 * gnulib/import/fnmatch_loop.c: Update.
2187 * gnulib/import/fpucw.h: Update.
2188 * gnulib/import/frexp.c: Update.
2189 * gnulib/import/frexpl.c: Update.
2190 * gnulib/import/fstat.c: Update.
2191 * gnulib/import/fstatat.c: Update.
2192 * gnulib/import/getcwd-lgpl.c: Update.
2193 * gnulib/import/getcwd.c: Update.
2194 * gnulib/import/getdtablesize.c: Update.
2195 * gnulib/import/getlogin_r.c: Update.
2196 * gnulib/import/getprogname.c: Update.
2197 * gnulib/import/getprogname.h: Update.
2198 * gnulib/import/gettext.h: Update.
2199 * gnulib/import/gettimeofday.c: Update.
2200 * gnulib/import/glob-libc.h: Update.
2201 * gnulib/import/glob.c: Update.
2202 * gnulib/import/glob.in.h: Update.
2203 * gnulib/import/glob_internal.h: Update.
2204 * gnulib/import/glob_pattern_p.c: Update.
2205 * gnulib/import/globfree.c: Update.
2206 * gnulib/import/hard-locale.c: Update.
2207 * gnulib/import/hard-locale.h: Update.
2208 * gnulib/import/intprops.h: Update.
2209 * gnulib/import/inttypes.in.h: Update.
2210 * gnulib/import/isnan.c: Update.
2211 * gnulib/import/isnand-nolibm.h: Update.
2212 * gnulib/import/isnand.c: Update.
2213 * gnulib/import/isnanl-nolibm.h: Update.
2214 * gnulib/import/isnanl.c: Update.
2215 * gnulib/import/itold.c: Update.
2216 * gnulib/import/libc-config.h: Update.
2217 * gnulib/import/limits.in.h: Update.
2218 * gnulib/import/localcharset.c: Update.
2219 * gnulib/import/localcharset.h: Update.
2220 * gnulib/import/localtime-buffer.c: Update.
2221 * gnulib/import/localtime-buffer.h: Update.
2222 * gnulib/import/lstat.c: Update.
2223 * gnulib/import/m4/00gnulib.m4: Update.
2224 * gnulib/import/m4/__inline.m4: Update.
2225 * gnulib/import/m4/absolute-header.m4: Update.
2226 * gnulib/import/m4/alloca.m4: Update.
2227 * gnulib/import/m4/builtin-expect.m4: Update.
2228 * gnulib/import/m4/canonicalize.m4: Update.
2229 * gnulib/import/m4/chdir-long.m4: Update.
2230 * gnulib/import/m4/close.m4: Update.
2231 * gnulib/import/m4/closedir.m4: Update.
2232 * gnulib/import/m4/configmake.m4: Update.
2233 * gnulib/import/m4/d-ino.m4: Update.
2234 * gnulib/import/m4/d-type.m4: Update.
2235 * gnulib/import/m4/dirent_h.m4: Update.
2236 * gnulib/import/m4/dirfd.m4: Update.
2237 * gnulib/import/m4/dirname.m4: Update.
2238 * gnulib/import/m4/double-slash-root.m4: Update.
2239 * gnulib/import/m4/dup.m4: Update.
2240 * gnulib/import/m4/dup2.m4: Update.
2241 * gnulib/import/m4/eealloc.m4: Update.
2242 * gnulib/import/m4/environ.m4: Update.
2243 * gnulib/import/m4/errno_h.m4: Update.
2244 * gnulib/import/m4/error.m4: Update.
2245 * gnulib/import/m4/exponentd.m4: Update.
2246 * gnulib/import/m4/exponentl.m4: Update.
2247 * gnulib/import/m4/extensions.m4: Update.
2248 * gnulib/import/m4/extern-inline.m4: Update.
2249 * gnulib/import/m4/fchdir.m4: Update.
2250 * gnulib/import/m4/fcntl-o.m4: Update.
2251 * gnulib/import/m4/fcntl.m4: Update.
2252 * gnulib/import/m4/fcntl_h.m4: Update.
2253 * gnulib/import/m4/fdopendir.m4: Update.
2254 * gnulib/import/m4/filenamecat.m4: Update.
2255 * gnulib/import/m4/flexmember.m4: Update.
2256 * gnulib/import/m4/float_h.m4: Update.
2257 * gnulib/import/m4/fnmatch.m4: Update.
2258 * gnulib/import/m4/fnmatch_h.m4: Update.
2259 * gnulib/import/m4/fpieee.m4: Update.
2260 * gnulib/import/m4/frexp.m4: Update.
2261 * gnulib/import/m4/frexpl.m4: Update.
2262 * gnulib/import/m4/fstat.m4: Update.
2263 * gnulib/import/m4/fstatat.m4: Update.
2264 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2265 * gnulib/import/m4/getcwd-path-max.m4: Update.
2266 * gnulib/import/m4/getcwd.m4: Update.
2267 * gnulib/import/m4/getdtablesize.m4: Update.
2268 * gnulib/import/m4/getlogin.m4: Update.
2269 * gnulib/import/m4/getlogin_r.m4: Update.
2270 * gnulib/import/m4/getpagesize.m4: Update.
2271 * gnulib/import/m4/getprogname.m4: Update.
2272 * gnulib/import/m4/gettimeofday.m4: Update.
2273 * gnulib/import/m4/glibc21.m4: Update.
2274 * gnulib/import/m4/glob.m4: Update.
2275 * gnulib/import/m4/glob_h.m4: Update.
2276 * gnulib/import/m4/gnulib-cache.m4: Update.
2277 * gnulib/import/m4/gnulib-common.m4: Update.
2278 * gnulib/import/m4/gnulib-comp.m4: Update.
2279 * gnulib/import/m4/gnulib-tool.m4: Update.
2280 * gnulib/import/m4/hard-locale.m4: Update.
2281 * gnulib/import/m4/include_next.m4: Update.
2282 * gnulib/import/m4/inttypes-pri.m4: Update.
2283 * gnulib/import/m4/inttypes.m4: Update.
2284 * gnulib/import/m4/isnand.m4: Update.
2285 * gnulib/import/m4/isnanl.m4: Update.
2286 * gnulib/import/m4/largefile.m4: Update.
2287 * gnulib/import/m4/limits-h.m4: Update.
2288 * gnulib/import/m4/localcharset.m4: Update.
2289 * gnulib/import/m4/locale-fr.m4: Update.
2290 * gnulib/import/m4/locale-ja.m4: Update.
2291 * gnulib/import/m4/locale-zh.m4: Update.
2292 * gnulib/import/m4/localtime-buffer.m4: Update.
2293 * gnulib/import/m4/longlong.m4: Update.
2294 * gnulib/import/m4/lstat.m4: Update.
2295 * gnulib/import/m4/malloc.m4: Update.
2296 * gnulib/import/m4/malloca.m4: Update.
2297 * gnulib/import/m4/math_h.m4: Update.
2298 * gnulib/import/m4/mbrtowc.m4: Update.
2299 * gnulib/import/m4/mbsinit.m4: Update.
2300 * gnulib/import/m4/mbsrtowcs.m4: Update.
2301 * gnulib/import/m4/mbstate_t.m4: Update.
2302 * gnulib/import/m4/memchr.m4: Update.
2303 * gnulib/import/m4/memmem.m4: Update.
2304 * gnulib/import/m4/mempcpy.m4: Update.
2305 * gnulib/import/m4/memrchr.m4: Update.
2306 * gnulib/import/m4/mkdir.m4: Update.
2307 * gnulib/import/m4/mkstemp.m4: Update.
2308 * gnulib/import/m4/mmap-anon.m4: Update.
2309 * gnulib/import/m4/mode_t.m4: Update.
2310 * gnulib/import/m4/msvc-inval.m4: Update.
2311 * gnulib/import/m4/msvc-nothrow.m4: Update.
2312 * gnulib/import/m4/multiarch.m4: Update.
2313 * gnulib/import/m4/nocrash.m4: Update.
2314 * gnulib/import/m4/off_t.m4: Update.
2315 * gnulib/import/m4/onceonly.m4: Update.
2316 * gnulib/import/m4/open-cloexec.m4: Update.
2317 * gnulib/import/m4/open.m4: Update.
2318 * gnulib/import/m4/openat.m4: Update.
2319 * gnulib/import/m4/opendir.m4: Update.
2320 * gnulib/import/m4/pathmax.m4: Update.
2321 * gnulib/import/m4/rawmemchr.m4: Update.
2322 * gnulib/import/m4/readdir.m4: Update.
2323 * gnulib/import/m4/readlink.m4: Update.
2324 * gnulib/import/m4/realloc.m4: Update.
2325 * gnulib/import/m4/rename.m4: Update.
2326 * gnulib/import/m4/rewinddir.m4: Update.
2327 * gnulib/import/m4/rmdir.m4: Update.
2328 * gnulib/import/m4/save-cwd.m4: Update.
2329 * gnulib/import/m4/secure_getenv.m4: Update.
2330 * gnulib/import/m4/setenv.m4: Update.
2331 * gnulib/import/m4/signal_h.m4: Update.
2332 * gnulib/import/m4/ssize_t.m4: Update.
2333 * gnulib/import/m4/stat-time.m4: Update.
2334 * gnulib/import/m4/stat.m4: Update.
2335 * gnulib/import/m4/std-gnu11.m4: Update.
2336 * gnulib/import/m4/stdbool.m4: Update.
2337 * gnulib/import/m4/stddef_h.m4: Update.
2338 * gnulib/import/m4/stdint.m4: Update.
2339 * gnulib/import/m4/stdio_h.m4: Update.
2340 * gnulib/import/m4/stdlib_h.m4: Update.
2341 * gnulib/import/m4/strchrnul.m4: Update.
2342 * gnulib/import/m4/strdup.m4: Update.
2343 * gnulib/import/m4/strerror.m4: Update.
2344 * gnulib/import/m4/string_h.m4: Update.
2345 * gnulib/import/m4/strstr.m4: Update.
2346 * gnulib/import/m4/strtok_r.m4: Update.
2347 * gnulib/import/m4/sys_socket_h.m4: Update.
2348 * gnulib/import/m4/sys_stat_h.m4: Update.
2349 * gnulib/import/m4/sys_time_h.m4: Update.
2350 * gnulib/import/m4/sys_types_h.m4: Update.
2351 * gnulib/import/m4/tempname.m4: Update.
2352 * gnulib/import/m4/time_h.m4: Update.
2353 * gnulib/import/m4/unistd-safer.m4: Update.
2354 * gnulib/import/m4/unistd_h.m4: Update.
2355 * gnulib/import/m4/warn-on-use.m4: Update.
2356 * gnulib/import/m4/wchar_h.m4: Update.
2357 * gnulib/import/m4/wchar_t.m4: Update.
2358 * gnulib/import/m4/wctype_h.m4: Update.
2359 * gnulib/import/m4/wint_t.m4: Update.
2360 * gnulib/import/malloc.c: Update.
2361 * gnulib/import/malloc/scratch_buffer.h: Update.
2362 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2363 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2364 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2365 * gnulib/import/malloca.c: Update.
2366 * gnulib/import/malloca.h: Update.
2367 * gnulib/import/malloca.valgrind: Update.
2368 * gnulib/import/math.in.h: Update.
2369 * gnulib/import/mbrtowc.c: Update.
2370 * gnulib/import/mbsinit.c: Update.
2371 * gnulib/import/mbsrtowcs-impl.h: Update.
2372 * gnulib/import/mbsrtowcs-state.c: Update.
2373 * gnulib/import/mbsrtowcs.c: Update.
2374 * gnulib/import/memchr.c: Update.
2375 * gnulib/import/memmem.c: Update.
2376 * gnulib/import/mempcpy.c: Update.
2377 * gnulib/import/memrchr.c: Update.
2378 * gnulib/import/mkdir.c: Update.
2379 * gnulib/import/mkstemp.c: Update.
2380 * gnulib/import/msvc-inval.c: Update.
2381 * gnulib/import/msvc-inval.h: Update.
2382 * gnulib/import/msvc-nothrow.c: Update.
2383 * gnulib/import/msvc-nothrow.h: Update.
2384 * gnulib/import/open.c: Update.
2385 * gnulib/import/openat-die.c: Update.
2386 * gnulib/import/openat-priv.h: Update.
2387 * gnulib/import/openat-proc.c: Update.
2388 * gnulib/import/openat.c: Update.
2389 * gnulib/import/openat.h: Update.
2390 * gnulib/import/opendir.c: Update.
2391 * gnulib/import/pathmax.h: Update.
2392 * gnulib/import/pipe-safer.c: Update.
2393 * gnulib/import/rawmemchr.c: Update.
2394 * gnulib/import/readdir.c: Update.
2395 * gnulib/import/readlink.c: Update.
2396 * gnulib/import/realloc.c: Update.
2397 * gnulib/import/ref-add.sin: Update.
2398 * gnulib/import/ref-del.sin: Update.
2399 * gnulib/import/rename.c: Update.
2400 * gnulib/import/rewinddir.c: Update.
2401 * gnulib/import/rmdir.c: Update.
2402 * gnulib/import/same-inode.h: Update.
2403 * gnulib/import/save-cwd.c: Update.
2404 * gnulib/import/save-cwd.h: Update.
2405 * gnulib/import/scratch_buffer.h: Update.
2406 * gnulib/import/secure_getenv.c: Update.
2407 * gnulib/import/setenv.c: Update.
2408 * gnulib/import/signal.in.h: Update.
2409 * gnulib/import/stat-time.c: Update.
2410 * gnulib/import/stat-time.h: Update.
2411 * gnulib/import/stat-w32.c: Update.
2412 * gnulib/import/stat-w32.h: Update.
2413 * gnulib/import/stat.c: Update.
2414 * gnulib/import/stdbool.in.h: Update.
2415 * gnulib/import/stddef.in.h: Update.
2416 * gnulib/import/stdint.in.h: Update.
2417 * gnulib/import/stdio.in.h: Update.
2418 * gnulib/import/stdlib.in.h: Update.
2419 * gnulib/import/str-two-way.h: Update.
2420 * gnulib/import/strchrnul.c: Update.
2421 * gnulib/import/strdup.c: Update.
2422 * gnulib/import/streq.h: Update.
2423 * gnulib/import/strerror-override.c: Update.
2424 * gnulib/import/strerror-override.h: Update.
2425 * gnulib/import/strerror.c: Update.
2426 * gnulib/import/string.in.h: Update.
2427 * gnulib/import/stripslash.c: Update.
2428 * gnulib/import/strnlen1.c: Update.
2429 * gnulib/import/strnlen1.h: Update.
2430 * gnulib/import/strstr.c: Update.
2431 * gnulib/import/strtok_r.c: Update.
2432 * gnulib/import/sys_stat.in.h: Update.
2433 * gnulib/import/sys_time.in.h: Update.
2434 * gnulib/import/sys_types.in.h: Update.
2435 * gnulib/import/tempname.c: Update.
2436 * gnulib/import/tempname.h: Update.
2437 * gnulib/import/time.in.h: Update.
2438 * gnulib/import/unistd--.h: Update.
2439 * gnulib/import/unistd-safer.h: Update.
2440 * gnulib/import/unistd.in.h: Update.
2441 * gnulib/import/unsetenv.c: Update.
2442 * gnulib/import/verify.h: Update.
2443 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2444 * gnulib/import/wchar.in.h: Update.
2445 * gnulib/import/wctype.in.h: Update.
2446 * gnulib/import/xalloc-oversized.h: Update.
2447 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2448 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2449
2450 2018-08-16 Gary Benson <gbenson@redhat.com>
2451
2452 PR gdb/13000:
2453 * gdb/main.c (captured_main_1): Exit with nonzero status
2454 in batch mode if the last command to be executed failed.
2455 * NEWS: Mention the above.
2456
2457 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2458
2459 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2460 end of warning message.
2461
2462 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2463
2464 PR gdb/22943:
2465 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2466 (aarch64_extract_return_value): Use
2467 aapcs_is_vfp_call_or_return_candidate.
2468 (aarch64_return_in_memory): Likewise.
2469 (aarch64_store_return_value): Likewise.
2470
2471 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2472
2473 * aarch64-tdep.c
2474 (aapcs_is_vfp_call_or_return_candidate): Make static
2475 (pass_in_v_or_stack): Remove function.
2476 (pass_in_v_vfp_candidate): New function.
2477 (aarch64_push_dummy_call): Check for float register candidates.
2478
2479 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2480
2481 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2482 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2483 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2484
2485 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2486
2487 PR build/23399
2488 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2489 (struct ipa_sym_addresses): Rename to...
2490 (struct ipa_sym_addresses_common): ... this.
2491 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2492
2493 2018-08-28 Tom Tromey <tom@tromey.com>
2494
2495 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2496 (token_fifo): Now a std::vector.
2497 (yylex, c_parse): Update.
2498 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2499 (token_fifo): Now a std::vector.
2500 (yylex, d_parse): Update.
2501 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2502 (token_fifo): Now a std::vector.
2503 (yylex, go_parse): Update.
2504
2505 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2506
2507 * parser-defs.h (struct type_stack) <elements>: Change type to
2508 std::vector<union type_stack_elt>.
2509 <depth, size>: Remove.
2510 * parse.c (parse_exp_in_context_1): Adjust.
2511 (type_stack_reserve): Remove.
2512 (check_type_stack_depth): Remove.
2513 (insert_into_type_stack): Adjust to std::vector.
2514 (insert_type): Likewise.
2515 (push_type): Likewise.
2516 (push_type_int): Likewise.
2517 (insert_type_address_space): Likewise.
2518 (pop_type): Likewise.
2519 (pop_type_int): Likewise.
2520 (pop_typelist): Likewise.
2521 (pop_type_stack): Likewise.
2522 (append_type_stack): Likewise.
2523 (push_type_stack): Likewise.
2524 (get_type_stack): Likewise.
2525 (type_stack_cleanup): Likewise.
2526 (push_typelist): Likewise.
2527 (follow_types): Likewise.
2528 (_initialize_parse): Likewise.
2529
2530 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2531
2532 * NEWS: Mention csky target.
2533
2534 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2535 Hafiz Abid Qadeer <abidh@codesourcery.com>
2536 Don Breazeal <donb@codesourcery.com>
2537
2538 * csky-linux-tdep.c: New file.
2539 * csky-tdep.c: Likewise.
2540 * csky-tdep.h: Likewise.
2541 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2542 csky-tdep.o.
2543 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2544 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2545 * configure.tgt: Add csky support.
2546
2547 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2548
2549 * python/py-framefilter.c (py_print_frame): Print frame architecture
2550 when printing on an MI output.
2551
2552 2018-08-27 Tom Tromey <tom@tromey.com>
2553
2554 PR build/23087:
2555 * configure: Rebuild.
2556 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2557
2558 2018-08-27 Tom Tromey <tom@tromey.com>
2559
2560 * aarch64-linux-tdep.c
2561 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2562 casts to int.
2563
2564 2018-08-27 Tom Tromey <tom@tromey.com>
2565
2566 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2567 unsigned.
2568 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2569 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2570 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2571 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2572 unsigned.
2573
2574 2018-08-27 Tom Tromey <tom@tromey.com>
2575
2576 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2577 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2578
2579 2018-08-27 Tom Tromey <tom@tromey.com>
2580
2581 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2582 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2583 ULONGEST_MAX.
2584 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2585 ULONGEST_MAX.
2586 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2587 ULONGEST_MAX.
2588 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2589 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2590 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2591 ULONGEST_MAX.
2592 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2593 (ppc64_linux_sigaction_tramp_frame)
2594 (ppc32_linux_sighandler_tramp_frame)
2595 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2596 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2597 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2598 * mn10300-linux-tdep.c (am33_linux_sigframe)
2599 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2600 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2601 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2602 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2603 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2604 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2605 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2606 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2607 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2608 * microblaze-linux-tdep.c
2609 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2610 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2611 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2612 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2613 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2614 * common/common-types.h (ULONGEST_MAX): New define.
2615 (CORE_ADDR_MAX): Fix formatting.
2616 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2617 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2618 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2619 (arm_linux_rt_sigreturn_tramp_frame)
2620 (arm_eabi_linux_sigreturn_tramp_frame)
2621 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2622 (thumb2_eabi_linux_sigreturn_tramp_frame)
2623 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2624 (arm_linux_restart_syscall_tramp_frame)
2625 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2626 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2627 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2628 ULONGEST_MAX.
2629 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2630
2631 2018-08-27 Tom Tromey <tom@tromey.com>
2632
2633 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2634 CORE_ADDR_MAX.
2635 * mips-tdep.c (mips_deal_with_atomic_sequence)
2636 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2637 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2638 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2639 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2640 CORE_ADDR_MAX.
2641 * aarch64-tdep.c (aarch64_software_single_step): Use
2642 CORE_ADDR_MAX.
2643
2644 2018-08-27 Tom Tromey <tom@tromey.com>
2645
2646 * linespec.c (complete_linespec_component): Add cast to "char".
2647 * completer.c (completion_tracker::build_completion_result): Add
2648 cast to "char".
2649
2650 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2651
2652 * solist.h (struct solist, struct target_so_ops): Fix
2653 indentation.
2654
2655 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2656
2657 * ada-tasks.c (ada_task_info_s): Remove typedef.
2658 (DEF_VEC_O(ada_task_info_s)): Remove.
2659 (struct ada_tasks_inferior_data): Initialize fields.
2660 <task_list>: Make an std::vector.
2661 (get_ada_tasks_inferior_data): Allocate with new.
2662 (ada_get_task_number): Adjust.
2663 (get_task_number_from_id): Likewise.
2664 (valid_task_id): Likewise.
2665 (ada_get_task_info_from_ptid): Likewise.
2666 (iterate_over_live_ada_tasks): Likewise.
2667 (add_ada_task): Likewise.
2668 (read_known_tasks): Likewise.
2669 (ada_build_task_list): Likewise.
2670 (print_ada_task_info): Likewise.
2671 (info_task): Likewise.
2672 (task_command_1): Likewise.
2673
2674 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2675
2676 * ada-lang.c (add_angle_brackets): Return std::string.
2677
2678 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2679
2680 * python/py-threadevent.c (py_get_event_thread): Initialize
2681 pythread.
2682
2683 2018-08-24 Pedro Alves <palves@redhat.com>
2684
2685 * python/py-bpevent.c (create_breakpoint_event_object): Use
2686 copy-initialization.
2687 * python/py-continueevent.c (emit_continue_event): Use
2688 copy-initialization.
2689 * python/py-exitedevent.c (create_exited_event_object): Return a
2690 gdbpy_ref<>.
2691 (emit_exited_event): Use copy-initialization.
2692 * python/py-inferior.c (python_new_inferior)
2693 (python_inferior_deleted, add_thread_object): Use
2694 copy-initialization.
2695 * python/py-infevents.c (create_inferior_call_event_object)
2696 (create_register_changed_event_object)
2697 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2698 (emit_inferior_call_event, emit_memory_changed_event)
2699 (emit_register_changed_event): Use copy-initialization.
2700 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2701 Return a gdbpy_ref<>.
2702 (emit_new_objfile_event): Use copy-initialization.
2703 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2704 (emit_clear_objfiles_event): Use copy-initialization.
2705 * python/py-signalevent.c (create_signal_event_object): Use
2706 copy-initialization.
2707 * python/py-threadevent.c (create_thread_event_object): Use
2708 copy-initialization.
2709
2710 2018-08-24 Pedro Alves <palves@redhat.com>
2711 Simon Marchi <simon.marchi@ericsson.com>
2712
2713 PR gdb/23379
2714 * python/py-continueevent.c: Include "gdbthread.h".
2715 (create_continue_event_object): Add intro comment. Add 'ptid'
2716 parameter. Use it to find thread to pass to
2717 create_thread_event_object.
2718 (emit_continue_event): Pass PTID down to
2719 create_continue_event_object.
2720 * python/py-event.h (py_get_event_thread): Declare.
2721 (create_thread_event_object): Remove default from 'thread'
2722 parameter.
2723 * python/py-stopevent.c (create_stop_event_object): Use
2724 py_get_event_thread.
2725 * python/py-threadevent.c (get_event_thread): Rename to ...
2726 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2727 and use it to find the thread.
2728 (create_thread_event_object): Assert that THREAD isn't null.
2729 Don't find the event thread here.
2730
2731 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2732
2733 * block.h (blockrange, blockranges): New struct declarations.
2734 (struct block): Add new field named `ranges'.
2735 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2736 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2737 macros for accessing ranges in struct block.
2738 (make_blockranges): New declaration.
2739 block.c (make_blockranges): New function.
2740 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2741 for block.
2742 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2743 * blockframe.c (cache_pc_function_block): New static global.
2744 (clear_pc_function_cache): Clear cache_pc_function_block.
2745 (find_pc_partial_function): Move comment to symtab.h. Add
2746 support for non-contiguous blocks.
2747 * cli/cli-cmds.c (block.h): Include.
2748 (print_disassembly): Handle printing of non-contiguous blocks.
2749 (disassemble_current_function): Likewise.
2750 (disassemble_command): Likewise.
2751
2752 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2753 BLOCK_START.
2754 * blockframe.c (get_pc_function_start): Likewise.
2755 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2756 (gcc_symbol_address): Likewise.
2757 * compile/compile-object-run.c (compile_object_run): Likewise.
2758 * compile/compile.c (get_expr_block_and_pc): Likewise.
2759 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2760 (func_addr_to_tail_call_list): Likewise.
2761 * findvar.c (default_read_var_value): Likewise.
2762 * inline-frame.c (inline_frame_this_id): Likewise.
2763 (skip-inline_frames): Likewise.
2764 * infcmd.c (until_next_command): Likewise.
2765 * linespec.c (convert_linespec_to_sals): Likewise.
2766 * parse.c (parse_exp_in_context_1): Likewise.
2767 * printcmd.c (build_address_symbolic): likewise.
2768 (info_address_command): Likewise.
2769 symtab.c (find_function_start_sal): Likewise.
2770 (skip_prologue_sal): Likewise.
2771 (find_function_alias_target): Likewise.
2772 (find_gnu_ifunc): Likewise.
2773 * stack.c (find_frame_funname): Likewise.
2774 * symtab.c (fixup_symbol_section): Likewise.
2775 (find_function_start_sal): Likewise.
2776 (skip_prologue_sal): Likewsie.
2777 (find_function_alias_target): Likewise.
2778 (find_gnu_ifunc): Likewise.
2779 * tracepoint.c (info_scope_command): Likewise.
2780 * value.c (value_fn_field): Likewise.
2781
2782 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2783 in place of find_pc_partial_function.
2784 * blockframe.c (find_function_entry_range_from_pc): New function.
2785 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2786 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2787 for each range in a block.
2788
2789
2790 2018-08-23 Xavier Roirand <roirand@adacore.com>
2791
2792 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2793 incrementation.
2794
2795 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2796
2797 * solib-svr4.c (read_program_headers_from_bfd): Return
2798 gdb::optional<gdb::byte_vector>.
2799 (svr4_exec_displacement): Adjust.
2800
2801 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2802
2803 * solib-svr4.c (read_program_header): Return
2804 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2805 (find_program_interpreter): Return
2806 gdb::optional<gdb::byte_vector>.
2807 (scan_dyntag_auxv): Adjust.
2808 (enable_break): Adjust.
2809 (svr4_exec_displacement): Adjust.
2810
2811 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2812
2813 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2814 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2815
2816 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2817
2818 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2819 string_vprintf.
2820 * guile/scm-utils.c (gdbscm_printf): Likewise.
2821 * serial.c (serial_printf): Likewise.
2822 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2823
2824 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2825
2826 * stack.c (print_frame): Print frame architecture when printing on
2827 an MI output.
2828 * NEWS: Mention new "arch" attribute in frame output.
2829
2830 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2831
2832 * arch/aarch64.h (aarch64_regnum): Update comment.
2833
2834 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2835
2836 * NEWS: Add SVE to 8.2 section.
2837
2838 2018-08-21 Pedro Alves <palves@redhat.com>
2839
2840 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2841 out from gdbscm_parse_function_args.
2842 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2843 gdbscm_parse_function_args_1.
2844
2845 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2846
2847 PR gdb/17816
2848 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2849 operator.
2850
2851 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2852
2853 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2854
2855 2018-08-19 Michael Spang <spang@google.com>
2856
2857 PR gdb/11786
2858 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2859 for PT_TLS segments.
2860
2861 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2862
2863 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2864 dwarf_variable_value.
2865 * dwarf2-frame.c (class dwarf_expr_executor):
2866 Add override for dwarf_variable_value.
2867 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2868 (class symbol_needs_eval_context): Likewise.
2869 (indirect_synthetic_pointer): Add forward declaration.
2870 (sect_variable_value): New function.
2871 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2872 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2873 for DW_OP_GNU_variable_value.
2874
2875 2018-08-16 Tom Tromey <tom@tromey.com>
2876
2877 * top.c (read_command_file): Update.
2878 (command_line_input): Remove "repeat" argument.
2879 * ada-lang.c (get_selections): Update.
2880 * linespec.c (decode_line_2): Update.
2881 * defs.h (command_line_input): Remove argument.
2882 * cli/cli-script.c (read_next_line): Update.
2883 * python/py-gdb-readline.c: Update.
2884
2885 2018-08-17 Tom Tromey <tom@tromey.com>
2886
2887 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2888 command_line_input.
2889
2890 2018-08-15 Tom Tromey <tom@tromey.com>
2891
2892 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2893
2894 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2895
2896 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2897 If used, use find_pc_partial_function to find address range
2898 to disassemble.
2899 * mi/mi-main.c (mi_cmd_list_features): Report
2900 "data-disassemble-a-option" feature.
2901 * NEWS: Mention new -data-disassemble option -a.
2902
2903 2018-08-13 Tom Tromey <tom@tromey.com>
2904
2905 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2906
2907 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2908
2909 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2910 (aarch64_linux_collect_sve_regset): Likewise.
2911 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2912 * regcache.h (regcache_map_entry_size): New function.
2913
2914 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2915
2916 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2917 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2918 (SVE_HEADER_VL_LENGTH): Likewise.
2919 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2920 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2921 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2922 (SVE_HEADER_SIZE_OFFSET): Likewise.
2923 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2924 (SVE_HEADER_VL_OFFSET): Likewise.
2925 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2926 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2927 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2928 (SVE_HEADER_SIZE): Likewise.
2929 (aarch64_linux_core_read_vq): Add function.
2930 (aarch64_linux_core_read_description): Check for SVE section.
2931
2932 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2933
2934 * aarch64-fbsd-tdep.c
2935 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2936 collect_size.
2937 * aarch64-linux-tdep.c
2938 (aarch64_linux_iterate_over_regset_sections): Likewise.
2939 * alpha-linux-tdep.c
2940 (alpha_linux_iterate_over_regset_sections):
2941 * alpha-nbsd-tdep.c
2942 (alphanbsd_iterate_over_regset_sections): Likewise.
2943 * amd64-fbsd-tdep.c
2944 (amd64fbsd_iterate_over_regset_sections): Likewise.
2945 * amd64-linux-tdep.c
2946 (amd64_linux_iterate_over_regset_sections): Likewise.
2947 * arm-bsd-tdep.c
2948 (armbsd_iterate_over_regset_sections): Likewise.
2949 * arm-fbsd-tdep.c
2950 (arm_fbsd_iterate_over_regset_sections): Likewise.
2951 * arm-linux-tdep.c
2952 (arm_linux_iterate_over_regset_sections): Likewise.
2953 * corelow.c (get_core_registers_cb): Likewise.
2954 (core_target::fetch_registers): Likewise.
2955 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2956 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2957 * gdbarch.h (void): Regenerate.
2958 * gdbarch.sh: Add supply_size and collect_size.
2959 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2960 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2961 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2962 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2963 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2964 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2965 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2966 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2967 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2968 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2969 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2970 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2971 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2972 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2973 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2974 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2975 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2976 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2977 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2978 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2979 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2980 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2981 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2982 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2983 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2984 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2985 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2986 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2987 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2988 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2989
2990 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
2991
2992 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2993 with string_printf.
2994
2995 2018-08-10 Keith Seitz <keiths@redhat.com>
2996
2997 * compile/compile-c-support.c (add_code_header, add_code_footer):
2998 Move into policy class.
2999 (c_push_user_expression, pop_user_expression_nop)
3000 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3001 (compile_program): New host class.
3002 (c_compile_program): New typedef.
3003 (c_compute_porgram): Use c_compile_program.
3004
3005 2018-08-10 Keith Seitz <keiths@redhat.com>
3006
3007 * compile/compile-internal.h (compile_instance::~compile_instance):
3008 Remove calls to htab_delete.
3009 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3010 * compile.c (compile_instance::compile_instance): Initialize
3011 htab unique pointers.
3012 (compile_instance::get_cached_type, compile_instance::insert_type)
3013 (compile_instance::error_symbol_once): Update for unique_ptr.
3014
3015 2018-08-10 Keith Seitz <keiths@redhat.com>
3016
3017 * compile/compile-c-symbols.c (struct symbol_error)
3018 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3019 (compile_instance::insert_symbol_error)
3020 (compile_instance::error_symbol_once): Move to ...
3021 * compile/compile.c: ... here.
3022
3023 2018-08-10 Keith Seitz <keiths@redhat.com>
3024
3025 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3026 instead of `new_compile_instance'.
3027 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3028 Update description.
3029 If the symbol error map is not initialized, create it.
3030 (generate_c_for_for_one_symbol): Do not check/initialize
3031 the symbol error map.
3032 * compile/compile-c-types.c (compile_c_instance): Make a class.
3033 Update all callers.
3034 (compile_instance::compile_instance): Initialize the type cache.
3035 (get_cached_type): New function.
3036 (insert_type): Update description.
3037 (compile_c_instance::m_default_cflags): Define.
3038 (convert_type): Update description. Use get_cached_type.
3039 (delete_instance): Moved to destructor.
3040 (new_compile_instance): Moved to constructor.
3041 * compile/compile-c.h (compile_c_instance): Make class inheriting
3042 from compile_instance.
3043 <base>: Remove field.
3044 <type_map, symbol_err_map>: Move to base class.
3045 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3046 * compile/compile-internal.h (compile_instance): Make class.
3047 <type_map_t, symbol_err_map_t>: Define.
3048 <fe>: Rename to `m_gcc_fe'.
3049 <scope, block, gcc_target_options>: Add `m_' prefix.
3050 <m_type_map, m_symbol_err_map>: New fields, moved from
3051 compile_c_instance.
3052 <destroy>: Remove.
3053 (convert_type, new_compile_instance): Remove.
3054 * compile/compile.c (cleanup_compile_instance): Remove.
3055 (compile_to_object): Use unique_ptr to eliminate cleanups.
3056 (compile_instance::set_print_callback, compile_instance::version)
3057 (compile_instance::set_verbose)
3058 (compile_instance::set_driver_filename)
3059 (compile_instance::set_triplet_regexp)
3060 (compile_instance::set_arguments)
3061 (compile_instance::set_source_file)
3062 (compile_instance::compile): Define.
3063
3064 2018-08-10 Keith Seitz <keiths@redhat.com>
3065
3066 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3067 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3068 gcc-c-fe.def to define C plugin.
3069 (delete_instance): Delete `c_plugin'.
3070 (new_compile_instance): Initialize `c_plugin'.
3071 * compile/compile-c.h: Include gcc_c_plugin.h.
3072 (struct compile_c_instance) <c_plugin>: New member.
3073 * gcc-c-plugin.h: New file.
3074 Update all callers with API change.
3075
3076 2018-08-10 Keith Seitz <keiths@redhat.com>
3077
3078 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3079 (HFILES_NO_SRCDIR): ... to here.
3080 Add compile-internal.h and compile-c.h.
3081 * compile/compile-c-support.c: Include compile-c.h.
3082 * compile/compile-c-symbols.c: Include compile-c.h.
3083 (generate_c_for_variable_locations): Update comment.
3084 * compile/compile-c-types.c: Include compile-c.h.
3085 * compile/compile-c.h: New file -- moved C language declarations
3086 from other files here.
3087 * compile/compile-internal.h: Do not include hashtab.h or
3088 common/enum-flags.h.
3089 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3090 (gcc_convert_symbol, gcc_symbol_address)
3091 (generate_c_for_variable_locations, c_get_mode_for_size)
3092 (c_get_range_decl_name): Definitions moved to compile-c.h.
3093 * compile/compile-loc2c.c: Include compile-c.h.
3094
3095 2018-08-10 Keith Seitz <keiths@redhat.com>
3096
3097 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3098 (c_symbol_substitution_name): ... this.
3099 Update all callers.
3100
3101 2018-08-10 Keith Seitz <keiths@redhat.com>
3102
3103 * compile/compile-c-support.c (c_compute_program): Use
3104 unique_xmalloc_ptr to eliminate cleanup.
3105 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3106 Return a unique_xmalloc_ptr and eliminate cleanup.
3107 * compile/compile-internal.h (generate_c_for_variable_locations):
3108 Return unique_xmalloc_ptr and update description.
3109
3110 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3111
3112 * corelow.c (core_target::get_core_register_section): Rename
3113 min_size to section_min_size.
3114
3115 2018-08-09 Jim Wilson <jimw@sifive.com>
3116
3117 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3118 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3119 * NEWS: Mention new GNU/Linux RISC-V target.
3120 * configure.host: Add riscv*-*-linux*.
3121 * configure.nat: Add riscv*.
3122 * configure.tgt: Add riscv*-*-linux*.
3123 * riscv-linux-nat.c: New file.
3124 * riscv-linux-tdep.c: New file.
3125
3126 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3127
3128 * infrun.c (resume): Make static, add forward declaration.
3129 (proceed): Update header comment.
3130 * infrun.h (resume): Delete declaration.
3131
3132 2018-08-09 Tom Tromey <tom@tromey.com>
3133
3134 * riscv-tdep.h: Minor formatting fixes.
3135
3136 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3137
3138 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3139 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3140 (test_mkdir_recursive): Likewise.
3141 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3142
3143 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3144
3145 * valarith.c (value_subscripted_rvalue): If an array is not in
3146 memory, and we don't know the upper bound, then we can't know that
3147 the requested element exists or not.
3148
3149 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3150
3151 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3152 (target_options_to_string): Add comment.
3153
3154 2018-08-08 Tom Tromey <tom@tromey.com>
3155
3156 * unittests/scoped_mmap-selftests.c: Check result of "write".
3157
3158 2018-08-08 Jim Wilson <jimw@sifive.com>
3159
3160 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3161 (decode_register_index_short): New.
3162 (decode_j_type_insn, decode_cj_type_insn): New.
3163 (decode_b_type_insn, decode_cb_type_insn): New.
3164 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3165 local xlen. Check xlen when decoding ambiguous compressed insns. In
3166 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3167 is_c_sw_insn instead of is_sw_insn.
3168 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3169 (riscv_software_single_step): New.
3170 * riscv-tdep.h (riscv_software_single_step): Declare.
3171
3172 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3173 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3174
3175 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3176
3177 PR gdb/18050:
3178 * target.c (dispose_inferior): Don't dispose of inferiors that are
3179 already killed.
3180
3181 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3182
3183 * remote.c (remote_target::download_tracepoint): Change char* to
3184 const char*.
3185
3186 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3187
3188 * target.h (target_options_to_string): Return an std::string.
3189 * target.c (str_comma_list_concat_elem): Return void, use
3190 std::string.
3191 (do_option): Likewise.
3192 (target_options_to_string): Return an std::string.
3193 * linux-nat.c (linux_nat_target::wait): Adjust.
3194 * target-debug.h (target_debug_print_options): Adjust.
3195
3196 2018-08-07 Tom Tromey <tom@tromey.com>
3197
3198 * Makefile.in (CPPFLAGS): New variable.
3199 (INTERNAL_CPPFLAGS): Use it.
3200
3201 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3202
3203 * NEWS: Mention the index cache.
3204
3205 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3206
3207 * common/pathstuff.h (get_standard_cache_dir): New.
3208 * common/pathstuff.c (get_standard_cache_dir): New.
3209 * build-id.h (build_id_to_string): New.
3210 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3211 DEBUG_STR_SUFFIX): Move to here.
3212 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3213 DEBUG_STR_SUFFIX): Move from there.
3214 (write_psymtabs_to_index): Make non-static, add basename
3215 parameter. Write to temporary files, rename when done.
3216 (save_gdb_index_command): Adjust call to
3217 write_psymtabs_to_index.
3218 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3219 field.
3220 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3221 (get_gdb_index_contents_from_cache): New.
3222 (get_gdb_index_contents_from_cache_dwz): New.
3223 (dwarf2_initialize_objfile): Read index from cache.
3224 (dwarf2_build_psymtabs): Save to index.
3225 * dwarf-index-cache.h: New file.
3226 * dwarf-index-cache.c: New file.
3227 * dwarf-index-write.h: New file.
3228
3229 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3230
3231 * gnulib/aclocal.m4: Re-generate.
3232 * gnulib/config.in: Re-generate.
3233 * gnulib/configure: Re-generate.
3234 * gnulib/import/Makefile.am: Re-generate.
3235 * gnulib/import/Makefile.in: Re-generate.
3236 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3237 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3238 * gnulib/import/m4/mkdir.m4: New file.
3239 * gnulib/import/mkdir.c: New file.
3240 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3241 module.
3242
3243 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3244
3245 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3246 * common/scoped_mmap.c: New file.
3247 * common/scoped_mmap.h (destroy): New method.
3248 (~scoped_mmap, reset): Use destroy.
3249 (scoped_mmap): New move constructor.
3250 (mmap_file): New declaration.
3251 * unittests/scoped_mmap-selftests.c (test_normal,
3252 test_invalid_filename, run_tests): New functions.
3253 (_initialize_scoped_mmap_selftests): Register selftest.
3254
3255 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3256
3257 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3258 (read_gdb_index_from_buffer): ... this. Remove section
3259 parameter, add buffer parameter.
3260 (get_gdb_index_contents_ftype,
3261 get_gdb_index_contents_dwz_ftype): New typedefs.
3262 (dwarf2_read_gdb_index): Add callback parameters to get the
3263 index contents.
3264 (get_gdb_index_contents_from_section): New.
3265 (dwarf2_initialize_objfile): Update call to
3266 dwarf2_read_gdb_index.
3267
3268 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3269
3270 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3271 (gdb_open_cloexec): Likewise.
3272 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3273 (commandline_from_pid): Likewise.
3274 (linux_xfer_osdata_threads): Likewise.
3275 (linux_xfer_osdata_fds): Likewise.
3276 * ada-lang.c (is_package_name): Likewise.
3277 * auxv.c (procfs_xfer_auxv): Likewise.
3278 * breakpoint.c (print_one_breakpoint_location): Use
3279 uiout::field_fmt.
3280 (print_one_catch_solib): Use string_printf.
3281 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3282 (add_pe_forwarded_sym): Likewise.
3283 * dwarf2read.c (create_type_unit_group): Likewise.
3284 (build_error_marker_type): Likewise.
3285 * infcall.c (get_function_name): Likewise.
3286 * valprint.c (print_converted_chars_to_obstack): Likewise.
3287 * xtensa-tdep.c (xtensa_register_type): Likewise.
3288
3289 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3290
3291 * remote.c (remote_target::download_tracepoint): Fix format
3292 string errors.
3293
3294 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3295
3296 * tracefile.c: Include common/byte-vector.h.
3297 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3298 with trace_regblock_size if needed. Update uses of buf.
3299
3300 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3301
3302 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3303 std::vector<unsigned char>.
3304 * tracepoint.c (collection_list::collection_list): Remove
3305 m_regs_mask initializer from initializer list. Resize
3306 m_regs_mask using the largest remote register number.
3307 (collection_list::add_remote_register): Remove size check on
3308 m_regs_mask. Use at to access element.
3309 (collection_list::stringify): Change type of temp_buf to
3310 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3311 stringify the register mask. Use pack_hex_byte for the register
3312 mask.
3313
3314 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3315
3316 * tracepoint.h (class collection_list) <add_register>: Remove.
3317 <add_remote_register, add_ax_registers, add_local_register>:
3318 Declare.
3319 <add_memrange>: Add scope parameter.
3320 * tracepoint.c (encode_actions_1): Likewise.
3321 (collection_list::add_register): Rename to ...
3322 (collection_list::add_remote_register): ... this. Update
3323 comment.
3324 (collection_list::add_ax_registers, add_local_register): New
3325 methods.
3326 (collection_list::add_memrange): Add scope parameter. Call
3327 add_local_register instead of add_register.
3328 (finalize_tracepoint_aexpr): New function.
3329 (collection_list::collect_symbol): Update calls to add_memrange.
3330 Call add_local_register instead of add_register. Call
3331 add_ax_registers. Call finalize_tracepoint_aexpr.
3332 (encode_actions_1): Get remote regnos for $reg action. Call
3333 add_remote_register, add_ax_registers, and add_local_register.
3334 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3335 (validate_actionline): Call finalize_tracepoint_aexpr.
3336
3337 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3338
3339 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3340 Replace array buf with gdb::char_vector buf, of size
3341 get_remote_packet_size (). Replace references to buf and
3342 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3343 and xsnprintf with snprintf. Raise errors if the buffer is too
3344 small.
3345
3346 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3347
3348 * remote.c (remote_target::download_tracepoint): Fix the has_more
3349 predicate in the QTDP action list iteration.
3350
3351 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3352
3353 * remote.c (remote_target::download_tracepoint): Fix indentation
3354 in for block.
3355
3356 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3357
3358 * proc-api.c (_initialize_proc_api): Remove c, unused.
3359 * procfs.c (procfs_init_inferior): Remove signals, unused.
3360 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3361 unused.
3362
3363 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3364 Andrew Burgess <andrew.burgess@embecosm.com>
3365
3366 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3367 'W_STOPCODE (0)' as this could be ambiguous.
3368
3369 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3370
3371 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3372 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3373 "ai_socktype").
3374
3375 2018-08-02 Tom Tromey <tom@tromey.com>
3376
3377 PR symtab/16842.
3378 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3379 symbols.
3380 (process_structure_scope): Likewise.
3381
3382 2018-08-02 Xavier Roirand <roirand@adacore.com>
3383
3384 PR gdb/22629:
3385 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3386 kill inferior.
3387
3388 2018-08-02 Tom Tromey <tom@tromey.com>
3389
3390 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3391 (darwin_suspend_inferior, darwin_resume_inferior)
3392 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3393 (darwin_check_new_threads): Check result of get_darwin_inferior.
3394
3395 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3396
3397 GDB 8.1.1 released.
3398
3399 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3400
3401 * varobj.c (varobj_get_path_expr_parent): Report an error if
3402 parent is a dynamic varobj.
3403
3404 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3405
3406 * gnulib/aclocal.m4: Re-generate.
3407 * gnulib/config.in: Re-generate.
3408 * gnulib/configure: Re-generate.
3409 * gnulib/import/Makefile.in: Re-generate.
3410 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3411 * gnulib/import/m4/onceonly.m4: Re-generate.
3412
3413 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3414
3415 * target-descriptions.c (struct xml_test_tdesc): New.
3416 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3417 (record_xml_tdesc): Update.
3418 (maintenance_check_xml_descriptions): Update.
3419 * target-descriptions.h (record_xml_tdesc): Update comment.
3420
3421 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3422
3423 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3424 checking array bounds are defined.
3425
3426 2018-07-30 Tom Tromey <tom@tromey.com>
3427
3428 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3429 irreflexivity violation.
3430
3431 2018-07-30 Tom Tromey <tom@tromey.com>
3432
3433 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3434 * value.c (unpack_long): Remove lint code.
3435 * valops.c (value_ind): Remove lint code.
3436 * valarith.c (value_x_binop, value_x_unop, value_equal)
3437 (value_pos): Remove lint code.
3438
3439 2018-07-28 Tom de Vries <tdevries@suse.de>
3440
3441 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3442 with undefined upper bound as <optimized out>.
3443
3444 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3445
3446 * gcore.in: Rename variable "name" to "prefix". Expand
3447 "usage" text.
3448
3449 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3450
3451 * windows-nat.c (windows_nat_target::create_inferior): Update to
3452 call close() in global namespace.
3453
3454 2018-07-26 Tom Tromey <tom@tromey.com>
3455
3456 * dwarf-index-write.c (add_address_entry): Don't add objfile
3457 offsets.
3458 * dbxread.c (find_stab_function): Rename from
3459 find_stab_function_addr. Return a bound_minimal_symbol.
3460 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3461 Don't add objfile offsets.
3462 (end_psymtab): Use raw_text_low, raw_text_high,
3463 MSYMBOL_VALUE_RAW_ADDRESS.
3464 (read_ofile_symtab): Update.
3465 (process_one_symbol): Update.
3466 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3467 offsets.
3468 (dw2_relocate): Remove.
3469 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3470 searching addrmap.
3471 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3472 Update.
3473 (process_psymtab_comp_unit_reader, add_partial_symbol)
3474 (add_partial_subprogram, dwarf2_ranges_read): Update.
3475 (load_partial_dies): Update.
3476 (add_address_entry): Don't add objfile offsets.
3477 (dwarf2_build_include_psymtabs): Update.
3478 (create_addrmap_from_aranges): Don't add objfile offsets.
3479 (dw2_find_pc_sect_compunit_symtab): Update.
3480 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3481 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3482 Update.
3483 (parse_partial_symbols): Don't add objfile offsets. Use
3484 raw_text_low, raw_text_high. Update.
3485 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3486 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3487 or call 'relocate' quick function. Clear psymbol_map.
3488 * psympriv.h (struct partial_symbol) <address>: Add section
3489 offset.
3490 <set_unrelocated_address>: Rename from set_address.
3491 <raw_text_low, raw_text_high>: New methods.
3492 <text_low, text_high>: Add objfile parameter.
3493 (add_psymbol_to_bcache): Add 'section' parameter. Call
3494 set_unrelocated_address.
3495 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3496 (find_pc_psymbol): Update.
3497 (fixup_psymbol_section, relocate_psymtabs): Remove.
3498 (dump_psymtab, psym_functions): Update.
3499 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3500 parameter.
3501 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3502 (start_psymtab_common): Update.
3503 * symfile-debug.c (debug_qf_relocate): Remove.
3504 (debug_sym_quick_functions): Update.
3505 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3506 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3507 Update.
3508
3509 2018-07-26 Tom Tromey <tromey@redhat.com>
3510
3511 * dbxread.c (end_psymtab): Use text_high_valid and
3512 text_low_valid.
3513 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3514 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3515 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3516 Update comment.
3517 <text_low_valid, text_high_valid>: New fields.
3518 <set_text_low, set_text_high>: Update.
3519 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3520
3521 2018-07-26 Tom Tromey <tom@tromey.com>
3522
3523 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3524 Update.
3525 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3526 textlow and texthigh fields.
3527 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3528 Update.
3529 * mdebugread.c (parse_lines, parse_partial_symbols)
3530 (psymtab_to_symtab_1): Update.
3531 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3532 Rename fields. Update comment. Now private.
3533 <text_low, text_high, set_text_low, set_text_high>: New methods.
3534 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3535 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3536 (start_psymtab_common, maintenance_info_psymtabs)
3537 (maintenance_check_psymtabs): Update.
3538 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3539 texthigh fields.
3540 (scan_xcoff_symtab): Update.
3541
3542 2018-07-26 Tom Tromey <tromey@redhat.com>
3543
3544 * psympriv.h (struct partial_symbol) <unrelocated_address,
3545 address, set_address>: New methods.
3546 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3547 (fixup_psymbol_section, relocate_psymtabs): Update.
3548 (print_partial_symbols): Add 'objfile' parameter. Update.
3549 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3550 Update.
3551
3552 2018-07-26 Tom Tromey <tom@tromey.com>
3553
3554 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3555 (debug_names::write_psymbols): Update.
3556 * psympriv.h (struct partial_symbol): Derive from
3557 general_symbol_info.
3558 <obj_section>: New method.
3559 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3560 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3561 (find_pc_sect_psymbol, fixup_psymbol_section)
3562 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3563 (print_partial_symbols, recursively_search_psymtabs)
3564 (compare_psymbols, psymbol_hash, psymbol_compare)
3565 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3566 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3567
3568 2018-07-26 Tom Tromey <tromey@redhat.com>
3569
3570 * dbxread.c (end_psymtab): Remove dead code.
3571
3572 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3573
3574 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3575 DWARF unwinders are disabled.
3576 * dwarf2-frame.c: Add dwarf2read.h include.
3577 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3578 disabled.
3579 (dwarf2_frame_unwinders_enabled_p): Define.
3580 (show_dwarf_unwinders_enabled_p): New function.
3581 (_initialize_dwarf2_frame): Register switch to control DWARF
3582 unwinder use.
3583 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3584 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3585 (show_dwarf_cmdlist): Remove static keyword.
3586 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3587 (show_dwarf_cmdlist): Declare.
3588 * NEWS: Document new feature.
3589
3590 2018-07-26 Tom de Vries <tdevries@suse.de>
3591
3592 PR breakpoints/23366
3593 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3594
3595 2018-07-26 Tom de Vries <tdevries@suse.de>
3596
3597 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3598 DW_AT_count can't be translated to a dynamic prop.
3599
3600 2018-07-25 Tom de Vries <tdevries@suse.de>
3601
3602 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3603 try/catch.
3604
3605 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3606
3607 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3608
3609 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3610
3611 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3612
3613 2018-07-24 Keith Seitz <keiths@redhat.comt
3614
3615 PR symtab/23010
3616 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3617 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3618 instead of add_symbol_to_list.
3619 (read_file_scope): Call prepare_one_comp_unit before reading
3620 any other DIEs.
3621
3622 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3623
3624 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3625
3626 2018-07-24 Tom Tromey <tom@tromey.com>
3627
3628 * utils.c (malloc, realloc, free): Don't declare.
3629 * configure, config.in: Rebuild.
3630 * configure.ac: Don't check for declarations of free, malloc, or
3631 realloc.
3632
3633 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3634
3635 * aarch64-linux-nat.c
3636 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3637 variable.
3638 * arm-linux-nat.c (fetch_regs): Likewise.
3639 (store_regs): Likewise.
3640 (fetch_vfp_regs): Likewise.
3641 (store_vfp_regs): Likewise.
3642 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3643 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3644 (arm_linux_nat_target::insert_watchpoint): Likewise.
3645 (arm_linux_nat_target::remove_watchpoint): Likewise.
3646 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3647 Likewise.
3648 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3649 Likewise.
3650 * ppc-linux-nat.c (fetch_register): Likewise.
3651 (fetch_all_gp_regs): Likewise.
3652 (fetch_ppc_registers): Likewise.
3653 (store_all_gp_regs): Likewise.
3654 (store_ppc_registers): Likewise.
3655 (hwdebug_insert_point): Likewise.
3656 (can_use_watchpoint_cond_accel): Likewise.
3657 * remote-sim.c (gdb_os_write_stdout): Likewise.
3658
3659 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3660 Tom Tromey <tom@tromey.com>
3661
3662 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3663 test for it.
3664 * configure: Rebuild.
3665
3666 2018-07-22 Tom Tromey <tom@tromey.com>
3667
3668 * regformats/regdat.sh: Define xmltarget_${name} inside
3669 #ifndef IN_PROCESS_AGENT.
3670
3671 2018-07-22 Tom Tromey <tom@tromey.com>
3672
3673 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3674
3675 2018-07-22 Tom Tromey <tom@tromey.com>
3676
3677 * symfile.c (reread_symbols): Notify iter, not objfile.
3678
3679 2018-07-22 Tom Tromey <tom@tromey.com>
3680
3681 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3682 Use arch_ops.
3683 (ravenscar_thread_target::prepare_to_store): Likewise.
3684
3685 2018-07-22 Tom Tromey <tom@tromey.com>
3686
3687 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3688 unused variable. Call value_fetch_lazy when needed.
3689 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3690 Remove unused variable. Call value_fetch_lazy when needed.
3691
3692 2018-07-22 Tom Tromey <tom@tromey.com>
3693
3694 * m32c-tdep.c (mark_dma): Return void.
3695 (make_regs): Remove unused declarations.
3696
3697 2018-07-22 Tom Tromey <tom@tromey.com>
3698
3699 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3700 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3701 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3702 bkscm_get_valid_block_smob_arg_unsafe for effect.
3703
3704 2018-07-22 Tom Tromey <tom@tromey.com>
3705
3706 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3707 value_type.
3708
3709 2018-07-22 Tom Tromey <tom@tromey.com>
3710
3711 * windows-nat.c (saved_context): Conditionally define.
3712 * remote.c (remote_target::remote_btrace_maybe_reopen):
3713 Conditionally declare "warned".
3714 * inflow.c (sigquit_ours): Conditionally define.
3715 (new_tty): Move "tty" declaration inside #if.
3716 * guile/guile.c (guile_datadir): Conditionally define.
3717 * charset.c (set_be_le_names): Move some declarations inside #if.
3718 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3719 #if.
3720 (parse_xml_btrace_conf): Likewise.
3721
3722 2018-07-22 Tom Tromey <tom@tromey.com>
3723
3724 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3725
3726 2018-07-22 Tom Tromey <tom@tromey.com>
3727
3728 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3729 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3730 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3731 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3732 * stack.c (frame_apply_level_command): Remove unused variable.
3733 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3734 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3735 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3736 unused variable.
3737 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3738 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3739 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3740 variable.
3741 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3742 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3743 variable.
3744 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3745 Remove unused variable.
3746 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3747 variable.
3748 * common/tdesc.c (print_xml_feature::visit): Remove unused
3749 variable.
3750 * compile/compile-object-load.c (store_regs): Remove unused
3751 variables.
3752 * complaints.c (clear_complaints): Remove unused variable.
3753 * corelow.c (core_target_open): Remove unused variable.
3754 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3755 variable.
3756 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3757 variable.
3758 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3759 variable.
3760 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3761 variable.
3762 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3763 variable.
3764 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3765 variable.
3766 * ia64-tdep.c (examine_prologue): Remove unused variable.
3767 * infcall.c (run_inferior_call): Remove unused variable.
3768 * inferior.c (exit_inferior): Remove unused variable.
3769 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3770 * linespec.c (decode_line_2): Remove unused variable.
3771 * linux-nat.c (super_close): Remove.
3772 * linux-tdep.c (linux_info_proc): Remove unused variable.
3773 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3774 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3775 Remove unused variable.
3776 * parse.c (find_minsym_type_and_address): Remove unused variable.
3777 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3778 variable.
3779 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3780 variable.
3781 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3782 variables.
3783 * record-btrace.c (record_btrace_target::store_registers): Remove
3784 unused variable.
3785 (cmd_show_record_btrace_cpu): Remove unused variable.
3786 * riscv-tdep.c (riscv_register_reggroup_p)
3787 (riscv_push_dummy_call, riscv_return_value): Remove unused
3788 variable.
3789 * rust-exp.y (literal): Remove unused variable.
3790 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3791 unused variable.
3792 <STRUCTOP_ANONYMOUS>: Likewise.
3793 * s390-linux-tdep.c (s390_linux_init_abi_31)
3794 (s390_linux_init_abi_64): Remove unused variable.
3795 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3796 (file_select_thread, net_windows_open, _initialize_ser_windows):
3797 Remove unused variables.
3798 * symtab.c (find_pc_sect_line): Remove unused variable.
3799 * target-memory.c (compute_garbled_blocks): Remove unused
3800 variable.
3801 (target_write_memory_blocks): Remove unused variable.
3802 * target.c (target_stack::unpush): Remove unused variables.
3803 * tracepoint.c (start_tracing, all_tracepoint_actions)
3804 (merge_uploaded_trace_state_variables)
3805 (print_one_static_tracepoint_marker): Remove unused variable.
3806 * unittests/basic_string_view/element_access/char/1.cc (test01):
3807 Remove unused variable.
3808 * windows-nat.c (windows_continue, windows_add_all_dlls)
3809 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3810 Remove unused variables.
3811
3812 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3813
3814 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3815 attr_profile in HAVE_ELF.
3816 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3817 HAVE_ELF.
3818
3819 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3820
3821 * frame.c (frame_register_unwind): Change parameter name.
3822 (frame_unwind_register): Likewise.
3823 (frame_unwind_register_value): Likewise.
3824 (frame_unwind_register_signed): Likewise.
3825 (frame_unwind_register_unsigned): Likewise.
3826 * frame.h (frame_register_unwind): Likewise.
3827 (frame_unwind_register): Likewise.
3828 (frame_unwind_register_value): Likewise.
3829 (frame_unwind_register_signed): Likewise.
3830 (frame_unwind_register_unsigned): Likewise.
3831 (frame_unwind_arch): Likewise.
3832
3833 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3834
3835 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3836 ISA maintenance.
3837
3838 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3839
3840 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3841 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3842 hand.
3843
3844 2018-07-20 Keith Seitz <keiths@redhat.com>
3845
3846 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3847 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3848 m_compunit_symtab, m_language>: Add "m_" prefix.
3849 Update all uses.
3850 * buildsym.c: Update all uses.
3851
3852 2018-07-20 Tom Tromey <tom@tromey.com>
3853
3854 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3855 * buildsym.h (record_line_ftype): Remove typedef.
3856
3857 2018-07-20 Tom Tromey <tom@tromey.com>
3858
3859 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3860 (end_expandable_symtab): Likewise.
3861 (end_symtab_get_static_block): Likewise.
3862 (end_symtab_from_static_block): Likewise.
3863 * buildsym-legacy.c (augment_type_symtab): Remove.
3864 (end_expandable_symtab): Remove.
3865 (end_symtab_get_static_block): Remove.
3866 (end_symtab_from_static_block): Remove.
3867
3868 2018-07-20 Tom Tromey <tom@tromey.com>
3869
3870 * dwarf2read.c: Include buildsym.h.
3871 (struct dwarf2_cu) <builder>: New method.
3872 (fixup_go_packaging): Update.
3873 (process_full_comp_unit, process_full_type_unit): Update. Don't
3874 use scoped_free_pendings.
3875 (using_directives): Add "cu" parameter, remove "language".
3876 (read_import_statement, setup_type_unit_groups, )
3877 (read_func_scope, read_lexical_block_scope)
3878 (dwarf2_record_block_ranges, read_namespace): Update.
3879 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3880 (lnp_state_machine::handle_end_sequence): Update.
3881 (class lnp_state_machine) <m_cu>: New member.
3882 <m_record_line_callback>: Remove.
3883 <m_currently_recording_lines>: New member.
3884 (lnp_state_machine::handle_set_file): Update.
3885 (noop_record_line): Remove.
3886 (dwarf_record_line_p): Add cu parameter.
3887 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3888 (lnp_state_machine::record_line)
3889 (lnp_state_machine::lnp_state_machine)
3890 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3891 (dwarf_decode_lines): Update.
3892 (dwarf2_start_subfile): Add cu parameter.
3893 (dwarf2_start_symtab, new_symbol): Update.
3894 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3895 Remove dwarf2_per_objfile parameter.
3896 (dwarf_decode_macros): Update.
3897
3898 2018-07-20 Tom Tromey <tom@tromey.com>
3899
3900 * stabsread.c (define_symbol): Update.
3901 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3902 * dwarf2read.c (new_symbol): Update.
3903 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3904 * cp-namespace.c: Include buildsym.h.
3905 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3906 * buildsym-legacy.c (get_buildsym_compunit): New function.
3907
3908 2018-07-20 Tom Tromey <tom@tromey.com>
3909
3910 * xcoffread.c: Include buildsym-legacy.h.
3911 * windows-nat.c: Include buildsym-legacy.h.
3912 * stabsread.c: Include buildsym-legacy.h.
3913 * mdebugread.c: Include buildsym-legacy.h.
3914 * buildsym-legacy.h: New file.
3915 * buildsym-legacy.c: New file, from buildsym.c.
3916 * go32-nat.c: Include buildsym-legacy.h.
3917 * dwarf2read.c: Include buildsym-legacy.h.
3918 * dbxread.c: Include buildsym-legacy.h.
3919 * cp-namespace.c: Include buildsym-legacy.h.
3920 * coffread.c: Include buildsym-legacy.h.
3921 * buildsym.h: Move some contents to buildsym-legacy.h.
3922 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3923 buildsym-legacy.c.
3924 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3925
3926 2018-07-20 Tom Tromey <tom@tromey.com>
3927
3928 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3929 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3930 (buildsym_compunit::buildsym_compunit)
3931 (buildsym_compunit::~buildsym_compunit)
3932 (buildsym_compunit::get_macro_table): Define.
3933
3934 2018-07-20 Tom Tromey <tom@tromey.com>
3935
3936 * buildsym.c (reset_symtab_globals): Remove.
3937 (buildsym_compunit::end_symtab_from_static_block): Update.
3938 (buildsym_compunit::augment_type_symtab): Update.
3939 (end_symtab_from_static_block): Call free_buildsym_compunit.
3940 (augment_type_symtab, end_symtab, end_expandable_symtab):
3941 Likewise.
3942
3943 2018-07-20 Tom Tromey <tom@tromey.com>
3944
3945 * arch-utils.c: Do not include buildsym.h.
3946 * mipsread.c: Do not include buildsym.h.
3947 * machoread.c: Do not include buildsym.h.
3948 * elfread.c: Do not include buildsym.h.
3949
3950 2018-07-20 Tom Tromey <tom@tromey.com>
3951
3952 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3953 initialization.
3954 (buildsym_compunit): Add new constructor.
3955 (struct buildsym_compunit) <get_last_source_file, finish_block,
3956 record_block_range, start_subfile, patch_subfile_names,
3957 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3958 set_last_source_start_addr, get_last_source_start_addr,
3959 get_local_using_directives, set_local_using_directives,
3960 get_global_using_directives, outermost_context_p,
3961 get_current_context_stack, get_context_stack_depth,
3962 get_current_subfile, get_local_symbols, get_file_symbols,
3963 get_global_symbols, record_debugformat, record_producer,
3964 push_context, pop_context, end_symtab_get_static_block,
3965 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3966 New public methods.
3967 <record_pending_block, finish_block_internal, make_blockvector,
3968 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3969 private methods.
3970 Update all users.
3971
3972 2018-05-22 Tom Tromey <tom@tromey.com>
3973
3974 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3975 parameter.
3976 (finish_block_internal): Update.
3977
3978 2018-07-20 Tom Tromey <tom@tromey.com>
3979
3980 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3981 parameter.
3982 (finish_block_internal): Update.
3983
3984 2018-07-20 Tom Tromey <tom@tromey.com>
3985
3986 * buildsym.h (EXTERN): Don't define or undef.
3987 * buildsym.c (EXTERN): Don't define.
3988
3989 2018-07-20 Tom Tromey <tom@tromey.com>
3990
3991 * buildsym.c: Remove TODO comment.
3992
3993 2018-07-20 Tom Tromey <tom@tromey.com>
3994
3995 * coffread.c (coff_symtab_read): Update.
3996 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3997 (xcoff_new_init): Update.
3998 * mipsread.c (mipscoff_new_init): Update.
3999 * mdebugread.c (mdebug_build_psymtabs): Update.
4000 * elfread.c (elf_new_init): Update.
4001 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4002 Update.
4003 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4004 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4005 (stabsect_build_psymtabs): Update.
4006 * buildsym.h (buildsym_init): Don't declare.
4007 * buildsym.c: Update comment.
4008 (prepare_for_building): Remove.
4009 (start_symtab, restart_symtab): Update.
4010 (reset_symtab_globals): Update comment.
4011 (buildsym_init): Remove.
4012
4013 2018-07-20 Tom Tromey <tom@tromey.com>
4014
4015 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4016 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4017 (read_enum_type, common_block_start, common_block_end)
4018 (cleanup_undefined_types_1, finish_global_stabs): Update.
4019 * mdebugread.c (psymtab_to_symtab_1): Update.
4020 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4021 (read_lexical_block_scope, new_symbol): Update.
4022 * dbxread.c (process_one_symbol): Update.
4023 * coffread.c (coff_symtab_read, process_coff_symbol)
4024 (coff_read_enum_type): Update.
4025 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4026 declare.
4027 (get_local_symbols, get_file_symbols, get_global_symbols): New
4028 functions.
4029 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4030 m_global_symbols.
4031 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4032 (~scoped_free_pendings): Update.
4033 (finish_block, prepare_for_building, reset_symtab_globals)
4034 (end_symtab_get_static_block, end_symtab_with_blockvector)
4035 (augment_type_symtab, push_context): Update.
4036 (get_local_symbols, get_file_symbols, get_global_symbols): New
4037 functions.
4038 (buildsym_init): Update.
4039
4040 2018-07-20 Tom Tromey <tom@tromey.com>
4041
4042 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4043 (process_full_type_unit): Likewise.
4044 (dwarf2_start_symtab): Set list_in_scope.
4045
4046 2018-07-20 Tom Tromey <tom@tromey.com>
4047
4048 * dwarf2read.c (process_psymtab_comp_unit_reader)
4049 (build_type_psymtabs_reader): Do not set list_in_scope.
4050
4051 2018-07-20 Tom Tromey <tom@tromey.com>
4052
4053 * buildsym.c (free_pendings): Remove.
4054 (add_symbol_to_list, scoped_free_pendings)
4055 (finish_block_internal, buildsym_init): Update.
4056
4057 2018-07-20 Tom Tromey <tom@tromey.com>
4058
4059 * xcoffread.c (read_xcoff_symtab): Update.
4060 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4061 Update.
4062 * dbxread.c (process_one_symbol): Update.
4063 * coffread.c (coff_symtab_read): Update.
4064 * buildsym.h (finish_block): Update.
4065 * buildsym.c (finish_block): Remove "listhead" argument.
4066 (end_symtab_get_static_block): Update.
4067
4068 2018-07-20 Tom Tromey <tom@tromey.com>
4069
4070 * buildsym.h (class scoped_free_pendings): Remove constructor.
4071 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4072 method.
4073 <m_pending_block_obstack, m_pending_blocks>: New members.
4074 (pending_block_obstack, pending_blocks): Remove.
4075 (scoped_free_pendings::scoped_free_pendings): Default.
4076 (~scoped_free_pendings): Update.
4077 (free_pending_blocks): Remove.
4078 (finish_block_internal, record_pending_block, make_blockvector)
4079 (end_symtab_get_static_block, augment_type_symtab, push_context)
4080 (buildsym_init): Update.
4081
4082 2018-07-20 Tom Tromey <tom@tromey.com>
4083
4084 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4085 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4086 members.
4087 (pending_addrmap, pending_addrmap_obstack)
4088 (pending_addrmap_interesting): Remove.
4089 (scoped_free_pendings, record_block_range, make_blockvector)
4090 (prepare_for_building, reset_symtab_globals, buildsym_init):
4091 Update.
4092
4093 2018-07-20 Tom Tromey <tom@tromey.com>
4094
4095 * xcoffread.c (process_linenos): Update.
4096 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4097 * mdebugread.c (psymtab_to_symtab_1): Update.
4098 * dwarf2read.c (setup_type_unit_groups)
4099 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4100 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4101 * dbxread.c (process_one_symbol): Update.
4102 * coffread.c (coff_symtab_read, enter_linenos)
4103 (process_coff_symbol): Update.
4104 * buildsym.h (current_subfile): Don't declare.
4105 (get_current_subfile): Declare.
4106 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4107 member.
4108 (start_subfile, free_buildsym_compunit, push_subfile)
4109 (prepare_for_building, start_symtab): Update.
4110 (get_current_subfile): New function.
4111
4112 2018-07-20 Tom Tromey <tom@tromey.com>
4113
4114 * coffread.c (coff_symtab_read): Update.
4115 * xcoffread.c (read_xcoff_symtab): Update.
4116 * dwarf2read.c (new_symbol): Update.
4117 (read_func_scope, read_lexical_block_scope): Update.
4118 * dbxread.c (process_one_symbol): Update.
4119 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4120 (outermost_context_p): Remove macro.
4121 (outermost_context_p, get_current_context_stack)
4122 (get_context_stack_depth): Declare.
4123 (pop_context): Return struct context_stack.
4124 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4125 member.
4126 (context_stack_size): Remove.
4127 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4128 (prepare_for_building, end_symtab_get_static_block)
4129 (augment_type_symtab, push_context): Update.
4130 (pop_context): Return struct context_stack.
4131 (outermost_context_p, get_current_context_stack)
4132 (get_context_stack_depth): New functions.
4133 (buildsym_init): Update.
4134
4135 2018-07-20 Tom Tromey <tom@tromey.com>
4136
4137 * rust-exp.y: Now a pure parser. Update all rules.
4138 (%union): Move earlier.
4139 (current_parser, work_obstack): Remove globals.
4140 (rust_parser, ~rust_parser): Update.
4141 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4142 lex_character, lex_number, lex_string, lex_identifier,
4143 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4144 convert_name, convert_params_to_expression,
4145 convert_ast_to_expression, ast_basic_type, ast_operation,
4146 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4147 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4148 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4149 ast_array_type, ast_slice_type, ast_reference_type,
4150 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4151 (rust_parse): Update.
4152 (rustyyerror, rustyylex): Add parser parameter.
4153 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4154 (rust_lex_stringish_test, rust_lex_test_sequence)
4155 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4156 (rust_lex_test_push_back, rust_lex_tests): Update.
4157
4158 2018-07-19 Pedro Alves <palves@redhat.com>
4159
4160 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4161 gdb::unique_xmalloc_ptr.
4162 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4163 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4164 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4165 copy-initialization.
4166 * guile/scm-pretty-print.c (ppscm_print_children): Use
4167 gdb::unique_xmalloc_ptr instead of cleanups.
4168 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4169 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4170 gdb::unique_xmalloc_ptr.
4171 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4172 Adjust to use gdb::unique_xmalloc_ptr.
4173 * guile/scm-utils.c (extract_arg): Adjust.
4174 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4175 gdb::unique_xmalloc_ptr instead of a cleanup.
4176
4177 2018-07-19 Tom Tromey <tom@tromey.com>
4178
4179 * utils.c (do_value_free_to_mark)
4180 (make_cleanup_value_free_to_mark): Remove.
4181 * utils.h (make_cleanup_value_free_to_mark): Remove.
4182
4183 2018-07-19 Pedro Alves <palves@redhat.com>
4184
4185 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4186 forwarding reference.
4187
4188 2018-07-18 Pedro Alves <palves@redhat.com>
4189
4190 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4191 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4192 cleanup.
4193
4194 2018-07-18 Pedro Alves <palves@redhat.com>
4195
4196 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4197 exceptions.
4198 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4199 (gdbscm_wrap): New.
4200 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4201 directly instead of a cleanup.
4202 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4203 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4204 (vlscm_binop_gdbthrow): New, factored out from ...
4205 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4206 (vlscm_rich_compare): Use gdbscm_wrap.
4207 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4208 instead of a cleanup.
4209 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4210 cleanup.
4211 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4212 Use xfree directly instead of a cleanup.
4213 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4214 Adjust to use gdbscm_wrap and scoped_value_mark.
4215 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4216 (gdbscm_value_address, gdbscm_value_dereference)
4217 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4218 scoped_value_mark.
4219 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4220 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4221 scoped_value_mark.
4222 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4223 gdbscm_wrap and scoped_value_mark.
4224 (gdbscm_value_to_string): Use xfree directly instead of a
4225 cleanup. Move 'buffer' unique_ptr to TRY scope.
4226 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4227 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4228 scoped_value_mark.
4229 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4230 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4231 scoped_value_mark.
4232 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4233 gdbscm_wrap.
4234
4235 2018-07-18 Tom de Vries <tdevries@suse.de>
4236
4237 * findvar.c (default_read_var_value): Also resolve dynamic type for
4238 LOC_OPTIMIZED_OUT vars.
4239
4240 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4241
4242 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4243 decoding.
4244
4245 2018-07-17 Tom Tromey <tom@tromey.com>
4246
4247 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4248 (compute_enum_list, pascm_set_param_value_x)
4249 (gdbscm_parameter_value): Update.
4250 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4251 (gdbscm_scm_to_host_string): Update.
4252 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4253 Update.
4254 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4255 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4256 * guile/scm-string.c (gdbscm_scm_to_string): Return
4257 unique_xmalloc_ptr.
4258 (gdbscm_scm_to_host_string): Likewise.
4259
4260 2018-07-17 Tom Tromey <tom@tromey.com>
4261
4262 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4263 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4264 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4265 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4266 unique_xmalloc_ptr.
4267
4268 2018-07-17 Tom Tromey <tom@tromey.com>
4269
4270 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4271 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4272 Update.
4273 * guile/scm-cmd.c (cmdscm_function): Update.
4274 * guile/scm-pretty-print.c
4275 (ppscm_print_exception_unless_memory_error): Update.
4276 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4277 Return unique_xmalloc_ptr.
4278
4279 2018-07-17 Tom Tromey <tom@tromey.com>
4280
4281 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4282 Use string_printf.
4283
4284 2018-07-17 Jim Wilson <jimw@sifive.com>
4285
4286 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4287 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4288 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4289 unecessary braces after EF_RISCV_RVC test. Delete call to
4290 set_gdbarch_decr_pc_after_break.
4291
4292 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4293 RISCV_LAST_FP_REGNUM + 1.
4294 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4295
4296 2018-07-17 Tom Tromey <tom@tromey.com>
4297
4298 * configure.ac: Remove --disable-gdbcli.
4299 * configure: Rebuild.
4300 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4301 (SUBDIR_CLI_CFLAGS): Remove.
4302 (SFILES): Use SUBDIR_CLI_SRCS.
4303 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4304
4305 2018-07-17 Tom Tromey <tom@tromey.com>
4306
4307 PR gdb/18624:
4308 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4309
4310 2018-07-16 Jim Wilson <jimw@sifive.com>
4311
4312 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4313
4314 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4315
4316 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4317 variable.
4318 (libunwind_frame_sniffer): Likewise.
4319 (libunwind_frame_prev_register): Likewise.
4320 (libunwind_sigtramp_frame_sniffer): Likewise.
4321 * ia64-tdep.c (ia64_access_reg): Likewise.
4322 (ia64_access_rse_reg): Likewise.
4323 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4324 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4325
4326 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4327
4328 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4329
4330 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4331
4332 * remote-sim.c (gdbsim_target::close,
4333 gdbsim_target::mourn_inferior): Remove unused variables.
4334
4335 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4336
4337 * ia64-tdep.c (ktab_buf): New global.
4338 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4339 (get_kernel_table): Adjust.
4340
4341 2018-07-16 Tom Tromey <tom@tromey.com>
4342
4343 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4344 * dwarf2read.c (using_directives, new_symbol): Use
4345 outermost_context_p.
4346 * dbxread.c (process_one_symbol): Use outermost_context_p.
4347 * coffread.c (coff_symtab_read): Use outermost_context_p.
4348
4349 2018-07-16 Tom Tromey <tom@tromey.com>
4350
4351 * dwarf2read.c (using_directives, read_func_scope)
4352 (read_lexical_block_scope): Update.
4353 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4354 * buildsym.h (local_using_directives, global_using_directives):
4355 Don't declare.
4356 (get_local_using_directives, set_local_using_directives)
4357 (get_global_using_directives): Declare.
4358 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4359 m_global_using_directives>: New members.
4360 (finish_block_internal, prepare_for_building)
4361 (reset_symtab_globals, end_symtab_get_static_block)
4362 (push_context): Update.
4363 (get_local_using_directives, set_local_using_directives)
4364 (get_global_using_directives): New functions.
4365 (buildsym_init): Update.
4366
4367 2018-07-16 Tom Tromey <tom@tromey.com>
4368
4369 * xcoffread.c (xcoff_initial_scan): Don't call
4370 free_pending_blocks.
4371 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4372 * buildsym.h (class scoped_free_pendings): Add constructor.
4373 (free_pending_blocks): Don't declare.
4374 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4375 (free_pending_blocks): Now static.
4376
4377 2018-07-16 Tom Tromey <tom@tromey.com>
4378
4379 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4380 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4381 member.
4382 (struct subfile_stack): Remove.
4383 (subfile_stack): Remove.
4384 (push_subfile, pop_subfile, buildsym_init): Update.
4385
4386 2018-07-16 Tom Tromey <tom@tromey.com>
4387
4388 * buildsym.c (push_subfile): Use gdb_assert.
4389 (pop_subfile): Use gdb_assert.
4390
4391 2018-07-16 Tom Tromey <tom@tromey.com>
4392
4393 * buildsym.h (merge_symbol_lists): Remove.
4394 * buildsym.c (merge_symbol_lists): Remove.
4395
4396 2018-07-16 Tom Tromey <tom@tromey.com>
4397
4398 * stabsread.c (scan_file_globals): Update comment.
4399 * stabsread.h (scan_file_globals): Move from buildsym.h.
4400 * buildsym.h (scan_file_globals): Move to stabsread.h.
4401
4402 2018-07-16 Tom Tromey <tom@tromey.com>
4403
4404 * xcoffread.c (xcoff_new_init): Update.
4405 * mipsread.c (mipscoff_new_init): Update.
4406 * mdebugread.c (mdebug_build_psymtabs): Update.
4407 * elfread.c (elf_new_init): Update.
4408 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4409 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4410 * buildsym.h (buildsym_new_init): Don't declare.
4411 * buildsym.c (buildsym_new_init): Remove.
4412
4413 2018-07-16 Tom Tromey <tom@tromey.com>
4414
4415 * stabsread.h (within_function): Move from buildsym.h.
4416 * stabsread.c (start_stabs): Clear within_function.
4417 * coffread.c (coff_start_symtab): Clear within_function.
4418 * buildsym.h (within_function): Move to stabsread.h.
4419 * buildsym.c (prepare_for_building): Update.
4420
4421 2018-07-16 Tom Tromey <tom@tromey.com>
4422
4423 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4424 * dwarf2read.c (dwarf2_start_symtab): Don't set
4425 processing_gcc_compilation.
4426 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4427
4428 2018-07-16 Tom Tromey <tom@tromey.com>
4429
4430 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4431 (next_symbol_text_func): Move from buildsym.h.
4432 * stabsread.c (hashname): Move from buildsym.c.
4433 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4434 (next_symbol_text_func, hashname): Move to stabsread.h.
4435 * buildsym.c: Don't include bcache.h
4436 (hashname): Move to stasbread.c.
4437
4438 2018-07-16 Tom Tromey <tom@tromey.com>
4439
4440 * buildsym.h (context_stack_size): Don't declare.
4441 * buildsym.c (context_stack_size): New global.
4442
4443 2018-07-16 Tom Tromey <tom@tromey.com>
4444
4445 * dbxread.c (processing_acc_compilation): New global.
4446 * buildsym.h (processing_acc_compilation): Don't declare.
4447
4448 2018-07-16 Tom Tromey <tom@tromey.com>
4449
4450 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4451 * dbxread.c (read_ofile_symtab): Update.
4452 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4453 * buildsym.h (last_source_start_addr): Remove.
4454 (set_last_source_start_addr, get_last_source_start_addr):
4455 Declare.
4456 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4457 parameter.
4458 (struct buildsym_compunit) <m_last_source_start_addr>: New
4459 member.
4460 (prepare_for_building): Remove start_addr parameter.
4461 (start_symtab, restart_symtab, end_symtab_get_static_block)
4462 (end_symtab_with_blockvector): Update.
4463 (set_last_source_start_addr, get_last_source_start_addr): New
4464 functions.
4465
4466 2018-07-16 Tom Tromey <tom@tromey.com>
4467
4468 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4469 member.
4470 (have_line_numbers): Remove.
4471 (record_line, prepare_for_building, end_symtab_get_static_block)
4472 (augment_type_symtab): Update.
4473
4474 2018-07-16 Tom Tromey <tom@tromey.com>
4475
4476 * buildsym.c (~buildsym_compunit): Free the macro table.
4477 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4478 methods.
4479 <m_pending_macros>: New member.
4480 (pending_macros): Remove.
4481 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4482 (reset_symtab_globals, end_symtab_get_static_block)
4483 (end_symtab_with_blockvector, augment_type_symtab)
4484 (buildsym_init): Update.
4485
4486 2018-07-16 Tom Tromey <tom@tromey.com>
4487
4488 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4489 parameter.
4490 (buildsym_compunit::set_last_source_file): New method.
4491 <m_last_source_file>: New member.
4492 (prepare_for_building): Remove "name" parameter.
4493 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4494 (last_source_file): Remove.
4495 (set_last_source_file, get_last_source_file): Update.
4496
4497 2018-07-16 Tom Tromey <tom@tromey.com>
4498
4499 * buildsym.c (prepare_for_building): Add assert.
4500
4501 2018-07-16 Tom Tromey <tom@tromey.com>
4502
4503 * buildsym.c (~buildsym_compunit): Update.
4504 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4505 (start_subfile, patch_subfile_names)
4506 (end_symtab_with_blockvector): Update.
4507
4508 2018-07-16 Tom Tromey <tom@tromey.com>
4509
4510 * buildsym.c (struct buildsym_compunit): Add constructor,
4511 destructor, initializers.
4512 (start_buildsym_compunit): Remove.
4513 (free_buildsym_compunit): Use "delete".
4514 (start_symtab, restart_symtab): Use "new".
4515
4516 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4517
4518 * symfile.c (set_objfile_default_section_offset): Remove struct
4519 keyword.
4520
4521 2018-07-14 Stafford Horne <shorne@gmail.com>
4522
4523 * (Responsible Maintainers): Add myself as or1k maintainer.
4524
4525 2018-07-13 Tom Tromey <tom@tromey.com>
4526
4527 * symfile.c (set_objfile_default_section_offset): Use extra braces
4528 around initializer.
4529
4530 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4531
4532 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4533 non-branching basr.
4534
4535 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4536
4537 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4538 unittests/cli-utils-selftests.c
4539 * unittests/cli-utils-selftests.c: New file.
4540
4541 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4542
4543 * NEWS: Mention new commands. Mention change to 'thread apply'.
4544
4545 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4546
4547 * thread.c (thr_try_catch_cmd): New function.
4548 (thread_apply_all_command): Handle qcs flags.
4549 (thread_apply_command): Handle qcs flags.
4550 (taas_command): New function.
4551 (tfaas_command): New function.
4552 (_initialize_thread): Update to setup the new commands 'taas
4553 and 'tfaas'. Change doc string for 'thread apply'.
4554
4555 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4556
4557 * stack.c: (trailing_outermost_frame): New function, mostly
4558 extracted from backtrace_command_1.
4559 (leading_innermost_frame): New function.
4560 (backtrace_command_1): Update to call trailing_outermost_frame.
4561 (frame_apply_command_count): New function.
4562 (frame_apply_level_command): New function.
4563 (frame_apply_all_command): New function.
4564 (frame_apply_command): New function.
4565 (faas_command): New function.
4566 (frame_cmd_list): New variable.
4567 (_initialize_stack): Update to setup the new commands 'frame apply'
4568 and 'faas'.
4569
4570 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4571
4572 * cli-utils.c (number_or_range_parser::get_number): Only handle
4573 numbers or convenience var as numbers.
4574 (parse_flags): New function.
4575 (parse_flags_qcs): New function.
4576 (number_or_range_parser::finished): Ensure parsing end is detected
4577 before end of string.
4578 * cli-utils.h (parse_flags): New function.
4579 (parse_flags_qcs): New function.
4580 (number_or_range_parser): Remove m_finished bool.
4581 (number_or_range_parser::skip_range): Set m_in_range to false.
4582
4583 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4584
4585 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4586 on Windows.
4587
4588 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4589 Jan Kratochvil <jan.kratochvil@redhat.com>
4590 Paul Fertser <fercerpav@gmail.com>
4591 Tsutomu Seki <sekiriki@gmail.com>
4592 Pedro Alves <palves@redhat.com>
4593
4594 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4595 'unittests/parse-connection-spec-selftests.c'.
4596 (COMMON_SFILES): Add 'common/netstuff.c'.
4597 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4598 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4599 * common/netstuff.c: New file.
4600 * common/netstuff.h: New file.
4601 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4602 (wait_for_connect): Update comment. New parameter
4603 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4604 Use 'sock' directly instead of 'scb->fd'.
4605 (try_connect): New function, with code from 'net_open'.
4606 (net_open): Rewrite main loop to deal with multiple
4607 sockets/addresses. Handle IPv6-style hostnames; implement
4608 support for IPv6 connections.
4609 * unittests/parse-connection-spec-selftests.c: New file.
4610
4611 2018-07-11 Pedro Alves <palves@redhat.com>
4612
4613 PR gdb/23377
4614 * remote.c (remote_target::remote_detach_pid): Call
4615 set_current_process.
4616
4617 2018-07-11 Pedro Alves <palves@redhat.com>
4618
4619 * h8300-tdep.c (h8300_gdbarch_init): Remove
4620 set_gdbarch_ecoff_reg_to_regnum calls.
4621
4622 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4623
4624 PR c++/23373
4625 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4626 offsets/sizes for static members of a class/struct.
4627
4628 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4629
4630 * target-descriptions.c (tdesc_register_bitsize): Rename.
4631 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4632 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4633 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4634
4635 2018-07-10 Tom Tromey <tom@tromey.com>
4636
4637 * breakpoint.c (moribund_locations): Now static and a
4638 std::vector.
4639 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4640 (build_bpstat_chain, update_global_location_list)
4641 (breakpoint_retire_moribund): Update.
4642 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4643 VEC.
4644
4645 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4646
4647 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4648 (riscv_register_reggroup_p): Use new function, remove unneeded
4649 parenthesis.
4650 (riscv_push_dummy_call): Extend assert to compare against xlen or
4651 flen based on register type.
4652
4653 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4654
4655 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4656
4657 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4658
4659 * remote.c (show_hardware_watchpoint_limit): New function.
4660 (show_hardware_watchpoint_length_limit): New function.
4661 (show_hardware_breakpoint_limit): New function.
4662 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4663 where appropriate, update help text.
4664
4665 2018-07-09 Tom Tromey <tom@tromey.com>
4666
4667 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4668 (CLIBS): Don't mention NAT_CLIBS.
4669
4670 2018-07-09 Tom Tromey <tom@tromey.com>
4671
4672 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4673 (LIBGDB_OBS, clean mostlyclean): Update.
4674 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4675
4676 2018-07-09 Tom Tromey <tom@tromey.com>
4677
4678 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4679 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4680 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4681
4682 2018-07-09 Tom Tromey <tom@tromey.com>
4683
4684 * Makefile.in (ALLDEPFILES): Remove exec.c.
4685 (COMMON_OBS): Remove exec.o.
4686 (COMMON_SFILES): Add exec.c.
4687
4688 2018-07-09 Tom Tromey <tom@tromey.com>
4689
4690 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4691
4692 2018-07-09 Tom Tromey <tom@tromey.com>
4693
4694 * Makefile.in (clean mostlyclean): Remove stamp-version.
4695 (version.c): Depend on stamp-version.
4696 (stamp-version): New rule, from version.c rule.
4697
4698 2018-07-09 Tom Tromey <tom@tromey.com>
4699
4700 * Makefile.in (init.c): Depend on stamp-init.
4701 (stamp-init): New rule, from init.c rule.
4702 (clean mostlyclean): Remove stamp-init.
4703
4704 2018-07-09 Tom Tromey <tom@tromey.com>
4705
4706 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4707 SUBDIR_GCC_COMPILE_SRCS.
4708
4709 2018-07-09 Tom Tromey <tom@tromey.com>
4710
4711 * Makefile.in (init.c): Remove some unused sed rules.
4712
4713 2018-07-09 Tom Tromey <tom@tromey.com>
4714
4715 * Makefile.in (TSOBS): Remove.
4716 (INIT_FILES): Update.
4717 (LIBGDB_OBS): Update.
4718 (COMMON_SFILES): Add inflow.c.
4719 (SFILES): Remove inflow.c.
4720
4721 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4722
4723 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4724
4725 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4726
4727 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4728 get_saveloc_name, is_signal_frame_name, step_name,
4729 init_remote_name, create_addr_space_name,
4730 destroy_addr_space_name, search_unwind_table_name,
4731 find_dyn_list_name): Constify.
4732
4733 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4734
4735 * darwin-nat.c (darwin_pthread_kill): New function.
4736 (darwin_resume_thread): Use darwin_pthread_kill.
4737
4738 2018-07-05 Tom de Vries <tdevries@suse.de>
4739
4740 * macroexp.c (macro_buffer) <operator=>: New member function.
4741
4742 2018-07-04 Tom Tromey <tom@tromey.com>
4743
4744 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4745
4746 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4747
4748 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4749 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4750 * maint.c: Likewise.
4751 * top.c: Likewise.
4752
4753 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4754
4755 * NEWS: Create a new section for the next release branch.
4756 Rename the section of the current branch, now that it has
4757 been cut.
4758
4759 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4760
4761 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4762 * version.in: Bump version to 8.2.50.DATE-git.
4763
4764 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4765 Pedro Alves <palves@redhat.com>
4766
4767 * linux-nat.c (linux_init_ptrace): Rename to ...
4768 (linux_init_ptrace_procfs): ... this. Call
4769 linux_proc_init_warnings.
4770 (linux_nat_target::post_attach)
4771 (linux_nat_target::post_startup_inferior): Adjust.
4772 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4773 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4774
4775 2018-07-04 Tom de Vries <tdevries@suse.de>
4776
4777 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4778 check ...
4779 (read_comp_unit_head): ... here.
4780
4781 2018-07-03 Tom Tromey <tom@tromey.com>
4782
4783 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4784 (stop_tracing, tstatus_command)
4785 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4786 (print_one_static_tracepoint_marker): Update.
4787 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4788 std::vector.
4789 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4790 VEC.
4791 (all_tracepoints, static_tracepoints_here): Return std::vector.
4792
4793 2018-07-03 Tom Tromey <tom@tromey.com>
4794
4795 * common/ptid.c (ptid_equal): Remove.
4796 * common/ptid.h (ptid_equal): Don't declare.
4797 * ada-tasks.c: Update.
4798 * breakpoint.c: Update.
4799 * common/agent.c: Update.
4800 * corelow.c: Update.
4801 * darwin-nat-info.c: Update.
4802 * darwin-nat.c: Update.
4803 * dcache.c: Update.
4804 * dtrace-probe.c: Update.
4805 * dummy-frame.c: Update.
4806 * fbsd-nat.c: Update.
4807 * frame.c: Update.
4808 * gdbthread.h: Update.
4809 * gnu-nat.c: Update.
4810 * go32-nat.c: Update.
4811 * inf-loop.c: Update.
4812 * inf-ptrace.c: Update.
4813 * infcall.c: Update.
4814 * infcmd.c: Update.
4815 * inflow.c: Update.
4816 * infrun.c: Update.
4817 * linux-fork.c: Update.
4818 * linux-nat.c: Update.
4819 * linux-thread-db.c: Update.
4820 * mi/mi-cmd-var.c: Update.
4821 * mi/mi-interp.c: Update.
4822 * mi/mi-main.c: Update.
4823 * nto-procfs.c: Update.
4824 * ppc-linux-tdep.c: Update.
4825 * procfs.c: Update.
4826 * python/py-inferior.c: Update.
4827 * python/py-record-btrace.c: Update.
4828 * python/py-record.c: Update.
4829 * ravenscar-thread.c: Update.
4830 * regcache.c: Update.
4831 * remote-sim.c: Update.
4832 * remote.c: Update.
4833 * sol-thread.c: Update.
4834 * solib.c: Update.
4835 * target.c: Update.
4836 * tui/tui-stack.c: Update.
4837 * varobj.c: Update.
4838 * windows-nat.c: Update.
4839 * windows-tdep.c: Update.
4840
4841 2018-07-03 Tom Tromey <tom@tromey.com>
4842
4843 * common/ptid.c (ptid_match): Remove.
4844 * common/ptid.h (ptid_match): Don't declare.
4845 * fbsd-nat.c: Update.
4846 * infcmd.c: Update.
4847 * infrun.c: Update.
4848 * linux-nat.c: Update.
4849 * record-btrace.c: Update.
4850 * regcache.c: Update.
4851 * remote.c: Update.
4852
4853 2018-07-03 Tom Tromey <tom@tromey.com>
4854
4855 * common/ptid.c (ptid_tid_p): Remove.
4856 * common/ptid.h (ptid_tid_p): Don't declare.
4857 * sol-thread.c: Update.
4858
4859 2018-07-03 Tom Tromey <tom@tromey.com>
4860
4861 * common/ptid.c (ptid_lwp_p): Remove.
4862 * common/ptid.h (ptid_lwp_p): Don't declare.
4863 * fbsd-nat.c: Update.
4864 * linux-nat.c: Update.
4865 * nat/linux-procfs.c: Update.
4866 * nat/x86-linux-dregs.c: Update.
4867 * sol-thread.c: Update.
4868
4869 2018-07-03 Tom Tromey <tom@tromey.com>
4870
4871 * common/ptid.c (ptid_is_pid): Remove.
4872 * common/ptid.h (ptid_is_pid): Don't declare.
4873 * infrun.c: Update.
4874 * linux-nat.c: Update.
4875 * mi/mi-interp.c: Update.
4876 * remote.c: Update.
4877 * thread.c: Update.
4878
4879 2018-07-03 Tom Tromey <tom@tromey.com>
4880
4881 * common/ptid.c (ptid_get_tid): Remove.
4882 * common/ptid.h (ptid_get_tid): Don't declare.
4883 * ada-tasks.c: Update.
4884 * aix-thread.c: Update.
4885 * bsd-uthread.c: Update.
4886 * darwin-nat.c: Update.
4887 * fbsd-nat.c: Update.
4888 * i386-darwin-nat.c: Update.
4889 * infrun.c: Update.
4890 * linux-tdep.c: Update.
4891 * nto-procfs.c: Update.
4892 * ppc-ravenscar-thread.c: Update.
4893 * python/py-infthread.c: Update.
4894 * ravenscar-thread.c: Update.
4895 * sol-thread.c: Update.
4896 * sparc-ravenscar-thread.c: Update.
4897 * windows-nat.c: Update.
4898
4899 2018-07-03 Tom Tromey <tom@tromey.com>
4900
4901 * common/ptid.c (ptid_get_lwp): Remove.
4902 * common/ptid.h (ptid_get_lwp): Don't declare.
4903 * aarch64-linux-nat.c: Update.
4904 * ada-tasks.c: Update.
4905 * aix-thread.c: Update.
4906 * amd64-linux-nat.c: Update.
4907 * arm-linux-nat.c: Update.
4908 * corelow.c: Update.
4909 * fbsd-nat.c: Update.
4910 * fbsd-tdep.c: Update.
4911 * gnu-nat.c: Update.
4912 * i386-cygwin-tdep.c: Update.
4913 * i386-gnu-nat.c: Update.
4914 * i386-linux-nat.c: Update.
4915 * ia64-linux-nat.c: Update.
4916 * inf-ptrace.c: Update.
4917 * infrun.c: Update.
4918 * linux-fork.c: Update.
4919 * linux-nat.c: Update.
4920 * linux-tdep.c: Update.
4921 * linux-thread-db.c: Update.
4922 * mips-linux-nat.c: Update.
4923 * nat/aarch64-linux-hw-point.c: Update.
4924 * nat/aarch64-linux.c: Update.
4925 * nat/linux-btrace.c: Update.
4926 * nat/linux-osdata.c: Update.
4927 * nat/linux-procfs.c: Update.
4928 * nat/x86-linux-dregs.c: Update.
4929 * obsd-nat.c: Update.
4930 * ppc-fbsd-nat.c: Update.
4931 * ppc-linux-nat.c: Update.
4932 * procfs.c: Update.
4933 * python/py-infthread.c: Update.
4934 * ravenscar-thread.c: Update.
4935 * remote.c: Update.
4936 * s390-linux-nat.c: Update.
4937 * sol-thread.c: Update.
4938 * sol2-tdep.c: Update.
4939 * spu-linux-nat.c: Update.
4940 * x86-linux-nat.c: Update.
4941 * xtensa-linux-nat.c: Update.
4942
4943 2018-07-03 Tom Tromey <tom@tromey.com>
4944
4945 * common/ptid.c (ptid_get_pid): Remove.
4946 * common/ptid.h (ptid_get_pid): Don't declare.
4947 * aarch64-linux-nat.c: Update.
4948 * ada-lang.c: Update.
4949 * aix-thread.c: Update.
4950 * alpha-bsd-nat.c: Update.
4951 * amd64-fbsd-nat.c: Update.
4952 * amd64-linux-nat.c: Update.
4953 * arm-linux-nat.c: Update.
4954 * arm-nbsd-nat.c: Update.
4955 * auxv.c: Update.
4956 * break-catch-syscall.c: Update.
4957 * breakpoint.c: Update.
4958 * bsd-uthread.c: Update.
4959 * corelow.c: Update.
4960 * ctf.c: Update.
4961 * darwin-nat.c: Update.
4962 * fbsd-nat.c: Update.
4963 * fbsd-tdep.c: Update.
4964 * gcore.c: Update.
4965 * gnu-nat.c: Update.
4966 * hppa-nbsd-nat.c: Update.
4967 * hppa-obsd-nat.c: Update.
4968 * i386-fbsd-nat.c: Update.
4969 * ia64-linux-nat.c: Update.
4970 * inf-ptrace.c: Update.
4971 * infcmd.c: Update.
4972 * inferior.c: Update.
4973 * inferior.h: Update.
4974 * inflow.c: Update.
4975 * infrun.c: Update.
4976 * linux-fork.c: Update.
4977 * linux-nat.c: Update.
4978 * linux-tdep.c: Update.
4979 * linux-thread-db.c: Update.
4980 * m68k-bsd-nat.c: Update.
4981 * mi/mi-interp.c: Update.
4982 * mi/mi-main.c: Update.
4983 * mips-linux-nat.c: Update.
4984 * mips-nbsd-nat.c: Update.
4985 * mips64-obsd-nat.c: Update.
4986 * nat/aarch64-linux-hw-point.c: Update.
4987 * nat/aarch64-linux.c: Update.
4988 * nat/linux-btrace.c: Update.
4989 * nat/linux-osdata.c: Update.
4990 * nat/linux-procfs.c: Update.
4991 * nat/x86-linux-dregs.c: Update.
4992 * nto-procfs.c: Update.
4993 * obsd-nat.c: Update.
4994 * ppc-linux-nat.c: Update.
4995 * ppc-nbsd-nat.c: Update.
4996 * ppc-obsd-nat.c: Update.
4997 * proc-service.c: Update.
4998 * procfs.c: Update.
4999 * python/py-inferior.c: Update.
5000 * python/py-infthread.c: Update.
5001 * ravenscar-thread.c: Update.
5002 * record.c: Update.
5003 * remote-sim.c: Update.
5004 * remote.c: Update.
5005 * rs6000-nat.c: Update.
5006 * s390-linux-nat.c: Update.
5007 * sh-nbsd-nat.c: Update.
5008 * sol-thread.c: Update.
5009 * sparc-nat.c: Update.
5010 * sparc64-tdep.c: Update.
5011 * spu-linux-nat.c: Update.
5012 * spu-tdep.c: Update.
5013 * target-debug.h: Update.
5014 * target.c: Update.
5015 * thread.c: Update.
5016 * tid-parse.c: Update.
5017 * tracefile-tfile.c: Update.
5018 * vax-bsd-nat.c: Update.
5019 * windows-nat.c: Update.
5020 * x86-linux-nat.c: Update.
5021 * x86-nat.c: Update.
5022
5023 2018-07-03 Tom Tromey <tom@tromey.com>
5024
5025 * common/ptid.c (pid_to_ptid): Remove.
5026 * common/ptid.h (pid_to_ptid): Don't declare.
5027 * aix-thread.c: Update.
5028 * arm-linux-nat.c: Update.
5029 * common/ptid.c: Update.
5030 * common/ptid.h: Update.
5031 * corelow.c: Update.
5032 * ctf.c: Update.
5033 * darwin-nat.c: Update.
5034 * fbsd-nat.c: Update.
5035 * fork-child.c: Update.
5036 * gnu-nat.c: Update.
5037 * go32-nat.c: Update.
5038 * inf-ptrace.c: Update.
5039 * infcmd.c: Update.
5040 * inferior.c: Update.
5041 * infrun.c: Update.
5042 * linux-fork.c: Update.
5043 * linux-nat.c: Update.
5044 * nat/aarch64-linux-hw-point.c: Update.
5045 * nat/fork-inferior.c: Update.
5046 * nat/x86-linux-dregs.c: Update.
5047 * nto-procfs.c: Update.
5048 * obsd-nat.c: Update.
5049 * procfs.c: Update.
5050 * progspace.c: Update.
5051 * remote.c: Update.
5052 * rs6000-nat.c: Update.
5053 * s390-linux-nat.c: Update.
5054 * sol-thread.c: Update.
5055 * spu-linux-nat.c: Update.
5056 * target.c: Update.
5057 * top.c: Update.
5058 * tracefile-tfile.c: Update.
5059 * windows-nat.c: Update.
5060
5061 2018-07-03 Tom Tromey <tom@tromey.com>
5062
5063 * common/ptid.h (ptid_build): Don't declare.
5064 * common/ptid.c (ptid_build): Remove.
5065 * aix-thread.c: Update.
5066 * bsd-kvm.c: Update.
5067 * bsd-uthread.c: Update.
5068 * common/agent.c: Update.
5069 * common/ptid.c: Update.
5070 * common/ptid.h: Update.
5071 * corelow.c: Update.
5072 * darwin-nat.c: Update.
5073 * fbsd-nat.c: Update.
5074 * gnu-nat.c: Update.
5075 * linux-fork.c: Update.
5076 * linux-nat.c: Update.
5077 * linux-thread-db.c: Update.
5078 * nat/linux-osdata.c: Update.
5079 * nat/linux-procfs.c: Update.
5080 * nto-procfs.c: Update.
5081 * obsd-nat.c: Update.
5082 * proc-service.c: Update.
5083 * procfs.c: Update.
5084 * ravenscar-thread.c: Update.
5085 * remote-sim.c: Update.
5086 * remote.c: Update.
5087 * sol-thread.c: Update.
5088 * target.c: Update.
5089 * windows-nat.c: Update.
5090
5091 2018-07-03 Tom Tromey <tom@tromey.com>
5092
5093 * infrun.c (follow_exec): Use exit_inferior_silent.
5094 * inferior.c (exit_inferior_num_silent): Remove.
5095 * inferior.h (exit_inferior_num_silent): Don't declare.
5096
5097 2018-07-03 Tom Tromey <tom@tromey.com>
5098
5099 PR cli/23340:
5100 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5101 inferior_ptid on error.
5102
5103 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5104 Simon Marchi <simon.marchi@polymtl.ca>
5105
5106 PR tdep/8282
5107 * disasm.h (gdb_disassembler): Add
5108 `m_disassembler_options_holder'. member
5109 * disasm.c (get_all_disassembler_options): New function.
5110 (gdb_disassembler::gdb_disassembler): Use it.
5111 (gdb_buffered_insn_length_init_dis): Likewise.
5112 (gdb_buffered_insn_length): Adjust accordingly.
5113 (set_disassembler_options): Handle options with arguments.
5114 (show_disassembler_options_sfunc): Likewise. Add a leading new
5115 line if showing options with descriptions.
5116 (disassembler_options_completer): Adapt to using the
5117 `disasm_options_and_args_t' structure.
5118 * mips-tdep.c (mips_disassembler_options): New variable.
5119 (mips_disassembler_options_o32): Likewise.
5120 (mips_disassembler_options_n32): Likewise.
5121 (mips_disassembler_options_n64): Likewise.
5122 (gdb_print_insn_mips): Don't set `disassembler_options'.
5123 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5124 functions.
5125 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5126 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5127 `gdbarch_disassembler_options_implicit' and
5128 `gdbarch_valid_disassembler_options'.
5129 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5130 `disasm_options_and_args_t' structure.
5131 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5132 method.
5133 (valid_disassembler_options): Switch from `disasm_options_t' to
5134 the `disasm_options_and_args_t' structure.
5135 * NEWS: Document `set disassembler-options' support for the MIPS
5136 target.
5137 * gdbarch.h: Regenerate.
5138 * gdbarch.c: Regenerate.
5139
5140 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5141
5142 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5143
5144 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5145
5146 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5147 parameter in call to amd64_target_description.
5148 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5149 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5150 (amd64fbsd_init_abi): Likewise.
5151 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5152 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5153 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5154 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5155
5156 2018-06-29 Pedro Alves <palves@redhat.com>
5157
5158 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5159 "segments" parameter.
5160 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5161 (_initialize_amd64_tdep): Update call to
5162 amd64_create_target_description.
5163 (amd64_target_description): Add "segments" parameter. Adjust
5164 the implementation to use it.
5165 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5166 call to amd64_create_target_description.
5167 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5168 * gdb/arch/amd64.h (amd64_create_target_description): Add
5169 "segments" register.
5170 * gdb/arch/amd64.c (amd64_create_target_description): Add
5171 "segments" parameter. Call create_feature_i386_64bit_segments
5172 only if SEGMENTS is true.
5173 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5174 call to amd64_create_target_description.
5175
5176 2018-06-29 Pedro Alves <palves@redhat.com>
5177
5178 * thread.c (thread_target_id_str): New, factored out from ...
5179 (print_thread_info_1): ... here. Use it to compute the max
5180 "Target Id" column width.
5181
5182 2018-06-29 Pedro Alves <palves@redhat.com>
5183
5184 * remote.c (remote_target::extra_thread_info): Delete
5185 'display_buf' and 'n' locals. from the cache, regardless of
5186 packet mechanims is in use. Use cache for qThreadExtra and qP
5187 methods too.
5188
5189 2018-06-29 Pedro Alves <palves@redhat.com>
5190
5191 * blockframe.c (find_pc_sect_containing_function): New function.
5192 * breakpoint.c (print_breakpoint_location): Don't call
5193 find_pc_sect_function.
5194 * linespec.c (create_sals_line_offset): Record the location's
5195 symbol in the sal.
5196 * linespec.c (convert_address_location_to_sals): Fill in sal's
5197 symbol with find_pc_sect_containing_function.
5198 * symtab.c (find_function_start_sal): Rename to ...
5199 (find_function_start_sal_1): ... this.
5200 (find_function_start_sal): Reimplement as wrapper around
5201 find_function_start_sal_1, and use
5202 find_pc_sect_containing_function to fill in the sal's symbol.
5203 (find_function_start_sal(symbol*, bool)): Adjust.
5204 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5205 comments.
5206 (find_pc_sect_containing_function): Declare.
5207
5208 2018-06-29 Pedro Alves <palves@redhat.com>
5209
5210 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5211 true if the the location has no symbol.
5212
5213 2018-06-28 Tom Tromey <tom@tromey.com>
5214
5215 * NEWS: Mention --enable-codesign.
5216 * silent-rules.mk (ECHO_SIGN): New variable.
5217 * configure.ac: Add --enable-codesign.
5218 * configure: Rebuild.
5219 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5220 (gdb$(EXEEXT)): Optionally invoke codesign.
5221
5222 2018-06-28 Pedro Alves <palves@redhat.com>
5223
5224 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5225 comments.
5226 (switch_to_thread_no_regs): Adjust comment.
5227 * infcmd.c (stop_pc): Delete.
5228 (post_create_inferior, info_program_command): Replace references
5229 to stop_pc with references to thread_info->suspend.stop_pc.
5230 * inferior.h (stop_pc): Delete declaration.
5231 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5232 (handle_inferior_event_1, handle_signal_stop)
5233 (process_event_stop_test, keep_going_stepped_thread)
5234 (handle_step_into_function, handle_step_into_function_backward)
5235 (print_stop_location): Replace references to stop_pc with
5236 references to thread_info->suspend.stop_pc.
5237 (struct infcall_suspend_state) <stop_pc>: Delete field.
5238 (save_infcall_suspend_state, restore_infcall_suspend_state):
5239 Remove references to inf_stat->stop_pc.
5240 * linux-fork.c (fork_load_infrun_state): Likewise.
5241 * record-btrace.c (record_btrace_set_replay): Likewise.
5242 * record-full.c (record_full_goto_entry): Likewise.
5243 * remote.c (print_one_stopped_thread): Likewise.
5244 * target.c (target_resume): Extend comment.
5245 * thread.c (set_executing_thread): New.
5246 (set_executing): Use it.
5247 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5248 Remove references to stop_pc.
5249
5250 2018-06-28 Pedro Alves <palves@redhat.com>
5251
5252 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5253 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5254
5255 2018-06-28 Tom Tromey <tom@tromey.com>
5256
5257 * coffread.c (coff_symfile_finish): Update.
5258 * xcoffread.c (xcoff_symfile_finish): Update.
5259 * elfread.c (elf_symfile_finish): Update.
5260 * symfile.h (dwarf2_free_objfile): Don't declare.
5261 * dwarf2read.c (_initialize_dwarf2_read): Use
5262 register_objfile_data_with_cleanup.
5263 (dwarf2_free_objfile): Now static. Change signature.
5264
5265 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5266
5267 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5268 option "-o" to add-symbol-file-load to add an offset to each
5269 section's load address.
5270 * symfile.c (set_objfile_default_section_offset): New function.
5271
5272 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5273
5274 * symfile.c (add_symbol_file_command): Make sure that sections
5275 with the same name are sorted in the same order.
5276
5277 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5278
5279 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5280 require the second argument. If omitted, load sections at the
5281 addresses specified in the file.
5282
5283 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5284
5285 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5286 (_initialize_symfile): Add option "-o" to symbol-file to add an
5287 offset to each section of the symbol file.
5288
5289 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5290
5291 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5292
5293 2018-06-27 Tom Tromey <tom@tromey.com>
5294
5295 * stack.c (_initialize_stack): Update "func" help text.
5296
5297 2018-06-27 Tom Tromey <tom@tromey.com>
5298
5299 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5300 std::vector.
5301 (unwind_infopy_str, pyuw_create_unwind_info)
5302 (unwind_infopy_add_saved_register, pyuw_sniffer)
5303 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5304 Update.
5305 (struct saved_reg): Add constructor.
5306 <value>: Now a gdbpy_ref<>.
5307
5308 2018-06-27 Tom Tromey <tom@tromey.com>
5309
5310 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5311
5312 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5313
5314 * gdb-gdb.py.in: Format using autopep8.
5315
5316 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5317
5318 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5319 (type_lookup_function): Recognize CORE_ADDR values.
5320
5321 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5322
5323 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5324 print tag_name.
5325
5326 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5327
5328 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5329 <__lt__>: Add.
5330
5331 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5332
5333 * gdb-gdb.py: Move to...
5334 * gdb-gdb.py.in: ... here.
5335 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5336 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5337 dependencies.
5338 (distclean): Remove gdb-gdb.py when cleaning.
5339 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5340 * configure: Re-generate.
5341
5342 2018-06-27 Pedro Alves <palves@redhat.com>
5343
5344 * proc-service.c (get_ps_regcache): New.
5345 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5346 (ps_lsetfpregs): Use it.
5347
5348 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5349
5350 PR gdb/21695
5351 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5352 (dwarf_decode_lines_1): Adjust.
5353
5354 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5355
5356 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5357 override.
5358 <info_proc>: Likewise.
5359
5360 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5361
5362 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5363 to windows_fetch_one_register, and only handle the case of
5364 fetching one register. Move the code that reloads the context
5365 and iterates over all registers if R is negative to...
5366 (windows_nat_target::fetch_registers): ... here.
5367 (do_windows_store_inferior_registers): Rename to
5368 windows_store_one_register, and only handle the case of storing
5369 one register. Move the code that handles the case where r is
5370 negative to...
5371 (windows_nat_target::store_registers) ... here.
5372
5373 2018-06-26 Tom Tromey <tom@tromey.com>
5374
5375 PR rust/22574:
5376 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5377 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5378 Update.
5379 (rust_internal_print_type): Add podata parameter.
5380 (rust_print_type): Update.
5381
5382 2018-06-26 Tom Tromey <tom@tromey.com>
5383
5384 * typeprint.h (struct print_offset_data) <update, finish,
5385 maybe_print_hole>: New methods.
5386 <indentation>: New constant.
5387 * typeprint.c (print_offset_data::indentation): Define.
5388 (print_offset_data::maybe_print_hole, print_offset_data::update)
5389 (print_offset_data::finish): Move from c-typeprint.c and rename.
5390 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5391 (print_spaces_filtered_with_print_options): Update.
5392 (c_print_type_union_field_offset, maybe_print_hole)
5393 (c_print_type_struct_field_offset): Move to typeprint.c and
5394 rename.
5395 (c_type_print_base_struct_union): Update.
5396
5397 2018-06-25 Pedro Alves <palves@redhat.com>
5398
5399 * gdbthread.h (thread_info_ref, delete_thread)
5400 (delete_thread_silent, first_thread_of_inferior)
5401 (any_thread_of_inferior, switch_to_thread)
5402 (enable_thread_stack_temporaries)
5403 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5404 (get_last_thread_stack_temporary)
5405 (value_in_thread_stack_temporaries, can_access_registers_thread):
5406 Spell out "struct thread_info" instead of just "thread_info".
5407 * inferior.h (notice_new_inferior): Likewise.
5408
5409 2018-06-25 Pedro Alves <palves@redhat.com>
5410
5411 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5412 pass thread_info pointer to delete_thread.
5413 (windows_nat_target::detach): Pass inferior pointer to
5414 detach_inferior.
5415 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5416 delete_thread.
5417 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5418 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5419 and pass a thread_info pointer to delete_thread.
5420 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5421 pass thread_info pointer to delete_thread.
5422 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5423 delete_thread_silent call.
5424 * procfs.c (procfs_target::detach): Pass inferior pointer to
5425 detach_inferior.
5426 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5427 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5428 delete_thread_silent call.
5429 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5430 pass thread_info pointer to delete_thread.
5431 (windows_nat_target::detach): Pass inferior pointer to
5432 delete_inferior.
5433
5434 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5435
5436 * regcache.c (readable_regcache::read_part): Fix asserts.
5437 (reg_buffer::raw_collect_part): New function.
5438 (regcache::write_part): Fix asserts.
5439 (reg_buffer::raw_supply_part): New function.
5440 (regcache::transfer_regset_register): New helper function.
5441 (regcache::transfer_regset): Call new functions.
5442 (regcache_supply_regset): Use gdb_byte*.
5443 (regcache::supply_regset): Likewise.
5444 (regcache_collect_regset): Likewise.
5445 (regcache::collect_regset): Likewise.
5446 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5447 (reg_buffer::raw_supply_part): Likewise.
5448 (regcache::transfer_regset_register): Likewise.
5449 (regcache::transfer_regset): Use gdb_byte*.
5450
5451 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5452
5453 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5454
5455 2018-06-21 Pedro Alves <palves@redhat.com>
5456
5457 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5458 instead of a ptid_t. All callers adjusted.
5459 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5460 adjusted.
5461 (print_ada_task_info, display_current_task_id, task_command_1):
5462 Adjust.
5463 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5464 inferior_thread.
5465 (breakpoint_kind): Adjust.
5466 (remove_breakpoints_pid): Rename to ...
5467 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5468 pointer. All callers adjusted.
5469 (bpstat_clear_actions): Use inferior_thread.
5470 (get_bpstat_thread): New.
5471 (bpstat_do_actions): Use it.
5472 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5473 to take a thread_info pointer. All callers adjusted.
5474 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5475 (breakpoint_re_set_thread): Use inferior_thread.
5476 * breakpoint.h (struct inferior): Forward declare.
5477 (bpstat_stop_status): Update.
5478 (remove_breakpoints_pid): Delete.
5479 (remove_breakpoints_inf): New.
5480 * bsd-uthread.c (bsd_uthread_target::wait)
5481 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5482 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5483 (maint_btrace_packet_history_cmd)
5484 (maint_btrace_clear_packet_history_cmd): Adjust.
5485 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5486 inferior_thread.
5487 * cli/cli-interp.c: Include "inferior.h".
5488 * common/refcounted-object.h (struct
5489 refcounted_object_ref_policy): New.
5490 * compile/compile-object-load.c: Include gdbthread.h.
5491 (store_regs): Use inferior_thread.
5492 * corelow.c (core_target::close): Use current_inferior.
5493 (core_target_open): Adjust to use first_thread_of_inferior and use
5494 the current inferior.
5495 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5496 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5497 <thread>: ... this new field. All references adjusted.
5498 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5499 Take a thread_info pointer instead of a ptid_t.
5500 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5501 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5502 thread_info pointer instead of a ptid_t.
5503 * elfread.c: Include "inferior.h".
5504 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5505 Use inferior_thread.
5506 * eval.c (evaluate_subexp): Likewise.
5507 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5508 inferior_thread.
5509 * gdb_proc_service.h (struct thread_info): Forward declare.
5510 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5511 <thread>: ... this new field. All references adjusted.
5512 * gdbarch.h, gdbarch.c: Regenerate.
5513 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5514 'thread' parameter. All implementations and callers adjusted.
5515 * gdbthread.h (thread_info) <set_running>: New method.
5516 (delete_thread, delete_thread_silent): Take a thread_info pointer
5517 instead of a ptid.
5518 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5519 (first_thread_of_process): Delete, replaced by ...
5520 (first_thread_of_inferior): ... this new function. All callers
5521 adjusted.
5522 (any_live_thread_of_process): Delete, replaced by ...
5523 (any_live_thread_of_inferior): ... this new function. All callers
5524 adjusted.
5525 (switch_to_thread, switch_to_no_thread): Declare.
5526 (is_executing): Delete.
5527 (enable_thread_stack_temporaries): Update comment.
5528 <enable_thread_stack_temporaries>: Take a thread_info pointer
5529 instead of a ptid_t. Incref the thread.
5530 <~enable_thread_stack_temporaries>: Decref the thread.
5531 <m_ptid>: Delete
5532 <m_thr>: New.
5533 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5534 (get_last_thread_stack_temporary)
5535 (value_in_thread_stack_temporaries, can_access_registers_thread):
5536 Take a thread_info pointer instead of a ptid_t. All callers
5537 adjusted.
5538 * infcall.c (get_call_return_value): Use inferior_thread.
5539 (run_inferior_call): Work with thread pointers instead of ptid_t.
5540 (call_function_by_hand_dummy): Work with thread pointers instead
5541 of ptid_t. Use thread_info_ref.
5542 * infcmd.c (proceed_thread_callback): Access thread's state
5543 directly.
5544 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5545 access thread's state directly.
5546 (continue_command): Use inferior_thread.
5547 (info_program_command): Use find_thread_ptid and access thread
5548 state directly.
5549 (proceed_after_attach_callback): Use thread state directly.
5550 (notice_new_inferior): Take a thread_info pointer instead of a
5551 ptid_t. All callers adjusted.
5552 (exit_inferior): Take an inferior pointer instead of a pid. All
5553 callers adjusted.
5554 (exit_inferior_silent): New.
5555 (detach_inferior): Delete.
5556 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5557 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5558 (detach_inferior_command, kill_inferior_command): Use
5559 find_inferior_id instead of valid_gdb_inferior_id and
5560 gdb_inferior_id_to_pid.
5561 (inferior_command): Use inferior and thread pointers.
5562 * inferior.h (struct thread_info): Forward declare.
5563 (notice_new_inferior): Take a thread_info pointer instead of a
5564 ptid_t. All callers adjusted.
5565 (detach_inferior): Delete declaration.
5566 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5567 instead of a pid. All callers adjusted.
5568 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5569 (valid_gdb_inferior_id): Delete.
5570 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5571 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5572 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5573 ...
5574 <inf>: ... this new field.
5575 <step_ptid>: Delete, replaced by ...
5576 <step_thread>: ... this new field.
5577 (get_displaced_stepping_state): Take an inferior pointer instead
5578 of a pid. All callers adjusted.
5579 (displaced_step_in_progress_any_inferior): Adjust.
5580 (displaced_step_in_progress_thread): Take a thread pointer instead
5581 of a ptid_t. All callers adjusted.
5582 (displaced_step_in_progress, add_displaced_stepping_state): Take
5583 an inferior pointer instead of a pid. All callers adjusted.
5584 (get_displaced_step_closure_by_addr): Adjust.
5585 (remove_displaced_stepping_state): Take an inferior pointer
5586 instead of a pid. All callers adjusted.
5587 (displaced_step_prepare_throw, displaced_step_prepare)
5588 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5589 All callers adjusted.
5590 (start_step_over): Adjust.
5591 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5592 displaced step queue.
5593 (do_target_resume): Adjust.
5594 (fetch_inferior_event): Use inferior_thread.
5595 (context_switch, get_inferior_stop_soon): Take an
5596 execution_control_state pointer instead of a ptid_t. All callers
5597 adjusted.
5598 (switch_to_thread_cleanup): Delete.
5599 (stop_all_threads): Use scoped_restore_current_thread.
5600 * inline-frame.c: Include "gdbthread.h".
5601 (inline_state) <inline_state>: Take a thread pointer instead of a
5602 ptid_t. All callers adjusted.
5603 <ptid>: Delete, replaced by ...
5604 <thread>: ... this new field.
5605 (find_inline_frame_state): Take a thread pointer instead of a
5606 ptid_t. All callers adjusted.
5607 (skip_inline_frames, step_into_inline_frame)
5608 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5609 pointer instead of a ptid_t. All callers adjusted.
5610 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5611 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5612 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5613 pointers directly.
5614 * linux-nat.c (get_detach_signal): Likewise.
5615 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5616 (thread_db_notice_clone): Adjust.
5617 (thread_db_find_new_threads_silently)
5618 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5619 a thread pointer instead of a ptid_t. All callers adjusted.
5620 * mi/mi-cmd-var.c: Include "inferior.h".
5621 (mi_cmd_var_update_iter): Update to use thread pointers.
5622 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5623 inferior directly.
5624 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5625 out to ...
5626 (mi_output_running): ... this new function.
5627 (mi_on_resume_1): Adjust to use it.
5628 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5629 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5630 directly.
5631 (interrupt_thread_callback): : Adjust to use thread and inferior
5632 pointers.
5633 * proc-service.c: Include "gdbthread.h".
5634 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5635 * progspace-and-thread.c: Include "inferior.h".
5636 * progspace.c: Include "inferior.h".
5637 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5638 hold a reference to an inferior_object.
5639 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5640 inferior_thread.
5641 * python/py-inferior.c (struct inferior_object): Give the type a
5642 tag name instead of a typedef.
5643 (python_on_normal_stop): No need to check if the current thread is
5644 listed.
5645 (inferior_to_inferior_object): Change return type to
5646 inferior_object. All callers adjusted.
5647 (find_thread_object): Delete, bits factored out to ...
5648 (thread_to_thread_object): ... this new function.
5649 * python/py-infthread.c (create_thread_object): Use
5650 inferior_to_inferior_object.
5651 (thpy_is_stopped): Use thread pointer directly.
5652 (gdbpy_selected_thread): Use inferior_thread.
5653 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5654 field, replaced with ...
5655 <thread>: ... this new field. All users adjusted.
5656 (btpy_insn_or_gap_new): Drop const.
5657 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5658 callers adjusted.
5659 * python/py-record.c: Include "gdbthread.h".
5660 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5661 a ptid_t. All callers adjusted.
5662 (gdbpy_current_recording): Use inferior_thread.
5663 * python/py-record.h (recpy_record_object) <ptid>: Delete
5664 field, replaced with ...
5665 <thread>: ... this new field. All users adjusted.
5666 (recpy_element_object) <ptid>: Delete
5667 field, replaced with ...
5668 <thread>: ... this new field. All users adjusted.
5669 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5670 a ptid_t. All callers adjusted.
5671 * python/py-threadevent.c: Include "gdbthread.h".
5672 (get_event_thread): Use thread_to_thread_object.
5673 * python/python-internal.h (struct inferior_object): Forward
5674 declare.
5675 (find_thread_object, find_inferior_object): Delete declarations.
5676 (thread_to_thread_object, inferior_to_inferior_object): New
5677 declarations.
5678 * record-btrace.c: Include "inferior.h".
5679 (require_btrace_thread): Use inferior_thread.
5680 (record_btrace_frame_sniffer)
5681 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5682 (get_thread_current_frame): Use scoped_restore_current_thread and
5683 switch_to_thread.
5684 (get_thread_current_frame): Use thread pointer directly.
5685 (record_btrace_replay_at_breakpoint): Use thread's inferior
5686 pointer directly.
5687 * record-full.c: Include "inferior.h".
5688 * regcache.c: Include "gdbthread.h".
5689 (get_thread_arch_regcache): Use the inferior's address space
5690 directly.
5691 (get_thread_regcache, registers_changed_thread): New.
5692 * regcache.h (get_thread_regcache(thread_info *thread)): New
5693 overload.
5694 (registers_changed_thread): New.
5695 (remote_target) <remote_detach_1>: Swap order of parameters.
5696 (remote_add_thread): <remote_add_thread>: Return the new thread.
5697 (get_remote_thread_info(ptid_t)): New overload.
5698 (remote_target::remote_notice_new_inferior): Use thread pointers
5699 directly.
5700 (remote_target::process_initial_stop_replies): Use
5701 thread_info::set_running.
5702 (remote_target::remote_detach_1, remote_target::detach)
5703 (extended_remote_target::detach): Adjust.
5704 * stack.c (frame_show_address): Use inferior_thread.
5705 * target-debug.h (target_debug_print_thread_info_pp): New.
5706 * target-delegates.c: Regenerate.
5707 * target.c (default_thread_address_space): Delete.
5708 (memory_xfer_partial_1): Use current_inferior.
5709 (target_detach): Use current_inferior.
5710 (target_thread_address_space): Delete.
5711 (generic_mourn_inferior): Use current_inferior.
5712 * target.h (struct target_ops) <thread_address_space>: Delete.
5713 (target_thread_address_space): Delete.
5714 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5715 pointers directly.
5716 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5717 thread pointer instead of a ptid_t. Adjust all callers.
5718 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5719 (first_thread_of_process): Delete, replaced by ...
5720 (first_thread_of_inferior): ... this new function. All callers
5721 adjusted.
5722 (any_thread_of_process): Rename to ...
5723 (any_thread_of_inferior): ... this, and take an inferior pointer.
5724 (any_live_thread_of_process): Rename to ...
5725 (any_live_thread_of_inferior): ... this, and take an inferior
5726 pointer.
5727 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5728 (value_in_thread_stack_temporaries)
5729 (get_last_thread_stack_temporary): Take a thread pointer instead
5730 of a ptid_t. Adjust all callers.
5731 (thread_info::set_running): New.
5732 (validate_registers_access): Use inferior_thread.
5733 (can_access_registers_ptid): Rename to ...
5734 (can_access_registers_thread): ... this, and take a thread
5735 pointer.
5736 (print_thread_info_1): Adjust to compare thread pointers instead
5737 of ptids.
5738 (switch_to_no_thread, switch_to_thread): Make extern.
5739 (scoped_restore_current_thread::~scoped_restore_current_thread):
5740 Use m_thread pointer directly.
5741 (scoped_restore_current_thread::scoped_restore_current_thread):
5742 Use inferior_thread.
5743 (thread_command): Use thread pointer directly.
5744 (thread_num_make_value_helper): Use inferior_thread.
5745 * top.c (execute_command): Use inferior_thread.
5746 * tui/tui-interp.c: Include "inferior.h".
5747 * varobj.c (varobj_create): Use inferior_thread.
5748 (value_of_root_1): Use find_thread_global_id instead of
5749 global_thread_id_to_ptid.
5750
5751 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5752
5753 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5754 possible.
5755 (regcache::write_part): Likewise.
5756 (readable_regcache::cooked_read_part): Update comment.
5757 (readable_regcache::cooked_write_part): Likewise.
5758 * regcache.h: (readable_regcache::read_part): Likewise.
5759 (regcache::write_part): Likewise.
5760
5761 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5762 Dirk Schubert <dirk.schubert@arm.com>
5763
5764 * aarch64-linux-nat.c (post_attach): New.
5765 (aarch64_linux_nat_target::post_attach): Override post_attach to
5766 record the number of hardware debug registers.
5767
5768 2018-06-20 Tom Tromey <tom@tromey.com>
5769
5770 * python/py-param.c (add_setshow_generic): Make parameters const.
5771 (parmpy_init): Update.
5772
5773 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5774
5775 * regcache.h (regcache_cooked_read_ftype): Rename to...
5776 (register_read_ftype): ...this, change type to function_view.
5777 (class reg_buffer) <save>: Remove src parameter.
5778 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5779 parameter non-const in first overload. Remove src parameter in
5780 second overload.
5781 * regcache.c (do_cooked_read): Remove.
5782 (readonly_detached_regcache::readonly_detached_regcache): Make
5783 parameter non-const, adjust call to other constructor.
5784 (reg_buffer::save): Remove src parameter.
5785 * frame.c (do_frame_register_read): Remove.
5786 (frame_save_as_regcache): Use lambda function.
5787 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5788 parameter to ppu2spu_data *.
5789 (ppu2spu_sniffer): Use lambda function.
5790
5791 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5792
5793 * record-full.c (record_full_target::insert_breakpoint): Remove
5794 "struct" keyword, add const.
5795
5796 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5797
5798 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5799 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5800 * configure.ac: Remove AC_PREREQ, add missing quoting.
5801 * gnulib/configure.ac: Modernize usage of
5802 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5803 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5804 (AUTOMAKE_VERSION): Bump to 1.15.1.
5805 * configure: Re-generate.
5806 * config.in: Re-generate.
5807 * aclocal.m4: Re-generate.
5808 * gnulib/aclocal.m4: Re-generate.
5809 * gnulib/config.in: Re-generate.
5810 * gnulib/configure: Re-generate.
5811 * gnulib/import/Makefile.in: Re-generate.
5812
5813 2018-06-19 Pedro Alves <palves@redhat.com>
5814
5815 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5816 (lookup_minimal_symbol_by_pc_section): ... here with
5817 gdb_assert_not_reached added.
5818
5819 2018-06-19 Pedro Alves <palves@redhat.com>
5820
5821 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5822 parameter with a block parameter. Compare location's block symbol
5823 with the frame's block instead of addresses.
5824 (skip_inline_frames): Pass the current block instead of the
5825 frame's address. Break out as soon as we determine the frame
5826 should not be skipped.
5827
5828 2018-06-18 Tom Tromey <tom@tromey.com>
5829
5830 * solib-aix.c (solib_aix_get_section_offsets): Return
5831 unique_xmalloc_ptr.
5832 (solib_aix_solib_create_inferior_hook): Update.
5833
5834 2018-06-18 Tom Tromey <tom@tromey.com>
5835
5836 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5837
5838 2018-06-18 Tom Tromey <tom@tromey.com>
5839
5840 * solib-frv.c (frv_relocate_main_executable): Use
5841 unique_xmalloc_ptr.
5842 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5843 unique_xmalloc_ptr.
5844
5845 2018-06-18 Tom Tromey <tom@tromey.com>
5846
5847 * objfiles.h (inhibit_section_map_updates): Update.
5848 (resume_section_map_updates, resume_section_map_updates_cleanup):
5849 Remove.
5850 * solib-svr4.c (svr4_handle_solib_event): Update.
5851 * objfiles.c (inhibit_section_map_updates): Return
5852 scoped_restore_tmpl<int>.
5853 (resume_section_map_updates, resume_section_map_updates_cleanup):
5854 Remove.
5855
5856 2018-06-18 Tom Tromey <tom@tromey.com>
5857
5858 * valprint.h (read_string): Update.
5859 * valprint.c (read_string): Change type of "buffer".
5860 (val_print_string): Update.
5861 * python/py-value.c (valpy_string): Update.
5862 * language.h (struct language_defn) <la_get_string>: Change
5863 type of "buffer".
5864 (default_get_string, c_get_string): Update.
5865 * language.c (default_get_string): Change type of "buffer".
5866 * guile/scm-value.c (gdbscm_value_to_string): Update.
5867 * c-lang.c (c_get_string): Change type of "buffer".
5868
5869 2018-06-18 Tom Tromey <tom@tromey.com>
5870
5871 * ser-mingw.c (struct pipe_state_destroyer): New.
5872 (pipe_state_up): New typedef.
5873 (cleanup_pipe_state): Remove.
5874 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5875
5876 2018-06-18 Tom Tromey <tom@tromey.com>
5877
5878 * rust-lang.h (rust_yyerror): Don't declare.
5879 * rust-lang.c (rust_language_defn): Update.
5880 * rust-exp.y (yyerror): Now static.
5881 * parse.c (parse_exp_in_context_1): Update.
5882 * p-lang.h (p_yyerror): Don't declare.
5883 * p-lang.c (p_language_defn): Update.
5884 * p-exp.y (yyerror): Now static.
5885 * opencl-lang.c (opencl_language_defn): Update.
5886 * objc-lang.c (objc_language_defn): Update.
5887 * m2-lang.h (m2_yyerror): Don't declare.
5888 * m2-lang.c (m2_language_defn): Update.
5889 * m2-exp.y (yyerror): Now static.
5890 * language.h (struct language_defn) <la_error>: Remove.
5891 * language.c (unk_lang_error): Remove.
5892 (unknown_language_defn, auto_language_defn): Remove.
5893 * go-lang.h (go_yyerror): Don't declare.
5894 * go-lang.c (go_language_defn): Update.
5895 * go-exp.y (yyerror): Now static.
5896 * f-lang.h (f_yyerror): Don't declare.
5897 * f-lang.c (f_language_defn): Update.
5898 * f-exp.y (yyerror): Now static.
5899 * d-lang.h (d_yyerror): Don't declare.
5900 * d-lang.c (d_language_defn): Update.
5901 * d-exp.y (yyerror): Now static.
5902 * c-lang.h (c_yyerror): Don't declare.
5903 * c-lang.c (c_language_defn, cplus_language_defn)
5904 (asm_language_defn, minimal_language_defn): Update.
5905 * c-exp.y (yyerror): Now static.
5906 * ada-lang.h (ada_yyerror): Don't declare.
5907 * ada-lang.c (ada_language_defn): Update.
5908 * ada-exp.y (yyerror): Now static.
5909
5910 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5911
5912 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5913 (store_sveregs_to_thread): Likewise.
5914 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5915 (aarch64_linux_store_inferior_registers): Likewise.
5916 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5917 function.
5918 (aarch64_sve_regs_copy_to_regcache): Likewise.
5919 (aarch64_sve_regs_copy_from_regcache): Likewise.
5920 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5921 declaration.
5922 (aarch64_sve_regs_copy_to_regcache): Likewise.
5923 (aarch64_sve_regs_copy_from_regcache): Likewise.
5924 (sve_context): Structure from Linux headers.
5925 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5926 (SVE_SIG_ZREG_SIZE): Likewise.
5927 (SVE_SIG_PREG_SIZE): Likewise.
5928 (SVE_SIG_FFR_SIZE): Likewise.
5929 (SVE_SIG_REGS_OFFSET): Likewise.
5930 (SVE_SIG_ZREGS_OFFSET): Likewise.
5931 (SVE_SIG_ZREG_OFFSET): Likewise.
5932 (SVE_SIG_ZREGS_SIZE): Likewise.
5933 (SVE_SIG_PREGS_OFFSET): Likewise.
5934 (SVE_SIG_PREG_OFFSET): Likewise.
5935 (SVE_SIG_PREGS_SIZE): Likewise.
5936 (SVE_SIG_FFR_OFFSET): Likewise.
5937 (SVE_SIG_REGS_SIZE): Likewise.
5938 (SVE_SIG_CONTEXT_SIZE): Likewise.
5939 (SVE_PT_REGS_MASK): Likewise.
5940 (SVE_PT_REGS_FPSIMD): Likewise.
5941 (SVE_PT_REGS_SVE): Likewise.
5942 (SVE_PT_VL_INHERIT): Likewise.
5943 (SVE_PT_VL_ONEXEC): Likewise.
5944 (SVE_PT_REGS_OFFSET): Likewise.
5945 (SVE_PT_FPSIMD_OFFSET): Likewise.
5946 (SVE_PT_FPSIMD_SIZE): Likewise.
5947 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5948 (SVE_PT_SVE_PREG_SIZE): Likewise.
5949 (SVE_PT_SVE_FFR_SIZE): Likewise.
5950 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5951 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5952 (__SVE_SIG_TO_PT): Likewise.
5953 (SVE_PT_SVE_OFFSET): Likewise.
5954 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5955 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5956 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5957 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5958 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5959 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5960 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5961 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5962 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5963 (SVE_PT_SVE_SIZE): Likewise.
5964 (SVE_PT_SIZE): Likewise.
5965 (HAS_SVE_STATE): New define.
5966
5967 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5968
5969 * nat/aarch64-sve-linux-sigcontext.h: New file.
5970 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5971 new files.
5972 (SVE_VQ_MIN): Likewise.
5973 (SVE_VQ_MAX): Likewise.
5974 (SVE_VL_MIN): Likewise.
5975 (SVE_VL_MAX): Likewise.
5976 (SVE_NUM_ZREGS): Likewise.
5977 (SVE_NUM_PREGS): Likewise.
5978 (sve_vl_valid): Likewise.
5979 (struct user_sve_header): Likewise.
5980
5981 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5982 Richard Bunt <Richard.Bunt@arm.com>
5983
5984 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5985 was requested by GDB.
5986
5987 2018-06-15 Tom de Vries <tdevries@suse.de>
5988
5989 * MAINTAINERS (Write After Approval): Add Tom de Vries.
5990
5991 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
5992
5993 * gnulib/update-gnulib.sh: Print expected versions of
5994 autoconf/aclocal.
5995
5996 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
5997
5998 * arch-utils.c (default_type_align): Use type_length_units.
5999 * gdbtypes.c (type_align): Use type_length_units.
6000
6001 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6002
6003 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6004 of 'define' command.
6005
6006 2018-06-14 Tom de Vries <tdevries@suse.de>
6007
6008 PR cli/22573
6009 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6010 get_no_prettyformat_print_options.
6011
6012 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6013
6014 * sparc-nat.h: Include target.h.
6015 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6016 <fetch_registers>: Remove this argument in function call.
6017 <store_registers>: Remove this argument in function call, remove
6018 extra semicolon.
6019 <low_forget_process>: Call sparc64_forget_process instead of
6020 sparc_forget_process.
6021
6022 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6023
6024 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6025 (procfs_target::make_corefile_notes): Adjust to new
6026 target_read_alloc return type.
6027
6028 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6029 Stephen Roberts <stephen.roberts@arm.com>
6030
6031 PR gdb/22882
6032 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6033 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6034 Move should_notify_stop local into more inner scope.
6035
6036 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6037 Stephen Roberts <stephen.roberts@arm.com>
6038
6039 PR gdb/22882
6040 * infrun.c (resume_1): Add call to mark_async_event_handler.
6041
6042 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6043
6044 * infrun.c (do_target_wait): Change old version of $pc printed.
6045
6046 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6047
6048 * dwarf2read.c (read_index_from_section): Rename to...
6049 (read_gdb_index_from_section): ... this, update all callers.
6050 (dwarf2_read_index): Rename to...
6051 (dwarf2_read_gdb_index): ... this, update all callers.
6052
6053 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6054
6055 * gdb/hppa-linux-nat.c
6056 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6057 hppa_linux_nat_target::fetch_registers.
6058
6059 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6060
6061 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6062 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6063 (AARCH64_DWARF_SVE_FFR): Likewise.
6064 (AARCH64_DWARF_SVE_P0): Likewise.
6065 (AARCH64_DWARF_SVE_Z0): Likewise.
6066
6067 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6068
6069 * common/common-regcache.h (raw_compare): New function.
6070 * regcache.c (regcache::raw_compare): Likewise.
6071 * regcache.h (regcache::raw_compare): New declaration.
6072
6073 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6074
6075 * common/common-regcache.h (reg_buffer_common): New structure.
6076 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6077 (reg_buffer::raw_supply): Likewise.
6078 (reg_buffer::raw_supply_integer): Likewise.
6079 (reg_buffer::raw_supply_zeroed): Likewise.
6080 (reg_buffer::raw_collect): Likewise.
6081 (reg_buffer::raw_collect_integer): Likewise.
6082 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6083 (reg_buffer::raw_supply): Likewise.
6084 (reg_buffer::raw_supply_integer): Likewise.
6085 (reg_buffer::raw_supply_zeroed): Likewise.
6086 (reg_buffer::raw_collect): Likewise.
6087 (reg_buffer::raw_collect_integer): Likewise.
6088
6089 2018-06-10 Tom Tromey <tom@tromey.com>
6090
6091 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6092 (class remote_state) <stop_reply_queue>: Now std::vector.
6093 (remote_state::~remote_state)
6094 (remote_target::stop_reply_queue_length): Update.
6095 (struct queue_iter_param, remove_child_of_pending_fork)
6096 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6097 (check_pending_event_prevents_wildcard_vcont_callback)
6098 (remove_stop_reply_for_inferior)
6099 (remove_stop_reply_of_remote_state)
6100 (remote_notif_remove_once_on_match)
6101 (stop_reply_match_ptid_and_ws)
6102 (remote_kill_child_of_pending_fork): Remove.
6103 (remote_target::remove_new_fork_children)
6104 (remote_target::check_pending_events_prevent_wildcard_vcont)
6105 (remote_target::discard_pending_stop_replies)
6106 (remote_target::discard_pending_stop_replies_in_queue)
6107 (remote_target::remote_notif_remove_queued_reply)
6108 (remote_target::queued_stop_reply)
6109 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6110 (remote_target::wait, remote_target::kill_new_fork_children)
6111 (remote_target::async): Update.
6112
6113 2018-06-10 Tom Tromey <tom@tromey.com>
6114
6115 * record-full.c (record_full_arch_list_cleanups): Remove.
6116 (record_full_message): Use try/catch.
6117 (record_full_wait_cleanups): Remove.
6118 (record_full_wait_1): Use try/catch.
6119 (record_full_restore): Likewise.
6120
6121 2018-06-10 Tom Tromey <tom@tromey.com>
6122
6123 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6124 declare VEC. Add constructor.
6125 <in_target_beneath>: Now bool.
6126 (record_full_breakpoints): Now a std::vector, static.
6127 (record_full_sync_record_breakpoints)
6128 (record_full_init_record_breakpoints)
6129 (record_full_target::insert_breakpoint)
6130 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6131
6132 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6133
6134 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6135 * serial.c (serial_interface_lookup): Remove struct keyword.
6136
6137 2018-06-10 Tom Tromey <tom@tromey.com>
6138
6139 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6140 method.
6141 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6142 a method.
6143 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6144 method.
6145 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6146 "beneath" as a method.
6147 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6148 Use "beneath" as a method.
6149
6150 2018-06-10 Tom Tromey <tom@tromey.com>
6151
6152 * tracefile.c (struct trace_file_writer_deleter): New.
6153 <operator()>: Rename from trace_file_writer_xfree.
6154 (trace_file_writer_up): New typedef.
6155 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6156
6157 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6158
6159 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6160 <m_registers, m_register_status>: Change type to
6161 std::unique_ptr.
6162 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6163 XCNEWVEC.
6164
6165 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6166
6167 * common/common-regcache.h (enum register_status): Add
6168 underlying type "signed char".
6169 * regcache.h (reg_buffer) <m_register_status>: Change type to
6170 register_status *.
6171 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6172 register_status instead of signed char.
6173 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6174 (reg_buffer::get_register_status): Remove cast.
6175 (readable_regcache::raw_read): Remove cast.
6176 (readable_regcache::cooked_read): Remove cast.
6177
6178 2018-06-09 Tom Tromey <tom@tromey.com>
6179
6180 * source.c (reverse_search_command, forward_search_command): Use
6181 scoped_fd.
6182
6183 2018-06-09 Tom Tromey <tom@tromey.com>
6184
6185 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6186 (serial_ops_list): Now static, std::vector.
6187 (serial_interface_lookup, serial_add_interface): Update.
6188
6189 2018-06-09 Tom Tromey <tom@tromey.com>
6190
6191 * dwarf2read.c (process_cu_includes): Update.
6192 (process_full_comp_unit): Update.
6193 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6194 std::vector.
6195
6196 2018-06-08 Paul Koning <paul_koning@dell.com>
6197
6198 PR gdb/23252
6199
6200 * python/python.c (do_start_initialization):
6201 Avoid call to internal Python API.
6202 (init__gdb_module): New function.
6203
6204 2018-06-08 Gary Benson <gbenson@redhat.com>
6205
6206 * linux-thread-db.c (valprint.h): New include.
6207 (struct check_thread_db_info): New structure.
6208 (check_thread_db_on_load, tdb_testinfo): New static globals.
6209 (check_thread_db, check_thread_db_callback): New functions.
6210 (try_thread_db_load_1): Run integrity checks if requested.
6211 (maintenance_check_libthread_db): New function.
6212 (_initialize_thread_db): Register "maint check libthread-db"
6213 and "maint set/show check-libthread-db".
6214 * NEWS: Mention the above new commands.
6215
6216 2018-06-08 Tom Tromey <tom@tromey.com>
6217
6218 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6219 now a method.
6220
6221 2018-06-08 Tom Tromey <tom@tromey.com>
6222
6223 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6224
6225 2018-06-08 Tom Tromey <tom@tromey.com>
6226
6227 * common/btrace-common.h (struct btrace_data): Add constructor,
6228 destructor, move assignment operator.
6229 <empty, clear, fini>: New methods.
6230 <format>: Initialize.
6231 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6232 (btrace_data_empty): Don't declare.
6233 * common/btrace-common.c (btrace_data_init): Remove.
6234 (btrace_data::fini): Rename from btrace_data_fini.
6235 (btrace_data::empty): Rename from btrace_data_empty.
6236 (btrace_data::clear): Rename from btrace_data_clear. Return
6237 bool.
6238 * btrace.h (make_cleanup_btrace_data): Don't declare.
6239 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6240 (parse_xml_btrace): Update.
6241 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6242 (maint_btrace_clear_packet_history_cmd): Update.
6243
6244 2018-06-07 Pedro Alves <palves@redhat.com>
6245
6246 * target.h (target_ops) <beneath>: Now a method. All references
6247 updated.
6248 (class target_stack): New.
6249 * target.c (g_target_stack): New.
6250 (g_current_top_target): Delete.
6251 (current_top_target): Get the top target out of g_target_stack.
6252 (target_stack::push, target_stack::unpush): New.
6253 (push_target, unpush_target): Reimplement.
6254 (target_is_pushed): Reimplement in terms of g_target_stack.
6255 (target_ops::beneath, target_stack::find_beneath): New.
6256
6257 2018-06-07 Pedro Alves <palves@redhat.com>
6258
6259 * target.h (find_target_beneath): Delete declaration.
6260 * target.c (find_target_beneath): Delete definition.
6261 * aix-thread.c: All callers of find_target_beneath adjusted to
6262 call target_ops::beneath instead.
6263 * bsd-uthread.c: Likewise.
6264 * linux-thread-db.c: Likewise.
6265 * ravenscar-thread.c: Likewise.
6266 * sol-thread.c: Likewise.
6267 * spu-multiarch.c: Likewise.
6268
6269 2018-06-07 Pedro Alves <palves@redhat.com>
6270
6271 * target.h (target_ops) <beneath>: Now a method. All references
6272 updated.
6273 (target_ops) <m_beneath>: New.
6274 * target.c (target_ops::beneath): New.
6275 * corelow.c: Adjust all references to target_ops::beneath.
6276 * linux-thread-db.c: Likewise.
6277 * make-target-delegates: Likewise.
6278 * record-btrace.c: Likewise.
6279 * record-full.c: Likewise.
6280 * remote.c: Likewise.
6281 * target.c: Likewise.
6282 * target-delegates.c: Regenerate.
6283
6284 2018-06-07 Pedro Alves <palves@redhat.com>
6285
6286 * target.h (target_stack): Delete.
6287 (current_top_target): Declare function.
6288 * target.c (target_stack): Delete.
6289 (g_current_top_target): New.
6290 (current_top_target): New function.
6291 * auxv.c: Use current_top_target instead of target_stack
6292 throughout.
6293 * avr-tdep.c: Likewise.
6294 * breakpoint.c: Likewise.
6295 * corefile.c: Likewise.
6296 * elfread.c: Likewise.
6297 * eval.c: Likewise.
6298 * exceptions.c: Likewise.
6299 * frame.c: Likewise.
6300 * gdbarch-selftests.c: Likewise.
6301 * gnu-v3-abi.c: Likewise.
6302 * ia64-tdep.c: Likewise.
6303 * ia64-vms-tdep.c: Likewise.
6304 * infcall.c: Likewise.
6305 * infcmd.c: Likewise.
6306 * infrun.c: Likewise.
6307 * linespec.c: Likewise.
6308 * linux-tdep.c: Likewise.
6309 * minsyms.c: Likewise.
6310 * ppc-linux-nat.c: Likewise.
6311 * ppc-linux-tdep.c: Likewise.
6312 * procfs.c: Likewise.
6313 * regcache.c: Likewise.
6314 * remote.c: Likewise.
6315 * rs6000-tdep.c: Likewise.
6316 * s390-linux-nat.c: Likewise.
6317 * s390-tdep.c: Likewise.
6318 * solib-aix.c: Likewise.
6319 * solib-darwin.c: Likewise.
6320 * solib-dsbt.c: Likewise.
6321 * solib-spu.c: Likewise.
6322 * solib-svr4.c: Likewise.
6323 * solib-target.c: Likewise.
6324 * sparc-tdep.c: Likewise.
6325 * sparc64-tdep.c: Likewise.
6326 * spu-tdep.c: Likewise.
6327 * symfile.c: Likewise.
6328 * symtab.c: Likewise.
6329 * target-descriptions.c: Likewise.
6330 * target-memory.c: Likewise.
6331 * target.c: Likewise.
6332 * target.h: Likewise.
6333 * tracefile-tfile.c: Likewise.
6334 * tracepoint.c: Likewise.
6335 * valops.c: Likewise.
6336 * valprint.c: Likewise.
6337 * value.c: Likewise.
6338 * windows-tdep.c: Likewise.
6339 * mi/mi-main.c: Likewise.
6340
6341 2018-06-07 Tom Tromey <tom@tromey.com>
6342
6343 * valprint.h (build_address_symbolic): Declare.
6344 * printcmd.c (print_address_symbolic): Update.
6345 (build_address_symbolic): Change "name" and "filename" to
6346 std::string.
6347 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6348 Update.
6349 * defs.h (build_address_symbolic): Remove declaration.
6350
6351 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6352
6353 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6354 (aarch64_vnv_type): Add function.
6355 (aarch64_pseudo_register_name): Add V regs for SVE.
6356 (aarch64_pseudo_register_type): Likewise.
6357 (aarch64_pseudo_register_reggroup_p): Likewise.
6358 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6359 (aarch64_pseudo_read_value): Add V regs for SVE.
6360 (aarch64_pseudo_write_2): Use V0 offset for SVE
6361 (aarch64_pseudo_write): Add V regs for SVE.
6362 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6363
6364 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6365
6366 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6367 (sve_vl_from_vq): Likewise.
6368
6369 2018-06-05 Tom Tromey <tom@tromey.com>
6370
6371 * cli/cli-cmds.c (show_version): Update.
6372 * top.c (print_gdb_version): Add "interactive" parameter.
6373 Update.
6374 * main.c (captured_main_1): Update.
6375 * top.h (print_gdb_version): Add "interactive" parameter and a
6376 comment.
6377
6378 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6379
6380 * common/enum-flags.h: Add trailing semicolon to example in
6381 comment.
6382
6383 2018-06-05 Tom Tromey <tom@tromey.com>
6384
6385 PR cli/12326:
6386 * NEWS: Add entry about pager.
6387 * utils.c (pagination_disabled_for_command): New global.
6388 (prompt_for_continue): Allow "c" response to prompt.
6389 (reinitialize_more_filter): Clear
6390 pagination_disabled_for_command.
6391 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6392
6393 2018-06-04 Tom Tromey <tom@tromey.com>
6394
6395 * ada-lang.h (ada_lookup_symbol_list): Update.
6396 * ada-lang.c (resolve_subexp): Update.
6397 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6398 parameter.
6399 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6400 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6401 results parameter to std::vector.
6402 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6403 Update.
6404 * ada-exp.y (block_lookup): Update.
6405 (select_possible_type_sym): Change type of syms. Remove nsyms
6406 parameter.
6407 (write_var_or_type, write_name_assoc): Update.
6408
6409 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6410
6411 * windows-nat.c (windows_nat_target::xfer_partial): Return
6412 TARGET_XFER_E_IO if we need to delegate to the target beneath
6413 but BENEATH is NULL.
6414
6415 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6416
6417 * Makefile.in (config.status): Add configure.nat as a
6418 dependency.
6419
6420 2018-06-04 Tom Tromey <tom@tromey.com>
6421
6422 * cp-name-parser.y (cpname_state): Add method declarations.
6423 (HANDLE_QUAL): Update.
6424 (cpname_state::d_grab, cpname_state::fill_comp)
6425 (cpname_state::make_operator, cpname_state::make_dtor)
6426 (cpname_state::make_builtin_type, cpname_state::make_name)
6427 (cpname_state::d_qualify, cpname_state::d_int_type)
6428 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6429 (%union): Move earlier.
6430
6431 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6432
6433 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6434
6435 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6436
6437 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6438 (aarch64_pseudo_write_1): Likewise.
6439 (aarch64_pseudo_read_value): Use helper.
6440 (aarch64_pseudo_write): Likewise.
6441
6442 2018-06-04 Pedro Alves <palves@redhat.com>
6443
6444 * darwin-nat.c (darwin_ops): Delete.
6445 (darwin_attach_pid): Use get_native_target.
6446
6447 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6448
6449 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6450 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6451
6452 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6453
6454 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6455 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6456 (aarch64_gdbarch_init): Check for SVE.
6457 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6458
6459 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6460
6461 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6462 * aarch64-tdep.h (aarch64_read_description): Likewise.
6463 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6464 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6465 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6466 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6467 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6468
6469 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6470
6471 * value.c (value_fetch_lazy_bitfield): New.
6472 (value_fetch_lazy_memory): New.
6473 (value_fetch_lazy_register): New.
6474 (value_fetch_lazy): Factor out to smaller functions.
6475
6476 2018-06-01 Tom Tromey <tom@tromey.com>
6477
6478 * cp-name-parser.y (backslashable, represented): Now const.
6479
6480 2018-06-01 Tom Tromey <tom@tromey.com>
6481
6482 * cp-name-parser.y: Include parser-defs.h.
6483 (parser_fprintf): Remove declaration.
6484
6485 2018-06-01 Tom Tromey <tom@tromey.com>
6486
6487 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6488 %parse-param.
6489 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6490 (global_result): Remove globals.
6491 (struct cpname_state): New.
6492 (yyparse): Don't declare.
6493 (yylex, yyerror): Move declarations after %union.
6494 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6495 (make_name): Add state parameter.
6496 Update all callers.
6497 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6498 parameter.
6499 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6500 Update.
6501 (yylex): Add lvalp, state parameters.
6502 (yyerror): Add state parameter.
6503 (cp_demangled_name_to_comp): Update.
6504
6505 2018-06-01 Tom Tromey <tom@tromey.com>
6506
6507 * cp-name-parser.y (parser_fprintf): Declare.
6508 (GDB_YY_REMAP_PREFIX): Define.
6509 Include yy-remap.h. Don't redefine yy* identifiers.
6510
6511 2018-06-01 Tom Tromey <tom@tromey.com>
6512
6513 * python/py-type.c (typy_legacy_template_argument): Update.
6514 * cp-support.h (cp_demangled_name_to_comp): Update.
6515 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6516 parameter to be a "std::string *".
6517 (main): Update.
6518
6519 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6520
6521 * ada-lex.l: Include "diagnostics.h" instead of
6522 "common/diagnostics.h".
6523 * unittests/environ-selftests.c: Likewise.
6524 * common/diagnostics.h: Moved to ../include.
6525
6526 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6527
6528 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6529 to language_mode_manual while calling breakpoint_re_set_one.
6530
6531 2018-06-01 Tom Tromey <tom@tromey.com>
6532
6533 * valops.c (value_cast_structs, destructor_name_p): Update.
6534 * symtab.c (gdb_mangle_name): Update.
6535 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6536 Update.
6537 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6538 (pascal_object_print_value_fields, pascal_object_print_value):
6539 Update.
6540 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6541 * linespec.c (find_methods): Update.
6542 * gdbtypes.h (type_name_no_tag): Remove.
6543 (type_name_or_error): Rename from type_name_no_tag_or_error.
6544 * gdbtypes.c (type_name_no_tag): Remove.
6545 (type_name_or_error): Rename from type_name_no_tag_or_error.
6546 (lookup_struct_elt_type, check_typedef): Update.
6547 * expprint.c (print_subexp_standard): Update.
6548 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6549 * d-namespace.c (d_lookup_nested_symbol): Update.
6550 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6551 (cp_print_class_member): Update.
6552 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6553 * completer.c (add_struct_fields): Update.
6554 * c-typeprint.c (cp_type_print_derivation_info)
6555 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6556 Update.
6557 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6558 (ada_prefer_type, ada_is_exception_sym): Update.
6559
6560 2018-06-01 Tom Tromey <tom@tromey.com>
6561
6562 * valops.c (enum_constant_from_type, value_namespace_elt)
6563 (value_maybe_namespace_elt): Update.
6564 * valarith.c (find_size_for_pointer_math): Update.
6565 * target-descriptions.c (make_gdb_type): Update.
6566 * symmisc.c (print_symbol): Update.
6567 * stabsread.c (define_symbol, read_type)
6568 (complain_about_struct_wipeout, add_undefined_type)
6569 (cleanup_undefined_types_1): Update.
6570 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6571 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6572 (rust_internal_print_type, rust_composite_type)
6573 (rust_evaluate_funcall, rust_evaluate_subexp)
6574 (rust_inclusive_range_type_p): Update.
6575 * python/py-type.c (typy_get_tag): Update.
6576 * p-typeprint.c (pascal_type_print_base): Update.
6577 * mdebugread.c (parse_symbol, parse_type): Update.
6578 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6579 Update.
6580 * guile/scm-type.c (gdbscm_type_tag): Update.
6581 * go-lang.c (sixg_string_p): Update.
6582 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6583 Update.
6584 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6585 (TYPE_TAG_NAME): Remove.
6586 * gdbtypes.c (type_name_no_tag): Simplify.
6587 (check_typedef, check_types_equal, recursive_dump_type)
6588 (copy_type_recursive, arch_composite_type): Update.
6589 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6590 in summary mode when needed.
6591 * eval.c (evaluate_funcall): Update.
6592 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6593 (process_structure_scope, read_enumeration_type)
6594 (read_namespace_type, read_module_type, determine_prefix): Update.
6595 * cp-support.c (inspect_type): Update.
6596 * coffread.c (process_coff_symbol, decode_base_type): Update.
6597 * c-varobj.c (c_is_path_expr_parent): Update.
6598 * c-typeprint.c (c_type_print_base_struct_union): Update.
6599 (c_type_print_base_1): Update. Print struct/class/union/enum in
6600 summary when using C language.
6601 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6602 (gen_maybe_namespace_elt): Update.
6603 * ada-lang.c (ada_type_name): Simplify.
6604 (empty_record, ada_template_to_fixed_record_type_1)
6605 (template_to_static_fixed_type)
6606 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6607
6608 2018-06-01 Tom Tromey <tom@tromey.com>
6609
6610 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6611 c_print_type.
6612 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6613 (c_print_type): Update.
6614 (c_print_type): New overload.
6615 (c_type_print_varspec_prefix, c_type_print_args)
6616 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6617 (c_type_print_base_struct_union, c_type_print_base_1)
6618 (cp_type_print_method_args): Add "language" parameter.
6619 (c_type_print_base): Update.
6620 * c-lang.h (c_print_type): Add new overload.
6621
6622 2018-06-01 Tom Tromey <tom@tromey.com>
6623
6624 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6625 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6626
6627 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6628
6629 * aarch64-tdep.c (aarch64_sve_register_names): New const
6630 var.
6631 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6632 (AARCH64_SVE_Z_REGS_NUM): New define.
6633 (AARCH64_SVE_P_REGS_NUM): Likewise.
6634 (AARCH64_SVE_NUM_REGS): Likewise.
6635
6636 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6637
6638 * nat/linux-ptrace.h [__alpha__]
6639 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6640 definitions.
6641
6642 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6643
6644 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6645 the endianness selected.
6646 * NEWS: Document `set endian auto' mode operation update.
6647
6648 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6649
6650 * Makefile.in: Add new header.
6651 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6652 (sve_vl_from_vg): Likewise.
6653 (sve_vq_from_vl): Likewise.
6654 (sve_vl_from_vq): Likewise.
6655 (sve_vq_from_vg): Likewise.
6656 (sve_vg_from_vq): Likewise.
6657 * configure.nat: Add new c file.
6658 * nat/aarch64-sve-linux-ptrace.c: New file.
6659 * nat/aarch64-sve-linux-ptrace.h: New file.
6660
6661 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6662
6663 * aarch64-linux-nat.c (aarch64_linux_read_description):
6664 Add parmeter zero.
6665 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6666 Likewise.
6667 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6668 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6669 (aarch64_gdbarch_init): Add parmeter zero.
6670 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6671 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6672 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6673 parmeter.
6674 * doc/gdb.texinfo: Describe SVE feature
6675 * features/aarch64-sve.c: New file.
6676
6677 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6678
6679 PR gdb/23210
6680 * gdbarch.sh (significant_addr_bit): Default to zero when
6681 not set by target architecture.
6682 * gdbarch.c: Re-generated.
6683 * utils.c (address_significant): Update.
6684
6685 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6686
6687 * stack.c (func_command): Remove trailing newline in call to error.
6688
6689 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6690
6691 * regcache.h (regcache_raw_collect): Remove, update callers to
6692 use regcache::raw_collect.
6693 * regcache.c (regcache_raw_collect): Remove.
6694
6695 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6696
6697 * regcache.h (regcache_raw_supply): Remove, update callers to
6698 use detached_regcache::raw_supply.
6699 * regcache.c (regcache_raw_supply): Remove.
6700
6701 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6702
6703 * regcache.h (regcache_cooked_write_part): Remove, update
6704 callers to use regcache::cooked_write_part.
6705 * regcache.c (regcache_cooked_write_part): Remove.
6706
6707 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6708
6709 * regcache.h (regcache_cooked_read_part): Remove, update callers
6710 to use readable_regcache::cooked_read_part.
6711 * regcache.c (regcache_cooked_read_part): Remove.
6712
6713 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6714
6715 * regcache.h (regcache_cooked_read_value): Remove, update
6716 callers to use readable_regcache::cooked_read_value.
6717 * regcache.c (regcache_cooked_read_value): Remove.
6718
6719 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6720
6721 * regcache.h (regcache_cooked_write): Remove, update callers to
6722 use regcache::cooked_write.
6723 * regcache.c (regcache_cooked_write): Remove.
6724
6725 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6726
6727 * regcache.h (regcache_invalidate): Remove, update callers to
6728 use detached_regcache::invalidate instead.
6729 * regcache.c (regcache_invalidate): Remove.
6730
6731 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6732
6733 * regcache.h (regcache_raw_write_part): Remove, update callers
6734 to use regcache::raw_write_part instead.
6735 * regcache.c (regcache_raw_write_part): Remove.
6736
6737 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6738
6739 * regcache.h (regcache_raw_read_part): Remove, update callers to
6740 use readable_regcache::raw_read_part instead.
6741 * regcache.c (regcache_raw_read_part): Remove.
6742
6743 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6744
6745 * regcache.h (regcache_cooked_read): Remove, update callers to
6746 use readable_regcache::cooked_read instead.
6747 * regcache.c (regcache_cooked_read): Remove.
6748
6749 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6750
6751 * regcache.h (regcache_raw_write): Remove, update callers to use
6752 regcache::raw_write instead.
6753 * regcache.c (regcache_raw_write): Remove.
6754
6755 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6756
6757 * regcache.h (regcache_raw_read): Remove, update callers to use
6758 readable_regcache::raw_read instead.
6759 * regcache.c (regcache_raw_read): Remove.
6760
6761 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6762
6763 * regcache.h (regcache_raw_update): Remove, update callers to
6764 use readable_regcache::raw_update instead.
6765 * regcache.c (regcache_raw_update): Remove.
6766
6767 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6768
6769 * regcache.h (regcache_register_status): Remove, update callers
6770 to use reg_buffer::get_register_status directly instead.
6771 * regcache.c (regcache_register_status): Remove.
6772
6773 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6774
6775 * regcache.h (regcache_get_ptid): Remove, update all callers to
6776 call regcache::ptid instead.
6777 * regcache.c (regcache_get_ptid): Remove.
6778
6779 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6780
6781 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6782
6783 2018-05-30 Pedro Alves <palves@redhat.com>
6784
6785 * common/common-exceptions.h (exception_rethrow): Use
6786 ATTRIBUTE_NORETURN.
6787
6788 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6789
6790 * breakpoint.c (print_solib_event, check_status_catch_solib):
6791 Remove struct keyword in range-based for loops.
6792 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6793 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6794 Likewise.
6795 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6796 Likewise.
6797 * symfile.c (addr_info_make_relative): Likewise.
6798 * thread.c (value_in_thread_stack_temporaries): Likewise.
6799
6800 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6801
6802 PR gdb/16841
6803 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6804 aggregate type to get its real type before accessing it.
6805
6806 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6807
6808 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6809 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6810 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6811 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6812 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6813 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6814 * printcmd.c (info_address_command): Likewise.
6815
6816 2018-05-29 Tom Tromey <tom@tromey.com>
6817
6818 * windows-nat.c (handle_exception): Update fall-through comment.
6819
6820 2018-05-29 Tom Tromey <tom@tromey.com>
6821
6822 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6823 (struct program_space) <added_solibs>: Now a std::vector.
6824 * breakpoint.c (print_solib_event): Update.
6825 (check_status_catch_solib): Update.
6826 * progspace.c (clear_program_space_solib_cache): Update.
6827 * solib.c (update_solib_list): Update.
6828
6829 2018-05-29 Tom Tromey <tom@tromey.com>
6830
6831 * python/py-type.c (typy_richcompare): Update.
6832 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6833 * gdbtypes.h (types_deeply_equal): Return bool.
6834 (types_equal): Likewise.
6835 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6836 declare VEC.
6837 (check_types_equal): Change worklist to std::vector. Return
6838 bool.
6839 (struct type_equality_entry): Add constructor.
6840 (compare_maybe_null_strings): Return bool.
6841 (check_types_worklist): Return bool. Change worklist to
6842 std::vector.
6843 (types_deeply_equal): Use std::vector.
6844 (types_equal): Return bool.
6845 (compare_maybe_null_strings): Simplify.
6846
6847 2018-05-29 Tom Tromey <tom@tromey.com>
6848
6849 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6850
6851 2018-05-29 Tom Tromey <tom@tromey.com>
6852
6853 * objc-lang.h: Don't include cp-support.h.
6854 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6855 declare VEC.
6856
6857 2018-05-27 Tom Tromey <tom@tromey.com>
6858
6859 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6860
6861 2018-05-25 Tom Tromey <tom@tromey.com>
6862
6863 * value.c (value::location): Initialize.
6864
6865 2018-05-25 Tom Tromey <tom@tromey.com>
6866
6867 * dbxread.c (init_bincl_list): Remove.
6868 (bincl_list): Now a std::vector.
6869 (bincls_allocated, next_bincl): Remove.
6870 (free_bincl_list, do_free_bincl_list_cleanup)
6871 (make_cleanup_free_bincl_list): Remove.
6872 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6873 unique_xmalloc_ptr.
6874 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6875 (struct header_file_location): Add constructor.
6876 (add_bincl_to_list): Remove.
6877
6878 2018-05-25 Tom Tromey <tom@tromey.com>
6879
6880 * tui/tui.c (tui_enable): Update.
6881 * mi/mi-interp.c (mi_interp::init): Update.
6882 * interps.h (class interp) <name>: New method.
6883 <m_name>: Rename from name.
6884 (~scoped_restore_interp): Update.
6885 * interps.c (interp::interp): Update.
6886 (interp_add, interp_set, interp_lookup_existing)
6887 (current_interp_named_p): Update.
6888
6889 2018-05-25 Tom Tromey <tom@tromey.com>
6890
6891 * interps.c (interp_name): Remove.
6892 * mi/mi-interp.c (mi_interp::init): Update.
6893 * interps.h (interp_name): Remove.
6894 (~scoped_restore_interp): Update.
6895 * tui/tui.c (tui_enable): Update.
6896
6897 2018-05-25 Tom Tromey <tom@tromey.com>
6898
6899 * utils.c (fputs_maybe_filtered): Update.
6900 * linespec.c (decode_line_full): Update.
6901 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6902 (mi_print_breakpoint_for_event, mi_solib_loaded)
6903 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6904 (mi_user_selected_context_changed): Update.
6905 * mi/mi-main.c (mi_execute_command): Update.
6906 * cli/cli-script.c (execute_control_command): Update.
6907 * python/python.c (execute_gdb_command): Update.
6908 * solib.c (info_sharedlibrary_command): Update.
6909 * interps.c (interp_ui_out): Remove.
6910 * interps.h (interp_ui_out): Remove.
6911
6912 2018-05-25 Tom Tromey <tom@tromey.com>
6913
6914 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6915 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6916 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6917
6918 2018-05-25 Tom Tromey <tom@tromey.com>
6919
6920 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6921 * interps.c (interp_exec): Use scoped_restore.
6922
6923 2018-05-25 Tom Tromey <tom@tromey.com>
6924
6925 * remote.c (remote_target::remote_file_get): Use
6926 gdb::byte_vector.
6927 (remote_target::remote_file_put): Likewise.
6928
6929 2018-05-25 Tom Tromey <tom@tromey.com>
6930
6931 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6932 a std::string.
6933 (get_pe_section_index, add_pe_exported_sym): Update.
6934 (read_pe_exported_syms): Use gdb::def_vector.
6935
6936 2018-05-25 Tom Tromey <tom@tromey.com>
6937
6938 * frame.c (remove_prev_frame): Remove.
6939 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6940
6941 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6942
6943 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6944 Remove prototypes.
6945 * mips-linux-nat.c (supply_fpregset): Always call
6946 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6947 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6948 `mips_fill_fpregset'.
6949 * mips-linux-tdep.c (mips_supply_fpregset)
6950 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6951 (mips_fill_fpregset_wrapper): Remove functions.
6952 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6953 (mips_linux_fpregset): Remove variable.
6954 (mips_linux_iterate_over_regset_sections): Use
6955 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6956 (mips_linux_o32_sigframe_init): Remove comment.
6957
6958 2018-05-25 Pedro Alves <palves@redhat.com>
6959
6960 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6961 (struct readahead_cache, struct packet_reg, struct
6962 remote_arch_state, class remote_state): Move higher up in the
6963 file.
6964 (remote_target::m_remote_state): Now an object instead of a pointer.
6965 (remote_target::get_remote_state): Adjust.
6966
6967 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6968
6969 * stack.c (select_and_print_frame): Delete.
6970 (struct function_bounds): Move struct within function.
6971 (func_command): Most content moved into new function
6972 find_frame_for_function, use new function, print result, add
6973 function comment.
6974 (find_frame_for_function): New function, now returns a result.
6975
6976 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6977
6978 * stack.c (iterate_over_block_arg_vars): Fix comment.
6979 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6980
6981 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6982
6983 PR gdb/23203
6984 * frame.c
6985 (scoped_restore_selected_frame::scoped_restore_selected_frame):
6986 Define.
6987 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6988 Define.
6989 * frame.h (class scoped_restore_selected_frame): New class.
6990 * stack.c (print_frame_local_vars): Remove catching and rethrowing
6991 of any exception, use scoped_restore_selected_frame to restore the
6992 frame instead.
6993
6994 2018-05-24 Pedro Alves <palves@redhat.com>
6995
6996 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6997 override.
6998
6999 2018-05-23 Tom Tromey <tom@tromey.com>
7000
7001 * complaints.c (struct complaints): Remove.
7002 (symfile_complaint_book): Remove.
7003 (series): New global.
7004 (complaint_internal): Update.
7005 (clear_complaints): Update.
7006
7007 2018-05-23 Tom Tromey <tom@tromey.com>
7008
7009 * complaints.c (counters): New global.
7010 (struct complain): Remove.
7011 (struct complaints) <root>: Remove.
7012 (complaint_sentinel): Remove.
7013 (symfile_complaint_book): Update.
7014 (find_complaint) Remove.
7015 (complaint_internal, clear_complaints): Update.
7016
7017 2018-05-23 Tom Tromey <tom@tromey.com>
7018
7019 * complaints.c (struct complain) <file, line>: Remove.
7020 (find_complaint): Remove file, line parameters.
7021 (complaint_internal): Update.
7022
7023 2018-05-23 Tom Tromey <tom@tromey.com>
7024
7025 * complaints.c (vcomplaint): Remove.
7026 (complaint_internal) Merge in contents of vcomplaint.
7027
7028 2018-05-23 Tom Tromey <tom@tromey.com>
7029
7030 * complaints.c (struct complaints) <explanation>: Remove.
7031 (symfile_explanations): Remove.
7032 (symfile_complaint_book): Update.
7033 (vcomplaint): Update.
7034 (struct explanation): Remove.
7035
7036 2018-05-23 Tom Tromey <tom@tromey.com>
7037
7038 * complaints.c (symfile_complaints): Remove.
7039 (complaint_internal): Remove "complaints" parameter.
7040 (clear_complaints, vcomplaint): Remove "c" parameter.
7041 (get_complaints): Remove.
7042 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7043 (dwarf2_debug_line_missing_file_complaint)
7044 (dwarf2_debug_line_missing_end_sequence_complaint)
7045 (dwarf2_complex_location_expr_complaint)
7046 (dwarf2_const_value_length_mismatch_complaint)
7047 (dwarf2_section_buffer_overflow_complaint)
7048 (dwarf2_macro_malformed_definition_complaint)
7049 (dwarf2_invalid_attrib_class_complaint)
7050 (create_addrmap_from_index, dw2_symtab_iter_next)
7051 (dw2_expand_marked_cus)
7052 (dw2_debug_names_iterator::find_vec_in_debug_names)
7053 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7054 (create_debug_type_hash_table, init_cutu_and_read_dies)
7055 (partial_die_parent_scope, add_partial_enumeration)
7056 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7057 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7058 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7059 (create_cus_hash_table, create_dwp_hash_table)
7060 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7061 (dwarf2_rnglists_process, dwarf2_ranges_process)
7062 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7063 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7064 (handle_struct_member_die, process_structure_scope)
7065 (read_array_type, read_common_block, read_module_type)
7066 (read_tag_pointer_type, read_typedef, read_base_type)
7067 (read_subrange_type, load_partial_dies, partial_die_info::read)
7068 (partial_die_info::read, partial_die_info::read)
7069 (partial_die_info::read, read_checked_initial_length_and_offset)
7070 (dwarf2_string_attr, read_formatted_entries)
7071 (dwarf_decode_line_header)
7072 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7073 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7074 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7075 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7076 (get_signatured_type, get_DW_AT_signature_type)
7077 (decode_locdesc, file_file_name, consume_improper_spaces)
7078 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7079 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7080 (dwarf2_symbol_mark_computed, set_die_type)
7081 (read_attribute_value): Update.
7082 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7083 Update.
7084 * dbxread.c (unknown_symtype_complaint)
7085 (lbrac_mismatch_complaint, repeated_header_complaint)
7086 (set_namestring, function_outside_compilation_unit_complaint)
7087 (read_dbx_symtab, process_one_symbol): Update.
7088 * gdbtypes.c (stub_noname_complaint): Update.
7089 * windows-nat.c (handle_unload_dll): Update.
7090 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7091 (decode_base_type): Update.
7092 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7093 (eb_complaint, record_include_begin, record_include_end)
7094 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7095 (process_xcoff_symbol, read_symbol)
7096 (function_outside_compilation_unit_complaint)
7097 (scan_xcoff_symtab): Update.
7098 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7099 * buildsym.c (finish_block_internal, make_blockvector)
7100 (end_symtab_get_static_block, augment_type_symtab): Update.
7101 * dtrace-probe.c (dtrace_process_dof)
7102 (dtrace_static_probe_ops::get_probes): Update.
7103 * complaints.h (struct complaint): Don't declare.
7104 (symfile_complaints): Remove.
7105 (complaint_internal): Remove "complaints" parameter.
7106 (complaint): Likewise.
7107 (clear_complaints): Likewise.
7108 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7109 (reread_symbols): Update.
7110 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7111 (dwarf2_frame_cache, decode_frame_entry): Update.
7112 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7113 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7114 (info_selectors_command): Update.
7115 * macrotab.c (macro_include, check_for_redefinition)
7116 (macro_undef): Update.
7117 * objfiles.c (filter_overlapping_sections): Update.
7118 * stabsread.c (invalid_cpp_abbrev_complaint)
7119 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7120 (define_symbol, error_type, read_type, rs6000_builtin_type)
7121 (stabs_method_name_from_physname, read_member_functions)
7122 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7123 (attach_fields_to_type, complain_about_struct_wipeout)
7124 (read_range_type, read_args, common_block_start)
7125 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7126 Update.
7127 * mdebugread.c (index_complaint, unknown_ext_complaint)
7128 (basic_type_complaint, bad_tag_guess_complaint)
7129 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7130 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7131 (parse_procedure, parse_lines)
7132 (function_outside_compilation_unit_complaint)
7133 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7134 (bad_tag_guess_complaint, reg_value_complaint): Update.
7135 * cp-support.c (demangled_name_complaint): Update.
7136 * macroscope.c (sal_macro_scope): Update.
7137 * dwarf-index-write.c (class debug_names): Update.
7138
7139 2018-05-23 Tom Tromey <tom@tromey.com>
7140
7141 * complaints.c (clear_complaints): Remove "noisy" parameter.
7142 * complaints.h (clear_complaints): Update.
7143 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7144 (reread_symbols): Update.
7145
7146 2018-05-23 Tom Tromey <tom@tromey.com>
7147
7148 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7149 SUBSEQUENT_MESSAGE.
7150 (vcomplaint, clear_complaints): Update.
7151 (symfile_explanations): Remove some messages.
7152
7153 2018-05-23 Tom Tromey <tom@tromey.com>
7154
7155 * complaints.c (internal_complaint): Remove.
7156 * complaints.h (internal_complaint): Remove.
7157
7158 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7159
7160 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7161
7162 2018-05-22 Pedro Alves <palves@redhat.com>
7163
7164 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7165 (remote_fileio_badfd, remote_fileio_return_errno)
7166 (remote_fileio_return_success, remote_fileio_func_open)
7167 (remote_fileio_func_open, remote_fileio_func_close)
7168 (remote_fileio_func_read, remote_fileio_func_write)
7169 (remote_fileio_func_lseek, remote_fileio_func_rename)
7170 (remote_fileio_func_unlink, remote_fileio_func_stat)
7171 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7172 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7173 remote_target parameter.
7174 (remote_fio_func_map) <func>: Add remote_target parameter.
7175 (do_remote_fileio_request, remote_fileio_request):
7176 * remote-fileio.h (remote_fileio_request):
7177 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7178 remote_target parameter.
7179 (remote_notif_process, handle_notification): Adjust to pass down
7180 the remote.
7181 (remote_notif_state_allocate): Add remote_target parameter. Save
7182 it.
7183 * remote-notif.h (struct remote_target): Forward declare.
7184 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7185 remote_target parameter.
7186 (struct remote_notif_state) <remote>: New field.
7187 (remote_notif_ack, remote_notif_parse): Add remote_target
7188 parameter.
7189 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7190 remote_target parameter.
7191 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7192 (threads_listing_context, rmt_thread_action, protocol_feature)
7193 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7194 (packet_result, struct threads_listing_context, remote_state):
7195 Move definitions and declarations higher up.
7196 (remote_target) <~remote_target>: Declare.
7197 (remote_download_command_source, remote_file_put, remote_file_get)
7198 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7199 (remote_hostio_pread_vFile, remote_hostio_send_command)
7200 (remote_hostio_set_filesystem, remote_hostio_open)
7201 (remote_hostio_close, remote_hostio_unlink, remote_state)
7202 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7203 (get_memory_write_packet_size, get_memory_read_packet_size)
7204 (append_pending_thread_resumptions, remote_detach_1)
7205 (append_resumption, remote_resume_with_vcont)
7206 (add_current_inferior_and_thread, wait_ns, wait_as)
7207 (process_stop_reply, remote_notice_new_inferior)
7208 (process_initial_stop_replies, remote_add_thread)
7209 (btrace_sync_conf, remote_btrace_maybe_reopen)
7210 (remove_new_fork_children, kill_new_fork_children)
7211 (discard_pending_stop_replies, stop_reply_queue_length)
7212 (check_pending_events_prevent_wildcard_vcont)
7213 (discard_pending_stop_replies_in_queue, stop_reply)
7214 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7215 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7216 (remote_interrupt_as, remote_interrupt_ns)
7217 (remote_get_noisy_reply, remote_query_attached)
7218 (remote_add_inferior, remote_current_thread, get_current_thread)
7219 (set_thread, set_general_thread, set_continue_thread)
7220 (set_general_process, write_ptid)
7221 (remote_unpack_thread_info_response, remote_get_threadinfo)
7222 (parse_threadlist_response, remote_get_threadlist)
7223 (remote_threadlist_iterator, remote_get_threads_with_ql)
7224 (remote_get_threads_with_qxfer)
7225 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7226 (get_offsets, remote_check_symbols, remote_supported_packet)
7227 (remote_query_supported, remote_packet_size)
7228 (remote_serial_quit_handler, remote_detach_pid)
7229 (remote_vcont_probe, remote_resume_with_hc)
7230 (send_interrupt_sequence, interrupt_query)
7231 (remote_notif_get_pending_events, fetch_register_using_p)
7232 (send_g_packet, process_g_packet, fetch_registers_using_g)
7233 (store_register_using_P, store_registers_using_G)
7234 (set_remote_traceframe, check_binary_download)
7235 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7236 (remote_xfer_live_readonly_partial, remote_read_bytes)
7237 (remote_send_printf, remote_flash_write, readchar)
7238 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7239 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7240 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7241 (extended_remote_disable_randomization, extended_remote_run)
7242 (send_environment_packet, extended_remote_environment_support)
7243 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7244 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7245 (packet_command): Now methods of ...
7246 (remote_target): ... this class.
7247 (m_remote_state) <remote_target>: New field.
7248 (struct remote_state) <stop_reply_queue,
7249 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7250 fields.
7251 (remote_state::remote_state): Allocate stop_reply_queue.
7252 (remote_state): Delete global.
7253 (get_remote_state_raw): Delete.
7254 (remote_target::get_remote_state): Allocate m_remote_state on
7255 demand.
7256 (get_current_remote_target): New.
7257 (remote_ops, extended_remote_ops): Delete.
7258 (wait_forever_enabled_p, remote_async_inferior_event_token):
7259 Delete, moved to struct remote_state.
7260 (remote_target::close): Delete self. Destruction bits split to
7261 ...
7262 (remote_target::~remote_target): ... this.
7263 (show_memory_packet_size): Adjust to use
7264 get_current_remote_target.
7265 (struct protocol_feature) <func>: Add remote_target parameter.
7266 All callers adjusted.
7267 (curr_quit_handler_target): New.
7268 (remote_serial_quit_handler): Reimplement.
7269 (remote_target::open_1): Adjust to use get_current_remote_target.
7270 Heap-allocate remote_target/extended_remote_target instances.
7271 (vcont_builder::vcont_builder): Add remote_target parameter, and
7272 save it in m_remote. All callers adjusted.
7273 (vcont_builder::m_remote): New field.
7274 (vcont_builder::restart, vcont_builder::flush)
7275 (vcont_builder::push_action): Use it.
7276 (remote_target::commit_resume): Use it.
7277 (struct queue_iter_param) <remote>: New field.
7278 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7279 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7280 (check_pending_event_prevents_wildcard_vcont_callback)
7281 (remote_target::check_pending_events_prevent_wildcard_vcont)
7282 (remote_target::discard_pending_stop_replies)
7283 (remote_target::discard_pending_stop_replies_in_queue)
7284 (remote_target::remote_notif_remove_queued_reply): Fill in
7285 'remote' field.
7286 (remote_notif_get_pending_events): New.
7287 (remote_target::readchar, remote_target::remote_serial_write):
7288 Save/restore curr_quit_handler_target.
7289 (putpkt): New.
7290 (kill_new_fork_children): Fill in 'remote' field.
7291 (packet_command): Use get_current_remote_target, defer to
7292 remote_target method of same name.
7293 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7294 parameter, and save it in m_remote. All callers adjusted.
7295 (scoped_remote_fd::release): Use m_remote.
7296 (scoped_remote_fd::m_remote): New field.
7297 (remote_file_put, remote_file_get, remote_file_delete): Use
7298 get_current_remote_target, defer to remote_target method of same
7299 name.
7300 (remote_btrace_reset): Add remote_state paremeter. Update all
7301 callers.
7302 (remote_async_inferior_event_handler). Pass down 'data'.
7303 (remote_new_objfile): Use get_current_remote_target.
7304 (remote_target::vcont_r_supported): New.
7305 (set_range_stepping): Use get_current_remote_target and
7306 remote_target::vcont_r_supported.
7307 (_initialize_remote): Don't allocate 'remote_state' and
7308 'stop_reply_queue' globals.
7309 * remote.h (struct remote_target): Forward declare.
7310 (getpkt, putpkt, remote_notif_get_pending_events): Add
7311 'remote_target' parameter.
7312
7313 2018-05-22 Pedro Alves <palves@redhat.com>
7314
7315 * remote.c (vcont_builder): Now a class. Make all data members
7316 private.
7317 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7318 Declare methods.
7319 (vcont_builder_restart): Rename to ...
7320 (vcont_builder::restart): ... this.
7321 (vcont_builder_flush): Rename to ...
7322 (vcont_builder::flush): ... this.
7323 (vcont_builder_push_action): Rename to ...
7324 (vcont_builder::push_action): ... this.
7325 (remote_target::commit_resume): Adjust.
7326
7327 2018-05-22 Pedro Alves <palves@redhat.com>
7328
7329 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7330 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7331 (get_fixed_memory_packet_size): New.
7332 (get_memory_packet_size): Use it.
7333 (set_memory_packet_size): Don't override the config size with
7334 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7335 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7336 Don't refer to get_memory_packet_size if not connected to a remote
7337 target. Show "(default)" if configured size is 0.
7338
7339 2018-05-22 Pedro Alves <palves@redhat.com>
7340
7341 * remote.c (remote_target::mourn_inferior): Move
7342 discard_pending_stop_replies call here from ...
7343 (_initialize_remote): ... here.
7344
7345 2018-05-22 Pedro Alves <palves@redhat.com>
7346
7347 * remote.c (compare_section_command): Remove set_general_process
7348 call.
7349
7350 2018-05-22 Pedro Alves <palves@redhat.com>
7351
7352 * remote.c (struct packet_reg, struct remote_arch_state):
7353 Move higher up in the file.
7354 (remote_state) <m_arch_states>: Store remote_arch_state values
7355 instead of remote_arch_state pointers.
7356 (remote_state::get_remote_arch_state): Adjust.
7357
7358 2018-05-22 Pedro Alves <palves@redhat.com>
7359
7360 * remote.c: Include <unordered_map>.
7361 (remote_state): Now a class.
7362 (remote_state) <get_remote_arch_state>: Declare method.
7363 <get_remote_arch_state>: New field.
7364 (remote_arch_state) <remote_arch_state>: Declare ctor.
7365 <regs>: Now a unique_ptr.
7366 (remote_gdbarch_data_handle): Delete.
7367 (get_remote_arch_state): Delete.
7368 (remote_state::get_remote_arch_state): New.
7369 (get_remote_state): Adjust to call remote_state's
7370 get_remote_arch_state method.
7371 (init_remote_state): Delete, bits factored out to ...
7372 (remote_arch_state::remote_arch_state): ... this new method.
7373 (get_remote_packet_size, get_memory_packet_size)
7374 (process_g_packet, remote_target::fetch_registers)
7375 (remote_target::prepare_to_store, store_registers_using_G)
7376 (remote_target::store_registers, remote_target::get_trace_status):
7377 Adjust to call remote_state's method.
7378 (_initialize_remote): Remove reference to
7379 remote_gdbarch_data_handle.
7380
7381 2018-05-22 Pedro Alves <palves@redhat.com>
7382
7383 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7384 pread>: New method declarations.
7385 (remote_target::open_1): Adjust.
7386 (readahead_cache_invalidate): Rename to ...
7387 (readahead_cache::invalidate): ... this, and adjust to be a class
7388 method.
7389 (readahead_cache_invalidate_fd): Rename to ...
7390 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7391 class method.
7392 (remote_hostio_pwrite): Adjust.
7393 (remote_hostio_pread_from_cache): Rename to ...
7394 (readahead_cache::pread): ... this, and adjust to be a class
7395 method.
7396 (remote_hostio_close): Adjust.
7397
7398 2018-05-22 Pedro Alves <palves@redhat.com>
7399
7400 * remote.c (remote_hostio_close_cleanup): Delete.
7401 (class scoped_remote_fd): New.
7402 (remote_file_put, remote_file_get): Use it.
7403
7404 2018-05-22 Pedro Alves <palves@redhat.com>
7405
7406 (struct vCont_action_support): Use bool and initialize all fields.
7407 (struct readahead_cache): Initialize all fields.
7408 (remote_state): Use bool and initialize all fields.
7409 (remote_state::remote_state, remote_state::~remote_state): New.
7410 (new_remote_state): Delete.
7411 (_initialize_remote): Use new to allocate remote_state.
7412
7413 2018-05-22 Pedro Alves <palves@redhat.com>
7414 張俊芝 <zjz@zjz.name>
7415
7416 PR gdb/22973
7417 * c-exp.y: Include "c-support.h".
7418 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7419 of tolower. Use c_ident_is_alpha to scan names.
7420 * c-lang.c: Include "c-support.h".
7421 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7422 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7423 * c-support.h: New file, with bits factored out from ...
7424 * cp-name-parser.y: ... this file.
7425 Include "c-support.h".
7426 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7427 c-support.h and renamed.
7428 (symbol_end, yylex): Adjust.
7429
7430 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7431
7432 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7433 parameter type to CORE_ADDR.
7434 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7435 parameter type in declaration to CORE_ADDR.
7436 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7437 target_auxv_search to get AT_HWCAP and use the result to get the
7438 target description.
7439 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7440 to CORE_ADDR. Remove the cast of the return value to unsigned
7441 long. Fix error predicate of target_auxv_search.
7442 (ppc_linux_nat_target::read_description): Change the type of the
7443 hwcap variable to CORE_ADDR.
7444
7445 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7446
7447 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7448 if the size of fpscr is larger than 32 bits.
7449
7450 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7451
7452 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7453 (ppc32_linux_vsxregmap): New global.
7454 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7455 regcache_supply_regset, and regcache_collect_regset.
7456 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7457 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7458 (fetch_vsx_register, store_vsx_register): Remove.
7459 (fetch_vsx_registers): Add regno parameter. Get regset using
7460 ppc_linux_vsxregset. Use regset to supply registers.
7461 (store_vsx_registers): Add regno parameter. Get regset using
7462 ppc_linux_vsxregset. Use regset to collect registers.
7463 (fetch_register): Call fetch_vsx_registers instead of
7464 fetch_vsx_register.
7465 (store_register): Call store_vsx_registers instead of
7466 store_vsx_register.
7467 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7468 new regno parameter.
7469 (store_ppc_registers): Call store_vsx_registers with -1 for the
7470 new regno parameter.
7471 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7472 (ppc_collect_vsxregset): Remove.
7473
7474 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7475
7476 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7477 offset fields.
7478 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7479 for vector register offset fields.
7480 (ppc64_fbsd_reg_offsets): Likewise.
7481 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7482 to vector register offset fields.
7483 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7484 to vector register offset fields.
7485 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7486 vector register offset fields.
7487 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7488 initializers for vector register offset fields.
7489 (rs6000_aix64_reg_offsets): Likewise.
7490 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7491 (ppc_supply_vrregset): Remove.
7492 (ppc_collect_vrregset): Remove.
7493 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7494 (ppc_linux_vrregset) : New function.
7495 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7496 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7497 (ppc32_linux_vrregset): Remove.
7498 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7499 and use result instead of ppc32_linux_vrregset.
7500 (ppc32_linux_reg_offsets): Remove initializers for vector register
7501 offset fields.
7502 (ppc64_linux_reg_offsets): Likewise.
7503 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7504 * ppc-linux-nat.c: Include regset.h.
7505 (gdb_vrregset_t): Adjust comment to account for little-endian
7506 mode.
7507 (supply_vrregset, fill_vrregset): Remove.
7508 (fetch_altivec_register, store_altivec_register): Remove.
7509 (fetch_altivec_registers): Add regno parameter. Get regset using
7510 ppc_linux_vrregset. Use regset to supply registers.
7511 (store_altivec_registers): Add regno parameter. Get regset using
7512 ppc_linux_vrregset. Use regset to collect registers.
7513 (fetch_register): Call fetch_altivec_registers instead of
7514 fetch_altivec_register.
7515 (store_register): Call store_altivec_registers instead of
7516 store_altivec_register.
7517 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7518 the new regno parameter.
7519 (store_ppc_registers): Call store_altivec_registers with -1 for
7520 the new regno parameter.
7521
7522 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7523
7524 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7525 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7526 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7527 (gdb_vrregset_t): Change array type size to
7528 PPC_LINUX_SIZEOF_VRREGSET.
7529 (gdb_vsxregset_t): Change array type size to
7530 PPC_LINUX_SIZEOF_VSXREGSET.
7531 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7532 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7533 PPC_LINUX_SIZEOF_VSXREGSET.
7534
7535 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7536
7537 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7538 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7539 nat/ppc-linux.c.
7540 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7541 ppc_linux_target_wordsize with tid.
7542 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7543 wordsize with tid.
7544 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7545 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7546 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7547 tid parameter. Remove static specifier.
7548 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7549 (ppc_linux_target_wordsize): New declaration.
7550
7551 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7552
7553 * arch/ppc-linux-common.c: New file.
7554 * arch/ppc-linux-common.h: New file.
7555 * arch/ppc-linux-tdesc.h: New file.
7556 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7557 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7558 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7559 arch/ppc-linux-tdesc.h.
7560 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7561 arch/ppc-linux-tdesc.h.
7562 (ppc_linux_nat_target::read_description): Remove target
7563 description matching code. Fill a ppc_linux_features struct and
7564 call ppc_linux_match_description with it. Move comment about ISA
7565 2.05 to ppc-linux-common.c.
7566 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7567 arch/ppc-linux-tdesc.h.
7568 (ppc_linux_core_read_description): Remove target description
7569 matching code. Fill a ppc_linux_features struct and call
7570 ppc_linux_match_description with it.
7571 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7572 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7573 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7574 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7575 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7576 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7577 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7578 (tdesc_powerpc_e500l): Remove.
7579
7580 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7581
7582 * ada-lang.c (catch_assert_command): Pass empty string instead
7583 of NULL for excep_string argument.
7584
7585 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7586
7587 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7588 the width of the requested register exceeds the width of the
7589 `ptrace' data type.
7590
7591 2018-05-21 Tom Tromey <tom@tromey.com>
7592
7593 * printcmd.c (output_command): Remove.
7594 (output_command_const): Rename to output_command.
7595 * valprint.h (output_command): Rename from output_command_const.
7596 * tracepoint.c (trace_dump_actions): Call output_command.
7597
7598 2018-05-21 Tom Tromey <tom@tromey.com>
7599
7600 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7601 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7602 * ada-lang.h (create_ada_exception_catchpoint): Update.
7603 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7604 std::string.
7605 (create_excep_cond_exprs, ~ada_catchpoint)
7606 (should_stop_exception, print_one_exception)
7607 (print_mention_exception, print_recreate_exception): Update.
7608 (ada_get_next_arg): Remove.
7609 (catch_ada_exception_command_split): Use std::string. Change type
7610 of "excep_string", "cond_string".
7611 (catch_ada_exception_command): Update.
7612 (create_ada_exception_catchpoint): Change type of excep_string.
7613 (ada_exception_sal): Remove excep_string parameter.
7614 (~ada_catchpoint): Remove.
7615
7616 2018-05-21 Tom Tromey <tom@tromey.com>
7617
7618 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7619 cleanup.
7620
7621 2018-05-21 Tom Tromey <tom@tromey.com>
7622
7623 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7624 Return unique_xmalloc_ptr.
7625 (print_it_exception): Update.
7626
7627 2018-05-21 Tom Tromey <tom@tromey.com>
7628
7629 * tracepoint.c (trace_dump_actions): Use std::string.
7630
7631 2018-05-21 Tom Tromey <tom@tromey.com>
7632
7633 * symfile.c (reread_symbols): Use std::string for original_name.
7634
7635 2018-05-21 Tom Tromey <tom@tromey.com>
7636
7637 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7638 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7639 constructor.
7640
7641 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7642
7643 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7644 instance to...
7645 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7646 * objfiles.c (get_objfile_bfd_data): Allocate
7647 objfile_per_bfd_storage with obstack_new when allocating on
7648 obstack.
7649
7650 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7651
7652 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7653 OBSTACK_ZALLOC.
7654 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7655 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7656 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7657 (add_pending): Likewise.
7658 (parse_symbol): Likewise.
7659 (parse_partial_symbols): Likewise.
7660 (psymtab_to_symtab_1): Likewise.
7661 (new_psymtab): Likewise.
7662 (elfmdebug_build_psymtabs): Likewise.
7663 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7664 * objfiles.c (get_objfile_bfd_data): Likewise.
7665 (objfile_register_static_link): Likewise.
7666 * psymtab.c (allocate_psymtab): Likewise.
7667 * stabsread.c (read_member_functions): Likewise.
7668 * xcoffread.c (xcoff_end_psymtab): Likewise.
7669
7670 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7671
7672 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7673 compiler supports std::is_trivially_constructible.
7674 * common/poison.h: Include obstack.h.
7675 (IsMallocable): Define to is_trivially_constructible if the
7676 compiler supports it, define to true_type otherwise.
7677 (xobnew): New.
7678 (XOBNEW): Redefine.
7679 (xobnewvec): New.
7680 (XOBNEWVEC): Redefine.
7681 * gdb_obstack.h (obstack_zalloc): New.
7682 (OBSTACK_ZALLOC): Redefine.
7683 (obstack_calloc): New.
7684 (OBSTACK_CALLOC): Redefine.
7685 (obstack_new): New.
7686 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7687 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7688 gdbarch.c.
7689 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7690 obstack_calloc/obstack_zalloc.
7691 (gdbarch_obstack_zalloc): Remove.
7692 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7693
7694 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7695
7696 * stack.c (backtrace_command_1): Remove useless variable int i.
7697
7698 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7699
7700 * stack.c (print_frame_info): Fix comment.
7701
7702 2018-05-18 Tom Tromey <tom@tromey.com>
7703
7704 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7705 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7706 (~dwarf2_per_objfile): Update
7707 (dwarf2_get_dwz_file): Use new.
7708 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7709 unique_ptr.
7710
7711 2018-05-18 Tom Tromey <tom@tromey.com>
7712
7713 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7714 unique_ptr.
7715 * dwarf2read.c (struct dwp_file): Add constructor and
7716 initializers.
7717 (open_and_init_dwp_file): Return a unique_ptr.
7718 (dwarf2_per_objfile, create_dwp_hash_table)
7719 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7720 (lookup_dwo_unit_in_dwp): Update.
7721 (open_and_init_dwp_file, get_dwp_file): Update.
7722
7723 2018-05-18 Tom Tromey <tom@tromey.com>
7724
7725 * dwarf2read.c (dwarf2_per_objfile): Update.
7726 (struct mapped_index): Add initializers.
7727 (dwarf2_read_index): Use new.
7728 (dw2_symtab_iter_init): Update.
7729 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7730 unique_ptr.
7731
7732 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7733
7734 * dwarf2read.c (mapped_index) <total_size>: Remove.
7735
7736 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7737
7738 * unittests/format_pieces-selftests.c (test_format_specifier):
7739 Add ARI comments.
7740
7741 2018-05-18 Tom Tromey <tom@tromey.com>
7742
7743 * c-typeprint.c (maybe_print_hole): New function.
7744 (c_print_type_struct_field_offset): Update.
7745 (c_type_print_base_struct_union): Call maybe_print_hole.
7746
7747 2018-05-17 Keith Seitz <keiths@redhat.com>
7748
7749 * breakpoint.c (build_bpstat_chain): New function, moved from
7750 bpstat_stop_status.
7751 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7752 If no stop chain is passed, call build_bpstat_chain to build it.
7753 * breakpoint.h (build_bpstat_chain): Declare.
7754 (bpstat_stop_status): Move documentation here from breakpoint.c.
7755 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7756 build the stop chain and pass it to skip_inline_frames.
7757 Pass this stop chain to bpstat_stop_status.
7758 * inline-frame.c: Include breakpoint.h.
7759 (stopped_by_user_bp_inline_frame): New function.
7760 (skip_inline_frames): Add parameter `stop_chain'.
7761 Move documention to inline-frame.h.
7762 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7763 whether the frame should be elided.
7764 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7765 Add moved documentation and update for new parameter.
7766
7767 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7768
7769 PR cli/14975
7770 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7771 unittests/format_pieces-selftests.c.
7772 * common/format.h (format_piece) <operator==>: New.
7773 (format_pieces) <operator[]>: Remove.
7774 * common/format.c (format_pieces::format_pieces): Handle \e.
7775 * unittests/format_pieces-selftests.c: New.
7776
7777 2018-05-17 Tom Tromey <tom@tromey.com>
7778
7779 PR symtab/23010:
7780 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7781 (dw2_instantiate_symtab): Add skip_partial parameter.
7782 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7783 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7784 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7785 (dw2_expand_symtabs_matching_one)
7786 (dw2_find_pc_sect_compunit_symtab)
7787 (dw2_debug_names_lookup_symbol)
7788 (dw2_debug_names_expand_symtabs_for_function): Update.
7789 (init_cutu_and_read_dies): Add skip_partial parameter.
7790 (process_psymtab_comp_unit, build_type_psymtabs_1)
7791 (process_skeletonless_type_unit, load_partial_comp_unit)
7792 (psymtab_to_symtab_1): Update.
7793 (load_full_comp_unit): Add skip_partial parameter.
7794 (process_imported_unit_die, dwarf2_read_addr_index)
7795 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7796 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7797 (read_signatured_type): Update.
7798
7799 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7800
7801 * value.c (release_value): Remove unused variable.
7802 (record_latest_value): Likewise.
7803 (access_value_history): Likewise.
7804 (preserve_values): Likewise.
7805
7806 2018-05-17 Tom Tromey <tom@tromey.com>
7807
7808 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7809 Initialize.
7810
7811 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7812
7813 PR gdb/22286
7814 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7815 Also handle registers whose width is not a multiple of
7816 PTRACE_TYPE_RET.
7817 (linux_nat_trad_target::store_register): Likewise.
7818
7819 2018-05-16 Tom Tromey <tom@tromey.com>
7820
7821 * gdbcore.h (core_bfd): Redefine.
7822 * corelow.c (core_target::close): Update.
7823 (core_target_open): Update.
7824 * progspace.h (struct program_space) <cbfd>: Now a
7825 gdb_bfd_ref_ptr.
7826
7827 2018-05-16 Tom Tromey <tom@tromey.com>
7828
7829 PR cli/19551:
7830 * symfile-add-flags.h (enum symfile_add_flags)
7831 <SYMFILE_NOT_FILENAME>: New constant.
7832 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7833 objfile name from BFD.
7834 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7835 * minidebug.c (find_separate_debug_file_in_section): Put
7836 ".gnu_debugdata" into BFD's file name.
7837
7838 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7839
7840 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7841 Remove.
7842
7843 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7844
7845 PR binutils/21446
7846 * aarch64-tdep.c (aarch64_analyze_prologue,
7847 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7848 Indicate not interested in errors.
7849
7850 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7851
7852 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7853 Supply the MIPS_ZERO_REGNUM register.
7854
7855 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7856
7857 * mips-tdep.c (mask_address_var): Make variable static.
7858
7859 2018-05-14 Tom Tromey <tom@tromey.com>
7860
7861 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7862
7863 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7864
7865 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7866 FXSAVE_ADDR for the mxcsr register.
7867
7868 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7869
7870 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7871
7872 2018-05-11 Pedro Alves <palves@redhat.com>
7873
7874 * corelow.c (core_target) <core_target>: No longer inline.
7875 Initialize m_core_gdbarch, m_core_vec and build the section table
7876 here.
7877 <~core_target>: New.
7878 <core_gdbarch, get_core_register_section>: New methods.
7879 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7880 factored out from ...
7881 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7882 (core_ops): Delete.
7883 (sniff_core_bfd): Add gdbarch parameter.
7884 (core_close): Delete, merged into ...
7885 (core_target::close): ... here. Delete self.
7886 (core_close_cleanup): Delete.
7887 (core_target_open): Allocate a core_target on the heap. Use a
7888 unique_ptr instead of a cleanup. Bits moved into the core_target
7889 ctor. Adjust to use core_target methods instead of globals.
7890 (get_core_register_section): Rename to ...
7891 (core_target::get_core_register_section): ... this and adjust.
7892 (struct get_core_registers_cb_data): New.
7893 (get_core_registers_cb): Use it. Use bool.
7894 (core_target::fetch_registers, core_target::files_info)
7895 (core_target::xfer_partial, core_target::read_description)
7896 (core_target::pid_to, core_target::thread_name): Adjust to
7897 reference class fields instead of globals.
7898 * target.h (struct target_ops_deleter, target_ops_up): New.
7899
7900 2018-05-11 Pedro Alves <palves@redhat.com>
7901
7902 * corefile.c (core_file_command): Move to corelow.c.
7903 * corelow.c (the_core_target): Delete.
7904 (core_file_command): Moved from corefile.c. Check exec_bfd
7905 instead of the_core_target. Use target_detach instead of calling
7906 into the_core_target directly.
7907 (maybe_say_no_core_file_now): New.
7908 (core_target::detach): Use it.
7909 (_initialize_corelow): Remove references to the_core_target.
7910 * gdbcore.h (the_core_target): Delete.
7911
7912 2018-05-11 Tom Tromey <tromey@redhat.com>
7913 Pedro Alves <palves@redhat.com>
7914
7915 * corefile.c (core_bfd): Remove.
7916 * gdbcore.h (core_bfd): Now a macro.
7917 * progspace.h (struct program_space) <cbfd>: New field.
7918
7919 2018-05-11 Tom Tromey <tom@tromey.com>
7920
7921 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7922 gdb::def_vector.
7923
7924 2018-05-10 Tom Tromey <tom@tromey.com>
7925
7926 * configure: Rebuild.
7927 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7928
7929 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7930
7931 PR server/23158:
7932 * regformats/regdat.sh: Adjust script, following the addition
7933 of the new expedite_regs parameter to init_target_desc.
7934
7935 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7936
7937 PR gdb/23127
7938 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7939 set_gdbarch_significant_addr_bit.
7940 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7941 set_gdbarch_significant_addr_bit.
7942 * utils.c (address_significant): Update to sign extend addr.
7943
7944 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7945
7946 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7947 (xtensa_linux_init_abi): Limit tdep->num_regs by
7948 tdep->num_nopriv_regs.
7949 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7950 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7951 not initialized.
7952
7953 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7954
7955 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7956
7957 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7958
7959 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7960 (I387_MXCSR_INIT_VAL): New constant.
7961 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7962 buffer if it was supplied by the inferior.
7963 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7964 (i387_xsave_get_clear_bv): New function.
7965 (i387_supply_xsave): Only read x87 control registers from the
7966 xsave buffer if the feature is enabled, and the state will have
7967 been written, otherwise, provide a suitable default.
7968 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7969 including x87 control registers. Update control registers if they
7970 have changed from the default value, and mark features as enabled
7971 as required.
7972 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7973
7974 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7975
7976 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7977
7978 2018-05-07 Tom Tromey <tom@tromey.com>
7979
7980 * configure: Rebuild.
7981 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7982
7983 2018-05-07 Tom Tromey <tom@tromey.com>
7984
7985 PR tdep/20362:
7986 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7987 bit. Use correct value for VDIV.
7988
7989 2018-05-04 Tom Tromey <tom@tromey.com>
7990
7991 * configure: Rebuild.
7992 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7993
7994 2018-05-04 Tom Tromey <tom@tromey.com>
7995
7996 * linux-record.c (record_linux_system_call) <case
7997 RECORD_SYS_RECVFROM>: Add "break".
7998
7999 2018-05-04 Tom Tromey <tom@tromey.com>
8000
8001 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8002 Add missing "break".
8003 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8004 Add missing "break".
8005
8006 2018-05-04 Tom Tromey <tom@tromey.com>
8007
8008 * rs6000-tdep.c (ppc_process_record_op4)
8009 (ppc_process_record_op63): Add fall-through comment.
8010
8011 2018-05-04 Tom Tromey <tom@tromey.com>
8012
8013 * i386-tdep.c (i386_process_record): Add fall-through comment.
8014
8015 2018-05-04 Tom Tromey <tom@tromey.com>
8016
8017 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8018 comment.
8019
8020 2018-05-04 Tom Tromey <tom@tromey.com>
8021
8022 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8023 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8024 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8025 comment.
8026 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8027 comment.
8028 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8029 comment.
8030
8031 2018-05-04 Tom Tromey <tom@tromey.com>
8032
8033 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8034
8035 2018-05-04 Tom Tromey <tom@tromey.com>
8036
8037 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8038 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8039 * symfile.c (section_is_mapped): Fix fall-through comment.
8040 * stabsread.c (define_symbol, read_member_functions): Fix
8041 fall-through comment.
8042 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8043 comment.
8044 * remote.c (remote_wait_as): Fix fall-through comment.
8045 * p-exp.y (yylex): Fix fall-through comment.
8046 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8047 comment.
8048 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8049 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8050 * jv-exp.y (yylex): Fix fall-through comment.
8051 * go-exp.y (lex_one_token): Fix fall-through comment.
8052 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8053 fall-through comment.
8054 * f-exp.y (yylex): Fix fall-through comment.
8055 * dwarf2read.c (process_die): Fix fall-through comments.
8056 * dbxread.c (process_one_symbol): Fix fall-through comment.
8057 * d-exp.y (lex_one_token): Fix fall-through comment.
8058 * cp-name-parser.y (yylex): Fix fall-through comment.
8059 * coffread.c (coff_symtab_read): Fix fall-through comment.
8060 * c-exp.y (lex_one_token): Fix fall-through comment.
8061 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8062 comment.
8063 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8064 comment.
8065
8066 2018-05-04 Tom Tromey <tom@tromey.com>
8067
8068 PR python/22730:
8069 * NEWS: Mention gdb.execute change.
8070 * gdbcmd.h (execute_control_command): Don't declare.
8071 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8072 execute_control_commands, execute_control_commands_to_string.
8073 * cli/cli-script.h (execute_control_commands)
8074 (execute_control_commands_to_string): Declare.
8075 (execute_control_command): Add from_tty parameter.
8076 * cli/cli-script.c (execute_control_commands)
8077 (execute_control_commands_to_string): New functions.
8078 (execute_user_command): Use execute_control_commands.
8079 (execute_control_command_1): Add "from_tty" parameter. Update.
8080 (execute_control_command): Likewise.
8081
8082 2018-05-04 Tom Tromey <tom@tromey.com>
8083
8084 PR python/22731:
8085 * NEWS: Mention that breakpoint commands are writable.
8086 * python/py-breakpoint.c (bppy_set_commands): New function.
8087 (breakpoint_object_getset) <"commands">: Use it.
8088
8089 2018-05-04 Tom Tromey <tom@tromey.com>
8090
8091 * tracepoint.c (actions_command): Update.
8092 * mi/mi-cmd-break.c (mi_command_line_array)
8093 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8094 (mi_read_next_line): Remove.
8095 (mi_cmd_break_commands): Update.
8096 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8097 function_view.
8098 * cli/cli-script.c (get_command_line): Update.
8099 (process_next_line): Use function_view. Constify.
8100 (recurse_read_control_structure, read_command_lines)
8101 (read_command_lines_1): Change argument types to function_view.
8102 (do_define_command, document_command): Update.
8103 * breakpoint.h (check_tracepoint_command): Don't declare.
8104 * breakpoint.c (check_tracepoint_command): Remove.
8105 (commands_command_1, create_tracepoint_from_upload): Update.
8106
8107 2018-05-04 Tom Tromey <tom@tromey.com>
8108
8109 PR gdb/11750:
8110 * cli/cli-script.h (enum command_control_type) <define_control>:
8111 New constant.
8112 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8113 (build_command_line, execute_control_command_1)
8114 (process_next_line): Likewise.
8115 (do_define_command): New function, extracted from define_command.
8116 (define_command): Use it.
8117
8118 2018-05-04 Tom Tromey <tom@tromey.com>
8119
8120 * tracepoint.c (actions_command): Update.
8121 * cli/cli-script.h (read_command_lines): Update.
8122 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8123 (MAX_TMPBUF): Remove define.
8124 (define_command): Use string_printf.
8125 (document_command): Likewise.
8126 * breakpoint.c (commands_command_1): Update.
8127
8128 2018-05-04 Tom Tromey <tom@tromey.com>
8129
8130 * top.c (execute_command): Update.
8131 * cli/cli-script.h (print_command_lines): Now varargs.
8132 * cli/cli-script.c (print_command_lines): Now varargs.
8133 (execute_control_command_1) <case while_control, case if_control>:
8134 Update.
8135
8136 2018-05-04 Tom Tromey <tom@tromey.com>
8137
8138 * tracepoint.c (all_tracepoint_actions): Rename from
8139 all_tracepoint_actions_and_cleanup. Change return type.
8140 (actions_command, encode_actions_1, encode_actions)
8141 (trace_dump_actions, tdump_command): Update.
8142 * remote.c (remote_download_command_source): Update.
8143 * python/python.c (gdbpy_eval_from_control_command)
8144 (python_command, python_interactive_command): Update.
8145 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8146 * guile/guile.c (guile_command)
8147 (gdbscm_eval_from_control_command, guile_command): Update.
8148 * compile/compile.c (compile_code_command)
8149 (compile_print_command, compile_to_object): Update.
8150 * cli/cli-script.h (struct command_lines_deleter): New.
8151 (counted_command_line): New typedef.
8152 (struct command_line): Add constructor, destructor.
8153 <body_list>: Remove.
8154 <body_list_0, body_list_1>: New members.
8155 (command_line_up): Remove typedef.
8156 (read_command_lines, read_command_lines_1, get_command_line):
8157 Update.
8158 (copy_command_lines): Don't declare.
8159 * cli/cli-script.c (build_command_line): Use "new".
8160 (get_command_line): Return counted_command_line.
8161 (print_command_lines, execute_user_command)
8162 (execute_control_command_1, while_command, if_command): Update.
8163 (realloc_body_list): Remove.
8164 (process_next_line, recurse_read_control_structure): Update.
8165 (read_command_lines, read_command_lines_1): Return counted_command_line.
8166 (free_command_lines): Use "delete".
8167 (copy_command_lines): Remove.
8168 (define_command, document_command, show_user_1): Update.
8169 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8170 a counted_command_line.
8171 * breakpoint.h (counted_command_line): Remove typedef.
8172 (breakpoint_set_commands): Update.
8173 * breakpoint.c (check_no_tracepoint_commands)
8174 (validate_commands_for_breakpoint): Update.
8175 (breakpoint_set_commands): Change commands to be a
8176 counted_command_line.
8177 (commands_command_1, update_dprintf_command_list)
8178 (create_tracepoint_from_upload): Update.
8179
8180 2018-05-04 Tom Tromey <tom@tromey.com>
8181
8182 * cli/cli-decode.h (cmd_list_element): New constructor.
8183 (~cmd_list_element): New destructor.
8184 (struct cmd_list_element): Add initializers.
8185 * cli/cli-decode.c (do_add_cmd): Use "new".
8186 (delete_cmd): Use "delete".
8187
8188 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8189 Pedro Alves <palves@redhat.com>
8190
8191 PR breakpoints/19806 and support for PR external/20207.
8192 * NEWS: Mention Aarch64 watchpoint improvements.
8193 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8194 watchpoints and PR external/20207 watchpoints.
8195 * nat/aarch64-linux-hw-point.c
8196 (kernel_supports_any_contiguous_range): New.
8197 (aarch64_watchpoint_offset): New.
8198 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8199 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8200 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8201 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8202 next_addr_orig_p. Support PR external/20207 watchpoints.
8203 (aarch64_downgrade_regs): New.
8204 (aarch64_dr_state_insert_one_point): New parameters offset and
8205 addr_orig.
8206 (aarch64_dr_state_remove_one_point): Likewise.
8207 (aarch64_handle_breakpoint): Update caller.
8208 (aarch64_handle_aligned_watchpoint): Likewise.
8209 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8210 aligned_offset.
8211 (aarch64_linux_set_debug_regs): Remove const from state. Call
8212 aarch64_downgrade_regs.
8213 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8214 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8215 (DR_CONTROL_MASK): ... this.
8216 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8217 (unsigned int aarch64_watchpoint_offset): New prototype.
8218 (aarch64_linux_set_debug_regs): Remove const from state.
8219 * utils.c (align_up, align_down): Move to ...
8220 * common/common-utils.c (align_up, align_down): ... here.
8221 * utils.h (align_up, align_down): Move to ...
8222 * common/common-utils.h (align_up, align_down): ... here.
8223
8224 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8225
8226 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8227 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8228 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8229 Re-implement to match the ABI as summarized in GCC's
8230 gcc/config/sparc/sparc.c. All callers updated.
8231 (sparc32_store_arguments): Remove assertion.
8232
8233 2018-05-04 Tom Tromey <tom@tromey.com>
8234
8235 * printcmd.c: Don't include tui.h.
8236 (decode_format): Use skip_spaces.
8237
8238 2018-05-04 Tom Tromey <tom@tromey.com>
8239
8240 PR gdb/22619:
8241 * printcmd.c (last_count): New global.
8242 (x_command): Use saved count when repeating.
8243
8244 2018-05-04 Tom Tromey <tom@tromey.com>
8245
8246 * nto-procfs.c (do_closedir_cleanup): Remove.
8247 (procfs_pidlist): Use gdb_dir_up.
8248 * procfs.c (do_closedir_cleanup): Remove.
8249 (proc_update_threads): Use gdb_dir_up.
8250 * common/filestuff.h (struct gdb_dir_deleter): New.
8251 (gdb_dir_up): New typedef.
8252
8253 2018-05-04 Tom Tromey <tom@tromey.com>
8254
8255 * ada-lang.c (print_mention_exception): Use std::string.
8256
8257 2018-05-04 Tom Tromey <tom@tromey.com>
8258
8259 * ada-lang.c (create_excep_cond_exprs): Update.
8260 (ada_exception_catchpoint_cond_string): Use std::string.
8261
8262 2018-05-04 Tom Tromey <tom@tromey.com>
8263
8264 * ada-lang.c (xget_renaming_scope): Return std::string.
8265 (old_renaming_is_invisible): Update.
8266
8267 2018-05-04 Tom Tromey <tom@tromey.com>
8268
8269 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8270 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8271
8272 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8273
8274 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8275
8276 2018-05-04 Tom Tromey <tom@tromey.com>
8277
8278 * remote.c (remote_query_supported_append): Change type.
8279 (remote_check_symbols): Update.
8280
8281 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8282
8283 PR gdb/11420
8284 * configure.ac: Prepend libpython.
8285 * python/python-config.py: Likewise.
8286 * configure: Regenerate.
8287
8288 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8289
8290 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8291
8292 2018-05-03 Pedro Alves <palves@redhat.com>
8293
8294 * s390-linux-nat.c
8295 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8296 override. Write 'true' instead of '1'.
8297 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8298 declaration.
8299
8300 2018-05-02 Pedro Alves <palves@redhat.com>
8301
8302 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8303 add_inf_child_target.
8304 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8305 add_inf_child_target.
8306 * aix-thread.c (aix_thread_target_info): New.
8307 (aix_thread_target) <shortname, longname, doc>: Delete.
8308 <info>: New.
8309 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8310 add_inf_child_target.
8311 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8312 add_inf_child_target.
8313 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8314 add_inf_child_target.
8315 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8316 add_inf_child_target.
8317 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8318 add_inf_child_target.
8319 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8320 add_inf_child_target.
8321 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8322 add_inf_child_target.
8323 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8324 add_inf_child_target.
8325 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8326 add_inf_child_target.
8327 * bfd-target.c (target_bfd_target_info): New.
8328 (target_bfd) <shortname, longname, doc>: Delete.
8329 <info>: New.
8330 * bsd-kvm.c (bsd_kvm_target_info): New.
8331 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8332 <info>: New.
8333 (bsd_kvm_target::open): Rename to ...
8334 (bsd_kvm_target_open): ... this. Adjust.
8335 * bsd-uthread.c (bsd_uthread_target_info): New.
8336 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8337 <info>: New.
8338 * corefile.c (core_file_command): Adjust.
8339 * corelow.c (core_target_info): New.
8340 (core_target) <shortname, longname, doc>: Delete.
8341 <info>: New.
8342 (core_target::open): Rename to ...
8343 (core_target_open): ... this. Adjust.
8344 * ctf.c (ctf_target_info): New.
8345 (ctf_target) <shortname, longname, doc>: Delete.
8346 <info>: New.
8347 (ctf_target::open): Rename to ...
8348 (ctf_target_open): ... this.
8349 (_initialize_ctf): Adjust.
8350 * exec.c (exec_target_info): New.
8351 (exec_target) <shortname, longname, doc>: Delete.
8352 <info>: New.
8353 (exec_target::open): Rename to ...
8354 (exec_target_open): ... this.
8355 * gdbcore.h (core_target_open): Declare.
8356 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8357 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8358 add_inf_child_target.
8359 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8360 add_inf_child_target.
8361 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8362 add_inf_child_target.
8363 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8364 add_inf_child_target.
8365 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8366 add_inf_child_target.
8367 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8368 add_inf_child_target.
8369 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8370 add_inf_child_target.
8371 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8372 add_inf_child_target.
8373 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8374 add_inf_child_target.
8375 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8376 add_inf_child_target.
8377 * inf-child.c (inf_child_target_info): New.
8378 (inf_child_target::info): New.
8379 (inf_child_open_target): Remove 'target' parameter. Use
8380 get_native_target instead.
8381 (inf_child_target::open): Delete.
8382 (add_inf_child_target): New.
8383 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8384 Delete.
8385 <info>: New.
8386 (add_inf_child_target): Declare.
8387 (inf_child_open_target): Declare.
8388 * linux-thread-db.c (thread_db_target_info): New.
8389 (thread_db_target) <shortname, longname, doc>: Delete.
8390 <info>: New.
8391 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8392 add_inf_child_target.
8393 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8394 add_inf_child_target.
8395 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8396 add_inf_child_target.
8397 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8398 add_inf_child_target.
8399 * make-target-delegates (print_class): Adjust.
8400 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8401 add_inf_child_target.
8402 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8403 add_inf_child_target.
8404 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8405 add_inf_child_target.
8406 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8407 add_inf_child_target.
8408 * nto-procfs.c (nto_native_target_info): New.
8409 (nto_procfs_target_native) <shortname, longname, doc>:
8410 Delete.
8411 <info>: New.
8412 (nto_procfs_target_info): New.
8413 (nto_procfs_target_procfs) <shortname, longname, doc>:
8414 Delete.
8415 <info>: New.
8416 (init_procfs_targets): Adjust.
8417 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8418 add_inf_child_target.
8419 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8420 add_inf_child_target.
8421 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8422 add_inf_child_target.
8423 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8424 add_inf_child_target.
8425 * ravenscar-thread.c (ravenscar_target_info): New.
8426 (ravenscar_thread_target) <shortname, longname, doc>:
8427 Delete.
8428 <info>: New.
8429 * record-btrace.c (record_btrace_target_info):
8430 (record_btrace_target) <shortname, longname, doc>: Delete.
8431 <info>: New.
8432 (record_btrace_target::open): Rename to ...
8433 (record_btrace_target_open): ... this. Adjust.
8434 * record-full.c (record_longname, record_doc): New.
8435 (record_full_base_target) <shortname, longname, doc>: Delete.
8436 <info>: New.
8437 (record_full_target_info): New.
8438 (record_full_target): <shortname>: Delete.
8439 <info>: New.
8440 (record_full_core_open_1, record_full_open_1): Update comments.
8441 (record_full_base_target::open): Rename to ...
8442 (record_full_open): ... this.
8443 (cmd_record_full_restore): Update.
8444 (_initialize_record_full): Update.
8445 * remote-sim.c (remote_sim_target_info): New.
8446 (gdbsim_target) <shortname, longname, doc>: Delete.
8447 <info>: New.
8448 (gdbsim_target::open): Rename to ...
8449 (gdbsim_target_open): ... this.
8450 (_initialize_remote_sim): Adjust.
8451 * remote.c (remote_doc): New.
8452 (remote_target_info): New.
8453 (remote_target) <shortname, longname, doc>: Delete.
8454 <info>: New.
8455 (extended_remote_target_info): New.
8456 (extended_remote_target) <shortname, longname, doc>: Delete.
8457 <info>: New.
8458 (remote_target::open_1): Make static. Adjust.
8459 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8460 * s390-linux-nat.c (_initialize_s390_nat): Use
8461 add_inf_child_target.
8462 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8463 add_inf_child_target.
8464 * sol-thread.c (thread_db_target_info): New.
8465 (sol_thread_target) <shortname, longname, doc>: Delete.
8466 <info>: New.
8467 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8468 add_inf_child_target.
8469 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8470 add_inf_child_target.
8471 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8472 add_inf_child_target.
8473 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8474 add_inf_child_target.
8475 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8476 add_inf_child_target.
8477 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8478 add_inf_child_target.
8479 * spu-linux-nat.c (_initialize_spu_nat): Use
8480 add_inf_child_target.
8481 * spu-multiarch.c (spu_multiarch_target_info): New.
8482 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8483 <info>: New.
8484 * target-delegates.c: Regenerate.
8485 * target.c: Include <unordered_map>.
8486 (target_ops_p): Delete.
8487 (DEF_VEC_P(target_ops_p)): Delete.
8488 (target_factories): New.
8489 (test_target_info): New.
8490 (test_target_ops::info): New.
8491 (open_target): Adjust to use target_factories.
8492 (add_target_with_completer): Rename to ...
8493 (add_target): ... this. Change prototype. Register target_info
8494 and open callback in target_factories. Register target_info in
8495 command context instead of target_ops.
8496 (add_target): Delete old implementation.
8497 (add_deprecated_target_alias): Change prototype. Adjust.
8498 (the_native_target): New.
8499 (set_native_target, get_native_target): New.
8500 (find_default_run_target): Use the_native_target.
8501 (find_attach_target, find_run_target): Simplify.
8502 (target_ops::open): Delete.
8503 (dummy_target_info): New.
8504 (dummy_target::shortname, dummy_target::longname)
8505 (dummy_target::doc): Delete.
8506 (dummy_target::info): New.
8507 (debug_target::shortname, debug_target::longname)
8508 (debug_target::doc): Delete.
8509 (debug_target::info): New.
8510 * target.h (struct target_info): New.
8511 (target_ops::~target_ops): Add comment.
8512 (target_ops::info): New.
8513 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8514 longer virtual. Implement in terms of target_info.
8515 (set_native_target, get_native_target): Declare.
8516 (target_open_ftype): New.
8517 (add_target, add_target_with_completer)
8518 (add_deprecated_target_alias): Change prototype.
8519 (test_target) <shortname, longname, doc>: Delete.
8520 <info>: New.
8521 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8522 add_inf_child_target.
8523 * tracefile-tfile.c (tfile_target_info): New.
8524 (tfile_target) <shortname, longname, doc>: Delete.
8525 <info>: New.
8526 (tfile_target::open): Rename to ...
8527 (tfile_target_open): ... this.
8528 (_initialize_tracefile_tfile): Adjust.
8529 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8530 add_inf_child_target.
8531 * windows-nat.c (_initialize_windows_nat): Use
8532 add_inf_child_target.
8533 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8534 add_inf_child_target.
8535
8536 2018-05-02 Pedro Alves <palves@redhat.com>
8537
8538 * linux-nat.h (linux_nat_target) <low_new_thread,
8539 low_delete_thread, low_new_fork, low_forget_process,
8540 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8541 New virtual methods.
8542 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8543 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8544 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8545 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8546 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8547 Delete.
8548 * linux-fork.c (delete_fork): Adjust to call low method.
8549 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8550 (linux_nat_new_fork, linux_nat_forget_process_hook)
8551 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8552 (linux_nat_status_is_event):
8553 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8554 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8555 to call low method.
8556 (sigtrap_is_event): Rename to ...
8557 (linux_nat_target::low_status_is_event): ... this.
8558 (linux_nat_set_status_is_event): Delete.
8559 (save_stop_reason, linux_nat_wait_1)
8560 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8561 low methods.
8562 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8563 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8564 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8565 (linux_nat_set_prepare_to_resume): Delete.
8566 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8567 low virtual methods.
8568 * amd64-linux-nat.c: Likewise.
8569 * arm-linux-nat.c: Likewise.
8570 * i386-linux-nat.c: Likewise.
8571 * ia64-linux-nat.c: Likewise.
8572 * mips-linux-nat.c: Likewise.
8573 * ppc-linux-nat.c: Likewise.
8574 * s390-linux-nat.c: Likewise.
8575 * sparc64-linux-nat.c: Likewise.
8576 * x86-linux-nat.c: Likewise.
8577 * x86-linux-nat.h: Include "nat/x86-linux.h".
8578 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8579 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8580 Override methods.
8581
8582 2018-05-02 Pedro Alves <palves@redhat.com>
8583
8584 * target.h (target_ops)
8585 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8586 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8587 stopped_by_watchpoint, have_continuable_watchpoint,
8588 stopped_data_address, watchpoint_addr_within_range,
8589 can_accel_watchpoint_condition, can_run, thread_alive,
8590 has_all_memory, has_memory, has_stack, has_registers,
8591 has_execution, can_async_p, is_async_p, supports_non_stop,
8592 always_non_stop_p, can_execute_reverse, supports_multi_process,
8593 supports_enable_disable_tracepoint,
8594 supports_disable_randomization, supports_string_tracing,
8595 supports_evaluation_of_breakpoint_conditions,
8596 can_run_breakpoint_commands, filesystem_is_local,
8597 can_download_tracepoint, get_trace_state_variable_value,
8598 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8599 record_is_replaying, record_will_replay,
8600 augmented_libraries_svr4_read>: Adjust to return bool.
8601 * aarch64-linux-nat.c: All implementations adjusted.
8602 * aix-thread.c: All implementations adjusted.
8603 * arm-linux-nat.c: All implementations adjusted.
8604 * breakpoint.c: All implementations adjusted.
8605 * bsd-kvm.c: All implementations adjusted.
8606 * bsd-uthread.c: All implementations adjusted.
8607 * corelow.c: All implementations adjusted.
8608 * ctf.c: All implementations adjusted.
8609 * darwin-nat.c: All implementations adjusted.
8610 * darwin-nat.h: All implementations adjusted.
8611 * exec.c: All implementations adjusted.
8612 * fbsd-nat.c: All implementations adjusted.
8613 * fbsd-nat.h: All implementations adjusted.
8614 * gnu-nat.c: All implementations adjusted.
8615 * gnu-nat.h: All implementations adjusted.
8616 * go32-nat.c: All implementations adjusted.
8617 * ia64-linux-nat.c: All implementations adjusted.
8618 * inf-child.c: All implementations adjusted.
8619 * inf-child.h: All implementations adjusted.
8620 * inf-ptrace.c: All implementations adjusted.
8621 * inf-ptrace.h: All implementations adjusted.
8622 * linux-nat.c: All implementations adjusted.
8623 * linux-nat.h: All implementations adjusted.
8624 * mips-linux-nat.c: All implementations adjusted.
8625 * nto-procfs.c: All implementations adjusted.
8626 * ppc-linux-nat.c: All implementations adjusted.
8627 * procfs.c: All implementations adjusted.
8628 * ravenscar-thread.c: All implementations adjusted.
8629 * record-btrace.c: All implementations adjusted.
8630 * record-full.c: All implementations adjusted.
8631 * remote-sim.c: All implementations adjusted.
8632 * remote.c: All implementations adjusted.
8633 * s390-linux-nat.c: All implementations adjusted.
8634 * sol-thread.c: All implementations adjusted.
8635 * spu-multiarch.c: All implementations adjusted.
8636 * target-delegates.c: All implementations adjusted.
8637 * target.c: All implementations adjusted.
8638 * target.h: All implementations adjusted.
8639 * tracefile-tfile.c: All implementations adjusted.
8640 * tracefile.c: All implementations adjusted.
8641 * tracefile.h: All implementations adjusted.
8642 * windows-nat.c: All implementations adjusted.
8643 * x86-linux-nat.h: All implementations adjusted.
8644 * x86-nat.h: All implementations adjusted.
8645
8646 2018-05-02 Pedro Alves <palves@redhat.com>
8647
8648 * make-target-delegates (scan_target_h): Don't trim lines here.
8649 Replace sequences of tabs and/or whitespace with a single
8650 whitespace.
8651 (top level, parsing methods): Trim each line before processing it
8652 here.
8653
8654 2018-05-02 Pedro Alves <palves@redhat.com>
8655 John Baldwin <jhb@freebsd.org>
8656
8657 * target.h (enum strata) <debug_stratum>: New.
8658 (struct target_ops) <all delegation methods>: Replace by C++
8659 virtual methods, and drop "to_" prefix. All references updated
8660 throughout.
8661 <to_shortname, to_longname, to_doc, to_data,
8662 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8663 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8664 virtual methods. All references updated throughout.
8665 <can_attach, supports_terminal_ours, can_create_inferior,
8666 get_thread_control_capabilities, attach_no_wait>: New
8667 virtual methods.
8668 <insert_breakpoint, remove_breakpoint>: Now
8669 TARGET_DEFAULT_NORETURN methods.
8670 <info_proc>: Now returns bool.
8671 <to_magic>: Delete.
8672 (OPS_MAGIC): Delete.
8673 (current_target): Delete. All references replaced by references
8674 to ...
8675 (target_stack): ... this. New.
8676 (target_shortname, target_longname): Adjust.
8677 (target_can_run): Now a function declaration.
8678 (default_child_has_all_memory, default_child_has_memory)
8679 (default_child_has_stack, default_child_has_registers)
8680 (default_child_has_execution): Remove target_ops parameter.
8681 (complete_target_initialization): Delete.
8682 (memory_breakpoint_target): New template class.
8683 (test_target_ops): Refactor as a C++ class with virtual methods.
8684 * make-target-delegates (NAME_PART): Tighten.
8685 (POINTER_PART, CP_SYMBOL): New.
8686 (SIMPLE_RETURN_PART): Reimplement.
8687 (VEC_RETURN_PART): Expect less.
8688 (RETURN_PART, VIRTUAL_PART): New.
8689 (METHOD): Adjust to C++ virtual methods.
8690 (scan_target_h): Remove reference to C99.
8691 (dname): Output "target_ops::" prefix.
8692 (write_function_header): Adjust to output a C++ class method.
8693 (write_declaration): New.
8694 (write_delegator): Adjust to output a C++ class method.
8695 (tdname): Output "dummy_target::" prefix.
8696 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8697 method.
8698 (tdefault_names, debug_names): Delete.
8699 (return_types, tdefaults, styles, argtypes_array): New.
8700 (top level): All methods are delegators.
8701 (print_class): New.
8702 (top level): Print dummy_target and debug_target classes.
8703 * target-delegates.c: Regenerate.
8704 * target-debug.h (target_debug_print_enum_info_proc_what)
8705 (target_debug_print_thread_control_capabilities)
8706 (target_debug_print_thread_info_p): New.
8707 * target.c (dummy_target): Delete.
8708 (the_dummy_target, the_debug_target): New.
8709 (target_stack): Now extern.
8710 (set_targetdebug): Push/unpush debug target.
8711 (default_child_has_all_memory, default_child_has_memory)
8712 (default_child_has_stack, default_child_has_registers)
8713 (default_child_has_execution): Remove target_ops parameter.
8714 (complete_target_initialization): Delete.
8715 (add_target_with_completer): No longer call
8716 complete_target_initialization.
8717 (target_supports_terminal_ours): Use regular delegation.
8718 (update_current_target): Delete.
8719 (push_target): No longer check magic number. Don't call
8720 update_current_target.
8721 (unpush_target): Don't call update_current_target.
8722 (target_is_pushed): No longer check magic number.
8723 (target_require_runnable): Skip for all stratums over
8724 process_stratum.
8725 (target_ops::info_proc): New.
8726 (target_info_proc): Use find_target_at and
8727 find_default_run_target.
8728 (target_supports_disable_randomization): Use regular delegation.
8729 (target_get_osdata): Use find_target_at.
8730 (target_ops::open, target_ops::close, target_ops::can_attach)
8731 (target_ops::attach, target_ops::can_create_inferior)
8732 (target_ops::create_inferior, target_ops::can_run)
8733 (target_can_run): New.
8734 (default_fileio_target): Use regular delegation.
8735 (target_ops::fileio_open, target_ops::fileio_pwrite)
8736 (target_ops::fileio_pread, target_ops::fileio_fstat)
8737 (target_ops::fileio_close, target_ops::fileio_unlink)
8738 (target_ops::fileio_readlink): New.
8739 (target_fileio_open_1, target_fileio_unlink)
8740 (target_fileio_readlink): Always call the target method. Handle
8741 FILEIO_ENOSYS.
8742 (return_zero, return_zero_has_execution): Delete.
8743 (init_dummy_target): Delete.
8744 (dummy_target::dummy_target, dummy_target::shortname)
8745 (dummy_target::longname, dummy_target::doc)
8746 (debug_target::debug_target, debug_target::shortname)
8747 (debug_target::longname, debug_target::doc): New.
8748 (target_supports_delete_record): Use regular delegation.
8749 (setup_target_debug): Delete.
8750 (maintenance_print_target_stack): Skip debug_stratum.
8751 (initialize_targets): Instantiate the_dummy_target and
8752 the_debug_target.
8753 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8754 use target_stack.
8755 (target_auxv_search, fprint_target_auxv): Adjust.
8756 (info_auxv_command): Adjust to use target_stack.
8757 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8758 * exceptions.c (print_flush): Handle a NULL target_stack.
8759 * regcache.c (target_ops_no_register): Refactor as class with
8760 virtual methods.
8761
8762 * exec.c (exec_target): New class.
8763 (exec_ops): Now an exec_target.
8764 (exec_open, exec_close_1, exec_get_section_table)
8765 (exec_xfer_partial, exec_files_info, exec_has_memory)
8766 (exec_make_note_section): Refactor as exec_target methods.
8767 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8768 Delete.
8769 (exec_target::find_memory_regions): New.
8770 (_initialize_exec): Don't call init_exec_ops.
8771 * gdbcore.h (exec_file_clear): Delete.
8772
8773 * corefile.c (core_target): Delete.
8774 (core_file_command): Adjust.
8775 * corelow.c (core_target): New class.
8776 (the_core_target): New.
8777 (core_close): Remove target_ops parameter.
8778 (core_close_cleanup): Adjust.
8779 (core_target::close): New.
8780 (core_open, core_detach, get_core_registers, core_files_info)
8781 (core_xfer_partial, core_thread_alive, core_read_description)
8782 (core_pid_to_str, core_thread_name, core_has_memory)
8783 (core_has_stack, core_has_registers, core_info_proc): Rework as
8784 core_target methods.
8785 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8786 (_initialize_corelow): Initialize the_core_target.
8787 * gdbcore.h (core_target): Delete.
8788 (the_core_target): New.
8789
8790 * ctf.c: (ctf_target): New class.
8791 (ctf_ops): Now a ctf_target.
8792 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8793 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8794 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8795 methods.
8796 (init_ctf_ops): Delete.
8797 (_initialize_ctf): Don't call it.
8798 * tracefile-tfile.c (tfile_target): New class.
8799 (tfile_ops): Now a tfile_target.
8800 (tfile_open, tfile_close, tfile_files_info)
8801 (tfile_get_tracepoint_status, tfile_trace_find)
8802 (tfile_fetch_registers, tfile_xfer_partial)
8803 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8804 Refactor as tfile_target methods.
8805 (tfile_xfer_partial_features): Remove target_ops parameter.
8806 (init_tfile_ops): Delete.
8807 (_initialize_tracefile_tfile): Don't call it.
8808 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8809 (tracefile_has_stack, tracefile_has_registers)
8810 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8811 tracefile_target methods.
8812 (init_tracefile_ops): Delete.
8813 (tracefile_target::tracefile_target): New.
8814 * tracefile.h: Include "target.h".
8815 (tracefile_target): New class.
8816 (init_tracefile_ops): Delete.
8817
8818 * spu-multiarch.c (spu_multiarch_target): New class.
8819 (spu_ops): Now a spu_multiarch_target.
8820 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8821 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8822 (spu_search_memory, spu_mourn_inferior): Refactor as
8823 spu_multiarch_target methods.
8824 (init_spu_ops): Delete.
8825 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8826 complete_target_initialization.
8827
8828 * ravenscar-thread.c (ravenscar_thread_target): New class.
8829 (ravenscar_ops): Now a ravenscar_thread_target.
8830 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8831 (ravenscar_thread_alive, ravenscar_pid_to_str)
8832 (ravenscar_fetch_registers, ravenscar_store_registers)
8833 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8834 (ravenscar_stopped_by_hw_breakpoint)
8835 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8836 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8837 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8838 methods.
8839 (init_ravenscar_thread_ops): Delete.
8840 (_initialize_ravenscar): Remove references to
8841 init_ravenscar_thread_ops and complete_target_initialization.
8842
8843 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8844 (bsd_uthread_target): New class.
8845 (bsd_uthread_ops): Now a bsd_uthread_target.
8846 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8847 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8848 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8849 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8850 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8851 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8852 (bsd_uthread_target): Delete function.
8853 (_initialize_bsd_uthread): Remove reference to
8854 complete_target_initialization.
8855
8856 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8857 (target_bfd): ... this new class.
8858 (target_bfd_xfer_partial, target_bfd_get_section_table)
8859 (target_bfd_close): Refactor as target_bfd methods.
8860 (target_bfd::~target_bfd): New.
8861 (target_bfd_reopen): Adjust.
8862 (target_bfd::close): New.
8863
8864 * record-btrace.c (record_btrace_target): New class.
8865 (record_btrace_ops): Now a record_btrace_target.
8866 (record_btrace_open, record_btrace_stop_recording)
8867 (record_btrace_disconnect, record_btrace_close)
8868 (record_btrace_async, record_btrace_info)
8869 (record_btrace_insn_history, record_btrace_insn_history_range)
8870 (record_btrace_insn_history_from, record_btrace_call_history)
8871 (record_btrace_call_history_range)
8872 (record_btrace_call_history_from, record_btrace_record_method)
8873 (record_btrace_is_replaying, record_btrace_will_replay)
8874 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8875 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8876 (record_btrace_store_registers, record_btrace_prepare_to_store)
8877 (record_btrace_to_get_unwinder)
8878 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8879 (record_btrace_commit_resume, record_btrace_wait)
8880 (record_btrace_stop, record_btrace_can_execute_reverse)
8881 (record_btrace_stopped_by_sw_breakpoint)
8882 (record_btrace_supports_stopped_by_sw_breakpoint)
8883 (record_btrace_stopped_by_hw_breakpoint)
8884 (record_btrace_supports_stopped_by_hw_breakpoint)
8885 (record_btrace_update_thread_list, record_btrace_thread_alive)
8886 (record_btrace_goto_begin, record_btrace_goto_end)
8887 (record_btrace_goto, record_btrace_stop_replaying_all)
8888 (record_btrace_execution_direction)
8889 (record_btrace_prepare_to_generate_core)
8890 (record_btrace_done_generating_core): Refactor as
8891 record_btrace_target methods.
8892 (init_record_btrace_ops): Delete.
8893 (_initialize_record_btrace): Remove reference to
8894 init_record_btrace_ops.
8895 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8896 the execution_direction global.
8897 (record_full_base_target, record_full_target)
8898 (record_full_core_target): New classes.
8899 (record_full_ops): Now a record_full_target.
8900 (record_full_core_ops): Now a record_full_core_target.
8901 (record_full_target::detach, record_full_target::disconnect)
8902 (record_full_core_target::disconnect)
8903 (record_full_target::mourn_inferior, record_full_target::kill):
8904 New.
8905 (record_full_open, record_full_close, record_full_async): Refactor
8906 as methods of the record_full_base_target class.
8907 (record_full_resume, record_full_commit_resume): Refactor
8908 as methods of the record_full_target class.
8909 (record_full_wait, record_full_stopped_by_watchpoint)
8910 (record_full_stopped_data_address)
8911 (record_full_stopped_by_sw_breakpoint)
8912 (record_full_supports_stopped_by_sw_breakpoint)
8913 (record_full_stopped_by_hw_breakpoint)
8914 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8915 methods of the record_full_base_target class.
8916 (record_full_store_registers, record_full_xfer_partial)
8917 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8918 Refactor as methods of the record_full_target class.
8919 (record_full_can_execute_reverse, record_full_get_bookmark)
8920 (record_full_goto_bookmark, record_full_execution_direction)
8921 (record_full_record_method, record_full_info, record_full_delete)
8922 (record_full_is_replaying, record_full_will_replay)
8923 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8924 (record_full_stop_replaying): Refactor as methods of the
8925 record_full_base_target class.
8926 (record_full_core_resume, record_full_core_kill)
8927 (record_full_core_fetch_registers)
8928 (record_full_core_prepare_to_store)
8929 (record_full_core_store_registers, record_full_core_xfer_partial)
8930 (record_full_core_insert_breakpoint)
8931 (record_full_core_remove_breakpoint)
8932 (record_full_core_has_execution): Refactor
8933 as methods of the record_full_core_target class.
8934 (record_full_base_target::supports_delete_record): New.
8935 (init_record_full_ops): Delete.
8936 (init_record_full_core_ops): Delete.
8937 (record_full_save): Refactor as method of the
8938 record_full_base_target class.
8939 (_initialize_record_full): Remove references to
8940 init_record_full_ops and init_record_full_core_ops.
8941
8942 * remote.c (remote_target, extended_remote_target): New classes.
8943 (remote_ops): Now a remote_target.
8944 (extended_remote_ops): Now an extended_remote_target.
8945 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8946 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8947 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8948 (remote_pass_signals, remote_set_syscall_catchpoint)
8949 (remote_program_signals, )
8950 (remote_thread_always_alive): Remove target_ops parameter.
8951 (remote_thread_alive, remote_thread_name)
8952 (remote_update_thread_list, remote_threads_extra_info)
8953 (remote_static_tracepoint_marker_at)
8954 (remote_static_tracepoint_markers_by_strid)
8955 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8956 (remote_open): Refactor as methods of remote_target.
8957 (extended_remote_open, extended_remote_detach)
8958 (extended_remote_attach, extended_remote_post_attach):
8959 (extended_remote_supports_disable_randomization)
8960 (extended_remote_create_inferior): : Refactor as method of
8961 extended_remote_target.
8962 (remote_set_permissions, remote_open_1, remote_detach)
8963 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8964 (remote_resume, remote_commit_resume, remote_stop)
8965 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8966 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8967 (remote_prepare_to_store, remote_store_registers)
8968 (remote_flash_erase, remote_flash_done, remote_files_info)
8969 (remote_kill, remote_mourn, remote_insert_breakpoint)
8970 (remote_remove_breakpoint, remote_insert_watchpoint)
8971 (remote_watchpoint_addr_within_range)
8972 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8973 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8974 (remote_supports_stopped_by_sw_breakpoint)
8975 (remote_stopped_by_hw_breakpoint)
8976 (remote_supports_stopped_by_hw_breakpoint)
8977 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8978 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8979 (remote_verify_memory): Refactor as methods of remote_target.
8980 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8981 parameter.
8982 (remote_xfer_partial, remote_get_memory_xfer_limit)
8983 (remote_search_memory, remote_rcmd, remote_memory_map)
8984 (remote_pid_to_str, remote_get_thread_local_address)
8985 (remote_get_tib_address, remote_read_description): Refactor as
8986 methods of remote_target.
8987 (remote_target::fileio_open, remote_target::fileio_pwrite)
8988 (remote_target::fileio_pread, remote_target::fileio_close): New.
8989 (remote_hostio_readlink, remote_hostio_fstat)
8990 (remote_filesystem_is_local, remote_can_execute_reverse)
8991 (remote_supports_non_stop, remote_supports_disable_randomization)
8992 (remote_supports_multi_process, remote_supports_cond_breakpoints)
8993 (remote_supports_enable_disable_tracepoint)
8994 (remote_supports_string_tracing)
8995 (remote_can_run_breakpoint_commands, remote_trace_init)
8996 (remote_download_tracepoint, remote_can_download_tracepoint)
8997 (remote_download_trace_state_variable, remote_enable_tracepoint)
8998 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8999 (remote_trace_start, remote_get_trace_status)
9000 (remote_get_tracepoint_status, remote_trace_stop)
9001 (remote_trace_find, remote_get_trace_state_variable_value)
9002 (remote_save_trace_data, remote_get_raw_trace_data)
9003 (remote_set_disconnected_tracing, remote_core_of_thread)
9004 (remote_set_circular_trace_buffer, remote_traceframe_info)
9005 (remote_get_min_fast_tracepoint_insn_len)
9006 (remote_set_trace_buffer_size, remote_set_trace_notes)
9007 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9008 (remote_disable_btrace, remote_teardown_btrace)
9009 (remote_read_btrace, remote_btrace_conf)
9010 (remote_augmented_libraries_svr4_read, remote_load)
9011 (remote_pid_to_exec_file, remote_can_do_single_step)
9012 (remote_execution_direction, remote_thread_handle_to_thread_info):
9013 Refactor as methods of remote_target.
9014 (init_remote_ops, init_extended_remote_ops): Delete.
9015 (remote_can_async_p, remote_is_async_p, remote_async)
9016 (remote_thread_events, remote_upload_tracepoints)
9017 (remote_upload_trace_state_variables): Refactor as methods of
9018 remote_target.
9019 (_initialize_remote): Remove references to init_remote_ops and
9020 init_extended_remote_ops.
9021
9022 * remote-sim.c (gdbsim_target): New class.
9023 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9024 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9025 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9026 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9027 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9028 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9029 Refactor as methods of gdbsim_target.
9030 (gdbsim_ops): Now a gdbsim_target.
9031 (init_gdbsim_ops): Delete.
9032 (gdbsim_cntrl_c): Adjust.
9033 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9034
9035 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9036 (the_amd64_linux_nat_target): New.
9037 (amd64_linux_fetch_inferior_registers)
9038 (amd64_linux_store_inferior_registers): Refactor as methods of
9039 amd64_linux_nat_target.
9040 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9041 * i386-linux-nat.c: Don't include "linux-nat.h".
9042 (i386_linux_nat_target): New class.
9043 (the_i386_linux_nat_target): New.
9044 (i386_linux_fetch_inferior_registers)
9045 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9046 as methods of i386_linux_nat_target.
9047 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9048 * inf-child.c (inf_child_ops): Delete.
9049 (inf_child_fetch_inferior_registers)
9050 (inf_child_store_inferior_registers): Delete.
9051 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9052 methods of inf_child_target.
9053 (inf_child_target::supports_terminal_ours)
9054 (inf_child_target::terminal_init)
9055 (inf_child_target::terminal_inferior)
9056 (inf_child_target::terminal_ours_for_output)
9057 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9058 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9059 New.
9060 (inf_child_open, inf_child_disconnect, inf_child_close)
9061 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9062 (inf_child_post_startup_inferior, inf_child_can_run)
9063 (inf_child_pid_to_exec_file): Refactor as methods of
9064 inf_child_target.
9065 (inf_child_follow_fork): Delete.
9066 (inf_child_target::can_create_inferior)
9067 (inf_child_target::can_attach): New.
9068 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9069 (inf_child_target::has_stack, inf_child_target::has_registers)
9070 (inf_child_target::has_execution): New.
9071 (inf_child_fileio_open, inf_child_fileio_pwrite)
9072 (inf_child_fileio_pread, inf_child_fileio_fstat)
9073 (inf_child_fileio_close, inf_child_fileio_unlink)
9074 (inf_child_fileio_readlink, inf_child_use_agent)
9075 (inf_child_can_use_agent): Refactor as methods of
9076 inf_child_target.
9077 (return_zero, inf_child_target): Delete.
9078 (inf_child_target::inf_child_target): New.
9079 * inf-child.h: Include "target.h".
9080 (inf_child_target): Delete function prototype.
9081 (inf_child_target): New class.
9082 (inf_child_open_target, inf_child_mourn_inferior)
9083 (inf_child_maybe_unpush_target): Delete.
9084 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9085 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9086 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9087 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9088 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9089 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9090 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9091 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9092 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9093 methods of inf_ptrace_target.
9094 (inf_ptrace_target): Delete function.
9095 * inf-ptrace.h: Include "inf-child.h".
9096 (inf_ptrace_target): Delete function declaration.
9097 (inf_ptrace_target): New class.
9098 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9099 * linux-nat.c (linux_target): New.
9100 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9101 (linux_nat_target::~linux_nat_target): New.
9102 (linux_child_post_attach, linux_child_post_startup_inferior)
9103 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9104 (linux_child_remove_fork_catchpoint)
9105 (linux_child_insert_vfork_catchpoint)
9106 (linux_child_remove_vfork_catchpoint)
9107 (linux_child_insert_exec_catchpoint)
9108 (linux_child_remove_exec_catchpoint)
9109 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9110 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9111 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9112 (linux_nat_stopped_data_address)
9113 (linux_nat_stopped_by_sw_breakpoint)
9114 (linux_nat_supports_stopped_by_sw_breakpoint)
9115 (linux_nat_stopped_by_hw_breakpoint)
9116 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9117 (linux_nat_kill, linux_nat_mourn_inferior)
9118 (linux_nat_xfer_partial, linux_nat_thread_alive)
9119 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9120 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9121 (linux_child_static_tracepoint_markers_by_strid)
9122 (linux_nat_is_async_p, linux_nat_can_async_p)
9123 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9124 (linux_nat_supports_multi_process)
9125 (linux_nat_supports_disable_randomization, linux_nat_async)
9126 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9127 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9128 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9129 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9130 methods of linux_nat_target.
9131 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9132 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9133 parameter.
9134 (check_stopped_by_watchpoint): Adjust.
9135 (linux_xfer_partial): Delete.
9136 (linux_target_install_ops, linux_target, linux_nat_add_target):
9137 Delete.
9138 (linux_nat_target::linux_nat_target): New.
9139 * linux-nat.h: Include "inf-ptrace.h".
9140 (linux_nat_target): New.
9141 (linux_target, linux_target_install_ops, linux_nat_add_target):
9142 Delete function declarations.
9143 (linux_target): Declare global.
9144 * linux-thread-db.c (thread_db_target): New.
9145 (thread_db_target::thread_db_target): New.
9146 (thread_db_ops): Delete.
9147 (the_thread_db_target): New.
9148 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9149 (thread_db_update_thread_list, thread_db_pid_to_str)
9150 (thread_db_extra_thread_info)
9151 (thread_db_thread_handle_to_thread_info)
9152 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9153 (thread_db_resume): Refactor as methods of thread_db_target.
9154 (init_thread_db_ops): Delete.
9155 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9156 * x86-linux-nat.c: Don't include "linux-nat.h".
9157 (super_post_startup_inferior): Delete.
9158 (x86_linux_nat_target::~x86_linux_nat_target): New.
9159 (x86_linux_child_post_startup_inferior)
9160 (x86_linux_read_description, x86_linux_enable_btrace)
9161 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9162 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9163 methods of x86_linux_nat_target.
9164 (x86_linux_create_target): Delete. Bits folded ...
9165 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9166 pointer.
9167 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9168 (x86_linux_nat_target): New class.
9169 (x86_linux_create_target): Delete.
9170 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9171 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9172 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9173 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9174 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9175 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9176 make extern.
9177 (x86_use_watchpoints): Delete.
9178 * x86-nat.h: Include "breakpoint.h" and "target.h".
9179 (x86_use_watchpoints): Delete.
9180 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9181 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9182 (x86_insert_watchpoint, x86_remove_watchpoint)
9183 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9184 (x86_stopped_by_hw_breakpoint): New declarations.
9185 (x86_nat_target): New template class.
9186
9187 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9188 (the_ppc_linux_nat_target): New.
9189 (ppc_linux_fetch_inferior_registers)
9190 (ppc_linux_can_use_hw_breakpoint)
9191 (ppc_linux_region_ok_for_hw_watchpoint)
9192 (ppc_linux_ranged_break_num_registers)
9193 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9194 (ppc_linux_insert_mask_watchpoint)
9195 (ppc_linux_remove_mask_watchpoint)
9196 (ppc_linux_can_accel_watchpoint_condition)
9197 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9198 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9199 (ppc_linux_watchpoint_addr_within_range)
9200 (ppc_linux_masked_watch_num_registers)
9201 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9202 (ppc_linux_read_description): Refactor as methods of
9203 ppc_linux_nat_target.
9204 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9205
9206 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9207 (procfs_target): New class.
9208 (the_procfs_target): New.
9209 (procfs_target): Delete function.
9210 (procfs_auxv_parse, procfs_attach, procfs_detach)
9211 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9212 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9213 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9214 (procfs_create_inferior, procfs_update_thread_list)
9215 (procfs_thread_alive, procfs_pid_to_str)
9216 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9217 (procfs_stopped_data_address, procfs_insert_watchpoint)
9218 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9219 (proc_find_memory_regions, procfs_info_proc)
9220 (procfs_make_note_section): Refactor as methods of procfs_target.
9221 (_initialize_procfs): Adjust.
9222 * sol-thread.c (sol_thread_target): New class.
9223 (sol_thread_ops): Now a sol_thread_target.
9224 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9225 (sol_thread_fetch_registers, sol_thread_store_registers)
9226 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9227 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9228 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9229 (init_sol_thread_ops): Delete.
9230 (_initialize_sol_thread): Adjust. Remove references to
9231 init_sol_thread_ops and complete_target_initialization.
9232
9233 * windows-nat.c (windows_nat_target): New class.
9234 (windows_fetch_inferior_registers)
9235 (windows_store_inferior_registers, windows_resume, windows_wait)
9236 (windows_attach, windows_detach, windows_pid_to_exec_file)
9237 (windows_files_info, windows_create_inferior)
9238 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9239 (windows_close, windows_pid_to_str, windows_xfer_partial)
9240 (windows_get_tib_address, windows_get_ada_task_ptid)
9241 (windows_thread_name, windows_thread_alive): Refactor as
9242 windows_nat_target methods.
9243 (do_initial_windows_stuff): Adjust.
9244 (windows_target): Delete function.
9245 (_initialize_windows_nat): Adjust.
9246
9247 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9248 (darwin_mourn_inferior, darwin_kill_inferior)
9249 (darwin_create_inferior, darwin_attach, darwin_detach)
9250 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9251 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9252 (darwin_supports_multi_process): Refactor as darwin_nat_target
9253 methods.
9254 (darwin_resume_to, darwin_files_info): Delete.
9255 (_initialize_darwin_inferior): Rename to ...
9256 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9257 * darwin-nat.h: Include "inf-child.h".
9258 (darwin_nat_target): New class.
9259 (darwin_complete_target): Delete.
9260 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9261 (darwin_target): New.
9262 (i386_darwin_fetch_inferior_registers)
9263 (i386_darwin_store_inferior_registers): Refactor as methods of
9264 darwin_nat_target.
9265 (darwin_complete_target): Delete, with ...
9266 (_initialize_i386_darwin_nat): ... bits factored out here.
9267
9268 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9269 (the_alpha_linux_nat_target): New.
9270 (alpha_linux_register_u_offset): Refactor as
9271 alpha_linux_nat_target method.
9272 (_initialize_alpha_linux_nat): Adjust.
9273 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9274 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9275 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9276 methods of linux_nat_trad_target.
9277 (linux_trad_target): Delete.
9278 * linux-nat-trad.h (linux_trad_target): Delete function.
9279 (linux_nat_trad_target): New class.
9280 * mips-linux-nat.c (mips_linux_nat_target): New class.
9281 (super_fetch_registers, super_store_registers, super_close):
9282 Delete.
9283 (the_mips_linux_nat_target): New.
9284 (mips64_linux_regsets_fetch_registers)
9285 (mips64_linux_regsets_store_registers)
9286 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9287 (mips_linux_register_u_offset, mips_linux_read_description)
9288 (mips_linux_can_use_hw_breakpoint)
9289 (mips_linux_stopped_by_watchpoint)
9290 (mips_linux_stopped_data_address)
9291 (mips_linux_region_ok_for_hw_watchpoint)
9292 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9293 (mips_linux_close): Refactor as methods of mips_linux_nat.
9294 (_initialize_mips_linux_nat): Adjust to C++ification.
9295
9296 * aix-thread.c (aix_thread_target): New class.
9297 (aix_thread_ops): Now an aix_thread_target.
9298 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9299 (aix_thread_fetch_registers, aix_thread_store_registers)
9300 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9301 (aix_thread_thread_alive, aix_thread_pid_to_str)
9302 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9303 Refactor as methods of aix_thread_target.
9304 (init_aix_thread_ops): Delete.
9305 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9306 and complete_target_initialization.
9307 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9308 (rs6000_nat_target): New class.
9309 (the_rs6000_nat_target): New.
9310 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9311 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9312 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9313 (super_create_inferior): Delete.
9314 (_initialize_rs6000_nat): Adjust to C++ification.
9315
9316 * arm-linux-nat.c (arm_linux_nat_target): New class.
9317 (the_arm_linux_nat_target): New.
9318 (arm_linux_fetch_inferior_registers)
9319 (arm_linux_store_inferior_registers, arm_linux_read_description)
9320 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9321 (arm_linux_remove_hw_breakpoint)
9322 (arm_linux_region_ok_for_hw_watchpoint)
9323 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9324 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9325 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9326 arm_linux_nat_target.
9327 (_initialize_arm_linux_nat): Adjust to C++ification.
9328
9329 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9330 (the_aarch64_linux_nat_target): New.
9331 (aarch64_linux_fetch_inferior_registers)
9332 (aarch64_linux_store_inferior_registers)
9333 (aarch64_linux_child_post_startup_inferior)
9334 (aarch64_linux_read_description)
9335 (aarch64_linux_can_use_hw_breakpoint)
9336 (aarch64_linux_insert_hw_breakpoint)
9337 (aarch64_linux_remove_hw_breakpoint)
9338 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9339 (aarch64_linux_region_ok_for_hw_watchpoint)
9340 (aarch64_linux_stopped_data_address)
9341 (aarch64_linux_stopped_by_watchpoint)
9342 (aarch64_linux_watchpoint_addr_within_range)
9343 (aarch64_linux_can_do_single_step): Refactor as methods of
9344 aarch64_linux_nat_target.
9345 (super_post_startup_inferior): Delete.
9346 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9347
9348 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9349 (the_hppa_linux_nat_target): New.
9350 (hppa_linux_fetch_inferior_registers)
9351 (hppa_linux_store_inferior_registers): Refactor as methods of
9352 hppa_linux_nat_target.
9353 (_initialize_hppa_linux_nat): Adjust to C++ification.
9354
9355 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9356 (the_ia64_linux_nat_target): New.
9357 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9358 (ia64_linux_stopped_data_address)
9359 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9360 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9361 ia64_linux_nat_target methods.
9362 (super_xfer_partial): Delete.
9363 (_initialize_ia64_linux_nat): Adjust to C++ification.
9364
9365 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9366 (the_m32r_linux_nat_target): New.
9367 (m32r_linux_fetch_inferior_registers)
9368 (m32r_linux_store_inferior_registers): Refactor as
9369 m32r_linux_nat_target methods.
9370 (_initialize_m32r_linux_nat): Adjust to C++ification.
9371
9372 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9373 (the_m68k_linux_nat_target): New.
9374 (m68k_linux_fetch_inferior_registers)
9375 (m68k_linux_store_inferior_registers): Refactor as
9376 m68k_linux_nat_target methods.
9377 (_initialize_m68k_linux_nat): Adjust to C++ification.
9378
9379 * s390-linux-nat.c (s390_linux_nat_target): New class.
9380 (the_s390_linux_nat_target): New.
9381 (s390_linux_fetch_inferior_registers)
9382 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9383 (s390_insert_watchpoint, s390_remove_watchpoint)
9384 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9385 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9386 (s390_auxv_parse, s390_read_description): Refactor as methods of
9387 s390_linux_nat_target.
9388 (_initialize_s390_nat): Adjust to C++ification.
9389
9390 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9391 (the_sparc_linux_nat_target): New.
9392 (_initialize_sparc_linux_nat): Adjust to C++ification.
9393 * sparc-nat.c (sparc_fetch_inferior_registers)
9394 (sparc_store_inferior_registers): Remove target_ops parameter.
9395 * sparc-nat.h (sparc_fetch_inferior_registers)
9396 (sparc_store_inferior_registers): Remove target_ops parameter.
9397 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9398 (the_sparc64_linux_nat_target): New.
9399 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9400
9401 * spu-linux-nat.c (spu_linux_nat_target): New class.
9402 (the_spu_linux_nat_target): New.
9403 (spu_child_post_startup_inferior, spu_child_post_attach)
9404 (spu_child_wait, spu_fetch_inferior_registers)
9405 (spu_store_inferior_registers, spu_xfer_partial)
9406 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9407 methods.
9408 (_initialize_spu_nat): Adjust to C++ification.
9409
9410 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9411 (the_tilegx_linux_nat_target): New.
9412 (fetch_inferior_registers, store_inferior_registers):
9413 Refactor as methods.
9414 (_initialize_tile_linux_nat): Adjust to C++ification.
9415
9416 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9417 (the_xtensa_linux_nat_target): New.
9418 (xtensa_linux_fetch_inferior_registers)
9419 (xtensa_linux_store_inferior_registers): Refactor as
9420 xtensa_linux_nat_target methods.
9421 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9422
9423 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9424 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9425 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9426 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9427 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9428 (fbsd_stopped_by_sw_breakpoint)
9429 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9430 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9431 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9432 (fbsd_post_startup_inferior, fbsd_post_attach)
9433 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9434 (fbsd_set_syscall_catchpoint)
9435 (super_xfer_partial, super_resume, super_wait)
9436 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9437 (fbsd_handle_debug_trap): Remove target_ops parameter.
9438 (fbsd_nat_add_target): Delete.
9439 * fbsd-nat.h: Include "inf-ptrace.h".
9440 (fbsd_nat_add_target): Delete.
9441 (USE_SIGTRAP_SIGINFO): Define.
9442 (fbsd_nat_target): New class.
9443
9444 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9445 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9446 (amd64bsd_target): Delete.
9447 * amd64-bsd-nat.h: New file.
9448 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9449 "x86-bsd-nat.h".
9450 (amd64_fbsd_nat_target): New class.
9451 (the_amd64_fbsd_nat_target): New.
9452 (amd64fbsd_read_description): Refactor as method of
9453 amd64_fbsd_nat_target.
9454 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9455 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9456 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9457 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9458 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9459 (i386bsd_target): Delete.
9460 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9461 (i386bsd_fetch_inferior_registers)
9462 (i386bsd_store_inferior_registers): Declare.
9463 (i386_bsd_nat_target): New class.
9464 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9465 (the_i386_fbsd_nat_target): New.
9466 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9467 i386_fbsd_nat_target methods.
9468 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9469 (_initialize_i386fbsd_nat): Adjust to C++ification.
9470 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9471 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9472 (_initialize_x86_bsd_nat): Adjust to C++ification.
9473 * x86-bsd-nat.h: Include "x86-nat.h".
9474 (x86bsd_target): Delete declaration.
9475 (x86bsd_nat_target): New class.
9476
9477 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9478 (the_aarch64_fbsd_nat_target): New.
9479 (aarch64_fbsd_fetch_inferior_registers)
9480 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9481 aarch64_fbsd_nat_target.
9482 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9483 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9484 (the_alpha_bsd_nat_target): New.
9485 (alphabsd_fetch_inferior_registers)
9486 (alphabsd_store_inferior_registers): Refactor as
9487 alpha_bsd_nat_target methods.
9488 (_initialize_alphabsd_nat): Refactor as methods of
9489 alpha_bsd_nat_target.
9490 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9491 (the_amd64_nbsd_nat_target): New.
9492 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9493 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9494 (the_amd64_obsd_nat_target): New.
9495 (_initialize_amd64obsd_nat): Adjust to C++ification.
9496 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9497 (the_arm_fbsd_nat_target): New.
9498 (arm_fbsd_fetch_inferior_registers)
9499 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9500 (_initialize_arm_fbsd_nat): Refactor as methods of
9501 arm_fbsd_nat_target.
9502 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9503 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9504 (the_arm_netbsd_nat_target): New.
9505 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9506 arm_netbsd_nat_target.
9507 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9508 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9509 (the_hppa_nbsd_nat_target): New.
9510 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9511 hppa_nbsd_nat_target methods.
9512 (_initialize_hppanbsd_nat): Adjust to C++ification.
9513 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9514 (the_hppa_obsd_nat_target): New.
9515 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9516 methods of hppa_obsd_nat_target.
9517 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9518 add_target.
9519 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9520 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9521 add_target.
9522 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9523 (_initialize_i386obsd_nat): Use add_target.
9524 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9525 (the_m68k_bsd_nat_target): New.
9526 (m68kbsd_fetch_inferior_registers)
9527 (m68kbsd_store_inferior_registers): Refactor as methods of
9528 m68k_bsd_nat_target.
9529 (_initialize_m68kbsd_nat): Adjust to C++ification.
9530 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9531 (the_mips_fbsd_nat_target): New.
9532 (mips_fbsd_fetch_inferior_registers)
9533 (mips_fbsd_store_inferior_registers): Refactor as methods of
9534 mips_fbsd_nat_target.
9535 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9536 add_target.
9537 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9538 (the_mips_nbsd_nat_target): New.
9539 (mipsnbsd_fetch_inferior_registers)
9540 (mipsnbsd_store_inferior_registers): Refactor as methods of
9541 mips_nbsd_nat_target.
9542 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9543 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9544 (the_mips64_obsd_nat_target): New.
9545 (mips64obsd_fetch_inferior_registers)
9546 (mips64obsd_store_inferior_registers): Refactor as methods of
9547 mips64_obsd_nat_target.
9548 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9549 add_target.
9550 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9551 nbsd_nat_target.
9552 * nbsd-nat.h: Include "inf-ptrace.h".
9553 (nbsd_nat_target): New class.
9554 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9555 (obsd_wait): Refactor as methods of obsd_nat_target.
9556 (obsd_add_target): Delete.
9557 * obsd-nat.h: Include "inf-ptrace.h".
9558 (obsd_nat_target): New class.
9559 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9560 (the_ppc_fbsd_nat_target): New.
9561 (ppcfbsd_fetch_inferior_registers)
9562 (ppcfbsd_store_inferior_registers): Refactor as methods of
9563 ppc_fbsd_nat_target.
9564 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9565 add_target.
9566 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9567 (the_ppc_nbsd_nat_target): New.
9568 (ppcnbsd_fetch_inferior_registers)
9569 (ppcnbsd_store_inferior_registers): Refactor as methods of
9570 ppc_nbsd_nat_target.
9571 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9572 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9573 (the_ppc_obsd_nat_target): New.
9574 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9575 methods of ppc_obsd_nat_target.
9576 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9577 add_target.
9578 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9579 (the_sh_nbsd_nat_target): New.
9580 (shnbsd_fetch_inferior_registers)
9581 (shnbsd_store_inferior_registers): Refactor as methods of
9582 sh_nbsd_nat_target.
9583 (_initialize_shnbsd_nat): Adjust to C++ification.
9584 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9585 (inf_ptrace_xfer_partial): Delete.
9586 (sparc_xfer_partial, sparc_target): Delete.
9587 * sparc-nat.h (sparc_fetch_inferior_registers)
9588 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9589 (sparc_target): Delete function declaration.
9590 (sparc_target): New template class.
9591 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9592 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9593 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9594 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9595 add_target.
9596 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9597 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9598 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9599 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9600 add_target.
9601 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9602 (the_vax_bsd_nat_target): New.
9603 (vaxbsd_fetch_inferior_registers)
9604 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9605 methods.
9606 (_initialize_vaxbsd_nat): Adjust to C++ification.
9607
9608 * bsd-kvm.c (bsd_kvm_target): New class.
9609 (bsd_kvm_ops): Now a bsd_kvm_target.
9610 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9611 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9612 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9613 bsd_kvm_target.
9614 (bsd_kvm_return_one): Delete.
9615 (bsd_kvm_add_target): Adjust to C++ification.
9616
9617 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9618 (nto_procfs_target_procfs): New classes.
9619 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9620 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9621 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9622 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9623 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9624 (procfs_remove_hw_breakpoint, procfs_resume)
9625 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9626 (procfs_kill_inferior, procfs_store_registers)
9627 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9628 as methods of nto_procfs_target.
9629 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9630 (nto_native_ops): Delete.
9631 (procfs_open, procfs_native_open): Delete.
9632 (nto_native_ops): Now an nto_procfs_target_native.
9633 (init_procfs_targets): Adjust to C++ification.
9634 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9635 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9636 Refactor as methods of nto_procfs_target.
9637
9638 * go32-nat.c (go32_nat_target): New class.
9639 (the_go32_nat_target): New.
9640 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9641 (go32_store_registers, go32_xfer_partial, go32_files_info)
9642 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9643 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9644 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9645 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9646 (go32_target): Delete.
9647 (_initialize_go32_nat): Adjust to C++ification.
9648
9649 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9650 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9651 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9652 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9653 gnu_nat_target.
9654 (gnu_target): Delete.
9655 * gnu-nat.h (gnu_target): Delete.
9656 (gnu_nat_target): New class.
9657 * i386-gnu-nat.c (gnu_base_target): New.
9658 (i386_gnu_nat_target): New class.
9659 (the_i386_gnu_nat_target): New.
9660 (_initialize_i386gnu_nat): Adjust to C++ification.
9661
9662 2018-05-02 Pedro Alves <palves@redhat.com>
9663
9664 * bfd-target.c (target_bfd_xclose): Rename to ...
9665 (target_bfd_close): ... this.
9666 (target_bfd_reopen): Adjust.
9667 * target.c (target_close): Remove references to to_xclose.
9668 * target.h (target_ops::to_xclose): Delete.
9669 (target_ops::to_close): Update comments.
9670
9671 2018-05-02 Pedro Alves <palves@redhat.com>
9672
9673 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9674 "linux-nat.h".
9675 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9676 * inf-ptrace.c (inf_ptrace_register_u_offset)
9677 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9678 (inf_ptrace_store_register, inf_ptrace_store_registers)
9679 (inf_ptrace_trad_target): Move to ...
9680 * linux-nat-trad.c: ... this new file.
9681 * linux-nat-trad.h: New file.
9682 * linux-nat.c (linux_target_install_ops): Make extern.
9683 (linux_trad_target): Delete.
9684 * linux-nat.h (linux_trad_target): Delete declaration.
9685 (linux_target_install_ops): Declare.
9686 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9687 "linux-nat.h".
9688
9689 2018-05-02 Pedro Alves <palves@redhat.com>
9690
9691 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9692 procfs_target/add_target here.
9693 * procfs.c (procfs_target): Make static.
9694 (_initialize_procfs): Call add_target here.
9695 * procfs.h (struct target_ops): Remove forward declaration.
9696 (procfs_target): Remove declaration.
9697 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9698
9699 2018-05-02 Pedro Alves <palves@redhat.com>
9700
9701 * procfs.c (procfs_stopped_by_watchpoint)
9702 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9703 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9704 Forward declare.
9705 (procfs_use_watchpoints): Delete, move contents...
9706 (procfs_target): ... here.
9707 * procfs.h (procfs_use_watchpoints): Delete declaration.
9708 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9709 procfs_use_watchpoints.
9710 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9711 procfs_use_watchpoints.
9712
9713 2018-05-02 Tom Tromey <tom@tromey.com>
9714
9715 PR python/20084:
9716 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9717 and var_zuinteger_unlimited.
9718 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9719 and PARAM_ZUINTEGER_UNLIMITED.
9720 (set_parameter_value): Handle var_zuinteger and
9721 var_zuinteger_unlimited.
9722 (add_setshow_generic): Likewise.
9723 (parmpy_init): Likewise.
9724
9725 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9726
9727 PR rust/23124
9728 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9729 pointer is not null before dereferencing it.
9730
9731 2018-04-30 Tom Tromey <tom@tromey.com>
9732
9733 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9734 is_mi_like_p.
9735
9736 2018-04-30 Tom Tromey <tom@tromey.com>
9737
9738 * breakpoint.c (mention): Remove use of is_mi_like_p.
9739 (print_mention_ranged_breakpoint): Likewise.
9740 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9741 of is_mi_like_p.
9742
9743 2018-04-30 Tom Tromey <tom@tromey.com>
9744
9745 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9746
9747 2018-04-30 Tom Tromey <tom@tromey.com>
9748
9749 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9750 (info_spu_event_command): Remove some uses of is_mi_like_p.
9751
9752 2018-04-30 Tom Tromey <tom@tromey.com>
9753
9754 * python/py-framefilter.c (py_print_single_arg)
9755 (enumerate_locals, py_print_args, py_print_frame): Remove some
9756 uses of is_mi_like_p.
9757
9758 2018-04-30 Tom Tromey <tom@tromey.com>
9759
9760 * ui-out.c: Update.
9761 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9762 * ui-out.h (ui_out::is_mi_like_p): Now const.
9763 (ui_out::do_is_mi_like_p): Now const.
9764 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9765
9766 2018-04-30 Tom Tromey <tom@tromey.com>
9767
9768 * varobj.c (varobj_set_visualizer): Use new_reference.
9769 * python/python.c (gdbpy_decode_line): Use new_reference.
9770 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9771 new_reference.
9772
9773 2018-04-30 Tom Tromey <tom@tromey.com>
9774
9775 * varobj.c (install_new_value): Use new_reference.
9776 * value.h (value_incref): Return void. Swap intro comment with
9777 value_decref.
9778 * value.c (set_value_parent): Use new_reference.
9779 (value_incref): Return void. Update intro comment.
9780 (release_value): Use new_reference.
9781 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9782
9783 2018-04-30 Tom Tromey <tom@tromey.com>
9784
9785 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9786 * gdb_bfd.h (new_bfd_ref): Remove.
9787 (gdb_bfd_open): Update comment.
9788 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9789 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9790 (gdb_bfd_fdopenr): Use new_reference.
9791 * exec.c (exec_file_attach): Use new_reference.
9792
9793 2018-04-30 Tom Tromey <tom@tromey.com>
9794
9795 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9796 method.
9797
9798 2018-04-30 Tom Tromey <tom@tromey.com>
9799
9800 * jit.c (jit_read_code_entry): Use type_align.
9801 * i386-tdep.c (i386_gdbarch_init): Don't call
9802 set_gdbarch_long_long_align_bit.
9803 * gdbarch.sh: Remove long_long_align_bit.
9804 * gdbarch.c, gdbarch.h: Rebuild.
9805 * arc-tdep.c (arc_type_align): New function.
9806 (arc_gdbarch_init): Use arc_type_align. Don't call
9807 set_gdbarch_long_long_align_bit.
9808
9809 2018-04-30 Tom Tromey <tom@tromey.com>
9810
9811 * rust-lang.c (rust_type_alignment): Remove.
9812 (rust_composite_type): Use type_align.
9813
9814 2018-04-30 Tom Tromey <tom@tromey.com>
9815
9816 * NEWS: Mention Type.align.
9817 * python/py-type.c (typy_get_alignof): New function.
9818 (type_object_getset): Add "alignof".
9819
9820 2018-04-30 Tom Tromey <tom@tromey.com>
9821
9822 PR exp/17095:
9823 * NEWS: Update.
9824 * std-operator.def (UNOP_ALIGNOF): New operator.
9825 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9826 New.
9827 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9828 * c-lang.c (c_op_print_tab): Add alignof.
9829 * c-exp.y (ALIGNOF): New token.
9830 (exp): Add "ALIGNOF" production.
9831 (ident_tokens): Add _Alignof and alignof.
9832
9833 2018-04-30 Tom Tromey <tom@tromey.com>
9834
9835 * i386-tdep.c (i386_type_align): New function.
9836 (i386_gdbarch_init): Update.
9837 * gdbarch.sh (type_align): New method.
9838 * gdbarch.c, gdbarch.h: Rebuild.
9839 * arch-utils.h (default_type_align): Declare.
9840 * arch-utils.c (default_type_align): New function.
9841 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9842 (struct type) <align_log2>: New field.
9843 <instance_flags>: Now a bitfield.
9844 (TYPE_RAW_ALIGN): New macro.
9845 (type_align, type_raw_align, set_type_align): Declare.
9846 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9847 functions.
9848 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9849 (get_alignment, maybe_set_alignment): New functions.
9850 (read_structure_type, read_enumeration_type, read_array_type)
9851 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9852 (read_subrange_type, read_base_type): Set type alignment.
9853
9854 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9855
9856 * dwarf2read.c (read_index_from_section): Use bool.
9857
9858 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9859
9860 PR gdb/22950
9861 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9862 with #ifdef.
9863
9864 2018-04-29 John Reiser <jreiser@BitWagon.com>
9865
9866 PR build/22873
9867 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9868 last step, and do it atomically.
9869
9870 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9871
9872 * compile/compile-c-types.c (convert_int, convert_float):
9873 Update for C FE v1.
9874
9875 2018-04-27 Tom Tromey <tom@tromey.com>
9876
9877 PR rust/22545:
9878 * rust-lang.c (rust_inclusive_range_type_p): New function.
9879 (rust_range): Handle inclusive ranges.
9880 (rust_compute_range): Likewise.
9881 * rust-exp.y (struct rust_op) <inclusive>: New field.
9882 (DOTDOTEQ): New constant.
9883 (range_expr): Add "..=" productions.
9884 (operator_tokens): Add "..=" token.
9885 (ast_range): Add "inclusive" parameter.
9886 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9887 ranges.
9888 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9889 bounds values.
9890 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9891 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9892 Update comments.
9893 * expprint.c (print_subexp_standard): Handle new bounds values.
9894 (dump_subexp_body_standard): Likewise.
9895
9896 2018-04-27 Tom Tromey <tom@tromey.com>
9897
9898 * configure: Rebuild.
9899 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9900 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9901 "OVERRIDE".
9902 (class symbol_needs_eval_context): Likewise.
9903 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9904 (mock_mapped_index::symbol_name_at): Use "override". Remove
9905 "virtual".
9906 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9907 "override".
9908 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9909 * aarch64-tdep.c (instruction_reader::read): Use "override".
9910 (instruction_reader_test::read): Likewise.
9911 * arm-tdep.c (instruction_reader::read): Use "override".
9912 (instruction_reader_thumb::read): Likewise.
9913
9914 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9915
9916 PR remote/9665
9917 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9918 instead of remote_send.
9919 (remote_send): Remove.
9920
9921 2018-04-26 Pedro Alves <palves@redhat.com>
9922
9923 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9924 find_function_start_sal instead of find_pc_line.
9925
9926 2018-04-26 Pedro Alves <palves@redhat.com>
9927
9928 * breakpoint.c (set_breakpoint_location_function): Handle
9929 mst_data_gnu_ifunc.
9930 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9931 * elfread.c (elf_symtab_read): Give data symbols with
9932 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9933 (elf_rel_plt_read): Update comment.
9934 * linespec.c (convert_linespec_to_sals): Handle
9935 mst_data_gnu_ifunc.
9936 (minsym_found): Handle mst_data_gnu_ifunc.
9937 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9938 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9939 * parse.c (find_minsym_type_and_address): Handle
9940 mst_data_gnu_ifunc.
9941 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9942 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9943 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9944 comment.
9945 <mst_data_gnu_ifunc>: New enumerator.
9946
9947 2018-04-26 Pedro Alves <palves@redhat.com>
9948
9949 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9950 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9951 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9952 Handle it.
9953 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9954 (lookup_minimal_symbol_by_pc): Adjust.
9955 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9956 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9957 * minsyms.h (lookup_msym_prefer): New enum.
9958 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9959 parameter by a lookup_msym_prefer parameter.
9960
9961 2018-04-26 Pedro Alves <palves@redhat.com>
9962
9963 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9964 ends in "@plt" instead of looking at the symbol's section.
9965
9966 2018-04-26 Pedro Alves <palves@redhat.com>
9967
9968 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9969 all references.
9970 (find_pc_partial_function_gnu_ifunc): Rename to ...
9971 (find_pc_partial_function): ... this, and remove references to
9972 'is_gnu_ifunc_p'.
9973 (find_pc_partial_function): Delete old implementation.
9974 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9975
9976 2018-04-26 Pedro Alves <palves@redhat.com>
9977
9978 * linespec.c (struct bound_minimal_symbol_search_key): New.
9979 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9980 skip first line if we found a GNU ifunc minimal symbol by name.
9981 (compare_msymbols): Change parameters to work with a destructured
9982 lhs minsym.
9983 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9984 functions.
9985
9986 2018-04-26 Pedro Alves <palves@redhat.com>
9987
9988 * breakpoint.c (set_breakpoint_location_function): Don't resolve
9989 ifunc targets here. Instead, if we have an ifunc minsym, use its
9990 address/name.
9991 (add_location_to_breakpoint): Store the minsym and the objfile in
9992 the breakpoint location.
9993 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9994 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9995 Record the minsym in the sal.
9996 * symtab.h (symtab_and_line) <msymbol>: New field.
9997
9998 2018-04-26 Pedro Alves <palves@redhat.com>
9999
10000 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10001 unless we actually resolved the ifunc.
10002
10003 2018-04-26 Pedro Alves <palves@redhat.com>
10004
10005 * c-exp.y (variable production): Prefer ifunc minsyms over
10006 regular function symbols.
10007 * symtab.c (find_gnu_ifunc): New function.
10008 * minsyms.h (lookup_msym_prefer): New enum.
10009 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10010 parameter by a lookup_msym_prefer parameter.
10011 * symtab.h (find_gnu_ifunc): New declaration.
10012
10013 2018-04-26 Pedro Alves <palves@redhat.com>
10014
10015 * blockframe.c (find_gnu_ifunc_target_type): New function.
10016 (find_function_type): New.
10017 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10018 return a value with a memory address.
10019 (eval_call): For calls to GNU ifunc functions, try to find the
10020 type of the target function from the type that the resolver
10021 returns.
10022 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10023 symbols.
10024 * infcall.c (find_function_return_type): Delete.
10025 (find_function_addr): Add 'function_type' parameter. For calls to
10026 GNU ifunc functions, try to find the type of the target function
10027 from the type that the resolver returns, and return it via
10028 FUNCTION_TYPE.
10029 (call_function_by_hand_dummy): Adjust to use the function type
10030 returned by find_function_addr.
10031 (find_function_addr): Add 'function_type' parameter and move
10032 description here.
10033 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10034 declarations.
10035
10036 2018-04-26 Pedro Alves <palves@redhat.com>
10037
10038 * c-exp.y (variable production): Skip finding an alias for ifunc
10039 symbols.
10040
10041 2018-04-26 Pedro Alves <palves@redhat.com>
10042
10043 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10044
10045 2018-04-25 Pedro Alves <palves@redhat.com>
10046
10047 * infcmd.c (kill_command): Print the pid as string, not the whole
10048 thread's ptid. Add comment. s/has been killed/killed/ in output
10049 message.
10050 * remote.c (remote_detach_1): Print the pid as string, not the
10051 whole thread's ptid.
10052
10053 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10054 Sergio Durigan Junior <sergiodj@redhat.com>
10055 Pedro Alves <palves@redhat.com>
10056
10057 * infcmd.c (kill_command): Print message when inferior has
10058 been killed.
10059 * inferior.c (print_inferior_events): Remove 'static'. Set as
10060 '1'.
10061 (add_inferior): Improve message printed when
10062 'print_inferior_events' is on.
10063 (exit_inferior): Remove message printed when
10064 'print_inferior_events' is on.
10065 (detach_inferior): Improve message printed when
10066 'print_inferior_events' is on.
10067 (initialize_inferiors): Use 'add_inferior_silent' to set
10068 'current_inferior_'.
10069 * inferior.h (print_inferior_events): Declare here as
10070 'extern'.
10071 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10072 '[Detaching...]' messages when 'print_inferior_events' is on.
10073 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10074 as prefix/suffix for messages. Remove periods. Fix erroneous
10075 'Detaching after fork from child...', replace it by '... from
10076 parent...'.
10077 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10078 prefix/suffix when printing 'Detaching...' messages. Print
10079 them when 'print_inferior_events' is on.
10080 * remote.c (remote_detach_1): Print message when detaching
10081 from inferior and '!is_fork_parent'.
10082
10083 2018-04-24 Tom Tromey <tom@tromey.com>
10084
10085 * cli-out.h: Reindent.
10086
10087 2018-04-24 Tom Tromey <tom@tromey.com>
10088
10089 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10090 (cli_ui_out::do_field_string): Use fputs_filtered.
10091 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10092
10093 2018-04-23 Tom Tromey <tom@tromey.com>
10094
10095 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10096 gdb::unique_xmalloc_ptr.
10097
10098 2018-04-23 Tom Tromey <tom@tromey.com>
10099
10100 * configure: Rebuild.
10101
10102 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10103
10104 PR gdb/23095
10105 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10106 prepare_for_testing. Set normal_bp to r_debug_state if target
10107 is bsd.
10108
10109 2018-04-21 Pedro Alves <palves@redhat.com>
10110 Rajendra SY <rajendra.sy@gmail.com>
10111
10112 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10113 * remote.c (extended_remote_attach): In all-stop mode, mark the
10114 thread as executing.
10115
10116 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10117
10118 * thread.c (thread_apply_all_command): Fix comment.
10119 (thread_command): Fix comment.
10120
10121 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10122
10123 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10124 parameter.
10125 * features/aarch64-core.c (create_feature_aarch64_core):
10126 Regenerate.
10127 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10128 Likewise.
10129 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10130 Likewise.
10131 * features/i386/32bit-avx512.c
10132 (create_feature_i386_32bit_avx512): Likewise.
10133 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10134 Likewise.
10135 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10136 Likewise.
10137 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10138 Likewise.
10139 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10140 Likewise.
10141 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10142 Likewise.
10143 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10144 Likewise.
10145 * features/i386/64bit-avx512.c
10146 (create_feature_i386_64bit_avx512): Likewise.
10147 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10148 Likewise.
10149 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10150 Likewise.
10151 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10152 Likewise.
10153 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10154 Likewise.
10155 * features/i386/64bit-segments.c
10156 (create_feature_i386_64bit_segments): Likewise.
10157 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10158 Likewise.
10159 * features/i386/x32-core.c
10160 (create_feature_i386_x32_core): Likewise.
10161 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10162 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10163 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10164 * target-descriptions.c: In generated code, don't pass xml
10165 filename.
10166
10167 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10168
10169 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10170 (print_xml_feature::visit_post): Likewise.
10171 (print_xml_feature::visit): Likewise.
10172 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10173 (print_xml_feature): Add new class.
10174 * regformats/regdat.sh: Null xmltarget on feature targets.
10175 * target-descriptions.c (struct target_desc): Add xmltarget.
10176 (maintenance_check_tdesc_xml_convert): Add unittest function.
10177 (tdesc_get_features_xml): Add function to get xml.
10178 (maintenance_check_xml_descriptions): Test xml generation.
10179 * xml-tdesc.c (string_read_description_xml): Add function.
10180 * xml-tdesc.h (string_read_description_xml): Add declaration.
10181
10182 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10183
10184 * features/Makefile: Add feature marker to targets with new style
10185 target descriptions.
10186 * regformats/aarch64.dat: Regenerate.
10187 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10188 * regformats/i386/amd64-avx-linux.dat: Likewise.
10189 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10190 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10191 * regformats/i386/amd64-linux.dat: Likewise.
10192 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10193 * regformats/i386/amd64.dat: Likewise.
10194 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10195 * regformats/i386/i386-avx-linux.dat: Likewise.
10196 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10197 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10198 * regformats/i386/i386-linux.dat: Likewise.
10199 * regformats/i386/i386-mmx-linux.dat: Likewise.
10200 * regformats/i386/i386-mpx-linux.dat: Likewise.
10201 * regformats/i386/i386.dat: Likewise.
10202 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10203 * regformats/i386/x32-avx-linux.dat: Likewise.
10204 * regformats/i386/x32-linux.dat: Likewise.
10205 * regformats/tic6x-c62x-linux.dat: Likewise.
10206 * regformats/tic6x-c64x-linux.dat: Likewise.
10207 * regformats/tic6x-c64xp-linux.dat: Likewise.
10208 * regformats/regdat.sh: Parse feature marker.
10209
10210 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10211
10212 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10213 (tdesc_osabi_name): Likewise.
10214 * target-descriptions.c (tdesc_architecture_name): Add new
10215 function.
10216 (tdesc_osabi_name): Likewise.
10217
10218 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10219
10220 * common/tdesc.c (tdesc_predefined_type): Move to here.
10221 (tdesc_named_type): Likewise.
10222 (tdesc_create_vector): Likewise.
10223 (tdesc_create_struct): Likewise.
10224 (tdesc_set_struct_size): Likewise.
10225 (tdesc_create_union): Likewise.
10226 (tdesc_create_flags): Likewise.
10227 (tdesc_create_enum): Likewise.
10228 (tdesc_add_field): Likewise.
10229 (tdesc_add_typed_bitfield): Likewise.
10230 (tdesc_add_bitfield): Likewise.
10231 (tdesc_add_flag): Likewise.
10232 (tdesc_add_enum_value): Likewise.
10233 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10234 (struct tdesc_type_vector): Likewise.
10235 (struct tdesc_type_field): Likewise.
10236 (struct tdesc_type_with_fields): Likewise.
10237 (tdesc_create_enum): Add declaration.
10238 (tdesc_add_typed_bitfield): Likewise.
10239 (tdesc_add_enum_value): Likewise.
10240 * target-descriptions.c (tdesc_type_field): Move from here.
10241 (tdesc_type_builtin): Likewise.
10242 (tdesc_type_vector): Likewise.
10243 (tdesc_type_with_fields): Likewise.
10244 (tdesc_predefined_types): Likewise.
10245 (tdesc_named_type): Likewise.
10246 (tdesc_create_vector): Likewise.
10247 (tdesc_create_struct): Likewise.
10248 (tdesc_set_struct_size): Likewise.
10249 (tdesc_create_union): Likewise.
10250 (tdesc_create_flags): Likewise.
10251 (tdesc_create_enum): Likewise.
10252 (tdesc_add_field): Likewise.
10253 (tdesc_add_typed_bitfield): Likewise.
10254 (tdesc_add_bitfield): Likewise.
10255 (tdesc_add_flag): Likewise.
10256 (tdesc_add_enum_value): Likewise.
10257 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10258 (tdesc_add_typed_bitfield): Likewise.
10259 (tdesc_add_enum_value): Likewise.
10260
10261 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10262
10263 * common/tdesc.c (tdesc_feature::accept): Move to here.
10264 (tdesc_feature::operator==): Likewise.
10265 (tdesc_create_reg): Likewise.
10266 * common/tdesc.h (tdesc_type_kind): Likewise.
10267 (struct tdesc_type): Likewise.
10268 (struct tdesc_feature): Likewise.
10269 * regformats/regdat.sh: Create a feature.
10270 * target-descriptions.c (tdesc_type_kind): Move from here.
10271 (tdesc_type): Likewise.
10272 (tdesc_type_up): Likewise.
10273 (tdesc_feature): Likewise.
10274 (tdesc_create_reg): Likewise.
10275
10276 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10277
10278 * Makefile.in: Add arch/tdesc.c
10279 * common/tdesc.c: New file.
10280 * common/tdesc.h (tdesc_element_visitor): Move to here.
10281 (tdesc_element): Likewise.
10282 (tdesc_reg): Likewise.
10283 (tdesc_reg_up): Likewise.
10284 * regformats/regdef.h (reg): Add offset to constructors.
10285 * target-descriptions.c (tdesc_element_visitor): Move from here.
10286 (tdesc_element): Likewise.
10287 (tdesc_reg): Likewise.
10288 (tdesc_reg_up): Likewise.
10289
10290 2018-04-17 Tom Tromey <tom@tromey.com>
10291
10292 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10293 discriminant field.
10294
10295 2018-04-17 Tom Tromey <tom@tromey.com>
10296
10297 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10298
10299 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10300
10301 * symtab.c (print_symbol_info): Skip printing filename and line
10302 number when `last' is NULL.
10303 (symtab_symbol_info): Use empty string instead of NULL for first
10304 invocation of print_symbol_info.
10305 (rbreak_command): Pass NULL to `last' parameter of
10306 print_symbol_info.
10307
10308 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10309
10310 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10311 instead of nullptr.
10312
10313 2018-04-16 Pedro Alves <palves@redhat.com>
10314
10315 * MAINTAINERS (sh): Remove.
10316 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10317 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10318 (ALLDEPFILES): Remove sh64-tdep.c.
10319 * NEWS: Mentions that support for SH-5/SH64 is removed.
10320 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10321 (sh*-*-openbsd*): Ditto.
10322 (sh64-*-elf*): Remove.
10323 (sh*): Remove.
10324 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10325 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10326 * sh-tdep.c: No longer include "sh64-tdep.h".
10327 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10328 * sh64-tdep.c, sh64-tdep.h: Remove files.
10329
10330 2018-04-16 Pedro Alves <palves@redhat.com>
10331
10332 * MAINTAINERS: Remove m88k.
10333 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10334 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10335 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10336 * NEWS: Mention that support for m88k was removed.
10337 * configure.host (m88*-*-*): Remove support.
10338 * configure.nat (m88k-*-*): Remove support.
10339 * configure.tgt (m88*-*-openbsd*): Remove.
10340 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10341
10342 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10343
10344 * configure.tgt (x86_tobjs): New variable.
10345 (amd64_tobjs, i386_tobjs): Use it.
10346
10347 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10348
10349 * symtab.c (print_symbol_info): Precede the symbol definition by
10350 the line number when available.
10351 * NEWS: Advertise this enhancement.
10352
10353 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10354
10355 * NEWS (New options): announce set/show record btrace cpu.
10356 * btrace.c: Include record-btrace.h.
10357 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10358 the vendor is unknown.
10359 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10360 Maybe overwrite the btrace configuration's cpu.
10361 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10362 (btrace_fetch): Add cpu parameter. Update callers.
10363 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10364 Maybe overwrite the btrace configuration's cpu. Skip enabling
10365 errata workarounds if the vendor is unknown.
10366 * python/py-record-btrace.c: Include record-btrace.h.
10367 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10368 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10369 * record-btrace.c (record_btrace_cpu_state_kind): New.
10370 (record_btrace_cpu): New.
10371 (set_record_btrace_cpu_cmdlist): New.
10372 (record_btrace_get_cpu): New.
10373 (require_btrace_thread, record_btrace_info)
10374 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10375 (cmd_set_record_btrace_cpu_none): New.
10376 (cmd_set_record_btrace_cpu_auto): New.
10377 (cmd_set_record_btrace_cpu): New.
10378 (cmd_show_record_btrace_cpu): New.
10379 (_initialize_record_btrace): Initialize set/show record btrace cpu
10380 commands.
10381 * record-btrace.h (record_btrace_get_cpu): New.
10382
10383 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10384
10385 * record.c (set_record_command): Fix typo in message.
10386
10387 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10388
10389 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10390
10391 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10392
10393 * infrun.c (process_event_stop_test): Call
10394 gdbarch_in_indirect_branch_thunk.
10395 * gdbarch.sh (in_indirect_branch_thunk): New.
10396 * gdbarch.c: Regenerated.
10397 * gdbarch.h: Regenerated.
10398 * x86-tdep.h: New.
10399 * x86-tdep.c: New.
10400 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10401 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10402 (ALLDEPFILES): Add x86-tdep.c.
10403 * arch-utils.h (default_in_indirect_branch_thunk): New.
10404 * arch-utils.c (default_in_indirect_branch_thunk): New.
10405 * i386-tdep: Include x86-tdep.h.
10406 (i386_in_indirect_branch_thunk): New.
10407 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10408 function.
10409 * amd64-tdep: Include x86-tdep.h.
10410 (amd64_in_indirect_branch_thunk): New.
10411 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10412
10413 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10414
10415 PR gdb/23053
10416 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10417 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10418 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10419 regression.
10420
10421 2018-04-12 Tom Tromey <tom@tromey.com>
10422
10423 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10424 (rust_evaluate_subexp): Likewise.
10425
10426 2018-04-12 Pedro Alves <palves@redhat.com>
10427
10428 * procfs.c (procfs_detach): Make forward declaration's prototype
10429 match definition's protototype.
10430 (proc_get_LDT_entry): Remove stale do_cleanups call.
10431
10432 2018-04-12 Pedro Alves <palves@redhat.com>
10433
10434 * target.h (target_ops::to_has_exited): Delete.
10435 (target_has_exited): Delete.
10436 * target-delegates.c: Regenerate.
10437
10438 2018-04-11 Pedro Alves <palves@redhat.com>
10439
10440 * target.c (fileio_fh_t::t): Add comment.
10441 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10442 (target_fileio_close): Handle a NULL target.
10443 (invalidate_fileio_fh): New.
10444 (target_close): Call it.
10445 * remote.c (remote_hostio_send_command): No longer check whether
10446 remote_desc is open.
10447
10448 2018-04-11 Pedro Alves <palves@redhat.com>
10449
10450 * target.c (fileio_fh_t): Make it a named struct instead of a
10451 typedef.
10452 (fileio_fh_t::is_closed): New method.
10453 (DEF_VEC_O (fileio_fh_t)): Remove.
10454 (fileio_fhandles): Now a std::vector.
10455 (is_closed_fileio_fh): Delete.
10456 (acquire_fileio_fd): Adjust. Rename parameters.
10457 (release_fileio_fd): Adjust.
10458 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10459 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10460 (target_fileio_close): Adjust.
10461
10462 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10463
10464 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10465 index.
10466
10467 2018-04-10 Pedro Alves <palves@redhat.com>
10468
10469 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10470 (scoped_finish_thread_state): New class.
10471 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10472 cleanup.
10473 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10474 (fetch_inferior_event, normal_stop): Likewise.
10475 * thread.c (finish_thread_state_cleanup): Delete.
10476
10477 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10478 Pedro Alves <palves@redhat.com>
10479
10480 * value.c: Include "selftest.h" and "common/array-view.h".
10481 (struct range) <operator ==>: New.
10482 (test_ranges_contain): New.
10483 (check_ranges_vector): New.
10484 (test_insert_into_bit_range_vector): New.
10485 (_initialize_values): Register selftests.
10486 * common/array-view.h (operator==, operator!=): New.
10487
10488 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10489
10490 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10491 an iterator.
10492 * inline-frame.c: Include <algorithm>.
10493 (struct inline_state): Add constructor.
10494 (inline_state_s): Remove.
10495 (DEF_VEC_O(inline_state_s)): Remove.
10496 (inline_states): Change type to std::vector.
10497 (find_inline_frame_state): Adjust to std::vector.
10498 (allocate_inline_frame_state): Remove.
10499 (clear_inline_frame_state): Adjust to std::vector.
10500 (skip_inline_frames): Adjust to std::vector.
10501
10502 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10503
10504 * tracepoint.h (struct trace_state_variable): Add constructor.
10505 <name>: Change type to std::string.
10506 * tracepoint.c (tsv_s): Remove.
10507 (DEF_VEC_O(tsv_s)): Remove.
10508 (tvariables): Change to std::vector.
10509 (create_trace_state_variable): Adjust to std::vector.
10510 (find_trace_state_variable): Likewise.
10511 (find_trace_state_variable_by_number): Likewise.
10512 (delete_trace_state_variable): Likewise.
10513 (trace_variable_command): Adjust to std::string.
10514 (delete_trace_variable_command): Likewise.
10515 (tvariables_info_1): Adjust to std::vector.
10516 (save_trace_state_variables): Likewise.
10517 (start_tracing): Likewise.
10518 (merge_uploaded_trace_state_variables): Adjust to std::vector
10519 and std::string.
10520 * target.h (struct target_ops)
10521 <to_download_trace_state_variable>: Pass reference to
10522 trace_state_variable.
10523 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10524 * target-delegates.c: Re-generate.
10525 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10526 (mi_tsv_deleted): Likewise.
10527 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10528 * remote.c (remote_download_trace_state_variable): Change
10529 pointer to reference and adjust.
10530 * make-target-delegates (parse_argtypes): Handle references.
10531 (write_function_header): Likewise.
10532 (munge_type): Likewise.
10533
10534 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10535
10536 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10537 string_view-selftests.c.
10538 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10539 testsuite.
10540 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10541 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10542 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10543 * unittests/basic_string_view/element_access/char/1.cc:
10544 Likewise.
10545 * unittests/basic_string_view/element_access/char/empty.cc:
10546 Likewise.
10547 * unittests/basic_string_view/element_access/char/front_back.cc:
10548 Likewise.
10549 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10550 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10551 Likewise.
10552 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10553 Likewise.
10554 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10555 Likewise.
10556 * unittests/basic_string_view/operations/compare/char/1.cc:
10557 Likewise.
10558 * unittests/basic_string_view/operations/compare/char/13650.cc:
10559 Likewise.
10560 * unittests/basic_string_view/operations/copy/char/1.cc:
10561 Likewise.
10562 * unittests/basic_string_view/operations/data/char/1.cc:
10563 Likewise.
10564 * unittests/basic_string_view/operations/find/char/1.cc:
10565 Likewise.
10566 * unittests/basic_string_view/operations/find/char/2.cc:
10567 Likewise.
10568 * unittests/basic_string_view/operations/find/char/3.cc:
10569 Likewise.
10570 * unittests/basic_string_view/operations/find/char/4.cc:
10571 Likewise.
10572 * unittests/basic_string_view/operations/rfind/char/1.cc:
10573 Likewise.
10574 * unittests/basic_string_view/operations/rfind/char/2.cc:
10575 Likewise.
10576 * unittests/basic_string_view/operations/rfind/char/3.cc:
10577 Likewise.
10578 * unittests/basic_string_view/operations/substr/char/1.cc:
10579 Likewise.
10580 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10581 * unittests/string_view-selftests.c: New file.
10582
10583 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10584
10585 * unittests/basic_string_view/capacity/1.cc: New file.
10586 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10587 * unittests/basic_string_view/cons/char/1.cc: New file.
10588 * unittests/basic_string_view/cons/char/2.cc: New file.
10589 * unittests/basic_string_view/cons/char/3.cc: New file.
10590 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10591 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10592 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10593 * unittests/basic_string_view/element_access/char/1.cc: New file.
10594 * unittests/basic_string_view/element_access/char/2.cc: New file.
10595 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10596 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10597 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10598 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10599 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10600 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10601 * unittests/basic_string_view/include.cc: New file.
10602 * unittests/basic_string_view/inserters/char/1.cc: New file.
10603 * unittests/basic_string_view/inserters/char/2.cc: New file.
10604 * unittests/basic_string_view/inserters/char/3.cc: New file.
10605 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10606 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10607 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10608 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10609 * unittests/basic_string_view/literals/types.cc: New file.
10610 * unittests/basic_string_view/literals/values.cc: New file.
10611 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10612 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10613 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10614 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10615 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10616 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10617 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10618 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10619 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10620 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10621 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10622 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10623 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10624 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10625 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10626 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10627 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10628 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10629 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10630 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10631 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10632 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10633 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10634 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10635 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10636 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10637 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10638 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10639 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10640 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10641 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10642 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10643 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10644 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10645 * unittests/basic_string_view/operators/char/2.cc: New file.
10646 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10647 * unittests/basic_string_view/range_access/char/1.cc: New file.
10648 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10649 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10650 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10651 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10652 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10653 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10654 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10655 * unittests/basic_string_view/typedefs.cc: New file.
10656 * unittests/basic_string_view/types/1.cc: New file.
10657
10658 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10659
10660 * common/gdb_string_view.h: Remove libstdc++ implementation
10661 details, adjust to gdb reality.
10662 * common/gdb_string_view.tcc: Likewise.
10663 * cli/cli-script.c (struct string_view): Remove.
10664 (user_args) <m_args>: Change element type to gdb::string_view.
10665 (user_args::insert_args): Adjust.
10666
10667 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10668
10669 * common/gdb_string_view.h: New file.
10670 * common/gdb_string_view.tcc: New file.
10671
10672 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10673
10674 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10675 * configure: Re-generate.
10676
10677 2018-04-09 Pedro Alves <palves@redhat.com>
10678
10679 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10680 (set_target_gdbarch): Call
10681 gdb::observers::architecture_changed.notify instead of
10682 observer_notify_architecture_changed.
10683
10684 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10685
10686 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10687 (do_restore_current_traceframe_cleanup): Remove.
10688 (restore_current_traceframe_cleanup_dtor): Remove.
10689 (make_cleanup_restore_current_traceframe): Remove.
10690 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10691 New.
10692 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10693 * infrun.c (fetch_inferior_event): Use
10694 scoped_restore_current_traceframe.
10695
10696 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10697
10698 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10699 Remove.
10700 <n_allocated_type_units>: Remove.
10701 <all_type_units>: Change to std::vector.
10702 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10703 to std::vector change.
10704 (dwarf2_per_objfile::get_cutu): Likewise.
10705 (dwarf2_per_objfile::get_tu): Likewise.
10706 (create_signatured_type_table_from_index): Likewise.
10707 (create_signatured_type_table_from_debug_names): Likewise.
10708 (dw2_symtab_iter_next): Likewise.
10709 (dw2_print_stats): Likewise.
10710 (dw2_expand_all_symtabs): Likewise.
10711 (dw2_expand_marked_cus): Likewise.
10712 (dw2_debug_names_iterator::next): Likewise.
10713 (dwarf2_initialize_objfile): Likewise.
10714 (add_signatured_type_cu_to_table): Likewise.
10715 (create_all_type_units): Likewise.
10716 (add_type_unit): Likewise.
10717 (struct tu_abbrev_offset): Add constructor.
10718 (build_type_psymtabs_1): Adjust to std::vector change.
10719 (print_tu_stats): Likewise.
10720 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10721 (write_debug_names): Likewise.
10722
10723 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10724
10725 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10726 Make an std::vector.
10727 <n_comp_units>: Remove.
10728 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10729 to std::vector change.
10730 (dwarf2_per_objfile::get_cutu): Likewise.
10731 (dwarf2_per_objfile::get_cu): Likewise.
10732 (create_cus_from_index): Likewise.
10733 (create_addrmap_from_index): Likewise.
10734 (create_addrmap_from_aranges): Likewise.
10735 (dwarf2_read_index): Likewise.
10736 (dw2_find_last_source_symtab): Likewise.
10737 (dw2_map_symtabs_matching_filename): Likewise.
10738 (dw2_symtab_iter_next): Likewise.
10739 (dw2_print_stats): Likewise.
10740 (dw2_expand_all_symtabs): Likewise.
10741 (dw2_expand_symtabs_with_fullname): Likewise.
10742 (dw2_expand_marked_cus): Likewise.
10743 (dw2_map_symbol_filenames): Likewise.
10744 (create_cus_from_debug_names): Likewise.
10745 (dwarf2_read_debug_names): Likewise.
10746 (dw2_debug_names_iterator::next): Likewise.
10747 (dwarf2_initialize_objfile): Likewise.
10748 (set_partial_user): Likewise.
10749 (dwarf2_build_psymtabs_hard): Likewise.
10750 (read_comp_units_from_section): Remove arguments, adjust to
10751 std::vector change.
10752 (create_all_comp_units): Adjust to std::vector and
10753 read_comp_units_from_section changes.
10754 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10755 change.
10756 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10757 (psyms_seen_size): Likewise.
10758 (write_gdbindex): Likewise.
10759 (write_debug_names): Likewise.
10760
10761 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10762
10763 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10764 with dwarf2_per_objfile.
10765 (create_cus_from_index): Likewise.
10766 (create_signatured_type_table_from_index): Likewise.
10767 (dwarf2_read_index): Likewise.
10768 (dwarf2_initialize_objfile): Likewise.
10769 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10770 per_cu rather than get_dwarf2_per_objfile.
10771
10772 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10773
10774 * dwarf2read.h (struct signatured_type): Forward declare.
10775 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10776 New methods.
10777 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10778 (dw2_get_cutu): ...this.
10779 (dwarf2_per_objfile::get_cu): Rename from...
10780 (dw2_get_cu): ...this.
10781 (dwarf2_per_objfile::get_tu): New.
10782 (create_addrmap_from_index): Adjust.
10783 (create_addrmap_from_aranges): Adjust.
10784 (dw2_find_last_source_symtab): Adjust.
10785 (dw2_map_symtabs_matching_filename): Adjust.
10786 (dw2_symtab_iter_next): Adjust.
10787 (dw2_print_stats): Adjust.
10788 (dw2_expand_all_symtabs): Adjust.
10789 (dw2_expand_symtabs_with_fullname): Adjust.
10790 (dw2_expand_marked_cus): Adjust.
10791 (dw_expand_symtabs_matching_file_matcher): Adjust.
10792 (dw2_map_symbol_filenames): Adjust.
10793 (dw2_debug_names_iterator::next): Adjust.
10794 (dwarf2_initialize_objfile): Adjust.
10795 (set_partial_user): Adjust.
10796 (dwarf2_build_psymtabs_hard): Adjust.
10797
10798 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10799
10800 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10801 Remove unused variables.
10802 (dw2_map_symtabs_matching_filename): Likewise.
10803 (dwarf2_record_block_ranges): Likewise.
10804 (dwarf2_read_addr_index): Likewise.
10805 (follow_die_offset): Likewise.
10806
10807 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10808
10809 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10810 to symbol_file_add_main.
10811
10812 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10813
10814 PR mi/22299
10815 * mi/mi-console.c (do_fputc_async_safe): New.
10816 (mi_console_file::write_async_safe): New.
10817 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10818 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10819 New.
10820 * ui-file.c (ui_file::putstrn): Adjust call to
10821 fputstrn_unfiltered.
10822 * utils.c (printchar): Replace do_fputs and do_fprintf
10823 parameters by do_fputc.
10824 (fputstr_filtered): Adjust call to printchar.
10825 (fputstr_unfiltered): Likewise.
10826 (fputstrn_filtered): Likewise.
10827 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10828 printchar.
10829 * utils.h (do_fputc_ftype): New typedef.
10830 (fputstrn_unfiltered): Add do_fputc parameter.
10831
10832 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10833
10834 * regformats/i386/i386-avx.dat: Remove.
10835
10836 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10837
10838 PR gdb/22979
10839 * amd64-tdep.c (amd64_none_init_abi): New function.
10840 (amd64_x32_none_init_abi): New function.
10841 (_initialize_amd64_tdep): Register handlers for x86-64 and
10842 x64_32 with GDB_OSABI_NONE.
10843 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10844 GDB_OSABI_NONE osabi.
10845
10846 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10847
10848 PR gdb/22980
10849 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10850 GDB_OSABI_NONE.
10851 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10852 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10853
10854 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10855
10856 * common/byte-vector.h (char_vector): New type.
10857 * target.h (target_read_alloc): Return
10858 gdb::optional<byte_vector>.
10859 (target_read_stralloc): Return gdb::optional<char_vector>.
10860 (target_get_osdata): Return gdb::optional<char_vector>.
10861 * target.c (target_read_alloc_1): Templatize. Replacement
10862 manual memory management with vector.
10863 (target_read_alloc): Change return type, adjust.
10864 (target_read_stralloc): Change return type, adjust.
10865 (target_get_osdata): Change return type, adjust.
10866 * auxv.c (struct auxv_info) <length>: Remove.
10867 <data>: Change type to gdb::optional<byte_vector>.
10868 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10869 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10870 (target_auxv_search): Adjust.
10871 (fprint_target_auxv): Adjust.
10872 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10873 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10874 (linux_make_corefile_notes): Adjust.
10875 * osdata.c (get_osdata): Adjust.
10876 * remote.c (remote_get_threads_with_qxfer): Adjust.
10877 (remote_memory_map): Adjust.
10878 (remote_traceframe_info): Adjust.
10879 (btrace_read_config): Adjust.
10880 (remote_read_btrace): Adjust.
10881 (remote_pid_to_exec_file): Adjust.
10882 * solib-aix.c (solib_aix_get_library_list): Adjust.
10883 * solib-dsbt.c (decode_loadmap): Don't free buf.
10884 (dsbt_get_initial_loadmaps): Adjust.
10885 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10886 * solib-target.c (solib_target_current_sos): Adjust.
10887 * tracepoint.c (sdata_make_value): Adjust.
10888 * xml-support.c (xinclude_start_include): Adjust.
10889 (xml_fetch_content_from_file): Adjust.
10890 * xml-support.h (xml_fetch_another): Change return type.
10891 (xml_fetch_content_from_file): Change return type.
10892 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10893 * xml-tdesc.c (file_read_description_xml): Adjust.
10894 (fetch_available_features_from_target): Change return type.
10895 (target_fetch_description_xml): Adjust.
10896 (target_read_description_xml): Adjust.
10897
10898 2018-04-06 Tom Tromey <tom@tromey.com>
10899
10900 * value.c (~value): Update.
10901 (struct value) <contents>: Now unique_xmalloc_ptr.
10902 (value_contents_bits_eq, allocate_value_contents)
10903 (value_contents_raw, value_contents_all_raw)
10904 (value_contents_for_printing, value_contents_for_printing_const)
10905 (set_value_enclosing_type): Update.
10906
10907 2018-04-06 Tom Tromey <tom@tromey.com>
10908
10909 * value.c (range_s): Remove typedef, VEC.
10910 (struct range): Add operator<.
10911 (range_lessthan): Remove.
10912 (ranges_contain): Change type.
10913 (~value): Update.
10914 (struct value) <unavailable, optimized_out>: Now std::vector.
10915 (value_entirely_available)
10916 (value_entirely_covered_by_range_vector)
10917 (value_entirely_unavailable, value_entirely_optimized_out):
10918 Update.
10919 (insert_into_bit_range_vector): Change argument type.
10920 (find_first_range_overlap): Likewise.
10921 (struct ranges_and_idx, value_contents_bits_eq)
10922 (require_not_optimized_out, require_available): Update.
10923 (ranges_copy_adjusted): Change argument types.
10924 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10925
10926 2018-04-06 Tom Tromey <tom@tromey.com>
10927
10928 * value.c (~value): Update.
10929 (struct value) <parent>: Now a value_ref_ptr.
10930 (value_parent, set_value_parent, value_address, value_copy):
10931 Update.
10932
10933 2018-04-06 Tom Tromey <tom@tromey.com>
10934
10935 * value.c (struct value): Add constructor, destructor, and member
10936 initializers.
10937 (allocate_value_lazy, value_decref): Update.
10938
10939 2018-04-06 Tom Tromey <tom@tromey.com>
10940
10941 * value.c (struct value) <released, next>: Remove.
10942 (all_values): Now a std::vector.
10943 (allocate_value_lazy): Update.
10944 (value_next): Remove.
10945 (value_mark, value_free_to_mark, release_value)
10946 (value_release_to_mark): Update.
10947
10948 2018-04-06 Tom Tromey <tom@tromey.com>
10949
10950 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10951 (free_value_chain): Remove.
10952 * value.c (free_value_chain): Remove.
10953 (value_release_to_mark): Return a std::vector.
10954 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10955 std::vector.
10956 (check_condition): Update.
10957 * eval.c (fetch_subexp_value): Change "val_chain" to a
10958 std::vector.
10959 * breakpoint.c (update_watchpoint): Update.
10960 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10961
10962 2018-04-06 Tom Tromey <tom@tromey.com>
10963
10964 * value.h (free_all_values): Remove.
10965 * value.c (free_all_values): Remove.
10966
10967 2018-04-06 Tom Tromey <tom@tromey.com>
10968
10969 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10970 (value_history_chain, value_history_count): Remove.
10971 (value_history): New global.
10972 (record_latest_value, access_value_history, show_values)
10973 (preserve_values): Update.
10974
10975 2018-04-06 Tom Tromey <tom@tromey.com>
10976
10977 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10978 * varobj.c (varobj_set_display_format, varobj_set_value)
10979 (install_default_visualizer, construct_visualizer)
10980 (install_new_value, ~varobj, varobj_get_value_type)
10981 (my_value_of_variable, varobj_editable_p): Update.
10982 * c-varobj.c (c_describe_child, c_value_of_variable)
10983 (cplus_number_of_children, cplus_describe_child): Update.
10984 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10985 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10986 (ada_value_of_variable, ada_value_is_changeable_p): Update.
10987
10988 2018-04-06 Tom Tromey <tom@tromey.com>
10989
10990 * printcmd.c (last_examine_address): Change type to
10991 value_ref_ptr.
10992 (do_examine, x_command): Update.
10993
10994 2018-04-06 Tom Tromey <tom@tromey.com>
10995
10996 * value.c (release_value): Update.
10997 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10998 (struct bpstats) <val>: Now a value_ref_ptr.
10999 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11000 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11001 (~watchpoint, print_it_watchpoint, watch_command_1)
11002 (invalidate_bp_value_on_memory_change): Update.
11003
11004 2018-04-06 Tom Tromey <tom@tromey.com>
11005
11006 * varobj.c (varobj_clear_saved_item)
11007 (update_dynamic_varobj_children, install_new_value, ~varobj):
11008 Update.
11009 * value.h (value_incref): Move declaration earlier.
11010 (value_decref): Rename from value_free.
11011 (struct value_ref_policy): New.
11012 (value_ref_ptr): New typedef.
11013 (struct value_deleter): Remove.
11014 (gdb_value_up): Remove typedef.
11015 (release_value): Change return type.
11016 (release_value_or_incref): Remove.
11017 * value.c (set_value_parent): Update.
11018 (value_incref): Change return type.
11019 (value_decref): Rename from value_free.
11020 (value_free_to_mark, free_all_values, free_value_chain): Update.
11021 (release_value): Return value_ref_ptr.
11022 (release_value_or_incref): Remove.
11023 (record_latest_value, set_internalvar, clear_internalvar):
11024 Update.
11025 * stack.c (info_frame_command): Don't call value_free.
11026 * python/py-value.c (valpy_dealloc, valpy_new)
11027 (value_to_value_object): Update.
11028 * printcmd.c (do_examine): Update.
11029 * opencl-lang.c (lval_func_free_closure): Update.
11030 * mi/mi-main.c (register_changed_p): Don't call value_free.
11031 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11032 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11033 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11034 value_free.
11035 * guile/scm-value.c (vlscm_free_value_smob)
11036 (vlscm_scm_from_value): Update.
11037 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11038 (frame_unwind_register_unsigned, get_frame_register_bytes)
11039 (put_frame_register_bytes): Don't call value_free.
11040 * findvar.c (address_from_register): Don't call value_free.
11041 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11042 * dwarf2loc.c (entry_data_value_free_closure)
11043 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11044 (dwarf2_evaluate_loc_desc_full): Update.
11045 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11046 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11047 (~watchpoint, watch_command_1)
11048 (invalidate_bp_value_on_memory_change): Update.
11049 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11050
11051 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11052
11053 PR gdb/23022
11054 * warning.m4: Add -Wno-error=deprecated-register.
11055 * configure: Re-generate.
11056
11057 2018-04-05 Tom Tromey <tom@tromey.com>
11058
11059 * linespec.h: Remove include of "vec.h".
11060
11061 2018-04-05 Tom Tromey <tom@tromey.com>
11062
11063 * linespec.c (typep): Remove typedef.
11064 (find_methods, find_superclass_methods): Take a std::vector.
11065 (find_method): Use std::vector.
11066
11067 2018-04-05 Tom Tromey <tom@tromey.com>
11068
11069 * utils.c (compare_strings): Remove.
11070 * utils.h (compare_strings): Remove.
11071 * objc-lang.h (find_imps): Update.
11072 * objc-lang.c (find_methods): Take a std::vector.
11073 (uniquify_strings, find_imps): Likewise.
11074 * linespec.c (find_methods): Take a std::vector.
11075 (decode_objc): Use std::vector.
11076 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11077 a std::vector.
11078 (find_method, find_function_symbols): Use std::vector.
11079
11080 2018-04-05 Tom Tromey <tom@tromey.com>
11081
11082 * completer.c (completion_tracker::completion_tracker): Remove
11083 cast.
11084 (completion_tracker::discard_completions): Likewise.
11085 * breakpoint.c (ambiguous_names_p): Remove cast.
11086 * ada-lang.c (_initialize_ada_language): Remove cast.
11087 * utils.h (streq): Update.
11088 (streq_hash): Add new declaration.
11089 * utils.c (streq): Return bool.
11090 (streq_hash): New function.
11091
11092 2018-04-05 Tom Tromey <tom@tromey.com>
11093
11094 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11095 Remove a string copy.
11096
11097 2018-04-05 Tom Tromey <tom@tromey.com>
11098
11099 * linespec.c (filter_results): Use std::vector.
11100 (decode_line_2, decode_line_full): Update.
11101
11102 2018-04-05 Tom Tromey <tom@tromey.com>
11103
11104 * linespec.c (canonical_to_fullform): Return std::string.
11105 (filter_results): Update.
11106 (struct decode_line_2_item): Add constructor.
11107 <fullform, displayform>: Now std::string.
11108 (decode_line_2_compare_items): Now a std::sort comparator.
11109 (decode_line_2): Update.
11110
11111 2018-04-05 Tom Tromey <tom@tromey.com>
11112
11113 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11114 (unexpected_linespec_error): Update.
11115 (linespec_parse_basic, parse_linespec): Update.
11116
11117 2018-04-05 Tom Tromey <tom@tromey.com>
11118
11119 * linespec.c (linespec_parse_basic): Reindent.
11120
11121 2018-04-05 Tom Tromey <tom@tromey.com>
11122
11123 * minsyms.h (iterate_over_minimal_symbols): Update.
11124 * minsyms.c (iterate_over_minimal_symbols): Take a
11125 gdb::function_view.
11126 * linespec.c (struct collect_minsyms): Remove.
11127 (compare_msyms): Now a std::sort comparator.
11128 (add_minsym): Add parameters.
11129 (search_minsyms_for_name): Update. Use std::vector.
11130
11131 2018-04-03 Tom Tromey <tom@tromey.com>
11132
11133 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11134 gdb::byte_vector.
11135
11136 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11137
11138 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11139
11140 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11141
11142 PR gdb/16959
11143 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11144 printing static type.
11145
11146 2018-04-01 Tom Tromey <tom@tromey.com>
11147
11148 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11149 (rs6000_xfer_shared_libraries): Update.
11150
11151 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11152
11153 * common/gdb_vecs.h (char_ptr): Remove.
11154 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11155
11156 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11157
11158 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11159 with std::vector.
11160 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11161
11162 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11163
11164 * tracepoint.h (struct uploaded_tp): Initialize fields.
11165 <actions, step_actions, cmd_strings>: Change type to
11166 std::vector<char *>.
11167 * tracepoint.c (get_uploaded_tp): Allocate with new.
11168 (free_uploaded_tps): Free with delete.
11169 (parse_tracepoint_definition): Adjust to std::vector change.
11170 * breakpoint.c (read_uploaded_action): Likewise.
11171 (create_tracepoint_from_upload): Likewise.
11172 * ctf.c (ctf_write_uploaded_tp): Likewise.
11173 (SET_ARRAY_FIELD): Likewise.
11174 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11175
11176 2018-03-30 Tom Tromey <tom@tromey.com>
11177
11178 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11179 std::unique_ptr.
11180 (svr4_keep_data_in_core): Update.
11181 (svr4_read_so_list): Update.
11182
11183 2018-03-30 Tom Tromey <tom@tromey.com>
11184
11185 * windows-nat.c (handle_output_debug_string, handle_exception):
11186 Update.
11187 * target.h (target_read_string): Update.
11188 * target.c (target_read_string): Change "string" to
11189 unique_xmalloc_ptr.
11190 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11191 Update.
11192 * solib-frv.c (frv_current_sos): Update.
11193 * solib-dsbt.c (dsbt_current_sos): Update.
11194 * solib-darwin.c (darwin_current_sos): Update.
11195 * linux-thread-db.c (inferior_has_bug): Update.
11196 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11197 Update. Remove alloca.
11198 * ada-lang.c (ada_main_name): Update.
11199
11200 2018-03-30 Tom Tromey <tom@tromey.com>
11201
11202 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11203 (struct dwo_file_deleter): New.
11204 (dwo_file_up): New typedef.
11205 (open_and_init_dwo_file): Use dwo_file_up.
11206 (free_dwo_file_cleanup): Remove.
11207
11208 2018-03-30 Tom Tromey <tom@tromey.com>
11209
11210 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11211 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11212
11213 2018-03-30 Tom Tromey <tom@tromey.com>
11214
11215 * dwarf2read.c (class free_cached_comp_units): New class.
11216 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11217 (free_cached_comp_units): Remove function.
11218
11219 2018-03-30 Tom Tromey <tom@tromey.com>
11220
11221 * utils.h (make_cleanup_unpush_target): Remove.
11222 * inf-ptrace.c (struct target_unpusher): New.
11223 (target_unpush_up) New typedef.
11224 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11225 target_unpush_up.
11226 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11227
11228 2018-03-27 Tom Tromey <tom@tromey.com>
11229
11230 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11231
11232 2018-03-27 Pedro Alves <palves@redhat.com>
11233 Tom Tromey <tom@tromey.com>
11234
11235 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11236 destructor. Now a class.
11237 (gdb_readline_wrapper_cleanup): Remove function.
11238 (gdb_readline_wrapper): Remove cleanups.
11239
11240 2018-03-27 Tom Tromey <tom@tromey.com>
11241
11242 * typeprint.h (struct type_print_options) <local_typedefs,
11243 global_typedefs>: Remove "struct" keyword.
11244 (class typedef_hash_table): New class.
11245 (recursively_update_typedef_hash, add_template_parameters)
11246 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11247 (find_typedef_in_hash): Don't declare.
11248 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11249 (typedef_hash_table::recursively_update): Rename from
11250 recursively_update_typedef_hash. Now a member.
11251 (typedef_hash_table::add_template_parameters): Rename from
11252 add_template_parameters. Now a member.
11253 (typedef_hash_table::typedef_hash_table): Now a constructor;
11254 rename from create_typedef_hash.
11255 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11256 rename from free_typedef_hash.
11257 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11258 (do_free_global_table): Remove.
11259 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11260 from copy_type_recursive.
11261 (create_global_typedef_table): Remove.
11262 (typedef_hash_table::find_global_typedef): Now a member of
11263 typedef_hash_table.
11264 (typedef_hash_table::find_typedef): Rename from
11265 find_typedef_in_hash; now a member.
11266 (whatis_exp): Update.
11267 * extension.h (struct ext_lang_type_printers): Add constructor and
11268 destructor.
11269 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11270 declare.
11271 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11272 Now a constructor; rename from start_ext_lang_type_printers.
11273 (ext_lang_type_printers): Now a destructor; rename from
11274 free_ext_lang_type_printers.
11275 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11276 Update.
11277 (c_type_print_base_struct_union): Update. Remove cleanups.
11278
11279 2018-03-27 Tom Tromey <tom@tromey.com>
11280
11281 * dwarf-index-write.c: Include <cmath>.
11282
11283 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11284
11285 * NEWS: Add entry describing new "set|show varsize-limit" command.
11286 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11287 command.
11288 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11289 "set variable".
11290
11291 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11292
11293 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11294 dwarf-index-write.c
11295 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11296 * dwarf-index-common.c: New file.
11297 * dwarf-index-common.h: New file.
11298 * dwarf-index-write.c: New file.
11299 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11300 (struct dwarf2_section_info): Move from here.
11301 (dwarf2_section_info_def): Likewise.
11302 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11303 (offset_type): Likewise.
11304 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11305 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11306 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11307 (byte_swap): Likewise.
11308 (MAYBE_SWAP): Likewise.
11309 (dwarf2_per_cu_ptr): Likewise.
11310 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11311 (struct tu_stats): Likewise.
11312 (struct dwarf2_per_objfile): Likewise.
11313 (struct dwarf2_per_cu_data): Likewise.
11314 (struct signatured_type): Likewise.
11315 (sig_type_ptr): Likewise.
11316 (DEF_VEC_P (sig_type_ptr)): Likewise.
11317 (INDEX4_SUFFIX): Likewise.
11318 (INDEX5_SUFFIX): Likewise.
11319 (DEBUG_STR_SUFFIX): Likewise.
11320 (dwarf2_read_section): Make non-static.
11321 (mapped_index_string_hash): Move from here.
11322 (dwarf5_djb_hash): Likewise.
11323 (file_write): Likewise.
11324 (class data_buf): Likewise.
11325 (struct symtab_index_entry): Likewise.
11326 (struct mapped_symtab): Likewise.
11327 (find_slot): Likewise.
11328 (hash_expand): Likewise.
11329 (add_index_entry): Likewise.
11330 (uniquify_cu_indices): Likewise.
11331 (class c_str_view): Likewise.
11332 (class c_str_view_hasher): Likewise.
11333 (class vector_hasher): Likewise.
11334 (write_hash_table): Likewise.
11335 (psym_index_map): Likewise.
11336 (struct addrmap_index_data): Likewise.
11337 (add_address_entry): Likewise.
11338 (add_address_entry_worker): Likewise.
11339 (write_address_map): Likewise.
11340 (symbol_kind): Likewise.
11341 (write_psymbols): Likewise.
11342 (struct signatured_type_index_data): Likewise.
11343 (write_one_signatured_type): Likewise.
11344 (recursively_count_psymbols): Likewise.
11345 (recursively_write_psymbols): Likewise.
11346 (class debug_names): Likewise.
11347 (check_dwarf64_offsets): Likewise.
11348 (psyms_seen_size): Likewise.
11349 (write_gdbindex): Likewise.
11350 (write_debug_names): Likewise.
11351 (assert_file_size): Likewise.
11352 (write_psymtabs_to_index): Likewise.
11353 (save_gdb_index_command): Likewise.
11354 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11355 command.
11356 * dwarf2read.h: New file.
11357
11358 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11359
11360 PR gdb/22670
11361 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11362 symbol name if the CU's language stores symbol names in linkage
11363 format.
11364 * language.h (struct language_defn)
11365 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11366 all instances of this struct.
11367
11368 2018-03-26 Tom Tromey <tom@tromey.com>
11369
11370 * stack.c (backtrace_command_1): Remove verbose code.
11371
11372 2018-03-26 Tom Tromey <tom@tromey.com>
11373
11374 * python/py-framefilter.c (py_print_type): Don't catch
11375 exceptions. Return void.
11376 (py_print_value): Likewise.
11377 (py_print_single_arg): Likewise.
11378 (enumerate_args): Don't catch exceptions.
11379 (py_print_args): Likewise.
11380 (py_print_frame): Likewise.
11381 (gdbpy_apply_frame_filter): Catch exceptions here.
11382
11383 2018-03-26 Tom Tromey <tom@tromey.com>
11384
11385 * stack.c (_initialize_stack): Remove trailing newlines from help
11386 text. Add "Usage" line to "backtrace" help.
11387
11388 2018-03-26 Tom Tromey <tom@tromey.com>
11389
11390 PR python/16486:
11391 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11392
11393 2018-03-26 Tom Tromey <tom@tromey.com>
11394
11395 * python/py-framefilter.c (py_print_single_arg): Return
11396 EXT_LANG_BT_ERROR from catch.
11397
11398 2018-03-26 Tom Tromey <tom@tromey.com>
11399
11400 PR backtrace/15584:
11401 * stack.c (backtrace_command_1): Move some code into no-filters
11402 "if".
11403
11404 2018-03-26 Tom Tromey <tom@tromey.com>
11405
11406 * python/py-framefilter.c (throw_quit_or_print_exception): New
11407 function.
11408 (gdbpy_apply_frame_filter): Use it.
11409
11410 2018-03-26 Tom Tromey <tom@tromey.com>
11411
11412 PR cli/17716:
11413 * python/py-framefilter.c (py_print_type, py_print_value)
11414 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11415 RETURN_MASK_ERROR.
11416
11417 2018-03-26 Tom Tromey <tom@tromey.com>
11418
11419 * python/py-framefilter.c (enumerate_args): Use
11420 gdb::unique_xmalloc_ptr.
11421
11422 2018-03-26 Tom Tromey <tom@tromey.com>
11423
11424 * python/py-framefilter.c (py_print_frame): Return
11425 EXT_LANG_BT_OK.
11426 (gdbpy_apply_frame_filter): Update comment.
11427 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11428 Remove.
11429 <EXT_LANG_BT_NO_FILTERS>: Change value.
11430
11431 2018-03-26 Tom Tromey <tom@tromey.com>
11432
11433 PR backtrace/15582:
11434 * stack.c (backtrace_command): Parse "hide" argument.
11435 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11436 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11437 constant.
11438
11439 2018-03-26 Tom Tromey <tom@tromey.com>
11440
11441 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11442 add "flags".
11443 (backtrace_command): Remove "fulltrace", add "flags".
11444
11445 2018-03-26 Tom Tromey <tom@tromey.com>
11446
11447 * stack.c (backtrace_command): Rewrite command line parsing.
11448
11449 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11450
11451 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11452
11453 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11454
11455 * filename-seen-cache.h: Add include guard.
11456
11457 2018-03-26 Keith Seitz <keiths@redhat.com>
11458
11459 * symfile.c (place_section): Remove "struct" from section_addr_info
11460 in comment.
11461 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11462 "struct" keyword from section_addr_info.
11463
11464 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11465
11466 * regformats/regdef.h (reg): Add constructors.
11467
11468 2018-03-25 Pedro Alves <palves@redhat.com>
11469
11470 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11471 if then/else bodies in var_func_name extraction.
11472
11473 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11474
11475 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11476 lookup_minimal_symbol() to find symbol entry.
11477 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11478
11479 2018-03-23 Keith Seitz <keiths@redhat.com>
11480
11481 PR c++/22968
11482 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11483 nested type definitions for C++, too.
11484
11485 2018-03-23 Tom Tromey <tom@tromey.com>
11486
11487 * machoread.c (struct oso_el): Add a constructor. Don't define as
11488 a typedef.
11489 (macho_register_oso): Remove.
11490 (macho_symtab_read): Take a std::vector.
11491 (oso_el_compare_name): Now a std::sort comparator.
11492 (macho_symfile_read_all_oso): Take a std::vector.
11493 (macho_symfile_read): Use std::vector. Remove cleanups.
11494
11495 2018-03-22 Tom Tromey <tom@tromey.com>
11496
11497 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11498 (record_full_goto_bookmark): Use std::string.
11499
11500 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11501
11502 PR tdep/18295
11503 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11504 a single mask.
11505
11506 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11507
11508 * rs6000-tdep.c (store_insn_p): New function.
11509 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11510 and cr_reg to their unshifted values. Use store_insn_p to
11511 match LR saves using either R1 or fdata->alloca_reg. Use
11512 store_insn_p to match CR saves. Set alloca_reg_offset
11513 when alloca_reg and framep are set. Remove lr_reg shift
11514 when assigning to fdata->lr_register.
11515
11516 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11517
11518 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11519 command line args instead of emitting a warning.
11520
11521 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11522
11523 * tracepoint.h (struct static_tracepoint_marker): Initialize
11524 fields, define default constructor, move constructor and move
11525 assignment, disable the rest.
11526 <str_id, extra>: Make std::string.
11527 (release_static_tracepoint_marker): Remove.
11528 (free_current_marker): Remove.
11529 * tracepoint.c (free_current_marker): Remove.
11530 (parse_static_tracepoint_marker_definition): Adjust to
11531 std::string, use new hex2str overload.
11532 (release_static_tracepoint_marker): Remove.
11533 (print_one_static_tracepoint_marker): Get marker by reference
11534 and adjust to std::string.
11535 (info_static_tracepoint_markers_command): Adjust to std::vector
11536 changes
11537 * target.h (static_tracepoint_marker_p): Remove typedef.
11538 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11539 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11540 bool.
11541 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11542 * target-debug.h
11543 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11544 (target_debug_print_std_vector_static_tracepoint_marker): New.
11545 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11546 to...
11547 (target_debug_print_static_tracepoint_marker_p): ... this.
11548 * target-delegates.c: Re-generate.
11549 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11550 Make std::string.
11551 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11552 (decode_static_tracepoint_spec): Adjust to std::vector.
11553 (tracepoint_print_one_detail): Adjust to std::string.
11554 (strace_marker_decode_location): Adjust to std::string.
11555 (update_static_tracepoint): Adjust to std::string, remove call
11556 to release_static_tracepoint_marker.
11557 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11558 Adjust to std::vector.
11559 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11560 (remote_static_tracepoint_markers_by_strid): Adjust to
11561 std::vector.
11562 * common/rsp-low.h (hex2str): New overload with explicit count
11563 of bytes.
11564 * common/rsp-low.c (hex2str): New overload with explicit count
11565 of bytes.
11566 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11567 (_initialize_rsp_low_selftests): Add test_hex2str test.
11568 * unittests/tracepoint-selftests.c
11569 (test_parse_static_tracepoint_marker_definition): Adjust to
11570 std::string.
11571
11572 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11573
11574 * tracepoint.c (parse_static_tracepoint_marker_definition):
11575 Consider case where the definition is followed by more
11576 definitions.
11577 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11578 tracepoint-selftests.c.
11579 * unittests/tracepoint-selftests.c: New.
11580
11581 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11582
11583 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11584 Carvalho.
11585
11586 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11587
11588 * symtab.c (find_pc_sect_line): fixed indentation.
11589
11590 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11591
11592 * symtab.c (find_pc_sect_line): now uses binary search.
11593
11594 2018-03-19 Tom Tromey <tom@tromey.com>
11595
11596 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11597 "IDENT" production.
11598
11599 2018-03-19 Pedro Alves <palves@redhat.com>
11600 Tom Tromey <tom@tromey.com>
11601
11602 * unittests/observable-selftests.c: New file.
11603 * common/observable.h: New file.
11604 * observable.h: New file.
11605 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11606 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11607 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11608 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11609 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11610 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11611 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11612 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11613 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11614 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11615 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11616 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11617 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11618 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11619 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11620 tui/tui-interp.c, valops.c: Update all users.
11621 * tui/tui-hooks.c (tui_bp_created_observer)
11622 (tui_bp_deleted_observer, tui_bp_modified_observer)
11623 (tui_inferior_exit_observer, tui_before_prompt_observer)
11624 (tui_normal_stop_observer, tui_register_changed_observer):
11625 Remove.
11626 (tui_observers_token): New global.
11627 (attach_or_detach, tui_attach_detach_observers): New functions.
11628 (tui_install_hooks, tui_remove_hooks): Use
11629 tui_attach_detach_observers.
11630 * record-btrace.c (record_btrace_thread_observer): Remove.
11631 (record_btrace_thread_observer_token): New global.
11632 * observer.sh: Remove.
11633 * observer.c: Rename to observable.c.
11634 * observable.c (namespace gdb_observers): Define new objects.
11635 (observer_debug): Move into gdb_observers namespace.
11636 (struct observer, struct observer_list, xalloc_observer_list_node)
11637 (xfree_observer_list_node, generic_observer_attach)
11638 (generic_observer_detach, generic_observer_notify): Remove.
11639 (_initialize_observer): Update.
11640 Don't include observer.inc.
11641 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11642 (clean mostlyclean): Likewise.
11643 (observer.h, observer.inc): Remove targets.
11644 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11645 (COMMON_SFILES): Use observable.c, not observer.c.
11646 * .gitignore: Remove observer.h.
11647
11648 2018-03-18 Tom Tromey <tom@tromey.com>
11649
11650 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11651 gdb::def_vector.
11652 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11653
11654 2018-03-17 Tom Tromey <tom@tromey.com>
11655
11656 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11657
11658 2018-03-17 Tom Tromey <tom@tromey.com>
11659
11660 * target.c (class scoped_target_fd): New.
11661 (target_fileio_close_cleanup): Remove.
11662 (target_fileio_read_alloc_1): Use scoped_target_fd.
11663
11664 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11665
11666 * silent-rules.mk: New.
11667 * Makefile.in: Include silent-rules.mk
11668 (srcdir, VPATH, top_srcdir): Move up.
11669 (COMPILE): Add ECHO_CXX.
11670 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11671 (init.c): Add ECHO_INIT_C.
11672 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11673 (version.c): Add ECHO_GEN.
11674 (printcmd.o): Add ECHO_CXX.
11675 (target-float.o): Add ECHO_CXX.
11676 (ada-exp.o): Add ECHO_CXX.
11677 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11678 (insight$(EXEEXT)): Add ECHO_CXXLD.
11679 * gnulib/configure.ac: Add AM_SILENT_RULES.
11680 * gnulib/aclocal.m4: Re-generate.
11681 * gnulib/configure: Re-generate.
11682 * gnulib/import/Makefile.in: Re-generate.
11683
11684 2018-03-16 Tom Tromey <tom@tromey.com>
11685
11686 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11687 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11688 * utils.c (do_free_section_addr_info)
11689 (make_cleanup_free_section_addr_info): Remove.
11690 * symfile.h (struct other_sections): Add constructor.
11691 (struct section_addr_info): Remove.
11692 (section_addr_info): New typedef.
11693 (struct sym_fns) <sym_offsets>: Change type of parameter.
11694 (build_section_addr_info_from_objfile)
11695 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11696 (default_symfile_offsets, symbol_file_add)
11697 (symbol_file_add_from_bfd)
11698 (build_section_addr_info_from_section_table): Update.
11699 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11700 * symfile.c (alloc_section_addr_info): Remove.
11701 (build_section_addr_info_from_section_table): Change return type.
11702 Update.
11703 (build_section_addr_info_from_bfd)
11704 (build_section_addr_info_from_objfile): Likewise.
11705 (free_section_addr_info): Remove.
11706 (relative_addr_info_to_section_offsets): Change type of "addrs".
11707 (addrs_section_compar): Now a std::sort comparator.
11708 (addrs_section_sort): Change return type.
11709 (addr_info_make_relative): Change type of "addrs". Update.
11710 (default_symfile_offsets, syms_from_objfile_1)
11711 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11712 (symbol_file_add_separate): Update.
11713 (symbol_file_add): Change type of "addrs". Update.
11714 (add_symbol_file_command): Update. Remove cleanups.
11715 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11716 cleanups.
11717 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11718 * solib.c (solib_read_symbols): Update.
11719 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11720 * machoread.c (macho_symfile_offsets): Update.
11721 * jit.c (jit_bfd_try_read_symtab): Update.
11722
11723 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11724
11725 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11726 unittests/utils-selftests.c.
11727 * unittests/utils-selftests.c: New file.
11728
11729 2018-03-14 Tom Tromey <tom@tromey.com>
11730
11731 PR cli/14977:
11732 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11733 for NULL.
11734
11735 2018-03-14 Tom Tromey <tom@tromey.com>
11736
11737 PR cli/19918:
11738 * printcmd.c (printf_pointer): Allow "-" in format.
11739
11740 2018-03-14 Tom Tromey <tom@tromey.com>
11741
11742 * printcmd.c (_initialize_printcmd): Add usage to printf.
11743
11744 2018-03-14 Yao Qi <qiyao@sourceware.org>
11745
11746 * MAINTAINERS: Update my email address.
11747
11748 2018-03-13 Tom Tromey <tom@tromey.com>
11749
11750 * machoread.c (macho_check_dsym): Change filenamep to a
11751 std::string*.
11752 (macho_symfile_read): Update.
11753 * symfile.c (load_command): Use std::string.
11754
11755 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11756
11757 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11758 to error message string.
11759 (riscv_register_name): Use xsnprintf instead of sprintf.
11760 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11761 internal_error.
11762 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11763 error.
11764 (riscv_push_dummy_call): Likewise.
11765
11766 2018-03-12 Tom Tromey <tom@tromey.com>
11767
11768 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11769 Use gdb::byte_vector.
11770 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11771
11772 2018-03-12 Yao Qi <yao.qi@linaro.org>
11773
11774 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11775 parameter type to readable_regcache.
11776 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11777 the declaration.
11778
11779 2018-03-11 Tom Tromey <tom@tromey.com>
11780
11781 * dwarf2read.c (struct nextfield): Add initializers.
11782 (struct nextfnfield): Remove.
11783 (struct fnfieldlist): Add initializers. Remove "length" and
11784 "head", use std::vector.
11785 (struct decl_field_list): Remove.
11786 (struct field_info): Add initializers.
11787 <fields, baseclasses>: Now std::vector.
11788 <nbaseclasses, nfnfields, typedef_field_list_count,
11789 nested_types_list_count>: Remove.
11790 (dwarf2_add_field, dwarf2_add_type_defn)
11791 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11792 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11793 (process_structure_scope): Update.
11794
11795 2018-03-11 Tom Tromey <tom@tromey.com>
11796
11797 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11798 for use by std::sort.
11799 (build_type_psymtabs_1): Use std::vector.
11800
11801 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11802
11803 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11804 and LIBMPFR in the printed configuration.
11805
11806 2018-03-08 Tom Tromey <tom@tromey.com>
11807
11808 * source.c (get_filename_and_charpos): Use scoped_fd.
11809 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11810 (procfs_pidlist): Likewise.
11811 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11812 (iterate_over_mappings): Likewise.
11813
11814 2018-03-08 Tom Tromey <tom@tromey.com>
11815
11816 * infcall.c (struct call_return_meta_info)
11817 <stack_temporaries_enabled>: Remove.
11818 (get_call_return_value, call_function_by_hand_dummy): Update.
11819 * thread.c (disable_thread_stack_temporaries): Remove.
11820 (enable_thread_stack_temporaries): Remove.
11821 (thread_stack_temporaries_enabled_p): Return bool.
11822 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11823 (get_last_thread_stack_temporary): Update.
11824 * eval.c (evaluate_subexp): Update.
11825 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11826 class, not a function.
11827 (value_ptr, value_vec): Remove typedefs.
11828 (class thread_info) <stack_temporaries_enabled>: Now bool.
11829 <stack_temporaries>: Now a std::vector.
11830 (thread_stack_temporaries_enabled_p)
11831 (value_in_thread_stack_temporaries): Return bool.
11832
11833 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11834
11835 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11836 (getpkt_or_notif_sane_1): Likewise.
11837
11838 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11839
11840 * build-id.c (build_id_to_debug_bfd): Use std::string.
11841
11842 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11843
11844 * build-id.c (find_separate_debug_file_by_buildid): Return
11845 std::string.
11846 * build-id.h (find_separate_debug_file_by_buildid): Return
11847 std::string.
11848 * coffread.c (coff_symfile_read): Adjust to std::string.
11849 * elfread.c (elf_symfile_read): Adjust to std::string.
11850 * symfile.c (separate_debug_file_exists): Change parameter to
11851 std::string.
11852 (find_separate_debug_file): Return std::string.
11853 (find_separate_debug_file_by_debuglink): Return std::string.
11854 * symfile.h (find_separate_debug_file_by_debuglink): Return
11855 std::string.
11856
11857 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11858
11859 * common/xml-utils.c (xml_escape_text): Move code to...
11860 (xml_escape_text_append): ... this new function.
11861 * common/xml-utils.h (xml_escape_text_append): New declaration.
11862 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11863 New function.
11864 (_initialize_xml_utils): register test_xml_escape_text_append as
11865 a selftest.
11866
11867 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11868
11869 * defs.h: Remove MAX_REGISTER_SIZE.
11870 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11871 asserts.
11872 * python/py-unwind.c (pyuw_sniffer): Likewise.
11873
11874 2018-03-07 Tom Tromey <tom@tromey.com>
11875
11876 * linux-tdep.c (linux_info_proc): Update.
11877 * target.h (struct target_ops) <to_fileio_readlink>: Return
11878 optional<string>.
11879 (target_fileio_readlink): Return optional<string>.
11880 * remote.c (remote_hostio_readlink): Return optional<string>.
11881 * inf-child.c (inf_child_fileio_readlink): Return
11882 optional<string>.
11883 * target.c (target_fileio_readlink): Return optional<string>.
11884
11885 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11886
11887 * regcache.c (cooked_read_test): Add riscv to the list of
11888 architectures that have a save_reggroup.
11889
11890 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11891
11892 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11893 value is not a dynamic class object.
11894
11895 2018-03-06 Tom Tromey <tom@tromey.com>
11896
11897 * rust-exp.y: Formatting fixes.
11898
11899 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11900
11901 * riscv-tdep.c (riscv_register_name): Remove target description
11902 support.
11903 (riscv_gdbarch_init): Remove target description check.
11904
11905 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11906
11907 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11908 comment.
11909 * riscv-tdep.h: Likewise.
11910
11911 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11912
11913 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11914 (riscv_pseudo_register_write): Delete.
11915 (riscv_gdbarch_init): Remove all use of pseudo registers.
11916
11917 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11918
11919 * record-btrace.c (btrace_print_lines): Replace cleanup
11920 parameter with RAII equivalents.
11921 (btrace_insn_history): Replace cleanup with RAII equivalents.
11922 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11923 make_cleanup_ui_out_tuple_begin_end): Remove.
11924 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11925 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11926 make_cleanup_ui_out_list_begin_end): Remove.
11927
11928 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11929
11930 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11931 parameter types to std::vector. Use bool.
11932 (record_btrace_wait): Replace VEC(tp_t) with
11933 std::vector<thread_info *>.
11934 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11935
11936 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11937
11938 * record-btrace.c (record_btrace_disable_callback): Remove.
11939 (struct scoped_btrace_disable): New.
11940 (record_btrace_open): Use scoped_btrace_disable.
11941
11942 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11943
11944 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11945 reading values from registers.
11946
11947 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11948
11949 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11950 where appropriate.
11951
11952 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11953
11954 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11955 change parameter type. Use GDB's print functions, and use
11956 core_addr_to_string where appropriate.
11957 (riscv_push_dummy_call): Use core_addr_to_string where
11958 appropriate, update call to riscv_print_arg_location, and reindent
11959 a few lines.
11960 (riscv_return_value): Update call to riscv_print_arg_location.
11961
11962 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11963 Tim Newsome <tim@sifive.com>
11964 Albert Ou <a0u@eecs.berkeley.edu>
11965 Darius Rad <darius@bluespec.com>
11966
11967 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11968 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11969 (ALLDEPFILES): Add riscv-tdep.c
11970 * configure.tgt: Add riscv support.
11971 * riscv-tdep.c: New file.
11972 * riscv-tdep.h: New file.
11973 * NEWS: Mention new target.
11974 * MAINTAINERS: Add entry for riscv.
11975
11976 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11977
11978 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11979 fields within aggregates.
11980
11981 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11982
11983 * record-btrace.c (btrace_print_lines): Change type of flags to
11984 gdb_disassembly_flags.
11985
11986 2018-03-04 John Baldwin <jhb@FreeBSD.org>
11987
11988 * fbsd-nat.c: Include "inf-ptrace.h".
11989 (USE_SIGTRAP_SIGINFO): Conditionally define.
11990 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11991 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11992 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11993 function.
11994 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11995 Likewise.
11996 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11997 Likewise.
11998 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11999 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12000 "supports_stopped_by_hw_breakpoint" target methods.
12001
12002 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12003
12004 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12005 * fbsd-nat.c (debug_fbsd_nat): New variable.
12006 (show_fbsd_nat_debug): New function.
12007 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12008 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12009
12010 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12011
12012 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12013 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12014 prototype.
12015 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12016 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12017 method.
12018
12019 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12020
12021 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12022 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12023
12024 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12025
12026 * charset.c (struct charset_vector): New.
12027 (charsets): Change type to charset_vector.
12028 (find_charset_names): Adjust.
12029 (add_one): Adjust.
12030 (_initialize_charset): Adjust.
12031
12032 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12033
12034 * progspace.h (struct program_space) <deleted_solibs>: Change
12035 type to std::vector<std::string>.
12036 * progspace.c (clear_program_space_solib_cache): Adjust.
12037 * breakpoint.c (print_solib_event): Adjust.
12038 (check_status_catch_solib): Adjust.
12039 * solib.c (update_solib_list): Adjust.
12040 * ui-out.h (class ui_out) <field_string>: New overload.
12041 * ui-out.c (ui_out::field_string): New overload.
12042
12043 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12044
12045 * progspace.h (struct program_space): Add constructor and
12046 destructor, initialize fields.
12047 (add_program_space): Remove.
12048 * progspace.c (add_program_space): Rename to...
12049 (program_space::program_space): ... this.
12050 (release_program_space): Rename to...
12051 (program_space::~program_space): ... this.
12052 (delete_program_space): Use delete to delete program_space.
12053 (initialize_progspace): Use new to allocate program_space.
12054 * inferior.c (add_inferior_with_spaces): Likewise.
12055 (clone_inferior_command): Likewise.
12056 * infrun.c (follow_fork_inferior): Likewise.
12057 (handle_vfork_child_exec_or_exit): Likewise.
12058
12059 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12060
12061 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12062 (delim_string_to_char_ptr_vec): Return std::vector of
12063 gdb::unique_xmalloc_ptr.
12064 (dirnames_to_char_ptr_vec_append): Take std::vector of
12065 gdb::unique_xmalloc_ptr.
12066 (dirnames_to_char_ptr_vec): Return std::vector of
12067 gdb::unique_xmalloc_ptr.
12068 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12069 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12070 (delim_string_to_char_ptr_vec): Return an std::vector of
12071 gdb::unique_xmalloc_ptr, adjust the code.
12072 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12073 gdb::unique_xmalloc_ptr, adjust the code.
12074 (dirnames_to_char_ptr_vec): Return an std::vector of
12075 gdb::unique_xmalloc_ptr, adjust the code.
12076 * auto-load.c (auto_load_safe_path_vec): Change type to
12077 std::vector of gdb::unique_xmalloc_ptr.
12078 (auto_load_expand_dir_vars): Return an std::vector of
12079 gdb::unique_xmalloc_ptr, adjust the code.
12080 (auto_load_safe_path_vec_update): Adjust.
12081 (filename_is_in_auto_load_safe_path_vec): Adjust.
12082 (auto_load_objfile_script_1): Adjust.
12083 * build-id.c (build_id_to_debug_bfd): Adjust.
12084 * linux-thread-db.c (thread_db_load_search): Adjust.
12085 * source.c (add_path): Adjust.
12086 (openp): Adjust.
12087 * symfile.c (find_separate_debug_file): Adjust.
12088 * utils.c (do_free_char_ptr_vec): Remove.
12089 (make_cleanup_free_char_ptr_vec): Remove.
12090
12091 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12092
12093 PR gdb/22907
12094 * common/pathstuff.c: Conditionally include "<windows.h>".
12095
12096 2018-03-01 Georg Sauthoff <mail@georg.so>
12097
12098 PR gdb/22888
12099 * gcore.in: Quote variables and switch interpreter to bash.
12100
12101 2018-03-01 Tom Tromey <tom@tromey.com>
12102
12103 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12104 assertion. Add assertion for discriminant_index.
12105 (quirk_rust_enum): Use correct base type name in univariant case.
12106
12107 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12108
12109 * record.c (get_call_history_modifiers): Return a
12110 record_print_flags.
12111 (cmd_record_call_history): Adjust.
12112 * record-btrace.c (record_btrace_call_history): Adjust.
12113 (record_btrace_call_history_range): Adjust.
12114 (record_btrace_call_history_from): Adjust.
12115 * target-debug.h (target_debug_print_record_print_flags): New.
12116 * target-delegates.c: Re-generate.
12117 * target.c (target_call_history): Change flags type.
12118 (target_call_history_from): Likewise.
12119 (target_call_history_range): Likewise.
12120 * target.h (struct target_ops) <target_call_history>: Likewise.
12121 (target_call_history_from): Likewise.
12122 (target_call_history_range): Likewise.
12123
12124 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12125 Simon Marchi <simon.marchi@polymtl.ca>
12126
12127 * common/common-utils.c: Include "sys/stat.h".
12128 (is_regular_file): Move here from "source.c"; change return
12129 type to "bool".
12130 * common/common-utils.h (is_regular_file): New prototype.
12131 * common/pathstuff.c (contains_dir_separator): New function.
12132 * common/pathstuff.h (contains_dir_separator): New prototype.
12133 * source.c: Don't include "sys/stat.h".
12134 (is_regular_file): Move to "common/common-utils.c".
12135
12136 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12137
12138 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12139 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12140 * auto-load.c: Include "common/pathstuff.h".
12141 * common/common-def.h (current_directory): Move here.
12142 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12143 function.
12144 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12145 prototype.
12146 * common/pathstuff.c: New file.
12147 * common/pathstuff.h: New file.
12148 * compile/compile.c: Include "common/pathstuff.h".
12149 * defs.h (current_directory): Move to "common/common-defs.h".
12150 * dwarf2read.c: Include "common/pathstuff.h".
12151 * exec.c: Likewise.
12152 * guile/scm-safe-call.c: Likewise.
12153 * linux-thread-db.c: Likewise.
12154 * main.c: Likewise.
12155 * nto-tdep.c: Likewise.
12156 * objfiles.c: Likewise.
12157 * source.c: Likewise.
12158 * symtab.c: Likewise.
12159 * utils.c: Include "common/pathstuff.h".
12160 (gdb_realpath): Move to "common/pathstuff.c".
12161 (gdb_realpath_keepfile): Likewise.
12162 (gdb_abspath): Likewise.
12163 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12164 (gdb_realpath_keepfile): Likewise.
12165 (gdb_abspath): Likewise.
12166
12167 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12168
12169 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12170 wildcard process pid for super_resume for kernels with a
12171 specific bug.
12172
12173 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12174
12175 * compile/compile.c (get_args): Add additional comments
12176 explaining function.
12177
12178 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12179 Tom Tromey <tom@tromey.com>
12180
12181 * target.h (memory_write_request_s): Remove typedef. Don't define
12182 VEC.
12183 (target_write_memory_blocks): Change argument to std::vector.
12184 (struct memory_write_request): Add constructor.
12185 * target-memory.c (compare_block_starting_address): Return bool.
12186 Change argument types.
12187 (claim_memory): Change arguments to use std::vector.
12188 (split_regular_and_flash_blocks, blocks_to_erase)
12189 (compute_garbled_blocks): Likewise.
12190 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12191 (target_write_memory_blocks): Change argument to std::vector.
12192 * symfile.c (struct load_section_data): Add constructor and
12193 destructor. Use std::vector for "requests".
12194 (struct load_progress_data): Add initializers.
12195 (load_section_callback): Update. Use "new".
12196 (clear_memory_write_data): Remove.
12197 (generic_load): Update.
12198
12199 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12200
12201 * arch/aarch64.h: Use common/tdesc.h.
12202
12203 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12204
12205 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12206 architecture with a 64-bit ABI.
12207
12208 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12209
12210 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12211 ahead of target description loading.
12212
12213 2018-02-26 Tom Tromey <tom@tromey.com>
12214
12215 * stack.c (backtrace_command_1): Update.
12216 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12217 of "flags".
12218 * python/py-framefilter.c (py_print_frame)
12219 (gdbpy_apply_frame_filter): Change type of "flags".
12220 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12221 of "flags".
12222 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12223 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12224 * extension.h (enum frame_filter_flag): Rename from
12225 frame_filter_flags.
12226 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12227 (apply_ext_lang_frame_filter): Change type of "flags".
12228 * extension.c (apply_ext_lang_frame_filter): Change type of
12229 "flags".
12230 * extension-priv.h (struct extension_language_ops)
12231 <apply_frame_filter>: Change type of "flags".
12232
12233 2018-02-26 Tom Tromey <tom@tromey.com>
12234
12235 PR python/16497:
12236 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12237 off-by-one in py_end computation.
12238 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12239 PRINT_MORE_FRAMES.
12240 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12241 constant.
12242
12243 2018-02-26 Tom Tromey <tom@tromey.com>
12244
12245 * dwarf2read.c (struct variant_field): New.
12246 (struct nextfield) <variant>: New field.
12247 (dwarf2_add_field): Handle DW_TAG_variant_part.
12248 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12249 discriminated union.
12250 (read_structure_type): Handle DW_TAG_variant_part.
12251 (handle_struct_member_die): New function, extracted from
12252 process_structure_scope. Handle DW_TAG_variant.
12253 (process_structure_scope): Handle discriminated unions. Call
12254 handle_struct_member_die.
12255
12256 2018-02-26 Tom Tromey <tom@tromey.com>
12257
12258 * rust-lang.h (rust_last_path_segment): Declare.
12259 * rust-lang.c (rust_last_path_segment): Now public. Change
12260 contract.
12261 (struct disr_info): Remove.
12262 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12263 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12264 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12265 (rust_enum_p, rust_enum_variant): New function.
12266 (rust_underscore_fields): Remove "offset" parameter.
12267 (rust_print_enum): New function.
12268 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12269 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12270 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12271 enums.
12272 (rust_internal_print_type): New function, from rust_print_type.
12273 Remove enum code.
12274 (rust_print_type): Call rust_internal_print_type.
12275 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12276 Update enum handling.
12277 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12278 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12279 (rust_union_quirks): New functions.
12280 (process_full_comp_unit, process_full_type_unit): Call
12281 rust_union_quirks.
12282 (process_structure_scope): Update rust_unions if necessary.
12283
12284 2018-02-26 Tom Tromey <tom@tromey.com>
12285
12286 * value.h (value_union_variant): Declare.
12287 * valops.c (value_union_variant): New function.
12288 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12289 (struct discriminant_info): New.
12290 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12291 enumerator.
12292 (struct main_type) <flag_discriminated_union>: New field.
12293
12294 2018-02-26 Tom Tromey <tom@tromey.com>
12295
12296 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12297 unittests/unpack-selftests.c.
12298 * unittests/unpack-selftests.c: New file.
12299 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12300
12301 2018-02-26 Yao Qi <yao.qi@linaro.org>
12302
12303 * dwarf2read.c (struct partial_die_info) <read>: New method.
12304 (read_partial_die): Remove the declaration.
12305 (load_partial_dies): Update.
12306 (partial_die_info::partial_die_info):
12307 (read_partial_die): Change it to partial_die_info::read.
12308
12309 2018-02-26 Yao Qi <yao.qi@linaro.org>
12310
12311 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12312 (fixup_partial_die): Remove declaration.
12313 (scan_partial_symbols): Update.
12314 (partial_die_parent_scope): Likewise.
12315 (partial_die_full_name): Likewise.
12316 (fixup_partial_die): Change it to partial_die_info::fixup.
12317
12318 2018-02-26 Yao Qi <yao.qi@linaro.org>
12319
12320 * dwarf2read.c (read_partial_die): Update the declaration.
12321 (load_partial_dies): Caller update.
12322 (read_partial_die): Remove one argument abbrev_len.
12323
12324 2018-02-26 Yao Qi <yao.qi@linaro.org>
12325
12326 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12327 assignment operator.
12328 (load_partial_dies): Use ctor and copy ctor.
12329 (read_partial_die): Update.
12330 (dwarf2_cu::find_partial_die): Use ctor.
12331
12332 2018-02-26 Yao Qi <yao.qi@linaro.org>
12333
12334 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12335 (find_partial_die_in_comp_unit): Change it to
12336 dwarf2_cu::find_partial_die.
12337 (find_partial_die): Update.
12338
12339 2018-02-26 Yao Qi <yao.qi@linaro.org>
12340
12341 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12342 is NULL.
12343
12344 2018-02-26 Yao Qi <yao.qi@linaro.org>
12345
12346 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12347
12348 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12349
12350 * arch/amd64.h: Use common/tdesc.h.
12351 * arch/i386.c: Likewise.
12352 * arch/i386.h: Likewise.
12353 * arch/tic6x.c: Likewise.
12354 * arch/tdesc.h: Move file from here...
12355 * common/tdesc.h: ...to here.
12356 * features/aarch64-core.c: Regenerate.
12357 * features/aarch64-fpu.c: Regenerate.
12358 * features/i386/32bit-avx.c: Regenerate.
12359 * features/i386/32bit-avx512.c: Regenerate.
12360 * features/i386/32bit-core.c: Regenerate.
12361 * features/i386/32bit-linux.c: Regenerate.
12362 * features/i386/32bit-mpx.c: Regenerate.
12363 * features/i386/32bit-pkeys.c: Regenerate.
12364 * features/i386/32bit-sse.c: Regenerate.
12365 * features/i386/64bit-avx.c: Regenerate.
12366 * features/i386/64bit-avx512.c: Regenerate.
12367 * features/i386/64bit-core.c: Regenerate.
12368 * features/i386/64bit-linux.c: Regenerate.
12369 * features/i386/64bit-mpx.c: Regenerate.
12370 * features/i386/64bit-pkeys.c: Regenerate.
12371 * features/i386/64bit-segments.c: Regenerate.
12372 * features/i386/64bit-sse.c: Regenerate.
12373 * features/i386/x32-core.c: Regenerate.
12374 * features/tic6x-c6xp.c: Regenerate.
12375 * features/tic6x-core.c: Regenerate.
12376 * features/tic6x-gp.c: Regenerate.
12377 * target-descriptions.c: Use common/tdesc.h.
12378 * target-descriptions.h: Likewise.
12379
12380 2018-02-24 Tom Tromey <tom@tromey.com>
12381
12382 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12383 (try_thread_db_load_from_dir, thread_db_load_search): Use
12384 std::string.
12385 (info_auto_load_libthread_db_compare): Return bool. Change
12386 argument types.
12387 (info_auto_load_libthread_db): Use std::vector, std::string.
12388 Remove cleanups.
12389
12390 2018-02-24 Tom Tromey <tom@tromey.com>
12391
12392 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12393 std::string.
12394 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12395 std::string*.
12396 * gdbarch.c: Rebuild.
12397 * gdbarch.h: Rebuild.
12398 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12399 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12400 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12401 std::string*.
12402
12403 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12404
12405 * gdbtypes.h (sect_offset): Change type to uint64_t.
12406 (sect_offset_str): New function.
12407 * dwarf2read.c (create_addrmap_from_aranges): Use
12408 sect_offset_str.
12409 (error_check_comp_unit_head): Likewise.
12410 (create_debug_type_hash_table): Likewise.
12411 (read_cutu_die_from_dwo): Likewise.
12412 (init_cutu_and_read_dies): Likewise.
12413 (init_cutu_and_read_dies_no_follow): Likewise.
12414 (process_psymtab_comp_unit_reader): Likewise.
12415 (partial_die_parent_scope): Likewise.
12416 (peek_die_abbrev): Likewise.
12417 (process_queue): Likewise.
12418 (dwarf2_physname): Likewise.
12419 (read_namespace_alias): Likewise.
12420 (read_import_statement): Likewise.
12421 (create_dwo_cu_reader): Likewise.
12422 (create_cus_hash_table): Likewise.
12423 (lookup_dwo_cutu): Likewise.
12424 (inherit_abstract_dies): Likewise.
12425 (read_func_scope): Likewise.
12426 (read_call_site_scope): Likewise.
12427 (dwarf2_add_member_fn): Likewise.
12428 (read_common_block): Likewise.
12429 (read_module_type): Likewise.
12430 (read_typedef): Likewise.
12431 (read_subrange_type): Likewise.
12432 (load_partial_dies): Likewise.
12433 (read_partial_die): Likewise.
12434 (find_partial_die): Likewise.
12435 (read_str_index): Likewise.
12436 (dwarf2_string_attr): Likewise.
12437 (build_error_marker_type): Likewise.
12438 (lookup_die_type): Likewise.
12439 (dump_die_shallow): Likewise.
12440 (follow_die_ref): Likewise.
12441 (dwarf2_fetch_die_loc_sect_off): Likewise.
12442 (dwarf2_fetch_constant_bytes): Likewise.
12443 (follow_die_sig): Likewise.
12444 (get_signatured_type): Likewise.
12445 (get_DW_AT_signature_type): Likewise.
12446 (dwarf2_find_containing_comp_unit): Likewise.
12447 (set_die_type): Likewise.
12448
12449 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12450
12451 * arch/aarch64.c: Include "common-defs.h".
12452 * arch/amd64.c: Likewise.
12453 * arch/i386.c: Likewise.
12454
12455 2018-02-21 Tom Tromey <tom@tromey.com>
12456
12457 * value.h: (extract_field_op): Update.
12458 * eval.c (extract_field_op): Return a const char *.
12459 * expression.h (parse_expression_for_completion): Update.
12460 * completer.c (complete_expression): Update.
12461 (add_struct_fields): Make fieldname const.
12462 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12463 (mark_completion_tag, parse_exp_in_context_1): Update.
12464 (parse_expression_for_completion): Change "name" to
12465 unique_xmalloc_ptr*.
12466
12467 2018-02-21 Tom Tromey <tom@tromey.com>
12468
12469 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12470
12471 2018-02-21 Yao Qi <yao.qi@linaro.org>
12472
12473 * avr-tdep.c (avr_read_pc): Change parameter type to
12474 readable_regcache.
12475 * gdbarch.sh (read_pc): Likewise.
12476 * gdbarch.c: Re-generated.
12477 * gdbarch.h: Re-generated.
12478 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12479 readable_regcache.
12480 * ia64-tdep.c (ia64_read_pc): Likewise.
12481 * mips-tdep.c (mips_read_pc): Likewise.
12482 * spu-tdep.c (spu_read_pc): Likewise.
12483
12484 2018-02-21 Yao Qi <yao.qi@linaro.org>
12485
12486 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12487 * regcache-dump.c: New file.
12488 * regcache.c: Move register_dump to regcache-dump.c.
12489 (maintenance_print_registers): Likewise.
12490 (maintenance_print_raw_registers): Likewise.
12491 (maintenance_print_cooked_registers): Likewise.
12492 (maintenance_print_register_groups): Likewise.
12493 (maintenance_print_remote_registers): Likewise.
12494 (_initialize_regcache): Likewise.
12495 * regcache.h (register_dump): Moved from regcache.c.
12496
12497 2018-02-21 Yao Qi <yao.qi@linaro.org>
12498
12499 * regcache.c (regcache::regcache): Update.
12500 (regcache::invalidate): Move it to detached_regcache::invalidate.
12501 (get_thread_arch_aspace_regcache): Update.
12502 (regcache::raw_update): Update.
12503 (regcache::cooked_read): Remove some code.
12504 (regcache::cooked_read_value): Likewise.
12505 (regcache::raw_write): Remove assert on m_readonly_p.
12506 (regcache::raw_supply_integer): Move it to
12507 detached_regcache::raw_supply_integer.
12508 (regcache::raw_supply_zeroed): Likewise.
12509 * regcache.h (detached_regcache) <raw_supply_integer>: New
12510 declaration.
12511 <raw_supply_zeroed, invalidate>: Likewise.
12512 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12513 <invalidate>: Likewise.
12514 <m_readonly_p>: Removed.
12515
12516 2018-02-21 Yao Qi <yao.qi@linaro.org>
12517
12518 * infcmd.c (get_return_value): Let stop_regs point to
12519 get_current_regcache.
12520 * regcache.c (regcache::regcache): Remove.
12521 (register_dump_reg_buffer): New class.
12522 (regcache_print): Adjust.
12523 * regcache.h (regcache): Remove constructors.
12524
12525 2018-02-21 Yao Qi <yao.qi@linaro.org>
12526
12527 * regcache.c (class register_dump): New class.
12528 (register_dump_regcache, register_dump_none): New class.
12529 (register_dump_remote, register_dump_groups): New class.
12530 (regcache_print): Update.
12531 * regcache.h (regcache_dump_what): Move it to regcache.c.
12532 (regcache) <dump>: Remove.
12533
12534 2018-02-21 Yao Qi <yao.qi@linaro.org>
12535
12536 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12537 reg_buffer_rw *.
12538 (jit_unwind_reg_set_impl): Call raw_supply.
12539 (jit_frame_sniffer): Use reg_buffer_rw.
12540 * record-full.c (record_full_core_regbuf): Change its type.
12541 (record_full_core_open_1): Use reg_buffer_rw.
12542 (record_full_close): Likewise.
12543 (record_full_core_fetch_registers): Use regcache->raw_supply.
12544 (record_full_core_store_registers): Likewise.
12545 * regcache.c (regcache::get_register_status): Move it to
12546 reg_buffer.
12547 (regcache_raw_set_cached_value): Remove.
12548 (regcache::raw_set_cached_value): Remove.
12549 (regcache::raw_write): Call raw_supply.
12550 (regcache::raw_supply): Move it to reg_buffer_rw.
12551 * regcache.h (regcache_raw_set_cached_value): Remove.
12552 (reg_buffer_rw): New class.
12553
12554 2018-02-21 Yao Qi <yao.qi@linaro.org>
12555
12556 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12557 readonly_detached_regcache.
12558 (dummy_frame_prev_register): Use regcache->cooked_read.
12559 * frame.c (frame_save_as_regcache): Change return type.
12560 (frame_pop): Update.
12561 * frame.h (frame_save_as_regcache): Update declaration.
12562 * inferior.h (get_infcall_suspend_state_regcache): Update
12563 declaration.
12564 * infrun.c (infcall_suspend_state) <registers>: use
12565 readonly_detached_regcache.
12566 (save_infcall_suspend_state): Don't use regcache_dup.
12567 (get_infcall_suspend_state_regcache): Change return type.
12568 * linux-fork.c (struct fork_info) <savedregs>: Change to
12569 readonly_detached_regcache.
12570 <pc>: New field.
12571 (fork_save_infrun_state): Don't use regcache_dup.
12572 (info_checkpoints_command): Adjust.
12573 * mi/mi-main.c (register_changed_p): Update declaration.
12574 (mi_cmd_data_list_changed_registers): Use
12575 readonly_detached_regcache.
12576 (register_changed_p): Change parameter type to
12577 readonly_detached_regcache.
12578 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12579 readonly_detached_regcache.
12580 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12581 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12582 New.
12583 (regcache::save): Move it to reg_buffer.
12584 (regcache::restore): Change parameter type.
12585 (regcache_dup): Remove.
12586 * regcache.h (reg_buffer) <save>: New method.
12587 (readonly_detached_regcache): New class.
12588 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12589 readonly_detached_regcache.
12590 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12591
12592 2018-02-21 Yao Qi <yao.qi@linaro.org>
12593
12594 * frame.c (frame_save_as_regcache): Use regcache method save.
12595 (frame_pop): Use regcache method restore.
12596 * infrun.c (restore_infcall_suspend_state): Likewise.
12597 * linux-fork.c (fork_load_infrun_state): Likewise.
12598 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12599 save.
12600 * regcache.c (regcache_save): Remove.
12601 (regcache::restore): More asserts.
12602 (regcache_cpy): Remove.
12603 * regcache.h (regcache_save): Remove the declaration.
12604 (regcache::restore): Move from private to public.
12605 Remove the friend declaration of regcache_cpy.
12606 (regcache_cpy): Remove declaration.
12607
12608 2018-02-21 Yao Qi <yao.qi@linaro.org>
12609
12610 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12611 parameter type to 'readable_regcache *'.
12612 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12613 * arm-tdep.c (arm_neon_quad_read): Likewise.
12614 (arm_pseudo_read): Likewise.
12615 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12616 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12617 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12618 * gdbarch.c: Re-generated.
12619 * gdbarch.h: Re-generated.
12620 * gdbarch.sh (pseudo_register_read): Change parameter type to
12621 'readable_regcache *'.
12622 (pseudo_register_read_value): Likewise.
12623 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12624 (h8300_pseudo_register_read): Likewise.
12625 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12626 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12627 (i386_pseudo_register_read_into_value): Likewise.
12628 (i386_pseudo_register_read_value): Likewise.
12629 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12630 declaration.
12631 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12632 * m32c-tdep.c (m32c_raw_read): Likewise.
12633 (m32c_read_flg): Likewise.
12634 (m32c_banked_register): Likewise.
12635 (m32c_banked_read): Likewise.
12636 (m32c_sb_read): Likewise.
12637 (m32c_part_read): Likewise.
12638 (m32c_cat_read): Likewise.
12639 (m32c_r3r2r1r0_read): Likewise.
12640 (m32c_pseudo_register_read): Likewise.
12641 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12642 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12643 (mep_pseudo_cr64_read): Likewise.
12644 (mep_pseudo_register_read): Likewise.
12645 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12646 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12647 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12648 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12649 (regcache::cooked_read): Likewise.
12650 (regcache::cooked_read_value): Likewise.
12651 (regcache_cooked_read_signed):
12652 (regcache::cooked_read): Likewise.
12653 * regcache.h (readable_regcache): New class.
12654 (regcache): Inherit readable_regcache. Move some methods to
12655 readable_regcache.
12656 * rl78-tdep.c (rl78_pseudo_register_read): Change
12657 parameter type to 'readable_regcache *'.
12658 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12659 (e500_pseudo_register_read): Change parameter type to
12660 'readable_regcache *'.
12661 (dfp_pseudo_register_read): Likewise.
12662 (vsx_pseudo_register_read): Likewise.
12663 (efpr_pseudo_register_read): Likewise.
12664 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12665 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12666 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12667 (sh64_pseudo_register_read): Likewise.
12668 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12669 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12670 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12671 (spu_pseudo_register_read): Likewise.
12672 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12673 (xtensa_pseudo_register_read): Likewise.
12674
12675 2018-02-21 Yao Qi <yao.qi@linaro.org>
12676
12677 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12678 (regcache::arch): Move it to reg_buffer::arch.
12679 (regcache::register_buffer): Likewise.
12680 (regcache::assert_regnum): Likewise.
12681 (regcache::num_raw_registers): Likewise.
12682 * regcache.h (reg_buffer): New class.
12683 (regcache): Inherit reg_buffer.
12684
12685 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12686
12687 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12688 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12689
12690 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12691
12692 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12693
12694 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12695
12696 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12697 (SFILES): Remove common/*.c files.
12698 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12699 * common/common.host: Add common reference.
12700 * configure.ac: Likewise.
12701 * configure: Regenerate.
12702
12703 2018-02-16 Yao Qi <yao.qi@linaro.org>
12704
12705 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12706 (block_initialize_namespace): Use new.
12707 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12708 (dwarf2_free_objfile): Use delete.
12709 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12710 (copy_type_recursive): Use new.
12711 * gdb_obstack.h (allocate_on_obstack): New.
12712
12713 2018-02-15 Yao Qi <yao.qi@linaro.org>
12714
12715 PR gdb/22849
12716 * inferior.c (exit_inferior_1): Reset inf->control.
12717
12718 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12719
12720 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12721 declaration.
12722
12723 2018-02-14 Pedro Alves <palves@redhat.com>
12724
12725 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12726 frame_cleanup_after_sniffer on exception.
12727
12728 2018-02-14 Tom Tromey <tom@tromey.com>
12729
12730 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12731 const.
12732 (solib_bfd_open): Make pathname const.
12733 * solib.c (solib_bfd_open): Make pathname const.
12734 * solib-spu.c (spu_bfd_fopen): Make name const.
12735 (spu_bfd_open): Make pathname const.
12736 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12737 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12738
12739 2018-02-14 Tom Tromey <tom@tromey.com>
12740
12741 * symfile.c (symfile_bfd_open): Update.
12742 * source.h (openp, source_full_path_of, find_and_open_source):
12743 Change argument type to unique_xmalloc_ptr.
12744 * source.c (openp): Take a unique_xmalloc_ptr.
12745 (source_full_path_of, find_and_open_source): Likewise.
12746 (open_source_file, symtab_to_fullname): Update.
12747 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12748 unique_xmalloc_ptr.
12749 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12750 (exec_file_find): Update.
12751 * psymtab.c (psymtab_to_fullname): Update.
12752 * nto-tdep.h (nto_find_and_open_solib): Update.
12753 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12754 unique_xmalloc_ptr.
12755 * exec.c (exec_file_attach): Update.
12756 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12757 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12758
12759 2018-02-14 Tom Tromey <tom@tromey.com>
12760
12761 * solib.c: Include source.h.
12762 * nto-tdep.c: Include source.h.
12763 * mi/mi-cmd-env.c: Include source.h.
12764 * infcmd.c: Include source.h.
12765 * exec.c: Include source.h.
12766 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12767 (add_path, directory_switch, source_path, init_source_path): Move
12768 declarations...
12769 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12770 (add_path, directory_switch, source_path, init_source_path):
12771 ...here.
12772
12773 2018-02-14 Tom Tromey <tom@tromey.com>
12774
12775 * solist.h (exec_file_find, solib_find): Return
12776 unique_xmalloc_ptr.
12777 (solib_bfd_fopen): Take a const char *.
12778 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12779 (exec_file_find, solib_find): Likewise.
12780 (solib_bfd_fopen): Do not take ownership of "pathname".
12781 (solib_bfd_open): Use unique_xmalloc_ptr.
12782 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12783 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12784 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12785 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12786
12787 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12788
12789 * ada-lang.c (name_match_type_from_name): Remove reference to
12790 ada_name_for_lookup in function's documentation.
12791 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12792
12793 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12794
12795 * defs.h (enum openp_flags): New enum.
12796 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12797 Move to enum openp_flags.
12798 (openp_flags): New enum flags.
12799 (openp): Change parameter type to openp_flags.
12800 * source.c (openp): Change parameter type to openp_flags.
12801 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12802 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12803
12804 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12805
12806 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12807 per-command.
12808
12809 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12810
12811 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12812 into...
12813 (class dwarf2_queue_guard): ...the destructor of this new class.
12814 (dw2_do_instantiate_symtab): Create instance of the new class
12815 dwarf2_queue_guard, remove cleanup.
12816
12817 2018-02-09 Tom Tromey <tom@tromey.com>
12818
12819 * source.c (find_source_lines): Don't reference past the end of
12820 the vector.
12821
12822 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12823
12824 * remote.c (remote_btrace_maybe_reopen): Change error message.
12825 * btrace.c (btrace_enable): Likewise.
12826 (parse_xml_btrace): Likewise.
12827 (parse_xml_btrace_conf): Likewise.
12828
12829 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12830
12831 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12832 (linux_enable_pt, linux_enable_bts): Call
12833 diagnose_perf_event_open_fail.
12834
12835 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12836
12837 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12838 Remove parameter and change return type. Update callers. Move it.
12839 (linux_enable_bts, linux_enable_pt): Improve error message.
12840 (linux_enable_pt): Remove zero buffer size check.
12841 (linux_enable_btrace): Improve error messages. Remove NULL return
12842 check.
12843
12844 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12845
12846 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12847 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12848 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12849 (linux_supports_pt, linux_supports_btrace): Remove.
12850 (linux_enable_bts): Call cpu_supports_bts.
12851 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12852 * remote.c (remote_supports_btrace): Remove.
12853 (init_remote_ops): Remove remote_supports_btrace.
12854 * target-delegates.c: Regenerated.
12855 * target.c (target_supports_btrace): Remove.
12856 * target.h (target_ops) <to_supports_btrace>: Remove
12857 (target_supports_btrace): Remove.
12858 * x86-linux-nat.c (x86_linux_create_target): Remove
12859 linux_supports_btrace.
12860
12861 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12862
12863 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12864 btrace failed.
12865 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12866 exception and use message in own exception.
12867
12868 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12869
12870 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12871 (perf_event_pt_event_type): Use gdb_file_up.
12872 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12873 scoped_fd, and scoped_mmap.
12874
12875 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12876
12877 * common/scoped_mmap.h: New.
12878 * unittests/scoped_mmap-selftest.c: New.
12879 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12880 unittests/scoped_mmap-selftest.c.
12881
12882 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12883
12884 * common/scoped_fd.h: New.
12885 * unittests/scoped_fd-selftest.c: New.
12886 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12887 unittests/scoped_fd-selftest.c.
12888
12889 2018-02-09 Tom Tromey <tom@tromey.com>
12890
12891 * auto-load.c (auto_load_section_scripts): Use
12892 gdb::unique_xmalloc_ptr.
12893
12894 2018-02-09 Tom Tromey <tom@tromey.com>
12895
12896 * auto-load.c (execute_script_contents): Use std::string.
12897
12898 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12899
12900 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12901 Python function, rather than a new command.
12902
12903 2018-02-08 Tom Tromey <tom@tromey.com>
12904
12905 * solib.c (solib_find_1): Use std::string.
12906 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12907
12908 2018-02-08 Tom Tromey <tom@tromey.com>
12909
12910 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12911
12912 2018-02-08 Tom Tromey <tom@tromey.com>
12913
12914 * source.c (find_source_lines): Use gdb::def_vector.
12915
12916 2018-02-08 Tom Tromey <tom@tromey.com>
12917
12918 * macrocmd.c (struct temporary_macro_definition): New.
12919 (macro_define_command): Use temporary_macro_definition. Remove
12920 cleanups.
12921 (free_macro_definition_ptr): Remove.
12922
12923 2018-02-08 Tom Tromey <tom@tromey.com>
12924
12925 * macroexp.c (maybe_expand): Use std::string.
12926
12927 2018-02-08 Tom Tromey <tom@tromey.com>
12928
12929 * macroexp.c (struct macro_buffer): Add initializers for some
12930 members.
12931 (init_buffer, init_shared_buffer, free_buffer)
12932 (free_buffer_return_text): Remove.
12933 (macro_buffer): New constructors.
12934 (~macro_buffer): New destructor.
12935 (macro_buffer::set_shared): New method.
12936 (macro_buffer::resize_buffer, macro_buffer::appendc)
12937 (macro_buffer::appendmem): Now methods, not free functions.
12938 (set_token, append_tokens_without_splicing, stringify)
12939 (macro_stringify): Update.
12940 (gather_arguments): Change return type. Remove argc_p argument,
12941 add args_ptr argument. Use std::vector.
12942 (substitute_args): Remove argc argument. Accept std::vector.
12943 (expand): Update. Use std::vector.
12944 (scan, macro_expand, macro_expand_next): Update.
12945
12946 2018-02-08 Tom Tromey <tom@tromey.com>
12947
12948 * symtab.c (default_collect_symbol_completion_matches_break_on):
12949 Use unique_xmalloc_ptr.
12950 * macroscope.h: (sal_macro_scope, user_macro_scope)
12951 (default_macro_scope): Return unique_xmalloc_ptr.
12952 * macroscope.c (sal_macro_scope, user_macro_scope)
12953 (default_macro_scope): Return unique_xmalloc_ptr.
12954 * macroexp.h (macro_expand, macro_expand_once): Return
12955 unique_xmalloc_ptr.
12956 * macroexp.c (macro_expand, macro_expand_once): Return
12957 unique_xmalloc_ptr.
12958 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12959 (info_macro_command, info_macros_command): Use
12960 unique_xmalloc_ptr.
12961 * compile/compile-c-support.c (write_macro_definitions): Use
12962 unique_xmalloc_ptr.
12963 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12964
12965 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12966
12967 * value.c (value_static_field): Assign field type instead of
12968 containing type when returning an optimized out value.
12969
12970 2018-02-06 Yao Qi <yao.qi@linaro.org>
12971
12972 * ft32-tdep.c (ft32_read_pc): Remove.
12973 (ft32_write_pc): Remove.
12974 (ft32_gdbarch_init): Update.
12975 * m32r-tdep.c (m32r_read_pc): Remove.
12976 (m32r_gdbarch_init): Update.
12977 * mep-tdep.c (mep_read_pc): Remove.
12978 (mep_gdbarch_init): Update.
12979 * microblaze-tdep.c (microblaze_write_pc): Remove.
12980 (microblaze_gdbarch_init): Update.
12981 * mn10300-tdep.c (mn10300_read_pc): Remove.
12982 (mn10300_write_pc): Remove.
12983 (mn10300_gdbarch_init): Update.
12984 * moxie-tdep.c (moxie_read_pc): Remove.
12985 (moxie_write_pc): Remove.
12986 (moxie_gdbarch_init): Update.
12987
12988 2018-02-06 Yao Qi <yao.qi@linaro.org>
12989
12990 * expprint.c (print_subexp_standard): Handle
12991 OP_F77_UNDETERMINED_ARGLIST.
12992 (dump_subexp_body_standard): Likewise.
12993
12994 2018-02-05 Alan Hayward <alan.hayward@arm.com>
12995
12996 * target-descriptions.c (tdesc_element_visitor) Add empty
12997 implementations.
12998 (tdesc_type): Move make_gdb_type from here.
12999 (tdesc_type_builtin): Likewise.
13000 (tdesc_type_vector): Likewise.
13001 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13002 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13003 (make_gdb_type_union): Likewise.
13004 (make_gdb_type_flags): Likewise.
13005 (make_gdb_type_enum): Likewise.
13006 (make_gdb_type): New function.
13007 (tdesc_register_type): Use static make_gdb_type.
13008
13009 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13010
13011 * infcmd.c (default_print_one_register_info): Align natural-format
13012 column values consistently one under another.
13013 (pad_to_column): New function.
13014
13015 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13016
13017 * dwarf2read.c (dwarf2_physname): Move commment.
13018
13019 2018-02-01 Leszek Swirski <leszeks@google.com>
13020
13021 * varobj.c (varobj_formatted_print_options): Allow recursive
13022 pretty printing if pretty printing is enabled.
13023
13024 2018-02-01 Leszek Swirski <leszeks@google.com>
13025
13026 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13027 names after a structop as a filename.
13028
13029 2018-02-01 Yao Qi <yao.qi@linaro.org>
13030
13031 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13032 (arm_record_coproc_data_proc): Likewise.
13033
13034 2018-02-01 Yao Qi <yao.qi@linaro.org>
13035
13036 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13037
13038 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13039
13040 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13041 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13042
13043 2018-01-31 Pedro Alves <palves@redhat.com>
13044
13045 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13046 * inflow.c (child_terminal_save_inferior): Wrap reference to
13047 tcgetpgrp in HAVE_TERMIOS_H.
13048 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13049 _WIN32.
13050 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13051 always iterate over all inferiors.
13052 (gdbsim_cntrl_c): Adjust.
13053 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13054
13055 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13056
13057 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13058 index type is objfile-owned if the element type is as well.
13059
13060 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13061
13062 GDB 8.1 released.
13063
13064 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13065
13066 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13067 "features/s390x-linux64.c".
13068 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13069 s390_linux32 and s390x_linux64.
13070 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13071 default tdesc.
13072 * s390-tdep.c: Include "features/s390-linux32.c" and
13073 "features/s390x-linux64.c".
13074 (s390_tdesc_valid): Add check for tdesc_has_registers.
13075 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13076 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13077 tdesc_s390x_linux64.
13078 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13079 tdesc_s390x_linux64 to...
13080 * s390-tdep.h: ...here.
13081
13082 2018-01-30 Pedro Alves <palves@redhat.com>
13083
13084 PR gdb/13211
13085 * config.in, configure: Regenerate.
13086 * configure.ac: Check for getpgid.
13087 * go32-nat.c (go32_pass_ctrlc): New.
13088 (go32_target): Install it.
13089 * inf-child.c (inf_child_target): Install
13090 child_terminal_save_inferior, child_pass_ctrlc and
13091 child_interrupt.
13092 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13093 (inf_ptrace_target): No longer install it.
13094 * infcmd.c (interrupt_target_1): Adjust.
13095 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13096 (child_interrupt): Declare.
13097 (inferior::terminal_state): New.
13098 * inflow.c (struct terminal_info): Update comments.
13099 (inferior_process_group): Delete.
13100 (terminal_is_ours): Delete.
13101 (gdb_tty_state): New.
13102 (child_terminal_init): Adjust.
13103 (is_gdb_terminal, sharing_input_terminal_1)
13104 (sharing_input_terminal): New functions.
13105 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13106 Set the process's actual process group in the foreground if
13107 possible. Handle is_ours_for_output/is_ours distinction. Don't
13108 mark terminal as the inferior's if not sharing GDB's terminal.
13109 Don't check attach_flag.
13110 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13111 pass down a target_terminal_state.
13112 (child_terminal_save_inferior): New, factored out from ...
13113 (child_terminal_ours_1): ... this. Handle
13114 target_terminal_state::is_ours_for_output.
13115 (child_interrupt, child_pass_ctrlc): New.
13116 (inflow_inferior_exit): Clear the inferior's terminal_state.
13117 (copy_terminal_info): Copy the inferior's terminal state.
13118 (_initialize_inflow): Remove reference to terminal_is_ours.
13119 * inflow.h (inferior_process_group): Delete.
13120 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13121 * procfs.c (procfs_target): Don't install procfs_interrupt.
13122 (procfs_interrupt): Delete.
13123 * remote.c (remote_serial_quit_handler): Adjust.
13124 (remote_interrupt): Remove ptid parameter. Adjust.
13125 * target-delegates.c: Regenerate.
13126 * target.c: Include "terminal.h".
13127 (target_terminal::terminal_state): Rename to ...
13128 (target_terminal::m_terminal_state): ... this.
13129 (target_terminal::init): Adjust.
13130 (target_terminal::inferior): Adjust to per-inferior
13131 terminal_state.
13132 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13133 (target_terminal::ours, target_terminal::ours_for_output): Use
13134 target_terminal_is_ours_kind.
13135 (target_interrupt): Remove ptid parameter. Adjust.
13136 (default_target_pass_ctrlc): Adjust.
13137 * target.h (target_ops::to_terminal_save_inferior): New field.
13138 (target_ops::to_interrupt): Remove ptid_t parameter.
13139 (target_interrupt): Remove ptid_t parameter. Update comment.
13140 (target_pass_ctrlc): Update comment.
13141 * target/target.h (target_terminal_state): New scoped enum,
13142 factored out of ...
13143 (target_terminal::terminal_state): ... here.
13144 (target_terminal::inferior): Update comments.
13145 (target_terminal::restore_inferior): New.
13146 (target_terminal::is_inferior, target_terminal::is_ours)
13147 (target_terminal::is_ours_for_output): Adjust.
13148 (target_terminal::scoped_restore_terminal_state): Adjust to
13149 rename, and call restore_inferior() instead of inferior().
13150 (target_terminal::scoped_restore_terminal_state::m_state): Change
13151 type.
13152 (target_terminal::terminal_state): Rename to ...
13153 (target_terminal::m_terminal_state): ... this and change type.
13154
13155 2018-01-30 Pedro Alves <palves@redhat.com>
13156
13157 * linux-nat.c (wait_for_signal): New function.
13158 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13159 directly.
13160 (async_terminal_is_ours)
13161 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13162 (linux_nat_add_target): Don't override
13163 to_terminal_inferior/to_terminal_ours.
13164
13165 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13166
13167 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13168
13169 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13170
13171 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13172 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13173 dwarf2_per_objfile_free here.
13174 (dwarf2_per_objfile_free): Remove.
13175 (_initialize_dwarf2_read): Don't register
13176 dwarf2_per_objfile_free as a registry cleanup.
13177
13178 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13179
13180 Avoid compilation errors in MinGW native builds
13181
13182 The error is triggered by including python-internal.h, and the
13183 error message is:
13184
13185 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13186 from build-gnulib/import/math.h:27,
13187 from d:/usr/Python26/include/pyport.h:235,
13188 from d:/usr/Python26/include/Python.h:58,
13189 from python/python-internal.h:94,
13190 from python/py-arch.c:24:
13191 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13192 using ::hypot;
13193 ^~~~~
13194
13195 This happens because Python headers define 'hypot' to expand t
13196 '_hypot' in the Windows builds.
13197 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13198 'hypoth'. This avoids a compilation error.
13199
13200 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13201
13202 * MAINTAINERS (Write After Approval): Fix ordering.
13203
13204 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13205
13206 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13207
13208 2018-01-26 Alan Modra <amodra@gmail.com>
13209
13210 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13211 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13212 Remove nop. Make const. Comment.
13213 (powerpc32_plt_stub_so_2): New.
13214 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13215 Correct count. Update uses.
13216 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13217 Move common code reading PLT entry word. Correct
13218 powerpc32_plt_stub PLT address calculation.
13219 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13220 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13221 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13222 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13223 (ppc64_standard_linkage8): Likewise.
13224 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13225 Correct insns description.
13226 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13227
13228 2018-01-24 Pedro Alves <palves@redhat.com>
13229
13230 GCC PR libstdc++/83906
13231 * gdbtypes.c (operator==(const dynamic_prop &,
13232 const dynamic_prop &)): New.
13233 (operator==(const range_bounds &, const range_bounds &)): New.
13234 (check_types_equal): Use them instead of memcmp.
13235 * gdbtypes.h (operator==(const dynamic_prop &,
13236 const dynamic_prop &)): Declare.
13237 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13238 (operator==(const range_bounds &, const range_bounds &)): Declare.
13239 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13240
13241 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13242
13243 * s390-linux-tdep.c (s390_record_address_mask)
13244 (s390_record_calc_disp_common, s390_record_calc_disp)
13245 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13246 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13247 (s390_process_record): Move to s390-tdep.c.
13248 (s390_linux_init_abi_any): Adjust.
13249 * s390-tdep.c (s390_record_address_mask)
13250 (s390_record_calc_disp_common, s390_record_calc_disp)
13251 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13252 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13253 (s390_process_record): Moved from s390-linux-tdep.c
13254 (s390_gdbarch_init): Adjust.
13255
13256 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13257
13258 * s390-linux-nat.c (s390-tdep.h): New include.
13259 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13260 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13261 (ALLDEPFILES): Add s390-tdep.c.
13262 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13263 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13264 * s390-tdep.h: ...this. New file.
13265 * s390-linux-tdep.c (s390-tdep.h): New include.
13266 (_initialize_s390_tdep): Rename to...
13267 (_initialize_s390_linux_tdep): ...this and adjust.
13268 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13269 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13270 s390-tdep.h.
13271 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13272 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13273 (s390_is_partial_instruction, s390_software_single_step)
13274 (is_non_branch_ril, s390_displaced_step_copy_insn)
13275 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13276 (s390_prologue_data, s390_addr, s390_store, s390_load)
13277 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13278 (s390_register_call_saved, s390_guess_tracepoint_registers)
13279 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13280 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13281 (s390_pseudo_register_name, s390_pseudo_register_type)
13282 (s390_pseudo_register_read, s390_pseudo_register_write)
13283 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13284 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13285 (s390_addr_bits_remove, s390_address_class_type_flags)
13286 (s390_address_class_type_flags_to_name)
13287 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13288 (s390_function_arg_float, s390_function_arg_vector)
13289 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13290 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13291 (s390_frame_align, s390_register_return_value, s390_return_value)
13292 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13293 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13294 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13295 (s390_trad_frame_prev_register, s390_unwind_cache)
13296 (s390_prologue_frame_unwind_cache)
13297 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13298 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13299 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13300 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13301 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13302 (s390_frame_base_address, s390_local_base_address)
13303 (s390_frame_base, s390_gcc_target_options)
13304 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13305 (s390_validate_reg_range, s390_tdesc_valid)
13306 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13307 * s390-tdep.c: ...this. New file.
13308
13309 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13310
13311 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13312 (s390_process_record, s390_gdbarch_tdep_alloc)
13313 (s390_linux_init_abi_any): Use/set new hook.
13314
13315 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13316
13317 * s390-linux-tdep.c (osabi.h): New include.
13318 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13319 (s390_linux_init_abi_any): New functions.
13320 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13321
13322 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13323
13324 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13325 tdesc_has_registers check
13326
13327 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13328
13329 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13330 (s390_validate_reg_range): New macro.
13331 (s390_gdbarch_init): Adjust.
13332
13333 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13334
13335 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13336 (s390_gdbarch_tdep_alloc): Adjust.
13337 (s390_gdbarch_init): Adjust.
13338
13339 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13340
13341 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13342 <have_tdb>: Change type to bool.
13343 (s390_gdbarch_tdep_alloc): Adjust.
13344 (s390_gdbarch_init): Adjust.
13345
13346 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13347
13348 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13349 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13350 (s390_gdbarch_tdep_alloc): New function.
13351 (s390_gdbarch_init): Allocate tdep at start and use its fields
13352 instead of separate variables.
13353
13354 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13355
13356 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13357 when looking for cached gdbarch and add comment for remaining.
13358
13359 2018-01-22 Pedro Alves <palves@redhat.com>
13360 Sergio Durigan Junior <sergiodj@redhat.com>
13361
13362 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13363 case.
13364
13365 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13366
13367 * MAINTAINERS: Update my company e-mail address.
13368
13369 2018-01-22 Yao Qi <yao.qi@linaro.org>
13370
13371 * regcache.c (cooked_write_test): New function.
13372 (_initialize_regcache): Register the test.
13373
13374 2018-01-22 Yao Qi <yao.qi@linaro.org>
13375
13376 * ia64-tdep.c (ia64_pseudo_register_read): Call
13377 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13378 * m32c-tdep.c (m32c_cat_read): Likewise.
13379 (m32c_r3r2r1r0_read): Likewise.
13380 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13381 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13382
13383 2018-01-22 Yao Qi <yao.qi@linaro.org>
13384
13385 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13386 method raw_read instead of regcache_raw_read.
13387 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13388 * arm-tdep.c (arm_neon_quad_read): Likewise.
13389 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13390 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13391 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13392 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13393 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13394 (i386_pseudo_register_read_into_value): Likewise.
13395 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13396 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13397 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13398 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13399 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13400 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13401 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13402 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13403 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13404
13405 2018-01-22 Yao Qi <yao.qi@linaro.org>
13406
13407 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13408 * configure.tgt: Remove target mt.
13409 * mt-tdep.c: Remove.
13410 * regcache.c (cooked_read_test): Remove the check for mt.
13411
13412 2018-01-22 Yao Qi <yao.qi@linaro.org>
13413
13414 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13415 instead of gdbarch_pseudo_register_read_value.
13416
13417 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13418
13419 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13420 language is Ada.
13421
13422 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13423
13424 * linespec.c (create_sals_line_offset): Remove code that preserved
13425 the symtab_and_line's line number.
13426
13427 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13428
13429 * varobj.c (varobj_create): Don't set valid_block when creating a
13430 floating varobj.
13431
13432 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13433
13434 * varobj.c (varobj_create): Remove out of date comment.
13435
13436 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13437
13438 PR mi/20395
13439 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13440 updating innermost block.
13441 * parse.c (innermost_block_tracker::update): Take extra type
13442 parameter, and check types match before updating innermost block.
13443 (write_dollar_variable): Update innermost block for registers.
13444 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13445 (innermost_block_tracker::innermost_block_tracker): Initialise
13446 m_types member.
13447 (innermost_block_tracker::reset): Take type parameter.
13448 (innermost_block_tracker::update): Take type parameter, and pass
13449 type through as needed.
13450 (innermost_block_tracker::m_types): New member.
13451 * varobj.c (varobj_create): Pass type when reseting innermost
13452 block.
13453
13454 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13455
13456 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13457 * ada-lang.c (resolve_subexp): Likewise.
13458 * breakpoint.c (set_breakpoint_condition) Likewise.
13459 (watch_command_1) Likewise.
13460 * c-exp.y (variable): Likewise.
13461 * d-exp.y (PrimaryExpression): Likewise.
13462 * f-exp.y (variable): Likewise.
13463 * go-exp.y (variable): Likewise.
13464 * m2-exp.y (variable): Likewise.
13465 * objfiles.c (objfile::~objfile): Likewise.
13466 * p-exp.y (variable): Likewise.
13467 * parse.c (innermost_block): Change type.
13468 * parser-defs.h (class innermost_block_tracker): New.
13469 (innermost_block): Change to innermost_block_tracker.
13470 * printcmd.c (display_command): Switch to innermost_block API.
13471 (do_one_display): Likewise.
13472 * rust-exp.y (do_one_display): Likewise.
13473 * symfile.c (clear_symtab_users): Likewise.
13474 * varobj.c (varobj_create): Switch to innermost_block API, replace
13475 use of innermost_block with block stored on varobj object.
13476
13477 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13478
13479 * expression.h (innermost_block): Remove declaration.
13480 * varobj.c: Add 'parser-defs.h' include.
13481
13482 2018-01-19 Tom Tromey <tom@tromey.com>
13483
13484 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13485 symbols in the static and global blocks.
13486
13487 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13488
13489 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13490 gdb_ptrace.h, and move including gdb_wait.h ...
13491 * nat/linux-ptrace.h: ... to here.
13492
13493 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13494
13495 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13496 inf_ptrace_detach_success.
13497 (inf_ptrace_detach_success): Add inferior parameter, use it
13498 instead of inferior_ptid, pass it to detach_inferior.
13499 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13500 parameter.
13501 * inferior.c (detach_inferior): Add overload that takes an
13502 inferior object.
13503 * inferior.h (detach_inferior): Likewise.
13504 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13505 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13506 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13507
13508 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13509
13510 * target.h (struct target_ops) <to_detach>: Add inferior
13511 parameter.
13512 (target_detach): Likewise.
13513 * target.c (dispose_inferior): Pass inferior down.
13514 (target_detach): Pass inferior down. Assert that it is equal to
13515 the current inferior.
13516 * aix-thread.c (aix_thread_detach): Pass inferior down.
13517 * corefile.c (core_file_command): Pass current_inferior() down.
13518 * corelow.c (core_detach): Add inferior parameter.
13519 * darwin-nat.c (darwin_detach): Likewise.
13520 * gnu-nat.c (gnu_detach): Likewise.
13521 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13522 * infcmd.c (detach_command): Pass current_inferior() down to
13523 target_detach.
13524 * infrun.c (follow_fork_inferior): Pass parent_inf to
13525 target_detach.
13526 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13527 target_detach.
13528 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13529 * linux-thread-db.c (thread_db_detach): Likewise.
13530 * nto-procfs.c (procfs_detach): Likewise.
13531 * procfs.c (procfs_detach): Likewise.
13532 * record.c (record_detach): Likewise.
13533 * record.h (struct inferior): Forward-declare.
13534 (record_detach): Add inferior parameter.
13535 * remote-sim.c (gdbsim_detach): Likewise.
13536 * remote.c (remote_detach_1): Likewise.
13537 (remote_detach): Likewise.
13538 (extended_remote_detach): Likewise.
13539 * sol-thread.c (sol_thread_detach): Likewise.
13540 * target-debug.h (target_debug_print_inferior_p): New macro.
13541 * target-delegates.c: Re-generate.
13542 * top.c (kill_or_detach): Pass inferior down to target_detach.
13543 * windows-nat.c (windows_detach): Add inferior parameter.
13544
13545 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13546
13547 * target.h (struct target_ops) <to_detach>: Remove args
13548 parameter.
13549 (target_detach): Likewise.
13550 * target.c (dispose_inferior): Adjust.
13551 (target_detach): Remove args parameter, adjust.
13552 * aix-thread.c (aix_thread_detach): Adjust.
13553 * corefile.c (core_file_command): Adjust.
13554 * corelow.c (core_detach): Adjust.
13555 * darwin-nat.c (darwin_detach): Adjust.
13556 * gnu-nat.c (gnu_detach): Adjust.
13557 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13558 * infcmd.c (detach_command): Adjust
13559 * infrun.c (follow_fork_inferior): Adjust.
13560 (handle_vfork_child_exec_or_exit): Adjust.
13561 * linux-fork.c (linux_fork_detach): Remove args parameter.
13562 * linux-fork.h (linux_fork_detach): Likewise.
13563 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13564 * linux-thread-db.c (thread_db_detach): Likewise.
13565 * nto-procfs.c (procfs_detach): Likewise.
13566 * procfs.c (procfs_detach): Likewise.
13567 (do_detach): Remove signo parameter.
13568 * record.c (record_detach): Remove args parameter.
13569 * record.h (record_detach): Likewise.
13570 * remote-sim.c (gdbsim_detach): Likewise.
13571 * remote.c (remote_detach_1): Likewise.
13572 (remote_detach): Likewise.
13573 (extended_remote_detach): Likewise.
13574 * sol-thread.c (sol_thread_detach): Likewise.
13575 * target-delegates.c: Re-generate.
13576 * top.c (struct qt_args) <args>: Remove field.
13577 (kill_or_detach): Don't pass args.
13578 (quit_force): Don't set args.
13579 * windows-nat.c (windows_detach): Remove args parameter.
13580
13581 2018-01-19 Yao Qi <yao.qi@linaro.org>
13582
13583 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13584 (arm_linux_init_abi): Install it.
13585
13586 2018-01-19 Yao Qi <yao.qi@linaro.org>
13587
13588 * osabi.c (gdb_osabi_names): Extend the regexp for
13589 arm-linux-gnueabihf.
13590
13591 2018-01-18 Yao Qi <yao.qi@linaro.org>
13592
13593 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13594 m_abbrevs.
13595 (abbrev_table::add_abbrev): Update.
13596 (abbrev_table::lookup_abbrev): Update.
13597
13598 2018-01-18 Yao Qi <yao.qi@linaro.org>
13599
13600 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13601
13602 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13603
13604 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13605 to "std::string".
13606
13607 2018-01-17 Tom Tromey <tom@tromey.com>
13608
13609 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13610
13611 2018-01-17 Tom Tromey <tom@tromey.com>
13612
13613 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13614 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13615 (create_array_type_with_stride): Update.
13616 * dwarf2read.c (set_die_type): Update.
13617
13618 2018-01-17 Tom Tromey <tom@tromey.com>
13619
13620 * dwarf2read.c (delayed_method_info): Remove typedef.
13621 (dwarf2_cu::method_info): Now a std::vector.
13622 (add_to_method_list): Update.
13623 (free_delayed_list): Remove.
13624 (compute_delayed_physnames): Update.
13625 (process_full_comp_unit, process_full_type_unit): Clear the method
13626 list. Remove cleanups.
13627 (psymtab_include_file_name): Add name_holder parameter. Use
13628 unique_xmalloc_ptr.
13629 (dwarf_decode_lines): Update.
13630
13631 2018-01-17 Tom Tromey <tom@tromey.com>
13632 Simon Marchi <simon.marchi@ericsson.com>
13633
13634 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13635 (dwarf2_per_objfile::free_cached_comp_units)
13636 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13637 (init_cutu_and_read_dies_no_follow): Update.
13638 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13639 (dwarf2_cu::~dwarf2_cu): New.
13640 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13641 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13642
13643 2018-01-17 Tom Tromey <tom@tromey.com>
13644 Simon Marchi <simon.marchi@ericsson.com>
13645
13646 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13647 (struct die_reader_specs) <abbrev_table>: New member.
13648 (struct abbrev_table): Add constructor.
13649 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13650 <abbrev_obstack>: Now an auto_obstack.
13651 (abbrev_table_up): New typedef.
13652 (init_cu_die_reader): Add abbrev_table parameter.
13653 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13654 Add result_dwo_abbrev_table.
13655 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13656 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13657 Update.
13658 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13659 parameter.
13660 (skip_children): Update.
13661 (abbrev_table::alloc_abbrev): Rename from
13662 abbrev_table_alloc_abbrev.
13663 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13664 (abbrev_table::lookup_abbrev): Rename from
13665 abbrev_table_lookup_abbrev.
13666 (abbrev_table_read_table): Return abbrev_table_up.
13667 (abbrev_table_free, abbrev_table_free_cleanup)
13668 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13669 (load_partial_dies): Update.
13670
13671 2018-01-17 Tom Tromey <tom@tromey.com>
13672
13673 * dwarf2read.c (dwarf2_compute_name): Update comment.
13674 (read_func_scope, read_variable): Update.
13675 (new_symbol): Remove.
13676 (new_symbol_full): Rename to new_symbol.
13677
13678 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13679
13680 PR gdb/16577
13681 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13682 a warning instead of throwing an error, set section size to 0 and return
13683 NULL.
13684 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13685
13686 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13687
13688 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13689 std::string.
13690 (linux_ptrace_attach_fail_reason_string): Likewise.
13691 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13692 Likewise.
13693 (linux_ptrace_attach_fail_reason_string): Likewise.
13694 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13695
13696 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13697
13698 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13699
13700 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13701
13702 PR gdb/21559
13703 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13704 checking for fs_base/gs_base fields in struct user_regs_struct.
13705 * configure: Regenerate.
13706
13707 2018-01-17 Yao Qi <yao.qi@linaro.org>
13708
13709 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13710 function.
13711 (aarch64_linux_init_abi): Install it to gdbarch hook
13712 gcc_target_options.
13713
13714 2018-01-15 Pedro Alves <palves@redhat.com>
13715
13716 * common/signals-state-save-restore.c
13717 (save_original_signals_state): Fix typos.
13718
13719 2017-01-12 Tom Tromey <tom@tromey.com>
13720 Sergio Durigan Junior <sergiodj@redhat.com>
13721
13722 * Makefile.in (install-only): Install gdb-add-index.
13723
13724 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13725
13726 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13727
13728 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13729
13730 * infrun.c (keep_going_pass_signal): Clear step-over info when
13731 insert_breakpoints fails.
13732
13733 2018-01-11 Pedro Alves <palves@redhat.com>
13734
13735 PR gdb/22583
13736 * infrun.c (resume): Rename to ...
13737 (resume_1): ... this.
13738 (resume): Reimplement as wrapper around resume_1.
13739
13740 2018-01-11 Pedro Alves <palves@redhat.com>
13741
13742 PR remote/22597
13743 * remote.c (remote_parse_stop_reply): Default to the last-set
13744 general thread instead of to 'magic_null_ptid'.
13745
13746 2018-01-10 Pedro Alves <palves@redhat.com>
13747
13748 * language.h (language_get_symbol_name_matcher): Rename ...
13749 (get_symbol_name_matcher): ... this.
13750 * language.c (language_get_symbol_name_matcher): Ditto.
13751 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13752 callers adjusted.
13753
13754 2018-01-10 Pedro Alves <palves@redhat.com>
13755
13756 PR gdb/22670
13757 * dwarf2read.c
13758 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13759 Adjust to use language_get_symbol_name_matcher instead of
13760 language_defn::la_get_symbol_name_matcher.
13761 * language.c (language_get_symbol_name_matcher): If in Ada mode
13762 and the lookup name is a verbatim match, return Ada's matcher.
13763 * language.h (language_get_symbol_name_matcher): Adjust comment.
13764 (ada_lookup_name_info::verbatim_p):: New method.
13765
13766 2018-01-10 Pedro Alves <palves@redhat.com>
13767
13768 PR gdb/22670
13769 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13770 minsym's language is language_auto or language_cplus, pass down
13771 language_ada instead.
13772 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13773
13774 2018-01-10 Pedro Alves <palves@redhat.com>
13775
13776 PR gdb/22670
13777 * minsyms.c (linkage_name_str): New function.
13778 (iterate_over_minimal_symbols): Use it.
13779
13780 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13781
13782 * NEWS: Document that 'info proc' now works on FreeBSD.
13783
13784 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13785
13786 * configure.ac: Check for kinfo_getfile in libutil.
13787 * configure: Regenerate.
13788 * config.in: Regenerate.
13789 * fbsd-nat.c: Include "fbsd-tdep.h".
13790 (fbsd_fetch_cmdline): New.
13791 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13792 rather than calling error.
13793 (fbsd_info_proc): New.
13794 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13795 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13796 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13797
13798 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13799
13800 * fbsd-nat.c (struct free_deleter): Remove.
13801 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13802
13803 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13804
13805 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13806 NULL for an empty pathname.
13807
13808 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13809
13810 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13811 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13812 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13813 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13814 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13815 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13816 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13817 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13818 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13819 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13820 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13821 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13822 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13823 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13824 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13825
13826 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13827
13828 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13829 (gnu_xfer_auxv): New function.
13830 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13831 TARGET_OBJECT_AUXV.
13832
13833 2018-01-08 Yao Qi <yao.qi@linaro.org>
13834 Simon Marchi <simon.marchi@ericsson.com>
13835
13836 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13837 common/selftest.c.
13838 (COMMON_OBS): Remove selftest.o.
13839 * configure.ac: Append selftest-arch.c and common/selftest.c to
13840 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13841 * configure: Re-generated.
13842 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13843 GDB_SELF_TEST.
13844 (maintenance_info_selftests): Likewise.
13845
13846 2018-01-08 Xavier Roirand <roirand@adacore.com>
13847
13848 * ada-valprint.c (val_print_packed_array_elements): Use
13849 proper number of elements when printing an array indexed
13850 by an enumeration type.
13851
13852 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13853
13854 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13855 (dw2_get_file_names_reader): Adjust.
13856 (lookup_dwo_signatured_type): Adjust.
13857 (lookup_dwp_signatured_type): Adjust.
13858 (lookup_signatured_type): Adjust.
13859 (create_type_unit_group): Adjust.
13860 (get_type_unit_group): Adjust.
13861 (process_psymtab_comp_unit_reader): Adjust.
13862 (build_type_psymtabs_reader): Adjust.
13863 (scan_partial_symbols): Adjust.
13864 (add_partial_symbol): Adjust.
13865 (add_partial_subprogram): Adjust.
13866 (peek_die_abbrev): Adjust.
13867 (fixup_go_packaging): Adjust.
13868 (process_imported_unit_die): Adjust.
13869 (dwarf2_compute_name): Adjust.
13870 (dwarf2_physname): Adjust.
13871 (read_import_statement): Adjust.
13872 (handle_DW_AT_stmt_list): Adjust.
13873 (read_file_scope): Adjust.
13874 (read_func_scope): Adjust.
13875 (read_lexical_block_scope): Adjust.
13876 (read_call_site_scope): Adjust.
13877 (read_variable): Adjust.
13878 (dwarf2_rnglists_process): Adjust.
13879 (dwarf2_ranges_process): Adjust.
13880 (dwarf2_ranges_read): Adjust.
13881 (dwarf2_get_pc_bounds): Adjust.
13882 (dwarf2_record_block_ranges): Adjust.
13883 (dwarf2_add_field): Adjust.
13884 (dwarf2_add_member_fn): Adjust.
13885 (read_structure_type): Adjust.
13886 (process_structure_scope): Adjust.
13887 (read_enumeration_type): Adjust.
13888 (read_array_type): Adjust.
13889 (mark_common_block_symbol_computed): Adjust.
13890 (read_common_block): Adjust.
13891 (read_namespace_type): Adjust.
13892 (read_namespace): Adjust.
13893 (read_module_type): Adjust.
13894 (read_tag_pointer_type): Adjust.
13895 (read_tag_ptr_to_member_type): Adjust.
13896 (read_tag_string_type): Adjust.
13897 (read_subroutine_type): Adjust.
13898 (read_typedef): Adjust.
13899 (read_base_type): Adjust.
13900 (attr_to_dynamic_prop): Adjust.
13901 (read_subrange_type): Adjust.
13902 (read_unspecified_type): Adjust.
13903 (dwarf2_read_abbrevs): Adjust.
13904 (load_partial_dies): Adjust.
13905 (read_partial_die): Adjust.
13906 (find_partial_die): Adjust.
13907 (guess_partial_die_structure_name): Adjust.
13908 (fixup_partial_die): Adjust.
13909 (read_attribute_value): Adjust.
13910 (read_addr_index): Adjust.
13911 (read_addr_index_from_leb128): Adjust.
13912 (read_str_index): Adjust.
13913 (dwarf2_string_attr): Adjust.
13914 (get_debug_line_section): Adjust.
13915 (dwarf_decode_line_header): Adjust.
13916 (lnp_state_machine::check_line_address): Adjust.
13917 (dwarf_decode_lines_1): Adjust.
13918 (dwarf_decode_lines): Adjust.
13919 (dwarf2_start_symtab): Adjust.
13920 (var_decode_location): Adjust.
13921 (new_symbol_full): Adjust.
13922 (dwarf2_const_value_data): Adjust.
13923 (dwarf2_const_value_attr): Adjust.
13924 (dwarf2_const_value): Adjust.
13925 (die_type): Adjust.
13926 (die_containing_type): Adjust.
13927 (build_error_marker_type): Adjust.
13928 (lookup_die_type): Adjust.
13929 (guess_full_die_structure_name): Adjust.
13930 (anonymous_struct_prefix): Adjust.
13931 (determine_prefix): Adjust.
13932 (dwarf2_name): Adjust.
13933 (follow_die_ref_or_sig): Adjust.
13934 (follow_die_offset): Adjust.
13935 (follow_die_ref): Adjust.
13936 (follow_die_sig_1): Adjust.
13937 (follow_die_sig): Adjust.
13938 (get_signatured_type): Adjust.
13939 (get_DW_AT_signature_type): Adjust.
13940 (decode_locdesc): Adjust.
13941 (dwarf_decode_macros): Adjust.
13942 (cu_debug_loc_section): Adjust.
13943 (fill_in_loclist_baton): Adjust.
13944 (dwarf2_symbol_mark_computed): Adjust.
13945 (init_one_comp_unit): Don't assign
13946 dwarf2_cu::dwarf2_per_objfile.
13947 (set_die_type): Adjust.
13948
13949 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13950
13951 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13952 <dwarf2_per_objfile>: New field.
13953 (dwarf2_per_objfile): Remove global.
13954 (get_dwarf2_per_objfile): New function.
13955 (set_dwarf2_per_objfile): New function.
13956 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13957 dwarf2_per_objfile.
13958 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13959 (read_abbrev_offset): Likewise.
13960 (read_indirect_string): Likewise.
13961 (read_indirect_line_string): Likewise.
13962 (read_indirect_string_at_offset): Likewise.
13963 (read_indirect_string_from_dwz): Likewise.
13964 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13965 dwarf2_per_objfile.
13966 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13967 (create_all_comp_units): Change objfile parameter to
13968 dwarf2_per_objfile.
13969 (create_all_type_units): Likewise.
13970 (process_queue): Add dwarf2_per_objfile parameter.
13971 (read_and_check_comp_unit_head): Likewise.
13972 (lookup_dwo_unit_in_dwp): Likewise.
13973 (get_dwp_file): Likewise.
13974 (process_cu_includes): Likewise.
13975 (struct free_dwo_file_cleanup_data): New struct.
13976 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13977 set_dwarf2_per_objfile.
13978 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13979 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13980 context, adjust calls.
13981 (dw2_instantiate_symtab): Likewise.
13982 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13983 (dw2_get_cu): Likewise.
13984 (create_cu_from_index_list): Change objfile parameter to
13985 dwarf2_per_objfile.
13986 (create_cus_from_index_list): Get dwarf2_per_objfile from
13987 context, adjust calls.
13988 (create_cus_from_index): Likewise.
13989 (create_signatured_type_table_from_index): Change objfile
13990 parameter to dwarf2_per_objfile.
13991 (create_signatured_type_table_from_debug_names): Change objfile
13992 parameter to dwarf2_per_objfile.
13993 (create_addrmap_from_index): Likewise.
13994 (create_addrmap_from_aranges): Likewise.
13995 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13996 (dw2_setup): Remove.
13997 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13998 context.
13999 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14000 get_dwarf2_per_objfile.
14001 (dw2_forget_cached_source_info): Likewise.
14002 (dw2_map_symtabs_matching_filename): Likewise.
14003 (struct dw2_symtab_iterator) <index>: Remove.
14004 <dwarf2_per_objfile>: New field.
14005 (dw2_symtab_iter_init): Replace index parameter with
14006 dwarf2_per_objfile.
14007 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14008 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14009 (dw2_print_stats): Likewise.
14010 (dw2_dump): Likewise.
14011 (dw2_expand_symtabs_for_function): Likewise.
14012 (dw2_expand_all_symtabs): Likewise.
14013 (dw2_expand_symtabs_with_fullname): Likewise.
14014 (dw2_expand_marked_cus): Replace index and objfile parameters
14015 with dwarf2_per_objfile.
14016 (dw_expand_symtabs_matching_file_matcher): Add
14017 dwarf2_per_objfile parameter and adjust calls.
14018 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14019 adjust calls.
14020 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14021 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14022 adjust calls.
14023 (create_cus_from_debug_names_list): Replace objfile parameter
14024 with dwarf2_per_objfile and adjust calls.
14025 (create_cus_from_debug_names): Likewise.
14026 (dwarf2_read_debug_names): Likewise.
14027 (mapped_debug_names::namei_to_name): Adjust call.
14028 (dw2_debug_names_iterator::next): Likewise.
14029 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14030 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14031 (dw2_debug_names_dump): Likewise.
14032 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14033 (dw2_debug_names_expand_symtabs_matching): Likewise.
14034 (dwarf2_initialize_objfile): Likewise.
14035 (dwarf2_build_psymtabs): Likewise.
14036 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14037 this_cu.
14038 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14039 (read_and_check_comp_unit_head): Likewise.
14040 (read_abbrev_offset): Likewise.
14041 (create_debug_type_hash_table): Likewise.
14042 (create_debug_types_hash_table): Likewise.
14043 (create_all_type_units): Replace objfile parameter with
14044 dwarf2_per_objfile.
14045 (add_type_unit): Add dwarf2_per_objfile parameter.
14046 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14047 with dwarf2_per_objfile.
14048 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14049 (lookup_dwp_signatured_type): Likewise.
14050 (lookup_signatured_type): Likewise.
14051 (read_cutu_die_from_dwo): Likewise.
14052 (init_tu_and_read_dwo_dies): Likewise.
14053 (init_cutu_and_read_dies): Likewise.
14054 (init_cutu_and_read_dies_no_follow): Likewise.
14055 (allocate_type_unit_groups_table): Add objfile parameter.
14056 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14057 (get_type_unit_group): Likewise.
14058 (process_psymtab_comp_unit): Update call.
14059 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14060 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14061 (print_tu_stats): Likewise.
14062 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14063 in void* parameter.
14064 (build_type_psymtabs): Change objfile parameter to
14065 dwarf2_per_objfile.
14066 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14067 passed in void* parameter.
14068 (process_skeletonless_type_units): Change objfile parameter to
14069 dwarf2_per_objfile.
14070 (set_partial_user): Likewise.
14071 (dwarf2_build_psymtabs_hard): Likewise.
14072 (read_comp_units_from_section): Likewise.
14073 (create_all_comp_units): Likewise.
14074 (scan_partial_symbols): Update calls.
14075 (add_partial_symbol): Likewise.
14076 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14077 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14078 (process_queue): Add dwarf2_per_objfile parameter.
14079 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14080 (compute_compunit_symtab_includes): Likewise.
14081 (process_cu_includes): Add dwarf2_per_objfile parameter.
14082 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14083 (process_full_type_unit): Likewise.
14084 (process_imported_unit_die): Update call.
14085 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14086 (read_file_scope): Likewise.
14087 (allocate_dwo_file_hash_table): Add objfile parameter.
14088 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14089 (create_cus_hash_table): Likewise.
14090 (create_dwp_hash_table): Likewise.
14091 (create_dwo_unit_in_dwp_v1): Likewise.
14092 (create_dwp_v2_section): Likewise.
14093 (create_dwo_unit_in_dwp_v2): Likewise.
14094 (lookup_dwo_unit_in_dwp): Likewise.
14095 (try_open_dwop_file): Likewise.
14096 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14097 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14098 cleanup to include a reference to dwarf2_per_objfile.
14099 (open_dwp_file): Add dwarf2_per_objfile parameter.
14100 (open_and_init_dwp_file): Likewise.
14101 (get_dwp_file): Likewise.
14102 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14103 (queue_and_load_all_dwo_tus): Update call.
14104 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14105 data.
14106 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14107 (dwarf2_ranges_process): Likewise.
14108 (dwarf2_get_pc_bounds): Likewise.
14109 (mark_common_block_symbol_computed): Likewise.
14110 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14111 (dwarf2_read_abbrevs): Update call.
14112 (read_partial_die): Use dwarf2_per_objfile from cu.
14113 (find_partial_die): Likewise.
14114 (fixup_partial_die): Likewise.
14115 (read_attribute_value): Likewise.
14116 (read_indirect_string_at_offset_from): Add objfile parameter.
14117 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14118 parameter.
14119 (read_indirect_string_from_dwz): Add objfile parameter.
14120 (read_indirect_string): Add objfile parameter.
14121 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14122 (read_addr_index): Use dwarf2_per_objfile from cu.
14123 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14124 call dw2_setup.
14125 (read_str_index): Use dwarf2_per_objfile from cu.
14126 (get_debug_line_section): Likewise.
14127 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14128 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14129 (new_symbol_full): Use dwarf2_per_objfile from cu.
14130 (build_error_marker_type): Likewise.
14131 (lookup_die_type): Likewise.
14132 (determine_prefix): Likewise.
14133 (follow_die_offset): Likewise.
14134 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14135 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14136 (dwarf2_fetch_die_type_sect_off): Likewise.
14137 (dwarf2_get_die_type): Likewise.
14138 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14139 (get_signatured_type): Likewise.
14140 (get_DW_AT_signature_type): Likewise.
14141 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14142 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14143 (cu_debug_loc_section): Likewise.
14144 (fill_in_loclist_baton): Likewise.
14145 (dwarf2_symbol_mark_computed): Likewise.
14146 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14147 dwarf2_per_objfile.
14148 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14149 parameter.
14150 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14151 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14152 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14153 (set_die_type): Use dwarf2_free_objfile from cu.
14154 (get_die_type_at_offset): Likewise.
14155 (dwarf2_per_objfile_free): Don't assign global variable.
14156 (debug_names) <constructor>: Add dwarf2_per_objfile
14157 parameter, update m_debugstrlookup construction.
14158 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14159 parameter.
14160 <m_dwarf2_per_objfile>: New field.
14161 <lookup>: Use m_dwarf2_per_objfile.
14162 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14163 (psyms_seen_size): Likewise.
14164 (write_gdbindex): Replace objfile parameter with
14165 dwarf2_per_objfile.
14166 (write_debug_names): Likewise.
14167 (write_psymtabs_to_index): Likewise.
14168 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14169 calls.
14170
14171 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14172
14173 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14174 <dwarf2_per_objfile>: New field.
14175 (struct dwarf2_per_cu_data) <objfile>: Remove.
14176 <dwarf2_per_objfile>: New field.
14177 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14178 of objfile.
14179 (create_signatured_type_table_from_index): Likewise.
14180 (create_debug_type_hash_table): Likewise.
14181 (fill_in_sig_entry_from_dwo_entry): Likewise.
14182 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14183 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14184 objfile.
14185 (create_partial_symtab): Access objfile through
14186 dwarf2_per_objfile.
14187 (process_psymtab_comp_unit_reader): Likewise.
14188 (read_comp_units_from_section): Likewise.
14189 (scan_partial_symbols): Likewise.
14190 (add_partial_symbol): Likewise.
14191 (add_partial_subprogram): Likewise.
14192 (peek_die_abbrev): Likewise.
14193 (fixup_go_packaging): Likewise.
14194 (process_full_comp_unit): Likewise.
14195 (process_full_type_unit): Likewise.
14196 (process_imported_unit_die): Likewise.
14197 (dwarf2_compute_name): Likewise.
14198 (dwarf2_physname): Likewise.
14199 (read_import_statement): Likewise.
14200 (create_cus_hash_table): Assign dwarf2_physname instead of
14201 objfile.
14202 (read_func_scope): Access objfile through dwarf2_per_objfile.
14203 (read_lexical_block_scope): Likewise.
14204 (read_call_site_scope): Likewise.
14205 (read_variable): Likewise.
14206 (dwarf2_rnglists_process): Likewise.
14207 (dwarf2_ranges_process): Likewise.
14208 (dwarf2_ranges_read): Likewise.
14209 (dwarf2_record_block_ranges): Likewise.
14210 (dwarf2_add_field): Likewise.
14211 (dwarf2_add_member_fn): Likewise.
14212 (read_structure_type): Likewise.
14213 (process_structure_scope): Likewise.
14214 (read_enumeration_type): Likewise.
14215 (read_array_type): Likewise.
14216 (read_common_block): Likewise.
14217 (read_namespace_type): Likewise.
14218 (read_namespace): Likewise.
14219 (read_module_type): Likewise.
14220 (read_tag_pointer_type): Likewise.
14221 (read_tag_ptr_to_member_type): Likewise.
14222 (read_tag_string_type): Likewise.
14223 (read_subroutine_type): Likewise.
14224 (read_typedef): Likewise.
14225 (read_base_type): Likewise.
14226 (attr_to_dynamic_prop): Likewise.
14227 (read_subrange_type): Likewise.
14228 (read_unspecified_type): Likewise.
14229 (load_partial_dies): Likewise.
14230 (read_partial_die): Likewise.
14231 (find_partial_die): Likewise.
14232 (guess_partial_die_structure_name): Likewise.
14233 (fixup_partial_die): Likewise.
14234 (read_attribute_value): Likewise.
14235 (read_addr_index_from_leb128): Likewise.
14236 (dwarf2_read_addr_index): Likewise.
14237 (dwarf2_string_attr): Likewise.
14238 (lnp_state_machine::check_line_address): Likewise.
14239 (dwarf_decode_lines_1): Likewise.
14240 (dwarf_decode_lines): Likewise.
14241 (dwarf2_start_symtab): Likewise.
14242 (var_decode_location): Likewise.
14243 (new_symbol_full): Likewise.
14244 (dwarf2_const_value_data): Likewise.
14245 (dwarf2_const_value_attr): Likewise.
14246 (dwarf2_const_value): Likewise.
14247 (die_type): Likewise.
14248 (die_containing_type): Likewise.
14249 (lookup_die_type): Likewise.
14250 (guess_full_die_structure_name): Likewise.
14251 (anonymous_struct_prefix): Likewise.
14252 (dwarf2_name): Likewise.
14253 (follow_die_ref_or_sig): Likewise.
14254 (follow_die_offset): Likewise.
14255 (follow_die_ref): Likewise.
14256 (dwarf2_fetch_die_loc_sect_off): Likewise.
14257 (dwarf2_fetch_constant_bytes): Likewise.
14258 (dwarf2_fetch_die_type_sect_off): Likewise.
14259 (dwarf2_get_die_type): Likewise.
14260 (follow_die_sig): Likewise.
14261 (decode_locdesc): Likewise.
14262 (dwarf2_per_cu_objfile): Likewise.
14263 (dwarf2_per_cu_text_offset): Likewise.
14264 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14265 objfile.
14266 (set_die_type): Access objfile through
14267 dwarf2_per_objfile.
14268
14269 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14270
14271 * valprint.c (converted_character_d): Remove typedef.
14272 (DEF_VEC_O (converted_character_d)): Remove.
14273 (count_next_character): Use std::vector.
14274 (print_converted_chars_to_obstack): Likewise.
14275 (generic_printstr): Likewise.
14276
14277 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14278
14279 * xml-support.h (struct gdb_xml_value): Add constructor.
14280 <value>: Change type to unique_xmalloc_ptr.
14281 (gdb_xml_value_s): Remove typedef.
14282 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14283 (gdb_xml_element_start_handler): Change parameter type to
14284 std::vector.
14285 (xml_find_attribute): Likewise.
14286 * xml-support.c (xml_find_attribute): Change parameter type to
14287 std::vector and adjust.
14288 (gdb_xml_values_cleanup): Remove.
14289 (gdb_xml_parser::start_element): Adjust to std::vector.
14290 (xinclude_start_include): Change paraeter type to std::vector
14291 and adjust.
14292 * btrace.c (check_xml_btrace_version): Likewise.
14293 (parse_xml_btrace_block): Likewise.
14294 (parse_xml_btrace_pt_config_cpu): Likewise.
14295 (parse_xml_btrace_pt): Likewise.
14296 (parse_xml_btrace_conf_bts): Likewise.
14297 (parse_xml_btrace_conf_pt): Likewise.
14298 * memory-map.c (memory_map_start_memory): Likewise.
14299 (memory_map_start_property): Likewise.
14300 * osdata.c (osdata_start_osdata): Likewise.
14301 (osdata_start_item): Likewise.
14302 (osdata_start_column): Likewise.
14303 * remote.c (start_thread): Likewise.
14304 * solib-aix.c (library_list_start_library): Likewise.
14305 (library_list_start_list): Likewise.
14306 * solib-svr4.c (library_list_start_library): Likewise.
14307 (svr4_library_list_start_list): Likewise.
14308 * solib-target.c (library_list_start_segment): Likewise.
14309 (library_list_start_section): Likewise.
14310 (library_list_start_library): Likewise.
14311 (library_list_start_list): Likewise.
14312 * tracepoint.c (traceframe_info_start_memory): Likewise.
14313 (traceframe_info_start_tvar): Likewise.
14314 * xml-syscall.c (syscall_start_syscall): Likewise.
14315 * xml-tdesc.c (tdesc_start_target): Likewise.
14316 (tdesc_start_feature): Likewise.
14317 (tdesc_start_reg): Likewise.
14318 (tdesc_start_union): Likewise.
14319 (tdesc_start_struct): Likewise.
14320 (tdesc_start_flags): Likewise.
14321 (tdesc_start_enum): Likewise.
14322 (tdesc_start_field): Likewise.
14323 (tdesc_start_enum_value): Likewise.
14324 (tdesc_start_vector): Likewise.
14325
14326 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14327
14328 * extension.h (struct xmethod_worker) <clone>: Remove.
14329 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14330 Remove.
14331 (python_xmethod_worker::clone): Remove.
14332 * valops.c (find_overload_match): Use std::move instead of
14333 clone.
14334
14335 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14336
14337 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14338 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14339 <free_xmethod_worker_data>: Remove.
14340 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14341 <get_xmethod_arg_types>: Remove.
14342 <get_xmethod_result_type>: Remove.
14343 <invoke_xmethod>: Remove.
14344 * extension.c (new_xmethod_worker): Remove.
14345 (clone_xmethod_worker): Remove.
14346 (get_matching_xmethod_workers): Return void, pass std::vector by
14347 pointer.
14348 (get_xmethod_arg_types): Rename to...
14349 (xmethod_worker::get_arg_types): ... this, and adjust.
14350 (get_xmethod_result_type): Rename to...
14351 (xmethod_worker::get_result_type): ... this, and adjust.
14352 (invoke_xmethod): Remove.
14353 (free_xmethod_worker): Remove.
14354 (free_xmethod_worker_vec): Remove.
14355 * extension.h (enum ext_lang_rc): Move here from
14356 extension-priv.h.
14357 (struct xmethod_worker): Add constructor and destructor.
14358 <data>: Remove.
14359 <value>: Remove.
14360 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14361 virtual pure methods.
14362 <get_arg_types, get_result_type>: New methods.
14363 (xmethod_worker_ptr): Remove typedef.
14364 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14365 (xmethod_worker_vec): Remove typedef.
14366 (xmethod_worker_up): New typedef.
14367 (invoke_xmethod): Remove.
14368 (clone_xmethod_worker): Remove.
14369 (free_xmethod_worker): Remove.
14370 (free_xmethod_worker_vec): Remove.
14371 (get_xmethod_arg_types): Remove.
14372 (get_xmethod_result_type): Remove.
14373 * valops.c (find_method_list): Use std::vector, don't use
14374 intermediate vector.
14375 (value_find_oload_method_list): Use std::vector.
14376 (find_overload_match): Use std::vector.
14377 (find_oload_champ): Use std::vector.
14378 * value.c (value_free): Use operator delete.
14379 (value_of_xmethod): Rename to...
14380 (value_from_xmethod): ... this. Don't assign
14381 xmethod_worker::value, take rvalue-reference.
14382 (result_type_of_xmethod): Adjust.
14383 (call_xmethod): Adjust.
14384 * value.h: Include extension.h.
14385 (struct xmethod_worker): Don't forward-declare.
14386 (value_of_xmethod): Rename to...
14387 (value_from_xmethod): ... this, take rvalue-reference.
14388 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14389 (struct python_xmethod_worker): ... this, add constructor and
14390 destructor.
14391 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14392 (gdbpy_free_xmethod_worker_data): Rename to...
14393 (python_xmethod_worker::~python_xmethod_worker): ... this and
14394 adjust.
14395 (gdbpy_clone_xmethod_worker_data): Rename to...
14396 (python_xmethod_worker::clone): ... this and adjust.
14397 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14398 temporary vector.
14399 (gdbpy_get_xmethod_arg_types): Rename to...
14400 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14401 (gdbpy_get_xmethod_result_type): Rename to...
14402 (python_xmethod_worker::do_get_result_type): ... this and
14403 adjust.
14404 (gdbpy_invoke_xmethod): Rename to...
14405 (python_xmethod_worker::invoke): ... this and adjust.
14406 (new_python_xmethod_worker): Rename to...
14407 (python_xmethod_worker::python_xmethod_worker): ... this and
14408 adjust.
14409 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14410 Remove.
14411 (gdbpy_free_xmethod_worker_data): Remove.
14412 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14413 (gdbpy_get_xmethod_arg_types): Remove.
14414 (gdbpy_get_xmethod_result_type): Remove.
14415 (gdbpy_invoke_xmethod): Remove.
14416 * python/python.c (python_extension_ops): Remove obsolete
14417 callbacks.
14418
14419 2018-01-05 Pedro Alves <palves@redhat.com>
14420
14421 PR gdb/18653
14422 * common/signals-state-save-restore.c
14423 (save_original_signals_state): New parameter 'quiet'. Warn if we
14424 find a custom handler preinstalled, instead of internal erroring.
14425 But only warn if !quiet.
14426 * common/signals-state-save-restore.h
14427 (save_original_signals_state): New parameter 'quiet'.
14428 * main.c (captured_main_1): Move save_original_signals_state call
14429 after option handling, and pass QUIET.
14430
14431 2018-01-05 Pedro Alves <palves@redhat.com>
14432
14433 * spu-tdep.c (spu_catch_start): Pass
14434 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14435
14436 2018-01-05 Pedro Alves <palves@redhat.com>
14437
14438 PR gdb/22670
14439 * ada-lang.c (literal_symbol_name_matcher): New function.
14440 (ada_get_symbol_name_matcher): Use it for
14441 symbol_name_match_type::SEARCH_NAME.
14442 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14443 it down instead of assuming symbol_name_match_type::FULL.
14444 * block.h (block_lookup_symbol): New parameter 'match_type'.
14445 * c-valprint.c (print_unpacked_pointer): Use
14446 lookup_symbol_search_name instead of lookup_symbol.
14447 * compile/compile-object-load.c (get_out_value_type): Pass down
14448 symbol_name_match_type::SEARCH_NAME.
14449 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14450 symbol_name_match_type::FULL.
14451 * cp-support.c (cp_get_symbol_name_matcher): Handle
14452 symbol_name_match_type::SEARCH_NAME.
14453 * infrun.c (insert_exception_resume_breakpoint): Use
14454 lookup_symbol_search_name.
14455 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14456 * psymtab.c (maintenance_check_psymtabs): Use
14457 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14458 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14459 SYMBOL_SEARCH_NAME.
14460 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14461 if symbol_name_match_type::SEARCH_NAME.
14462 (lookup_symbol_in_language): Pass down
14463 symbol_name_match_type::FULL.
14464 (lookup_symbol_search_name): New.
14465 (lookup_language_this): Pass down
14466 symbol_name_match_type::SEARCH_NAME.
14467 (lookup_symbol_aux, lookup_local_symbol): New parameter
14468 'match_type'. Pass it down.
14469 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14470 (lookup_symbol_search_name): New declaration.
14471 (lookup_symbol_in_block): New 'match_type' parameter.
14472
14473 2018-01-05 Pedro Alves <palves@redhat.com>
14474
14475 PR gdb/22670
14476 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14477 ada_lookup_symbol.
14478 (ada_lookup_symbol): Reimplement in terms of
14479 ada_lookup_symbol_list, bits factored out from
14480 ada_lookup_encoded_symbol.
14481
14482 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14483
14484 * ada-exp.y (write_object_renaming): When subscripting an array
14485 using a symbol as the index, pass the block in call to
14486 ada_lookup_encoded_symbol when looking that symbol up.
14487
14488 2018-01-05 Jerome Guitton <guitton@adacore.com>
14489
14490 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14491 TYPE_INDEX_TYPE.
14492
14493 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14494
14495 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14496 the case where VALUE_LVAL (val0) is not lval_memory.
14497
14498 2018-01-05 Xavier Roirand <roirand@adacore.com>
14499
14500 * ada-valprint.c (print_optional_low_bound): Handle
14501 character-indexed array printing like boolean-indexed array
14502 printing.
14503
14504 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14505
14506 * NEWS: Create a new section for the next release branch.
14507 Rename the section of the current branch, now that it has
14508 been cut.
14509
14510 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14511
14512 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14513 * version.in: Bump version to 8.1.50.DATE-git.
14514
14515 2018-01-03 Xavier Roirand <roirand@adacore.com>
14516
14517 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14518 Add field.
14519 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14520 Add field.
14521 (default_exception_support_info) <catch_handlers_sym>: Add field.
14522 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14523 (ada_exception_name_addr_1): Add "catch handlers" handling.
14524 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14525 Update all callers.
14526 (create_excep_cond_exprs) <ex>: Add parameter.
14527 (re_set_exception): Update create_excep_cond_exprs call.
14528 (print_it_exception, print_one_exception, print_mention_exception)
14529 (print_recreate_exception): Add "catch handler" handling.
14530 (allocate_location_catch_handlers, re_set_catch_handlers)
14531 (check_status_catch_handlers, print_it_catch_handlers)
14532 (print_one_catch_handlers, print_mention_catch_handlers)
14533 (print_recreate_catch_handlers): New function.
14534 (catch_handlers_breakpoint_ops): New variable.
14535 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14536 Add parameter. Add "catch handler" handling.
14537 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14538 Add "catch handler" handling.
14539 (ada_exception_catchpoint_cond_string): Add "catch handler"
14540 handling.
14541 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14542 call.
14543 (catch_ada_handlers_command): New function.
14544 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14545 operations structure.
14546 (_initialize_ada_language): Add "catch handlers" command entry.
14547 * NEWS: Document "catch handlers" feature.
14548
14549 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14550
14551 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14552 account when creating the array type of the slice.
14553 (ada_value_slice): Likewise.
14554
14555 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14556
14557 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14558 New enum value.
14559 (create_array_type_with_stride): Add byte_stride_prop parameter.
14560 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14561 New parameter. Update all callers in this file.
14562 (array_type_has_dynamic_stride): New function.
14563 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14564 of arrays with dynamic byte strides.
14565 * dwarf2read.c (read_array_type): Add support for dynamic
14566 DW_AT_byte_stride attributes.
14567
14568 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14569
14570 * dwarf2read.c (read_unspecified_type): Treat
14571 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14572
14573 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14574
14575 Update copyright year range in all GDB files.
14576
14577 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
14578
14579 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14580 and gdb/testsuite/gdb.base/step-line.c.
14581
14582 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14583
14584 * copyright.py (main): Dump the contents of
14585 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14586 even if BY_HAND is empty.
14587
14588 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14589
14590 * top.c (print_gdb_version): Update Copyright year in version
14591 message.
14592
14593 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14594
14595 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14596
14597 For older changes see ChangeLog-2017.
14598 \f
14599 Local Variables:
14600 mode: change-log
14601 left-margin: 8
14602 fill-column: 74
14603 version-control: never
14604 coding: utf-8
14605 End: