Add a helper function to trad_frame to support register cache maps.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2
3 * regcache.h (struct regcache_map_entry): Note that this type can
4 be used with traditional frame caches.
5 * trad-frame.c (trad_frame_set_reg_regmap): New.
6 * trad-frame.h (trad_frame_set_reg_regmap): New.
7
8 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
9
10 PR c++/16841
11 * valops.c (get_virtual_base_offset): New function.
12 (value_struct_elt_for_reference): Use it to get virtual base offset
13 and add it in calculating class member address.
14
15 2018-10-08 John Darrington <john@darrington.wattle.id.au>
16
17 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
18 (check_producer): Check if the producer is codewarrior.
19 (producer_is_codewarrior): New function.
20 (lnp_state_machine::record_line): Ignore is_stmt flag for records
21 produced by codewarrior.
22 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
23
24 2018-10-06 Tom Tromey <tom@tromey.com>
25
26 PR python/19399:
27 * python/py-inferior.c: Add "architecture" entry.
28 (infpy_architecture): New function.
29
30 2018-10-06 Tom Tromey <tom@tromey.com>
31
32 PR python/21765:
33 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
34 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
35 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
36 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
37
38 2018-10-06 Tom Tromey <tom@tromey.com>
39
40 PR build/17077:
41 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
42 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
43 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
44 #include.
45
46 2018-10-06 Tom Tromey <tom@tromey.com>
47
48 * python/py-breakpoint.c (bppy_get_location): Handle a
49 bp_breakpoint without a location.
50
51 2018-10-06 Tom Tromey <tom@tromey.com>
52
53 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
54 (_RegEx): Reformat help text.
55 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
56 (AnyCallerIs, AnyCallerMatches): Reformat help text.
57 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
58 text.
59 * python/lib/gdb/command/xmethods.py (InfoXMethod)
60 (EnableXMethod, DisableXMethod): Remove help indentation.
61 Capitalize meta-syntactic variables.
62 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
63 (EnableUnwinder, DisableUnwinder): Remove help indentation.
64 Capitalize meta-syntactic variables.
65 * python/lib/gdb/command/explore.py (ExploreCommand)
66 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
67 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
68 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
69 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
70 Remove help indentation.
71 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
72 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
73 (DisableFrameFilter, SetFrameFilterPriority)
74 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
75
76 2018-10-06 Tom Tromey <tom@tromey.com>
77
78 PR tui/28819:
79 * tui/tui-io.c (gdb_wgetch): New function.
80 (tui_mld_getc, tui_getc): Use it.
81
82 2018-10-05 Tom Tromey <tom@tromey.com>
83
84 * sol-thread.c (sol_thread_target::wait): Rename inner
85 "save_ptid".
86
87 2018-10-04 Tom Tromey <tom@tromey.com>
88
89 * configure: Rebuild.
90 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
91
92 2018-10-04 Tom Tromey <tom@tromey.com>
93
94 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
95 declaration of "block".
96
97 2018-10-04 Tom Tromey <tom@tromey.com>
98
99 * common/filestuff.c (fdwalk): Remove inner declaration of
100 "result".
101
102 2018-10-04 Tom Tromey <tom@tromey.com>
103
104 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
105 "structs_addr" and hoist declaration.
106
107 2018-10-04 Tom Tromey <tom@tromey.com>
108
109 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
110 variable "size".
111
112 2018-10-04 Tom Tromey <tom@tromey.com>
113
114 * mdebugread.c (parse_partial_symbols): Use std::string.
115
116 2018-10-04 Tom Tromey <tom@tromey.com>
117
118 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
119 * p-valprint.c (pascal_val_print): Split inner "i" variable.
120 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
121 header.
122 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
123 more inner scope.
124 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
125 * varobj.c (varobj_update): Rename inner "newobj",
126 "type_changed".
127 * valprint.c (generic_emit_char): Rename inner "buf".
128 * valops.c (find_overload_match): Rename inner "temp".
129 (value_struct_elt_for_reference): Declare "v" in more inner
130 scope.
131 * v850-tdep.c (v850_push_dummy_call): Rename "len".
132 * unittests/array-view-selftests.c (run_tests): Rename inner
133 "vec".
134 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
135 header.
136 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
137 "tsv" in more inner scope.
138 (print_one_static_tracepoint_marker): Rename inner
139 "tuple_emitter".
140 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
141 (tic6x_push_dummy_call): Don't redeclare "addr".
142 * target-float.c: Declare "dto" lower.
143 * symtab.c (lookup_local_symbol): Rename inner "sym".
144 (find_pc_sect_line): Rename inner "pc".
145 * stack.c (print_frame): Don't redeclare "gdbarch".
146 (return_command): Rename inner "gdbarch".
147 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
148 "sp".
149 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
150 header.
151 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
152 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
153 scope.
154 * remote.c (remote_target::update_thread_list): Don't redeclare
155 "tp".
156 (remote_target::process_initial_stop_replies): Rename inner
157 "thread".
158 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
159 (remote_target::wait_as): Don't redeclare "stop_reply".
160 (remote_target::get_thread_local_address): Rename inner
161 "result".
162 (remote_target::get_tib_address): Likewise.
163
164 * regcache.c (cooked_read_test): Rename "regnum".
165 * record-btrace.c (cmd_record_btrace_start): Rename inner
166 "exception".
167 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
168 loop header.
169 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
170 header.
171 (ppu2spu_sniffer): Rename inner "buf".
172 * parse.c (operator_check_standard): Rename inner "type",
173 "objfile".
174 * p-valprint.c (pascal_val_print): Introduce new scope for
175 "low_bound", "high_bound".
176 * p-exp.y (yylex): Declare "i" in loop header.
177 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
178 Lower declaration of "s".
179 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
180 header.
181 (nios2_push_dummy_call): Rename "len".
182 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
183 "buf".
184 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
185 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
186 (linux_xfer_osdata_modules): Likewise.
187 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
188 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
189 (mips_o64_push_dummy_call): Likewise.
190 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
191 "op".
192 * mi/mi-main.c (list_available_thread_groups): Rename inner
193 "tuple_emitter".
194 (mi_cmd_data_read_memory): Rename inner "opts".
195 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
196 "tuple_emitter".
197 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
198 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
199 more inner scope.
200 (parse_partial_symbols): Rename inner "pst", "p", "name"
201 * main.c (captured_main_1): Rename inner "i"s.
202 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
203 "oso2".
204 * linux-tdep.c (linux_info_proc): Rename inner "filename".
205 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
206 * infrun.c (handle_no_resumed): Don't redeclare "thread".
207 (handle_signal_stop): Rename inner "gdbarch".
208 (handle_command): Declare "signum" in loop header.
209 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
210 "status".
211 (examine_prologue): Rename inner "sol" and "sof".
212 (ia64_extract_return_value): Rename inner "val". Declare another
213 "val" in a more inner scope.
214 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
215 inner scope.
216 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
217 "except".
218 * findvar.c (default_read_var_value): Don't redeclare "addr".
219 * f-exp.y (yylex): Declare "i" in loop header.
220 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
221 Rename inner "type", "expect_type".
222 (evaluate_subexp_for_sizeof): Rename inner "pc".
223 * elfread.c (elf_symfile_read): Rename inner "abfd".
224 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
225 "bytes_read".
226 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
227 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
228 (dwarf_decode_line_header): Rename inner "lh".
229 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
230 "offset". Declare "i" in loop header.
231 (disassemble_dwarf_expression): Rename inner "addr_size".
232 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
233 inner "result".
234 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
235 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
236 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
237 "inner_list_emitter".
238 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
239 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
240 declaration in a block.
241 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
242 * cp-valprint.c (cp_print_value_fields): Don't redeclare
243 "obstack_final_size".
244 * cp-support.c (inspect_type): Declare "i" in loop header.
245 * compile/compile.c (compile_instance::insert_symbol_error):
246 Rename inner "e".
247 * common/agent.c (agent_run_command): Remove inner "ret"
248 declaration.
249 * coffread.c (coff_symfile_read): Rename inner "name".
250 (coff_symfile_read): Rename inner "abfd".
251 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
252 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
253 "high".
254 * c-exp.y (lex_one_token): Move "len" declaration lower.
255 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
256 "gdbarch".
257 (create_exception_master_breakpoint): Likewise. Don't redeclare
258 "b".
259 (watch_command_1): Declare "mark" later.
260 (clear_command): Don't shadow "a" or "b".
261 (delete_command): Rename inner "b".
262 (delete_trace_command): Likewise.
263 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
264 "op".
265 (arm_gdbarch_init): Remove inner "e_flags".
266 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
267 "offset" in inner blocks.
268
269 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
270
271 * dwarf-index-write.c (file_write): Don't write if the vector is
272 empty.
273
274 2018-10-05 Tom de Vries <tdevries@suse.de>
275
276 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
277 PyArg_ParseTuple call.
278
279 2018-10-05 Tom de Vries <tdevries@suse.de>
280
281 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
282 PyArg_ParseTuple call.
283
284 2018-10-04 Joel Brobecker <brobecker@adacore.com>
285
286 * psymtab.c (recursively_search_psymtabs): Reformat parameters
287 to avoid exceeding 80 characters per line limit.
288
289 2018-10-04 Tom Tromey <tom@tromey.com>
290
291 * symfile.c (syms_from_objfile_1, finish_new_objfile)
292 (reread_symbols): Update.
293 * complaints.h (clear_complaints): Remove argument.
294 * complaints.c (enum complaint_series): Remove.
295 (series): Remove global.
296 (complaint_internal): Update.
297 (clear_complaints): Remove argument.
298
299 2018-10-04 Tom Tromey <tom@tromey.com>
300
301 * symfile.c (symbol_file_add_with_addrs): Do not print "no
302 debugging symbols" message if there is a separate debug objfile.
303
304 2018-10-04 Tom Tromey <tom@tromey.com>
305
306 PR cli/19551:
307 * symfile.c (symbol_file_add_with_addrs): Update output.
308 * psymtab.c (require_partial_symbols): Update output.
309
310 2018-10-04 Tom Tromey <tom@tromey.com>
311
312 PR cli/22234:
313 * complaints.c: Emit \n.
314
315 2018-10-04 Tom Tromey <tom@tromey.com>
316
317 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
318 (separate_debug_file_exists, find_separate_debug_file)
319 (add_symbol_file_command, reread_symbols, allocate_symtab)
320 (allocate_compunit_symtab): Use filtered printing, not
321 unfiltered.
322 * psymtab.c (require_partial_symbols, dump_psymtab)
323 (allocate_psymtab): Use filtered printing, not unfiltered.
324
325 2018-10-04 Tom Tromey <tom@tromey.com>
326
327 * complaints.c (complaint_internal): Correctly check complaint
328 count.
329
330 2018-10-04 Tom Tromey <tom@tromey.com>
331
332 * complaints.h (struct complaints): Remove declaration.
333 * complaints.c (clear_complaints): Remove an unused variable.
334
335 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
336
337 * MAINTAINERS (Write After Approval): Add self.
338
339 2018-10-03 Tom Tromey <tom@tromey.com>
340
341 * guile/scm-value.c (gdbscm_value_to_string): Initialize
342 "buffer_contents".
343 * coffread.c (coff_symtab_read): Initialize "newobj".
344
345 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
346
347 * dwarf2read.c (read_func_scope): Remove struct keyword in
348 range-based for.
349
350 2018-10-03 Tom Tromey <tom@tromey.com>
351
352 * README: Mention --enable-ubsan.
353 * NEWS: Mention --enable-ubsan.
354 * acinclude.m4: Include sanitize.m4.
355 * configure: Rebuild.
356 * configure.ac: Call AM_GDB_UBSAN.
357 * sanitize.m4: New file.
358
359 2018-10-03 Tom Tromey <tom@tromey.com>
360
361 * expression.h (enum exp_opcode): Use uint8_t as base type.
362 * expprint.c (op_name): Handle invalid opcodes.
363
364 2018-10-03 Tom Tromey <tom@tromey.com>
365
366 * parse.c (prefixify_expression): Add assert.
367 (parse_exp_in_context_1): Throw exception if the expression is
368 empty.
369
370 2018-10-03 Tom Tromey <tom@tromey.com>
371
372 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
373
374 2018-10-03 Tom Tromey <tom@tromey.com>
375
376 * c-exp.y (parse_number): Work in unsigned. Remove casts.
377
378 2018-10-03 Tom Tromey <tom@tromey.com>
379
380 * dwarf2read.c (read_subrange_type): Make "negative_mask"
381 unsigned.
382
383 2018-10-03 Tom Tromey <tom@tromey.com>
384
385 * findvar.c (extract_integer): Do work in an unsigned type.
386
387 2018-10-03 Tom Tromey <tom@tromey.com>
388
389 * common/enum-flags.h (enum_flags::operator~): Add static assert.
390 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
391 base type.
392 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
393 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
394 type.
395 * c-lang.h (enum c_string_type_values): Use unsigned as base
396 type.
397 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
398
399 2018-10-03 Tom Tromey <tom@tromey.com>
400
401 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
402 <~dwarf2_frame_state_reg_info>: Update.
403 <dwarf2_frame_state_reg_info>: Update.
404 <alloc_regs>: Add assertion. Update.
405 <reg>: Now a std::vector.
406 <num_regs>: Remove.
407 <swap>: Update.
408 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
409 (execute_cfa_program_test, dwarf2_frame_cache): Update.
410
411 2018-10-03 Tom Tromey <tom@tromey.com>
412
413 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
414
415 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
416
417 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
418
419 2018-10-02 Tom Tromey <tom@tromey.com>
420
421 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
422
423 2018-10-02 John Darrington <john@darrington.wattle.id.au>
424
425 * NEWS: Mention changed commands.
426 * ser-uds.c: New file.
427 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
428 * configure: Regenerate.
429 * Makefile.in: Add new file.
430 * serial.c (serial_open): Check if filename is a socket
431 and lookup the appropriate interface accordingly.
432
433 2018-10-01 Alan Hayward <alan.hayward@arm.com>
434
435 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
436 define.
437 (AARCH64_EXTRA_MAGIC): Likewise.
438 (AARCH64_FPSIMD_MAGIC): Likewise.
439 (AARCH64_SVE_MAGIC): Likewise.
440 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
441 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
442 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
443 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
444 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
445 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
446 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
447 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
448 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
449 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
450 (read_aarch64_ctx): Add function.
451 (aarch64_linux_sigframe_init): Detect FP registers.
452
453 2018-10-01 Alan Hayward <alan.hayward@arm.com>
454
455 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
456 (AARCH64_D0_REGNUM): Likewise.
457 (AARCH64_S0_REGNUM): Likewise.
458 (AARCH64_H0_REGNUM): Likewise.
459 (AARCH64_B0_REGNUM): Likewise.
460 (AARCH64_SVE_V0_REGNUM): Likewise.
461 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
462 (AARCH64_D0_REGNUM): Likewise.
463 (AARCH64_S0_REGNUM): Likewise.
464 (AARCH64_H0_REGNUM): Likewise.
465 (AARCH64_B0_REGNUM): Likewise.
466 (AARCH64_SVE_V0_REGNUM): Likewise.
467
468 2018-10-01 Gary Benson <gbenson@redhat.com>
469
470 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
471 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
472 prfpregset_t instead of gdb_prfpregset_t.
473 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
474 * configure, config.in: Rebuild.
475
476 2018-10-01 Gary Benson <gbenson@redhat.com>
477
478 * common/gdb_proc_service.h: New file, factored out from...
479 * gdb_proc_service.h: Moved common code to the above file.
480 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
481
482 2018-10-01 Gary Benson <gbenson@redhat.com>
483
484 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
485 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
486
487 2018-10-01 Gary Benson <gbenson@redhat.com>
488
489 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
490 (AC_CHECK_HEADERS): Check for linux/elf.h.
491 * configure, config.in: Rebuild.
492 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
493 doesn't define elf_fpregset_t.
494
495 2018-10-01 Gary Benson <gbenson@redhat.com>
496
497 * gdb_proc_service.h: Whitespace change.
498
499 2018-10-01 Tom Tromey <tom@tromey.com>
500
501 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
502 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
503 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
504
505 2018-10-01 Tom Tromey <tom@tromey.com>
506
507 * README: Minor change.
508
509 2018-09-30 Pedro Alves <palves@redhat.com>
510
511 * darwin-nat-info.c (darwin_debug_regions_recurse)
512 (info_mach_exceptions_command): Remove unused local variables.
513 * darwin-nat.c (darwin_decode_notify_message)
514 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
515 (darwin_stop_inferior, darwin_setup_exceptions)
516 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
517 (darwin_nat_target::attach, darwin_nat_target::detach)
518 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
519 local variables.
520 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
521 variables.
522
523 2018-09-29 Tom Tromey <tom@tromey.com>
524
525 * README: Remove some leftover text.
526
527 2018-09-29 Tom Tromey <tom@tromey.com>
528
529 * PROBLEMS: Rewrite.
530 * README: Update.
531
532 2018-09-28 John Baldwin <jhb@FreeBSD.org>
533
534 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
535 case with explicit breakpoint kind.
536 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
537 'additional_info' and related logic.
538 (riscv_debug_breakpoints): New variable.
539 (riscv_breakpoint_kind_from_pc): Use the length of the existing
540 instruction to determine the breakpoint kind.
541 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
542 flag. Update description of 'set/show riscv
543 use-compressed-breakpoints' flag.
544
545 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
546
547 (NEWS): Mention changes to frame related commands.
548 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
549 (add_prefix_cmd_suppress_notification): New function.
550 (add_com_suppress_notification): Call
551 add_cmd_suppress_notification.
552 * command.h (add_cmd_suppress_notification): Declare.
553 (add_prefix_cmd_suppress_notification): Declare.
554 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
555 (parse_frame_specification): Moved from stack.c, with
556 simplification to handle a single argument.
557 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
558 switch to the selected frame. Add a header comment.
559 * stack.c: Remove 'safe-ctype.h' include.
560 (find_frame_for_function): Add declaration.
561 (find_frame_for_address): New function.
562 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
563 (frame_selection_by_function_completer): New function.
564 (info_frame_command): Rename to...
565 (info_frame_command_core): ...this, and update parameter types.
566 (select_frame_command): Rename to...
567 (select_frame_command_core): ...this, and update parameter types.
568 (frame_command): Rename to...
569 (frame_command_core): ...this, and update parameter types.
570 (class frame_command_helper): New class to wrap implementations of
571 frame related sub-commands.
572 (frame_apply_cmd_list): New static global.
573 (frame_cmd_list): Make static.
574 (select_frame_cmd_list): New global for sub-commands.
575 (info_frame_cmd_list): New global for sub-commands.
576 (_initialize_stack): Register sub-commands for 'frame',
577 'select-frame', and 'info frame'. Update 'frame apply' commands
578 to use frame_apply_cmd_list. Move function local static
579 frame_apply_list to file static frame_apply_cmd_list for
580 consistency.
581 * stack.h (select_frame_command): Delete declarationn.
582 (select_frame_for_mi): Declare new function.
583
584 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
585
586 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
587 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
588 and NOP.
589
590 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
591
592 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
593
594 2018-09-26 Tom Tromey <tom@tromey.com>
595
596 * valops.c (auto_abandon): Remove dead code.
597
598 2018-09-26 Tom Tromey <tom@tromey.com>
599
600 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
601
602 2018-09-24 Tom Tromey <tom@tromey.com>
603
604 * common/pathstuff.c (get_standard_cache_dir): Make
605 "xdg_cache_home" and "home" const.
606 * top.c (init_history): Make "tmpenv" const.
607 * main.c (get_init_files): Make "homedir" const.
608
609 2018-09-23 Tom Tromey <tom@tromey.com>
610
611 PR python/18852:
612 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
613
614 2018-09-23 Tom Tromey <tom@tromey.com>
615
616 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
617 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
618 * python/python-internal.h (gdbpy_handle_exception): Declare.
619 * python/py-utils.c (gdbpy_handle_exception): New function.
620
621 2018-09-23 Tom Tromey <tom@tromey.com>
622
623 PR python/17284:
624 * python/py-type.c (typy_template_argument): Check for negative
625 argument number.
626
627 2018-09-23 Tom Tromey <tom@tromey.com>
628
629 PR python/14062:
630 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
631
632 2018-09-23 Tom Tromey <tom@tromey.com>
633
634 PR python/18170:
635 * python/py-value.c (valpy_int): Allow conversion from pointer
636 type.
637
638 2018-09-23 Tom Tromey <tom@tromey.com>
639
640 PR python/20126:
641 * python/py-value.c (valpy_int): Respect type sign.
642
643 2018-09-23 Tom Tromey <tom@tromey.com>
644
645 PR python/18352;
646 * python/py-value.c (valpy_float): Allow conversions from int or
647 char.
648 (valpy_int, valpy_long): Allow conversions from float.
649
650 2018-09-23 Tom Tromey <tom@tromey.com>
651
652 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
653 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
654
655 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
656
657 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
658 __sighndlr.
659 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
660
661 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
662
663 * windows-nat.c (windows_nat_target::wait): Remove a spurious
664 target_terminal::ours().
665
666 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
667
668 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
669 of vl to ULONGEST.
670
671 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
672
673 * breakpoint.c (update_inserted_breakpoint_locations): Remove
674 redundant condition.
675
676 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
677
678 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
679
680 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
681 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
682 * sol-thread.c (ps_pdmodel): Don't guard definition.
683
684 * procfs.c: Fix formatting.
685
686 * procfs.c (sysset_t_alloc): Remove.
687 (create_procinfo): Use XNEW instead of sysset_t_alloc.
688 (procfs_debug_inferior): Likewise.
689 (procfs_set_exec_trap): Likewise.
690 (proc_set_traced_sysentry): Don't allocate argp dynamically.
691 (proc_set_traced_sysexit): Likewise.
692
693 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
694 (dead_procinfo): Likewise.
695 (proc_warn): Likewise.
696 (proc_error): Likewise.
697 (proc_get_LDT_entry): Likewise.
698 (do_attach): Likewise.
699 (procfs_target::pid_to_str): Likewise.
700 (iterate_over_mappings): Likewise.
701
702 * procfs.c (create_procinfo): Fix ARI warning.
703 (proc_get_status): Likewise.
704 (proc_stop_process): Likewise.
705 (proc_run_process): Likewise.
706 (proc_kill): Likewise.
707 (proc_get_LDT_entry): Likewise.
708 (procfs_find_LDT_entry): Likewise.
709 (proc_update_threads): Likewise.
710 (proc_iterate_over_threads): Likewise.
711 (do_attach): Likewise.
712 (procfs_xfer_memory): Likewise.
713 (invalidate_cache): Likewise.
714 (procfs_target::resume): Likewise.
715 (procfs_init_inferior): Likewise.
716 (procfs_set_exec_trap): Likewise.
717 (procfs_target::thread_alive): Likewise.
718 (procfs_target::pid_to_exec_file): Likewise.
719 (iterate_over_mappings): Likewise.
720 (procfs_target::make_corefile_notes): Likewise.
721 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
722
723 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
724 (procfs_find_LDT_entry): Likewise.
725 * sol-thread.c (ps_lgetLDT): Likewise.
726
727 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
728
729 PR tdep/17903
730 * procfs.c (procfs_target): Declare pid_to_exec_file.
731 (procfs_target::pid_to_exec_file): New.
732
733 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
734
735 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
736 renaming.
737 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
738 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
739
740 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
741
742 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
743 (supply_fpregset, fill_fpregset): Move ...
744 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
745 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
746 Remove references to ioctl-based procfs.
747 Include <sys/reg.h>.
748 Remove PR_MODEL_NATIVE guards.
749 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
750 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
751
752 2018-09-19 Xavier Roirand <roirand@adacore.com>
753
754 PR gdb/20981:
755 * solib-darwin.c (darwin_get_dyld_bfd): New function.
756 (darwin_solib_get_all_image_info_addr_at_init): Update call.
757 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
758
759 2018-09-19 John Baldwin <jhb@FreeBSD.org>
760
761 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
762 (fbsd_print_sockaddr_in6): Likewise.
763
764 2018-09-19 Richard Bunt <richard.bunt@arm.com>
765 Chris January <chris.january@arm.com>
766
767 * eval.c (skip_undetermined_arglist): Skip argument list helper.
768 (evaluate_subexp_standard): Return a dummy type when
769 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
770 OP_F77_UNDETERMINED_ARGLIST case.
771 * expression.h (enum noside): Update comment.
772
773 2018-09-19 George Vasick <george.vasick@oracle.com>
774
775 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
776
777 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
778 April Chin <april.chin@oracle.com>
779 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
780
781 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
782 uint_t lwpid_t.
783 (create_procinfo): Print pids in /proc without leading zeros.
784
785 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
786
787 * nios2-tdep.c (nios2_gcc_target_options): New.
788 (nios2_gdb_arch_init): Install new hook.
789
790 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
791
792 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
793 New file.
794 * update-gnulib.sh: Apply patch.
795 * configure: Re-generate.
796
797 2018-09-18 John Baldwin <jhb@FreeBSD.org>
798
799 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
800 description. Make "info proc" command descriptions more
801 consistent.
802
803 2018-09-18 John Baldwin <jhb@FreeBSD.org>
804
805 * NEWS: Mention 'info proc files' command.
806
807 2018-09-18 John Baldwin <jhb@FreeBSD.org>
808
809 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
810 descriptors for IP_FILES and IP_ALL.
811
812 2018-09-18 John Baldwin <jhb@FreeBSD.org>
813
814 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
815 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
816 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
817 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
818 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
819 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
820 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
821 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
822 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
823 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
824 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
825 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
826 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
827 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
828 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
829 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
830 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
831 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
832 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
833 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
834 (struct fbsd_sockaddr_un): New types.
835 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
836 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
837 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
838 (fbsd_core_info_proc_files): New functions.
839 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
840 IP_ALL.
841 * fbsd-tdep.h (fbsd_info_proc_files_header)
842 (fbsd_info_proc_files_entry): New.
843
844 2018-09-18 John Baldwin <jhb@FreeBSD.org>
845
846 * defs.h (enum info_proc_what) [IP_FILES]: New value.
847 * infcmd.c (info_proc_cmd_files): New function.
848 (_initialize_infcmd): Register 'info proc files' command.
849
850 2018-09-18 John Baldwin <jhb@FreeBSD.org>
851
852 * gnulib/aclocal-m4-deps.mk: Re-generate.
853 * gnulib/aclocal.m4: Re-generate.
854 * gnulib/config.in: Re-generate.
855 * gnulib/configure: Re-generate.
856 * gnulib/import/Makefile.am: Re-generate.
857 * gnulib/import/Makefile.in: Re-generate.
858 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
859 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
860 * gnulib/import/arpa_inet.in.h: New file.
861 * gnulib/import/inet_ntop.c: New file.
862 * gnulib/import/m4/arpa_inet_h.m4: New file.
863 * gnulib/import/m4/inet_ntop.m4: New file.
864 * gnulib/import/m4/netinet_in_h.m4: New file.
865 * gnulib/import/m4/socklen.m4: New file.
866 * gnulib/import/m4/sockpfaf.m4: New file.
867 * gnulib/import/m4/stdalign.m4: New file.
868 * gnulib/import/m4/sys_uio_h.m4: New file.
869 * gnulib/import/netinet_in.in.h: New file.
870 * gnulib/import/stdalign.in.h: New file.
871 * gnulib/import/sys_socket.c: New file.
872 * gnulib/import/sys_socket.in.h: New file.
873 * gnulib/import/sys_uio.in.h: New file.
874 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
875 module.
876
877 2018-09-18 John Baldwin <jhb@FreeBSD.org>
878
879 * gnulib/aclocal-m4-deps.mk: New file.
880 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
881 deterministically.
882
883 2018-09-18 John Baldwin <jhb@FreeBSD.org>
884
885 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
886 KVE_PATH.
887
888 2018-09-18 Tom Tromey <tom@tromey.com>
889
890 * compile/compile-object-load.c (struct
891 link_hash_table_cleanup_data): Add constructor and destructor.
892 Use DISABLE_COPY_AND_ASSIGN.
893 (~link_hash_table_cleanup_data): Rename from
894 link_hash_table_free. Now a destructor.
895 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
896
897 2018-09-18 Tom Tromey <tom@tromey.com>
898
899 * compile/compile-object-run.c (do_module_cleanup): Use delete.
900 * compile/compile-object-load.c (struct munmap_list): Move to
901 header file.
902 (munmap_list::add): Rename from munmap_list_add; rewrite.
903 (munmap_list::~munmap_list): Rename from munmap_list_free.
904 (munmap_listp_free_cleanup): Remove.
905 (compile_object_load): Update.
906 * compile/compile-object-load.h (struct munmap_list): Move from
907 compile-object-load.c. Rewrite.
908
909 2018-09-18 Alan Hayward <alan.hayward@arm.com>
910
911 * aarch64-tdep.c (pass_in_v): Use register size.
912 (aarch64_extract_return_value): Likewise.
913 (aarch64_store_return_value): Likewise.
914
915 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
916
917 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
918 rlim_t.
919
920 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
921
922 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
923 Fix short help line.
924
925 2018-09-17 Tom Tromey <tom@tromey.com>
926
927 PR python/20445:
928 * configure: Rebuild.
929 * configure.ac: Conditionally use -DNDEBUG for Python.
930
931 2018-09-17 Tom Tromey <tom@tromey.com>
932
933 * configure: Rebuild.
934 * configure.ac: Use gmp as a library dependency when checking for
935 mpfr.
936
937 2018-09-17 Pedro Alves <palves@redhat.com>
938
939 * python/py-inferior.c (find_inferior_object): Delete.
940
941 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
942
943 * compile/compile-cplus-types.c
944 (compile_cplus_instance::enter_scope): Don't use new_scope after
945 std::move.
946
947 2018-09-17 Tom Tromey <tom@tromey.com>
948
949 * common/pathstuff.c (get_standard_cache_dir): Use
950 ~/Library/Caches on macOS.
951 * common/pathstuff.h (get_standard_cache_dir): Update comment.
952
953 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
954
955 PR python/23669
956 * breakpoint.c (commands_cmd_element): New.
957 (_initialize_breakpoint): Assign commands_cmd_element.
958 * breakpoint.h (commands_cmd_element): New.
959 * cli/cli-script.c (while_cmd_element, if_command,
960 define_cmd_element): New.
961 (command_name_equals): Remove.
962 (process_next_line): Compare commands by pointer, not by name.
963 (_initialize_cli_script): Assign the various cmd_list_element
964 variables.
965 * compile/compile.c (compile_cmd_element): New.
966 (_initialize_compile): Assign compile_cmd_element.
967 * compile/compile.h (compile_cmd_element): New.
968 * guile/guile.c (guile_cmd_element): New.
969 (install_gdb_commands): Assign guile_cmd_element.
970 * guile/guile.h (guile_cmd_element): New.
971 * python/python.c (python_cmd_element): New.
972 (_initialize_python): Assign python_cmd_element.
973 * python/python.h (python_cmd_element): New.
974 * tracepoint.c (while_stepping_cmd_element): New.
975 (_initialize_tracepoint): Assign while_stepping_cmd_element.
976 * tracepoint.h (while_stepping_cmd_element): New.
977
978 2018-09-17 Tom Tromey <tom@tromey.com>
979
980 * infrun.c (save_infcall_suspend_state): Return
981 infcall_suspend_state_up.
982 (save_infcall_control_state): Return infcall_control_state_up.
983 * inferior.h (save_infcall_suspend_state)
984 (save_infcall_control_state): Declare later. Return unique
985 pointers.
986
987 2018-09-17 Tom Tromey <tom@tromey.com>
988
989 * infrun.c (struct stop_context): Declare constructor,
990 destructor, "changed" method.
991 (stop_context::stop_context): Rename from save_stop_context.
992 (stop_context::~stop_context): Rename from
993 release_stop_context_cleanup.
994 (normal_stop): Update.
995 (stop_context::changed): Rename from stop_context_changed. Return
996 bool.
997
998 2018-09-17 Tom Tromey <tom@tromey.com>
999
1000 * inferior.h (struct infcall_suspend_state_deleter): New.
1001 (infcall_suspend_state_up): New typedef.
1002 (struct infcall_control_state_deleter): New.
1003 (infcall_control_state_up): New typedef.
1004 (make_cleanup_restore_infcall_suspend_state)
1005 (make_cleanup_restore_infcall_control_state): Don't declare.
1006 * infcall.c (call_function_by_hand_dummy): Update.
1007 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1008 (make_cleanup_restore_infcall_suspend_state): Remove.
1009 (do_restore_infcall_control_state_cleanup)
1010 (make_cleanup_restore_infcall_control_state): Remove.
1011
1012 2018-09-17 Tom Tromey <tom@tromey.com>
1013
1014 * gdbthread.h (struct thread_control_state): Add initializer.
1015 (class thread_info) <control>: Remove initializer.
1016 * inferior.h (struct inferior_control_state): Add initializer.
1017 (class inferior) <control>: Remove initializer.
1018 (exit_inferior_1): Update.
1019 * infrun.c (struct infcall_control_state): Add constructors.
1020 (save_infcall_control_state): Use new.
1021 (restore_infcall_control_state, discard_infcall_control_state):
1022 Use delete.
1023
1024 2018-09-17 Tom Tromey <tom@tromey.com>
1025
1026 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1027 unique_ptr.
1028 <siginfo_data>: Now a unique_xmalloc_ptr.
1029 (save_infcall_suspend_state, restore_infcall_suspend_state)
1030 (discard_infcall_suspend_state)
1031 (get_infcall_suspend_state_regcache): Update.
1032
1033 2018-09-17 Tom Tromey <tom@tromey.com>
1034
1035 * gdbthread.h (struct thread_suspend_state): Add initializers.
1036 (class thread_info) <suspend>: Remove initializer.
1037 * infrun.c (struct infcall_suspend_state): Add initializers.
1038 (save_infcall_suspend_state): Use new.
1039 (discard_infcall_suspend_state): Use delete.
1040
1041 2018-09-16 Tom Tromey <tom@tromey.com>
1042
1043 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1044 Remove.
1045 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1046 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1047 (py_varobj_iter_new): Likewise.
1048 (py_varobj_get_iterator): Use gdbpy_ref.
1049
1050 2018-09-16 Tom Tromey <tom@tromey.com>
1051
1052 * python/py-threadevent.c (py_get_event_thread): Simplify.
1053 * python/py-inferior.c (infpy_thread_from_thread_handle):
1054 Return immediately after calling thread_to_thread_object. Use
1055 Py_RETURN_NONE.
1056 (thread_to_thread_object): Set the exception on a NULL return.
1057
1058 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1059
1060 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1061
1062 2018-09-16 Tom Tromey <tom@tromey.com>
1063
1064 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1065 Remove.
1066
1067 2018-09-16 Tom Tromey <tom@tromey.com>
1068
1069 * python/python-internal.h (thread_to_thread_object): Change
1070 return type.
1071 * python/py-inferior.c (thread_to_thread_object): Return a new
1072 reference.
1073 (infpy_thread_from_thread_handle): Update.
1074 * python/py-infthread.c (gdbpy_selected_thread): Update.
1075 * python/py-stopevent.c (create_stop_event_object): Update.
1076 * python/py-threadevent.c (py_get_event_thread): Return a new
1077 reference.
1078 (py_get_event_thread): Update.
1079 * python/py-event.h (py_get_event_thread): Change return type.
1080 * python/py-continueevent.c (create_continue_event_object):
1081 Update.
1082
1083 2018-09-16 Tom Tromey <tom@tromey.com>
1084
1085 * python/py-progspace.c (pspy_get_objfiles): Update.
1086 * python/python-internal.h (objfile_to_objfile_object): Change
1087 return type.
1088 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1089 Update.
1090 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1091 Update.
1092 * python/python.c (gdbpy_get_current_objfile): Update.
1093 (gdbpy_objfiles): Update.
1094 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1095 Update.
1096 (objfile_to_objfile_object): Return a new reference.
1097 * python/py-symtab.c (stpy_get_objfile): Update.
1098 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1099 Update.
1100
1101 2018-09-16 Tom Tromey <tom@tromey.com>
1102
1103 * python/py-inferior.c (infpy_get_progspace): Update.
1104 * python/python-internal.h (pspace_to_pspace_object): Change
1105 return type.
1106 * python/py-newobjfileevent.c
1107 (create_clear_objfiles_event_object): Update.
1108 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1109 Update.
1110 * python/python.c (gdbpy_get_current_progspace): Update.
1111 (gdbpy_progspaces): Update.
1112 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1113 reference.
1114 * python/py-objfile.c (objfpy_get_progspace): Update.
1115 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1116 Update.
1117
1118 2018-09-16 Tom Tromey <tom@tromey.com>
1119
1120 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1121 (solib_name, block_for_pc, find_pc_line): New functions.
1122 (execute_unwinders): Update.
1123 * python/py-block.c (gdbpy_block_for_pc): Remove.
1124 * python/py-inferior.c (infpy_get_progspace): New function.
1125 (inferior_object_getset) <progspace>: Add.
1126 * python/py-progspace.c (pspy_objfiles): Rewrite.
1127 (pspy_solib_name, pspy_block_for_pc)
1128 (pspy_find_pc_line, pspy_is_valid): New functions.
1129 (progspace_object_methods): Add entries for solib_name,
1130 block_for_pc, find_pc_line, is_valid.
1131 * python/python-internal.h (gdbpy_block_for_pc)
1132 (build_objfiles_list): Don't declare.
1133 * python/python.c: Don't include solib.h.
1134 (gdbpy_solib_name, gdbpy_find_pc_line)
1135 (gdbpy_get_current_progspace, build_objfiles_list)
1136 (gdbpy_objfiles): Remove.
1137 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1138 solib_name, find_pc_line>: Remove entries.
1139
1140 2018-09-16 Tom Tromey <tom@tromey.com>
1141
1142 * top.c (new_ui_command): Use GNU style for metasyntactic
1143 variables.
1144 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1145 variables.
1146 * maint.c (maintenance_translate_address): Remove "<>" around
1147 text.
1148 * interps.c (interpreter_exec_cmd): Use GNU style for
1149 metasyntactic variables.
1150 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1151 metasyntactic variables.
1152 * tracepoint.c (tfind_range_command): Use GNU style for
1153 metasyntactic variables.
1154 (tfind_outside_command): Likewise.
1155 (_initialize_tracepoint): Likewise.
1156 * remote.c (extended_remote_target::create_inferior): Use GNU
1157 style for metasyntactic variables.
1158 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1159 metasyntactic variables.
1160 (adi_assign_command): Likewise.
1161
1162 2018-09-16 Tom Tromey <tom@tromey.com>
1163
1164 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1165 metasyntactic variables. Print message if no disassembler options
1166 are available.
1167
1168 2018-09-15 Tom Tromey <tom@tromey.com>
1169
1170 * infcmd.c (get_inferior_args): Return const char *.
1171 * inferior.h (get_inferior_args): Return type now const.
1172 * linux-tdep.c (linux_fill_prpsinfo): Update.
1173 * procfs.c (procfs_target::make_corefile_notes): Update.
1174
1175 2018-09-07 Tom Tromey <tom@tromey.com>
1176
1177 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1178 inside the TRY.
1179
1180 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1181
1182 * nios2-tdep.c (nios2_type_align): New.
1183 (nios2_gdb_arch_init): Install type_align hook.
1184
1185 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1186
1187 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1188 type that is neither object file owned, nor gdbarch owned.
1189 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1190 gdbarch is non-NULL.
1191 (alloc_type_instance): Allocate non-objfile owned types on the
1192 gdbarch obstack.
1193 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1194 using TYPE_ALLOC to ensure memory is allocated on the correct
1195 obstack.
1196 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1197 obstack, or the gdbarch obstack.
1198 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1199
1200 2018-09-14 Tom Tromey <tom@tromey.com>
1201
1202 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1203 block.
1204
1205 2018-09-14 Tom Tromey <tom@tromey.com>
1206
1207 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1208
1209 2018-09-13 Tom Tromey <tom@tromey.com>
1210
1211 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1212 static.
1213
1214 2018-09-13 Tom Tromey <tom@tromey.com>
1215
1216 * exec.c (try_open_exec_file): Use std::string.
1217
1218 2018-09-13 Tom Tromey <tom@tromey.com>
1219
1220 * utils.h (gdb_bfd_errmsg): Return std::string.
1221 * exec.c (exec_file_attach): Update.
1222 * compile/compile-object-load.c (compile_object_load): Update.
1223 * utils.c (gdb_bfd_errmsg): Return std::string.
1224
1225 2018-09-13 Tom Tromey <tom@tromey.com>
1226
1227 * procfs.c (struct procinfo_deleter): New.
1228 (procinfo_up): New typedef.
1229 (do_destroy_procinfo_cleanup): Remove.
1230 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1231
1232 2018-09-13 Tom Tromey <tom@tromey.com>
1233
1234 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1235
1236 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1237 2018-09-13 Tom Tromey <tom@tromey.com>
1238
1239 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1240 (pspy_get_objfiles): New function.
1241 (progspace_object_methods): New.
1242 (pspace_object_type): Add tp_methods callback.
1243 * python/python-internal.h (build_objfiles_list): New
1244 declaration.
1245 * python/python.c (build_objfiles_list): New function.
1246 (gdbpy_objfiles): Implement using build_objfiles_list.
1247 * NEWS: Mention the Progspace.objfiles method.
1248
1249 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1250
1251 * python/py-inferior.c (infpy_get_progspace): New function.
1252 (inferior_object_getset): Add progspace property.
1253 * NEWS: Mention the new property.
1254
1255 2018-09-13 Tom Tromey <tom@tromey.com>
1256
1257 PR rust/23650:
1258 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1259
1260 2018-09-13 Tom Tromey <tom@tromey.com>
1261
1262 PR rust/23626:
1263 * rust-lang.c (rust_enum_variant): Now static.
1264 (rust_empty_enum_p): New function.
1265 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1266 Handle empty enum.
1267
1268 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1269
1270 * python/py-inferior.c (infpy_repr): New.
1271 (inferior_object_type): Register infpy_repr.
1272 * python/py-objfile.c (objfpy_repr): New.
1273 (objfile_object_type): Register objfpy_repr.
1274
1275 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1276
1277 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1278
1279 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1280
1281 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1282 typo.
1283
1284 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1285
1286 * common/common-utils.c: Don't include '<sys/stat.h>'.
1287 (is_regular_file): Move to...
1288 * common/filestuff.c (is_regular_file): ... here.
1289 * common/common-utils.h (is_regular_file): Move to...
1290 * common/filestuff.h (is_regular_file): ... here.
1291
1292 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1293
1294 * skip.c (debug_skip): New variable.
1295 (skiplist_entry::do_skip_file_p): Add debug output.
1296 (skiplist_entry::do_skip_gfile_p): Likewise.
1297 (skiplist_entry::skip_function_p): Likewise.
1298 (_initialize_step_skip): Create debug command.
1299 * NEWS: Mention set/show debug skip.
1300
1301 2018-09-11 Xavier Roirand <roirand@adacore.com>
1302
1303 * darwin-nat.c (should_disable_startup_with_shell):
1304 New function.
1305 (darwin_nat_target::create_inferior): Add call.
1306
1307 2018-09-11 Xavier Roirand <roirand@adacore.com>
1308
1309 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1310 inf_port, msg_state>: Initialize.
1311 (struct darwin_thread_info) <signaled, single_step>: Change
1312 type and initialize.
1313 (struct darwin_thread_info) <event>: Initialize.
1314
1315 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1316
1317 PR gdb/23555
1318 PR gdb/23558
1319 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1320 guesses.
1321
1322 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1323
1324 Revert:
1325 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1326
1327 PR gdb/23555
1328 PR gdb/23558
1329 * gnulib/aclocal.m4: Regenerate.
1330 * gnulib/config.in: Regenerate.
1331 * gnulib/configure: Regenerate.
1332 * gnulib/import/Makefile.am: Update.
1333 * gnulib/import/Makefile.in: Update.
1334 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1335 * gnulib/import/_Noreturn.h: ... this.
1336 * gnulib/import/alloca.in.h: Update.
1337 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1338 * gnulib/import/arg-nonnull.h: ... this.
1339 * gnulib/import/assure.h: Update.
1340 * gnulib/import/at-func.c: Update.
1341 * gnulib/import/basename-lgpl.c: Update.
1342 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1343 * gnulib/import/c++defs.h: ... this.
1344 * gnulib/import/canonicalize-lgpl.c: Update.
1345 * gnulib/import/cdefs.h: Update.
1346 * gnulib/import/chdir-long.c: Update.
1347 * gnulib/import/chdir-long.h: Update.
1348 * gnulib/import/cloexec.c: Update.
1349 * gnulib/import/cloexec.h: Update.
1350 * gnulib/import/close.c: Update.
1351 * gnulib/import/closedir.c: Update.
1352 * gnulib/import/config.charset: Update.
1353 * gnulib/import/dirent-private.h: Update.
1354 * gnulib/import/dirent.in.h: Update.
1355 * gnulib/import/dirfd.c: Update.
1356 * gnulib/import/dirname-lgpl.c: Update.
1357 * gnulib/import/dirname.h: Update.
1358 * gnulib/import/dosname.h: Update.
1359 * gnulib/import/dup-safer-flag.c: Update.
1360 * gnulib/import/dup-safer.c: Update.
1361 * gnulib/import/dup.c: Update.
1362 * gnulib/import/dup2.c: Update.
1363 * gnulib/import/errno.in.h: Update.
1364 * gnulib/import/error.c: Update.
1365 * gnulib/import/error.h: Update.
1366 * gnulib/import/exitfail.c: Update.
1367 * gnulib/import/exitfail.h: Update.
1368 * gnulib/import/extra/update-copyright: Update.
1369 * gnulib/import/fchdir.c: Update.
1370 * gnulib/import/fcntl.c: Update.
1371 * gnulib/import/fcntl.in.h: Update.
1372 * gnulib/import/fd-hook.c: Update.
1373 * gnulib/import/fd-hook.h: Update.
1374 * gnulib/import/fd-safer-flag.c: Update.
1375 * gnulib/import/fd-safer.c: Update.
1376 * gnulib/import/fdopendir.c: Update.
1377 * gnulib/import/filename.h: Update.
1378 * gnulib/import/filenamecat-lgpl.c: Update.
1379 * gnulib/import/filenamecat.h: Update.
1380 * gnulib/import/flexmember.h: Update.
1381 * gnulib/import/float+.h: Update.
1382 * gnulib/import/float.c: Update.
1383 * gnulib/import/float.in.h: Update.
1384 * gnulib/import/fnmatch.c: Update.
1385 * gnulib/import/fnmatch.in.h: Update.
1386 * gnulib/import/fnmatch_loop.c: Update.
1387 * gnulib/import/fpucw.h: Update.
1388 * gnulib/import/frexp.c: Update.
1389 * gnulib/import/frexpl.c: Update.
1390 * gnulib/import/fstat.c: Update.
1391 * gnulib/import/fstatat.c: Update.
1392 * gnulib/import/getcwd-lgpl.c: Update.
1393 * gnulib/import/getcwd.c: Update.
1394 * gnulib/import/getdtablesize.c: Update.
1395 * gnulib/import/getlogin_r.c: Update.
1396 * gnulib/import/getprogname.c: Update.
1397 * gnulib/import/getprogname.h: Update.
1398 * gnulib/import/gettext.h: Update.
1399 * gnulib/import/gettimeofday.c: Update.
1400 * gnulib/import/glob-libc.h: Update.
1401 * gnulib/import/glob.c: Update.
1402 * gnulib/import/glob.in.h: Update.
1403 * gnulib/import/glob_internal.h: Update.
1404 * gnulib/import/glob_pattern_p.c: Update.
1405 * gnulib/import/globfree.c: Update.
1406 * gnulib/import/hard-locale.c: Update.
1407 * gnulib/import/hard-locale.h: Update.
1408 * gnulib/import/intprops.h: Update.
1409 * gnulib/import/inttypes.in.h: Update.
1410 * gnulib/import/isnan.c: Update.
1411 * gnulib/import/isnand-nolibm.h: Update.
1412 * gnulib/import/isnand.c: Update.
1413 * gnulib/import/isnanl-nolibm.h: Update.
1414 * gnulib/import/isnanl.c: Update.
1415 * gnulib/import/itold.c: Update.
1416 * gnulib/import/libc-config.h: Update.
1417 * gnulib/import/limits.in.h: Update.
1418 * gnulib/import/localcharset.c: Update.
1419 * gnulib/import/localcharset.h: Update.
1420 * gnulib/import/localtime-buffer.c: Update.
1421 * gnulib/import/localtime-buffer.h: Update.
1422 * gnulib/import/lstat.c: Update.
1423 * gnulib/import/m4/00gnulib.m4: Update.
1424 * gnulib/import/m4/__inline.m4: Update.
1425 * gnulib/import/m4/absolute-header.m4: Update.
1426 * gnulib/import/m4/alloca.m4: Update.
1427 * gnulib/import/m4/builtin-expect.m4: Update.
1428 * gnulib/import/m4/canonicalize.m4: Update.
1429 * gnulib/import/m4/chdir-long.m4: Update.
1430 * gnulib/import/m4/close.m4: Update.
1431 * gnulib/import/m4/closedir.m4: Update.
1432 * gnulib/import/m4/configmake.m4: Update.
1433 * gnulib/import/m4/d-ino.m4: Update.
1434 * gnulib/import/m4/d-type.m4: Update.
1435 * gnulib/import/m4/dirent_h.m4: Update.
1436 * gnulib/import/m4/dirfd.m4: Update.
1437 * gnulib/import/m4/dirname.m4: Update.
1438 * gnulib/import/m4/double-slash-root.m4: Update.
1439 * gnulib/import/m4/dup.m4: Update.
1440 * gnulib/import/m4/dup2.m4: Update.
1441 * gnulib/import/m4/eealloc.m4: Update.
1442 * gnulib/import/m4/environ.m4: Update.
1443 * gnulib/import/m4/errno_h.m4: Update.
1444 * gnulib/import/m4/error.m4: Update.
1445 * gnulib/import/m4/exponentd.m4: Update.
1446 * gnulib/import/m4/exponentl.m4: Update.
1447 * gnulib/import/m4/extensions.m4: Update.
1448 * gnulib/import/m4/extern-inline.m4: Update.
1449 * gnulib/import/m4/fchdir.m4: Update.
1450 * gnulib/import/m4/fcntl-o.m4: Update.
1451 * gnulib/import/m4/fcntl.m4: Update.
1452 * gnulib/import/m4/fcntl_h.m4: Update.
1453 * gnulib/import/m4/fdopendir.m4: Update.
1454 * gnulib/import/m4/filenamecat.m4: Update.
1455 * gnulib/import/m4/flexmember.m4: Update.
1456 * gnulib/import/m4/float_h.m4: Update.
1457 * gnulib/import/m4/fnmatch.m4: Update.
1458 * gnulib/import/m4/fnmatch_h.m4: Update.
1459 * gnulib/import/m4/fpieee.m4: Update.
1460 * gnulib/import/m4/frexp.m4: Update.
1461 * gnulib/import/m4/frexpl.m4: Update.
1462 * gnulib/import/m4/fstat.m4: Update.
1463 * gnulib/import/m4/fstatat.m4: Update.
1464 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1465 * gnulib/import/m4/getcwd-path-max.m4: Update.
1466 * gnulib/import/m4/getcwd.m4: Update.
1467 * gnulib/import/m4/getdtablesize.m4: Update.
1468 * gnulib/import/m4/getlogin.m4: Update.
1469 * gnulib/import/m4/getlogin_r.m4: Update.
1470 * gnulib/import/m4/getpagesize.m4: Update.
1471 * gnulib/import/m4/getprogname.m4: Update.
1472 * gnulib/import/m4/gettimeofday.m4: Update.
1473 * gnulib/import/m4/glibc21.m4: Update.
1474 * gnulib/import/m4/glob.m4: Update.
1475 * gnulib/import/m4/glob_h.m4: Update.
1476 * gnulib/import/m4/gnulib-cache.m4: Update.
1477 * gnulib/import/m4/gnulib-common.m4: Update.
1478 * gnulib/import/m4/gnulib-comp.m4: Update.
1479 * gnulib/import/m4/gnulib-tool.m4: Update.
1480 * gnulib/import/m4/hard-locale.m4: Update.
1481 * gnulib/import/m4/include_next.m4: Update.
1482 * gnulib/import/m4/inttypes-pri.m4: Update.
1483 * gnulib/import/m4/inttypes.m4: Update.
1484 * gnulib/import/m4/isnand.m4: Update.
1485 * gnulib/import/m4/isnanl.m4: Update.
1486 * gnulib/import/m4/largefile.m4: Update.
1487 * gnulib/import/m4/limits-h.m4: Update.
1488 * gnulib/import/m4/localcharset.m4: Update.
1489 * gnulib/import/m4/locale-fr.m4: Update.
1490 * gnulib/import/m4/locale-ja.m4: Update.
1491 * gnulib/import/m4/locale-zh.m4: Update.
1492 * gnulib/import/m4/localtime-buffer.m4: Update.
1493 * gnulib/import/m4/longlong.m4: Update.
1494 * gnulib/import/m4/lstat.m4: Update.
1495 * gnulib/import/m4/malloc.m4: Update.
1496 * gnulib/import/m4/malloca.m4: Update.
1497 * gnulib/import/m4/math_h.m4: Update.
1498 * gnulib/import/m4/mbrtowc.m4: Update.
1499 * gnulib/import/m4/mbsinit.m4: Update.
1500 * gnulib/import/m4/mbsrtowcs.m4: Update.
1501 * gnulib/import/m4/mbstate_t.m4: Update.
1502 * gnulib/import/m4/memchr.m4: Update.
1503 * gnulib/import/m4/memmem.m4: Update.
1504 * gnulib/import/m4/mempcpy.m4: Update.
1505 * gnulib/import/m4/memrchr.m4: Update.
1506 * gnulib/import/m4/mkdir.m4: Update.
1507 * gnulib/import/m4/mkstemp.m4: Update.
1508 * gnulib/import/m4/mmap-anon.m4: Update.
1509 * gnulib/import/m4/mode_t.m4: Update.
1510 * gnulib/import/m4/msvc-inval.m4: Update.
1511 * gnulib/import/m4/msvc-nothrow.m4: Update.
1512 * gnulib/import/m4/multiarch.m4: Update.
1513 * gnulib/import/m4/nocrash.m4: Update.
1514 * gnulib/import/m4/off_t.m4: Update.
1515 * gnulib/import/m4/onceonly.m4: Update.
1516 * gnulib/import/m4/open-cloexec.m4: Update.
1517 * gnulib/import/m4/open.m4: Update.
1518 * gnulib/import/m4/openat.m4: Update.
1519 * gnulib/import/m4/opendir.m4: Update.
1520 * gnulib/import/m4/pathmax.m4: Update.
1521 * gnulib/import/m4/rawmemchr.m4: Update.
1522 * gnulib/import/m4/readdir.m4: Update.
1523 * gnulib/import/m4/readlink.m4: Update.
1524 * gnulib/import/m4/realloc.m4: Update.
1525 * gnulib/import/m4/rename.m4: Update.
1526 * gnulib/import/m4/rewinddir.m4: Update.
1527 * gnulib/import/m4/rmdir.m4: Update.
1528 * gnulib/import/m4/save-cwd.m4: Update.
1529 * gnulib/import/m4/secure_getenv.m4: Update.
1530 * gnulib/import/m4/setenv.m4: Update.
1531 * gnulib/import/m4/signal_h.m4: Update.
1532 * gnulib/import/m4/ssize_t.m4: Update.
1533 * gnulib/import/m4/stat-time.m4: Update.
1534 * gnulib/import/m4/stat.m4: Update.
1535 * gnulib/import/m4/std-gnu11.m4: Update.
1536 * gnulib/import/m4/stdbool.m4: Update.
1537 * gnulib/import/m4/stddef_h.m4: Update.
1538 * gnulib/import/m4/stdint.m4: Update.
1539 * gnulib/import/m4/stdio_h.m4: Update.
1540 * gnulib/import/m4/stdlib_h.m4: Update.
1541 * gnulib/import/m4/strchrnul.m4: Update.
1542 * gnulib/import/m4/strdup.m4: Update.
1543 * gnulib/import/m4/strerror.m4: Update.
1544 * gnulib/import/m4/string_h.m4: Update.
1545 * gnulib/import/m4/strstr.m4: Update.
1546 * gnulib/import/m4/strtok_r.m4: Update.
1547 * gnulib/import/m4/sys_socket_h.m4: Update.
1548 * gnulib/import/m4/sys_stat_h.m4: Update.
1549 * gnulib/import/m4/sys_time_h.m4: Update.
1550 * gnulib/import/m4/sys_types_h.m4: Update.
1551 * gnulib/import/m4/tempname.m4: Update.
1552 * gnulib/import/m4/time_h.m4: Update.
1553 * gnulib/import/m4/unistd-safer.m4: Update.
1554 * gnulib/import/m4/unistd_h.m4: Update.
1555 * gnulib/import/m4/warn-on-use.m4: Update.
1556 * gnulib/import/m4/wchar_h.m4: Update.
1557 * gnulib/import/m4/wchar_t.m4: Update.
1558 * gnulib/import/m4/wctype_h.m4: Update.
1559 * gnulib/import/m4/wint_t.m4: Update.
1560 * gnulib/import/malloc.c: Update.
1561 * gnulib/import/malloc/scratch_buffer.h: Update.
1562 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1563 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1564 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1565 * gnulib/import/malloca.c: Update.
1566 * gnulib/import/malloca.h: Update.
1567 * gnulib/import/malloca.valgrind: Update.
1568 * gnulib/import/math.in.h: Update.
1569 * gnulib/import/mbrtowc.c: Update.
1570 * gnulib/import/mbsinit.c: Update.
1571 * gnulib/import/mbsrtowcs-impl.h: Update.
1572 * gnulib/import/mbsrtowcs-state.c: Update.
1573 * gnulib/import/mbsrtowcs.c: Update.
1574 * gnulib/import/memchr.c: Update.
1575 * gnulib/import/memmem.c: Update.
1576 * gnulib/import/mempcpy.c: Update.
1577 * gnulib/import/memrchr.c: Update.
1578 * gnulib/import/mkdir.c: Update.
1579 * gnulib/import/mkstemp.c: Update.
1580 * gnulib/import/msvc-inval.c: Update.
1581 * gnulib/import/msvc-inval.h: Update.
1582 * gnulib/import/msvc-nothrow.c: Update.
1583 * gnulib/import/msvc-nothrow.h: Update.
1584 * gnulib/import/open.c: Update.
1585 * gnulib/import/openat-die.c: Update.
1586 * gnulib/import/openat-priv.h: Update.
1587 * gnulib/import/openat-proc.c: Update.
1588 * gnulib/import/openat.c: Update.
1589 * gnulib/import/openat.h: Update.
1590 * gnulib/import/opendir.c: Update.
1591 * gnulib/import/pathmax.h: Update.
1592 * gnulib/import/pipe-safer.c: Update.
1593 * gnulib/import/rawmemchr.c: Update.
1594 * gnulib/import/readdir.c: Update.
1595 * gnulib/import/readlink.c: Update.
1596 * gnulib/import/realloc.c: Update.
1597 * gnulib/import/ref-add.sin: Update.
1598 * gnulib/import/ref-del.sin: Update.
1599 * gnulib/import/rename.c: Update.
1600 * gnulib/import/rewinddir.c: Update.
1601 * gnulib/import/rmdir.c: Update.
1602 * gnulib/import/same-inode.h: Update.
1603 * gnulib/import/save-cwd.c: Update.
1604 * gnulib/import/save-cwd.h: Update.
1605 * gnulib/import/scratch_buffer.h: Update.
1606 * gnulib/import/secure_getenv.c: Update.
1607 * gnulib/import/setenv.c: Update.
1608 * gnulib/import/signal.in.h: Update.
1609 * gnulib/import/stat-time.c: Update.
1610 * gnulib/import/stat-time.h: Update.
1611 * gnulib/import/stat-w32.c: Update.
1612 * gnulib/import/stat-w32.h: Update.
1613 * gnulib/import/stat.c: Update.
1614 * gnulib/import/stdbool.in.h: Update.
1615 * gnulib/import/stddef.in.h: Update.
1616 * gnulib/import/stdint.in.h: Update.
1617 * gnulib/import/stdio.in.h: Update.
1618 * gnulib/import/stdlib.in.h: Update.
1619 * gnulib/import/str-two-way.h: Update.
1620 * gnulib/import/strchrnul.c: Update.
1621 * gnulib/import/strdup.c: Update.
1622 * gnulib/import/streq.h: Update.
1623 * gnulib/import/strerror-override.c: Update.
1624 * gnulib/import/strerror-override.h: Update.
1625 * gnulib/import/strerror.c: Update.
1626 * gnulib/import/string.in.h: Update.
1627 * gnulib/import/stripslash.c: Update.
1628 * gnulib/import/strnlen1.c: Update.
1629 * gnulib/import/strnlen1.h: Update.
1630 * gnulib/import/strstr.c: Update.
1631 * gnulib/import/strtok_r.c: Update.
1632 * gnulib/import/sys_stat.in.h: Update.
1633 * gnulib/import/sys_time.in.h: Update.
1634 * gnulib/import/sys_types.in.h: Update.
1635 * gnulib/import/tempname.c: Update.
1636 * gnulib/import/tempname.h: Update.
1637 * gnulib/import/time.in.h: Update.
1638 * gnulib/import/unistd--.h: Update.
1639 * gnulib/import/unistd-safer.h: Update.
1640 * gnulib/import/unistd.in.h: Update.
1641 * gnulib/import/unsetenv.c: Update.
1642 * gnulib/import/verify.h: Update.
1643 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1644 * gnulib/import/wchar.in.h: Update.
1645 * gnulib/import/wctype.in.h: Update.
1646 * gnulib/import/xalloc-oversized.h: Update.
1647 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1648 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1649
1650 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1651
1652 * record-btrace.c (get_thread_current_frame): Remove
1653 old_inferior_ptid.
1654
1655 2018-09-10 Jerome Guitton <guitton@adacore.com>
1656
1657 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1658 with check_tag to 1 if and only if the type is tagged and the
1659 component being searched cannot been found in the current
1660 view. Otherwise, always call ada_to_fixed_type with
1661 check_tag to 0.
1662
1663 2018-09-10 Xavier Roirand <roirand@adacore.com>
1664
1665 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1666 declaration.
1667 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1668 * ada-varobj.c (ada_varobj_get_number_of_children,
1669 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1670
1671 2018-09-10 Xavier Roirand <roirand@adacore.com>
1672
1673 * ada-valprint.c (ada_value_print): Use type instead of
1674 enclosing type.
1675
1676 2018-09-10 Xavier Roirand <roirand@adacore.com>
1677
1678 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1679 an array of access to unconstrained array.
1680
1681 2018-09-10 Xavier Roirand <roirand@adacore.com>
1682
1683 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1684 (ada_check_typedef): Use it.
1685
1686 2018-09-10 Xavier Roirand <roirand@adacore.com>
1687
1688 * ada-varobj.c (ada_varobj_describe_struct_child)
1689 (ada_varobj_describe_child): Handle union case like struct one.
1690
1691 2018-09-10 Tom Tromey <tom@tromey.com>
1692
1693 PR python/18380:
1694 * python/python.c (_initialize_python): Make example in "python"
1695 help work in Python 3.
1696
1697 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1698
1699 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1700 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1701 $(EXEEXT) to the script, as it is not a program.
1702
1703 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1704
1705 * python/py-prettyprint.c (pretty_print_one_value): Return
1706 gdbpy_ref<>.
1707 (print_string_repr): Adjust.
1708 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1709 * python/python-internal.h (apply_varobj_pretty_printer): Return
1710 gdbpy_ref<>.
1711 * varobj.c (varobj_value_get_print_value): Adjust.
1712
1713 2018-09-08 Tom Tromey <tom@tromey.com>
1714
1715 PR python/16047:
1716 * python/py-prettyprint.c (pretty_print_one_value): Check for
1717 to_string method.
1718
1719 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1720
1721 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1722 replace_operator_with_call.
1723
1724 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1725
1726 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1727
1728 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1729
1730 * ada-typeprint.c (print_range): Print the bounds using TYPE
1731 rather than its TYPE_TARGET_TYPE.
1732
1733 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1734
1735 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1736 call to ada_to_fixed_value_create.
1737
1738 2018-09-08 Jerome Guitton <guitton@adacore.com>
1739
1740 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1741
1742 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1743
1744 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1745 by calls to error.
1746
1747 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1748
1749 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1750 Move update of loop variable "fi".
1751
1752 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1753
1754 * ada-lang.c (value_assign_to_component): In the case of
1755 big-endian targets, extract the bits of the given VAL
1756 using an src_offset of zero if container is not a scalar.
1757
1758 2018-09-06 Simon Ser <contact@emersion.fr>
1759
1760 PR gdb/23105
1761 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1762 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1763 * fbsd-tdep.c (fbsd_make_note_desc): New.
1764 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1765 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1766 * target.h (enum target_object) Add FreeBSD-specific
1767 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1768
1769 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1770
1771 * compile/compile-c.h (generate_c_for_variable_locations):
1772 Change reference to pointer.
1773 * compile/compile-c-support.c (compile_program) <compute>:
1774 Likewise.
1775 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1776 (generate_c_for_for_one_variable): Likewise
1777 (generate_c_for_variable_locations): Likewise
1778 * compile/compile-c-types.c (compile_c_instance::convert_type):
1779 Likewise
1780 * compile/compile-cplus-symbols.c (convert_one_symbol):
1781 std::move the scope passed to enter_scope.
1782 * compile/compile-cplus-types.c
1783 (compile_cplus_instance::enter_scope): Make parameter
1784 rvalue-reference.
1785 (compile_cplus_instance::new_scope): Change reference to
1786 pointer.
1787 (compile_cplus_instance::convert_type): Likewise
1788 (compile_cplus_convert_typedef): std::move the scope passed to
1789 enter_scope.
1790 (compile_cplus_convert_struct_or_union): Likewise.
1791 (compile_cplus_convert_enum): Likewise.
1792 (compile_cplus_convert_namespace): Likewise.
1793 * compile/compile-cplus.h (compile_cplus_instance)
1794 <enter_scope>: Make parameter rvalue-reference.
1795 * compile/compile-internal.h (compile_instance)
1796 <get_cached_type>: Likewise
1797 * compile/compile-loc2c.c (push): Likewise
1798 (pushf): Likewise
1799 (unary): Likewise
1800 (binary): Likewise
1801 (print_label): Likewise
1802 (pushf_register_address): Likewise
1803 (pushf_register): Likewise
1804 (do_compile_dwarf_expr_to_c): Likewise
1805 (compile_dwarf_expr_to_c): Likewise
1806 (compile_dwarf_bounds_to_c): Likewise
1807 * compile/compile.c (compile_instance::get_cached_type):
1808 Likewise
1809 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1810 (compile_dwarf_bounds_to_c): Likewise
1811 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1812 (dwarf2_compile_property_to_c): Likewise
1813 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1814 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1815 Likewise
1816
1817 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1820 * tui/tui-data.c (init_content_element): Don't initialize it.
1821
1822 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1823
1824 * tui/tui-data.h (struct tui_win_info)
1825 <detail::opaque>: Remove.
1826 * tui/tui-data.c (init_win_info): Remove assignment.
1827
1828 2018-09-05 Tom Tromey <tom@tromey.com>
1829
1830 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1831 -Wformat-nonliteral.
1832 * target-float.c (host_float_ops<T>::to_string)
1833 (host_float_ops<T>::from_string): Use
1834 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1835 * configure: Rebuild.
1836
1837 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1838
1839 * printcmd.c (printf_c_string): Use
1840 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1841 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1842
1843 2018-09-05 Tom Tromey <tom@tromey.com>
1844
1845 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1846
1847 2018-09-05 Tom de Vries <tdevries@suse.de>
1848
1849 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1850 with resolve_abstract_p == true.
1851 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1852 defaulting to false. Propagate resolve_abstract_p to
1853 dwarf2_fetch_die_loc_sect_off.
1854 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1855 parameter, defaulting to false.
1856 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1857 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1858 parameter.
1859 * dwarf2read.h (struct die_info): Forward-declare.
1860 (die_info_ptr): New typedef.
1861 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1862
1863 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1864
1865 GDB 8.2 released.
1866
1867 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1868 Pedro Alves <palves@redhat.com>
1869
1870 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1871 "aclocal-m4-deps.mk". Include file here.
1872 $(srcdir)/aclocal.m4: Add "configure.ac".
1873 * gnulib/aclocal-m4-deps.mk: New file.
1874 * gnulib/update-gnulib.sh: Automatically update
1875 "aclocal-m4-deps.mk".
1876
1877 2018-09-04 Tom Tromey <tom@tromey.com>
1878
1879 * configure: Rebuild.
1880 * configure.ac: Remove multi-ice code.
1881
1882 2018-09-04 Tom Tromey <tom@tromey.com>
1883
1884 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1885 (ada-exp.o): Update.
1886
1887 2018-09-04 Tom Tromey <tom@tromey.com>
1888
1889 * Makefile.in (printcmd.o, target-float.o): Remove.
1890 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1891
1892 2018-09-04 Tom Tromey <tom@tromey.com>
1893
1894 * gnulib/Makefile.in: Remove obsolete comment.
1895 * Makefile.in: Remove obsolete comment.
1896
1897 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1898
1899 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1900 line with '+'.
1901
1902 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1903
1904 * riscv-tdep.c: Add 'prologue-value.h' include.
1905 (struct riscv_unwind_cache): New struct.
1906 (riscv_debug_unwinder): New global.
1907 (riscv_scan_prologue): Update arguments, capture register details
1908 from prologue scan.
1909 (riscv_skip_prologue): Reformat arguments line, move end of
1910 prologue calculation into riscv_scan_prologue.
1911 (riscv_frame_cache): Update return type, create
1912 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1913 details.
1914 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1915 (riscv_frame_prev_register): Use the trad_frame within the
1916 riscv_unwind_cache.
1917 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1918 flag.
1919
1920 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1921
1922 * trad-frame.h (trad_frame_set_realreg): Declare.
1923 (trad_frame_set_addr): Declare.
1924 * trad-frame.c (trad_frame_set_realreg): Define new function.
1925 (trad_frame_set_addr): Define new function.
1926 (trad_frame_set_reg_realreg): Use new function.
1927 (trad_frame_set_reg_addr): Use new function.
1928
1929 2018-09-01 Keith Seitz <keiths@redhat.com>
1930
1931 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1932 pulongest instead of "%lld".
1933 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1934 ATTRIBUTE_UNUSED.
1935
1936 2018-08-31 Tom Tromey <tom@tromey.com>
1937
1938 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1939 variant part type.
1940
1941 2018-08-31 Pedro Alves <palves@redhat.com>
1942
1943 * gdbarch.h: Regenerate.
1944
1945 2018-08-31 Pedro Alves <palves@redhat.com>
1946
1947 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1948 * target.h (Hardware watchpoint interfaces): Describe
1949 continuable/steppable/non-steppable watchpoints.
1950 * gdbarch.h, gdbarch.c: Regenerate.
1951
1952 2018-08-31 Pedro Alves <palves@redhat.com>
1953
1954 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1955 Delete.
1956 * s390-linux-nat.c
1957 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1958 * target.h (target_ops::have_continuable_watchpoint): Delete.
1959 (target_have_continuable_watchpoint): Delete.
1960 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1961 * target-delegates.c: Regenerate.
1962
1963 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1964
1965 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1966 the files present in "gnulib/import/m4/".
1967
1968 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1969
1970 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1971 c.sw, c.swsp, and c.sdsp.
1972
1973 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1974
1975 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1976 (riscv_read_misa_reg): Don't cache value read into inferior data.
1977 (riscv_new_inferior_data): Delete.
1978 (riscv_inferior_data_cleanup): Delete.
1979 (riscv_inferior_data): Delete.
1980 (riscv_invalidate_inferior_data): Delete.
1981 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1982
1983 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1984
1985 * compile/compile-cplus-types.c
1986 (compile_cplus_instance::leave_scope): Take the address of scope
1987 object.
1988 (compile_cplus_instance::convert_qualified_base): Compare quals
1989 to 0.
1990
1991 2018-08-30 Keith Seitz <keiths@redhat.com>
1992
1993 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1994 Use "%s" and host_address_to_string instead of "%p" in printf.
1995
1996 2018-08-29 Keith Seitz <keiths@redhat.com>
1997
1998 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1999 and compile-cplus-types.c.
2000 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2001 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2002 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2003 Declare.
2004 * compile/compile-c-support.c: Include compile-cplus.h.
2005 (load_libcompile): Templatize.
2006 (get_compile_context): "New" function.
2007 (c_get_compile_context): Use get_compile_context.
2008 (cplus_get_compile_context): New function.
2009 (cplus_push_user_expression, cplus_pop_user_expression)
2010 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2011 (cplus_compute_program): Define new structs/functions.
2012 * compile/compile-cplus-symmbols.c: New file.
2013 * compile/compile-cplus-types.c: New file.
2014 * compile/compile-cplus.h: New file.
2015 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2016 Declare.
2017 * compile/compile-object-load.c (get_out_value_type): Use
2018 strncmp_iw when comparing symbol names.
2019 (compile_object_load): Add mst_bss and mst_data.
2020 * compile/compile.c (_initialize_compile): Remove
2021 -Wno-implicit-function-declaration from `compile_args'.
2022 * compile/gcc-cp-plugin.h: New file.
2023 * NEWS: Mention C++ compile support and new debug options.
2024
2025 2018-08-29 Keith Seitz <keiths@redhat.com>
2026
2027 * linespec.c (collect_info::add_symbol): Make virtual.
2028 (struct symbol_searcher_collect_info): New struct.
2029 (symbol_searcher::find_all_symbols): New method.
2030 * symtab.h (class symbol_searcher): New class.
2031
2032 2018-08-29 Keith Seitz <keiths@redhat.com>
2033
2034 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2035 Change to vector of block_symbol. Update all users.
2036 (struct collect_info) <symbols>: Likewise.
2037 (collect_info::add_symbol): Take block_symbol as argument.
2038 Update all callers.
2039 (decode_compound_collector) <m_symbols>: Change type to vector
2040 of block_symbol. Update all users.
2041 (decode_compound_collector::operator ()): Change parameter type
2042 to block_symbol.
2043 (find_method, find_function_symbols, find_linespec_symbols)
2044 (find_label_symbols_in_block, find_label_symbols): Change symbol
2045 vectors to block_symbol vectors.
2046 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2047 block_symbol.
2048
2049 2018-08-29 Keith Seitz <keiths@redhat.com>
2050
2051 * linespec.c (symbolp): Remove typedef and VEC definitions.
2052 (bound_minimal_symbol_d): Likewise.
2053
2054 2018-08-29 Keith Seitz <keiths@redhat.com>
2055
2056 * linespec.c (decode_compound_collector::decode_compound_collector):
2057 Remove initialization for `m_symtabs'.
2058 (decode_compound_collector::release_symbols): Change return type
2059 to std::vector. Update all callers.
2060 (class decode_compound_collector) <m_symbols>: Change type to
2061 std::vector.
2062 (lookup_prefix_sym): Change return type to std::vector. Update all
2063 callers.
2064 (compare_symbols): Remove.
2065 (std_compare_symbols): Rename to `compare_symbols'.
2066 (find_method): Change `sym_classes' parameter to std::vector.
2067 Update all callers. Use std::sort to sort sym_classes.
2068 (find_linespec_symbols): Remove cleanup.
2069
2070 2018-08-29 Keith Seitz <keiths@redhat.com>
2071
2072 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2073 std::vector. Update all users.
2074 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2075 (struct collect_info) <minimal_symbols>: Likewise.
2076 (compare_msymbols): Return bool. Change parameters to const
2077 bound_minimal_symbol references.
2078 (find_method, find_function_symbols, find_linespec_symbols): Change
2079 `minsyms' parameter to std::vector. Update all callers.
2080
2081 2018-08-29 Keith Seitz <keiths@redhat.com>
2082
2083 * linespec.c (struct linespec) <label_symbols>: Change type to
2084 std::vector. Update all users.
2085 (find_label_symbols_in_block): Change `result' parameter to
2086 std::vector. Update all callers.
2087 (find_label_symbols): Return std::vector. Update all callers.
2088
2089 2018-08-29 Keith Seitz <keiths@redhat.com>
2090
2091 * linespec.c (struct linespec) <function_symbols>: Change type to
2092 std::vector. Update all users.
2093 (struct collect_info) <function_symbols>: Likewise.
2094 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2095 (std_compare_symbols): New function.
2096 (find_method, find_function_symbols, find_linespec_symbols)
2097 (find_label_symbols_in_block): Change `symbols' parameter to
2098 std::vector. Update all callers.
2099 (find_label_symbols): Likewise for `function_symbols' and
2100 `label_funcs_ret'.
2101
2102 2018-08-29 Keith Seitz <keiths@redhat.com>
2103
2104 * linespec.c (symtab_vector_up): Define.
2105 (struct linespec) <file_symtabs>: Change type to std::vector *.
2106 Update all uses.
2107 (struct collect_info) <file_symtabs>: Likewise.
2108 (collect_symtabs_from_filename): Return symtab_vector_up.
2109 Update all callers.
2110 (decode_objc): Remove cleanup.
2111 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2112 (symtab_collector::release_symtabs): Return symtab_vector_up.
2113 Update all callers.
2114 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2115 Update all users.
2116 (collect_symtabs_from_filename, symtabs_from_filename): Return
2117 symtab_vector_up. Update all callers.
2118
2119 2018-08-29 Tom Tromey <tom@tromey.com>
2120
2121 * csky-tdep.c (csky_analyze_prologue): Use
2122 core_addr_to_string_nz.
2123
2124 2018-08-29 Tom Tromey <tom@tromey.com>
2125
2126 * windows-nat.c (struct xlate_exception) <them>: Change type to
2127 DWORD.
2128 (xlate): Fix formatting. Remove last entry.
2129 (struct xlate_exception, xlate): Comment out.
2130 (windows_nat_target::resume): Use ranged for.
2131
2132 2018-08-29 Jim Wilson <jimw@sifive.com>
2133
2134 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2135 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2136 of NT_PRFPREG.
2137 (riscv_linux_nat_target::store_registers): Likewise.
2138
2139 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2140
2141 PR gdb/23555
2142 PR gdb/23558
2143 * gnulib/aclocal.m4: Regenerate.
2144 * gnulib/config.in: Regenerate.
2145 * gnulib/configure: Regenerate.
2146 * gnulib/import/Makefile.am: Update.
2147 * gnulib/import/Makefile.in: Update.
2148 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2149 * gnulib/import/_Noreturn.h: ... this.
2150 * gnulib/import/alloca.in.h: Update.
2151 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2152 * gnulib/import/arg-nonnull.h: ... this.
2153 * gnulib/import/assure.h: Update.
2154 * gnulib/import/at-func.c: Update.
2155 * gnulib/import/basename-lgpl.c: Update.
2156 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2157 * gnulib/import/c++defs.h: ... this.
2158 * gnulib/import/canonicalize-lgpl.c: Update.
2159 * gnulib/import/cdefs.h: Update.
2160 * gnulib/import/chdir-long.c: Update.
2161 * gnulib/import/chdir-long.h: Update.
2162 * gnulib/import/cloexec.c: Update.
2163 * gnulib/import/cloexec.h: Update.
2164 * gnulib/import/close.c: Update.
2165 * gnulib/import/closedir.c: Update.
2166 * gnulib/import/config.charset: Update.
2167 * gnulib/import/dirent-private.h: Update.
2168 * gnulib/import/dirent.in.h: Update.
2169 * gnulib/import/dirfd.c: Update.
2170 * gnulib/import/dirname-lgpl.c: Update.
2171 * gnulib/import/dirname.h: Update.
2172 * gnulib/import/dosname.h: Update.
2173 * gnulib/import/dup-safer-flag.c: Update.
2174 * gnulib/import/dup-safer.c: Update.
2175 * gnulib/import/dup.c: Update.
2176 * gnulib/import/dup2.c: Update.
2177 * gnulib/import/errno.in.h: Update.
2178 * gnulib/import/error.c: Update.
2179 * gnulib/import/error.h: Update.
2180 * gnulib/import/exitfail.c: Update.
2181 * gnulib/import/exitfail.h: Update.
2182 * gnulib/import/extra/update-copyright: Update.
2183 * gnulib/import/fchdir.c: Update.
2184 * gnulib/import/fcntl.c: Update.
2185 * gnulib/import/fcntl.in.h: Update.
2186 * gnulib/import/fd-hook.c: Update.
2187 * gnulib/import/fd-hook.h: Update.
2188 * gnulib/import/fd-safer-flag.c: Update.
2189 * gnulib/import/fd-safer.c: Update.
2190 * gnulib/import/fdopendir.c: Update.
2191 * gnulib/import/filename.h: Update.
2192 * gnulib/import/filenamecat-lgpl.c: Update.
2193 * gnulib/import/filenamecat.h: Update.
2194 * gnulib/import/flexmember.h: Update.
2195 * gnulib/import/float+.h: Update.
2196 * gnulib/import/float.c: Update.
2197 * gnulib/import/float.in.h: Update.
2198 * gnulib/import/fnmatch.c: Update.
2199 * gnulib/import/fnmatch.in.h: Update.
2200 * gnulib/import/fnmatch_loop.c: Update.
2201 * gnulib/import/fpucw.h: Update.
2202 * gnulib/import/frexp.c: Update.
2203 * gnulib/import/frexpl.c: Update.
2204 * gnulib/import/fstat.c: Update.
2205 * gnulib/import/fstatat.c: Update.
2206 * gnulib/import/getcwd-lgpl.c: Update.
2207 * gnulib/import/getcwd.c: Update.
2208 * gnulib/import/getdtablesize.c: Update.
2209 * gnulib/import/getlogin_r.c: Update.
2210 * gnulib/import/getprogname.c: Update.
2211 * gnulib/import/getprogname.h: Update.
2212 * gnulib/import/gettext.h: Update.
2213 * gnulib/import/gettimeofday.c: Update.
2214 * gnulib/import/glob-libc.h: Update.
2215 * gnulib/import/glob.c: Update.
2216 * gnulib/import/glob.in.h: Update.
2217 * gnulib/import/glob_internal.h: Update.
2218 * gnulib/import/glob_pattern_p.c: Update.
2219 * gnulib/import/globfree.c: Update.
2220 * gnulib/import/hard-locale.c: Update.
2221 * gnulib/import/hard-locale.h: Update.
2222 * gnulib/import/intprops.h: Update.
2223 * gnulib/import/inttypes.in.h: Update.
2224 * gnulib/import/isnan.c: Update.
2225 * gnulib/import/isnand-nolibm.h: Update.
2226 * gnulib/import/isnand.c: Update.
2227 * gnulib/import/isnanl-nolibm.h: Update.
2228 * gnulib/import/isnanl.c: Update.
2229 * gnulib/import/itold.c: Update.
2230 * gnulib/import/libc-config.h: Update.
2231 * gnulib/import/limits.in.h: Update.
2232 * gnulib/import/localcharset.c: Update.
2233 * gnulib/import/localcharset.h: Update.
2234 * gnulib/import/localtime-buffer.c: Update.
2235 * gnulib/import/localtime-buffer.h: Update.
2236 * gnulib/import/lstat.c: Update.
2237 * gnulib/import/m4/00gnulib.m4: Update.
2238 * gnulib/import/m4/__inline.m4: Update.
2239 * gnulib/import/m4/absolute-header.m4: Update.
2240 * gnulib/import/m4/alloca.m4: Update.
2241 * gnulib/import/m4/builtin-expect.m4: Update.
2242 * gnulib/import/m4/canonicalize.m4: Update.
2243 * gnulib/import/m4/chdir-long.m4: Update.
2244 * gnulib/import/m4/close.m4: Update.
2245 * gnulib/import/m4/closedir.m4: Update.
2246 * gnulib/import/m4/configmake.m4: Update.
2247 * gnulib/import/m4/d-ino.m4: Update.
2248 * gnulib/import/m4/d-type.m4: Update.
2249 * gnulib/import/m4/dirent_h.m4: Update.
2250 * gnulib/import/m4/dirfd.m4: Update.
2251 * gnulib/import/m4/dirname.m4: Update.
2252 * gnulib/import/m4/double-slash-root.m4: Update.
2253 * gnulib/import/m4/dup.m4: Update.
2254 * gnulib/import/m4/dup2.m4: Update.
2255 * gnulib/import/m4/eealloc.m4: Update.
2256 * gnulib/import/m4/environ.m4: Update.
2257 * gnulib/import/m4/errno_h.m4: Update.
2258 * gnulib/import/m4/error.m4: Update.
2259 * gnulib/import/m4/exponentd.m4: Update.
2260 * gnulib/import/m4/exponentl.m4: Update.
2261 * gnulib/import/m4/extensions.m4: Update.
2262 * gnulib/import/m4/extern-inline.m4: Update.
2263 * gnulib/import/m4/fchdir.m4: Update.
2264 * gnulib/import/m4/fcntl-o.m4: Update.
2265 * gnulib/import/m4/fcntl.m4: Update.
2266 * gnulib/import/m4/fcntl_h.m4: Update.
2267 * gnulib/import/m4/fdopendir.m4: Update.
2268 * gnulib/import/m4/filenamecat.m4: Update.
2269 * gnulib/import/m4/flexmember.m4: Update.
2270 * gnulib/import/m4/float_h.m4: Update.
2271 * gnulib/import/m4/fnmatch.m4: Update.
2272 * gnulib/import/m4/fnmatch_h.m4: Update.
2273 * gnulib/import/m4/fpieee.m4: Update.
2274 * gnulib/import/m4/frexp.m4: Update.
2275 * gnulib/import/m4/frexpl.m4: Update.
2276 * gnulib/import/m4/fstat.m4: Update.
2277 * gnulib/import/m4/fstatat.m4: Update.
2278 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2279 * gnulib/import/m4/getcwd-path-max.m4: Update.
2280 * gnulib/import/m4/getcwd.m4: Update.
2281 * gnulib/import/m4/getdtablesize.m4: Update.
2282 * gnulib/import/m4/getlogin.m4: Update.
2283 * gnulib/import/m4/getlogin_r.m4: Update.
2284 * gnulib/import/m4/getpagesize.m4: Update.
2285 * gnulib/import/m4/getprogname.m4: Update.
2286 * gnulib/import/m4/gettimeofday.m4: Update.
2287 * gnulib/import/m4/glibc21.m4: Update.
2288 * gnulib/import/m4/glob.m4: Update.
2289 * gnulib/import/m4/glob_h.m4: Update.
2290 * gnulib/import/m4/gnulib-cache.m4: Update.
2291 * gnulib/import/m4/gnulib-common.m4: Update.
2292 * gnulib/import/m4/gnulib-comp.m4: Update.
2293 * gnulib/import/m4/gnulib-tool.m4: Update.
2294 * gnulib/import/m4/hard-locale.m4: Update.
2295 * gnulib/import/m4/include_next.m4: Update.
2296 * gnulib/import/m4/inttypes-pri.m4: Update.
2297 * gnulib/import/m4/inttypes.m4: Update.
2298 * gnulib/import/m4/isnand.m4: Update.
2299 * gnulib/import/m4/isnanl.m4: Update.
2300 * gnulib/import/m4/largefile.m4: Update.
2301 * gnulib/import/m4/limits-h.m4: Update.
2302 * gnulib/import/m4/localcharset.m4: Update.
2303 * gnulib/import/m4/locale-fr.m4: Update.
2304 * gnulib/import/m4/locale-ja.m4: Update.
2305 * gnulib/import/m4/locale-zh.m4: Update.
2306 * gnulib/import/m4/localtime-buffer.m4: Update.
2307 * gnulib/import/m4/longlong.m4: Update.
2308 * gnulib/import/m4/lstat.m4: Update.
2309 * gnulib/import/m4/malloc.m4: Update.
2310 * gnulib/import/m4/malloca.m4: Update.
2311 * gnulib/import/m4/math_h.m4: Update.
2312 * gnulib/import/m4/mbrtowc.m4: Update.
2313 * gnulib/import/m4/mbsinit.m4: Update.
2314 * gnulib/import/m4/mbsrtowcs.m4: Update.
2315 * gnulib/import/m4/mbstate_t.m4: Update.
2316 * gnulib/import/m4/memchr.m4: Update.
2317 * gnulib/import/m4/memmem.m4: Update.
2318 * gnulib/import/m4/mempcpy.m4: Update.
2319 * gnulib/import/m4/memrchr.m4: Update.
2320 * gnulib/import/m4/mkdir.m4: Update.
2321 * gnulib/import/m4/mkstemp.m4: Update.
2322 * gnulib/import/m4/mmap-anon.m4: Update.
2323 * gnulib/import/m4/mode_t.m4: Update.
2324 * gnulib/import/m4/msvc-inval.m4: Update.
2325 * gnulib/import/m4/msvc-nothrow.m4: Update.
2326 * gnulib/import/m4/multiarch.m4: Update.
2327 * gnulib/import/m4/nocrash.m4: Update.
2328 * gnulib/import/m4/off_t.m4: Update.
2329 * gnulib/import/m4/onceonly.m4: Update.
2330 * gnulib/import/m4/open-cloexec.m4: Update.
2331 * gnulib/import/m4/open.m4: Update.
2332 * gnulib/import/m4/openat.m4: Update.
2333 * gnulib/import/m4/opendir.m4: Update.
2334 * gnulib/import/m4/pathmax.m4: Update.
2335 * gnulib/import/m4/rawmemchr.m4: Update.
2336 * gnulib/import/m4/readdir.m4: Update.
2337 * gnulib/import/m4/readlink.m4: Update.
2338 * gnulib/import/m4/realloc.m4: Update.
2339 * gnulib/import/m4/rename.m4: Update.
2340 * gnulib/import/m4/rewinddir.m4: Update.
2341 * gnulib/import/m4/rmdir.m4: Update.
2342 * gnulib/import/m4/save-cwd.m4: Update.
2343 * gnulib/import/m4/secure_getenv.m4: Update.
2344 * gnulib/import/m4/setenv.m4: Update.
2345 * gnulib/import/m4/signal_h.m4: Update.
2346 * gnulib/import/m4/ssize_t.m4: Update.
2347 * gnulib/import/m4/stat-time.m4: Update.
2348 * gnulib/import/m4/stat.m4: Update.
2349 * gnulib/import/m4/std-gnu11.m4: Update.
2350 * gnulib/import/m4/stdbool.m4: Update.
2351 * gnulib/import/m4/stddef_h.m4: Update.
2352 * gnulib/import/m4/stdint.m4: Update.
2353 * gnulib/import/m4/stdio_h.m4: Update.
2354 * gnulib/import/m4/stdlib_h.m4: Update.
2355 * gnulib/import/m4/strchrnul.m4: Update.
2356 * gnulib/import/m4/strdup.m4: Update.
2357 * gnulib/import/m4/strerror.m4: Update.
2358 * gnulib/import/m4/string_h.m4: Update.
2359 * gnulib/import/m4/strstr.m4: Update.
2360 * gnulib/import/m4/strtok_r.m4: Update.
2361 * gnulib/import/m4/sys_socket_h.m4: Update.
2362 * gnulib/import/m4/sys_stat_h.m4: Update.
2363 * gnulib/import/m4/sys_time_h.m4: Update.
2364 * gnulib/import/m4/sys_types_h.m4: Update.
2365 * gnulib/import/m4/tempname.m4: Update.
2366 * gnulib/import/m4/time_h.m4: Update.
2367 * gnulib/import/m4/unistd-safer.m4: Update.
2368 * gnulib/import/m4/unistd_h.m4: Update.
2369 * gnulib/import/m4/warn-on-use.m4: Update.
2370 * gnulib/import/m4/wchar_h.m4: Update.
2371 * gnulib/import/m4/wchar_t.m4: Update.
2372 * gnulib/import/m4/wctype_h.m4: Update.
2373 * gnulib/import/m4/wint_t.m4: Update.
2374 * gnulib/import/malloc.c: Update.
2375 * gnulib/import/malloc/scratch_buffer.h: Update.
2376 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2377 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2378 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2379 * gnulib/import/malloca.c: Update.
2380 * gnulib/import/malloca.h: Update.
2381 * gnulib/import/malloca.valgrind: Update.
2382 * gnulib/import/math.in.h: Update.
2383 * gnulib/import/mbrtowc.c: Update.
2384 * gnulib/import/mbsinit.c: Update.
2385 * gnulib/import/mbsrtowcs-impl.h: Update.
2386 * gnulib/import/mbsrtowcs-state.c: Update.
2387 * gnulib/import/mbsrtowcs.c: Update.
2388 * gnulib/import/memchr.c: Update.
2389 * gnulib/import/memmem.c: Update.
2390 * gnulib/import/mempcpy.c: Update.
2391 * gnulib/import/memrchr.c: Update.
2392 * gnulib/import/mkdir.c: Update.
2393 * gnulib/import/mkstemp.c: Update.
2394 * gnulib/import/msvc-inval.c: Update.
2395 * gnulib/import/msvc-inval.h: Update.
2396 * gnulib/import/msvc-nothrow.c: Update.
2397 * gnulib/import/msvc-nothrow.h: Update.
2398 * gnulib/import/open.c: Update.
2399 * gnulib/import/openat-die.c: Update.
2400 * gnulib/import/openat-priv.h: Update.
2401 * gnulib/import/openat-proc.c: Update.
2402 * gnulib/import/openat.c: Update.
2403 * gnulib/import/openat.h: Update.
2404 * gnulib/import/opendir.c: Update.
2405 * gnulib/import/pathmax.h: Update.
2406 * gnulib/import/pipe-safer.c: Update.
2407 * gnulib/import/rawmemchr.c: Update.
2408 * gnulib/import/readdir.c: Update.
2409 * gnulib/import/readlink.c: Update.
2410 * gnulib/import/realloc.c: Update.
2411 * gnulib/import/ref-add.sin: Update.
2412 * gnulib/import/ref-del.sin: Update.
2413 * gnulib/import/rename.c: Update.
2414 * gnulib/import/rewinddir.c: Update.
2415 * gnulib/import/rmdir.c: Update.
2416 * gnulib/import/same-inode.h: Update.
2417 * gnulib/import/save-cwd.c: Update.
2418 * gnulib/import/save-cwd.h: Update.
2419 * gnulib/import/scratch_buffer.h: Update.
2420 * gnulib/import/secure_getenv.c: Update.
2421 * gnulib/import/setenv.c: Update.
2422 * gnulib/import/signal.in.h: Update.
2423 * gnulib/import/stat-time.c: Update.
2424 * gnulib/import/stat-time.h: Update.
2425 * gnulib/import/stat-w32.c: Update.
2426 * gnulib/import/stat-w32.h: Update.
2427 * gnulib/import/stat.c: Update.
2428 * gnulib/import/stdbool.in.h: Update.
2429 * gnulib/import/stddef.in.h: Update.
2430 * gnulib/import/stdint.in.h: Update.
2431 * gnulib/import/stdio.in.h: Update.
2432 * gnulib/import/stdlib.in.h: Update.
2433 * gnulib/import/str-two-way.h: Update.
2434 * gnulib/import/strchrnul.c: Update.
2435 * gnulib/import/strdup.c: Update.
2436 * gnulib/import/streq.h: Update.
2437 * gnulib/import/strerror-override.c: Update.
2438 * gnulib/import/strerror-override.h: Update.
2439 * gnulib/import/strerror.c: Update.
2440 * gnulib/import/string.in.h: Update.
2441 * gnulib/import/stripslash.c: Update.
2442 * gnulib/import/strnlen1.c: Update.
2443 * gnulib/import/strnlen1.h: Update.
2444 * gnulib/import/strstr.c: Update.
2445 * gnulib/import/strtok_r.c: Update.
2446 * gnulib/import/sys_stat.in.h: Update.
2447 * gnulib/import/sys_time.in.h: Update.
2448 * gnulib/import/sys_types.in.h: Update.
2449 * gnulib/import/tempname.c: Update.
2450 * gnulib/import/tempname.h: Update.
2451 * gnulib/import/time.in.h: Update.
2452 * gnulib/import/unistd--.h: Update.
2453 * gnulib/import/unistd-safer.h: Update.
2454 * gnulib/import/unistd.in.h: Update.
2455 * gnulib/import/unsetenv.c: Update.
2456 * gnulib/import/verify.h: Update.
2457 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2458 * gnulib/import/wchar.in.h: Update.
2459 * gnulib/import/wctype.in.h: Update.
2460 * gnulib/import/xalloc-oversized.h: Update.
2461 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2462 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2463
2464 2018-08-16 Gary Benson <gbenson@redhat.com>
2465
2466 PR gdb/13000:
2467 * gdb/main.c (captured_main_1): Exit with nonzero status
2468 in batch mode if the last command to be executed failed.
2469 * NEWS: Mention the above.
2470
2471 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2472
2473 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2474 end of warning message.
2475
2476 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2477
2478 PR gdb/22943:
2479 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2480 (aarch64_extract_return_value): Use
2481 aapcs_is_vfp_call_or_return_candidate.
2482 (aarch64_return_in_memory): Likewise.
2483 (aarch64_store_return_value): Likewise.
2484
2485 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2486
2487 * aarch64-tdep.c
2488 (aapcs_is_vfp_call_or_return_candidate): Make static
2489 (pass_in_v_or_stack): Remove function.
2490 (pass_in_v_vfp_candidate): New function.
2491 (aarch64_push_dummy_call): Check for float register candidates.
2492
2493 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2494
2495 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2496 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2497 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2498
2499 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2500
2501 PR build/23399
2502 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2503 (struct ipa_sym_addresses): Rename to...
2504 (struct ipa_sym_addresses_common): ... this.
2505 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2506
2507 2018-08-28 Tom Tromey <tom@tromey.com>
2508
2509 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2510 (token_fifo): Now a std::vector.
2511 (yylex, c_parse): Update.
2512 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2513 (token_fifo): Now a std::vector.
2514 (yylex, d_parse): Update.
2515 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2516 (token_fifo): Now a std::vector.
2517 (yylex, go_parse): Update.
2518
2519 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2520
2521 * parser-defs.h (struct type_stack) <elements>: Change type to
2522 std::vector<union type_stack_elt>.
2523 <depth, size>: Remove.
2524 * parse.c (parse_exp_in_context_1): Adjust.
2525 (type_stack_reserve): Remove.
2526 (check_type_stack_depth): Remove.
2527 (insert_into_type_stack): Adjust to std::vector.
2528 (insert_type): Likewise.
2529 (push_type): Likewise.
2530 (push_type_int): Likewise.
2531 (insert_type_address_space): Likewise.
2532 (pop_type): Likewise.
2533 (pop_type_int): Likewise.
2534 (pop_typelist): Likewise.
2535 (pop_type_stack): Likewise.
2536 (append_type_stack): Likewise.
2537 (push_type_stack): Likewise.
2538 (get_type_stack): Likewise.
2539 (type_stack_cleanup): Likewise.
2540 (push_typelist): Likewise.
2541 (follow_types): Likewise.
2542 (_initialize_parse): Likewise.
2543
2544 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2545
2546 * NEWS: Mention csky target.
2547
2548 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2549 Hafiz Abid Qadeer <abidh@codesourcery.com>
2550 Don Breazeal <donb@codesourcery.com>
2551
2552 * csky-linux-tdep.c: New file.
2553 * csky-tdep.c: Likewise.
2554 * csky-tdep.h: Likewise.
2555 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2556 csky-tdep.o.
2557 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2558 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2559 * configure.tgt: Add csky support.
2560
2561 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2562
2563 * python/py-framefilter.c (py_print_frame): Print frame architecture
2564 when printing on an MI output.
2565
2566 2018-08-27 Tom Tromey <tom@tromey.com>
2567
2568 PR build/23087:
2569 * configure: Rebuild.
2570 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2571
2572 2018-08-27 Tom Tromey <tom@tromey.com>
2573
2574 * aarch64-linux-tdep.c
2575 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2576 casts to int.
2577
2578 2018-08-27 Tom Tromey <tom@tromey.com>
2579
2580 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2581 unsigned.
2582 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2583 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2584 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2585 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2586 unsigned.
2587
2588 2018-08-27 Tom Tromey <tom@tromey.com>
2589
2590 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2591 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2592
2593 2018-08-27 Tom Tromey <tom@tromey.com>
2594
2595 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2596 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2597 ULONGEST_MAX.
2598 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2599 ULONGEST_MAX.
2600 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2601 ULONGEST_MAX.
2602 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2603 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2604 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2605 ULONGEST_MAX.
2606 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2607 (ppc64_linux_sigaction_tramp_frame)
2608 (ppc32_linux_sighandler_tramp_frame)
2609 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2610 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2611 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2612 * mn10300-linux-tdep.c (am33_linux_sigframe)
2613 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2614 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2615 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2616 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2617 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2618 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2619 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2620 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2621 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2622 * microblaze-linux-tdep.c
2623 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2624 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2625 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2626 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2627 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2628 * common/common-types.h (ULONGEST_MAX): New define.
2629 (CORE_ADDR_MAX): Fix formatting.
2630 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2631 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2632 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2633 (arm_linux_rt_sigreturn_tramp_frame)
2634 (arm_eabi_linux_sigreturn_tramp_frame)
2635 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2636 (thumb2_eabi_linux_sigreturn_tramp_frame)
2637 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2638 (arm_linux_restart_syscall_tramp_frame)
2639 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2640 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2641 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2642 ULONGEST_MAX.
2643 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2644
2645 2018-08-27 Tom Tromey <tom@tromey.com>
2646
2647 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2648 CORE_ADDR_MAX.
2649 * mips-tdep.c (mips_deal_with_atomic_sequence)
2650 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2651 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2652 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2653 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2654 CORE_ADDR_MAX.
2655 * aarch64-tdep.c (aarch64_software_single_step): Use
2656 CORE_ADDR_MAX.
2657
2658 2018-08-27 Tom Tromey <tom@tromey.com>
2659
2660 * linespec.c (complete_linespec_component): Add cast to "char".
2661 * completer.c (completion_tracker::build_completion_result): Add
2662 cast to "char".
2663
2664 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2665
2666 * solist.h (struct solist, struct target_so_ops): Fix
2667 indentation.
2668
2669 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2670
2671 * ada-tasks.c (ada_task_info_s): Remove typedef.
2672 (DEF_VEC_O(ada_task_info_s)): Remove.
2673 (struct ada_tasks_inferior_data): Initialize fields.
2674 <task_list>: Make an std::vector.
2675 (get_ada_tasks_inferior_data): Allocate with new.
2676 (ada_get_task_number): Adjust.
2677 (get_task_number_from_id): Likewise.
2678 (valid_task_id): Likewise.
2679 (ada_get_task_info_from_ptid): Likewise.
2680 (iterate_over_live_ada_tasks): Likewise.
2681 (add_ada_task): Likewise.
2682 (read_known_tasks): Likewise.
2683 (ada_build_task_list): Likewise.
2684 (print_ada_task_info): Likewise.
2685 (info_task): Likewise.
2686 (task_command_1): Likewise.
2687
2688 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2689
2690 * ada-lang.c (add_angle_brackets): Return std::string.
2691
2692 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2693
2694 * python/py-threadevent.c (py_get_event_thread): Initialize
2695 pythread.
2696
2697 2018-08-24 Pedro Alves <palves@redhat.com>
2698
2699 * python/py-bpevent.c (create_breakpoint_event_object): Use
2700 copy-initialization.
2701 * python/py-continueevent.c (emit_continue_event): Use
2702 copy-initialization.
2703 * python/py-exitedevent.c (create_exited_event_object): Return a
2704 gdbpy_ref<>.
2705 (emit_exited_event): Use copy-initialization.
2706 * python/py-inferior.c (python_new_inferior)
2707 (python_inferior_deleted, add_thread_object): Use
2708 copy-initialization.
2709 * python/py-infevents.c (create_inferior_call_event_object)
2710 (create_register_changed_event_object)
2711 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2712 (emit_inferior_call_event, emit_memory_changed_event)
2713 (emit_register_changed_event): Use copy-initialization.
2714 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2715 Return a gdbpy_ref<>.
2716 (emit_new_objfile_event): Use copy-initialization.
2717 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2718 (emit_clear_objfiles_event): Use copy-initialization.
2719 * python/py-signalevent.c (create_signal_event_object): Use
2720 copy-initialization.
2721 * python/py-threadevent.c (create_thread_event_object): Use
2722 copy-initialization.
2723
2724 2018-08-24 Pedro Alves <palves@redhat.com>
2725 Simon Marchi <simon.marchi@ericsson.com>
2726
2727 PR gdb/23379
2728 * python/py-continueevent.c: Include "gdbthread.h".
2729 (create_continue_event_object): Add intro comment. Add 'ptid'
2730 parameter. Use it to find thread to pass to
2731 create_thread_event_object.
2732 (emit_continue_event): Pass PTID down to
2733 create_continue_event_object.
2734 * python/py-event.h (py_get_event_thread): Declare.
2735 (create_thread_event_object): Remove default from 'thread'
2736 parameter.
2737 * python/py-stopevent.c (create_stop_event_object): Use
2738 py_get_event_thread.
2739 * python/py-threadevent.c (get_event_thread): Rename to ...
2740 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2741 and use it to find the thread.
2742 (create_thread_event_object): Assert that THREAD isn't null.
2743 Don't find the event thread here.
2744
2745 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2746
2747 * block.h (blockrange, blockranges): New struct declarations.
2748 (struct block): Add new field named `ranges'.
2749 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2750 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2751 macros for accessing ranges in struct block.
2752 (make_blockranges): New declaration.
2753 block.c (make_blockranges): New function.
2754 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2755 for block.
2756 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2757 * blockframe.c (cache_pc_function_block): New static global.
2758 (clear_pc_function_cache): Clear cache_pc_function_block.
2759 (find_pc_partial_function): Move comment to symtab.h. Add
2760 support for non-contiguous blocks.
2761 * cli/cli-cmds.c (block.h): Include.
2762 (print_disassembly): Handle printing of non-contiguous blocks.
2763 (disassemble_current_function): Likewise.
2764 (disassemble_command): Likewise.
2765
2766 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2767 BLOCK_START.
2768 * blockframe.c (get_pc_function_start): Likewise.
2769 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2770 (gcc_symbol_address): Likewise.
2771 * compile/compile-object-run.c (compile_object_run): Likewise.
2772 * compile/compile.c (get_expr_block_and_pc): Likewise.
2773 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2774 (func_addr_to_tail_call_list): Likewise.
2775 * findvar.c (default_read_var_value): Likewise.
2776 * inline-frame.c (inline_frame_this_id): Likewise.
2777 (skip-inline_frames): Likewise.
2778 * infcmd.c (until_next_command): Likewise.
2779 * linespec.c (convert_linespec_to_sals): Likewise.
2780 * parse.c (parse_exp_in_context_1): Likewise.
2781 * printcmd.c (build_address_symbolic): likewise.
2782 (info_address_command): Likewise.
2783 symtab.c (find_function_start_sal): Likewise.
2784 (skip_prologue_sal): Likewise.
2785 (find_function_alias_target): Likewise.
2786 (find_gnu_ifunc): Likewise.
2787 * stack.c (find_frame_funname): Likewise.
2788 * symtab.c (fixup_symbol_section): Likewise.
2789 (find_function_start_sal): Likewise.
2790 (skip_prologue_sal): Likewsie.
2791 (find_function_alias_target): Likewise.
2792 (find_gnu_ifunc): Likewise.
2793 * tracepoint.c (info_scope_command): Likewise.
2794 * value.c (value_fn_field): Likewise.
2795
2796 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2797 in place of find_pc_partial_function.
2798 * blockframe.c (find_function_entry_range_from_pc): New function.
2799 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2800 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2801 for each range in a block.
2802
2803
2804 2018-08-23 Xavier Roirand <roirand@adacore.com>
2805
2806 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2807 incrementation.
2808
2809 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2810
2811 * solib-svr4.c (read_program_headers_from_bfd): Return
2812 gdb::optional<gdb::byte_vector>.
2813 (svr4_exec_displacement): Adjust.
2814
2815 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2816
2817 * solib-svr4.c (read_program_header): Return
2818 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2819 (find_program_interpreter): Return
2820 gdb::optional<gdb::byte_vector>.
2821 (scan_dyntag_auxv): Adjust.
2822 (enable_break): Adjust.
2823 (svr4_exec_displacement): Adjust.
2824
2825 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2826
2827 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2828 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2829
2830 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2831
2832 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2833 string_vprintf.
2834 * guile/scm-utils.c (gdbscm_printf): Likewise.
2835 * serial.c (serial_printf): Likewise.
2836 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2837
2838 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2839
2840 * stack.c (print_frame): Print frame architecture when printing on
2841 an MI output.
2842 * NEWS: Mention new "arch" attribute in frame output.
2843
2844 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2845
2846 * arch/aarch64.h (aarch64_regnum): Update comment.
2847
2848 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2849
2850 * NEWS: Add SVE to 8.2 section.
2851
2852 2018-08-21 Pedro Alves <palves@redhat.com>
2853
2854 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2855 out from gdbscm_parse_function_args.
2856 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2857 gdbscm_parse_function_args_1.
2858
2859 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2860
2861 PR gdb/17816
2862 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2863 operator.
2864
2865 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2866
2867 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2868
2869 2018-08-19 Michael Spang <spang@google.com>
2870
2871 PR gdb/11786
2872 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2873 for PT_TLS segments.
2874
2875 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2876
2877 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2878 dwarf_variable_value.
2879 * dwarf2-frame.c (class dwarf_expr_executor):
2880 Add override for dwarf_variable_value.
2881 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2882 (class symbol_needs_eval_context): Likewise.
2883 (indirect_synthetic_pointer): Add forward declaration.
2884 (sect_variable_value): New function.
2885 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2886 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2887 for DW_OP_GNU_variable_value.
2888
2889 2018-08-16 Tom Tromey <tom@tromey.com>
2890
2891 * top.c (read_command_file): Update.
2892 (command_line_input): Remove "repeat" argument.
2893 * ada-lang.c (get_selections): Update.
2894 * linespec.c (decode_line_2): Update.
2895 * defs.h (command_line_input): Remove argument.
2896 * cli/cli-script.c (read_next_line): Update.
2897 * python/py-gdb-readline.c: Update.
2898
2899 2018-08-17 Tom Tromey <tom@tromey.com>
2900
2901 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2902 command_line_input.
2903
2904 2018-08-15 Tom Tromey <tom@tromey.com>
2905
2906 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2907
2908 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2909
2910 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2911 If used, use find_pc_partial_function to find address range
2912 to disassemble.
2913 * mi/mi-main.c (mi_cmd_list_features): Report
2914 "data-disassemble-a-option" feature.
2915 * NEWS: Mention new -data-disassemble option -a.
2916
2917 2018-08-13 Tom Tromey <tom@tromey.com>
2918
2919 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2920
2921 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2922
2923 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2924 (aarch64_linux_collect_sve_regset): Likewise.
2925 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2926 * regcache.h (regcache_map_entry_size): New function.
2927
2928 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2929
2930 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2931 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2932 (SVE_HEADER_VL_LENGTH): Likewise.
2933 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2934 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2935 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2936 (SVE_HEADER_SIZE_OFFSET): Likewise.
2937 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2938 (SVE_HEADER_VL_OFFSET): Likewise.
2939 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2940 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2941 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2942 (SVE_HEADER_SIZE): Likewise.
2943 (aarch64_linux_core_read_vq): Add function.
2944 (aarch64_linux_core_read_description): Check for SVE section.
2945
2946 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2947
2948 * aarch64-fbsd-tdep.c
2949 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2950 collect_size.
2951 * aarch64-linux-tdep.c
2952 (aarch64_linux_iterate_over_regset_sections): Likewise.
2953 * alpha-linux-tdep.c
2954 (alpha_linux_iterate_over_regset_sections):
2955 * alpha-nbsd-tdep.c
2956 (alphanbsd_iterate_over_regset_sections): Likewise.
2957 * amd64-fbsd-tdep.c
2958 (amd64fbsd_iterate_over_regset_sections): Likewise.
2959 * amd64-linux-tdep.c
2960 (amd64_linux_iterate_over_regset_sections): Likewise.
2961 * arm-bsd-tdep.c
2962 (armbsd_iterate_over_regset_sections): Likewise.
2963 * arm-fbsd-tdep.c
2964 (arm_fbsd_iterate_over_regset_sections): Likewise.
2965 * arm-linux-tdep.c
2966 (arm_linux_iterate_over_regset_sections): Likewise.
2967 * corelow.c (get_core_registers_cb): Likewise.
2968 (core_target::fetch_registers): Likewise.
2969 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2970 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2971 * gdbarch.h (void): Regenerate.
2972 * gdbarch.sh: Add supply_size and collect_size.
2973 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2974 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2975 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2976 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2977 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2978 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2979 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2980 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2981 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2982 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2983 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2984 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2985 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2986 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2987 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2988 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2989 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2990 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2991 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2992 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2993 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2994 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2995 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2996 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2997 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2998 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2999 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3000 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3001 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3002 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3003
3004 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3005
3006 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3007 with string_printf.
3008
3009 2018-08-10 Keith Seitz <keiths@redhat.com>
3010
3011 * compile/compile-c-support.c (add_code_header, add_code_footer):
3012 Move into policy class.
3013 (c_push_user_expression, pop_user_expression_nop)
3014 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3015 (compile_program): New host class.
3016 (c_compile_program): New typedef.
3017 (c_compute_porgram): Use c_compile_program.
3018
3019 2018-08-10 Keith Seitz <keiths@redhat.com>
3020
3021 * compile/compile-internal.h (compile_instance::~compile_instance):
3022 Remove calls to htab_delete.
3023 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3024 * compile.c (compile_instance::compile_instance): Initialize
3025 htab unique pointers.
3026 (compile_instance::get_cached_type, compile_instance::insert_type)
3027 (compile_instance::error_symbol_once): Update for unique_ptr.
3028
3029 2018-08-10 Keith Seitz <keiths@redhat.com>
3030
3031 * compile/compile-c-symbols.c (struct symbol_error)
3032 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3033 (compile_instance::insert_symbol_error)
3034 (compile_instance::error_symbol_once): Move to ...
3035 * compile/compile.c: ... here.
3036
3037 2018-08-10 Keith Seitz <keiths@redhat.com>
3038
3039 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3040 instead of `new_compile_instance'.
3041 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3042 Update description.
3043 If the symbol error map is not initialized, create it.
3044 (generate_c_for_for_one_symbol): Do not check/initialize
3045 the symbol error map.
3046 * compile/compile-c-types.c (compile_c_instance): Make a class.
3047 Update all callers.
3048 (compile_instance::compile_instance): Initialize the type cache.
3049 (get_cached_type): New function.
3050 (insert_type): Update description.
3051 (compile_c_instance::m_default_cflags): Define.
3052 (convert_type): Update description. Use get_cached_type.
3053 (delete_instance): Moved to destructor.
3054 (new_compile_instance): Moved to constructor.
3055 * compile/compile-c.h (compile_c_instance): Make class inheriting
3056 from compile_instance.
3057 <base>: Remove field.
3058 <type_map, symbol_err_map>: Move to base class.
3059 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3060 * compile/compile-internal.h (compile_instance): Make class.
3061 <type_map_t, symbol_err_map_t>: Define.
3062 <fe>: Rename to `m_gcc_fe'.
3063 <scope, block, gcc_target_options>: Add `m_' prefix.
3064 <m_type_map, m_symbol_err_map>: New fields, moved from
3065 compile_c_instance.
3066 <destroy>: Remove.
3067 (convert_type, new_compile_instance): Remove.
3068 * compile/compile.c (cleanup_compile_instance): Remove.
3069 (compile_to_object): Use unique_ptr to eliminate cleanups.
3070 (compile_instance::set_print_callback, compile_instance::version)
3071 (compile_instance::set_verbose)
3072 (compile_instance::set_driver_filename)
3073 (compile_instance::set_triplet_regexp)
3074 (compile_instance::set_arguments)
3075 (compile_instance::set_source_file)
3076 (compile_instance::compile): Define.
3077
3078 2018-08-10 Keith Seitz <keiths@redhat.com>
3079
3080 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3081 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3082 gcc-c-fe.def to define C plugin.
3083 (delete_instance): Delete `c_plugin'.
3084 (new_compile_instance): Initialize `c_plugin'.
3085 * compile/compile-c.h: Include gcc_c_plugin.h.
3086 (struct compile_c_instance) <c_plugin>: New member.
3087 * gcc-c-plugin.h: New file.
3088 Update all callers with API change.
3089
3090 2018-08-10 Keith Seitz <keiths@redhat.com>
3091
3092 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3093 (HFILES_NO_SRCDIR): ... to here.
3094 Add compile-internal.h and compile-c.h.
3095 * compile/compile-c-support.c: Include compile-c.h.
3096 * compile/compile-c-symbols.c: Include compile-c.h.
3097 (generate_c_for_variable_locations): Update comment.
3098 * compile/compile-c-types.c: Include compile-c.h.
3099 * compile/compile-c.h: New file -- moved C language declarations
3100 from other files here.
3101 * compile/compile-internal.h: Do not include hashtab.h or
3102 common/enum-flags.h.
3103 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3104 (gcc_convert_symbol, gcc_symbol_address)
3105 (generate_c_for_variable_locations, c_get_mode_for_size)
3106 (c_get_range_decl_name): Definitions moved to compile-c.h.
3107 * compile/compile-loc2c.c: Include compile-c.h.
3108
3109 2018-08-10 Keith Seitz <keiths@redhat.com>
3110
3111 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3112 (c_symbol_substitution_name): ... this.
3113 Update all callers.
3114
3115 2018-08-10 Keith Seitz <keiths@redhat.com>
3116
3117 * compile/compile-c-support.c (c_compute_program): Use
3118 unique_xmalloc_ptr to eliminate cleanup.
3119 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3120 Return a unique_xmalloc_ptr and eliminate cleanup.
3121 * compile/compile-internal.h (generate_c_for_variable_locations):
3122 Return unique_xmalloc_ptr and update description.
3123
3124 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3125
3126 * corelow.c (core_target::get_core_register_section): Rename
3127 min_size to section_min_size.
3128
3129 2018-08-09 Jim Wilson <jimw@sifive.com>
3130
3131 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3132 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3133 * NEWS: Mention new GNU/Linux RISC-V target.
3134 * configure.host: Add riscv*-*-linux*.
3135 * configure.nat: Add riscv*.
3136 * configure.tgt: Add riscv*-*-linux*.
3137 * riscv-linux-nat.c: New file.
3138 * riscv-linux-tdep.c: New file.
3139
3140 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3141
3142 * infrun.c (resume): Make static, add forward declaration.
3143 (proceed): Update header comment.
3144 * infrun.h (resume): Delete declaration.
3145
3146 2018-08-09 Tom Tromey <tom@tromey.com>
3147
3148 * riscv-tdep.h: Minor formatting fixes.
3149
3150 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3151
3152 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3153 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3154 (test_mkdir_recursive): Likewise.
3155 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3156
3157 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3158
3159 * valarith.c (value_subscripted_rvalue): If an array is not in
3160 memory, and we don't know the upper bound, then we can't know that
3161 the requested element exists or not.
3162
3163 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3164
3165 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3166 (target_options_to_string): Add comment.
3167
3168 2018-08-08 Tom Tromey <tom@tromey.com>
3169
3170 * unittests/scoped_mmap-selftests.c: Check result of "write".
3171
3172 2018-08-08 Jim Wilson <jimw@sifive.com>
3173
3174 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3175 (decode_register_index_short): New.
3176 (decode_j_type_insn, decode_cj_type_insn): New.
3177 (decode_b_type_insn, decode_cb_type_insn): New.
3178 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3179 local xlen. Check xlen when decoding ambiguous compressed insns. In
3180 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3181 is_c_sw_insn instead of is_sw_insn.
3182 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3183 (riscv_software_single_step): New.
3184 * riscv-tdep.h (riscv_software_single_step): Declare.
3185
3186 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3187 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3188
3189 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3190
3191 PR gdb/18050:
3192 * target.c (dispose_inferior): Don't dispose of inferiors that are
3193 already killed.
3194
3195 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3196
3197 * remote.c (remote_target::download_tracepoint): Change char* to
3198 const char*.
3199
3200 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3201
3202 * target.h (target_options_to_string): Return an std::string.
3203 * target.c (str_comma_list_concat_elem): Return void, use
3204 std::string.
3205 (do_option): Likewise.
3206 (target_options_to_string): Return an std::string.
3207 * linux-nat.c (linux_nat_target::wait): Adjust.
3208 * target-debug.h (target_debug_print_options): Adjust.
3209
3210 2018-08-07 Tom Tromey <tom@tromey.com>
3211
3212 * Makefile.in (CPPFLAGS): New variable.
3213 (INTERNAL_CPPFLAGS): Use it.
3214
3215 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3216
3217 * NEWS: Mention the index cache.
3218
3219 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3220
3221 * common/pathstuff.h (get_standard_cache_dir): New.
3222 * common/pathstuff.c (get_standard_cache_dir): New.
3223 * build-id.h (build_id_to_string): New.
3224 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3225 DEBUG_STR_SUFFIX): Move to here.
3226 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3227 DEBUG_STR_SUFFIX): Move from there.
3228 (write_psymtabs_to_index): Make non-static, add basename
3229 parameter. Write to temporary files, rename when done.
3230 (save_gdb_index_command): Adjust call to
3231 write_psymtabs_to_index.
3232 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3233 field.
3234 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3235 (get_gdb_index_contents_from_cache): New.
3236 (get_gdb_index_contents_from_cache_dwz): New.
3237 (dwarf2_initialize_objfile): Read index from cache.
3238 (dwarf2_build_psymtabs): Save to index.
3239 * dwarf-index-cache.h: New file.
3240 * dwarf-index-cache.c: New file.
3241 * dwarf-index-write.h: New file.
3242
3243 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3244
3245 * gnulib/aclocal.m4: Re-generate.
3246 * gnulib/config.in: Re-generate.
3247 * gnulib/configure: Re-generate.
3248 * gnulib/import/Makefile.am: Re-generate.
3249 * gnulib/import/Makefile.in: Re-generate.
3250 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3251 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3252 * gnulib/import/m4/mkdir.m4: New file.
3253 * gnulib/import/mkdir.c: New file.
3254 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3255 module.
3256
3257 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3258
3259 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3260 * common/scoped_mmap.c: New file.
3261 * common/scoped_mmap.h (destroy): New method.
3262 (~scoped_mmap, reset): Use destroy.
3263 (scoped_mmap): New move constructor.
3264 (mmap_file): New declaration.
3265 * unittests/scoped_mmap-selftests.c (test_normal,
3266 test_invalid_filename, run_tests): New functions.
3267 (_initialize_scoped_mmap_selftests): Register selftest.
3268
3269 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3270
3271 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3272 (read_gdb_index_from_buffer): ... this. Remove section
3273 parameter, add buffer parameter.
3274 (get_gdb_index_contents_ftype,
3275 get_gdb_index_contents_dwz_ftype): New typedefs.
3276 (dwarf2_read_gdb_index): Add callback parameters to get the
3277 index contents.
3278 (get_gdb_index_contents_from_section): New.
3279 (dwarf2_initialize_objfile): Update call to
3280 dwarf2_read_gdb_index.
3281
3282 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3283
3284 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3285 (gdb_open_cloexec): Likewise.
3286 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3287 (commandline_from_pid): Likewise.
3288 (linux_xfer_osdata_threads): Likewise.
3289 (linux_xfer_osdata_fds): Likewise.
3290 * ada-lang.c (is_package_name): Likewise.
3291 * auxv.c (procfs_xfer_auxv): Likewise.
3292 * breakpoint.c (print_one_breakpoint_location): Use
3293 uiout::field_fmt.
3294 (print_one_catch_solib): Use string_printf.
3295 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3296 (add_pe_forwarded_sym): Likewise.
3297 * dwarf2read.c (create_type_unit_group): Likewise.
3298 (build_error_marker_type): Likewise.
3299 * infcall.c (get_function_name): Likewise.
3300 * valprint.c (print_converted_chars_to_obstack): Likewise.
3301 * xtensa-tdep.c (xtensa_register_type): Likewise.
3302
3303 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3304
3305 * remote.c (remote_target::download_tracepoint): Fix format
3306 string errors.
3307
3308 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3309
3310 * tracefile.c: Include common/byte-vector.h.
3311 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3312 with trace_regblock_size if needed. Update uses of buf.
3313
3314 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3315
3316 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3317 std::vector<unsigned char>.
3318 * tracepoint.c (collection_list::collection_list): Remove
3319 m_regs_mask initializer from initializer list. Resize
3320 m_regs_mask using the largest remote register number.
3321 (collection_list::add_remote_register): Remove size check on
3322 m_regs_mask. Use at to access element.
3323 (collection_list::stringify): Change type of temp_buf to
3324 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3325 stringify the register mask. Use pack_hex_byte for the register
3326 mask.
3327
3328 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3329
3330 * tracepoint.h (class collection_list) <add_register>: Remove.
3331 <add_remote_register, add_ax_registers, add_local_register>:
3332 Declare.
3333 <add_memrange>: Add scope parameter.
3334 * tracepoint.c (encode_actions_1): Likewise.
3335 (collection_list::add_register): Rename to ...
3336 (collection_list::add_remote_register): ... this. Update
3337 comment.
3338 (collection_list::add_ax_registers, add_local_register): New
3339 methods.
3340 (collection_list::add_memrange): Add scope parameter. Call
3341 add_local_register instead of add_register.
3342 (finalize_tracepoint_aexpr): New function.
3343 (collection_list::collect_symbol): Update calls to add_memrange.
3344 Call add_local_register instead of add_register. Call
3345 add_ax_registers. Call finalize_tracepoint_aexpr.
3346 (encode_actions_1): Get remote regnos for $reg action. Call
3347 add_remote_register, add_ax_registers, and add_local_register.
3348 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3349 (validate_actionline): Call finalize_tracepoint_aexpr.
3350
3351 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3352
3353 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3354 Replace array buf with gdb::char_vector buf, of size
3355 get_remote_packet_size (). Replace references to buf and
3356 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3357 and xsnprintf with snprintf. Raise errors if the buffer is too
3358 small.
3359
3360 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3361
3362 * remote.c (remote_target::download_tracepoint): Fix the has_more
3363 predicate in the QTDP action list iteration.
3364
3365 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3366
3367 * remote.c (remote_target::download_tracepoint): Fix indentation
3368 in for block.
3369
3370 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3371
3372 * proc-api.c (_initialize_proc_api): Remove c, unused.
3373 * procfs.c (procfs_init_inferior): Remove signals, unused.
3374 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3375 unused.
3376
3377 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3378 Andrew Burgess <andrew.burgess@embecosm.com>
3379
3380 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3381 'W_STOPCODE (0)' as this could be ambiguous.
3382
3383 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3384
3385 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3386 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3387 "ai_socktype").
3388
3389 2018-08-02 Tom Tromey <tom@tromey.com>
3390
3391 PR symtab/16842.
3392 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3393 symbols.
3394 (process_structure_scope): Likewise.
3395
3396 2018-08-02 Xavier Roirand <roirand@adacore.com>
3397
3398 PR gdb/22629:
3399 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3400 kill inferior.
3401
3402 2018-08-02 Tom Tromey <tom@tromey.com>
3403
3404 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3405 (darwin_suspend_inferior, darwin_resume_inferior)
3406 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3407 (darwin_check_new_threads): Check result of get_darwin_inferior.
3408
3409 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3410
3411 GDB 8.1.1 released.
3412
3413 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3414
3415 * varobj.c (varobj_get_path_expr_parent): Report an error if
3416 parent is a dynamic varobj.
3417
3418 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3419
3420 * gnulib/aclocal.m4: Re-generate.
3421 * gnulib/config.in: Re-generate.
3422 * gnulib/configure: Re-generate.
3423 * gnulib/import/Makefile.in: Re-generate.
3424 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3425 * gnulib/import/m4/onceonly.m4: Re-generate.
3426
3427 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3428
3429 * target-descriptions.c (struct xml_test_tdesc): New.
3430 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3431 (record_xml_tdesc): Update.
3432 (maintenance_check_xml_descriptions): Update.
3433 * target-descriptions.h (record_xml_tdesc): Update comment.
3434
3435 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3436
3437 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3438 checking array bounds are defined.
3439
3440 2018-07-30 Tom Tromey <tom@tromey.com>
3441
3442 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3443 irreflexivity violation.
3444
3445 2018-07-30 Tom Tromey <tom@tromey.com>
3446
3447 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3448 * value.c (unpack_long): Remove lint code.
3449 * valops.c (value_ind): Remove lint code.
3450 * valarith.c (value_x_binop, value_x_unop, value_equal)
3451 (value_pos): Remove lint code.
3452
3453 2018-07-28 Tom de Vries <tdevries@suse.de>
3454
3455 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3456 with undefined upper bound as <optimized out>.
3457
3458 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3459
3460 * gcore.in: Rename variable "name" to "prefix". Expand
3461 "usage" text.
3462
3463 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3464
3465 * windows-nat.c (windows_nat_target::create_inferior): Update to
3466 call close() in global namespace.
3467
3468 2018-07-26 Tom Tromey <tom@tromey.com>
3469
3470 * dwarf-index-write.c (add_address_entry): Don't add objfile
3471 offsets.
3472 * dbxread.c (find_stab_function): Rename from
3473 find_stab_function_addr. Return a bound_minimal_symbol.
3474 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3475 Don't add objfile offsets.
3476 (end_psymtab): Use raw_text_low, raw_text_high,
3477 MSYMBOL_VALUE_RAW_ADDRESS.
3478 (read_ofile_symtab): Update.
3479 (process_one_symbol): Update.
3480 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3481 offsets.
3482 (dw2_relocate): Remove.
3483 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3484 searching addrmap.
3485 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3486 Update.
3487 (process_psymtab_comp_unit_reader, add_partial_symbol)
3488 (add_partial_subprogram, dwarf2_ranges_read): Update.
3489 (load_partial_dies): Update.
3490 (add_address_entry): Don't add objfile offsets.
3491 (dwarf2_build_include_psymtabs): Update.
3492 (create_addrmap_from_aranges): Don't add objfile offsets.
3493 (dw2_find_pc_sect_compunit_symtab): Update.
3494 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3495 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3496 Update.
3497 (parse_partial_symbols): Don't add objfile offsets. Use
3498 raw_text_low, raw_text_high. Update.
3499 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3500 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3501 or call 'relocate' quick function. Clear psymbol_map.
3502 * psympriv.h (struct partial_symbol) <address>: Add section
3503 offset.
3504 <set_unrelocated_address>: Rename from set_address.
3505 <raw_text_low, raw_text_high>: New methods.
3506 <text_low, text_high>: Add objfile parameter.
3507 (add_psymbol_to_bcache): Add 'section' parameter. Call
3508 set_unrelocated_address.
3509 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3510 (find_pc_psymbol): Update.
3511 (fixup_psymbol_section, relocate_psymtabs): Remove.
3512 (dump_psymtab, psym_functions): Update.
3513 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3514 parameter.
3515 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3516 (start_psymtab_common): Update.
3517 * symfile-debug.c (debug_qf_relocate): Remove.
3518 (debug_sym_quick_functions): Update.
3519 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3520 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3521 Update.
3522
3523 2018-07-26 Tom Tromey <tromey@redhat.com>
3524
3525 * dbxread.c (end_psymtab): Use text_high_valid and
3526 text_low_valid.
3527 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3528 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3529 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3530 Update comment.
3531 <text_low_valid, text_high_valid>: New fields.
3532 <set_text_low, set_text_high>: Update.
3533 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3534
3535 2018-07-26 Tom Tromey <tom@tromey.com>
3536
3537 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3538 Update.
3539 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3540 textlow and texthigh fields.
3541 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3542 Update.
3543 * mdebugread.c (parse_lines, parse_partial_symbols)
3544 (psymtab_to_symtab_1): Update.
3545 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3546 Rename fields. Update comment. Now private.
3547 <text_low, text_high, set_text_low, set_text_high>: New methods.
3548 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3549 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3550 (start_psymtab_common, maintenance_info_psymtabs)
3551 (maintenance_check_psymtabs): Update.
3552 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3553 texthigh fields.
3554 (scan_xcoff_symtab): Update.
3555
3556 2018-07-26 Tom Tromey <tromey@redhat.com>
3557
3558 * psympriv.h (struct partial_symbol) <unrelocated_address,
3559 address, set_address>: New methods.
3560 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3561 (fixup_psymbol_section, relocate_psymtabs): Update.
3562 (print_partial_symbols): Add 'objfile' parameter. Update.
3563 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3564 Update.
3565
3566 2018-07-26 Tom Tromey <tom@tromey.com>
3567
3568 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3569 (debug_names::write_psymbols): Update.
3570 * psympriv.h (struct partial_symbol): Derive from
3571 general_symbol_info.
3572 <obj_section>: New method.
3573 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3574 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3575 (find_pc_sect_psymbol, fixup_psymbol_section)
3576 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3577 (print_partial_symbols, recursively_search_psymtabs)
3578 (compare_psymbols, psymbol_hash, psymbol_compare)
3579 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3580 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3581
3582 2018-07-26 Tom Tromey <tromey@redhat.com>
3583
3584 * dbxread.c (end_psymtab): Remove dead code.
3585
3586 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3587
3588 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3589 DWARF unwinders are disabled.
3590 * dwarf2-frame.c: Add dwarf2read.h include.
3591 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3592 disabled.
3593 (dwarf2_frame_unwinders_enabled_p): Define.
3594 (show_dwarf_unwinders_enabled_p): New function.
3595 (_initialize_dwarf2_frame): Register switch to control DWARF
3596 unwinder use.
3597 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3598 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3599 (show_dwarf_cmdlist): Remove static keyword.
3600 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3601 (show_dwarf_cmdlist): Declare.
3602 * NEWS: Document new feature.
3603
3604 2018-07-26 Tom de Vries <tdevries@suse.de>
3605
3606 PR breakpoints/23366
3607 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3608
3609 2018-07-26 Tom de Vries <tdevries@suse.de>
3610
3611 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3612 DW_AT_count can't be translated to a dynamic prop.
3613
3614 2018-07-25 Tom de Vries <tdevries@suse.de>
3615
3616 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3617 try/catch.
3618
3619 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3620
3621 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3622
3623 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3624
3625 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3626
3627 2018-07-24 Keith Seitz <keiths@redhat.comt
3628
3629 PR symtab/23010
3630 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3631 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3632 instead of add_symbol_to_list.
3633 (read_file_scope): Call prepare_one_comp_unit before reading
3634 any other DIEs.
3635
3636 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3637
3638 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3639
3640 2018-07-24 Tom Tromey <tom@tromey.com>
3641
3642 * utils.c (malloc, realloc, free): Don't declare.
3643 * configure, config.in: Rebuild.
3644 * configure.ac: Don't check for declarations of free, malloc, or
3645 realloc.
3646
3647 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3648
3649 * aarch64-linux-nat.c
3650 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3651 variable.
3652 * arm-linux-nat.c (fetch_regs): Likewise.
3653 (store_regs): Likewise.
3654 (fetch_vfp_regs): Likewise.
3655 (store_vfp_regs): Likewise.
3656 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3657 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3658 (arm_linux_nat_target::insert_watchpoint): Likewise.
3659 (arm_linux_nat_target::remove_watchpoint): Likewise.
3660 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3661 Likewise.
3662 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3663 Likewise.
3664 * ppc-linux-nat.c (fetch_register): Likewise.
3665 (fetch_all_gp_regs): Likewise.
3666 (fetch_ppc_registers): Likewise.
3667 (store_all_gp_regs): Likewise.
3668 (store_ppc_registers): Likewise.
3669 (hwdebug_insert_point): Likewise.
3670 (can_use_watchpoint_cond_accel): Likewise.
3671 * remote-sim.c (gdb_os_write_stdout): Likewise.
3672
3673 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3674 Tom Tromey <tom@tromey.com>
3675
3676 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3677 test for it.
3678 * configure: Rebuild.
3679
3680 2018-07-22 Tom Tromey <tom@tromey.com>
3681
3682 * regformats/regdat.sh: Define xmltarget_${name} inside
3683 #ifndef IN_PROCESS_AGENT.
3684
3685 2018-07-22 Tom Tromey <tom@tromey.com>
3686
3687 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3688
3689 2018-07-22 Tom Tromey <tom@tromey.com>
3690
3691 * symfile.c (reread_symbols): Notify iter, not objfile.
3692
3693 2018-07-22 Tom Tromey <tom@tromey.com>
3694
3695 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3696 Use arch_ops.
3697 (ravenscar_thread_target::prepare_to_store): Likewise.
3698
3699 2018-07-22 Tom Tromey <tom@tromey.com>
3700
3701 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3702 unused variable. Call value_fetch_lazy when needed.
3703 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3704 Remove unused variable. Call value_fetch_lazy when needed.
3705
3706 2018-07-22 Tom Tromey <tom@tromey.com>
3707
3708 * m32c-tdep.c (mark_dma): Return void.
3709 (make_regs): Remove unused declarations.
3710
3711 2018-07-22 Tom Tromey <tom@tromey.com>
3712
3713 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3714 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3715 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3716 bkscm_get_valid_block_smob_arg_unsafe for effect.
3717
3718 2018-07-22 Tom Tromey <tom@tromey.com>
3719
3720 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3721 value_type.
3722
3723 2018-07-22 Tom Tromey <tom@tromey.com>
3724
3725 * windows-nat.c (saved_context): Conditionally define.
3726 * remote.c (remote_target::remote_btrace_maybe_reopen):
3727 Conditionally declare "warned".
3728 * inflow.c (sigquit_ours): Conditionally define.
3729 (new_tty): Move "tty" declaration inside #if.
3730 * guile/guile.c (guile_datadir): Conditionally define.
3731 * charset.c (set_be_le_names): Move some declarations inside #if.
3732 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3733 #if.
3734 (parse_xml_btrace_conf): Likewise.
3735
3736 2018-07-22 Tom Tromey <tom@tromey.com>
3737
3738 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3739
3740 2018-07-22 Tom Tromey <tom@tromey.com>
3741
3742 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3743 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3744 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3745 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3746 * stack.c (frame_apply_level_command): Remove unused variable.
3747 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3748 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3749 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3750 unused variable.
3751 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3752 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3753 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3754 variable.
3755 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3756 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3757 variable.
3758 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3759 Remove unused variable.
3760 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3761 variable.
3762 * common/tdesc.c (print_xml_feature::visit): Remove unused
3763 variable.
3764 * compile/compile-object-load.c (store_regs): Remove unused
3765 variables.
3766 * complaints.c (clear_complaints): Remove unused variable.
3767 * corelow.c (core_target_open): Remove unused variable.
3768 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3769 variable.
3770 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3771 variable.
3772 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3773 variable.
3774 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3775 variable.
3776 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3777 variable.
3778 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3779 variable.
3780 * ia64-tdep.c (examine_prologue): Remove unused variable.
3781 * infcall.c (run_inferior_call): Remove unused variable.
3782 * inferior.c (exit_inferior): Remove unused variable.
3783 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3784 * linespec.c (decode_line_2): Remove unused variable.
3785 * linux-nat.c (super_close): Remove.
3786 * linux-tdep.c (linux_info_proc): Remove unused variable.
3787 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3788 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3789 Remove unused variable.
3790 * parse.c (find_minsym_type_and_address): Remove unused variable.
3791 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3792 variable.
3793 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3794 variable.
3795 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3796 variables.
3797 * record-btrace.c (record_btrace_target::store_registers): Remove
3798 unused variable.
3799 (cmd_show_record_btrace_cpu): Remove unused variable.
3800 * riscv-tdep.c (riscv_register_reggroup_p)
3801 (riscv_push_dummy_call, riscv_return_value): Remove unused
3802 variable.
3803 * rust-exp.y (literal): Remove unused variable.
3804 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3805 unused variable.
3806 <STRUCTOP_ANONYMOUS>: Likewise.
3807 * s390-linux-tdep.c (s390_linux_init_abi_31)
3808 (s390_linux_init_abi_64): Remove unused variable.
3809 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3810 (file_select_thread, net_windows_open, _initialize_ser_windows):
3811 Remove unused variables.
3812 * symtab.c (find_pc_sect_line): Remove unused variable.
3813 * target-memory.c (compute_garbled_blocks): Remove unused
3814 variable.
3815 (target_write_memory_blocks): Remove unused variable.
3816 * target.c (target_stack::unpush): Remove unused variables.
3817 * tracepoint.c (start_tracing, all_tracepoint_actions)
3818 (merge_uploaded_trace_state_variables)
3819 (print_one_static_tracepoint_marker): Remove unused variable.
3820 * unittests/basic_string_view/element_access/char/1.cc (test01):
3821 Remove unused variable.
3822 * windows-nat.c (windows_continue, windows_add_all_dlls)
3823 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3824 Remove unused variables.
3825
3826 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3827
3828 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3829 attr_profile in HAVE_ELF.
3830 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3831 HAVE_ELF.
3832
3833 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3834
3835 * frame.c (frame_register_unwind): Change parameter name.
3836 (frame_unwind_register): Likewise.
3837 (frame_unwind_register_value): Likewise.
3838 (frame_unwind_register_signed): Likewise.
3839 (frame_unwind_register_unsigned): Likewise.
3840 * frame.h (frame_register_unwind): Likewise.
3841 (frame_unwind_register): Likewise.
3842 (frame_unwind_register_value): Likewise.
3843 (frame_unwind_register_signed): Likewise.
3844 (frame_unwind_register_unsigned): Likewise.
3845 (frame_unwind_arch): Likewise.
3846
3847 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3848
3849 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3850 ISA maintenance.
3851
3852 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3853
3854 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3855 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3856 hand.
3857
3858 2018-07-20 Keith Seitz <keiths@redhat.com>
3859
3860 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3861 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3862 m_compunit_symtab, m_language>: Add "m_" prefix.
3863 Update all uses.
3864 * buildsym.c: Update all uses.
3865
3866 2018-07-20 Tom Tromey <tom@tromey.com>
3867
3868 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3869 * buildsym.h (record_line_ftype): Remove typedef.
3870
3871 2018-07-20 Tom Tromey <tom@tromey.com>
3872
3873 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3874 (end_expandable_symtab): Likewise.
3875 (end_symtab_get_static_block): Likewise.
3876 (end_symtab_from_static_block): Likewise.
3877 * buildsym-legacy.c (augment_type_symtab): Remove.
3878 (end_expandable_symtab): Remove.
3879 (end_symtab_get_static_block): Remove.
3880 (end_symtab_from_static_block): Remove.
3881
3882 2018-07-20 Tom Tromey <tom@tromey.com>
3883
3884 * dwarf2read.c: Include buildsym.h.
3885 (struct dwarf2_cu) <builder>: New method.
3886 (fixup_go_packaging): Update.
3887 (process_full_comp_unit, process_full_type_unit): Update. Don't
3888 use scoped_free_pendings.
3889 (using_directives): Add "cu" parameter, remove "language".
3890 (read_import_statement, setup_type_unit_groups, )
3891 (read_func_scope, read_lexical_block_scope)
3892 (dwarf2_record_block_ranges, read_namespace): Update.
3893 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3894 (lnp_state_machine::handle_end_sequence): Update.
3895 (class lnp_state_machine) <m_cu>: New member.
3896 <m_record_line_callback>: Remove.
3897 <m_currently_recording_lines>: New member.
3898 (lnp_state_machine::handle_set_file): Update.
3899 (noop_record_line): Remove.
3900 (dwarf_record_line_p): Add cu parameter.
3901 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3902 (lnp_state_machine::record_line)
3903 (lnp_state_machine::lnp_state_machine)
3904 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3905 (dwarf_decode_lines): Update.
3906 (dwarf2_start_subfile): Add cu parameter.
3907 (dwarf2_start_symtab, new_symbol): Update.
3908 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3909 Remove dwarf2_per_objfile parameter.
3910 (dwarf_decode_macros): Update.
3911
3912 2018-07-20 Tom Tromey <tom@tromey.com>
3913
3914 * stabsread.c (define_symbol): Update.
3915 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3916 * dwarf2read.c (new_symbol): Update.
3917 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3918 * cp-namespace.c: Include buildsym.h.
3919 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3920 * buildsym-legacy.c (get_buildsym_compunit): New function.
3921
3922 2018-07-20 Tom Tromey <tom@tromey.com>
3923
3924 * xcoffread.c: Include buildsym-legacy.h.
3925 * windows-nat.c: Include buildsym-legacy.h.
3926 * stabsread.c: Include buildsym-legacy.h.
3927 * mdebugread.c: Include buildsym-legacy.h.
3928 * buildsym-legacy.h: New file.
3929 * buildsym-legacy.c: New file, from buildsym.c.
3930 * go32-nat.c: Include buildsym-legacy.h.
3931 * dwarf2read.c: Include buildsym-legacy.h.
3932 * dbxread.c: Include buildsym-legacy.h.
3933 * cp-namespace.c: Include buildsym-legacy.h.
3934 * coffread.c: Include buildsym-legacy.h.
3935 * buildsym.h: Move some contents to buildsym-legacy.h.
3936 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3937 buildsym-legacy.c.
3938 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3939
3940 2018-07-20 Tom Tromey <tom@tromey.com>
3941
3942 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3943 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3944 (buildsym_compunit::buildsym_compunit)
3945 (buildsym_compunit::~buildsym_compunit)
3946 (buildsym_compunit::get_macro_table): Define.
3947
3948 2018-07-20 Tom Tromey <tom@tromey.com>
3949
3950 * buildsym.c (reset_symtab_globals): Remove.
3951 (buildsym_compunit::end_symtab_from_static_block): Update.
3952 (buildsym_compunit::augment_type_symtab): Update.
3953 (end_symtab_from_static_block): Call free_buildsym_compunit.
3954 (augment_type_symtab, end_symtab, end_expandable_symtab):
3955 Likewise.
3956
3957 2018-07-20 Tom Tromey <tom@tromey.com>
3958
3959 * arch-utils.c: Do not include buildsym.h.
3960 * mipsread.c: Do not include buildsym.h.
3961 * machoread.c: Do not include buildsym.h.
3962 * elfread.c: Do not include buildsym.h.
3963
3964 2018-07-20 Tom Tromey <tom@tromey.com>
3965
3966 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3967 initialization.
3968 (buildsym_compunit): Add new constructor.
3969 (struct buildsym_compunit) <get_last_source_file, finish_block,
3970 record_block_range, start_subfile, patch_subfile_names,
3971 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3972 set_last_source_start_addr, get_last_source_start_addr,
3973 get_local_using_directives, set_local_using_directives,
3974 get_global_using_directives, outermost_context_p,
3975 get_current_context_stack, get_context_stack_depth,
3976 get_current_subfile, get_local_symbols, get_file_symbols,
3977 get_global_symbols, record_debugformat, record_producer,
3978 push_context, pop_context, end_symtab_get_static_block,
3979 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3980 New public methods.
3981 <record_pending_block, finish_block_internal, make_blockvector,
3982 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3983 private methods.
3984 Update all users.
3985
3986 2018-05-22 Tom Tromey <tom@tromey.com>
3987
3988 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3989 parameter.
3990 (finish_block_internal): Update.
3991
3992 2018-07-20 Tom Tromey <tom@tromey.com>
3993
3994 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3995 parameter.
3996 (finish_block_internal): Update.
3997
3998 2018-07-20 Tom Tromey <tom@tromey.com>
3999
4000 * buildsym.h (EXTERN): Don't define or undef.
4001 * buildsym.c (EXTERN): Don't define.
4002
4003 2018-07-20 Tom Tromey <tom@tromey.com>
4004
4005 * buildsym.c: Remove TODO comment.
4006
4007 2018-07-20 Tom Tromey <tom@tromey.com>
4008
4009 * coffread.c (coff_symtab_read): Update.
4010 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4011 (xcoff_new_init): Update.
4012 * mipsread.c (mipscoff_new_init): Update.
4013 * mdebugread.c (mdebug_build_psymtabs): Update.
4014 * elfread.c (elf_new_init): Update.
4015 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4016 Update.
4017 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4018 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4019 (stabsect_build_psymtabs): Update.
4020 * buildsym.h (buildsym_init): Don't declare.
4021 * buildsym.c: Update comment.
4022 (prepare_for_building): Remove.
4023 (start_symtab, restart_symtab): Update.
4024 (reset_symtab_globals): Update comment.
4025 (buildsym_init): Remove.
4026
4027 2018-07-20 Tom Tromey <tom@tromey.com>
4028
4029 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4030 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4031 (read_enum_type, common_block_start, common_block_end)
4032 (cleanup_undefined_types_1, finish_global_stabs): Update.
4033 * mdebugread.c (psymtab_to_symtab_1): Update.
4034 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4035 (read_lexical_block_scope, new_symbol): Update.
4036 * dbxread.c (process_one_symbol): Update.
4037 * coffread.c (coff_symtab_read, process_coff_symbol)
4038 (coff_read_enum_type): Update.
4039 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4040 declare.
4041 (get_local_symbols, get_file_symbols, get_global_symbols): New
4042 functions.
4043 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4044 m_global_symbols.
4045 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4046 (~scoped_free_pendings): Update.
4047 (finish_block, prepare_for_building, reset_symtab_globals)
4048 (end_symtab_get_static_block, end_symtab_with_blockvector)
4049 (augment_type_symtab, push_context): Update.
4050 (get_local_symbols, get_file_symbols, get_global_symbols): New
4051 functions.
4052 (buildsym_init): Update.
4053
4054 2018-07-20 Tom Tromey <tom@tromey.com>
4055
4056 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4057 (process_full_type_unit): Likewise.
4058 (dwarf2_start_symtab): Set list_in_scope.
4059
4060 2018-07-20 Tom Tromey <tom@tromey.com>
4061
4062 * dwarf2read.c (process_psymtab_comp_unit_reader)
4063 (build_type_psymtabs_reader): Do not set list_in_scope.
4064
4065 2018-07-20 Tom Tromey <tom@tromey.com>
4066
4067 * buildsym.c (free_pendings): Remove.
4068 (add_symbol_to_list, scoped_free_pendings)
4069 (finish_block_internal, buildsym_init): Update.
4070
4071 2018-07-20 Tom Tromey <tom@tromey.com>
4072
4073 * xcoffread.c (read_xcoff_symtab): Update.
4074 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4075 Update.
4076 * dbxread.c (process_one_symbol): Update.
4077 * coffread.c (coff_symtab_read): Update.
4078 * buildsym.h (finish_block): Update.
4079 * buildsym.c (finish_block): Remove "listhead" argument.
4080 (end_symtab_get_static_block): Update.
4081
4082 2018-07-20 Tom Tromey <tom@tromey.com>
4083
4084 * buildsym.h (class scoped_free_pendings): Remove constructor.
4085 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4086 method.
4087 <m_pending_block_obstack, m_pending_blocks>: New members.
4088 (pending_block_obstack, pending_blocks): Remove.
4089 (scoped_free_pendings::scoped_free_pendings): Default.
4090 (~scoped_free_pendings): Update.
4091 (free_pending_blocks): Remove.
4092 (finish_block_internal, record_pending_block, make_blockvector)
4093 (end_symtab_get_static_block, augment_type_symtab, push_context)
4094 (buildsym_init): Update.
4095
4096 2018-07-20 Tom Tromey <tom@tromey.com>
4097
4098 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4099 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4100 members.
4101 (pending_addrmap, pending_addrmap_obstack)
4102 (pending_addrmap_interesting): Remove.
4103 (scoped_free_pendings, record_block_range, make_blockvector)
4104 (prepare_for_building, reset_symtab_globals, buildsym_init):
4105 Update.
4106
4107 2018-07-20 Tom Tromey <tom@tromey.com>
4108
4109 * xcoffread.c (process_linenos): Update.
4110 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4111 * mdebugread.c (psymtab_to_symtab_1): Update.
4112 * dwarf2read.c (setup_type_unit_groups)
4113 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4114 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4115 * dbxread.c (process_one_symbol): Update.
4116 * coffread.c (coff_symtab_read, enter_linenos)
4117 (process_coff_symbol): Update.
4118 * buildsym.h (current_subfile): Don't declare.
4119 (get_current_subfile): Declare.
4120 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4121 member.
4122 (start_subfile, free_buildsym_compunit, push_subfile)
4123 (prepare_for_building, start_symtab): Update.
4124 (get_current_subfile): New function.
4125
4126 2018-07-20 Tom Tromey <tom@tromey.com>
4127
4128 * coffread.c (coff_symtab_read): Update.
4129 * xcoffread.c (read_xcoff_symtab): Update.
4130 * dwarf2read.c (new_symbol): Update.
4131 (read_func_scope, read_lexical_block_scope): Update.
4132 * dbxread.c (process_one_symbol): Update.
4133 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4134 (outermost_context_p): Remove macro.
4135 (outermost_context_p, get_current_context_stack)
4136 (get_context_stack_depth): Declare.
4137 (pop_context): Return struct context_stack.
4138 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4139 member.
4140 (context_stack_size): Remove.
4141 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4142 (prepare_for_building, end_symtab_get_static_block)
4143 (augment_type_symtab, push_context): Update.
4144 (pop_context): Return struct context_stack.
4145 (outermost_context_p, get_current_context_stack)
4146 (get_context_stack_depth): New functions.
4147 (buildsym_init): Update.
4148
4149 2018-07-20 Tom Tromey <tom@tromey.com>
4150
4151 * rust-exp.y: Now a pure parser. Update all rules.
4152 (%union): Move earlier.
4153 (current_parser, work_obstack): Remove globals.
4154 (rust_parser, ~rust_parser): Update.
4155 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4156 lex_character, lex_number, lex_string, lex_identifier,
4157 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4158 convert_name, convert_params_to_expression,
4159 convert_ast_to_expression, ast_basic_type, ast_operation,
4160 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4161 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4162 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4163 ast_array_type, ast_slice_type, ast_reference_type,
4164 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4165 (rust_parse): Update.
4166 (rustyyerror, rustyylex): Add parser parameter.
4167 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4168 (rust_lex_stringish_test, rust_lex_test_sequence)
4169 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4170 (rust_lex_test_push_back, rust_lex_tests): Update.
4171
4172 2018-07-19 Pedro Alves <palves@redhat.com>
4173
4174 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4175 gdb::unique_xmalloc_ptr.
4176 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4177 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4178 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4179 copy-initialization.
4180 * guile/scm-pretty-print.c (ppscm_print_children): Use
4181 gdb::unique_xmalloc_ptr instead of cleanups.
4182 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4183 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4184 gdb::unique_xmalloc_ptr.
4185 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4186 Adjust to use gdb::unique_xmalloc_ptr.
4187 * guile/scm-utils.c (extract_arg): Adjust.
4188 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4189 gdb::unique_xmalloc_ptr instead of a cleanup.
4190
4191 2018-07-19 Tom Tromey <tom@tromey.com>
4192
4193 * utils.c (do_value_free_to_mark)
4194 (make_cleanup_value_free_to_mark): Remove.
4195 * utils.h (make_cleanup_value_free_to_mark): Remove.
4196
4197 2018-07-19 Pedro Alves <palves@redhat.com>
4198
4199 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4200 forwarding reference.
4201
4202 2018-07-18 Pedro Alves <palves@redhat.com>
4203
4204 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4205 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4206 cleanup.
4207
4208 2018-07-18 Pedro Alves <palves@redhat.com>
4209
4210 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4211 exceptions.
4212 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4213 (gdbscm_wrap): New.
4214 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4215 directly instead of a cleanup.
4216 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4217 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4218 (vlscm_binop_gdbthrow): New, factored out from ...
4219 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4220 (vlscm_rich_compare): Use gdbscm_wrap.
4221 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4222 instead of a cleanup.
4223 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4224 cleanup.
4225 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4226 Use xfree directly instead of a cleanup.
4227 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4228 Adjust to use gdbscm_wrap and scoped_value_mark.
4229 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4230 (gdbscm_value_address, gdbscm_value_dereference)
4231 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4232 scoped_value_mark.
4233 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4234 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4235 scoped_value_mark.
4236 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4237 gdbscm_wrap and scoped_value_mark.
4238 (gdbscm_value_to_string): Use xfree directly instead of a
4239 cleanup. Move 'buffer' unique_ptr to TRY scope.
4240 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4241 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4242 scoped_value_mark.
4243 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4244 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4245 scoped_value_mark.
4246 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4247 gdbscm_wrap.
4248
4249 2018-07-18 Tom de Vries <tdevries@suse.de>
4250
4251 * findvar.c (default_read_var_value): Also resolve dynamic type for
4252 LOC_OPTIMIZED_OUT vars.
4253
4254 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4255
4256 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4257 decoding.
4258
4259 2018-07-17 Tom Tromey <tom@tromey.com>
4260
4261 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4262 (compute_enum_list, pascm_set_param_value_x)
4263 (gdbscm_parameter_value): Update.
4264 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4265 (gdbscm_scm_to_host_string): Update.
4266 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4267 Update.
4268 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4269 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4270 * guile/scm-string.c (gdbscm_scm_to_string): Return
4271 unique_xmalloc_ptr.
4272 (gdbscm_scm_to_host_string): Likewise.
4273
4274 2018-07-17 Tom Tromey <tom@tromey.com>
4275
4276 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4277 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4278 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4279 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4280 unique_xmalloc_ptr.
4281
4282 2018-07-17 Tom Tromey <tom@tromey.com>
4283
4284 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4285 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4286 Update.
4287 * guile/scm-cmd.c (cmdscm_function): Update.
4288 * guile/scm-pretty-print.c
4289 (ppscm_print_exception_unless_memory_error): Update.
4290 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4291 Return unique_xmalloc_ptr.
4292
4293 2018-07-17 Tom Tromey <tom@tromey.com>
4294
4295 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4296 Use string_printf.
4297
4298 2018-07-17 Jim Wilson <jimw@sifive.com>
4299
4300 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4301 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4302 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4303 unecessary braces after EF_RISCV_RVC test. Delete call to
4304 set_gdbarch_decr_pc_after_break.
4305
4306 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4307 RISCV_LAST_FP_REGNUM + 1.
4308 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4309
4310 2018-07-17 Tom Tromey <tom@tromey.com>
4311
4312 * configure.ac: Remove --disable-gdbcli.
4313 * configure: Rebuild.
4314 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4315 (SUBDIR_CLI_CFLAGS): Remove.
4316 (SFILES): Use SUBDIR_CLI_SRCS.
4317 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4318
4319 2018-07-17 Tom Tromey <tom@tromey.com>
4320
4321 PR gdb/18624:
4322 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4323
4324 2018-07-16 Jim Wilson <jimw@sifive.com>
4325
4326 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4327
4328 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4329
4330 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4331 variable.
4332 (libunwind_frame_sniffer): Likewise.
4333 (libunwind_frame_prev_register): Likewise.
4334 (libunwind_sigtramp_frame_sniffer): Likewise.
4335 * ia64-tdep.c (ia64_access_reg): Likewise.
4336 (ia64_access_rse_reg): Likewise.
4337 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4338 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4339
4340 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4341
4342 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4343
4344 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4345
4346 * remote-sim.c (gdbsim_target::close,
4347 gdbsim_target::mourn_inferior): Remove unused variables.
4348
4349 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4350
4351 * ia64-tdep.c (ktab_buf): New global.
4352 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4353 (get_kernel_table): Adjust.
4354
4355 2018-07-16 Tom Tromey <tom@tromey.com>
4356
4357 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4358 * dwarf2read.c (using_directives, new_symbol): Use
4359 outermost_context_p.
4360 * dbxread.c (process_one_symbol): Use outermost_context_p.
4361 * coffread.c (coff_symtab_read): Use outermost_context_p.
4362
4363 2018-07-16 Tom Tromey <tom@tromey.com>
4364
4365 * dwarf2read.c (using_directives, read_func_scope)
4366 (read_lexical_block_scope): Update.
4367 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4368 * buildsym.h (local_using_directives, global_using_directives):
4369 Don't declare.
4370 (get_local_using_directives, set_local_using_directives)
4371 (get_global_using_directives): Declare.
4372 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4373 m_global_using_directives>: New members.
4374 (finish_block_internal, prepare_for_building)
4375 (reset_symtab_globals, end_symtab_get_static_block)
4376 (push_context): Update.
4377 (get_local_using_directives, set_local_using_directives)
4378 (get_global_using_directives): New functions.
4379 (buildsym_init): Update.
4380
4381 2018-07-16 Tom Tromey <tom@tromey.com>
4382
4383 * xcoffread.c (xcoff_initial_scan): Don't call
4384 free_pending_blocks.
4385 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4386 * buildsym.h (class scoped_free_pendings): Add constructor.
4387 (free_pending_blocks): Don't declare.
4388 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4389 (free_pending_blocks): Now static.
4390
4391 2018-07-16 Tom Tromey <tom@tromey.com>
4392
4393 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4394 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4395 member.
4396 (struct subfile_stack): Remove.
4397 (subfile_stack): Remove.
4398 (push_subfile, pop_subfile, buildsym_init): Update.
4399
4400 2018-07-16 Tom Tromey <tom@tromey.com>
4401
4402 * buildsym.c (push_subfile): Use gdb_assert.
4403 (pop_subfile): Use gdb_assert.
4404
4405 2018-07-16 Tom Tromey <tom@tromey.com>
4406
4407 * buildsym.h (merge_symbol_lists): Remove.
4408 * buildsym.c (merge_symbol_lists): Remove.
4409
4410 2018-07-16 Tom Tromey <tom@tromey.com>
4411
4412 * stabsread.c (scan_file_globals): Update comment.
4413 * stabsread.h (scan_file_globals): Move from buildsym.h.
4414 * buildsym.h (scan_file_globals): Move to stabsread.h.
4415
4416 2018-07-16 Tom Tromey <tom@tromey.com>
4417
4418 * xcoffread.c (xcoff_new_init): Update.
4419 * mipsread.c (mipscoff_new_init): Update.
4420 * mdebugread.c (mdebug_build_psymtabs): Update.
4421 * elfread.c (elf_new_init): Update.
4422 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4423 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4424 * buildsym.h (buildsym_new_init): Don't declare.
4425 * buildsym.c (buildsym_new_init): Remove.
4426
4427 2018-07-16 Tom Tromey <tom@tromey.com>
4428
4429 * stabsread.h (within_function): Move from buildsym.h.
4430 * stabsread.c (start_stabs): Clear within_function.
4431 * coffread.c (coff_start_symtab): Clear within_function.
4432 * buildsym.h (within_function): Move to stabsread.h.
4433 * buildsym.c (prepare_for_building): Update.
4434
4435 2018-07-16 Tom Tromey <tom@tromey.com>
4436
4437 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4438 * dwarf2read.c (dwarf2_start_symtab): Don't set
4439 processing_gcc_compilation.
4440 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4441
4442 2018-07-16 Tom Tromey <tom@tromey.com>
4443
4444 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4445 (next_symbol_text_func): Move from buildsym.h.
4446 * stabsread.c (hashname): Move from buildsym.c.
4447 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4448 (next_symbol_text_func, hashname): Move to stabsread.h.
4449 * buildsym.c: Don't include bcache.h
4450 (hashname): Move to stasbread.c.
4451
4452 2018-07-16 Tom Tromey <tom@tromey.com>
4453
4454 * buildsym.h (context_stack_size): Don't declare.
4455 * buildsym.c (context_stack_size): New global.
4456
4457 2018-07-16 Tom Tromey <tom@tromey.com>
4458
4459 * dbxread.c (processing_acc_compilation): New global.
4460 * buildsym.h (processing_acc_compilation): Don't declare.
4461
4462 2018-07-16 Tom Tromey <tom@tromey.com>
4463
4464 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4465 * dbxread.c (read_ofile_symtab): Update.
4466 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4467 * buildsym.h (last_source_start_addr): Remove.
4468 (set_last_source_start_addr, get_last_source_start_addr):
4469 Declare.
4470 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4471 parameter.
4472 (struct buildsym_compunit) <m_last_source_start_addr>: New
4473 member.
4474 (prepare_for_building): Remove start_addr parameter.
4475 (start_symtab, restart_symtab, end_symtab_get_static_block)
4476 (end_symtab_with_blockvector): Update.
4477 (set_last_source_start_addr, get_last_source_start_addr): New
4478 functions.
4479
4480 2018-07-16 Tom Tromey <tom@tromey.com>
4481
4482 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4483 member.
4484 (have_line_numbers): Remove.
4485 (record_line, prepare_for_building, end_symtab_get_static_block)
4486 (augment_type_symtab): Update.
4487
4488 2018-07-16 Tom Tromey <tom@tromey.com>
4489
4490 * buildsym.c (~buildsym_compunit): Free the macro table.
4491 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4492 methods.
4493 <m_pending_macros>: New member.
4494 (pending_macros): Remove.
4495 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4496 (reset_symtab_globals, end_symtab_get_static_block)
4497 (end_symtab_with_blockvector, augment_type_symtab)
4498 (buildsym_init): Update.
4499
4500 2018-07-16 Tom Tromey <tom@tromey.com>
4501
4502 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4503 parameter.
4504 (buildsym_compunit::set_last_source_file): New method.
4505 <m_last_source_file>: New member.
4506 (prepare_for_building): Remove "name" parameter.
4507 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4508 (last_source_file): Remove.
4509 (set_last_source_file, get_last_source_file): Update.
4510
4511 2018-07-16 Tom Tromey <tom@tromey.com>
4512
4513 * buildsym.c (prepare_for_building): Add assert.
4514
4515 2018-07-16 Tom Tromey <tom@tromey.com>
4516
4517 * buildsym.c (~buildsym_compunit): Update.
4518 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4519 (start_subfile, patch_subfile_names)
4520 (end_symtab_with_blockvector): Update.
4521
4522 2018-07-16 Tom Tromey <tom@tromey.com>
4523
4524 * buildsym.c (struct buildsym_compunit): Add constructor,
4525 destructor, initializers.
4526 (start_buildsym_compunit): Remove.
4527 (free_buildsym_compunit): Use "delete".
4528 (start_symtab, restart_symtab): Use "new".
4529
4530 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4531
4532 * symfile.c (set_objfile_default_section_offset): Remove struct
4533 keyword.
4534
4535 2018-07-14 Stafford Horne <shorne@gmail.com>
4536
4537 * (Responsible Maintainers): Add myself as or1k maintainer.
4538
4539 2018-07-13 Tom Tromey <tom@tromey.com>
4540
4541 * symfile.c (set_objfile_default_section_offset): Use extra braces
4542 around initializer.
4543
4544 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4545
4546 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4547 non-branching basr.
4548
4549 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4550
4551 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4552 unittests/cli-utils-selftests.c
4553 * unittests/cli-utils-selftests.c: New file.
4554
4555 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4556
4557 * NEWS: Mention new commands. Mention change to 'thread apply'.
4558
4559 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4560
4561 * thread.c (thr_try_catch_cmd): New function.
4562 (thread_apply_all_command): Handle qcs flags.
4563 (thread_apply_command): Handle qcs flags.
4564 (taas_command): New function.
4565 (tfaas_command): New function.
4566 (_initialize_thread): Update to setup the new commands 'taas
4567 and 'tfaas'. Change doc string for 'thread apply'.
4568
4569 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4570
4571 * stack.c: (trailing_outermost_frame): New function, mostly
4572 extracted from backtrace_command_1.
4573 (leading_innermost_frame): New function.
4574 (backtrace_command_1): Update to call trailing_outermost_frame.
4575 (frame_apply_command_count): New function.
4576 (frame_apply_level_command): New function.
4577 (frame_apply_all_command): New function.
4578 (frame_apply_command): New function.
4579 (faas_command): New function.
4580 (frame_cmd_list): New variable.
4581 (_initialize_stack): Update to setup the new commands 'frame apply'
4582 and 'faas'.
4583
4584 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4585
4586 * cli-utils.c (number_or_range_parser::get_number): Only handle
4587 numbers or convenience var as numbers.
4588 (parse_flags): New function.
4589 (parse_flags_qcs): New function.
4590 (number_or_range_parser::finished): Ensure parsing end is detected
4591 before end of string.
4592 * cli-utils.h (parse_flags): New function.
4593 (parse_flags_qcs): New function.
4594 (number_or_range_parser): Remove m_finished bool.
4595 (number_or_range_parser::skip_range): Set m_in_range to false.
4596
4597 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4598
4599 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4600 on Windows.
4601
4602 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4603 Jan Kratochvil <jan.kratochvil@redhat.com>
4604 Paul Fertser <fercerpav@gmail.com>
4605 Tsutomu Seki <sekiriki@gmail.com>
4606 Pedro Alves <palves@redhat.com>
4607
4608 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4609 'unittests/parse-connection-spec-selftests.c'.
4610 (COMMON_SFILES): Add 'common/netstuff.c'.
4611 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4612 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4613 * common/netstuff.c: New file.
4614 * common/netstuff.h: New file.
4615 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4616 (wait_for_connect): Update comment. New parameter
4617 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4618 Use 'sock' directly instead of 'scb->fd'.
4619 (try_connect): New function, with code from 'net_open'.
4620 (net_open): Rewrite main loop to deal with multiple
4621 sockets/addresses. Handle IPv6-style hostnames; implement
4622 support for IPv6 connections.
4623 * unittests/parse-connection-spec-selftests.c: New file.
4624
4625 2018-07-11 Pedro Alves <palves@redhat.com>
4626
4627 PR gdb/23377
4628 * remote.c (remote_target::remote_detach_pid): Call
4629 set_current_process.
4630
4631 2018-07-11 Pedro Alves <palves@redhat.com>
4632
4633 * h8300-tdep.c (h8300_gdbarch_init): Remove
4634 set_gdbarch_ecoff_reg_to_regnum calls.
4635
4636 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4637
4638 PR c++/23373
4639 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4640 offsets/sizes for static members of a class/struct.
4641
4642 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4643
4644 * target-descriptions.c (tdesc_register_bitsize): Rename.
4645 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4646 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4647 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4648
4649 2018-07-10 Tom Tromey <tom@tromey.com>
4650
4651 * breakpoint.c (moribund_locations): Now static and a
4652 std::vector.
4653 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4654 (build_bpstat_chain, update_global_location_list)
4655 (breakpoint_retire_moribund): Update.
4656 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4657 VEC.
4658
4659 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4660
4661 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4662 (riscv_register_reggroup_p): Use new function, remove unneeded
4663 parenthesis.
4664 (riscv_push_dummy_call): Extend assert to compare against xlen or
4665 flen based on register type.
4666
4667 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4668
4669 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4670
4671 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4672
4673 * remote.c (show_hardware_watchpoint_limit): New function.
4674 (show_hardware_watchpoint_length_limit): New function.
4675 (show_hardware_breakpoint_limit): New function.
4676 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4677 where appropriate, update help text.
4678
4679 2018-07-09 Tom Tromey <tom@tromey.com>
4680
4681 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4682 (CLIBS): Don't mention NAT_CLIBS.
4683
4684 2018-07-09 Tom Tromey <tom@tromey.com>
4685
4686 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4687 (LIBGDB_OBS, clean mostlyclean): Update.
4688 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4689
4690 2018-07-09 Tom Tromey <tom@tromey.com>
4691
4692 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4693 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4694 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4695
4696 2018-07-09 Tom Tromey <tom@tromey.com>
4697
4698 * Makefile.in (ALLDEPFILES): Remove exec.c.
4699 (COMMON_OBS): Remove exec.o.
4700 (COMMON_SFILES): Add exec.c.
4701
4702 2018-07-09 Tom Tromey <tom@tromey.com>
4703
4704 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4705
4706 2018-07-09 Tom Tromey <tom@tromey.com>
4707
4708 * Makefile.in (clean mostlyclean): Remove stamp-version.
4709 (version.c): Depend on stamp-version.
4710 (stamp-version): New rule, from version.c rule.
4711
4712 2018-07-09 Tom Tromey <tom@tromey.com>
4713
4714 * Makefile.in (init.c): Depend on stamp-init.
4715 (stamp-init): New rule, from init.c rule.
4716 (clean mostlyclean): Remove stamp-init.
4717
4718 2018-07-09 Tom Tromey <tom@tromey.com>
4719
4720 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4721 SUBDIR_GCC_COMPILE_SRCS.
4722
4723 2018-07-09 Tom Tromey <tom@tromey.com>
4724
4725 * Makefile.in (init.c): Remove some unused sed rules.
4726
4727 2018-07-09 Tom Tromey <tom@tromey.com>
4728
4729 * Makefile.in (TSOBS): Remove.
4730 (INIT_FILES): Update.
4731 (LIBGDB_OBS): Update.
4732 (COMMON_SFILES): Add inflow.c.
4733 (SFILES): Remove inflow.c.
4734
4735 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4736
4737 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4738
4739 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4740
4741 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4742 get_saveloc_name, is_signal_frame_name, step_name,
4743 init_remote_name, create_addr_space_name,
4744 destroy_addr_space_name, search_unwind_table_name,
4745 find_dyn_list_name): Constify.
4746
4747 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4748
4749 * darwin-nat.c (darwin_pthread_kill): New function.
4750 (darwin_resume_thread): Use darwin_pthread_kill.
4751
4752 2018-07-05 Tom de Vries <tdevries@suse.de>
4753
4754 * macroexp.c (macro_buffer) <operator=>: New member function.
4755
4756 2018-07-04 Tom Tromey <tom@tromey.com>
4757
4758 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4759
4760 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4761
4762 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4763 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4764 * maint.c: Likewise.
4765 * top.c: Likewise.
4766
4767 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4768
4769 * NEWS: Create a new section for the next release branch.
4770 Rename the section of the current branch, now that it has
4771 been cut.
4772
4773 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4774
4775 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4776 * version.in: Bump version to 8.2.50.DATE-git.
4777
4778 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4779 Pedro Alves <palves@redhat.com>
4780
4781 * linux-nat.c (linux_init_ptrace): Rename to ...
4782 (linux_init_ptrace_procfs): ... this. Call
4783 linux_proc_init_warnings.
4784 (linux_nat_target::post_attach)
4785 (linux_nat_target::post_startup_inferior): Adjust.
4786 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4787 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4788
4789 2018-07-04 Tom de Vries <tdevries@suse.de>
4790
4791 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4792 check ...
4793 (read_comp_unit_head): ... here.
4794
4795 2018-07-03 Tom Tromey <tom@tromey.com>
4796
4797 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4798 (stop_tracing, tstatus_command)
4799 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4800 (print_one_static_tracepoint_marker): Update.
4801 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4802 std::vector.
4803 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4804 VEC.
4805 (all_tracepoints, static_tracepoints_here): Return std::vector.
4806
4807 2018-07-03 Tom Tromey <tom@tromey.com>
4808
4809 * common/ptid.c (ptid_equal): Remove.
4810 * common/ptid.h (ptid_equal): Don't declare.
4811 * ada-tasks.c: Update.
4812 * breakpoint.c: Update.
4813 * common/agent.c: Update.
4814 * corelow.c: Update.
4815 * darwin-nat-info.c: Update.
4816 * darwin-nat.c: Update.
4817 * dcache.c: Update.
4818 * dtrace-probe.c: Update.
4819 * dummy-frame.c: Update.
4820 * fbsd-nat.c: Update.
4821 * frame.c: Update.
4822 * gdbthread.h: Update.
4823 * gnu-nat.c: Update.
4824 * go32-nat.c: Update.
4825 * inf-loop.c: Update.
4826 * inf-ptrace.c: Update.
4827 * infcall.c: Update.
4828 * infcmd.c: Update.
4829 * inflow.c: Update.
4830 * infrun.c: Update.
4831 * linux-fork.c: Update.
4832 * linux-nat.c: Update.
4833 * linux-thread-db.c: Update.
4834 * mi/mi-cmd-var.c: Update.
4835 * mi/mi-interp.c: Update.
4836 * mi/mi-main.c: Update.
4837 * nto-procfs.c: Update.
4838 * ppc-linux-tdep.c: Update.
4839 * procfs.c: Update.
4840 * python/py-inferior.c: Update.
4841 * python/py-record-btrace.c: Update.
4842 * python/py-record.c: Update.
4843 * ravenscar-thread.c: Update.
4844 * regcache.c: Update.
4845 * remote-sim.c: Update.
4846 * remote.c: Update.
4847 * sol-thread.c: Update.
4848 * solib.c: Update.
4849 * target.c: Update.
4850 * tui/tui-stack.c: Update.
4851 * varobj.c: Update.
4852 * windows-nat.c: Update.
4853 * windows-tdep.c: Update.
4854
4855 2018-07-03 Tom Tromey <tom@tromey.com>
4856
4857 * common/ptid.c (ptid_match): Remove.
4858 * common/ptid.h (ptid_match): Don't declare.
4859 * fbsd-nat.c: Update.
4860 * infcmd.c: Update.
4861 * infrun.c: Update.
4862 * linux-nat.c: Update.
4863 * record-btrace.c: Update.
4864 * regcache.c: Update.
4865 * remote.c: Update.
4866
4867 2018-07-03 Tom Tromey <tom@tromey.com>
4868
4869 * common/ptid.c (ptid_tid_p): Remove.
4870 * common/ptid.h (ptid_tid_p): Don't declare.
4871 * sol-thread.c: Update.
4872
4873 2018-07-03 Tom Tromey <tom@tromey.com>
4874
4875 * common/ptid.c (ptid_lwp_p): Remove.
4876 * common/ptid.h (ptid_lwp_p): Don't declare.
4877 * fbsd-nat.c: Update.
4878 * linux-nat.c: Update.
4879 * nat/linux-procfs.c: Update.
4880 * nat/x86-linux-dregs.c: Update.
4881 * sol-thread.c: Update.
4882
4883 2018-07-03 Tom Tromey <tom@tromey.com>
4884
4885 * common/ptid.c (ptid_is_pid): Remove.
4886 * common/ptid.h (ptid_is_pid): Don't declare.
4887 * infrun.c: Update.
4888 * linux-nat.c: Update.
4889 * mi/mi-interp.c: Update.
4890 * remote.c: Update.
4891 * thread.c: Update.
4892
4893 2018-07-03 Tom Tromey <tom@tromey.com>
4894
4895 * common/ptid.c (ptid_get_tid): Remove.
4896 * common/ptid.h (ptid_get_tid): Don't declare.
4897 * ada-tasks.c: Update.
4898 * aix-thread.c: Update.
4899 * bsd-uthread.c: Update.
4900 * darwin-nat.c: Update.
4901 * fbsd-nat.c: Update.
4902 * i386-darwin-nat.c: Update.
4903 * infrun.c: Update.
4904 * linux-tdep.c: Update.
4905 * nto-procfs.c: Update.
4906 * ppc-ravenscar-thread.c: Update.
4907 * python/py-infthread.c: Update.
4908 * ravenscar-thread.c: Update.
4909 * sol-thread.c: Update.
4910 * sparc-ravenscar-thread.c: Update.
4911 * windows-nat.c: Update.
4912
4913 2018-07-03 Tom Tromey <tom@tromey.com>
4914
4915 * common/ptid.c (ptid_get_lwp): Remove.
4916 * common/ptid.h (ptid_get_lwp): Don't declare.
4917 * aarch64-linux-nat.c: Update.
4918 * ada-tasks.c: Update.
4919 * aix-thread.c: Update.
4920 * amd64-linux-nat.c: Update.
4921 * arm-linux-nat.c: Update.
4922 * corelow.c: Update.
4923 * fbsd-nat.c: Update.
4924 * fbsd-tdep.c: Update.
4925 * gnu-nat.c: Update.
4926 * i386-cygwin-tdep.c: Update.
4927 * i386-gnu-nat.c: Update.
4928 * i386-linux-nat.c: Update.
4929 * ia64-linux-nat.c: Update.
4930 * inf-ptrace.c: Update.
4931 * infrun.c: Update.
4932 * linux-fork.c: Update.
4933 * linux-nat.c: Update.
4934 * linux-tdep.c: Update.
4935 * linux-thread-db.c: Update.
4936 * mips-linux-nat.c: Update.
4937 * nat/aarch64-linux-hw-point.c: Update.
4938 * nat/aarch64-linux.c: Update.
4939 * nat/linux-btrace.c: Update.
4940 * nat/linux-osdata.c: Update.
4941 * nat/linux-procfs.c: Update.
4942 * nat/x86-linux-dregs.c: Update.
4943 * obsd-nat.c: Update.
4944 * ppc-fbsd-nat.c: Update.
4945 * ppc-linux-nat.c: Update.
4946 * procfs.c: Update.
4947 * python/py-infthread.c: Update.
4948 * ravenscar-thread.c: Update.
4949 * remote.c: Update.
4950 * s390-linux-nat.c: Update.
4951 * sol-thread.c: Update.
4952 * sol2-tdep.c: Update.
4953 * spu-linux-nat.c: Update.
4954 * x86-linux-nat.c: Update.
4955 * xtensa-linux-nat.c: Update.
4956
4957 2018-07-03 Tom Tromey <tom@tromey.com>
4958
4959 * common/ptid.c (ptid_get_pid): Remove.
4960 * common/ptid.h (ptid_get_pid): Don't declare.
4961 * aarch64-linux-nat.c: Update.
4962 * ada-lang.c: Update.
4963 * aix-thread.c: Update.
4964 * alpha-bsd-nat.c: Update.
4965 * amd64-fbsd-nat.c: Update.
4966 * amd64-linux-nat.c: Update.
4967 * arm-linux-nat.c: Update.
4968 * arm-nbsd-nat.c: Update.
4969 * auxv.c: Update.
4970 * break-catch-syscall.c: Update.
4971 * breakpoint.c: Update.
4972 * bsd-uthread.c: Update.
4973 * corelow.c: Update.
4974 * ctf.c: Update.
4975 * darwin-nat.c: Update.
4976 * fbsd-nat.c: Update.
4977 * fbsd-tdep.c: Update.
4978 * gcore.c: Update.
4979 * gnu-nat.c: Update.
4980 * hppa-nbsd-nat.c: Update.
4981 * hppa-obsd-nat.c: Update.
4982 * i386-fbsd-nat.c: Update.
4983 * ia64-linux-nat.c: Update.
4984 * inf-ptrace.c: Update.
4985 * infcmd.c: Update.
4986 * inferior.c: Update.
4987 * inferior.h: Update.
4988 * inflow.c: Update.
4989 * infrun.c: Update.
4990 * linux-fork.c: Update.
4991 * linux-nat.c: Update.
4992 * linux-tdep.c: Update.
4993 * linux-thread-db.c: Update.
4994 * m68k-bsd-nat.c: Update.
4995 * mi/mi-interp.c: Update.
4996 * mi/mi-main.c: Update.
4997 * mips-linux-nat.c: Update.
4998 * mips-nbsd-nat.c: Update.
4999 * mips64-obsd-nat.c: Update.
5000 * nat/aarch64-linux-hw-point.c: Update.
5001 * nat/aarch64-linux.c: Update.
5002 * nat/linux-btrace.c: Update.
5003 * nat/linux-osdata.c: Update.
5004 * nat/linux-procfs.c: Update.
5005 * nat/x86-linux-dregs.c: Update.
5006 * nto-procfs.c: Update.
5007 * obsd-nat.c: Update.
5008 * ppc-linux-nat.c: Update.
5009 * ppc-nbsd-nat.c: Update.
5010 * ppc-obsd-nat.c: Update.
5011 * proc-service.c: Update.
5012 * procfs.c: Update.
5013 * python/py-inferior.c: Update.
5014 * python/py-infthread.c: Update.
5015 * ravenscar-thread.c: Update.
5016 * record.c: Update.
5017 * remote-sim.c: Update.
5018 * remote.c: Update.
5019 * rs6000-nat.c: Update.
5020 * s390-linux-nat.c: Update.
5021 * sh-nbsd-nat.c: Update.
5022 * sol-thread.c: Update.
5023 * sparc-nat.c: Update.
5024 * sparc64-tdep.c: Update.
5025 * spu-linux-nat.c: Update.
5026 * spu-tdep.c: Update.
5027 * target-debug.h: Update.
5028 * target.c: Update.
5029 * thread.c: Update.
5030 * tid-parse.c: Update.
5031 * tracefile-tfile.c: Update.
5032 * vax-bsd-nat.c: Update.
5033 * windows-nat.c: Update.
5034 * x86-linux-nat.c: Update.
5035 * x86-nat.c: Update.
5036
5037 2018-07-03 Tom Tromey <tom@tromey.com>
5038
5039 * common/ptid.c (pid_to_ptid): Remove.
5040 * common/ptid.h (pid_to_ptid): Don't declare.
5041 * aix-thread.c: Update.
5042 * arm-linux-nat.c: Update.
5043 * common/ptid.c: Update.
5044 * common/ptid.h: Update.
5045 * corelow.c: Update.
5046 * ctf.c: Update.
5047 * darwin-nat.c: Update.
5048 * fbsd-nat.c: Update.
5049 * fork-child.c: Update.
5050 * gnu-nat.c: Update.
5051 * go32-nat.c: Update.
5052 * inf-ptrace.c: Update.
5053 * infcmd.c: Update.
5054 * inferior.c: Update.
5055 * infrun.c: Update.
5056 * linux-fork.c: Update.
5057 * linux-nat.c: Update.
5058 * nat/aarch64-linux-hw-point.c: Update.
5059 * nat/fork-inferior.c: Update.
5060 * nat/x86-linux-dregs.c: Update.
5061 * nto-procfs.c: Update.
5062 * obsd-nat.c: Update.
5063 * procfs.c: Update.
5064 * progspace.c: Update.
5065 * remote.c: Update.
5066 * rs6000-nat.c: Update.
5067 * s390-linux-nat.c: Update.
5068 * sol-thread.c: Update.
5069 * spu-linux-nat.c: Update.
5070 * target.c: Update.
5071 * top.c: Update.
5072 * tracefile-tfile.c: Update.
5073 * windows-nat.c: Update.
5074
5075 2018-07-03 Tom Tromey <tom@tromey.com>
5076
5077 * common/ptid.h (ptid_build): Don't declare.
5078 * common/ptid.c (ptid_build): Remove.
5079 * aix-thread.c: Update.
5080 * bsd-kvm.c: Update.
5081 * bsd-uthread.c: Update.
5082 * common/agent.c: Update.
5083 * common/ptid.c: Update.
5084 * common/ptid.h: Update.
5085 * corelow.c: Update.
5086 * darwin-nat.c: Update.
5087 * fbsd-nat.c: Update.
5088 * gnu-nat.c: Update.
5089 * linux-fork.c: Update.
5090 * linux-nat.c: Update.
5091 * linux-thread-db.c: Update.
5092 * nat/linux-osdata.c: Update.
5093 * nat/linux-procfs.c: Update.
5094 * nto-procfs.c: Update.
5095 * obsd-nat.c: Update.
5096 * proc-service.c: Update.
5097 * procfs.c: Update.
5098 * ravenscar-thread.c: Update.
5099 * remote-sim.c: Update.
5100 * remote.c: Update.
5101 * sol-thread.c: Update.
5102 * target.c: Update.
5103 * windows-nat.c: Update.
5104
5105 2018-07-03 Tom Tromey <tom@tromey.com>
5106
5107 * infrun.c (follow_exec): Use exit_inferior_silent.
5108 * inferior.c (exit_inferior_num_silent): Remove.
5109 * inferior.h (exit_inferior_num_silent): Don't declare.
5110
5111 2018-07-03 Tom Tromey <tom@tromey.com>
5112
5113 PR cli/23340:
5114 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5115 inferior_ptid on error.
5116
5117 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5118 Simon Marchi <simon.marchi@polymtl.ca>
5119
5120 PR tdep/8282
5121 * disasm.h (gdb_disassembler): Add
5122 `m_disassembler_options_holder'. member
5123 * disasm.c (get_all_disassembler_options): New function.
5124 (gdb_disassembler::gdb_disassembler): Use it.
5125 (gdb_buffered_insn_length_init_dis): Likewise.
5126 (gdb_buffered_insn_length): Adjust accordingly.
5127 (set_disassembler_options): Handle options with arguments.
5128 (show_disassembler_options_sfunc): Likewise. Add a leading new
5129 line if showing options with descriptions.
5130 (disassembler_options_completer): Adapt to using the
5131 `disasm_options_and_args_t' structure.
5132 * mips-tdep.c (mips_disassembler_options): New variable.
5133 (mips_disassembler_options_o32): Likewise.
5134 (mips_disassembler_options_n32): Likewise.
5135 (mips_disassembler_options_n64): Likewise.
5136 (gdb_print_insn_mips): Don't set `disassembler_options'.
5137 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5138 functions.
5139 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5140 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5141 `gdbarch_disassembler_options_implicit' and
5142 `gdbarch_valid_disassembler_options'.
5143 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5144 `disasm_options_and_args_t' structure.
5145 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5146 method.
5147 (valid_disassembler_options): Switch from `disasm_options_t' to
5148 the `disasm_options_and_args_t' structure.
5149 * NEWS: Document `set disassembler-options' support for the MIPS
5150 target.
5151 * gdbarch.h: Regenerate.
5152 * gdbarch.c: Regenerate.
5153
5154 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5155
5156 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5157
5158 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5159
5160 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5161 parameter in call to amd64_target_description.
5162 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5163 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5164 (amd64fbsd_init_abi): Likewise.
5165 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5166 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5167 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5168 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5169
5170 2018-06-29 Pedro Alves <palves@redhat.com>
5171
5172 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5173 "segments" parameter.
5174 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5175 (_initialize_amd64_tdep): Update call to
5176 amd64_create_target_description.
5177 (amd64_target_description): Add "segments" parameter. Adjust
5178 the implementation to use it.
5179 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5180 call to amd64_create_target_description.
5181 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5182 * gdb/arch/amd64.h (amd64_create_target_description): Add
5183 "segments" register.
5184 * gdb/arch/amd64.c (amd64_create_target_description): Add
5185 "segments" parameter. Call create_feature_i386_64bit_segments
5186 only if SEGMENTS is true.
5187 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5188 call to amd64_create_target_description.
5189
5190 2018-06-29 Pedro Alves <palves@redhat.com>
5191
5192 * thread.c (thread_target_id_str): New, factored out from ...
5193 (print_thread_info_1): ... here. Use it to compute the max
5194 "Target Id" column width.
5195
5196 2018-06-29 Pedro Alves <palves@redhat.com>
5197
5198 * remote.c (remote_target::extra_thread_info): Delete
5199 'display_buf' and 'n' locals. from the cache, regardless of
5200 packet mechanims is in use. Use cache for qThreadExtra and qP
5201 methods too.
5202
5203 2018-06-29 Pedro Alves <palves@redhat.com>
5204
5205 * blockframe.c (find_pc_sect_containing_function): New function.
5206 * breakpoint.c (print_breakpoint_location): Don't call
5207 find_pc_sect_function.
5208 * linespec.c (create_sals_line_offset): Record the location's
5209 symbol in the sal.
5210 * linespec.c (convert_address_location_to_sals): Fill in sal's
5211 symbol with find_pc_sect_containing_function.
5212 * symtab.c (find_function_start_sal): Rename to ...
5213 (find_function_start_sal_1): ... this.
5214 (find_function_start_sal): Reimplement as wrapper around
5215 find_function_start_sal_1, and use
5216 find_pc_sect_containing_function to fill in the sal's symbol.
5217 (find_function_start_sal(symbol*, bool)): Adjust.
5218 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5219 comments.
5220 (find_pc_sect_containing_function): Declare.
5221
5222 2018-06-29 Pedro Alves <palves@redhat.com>
5223
5224 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5225 true if the the location has no symbol.
5226
5227 2018-06-28 Tom Tromey <tom@tromey.com>
5228
5229 * NEWS: Mention --enable-codesign.
5230 * silent-rules.mk (ECHO_SIGN): New variable.
5231 * configure.ac: Add --enable-codesign.
5232 * configure: Rebuild.
5233 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5234 (gdb$(EXEEXT)): Optionally invoke codesign.
5235
5236 2018-06-28 Pedro Alves <palves@redhat.com>
5237
5238 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5239 comments.
5240 (switch_to_thread_no_regs): Adjust comment.
5241 * infcmd.c (stop_pc): Delete.
5242 (post_create_inferior, info_program_command): Replace references
5243 to stop_pc with references to thread_info->suspend.stop_pc.
5244 * inferior.h (stop_pc): Delete declaration.
5245 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5246 (handle_inferior_event_1, handle_signal_stop)
5247 (process_event_stop_test, keep_going_stepped_thread)
5248 (handle_step_into_function, handle_step_into_function_backward)
5249 (print_stop_location): Replace references to stop_pc with
5250 references to thread_info->suspend.stop_pc.
5251 (struct infcall_suspend_state) <stop_pc>: Delete field.
5252 (save_infcall_suspend_state, restore_infcall_suspend_state):
5253 Remove references to inf_stat->stop_pc.
5254 * linux-fork.c (fork_load_infrun_state): Likewise.
5255 * record-btrace.c (record_btrace_set_replay): Likewise.
5256 * record-full.c (record_full_goto_entry): Likewise.
5257 * remote.c (print_one_stopped_thread): Likewise.
5258 * target.c (target_resume): Extend comment.
5259 * thread.c (set_executing_thread): New.
5260 (set_executing): Use it.
5261 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5262 Remove references to stop_pc.
5263
5264 2018-06-28 Pedro Alves <palves@redhat.com>
5265
5266 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5267 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5268
5269 2018-06-28 Tom Tromey <tom@tromey.com>
5270
5271 * coffread.c (coff_symfile_finish): Update.
5272 * xcoffread.c (xcoff_symfile_finish): Update.
5273 * elfread.c (elf_symfile_finish): Update.
5274 * symfile.h (dwarf2_free_objfile): Don't declare.
5275 * dwarf2read.c (_initialize_dwarf2_read): Use
5276 register_objfile_data_with_cleanup.
5277 (dwarf2_free_objfile): Now static. Change signature.
5278
5279 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5280
5281 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5282 option "-o" to add-symbol-file-load to add an offset to each
5283 section's load address.
5284 * symfile.c (set_objfile_default_section_offset): New function.
5285
5286 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5287
5288 * symfile.c (add_symbol_file_command): Make sure that sections
5289 with the same name are sorted in the same order.
5290
5291 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5292
5293 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5294 require the second argument. If omitted, load sections at the
5295 addresses specified in the file.
5296
5297 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5298
5299 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5300 (_initialize_symfile): Add option "-o" to symbol-file to add an
5301 offset to each section of the symbol file.
5302
5303 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5304
5305 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5306
5307 2018-06-27 Tom Tromey <tom@tromey.com>
5308
5309 * stack.c (_initialize_stack): Update "func" help text.
5310
5311 2018-06-27 Tom Tromey <tom@tromey.com>
5312
5313 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5314 std::vector.
5315 (unwind_infopy_str, pyuw_create_unwind_info)
5316 (unwind_infopy_add_saved_register, pyuw_sniffer)
5317 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5318 Update.
5319 (struct saved_reg): Add constructor.
5320 <value>: Now a gdbpy_ref<>.
5321
5322 2018-06-27 Tom Tromey <tom@tromey.com>
5323
5324 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5325
5326 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5327
5328 * gdb-gdb.py.in: Format using autopep8.
5329
5330 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5331
5332 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5333 (type_lookup_function): Recognize CORE_ADDR values.
5334
5335 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5336
5337 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5338 print tag_name.
5339
5340 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5341
5342 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5343 <__lt__>: Add.
5344
5345 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5346
5347 * gdb-gdb.py: Move to...
5348 * gdb-gdb.py.in: ... here.
5349 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5350 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5351 dependencies.
5352 (distclean): Remove gdb-gdb.py when cleaning.
5353 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5354 * configure: Re-generate.
5355
5356 2018-06-27 Pedro Alves <palves@redhat.com>
5357
5358 * proc-service.c (get_ps_regcache): New.
5359 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5360 (ps_lsetfpregs): Use it.
5361
5362 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5363
5364 PR gdb/21695
5365 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5366 (dwarf_decode_lines_1): Adjust.
5367
5368 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5369
5370 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5371 override.
5372 <info_proc>: Likewise.
5373
5374 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5375
5376 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5377 to windows_fetch_one_register, and only handle the case of
5378 fetching one register. Move the code that reloads the context
5379 and iterates over all registers if R is negative to...
5380 (windows_nat_target::fetch_registers): ... here.
5381 (do_windows_store_inferior_registers): Rename to
5382 windows_store_one_register, and only handle the case of storing
5383 one register. Move the code that handles the case where r is
5384 negative to...
5385 (windows_nat_target::store_registers) ... here.
5386
5387 2018-06-26 Tom Tromey <tom@tromey.com>
5388
5389 PR rust/22574:
5390 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5391 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5392 Update.
5393 (rust_internal_print_type): Add podata parameter.
5394 (rust_print_type): Update.
5395
5396 2018-06-26 Tom Tromey <tom@tromey.com>
5397
5398 * typeprint.h (struct print_offset_data) <update, finish,
5399 maybe_print_hole>: New methods.
5400 <indentation>: New constant.
5401 * typeprint.c (print_offset_data::indentation): Define.
5402 (print_offset_data::maybe_print_hole, print_offset_data::update)
5403 (print_offset_data::finish): Move from c-typeprint.c and rename.
5404 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5405 (print_spaces_filtered_with_print_options): Update.
5406 (c_print_type_union_field_offset, maybe_print_hole)
5407 (c_print_type_struct_field_offset): Move to typeprint.c and
5408 rename.
5409 (c_type_print_base_struct_union): Update.
5410
5411 2018-06-25 Pedro Alves <palves@redhat.com>
5412
5413 * gdbthread.h (thread_info_ref, delete_thread)
5414 (delete_thread_silent, first_thread_of_inferior)
5415 (any_thread_of_inferior, switch_to_thread)
5416 (enable_thread_stack_temporaries)
5417 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5418 (get_last_thread_stack_temporary)
5419 (value_in_thread_stack_temporaries, can_access_registers_thread):
5420 Spell out "struct thread_info" instead of just "thread_info".
5421 * inferior.h (notice_new_inferior): Likewise.
5422
5423 2018-06-25 Pedro Alves <palves@redhat.com>
5424
5425 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5426 pass thread_info pointer to delete_thread.
5427 (windows_nat_target::detach): Pass inferior pointer to
5428 detach_inferior.
5429 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5430 delete_thread.
5431 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5432 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5433 and pass a thread_info pointer to delete_thread.
5434 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5435 pass thread_info pointer to delete_thread.
5436 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5437 delete_thread_silent call.
5438 * procfs.c (procfs_target::detach): Pass inferior pointer to
5439 detach_inferior.
5440 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5441 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5442 delete_thread_silent call.
5443 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5444 pass thread_info pointer to delete_thread.
5445 (windows_nat_target::detach): Pass inferior pointer to
5446 delete_inferior.
5447
5448 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5449
5450 * regcache.c (readable_regcache::read_part): Fix asserts.
5451 (reg_buffer::raw_collect_part): New function.
5452 (regcache::write_part): Fix asserts.
5453 (reg_buffer::raw_supply_part): New function.
5454 (regcache::transfer_regset_register): New helper function.
5455 (regcache::transfer_regset): Call new functions.
5456 (regcache_supply_regset): Use gdb_byte*.
5457 (regcache::supply_regset): Likewise.
5458 (regcache_collect_regset): Likewise.
5459 (regcache::collect_regset): Likewise.
5460 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5461 (reg_buffer::raw_supply_part): Likewise.
5462 (regcache::transfer_regset_register): Likewise.
5463 (regcache::transfer_regset): Use gdb_byte*.
5464
5465 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5466
5467 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5468
5469 2018-06-21 Pedro Alves <palves@redhat.com>
5470
5471 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5472 instead of a ptid_t. All callers adjusted.
5473 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5474 adjusted.
5475 (print_ada_task_info, display_current_task_id, task_command_1):
5476 Adjust.
5477 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5478 inferior_thread.
5479 (breakpoint_kind): Adjust.
5480 (remove_breakpoints_pid): Rename to ...
5481 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5482 pointer. All callers adjusted.
5483 (bpstat_clear_actions): Use inferior_thread.
5484 (get_bpstat_thread): New.
5485 (bpstat_do_actions): Use it.
5486 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5487 to take a thread_info pointer. All callers adjusted.
5488 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5489 (breakpoint_re_set_thread): Use inferior_thread.
5490 * breakpoint.h (struct inferior): Forward declare.
5491 (bpstat_stop_status): Update.
5492 (remove_breakpoints_pid): Delete.
5493 (remove_breakpoints_inf): New.
5494 * bsd-uthread.c (bsd_uthread_target::wait)
5495 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5496 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5497 (maint_btrace_packet_history_cmd)
5498 (maint_btrace_clear_packet_history_cmd): Adjust.
5499 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5500 inferior_thread.
5501 * cli/cli-interp.c: Include "inferior.h".
5502 * common/refcounted-object.h (struct
5503 refcounted_object_ref_policy): New.
5504 * compile/compile-object-load.c: Include gdbthread.h.
5505 (store_regs): Use inferior_thread.
5506 * corelow.c (core_target::close): Use current_inferior.
5507 (core_target_open): Adjust to use first_thread_of_inferior and use
5508 the current inferior.
5509 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5510 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5511 <thread>: ... this new field. All references adjusted.
5512 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5513 Take a thread_info pointer instead of a ptid_t.
5514 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5515 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5516 thread_info pointer instead of a ptid_t.
5517 * elfread.c: Include "inferior.h".
5518 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5519 Use inferior_thread.
5520 * eval.c (evaluate_subexp): Likewise.
5521 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5522 inferior_thread.
5523 * gdb_proc_service.h (struct thread_info): Forward declare.
5524 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5525 <thread>: ... this new field. All references adjusted.
5526 * gdbarch.h, gdbarch.c: Regenerate.
5527 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5528 'thread' parameter. All implementations and callers adjusted.
5529 * gdbthread.h (thread_info) <set_running>: New method.
5530 (delete_thread, delete_thread_silent): Take a thread_info pointer
5531 instead of a ptid.
5532 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5533 (first_thread_of_process): Delete, replaced by ...
5534 (first_thread_of_inferior): ... this new function. All callers
5535 adjusted.
5536 (any_live_thread_of_process): Delete, replaced by ...
5537 (any_live_thread_of_inferior): ... this new function. All callers
5538 adjusted.
5539 (switch_to_thread, switch_to_no_thread): Declare.
5540 (is_executing): Delete.
5541 (enable_thread_stack_temporaries): Update comment.
5542 <enable_thread_stack_temporaries>: Take a thread_info pointer
5543 instead of a ptid_t. Incref the thread.
5544 <~enable_thread_stack_temporaries>: Decref the thread.
5545 <m_ptid>: Delete
5546 <m_thr>: New.
5547 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5548 (get_last_thread_stack_temporary)
5549 (value_in_thread_stack_temporaries, can_access_registers_thread):
5550 Take a thread_info pointer instead of a ptid_t. All callers
5551 adjusted.
5552 * infcall.c (get_call_return_value): Use inferior_thread.
5553 (run_inferior_call): Work with thread pointers instead of ptid_t.
5554 (call_function_by_hand_dummy): Work with thread pointers instead
5555 of ptid_t. Use thread_info_ref.
5556 * infcmd.c (proceed_thread_callback): Access thread's state
5557 directly.
5558 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5559 access thread's state directly.
5560 (continue_command): Use inferior_thread.
5561 (info_program_command): Use find_thread_ptid and access thread
5562 state directly.
5563 (proceed_after_attach_callback): Use thread state directly.
5564 (notice_new_inferior): Take a thread_info pointer instead of a
5565 ptid_t. All callers adjusted.
5566 (exit_inferior): Take an inferior pointer instead of a pid. All
5567 callers adjusted.
5568 (exit_inferior_silent): New.
5569 (detach_inferior): Delete.
5570 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5571 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5572 (detach_inferior_command, kill_inferior_command): Use
5573 find_inferior_id instead of valid_gdb_inferior_id and
5574 gdb_inferior_id_to_pid.
5575 (inferior_command): Use inferior and thread pointers.
5576 * inferior.h (struct thread_info): Forward declare.
5577 (notice_new_inferior): Take a thread_info pointer instead of a
5578 ptid_t. All callers adjusted.
5579 (detach_inferior): Delete declaration.
5580 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5581 instead of a pid. All callers adjusted.
5582 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5583 (valid_gdb_inferior_id): Delete.
5584 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5585 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5586 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5587 ...
5588 <inf>: ... this new field.
5589 <step_ptid>: Delete, replaced by ...
5590 <step_thread>: ... this new field.
5591 (get_displaced_stepping_state): Take an inferior pointer instead
5592 of a pid. All callers adjusted.
5593 (displaced_step_in_progress_any_inferior): Adjust.
5594 (displaced_step_in_progress_thread): Take a thread pointer instead
5595 of a ptid_t. All callers adjusted.
5596 (displaced_step_in_progress, add_displaced_stepping_state): Take
5597 an inferior pointer instead of a pid. All callers adjusted.
5598 (get_displaced_step_closure_by_addr): Adjust.
5599 (remove_displaced_stepping_state): Take an inferior pointer
5600 instead of a pid. All callers adjusted.
5601 (displaced_step_prepare_throw, displaced_step_prepare)
5602 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5603 All callers adjusted.
5604 (start_step_over): Adjust.
5605 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5606 displaced step queue.
5607 (do_target_resume): Adjust.
5608 (fetch_inferior_event): Use inferior_thread.
5609 (context_switch, get_inferior_stop_soon): Take an
5610 execution_control_state pointer instead of a ptid_t. All callers
5611 adjusted.
5612 (switch_to_thread_cleanup): Delete.
5613 (stop_all_threads): Use scoped_restore_current_thread.
5614 * inline-frame.c: Include "gdbthread.h".
5615 (inline_state) <inline_state>: Take a thread pointer instead of a
5616 ptid_t. All callers adjusted.
5617 <ptid>: Delete, replaced by ...
5618 <thread>: ... this new field.
5619 (find_inline_frame_state): Take a thread pointer instead of a
5620 ptid_t. All callers adjusted.
5621 (skip_inline_frames, step_into_inline_frame)
5622 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5623 pointer instead of a ptid_t. All callers adjusted.
5624 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5625 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5626 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5627 pointers directly.
5628 * linux-nat.c (get_detach_signal): Likewise.
5629 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5630 (thread_db_notice_clone): Adjust.
5631 (thread_db_find_new_threads_silently)
5632 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5633 a thread pointer instead of a ptid_t. All callers adjusted.
5634 * mi/mi-cmd-var.c: Include "inferior.h".
5635 (mi_cmd_var_update_iter): Update to use thread pointers.
5636 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5637 inferior directly.
5638 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5639 out to ...
5640 (mi_output_running): ... this new function.
5641 (mi_on_resume_1): Adjust to use it.
5642 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5643 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5644 directly.
5645 (interrupt_thread_callback): : Adjust to use thread and inferior
5646 pointers.
5647 * proc-service.c: Include "gdbthread.h".
5648 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5649 * progspace-and-thread.c: Include "inferior.h".
5650 * progspace.c: Include "inferior.h".
5651 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5652 hold a reference to an inferior_object.
5653 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5654 inferior_thread.
5655 * python/py-inferior.c (struct inferior_object): Give the type a
5656 tag name instead of a typedef.
5657 (python_on_normal_stop): No need to check if the current thread is
5658 listed.
5659 (inferior_to_inferior_object): Change return type to
5660 inferior_object. All callers adjusted.
5661 (find_thread_object): Delete, bits factored out to ...
5662 (thread_to_thread_object): ... this new function.
5663 * python/py-infthread.c (create_thread_object): Use
5664 inferior_to_inferior_object.
5665 (thpy_is_stopped): Use thread pointer directly.
5666 (gdbpy_selected_thread): Use inferior_thread.
5667 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5668 field, replaced with ...
5669 <thread>: ... this new field. All users adjusted.
5670 (btpy_insn_or_gap_new): Drop const.
5671 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5672 callers adjusted.
5673 * python/py-record.c: Include "gdbthread.h".
5674 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5675 a ptid_t. All callers adjusted.
5676 (gdbpy_current_recording): Use inferior_thread.
5677 * python/py-record.h (recpy_record_object) <ptid>: Delete
5678 field, replaced with ...
5679 <thread>: ... this new field. All users adjusted.
5680 (recpy_element_object) <ptid>: Delete
5681 field, replaced with ...
5682 <thread>: ... this new field. All users adjusted.
5683 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5684 a ptid_t. All callers adjusted.
5685 * python/py-threadevent.c: Include "gdbthread.h".
5686 (get_event_thread): Use thread_to_thread_object.
5687 * python/python-internal.h (struct inferior_object): Forward
5688 declare.
5689 (find_thread_object, find_inferior_object): Delete declarations.
5690 (thread_to_thread_object, inferior_to_inferior_object): New
5691 declarations.
5692 * record-btrace.c: Include "inferior.h".
5693 (require_btrace_thread): Use inferior_thread.
5694 (record_btrace_frame_sniffer)
5695 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5696 (get_thread_current_frame): Use scoped_restore_current_thread and
5697 switch_to_thread.
5698 (get_thread_current_frame): Use thread pointer directly.
5699 (record_btrace_replay_at_breakpoint): Use thread's inferior
5700 pointer directly.
5701 * record-full.c: Include "inferior.h".
5702 * regcache.c: Include "gdbthread.h".
5703 (get_thread_arch_regcache): Use the inferior's address space
5704 directly.
5705 (get_thread_regcache, registers_changed_thread): New.
5706 * regcache.h (get_thread_regcache(thread_info *thread)): New
5707 overload.
5708 (registers_changed_thread): New.
5709 (remote_target) <remote_detach_1>: Swap order of parameters.
5710 (remote_add_thread): <remote_add_thread>: Return the new thread.
5711 (get_remote_thread_info(ptid_t)): New overload.
5712 (remote_target::remote_notice_new_inferior): Use thread pointers
5713 directly.
5714 (remote_target::process_initial_stop_replies): Use
5715 thread_info::set_running.
5716 (remote_target::remote_detach_1, remote_target::detach)
5717 (extended_remote_target::detach): Adjust.
5718 * stack.c (frame_show_address): Use inferior_thread.
5719 * target-debug.h (target_debug_print_thread_info_pp): New.
5720 * target-delegates.c: Regenerate.
5721 * target.c (default_thread_address_space): Delete.
5722 (memory_xfer_partial_1): Use current_inferior.
5723 (target_detach): Use current_inferior.
5724 (target_thread_address_space): Delete.
5725 (generic_mourn_inferior): Use current_inferior.
5726 * target.h (struct target_ops) <thread_address_space>: Delete.
5727 (target_thread_address_space): Delete.
5728 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5729 pointers directly.
5730 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5731 thread pointer instead of a ptid_t. Adjust all callers.
5732 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5733 (first_thread_of_process): Delete, replaced by ...
5734 (first_thread_of_inferior): ... this new function. All callers
5735 adjusted.
5736 (any_thread_of_process): Rename to ...
5737 (any_thread_of_inferior): ... this, and take an inferior pointer.
5738 (any_live_thread_of_process): Rename to ...
5739 (any_live_thread_of_inferior): ... this, and take an inferior
5740 pointer.
5741 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5742 (value_in_thread_stack_temporaries)
5743 (get_last_thread_stack_temporary): Take a thread pointer instead
5744 of a ptid_t. Adjust all callers.
5745 (thread_info::set_running): New.
5746 (validate_registers_access): Use inferior_thread.
5747 (can_access_registers_ptid): Rename to ...
5748 (can_access_registers_thread): ... this, and take a thread
5749 pointer.
5750 (print_thread_info_1): Adjust to compare thread pointers instead
5751 of ptids.
5752 (switch_to_no_thread, switch_to_thread): Make extern.
5753 (scoped_restore_current_thread::~scoped_restore_current_thread):
5754 Use m_thread pointer directly.
5755 (scoped_restore_current_thread::scoped_restore_current_thread):
5756 Use inferior_thread.
5757 (thread_command): Use thread pointer directly.
5758 (thread_num_make_value_helper): Use inferior_thread.
5759 * top.c (execute_command): Use inferior_thread.
5760 * tui/tui-interp.c: Include "inferior.h".
5761 * varobj.c (varobj_create): Use inferior_thread.
5762 (value_of_root_1): Use find_thread_global_id instead of
5763 global_thread_id_to_ptid.
5764
5765 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5766
5767 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5768 possible.
5769 (regcache::write_part): Likewise.
5770 (readable_regcache::cooked_read_part): Update comment.
5771 (readable_regcache::cooked_write_part): Likewise.
5772 * regcache.h: (readable_regcache::read_part): Likewise.
5773 (regcache::write_part): Likewise.
5774
5775 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5776 Dirk Schubert <dirk.schubert@arm.com>
5777
5778 * aarch64-linux-nat.c (post_attach): New.
5779 (aarch64_linux_nat_target::post_attach): Override post_attach to
5780 record the number of hardware debug registers.
5781
5782 2018-06-20 Tom Tromey <tom@tromey.com>
5783
5784 * python/py-param.c (add_setshow_generic): Make parameters const.
5785 (parmpy_init): Update.
5786
5787 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5788
5789 * regcache.h (regcache_cooked_read_ftype): Rename to...
5790 (register_read_ftype): ...this, change type to function_view.
5791 (class reg_buffer) <save>: Remove src parameter.
5792 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5793 parameter non-const in first overload. Remove src parameter in
5794 second overload.
5795 * regcache.c (do_cooked_read): Remove.
5796 (readonly_detached_regcache::readonly_detached_regcache): Make
5797 parameter non-const, adjust call to other constructor.
5798 (reg_buffer::save): Remove src parameter.
5799 * frame.c (do_frame_register_read): Remove.
5800 (frame_save_as_regcache): Use lambda function.
5801 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5802 parameter to ppu2spu_data *.
5803 (ppu2spu_sniffer): Use lambda function.
5804
5805 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5806
5807 * record-full.c (record_full_target::insert_breakpoint): Remove
5808 "struct" keyword, add const.
5809
5810 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5811
5812 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5813 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5814 * configure.ac: Remove AC_PREREQ, add missing quoting.
5815 * gnulib/configure.ac: Modernize usage of
5816 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5817 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5818 (AUTOMAKE_VERSION): Bump to 1.15.1.
5819 * configure: Re-generate.
5820 * config.in: Re-generate.
5821 * aclocal.m4: Re-generate.
5822 * gnulib/aclocal.m4: Re-generate.
5823 * gnulib/config.in: Re-generate.
5824 * gnulib/configure: Re-generate.
5825 * gnulib/import/Makefile.in: Re-generate.
5826
5827 2018-06-19 Pedro Alves <palves@redhat.com>
5828
5829 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5830 (lookup_minimal_symbol_by_pc_section): ... here with
5831 gdb_assert_not_reached added.
5832
5833 2018-06-19 Pedro Alves <palves@redhat.com>
5834
5835 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5836 parameter with a block parameter. Compare location's block symbol
5837 with the frame's block instead of addresses.
5838 (skip_inline_frames): Pass the current block instead of the
5839 frame's address. Break out as soon as we determine the frame
5840 should not be skipped.
5841
5842 2018-06-18 Tom Tromey <tom@tromey.com>
5843
5844 * solib-aix.c (solib_aix_get_section_offsets): Return
5845 unique_xmalloc_ptr.
5846 (solib_aix_solib_create_inferior_hook): Update.
5847
5848 2018-06-18 Tom Tromey <tom@tromey.com>
5849
5850 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5851
5852 2018-06-18 Tom Tromey <tom@tromey.com>
5853
5854 * solib-frv.c (frv_relocate_main_executable): Use
5855 unique_xmalloc_ptr.
5856 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5857 unique_xmalloc_ptr.
5858
5859 2018-06-18 Tom Tromey <tom@tromey.com>
5860
5861 * objfiles.h (inhibit_section_map_updates): Update.
5862 (resume_section_map_updates, resume_section_map_updates_cleanup):
5863 Remove.
5864 * solib-svr4.c (svr4_handle_solib_event): Update.
5865 * objfiles.c (inhibit_section_map_updates): Return
5866 scoped_restore_tmpl<int>.
5867 (resume_section_map_updates, resume_section_map_updates_cleanup):
5868 Remove.
5869
5870 2018-06-18 Tom Tromey <tom@tromey.com>
5871
5872 * valprint.h (read_string): Update.
5873 * valprint.c (read_string): Change type of "buffer".
5874 (val_print_string): Update.
5875 * python/py-value.c (valpy_string): Update.
5876 * language.h (struct language_defn) <la_get_string>: Change
5877 type of "buffer".
5878 (default_get_string, c_get_string): Update.
5879 * language.c (default_get_string): Change type of "buffer".
5880 * guile/scm-value.c (gdbscm_value_to_string): Update.
5881 * c-lang.c (c_get_string): Change type of "buffer".
5882
5883 2018-06-18 Tom Tromey <tom@tromey.com>
5884
5885 * ser-mingw.c (struct pipe_state_destroyer): New.
5886 (pipe_state_up): New typedef.
5887 (cleanup_pipe_state): Remove.
5888 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5889
5890 2018-06-18 Tom Tromey <tom@tromey.com>
5891
5892 * rust-lang.h (rust_yyerror): Don't declare.
5893 * rust-lang.c (rust_language_defn): Update.
5894 * rust-exp.y (yyerror): Now static.
5895 * parse.c (parse_exp_in_context_1): Update.
5896 * p-lang.h (p_yyerror): Don't declare.
5897 * p-lang.c (p_language_defn): Update.
5898 * p-exp.y (yyerror): Now static.
5899 * opencl-lang.c (opencl_language_defn): Update.
5900 * objc-lang.c (objc_language_defn): Update.
5901 * m2-lang.h (m2_yyerror): Don't declare.
5902 * m2-lang.c (m2_language_defn): Update.
5903 * m2-exp.y (yyerror): Now static.
5904 * language.h (struct language_defn) <la_error>: Remove.
5905 * language.c (unk_lang_error): Remove.
5906 (unknown_language_defn, auto_language_defn): Remove.
5907 * go-lang.h (go_yyerror): Don't declare.
5908 * go-lang.c (go_language_defn): Update.
5909 * go-exp.y (yyerror): Now static.
5910 * f-lang.h (f_yyerror): Don't declare.
5911 * f-lang.c (f_language_defn): Update.
5912 * f-exp.y (yyerror): Now static.
5913 * d-lang.h (d_yyerror): Don't declare.
5914 * d-lang.c (d_language_defn): Update.
5915 * d-exp.y (yyerror): Now static.
5916 * c-lang.h (c_yyerror): Don't declare.
5917 * c-lang.c (c_language_defn, cplus_language_defn)
5918 (asm_language_defn, minimal_language_defn): Update.
5919 * c-exp.y (yyerror): Now static.
5920 * ada-lang.h (ada_yyerror): Don't declare.
5921 * ada-lang.c (ada_language_defn): Update.
5922 * ada-exp.y (yyerror): Now static.
5923
5924 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5925
5926 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5927 (store_sveregs_to_thread): Likewise.
5928 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5929 (aarch64_linux_store_inferior_registers): Likewise.
5930 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5931 function.
5932 (aarch64_sve_regs_copy_to_regcache): Likewise.
5933 (aarch64_sve_regs_copy_from_regcache): Likewise.
5934 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5935 declaration.
5936 (aarch64_sve_regs_copy_to_regcache): Likewise.
5937 (aarch64_sve_regs_copy_from_regcache): Likewise.
5938 (sve_context): Structure from Linux headers.
5939 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5940 (SVE_SIG_ZREG_SIZE): Likewise.
5941 (SVE_SIG_PREG_SIZE): Likewise.
5942 (SVE_SIG_FFR_SIZE): Likewise.
5943 (SVE_SIG_REGS_OFFSET): Likewise.
5944 (SVE_SIG_ZREGS_OFFSET): Likewise.
5945 (SVE_SIG_ZREG_OFFSET): Likewise.
5946 (SVE_SIG_ZREGS_SIZE): Likewise.
5947 (SVE_SIG_PREGS_OFFSET): Likewise.
5948 (SVE_SIG_PREG_OFFSET): Likewise.
5949 (SVE_SIG_PREGS_SIZE): Likewise.
5950 (SVE_SIG_FFR_OFFSET): Likewise.
5951 (SVE_SIG_REGS_SIZE): Likewise.
5952 (SVE_SIG_CONTEXT_SIZE): Likewise.
5953 (SVE_PT_REGS_MASK): Likewise.
5954 (SVE_PT_REGS_FPSIMD): Likewise.
5955 (SVE_PT_REGS_SVE): Likewise.
5956 (SVE_PT_VL_INHERIT): Likewise.
5957 (SVE_PT_VL_ONEXEC): Likewise.
5958 (SVE_PT_REGS_OFFSET): Likewise.
5959 (SVE_PT_FPSIMD_OFFSET): Likewise.
5960 (SVE_PT_FPSIMD_SIZE): Likewise.
5961 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5962 (SVE_PT_SVE_PREG_SIZE): Likewise.
5963 (SVE_PT_SVE_FFR_SIZE): Likewise.
5964 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5965 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5966 (__SVE_SIG_TO_PT): Likewise.
5967 (SVE_PT_SVE_OFFSET): Likewise.
5968 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5969 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5970 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5971 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5972 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5973 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5974 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5975 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5976 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5977 (SVE_PT_SVE_SIZE): Likewise.
5978 (SVE_PT_SIZE): Likewise.
5979 (HAS_SVE_STATE): New define.
5980
5981 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5982
5983 * nat/aarch64-sve-linux-sigcontext.h: New file.
5984 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5985 new files.
5986 (SVE_VQ_MIN): Likewise.
5987 (SVE_VQ_MAX): Likewise.
5988 (SVE_VL_MIN): Likewise.
5989 (SVE_VL_MAX): Likewise.
5990 (SVE_NUM_ZREGS): Likewise.
5991 (SVE_NUM_PREGS): Likewise.
5992 (sve_vl_valid): Likewise.
5993 (struct user_sve_header): Likewise.
5994
5995 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
5996 Richard Bunt <Richard.Bunt@arm.com>
5997
5998 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5999 was requested by GDB.
6000
6001 2018-06-15 Tom de Vries <tdevries@suse.de>
6002
6003 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6004
6005 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6006
6007 * gnulib/update-gnulib.sh: Print expected versions of
6008 autoconf/aclocal.
6009
6010 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6011
6012 * arch-utils.c (default_type_align): Use type_length_units.
6013 * gdbtypes.c (type_align): Use type_length_units.
6014
6015 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6016
6017 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6018 of 'define' command.
6019
6020 2018-06-14 Tom de Vries <tdevries@suse.de>
6021
6022 PR cli/22573
6023 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6024 get_no_prettyformat_print_options.
6025
6026 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6027
6028 * sparc-nat.h: Include target.h.
6029 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6030 <fetch_registers>: Remove this argument in function call.
6031 <store_registers>: Remove this argument in function call, remove
6032 extra semicolon.
6033 <low_forget_process>: Call sparc64_forget_process instead of
6034 sparc_forget_process.
6035
6036 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6037
6038 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6039 (procfs_target::make_corefile_notes): Adjust to new
6040 target_read_alloc return type.
6041
6042 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6043 Stephen Roberts <stephen.roberts@arm.com>
6044
6045 PR gdb/22882
6046 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6047 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6048 Move should_notify_stop local into more inner scope.
6049
6050 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6051 Stephen Roberts <stephen.roberts@arm.com>
6052
6053 PR gdb/22882
6054 * infrun.c (resume_1): Add call to mark_async_event_handler.
6055
6056 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6057
6058 * infrun.c (do_target_wait): Change old version of $pc printed.
6059
6060 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6061
6062 * dwarf2read.c (read_index_from_section): Rename to...
6063 (read_gdb_index_from_section): ... this, update all callers.
6064 (dwarf2_read_index): Rename to...
6065 (dwarf2_read_gdb_index): ... this, update all callers.
6066
6067 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6068
6069 * gdb/hppa-linux-nat.c
6070 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6071 hppa_linux_nat_target::fetch_registers.
6072
6073 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6074
6075 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6076 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6077 (AARCH64_DWARF_SVE_FFR): Likewise.
6078 (AARCH64_DWARF_SVE_P0): Likewise.
6079 (AARCH64_DWARF_SVE_Z0): Likewise.
6080
6081 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6082
6083 * common/common-regcache.h (raw_compare): New function.
6084 * regcache.c (regcache::raw_compare): Likewise.
6085 * regcache.h (regcache::raw_compare): New declaration.
6086
6087 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6088
6089 * common/common-regcache.h (reg_buffer_common): New structure.
6090 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6091 (reg_buffer::raw_supply): Likewise.
6092 (reg_buffer::raw_supply_integer): Likewise.
6093 (reg_buffer::raw_supply_zeroed): Likewise.
6094 (reg_buffer::raw_collect): Likewise.
6095 (reg_buffer::raw_collect_integer): Likewise.
6096 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6097 (reg_buffer::raw_supply): Likewise.
6098 (reg_buffer::raw_supply_integer): Likewise.
6099 (reg_buffer::raw_supply_zeroed): Likewise.
6100 (reg_buffer::raw_collect): Likewise.
6101 (reg_buffer::raw_collect_integer): Likewise.
6102
6103 2018-06-10 Tom Tromey <tom@tromey.com>
6104
6105 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6106 (class remote_state) <stop_reply_queue>: Now std::vector.
6107 (remote_state::~remote_state)
6108 (remote_target::stop_reply_queue_length): Update.
6109 (struct queue_iter_param, remove_child_of_pending_fork)
6110 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6111 (check_pending_event_prevents_wildcard_vcont_callback)
6112 (remove_stop_reply_for_inferior)
6113 (remove_stop_reply_of_remote_state)
6114 (remote_notif_remove_once_on_match)
6115 (stop_reply_match_ptid_and_ws)
6116 (remote_kill_child_of_pending_fork): Remove.
6117 (remote_target::remove_new_fork_children)
6118 (remote_target::check_pending_events_prevent_wildcard_vcont)
6119 (remote_target::discard_pending_stop_replies)
6120 (remote_target::discard_pending_stop_replies_in_queue)
6121 (remote_target::remote_notif_remove_queued_reply)
6122 (remote_target::queued_stop_reply)
6123 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6124 (remote_target::wait, remote_target::kill_new_fork_children)
6125 (remote_target::async): Update.
6126
6127 2018-06-10 Tom Tromey <tom@tromey.com>
6128
6129 * record-full.c (record_full_arch_list_cleanups): Remove.
6130 (record_full_message): Use try/catch.
6131 (record_full_wait_cleanups): Remove.
6132 (record_full_wait_1): Use try/catch.
6133 (record_full_restore): Likewise.
6134
6135 2018-06-10 Tom Tromey <tom@tromey.com>
6136
6137 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6138 declare VEC. Add constructor.
6139 <in_target_beneath>: Now bool.
6140 (record_full_breakpoints): Now a std::vector, static.
6141 (record_full_sync_record_breakpoints)
6142 (record_full_init_record_breakpoints)
6143 (record_full_target::insert_breakpoint)
6144 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6145
6146 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6147
6148 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6149 * serial.c (serial_interface_lookup): Remove struct keyword.
6150
6151 2018-06-10 Tom Tromey <tom@tromey.com>
6152
6153 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6154 method.
6155 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6156 a method.
6157 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6158 method.
6159 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6160 "beneath" as a method.
6161 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6162 Use "beneath" as a method.
6163
6164 2018-06-10 Tom Tromey <tom@tromey.com>
6165
6166 * tracefile.c (struct trace_file_writer_deleter): New.
6167 <operator()>: Rename from trace_file_writer_xfree.
6168 (trace_file_writer_up): New typedef.
6169 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6170
6171 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6172
6173 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6174 <m_registers, m_register_status>: Change type to
6175 std::unique_ptr.
6176 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6177 XCNEWVEC.
6178
6179 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6180
6181 * common/common-regcache.h (enum register_status): Add
6182 underlying type "signed char".
6183 * regcache.h (reg_buffer) <m_register_status>: Change type to
6184 register_status *.
6185 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6186 register_status instead of signed char.
6187 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6188 (reg_buffer::get_register_status): Remove cast.
6189 (readable_regcache::raw_read): Remove cast.
6190 (readable_regcache::cooked_read): Remove cast.
6191
6192 2018-06-09 Tom Tromey <tom@tromey.com>
6193
6194 * source.c (reverse_search_command, forward_search_command): Use
6195 scoped_fd.
6196
6197 2018-06-09 Tom Tromey <tom@tromey.com>
6198
6199 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6200 (serial_ops_list): Now static, std::vector.
6201 (serial_interface_lookup, serial_add_interface): Update.
6202
6203 2018-06-09 Tom Tromey <tom@tromey.com>
6204
6205 * dwarf2read.c (process_cu_includes): Update.
6206 (process_full_comp_unit): Update.
6207 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6208 std::vector.
6209
6210 2018-06-08 Paul Koning <paul_koning@dell.com>
6211
6212 PR gdb/23252
6213
6214 * python/python.c (do_start_initialization):
6215 Avoid call to internal Python API.
6216 (init__gdb_module): New function.
6217
6218 2018-06-08 Gary Benson <gbenson@redhat.com>
6219
6220 * linux-thread-db.c (valprint.h): New include.
6221 (struct check_thread_db_info): New structure.
6222 (check_thread_db_on_load, tdb_testinfo): New static globals.
6223 (check_thread_db, check_thread_db_callback): New functions.
6224 (try_thread_db_load_1): Run integrity checks if requested.
6225 (maintenance_check_libthread_db): New function.
6226 (_initialize_thread_db): Register "maint check libthread-db"
6227 and "maint set/show check-libthread-db".
6228 * NEWS: Mention the above new commands.
6229
6230 2018-06-08 Tom Tromey <tom@tromey.com>
6231
6232 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6233 now a method.
6234
6235 2018-06-08 Tom Tromey <tom@tromey.com>
6236
6237 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6238
6239 2018-06-08 Tom Tromey <tom@tromey.com>
6240
6241 * common/btrace-common.h (struct btrace_data): Add constructor,
6242 destructor, move assignment operator.
6243 <empty, clear, fini>: New methods.
6244 <format>: Initialize.
6245 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6246 (btrace_data_empty): Don't declare.
6247 * common/btrace-common.c (btrace_data_init): Remove.
6248 (btrace_data::fini): Rename from btrace_data_fini.
6249 (btrace_data::empty): Rename from btrace_data_empty.
6250 (btrace_data::clear): Rename from btrace_data_clear. Return
6251 bool.
6252 * btrace.h (make_cleanup_btrace_data): Don't declare.
6253 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6254 (parse_xml_btrace): Update.
6255 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6256 (maint_btrace_clear_packet_history_cmd): Update.
6257
6258 2018-06-07 Pedro Alves <palves@redhat.com>
6259
6260 * target.h (target_ops) <beneath>: Now a method. All references
6261 updated.
6262 (class target_stack): New.
6263 * target.c (g_target_stack): New.
6264 (g_current_top_target): Delete.
6265 (current_top_target): Get the top target out of g_target_stack.
6266 (target_stack::push, target_stack::unpush): New.
6267 (push_target, unpush_target): Reimplement.
6268 (target_is_pushed): Reimplement in terms of g_target_stack.
6269 (target_ops::beneath, target_stack::find_beneath): New.
6270
6271 2018-06-07 Pedro Alves <palves@redhat.com>
6272
6273 * target.h (find_target_beneath): Delete declaration.
6274 * target.c (find_target_beneath): Delete definition.
6275 * aix-thread.c: All callers of find_target_beneath adjusted to
6276 call target_ops::beneath instead.
6277 * bsd-uthread.c: Likewise.
6278 * linux-thread-db.c: Likewise.
6279 * ravenscar-thread.c: Likewise.
6280 * sol-thread.c: Likewise.
6281 * spu-multiarch.c: Likewise.
6282
6283 2018-06-07 Pedro Alves <palves@redhat.com>
6284
6285 * target.h (target_ops) <beneath>: Now a method. All references
6286 updated.
6287 (target_ops) <m_beneath>: New.
6288 * target.c (target_ops::beneath): New.
6289 * corelow.c: Adjust all references to target_ops::beneath.
6290 * linux-thread-db.c: Likewise.
6291 * make-target-delegates: Likewise.
6292 * record-btrace.c: Likewise.
6293 * record-full.c: Likewise.
6294 * remote.c: Likewise.
6295 * target.c: Likewise.
6296 * target-delegates.c: Regenerate.
6297
6298 2018-06-07 Pedro Alves <palves@redhat.com>
6299
6300 * target.h (target_stack): Delete.
6301 (current_top_target): Declare function.
6302 * target.c (target_stack): Delete.
6303 (g_current_top_target): New.
6304 (current_top_target): New function.
6305 * auxv.c: Use current_top_target instead of target_stack
6306 throughout.
6307 * avr-tdep.c: Likewise.
6308 * breakpoint.c: Likewise.
6309 * corefile.c: Likewise.
6310 * elfread.c: Likewise.
6311 * eval.c: Likewise.
6312 * exceptions.c: Likewise.
6313 * frame.c: Likewise.
6314 * gdbarch-selftests.c: Likewise.
6315 * gnu-v3-abi.c: Likewise.
6316 * ia64-tdep.c: Likewise.
6317 * ia64-vms-tdep.c: Likewise.
6318 * infcall.c: Likewise.
6319 * infcmd.c: Likewise.
6320 * infrun.c: Likewise.
6321 * linespec.c: Likewise.
6322 * linux-tdep.c: Likewise.
6323 * minsyms.c: Likewise.
6324 * ppc-linux-nat.c: Likewise.
6325 * ppc-linux-tdep.c: Likewise.
6326 * procfs.c: Likewise.
6327 * regcache.c: Likewise.
6328 * remote.c: Likewise.
6329 * rs6000-tdep.c: Likewise.
6330 * s390-linux-nat.c: Likewise.
6331 * s390-tdep.c: Likewise.
6332 * solib-aix.c: Likewise.
6333 * solib-darwin.c: Likewise.
6334 * solib-dsbt.c: Likewise.
6335 * solib-spu.c: Likewise.
6336 * solib-svr4.c: Likewise.
6337 * solib-target.c: Likewise.
6338 * sparc-tdep.c: Likewise.
6339 * sparc64-tdep.c: Likewise.
6340 * spu-tdep.c: Likewise.
6341 * symfile.c: Likewise.
6342 * symtab.c: Likewise.
6343 * target-descriptions.c: Likewise.
6344 * target-memory.c: Likewise.
6345 * target.c: Likewise.
6346 * target.h: Likewise.
6347 * tracefile-tfile.c: Likewise.
6348 * tracepoint.c: Likewise.
6349 * valops.c: Likewise.
6350 * valprint.c: Likewise.
6351 * value.c: Likewise.
6352 * windows-tdep.c: Likewise.
6353 * mi/mi-main.c: Likewise.
6354
6355 2018-06-07 Tom Tromey <tom@tromey.com>
6356
6357 * valprint.h (build_address_symbolic): Declare.
6358 * printcmd.c (print_address_symbolic): Update.
6359 (build_address_symbolic): Change "name" and "filename" to
6360 std::string.
6361 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6362 Update.
6363 * defs.h (build_address_symbolic): Remove declaration.
6364
6365 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6366
6367 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6368 (aarch64_vnv_type): Add function.
6369 (aarch64_pseudo_register_name): Add V regs for SVE.
6370 (aarch64_pseudo_register_type): Likewise.
6371 (aarch64_pseudo_register_reggroup_p): Likewise.
6372 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6373 (aarch64_pseudo_read_value): Add V regs for SVE.
6374 (aarch64_pseudo_write_2): Use V0 offset for SVE
6375 (aarch64_pseudo_write): Add V regs for SVE.
6376 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6377
6378 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6379
6380 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6381 (sve_vl_from_vq): Likewise.
6382
6383 2018-06-05 Tom Tromey <tom@tromey.com>
6384
6385 * cli/cli-cmds.c (show_version): Update.
6386 * top.c (print_gdb_version): Add "interactive" parameter.
6387 Update.
6388 * main.c (captured_main_1): Update.
6389 * top.h (print_gdb_version): Add "interactive" parameter and a
6390 comment.
6391
6392 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6393
6394 * common/enum-flags.h: Add trailing semicolon to example in
6395 comment.
6396
6397 2018-06-05 Tom Tromey <tom@tromey.com>
6398
6399 PR cli/12326:
6400 * NEWS: Add entry about pager.
6401 * utils.c (pagination_disabled_for_command): New global.
6402 (prompt_for_continue): Allow "c" response to prompt.
6403 (reinitialize_more_filter): Clear
6404 pagination_disabled_for_command.
6405 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6406
6407 2018-06-04 Tom Tromey <tom@tromey.com>
6408
6409 * ada-lang.h (ada_lookup_symbol_list): Update.
6410 * ada-lang.c (resolve_subexp): Update.
6411 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6412 parameter.
6413 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6414 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6415 results parameter to std::vector.
6416 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6417 Update.
6418 * ada-exp.y (block_lookup): Update.
6419 (select_possible_type_sym): Change type of syms. Remove nsyms
6420 parameter.
6421 (write_var_or_type, write_name_assoc): Update.
6422
6423 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6424
6425 * windows-nat.c (windows_nat_target::xfer_partial): Return
6426 TARGET_XFER_E_IO if we need to delegate to the target beneath
6427 but BENEATH is NULL.
6428
6429 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6430
6431 * Makefile.in (config.status): Add configure.nat as a
6432 dependency.
6433
6434 2018-06-04 Tom Tromey <tom@tromey.com>
6435
6436 * cp-name-parser.y (cpname_state): Add method declarations.
6437 (HANDLE_QUAL): Update.
6438 (cpname_state::d_grab, cpname_state::fill_comp)
6439 (cpname_state::make_operator, cpname_state::make_dtor)
6440 (cpname_state::make_builtin_type, cpname_state::make_name)
6441 (cpname_state::d_qualify, cpname_state::d_int_type)
6442 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6443 (%union): Move earlier.
6444
6445 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6446
6447 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6448
6449 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6450
6451 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6452 (aarch64_pseudo_write_1): Likewise.
6453 (aarch64_pseudo_read_value): Use helper.
6454 (aarch64_pseudo_write): Likewise.
6455
6456 2018-06-04 Pedro Alves <palves@redhat.com>
6457
6458 * darwin-nat.c (darwin_ops): Delete.
6459 (darwin_attach_pid): Use get_native_target.
6460
6461 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6462
6463 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6464 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6465
6466 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6467
6468 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6469 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6470 (aarch64_gdbarch_init): Check for SVE.
6471 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6472
6473 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6474
6475 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6476 * aarch64-tdep.h (aarch64_read_description): Likewise.
6477 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6478 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6479 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6480 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6481 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6482
6483 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6484
6485 * value.c (value_fetch_lazy_bitfield): New.
6486 (value_fetch_lazy_memory): New.
6487 (value_fetch_lazy_register): New.
6488 (value_fetch_lazy): Factor out to smaller functions.
6489
6490 2018-06-01 Tom Tromey <tom@tromey.com>
6491
6492 * cp-name-parser.y (backslashable, represented): Now const.
6493
6494 2018-06-01 Tom Tromey <tom@tromey.com>
6495
6496 * cp-name-parser.y: Include parser-defs.h.
6497 (parser_fprintf): Remove declaration.
6498
6499 2018-06-01 Tom Tromey <tom@tromey.com>
6500
6501 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6502 %parse-param.
6503 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6504 (global_result): Remove globals.
6505 (struct cpname_state): New.
6506 (yyparse): Don't declare.
6507 (yylex, yyerror): Move declarations after %union.
6508 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6509 (make_name): Add state parameter.
6510 Update all callers.
6511 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6512 parameter.
6513 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6514 Update.
6515 (yylex): Add lvalp, state parameters.
6516 (yyerror): Add state parameter.
6517 (cp_demangled_name_to_comp): Update.
6518
6519 2018-06-01 Tom Tromey <tom@tromey.com>
6520
6521 * cp-name-parser.y (parser_fprintf): Declare.
6522 (GDB_YY_REMAP_PREFIX): Define.
6523 Include yy-remap.h. Don't redefine yy* identifiers.
6524
6525 2018-06-01 Tom Tromey <tom@tromey.com>
6526
6527 * python/py-type.c (typy_legacy_template_argument): Update.
6528 * cp-support.h (cp_demangled_name_to_comp): Update.
6529 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6530 parameter to be a "std::string *".
6531 (main): Update.
6532
6533 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6534
6535 * ada-lex.l: Include "diagnostics.h" instead of
6536 "common/diagnostics.h".
6537 * unittests/environ-selftests.c: Likewise.
6538 * common/diagnostics.h: Moved to ../include.
6539
6540 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6541
6542 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6543 to language_mode_manual while calling breakpoint_re_set_one.
6544
6545 2018-06-01 Tom Tromey <tom@tromey.com>
6546
6547 * valops.c (value_cast_structs, destructor_name_p): Update.
6548 * symtab.c (gdb_mangle_name): Update.
6549 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6550 Update.
6551 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6552 (pascal_object_print_value_fields, pascal_object_print_value):
6553 Update.
6554 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6555 * linespec.c (find_methods): Update.
6556 * gdbtypes.h (type_name_no_tag): Remove.
6557 (type_name_or_error): Rename from type_name_no_tag_or_error.
6558 * gdbtypes.c (type_name_no_tag): Remove.
6559 (type_name_or_error): Rename from type_name_no_tag_or_error.
6560 (lookup_struct_elt_type, check_typedef): Update.
6561 * expprint.c (print_subexp_standard): Update.
6562 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6563 * d-namespace.c (d_lookup_nested_symbol): Update.
6564 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6565 (cp_print_class_member): Update.
6566 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6567 * completer.c (add_struct_fields): Update.
6568 * c-typeprint.c (cp_type_print_derivation_info)
6569 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6570 Update.
6571 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6572 (ada_prefer_type, ada_is_exception_sym): Update.
6573
6574 2018-06-01 Tom Tromey <tom@tromey.com>
6575
6576 * valops.c (enum_constant_from_type, value_namespace_elt)
6577 (value_maybe_namespace_elt): Update.
6578 * valarith.c (find_size_for_pointer_math): Update.
6579 * target-descriptions.c (make_gdb_type): Update.
6580 * symmisc.c (print_symbol): Update.
6581 * stabsread.c (define_symbol, read_type)
6582 (complain_about_struct_wipeout, add_undefined_type)
6583 (cleanup_undefined_types_1): Update.
6584 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6585 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6586 (rust_internal_print_type, rust_composite_type)
6587 (rust_evaluate_funcall, rust_evaluate_subexp)
6588 (rust_inclusive_range_type_p): Update.
6589 * python/py-type.c (typy_get_tag): Update.
6590 * p-typeprint.c (pascal_type_print_base): Update.
6591 * mdebugread.c (parse_symbol, parse_type): Update.
6592 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6593 Update.
6594 * guile/scm-type.c (gdbscm_type_tag): Update.
6595 * go-lang.c (sixg_string_p): Update.
6596 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6597 Update.
6598 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6599 (TYPE_TAG_NAME): Remove.
6600 * gdbtypes.c (type_name_no_tag): Simplify.
6601 (check_typedef, check_types_equal, recursive_dump_type)
6602 (copy_type_recursive, arch_composite_type): Update.
6603 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6604 in summary mode when needed.
6605 * eval.c (evaluate_funcall): Update.
6606 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6607 (process_structure_scope, read_enumeration_type)
6608 (read_namespace_type, read_module_type, determine_prefix): Update.
6609 * cp-support.c (inspect_type): Update.
6610 * coffread.c (process_coff_symbol, decode_base_type): Update.
6611 * c-varobj.c (c_is_path_expr_parent): Update.
6612 * c-typeprint.c (c_type_print_base_struct_union): Update.
6613 (c_type_print_base_1): Update. Print struct/class/union/enum in
6614 summary when using C language.
6615 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6616 (gen_maybe_namespace_elt): Update.
6617 * ada-lang.c (ada_type_name): Simplify.
6618 (empty_record, ada_template_to_fixed_record_type_1)
6619 (template_to_static_fixed_type)
6620 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6621
6622 2018-06-01 Tom Tromey <tom@tromey.com>
6623
6624 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6625 c_print_type.
6626 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6627 (c_print_type): Update.
6628 (c_print_type): New overload.
6629 (c_type_print_varspec_prefix, c_type_print_args)
6630 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6631 (c_type_print_base_struct_union, c_type_print_base_1)
6632 (cp_type_print_method_args): Add "language" parameter.
6633 (c_type_print_base): Update.
6634 * c-lang.h (c_print_type): Add new overload.
6635
6636 2018-06-01 Tom Tromey <tom@tromey.com>
6637
6638 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6639 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6640
6641 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6642
6643 * aarch64-tdep.c (aarch64_sve_register_names): New const
6644 var.
6645 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6646 (AARCH64_SVE_Z_REGS_NUM): New define.
6647 (AARCH64_SVE_P_REGS_NUM): Likewise.
6648 (AARCH64_SVE_NUM_REGS): Likewise.
6649
6650 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6651
6652 * nat/linux-ptrace.h [__alpha__]
6653 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6654 definitions.
6655
6656 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6657
6658 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6659 the endianness selected.
6660 * NEWS: Document `set endian auto' mode operation update.
6661
6662 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6663
6664 * Makefile.in: Add new header.
6665 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6666 (sve_vl_from_vg): Likewise.
6667 (sve_vq_from_vl): Likewise.
6668 (sve_vl_from_vq): Likewise.
6669 (sve_vq_from_vg): Likewise.
6670 (sve_vg_from_vq): Likewise.
6671 * configure.nat: Add new c file.
6672 * nat/aarch64-sve-linux-ptrace.c: New file.
6673 * nat/aarch64-sve-linux-ptrace.h: New file.
6674
6675 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6676
6677 * aarch64-linux-nat.c (aarch64_linux_read_description):
6678 Add parmeter zero.
6679 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6680 Likewise.
6681 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6682 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6683 (aarch64_gdbarch_init): Add parmeter zero.
6684 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6685 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6686 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6687 parmeter.
6688 * doc/gdb.texinfo: Describe SVE feature
6689 * features/aarch64-sve.c: New file.
6690
6691 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6692
6693 PR gdb/23210
6694 * gdbarch.sh (significant_addr_bit): Default to zero when
6695 not set by target architecture.
6696 * gdbarch.c: Re-generated.
6697 * utils.c (address_significant): Update.
6698
6699 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6700
6701 * stack.c (func_command): Remove trailing newline in call to error.
6702
6703 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6704
6705 * regcache.h (regcache_raw_collect): Remove, update callers to
6706 use regcache::raw_collect.
6707 * regcache.c (regcache_raw_collect): Remove.
6708
6709 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6710
6711 * regcache.h (regcache_raw_supply): Remove, update callers to
6712 use detached_regcache::raw_supply.
6713 * regcache.c (regcache_raw_supply): Remove.
6714
6715 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6716
6717 * regcache.h (regcache_cooked_write_part): Remove, update
6718 callers to use regcache::cooked_write_part.
6719 * regcache.c (regcache_cooked_write_part): Remove.
6720
6721 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6722
6723 * regcache.h (regcache_cooked_read_part): Remove, update callers
6724 to use readable_regcache::cooked_read_part.
6725 * regcache.c (regcache_cooked_read_part): Remove.
6726
6727 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6728
6729 * regcache.h (regcache_cooked_read_value): Remove, update
6730 callers to use readable_regcache::cooked_read_value.
6731 * regcache.c (regcache_cooked_read_value): Remove.
6732
6733 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6734
6735 * regcache.h (regcache_cooked_write): Remove, update callers to
6736 use regcache::cooked_write.
6737 * regcache.c (regcache_cooked_write): Remove.
6738
6739 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6740
6741 * regcache.h (regcache_invalidate): Remove, update callers to
6742 use detached_regcache::invalidate instead.
6743 * regcache.c (regcache_invalidate): Remove.
6744
6745 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6746
6747 * regcache.h (regcache_raw_write_part): Remove, update callers
6748 to use regcache::raw_write_part instead.
6749 * regcache.c (regcache_raw_write_part): Remove.
6750
6751 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6752
6753 * regcache.h (regcache_raw_read_part): Remove, update callers to
6754 use readable_regcache::raw_read_part instead.
6755 * regcache.c (regcache_raw_read_part): Remove.
6756
6757 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6758
6759 * regcache.h (regcache_cooked_read): Remove, update callers to
6760 use readable_regcache::cooked_read instead.
6761 * regcache.c (regcache_cooked_read): Remove.
6762
6763 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6764
6765 * regcache.h (regcache_raw_write): Remove, update callers to use
6766 regcache::raw_write instead.
6767 * regcache.c (regcache_raw_write): Remove.
6768
6769 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6770
6771 * regcache.h (regcache_raw_read): Remove, update callers to use
6772 readable_regcache::raw_read instead.
6773 * regcache.c (regcache_raw_read): Remove.
6774
6775 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6776
6777 * regcache.h (regcache_raw_update): Remove, update callers to
6778 use readable_regcache::raw_update instead.
6779 * regcache.c (regcache_raw_update): Remove.
6780
6781 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6782
6783 * regcache.h (regcache_register_status): Remove, update callers
6784 to use reg_buffer::get_register_status directly instead.
6785 * regcache.c (regcache_register_status): Remove.
6786
6787 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6788
6789 * regcache.h (regcache_get_ptid): Remove, update all callers to
6790 call regcache::ptid instead.
6791 * regcache.c (regcache_get_ptid): Remove.
6792
6793 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6794
6795 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6796
6797 2018-05-30 Pedro Alves <palves@redhat.com>
6798
6799 * common/common-exceptions.h (exception_rethrow): Use
6800 ATTRIBUTE_NORETURN.
6801
6802 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6803
6804 * breakpoint.c (print_solib_event, check_status_catch_solib):
6805 Remove struct keyword in range-based for loops.
6806 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6807 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6808 Likewise.
6809 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6810 Likewise.
6811 * symfile.c (addr_info_make_relative): Likewise.
6812 * thread.c (value_in_thread_stack_temporaries): Likewise.
6813
6814 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6815
6816 PR gdb/16841
6817 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6818 aggregate type to get its real type before accessing it.
6819
6820 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6821
6822 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6823 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6824 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6825 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6826 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6827 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6828 * printcmd.c (info_address_command): Likewise.
6829
6830 2018-05-29 Tom Tromey <tom@tromey.com>
6831
6832 * windows-nat.c (handle_exception): Update fall-through comment.
6833
6834 2018-05-29 Tom Tromey <tom@tromey.com>
6835
6836 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6837 (struct program_space) <added_solibs>: Now a std::vector.
6838 * breakpoint.c (print_solib_event): Update.
6839 (check_status_catch_solib): Update.
6840 * progspace.c (clear_program_space_solib_cache): Update.
6841 * solib.c (update_solib_list): Update.
6842
6843 2018-05-29 Tom Tromey <tom@tromey.com>
6844
6845 * python/py-type.c (typy_richcompare): Update.
6846 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6847 * gdbtypes.h (types_deeply_equal): Return bool.
6848 (types_equal): Likewise.
6849 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6850 declare VEC.
6851 (check_types_equal): Change worklist to std::vector. Return
6852 bool.
6853 (struct type_equality_entry): Add constructor.
6854 (compare_maybe_null_strings): Return bool.
6855 (check_types_worklist): Return bool. Change worklist to
6856 std::vector.
6857 (types_deeply_equal): Use std::vector.
6858 (types_equal): Return bool.
6859 (compare_maybe_null_strings): Simplify.
6860
6861 2018-05-29 Tom Tromey <tom@tromey.com>
6862
6863 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6864
6865 2018-05-29 Tom Tromey <tom@tromey.com>
6866
6867 * objc-lang.h: Don't include cp-support.h.
6868 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6869 declare VEC.
6870
6871 2018-05-27 Tom Tromey <tom@tromey.com>
6872
6873 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6874
6875 2018-05-25 Tom Tromey <tom@tromey.com>
6876
6877 * value.c (value::location): Initialize.
6878
6879 2018-05-25 Tom Tromey <tom@tromey.com>
6880
6881 * dbxread.c (init_bincl_list): Remove.
6882 (bincl_list): Now a std::vector.
6883 (bincls_allocated, next_bincl): Remove.
6884 (free_bincl_list, do_free_bincl_list_cleanup)
6885 (make_cleanup_free_bincl_list): Remove.
6886 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6887 unique_xmalloc_ptr.
6888 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6889 (struct header_file_location): Add constructor.
6890 (add_bincl_to_list): Remove.
6891
6892 2018-05-25 Tom Tromey <tom@tromey.com>
6893
6894 * tui/tui.c (tui_enable): Update.
6895 * mi/mi-interp.c (mi_interp::init): Update.
6896 * interps.h (class interp) <name>: New method.
6897 <m_name>: Rename from name.
6898 (~scoped_restore_interp): Update.
6899 * interps.c (interp::interp): Update.
6900 (interp_add, interp_set, interp_lookup_existing)
6901 (current_interp_named_p): Update.
6902
6903 2018-05-25 Tom Tromey <tom@tromey.com>
6904
6905 * interps.c (interp_name): Remove.
6906 * mi/mi-interp.c (mi_interp::init): Update.
6907 * interps.h (interp_name): Remove.
6908 (~scoped_restore_interp): Update.
6909 * tui/tui.c (tui_enable): Update.
6910
6911 2018-05-25 Tom Tromey <tom@tromey.com>
6912
6913 * utils.c (fputs_maybe_filtered): Update.
6914 * linespec.c (decode_line_full): Update.
6915 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6916 (mi_print_breakpoint_for_event, mi_solib_loaded)
6917 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6918 (mi_user_selected_context_changed): Update.
6919 * mi/mi-main.c (mi_execute_command): Update.
6920 * cli/cli-script.c (execute_control_command): Update.
6921 * python/python.c (execute_gdb_command): Update.
6922 * solib.c (info_sharedlibrary_command): Update.
6923 * interps.c (interp_ui_out): Remove.
6924 * interps.h (interp_ui_out): Remove.
6925
6926 2018-05-25 Tom Tromey <tom@tromey.com>
6927
6928 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6929 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6930 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6931
6932 2018-05-25 Tom Tromey <tom@tromey.com>
6933
6934 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6935 * interps.c (interp_exec): Use scoped_restore.
6936
6937 2018-05-25 Tom Tromey <tom@tromey.com>
6938
6939 * remote.c (remote_target::remote_file_get): Use
6940 gdb::byte_vector.
6941 (remote_target::remote_file_put): Likewise.
6942
6943 2018-05-25 Tom Tromey <tom@tromey.com>
6944
6945 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6946 a std::string.
6947 (get_pe_section_index, add_pe_exported_sym): Update.
6948 (read_pe_exported_syms): Use gdb::def_vector.
6949
6950 2018-05-25 Tom Tromey <tom@tromey.com>
6951
6952 * frame.c (remove_prev_frame): Remove.
6953 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6954
6955 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6956
6957 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6958 Remove prototypes.
6959 * mips-linux-nat.c (supply_fpregset): Always call
6960 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6961 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6962 `mips_fill_fpregset'.
6963 * mips-linux-tdep.c (mips_supply_fpregset)
6964 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6965 (mips_fill_fpregset_wrapper): Remove functions.
6966 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6967 (mips_linux_fpregset): Remove variable.
6968 (mips_linux_iterate_over_regset_sections): Use
6969 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6970 (mips_linux_o32_sigframe_init): Remove comment.
6971
6972 2018-05-25 Pedro Alves <palves@redhat.com>
6973
6974 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6975 (struct readahead_cache, struct packet_reg, struct
6976 remote_arch_state, class remote_state): Move higher up in the
6977 file.
6978 (remote_target::m_remote_state): Now an object instead of a pointer.
6979 (remote_target::get_remote_state): Adjust.
6980
6981 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6982
6983 * stack.c (select_and_print_frame): Delete.
6984 (struct function_bounds): Move struct within function.
6985 (func_command): Most content moved into new function
6986 find_frame_for_function, use new function, print result, add
6987 function comment.
6988 (find_frame_for_function): New function, now returns a result.
6989
6990 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6991
6992 * stack.c (iterate_over_block_arg_vars): Fix comment.
6993 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6994
6995 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6996
6997 PR gdb/23203
6998 * frame.c
6999 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7000 Define.
7001 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7002 Define.
7003 * frame.h (class scoped_restore_selected_frame): New class.
7004 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7005 of any exception, use scoped_restore_selected_frame to restore the
7006 frame instead.
7007
7008 2018-05-24 Pedro Alves <palves@redhat.com>
7009
7010 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7011 override.
7012
7013 2018-05-23 Tom Tromey <tom@tromey.com>
7014
7015 * complaints.c (struct complaints): Remove.
7016 (symfile_complaint_book): Remove.
7017 (series): New global.
7018 (complaint_internal): Update.
7019 (clear_complaints): Update.
7020
7021 2018-05-23 Tom Tromey <tom@tromey.com>
7022
7023 * complaints.c (counters): New global.
7024 (struct complain): Remove.
7025 (struct complaints) <root>: Remove.
7026 (complaint_sentinel): Remove.
7027 (symfile_complaint_book): Update.
7028 (find_complaint) Remove.
7029 (complaint_internal, clear_complaints): Update.
7030
7031 2018-05-23 Tom Tromey <tom@tromey.com>
7032
7033 * complaints.c (struct complain) <file, line>: Remove.
7034 (find_complaint): Remove file, line parameters.
7035 (complaint_internal): Update.
7036
7037 2018-05-23 Tom Tromey <tom@tromey.com>
7038
7039 * complaints.c (vcomplaint): Remove.
7040 (complaint_internal) Merge in contents of vcomplaint.
7041
7042 2018-05-23 Tom Tromey <tom@tromey.com>
7043
7044 * complaints.c (struct complaints) <explanation>: Remove.
7045 (symfile_explanations): Remove.
7046 (symfile_complaint_book): Update.
7047 (vcomplaint): Update.
7048 (struct explanation): Remove.
7049
7050 2018-05-23 Tom Tromey <tom@tromey.com>
7051
7052 * complaints.c (symfile_complaints): Remove.
7053 (complaint_internal): Remove "complaints" parameter.
7054 (clear_complaints, vcomplaint): Remove "c" parameter.
7055 (get_complaints): Remove.
7056 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7057 (dwarf2_debug_line_missing_file_complaint)
7058 (dwarf2_debug_line_missing_end_sequence_complaint)
7059 (dwarf2_complex_location_expr_complaint)
7060 (dwarf2_const_value_length_mismatch_complaint)
7061 (dwarf2_section_buffer_overflow_complaint)
7062 (dwarf2_macro_malformed_definition_complaint)
7063 (dwarf2_invalid_attrib_class_complaint)
7064 (create_addrmap_from_index, dw2_symtab_iter_next)
7065 (dw2_expand_marked_cus)
7066 (dw2_debug_names_iterator::find_vec_in_debug_names)
7067 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7068 (create_debug_type_hash_table, init_cutu_and_read_dies)
7069 (partial_die_parent_scope, add_partial_enumeration)
7070 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7071 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7072 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7073 (create_cus_hash_table, create_dwp_hash_table)
7074 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7075 (dwarf2_rnglists_process, dwarf2_ranges_process)
7076 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7077 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7078 (handle_struct_member_die, process_structure_scope)
7079 (read_array_type, read_common_block, read_module_type)
7080 (read_tag_pointer_type, read_typedef, read_base_type)
7081 (read_subrange_type, load_partial_dies, partial_die_info::read)
7082 (partial_die_info::read, partial_die_info::read)
7083 (partial_die_info::read, read_checked_initial_length_and_offset)
7084 (dwarf2_string_attr, read_formatted_entries)
7085 (dwarf_decode_line_header)
7086 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7087 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7088 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7089 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7090 (get_signatured_type, get_DW_AT_signature_type)
7091 (decode_locdesc, file_file_name, consume_improper_spaces)
7092 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7093 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7094 (dwarf2_symbol_mark_computed, set_die_type)
7095 (read_attribute_value): Update.
7096 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7097 Update.
7098 * dbxread.c (unknown_symtype_complaint)
7099 (lbrac_mismatch_complaint, repeated_header_complaint)
7100 (set_namestring, function_outside_compilation_unit_complaint)
7101 (read_dbx_symtab, process_one_symbol): Update.
7102 * gdbtypes.c (stub_noname_complaint): Update.
7103 * windows-nat.c (handle_unload_dll): Update.
7104 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7105 (decode_base_type): Update.
7106 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7107 (eb_complaint, record_include_begin, record_include_end)
7108 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7109 (process_xcoff_symbol, read_symbol)
7110 (function_outside_compilation_unit_complaint)
7111 (scan_xcoff_symtab): Update.
7112 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7113 * buildsym.c (finish_block_internal, make_blockvector)
7114 (end_symtab_get_static_block, augment_type_symtab): Update.
7115 * dtrace-probe.c (dtrace_process_dof)
7116 (dtrace_static_probe_ops::get_probes): Update.
7117 * complaints.h (struct complaint): Don't declare.
7118 (symfile_complaints): Remove.
7119 (complaint_internal): Remove "complaints" parameter.
7120 (complaint): Likewise.
7121 (clear_complaints): Likewise.
7122 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7123 (reread_symbols): Update.
7124 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7125 (dwarf2_frame_cache, decode_frame_entry): Update.
7126 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7127 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7128 (info_selectors_command): Update.
7129 * macrotab.c (macro_include, check_for_redefinition)
7130 (macro_undef): Update.
7131 * objfiles.c (filter_overlapping_sections): Update.
7132 * stabsread.c (invalid_cpp_abbrev_complaint)
7133 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7134 (define_symbol, error_type, read_type, rs6000_builtin_type)
7135 (stabs_method_name_from_physname, read_member_functions)
7136 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7137 (attach_fields_to_type, complain_about_struct_wipeout)
7138 (read_range_type, read_args, common_block_start)
7139 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7140 Update.
7141 * mdebugread.c (index_complaint, unknown_ext_complaint)
7142 (basic_type_complaint, bad_tag_guess_complaint)
7143 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7144 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7145 (parse_procedure, parse_lines)
7146 (function_outside_compilation_unit_complaint)
7147 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7148 (bad_tag_guess_complaint, reg_value_complaint): Update.
7149 * cp-support.c (demangled_name_complaint): Update.
7150 * macroscope.c (sal_macro_scope): Update.
7151 * dwarf-index-write.c (class debug_names): Update.
7152
7153 2018-05-23 Tom Tromey <tom@tromey.com>
7154
7155 * complaints.c (clear_complaints): Remove "noisy" parameter.
7156 * complaints.h (clear_complaints): Update.
7157 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7158 (reread_symbols): Update.
7159
7160 2018-05-23 Tom Tromey <tom@tromey.com>
7161
7162 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7163 SUBSEQUENT_MESSAGE.
7164 (vcomplaint, clear_complaints): Update.
7165 (symfile_explanations): Remove some messages.
7166
7167 2018-05-23 Tom Tromey <tom@tromey.com>
7168
7169 * complaints.c (internal_complaint): Remove.
7170 * complaints.h (internal_complaint): Remove.
7171
7172 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7173
7174 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7175
7176 2018-05-22 Pedro Alves <palves@redhat.com>
7177
7178 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7179 (remote_fileio_badfd, remote_fileio_return_errno)
7180 (remote_fileio_return_success, remote_fileio_func_open)
7181 (remote_fileio_func_open, remote_fileio_func_close)
7182 (remote_fileio_func_read, remote_fileio_func_write)
7183 (remote_fileio_func_lseek, remote_fileio_func_rename)
7184 (remote_fileio_func_unlink, remote_fileio_func_stat)
7185 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7186 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7187 remote_target parameter.
7188 (remote_fio_func_map) <func>: Add remote_target parameter.
7189 (do_remote_fileio_request, remote_fileio_request):
7190 * remote-fileio.h (remote_fileio_request):
7191 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7192 remote_target parameter.
7193 (remote_notif_process, handle_notification): Adjust to pass down
7194 the remote.
7195 (remote_notif_state_allocate): Add remote_target parameter. Save
7196 it.
7197 * remote-notif.h (struct remote_target): Forward declare.
7198 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7199 remote_target parameter.
7200 (struct remote_notif_state) <remote>: New field.
7201 (remote_notif_ack, remote_notif_parse): Add remote_target
7202 parameter.
7203 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7204 remote_target parameter.
7205 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7206 (threads_listing_context, rmt_thread_action, protocol_feature)
7207 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7208 (packet_result, struct threads_listing_context, remote_state):
7209 Move definitions and declarations higher up.
7210 (remote_target) <~remote_target>: Declare.
7211 (remote_download_command_source, remote_file_put, remote_file_get)
7212 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7213 (remote_hostio_pread_vFile, remote_hostio_send_command)
7214 (remote_hostio_set_filesystem, remote_hostio_open)
7215 (remote_hostio_close, remote_hostio_unlink, remote_state)
7216 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7217 (get_memory_write_packet_size, get_memory_read_packet_size)
7218 (append_pending_thread_resumptions, remote_detach_1)
7219 (append_resumption, remote_resume_with_vcont)
7220 (add_current_inferior_and_thread, wait_ns, wait_as)
7221 (process_stop_reply, remote_notice_new_inferior)
7222 (process_initial_stop_replies, remote_add_thread)
7223 (btrace_sync_conf, remote_btrace_maybe_reopen)
7224 (remove_new_fork_children, kill_new_fork_children)
7225 (discard_pending_stop_replies, stop_reply_queue_length)
7226 (check_pending_events_prevent_wildcard_vcont)
7227 (discard_pending_stop_replies_in_queue, stop_reply)
7228 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7229 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7230 (remote_interrupt_as, remote_interrupt_ns)
7231 (remote_get_noisy_reply, remote_query_attached)
7232 (remote_add_inferior, remote_current_thread, get_current_thread)
7233 (set_thread, set_general_thread, set_continue_thread)
7234 (set_general_process, write_ptid)
7235 (remote_unpack_thread_info_response, remote_get_threadinfo)
7236 (parse_threadlist_response, remote_get_threadlist)
7237 (remote_threadlist_iterator, remote_get_threads_with_ql)
7238 (remote_get_threads_with_qxfer)
7239 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7240 (get_offsets, remote_check_symbols, remote_supported_packet)
7241 (remote_query_supported, remote_packet_size)
7242 (remote_serial_quit_handler, remote_detach_pid)
7243 (remote_vcont_probe, remote_resume_with_hc)
7244 (send_interrupt_sequence, interrupt_query)
7245 (remote_notif_get_pending_events, fetch_register_using_p)
7246 (send_g_packet, process_g_packet, fetch_registers_using_g)
7247 (store_register_using_P, store_registers_using_G)
7248 (set_remote_traceframe, check_binary_download)
7249 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7250 (remote_xfer_live_readonly_partial, remote_read_bytes)
7251 (remote_send_printf, remote_flash_write, readchar)
7252 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7253 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7254 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7255 (extended_remote_disable_randomization, extended_remote_run)
7256 (send_environment_packet, extended_remote_environment_support)
7257 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7258 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7259 (packet_command): Now methods of ...
7260 (remote_target): ... this class.
7261 (m_remote_state) <remote_target>: New field.
7262 (struct remote_state) <stop_reply_queue,
7263 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7264 fields.
7265 (remote_state::remote_state): Allocate stop_reply_queue.
7266 (remote_state): Delete global.
7267 (get_remote_state_raw): Delete.
7268 (remote_target::get_remote_state): Allocate m_remote_state on
7269 demand.
7270 (get_current_remote_target): New.
7271 (remote_ops, extended_remote_ops): Delete.
7272 (wait_forever_enabled_p, remote_async_inferior_event_token):
7273 Delete, moved to struct remote_state.
7274 (remote_target::close): Delete self. Destruction bits split to
7275 ...
7276 (remote_target::~remote_target): ... this.
7277 (show_memory_packet_size): Adjust to use
7278 get_current_remote_target.
7279 (struct protocol_feature) <func>: Add remote_target parameter.
7280 All callers adjusted.
7281 (curr_quit_handler_target): New.
7282 (remote_serial_quit_handler): Reimplement.
7283 (remote_target::open_1): Adjust to use get_current_remote_target.
7284 Heap-allocate remote_target/extended_remote_target instances.
7285 (vcont_builder::vcont_builder): Add remote_target parameter, and
7286 save it in m_remote. All callers adjusted.
7287 (vcont_builder::m_remote): New field.
7288 (vcont_builder::restart, vcont_builder::flush)
7289 (vcont_builder::push_action): Use it.
7290 (remote_target::commit_resume): Use it.
7291 (struct queue_iter_param) <remote>: New field.
7292 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7293 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7294 (check_pending_event_prevents_wildcard_vcont_callback)
7295 (remote_target::check_pending_events_prevent_wildcard_vcont)
7296 (remote_target::discard_pending_stop_replies)
7297 (remote_target::discard_pending_stop_replies_in_queue)
7298 (remote_target::remote_notif_remove_queued_reply): Fill in
7299 'remote' field.
7300 (remote_notif_get_pending_events): New.
7301 (remote_target::readchar, remote_target::remote_serial_write):
7302 Save/restore curr_quit_handler_target.
7303 (putpkt): New.
7304 (kill_new_fork_children): Fill in 'remote' field.
7305 (packet_command): Use get_current_remote_target, defer to
7306 remote_target method of same name.
7307 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7308 parameter, and save it in m_remote. All callers adjusted.
7309 (scoped_remote_fd::release): Use m_remote.
7310 (scoped_remote_fd::m_remote): New field.
7311 (remote_file_put, remote_file_get, remote_file_delete): Use
7312 get_current_remote_target, defer to remote_target method of same
7313 name.
7314 (remote_btrace_reset): Add remote_state paremeter. Update all
7315 callers.
7316 (remote_async_inferior_event_handler). Pass down 'data'.
7317 (remote_new_objfile): Use get_current_remote_target.
7318 (remote_target::vcont_r_supported): New.
7319 (set_range_stepping): Use get_current_remote_target and
7320 remote_target::vcont_r_supported.
7321 (_initialize_remote): Don't allocate 'remote_state' and
7322 'stop_reply_queue' globals.
7323 * remote.h (struct remote_target): Forward declare.
7324 (getpkt, putpkt, remote_notif_get_pending_events): Add
7325 'remote_target' parameter.
7326
7327 2018-05-22 Pedro Alves <palves@redhat.com>
7328
7329 * remote.c (vcont_builder): Now a class. Make all data members
7330 private.
7331 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7332 Declare methods.
7333 (vcont_builder_restart): Rename to ...
7334 (vcont_builder::restart): ... this.
7335 (vcont_builder_flush): Rename to ...
7336 (vcont_builder::flush): ... this.
7337 (vcont_builder_push_action): Rename to ...
7338 (vcont_builder::push_action): ... this.
7339 (remote_target::commit_resume): Adjust.
7340
7341 2018-05-22 Pedro Alves <palves@redhat.com>
7342
7343 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7344 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7345 (get_fixed_memory_packet_size): New.
7346 (get_memory_packet_size): Use it.
7347 (set_memory_packet_size): Don't override the config size with
7348 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7349 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7350 Don't refer to get_memory_packet_size if not connected to a remote
7351 target. Show "(default)" if configured size is 0.
7352
7353 2018-05-22 Pedro Alves <palves@redhat.com>
7354
7355 * remote.c (remote_target::mourn_inferior): Move
7356 discard_pending_stop_replies call here from ...
7357 (_initialize_remote): ... here.
7358
7359 2018-05-22 Pedro Alves <palves@redhat.com>
7360
7361 * remote.c (compare_section_command): Remove set_general_process
7362 call.
7363
7364 2018-05-22 Pedro Alves <palves@redhat.com>
7365
7366 * remote.c (struct packet_reg, struct remote_arch_state):
7367 Move higher up in the file.
7368 (remote_state) <m_arch_states>: Store remote_arch_state values
7369 instead of remote_arch_state pointers.
7370 (remote_state::get_remote_arch_state): Adjust.
7371
7372 2018-05-22 Pedro Alves <palves@redhat.com>
7373
7374 * remote.c: Include <unordered_map>.
7375 (remote_state): Now a class.
7376 (remote_state) <get_remote_arch_state>: Declare method.
7377 <get_remote_arch_state>: New field.
7378 (remote_arch_state) <remote_arch_state>: Declare ctor.
7379 <regs>: Now a unique_ptr.
7380 (remote_gdbarch_data_handle): Delete.
7381 (get_remote_arch_state): Delete.
7382 (remote_state::get_remote_arch_state): New.
7383 (get_remote_state): Adjust to call remote_state's
7384 get_remote_arch_state method.
7385 (init_remote_state): Delete, bits factored out to ...
7386 (remote_arch_state::remote_arch_state): ... this new method.
7387 (get_remote_packet_size, get_memory_packet_size)
7388 (process_g_packet, remote_target::fetch_registers)
7389 (remote_target::prepare_to_store, store_registers_using_G)
7390 (remote_target::store_registers, remote_target::get_trace_status):
7391 Adjust to call remote_state's method.
7392 (_initialize_remote): Remove reference to
7393 remote_gdbarch_data_handle.
7394
7395 2018-05-22 Pedro Alves <palves@redhat.com>
7396
7397 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7398 pread>: New method declarations.
7399 (remote_target::open_1): Adjust.
7400 (readahead_cache_invalidate): Rename to ...
7401 (readahead_cache::invalidate): ... this, and adjust to be a class
7402 method.
7403 (readahead_cache_invalidate_fd): Rename to ...
7404 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7405 class method.
7406 (remote_hostio_pwrite): Adjust.
7407 (remote_hostio_pread_from_cache): Rename to ...
7408 (readahead_cache::pread): ... this, and adjust to be a class
7409 method.
7410 (remote_hostio_close): Adjust.
7411
7412 2018-05-22 Pedro Alves <palves@redhat.com>
7413
7414 * remote.c (remote_hostio_close_cleanup): Delete.
7415 (class scoped_remote_fd): New.
7416 (remote_file_put, remote_file_get): Use it.
7417
7418 2018-05-22 Pedro Alves <palves@redhat.com>
7419
7420 (struct vCont_action_support): Use bool and initialize all fields.
7421 (struct readahead_cache): Initialize all fields.
7422 (remote_state): Use bool and initialize all fields.
7423 (remote_state::remote_state, remote_state::~remote_state): New.
7424 (new_remote_state): Delete.
7425 (_initialize_remote): Use new to allocate remote_state.
7426
7427 2018-05-22 Pedro Alves <palves@redhat.com>
7428 張俊芝 <zjz@zjz.name>
7429
7430 PR gdb/22973
7431 * c-exp.y: Include "c-support.h".
7432 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7433 of tolower. Use c_ident_is_alpha to scan names.
7434 * c-lang.c: Include "c-support.h".
7435 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7436 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7437 * c-support.h: New file, with bits factored out from ...
7438 * cp-name-parser.y: ... this file.
7439 Include "c-support.h".
7440 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7441 c-support.h and renamed.
7442 (symbol_end, yylex): Adjust.
7443
7444 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7445
7446 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7447 parameter type to CORE_ADDR.
7448 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7449 parameter type in declaration to CORE_ADDR.
7450 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7451 target_auxv_search to get AT_HWCAP and use the result to get the
7452 target description.
7453 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7454 to CORE_ADDR. Remove the cast of the return value to unsigned
7455 long. Fix error predicate of target_auxv_search.
7456 (ppc_linux_nat_target::read_description): Change the type of the
7457 hwcap variable to CORE_ADDR.
7458
7459 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7460
7461 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7462 if the size of fpscr is larger than 32 bits.
7463
7464 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7465
7466 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7467 (ppc32_linux_vsxregmap): New global.
7468 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7469 regcache_supply_regset, and regcache_collect_regset.
7470 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7471 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7472 (fetch_vsx_register, store_vsx_register): Remove.
7473 (fetch_vsx_registers): Add regno parameter. Get regset using
7474 ppc_linux_vsxregset. Use regset to supply registers.
7475 (store_vsx_registers): Add regno parameter. Get regset using
7476 ppc_linux_vsxregset. Use regset to collect registers.
7477 (fetch_register): Call fetch_vsx_registers instead of
7478 fetch_vsx_register.
7479 (store_register): Call store_vsx_registers instead of
7480 store_vsx_register.
7481 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7482 new regno parameter.
7483 (store_ppc_registers): Call store_vsx_registers with -1 for the
7484 new regno parameter.
7485 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7486 (ppc_collect_vsxregset): Remove.
7487
7488 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7489
7490 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7491 offset fields.
7492 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7493 for vector register offset fields.
7494 (ppc64_fbsd_reg_offsets): Likewise.
7495 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7496 to vector register offset fields.
7497 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7498 to vector register offset fields.
7499 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7500 vector register offset fields.
7501 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7502 initializers for vector register offset fields.
7503 (rs6000_aix64_reg_offsets): Likewise.
7504 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7505 (ppc_supply_vrregset): Remove.
7506 (ppc_collect_vrregset): Remove.
7507 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7508 (ppc_linux_vrregset) : New function.
7509 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7510 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7511 (ppc32_linux_vrregset): Remove.
7512 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7513 and use result instead of ppc32_linux_vrregset.
7514 (ppc32_linux_reg_offsets): Remove initializers for vector register
7515 offset fields.
7516 (ppc64_linux_reg_offsets): Likewise.
7517 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7518 * ppc-linux-nat.c: Include regset.h.
7519 (gdb_vrregset_t): Adjust comment to account for little-endian
7520 mode.
7521 (supply_vrregset, fill_vrregset): Remove.
7522 (fetch_altivec_register, store_altivec_register): Remove.
7523 (fetch_altivec_registers): Add regno parameter. Get regset using
7524 ppc_linux_vrregset. Use regset to supply registers.
7525 (store_altivec_registers): Add regno parameter. Get regset using
7526 ppc_linux_vrregset. Use regset to collect registers.
7527 (fetch_register): Call fetch_altivec_registers instead of
7528 fetch_altivec_register.
7529 (store_register): Call store_altivec_registers instead of
7530 store_altivec_register.
7531 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7532 the new regno parameter.
7533 (store_ppc_registers): Call store_altivec_registers with -1 for
7534 the new regno parameter.
7535
7536 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7537
7538 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7539 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7540 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7541 (gdb_vrregset_t): Change array type size to
7542 PPC_LINUX_SIZEOF_VRREGSET.
7543 (gdb_vsxregset_t): Change array type size to
7544 PPC_LINUX_SIZEOF_VSXREGSET.
7545 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7546 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7547 PPC_LINUX_SIZEOF_VSXREGSET.
7548
7549 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7550
7551 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7552 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7553 nat/ppc-linux.c.
7554 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7555 ppc_linux_target_wordsize with tid.
7556 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7557 wordsize with tid.
7558 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7559 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7560 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7561 tid parameter. Remove static specifier.
7562 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7563 (ppc_linux_target_wordsize): New declaration.
7564
7565 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7566
7567 * arch/ppc-linux-common.c: New file.
7568 * arch/ppc-linux-common.h: New file.
7569 * arch/ppc-linux-tdesc.h: New file.
7570 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7571 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7572 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7573 arch/ppc-linux-tdesc.h.
7574 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7575 arch/ppc-linux-tdesc.h.
7576 (ppc_linux_nat_target::read_description): Remove target
7577 description matching code. Fill a ppc_linux_features struct and
7578 call ppc_linux_match_description with it. Move comment about ISA
7579 2.05 to ppc-linux-common.c.
7580 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7581 arch/ppc-linux-tdesc.h.
7582 (ppc_linux_core_read_description): Remove target description
7583 matching code. Fill a ppc_linux_features struct and call
7584 ppc_linux_match_description with it.
7585 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7586 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7587 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7588 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7589 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7590 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7591 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7592 (tdesc_powerpc_e500l): Remove.
7593
7594 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7595
7596 * ada-lang.c (catch_assert_command): Pass empty string instead
7597 of NULL for excep_string argument.
7598
7599 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7600
7601 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7602 the width of the requested register exceeds the width of the
7603 `ptrace' data type.
7604
7605 2018-05-21 Tom Tromey <tom@tromey.com>
7606
7607 * printcmd.c (output_command): Remove.
7608 (output_command_const): Rename to output_command.
7609 * valprint.h (output_command): Rename from output_command_const.
7610 * tracepoint.c (trace_dump_actions): Call output_command.
7611
7612 2018-05-21 Tom Tromey <tom@tromey.com>
7613
7614 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7615 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7616 * ada-lang.h (create_ada_exception_catchpoint): Update.
7617 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7618 std::string.
7619 (create_excep_cond_exprs, ~ada_catchpoint)
7620 (should_stop_exception, print_one_exception)
7621 (print_mention_exception, print_recreate_exception): Update.
7622 (ada_get_next_arg): Remove.
7623 (catch_ada_exception_command_split): Use std::string. Change type
7624 of "excep_string", "cond_string".
7625 (catch_ada_exception_command): Update.
7626 (create_ada_exception_catchpoint): Change type of excep_string.
7627 (ada_exception_sal): Remove excep_string parameter.
7628 (~ada_catchpoint): Remove.
7629
7630 2018-05-21 Tom Tromey <tom@tromey.com>
7631
7632 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7633 cleanup.
7634
7635 2018-05-21 Tom Tromey <tom@tromey.com>
7636
7637 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7638 Return unique_xmalloc_ptr.
7639 (print_it_exception): Update.
7640
7641 2018-05-21 Tom Tromey <tom@tromey.com>
7642
7643 * tracepoint.c (trace_dump_actions): Use std::string.
7644
7645 2018-05-21 Tom Tromey <tom@tromey.com>
7646
7647 * symfile.c (reread_symbols): Use std::string for original_name.
7648
7649 2018-05-21 Tom Tromey <tom@tromey.com>
7650
7651 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7652 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7653 constructor.
7654
7655 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7656
7657 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7658 instance to...
7659 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7660 * objfiles.c (get_objfile_bfd_data): Allocate
7661 objfile_per_bfd_storage with obstack_new when allocating on
7662 obstack.
7663
7664 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7665
7666 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7667 OBSTACK_ZALLOC.
7668 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7669 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7670 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7671 (add_pending): Likewise.
7672 (parse_symbol): Likewise.
7673 (parse_partial_symbols): Likewise.
7674 (psymtab_to_symtab_1): Likewise.
7675 (new_psymtab): Likewise.
7676 (elfmdebug_build_psymtabs): Likewise.
7677 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7678 * objfiles.c (get_objfile_bfd_data): Likewise.
7679 (objfile_register_static_link): Likewise.
7680 * psymtab.c (allocate_psymtab): Likewise.
7681 * stabsread.c (read_member_functions): Likewise.
7682 * xcoffread.c (xcoff_end_psymtab): Likewise.
7683
7684 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7685
7686 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7687 compiler supports std::is_trivially_constructible.
7688 * common/poison.h: Include obstack.h.
7689 (IsMallocable): Define to is_trivially_constructible if the
7690 compiler supports it, define to true_type otherwise.
7691 (xobnew): New.
7692 (XOBNEW): Redefine.
7693 (xobnewvec): New.
7694 (XOBNEWVEC): Redefine.
7695 * gdb_obstack.h (obstack_zalloc): New.
7696 (OBSTACK_ZALLOC): Redefine.
7697 (obstack_calloc): New.
7698 (OBSTACK_CALLOC): Redefine.
7699 (obstack_new): New.
7700 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7701 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7702 gdbarch.c.
7703 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7704 obstack_calloc/obstack_zalloc.
7705 (gdbarch_obstack_zalloc): Remove.
7706 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7707
7708 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7709
7710 * stack.c (backtrace_command_1): Remove useless variable int i.
7711
7712 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7713
7714 * stack.c (print_frame_info): Fix comment.
7715
7716 2018-05-18 Tom Tromey <tom@tromey.com>
7717
7718 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7719 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7720 (~dwarf2_per_objfile): Update
7721 (dwarf2_get_dwz_file): Use new.
7722 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7723 unique_ptr.
7724
7725 2018-05-18 Tom Tromey <tom@tromey.com>
7726
7727 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7728 unique_ptr.
7729 * dwarf2read.c (struct dwp_file): Add constructor and
7730 initializers.
7731 (open_and_init_dwp_file): Return a unique_ptr.
7732 (dwarf2_per_objfile, create_dwp_hash_table)
7733 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7734 (lookup_dwo_unit_in_dwp): Update.
7735 (open_and_init_dwp_file, get_dwp_file): Update.
7736
7737 2018-05-18 Tom Tromey <tom@tromey.com>
7738
7739 * dwarf2read.c (dwarf2_per_objfile): Update.
7740 (struct mapped_index): Add initializers.
7741 (dwarf2_read_index): Use new.
7742 (dw2_symtab_iter_init): Update.
7743 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7744 unique_ptr.
7745
7746 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7747
7748 * dwarf2read.c (mapped_index) <total_size>: Remove.
7749
7750 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7751
7752 * unittests/format_pieces-selftests.c (test_format_specifier):
7753 Add ARI comments.
7754
7755 2018-05-18 Tom Tromey <tom@tromey.com>
7756
7757 * c-typeprint.c (maybe_print_hole): New function.
7758 (c_print_type_struct_field_offset): Update.
7759 (c_type_print_base_struct_union): Call maybe_print_hole.
7760
7761 2018-05-17 Keith Seitz <keiths@redhat.com>
7762
7763 * breakpoint.c (build_bpstat_chain): New function, moved from
7764 bpstat_stop_status.
7765 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7766 If no stop chain is passed, call build_bpstat_chain to build it.
7767 * breakpoint.h (build_bpstat_chain): Declare.
7768 (bpstat_stop_status): Move documentation here from breakpoint.c.
7769 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7770 build the stop chain and pass it to skip_inline_frames.
7771 Pass this stop chain to bpstat_stop_status.
7772 * inline-frame.c: Include breakpoint.h.
7773 (stopped_by_user_bp_inline_frame): New function.
7774 (skip_inline_frames): Add parameter `stop_chain'.
7775 Move documention to inline-frame.h.
7776 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7777 whether the frame should be elided.
7778 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7779 Add moved documentation and update for new parameter.
7780
7781 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7782
7783 PR cli/14975
7784 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7785 unittests/format_pieces-selftests.c.
7786 * common/format.h (format_piece) <operator==>: New.
7787 (format_pieces) <operator[]>: Remove.
7788 * common/format.c (format_pieces::format_pieces): Handle \e.
7789 * unittests/format_pieces-selftests.c: New.
7790
7791 2018-05-17 Tom Tromey <tom@tromey.com>
7792
7793 PR symtab/23010:
7794 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7795 (dw2_instantiate_symtab): Add skip_partial parameter.
7796 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7797 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7798 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7799 (dw2_expand_symtabs_matching_one)
7800 (dw2_find_pc_sect_compunit_symtab)
7801 (dw2_debug_names_lookup_symbol)
7802 (dw2_debug_names_expand_symtabs_for_function): Update.
7803 (init_cutu_and_read_dies): Add skip_partial parameter.
7804 (process_psymtab_comp_unit, build_type_psymtabs_1)
7805 (process_skeletonless_type_unit, load_partial_comp_unit)
7806 (psymtab_to_symtab_1): Update.
7807 (load_full_comp_unit): Add skip_partial parameter.
7808 (process_imported_unit_die, dwarf2_read_addr_index)
7809 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7810 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7811 (read_signatured_type): Update.
7812
7813 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7814
7815 * value.c (release_value): Remove unused variable.
7816 (record_latest_value): Likewise.
7817 (access_value_history): Likewise.
7818 (preserve_values): Likewise.
7819
7820 2018-05-17 Tom Tromey <tom@tromey.com>
7821
7822 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7823 Initialize.
7824
7825 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7826
7827 PR gdb/22286
7828 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7829 Also handle registers whose width is not a multiple of
7830 PTRACE_TYPE_RET.
7831 (linux_nat_trad_target::store_register): Likewise.
7832
7833 2018-05-16 Tom Tromey <tom@tromey.com>
7834
7835 * gdbcore.h (core_bfd): Redefine.
7836 * corelow.c (core_target::close): Update.
7837 (core_target_open): Update.
7838 * progspace.h (struct program_space) <cbfd>: Now a
7839 gdb_bfd_ref_ptr.
7840
7841 2018-05-16 Tom Tromey <tom@tromey.com>
7842
7843 PR cli/19551:
7844 * symfile-add-flags.h (enum symfile_add_flags)
7845 <SYMFILE_NOT_FILENAME>: New constant.
7846 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7847 objfile name from BFD.
7848 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7849 * minidebug.c (find_separate_debug_file_in_section): Put
7850 ".gnu_debugdata" into BFD's file name.
7851
7852 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7853
7854 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7855 Remove.
7856
7857 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7858
7859 PR binutils/21446
7860 * aarch64-tdep.c (aarch64_analyze_prologue,
7861 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7862 Indicate not interested in errors.
7863
7864 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7865
7866 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7867 Supply the MIPS_ZERO_REGNUM register.
7868
7869 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7870
7871 * mips-tdep.c (mask_address_var): Make variable static.
7872
7873 2018-05-14 Tom Tromey <tom@tromey.com>
7874
7875 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7876
7877 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7878
7879 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7880 FXSAVE_ADDR for the mxcsr register.
7881
7882 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7883
7884 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7885
7886 2018-05-11 Pedro Alves <palves@redhat.com>
7887
7888 * corelow.c (core_target) <core_target>: No longer inline.
7889 Initialize m_core_gdbarch, m_core_vec and build the section table
7890 here.
7891 <~core_target>: New.
7892 <core_gdbarch, get_core_register_section>: New methods.
7893 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7894 factored out from ...
7895 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7896 (core_ops): Delete.
7897 (sniff_core_bfd): Add gdbarch parameter.
7898 (core_close): Delete, merged into ...
7899 (core_target::close): ... here. Delete self.
7900 (core_close_cleanup): Delete.
7901 (core_target_open): Allocate a core_target on the heap. Use a
7902 unique_ptr instead of a cleanup. Bits moved into the core_target
7903 ctor. Adjust to use core_target methods instead of globals.
7904 (get_core_register_section): Rename to ...
7905 (core_target::get_core_register_section): ... this and adjust.
7906 (struct get_core_registers_cb_data): New.
7907 (get_core_registers_cb): Use it. Use bool.
7908 (core_target::fetch_registers, core_target::files_info)
7909 (core_target::xfer_partial, core_target::read_description)
7910 (core_target::pid_to, core_target::thread_name): Adjust to
7911 reference class fields instead of globals.
7912 * target.h (struct target_ops_deleter, target_ops_up): New.
7913
7914 2018-05-11 Pedro Alves <palves@redhat.com>
7915
7916 * corefile.c (core_file_command): Move to corelow.c.
7917 * corelow.c (the_core_target): Delete.
7918 (core_file_command): Moved from corefile.c. Check exec_bfd
7919 instead of the_core_target. Use target_detach instead of calling
7920 into the_core_target directly.
7921 (maybe_say_no_core_file_now): New.
7922 (core_target::detach): Use it.
7923 (_initialize_corelow): Remove references to the_core_target.
7924 * gdbcore.h (the_core_target): Delete.
7925
7926 2018-05-11 Tom Tromey <tromey@redhat.com>
7927 Pedro Alves <palves@redhat.com>
7928
7929 * corefile.c (core_bfd): Remove.
7930 * gdbcore.h (core_bfd): Now a macro.
7931 * progspace.h (struct program_space) <cbfd>: New field.
7932
7933 2018-05-11 Tom Tromey <tom@tromey.com>
7934
7935 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7936 gdb::def_vector.
7937
7938 2018-05-10 Tom Tromey <tom@tromey.com>
7939
7940 * configure: Rebuild.
7941 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7942
7943 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7944
7945 PR server/23158:
7946 * regformats/regdat.sh: Adjust script, following the addition
7947 of the new expedite_regs parameter to init_target_desc.
7948
7949 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7950
7951 PR gdb/23127
7952 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7953 set_gdbarch_significant_addr_bit.
7954 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7955 set_gdbarch_significant_addr_bit.
7956 * utils.c (address_significant): Update to sign extend addr.
7957
7958 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7959
7960 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7961 (xtensa_linux_init_abi): Limit tdep->num_regs by
7962 tdep->num_nopriv_regs.
7963 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7964 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7965 not initialized.
7966
7967 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7968
7969 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7970
7971 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7972
7973 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7974 (I387_MXCSR_INIT_VAL): New constant.
7975 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7976 buffer if it was supplied by the inferior.
7977 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7978 (i387_xsave_get_clear_bv): New function.
7979 (i387_supply_xsave): Only read x87 control registers from the
7980 xsave buffer if the feature is enabled, and the state will have
7981 been written, otherwise, provide a suitable default.
7982 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7983 including x87 control registers. Update control registers if they
7984 have changed from the default value, and mark features as enabled
7985 as required.
7986 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7987
7988 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7989
7990 * spu-tdep.c (info_spu_event_command): Fix output formatting.
7991
7992 2018-05-07 Tom Tromey <tom@tromey.com>
7993
7994 * configure: Rebuild.
7995 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7996
7997 2018-05-07 Tom Tromey <tom@tromey.com>
7998
7999 PR tdep/20362:
8000 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8001 bit. Use correct value for VDIV.
8002
8003 2018-05-04 Tom Tromey <tom@tromey.com>
8004
8005 * configure: Rebuild.
8006 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8007
8008 2018-05-04 Tom Tromey <tom@tromey.com>
8009
8010 * linux-record.c (record_linux_system_call) <case
8011 RECORD_SYS_RECVFROM>: Add "break".
8012
8013 2018-05-04 Tom Tromey <tom@tromey.com>
8014
8015 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8016 Add missing "break".
8017 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8018 Add missing "break".
8019
8020 2018-05-04 Tom Tromey <tom@tromey.com>
8021
8022 * rs6000-tdep.c (ppc_process_record_op4)
8023 (ppc_process_record_op63): Add fall-through comment.
8024
8025 2018-05-04 Tom Tromey <tom@tromey.com>
8026
8027 * i386-tdep.c (i386_process_record): Add fall-through comment.
8028
8029 2018-05-04 Tom Tromey <tom@tromey.com>
8030
8031 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8032 comment.
8033
8034 2018-05-04 Tom Tromey <tom@tromey.com>
8035
8036 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8037 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8038 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8039 comment.
8040 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8041 comment.
8042 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8043 comment.
8044
8045 2018-05-04 Tom Tromey <tom@tromey.com>
8046
8047 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8048
8049 2018-05-04 Tom Tromey <tom@tromey.com>
8050
8051 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8052 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8053 * symfile.c (section_is_mapped): Fix fall-through comment.
8054 * stabsread.c (define_symbol, read_member_functions): Fix
8055 fall-through comment.
8056 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8057 comment.
8058 * remote.c (remote_wait_as): Fix fall-through comment.
8059 * p-exp.y (yylex): Fix fall-through comment.
8060 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8061 comment.
8062 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8063 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8064 * jv-exp.y (yylex): Fix fall-through comment.
8065 * go-exp.y (lex_one_token): Fix fall-through comment.
8066 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8067 fall-through comment.
8068 * f-exp.y (yylex): Fix fall-through comment.
8069 * dwarf2read.c (process_die): Fix fall-through comments.
8070 * dbxread.c (process_one_symbol): Fix fall-through comment.
8071 * d-exp.y (lex_one_token): Fix fall-through comment.
8072 * cp-name-parser.y (yylex): Fix fall-through comment.
8073 * coffread.c (coff_symtab_read): Fix fall-through comment.
8074 * c-exp.y (lex_one_token): Fix fall-through comment.
8075 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8076 comment.
8077 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8078 comment.
8079
8080 2018-05-04 Tom Tromey <tom@tromey.com>
8081
8082 PR python/22730:
8083 * NEWS: Mention gdb.execute change.
8084 * gdbcmd.h (execute_control_command): Don't declare.
8085 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8086 execute_control_commands, execute_control_commands_to_string.
8087 * cli/cli-script.h (execute_control_commands)
8088 (execute_control_commands_to_string): Declare.
8089 (execute_control_command): Add from_tty parameter.
8090 * cli/cli-script.c (execute_control_commands)
8091 (execute_control_commands_to_string): New functions.
8092 (execute_user_command): Use execute_control_commands.
8093 (execute_control_command_1): Add "from_tty" parameter. Update.
8094 (execute_control_command): Likewise.
8095
8096 2018-05-04 Tom Tromey <tom@tromey.com>
8097
8098 PR python/22731:
8099 * NEWS: Mention that breakpoint commands are writable.
8100 * python/py-breakpoint.c (bppy_set_commands): New function.
8101 (breakpoint_object_getset) <"commands">: Use it.
8102
8103 2018-05-04 Tom Tromey <tom@tromey.com>
8104
8105 * tracepoint.c (actions_command): Update.
8106 * mi/mi-cmd-break.c (mi_command_line_array)
8107 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8108 (mi_read_next_line): Remove.
8109 (mi_cmd_break_commands): Update.
8110 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8111 function_view.
8112 * cli/cli-script.c (get_command_line): Update.
8113 (process_next_line): Use function_view. Constify.
8114 (recurse_read_control_structure, read_command_lines)
8115 (read_command_lines_1): Change argument types to function_view.
8116 (do_define_command, document_command): Update.
8117 * breakpoint.h (check_tracepoint_command): Don't declare.
8118 * breakpoint.c (check_tracepoint_command): Remove.
8119 (commands_command_1, create_tracepoint_from_upload): Update.
8120
8121 2018-05-04 Tom Tromey <tom@tromey.com>
8122
8123 PR gdb/11750:
8124 * cli/cli-script.h (enum command_control_type) <define_control>:
8125 New constant.
8126 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8127 (build_command_line, execute_control_command_1)
8128 (process_next_line): Likewise.
8129 (do_define_command): New function, extracted from define_command.
8130 (define_command): Use it.
8131
8132 2018-05-04 Tom Tromey <tom@tromey.com>
8133
8134 * tracepoint.c (actions_command): Update.
8135 * cli/cli-script.h (read_command_lines): Update.
8136 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8137 (MAX_TMPBUF): Remove define.
8138 (define_command): Use string_printf.
8139 (document_command): Likewise.
8140 * breakpoint.c (commands_command_1): Update.
8141
8142 2018-05-04 Tom Tromey <tom@tromey.com>
8143
8144 * top.c (execute_command): Update.
8145 * cli/cli-script.h (print_command_lines): Now varargs.
8146 * cli/cli-script.c (print_command_lines): Now varargs.
8147 (execute_control_command_1) <case while_control, case if_control>:
8148 Update.
8149
8150 2018-05-04 Tom Tromey <tom@tromey.com>
8151
8152 * tracepoint.c (all_tracepoint_actions): Rename from
8153 all_tracepoint_actions_and_cleanup. Change return type.
8154 (actions_command, encode_actions_1, encode_actions)
8155 (trace_dump_actions, tdump_command): Update.
8156 * remote.c (remote_download_command_source): Update.
8157 * python/python.c (gdbpy_eval_from_control_command)
8158 (python_command, python_interactive_command): Update.
8159 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8160 * guile/guile.c (guile_command)
8161 (gdbscm_eval_from_control_command, guile_command): Update.
8162 * compile/compile.c (compile_code_command)
8163 (compile_print_command, compile_to_object): Update.
8164 * cli/cli-script.h (struct command_lines_deleter): New.
8165 (counted_command_line): New typedef.
8166 (struct command_line): Add constructor, destructor.
8167 <body_list>: Remove.
8168 <body_list_0, body_list_1>: New members.
8169 (command_line_up): Remove typedef.
8170 (read_command_lines, read_command_lines_1, get_command_line):
8171 Update.
8172 (copy_command_lines): Don't declare.
8173 * cli/cli-script.c (build_command_line): Use "new".
8174 (get_command_line): Return counted_command_line.
8175 (print_command_lines, execute_user_command)
8176 (execute_control_command_1, while_command, if_command): Update.
8177 (realloc_body_list): Remove.
8178 (process_next_line, recurse_read_control_structure): Update.
8179 (read_command_lines, read_command_lines_1): Return counted_command_line.
8180 (free_command_lines): Use "delete".
8181 (copy_command_lines): Remove.
8182 (define_command, document_command, show_user_1): Update.
8183 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8184 a counted_command_line.
8185 * breakpoint.h (counted_command_line): Remove typedef.
8186 (breakpoint_set_commands): Update.
8187 * breakpoint.c (check_no_tracepoint_commands)
8188 (validate_commands_for_breakpoint): Update.
8189 (breakpoint_set_commands): Change commands to be a
8190 counted_command_line.
8191 (commands_command_1, update_dprintf_command_list)
8192 (create_tracepoint_from_upload): Update.
8193
8194 2018-05-04 Tom Tromey <tom@tromey.com>
8195
8196 * cli/cli-decode.h (cmd_list_element): New constructor.
8197 (~cmd_list_element): New destructor.
8198 (struct cmd_list_element): Add initializers.
8199 * cli/cli-decode.c (do_add_cmd): Use "new".
8200 (delete_cmd): Use "delete".
8201
8202 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8203 Pedro Alves <palves@redhat.com>
8204
8205 PR breakpoints/19806 and support for PR external/20207.
8206 * NEWS: Mention Aarch64 watchpoint improvements.
8207 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8208 watchpoints and PR external/20207 watchpoints.
8209 * nat/aarch64-linux-hw-point.c
8210 (kernel_supports_any_contiguous_range): New.
8211 (aarch64_watchpoint_offset): New.
8212 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8213 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8214 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8215 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8216 next_addr_orig_p. Support PR external/20207 watchpoints.
8217 (aarch64_downgrade_regs): New.
8218 (aarch64_dr_state_insert_one_point): New parameters offset and
8219 addr_orig.
8220 (aarch64_dr_state_remove_one_point): Likewise.
8221 (aarch64_handle_breakpoint): Update caller.
8222 (aarch64_handle_aligned_watchpoint): Likewise.
8223 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8224 aligned_offset.
8225 (aarch64_linux_set_debug_regs): Remove const from state. Call
8226 aarch64_downgrade_regs.
8227 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8228 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8229 (DR_CONTROL_MASK): ... this.
8230 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8231 (unsigned int aarch64_watchpoint_offset): New prototype.
8232 (aarch64_linux_set_debug_regs): Remove const from state.
8233 * utils.c (align_up, align_down): Move to ...
8234 * common/common-utils.c (align_up, align_down): ... here.
8235 * utils.h (align_up, align_down): Move to ...
8236 * common/common-utils.h (align_up, align_down): ... here.
8237
8238 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8239
8240 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8241 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8242 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8243 Re-implement to match the ABI as summarized in GCC's
8244 gcc/config/sparc/sparc.c. All callers updated.
8245 (sparc32_store_arguments): Remove assertion.
8246
8247 2018-05-04 Tom Tromey <tom@tromey.com>
8248
8249 * printcmd.c: Don't include tui.h.
8250 (decode_format): Use skip_spaces.
8251
8252 2018-05-04 Tom Tromey <tom@tromey.com>
8253
8254 PR gdb/22619:
8255 * printcmd.c (last_count): New global.
8256 (x_command): Use saved count when repeating.
8257
8258 2018-05-04 Tom Tromey <tom@tromey.com>
8259
8260 * nto-procfs.c (do_closedir_cleanup): Remove.
8261 (procfs_pidlist): Use gdb_dir_up.
8262 * procfs.c (do_closedir_cleanup): Remove.
8263 (proc_update_threads): Use gdb_dir_up.
8264 * common/filestuff.h (struct gdb_dir_deleter): New.
8265 (gdb_dir_up): New typedef.
8266
8267 2018-05-04 Tom Tromey <tom@tromey.com>
8268
8269 * ada-lang.c (print_mention_exception): Use std::string.
8270
8271 2018-05-04 Tom Tromey <tom@tromey.com>
8272
8273 * ada-lang.c (create_excep_cond_exprs): Update.
8274 (ada_exception_catchpoint_cond_string): Use std::string.
8275
8276 2018-05-04 Tom Tromey <tom@tromey.com>
8277
8278 * ada-lang.c (xget_renaming_scope): Return std::string.
8279 (old_renaming_is_invisible): Update.
8280
8281 2018-05-04 Tom Tromey <tom@tromey.com>
8282
8283 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8284 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8285
8286 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8287
8288 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8289
8290 2018-05-04 Tom Tromey <tom@tromey.com>
8291
8292 * remote.c (remote_query_supported_append): Change type.
8293 (remote_check_symbols): Update.
8294
8295 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8296
8297 PR gdb/11420
8298 * configure.ac: Prepend libpython.
8299 * python/python-config.py: Likewise.
8300 * configure: Regenerate.
8301
8302 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8303
8304 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8305
8306 2018-05-03 Pedro Alves <palves@redhat.com>
8307
8308 * s390-linux-nat.c
8309 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8310 override. Write 'true' instead of '1'.
8311 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8312 declaration.
8313
8314 2018-05-02 Pedro Alves <palves@redhat.com>
8315
8316 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8317 add_inf_child_target.
8318 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8319 add_inf_child_target.
8320 * aix-thread.c (aix_thread_target_info): New.
8321 (aix_thread_target) <shortname, longname, doc>: Delete.
8322 <info>: New.
8323 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8324 add_inf_child_target.
8325 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8326 add_inf_child_target.
8327 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8328 add_inf_child_target.
8329 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8330 add_inf_child_target.
8331 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8332 add_inf_child_target.
8333 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8334 add_inf_child_target.
8335 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8336 add_inf_child_target.
8337 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8338 add_inf_child_target.
8339 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8340 add_inf_child_target.
8341 * bfd-target.c (target_bfd_target_info): New.
8342 (target_bfd) <shortname, longname, doc>: Delete.
8343 <info>: New.
8344 * bsd-kvm.c (bsd_kvm_target_info): New.
8345 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8346 <info>: New.
8347 (bsd_kvm_target::open): Rename to ...
8348 (bsd_kvm_target_open): ... this. Adjust.
8349 * bsd-uthread.c (bsd_uthread_target_info): New.
8350 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8351 <info>: New.
8352 * corefile.c (core_file_command): Adjust.
8353 * corelow.c (core_target_info): New.
8354 (core_target) <shortname, longname, doc>: Delete.
8355 <info>: New.
8356 (core_target::open): Rename to ...
8357 (core_target_open): ... this. Adjust.
8358 * ctf.c (ctf_target_info): New.
8359 (ctf_target) <shortname, longname, doc>: Delete.
8360 <info>: New.
8361 (ctf_target::open): Rename to ...
8362 (ctf_target_open): ... this.
8363 (_initialize_ctf): Adjust.
8364 * exec.c (exec_target_info): New.
8365 (exec_target) <shortname, longname, doc>: Delete.
8366 <info>: New.
8367 (exec_target::open): Rename to ...
8368 (exec_target_open): ... this.
8369 * gdbcore.h (core_target_open): Declare.
8370 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8371 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8372 add_inf_child_target.
8373 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8374 add_inf_child_target.
8375 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8376 add_inf_child_target.
8377 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8378 add_inf_child_target.
8379 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8380 add_inf_child_target.
8381 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8382 add_inf_child_target.
8383 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8384 add_inf_child_target.
8385 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8386 add_inf_child_target.
8387 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8388 add_inf_child_target.
8389 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8390 add_inf_child_target.
8391 * inf-child.c (inf_child_target_info): New.
8392 (inf_child_target::info): New.
8393 (inf_child_open_target): Remove 'target' parameter. Use
8394 get_native_target instead.
8395 (inf_child_target::open): Delete.
8396 (add_inf_child_target): New.
8397 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8398 Delete.
8399 <info>: New.
8400 (add_inf_child_target): Declare.
8401 (inf_child_open_target): Declare.
8402 * linux-thread-db.c (thread_db_target_info): New.
8403 (thread_db_target) <shortname, longname, doc>: Delete.
8404 <info>: New.
8405 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8406 add_inf_child_target.
8407 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8408 add_inf_child_target.
8409 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8410 add_inf_child_target.
8411 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8412 add_inf_child_target.
8413 * make-target-delegates (print_class): Adjust.
8414 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8415 add_inf_child_target.
8416 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8417 add_inf_child_target.
8418 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8419 add_inf_child_target.
8420 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8421 add_inf_child_target.
8422 * nto-procfs.c (nto_native_target_info): New.
8423 (nto_procfs_target_native) <shortname, longname, doc>:
8424 Delete.
8425 <info>: New.
8426 (nto_procfs_target_info): New.
8427 (nto_procfs_target_procfs) <shortname, longname, doc>:
8428 Delete.
8429 <info>: New.
8430 (init_procfs_targets): Adjust.
8431 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8432 add_inf_child_target.
8433 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8434 add_inf_child_target.
8435 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8436 add_inf_child_target.
8437 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8438 add_inf_child_target.
8439 * ravenscar-thread.c (ravenscar_target_info): New.
8440 (ravenscar_thread_target) <shortname, longname, doc>:
8441 Delete.
8442 <info>: New.
8443 * record-btrace.c (record_btrace_target_info):
8444 (record_btrace_target) <shortname, longname, doc>: Delete.
8445 <info>: New.
8446 (record_btrace_target::open): Rename to ...
8447 (record_btrace_target_open): ... this. Adjust.
8448 * record-full.c (record_longname, record_doc): New.
8449 (record_full_base_target) <shortname, longname, doc>: Delete.
8450 <info>: New.
8451 (record_full_target_info): New.
8452 (record_full_target): <shortname>: Delete.
8453 <info>: New.
8454 (record_full_core_open_1, record_full_open_1): Update comments.
8455 (record_full_base_target::open): Rename to ...
8456 (record_full_open): ... this.
8457 (cmd_record_full_restore): Update.
8458 (_initialize_record_full): Update.
8459 * remote-sim.c (remote_sim_target_info): New.
8460 (gdbsim_target) <shortname, longname, doc>: Delete.
8461 <info>: New.
8462 (gdbsim_target::open): Rename to ...
8463 (gdbsim_target_open): ... this.
8464 (_initialize_remote_sim): Adjust.
8465 * remote.c (remote_doc): New.
8466 (remote_target_info): New.
8467 (remote_target) <shortname, longname, doc>: Delete.
8468 <info>: New.
8469 (extended_remote_target_info): New.
8470 (extended_remote_target) <shortname, longname, doc>: Delete.
8471 <info>: New.
8472 (remote_target::open_1): Make static. Adjust.
8473 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8474 * s390-linux-nat.c (_initialize_s390_nat): Use
8475 add_inf_child_target.
8476 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8477 add_inf_child_target.
8478 * sol-thread.c (thread_db_target_info): New.
8479 (sol_thread_target) <shortname, longname, doc>: Delete.
8480 <info>: New.
8481 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8482 add_inf_child_target.
8483 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8484 add_inf_child_target.
8485 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8486 add_inf_child_target.
8487 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8488 add_inf_child_target.
8489 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8490 add_inf_child_target.
8491 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8492 add_inf_child_target.
8493 * spu-linux-nat.c (_initialize_spu_nat): Use
8494 add_inf_child_target.
8495 * spu-multiarch.c (spu_multiarch_target_info): New.
8496 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8497 <info>: New.
8498 * target-delegates.c: Regenerate.
8499 * target.c: Include <unordered_map>.
8500 (target_ops_p): Delete.
8501 (DEF_VEC_P(target_ops_p)): Delete.
8502 (target_factories): New.
8503 (test_target_info): New.
8504 (test_target_ops::info): New.
8505 (open_target): Adjust to use target_factories.
8506 (add_target_with_completer): Rename to ...
8507 (add_target): ... this. Change prototype. Register target_info
8508 and open callback in target_factories. Register target_info in
8509 command context instead of target_ops.
8510 (add_target): Delete old implementation.
8511 (add_deprecated_target_alias): Change prototype. Adjust.
8512 (the_native_target): New.
8513 (set_native_target, get_native_target): New.
8514 (find_default_run_target): Use the_native_target.
8515 (find_attach_target, find_run_target): Simplify.
8516 (target_ops::open): Delete.
8517 (dummy_target_info): New.
8518 (dummy_target::shortname, dummy_target::longname)
8519 (dummy_target::doc): Delete.
8520 (dummy_target::info): New.
8521 (debug_target::shortname, debug_target::longname)
8522 (debug_target::doc): Delete.
8523 (debug_target::info): New.
8524 * target.h (struct target_info): New.
8525 (target_ops::~target_ops): Add comment.
8526 (target_ops::info): New.
8527 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8528 longer virtual. Implement in terms of target_info.
8529 (set_native_target, get_native_target): Declare.
8530 (target_open_ftype): New.
8531 (add_target, add_target_with_completer)
8532 (add_deprecated_target_alias): Change prototype.
8533 (test_target) <shortname, longname, doc>: Delete.
8534 <info>: New.
8535 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8536 add_inf_child_target.
8537 * tracefile-tfile.c (tfile_target_info): New.
8538 (tfile_target) <shortname, longname, doc>: Delete.
8539 <info>: New.
8540 (tfile_target::open): Rename to ...
8541 (tfile_target_open): ... this.
8542 (_initialize_tracefile_tfile): Adjust.
8543 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8544 add_inf_child_target.
8545 * windows-nat.c (_initialize_windows_nat): Use
8546 add_inf_child_target.
8547 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8548 add_inf_child_target.
8549
8550 2018-05-02 Pedro Alves <palves@redhat.com>
8551
8552 * linux-nat.h (linux_nat_target) <low_new_thread,
8553 low_delete_thread, low_new_fork, low_forget_process,
8554 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8555 New virtual methods.
8556 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8557 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8558 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8559 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8560 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8561 Delete.
8562 * linux-fork.c (delete_fork): Adjust to call low method.
8563 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8564 (linux_nat_new_fork, linux_nat_forget_process_hook)
8565 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8566 (linux_nat_status_is_event):
8567 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8568 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8569 to call low method.
8570 (sigtrap_is_event): Rename to ...
8571 (linux_nat_target::low_status_is_event): ... this.
8572 (linux_nat_set_status_is_event): Delete.
8573 (save_stop_reason, linux_nat_wait_1)
8574 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8575 low methods.
8576 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8577 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8578 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8579 (linux_nat_set_prepare_to_resume): Delete.
8580 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8581 low virtual methods.
8582 * amd64-linux-nat.c: Likewise.
8583 * arm-linux-nat.c: Likewise.
8584 * i386-linux-nat.c: Likewise.
8585 * ia64-linux-nat.c: Likewise.
8586 * mips-linux-nat.c: Likewise.
8587 * ppc-linux-nat.c: Likewise.
8588 * s390-linux-nat.c: Likewise.
8589 * sparc64-linux-nat.c: Likewise.
8590 * x86-linux-nat.c: Likewise.
8591 * x86-linux-nat.h: Include "nat/x86-linux.h".
8592 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8593 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8594 Override methods.
8595
8596 2018-05-02 Pedro Alves <palves@redhat.com>
8597
8598 * target.h (target_ops)
8599 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8600 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8601 stopped_by_watchpoint, have_continuable_watchpoint,
8602 stopped_data_address, watchpoint_addr_within_range,
8603 can_accel_watchpoint_condition, can_run, thread_alive,
8604 has_all_memory, has_memory, has_stack, has_registers,
8605 has_execution, can_async_p, is_async_p, supports_non_stop,
8606 always_non_stop_p, can_execute_reverse, supports_multi_process,
8607 supports_enable_disable_tracepoint,
8608 supports_disable_randomization, supports_string_tracing,
8609 supports_evaluation_of_breakpoint_conditions,
8610 can_run_breakpoint_commands, filesystem_is_local,
8611 can_download_tracepoint, get_trace_state_variable_value,
8612 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8613 record_is_replaying, record_will_replay,
8614 augmented_libraries_svr4_read>: Adjust to return bool.
8615 * aarch64-linux-nat.c: All implementations adjusted.
8616 * aix-thread.c: All implementations adjusted.
8617 * arm-linux-nat.c: All implementations adjusted.
8618 * breakpoint.c: All implementations adjusted.
8619 * bsd-kvm.c: All implementations adjusted.
8620 * bsd-uthread.c: All implementations adjusted.
8621 * corelow.c: All implementations adjusted.
8622 * ctf.c: All implementations adjusted.
8623 * darwin-nat.c: All implementations adjusted.
8624 * darwin-nat.h: All implementations adjusted.
8625 * exec.c: All implementations adjusted.
8626 * fbsd-nat.c: All implementations adjusted.
8627 * fbsd-nat.h: All implementations adjusted.
8628 * gnu-nat.c: All implementations adjusted.
8629 * gnu-nat.h: All implementations adjusted.
8630 * go32-nat.c: All implementations adjusted.
8631 * ia64-linux-nat.c: All implementations adjusted.
8632 * inf-child.c: All implementations adjusted.
8633 * inf-child.h: All implementations adjusted.
8634 * inf-ptrace.c: All implementations adjusted.
8635 * inf-ptrace.h: All implementations adjusted.
8636 * linux-nat.c: All implementations adjusted.
8637 * linux-nat.h: All implementations adjusted.
8638 * mips-linux-nat.c: All implementations adjusted.
8639 * nto-procfs.c: All implementations adjusted.
8640 * ppc-linux-nat.c: All implementations adjusted.
8641 * procfs.c: All implementations adjusted.
8642 * ravenscar-thread.c: All implementations adjusted.
8643 * record-btrace.c: All implementations adjusted.
8644 * record-full.c: All implementations adjusted.
8645 * remote-sim.c: All implementations adjusted.
8646 * remote.c: All implementations adjusted.
8647 * s390-linux-nat.c: All implementations adjusted.
8648 * sol-thread.c: All implementations adjusted.
8649 * spu-multiarch.c: All implementations adjusted.
8650 * target-delegates.c: All implementations adjusted.
8651 * target.c: All implementations adjusted.
8652 * target.h: All implementations adjusted.
8653 * tracefile-tfile.c: All implementations adjusted.
8654 * tracefile.c: All implementations adjusted.
8655 * tracefile.h: All implementations adjusted.
8656 * windows-nat.c: All implementations adjusted.
8657 * x86-linux-nat.h: All implementations adjusted.
8658 * x86-nat.h: All implementations adjusted.
8659
8660 2018-05-02 Pedro Alves <palves@redhat.com>
8661
8662 * make-target-delegates (scan_target_h): Don't trim lines here.
8663 Replace sequences of tabs and/or whitespace with a single
8664 whitespace.
8665 (top level, parsing methods): Trim each line before processing it
8666 here.
8667
8668 2018-05-02 Pedro Alves <palves@redhat.com>
8669 John Baldwin <jhb@freebsd.org>
8670
8671 * target.h (enum strata) <debug_stratum>: New.
8672 (struct target_ops) <all delegation methods>: Replace by C++
8673 virtual methods, and drop "to_" prefix. All references updated
8674 throughout.
8675 <to_shortname, to_longname, to_doc, to_data,
8676 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8677 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8678 virtual methods. All references updated throughout.
8679 <can_attach, supports_terminal_ours, can_create_inferior,
8680 get_thread_control_capabilities, attach_no_wait>: New
8681 virtual methods.
8682 <insert_breakpoint, remove_breakpoint>: Now
8683 TARGET_DEFAULT_NORETURN methods.
8684 <info_proc>: Now returns bool.
8685 <to_magic>: Delete.
8686 (OPS_MAGIC): Delete.
8687 (current_target): Delete. All references replaced by references
8688 to ...
8689 (target_stack): ... this. New.
8690 (target_shortname, target_longname): Adjust.
8691 (target_can_run): Now a function declaration.
8692 (default_child_has_all_memory, default_child_has_memory)
8693 (default_child_has_stack, default_child_has_registers)
8694 (default_child_has_execution): Remove target_ops parameter.
8695 (complete_target_initialization): Delete.
8696 (memory_breakpoint_target): New template class.
8697 (test_target_ops): Refactor as a C++ class with virtual methods.
8698 * make-target-delegates (NAME_PART): Tighten.
8699 (POINTER_PART, CP_SYMBOL): New.
8700 (SIMPLE_RETURN_PART): Reimplement.
8701 (VEC_RETURN_PART): Expect less.
8702 (RETURN_PART, VIRTUAL_PART): New.
8703 (METHOD): Adjust to C++ virtual methods.
8704 (scan_target_h): Remove reference to C99.
8705 (dname): Output "target_ops::" prefix.
8706 (write_function_header): Adjust to output a C++ class method.
8707 (write_declaration): New.
8708 (write_delegator): Adjust to output a C++ class method.
8709 (tdname): Output "dummy_target::" prefix.
8710 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8711 method.
8712 (tdefault_names, debug_names): Delete.
8713 (return_types, tdefaults, styles, argtypes_array): New.
8714 (top level): All methods are delegators.
8715 (print_class): New.
8716 (top level): Print dummy_target and debug_target classes.
8717 * target-delegates.c: Regenerate.
8718 * target-debug.h (target_debug_print_enum_info_proc_what)
8719 (target_debug_print_thread_control_capabilities)
8720 (target_debug_print_thread_info_p): New.
8721 * target.c (dummy_target): Delete.
8722 (the_dummy_target, the_debug_target): New.
8723 (target_stack): Now extern.
8724 (set_targetdebug): Push/unpush debug target.
8725 (default_child_has_all_memory, default_child_has_memory)
8726 (default_child_has_stack, default_child_has_registers)
8727 (default_child_has_execution): Remove target_ops parameter.
8728 (complete_target_initialization): Delete.
8729 (add_target_with_completer): No longer call
8730 complete_target_initialization.
8731 (target_supports_terminal_ours): Use regular delegation.
8732 (update_current_target): Delete.
8733 (push_target): No longer check magic number. Don't call
8734 update_current_target.
8735 (unpush_target): Don't call update_current_target.
8736 (target_is_pushed): No longer check magic number.
8737 (target_require_runnable): Skip for all stratums over
8738 process_stratum.
8739 (target_ops::info_proc): New.
8740 (target_info_proc): Use find_target_at and
8741 find_default_run_target.
8742 (target_supports_disable_randomization): Use regular delegation.
8743 (target_get_osdata): Use find_target_at.
8744 (target_ops::open, target_ops::close, target_ops::can_attach)
8745 (target_ops::attach, target_ops::can_create_inferior)
8746 (target_ops::create_inferior, target_ops::can_run)
8747 (target_can_run): New.
8748 (default_fileio_target): Use regular delegation.
8749 (target_ops::fileio_open, target_ops::fileio_pwrite)
8750 (target_ops::fileio_pread, target_ops::fileio_fstat)
8751 (target_ops::fileio_close, target_ops::fileio_unlink)
8752 (target_ops::fileio_readlink): New.
8753 (target_fileio_open_1, target_fileio_unlink)
8754 (target_fileio_readlink): Always call the target method. Handle
8755 FILEIO_ENOSYS.
8756 (return_zero, return_zero_has_execution): Delete.
8757 (init_dummy_target): Delete.
8758 (dummy_target::dummy_target, dummy_target::shortname)
8759 (dummy_target::longname, dummy_target::doc)
8760 (debug_target::debug_target, debug_target::shortname)
8761 (debug_target::longname, debug_target::doc): New.
8762 (target_supports_delete_record): Use regular delegation.
8763 (setup_target_debug): Delete.
8764 (maintenance_print_target_stack): Skip debug_stratum.
8765 (initialize_targets): Instantiate the_dummy_target and
8766 the_debug_target.
8767 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8768 use target_stack.
8769 (target_auxv_search, fprint_target_auxv): Adjust.
8770 (info_auxv_command): Adjust to use target_stack.
8771 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8772 * exceptions.c (print_flush): Handle a NULL target_stack.
8773 * regcache.c (target_ops_no_register): Refactor as class with
8774 virtual methods.
8775
8776 * exec.c (exec_target): New class.
8777 (exec_ops): Now an exec_target.
8778 (exec_open, exec_close_1, exec_get_section_table)
8779 (exec_xfer_partial, exec_files_info, exec_has_memory)
8780 (exec_make_note_section): Refactor as exec_target methods.
8781 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8782 Delete.
8783 (exec_target::find_memory_regions): New.
8784 (_initialize_exec): Don't call init_exec_ops.
8785 * gdbcore.h (exec_file_clear): Delete.
8786
8787 * corefile.c (core_target): Delete.
8788 (core_file_command): Adjust.
8789 * corelow.c (core_target): New class.
8790 (the_core_target): New.
8791 (core_close): Remove target_ops parameter.
8792 (core_close_cleanup): Adjust.
8793 (core_target::close): New.
8794 (core_open, core_detach, get_core_registers, core_files_info)
8795 (core_xfer_partial, core_thread_alive, core_read_description)
8796 (core_pid_to_str, core_thread_name, core_has_memory)
8797 (core_has_stack, core_has_registers, core_info_proc): Rework as
8798 core_target methods.
8799 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8800 (_initialize_corelow): Initialize the_core_target.
8801 * gdbcore.h (core_target): Delete.
8802 (the_core_target): New.
8803
8804 * ctf.c: (ctf_target): New class.
8805 (ctf_ops): Now a ctf_target.
8806 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8807 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8808 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8809 methods.
8810 (init_ctf_ops): Delete.
8811 (_initialize_ctf): Don't call it.
8812 * tracefile-tfile.c (tfile_target): New class.
8813 (tfile_ops): Now a tfile_target.
8814 (tfile_open, tfile_close, tfile_files_info)
8815 (tfile_get_tracepoint_status, tfile_trace_find)
8816 (tfile_fetch_registers, tfile_xfer_partial)
8817 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8818 Refactor as tfile_target methods.
8819 (tfile_xfer_partial_features): Remove target_ops parameter.
8820 (init_tfile_ops): Delete.
8821 (_initialize_tracefile_tfile): Don't call it.
8822 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8823 (tracefile_has_stack, tracefile_has_registers)
8824 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8825 tracefile_target methods.
8826 (init_tracefile_ops): Delete.
8827 (tracefile_target::tracefile_target): New.
8828 * tracefile.h: Include "target.h".
8829 (tracefile_target): New class.
8830 (init_tracefile_ops): Delete.
8831
8832 * spu-multiarch.c (spu_multiarch_target): New class.
8833 (spu_ops): Now a spu_multiarch_target.
8834 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8835 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8836 (spu_search_memory, spu_mourn_inferior): Refactor as
8837 spu_multiarch_target methods.
8838 (init_spu_ops): Delete.
8839 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8840 complete_target_initialization.
8841
8842 * ravenscar-thread.c (ravenscar_thread_target): New class.
8843 (ravenscar_ops): Now a ravenscar_thread_target.
8844 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8845 (ravenscar_thread_alive, ravenscar_pid_to_str)
8846 (ravenscar_fetch_registers, ravenscar_store_registers)
8847 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8848 (ravenscar_stopped_by_hw_breakpoint)
8849 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8850 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8851 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8852 methods.
8853 (init_ravenscar_thread_ops): Delete.
8854 (_initialize_ravenscar): Remove references to
8855 init_ravenscar_thread_ops and complete_target_initialization.
8856
8857 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8858 (bsd_uthread_target): New class.
8859 (bsd_uthread_ops): Now a bsd_uthread_target.
8860 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8861 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8862 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8863 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8864 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8865 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8866 (bsd_uthread_target): Delete function.
8867 (_initialize_bsd_uthread): Remove reference to
8868 complete_target_initialization.
8869
8870 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8871 (target_bfd): ... this new class.
8872 (target_bfd_xfer_partial, target_bfd_get_section_table)
8873 (target_bfd_close): Refactor as target_bfd methods.
8874 (target_bfd::~target_bfd): New.
8875 (target_bfd_reopen): Adjust.
8876 (target_bfd::close): New.
8877
8878 * record-btrace.c (record_btrace_target): New class.
8879 (record_btrace_ops): Now a record_btrace_target.
8880 (record_btrace_open, record_btrace_stop_recording)
8881 (record_btrace_disconnect, record_btrace_close)
8882 (record_btrace_async, record_btrace_info)
8883 (record_btrace_insn_history, record_btrace_insn_history_range)
8884 (record_btrace_insn_history_from, record_btrace_call_history)
8885 (record_btrace_call_history_range)
8886 (record_btrace_call_history_from, record_btrace_record_method)
8887 (record_btrace_is_replaying, record_btrace_will_replay)
8888 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8889 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8890 (record_btrace_store_registers, record_btrace_prepare_to_store)
8891 (record_btrace_to_get_unwinder)
8892 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8893 (record_btrace_commit_resume, record_btrace_wait)
8894 (record_btrace_stop, record_btrace_can_execute_reverse)
8895 (record_btrace_stopped_by_sw_breakpoint)
8896 (record_btrace_supports_stopped_by_sw_breakpoint)
8897 (record_btrace_stopped_by_hw_breakpoint)
8898 (record_btrace_supports_stopped_by_hw_breakpoint)
8899 (record_btrace_update_thread_list, record_btrace_thread_alive)
8900 (record_btrace_goto_begin, record_btrace_goto_end)
8901 (record_btrace_goto, record_btrace_stop_replaying_all)
8902 (record_btrace_execution_direction)
8903 (record_btrace_prepare_to_generate_core)
8904 (record_btrace_done_generating_core): Refactor as
8905 record_btrace_target methods.
8906 (init_record_btrace_ops): Delete.
8907 (_initialize_record_btrace): Remove reference to
8908 init_record_btrace_ops.
8909 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8910 the execution_direction global.
8911 (record_full_base_target, record_full_target)
8912 (record_full_core_target): New classes.
8913 (record_full_ops): Now a record_full_target.
8914 (record_full_core_ops): Now a record_full_core_target.
8915 (record_full_target::detach, record_full_target::disconnect)
8916 (record_full_core_target::disconnect)
8917 (record_full_target::mourn_inferior, record_full_target::kill):
8918 New.
8919 (record_full_open, record_full_close, record_full_async): Refactor
8920 as methods of the record_full_base_target class.
8921 (record_full_resume, record_full_commit_resume): Refactor
8922 as methods of the record_full_target class.
8923 (record_full_wait, record_full_stopped_by_watchpoint)
8924 (record_full_stopped_data_address)
8925 (record_full_stopped_by_sw_breakpoint)
8926 (record_full_supports_stopped_by_sw_breakpoint)
8927 (record_full_stopped_by_hw_breakpoint)
8928 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8929 methods of the record_full_base_target class.
8930 (record_full_store_registers, record_full_xfer_partial)
8931 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8932 Refactor as methods of the record_full_target class.
8933 (record_full_can_execute_reverse, record_full_get_bookmark)
8934 (record_full_goto_bookmark, record_full_execution_direction)
8935 (record_full_record_method, record_full_info, record_full_delete)
8936 (record_full_is_replaying, record_full_will_replay)
8937 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8938 (record_full_stop_replaying): Refactor as methods of the
8939 record_full_base_target class.
8940 (record_full_core_resume, record_full_core_kill)
8941 (record_full_core_fetch_registers)
8942 (record_full_core_prepare_to_store)
8943 (record_full_core_store_registers, record_full_core_xfer_partial)
8944 (record_full_core_insert_breakpoint)
8945 (record_full_core_remove_breakpoint)
8946 (record_full_core_has_execution): Refactor
8947 as methods of the record_full_core_target class.
8948 (record_full_base_target::supports_delete_record): New.
8949 (init_record_full_ops): Delete.
8950 (init_record_full_core_ops): Delete.
8951 (record_full_save): Refactor as method of the
8952 record_full_base_target class.
8953 (_initialize_record_full): Remove references to
8954 init_record_full_ops and init_record_full_core_ops.
8955
8956 * remote.c (remote_target, extended_remote_target): New classes.
8957 (remote_ops): Now a remote_target.
8958 (extended_remote_ops): Now an extended_remote_target.
8959 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8960 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8961 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8962 (remote_pass_signals, remote_set_syscall_catchpoint)
8963 (remote_program_signals, )
8964 (remote_thread_always_alive): Remove target_ops parameter.
8965 (remote_thread_alive, remote_thread_name)
8966 (remote_update_thread_list, remote_threads_extra_info)
8967 (remote_static_tracepoint_marker_at)
8968 (remote_static_tracepoint_markers_by_strid)
8969 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8970 (remote_open): Refactor as methods of remote_target.
8971 (extended_remote_open, extended_remote_detach)
8972 (extended_remote_attach, extended_remote_post_attach):
8973 (extended_remote_supports_disable_randomization)
8974 (extended_remote_create_inferior): : Refactor as method of
8975 extended_remote_target.
8976 (remote_set_permissions, remote_open_1, remote_detach)
8977 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8978 (remote_resume, remote_commit_resume, remote_stop)
8979 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8980 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8981 (remote_prepare_to_store, remote_store_registers)
8982 (remote_flash_erase, remote_flash_done, remote_files_info)
8983 (remote_kill, remote_mourn, remote_insert_breakpoint)
8984 (remote_remove_breakpoint, remote_insert_watchpoint)
8985 (remote_watchpoint_addr_within_range)
8986 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8987 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8988 (remote_supports_stopped_by_sw_breakpoint)
8989 (remote_stopped_by_hw_breakpoint)
8990 (remote_supports_stopped_by_hw_breakpoint)
8991 (remote_stopped_by_watchpoint, remote_stopped_data_address)
8992 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8993 (remote_verify_memory): Refactor as methods of remote_target.
8994 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8995 parameter.
8996 (remote_xfer_partial, remote_get_memory_xfer_limit)
8997 (remote_search_memory, remote_rcmd, remote_memory_map)
8998 (remote_pid_to_str, remote_get_thread_local_address)
8999 (remote_get_tib_address, remote_read_description): Refactor as
9000 methods of remote_target.
9001 (remote_target::fileio_open, remote_target::fileio_pwrite)
9002 (remote_target::fileio_pread, remote_target::fileio_close): New.
9003 (remote_hostio_readlink, remote_hostio_fstat)
9004 (remote_filesystem_is_local, remote_can_execute_reverse)
9005 (remote_supports_non_stop, remote_supports_disable_randomization)
9006 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9007 (remote_supports_enable_disable_tracepoint)
9008 (remote_supports_string_tracing)
9009 (remote_can_run_breakpoint_commands, remote_trace_init)
9010 (remote_download_tracepoint, remote_can_download_tracepoint)
9011 (remote_download_trace_state_variable, remote_enable_tracepoint)
9012 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9013 (remote_trace_start, remote_get_trace_status)
9014 (remote_get_tracepoint_status, remote_trace_stop)
9015 (remote_trace_find, remote_get_trace_state_variable_value)
9016 (remote_save_trace_data, remote_get_raw_trace_data)
9017 (remote_set_disconnected_tracing, remote_core_of_thread)
9018 (remote_set_circular_trace_buffer, remote_traceframe_info)
9019 (remote_get_min_fast_tracepoint_insn_len)
9020 (remote_set_trace_buffer_size, remote_set_trace_notes)
9021 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9022 (remote_disable_btrace, remote_teardown_btrace)
9023 (remote_read_btrace, remote_btrace_conf)
9024 (remote_augmented_libraries_svr4_read, remote_load)
9025 (remote_pid_to_exec_file, remote_can_do_single_step)
9026 (remote_execution_direction, remote_thread_handle_to_thread_info):
9027 Refactor as methods of remote_target.
9028 (init_remote_ops, init_extended_remote_ops): Delete.
9029 (remote_can_async_p, remote_is_async_p, remote_async)
9030 (remote_thread_events, remote_upload_tracepoints)
9031 (remote_upload_trace_state_variables): Refactor as methods of
9032 remote_target.
9033 (_initialize_remote): Remove references to init_remote_ops and
9034 init_extended_remote_ops.
9035
9036 * remote-sim.c (gdbsim_target): New class.
9037 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9038 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9039 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9040 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9041 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9042 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9043 Refactor as methods of gdbsim_target.
9044 (gdbsim_ops): Now a gdbsim_target.
9045 (init_gdbsim_ops): Delete.
9046 (gdbsim_cntrl_c): Adjust.
9047 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9048
9049 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9050 (the_amd64_linux_nat_target): New.
9051 (amd64_linux_fetch_inferior_registers)
9052 (amd64_linux_store_inferior_registers): Refactor as methods of
9053 amd64_linux_nat_target.
9054 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9055 * i386-linux-nat.c: Don't include "linux-nat.h".
9056 (i386_linux_nat_target): New class.
9057 (the_i386_linux_nat_target): New.
9058 (i386_linux_fetch_inferior_registers)
9059 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9060 as methods of i386_linux_nat_target.
9061 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9062 * inf-child.c (inf_child_ops): Delete.
9063 (inf_child_fetch_inferior_registers)
9064 (inf_child_store_inferior_registers): Delete.
9065 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9066 methods of inf_child_target.
9067 (inf_child_target::supports_terminal_ours)
9068 (inf_child_target::terminal_init)
9069 (inf_child_target::terminal_inferior)
9070 (inf_child_target::terminal_ours_for_output)
9071 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9072 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9073 New.
9074 (inf_child_open, inf_child_disconnect, inf_child_close)
9075 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9076 (inf_child_post_startup_inferior, inf_child_can_run)
9077 (inf_child_pid_to_exec_file): Refactor as methods of
9078 inf_child_target.
9079 (inf_child_follow_fork): Delete.
9080 (inf_child_target::can_create_inferior)
9081 (inf_child_target::can_attach): New.
9082 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9083 (inf_child_target::has_stack, inf_child_target::has_registers)
9084 (inf_child_target::has_execution): New.
9085 (inf_child_fileio_open, inf_child_fileio_pwrite)
9086 (inf_child_fileio_pread, inf_child_fileio_fstat)
9087 (inf_child_fileio_close, inf_child_fileio_unlink)
9088 (inf_child_fileio_readlink, inf_child_use_agent)
9089 (inf_child_can_use_agent): Refactor as methods of
9090 inf_child_target.
9091 (return_zero, inf_child_target): Delete.
9092 (inf_child_target::inf_child_target): New.
9093 * inf-child.h: Include "target.h".
9094 (inf_child_target): Delete function prototype.
9095 (inf_child_target): New class.
9096 (inf_child_open_target, inf_child_mourn_inferior)
9097 (inf_child_maybe_unpush_target): Delete.
9098 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9099 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9100 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9101 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9102 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9103 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9104 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9105 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9106 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9107 methods of inf_ptrace_target.
9108 (inf_ptrace_target): Delete function.
9109 * inf-ptrace.h: Include "inf-child.h".
9110 (inf_ptrace_target): Delete function declaration.
9111 (inf_ptrace_target): New class.
9112 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9113 * linux-nat.c (linux_target): New.
9114 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9115 (linux_nat_target::~linux_nat_target): New.
9116 (linux_child_post_attach, linux_child_post_startup_inferior)
9117 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9118 (linux_child_remove_fork_catchpoint)
9119 (linux_child_insert_vfork_catchpoint)
9120 (linux_child_remove_vfork_catchpoint)
9121 (linux_child_insert_exec_catchpoint)
9122 (linux_child_remove_exec_catchpoint)
9123 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9124 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9125 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9126 (linux_nat_stopped_data_address)
9127 (linux_nat_stopped_by_sw_breakpoint)
9128 (linux_nat_supports_stopped_by_sw_breakpoint)
9129 (linux_nat_stopped_by_hw_breakpoint)
9130 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9131 (linux_nat_kill, linux_nat_mourn_inferior)
9132 (linux_nat_xfer_partial, linux_nat_thread_alive)
9133 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9134 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9135 (linux_child_static_tracepoint_markers_by_strid)
9136 (linux_nat_is_async_p, linux_nat_can_async_p)
9137 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9138 (linux_nat_supports_multi_process)
9139 (linux_nat_supports_disable_randomization, linux_nat_async)
9140 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9141 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9142 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9143 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9144 methods of linux_nat_target.
9145 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9146 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9147 parameter.
9148 (check_stopped_by_watchpoint): Adjust.
9149 (linux_xfer_partial): Delete.
9150 (linux_target_install_ops, linux_target, linux_nat_add_target):
9151 Delete.
9152 (linux_nat_target::linux_nat_target): New.
9153 * linux-nat.h: Include "inf-ptrace.h".
9154 (linux_nat_target): New.
9155 (linux_target, linux_target_install_ops, linux_nat_add_target):
9156 Delete function declarations.
9157 (linux_target): Declare global.
9158 * linux-thread-db.c (thread_db_target): New.
9159 (thread_db_target::thread_db_target): New.
9160 (thread_db_ops): Delete.
9161 (the_thread_db_target): New.
9162 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9163 (thread_db_update_thread_list, thread_db_pid_to_str)
9164 (thread_db_extra_thread_info)
9165 (thread_db_thread_handle_to_thread_info)
9166 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9167 (thread_db_resume): Refactor as methods of thread_db_target.
9168 (init_thread_db_ops): Delete.
9169 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9170 * x86-linux-nat.c: Don't include "linux-nat.h".
9171 (super_post_startup_inferior): Delete.
9172 (x86_linux_nat_target::~x86_linux_nat_target): New.
9173 (x86_linux_child_post_startup_inferior)
9174 (x86_linux_read_description, x86_linux_enable_btrace)
9175 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9176 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9177 methods of x86_linux_nat_target.
9178 (x86_linux_create_target): Delete. Bits folded ...
9179 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9180 pointer.
9181 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9182 (x86_linux_nat_target): New class.
9183 (x86_linux_create_target): Delete.
9184 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9185 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9186 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9187 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9188 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9189 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9190 make extern.
9191 (x86_use_watchpoints): Delete.
9192 * x86-nat.h: Include "breakpoint.h" and "target.h".
9193 (x86_use_watchpoints): Delete.
9194 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9195 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9196 (x86_insert_watchpoint, x86_remove_watchpoint)
9197 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9198 (x86_stopped_by_hw_breakpoint): New declarations.
9199 (x86_nat_target): New template class.
9200
9201 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9202 (the_ppc_linux_nat_target): New.
9203 (ppc_linux_fetch_inferior_registers)
9204 (ppc_linux_can_use_hw_breakpoint)
9205 (ppc_linux_region_ok_for_hw_watchpoint)
9206 (ppc_linux_ranged_break_num_registers)
9207 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9208 (ppc_linux_insert_mask_watchpoint)
9209 (ppc_linux_remove_mask_watchpoint)
9210 (ppc_linux_can_accel_watchpoint_condition)
9211 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9212 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9213 (ppc_linux_watchpoint_addr_within_range)
9214 (ppc_linux_masked_watch_num_registers)
9215 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9216 (ppc_linux_read_description): Refactor as methods of
9217 ppc_linux_nat_target.
9218 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9219
9220 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9221 (procfs_target): New class.
9222 (the_procfs_target): New.
9223 (procfs_target): Delete function.
9224 (procfs_auxv_parse, procfs_attach, procfs_detach)
9225 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9226 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9227 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9228 (procfs_create_inferior, procfs_update_thread_list)
9229 (procfs_thread_alive, procfs_pid_to_str)
9230 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9231 (procfs_stopped_data_address, procfs_insert_watchpoint)
9232 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9233 (proc_find_memory_regions, procfs_info_proc)
9234 (procfs_make_note_section): Refactor as methods of procfs_target.
9235 (_initialize_procfs): Adjust.
9236 * sol-thread.c (sol_thread_target): New class.
9237 (sol_thread_ops): Now a sol_thread_target.
9238 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9239 (sol_thread_fetch_registers, sol_thread_store_registers)
9240 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9241 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9242 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9243 (init_sol_thread_ops): Delete.
9244 (_initialize_sol_thread): Adjust. Remove references to
9245 init_sol_thread_ops and complete_target_initialization.
9246
9247 * windows-nat.c (windows_nat_target): New class.
9248 (windows_fetch_inferior_registers)
9249 (windows_store_inferior_registers, windows_resume, windows_wait)
9250 (windows_attach, windows_detach, windows_pid_to_exec_file)
9251 (windows_files_info, windows_create_inferior)
9252 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9253 (windows_close, windows_pid_to_str, windows_xfer_partial)
9254 (windows_get_tib_address, windows_get_ada_task_ptid)
9255 (windows_thread_name, windows_thread_alive): Refactor as
9256 windows_nat_target methods.
9257 (do_initial_windows_stuff): Adjust.
9258 (windows_target): Delete function.
9259 (_initialize_windows_nat): Adjust.
9260
9261 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9262 (darwin_mourn_inferior, darwin_kill_inferior)
9263 (darwin_create_inferior, darwin_attach, darwin_detach)
9264 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9265 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9266 (darwin_supports_multi_process): Refactor as darwin_nat_target
9267 methods.
9268 (darwin_resume_to, darwin_files_info): Delete.
9269 (_initialize_darwin_inferior): Rename to ...
9270 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9271 * darwin-nat.h: Include "inf-child.h".
9272 (darwin_nat_target): New class.
9273 (darwin_complete_target): Delete.
9274 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9275 (darwin_target): New.
9276 (i386_darwin_fetch_inferior_registers)
9277 (i386_darwin_store_inferior_registers): Refactor as methods of
9278 darwin_nat_target.
9279 (darwin_complete_target): Delete, with ...
9280 (_initialize_i386_darwin_nat): ... bits factored out here.
9281
9282 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9283 (the_alpha_linux_nat_target): New.
9284 (alpha_linux_register_u_offset): Refactor as
9285 alpha_linux_nat_target method.
9286 (_initialize_alpha_linux_nat): Adjust.
9287 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9288 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9289 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9290 methods of linux_nat_trad_target.
9291 (linux_trad_target): Delete.
9292 * linux-nat-trad.h (linux_trad_target): Delete function.
9293 (linux_nat_trad_target): New class.
9294 * mips-linux-nat.c (mips_linux_nat_target): New class.
9295 (super_fetch_registers, super_store_registers, super_close):
9296 Delete.
9297 (the_mips_linux_nat_target): New.
9298 (mips64_linux_regsets_fetch_registers)
9299 (mips64_linux_regsets_store_registers)
9300 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9301 (mips_linux_register_u_offset, mips_linux_read_description)
9302 (mips_linux_can_use_hw_breakpoint)
9303 (mips_linux_stopped_by_watchpoint)
9304 (mips_linux_stopped_data_address)
9305 (mips_linux_region_ok_for_hw_watchpoint)
9306 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9307 (mips_linux_close): Refactor as methods of mips_linux_nat.
9308 (_initialize_mips_linux_nat): Adjust to C++ification.
9309
9310 * aix-thread.c (aix_thread_target): New class.
9311 (aix_thread_ops): Now an aix_thread_target.
9312 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9313 (aix_thread_fetch_registers, aix_thread_store_registers)
9314 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9315 (aix_thread_thread_alive, aix_thread_pid_to_str)
9316 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9317 Refactor as methods of aix_thread_target.
9318 (init_aix_thread_ops): Delete.
9319 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9320 and complete_target_initialization.
9321 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9322 (rs6000_nat_target): New class.
9323 (the_rs6000_nat_target): New.
9324 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9325 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9326 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9327 (super_create_inferior): Delete.
9328 (_initialize_rs6000_nat): Adjust to C++ification.
9329
9330 * arm-linux-nat.c (arm_linux_nat_target): New class.
9331 (the_arm_linux_nat_target): New.
9332 (arm_linux_fetch_inferior_registers)
9333 (arm_linux_store_inferior_registers, arm_linux_read_description)
9334 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9335 (arm_linux_remove_hw_breakpoint)
9336 (arm_linux_region_ok_for_hw_watchpoint)
9337 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9338 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9339 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9340 arm_linux_nat_target.
9341 (_initialize_arm_linux_nat): Adjust to C++ification.
9342
9343 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9344 (the_aarch64_linux_nat_target): New.
9345 (aarch64_linux_fetch_inferior_registers)
9346 (aarch64_linux_store_inferior_registers)
9347 (aarch64_linux_child_post_startup_inferior)
9348 (aarch64_linux_read_description)
9349 (aarch64_linux_can_use_hw_breakpoint)
9350 (aarch64_linux_insert_hw_breakpoint)
9351 (aarch64_linux_remove_hw_breakpoint)
9352 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9353 (aarch64_linux_region_ok_for_hw_watchpoint)
9354 (aarch64_linux_stopped_data_address)
9355 (aarch64_linux_stopped_by_watchpoint)
9356 (aarch64_linux_watchpoint_addr_within_range)
9357 (aarch64_linux_can_do_single_step): Refactor as methods of
9358 aarch64_linux_nat_target.
9359 (super_post_startup_inferior): Delete.
9360 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9361
9362 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9363 (the_hppa_linux_nat_target): New.
9364 (hppa_linux_fetch_inferior_registers)
9365 (hppa_linux_store_inferior_registers): Refactor as methods of
9366 hppa_linux_nat_target.
9367 (_initialize_hppa_linux_nat): Adjust to C++ification.
9368
9369 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9370 (the_ia64_linux_nat_target): New.
9371 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9372 (ia64_linux_stopped_data_address)
9373 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9374 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9375 ia64_linux_nat_target methods.
9376 (super_xfer_partial): Delete.
9377 (_initialize_ia64_linux_nat): Adjust to C++ification.
9378
9379 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9380 (the_m32r_linux_nat_target): New.
9381 (m32r_linux_fetch_inferior_registers)
9382 (m32r_linux_store_inferior_registers): Refactor as
9383 m32r_linux_nat_target methods.
9384 (_initialize_m32r_linux_nat): Adjust to C++ification.
9385
9386 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9387 (the_m68k_linux_nat_target): New.
9388 (m68k_linux_fetch_inferior_registers)
9389 (m68k_linux_store_inferior_registers): Refactor as
9390 m68k_linux_nat_target methods.
9391 (_initialize_m68k_linux_nat): Adjust to C++ification.
9392
9393 * s390-linux-nat.c (s390_linux_nat_target): New class.
9394 (the_s390_linux_nat_target): New.
9395 (s390_linux_fetch_inferior_registers)
9396 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9397 (s390_insert_watchpoint, s390_remove_watchpoint)
9398 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9399 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9400 (s390_auxv_parse, s390_read_description): Refactor as methods of
9401 s390_linux_nat_target.
9402 (_initialize_s390_nat): Adjust to C++ification.
9403
9404 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9405 (the_sparc_linux_nat_target): New.
9406 (_initialize_sparc_linux_nat): Adjust to C++ification.
9407 * sparc-nat.c (sparc_fetch_inferior_registers)
9408 (sparc_store_inferior_registers): Remove target_ops parameter.
9409 * sparc-nat.h (sparc_fetch_inferior_registers)
9410 (sparc_store_inferior_registers): Remove target_ops parameter.
9411 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9412 (the_sparc64_linux_nat_target): New.
9413 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9414
9415 * spu-linux-nat.c (spu_linux_nat_target): New class.
9416 (the_spu_linux_nat_target): New.
9417 (spu_child_post_startup_inferior, spu_child_post_attach)
9418 (spu_child_wait, spu_fetch_inferior_registers)
9419 (spu_store_inferior_registers, spu_xfer_partial)
9420 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9421 methods.
9422 (_initialize_spu_nat): Adjust to C++ification.
9423
9424 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9425 (the_tilegx_linux_nat_target): New.
9426 (fetch_inferior_registers, store_inferior_registers):
9427 Refactor as methods.
9428 (_initialize_tile_linux_nat): Adjust to C++ification.
9429
9430 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9431 (the_xtensa_linux_nat_target): New.
9432 (xtensa_linux_fetch_inferior_registers)
9433 (xtensa_linux_store_inferior_registers): Refactor as
9434 xtensa_linux_nat_target methods.
9435 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9436
9437 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9438 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9439 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9440 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9441 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9442 (fbsd_stopped_by_sw_breakpoint)
9443 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9444 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9445 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9446 (fbsd_post_startup_inferior, fbsd_post_attach)
9447 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9448 (fbsd_set_syscall_catchpoint)
9449 (super_xfer_partial, super_resume, super_wait)
9450 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9451 (fbsd_handle_debug_trap): Remove target_ops parameter.
9452 (fbsd_nat_add_target): Delete.
9453 * fbsd-nat.h: Include "inf-ptrace.h".
9454 (fbsd_nat_add_target): Delete.
9455 (USE_SIGTRAP_SIGINFO): Define.
9456 (fbsd_nat_target): New class.
9457
9458 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9459 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9460 (amd64bsd_target): Delete.
9461 * amd64-bsd-nat.h: New file.
9462 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9463 "x86-bsd-nat.h".
9464 (amd64_fbsd_nat_target): New class.
9465 (the_amd64_fbsd_nat_target): New.
9466 (amd64fbsd_read_description): Refactor as method of
9467 amd64_fbsd_nat_target.
9468 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9469 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9470 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9471 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9472 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9473 (i386bsd_target): Delete.
9474 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9475 (i386bsd_fetch_inferior_registers)
9476 (i386bsd_store_inferior_registers): Declare.
9477 (i386_bsd_nat_target): New class.
9478 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9479 (the_i386_fbsd_nat_target): New.
9480 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9481 i386_fbsd_nat_target methods.
9482 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9483 (_initialize_i386fbsd_nat): Adjust to C++ification.
9484 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9485 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9486 (_initialize_x86_bsd_nat): Adjust to C++ification.
9487 * x86-bsd-nat.h: Include "x86-nat.h".
9488 (x86bsd_target): Delete declaration.
9489 (x86bsd_nat_target): New class.
9490
9491 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9492 (the_aarch64_fbsd_nat_target): New.
9493 (aarch64_fbsd_fetch_inferior_registers)
9494 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9495 aarch64_fbsd_nat_target.
9496 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9497 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9498 (the_alpha_bsd_nat_target): New.
9499 (alphabsd_fetch_inferior_registers)
9500 (alphabsd_store_inferior_registers): Refactor as
9501 alpha_bsd_nat_target methods.
9502 (_initialize_alphabsd_nat): Refactor as methods of
9503 alpha_bsd_nat_target.
9504 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9505 (the_amd64_nbsd_nat_target): New.
9506 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9507 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9508 (the_amd64_obsd_nat_target): New.
9509 (_initialize_amd64obsd_nat): Adjust to C++ification.
9510 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9511 (the_arm_fbsd_nat_target): New.
9512 (arm_fbsd_fetch_inferior_registers)
9513 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9514 (_initialize_arm_fbsd_nat): Refactor as methods of
9515 arm_fbsd_nat_target.
9516 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9517 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9518 (the_arm_netbsd_nat_target): New.
9519 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9520 arm_netbsd_nat_target.
9521 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9522 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9523 (the_hppa_nbsd_nat_target): New.
9524 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9525 hppa_nbsd_nat_target methods.
9526 (_initialize_hppanbsd_nat): Adjust to C++ification.
9527 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9528 (the_hppa_obsd_nat_target): New.
9529 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9530 methods of hppa_obsd_nat_target.
9531 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9532 add_target.
9533 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9534 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9535 add_target.
9536 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9537 (_initialize_i386obsd_nat): Use add_target.
9538 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9539 (the_m68k_bsd_nat_target): New.
9540 (m68kbsd_fetch_inferior_registers)
9541 (m68kbsd_store_inferior_registers): Refactor as methods of
9542 m68k_bsd_nat_target.
9543 (_initialize_m68kbsd_nat): Adjust to C++ification.
9544 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9545 (the_mips_fbsd_nat_target): New.
9546 (mips_fbsd_fetch_inferior_registers)
9547 (mips_fbsd_store_inferior_registers): Refactor as methods of
9548 mips_fbsd_nat_target.
9549 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9550 add_target.
9551 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9552 (the_mips_nbsd_nat_target): New.
9553 (mipsnbsd_fetch_inferior_registers)
9554 (mipsnbsd_store_inferior_registers): Refactor as methods of
9555 mips_nbsd_nat_target.
9556 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9557 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9558 (the_mips64_obsd_nat_target): New.
9559 (mips64obsd_fetch_inferior_registers)
9560 (mips64obsd_store_inferior_registers): Refactor as methods of
9561 mips64_obsd_nat_target.
9562 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9563 add_target.
9564 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9565 nbsd_nat_target.
9566 * nbsd-nat.h: Include "inf-ptrace.h".
9567 (nbsd_nat_target): New class.
9568 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9569 (obsd_wait): Refactor as methods of obsd_nat_target.
9570 (obsd_add_target): Delete.
9571 * obsd-nat.h: Include "inf-ptrace.h".
9572 (obsd_nat_target): New class.
9573 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9574 (the_ppc_fbsd_nat_target): New.
9575 (ppcfbsd_fetch_inferior_registers)
9576 (ppcfbsd_store_inferior_registers): Refactor as methods of
9577 ppc_fbsd_nat_target.
9578 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9579 add_target.
9580 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9581 (the_ppc_nbsd_nat_target): New.
9582 (ppcnbsd_fetch_inferior_registers)
9583 (ppcnbsd_store_inferior_registers): Refactor as methods of
9584 ppc_nbsd_nat_target.
9585 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9586 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9587 (the_ppc_obsd_nat_target): New.
9588 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9589 methods of ppc_obsd_nat_target.
9590 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9591 add_target.
9592 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9593 (the_sh_nbsd_nat_target): New.
9594 (shnbsd_fetch_inferior_registers)
9595 (shnbsd_store_inferior_registers): Refactor as methods of
9596 sh_nbsd_nat_target.
9597 (_initialize_shnbsd_nat): Adjust to C++ification.
9598 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9599 (inf_ptrace_xfer_partial): Delete.
9600 (sparc_xfer_partial, sparc_target): Delete.
9601 * sparc-nat.h (sparc_fetch_inferior_registers)
9602 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9603 (sparc_target): Delete function declaration.
9604 (sparc_target): New template class.
9605 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9606 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9607 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9608 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9609 add_target.
9610 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9611 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9612 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9613 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9614 add_target.
9615 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9616 (the_vax_bsd_nat_target): New.
9617 (vaxbsd_fetch_inferior_registers)
9618 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9619 methods.
9620 (_initialize_vaxbsd_nat): Adjust to C++ification.
9621
9622 * bsd-kvm.c (bsd_kvm_target): New class.
9623 (bsd_kvm_ops): Now a bsd_kvm_target.
9624 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9625 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9626 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9627 bsd_kvm_target.
9628 (bsd_kvm_return_one): Delete.
9629 (bsd_kvm_add_target): Adjust to C++ification.
9630
9631 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9632 (nto_procfs_target_procfs): New classes.
9633 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9634 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9635 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9636 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9637 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9638 (procfs_remove_hw_breakpoint, procfs_resume)
9639 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9640 (procfs_kill_inferior, procfs_store_registers)
9641 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9642 as methods of nto_procfs_target.
9643 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9644 (nto_native_ops): Delete.
9645 (procfs_open, procfs_native_open): Delete.
9646 (nto_native_ops): Now an nto_procfs_target_native.
9647 (init_procfs_targets): Adjust to C++ification.
9648 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9649 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9650 Refactor as methods of nto_procfs_target.
9651
9652 * go32-nat.c (go32_nat_target): New class.
9653 (the_go32_nat_target): New.
9654 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9655 (go32_store_registers, go32_xfer_partial, go32_files_info)
9656 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9657 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9658 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9659 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9660 (go32_target): Delete.
9661 (_initialize_go32_nat): Adjust to C++ification.
9662
9663 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9664 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9665 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9666 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9667 gnu_nat_target.
9668 (gnu_target): Delete.
9669 * gnu-nat.h (gnu_target): Delete.
9670 (gnu_nat_target): New class.
9671 * i386-gnu-nat.c (gnu_base_target): New.
9672 (i386_gnu_nat_target): New class.
9673 (the_i386_gnu_nat_target): New.
9674 (_initialize_i386gnu_nat): Adjust to C++ification.
9675
9676 2018-05-02 Pedro Alves <palves@redhat.com>
9677
9678 * bfd-target.c (target_bfd_xclose): Rename to ...
9679 (target_bfd_close): ... this.
9680 (target_bfd_reopen): Adjust.
9681 * target.c (target_close): Remove references to to_xclose.
9682 * target.h (target_ops::to_xclose): Delete.
9683 (target_ops::to_close): Update comments.
9684
9685 2018-05-02 Pedro Alves <palves@redhat.com>
9686
9687 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9688 "linux-nat.h".
9689 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9690 * inf-ptrace.c (inf_ptrace_register_u_offset)
9691 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9692 (inf_ptrace_store_register, inf_ptrace_store_registers)
9693 (inf_ptrace_trad_target): Move to ...
9694 * linux-nat-trad.c: ... this new file.
9695 * linux-nat-trad.h: New file.
9696 * linux-nat.c (linux_target_install_ops): Make extern.
9697 (linux_trad_target): Delete.
9698 * linux-nat.h (linux_trad_target): Delete declaration.
9699 (linux_target_install_ops): Declare.
9700 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9701 "linux-nat.h".
9702
9703 2018-05-02 Pedro Alves <palves@redhat.com>
9704
9705 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9706 procfs_target/add_target here.
9707 * procfs.c (procfs_target): Make static.
9708 (_initialize_procfs): Call add_target here.
9709 * procfs.h (struct target_ops): Remove forward declaration.
9710 (procfs_target): Remove declaration.
9711 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9712
9713 2018-05-02 Pedro Alves <palves@redhat.com>
9714
9715 * procfs.c (procfs_stopped_by_watchpoint)
9716 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9717 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9718 Forward declare.
9719 (procfs_use_watchpoints): Delete, move contents...
9720 (procfs_target): ... here.
9721 * procfs.h (procfs_use_watchpoints): Delete declaration.
9722 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9723 procfs_use_watchpoints.
9724 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9725 procfs_use_watchpoints.
9726
9727 2018-05-02 Tom Tromey <tom@tromey.com>
9728
9729 PR python/20084:
9730 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9731 and var_zuinteger_unlimited.
9732 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9733 and PARAM_ZUINTEGER_UNLIMITED.
9734 (set_parameter_value): Handle var_zuinteger and
9735 var_zuinteger_unlimited.
9736 (add_setshow_generic): Likewise.
9737 (parmpy_init): Likewise.
9738
9739 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9740
9741 PR rust/23124
9742 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9743 pointer is not null before dereferencing it.
9744
9745 2018-04-30 Tom Tromey <tom@tromey.com>
9746
9747 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9748 is_mi_like_p.
9749
9750 2018-04-30 Tom Tromey <tom@tromey.com>
9751
9752 * breakpoint.c (mention): Remove use of is_mi_like_p.
9753 (print_mention_ranged_breakpoint): Likewise.
9754 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9755 of is_mi_like_p.
9756
9757 2018-04-30 Tom Tromey <tom@tromey.com>
9758
9759 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9760
9761 2018-04-30 Tom Tromey <tom@tromey.com>
9762
9763 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9764 (info_spu_event_command): Remove some uses of is_mi_like_p.
9765
9766 2018-04-30 Tom Tromey <tom@tromey.com>
9767
9768 * python/py-framefilter.c (py_print_single_arg)
9769 (enumerate_locals, py_print_args, py_print_frame): Remove some
9770 uses of is_mi_like_p.
9771
9772 2018-04-30 Tom Tromey <tom@tromey.com>
9773
9774 * ui-out.c: Update.
9775 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9776 * ui-out.h (ui_out::is_mi_like_p): Now const.
9777 (ui_out::do_is_mi_like_p): Now const.
9778 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9779
9780 2018-04-30 Tom Tromey <tom@tromey.com>
9781
9782 * varobj.c (varobj_set_visualizer): Use new_reference.
9783 * python/python.c (gdbpy_decode_line): Use new_reference.
9784 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9785 new_reference.
9786
9787 2018-04-30 Tom Tromey <tom@tromey.com>
9788
9789 * varobj.c (install_new_value): Use new_reference.
9790 * value.h (value_incref): Return void. Swap intro comment with
9791 value_decref.
9792 * value.c (set_value_parent): Use new_reference.
9793 (value_incref): Return void. Update intro comment.
9794 (release_value): Use new_reference.
9795 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9796
9797 2018-04-30 Tom Tromey <tom@tromey.com>
9798
9799 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9800 * gdb_bfd.h (new_bfd_ref): Remove.
9801 (gdb_bfd_open): Update comment.
9802 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9803 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9804 (gdb_bfd_fdopenr): Use new_reference.
9805 * exec.c (exec_file_attach): Use new_reference.
9806
9807 2018-04-30 Tom Tromey <tom@tromey.com>
9808
9809 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9810 method.
9811
9812 2018-04-30 Tom Tromey <tom@tromey.com>
9813
9814 * jit.c (jit_read_code_entry): Use type_align.
9815 * i386-tdep.c (i386_gdbarch_init): Don't call
9816 set_gdbarch_long_long_align_bit.
9817 * gdbarch.sh: Remove long_long_align_bit.
9818 * gdbarch.c, gdbarch.h: Rebuild.
9819 * arc-tdep.c (arc_type_align): New function.
9820 (arc_gdbarch_init): Use arc_type_align. Don't call
9821 set_gdbarch_long_long_align_bit.
9822
9823 2018-04-30 Tom Tromey <tom@tromey.com>
9824
9825 * rust-lang.c (rust_type_alignment): Remove.
9826 (rust_composite_type): Use type_align.
9827
9828 2018-04-30 Tom Tromey <tom@tromey.com>
9829
9830 * NEWS: Mention Type.align.
9831 * python/py-type.c (typy_get_alignof): New function.
9832 (type_object_getset): Add "alignof".
9833
9834 2018-04-30 Tom Tromey <tom@tromey.com>
9835
9836 PR exp/17095:
9837 * NEWS: Update.
9838 * std-operator.def (UNOP_ALIGNOF): New operator.
9839 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9840 New.
9841 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9842 * c-lang.c (c_op_print_tab): Add alignof.
9843 * c-exp.y (ALIGNOF): New token.
9844 (exp): Add "ALIGNOF" production.
9845 (ident_tokens): Add _Alignof and alignof.
9846
9847 2018-04-30 Tom Tromey <tom@tromey.com>
9848
9849 * i386-tdep.c (i386_type_align): New function.
9850 (i386_gdbarch_init): Update.
9851 * gdbarch.sh (type_align): New method.
9852 * gdbarch.c, gdbarch.h: Rebuild.
9853 * arch-utils.h (default_type_align): Declare.
9854 * arch-utils.c (default_type_align): New function.
9855 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9856 (struct type) <align_log2>: New field.
9857 <instance_flags>: Now a bitfield.
9858 (TYPE_RAW_ALIGN): New macro.
9859 (type_align, type_raw_align, set_type_align): Declare.
9860 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9861 functions.
9862 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9863 (get_alignment, maybe_set_alignment): New functions.
9864 (read_structure_type, read_enumeration_type, read_array_type)
9865 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9866 (read_subrange_type, read_base_type): Set type alignment.
9867
9868 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9869
9870 * dwarf2read.c (read_index_from_section): Use bool.
9871
9872 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9873
9874 PR gdb/22950
9875 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9876 with #ifdef.
9877
9878 2018-04-29 John Reiser <jreiser@BitWagon.com>
9879
9880 PR build/22873
9881 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9882 last step, and do it atomically.
9883
9884 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9885
9886 * compile/compile-c-types.c (convert_int, convert_float):
9887 Update for C FE v1.
9888
9889 2018-04-27 Tom Tromey <tom@tromey.com>
9890
9891 PR rust/22545:
9892 * rust-lang.c (rust_inclusive_range_type_p): New function.
9893 (rust_range): Handle inclusive ranges.
9894 (rust_compute_range): Likewise.
9895 * rust-exp.y (struct rust_op) <inclusive>: New field.
9896 (DOTDOTEQ): New constant.
9897 (range_expr): Add "..=" productions.
9898 (operator_tokens): Add "..=" token.
9899 (ast_range): Add "inclusive" parameter.
9900 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9901 ranges.
9902 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9903 bounds values.
9904 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9905 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9906 Update comments.
9907 * expprint.c (print_subexp_standard): Handle new bounds values.
9908 (dump_subexp_body_standard): Likewise.
9909
9910 2018-04-27 Tom Tromey <tom@tromey.com>
9911
9912 * configure: Rebuild.
9913 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9914 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9915 "OVERRIDE".
9916 (class symbol_needs_eval_context): Likewise.
9917 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9918 (mock_mapped_index::symbol_name_at): Use "override". Remove
9919 "virtual".
9920 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9921 "override".
9922 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9923 * aarch64-tdep.c (instruction_reader::read): Use "override".
9924 (instruction_reader_test::read): Likewise.
9925 * arm-tdep.c (instruction_reader::read): Use "override".
9926 (instruction_reader_thumb::read): Likewise.
9927
9928 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9929
9930 PR remote/9665
9931 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9932 instead of remote_send.
9933 (remote_send): Remove.
9934
9935 2018-04-26 Pedro Alves <palves@redhat.com>
9936
9937 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9938 find_function_start_sal instead of find_pc_line.
9939
9940 2018-04-26 Pedro Alves <palves@redhat.com>
9941
9942 * breakpoint.c (set_breakpoint_location_function): Handle
9943 mst_data_gnu_ifunc.
9944 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9945 * elfread.c (elf_symtab_read): Give data symbols with
9946 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9947 (elf_rel_plt_read): Update comment.
9948 * linespec.c (convert_linespec_to_sals): Handle
9949 mst_data_gnu_ifunc.
9950 (minsym_found): Handle mst_data_gnu_ifunc.
9951 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9952 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9953 * parse.c (find_minsym_type_and_address): Handle
9954 mst_data_gnu_ifunc.
9955 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9956 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9957 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9958 comment.
9959 <mst_data_gnu_ifunc>: New enumerator.
9960
9961 2018-04-26 Pedro Alves <palves@redhat.com>
9962
9963 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9964 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9965 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9966 Handle it.
9967 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9968 (lookup_minimal_symbol_by_pc): Adjust.
9969 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9970 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9971 * minsyms.h (lookup_msym_prefer): New enum.
9972 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9973 parameter by a lookup_msym_prefer parameter.
9974
9975 2018-04-26 Pedro Alves <palves@redhat.com>
9976
9977 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9978 ends in "@plt" instead of looking at the symbol's section.
9979
9980 2018-04-26 Pedro Alves <palves@redhat.com>
9981
9982 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9983 all references.
9984 (find_pc_partial_function_gnu_ifunc): Rename to ...
9985 (find_pc_partial_function): ... this, and remove references to
9986 'is_gnu_ifunc_p'.
9987 (find_pc_partial_function): Delete old implementation.
9988 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9989
9990 2018-04-26 Pedro Alves <palves@redhat.com>
9991
9992 * linespec.c (struct bound_minimal_symbol_search_key): New.
9993 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
9994 skip first line if we found a GNU ifunc minimal symbol by name.
9995 (compare_msymbols): Change parameters to work with a destructured
9996 lhs minsym.
9997 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9998 functions.
9999
10000 2018-04-26 Pedro Alves <palves@redhat.com>
10001
10002 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10003 ifunc targets here. Instead, if we have an ifunc minsym, use its
10004 address/name.
10005 (add_location_to_breakpoint): Store the minsym and the objfile in
10006 the breakpoint location.
10007 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10008 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10009 Record the minsym in the sal.
10010 * symtab.h (symtab_and_line) <msymbol>: New field.
10011
10012 2018-04-26 Pedro Alves <palves@redhat.com>
10013
10014 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10015 unless we actually resolved the ifunc.
10016
10017 2018-04-26 Pedro Alves <palves@redhat.com>
10018
10019 * c-exp.y (variable production): Prefer ifunc minsyms over
10020 regular function symbols.
10021 * symtab.c (find_gnu_ifunc): New function.
10022 * minsyms.h (lookup_msym_prefer): New enum.
10023 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10024 parameter by a lookup_msym_prefer parameter.
10025 * symtab.h (find_gnu_ifunc): New declaration.
10026
10027 2018-04-26 Pedro Alves <palves@redhat.com>
10028
10029 * blockframe.c (find_gnu_ifunc_target_type): New function.
10030 (find_function_type): New.
10031 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10032 return a value with a memory address.
10033 (eval_call): For calls to GNU ifunc functions, try to find the
10034 type of the target function from the type that the resolver
10035 returns.
10036 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10037 symbols.
10038 * infcall.c (find_function_return_type): Delete.
10039 (find_function_addr): Add 'function_type' parameter. For calls to
10040 GNU ifunc functions, try to find the type of the target function
10041 from the type that the resolver returns, and return it via
10042 FUNCTION_TYPE.
10043 (call_function_by_hand_dummy): Adjust to use the function type
10044 returned by find_function_addr.
10045 (find_function_addr): Add 'function_type' parameter and move
10046 description here.
10047 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10048 declarations.
10049
10050 2018-04-26 Pedro Alves <palves@redhat.com>
10051
10052 * c-exp.y (variable production): Skip finding an alias for ifunc
10053 symbols.
10054
10055 2018-04-26 Pedro Alves <palves@redhat.com>
10056
10057 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10058
10059 2018-04-25 Pedro Alves <palves@redhat.com>
10060
10061 * infcmd.c (kill_command): Print the pid as string, not the whole
10062 thread's ptid. Add comment. s/has been killed/killed/ in output
10063 message.
10064 * remote.c (remote_detach_1): Print the pid as string, not the
10065 whole thread's ptid.
10066
10067 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10068 Sergio Durigan Junior <sergiodj@redhat.com>
10069 Pedro Alves <palves@redhat.com>
10070
10071 * infcmd.c (kill_command): Print message when inferior has
10072 been killed.
10073 * inferior.c (print_inferior_events): Remove 'static'. Set as
10074 '1'.
10075 (add_inferior): Improve message printed when
10076 'print_inferior_events' is on.
10077 (exit_inferior): Remove message printed when
10078 'print_inferior_events' is on.
10079 (detach_inferior): Improve message printed when
10080 'print_inferior_events' is on.
10081 (initialize_inferiors): Use 'add_inferior_silent' to set
10082 'current_inferior_'.
10083 * inferior.h (print_inferior_events): Declare here as
10084 'extern'.
10085 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10086 '[Detaching...]' messages when 'print_inferior_events' is on.
10087 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10088 as prefix/suffix for messages. Remove periods. Fix erroneous
10089 'Detaching after fork from child...', replace it by '... from
10090 parent...'.
10091 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10092 prefix/suffix when printing 'Detaching...' messages. Print
10093 them when 'print_inferior_events' is on.
10094 * remote.c (remote_detach_1): Print message when detaching
10095 from inferior and '!is_fork_parent'.
10096
10097 2018-04-24 Tom Tromey <tom@tromey.com>
10098
10099 * cli-out.h: Reindent.
10100
10101 2018-04-24 Tom Tromey <tom@tromey.com>
10102
10103 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10104 (cli_ui_out::do_field_string): Use fputs_filtered.
10105 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10106
10107 2018-04-23 Tom Tromey <tom@tromey.com>
10108
10109 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10110 gdb::unique_xmalloc_ptr.
10111
10112 2018-04-23 Tom Tromey <tom@tromey.com>
10113
10114 * configure: Rebuild.
10115
10116 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10117
10118 PR gdb/23095
10119 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10120 prepare_for_testing. Set normal_bp to r_debug_state if target
10121 is bsd.
10122
10123 2018-04-21 Pedro Alves <palves@redhat.com>
10124 Rajendra SY <rajendra.sy@gmail.com>
10125
10126 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10127 * remote.c (extended_remote_attach): In all-stop mode, mark the
10128 thread as executing.
10129
10130 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10131
10132 * thread.c (thread_apply_all_command): Fix comment.
10133 (thread_command): Fix comment.
10134
10135 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10136
10137 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10138 parameter.
10139 * features/aarch64-core.c (create_feature_aarch64_core):
10140 Regenerate.
10141 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10142 Likewise.
10143 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10144 Likewise.
10145 * features/i386/32bit-avx512.c
10146 (create_feature_i386_32bit_avx512): Likewise.
10147 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10148 Likewise.
10149 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10150 Likewise.
10151 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10152 Likewise.
10153 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10154 Likewise.
10155 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10156 Likewise.
10157 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10158 Likewise.
10159 * features/i386/64bit-avx512.c
10160 (create_feature_i386_64bit_avx512): Likewise.
10161 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10162 Likewise.
10163 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10164 Likewise.
10165 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10166 Likewise.
10167 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10168 Likewise.
10169 * features/i386/64bit-segments.c
10170 (create_feature_i386_64bit_segments): Likewise.
10171 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10172 Likewise.
10173 * features/i386/x32-core.c
10174 (create_feature_i386_x32_core): Likewise.
10175 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10176 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10177 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10178 * target-descriptions.c: In generated code, don't pass xml
10179 filename.
10180
10181 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10182
10183 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10184 (print_xml_feature::visit_post): Likewise.
10185 (print_xml_feature::visit): Likewise.
10186 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10187 (print_xml_feature): Add new class.
10188 * regformats/regdat.sh: Null xmltarget on feature targets.
10189 * target-descriptions.c (struct target_desc): Add xmltarget.
10190 (maintenance_check_tdesc_xml_convert): Add unittest function.
10191 (tdesc_get_features_xml): Add function to get xml.
10192 (maintenance_check_xml_descriptions): Test xml generation.
10193 * xml-tdesc.c (string_read_description_xml): Add function.
10194 * xml-tdesc.h (string_read_description_xml): Add declaration.
10195
10196 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10197
10198 * features/Makefile: Add feature marker to targets with new style
10199 target descriptions.
10200 * regformats/aarch64.dat: Regenerate.
10201 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10202 * regformats/i386/amd64-avx-linux.dat: Likewise.
10203 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10204 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10205 * regformats/i386/amd64-linux.dat: Likewise.
10206 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10207 * regformats/i386/amd64.dat: Likewise.
10208 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10209 * regformats/i386/i386-avx-linux.dat: Likewise.
10210 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10211 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10212 * regformats/i386/i386-linux.dat: Likewise.
10213 * regformats/i386/i386-mmx-linux.dat: Likewise.
10214 * regformats/i386/i386-mpx-linux.dat: Likewise.
10215 * regformats/i386/i386.dat: Likewise.
10216 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10217 * regformats/i386/x32-avx-linux.dat: Likewise.
10218 * regformats/i386/x32-linux.dat: Likewise.
10219 * regformats/tic6x-c62x-linux.dat: Likewise.
10220 * regformats/tic6x-c64x-linux.dat: Likewise.
10221 * regformats/tic6x-c64xp-linux.dat: Likewise.
10222 * regformats/regdat.sh: Parse feature marker.
10223
10224 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10225
10226 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10227 (tdesc_osabi_name): Likewise.
10228 * target-descriptions.c (tdesc_architecture_name): Add new
10229 function.
10230 (tdesc_osabi_name): Likewise.
10231
10232 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10233
10234 * common/tdesc.c (tdesc_predefined_type): Move to here.
10235 (tdesc_named_type): Likewise.
10236 (tdesc_create_vector): Likewise.
10237 (tdesc_create_struct): Likewise.
10238 (tdesc_set_struct_size): Likewise.
10239 (tdesc_create_union): Likewise.
10240 (tdesc_create_flags): Likewise.
10241 (tdesc_create_enum): Likewise.
10242 (tdesc_add_field): Likewise.
10243 (tdesc_add_typed_bitfield): Likewise.
10244 (tdesc_add_bitfield): Likewise.
10245 (tdesc_add_flag): Likewise.
10246 (tdesc_add_enum_value): Likewise.
10247 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10248 (struct tdesc_type_vector): Likewise.
10249 (struct tdesc_type_field): Likewise.
10250 (struct tdesc_type_with_fields): Likewise.
10251 (tdesc_create_enum): Add declaration.
10252 (tdesc_add_typed_bitfield): Likewise.
10253 (tdesc_add_enum_value): Likewise.
10254 * target-descriptions.c (tdesc_type_field): Move from here.
10255 (tdesc_type_builtin): Likewise.
10256 (tdesc_type_vector): Likewise.
10257 (tdesc_type_with_fields): Likewise.
10258 (tdesc_predefined_types): Likewise.
10259 (tdesc_named_type): Likewise.
10260 (tdesc_create_vector): Likewise.
10261 (tdesc_create_struct): Likewise.
10262 (tdesc_set_struct_size): Likewise.
10263 (tdesc_create_union): Likewise.
10264 (tdesc_create_flags): Likewise.
10265 (tdesc_create_enum): Likewise.
10266 (tdesc_add_field): Likewise.
10267 (tdesc_add_typed_bitfield): Likewise.
10268 (tdesc_add_bitfield): Likewise.
10269 (tdesc_add_flag): Likewise.
10270 (tdesc_add_enum_value): Likewise.
10271 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10272 (tdesc_add_typed_bitfield): Likewise.
10273 (tdesc_add_enum_value): Likewise.
10274
10275 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10276
10277 * common/tdesc.c (tdesc_feature::accept): Move to here.
10278 (tdesc_feature::operator==): Likewise.
10279 (tdesc_create_reg): Likewise.
10280 * common/tdesc.h (tdesc_type_kind): Likewise.
10281 (struct tdesc_type): Likewise.
10282 (struct tdesc_feature): Likewise.
10283 * regformats/regdat.sh: Create a feature.
10284 * target-descriptions.c (tdesc_type_kind): Move from here.
10285 (tdesc_type): Likewise.
10286 (tdesc_type_up): Likewise.
10287 (tdesc_feature): Likewise.
10288 (tdesc_create_reg): Likewise.
10289
10290 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10291
10292 * Makefile.in: Add arch/tdesc.c
10293 * common/tdesc.c: New file.
10294 * common/tdesc.h (tdesc_element_visitor): Move to here.
10295 (tdesc_element): Likewise.
10296 (tdesc_reg): Likewise.
10297 (tdesc_reg_up): Likewise.
10298 * regformats/regdef.h (reg): Add offset to constructors.
10299 * target-descriptions.c (tdesc_element_visitor): Move from here.
10300 (tdesc_element): Likewise.
10301 (tdesc_reg): Likewise.
10302 (tdesc_reg_up): Likewise.
10303
10304 2018-04-17 Tom Tromey <tom@tromey.com>
10305
10306 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10307 discriminant field.
10308
10309 2018-04-17 Tom Tromey <tom@tromey.com>
10310
10311 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10312
10313 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10314
10315 * symtab.c (print_symbol_info): Skip printing filename and line
10316 number when `last' is NULL.
10317 (symtab_symbol_info): Use empty string instead of NULL for first
10318 invocation of print_symbol_info.
10319 (rbreak_command): Pass NULL to `last' parameter of
10320 print_symbol_info.
10321
10322 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10323
10324 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10325 instead of nullptr.
10326
10327 2018-04-16 Pedro Alves <palves@redhat.com>
10328
10329 * MAINTAINERS (sh): Remove.
10330 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10331 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10332 (ALLDEPFILES): Remove sh64-tdep.c.
10333 * NEWS: Mentions that support for SH-5/SH64 is removed.
10334 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10335 (sh*-*-openbsd*): Ditto.
10336 (sh64-*-elf*): Remove.
10337 (sh*): Remove.
10338 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10339 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10340 * sh-tdep.c: No longer include "sh64-tdep.h".
10341 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10342 * sh64-tdep.c, sh64-tdep.h: Remove files.
10343
10344 2018-04-16 Pedro Alves <palves@redhat.com>
10345
10346 * MAINTAINERS: Remove m88k.
10347 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10348 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10349 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10350 * NEWS: Mention that support for m88k was removed.
10351 * configure.host (m88*-*-*): Remove support.
10352 * configure.nat (m88k-*-*): Remove support.
10353 * configure.tgt (m88*-*-openbsd*): Remove.
10354 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10355
10356 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10357
10358 * configure.tgt (x86_tobjs): New variable.
10359 (amd64_tobjs, i386_tobjs): Use it.
10360
10361 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10362
10363 * symtab.c (print_symbol_info): Precede the symbol definition by
10364 the line number when available.
10365 * NEWS: Advertise this enhancement.
10366
10367 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10368
10369 * NEWS (New options): announce set/show record btrace cpu.
10370 * btrace.c: Include record-btrace.h.
10371 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10372 the vendor is unknown.
10373 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10374 Maybe overwrite the btrace configuration's cpu.
10375 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10376 (btrace_fetch): Add cpu parameter. Update callers.
10377 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10378 Maybe overwrite the btrace configuration's cpu. Skip enabling
10379 errata workarounds if the vendor is unknown.
10380 * python/py-record-btrace.c: Include record-btrace.h.
10381 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10382 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10383 * record-btrace.c (record_btrace_cpu_state_kind): New.
10384 (record_btrace_cpu): New.
10385 (set_record_btrace_cpu_cmdlist): New.
10386 (record_btrace_get_cpu): New.
10387 (require_btrace_thread, record_btrace_info)
10388 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10389 (cmd_set_record_btrace_cpu_none): New.
10390 (cmd_set_record_btrace_cpu_auto): New.
10391 (cmd_set_record_btrace_cpu): New.
10392 (cmd_show_record_btrace_cpu): New.
10393 (_initialize_record_btrace): Initialize set/show record btrace cpu
10394 commands.
10395 * record-btrace.h (record_btrace_get_cpu): New.
10396
10397 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10398
10399 * record.c (set_record_command): Fix typo in message.
10400
10401 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10402
10403 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10404
10405 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10406
10407 * infrun.c (process_event_stop_test): Call
10408 gdbarch_in_indirect_branch_thunk.
10409 * gdbarch.sh (in_indirect_branch_thunk): New.
10410 * gdbarch.c: Regenerated.
10411 * gdbarch.h: Regenerated.
10412 * x86-tdep.h: New.
10413 * x86-tdep.c: New.
10414 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10415 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10416 (ALLDEPFILES): Add x86-tdep.c.
10417 * arch-utils.h (default_in_indirect_branch_thunk): New.
10418 * arch-utils.c (default_in_indirect_branch_thunk): New.
10419 * i386-tdep: Include x86-tdep.h.
10420 (i386_in_indirect_branch_thunk): New.
10421 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10422 function.
10423 * amd64-tdep: Include x86-tdep.h.
10424 (amd64_in_indirect_branch_thunk): New.
10425 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10426
10427 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10428
10429 PR gdb/23053
10430 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10431 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10432 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10433 regression.
10434
10435 2018-04-12 Tom Tromey <tom@tromey.com>
10436
10437 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10438 (rust_evaluate_subexp): Likewise.
10439
10440 2018-04-12 Pedro Alves <palves@redhat.com>
10441
10442 * procfs.c (procfs_detach): Make forward declaration's prototype
10443 match definition's protototype.
10444 (proc_get_LDT_entry): Remove stale do_cleanups call.
10445
10446 2018-04-12 Pedro Alves <palves@redhat.com>
10447
10448 * target.h (target_ops::to_has_exited): Delete.
10449 (target_has_exited): Delete.
10450 * target-delegates.c: Regenerate.
10451
10452 2018-04-11 Pedro Alves <palves@redhat.com>
10453
10454 * target.c (fileio_fh_t::t): Add comment.
10455 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10456 (target_fileio_close): Handle a NULL target.
10457 (invalidate_fileio_fh): New.
10458 (target_close): Call it.
10459 * remote.c (remote_hostio_send_command): No longer check whether
10460 remote_desc is open.
10461
10462 2018-04-11 Pedro Alves <palves@redhat.com>
10463
10464 * target.c (fileio_fh_t): Make it a named struct instead of a
10465 typedef.
10466 (fileio_fh_t::is_closed): New method.
10467 (DEF_VEC_O (fileio_fh_t)): Remove.
10468 (fileio_fhandles): Now a std::vector.
10469 (is_closed_fileio_fh): Delete.
10470 (acquire_fileio_fd): Adjust. Rename parameters.
10471 (release_fileio_fd): Adjust.
10472 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10473 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10474 (target_fileio_close): Adjust.
10475
10476 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10477
10478 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10479 index.
10480
10481 2018-04-10 Pedro Alves <palves@redhat.com>
10482
10483 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10484 (scoped_finish_thread_state): New class.
10485 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10486 cleanup.
10487 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10488 (fetch_inferior_event, normal_stop): Likewise.
10489 * thread.c (finish_thread_state_cleanup): Delete.
10490
10491 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10492 Pedro Alves <palves@redhat.com>
10493
10494 * value.c: Include "selftest.h" and "common/array-view.h".
10495 (struct range) <operator ==>: New.
10496 (test_ranges_contain): New.
10497 (check_ranges_vector): New.
10498 (test_insert_into_bit_range_vector): New.
10499 (_initialize_values): Register selftests.
10500 * common/array-view.h (operator==, operator!=): New.
10501
10502 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10503
10504 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10505 an iterator.
10506 * inline-frame.c: Include <algorithm>.
10507 (struct inline_state): Add constructor.
10508 (inline_state_s): Remove.
10509 (DEF_VEC_O(inline_state_s)): Remove.
10510 (inline_states): Change type to std::vector.
10511 (find_inline_frame_state): Adjust to std::vector.
10512 (allocate_inline_frame_state): Remove.
10513 (clear_inline_frame_state): Adjust to std::vector.
10514 (skip_inline_frames): Adjust to std::vector.
10515
10516 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10517
10518 * tracepoint.h (struct trace_state_variable): Add constructor.
10519 <name>: Change type to std::string.
10520 * tracepoint.c (tsv_s): Remove.
10521 (DEF_VEC_O(tsv_s)): Remove.
10522 (tvariables): Change to std::vector.
10523 (create_trace_state_variable): Adjust to std::vector.
10524 (find_trace_state_variable): Likewise.
10525 (find_trace_state_variable_by_number): Likewise.
10526 (delete_trace_state_variable): Likewise.
10527 (trace_variable_command): Adjust to std::string.
10528 (delete_trace_variable_command): Likewise.
10529 (tvariables_info_1): Adjust to std::vector.
10530 (save_trace_state_variables): Likewise.
10531 (start_tracing): Likewise.
10532 (merge_uploaded_trace_state_variables): Adjust to std::vector
10533 and std::string.
10534 * target.h (struct target_ops)
10535 <to_download_trace_state_variable>: Pass reference to
10536 trace_state_variable.
10537 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10538 * target-delegates.c: Re-generate.
10539 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10540 (mi_tsv_deleted): Likewise.
10541 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10542 * remote.c (remote_download_trace_state_variable): Change
10543 pointer to reference and adjust.
10544 * make-target-delegates (parse_argtypes): Handle references.
10545 (write_function_header): Likewise.
10546 (munge_type): Likewise.
10547
10548 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10549
10550 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10551 string_view-selftests.c.
10552 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10553 testsuite.
10554 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10555 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10556 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10557 * unittests/basic_string_view/element_access/char/1.cc:
10558 Likewise.
10559 * unittests/basic_string_view/element_access/char/empty.cc:
10560 Likewise.
10561 * unittests/basic_string_view/element_access/char/front_back.cc:
10562 Likewise.
10563 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10564 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10565 Likewise.
10566 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10567 Likewise.
10568 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10569 Likewise.
10570 * unittests/basic_string_view/operations/compare/char/1.cc:
10571 Likewise.
10572 * unittests/basic_string_view/operations/compare/char/13650.cc:
10573 Likewise.
10574 * unittests/basic_string_view/operations/copy/char/1.cc:
10575 Likewise.
10576 * unittests/basic_string_view/operations/data/char/1.cc:
10577 Likewise.
10578 * unittests/basic_string_view/operations/find/char/1.cc:
10579 Likewise.
10580 * unittests/basic_string_view/operations/find/char/2.cc:
10581 Likewise.
10582 * unittests/basic_string_view/operations/find/char/3.cc:
10583 Likewise.
10584 * unittests/basic_string_view/operations/find/char/4.cc:
10585 Likewise.
10586 * unittests/basic_string_view/operations/rfind/char/1.cc:
10587 Likewise.
10588 * unittests/basic_string_view/operations/rfind/char/2.cc:
10589 Likewise.
10590 * unittests/basic_string_view/operations/rfind/char/3.cc:
10591 Likewise.
10592 * unittests/basic_string_view/operations/substr/char/1.cc:
10593 Likewise.
10594 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10595 * unittests/string_view-selftests.c: New file.
10596
10597 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10598
10599 * unittests/basic_string_view/capacity/1.cc: New file.
10600 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10601 * unittests/basic_string_view/cons/char/1.cc: New file.
10602 * unittests/basic_string_view/cons/char/2.cc: New file.
10603 * unittests/basic_string_view/cons/char/3.cc: New file.
10604 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10605 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10606 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10607 * unittests/basic_string_view/element_access/char/1.cc: New file.
10608 * unittests/basic_string_view/element_access/char/2.cc: New file.
10609 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10610 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10611 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10612 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10613 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10614 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10615 * unittests/basic_string_view/include.cc: New file.
10616 * unittests/basic_string_view/inserters/char/1.cc: New file.
10617 * unittests/basic_string_view/inserters/char/2.cc: New file.
10618 * unittests/basic_string_view/inserters/char/3.cc: New file.
10619 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10620 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10621 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10622 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10623 * unittests/basic_string_view/literals/types.cc: New file.
10624 * unittests/basic_string_view/literals/values.cc: New file.
10625 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10626 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10627 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10628 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10629 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10630 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10631 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10632 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10633 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10634 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10635 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10636 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10637 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10638 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10639 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10640 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10641 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10642 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10643 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10644 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10645 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10646 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10647 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10648 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10649 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10650 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10651 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10652 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10653 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10654 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10655 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10656 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10657 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10658 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10659 * unittests/basic_string_view/operators/char/2.cc: New file.
10660 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10661 * unittests/basic_string_view/range_access/char/1.cc: New file.
10662 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10663 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10664 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10665 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10666 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10667 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10668 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10669 * unittests/basic_string_view/typedefs.cc: New file.
10670 * unittests/basic_string_view/types/1.cc: New file.
10671
10672 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10673
10674 * common/gdb_string_view.h: Remove libstdc++ implementation
10675 details, adjust to gdb reality.
10676 * common/gdb_string_view.tcc: Likewise.
10677 * cli/cli-script.c (struct string_view): Remove.
10678 (user_args) <m_args>: Change element type to gdb::string_view.
10679 (user_args::insert_args): Adjust.
10680
10681 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10682
10683 * common/gdb_string_view.h: New file.
10684 * common/gdb_string_view.tcc: New file.
10685
10686 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10687
10688 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10689 * configure: Re-generate.
10690
10691 2018-04-09 Pedro Alves <palves@redhat.com>
10692
10693 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10694 (set_target_gdbarch): Call
10695 gdb::observers::architecture_changed.notify instead of
10696 observer_notify_architecture_changed.
10697
10698 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10699
10700 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10701 (do_restore_current_traceframe_cleanup): Remove.
10702 (restore_current_traceframe_cleanup_dtor): Remove.
10703 (make_cleanup_restore_current_traceframe): Remove.
10704 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10705 New.
10706 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10707 * infrun.c (fetch_inferior_event): Use
10708 scoped_restore_current_traceframe.
10709
10710 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10711
10712 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10713 Remove.
10714 <n_allocated_type_units>: Remove.
10715 <all_type_units>: Change to std::vector.
10716 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10717 to std::vector change.
10718 (dwarf2_per_objfile::get_cutu): Likewise.
10719 (dwarf2_per_objfile::get_tu): Likewise.
10720 (create_signatured_type_table_from_index): Likewise.
10721 (create_signatured_type_table_from_debug_names): Likewise.
10722 (dw2_symtab_iter_next): Likewise.
10723 (dw2_print_stats): Likewise.
10724 (dw2_expand_all_symtabs): Likewise.
10725 (dw2_expand_marked_cus): Likewise.
10726 (dw2_debug_names_iterator::next): Likewise.
10727 (dwarf2_initialize_objfile): Likewise.
10728 (add_signatured_type_cu_to_table): Likewise.
10729 (create_all_type_units): Likewise.
10730 (add_type_unit): Likewise.
10731 (struct tu_abbrev_offset): Add constructor.
10732 (build_type_psymtabs_1): Adjust to std::vector change.
10733 (print_tu_stats): Likewise.
10734 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10735 (write_debug_names): Likewise.
10736
10737 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10738
10739 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10740 Make an std::vector.
10741 <n_comp_units>: Remove.
10742 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10743 to std::vector change.
10744 (dwarf2_per_objfile::get_cutu): Likewise.
10745 (dwarf2_per_objfile::get_cu): Likewise.
10746 (create_cus_from_index): Likewise.
10747 (create_addrmap_from_index): Likewise.
10748 (create_addrmap_from_aranges): Likewise.
10749 (dwarf2_read_index): Likewise.
10750 (dw2_find_last_source_symtab): Likewise.
10751 (dw2_map_symtabs_matching_filename): Likewise.
10752 (dw2_symtab_iter_next): Likewise.
10753 (dw2_print_stats): Likewise.
10754 (dw2_expand_all_symtabs): Likewise.
10755 (dw2_expand_symtabs_with_fullname): Likewise.
10756 (dw2_expand_marked_cus): Likewise.
10757 (dw2_map_symbol_filenames): Likewise.
10758 (create_cus_from_debug_names): Likewise.
10759 (dwarf2_read_debug_names): Likewise.
10760 (dw2_debug_names_iterator::next): Likewise.
10761 (dwarf2_initialize_objfile): Likewise.
10762 (set_partial_user): Likewise.
10763 (dwarf2_build_psymtabs_hard): Likewise.
10764 (read_comp_units_from_section): Remove arguments, adjust to
10765 std::vector change.
10766 (create_all_comp_units): Adjust to std::vector and
10767 read_comp_units_from_section changes.
10768 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10769 change.
10770 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10771 (psyms_seen_size): Likewise.
10772 (write_gdbindex): Likewise.
10773 (write_debug_names): Likewise.
10774
10775 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10776
10777 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10778 with dwarf2_per_objfile.
10779 (create_cus_from_index): Likewise.
10780 (create_signatured_type_table_from_index): Likewise.
10781 (dwarf2_read_index): Likewise.
10782 (dwarf2_initialize_objfile): Likewise.
10783 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10784 per_cu rather than get_dwarf2_per_objfile.
10785
10786 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10787
10788 * dwarf2read.h (struct signatured_type): Forward declare.
10789 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10790 New methods.
10791 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10792 (dw2_get_cutu): ...this.
10793 (dwarf2_per_objfile::get_cu): Rename from...
10794 (dw2_get_cu): ...this.
10795 (dwarf2_per_objfile::get_tu): New.
10796 (create_addrmap_from_index): Adjust.
10797 (create_addrmap_from_aranges): Adjust.
10798 (dw2_find_last_source_symtab): Adjust.
10799 (dw2_map_symtabs_matching_filename): Adjust.
10800 (dw2_symtab_iter_next): Adjust.
10801 (dw2_print_stats): Adjust.
10802 (dw2_expand_all_symtabs): Adjust.
10803 (dw2_expand_symtabs_with_fullname): Adjust.
10804 (dw2_expand_marked_cus): Adjust.
10805 (dw_expand_symtabs_matching_file_matcher): Adjust.
10806 (dw2_map_symbol_filenames): Adjust.
10807 (dw2_debug_names_iterator::next): Adjust.
10808 (dwarf2_initialize_objfile): Adjust.
10809 (set_partial_user): Adjust.
10810 (dwarf2_build_psymtabs_hard): Adjust.
10811
10812 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10813
10814 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10815 Remove unused variables.
10816 (dw2_map_symtabs_matching_filename): Likewise.
10817 (dwarf2_record_block_ranges): Likewise.
10818 (dwarf2_read_addr_index): Likewise.
10819 (follow_die_offset): Likewise.
10820
10821 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10822
10823 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10824 to symbol_file_add_main.
10825
10826 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10827
10828 PR mi/22299
10829 * mi/mi-console.c (do_fputc_async_safe): New.
10830 (mi_console_file::write_async_safe): New.
10831 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10832 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10833 New.
10834 * ui-file.c (ui_file::putstrn): Adjust call to
10835 fputstrn_unfiltered.
10836 * utils.c (printchar): Replace do_fputs and do_fprintf
10837 parameters by do_fputc.
10838 (fputstr_filtered): Adjust call to printchar.
10839 (fputstr_unfiltered): Likewise.
10840 (fputstrn_filtered): Likewise.
10841 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10842 printchar.
10843 * utils.h (do_fputc_ftype): New typedef.
10844 (fputstrn_unfiltered): Add do_fputc parameter.
10845
10846 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10847
10848 * regformats/i386/i386-avx.dat: Remove.
10849
10850 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10851
10852 PR gdb/22979
10853 * amd64-tdep.c (amd64_none_init_abi): New function.
10854 (amd64_x32_none_init_abi): New function.
10855 (_initialize_amd64_tdep): Register handlers for x86-64 and
10856 x64_32 with GDB_OSABI_NONE.
10857 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10858 GDB_OSABI_NONE osabi.
10859
10860 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10861
10862 PR gdb/22980
10863 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10864 GDB_OSABI_NONE.
10865 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10866 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10867
10868 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10869
10870 * common/byte-vector.h (char_vector): New type.
10871 * target.h (target_read_alloc): Return
10872 gdb::optional<byte_vector>.
10873 (target_read_stralloc): Return gdb::optional<char_vector>.
10874 (target_get_osdata): Return gdb::optional<char_vector>.
10875 * target.c (target_read_alloc_1): Templatize. Replacement
10876 manual memory management with vector.
10877 (target_read_alloc): Change return type, adjust.
10878 (target_read_stralloc): Change return type, adjust.
10879 (target_get_osdata): Change return type, adjust.
10880 * auxv.c (struct auxv_info) <length>: Remove.
10881 <data>: Change type to gdb::optional<byte_vector>.
10882 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10883 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10884 (target_auxv_search): Adjust.
10885 (fprint_target_auxv): Adjust.
10886 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10887 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10888 (linux_make_corefile_notes): Adjust.
10889 * osdata.c (get_osdata): Adjust.
10890 * remote.c (remote_get_threads_with_qxfer): Adjust.
10891 (remote_memory_map): Adjust.
10892 (remote_traceframe_info): Adjust.
10893 (btrace_read_config): Adjust.
10894 (remote_read_btrace): Adjust.
10895 (remote_pid_to_exec_file): Adjust.
10896 * solib-aix.c (solib_aix_get_library_list): Adjust.
10897 * solib-dsbt.c (decode_loadmap): Don't free buf.
10898 (dsbt_get_initial_loadmaps): Adjust.
10899 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10900 * solib-target.c (solib_target_current_sos): Adjust.
10901 * tracepoint.c (sdata_make_value): Adjust.
10902 * xml-support.c (xinclude_start_include): Adjust.
10903 (xml_fetch_content_from_file): Adjust.
10904 * xml-support.h (xml_fetch_another): Change return type.
10905 (xml_fetch_content_from_file): Change return type.
10906 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10907 * xml-tdesc.c (file_read_description_xml): Adjust.
10908 (fetch_available_features_from_target): Change return type.
10909 (target_fetch_description_xml): Adjust.
10910 (target_read_description_xml): Adjust.
10911
10912 2018-04-06 Tom Tromey <tom@tromey.com>
10913
10914 * value.c (~value): Update.
10915 (struct value) <contents>: Now unique_xmalloc_ptr.
10916 (value_contents_bits_eq, allocate_value_contents)
10917 (value_contents_raw, value_contents_all_raw)
10918 (value_contents_for_printing, value_contents_for_printing_const)
10919 (set_value_enclosing_type): Update.
10920
10921 2018-04-06 Tom Tromey <tom@tromey.com>
10922
10923 * value.c (range_s): Remove typedef, VEC.
10924 (struct range): Add operator<.
10925 (range_lessthan): Remove.
10926 (ranges_contain): Change type.
10927 (~value): Update.
10928 (struct value) <unavailable, optimized_out>: Now std::vector.
10929 (value_entirely_available)
10930 (value_entirely_covered_by_range_vector)
10931 (value_entirely_unavailable, value_entirely_optimized_out):
10932 Update.
10933 (insert_into_bit_range_vector): Change argument type.
10934 (find_first_range_overlap): Likewise.
10935 (struct ranges_and_idx, value_contents_bits_eq)
10936 (require_not_optimized_out, require_available): Update.
10937 (ranges_copy_adjusted): Change argument types.
10938 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10939
10940 2018-04-06 Tom Tromey <tom@tromey.com>
10941
10942 * value.c (~value): Update.
10943 (struct value) <parent>: Now a value_ref_ptr.
10944 (value_parent, set_value_parent, value_address, value_copy):
10945 Update.
10946
10947 2018-04-06 Tom Tromey <tom@tromey.com>
10948
10949 * value.c (struct value): Add constructor, destructor, and member
10950 initializers.
10951 (allocate_value_lazy, value_decref): Update.
10952
10953 2018-04-06 Tom Tromey <tom@tromey.com>
10954
10955 * value.c (struct value) <released, next>: Remove.
10956 (all_values): Now a std::vector.
10957 (allocate_value_lazy): Update.
10958 (value_next): Remove.
10959 (value_mark, value_free_to_mark, release_value)
10960 (value_release_to_mark): Update.
10961
10962 2018-04-06 Tom Tromey <tom@tromey.com>
10963
10964 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10965 (free_value_chain): Remove.
10966 * value.c (free_value_chain): Remove.
10967 (value_release_to_mark): Return a std::vector.
10968 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10969 std::vector.
10970 (check_condition): Update.
10971 * eval.c (fetch_subexp_value): Change "val_chain" to a
10972 std::vector.
10973 * breakpoint.c (update_watchpoint): Update.
10974 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10975
10976 2018-04-06 Tom Tromey <tom@tromey.com>
10977
10978 * value.h (free_all_values): Remove.
10979 * value.c (free_all_values): Remove.
10980
10981 2018-04-06 Tom Tromey <tom@tromey.com>
10982
10983 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10984 (value_history_chain, value_history_count): Remove.
10985 (value_history): New global.
10986 (record_latest_value, access_value_history, show_values)
10987 (preserve_values): Update.
10988
10989 2018-04-06 Tom Tromey <tom@tromey.com>
10990
10991 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10992 * varobj.c (varobj_set_display_format, varobj_set_value)
10993 (install_default_visualizer, construct_visualizer)
10994 (install_new_value, ~varobj, varobj_get_value_type)
10995 (my_value_of_variable, varobj_editable_p): Update.
10996 * c-varobj.c (c_describe_child, c_value_of_variable)
10997 (cplus_number_of_children, cplus_describe_child): Update.
10998 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10999 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11000 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11001
11002 2018-04-06 Tom Tromey <tom@tromey.com>
11003
11004 * printcmd.c (last_examine_address): Change type to
11005 value_ref_ptr.
11006 (do_examine, x_command): Update.
11007
11008 2018-04-06 Tom Tromey <tom@tromey.com>
11009
11010 * value.c (release_value): Update.
11011 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11012 (struct bpstats) <val>: Now a value_ref_ptr.
11013 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11014 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11015 (~watchpoint, print_it_watchpoint, watch_command_1)
11016 (invalidate_bp_value_on_memory_change): Update.
11017
11018 2018-04-06 Tom Tromey <tom@tromey.com>
11019
11020 * varobj.c (varobj_clear_saved_item)
11021 (update_dynamic_varobj_children, install_new_value, ~varobj):
11022 Update.
11023 * value.h (value_incref): Move declaration earlier.
11024 (value_decref): Rename from value_free.
11025 (struct value_ref_policy): New.
11026 (value_ref_ptr): New typedef.
11027 (struct value_deleter): Remove.
11028 (gdb_value_up): Remove typedef.
11029 (release_value): Change return type.
11030 (release_value_or_incref): Remove.
11031 * value.c (set_value_parent): Update.
11032 (value_incref): Change return type.
11033 (value_decref): Rename from value_free.
11034 (value_free_to_mark, free_all_values, free_value_chain): Update.
11035 (release_value): Return value_ref_ptr.
11036 (release_value_or_incref): Remove.
11037 (record_latest_value, set_internalvar, clear_internalvar):
11038 Update.
11039 * stack.c (info_frame_command): Don't call value_free.
11040 * python/py-value.c (valpy_dealloc, valpy_new)
11041 (value_to_value_object): Update.
11042 * printcmd.c (do_examine): Update.
11043 * opencl-lang.c (lval_func_free_closure): Update.
11044 * mi/mi-main.c (register_changed_p): Don't call value_free.
11045 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11046 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11047 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11048 value_free.
11049 * guile/scm-value.c (vlscm_free_value_smob)
11050 (vlscm_scm_from_value): Update.
11051 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11052 (frame_unwind_register_unsigned, get_frame_register_bytes)
11053 (put_frame_register_bytes): Don't call value_free.
11054 * findvar.c (address_from_register): Don't call value_free.
11055 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11056 * dwarf2loc.c (entry_data_value_free_closure)
11057 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11058 (dwarf2_evaluate_loc_desc_full): Update.
11059 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11060 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11061 (~watchpoint, watch_command_1)
11062 (invalidate_bp_value_on_memory_change): Update.
11063 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11064
11065 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11066
11067 PR gdb/23022
11068 * warning.m4: Add -Wno-error=deprecated-register.
11069 * configure: Re-generate.
11070
11071 2018-04-05 Tom Tromey <tom@tromey.com>
11072
11073 * linespec.h: Remove include of "vec.h".
11074
11075 2018-04-05 Tom Tromey <tom@tromey.com>
11076
11077 * linespec.c (typep): Remove typedef.
11078 (find_methods, find_superclass_methods): Take a std::vector.
11079 (find_method): Use std::vector.
11080
11081 2018-04-05 Tom Tromey <tom@tromey.com>
11082
11083 * utils.c (compare_strings): Remove.
11084 * utils.h (compare_strings): Remove.
11085 * objc-lang.h (find_imps): Update.
11086 * objc-lang.c (find_methods): Take a std::vector.
11087 (uniquify_strings, find_imps): Likewise.
11088 * linespec.c (find_methods): Take a std::vector.
11089 (decode_objc): Use std::vector.
11090 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11091 a std::vector.
11092 (find_method, find_function_symbols): Use std::vector.
11093
11094 2018-04-05 Tom Tromey <tom@tromey.com>
11095
11096 * completer.c (completion_tracker::completion_tracker): Remove
11097 cast.
11098 (completion_tracker::discard_completions): Likewise.
11099 * breakpoint.c (ambiguous_names_p): Remove cast.
11100 * ada-lang.c (_initialize_ada_language): Remove cast.
11101 * utils.h (streq): Update.
11102 (streq_hash): Add new declaration.
11103 * utils.c (streq): Return bool.
11104 (streq_hash): New function.
11105
11106 2018-04-05 Tom Tromey <tom@tromey.com>
11107
11108 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11109 Remove a string copy.
11110
11111 2018-04-05 Tom Tromey <tom@tromey.com>
11112
11113 * linespec.c (filter_results): Use std::vector.
11114 (decode_line_2, decode_line_full): Update.
11115
11116 2018-04-05 Tom Tromey <tom@tromey.com>
11117
11118 * linespec.c (canonical_to_fullform): Return std::string.
11119 (filter_results): Update.
11120 (struct decode_line_2_item): Add constructor.
11121 <fullform, displayform>: Now std::string.
11122 (decode_line_2_compare_items): Now a std::sort comparator.
11123 (decode_line_2): Update.
11124
11125 2018-04-05 Tom Tromey <tom@tromey.com>
11126
11127 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11128 (unexpected_linespec_error): Update.
11129 (linespec_parse_basic, parse_linespec): Update.
11130
11131 2018-04-05 Tom Tromey <tom@tromey.com>
11132
11133 * linespec.c (linespec_parse_basic): Reindent.
11134
11135 2018-04-05 Tom Tromey <tom@tromey.com>
11136
11137 * minsyms.h (iterate_over_minimal_symbols): Update.
11138 * minsyms.c (iterate_over_minimal_symbols): Take a
11139 gdb::function_view.
11140 * linespec.c (struct collect_minsyms): Remove.
11141 (compare_msyms): Now a std::sort comparator.
11142 (add_minsym): Add parameters.
11143 (search_minsyms_for_name): Update. Use std::vector.
11144
11145 2018-04-03 Tom Tromey <tom@tromey.com>
11146
11147 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11148 gdb::byte_vector.
11149
11150 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11151
11152 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11153
11154 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11155
11156 PR gdb/16959
11157 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11158 printing static type.
11159
11160 2018-04-01 Tom Tromey <tom@tromey.com>
11161
11162 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11163 (rs6000_xfer_shared_libraries): Update.
11164
11165 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11166
11167 * common/gdb_vecs.h (char_ptr): Remove.
11168 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11169
11170 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11171
11172 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11173 with std::vector.
11174 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11175
11176 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11177
11178 * tracepoint.h (struct uploaded_tp): Initialize fields.
11179 <actions, step_actions, cmd_strings>: Change type to
11180 std::vector<char *>.
11181 * tracepoint.c (get_uploaded_tp): Allocate with new.
11182 (free_uploaded_tps): Free with delete.
11183 (parse_tracepoint_definition): Adjust to std::vector change.
11184 * breakpoint.c (read_uploaded_action): Likewise.
11185 (create_tracepoint_from_upload): Likewise.
11186 * ctf.c (ctf_write_uploaded_tp): Likewise.
11187 (SET_ARRAY_FIELD): Likewise.
11188 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11189
11190 2018-03-30 Tom Tromey <tom@tromey.com>
11191
11192 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11193 std::unique_ptr.
11194 (svr4_keep_data_in_core): Update.
11195 (svr4_read_so_list): Update.
11196
11197 2018-03-30 Tom Tromey <tom@tromey.com>
11198
11199 * windows-nat.c (handle_output_debug_string, handle_exception):
11200 Update.
11201 * target.h (target_read_string): Update.
11202 * target.c (target_read_string): Change "string" to
11203 unique_xmalloc_ptr.
11204 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11205 Update.
11206 * solib-frv.c (frv_current_sos): Update.
11207 * solib-dsbt.c (dsbt_current_sos): Update.
11208 * solib-darwin.c (darwin_current_sos): Update.
11209 * linux-thread-db.c (inferior_has_bug): Update.
11210 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11211 Update. Remove alloca.
11212 * ada-lang.c (ada_main_name): Update.
11213
11214 2018-03-30 Tom Tromey <tom@tromey.com>
11215
11216 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11217 (struct dwo_file_deleter): New.
11218 (dwo_file_up): New typedef.
11219 (open_and_init_dwo_file): Use dwo_file_up.
11220 (free_dwo_file_cleanup): Remove.
11221
11222 2018-03-30 Tom Tromey <tom@tromey.com>
11223
11224 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11225 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11226
11227 2018-03-30 Tom Tromey <tom@tromey.com>
11228
11229 * dwarf2read.c (class free_cached_comp_units): New class.
11230 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11231 (free_cached_comp_units): Remove function.
11232
11233 2018-03-30 Tom Tromey <tom@tromey.com>
11234
11235 * utils.h (make_cleanup_unpush_target): Remove.
11236 * inf-ptrace.c (struct target_unpusher): New.
11237 (target_unpush_up) New typedef.
11238 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11239 target_unpush_up.
11240 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11241
11242 2018-03-27 Tom Tromey <tom@tromey.com>
11243
11244 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11245
11246 2018-03-27 Pedro Alves <palves@redhat.com>
11247 Tom Tromey <tom@tromey.com>
11248
11249 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11250 destructor. Now a class.
11251 (gdb_readline_wrapper_cleanup): Remove function.
11252 (gdb_readline_wrapper): Remove cleanups.
11253
11254 2018-03-27 Tom Tromey <tom@tromey.com>
11255
11256 * typeprint.h (struct type_print_options) <local_typedefs,
11257 global_typedefs>: Remove "struct" keyword.
11258 (class typedef_hash_table): New class.
11259 (recursively_update_typedef_hash, add_template_parameters)
11260 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11261 (find_typedef_in_hash): Don't declare.
11262 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11263 (typedef_hash_table::recursively_update): Rename from
11264 recursively_update_typedef_hash. Now a member.
11265 (typedef_hash_table::add_template_parameters): Rename from
11266 add_template_parameters. Now a member.
11267 (typedef_hash_table::typedef_hash_table): Now a constructor;
11268 rename from create_typedef_hash.
11269 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11270 rename from free_typedef_hash.
11271 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11272 (do_free_global_table): Remove.
11273 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11274 from copy_type_recursive.
11275 (create_global_typedef_table): Remove.
11276 (typedef_hash_table::find_global_typedef): Now a member of
11277 typedef_hash_table.
11278 (typedef_hash_table::find_typedef): Rename from
11279 find_typedef_in_hash; now a member.
11280 (whatis_exp): Update.
11281 * extension.h (struct ext_lang_type_printers): Add constructor and
11282 destructor.
11283 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11284 declare.
11285 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11286 Now a constructor; rename from start_ext_lang_type_printers.
11287 (ext_lang_type_printers): Now a destructor; rename from
11288 free_ext_lang_type_printers.
11289 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11290 Update.
11291 (c_type_print_base_struct_union): Update. Remove cleanups.
11292
11293 2018-03-27 Tom Tromey <tom@tromey.com>
11294
11295 * dwarf-index-write.c: Include <cmath>.
11296
11297 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11298
11299 * NEWS: Add entry describing new "set|show varsize-limit" command.
11300 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11301 command.
11302 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11303 "set variable".
11304
11305 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11306
11307 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11308 dwarf-index-write.c
11309 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11310 * dwarf-index-common.c: New file.
11311 * dwarf-index-common.h: New file.
11312 * dwarf-index-write.c: New file.
11313 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11314 (struct dwarf2_section_info): Move from here.
11315 (dwarf2_section_info_def): Likewise.
11316 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11317 (offset_type): Likewise.
11318 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11319 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11320 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11321 (byte_swap): Likewise.
11322 (MAYBE_SWAP): Likewise.
11323 (dwarf2_per_cu_ptr): Likewise.
11324 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11325 (struct tu_stats): Likewise.
11326 (struct dwarf2_per_objfile): Likewise.
11327 (struct dwarf2_per_cu_data): Likewise.
11328 (struct signatured_type): Likewise.
11329 (sig_type_ptr): Likewise.
11330 (DEF_VEC_P (sig_type_ptr)): Likewise.
11331 (INDEX4_SUFFIX): Likewise.
11332 (INDEX5_SUFFIX): Likewise.
11333 (DEBUG_STR_SUFFIX): Likewise.
11334 (dwarf2_read_section): Make non-static.
11335 (mapped_index_string_hash): Move from here.
11336 (dwarf5_djb_hash): Likewise.
11337 (file_write): Likewise.
11338 (class data_buf): Likewise.
11339 (struct symtab_index_entry): Likewise.
11340 (struct mapped_symtab): Likewise.
11341 (find_slot): Likewise.
11342 (hash_expand): Likewise.
11343 (add_index_entry): Likewise.
11344 (uniquify_cu_indices): Likewise.
11345 (class c_str_view): Likewise.
11346 (class c_str_view_hasher): Likewise.
11347 (class vector_hasher): Likewise.
11348 (write_hash_table): Likewise.
11349 (psym_index_map): Likewise.
11350 (struct addrmap_index_data): Likewise.
11351 (add_address_entry): Likewise.
11352 (add_address_entry_worker): Likewise.
11353 (write_address_map): Likewise.
11354 (symbol_kind): Likewise.
11355 (write_psymbols): Likewise.
11356 (struct signatured_type_index_data): Likewise.
11357 (write_one_signatured_type): Likewise.
11358 (recursively_count_psymbols): Likewise.
11359 (recursively_write_psymbols): Likewise.
11360 (class debug_names): Likewise.
11361 (check_dwarf64_offsets): Likewise.
11362 (psyms_seen_size): Likewise.
11363 (write_gdbindex): Likewise.
11364 (write_debug_names): Likewise.
11365 (assert_file_size): Likewise.
11366 (write_psymtabs_to_index): Likewise.
11367 (save_gdb_index_command): Likewise.
11368 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11369 command.
11370 * dwarf2read.h: New file.
11371
11372 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11373
11374 PR gdb/22670
11375 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11376 symbol name if the CU's language stores symbol names in linkage
11377 format.
11378 * language.h (struct language_defn)
11379 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11380 all instances of this struct.
11381
11382 2018-03-26 Tom Tromey <tom@tromey.com>
11383
11384 * stack.c (backtrace_command_1): Remove verbose code.
11385
11386 2018-03-26 Tom Tromey <tom@tromey.com>
11387
11388 * python/py-framefilter.c (py_print_type): Don't catch
11389 exceptions. Return void.
11390 (py_print_value): Likewise.
11391 (py_print_single_arg): Likewise.
11392 (enumerate_args): Don't catch exceptions.
11393 (py_print_args): Likewise.
11394 (py_print_frame): Likewise.
11395 (gdbpy_apply_frame_filter): Catch exceptions here.
11396
11397 2018-03-26 Tom Tromey <tom@tromey.com>
11398
11399 * stack.c (_initialize_stack): Remove trailing newlines from help
11400 text. Add "Usage" line to "backtrace" help.
11401
11402 2018-03-26 Tom Tromey <tom@tromey.com>
11403
11404 PR python/16486:
11405 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11406
11407 2018-03-26 Tom Tromey <tom@tromey.com>
11408
11409 * python/py-framefilter.c (py_print_single_arg): Return
11410 EXT_LANG_BT_ERROR from catch.
11411
11412 2018-03-26 Tom Tromey <tom@tromey.com>
11413
11414 PR backtrace/15584:
11415 * stack.c (backtrace_command_1): Move some code into no-filters
11416 "if".
11417
11418 2018-03-26 Tom Tromey <tom@tromey.com>
11419
11420 * python/py-framefilter.c (throw_quit_or_print_exception): New
11421 function.
11422 (gdbpy_apply_frame_filter): Use it.
11423
11424 2018-03-26 Tom Tromey <tom@tromey.com>
11425
11426 PR cli/17716:
11427 * python/py-framefilter.c (py_print_type, py_print_value)
11428 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11429 RETURN_MASK_ERROR.
11430
11431 2018-03-26 Tom Tromey <tom@tromey.com>
11432
11433 * python/py-framefilter.c (enumerate_args): Use
11434 gdb::unique_xmalloc_ptr.
11435
11436 2018-03-26 Tom Tromey <tom@tromey.com>
11437
11438 * python/py-framefilter.c (py_print_frame): Return
11439 EXT_LANG_BT_OK.
11440 (gdbpy_apply_frame_filter): Update comment.
11441 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11442 Remove.
11443 <EXT_LANG_BT_NO_FILTERS>: Change value.
11444
11445 2018-03-26 Tom Tromey <tom@tromey.com>
11446
11447 PR backtrace/15582:
11448 * stack.c (backtrace_command): Parse "hide" argument.
11449 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11450 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11451 constant.
11452
11453 2018-03-26 Tom Tromey <tom@tromey.com>
11454
11455 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11456 add "flags".
11457 (backtrace_command): Remove "fulltrace", add "flags".
11458
11459 2018-03-26 Tom Tromey <tom@tromey.com>
11460
11461 * stack.c (backtrace_command): Rewrite command line parsing.
11462
11463 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11464
11465 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11466
11467 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11468
11469 * filename-seen-cache.h: Add include guard.
11470
11471 2018-03-26 Keith Seitz <keiths@redhat.com>
11472
11473 * symfile.c (place_section): Remove "struct" from section_addr_info
11474 in comment.
11475 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11476 "struct" keyword from section_addr_info.
11477
11478 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11479
11480 * regformats/regdef.h (reg): Add constructors.
11481
11482 2018-03-25 Pedro Alves <palves@redhat.com>
11483
11484 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11485 if then/else bodies in var_func_name extraction.
11486
11487 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11488
11489 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11490 lookup_minimal_symbol() to find symbol entry.
11491 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11492
11493 2018-03-23 Keith Seitz <keiths@redhat.com>
11494
11495 PR c++/22968
11496 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11497 nested type definitions for C++, too.
11498
11499 2018-03-23 Tom Tromey <tom@tromey.com>
11500
11501 * machoread.c (struct oso_el): Add a constructor. Don't define as
11502 a typedef.
11503 (macho_register_oso): Remove.
11504 (macho_symtab_read): Take a std::vector.
11505 (oso_el_compare_name): Now a std::sort comparator.
11506 (macho_symfile_read_all_oso): Take a std::vector.
11507 (macho_symfile_read): Use std::vector. Remove cleanups.
11508
11509 2018-03-22 Tom Tromey <tom@tromey.com>
11510
11511 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11512 (record_full_goto_bookmark): Use std::string.
11513
11514 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11515
11516 PR tdep/18295
11517 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11518 a single mask.
11519
11520 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11521
11522 * rs6000-tdep.c (store_insn_p): New function.
11523 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11524 and cr_reg to their unshifted values. Use store_insn_p to
11525 match LR saves using either R1 or fdata->alloca_reg. Use
11526 store_insn_p to match CR saves. Set alloca_reg_offset
11527 when alloca_reg and framep are set. Remove lr_reg shift
11528 when assigning to fdata->lr_register.
11529
11530 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11531
11532 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11533 command line args instead of emitting a warning.
11534
11535 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11536
11537 * tracepoint.h (struct static_tracepoint_marker): Initialize
11538 fields, define default constructor, move constructor and move
11539 assignment, disable the rest.
11540 <str_id, extra>: Make std::string.
11541 (release_static_tracepoint_marker): Remove.
11542 (free_current_marker): Remove.
11543 * tracepoint.c (free_current_marker): Remove.
11544 (parse_static_tracepoint_marker_definition): Adjust to
11545 std::string, use new hex2str overload.
11546 (release_static_tracepoint_marker): Remove.
11547 (print_one_static_tracepoint_marker): Get marker by reference
11548 and adjust to std::string.
11549 (info_static_tracepoint_markers_command): Adjust to std::vector
11550 changes
11551 * target.h (static_tracepoint_marker_p): Remove typedef.
11552 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11553 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11554 bool.
11555 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11556 * target-debug.h
11557 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11558 (target_debug_print_std_vector_static_tracepoint_marker): New.
11559 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11560 to...
11561 (target_debug_print_static_tracepoint_marker_p): ... this.
11562 * target-delegates.c: Re-generate.
11563 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11564 Make std::string.
11565 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11566 (decode_static_tracepoint_spec): Adjust to std::vector.
11567 (tracepoint_print_one_detail): Adjust to std::string.
11568 (strace_marker_decode_location): Adjust to std::string.
11569 (update_static_tracepoint): Adjust to std::string, remove call
11570 to release_static_tracepoint_marker.
11571 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11572 Adjust to std::vector.
11573 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11574 (remote_static_tracepoint_markers_by_strid): Adjust to
11575 std::vector.
11576 * common/rsp-low.h (hex2str): New overload with explicit count
11577 of bytes.
11578 * common/rsp-low.c (hex2str): New overload with explicit count
11579 of bytes.
11580 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11581 (_initialize_rsp_low_selftests): Add test_hex2str test.
11582 * unittests/tracepoint-selftests.c
11583 (test_parse_static_tracepoint_marker_definition): Adjust to
11584 std::string.
11585
11586 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11587
11588 * tracepoint.c (parse_static_tracepoint_marker_definition):
11589 Consider case where the definition is followed by more
11590 definitions.
11591 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11592 tracepoint-selftests.c.
11593 * unittests/tracepoint-selftests.c: New.
11594
11595 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11596
11597 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11598 Carvalho.
11599
11600 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11601
11602 * symtab.c (find_pc_sect_line): fixed indentation.
11603
11604 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11605
11606 * symtab.c (find_pc_sect_line): now uses binary search.
11607
11608 2018-03-19 Tom Tromey <tom@tromey.com>
11609
11610 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11611 "IDENT" production.
11612
11613 2018-03-19 Pedro Alves <palves@redhat.com>
11614 Tom Tromey <tom@tromey.com>
11615
11616 * unittests/observable-selftests.c: New file.
11617 * common/observable.h: New file.
11618 * observable.h: New file.
11619 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11620 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11621 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11622 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11623 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11624 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11625 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11626 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11627 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11628 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11629 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11630 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11631 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11632 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11633 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11634 tui/tui-interp.c, valops.c: Update all users.
11635 * tui/tui-hooks.c (tui_bp_created_observer)
11636 (tui_bp_deleted_observer, tui_bp_modified_observer)
11637 (tui_inferior_exit_observer, tui_before_prompt_observer)
11638 (tui_normal_stop_observer, tui_register_changed_observer):
11639 Remove.
11640 (tui_observers_token): New global.
11641 (attach_or_detach, tui_attach_detach_observers): New functions.
11642 (tui_install_hooks, tui_remove_hooks): Use
11643 tui_attach_detach_observers.
11644 * record-btrace.c (record_btrace_thread_observer): Remove.
11645 (record_btrace_thread_observer_token): New global.
11646 * observer.sh: Remove.
11647 * observer.c: Rename to observable.c.
11648 * observable.c (namespace gdb_observers): Define new objects.
11649 (observer_debug): Move into gdb_observers namespace.
11650 (struct observer, struct observer_list, xalloc_observer_list_node)
11651 (xfree_observer_list_node, generic_observer_attach)
11652 (generic_observer_detach, generic_observer_notify): Remove.
11653 (_initialize_observer): Update.
11654 Don't include observer.inc.
11655 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11656 (clean mostlyclean): Likewise.
11657 (observer.h, observer.inc): Remove targets.
11658 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11659 (COMMON_SFILES): Use observable.c, not observer.c.
11660 * .gitignore: Remove observer.h.
11661
11662 2018-03-18 Tom Tromey <tom@tromey.com>
11663
11664 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11665 gdb::def_vector.
11666 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11667
11668 2018-03-17 Tom Tromey <tom@tromey.com>
11669
11670 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11671
11672 2018-03-17 Tom Tromey <tom@tromey.com>
11673
11674 * target.c (class scoped_target_fd): New.
11675 (target_fileio_close_cleanup): Remove.
11676 (target_fileio_read_alloc_1): Use scoped_target_fd.
11677
11678 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11679
11680 * silent-rules.mk: New.
11681 * Makefile.in: Include silent-rules.mk
11682 (srcdir, VPATH, top_srcdir): Move up.
11683 (COMPILE): Add ECHO_CXX.
11684 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11685 (init.c): Add ECHO_INIT_C.
11686 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11687 (version.c): Add ECHO_GEN.
11688 (printcmd.o): Add ECHO_CXX.
11689 (target-float.o): Add ECHO_CXX.
11690 (ada-exp.o): Add ECHO_CXX.
11691 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11692 (insight$(EXEEXT)): Add ECHO_CXXLD.
11693 * gnulib/configure.ac: Add AM_SILENT_RULES.
11694 * gnulib/aclocal.m4: Re-generate.
11695 * gnulib/configure: Re-generate.
11696 * gnulib/import/Makefile.in: Re-generate.
11697
11698 2018-03-16 Tom Tromey <tom@tromey.com>
11699
11700 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11701 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11702 * utils.c (do_free_section_addr_info)
11703 (make_cleanup_free_section_addr_info): Remove.
11704 * symfile.h (struct other_sections): Add constructor.
11705 (struct section_addr_info): Remove.
11706 (section_addr_info): New typedef.
11707 (struct sym_fns) <sym_offsets>: Change type of parameter.
11708 (build_section_addr_info_from_objfile)
11709 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11710 (default_symfile_offsets, symbol_file_add)
11711 (symbol_file_add_from_bfd)
11712 (build_section_addr_info_from_section_table): Update.
11713 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11714 * symfile.c (alloc_section_addr_info): Remove.
11715 (build_section_addr_info_from_section_table): Change return type.
11716 Update.
11717 (build_section_addr_info_from_bfd)
11718 (build_section_addr_info_from_objfile): Likewise.
11719 (free_section_addr_info): Remove.
11720 (relative_addr_info_to_section_offsets): Change type of "addrs".
11721 (addrs_section_compar): Now a std::sort comparator.
11722 (addrs_section_sort): Change return type.
11723 (addr_info_make_relative): Change type of "addrs". Update.
11724 (default_symfile_offsets, syms_from_objfile_1)
11725 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11726 (symbol_file_add_separate): Update.
11727 (symbol_file_add): Change type of "addrs". Update.
11728 (add_symbol_file_command): Update. Remove cleanups.
11729 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11730 cleanups.
11731 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11732 * solib.c (solib_read_symbols): Update.
11733 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11734 * machoread.c (macho_symfile_offsets): Update.
11735 * jit.c (jit_bfd_try_read_symtab): Update.
11736
11737 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11738
11739 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11740 unittests/utils-selftests.c.
11741 * unittests/utils-selftests.c: New file.
11742
11743 2018-03-14 Tom Tromey <tom@tromey.com>
11744
11745 PR cli/14977:
11746 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11747 for NULL.
11748
11749 2018-03-14 Tom Tromey <tom@tromey.com>
11750
11751 PR cli/19918:
11752 * printcmd.c (printf_pointer): Allow "-" in format.
11753
11754 2018-03-14 Tom Tromey <tom@tromey.com>
11755
11756 * printcmd.c (_initialize_printcmd): Add usage to printf.
11757
11758 2018-03-14 Yao Qi <qiyao@sourceware.org>
11759
11760 * MAINTAINERS: Update my email address.
11761
11762 2018-03-13 Tom Tromey <tom@tromey.com>
11763
11764 * machoread.c (macho_check_dsym): Change filenamep to a
11765 std::string*.
11766 (macho_symfile_read): Update.
11767 * symfile.c (load_command): Use std::string.
11768
11769 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11770
11771 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11772 to error message string.
11773 (riscv_register_name): Use xsnprintf instead of sprintf.
11774 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11775 internal_error.
11776 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11777 error.
11778 (riscv_push_dummy_call): Likewise.
11779
11780 2018-03-12 Tom Tromey <tom@tromey.com>
11781
11782 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11783 Use gdb::byte_vector.
11784 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11785
11786 2018-03-12 Yao Qi <yao.qi@linaro.org>
11787
11788 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11789 parameter type to readable_regcache.
11790 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11791 the declaration.
11792
11793 2018-03-11 Tom Tromey <tom@tromey.com>
11794
11795 * dwarf2read.c (struct nextfield): Add initializers.
11796 (struct nextfnfield): Remove.
11797 (struct fnfieldlist): Add initializers. Remove "length" and
11798 "head", use std::vector.
11799 (struct decl_field_list): Remove.
11800 (struct field_info): Add initializers.
11801 <fields, baseclasses>: Now std::vector.
11802 <nbaseclasses, nfnfields, typedef_field_list_count,
11803 nested_types_list_count>: Remove.
11804 (dwarf2_add_field, dwarf2_add_type_defn)
11805 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11806 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11807 (process_structure_scope): Update.
11808
11809 2018-03-11 Tom Tromey <tom@tromey.com>
11810
11811 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11812 for use by std::sort.
11813 (build_type_psymtabs_1): Use std::vector.
11814
11815 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11816
11817 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11818 and LIBMPFR in the printed configuration.
11819
11820 2018-03-08 Tom Tromey <tom@tromey.com>
11821
11822 * source.c (get_filename_and_charpos): Use scoped_fd.
11823 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11824 (procfs_pidlist): Likewise.
11825 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11826 (iterate_over_mappings): Likewise.
11827
11828 2018-03-08 Tom Tromey <tom@tromey.com>
11829
11830 * infcall.c (struct call_return_meta_info)
11831 <stack_temporaries_enabled>: Remove.
11832 (get_call_return_value, call_function_by_hand_dummy): Update.
11833 * thread.c (disable_thread_stack_temporaries): Remove.
11834 (enable_thread_stack_temporaries): Remove.
11835 (thread_stack_temporaries_enabled_p): Return bool.
11836 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11837 (get_last_thread_stack_temporary): Update.
11838 * eval.c (evaluate_subexp): Update.
11839 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11840 class, not a function.
11841 (value_ptr, value_vec): Remove typedefs.
11842 (class thread_info) <stack_temporaries_enabled>: Now bool.
11843 <stack_temporaries>: Now a std::vector.
11844 (thread_stack_temporaries_enabled_p)
11845 (value_in_thread_stack_temporaries): Return bool.
11846
11847 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11848
11849 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11850 (getpkt_or_notif_sane_1): Likewise.
11851
11852 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11853
11854 * build-id.c (build_id_to_debug_bfd): Use std::string.
11855
11856 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11857
11858 * build-id.c (find_separate_debug_file_by_buildid): Return
11859 std::string.
11860 * build-id.h (find_separate_debug_file_by_buildid): Return
11861 std::string.
11862 * coffread.c (coff_symfile_read): Adjust to std::string.
11863 * elfread.c (elf_symfile_read): Adjust to std::string.
11864 * symfile.c (separate_debug_file_exists): Change parameter to
11865 std::string.
11866 (find_separate_debug_file): Return std::string.
11867 (find_separate_debug_file_by_debuglink): Return std::string.
11868 * symfile.h (find_separate_debug_file_by_debuglink): Return
11869 std::string.
11870
11871 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11872
11873 * common/xml-utils.c (xml_escape_text): Move code to...
11874 (xml_escape_text_append): ... this new function.
11875 * common/xml-utils.h (xml_escape_text_append): New declaration.
11876 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11877 New function.
11878 (_initialize_xml_utils): register test_xml_escape_text_append as
11879 a selftest.
11880
11881 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11882
11883 * defs.h: Remove MAX_REGISTER_SIZE.
11884 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11885 asserts.
11886 * python/py-unwind.c (pyuw_sniffer): Likewise.
11887
11888 2018-03-07 Tom Tromey <tom@tromey.com>
11889
11890 * linux-tdep.c (linux_info_proc): Update.
11891 * target.h (struct target_ops) <to_fileio_readlink>: Return
11892 optional<string>.
11893 (target_fileio_readlink): Return optional<string>.
11894 * remote.c (remote_hostio_readlink): Return optional<string>.
11895 * inf-child.c (inf_child_fileio_readlink): Return
11896 optional<string>.
11897 * target.c (target_fileio_readlink): Return optional<string>.
11898
11899 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11900
11901 * regcache.c (cooked_read_test): Add riscv to the list of
11902 architectures that have a save_reggroup.
11903
11904 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11905
11906 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11907 value is not a dynamic class object.
11908
11909 2018-03-06 Tom Tromey <tom@tromey.com>
11910
11911 * rust-exp.y: Formatting fixes.
11912
11913 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11914
11915 * riscv-tdep.c (riscv_register_name): Remove target description
11916 support.
11917 (riscv_gdbarch_init): Remove target description check.
11918
11919 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11920
11921 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11922 comment.
11923 * riscv-tdep.h: Likewise.
11924
11925 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11926
11927 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11928 (riscv_pseudo_register_write): Delete.
11929 (riscv_gdbarch_init): Remove all use of pseudo registers.
11930
11931 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11932
11933 * record-btrace.c (btrace_print_lines): Replace cleanup
11934 parameter with RAII equivalents.
11935 (btrace_insn_history): Replace cleanup with RAII equivalents.
11936 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11937 make_cleanup_ui_out_tuple_begin_end): Remove.
11938 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11939 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11940 make_cleanup_ui_out_list_begin_end): Remove.
11941
11942 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11943
11944 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11945 parameter types to std::vector. Use bool.
11946 (record_btrace_wait): Replace VEC(tp_t) with
11947 std::vector<thread_info *>.
11948 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11949
11950 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11951
11952 * record-btrace.c (record_btrace_disable_callback): Remove.
11953 (struct scoped_btrace_disable): New.
11954 (record_btrace_open): Use scoped_btrace_disable.
11955
11956 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11957
11958 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11959 reading values from registers.
11960
11961 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11962
11963 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11964 where appropriate.
11965
11966 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11967
11968 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11969 change parameter type. Use GDB's print functions, and use
11970 core_addr_to_string where appropriate.
11971 (riscv_push_dummy_call): Use core_addr_to_string where
11972 appropriate, update call to riscv_print_arg_location, and reindent
11973 a few lines.
11974 (riscv_return_value): Update call to riscv_print_arg_location.
11975
11976 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11977 Tim Newsome <tim@sifive.com>
11978 Albert Ou <a0u@eecs.berkeley.edu>
11979 Darius Rad <darius@bluespec.com>
11980
11981 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11982 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11983 (ALLDEPFILES): Add riscv-tdep.c
11984 * configure.tgt: Add riscv support.
11985 * riscv-tdep.c: New file.
11986 * riscv-tdep.h: New file.
11987 * NEWS: Mention new target.
11988 * MAINTAINERS: Add entry for riscv.
11989
11990 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11991
11992 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11993 fields within aggregates.
11994
11995 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
11996
11997 * record-btrace.c (btrace_print_lines): Change type of flags to
11998 gdb_disassembly_flags.
11999
12000 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12001
12002 * fbsd-nat.c: Include "inf-ptrace.h".
12003 (USE_SIGTRAP_SIGINFO): Conditionally define.
12004 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12005 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12006 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12007 function.
12008 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12009 Likewise.
12010 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12011 Likewise.
12012 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12013 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12014 "supports_stopped_by_hw_breakpoint" target methods.
12015
12016 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12017
12018 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12019 * fbsd-nat.c (debug_fbsd_nat): New variable.
12020 (show_fbsd_nat_debug): New function.
12021 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12022 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12023
12024 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12025
12026 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12027 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12028 prototype.
12029 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12030 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12031 method.
12032
12033 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12034
12035 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12036 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12037
12038 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12039
12040 * charset.c (struct charset_vector): New.
12041 (charsets): Change type to charset_vector.
12042 (find_charset_names): Adjust.
12043 (add_one): Adjust.
12044 (_initialize_charset): Adjust.
12045
12046 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12047
12048 * progspace.h (struct program_space) <deleted_solibs>: Change
12049 type to std::vector<std::string>.
12050 * progspace.c (clear_program_space_solib_cache): Adjust.
12051 * breakpoint.c (print_solib_event): Adjust.
12052 (check_status_catch_solib): Adjust.
12053 * solib.c (update_solib_list): Adjust.
12054 * ui-out.h (class ui_out) <field_string>: New overload.
12055 * ui-out.c (ui_out::field_string): New overload.
12056
12057 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12058
12059 * progspace.h (struct program_space): Add constructor and
12060 destructor, initialize fields.
12061 (add_program_space): Remove.
12062 * progspace.c (add_program_space): Rename to...
12063 (program_space::program_space): ... this.
12064 (release_program_space): Rename to...
12065 (program_space::~program_space): ... this.
12066 (delete_program_space): Use delete to delete program_space.
12067 (initialize_progspace): Use new to allocate program_space.
12068 * inferior.c (add_inferior_with_spaces): Likewise.
12069 (clone_inferior_command): Likewise.
12070 * infrun.c (follow_fork_inferior): Likewise.
12071 (handle_vfork_child_exec_or_exit): Likewise.
12072
12073 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12074
12075 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12076 (delim_string_to_char_ptr_vec): Return std::vector of
12077 gdb::unique_xmalloc_ptr.
12078 (dirnames_to_char_ptr_vec_append): Take std::vector of
12079 gdb::unique_xmalloc_ptr.
12080 (dirnames_to_char_ptr_vec): Return std::vector of
12081 gdb::unique_xmalloc_ptr.
12082 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12083 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12084 (delim_string_to_char_ptr_vec): Return an std::vector of
12085 gdb::unique_xmalloc_ptr, adjust the code.
12086 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12087 gdb::unique_xmalloc_ptr, adjust the code.
12088 (dirnames_to_char_ptr_vec): Return an std::vector of
12089 gdb::unique_xmalloc_ptr, adjust the code.
12090 * auto-load.c (auto_load_safe_path_vec): Change type to
12091 std::vector of gdb::unique_xmalloc_ptr.
12092 (auto_load_expand_dir_vars): Return an std::vector of
12093 gdb::unique_xmalloc_ptr, adjust the code.
12094 (auto_load_safe_path_vec_update): Adjust.
12095 (filename_is_in_auto_load_safe_path_vec): Adjust.
12096 (auto_load_objfile_script_1): Adjust.
12097 * build-id.c (build_id_to_debug_bfd): Adjust.
12098 * linux-thread-db.c (thread_db_load_search): Adjust.
12099 * source.c (add_path): Adjust.
12100 (openp): Adjust.
12101 * symfile.c (find_separate_debug_file): Adjust.
12102 * utils.c (do_free_char_ptr_vec): Remove.
12103 (make_cleanup_free_char_ptr_vec): Remove.
12104
12105 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12106
12107 PR gdb/22907
12108 * common/pathstuff.c: Conditionally include "<windows.h>".
12109
12110 2018-03-01 Georg Sauthoff <mail@georg.so>
12111
12112 PR gdb/22888
12113 * gcore.in: Quote variables and switch interpreter to bash.
12114
12115 2018-03-01 Tom Tromey <tom@tromey.com>
12116
12117 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12118 assertion. Add assertion for discriminant_index.
12119 (quirk_rust_enum): Use correct base type name in univariant case.
12120
12121 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12122
12123 * record.c (get_call_history_modifiers): Return a
12124 record_print_flags.
12125 (cmd_record_call_history): Adjust.
12126 * record-btrace.c (record_btrace_call_history): Adjust.
12127 (record_btrace_call_history_range): Adjust.
12128 (record_btrace_call_history_from): Adjust.
12129 * target-debug.h (target_debug_print_record_print_flags): New.
12130 * target-delegates.c: Re-generate.
12131 * target.c (target_call_history): Change flags type.
12132 (target_call_history_from): Likewise.
12133 (target_call_history_range): Likewise.
12134 * target.h (struct target_ops) <target_call_history>: Likewise.
12135 (target_call_history_from): Likewise.
12136 (target_call_history_range): Likewise.
12137
12138 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12139 Simon Marchi <simon.marchi@polymtl.ca>
12140
12141 * common/common-utils.c: Include "sys/stat.h".
12142 (is_regular_file): Move here from "source.c"; change return
12143 type to "bool".
12144 * common/common-utils.h (is_regular_file): New prototype.
12145 * common/pathstuff.c (contains_dir_separator): New function.
12146 * common/pathstuff.h (contains_dir_separator): New prototype.
12147 * source.c: Don't include "sys/stat.h".
12148 (is_regular_file): Move to "common/common-utils.c".
12149
12150 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12151
12152 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12153 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12154 * auto-load.c: Include "common/pathstuff.h".
12155 * common/common-def.h (current_directory): Move here.
12156 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12157 function.
12158 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12159 prototype.
12160 * common/pathstuff.c: New file.
12161 * common/pathstuff.h: New file.
12162 * compile/compile.c: Include "common/pathstuff.h".
12163 * defs.h (current_directory): Move to "common/common-defs.h".
12164 * dwarf2read.c: Include "common/pathstuff.h".
12165 * exec.c: Likewise.
12166 * guile/scm-safe-call.c: Likewise.
12167 * linux-thread-db.c: Likewise.
12168 * main.c: Likewise.
12169 * nto-tdep.c: Likewise.
12170 * objfiles.c: Likewise.
12171 * source.c: Likewise.
12172 * symtab.c: Likewise.
12173 * utils.c: Include "common/pathstuff.h".
12174 (gdb_realpath): Move to "common/pathstuff.c".
12175 (gdb_realpath_keepfile): Likewise.
12176 (gdb_abspath): Likewise.
12177 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12178 (gdb_realpath_keepfile): Likewise.
12179 (gdb_abspath): Likewise.
12180
12181 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12182
12183 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12184 wildcard process pid for super_resume for kernels with a
12185 specific bug.
12186
12187 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12188
12189 * compile/compile.c (get_args): Add additional comments
12190 explaining function.
12191
12192 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12193 Tom Tromey <tom@tromey.com>
12194
12195 * target.h (memory_write_request_s): Remove typedef. Don't define
12196 VEC.
12197 (target_write_memory_blocks): Change argument to std::vector.
12198 (struct memory_write_request): Add constructor.
12199 * target-memory.c (compare_block_starting_address): Return bool.
12200 Change argument types.
12201 (claim_memory): Change arguments to use std::vector.
12202 (split_regular_and_flash_blocks, blocks_to_erase)
12203 (compute_garbled_blocks): Likewise.
12204 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12205 (target_write_memory_blocks): Change argument to std::vector.
12206 * symfile.c (struct load_section_data): Add constructor and
12207 destructor. Use std::vector for "requests".
12208 (struct load_progress_data): Add initializers.
12209 (load_section_callback): Update. Use "new".
12210 (clear_memory_write_data): Remove.
12211 (generic_load): Update.
12212
12213 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12214
12215 * arch/aarch64.h: Use common/tdesc.h.
12216
12217 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12218
12219 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12220 architecture with a 64-bit ABI.
12221
12222 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12223
12224 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12225 ahead of target description loading.
12226
12227 2018-02-26 Tom Tromey <tom@tromey.com>
12228
12229 * stack.c (backtrace_command_1): Update.
12230 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12231 of "flags".
12232 * python/py-framefilter.c (py_print_frame)
12233 (gdbpy_apply_frame_filter): Change type of "flags".
12234 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12235 of "flags".
12236 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12237 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12238 * extension.h (enum frame_filter_flag): Rename from
12239 frame_filter_flags.
12240 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12241 (apply_ext_lang_frame_filter): Change type of "flags".
12242 * extension.c (apply_ext_lang_frame_filter): Change type of
12243 "flags".
12244 * extension-priv.h (struct extension_language_ops)
12245 <apply_frame_filter>: Change type of "flags".
12246
12247 2018-02-26 Tom Tromey <tom@tromey.com>
12248
12249 PR python/16497:
12250 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12251 off-by-one in py_end computation.
12252 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12253 PRINT_MORE_FRAMES.
12254 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12255 constant.
12256
12257 2018-02-26 Tom Tromey <tom@tromey.com>
12258
12259 * dwarf2read.c (struct variant_field): New.
12260 (struct nextfield) <variant>: New field.
12261 (dwarf2_add_field): Handle DW_TAG_variant_part.
12262 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12263 discriminated union.
12264 (read_structure_type): Handle DW_TAG_variant_part.
12265 (handle_struct_member_die): New function, extracted from
12266 process_structure_scope. Handle DW_TAG_variant.
12267 (process_structure_scope): Handle discriminated unions. Call
12268 handle_struct_member_die.
12269
12270 2018-02-26 Tom Tromey <tom@tromey.com>
12271
12272 * rust-lang.h (rust_last_path_segment): Declare.
12273 * rust-lang.c (rust_last_path_segment): Now public. Change
12274 contract.
12275 (struct disr_info): Remove.
12276 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12277 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12278 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12279 (rust_enum_p, rust_enum_variant): New function.
12280 (rust_underscore_fields): Remove "offset" parameter.
12281 (rust_print_enum): New function.
12282 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12283 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12284 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12285 enums.
12286 (rust_internal_print_type): New function, from rust_print_type.
12287 Remove enum code.
12288 (rust_print_type): Call rust_internal_print_type.
12289 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12290 Update enum handling.
12291 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12292 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12293 (rust_union_quirks): New functions.
12294 (process_full_comp_unit, process_full_type_unit): Call
12295 rust_union_quirks.
12296 (process_structure_scope): Update rust_unions if necessary.
12297
12298 2018-02-26 Tom Tromey <tom@tromey.com>
12299
12300 * value.h (value_union_variant): Declare.
12301 * valops.c (value_union_variant): New function.
12302 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12303 (struct discriminant_info): New.
12304 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12305 enumerator.
12306 (struct main_type) <flag_discriminated_union>: New field.
12307
12308 2018-02-26 Tom Tromey <tom@tromey.com>
12309
12310 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12311 unittests/unpack-selftests.c.
12312 * unittests/unpack-selftests.c: New file.
12313 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12314
12315 2018-02-26 Yao Qi <yao.qi@linaro.org>
12316
12317 * dwarf2read.c (struct partial_die_info) <read>: New method.
12318 (read_partial_die): Remove the declaration.
12319 (load_partial_dies): Update.
12320 (partial_die_info::partial_die_info):
12321 (read_partial_die): Change it to partial_die_info::read.
12322
12323 2018-02-26 Yao Qi <yao.qi@linaro.org>
12324
12325 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12326 (fixup_partial_die): Remove declaration.
12327 (scan_partial_symbols): Update.
12328 (partial_die_parent_scope): Likewise.
12329 (partial_die_full_name): Likewise.
12330 (fixup_partial_die): Change it to partial_die_info::fixup.
12331
12332 2018-02-26 Yao Qi <yao.qi@linaro.org>
12333
12334 * dwarf2read.c (read_partial_die): Update the declaration.
12335 (load_partial_dies): Caller update.
12336 (read_partial_die): Remove one argument abbrev_len.
12337
12338 2018-02-26 Yao Qi <yao.qi@linaro.org>
12339
12340 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12341 assignment operator.
12342 (load_partial_dies): Use ctor and copy ctor.
12343 (read_partial_die): Update.
12344 (dwarf2_cu::find_partial_die): Use ctor.
12345
12346 2018-02-26 Yao Qi <yao.qi@linaro.org>
12347
12348 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12349 (find_partial_die_in_comp_unit): Change it to
12350 dwarf2_cu::find_partial_die.
12351 (find_partial_die): Update.
12352
12353 2018-02-26 Yao Qi <yao.qi@linaro.org>
12354
12355 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12356 is NULL.
12357
12358 2018-02-26 Yao Qi <yao.qi@linaro.org>
12359
12360 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12361
12362 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12363
12364 * arch/amd64.h: Use common/tdesc.h.
12365 * arch/i386.c: Likewise.
12366 * arch/i386.h: Likewise.
12367 * arch/tic6x.c: Likewise.
12368 * arch/tdesc.h: Move file from here...
12369 * common/tdesc.h: ...to here.
12370 * features/aarch64-core.c: Regenerate.
12371 * features/aarch64-fpu.c: Regenerate.
12372 * features/i386/32bit-avx.c: Regenerate.
12373 * features/i386/32bit-avx512.c: Regenerate.
12374 * features/i386/32bit-core.c: Regenerate.
12375 * features/i386/32bit-linux.c: Regenerate.
12376 * features/i386/32bit-mpx.c: Regenerate.
12377 * features/i386/32bit-pkeys.c: Regenerate.
12378 * features/i386/32bit-sse.c: Regenerate.
12379 * features/i386/64bit-avx.c: Regenerate.
12380 * features/i386/64bit-avx512.c: Regenerate.
12381 * features/i386/64bit-core.c: Regenerate.
12382 * features/i386/64bit-linux.c: Regenerate.
12383 * features/i386/64bit-mpx.c: Regenerate.
12384 * features/i386/64bit-pkeys.c: Regenerate.
12385 * features/i386/64bit-segments.c: Regenerate.
12386 * features/i386/64bit-sse.c: Regenerate.
12387 * features/i386/x32-core.c: Regenerate.
12388 * features/tic6x-c6xp.c: Regenerate.
12389 * features/tic6x-core.c: Regenerate.
12390 * features/tic6x-gp.c: Regenerate.
12391 * target-descriptions.c: Use common/tdesc.h.
12392 * target-descriptions.h: Likewise.
12393
12394 2018-02-24 Tom Tromey <tom@tromey.com>
12395
12396 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12397 (try_thread_db_load_from_dir, thread_db_load_search): Use
12398 std::string.
12399 (info_auto_load_libthread_db_compare): Return bool. Change
12400 argument types.
12401 (info_auto_load_libthread_db): Use std::vector, std::string.
12402 Remove cleanups.
12403
12404 2018-02-24 Tom Tromey <tom@tromey.com>
12405
12406 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12407 std::string.
12408 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12409 std::string*.
12410 * gdbarch.c: Rebuild.
12411 * gdbarch.h: Rebuild.
12412 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12413 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12414 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12415 std::string*.
12416
12417 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12418
12419 * gdbtypes.h (sect_offset): Change type to uint64_t.
12420 (sect_offset_str): New function.
12421 * dwarf2read.c (create_addrmap_from_aranges): Use
12422 sect_offset_str.
12423 (error_check_comp_unit_head): Likewise.
12424 (create_debug_type_hash_table): Likewise.
12425 (read_cutu_die_from_dwo): Likewise.
12426 (init_cutu_and_read_dies): Likewise.
12427 (init_cutu_and_read_dies_no_follow): Likewise.
12428 (process_psymtab_comp_unit_reader): Likewise.
12429 (partial_die_parent_scope): Likewise.
12430 (peek_die_abbrev): Likewise.
12431 (process_queue): Likewise.
12432 (dwarf2_physname): Likewise.
12433 (read_namespace_alias): Likewise.
12434 (read_import_statement): Likewise.
12435 (create_dwo_cu_reader): Likewise.
12436 (create_cus_hash_table): Likewise.
12437 (lookup_dwo_cutu): Likewise.
12438 (inherit_abstract_dies): Likewise.
12439 (read_func_scope): Likewise.
12440 (read_call_site_scope): Likewise.
12441 (dwarf2_add_member_fn): Likewise.
12442 (read_common_block): Likewise.
12443 (read_module_type): Likewise.
12444 (read_typedef): Likewise.
12445 (read_subrange_type): Likewise.
12446 (load_partial_dies): Likewise.
12447 (read_partial_die): Likewise.
12448 (find_partial_die): Likewise.
12449 (read_str_index): Likewise.
12450 (dwarf2_string_attr): Likewise.
12451 (build_error_marker_type): Likewise.
12452 (lookup_die_type): Likewise.
12453 (dump_die_shallow): Likewise.
12454 (follow_die_ref): Likewise.
12455 (dwarf2_fetch_die_loc_sect_off): Likewise.
12456 (dwarf2_fetch_constant_bytes): Likewise.
12457 (follow_die_sig): Likewise.
12458 (get_signatured_type): Likewise.
12459 (get_DW_AT_signature_type): Likewise.
12460 (dwarf2_find_containing_comp_unit): Likewise.
12461 (set_die_type): Likewise.
12462
12463 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12464
12465 * arch/aarch64.c: Include "common-defs.h".
12466 * arch/amd64.c: Likewise.
12467 * arch/i386.c: Likewise.
12468
12469 2018-02-21 Tom Tromey <tom@tromey.com>
12470
12471 * value.h: (extract_field_op): Update.
12472 * eval.c (extract_field_op): Return a const char *.
12473 * expression.h (parse_expression_for_completion): Update.
12474 * completer.c (complete_expression): Update.
12475 (add_struct_fields): Make fieldname const.
12476 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12477 (mark_completion_tag, parse_exp_in_context_1): Update.
12478 (parse_expression_for_completion): Change "name" to
12479 unique_xmalloc_ptr*.
12480
12481 2018-02-21 Tom Tromey <tom@tromey.com>
12482
12483 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12484
12485 2018-02-21 Yao Qi <yao.qi@linaro.org>
12486
12487 * avr-tdep.c (avr_read_pc): Change parameter type to
12488 readable_regcache.
12489 * gdbarch.sh (read_pc): Likewise.
12490 * gdbarch.c: Re-generated.
12491 * gdbarch.h: Re-generated.
12492 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12493 readable_regcache.
12494 * ia64-tdep.c (ia64_read_pc): Likewise.
12495 * mips-tdep.c (mips_read_pc): Likewise.
12496 * spu-tdep.c (spu_read_pc): Likewise.
12497
12498 2018-02-21 Yao Qi <yao.qi@linaro.org>
12499
12500 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12501 * regcache-dump.c: New file.
12502 * regcache.c: Move register_dump to regcache-dump.c.
12503 (maintenance_print_registers): Likewise.
12504 (maintenance_print_raw_registers): Likewise.
12505 (maintenance_print_cooked_registers): Likewise.
12506 (maintenance_print_register_groups): Likewise.
12507 (maintenance_print_remote_registers): Likewise.
12508 (_initialize_regcache): Likewise.
12509 * regcache.h (register_dump): Moved from regcache.c.
12510
12511 2018-02-21 Yao Qi <yao.qi@linaro.org>
12512
12513 * regcache.c (regcache::regcache): Update.
12514 (regcache::invalidate): Move it to detached_regcache::invalidate.
12515 (get_thread_arch_aspace_regcache): Update.
12516 (regcache::raw_update): Update.
12517 (regcache::cooked_read): Remove some code.
12518 (regcache::cooked_read_value): Likewise.
12519 (regcache::raw_write): Remove assert on m_readonly_p.
12520 (regcache::raw_supply_integer): Move it to
12521 detached_regcache::raw_supply_integer.
12522 (regcache::raw_supply_zeroed): Likewise.
12523 * regcache.h (detached_regcache) <raw_supply_integer>: New
12524 declaration.
12525 <raw_supply_zeroed, invalidate>: Likewise.
12526 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12527 <invalidate>: Likewise.
12528 <m_readonly_p>: Removed.
12529
12530 2018-02-21 Yao Qi <yao.qi@linaro.org>
12531
12532 * infcmd.c (get_return_value): Let stop_regs point to
12533 get_current_regcache.
12534 * regcache.c (regcache::regcache): Remove.
12535 (register_dump_reg_buffer): New class.
12536 (regcache_print): Adjust.
12537 * regcache.h (regcache): Remove constructors.
12538
12539 2018-02-21 Yao Qi <yao.qi@linaro.org>
12540
12541 * regcache.c (class register_dump): New class.
12542 (register_dump_regcache, register_dump_none): New class.
12543 (register_dump_remote, register_dump_groups): New class.
12544 (regcache_print): Update.
12545 * regcache.h (regcache_dump_what): Move it to regcache.c.
12546 (regcache) <dump>: Remove.
12547
12548 2018-02-21 Yao Qi <yao.qi@linaro.org>
12549
12550 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12551 reg_buffer_rw *.
12552 (jit_unwind_reg_set_impl): Call raw_supply.
12553 (jit_frame_sniffer): Use reg_buffer_rw.
12554 * record-full.c (record_full_core_regbuf): Change its type.
12555 (record_full_core_open_1): Use reg_buffer_rw.
12556 (record_full_close): Likewise.
12557 (record_full_core_fetch_registers): Use regcache->raw_supply.
12558 (record_full_core_store_registers): Likewise.
12559 * regcache.c (regcache::get_register_status): Move it to
12560 reg_buffer.
12561 (regcache_raw_set_cached_value): Remove.
12562 (regcache::raw_set_cached_value): Remove.
12563 (regcache::raw_write): Call raw_supply.
12564 (regcache::raw_supply): Move it to reg_buffer_rw.
12565 * regcache.h (regcache_raw_set_cached_value): Remove.
12566 (reg_buffer_rw): New class.
12567
12568 2018-02-21 Yao Qi <yao.qi@linaro.org>
12569
12570 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12571 readonly_detached_regcache.
12572 (dummy_frame_prev_register): Use regcache->cooked_read.
12573 * frame.c (frame_save_as_regcache): Change return type.
12574 (frame_pop): Update.
12575 * frame.h (frame_save_as_regcache): Update declaration.
12576 * inferior.h (get_infcall_suspend_state_regcache): Update
12577 declaration.
12578 * infrun.c (infcall_suspend_state) <registers>: use
12579 readonly_detached_regcache.
12580 (save_infcall_suspend_state): Don't use regcache_dup.
12581 (get_infcall_suspend_state_regcache): Change return type.
12582 * linux-fork.c (struct fork_info) <savedregs>: Change to
12583 readonly_detached_regcache.
12584 <pc>: New field.
12585 (fork_save_infrun_state): Don't use regcache_dup.
12586 (info_checkpoints_command): Adjust.
12587 * mi/mi-main.c (register_changed_p): Update declaration.
12588 (mi_cmd_data_list_changed_registers): Use
12589 readonly_detached_regcache.
12590 (register_changed_p): Change parameter type to
12591 readonly_detached_regcache.
12592 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12593 readonly_detached_regcache.
12594 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12595 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12596 New.
12597 (regcache::save): Move it to reg_buffer.
12598 (regcache::restore): Change parameter type.
12599 (regcache_dup): Remove.
12600 * regcache.h (reg_buffer) <save>: New method.
12601 (readonly_detached_regcache): New class.
12602 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12603 readonly_detached_regcache.
12604 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12605
12606 2018-02-21 Yao Qi <yao.qi@linaro.org>
12607
12608 * frame.c (frame_save_as_regcache): Use regcache method save.
12609 (frame_pop): Use regcache method restore.
12610 * infrun.c (restore_infcall_suspend_state): Likewise.
12611 * linux-fork.c (fork_load_infrun_state): Likewise.
12612 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12613 save.
12614 * regcache.c (regcache_save): Remove.
12615 (regcache::restore): More asserts.
12616 (regcache_cpy): Remove.
12617 * regcache.h (regcache_save): Remove the declaration.
12618 (regcache::restore): Move from private to public.
12619 Remove the friend declaration of regcache_cpy.
12620 (regcache_cpy): Remove declaration.
12621
12622 2018-02-21 Yao Qi <yao.qi@linaro.org>
12623
12624 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12625 parameter type to 'readable_regcache *'.
12626 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12627 * arm-tdep.c (arm_neon_quad_read): Likewise.
12628 (arm_pseudo_read): Likewise.
12629 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12630 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12631 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12632 * gdbarch.c: Re-generated.
12633 * gdbarch.h: Re-generated.
12634 * gdbarch.sh (pseudo_register_read): Change parameter type to
12635 'readable_regcache *'.
12636 (pseudo_register_read_value): Likewise.
12637 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12638 (h8300_pseudo_register_read): Likewise.
12639 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12640 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12641 (i386_pseudo_register_read_into_value): Likewise.
12642 (i386_pseudo_register_read_value): Likewise.
12643 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12644 declaration.
12645 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12646 * m32c-tdep.c (m32c_raw_read): Likewise.
12647 (m32c_read_flg): Likewise.
12648 (m32c_banked_register): Likewise.
12649 (m32c_banked_read): Likewise.
12650 (m32c_sb_read): Likewise.
12651 (m32c_part_read): Likewise.
12652 (m32c_cat_read): Likewise.
12653 (m32c_r3r2r1r0_read): Likewise.
12654 (m32c_pseudo_register_read): Likewise.
12655 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12656 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12657 (mep_pseudo_cr64_read): Likewise.
12658 (mep_pseudo_register_read): Likewise.
12659 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12660 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12661 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12662 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12663 (regcache::cooked_read): Likewise.
12664 (regcache::cooked_read_value): Likewise.
12665 (regcache_cooked_read_signed):
12666 (regcache::cooked_read): Likewise.
12667 * regcache.h (readable_regcache): New class.
12668 (regcache): Inherit readable_regcache. Move some methods to
12669 readable_regcache.
12670 * rl78-tdep.c (rl78_pseudo_register_read): Change
12671 parameter type to 'readable_regcache *'.
12672 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12673 (e500_pseudo_register_read): Change parameter type to
12674 'readable_regcache *'.
12675 (dfp_pseudo_register_read): Likewise.
12676 (vsx_pseudo_register_read): Likewise.
12677 (efpr_pseudo_register_read): Likewise.
12678 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12679 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12680 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12681 (sh64_pseudo_register_read): Likewise.
12682 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12683 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12684 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12685 (spu_pseudo_register_read): Likewise.
12686 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12687 (xtensa_pseudo_register_read): Likewise.
12688
12689 2018-02-21 Yao Qi <yao.qi@linaro.org>
12690
12691 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12692 (regcache::arch): Move it to reg_buffer::arch.
12693 (regcache::register_buffer): Likewise.
12694 (regcache::assert_regnum): Likewise.
12695 (regcache::num_raw_registers): Likewise.
12696 * regcache.h (reg_buffer): New class.
12697 (regcache): Inherit reg_buffer.
12698
12699 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12700
12701 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12702 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12703
12704 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12705
12706 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12707
12708 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12709
12710 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12711 (SFILES): Remove common/*.c files.
12712 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12713 * common/common.host: Add common reference.
12714 * configure.ac: Likewise.
12715 * configure: Regenerate.
12716
12717 2018-02-16 Yao Qi <yao.qi@linaro.org>
12718
12719 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12720 (block_initialize_namespace): Use new.
12721 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12722 (dwarf2_free_objfile): Use delete.
12723 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12724 (copy_type_recursive): Use new.
12725 * gdb_obstack.h (allocate_on_obstack): New.
12726
12727 2018-02-15 Yao Qi <yao.qi@linaro.org>
12728
12729 PR gdb/22849
12730 * inferior.c (exit_inferior_1): Reset inf->control.
12731
12732 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12733
12734 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12735 declaration.
12736
12737 2018-02-14 Pedro Alves <palves@redhat.com>
12738
12739 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12740 frame_cleanup_after_sniffer on exception.
12741
12742 2018-02-14 Tom Tromey <tom@tromey.com>
12743
12744 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12745 const.
12746 (solib_bfd_open): Make pathname const.
12747 * solib.c (solib_bfd_open): Make pathname const.
12748 * solib-spu.c (spu_bfd_fopen): Make name const.
12749 (spu_bfd_open): Make pathname const.
12750 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12751 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12752
12753 2018-02-14 Tom Tromey <tom@tromey.com>
12754
12755 * symfile.c (symfile_bfd_open): Update.
12756 * source.h (openp, source_full_path_of, find_and_open_source):
12757 Change argument type to unique_xmalloc_ptr.
12758 * source.c (openp): Take a unique_xmalloc_ptr.
12759 (source_full_path_of, find_and_open_source): Likewise.
12760 (open_source_file, symtab_to_fullname): Update.
12761 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12762 unique_xmalloc_ptr.
12763 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12764 (exec_file_find): Update.
12765 * psymtab.c (psymtab_to_fullname): Update.
12766 * nto-tdep.h (nto_find_and_open_solib): Update.
12767 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12768 unique_xmalloc_ptr.
12769 * exec.c (exec_file_attach): Update.
12770 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12771 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12772
12773 2018-02-14 Tom Tromey <tom@tromey.com>
12774
12775 * solib.c: Include source.h.
12776 * nto-tdep.c: Include source.h.
12777 * mi/mi-cmd-env.c: Include source.h.
12778 * infcmd.c: Include source.h.
12779 * exec.c: Include source.h.
12780 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12781 (add_path, directory_switch, source_path, init_source_path): Move
12782 declarations...
12783 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12784 (add_path, directory_switch, source_path, init_source_path):
12785 ...here.
12786
12787 2018-02-14 Tom Tromey <tom@tromey.com>
12788
12789 * solist.h (exec_file_find, solib_find): Return
12790 unique_xmalloc_ptr.
12791 (solib_bfd_fopen): Take a const char *.
12792 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12793 (exec_file_find, solib_find): Likewise.
12794 (solib_bfd_fopen): Do not take ownership of "pathname".
12795 (solib_bfd_open): Use unique_xmalloc_ptr.
12796 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12797 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12798 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12799 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12800
12801 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12802
12803 * ada-lang.c (name_match_type_from_name): Remove reference to
12804 ada_name_for_lookup in function's documentation.
12805 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12806
12807 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12808
12809 * defs.h (enum openp_flags): New enum.
12810 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12811 Move to enum openp_flags.
12812 (openp_flags): New enum flags.
12813 (openp): Change parameter type to openp_flags.
12814 * source.c (openp): Change parameter type to openp_flags.
12815 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12816 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12817
12818 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12819
12820 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12821 per-command.
12822
12823 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12824
12825 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12826 into...
12827 (class dwarf2_queue_guard): ...the destructor of this new class.
12828 (dw2_do_instantiate_symtab): Create instance of the new class
12829 dwarf2_queue_guard, remove cleanup.
12830
12831 2018-02-09 Tom Tromey <tom@tromey.com>
12832
12833 * source.c (find_source_lines): Don't reference past the end of
12834 the vector.
12835
12836 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12837
12838 * remote.c (remote_btrace_maybe_reopen): Change error message.
12839 * btrace.c (btrace_enable): Likewise.
12840 (parse_xml_btrace): Likewise.
12841 (parse_xml_btrace_conf): Likewise.
12842
12843 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12844
12845 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12846 (linux_enable_pt, linux_enable_bts): Call
12847 diagnose_perf_event_open_fail.
12848
12849 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12850
12851 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12852 Remove parameter and change return type. Update callers. Move it.
12853 (linux_enable_bts, linux_enable_pt): Improve error message.
12854 (linux_enable_pt): Remove zero buffer size check.
12855 (linux_enable_btrace): Improve error messages. Remove NULL return
12856 check.
12857
12858 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12859
12860 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12861 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12862 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12863 (linux_supports_pt, linux_supports_btrace): Remove.
12864 (linux_enable_bts): Call cpu_supports_bts.
12865 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12866 * remote.c (remote_supports_btrace): Remove.
12867 (init_remote_ops): Remove remote_supports_btrace.
12868 * target-delegates.c: Regenerated.
12869 * target.c (target_supports_btrace): Remove.
12870 * target.h (target_ops) <to_supports_btrace>: Remove
12871 (target_supports_btrace): Remove.
12872 * x86-linux-nat.c (x86_linux_create_target): Remove
12873 linux_supports_btrace.
12874
12875 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12876
12877 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12878 btrace failed.
12879 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12880 exception and use message in own exception.
12881
12882 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12883
12884 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12885 (perf_event_pt_event_type): Use gdb_file_up.
12886 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12887 scoped_fd, and scoped_mmap.
12888
12889 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12890
12891 * common/scoped_mmap.h: New.
12892 * unittests/scoped_mmap-selftest.c: New.
12893 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12894 unittests/scoped_mmap-selftest.c.
12895
12896 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12897
12898 * common/scoped_fd.h: New.
12899 * unittests/scoped_fd-selftest.c: New.
12900 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12901 unittests/scoped_fd-selftest.c.
12902
12903 2018-02-09 Tom Tromey <tom@tromey.com>
12904
12905 * auto-load.c (auto_load_section_scripts): Use
12906 gdb::unique_xmalloc_ptr.
12907
12908 2018-02-09 Tom Tromey <tom@tromey.com>
12909
12910 * auto-load.c (execute_script_contents): Use std::string.
12911
12912 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12913
12914 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12915 Python function, rather than a new command.
12916
12917 2018-02-08 Tom Tromey <tom@tromey.com>
12918
12919 * solib.c (solib_find_1): Use std::string.
12920 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12921
12922 2018-02-08 Tom Tromey <tom@tromey.com>
12923
12924 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12925
12926 2018-02-08 Tom Tromey <tom@tromey.com>
12927
12928 * source.c (find_source_lines): Use gdb::def_vector.
12929
12930 2018-02-08 Tom Tromey <tom@tromey.com>
12931
12932 * macrocmd.c (struct temporary_macro_definition): New.
12933 (macro_define_command): Use temporary_macro_definition. Remove
12934 cleanups.
12935 (free_macro_definition_ptr): Remove.
12936
12937 2018-02-08 Tom Tromey <tom@tromey.com>
12938
12939 * macroexp.c (maybe_expand): Use std::string.
12940
12941 2018-02-08 Tom Tromey <tom@tromey.com>
12942
12943 * macroexp.c (struct macro_buffer): Add initializers for some
12944 members.
12945 (init_buffer, init_shared_buffer, free_buffer)
12946 (free_buffer_return_text): Remove.
12947 (macro_buffer): New constructors.
12948 (~macro_buffer): New destructor.
12949 (macro_buffer::set_shared): New method.
12950 (macro_buffer::resize_buffer, macro_buffer::appendc)
12951 (macro_buffer::appendmem): Now methods, not free functions.
12952 (set_token, append_tokens_without_splicing, stringify)
12953 (macro_stringify): Update.
12954 (gather_arguments): Change return type. Remove argc_p argument,
12955 add args_ptr argument. Use std::vector.
12956 (substitute_args): Remove argc argument. Accept std::vector.
12957 (expand): Update. Use std::vector.
12958 (scan, macro_expand, macro_expand_next): Update.
12959
12960 2018-02-08 Tom Tromey <tom@tromey.com>
12961
12962 * symtab.c (default_collect_symbol_completion_matches_break_on):
12963 Use unique_xmalloc_ptr.
12964 * macroscope.h: (sal_macro_scope, user_macro_scope)
12965 (default_macro_scope): Return unique_xmalloc_ptr.
12966 * macroscope.c (sal_macro_scope, user_macro_scope)
12967 (default_macro_scope): Return unique_xmalloc_ptr.
12968 * macroexp.h (macro_expand, macro_expand_once): Return
12969 unique_xmalloc_ptr.
12970 * macroexp.c (macro_expand, macro_expand_once): Return
12971 unique_xmalloc_ptr.
12972 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12973 (info_macro_command, info_macros_command): Use
12974 unique_xmalloc_ptr.
12975 * compile/compile-c-support.c (write_macro_definitions): Use
12976 unique_xmalloc_ptr.
12977 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12978
12979 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12980
12981 * value.c (value_static_field): Assign field type instead of
12982 containing type when returning an optimized out value.
12983
12984 2018-02-06 Yao Qi <yao.qi@linaro.org>
12985
12986 * ft32-tdep.c (ft32_read_pc): Remove.
12987 (ft32_write_pc): Remove.
12988 (ft32_gdbarch_init): Update.
12989 * m32r-tdep.c (m32r_read_pc): Remove.
12990 (m32r_gdbarch_init): Update.
12991 * mep-tdep.c (mep_read_pc): Remove.
12992 (mep_gdbarch_init): Update.
12993 * microblaze-tdep.c (microblaze_write_pc): Remove.
12994 (microblaze_gdbarch_init): Update.
12995 * mn10300-tdep.c (mn10300_read_pc): Remove.
12996 (mn10300_write_pc): Remove.
12997 (mn10300_gdbarch_init): Update.
12998 * moxie-tdep.c (moxie_read_pc): Remove.
12999 (moxie_write_pc): Remove.
13000 (moxie_gdbarch_init): Update.
13001
13002 2018-02-06 Yao Qi <yao.qi@linaro.org>
13003
13004 * expprint.c (print_subexp_standard): Handle
13005 OP_F77_UNDETERMINED_ARGLIST.
13006 (dump_subexp_body_standard): Likewise.
13007
13008 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13009
13010 * target-descriptions.c (tdesc_element_visitor) Add empty
13011 implementations.
13012 (tdesc_type): Move make_gdb_type from here.
13013 (tdesc_type_builtin): Likewise.
13014 (tdesc_type_vector): Likewise.
13015 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13016 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13017 (make_gdb_type_union): Likewise.
13018 (make_gdb_type_flags): Likewise.
13019 (make_gdb_type_enum): Likewise.
13020 (make_gdb_type): New function.
13021 (tdesc_register_type): Use static make_gdb_type.
13022
13023 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13024
13025 * infcmd.c (default_print_one_register_info): Align natural-format
13026 column values consistently one under another.
13027 (pad_to_column): New function.
13028
13029 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13030
13031 * dwarf2read.c (dwarf2_physname): Move commment.
13032
13033 2018-02-01 Leszek Swirski <leszeks@google.com>
13034
13035 * varobj.c (varobj_formatted_print_options): Allow recursive
13036 pretty printing if pretty printing is enabled.
13037
13038 2018-02-01 Leszek Swirski <leszeks@google.com>
13039
13040 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13041 names after a structop as a filename.
13042
13043 2018-02-01 Yao Qi <yao.qi@linaro.org>
13044
13045 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13046 (arm_record_coproc_data_proc): Likewise.
13047
13048 2018-02-01 Yao Qi <yao.qi@linaro.org>
13049
13050 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13051
13052 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13053
13054 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13055 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13056
13057 2018-01-31 Pedro Alves <palves@redhat.com>
13058
13059 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13060 * inflow.c (child_terminal_save_inferior): Wrap reference to
13061 tcgetpgrp in HAVE_TERMIOS_H.
13062 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13063 _WIN32.
13064 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13065 always iterate over all inferiors.
13066 (gdbsim_cntrl_c): Adjust.
13067 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13068
13069 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13070
13071 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13072 index type is objfile-owned if the element type is as well.
13073
13074 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13075
13076 GDB 8.1 released.
13077
13078 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13079
13080 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13081 "features/s390x-linux64.c".
13082 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13083 s390_linux32 and s390x_linux64.
13084 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13085 default tdesc.
13086 * s390-tdep.c: Include "features/s390-linux32.c" and
13087 "features/s390x-linux64.c".
13088 (s390_tdesc_valid): Add check for tdesc_has_registers.
13089 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13090 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13091 tdesc_s390x_linux64.
13092 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13093 tdesc_s390x_linux64 to...
13094 * s390-tdep.h: ...here.
13095
13096 2018-01-30 Pedro Alves <palves@redhat.com>
13097
13098 PR gdb/13211
13099 * config.in, configure: Regenerate.
13100 * configure.ac: Check for getpgid.
13101 * go32-nat.c (go32_pass_ctrlc): New.
13102 (go32_target): Install it.
13103 * inf-child.c (inf_child_target): Install
13104 child_terminal_save_inferior, child_pass_ctrlc and
13105 child_interrupt.
13106 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13107 (inf_ptrace_target): No longer install it.
13108 * infcmd.c (interrupt_target_1): Adjust.
13109 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13110 (child_interrupt): Declare.
13111 (inferior::terminal_state): New.
13112 * inflow.c (struct terminal_info): Update comments.
13113 (inferior_process_group): Delete.
13114 (terminal_is_ours): Delete.
13115 (gdb_tty_state): New.
13116 (child_terminal_init): Adjust.
13117 (is_gdb_terminal, sharing_input_terminal_1)
13118 (sharing_input_terminal): New functions.
13119 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13120 Set the process's actual process group in the foreground if
13121 possible. Handle is_ours_for_output/is_ours distinction. Don't
13122 mark terminal as the inferior's if not sharing GDB's terminal.
13123 Don't check attach_flag.
13124 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13125 pass down a target_terminal_state.
13126 (child_terminal_save_inferior): New, factored out from ...
13127 (child_terminal_ours_1): ... this. Handle
13128 target_terminal_state::is_ours_for_output.
13129 (child_interrupt, child_pass_ctrlc): New.
13130 (inflow_inferior_exit): Clear the inferior's terminal_state.
13131 (copy_terminal_info): Copy the inferior's terminal state.
13132 (_initialize_inflow): Remove reference to terminal_is_ours.
13133 * inflow.h (inferior_process_group): Delete.
13134 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13135 * procfs.c (procfs_target): Don't install procfs_interrupt.
13136 (procfs_interrupt): Delete.
13137 * remote.c (remote_serial_quit_handler): Adjust.
13138 (remote_interrupt): Remove ptid parameter. Adjust.
13139 * target-delegates.c: Regenerate.
13140 * target.c: Include "terminal.h".
13141 (target_terminal::terminal_state): Rename to ...
13142 (target_terminal::m_terminal_state): ... this.
13143 (target_terminal::init): Adjust.
13144 (target_terminal::inferior): Adjust to per-inferior
13145 terminal_state.
13146 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13147 (target_terminal::ours, target_terminal::ours_for_output): Use
13148 target_terminal_is_ours_kind.
13149 (target_interrupt): Remove ptid parameter. Adjust.
13150 (default_target_pass_ctrlc): Adjust.
13151 * target.h (target_ops::to_terminal_save_inferior): New field.
13152 (target_ops::to_interrupt): Remove ptid_t parameter.
13153 (target_interrupt): Remove ptid_t parameter. Update comment.
13154 (target_pass_ctrlc): Update comment.
13155 * target/target.h (target_terminal_state): New scoped enum,
13156 factored out of ...
13157 (target_terminal::terminal_state): ... here.
13158 (target_terminal::inferior): Update comments.
13159 (target_terminal::restore_inferior): New.
13160 (target_terminal::is_inferior, target_terminal::is_ours)
13161 (target_terminal::is_ours_for_output): Adjust.
13162 (target_terminal::scoped_restore_terminal_state): Adjust to
13163 rename, and call restore_inferior() instead of inferior().
13164 (target_terminal::scoped_restore_terminal_state::m_state): Change
13165 type.
13166 (target_terminal::terminal_state): Rename to ...
13167 (target_terminal::m_terminal_state): ... this and change type.
13168
13169 2018-01-30 Pedro Alves <palves@redhat.com>
13170
13171 * linux-nat.c (wait_for_signal): New function.
13172 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13173 directly.
13174 (async_terminal_is_ours)
13175 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13176 (linux_nat_add_target): Don't override
13177 to_terminal_inferior/to_terminal_ours.
13178
13179 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13180
13181 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13182
13183 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13184
13185 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13186 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13187 dwarf2_per_objfile_free here.
13188 (dwarf2_per_objfile_free): Remove.
13189 (_initialize_dwarf2_read): Don't register
13190 dwarf2_per_objfile_free as a registry cleanup.
13191
13192 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13193
13194 Avoid compilation errors in MinGW native builds
13195
13196 The error is triggered by including python-internal.h, and the
13197 error message is:
13198
13199 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13200 from build-gnulib/import/math.h:27,
13201 from d:/usr/Python26/include/pyport.h:235,
13202 from d:/usr/Python26/include/Python.h:58,
13203 from python/python-internal.h:94,
13204 from python/py-arch.c:24:
13205 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13206 using ::hypot;
13207 ^~~~~
13208
13209 This happens because Python headers define 'hypot' to expand t
13210 '_hypot' in the Windows builds.
13211 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13212 'hypoth'. This avoids a compilation error.
13213
13214 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13215
13216 * MAINTAINERS (Write After Approval): Fix ordering.
13217
13218 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13219
13220 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13221
13222 2018-01-26 Alan Modra <amodra@gmail.com>
13223
13224 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13225 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13226 Remove nop. Make const. Comment.
13227 (powerpc32_plt_stub_so_2): New.
13228 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13229 Correct count. Update uses.
13230 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13231 Move common code reading PLT entry word. Correct
13232 powerpc32_plt_stub PLT address calculation.
13233 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13234 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13235 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13236 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13237 (ppc64_standard_linkage8): Likewise.
13238 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13239 Correct insns description.
13240 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13241
13242 2018-01-24 Pedro Alves <palves@redhat.com>
13243
13244 GCC PR libstdc++/83906
13245 * gdbtypes.c (operator==(const dynamic_prop &,
13246 const dynamic_prop &)): New.
13247 (operator==(const range_bounds &, const range_bounds &)): New.
13248 (check_types_equal): Use them instead of memcmp.
13249 * gdbtypes.h (operator==(const dynamic_prop &,
13250 const dynamic_prop &)): Declare.
13251 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13252 (operator==(const range_bounds &, const range_bounds &)): Declare.
13253 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13254
13255 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13256
13257 * s390-linux-tdep.c (s390_record_address_mask)
13258 (s390_record_calc_disp_common, s390_record_calc_disp)
13259 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13260 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13261 (s390_process_record): Move to s390-tdep.c.
13262 (s390_linux_init_abi_any): Adjust.
13263 * s390-tdep.c (s390_record_address_mask)
13264 (s390_record_calc_disp_common, s390_record_calc_disp)
13265 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13266 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13267 (s390_process_record): Moved from s390-linux-tdep.c
13268 (s390_gdbarch_init): Adjust.
13269
13270 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13271
13272 * s390-linux-nat.c (s390-tdep.h): New include.
13273 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13274 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13275 (ALLDEPFILES): Add s390-tdep.c.
13276 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13277 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13278 * s390-tdep.h: ...this. New file.
13279 * s390-linux-tdep.c (s390-tdep.h): New include.
13280 (_initialize_s390_tdep): Rename to...
13281 (_initialize_s390_linux_tdep): ...this and adjust.
13282 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13283 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13284 s390-tdep.h.
13285 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13286 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13287 (s390_is_partial_instruction, s390_software_single_step)
13288 (is_non_branch_ril, s390_displaced_step_copy_insn)
13289 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13290 (s390_prologue_data, s390_addr, s390_store, s390_load)
13291 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13292 (s390_register_call_saved, s390_guess_tracepoint_registers)
13293 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13294 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13295 (s390_pseudo_register_name, s390_pseudo_register_type)
13296 (s390_pseudo_register_read, s390_pseudo_register_write)
13297 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13298 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13299 (s390_addr_bits_remove, s390_address_class_type_flags)
13300 (s390_address_class_type_flags_to_name)
13301 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13302 (s390_function_arg_float, s390_function_arg_vector)
13303 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13304 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13305 (s390_frame_align, s390_register_return_value, s390_return_value)
13306 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13307 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13308 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13309 (s390_trad_frame_prev_register, s390_unwind_cache)
13310 (s390_prologue_frame_unwind_cache)
13311 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13312 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13313 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13314 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13315 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13316 (s390_frame_base_address, s390_local_base_address)
13317 (s390_frame_base, s390_gcc_target_options)
13318 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13319 (s390_validate_reg_range, s390_tdesc_valid)
13320 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13321 * s390-tdep.c: ...this. New file.
13322
13323 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13324
13325 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13326 (s390_process_record, s390_gdbarch_tdep_alloc)
13327 (s390_linux_init_abi_any): Use/set new hook.
13328
13329 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13330
13331 * s390-linux-tdep.c (osabi.h): New include.
13332 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13333 (s390_linux_init_abi_any): New functions.
13334 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13335
13336 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13337
13338 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13339 tdesc_has_registers check
13340
13341 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13342
13343 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13344 (s390_validate_reg_range): New macro.
13345 (s390_gdbarch_init): Adjust.
13346
13347 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13348
13349 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13350 (s390_gdbarch_tdep_alloc): Adjust.
13351 (s390_gdbarch_init): Adjust.
13352
13353 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13354
13355 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13356 <have_tdb>: Change type to bool.
13357 (s390_gdbarch_tdep_alloc): Adjust.
13358 (s390_gdbarch_init): Adjust.
13359
13360 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13361
13362 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13363 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13364 (s390_gdbarch_tdep_alloc): New function.
13365 (s390_gdbarch_init): Allocate tdep at start and use its fields
13366 instead of separate variables.
13367
13368 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13369
13370 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13371 when looking for cached gdbarch and add comment for remaining.
13372
13373 2018-01-22 Pedro Alves <palves@redhat.com>
13374 Sergio Durigan Junior <sergiodj@redhat.com>
13375
13376 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13377 case.
13378
13379 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13380
13381 * MAINTAINERS: Update my company e-mail address.
13382
13383 2018-01-22 Yao Qi <yao.qi@linaro.org>
13384
13385 * regcache.c (cooked_write_test): New function.
13386 (_initialize_regcache): Register the test.
13387
13388 2018-01-22 Yao Qi <yao.qi@linaro.org>
13389
13390 * ia64-tdep.c (ia64_pseudo_register_read): Call
13391 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13392 * m32c-tdep.c (m32c_cat_read): Likewise.
13393 (m32c_r3r2r1r0_read): Likewise.
13394 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13395 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13396
13397 2018-01-22 Yao Qi <yao.qi@linaro.org>
13398
13399 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13400 method raw_read instead of regcache_raw_read.
13401 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13402 * arm-tdep.c (arm_neon_quad_read): Likewise.
13403 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13404 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13405 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13406 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13407 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13408 (i386_pseudo_register_read_into_value): Likewise.
13409 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13410 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13411 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13412 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13413 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13414 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13415 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13416 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13417 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13418
13419 2018-01-22 Yao Qi <yao.qi@linaro.org>
13420
13421 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13422 * configure.tgt: Remove target mt.
13423 * mt-tdep.c: Remove.
13424 * regcache.c (cooked_read_test): Remove the check for mt.
13425
13426 2018-01-22 Yao Qi <yao.qi@linaro.org>
13427
13428 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13429 instead of gdbarch_pseudo_register_read_value.
13430
13431 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13432
13433 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13434 language is Ada.
13435
13436 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13437
13438 * linespec.c (create_sals_line_offset): Remove code that preserved
13439 the symtab_and_line's line number.
13440
13441 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13442
13443 * varobj.c (varobj_create): Don't set valid_block when creating a
13444 floating varobj.
13445
13446 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13447
13448 * varobj.c (varobj_create): Remove out of date comment.
13449
13450 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13451
13452 PR mi/20395
13453 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13454 updating innermost block.
13455 * parse.c (innermost_block_tracker::update): Take extra type
13456 parameter, and check types match before updating innermost block.
13457 (write_dollar_variable): Update innermost block for registers.
13458 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13459 (innermost_block_tracker::innermost_block_tracker): Initialise
13460 m_types member.
13461 (innermost_block_tracker::reset): Take type parameter.
13462 (innermost_block_tracker::update): Take type parameter, and pass
13463 type through as needed.
13464 (innermost_block_tracker::m_types): New member.
13465 * varobj.c (varobj_create): Pass type when reseting innermost
13466 block.
13467
13468 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13469
13470 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13471 * ada-lang.c (resolve_subexp): Likewise.
13472 * breakpoint.c (set_breakpoint_condition) Likewise.
13473 (watch_command_1) Likewise.
13474 * c-exp.y (variable): Likewise.
13475 * d-exp.y (PrimaryExpression): Likewise.
13476 * f-exp.y (variable): Likewise.
13477 * go-exp.y (variable): Likewise.
13478 * m2-exp.y (variable): Likewise.
13479 * objfiles.c (objfile::~objfile): Likewise.
13480 * p-exp.y (variable): Likewise.
13481 * parse.c (innermost_block): Change type.
13482 * parser-defs.h (class innermost_block_tracker): New.
13483 (innermost_block): Change to innermost_block_tracker.
13484 * printcmd.c (display_command): Switch to innermost_block API.
13485 (do_one_display): Likewise.
13486 * rust-exp.y (do_one_display): Likewise.
13487 * symfile.c (clear_symtab_users): Likewise.
13488 * varobj.c (varobj_create): Switch to innermost_block API, replace
13489 use of innermost_block with block stored on varobj object.
13490
13491 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13492
13493 * expression.h (innermost_block): Remove declaration.
13494 * varobj.c: Add 'parser-defs.h' include.
13495
13496 2018-01-19 Tom Tromey <tom@tromey.com>
13497
13498 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13499 symbols in the static and global blocks.
13500
13501 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13502
13503 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13504 gdb_ptrace.h, and move including gdb_wait.h ...
13505 * nat/linux-ptrace.h: ... to here.
13506
13507 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13508
13509 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13510 inf_ptrace_detach_success.
13511 (inf_ptrace_detach_success): Add inferior parameter, use it
13512 instead of inferior_ptid, pass it to detach_inferior.
13513 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13514 parameter.
13515 * inferior.c (detach_inferior): Add overload that takes an
13516 inferior object.
13517 * inferior.h (detach_inferior): Likewise.
13518 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13519 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13520 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13521
13522 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13523
13524 * target.h (struct target_ops) <to_detach>: Add inferior
13525 parameter.
13526 (target_detach): Likewise.
13527 * target.c (dispose_inferior): Pass inferior down.
13528 (target_detach): Pass inferior down. Assert that it is equal to
13529 the current inferior.
13530 * aix-thread.c (aix_thread_detach): Pass inferior down.
13531 * corefile.c (core_file_command): Pass current_inferior() down.
13532 * corelow.c (core_detach): Add inferior parameter.
13533 * darwin-nat.c (darwin_detach): Likewise.
13534 * gnu-nat.c (gnu_detach): Likewise.
13535 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13536 * infcmd.c (detach_command): Pass current_inferior() down to
13537 target_detach.
13538 * infrun.c (follow_fork_inferior): Pass parent_inf to
13539 target_detach.
13540 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13541 target_detach.
13542 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13543 * linux-thread-db.c (thread_db_detach): Likewise.
13544 * nto-procfs.c (procfs_detach): Likewise.
13545 * procfs.c (procfs_detach): Likewise.
13546 * record.c (record_detach): Likewise.
13547 * record.h (struct inferior): Forward-declare.
13548 (record_detach): Add inferior parameter.
13549 * remote-sim.c (gdbsim_detach): Likewise.
13550 * remote.c (remote_detach_1): Likewise.
13551 (remote_detach): Likewise.
13552 (extended_remote_detach): Likewise.
13553 * sol-thread.c (sol_thread_detach): Likewise.
13554 * target-debug.h (target_debug_print_inferior_p): New macro.
13555 * target-delegates.c: Re-generate.
13556 * top.c (kill_or_detach): Pass inferior down to target_detach.
13557 * windows-nat.c (windows_detach): Add inferior parameter.
13558
13559 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13560
13561 * target.h (struct target_ops) <to_detach>: Remove args
13562 parameter.
13563 (target_detach): Likewise.
13564 * target.c (dispose_inferior): Adjust.
13565 (target_detach): Remove args parameter, adjust.
13566 * aix-thread.c (aix_thread_detach): Adjust.
13567 * corefile.c (core_file_command): Adjust.
13568 * corelow.c (core_detach): Adjust.
13569 * darwin-nat.c (darwin_detach): Adjust.
13570 * gnu-nat.c (gnu_detach): Adjust.
13571 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13572 * infcmd.c (detach_command): Adjust
13573 * infrun.c (follow_fork_inferior): Adjust.
13574 (handle_vfork_child_exec_or_exit): Adjust.
13575 * linux-fork.c (linux_fork_detach): Remove args parameter.
13576 * linux-fork.h (linux_fork_detach): Likewise.
13577 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13578 * linux-thread-db.c (thread_db_detach): Likewise.
13579 * nto-procfs.c (procfs_detach): Likewise.
13580 * procfs.c (procfs_detach): Likewise.
13581 (do_detach): Remove signo parameter.
13582 * record.c (record_detach): Remove args parameter.
13583 * record.h (record_detach): Likewise.
13584 * remote-sim.c (gdbsim_detach): Likewise.
13585 * remote.c (remote_detach_1): Likewise.
13586 (remote_detach): Likewise.
13587 (extended_remote_detach): Likewise.
13588 * sol-thread.c (sol_thread_detach): Likewise.
13589 * target-delegates.c: Re-generate.
13590 * top.c (struct qt_args) <args>: Remove field.
13591 (kill_or_detach): Don't pass args.
13592 (quit_force): Don't set args.
13593 * windows-nat.c (windows_detach): Remove args parameter.
13594
13595 2018-01-19 Yao Qi <yao.qi@linaro.org>
13596
13597 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13598 (arm_linux_init_abi): Install it.
13599
13600 2018-01-19 Yao Qi <yao.qi@linaro.org>
13601
13602 * osabi.c (gdb_osabi_names): Extend the regexp for
13603 arm-linux-gnueabihf.
13604
13605 2018-01-18 Yao Qi <yao.qi@linaro.org>
13606
13607 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13608 m_abbrevs.
13609 (abbrev_table::add_abbrev): Update.
13610 (abbrev_table::lookup_abbrev): Update.
13611
13612 2018-01-18 Yao Qi <yao.qi@linaro.org>
13613
13614 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13615
13616 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13617
13618 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13619 to "std::string".
13620
13621 2018-01-17 Tom Tromey <tom@tromey.com>
13622
13623 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13624
13625 2018-01-17 Tom Tromey <tom@tromey.com>
13626
13627 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13628 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13629 (create_array_type_with_stride): Update.
13630 * dwarf2read.c (set_die_type): Update.
13631
13632 2018-01-17 Tom Tromey <tom@tromey.com>
13633
13634 * dwarf2read.c (delayed_method_info): Remove typedef.
13635 (dwarf2_cu::method_info): Now a std::vector.
13636 (add_to_method_list): Update.
13637 (free_delayed_list): Remove.
13638 (compute_delayed_physnames): Update.
13639 (process_full_comp_unit, process_full_type_unit): Clear the method
13640 list. Remove cleanups.
13641 (psymtab_include_file_name): Add name_holder parameter. Use
13642 unique_xmalloc_ptr.
13643 (dwarf_decode_lines): Update.
13644
13645 2018-01-17 Tom Tromey <tom@tromey.com>
13646 Simon Marchi <simon.marchi@ericsson.com>
13647
13648 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13649 (dwarf2_per_objfile::free_cached_comp_units)
13650 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13651 (init_cutu_and_read_dies_no_follow): Update.
13652 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13653 (dwarf2_cu::~dwarf2_cu): New.
13654 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13655 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13656
13657 2018-01-17 Tom Tromey <tom@tromey.com>
13658 Simon Marchi <simon.marchi@ericsson.com>
13659
13660 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13661 (struct die_reader_specs) <abbrev_table>: New member.
13662 (struct abbrev_table): Add constructor.
13663 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13664 <abbrev_obstack>: Now an auto_obstack.
13665 (abbrev_table_up): New typedef.
13666 (init_cu_die_reader): Add abbrev_table parameter.
13667 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13668 Add result_dwo_abbrev_table.
13669 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13670 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13671 Update.
13672 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13673 parameter.
13674 (skip_children): Update.
13675 (abbrev_table::alloc_abbrev): Rename from
13676 abbrev_table_alloc_abbrev.
13677 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13678 (abbrev_table::lookup_abbrev): Rename from
13679 abbrev_table_lookup_abbrev.
13680 (abbrev_table_read_table): Return abbrev_table_up.
13681 (abbrev_table_free, abbrev_table_free_cleanup)
13682 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13683 (load_partial_dies): Update.
13684
13685 2018-01-17 Tom Tromey <tom@tromey.com>
13686
13687 * dwarf2read.c (dwarf2_compute_name): Update comment.
13688 (read_func_scope, read_variable): Update.
13689 (new_symbol): Remove.
13690 (new_symbol_full): Rename to new_symbol.
13691
13692 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13693
13694 PR gdb/16577
13695 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13696 a warning instead of throwing an error, set section size to 0 and return
13697 NULL.
13698 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13699
13700 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13701
13702 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13703 std::string.
13704 (linux_ptrace_attach_fail_reason_string): Likewise.
13705 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13706 Likewise.
13707 (linux_ptrace_attach_fail_reason_string): Likewise.
13708 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13709
13710 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13711
13712 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13713
13714 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13715
13716 PR gdb/21559
13717 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13718 checking for fs_base/gs_base fields in struct user_regs_struct.
13719 * configure: Regenerate.
13720
13721 2018-01-17 Yao Qi <yao.qi@linaro.org>
13722
13723 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13724 function.
13725 (aarch64_linux_init_abi): Install it to gdbarch hook
13726 gcc_target_options.
13727
13728 2018-01-15 Pedro Alves <palves@redhat.com>
13729
13730 * common/signals-state-save-restore.c
13731 (save_original_signals_state): Fix typos.
13732
13733 2017-01-12 Tom Tromey <tom@tromey.com>
13734 Sergio Durigan Junior <sergiodj@redhat.com>
13735
13736 * Makefile.in (install-only): Install gdb-add-index.
13737
13738 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13739
13740 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13741
13742 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13743
13744 * infrun.c (keep_going_pass_signal): Clear step-over info when
13745 insert_breakpoints fails.
13746
13747 2018-01-11 Pedro Alves <palves@redhat.com>
13748
13749 PR gdb/22583
13750 * infrun.c (resume): Rename to ...
13751 (resume_1): ... this.
13752 (resume): Reimplement as wrapper around resume_1.
13753
13754 2018-01-11 Pedro Alves <palves@redhat.com>
13755
13756 PR remote/22597
13757 * remote.c (remote_parse_stop_reply): Default to the last-set
13758 general thread instead of to 'magic_null_ptid'.
13759
13760 2018-01-10 Pedro Alves <palves@redhat.com>
13761
13762 * language.h (language_get_symbol_name_matcher): Rename ...
13763 (get_symbol_name_matcher): ... this.
13764 * language.c (language_get_symbol_name_matcher): Ditto.
13765 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13766 callers adjusted.
13767
13768 2018-01-10 Pedro Alves <palves@redhat.com>
13769
13770 PR gdb/22670
13771 * dwarf2read.c
13772 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13773 Adjust to use language_get_symbol_name_matcher instead of
13774 language_defn::la_get_symbol_name_matcher.
13775 * language.c (language_get_symbol_name_matcher): If in Ada mode
13776 and the lookup name is a verbatim match, return Ada's matcher.
13777 * language.h (language_get_symbol_name_matcher): Adjust comment.
13778 (ada_lookup_name_info::verbatim_p):: New method.
13779
13780 2018-01-10 Pedro Alves <palves@redhat.com>
13781
13782 PR gdb/22670
13783 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13784 minsym's language is language_auto or language_cplus, pass down
13785 language_ada instead.
13786 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13787
13788 2018-01-10 Pedro Alves <palves@redhat.com>
13789
13790 PR gdb/22670
13791 * minsyms.c (linkage_name_str): New function.
13792 (iterate_over_minimal_symbols): Use it.
13793
13794 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13795
13796 * NEWS: Document that 'info proc' now works on FreeBSD.
13797
13798 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13799
13800 * configure.ac: Check for kinfo_getfile in libutil.
13801 * configure: Regenerate.
13802 * config.in: Regenerate.
13803 * fbsd-nat.c: Include "fbsd-tdep.h".
13804 (fbsd_fetch_cmdline): New.
13805 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13806 rather than calling error.
13807 (fbsd_info_proc): New.
13808 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13809 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13810 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13811
13812 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13813
13814 * fbsd-nat.c (struct free_deleter): Remove.
13815 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13816
13817 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13818
13819 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13820 NULL for an empty pathname.
13821
13822 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13823
13824 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13825 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13826 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13827 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13828 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13829 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13830 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13831 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13832 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13833 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13834 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13835 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13836 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13837 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13838 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13839
13840 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13841
13842 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13843 (gnu_xfer_auxv): New function.
13844 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13845 TARGET_OBJECT_AUXV.
13846
13847 2018-01-08 Yao Qi <yao.qi@linaro.org>
13848 Simon Marchi <simon.marchi@ericsson.com>
13849
13850 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13851 common/selftest.c.
13852 (COMMON_OBS): Remove selftest.o.
13853 * configure.ac: Append selftest-arch.c and common/selftest.c to
13854 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13855 * configure: Re-generated.
13856 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13857 GDB_SELF_TEST.
13858 (maintenance_info_selftests): Likewise.
13859
13860 2018-01-08 Xavier Roirand <roirand@adacore.com>
13861
13862 * ada-valprint.c (val_print_packed_array_elements): Use
13863 proper number of elements when printing an array indexed
13864 by an enumeration type.
13865
13866 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13867
13868 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13869 (dw2_get_file_names_reader): Adjust.
13870 (lookup_dwo_signatured_type): Adjust.
13871 (lookup_dwp_signatured_type): Adjust.
13872 (lookup_signatured_type): Adjust.
13873 (create_type_unit_group): Adjust.
13874 (get_type_unit_group): Adjust.
13875 (process_psymtab_comp_unit_reader): Adjust.
13876 (build_type_psymtabs_reader): Adjust.
13877 (scan_partial_symbols): Adjust.
13878 (add_partial_symbol): Adjust.
13879 (add_partial_subprogram): Adjust.
13880 (peek_die_abbrev): Adjust.
13881 (fixup_go_packaging): Adjust.
13882 (process_imported_unit_die): Adjust.
13883 (dwarf2_compute_name): Adjust.
13884 (dwarf2_physname): Adjust.
13885 (read_import_statement): Adjust.
13886 (handle_DW_AT_stmt_list): Adjust.
13887 (read_file_scope): Adjust.
13888 (read_func_scope): Adjust.
13889 (read_lexical_block_scope): Adjust.
13890 (read_call_site_scope): Adjust.
13891 (read_variable): Adjust.
13892 (dwarf2_rnglists_process): Adjust.
13893 (dwarf2_ranges_process): Adjust.
13894 (dwarf2_ranges_read): Adjust.
13895 (dwarf2_get_pc_bounds): Adjust.
13896 (dwarf2_record_block_ranges): Adjust.
13897 (dwarf2_add_field): Adjust.
13898 (dwarf2_add_member_fn): Adjust.
13899 (read_structure_type): Adjust.
13900 (process_structure_scope): Adjust.
13901 (read_enumeration_type): Adjust.
13902 (read_array_type): Adjust.
13903 (mark_common_block_symbol_computed): Adjust.
13904 (read_common_block): Adjust.
13905 (read_namespace_type): Adjust.
13906 (read_namespace): Adjust.
13907 (read_module_type): Adjust.
13908 (read_tag_pointer_type): Adjust.
13909 (read_tag_ptr_to_member_type): Adjust.
13910 (read_tag_string_type): Adjust.
13911 (read_subroutine_type): Adjust.
13912 (read_typedef): Adjust.
13913 (read_base_type): Adjust.
13914 (attr_to_dynamic_prop): Adjust.
13915 (read_subrange_type): Adjust.
13916 (read_unspecified_type): Adjust.
13917 (dwarf2_read_abbrevs): Adjust.
13918 (load_partial_dies): Adjust.
13919 (read_partial_die): Adjust.
13920 (find_partial_die): Adjust.
13921 (guess_partial_die_structure_name): Adjust.
13922 (fixup_partial_die): Adjust.
13923 (read_attribute_value): Adjust.
13924 (read_addr_index): Adjust.
13925 (read_addr_index_from_leb128): Adjust.
13926 (read_str_index): Adjust.
13927 (dwarf2_string_attr): Adjust.
13928 (get_debug_line_section): Adjust.
13929 (dwarf_decode_line_header): Adjust.
13930 (lnp_state_machine::check_line_address): Adjust.
13931 (dwarf_decode_lines_1): Adjust.
13932 (dwarf_decode_lines): Adjust.
13933 (dwarf2_start_symtab): Adjust.
13934 (var_decode_location): Adjust.
13935 (new_symbol_full): Adjust.
13936 (dwarf2_const_value_data): Adjust.
13937 (dwarf2_const_value_attr): Adjust.
13938 (dwarf2_const_value): Adjust.
13939 (die_type): Adjust.
13940 (die_containing_type): Adjust.
13941 (build_error_marker_type): Adjust.
13942 (lookup_die_type): Adjust.
13943 (guess_full_die_structure_name): Adjust.
13944 (anonymous_struct_prefix): Adjust.
13945 (determine_prefix): Adjust.
13946 (dwarf2_name): Adjust.
13947 (follow_die_ref_or_sig): Adjust.
13948 (follow_die_offset): Adjust.
13949 (follow_die_ref): Adjust.
13950 (follow_die_sig_1): Adjust.
13951 (follow_die_sig): Adjust.
13952 (get_signatured_type): Adjust.
13953 (get_DW_AT_signature_type): Adjust.
13954 (decode_locdesc): Adjust.
13955 (dwarf_decode_macros): Adjust.
13956 (cu_debug_loc_section): Adjust.
13957 (fill_in_loclist_baton): Adjust.
13958 (dwarf2_symbol_mark_computed): Adjust.
13959 (init_one_comp_unit): Don't assign
13960 dwarf2_cu::dwarf2_per_objfile.
13961 (set_die_type): Adjust.
13962
13963 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13964
13965 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13966 <dwarf2_per_objfile>: New field.
13967 (dwarf2_per_objfile): Remove global.
13968 (get_dwarf2_per_objfile): New function.
13969 (set_dwarf2_per_objfile): New function.
13970 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13971 dwarf2_per_objfile.
13972 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13973 (read_abbrev_offset): Likewise.
13974 (read_indirect_string): Likewise.
13975 (read_indirect_line_string): Likewise.
13976 (read_indirect_string_at_offset): Likewise.
13977 (read_indirect_string_from_dwz): Likewise.
13978 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13979 dwarf2_per_objfile.
13980 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13981 (create_all_comp_units): Change objfile parameter to
13982 dwarf2_per_objfile.
13983 (create_all_type_units): Likewise.
13984 (process_queue): Add dwarf2_per_objfile parameter.
13985 (read_and_check_comp_unit_head): Likewise.
13986 (lookup_dwo_unit_in_dwp): Likewise.
13987 (get_dwp_file): Likewise.
13988 (process_cu_includes): Likewise.
13989 (struct free_dwo_file_cleanup_data): New struct.
13990 (dwarf2_has_info): Use get_dwarf2_per_objfile and
13991 set_dwarf2_per_objfile.
13992 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13993 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13994 context, adjust calls.
13995 (dw2_instantiate_symtab): Likewise.
13996 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13997 (dw2_get_cu): Likewise.
13998 (create_cu_from_index_list): Change objfile parameter to
13999 dwarf2_per_objfile.
14000 (create_cus_from_index_list): Get dwarf2_per_objfile from
14001 context, adjust calls.
14002 (create_cus_from_index): Likewise.
14003 (create_signatured_type_table_from_index): Change objfile
14004 parameter to dwarf2_per_objfile.
14005 (create_signatured_type_table_from_debug_names): Change objfile
14006 parameter to dwarf2_per_objfile.
14007 (create_addrmap_from_index): Likewise.
14008 (create_addrmap_from_aranges): Likewise.
14009 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14010 (dw2_setup): Remove.
14011 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14012 context.
14013 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14014 get_dwarf2_per_objfile.
14015 (dw2_forget_cached_source_info): Likewise.
14016 (dw2_map_symtabs_matching_filename): Likewise.
14017 (struct dw2_symtab_iterator) <index>: Remove.
14018 <dwarf2_per_objfile>: New field.
14019 (dw2_symtab_iter_init): Replace index parameter with
14020 dwarf2_per_objfile.
14021 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14022 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14023 (dw2_print_stats): Likewise.
14024 (dw2_dump): Likewise.
14025 (dw2_expand_symtabs_for_function): Likewise.
14026 (dw2_expand_all_symtabs): Likewise.
14027 (dw2_expand_symtabs_with_fullname): Likewise.
14028 (dw2_expand_marked_cus): Replace index and objfile parameters
14029 with dwarf2_per_objfile.
14030 (dw_expand_symtabs_matching_file_matcher): Add
14031 dwarf2_per_objfile parameter and adjust calls.
14032 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14033 adjust calls.
14034 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14035 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14036 adjust calls.
14037 (create_cus_from_debug_names_list): Replace objfile parameter
14038 with dwarf2_per_objfile and adjust calls.
14039 (create_cus_from_debug_names): Likewise.
14040 (dwarf2_read_debug_names): Likewise.
14041 (mapped_debug_names::namei_to_name): Adjust call.
14042 (dw2_debug_names_iterator::next): Likewise.
14043 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14044 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14045 (dw2_debug_names_dump): Likewise.
14046 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14047 (dw2_debug_names_expand_symtabs_matching): Likewise.
14048 (dwarf2_initialize_objfile): Likewise.
14049 (dwarf2_build_psymtabs): Likewise.
14050 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14051 this_cu.
14052 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14053 (read_and_check_comp_unit_head): Likewise.
14054 (read_abbrev_offset): Likewise.
14055 (create_debug_type_hash_table): Likewise.
14056 (create_debug_types_hash_table): Likewise.
14057 (create_all_type_units): Replace objfile parameter with
14058 dwarf2_per_objfile.
14059 (add_type_unit): Add dwarf2_per_objfile parameter.
14060 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14061 with dwarf2_per_objfile.
14062 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14063 (lookup_dwp_signatured_type): Likewise.
14064 (lookup_signatured_type): Likewise.
14065 (read_cutu_die_from_dwo): Likewise.
14066 (init_tu_and_read_dwo_dies): Likewise.
14067 (init_cutu_and_read_dies): Likewise.
14068 (init_cutu_and_read_dies_no_follow): Likewise.
14069 (allocate_type_unit_groups_table): Add objfile parameter.
14070 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14071 (get_type_unit_group): Likewise.
14072 (process_psymtab_comp_unit): Update call.
14073 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14074 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14075 (print_tu_stats): Likewise.
14076 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14077 in void* parameter.
14078 (build_type_psymtabs): Change objfile parameter to
14079 dwarf2_per_objfile.
14080 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14081 passed in void* parameter.
14082 (process_skeletonless_type_units): Change objfile parameter to
14083 dwarf2_per_objfile.
14084 (set_partial_user): Likewise.
14085 (dwarf2_build_psymtabs_hard): Likewise.
14086 (read_comp_units_from_section): Likewise.
14087 (create_all_comp_units): Likewise.
14088 (scan_partial_symbols): Update calls.
14089 (add_partial_symbol): Likewise.
14090 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14091 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14092 (process_queue): Add dwarf2_per_objfile parameter.
14093 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14094 (compute_compunit_symtab_includes): Likewise.
14095 (process_cu_includes): Add dwarf2_per_objfile parameter.
14096 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14097 (process_full_type_unit): Likewise.
14098 (process_imported_unit_die): Update call.
14099 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14100 (read_file_scope): Likewise.
14101 (allocate_dwo_file_hash_table): Add objfile parameter.
14102 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14103 (create_cus_hash_table): Likewise.
14104 (create_dwp_hash_table): Likewise.
14105 (create_dwo_unit_in_dwp_v1): Likewise.
14106 (create_dwp_v2_section): Likewise.
14107 (create_dwo_unit_in_dwp_v2): Likewise.
14108 (lookup_dwo_unit_in_dwp): Likewise.
14109 (try_open_dwop_file): Likewise.
14110 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14111 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14112 cleanup to include a reference to dwarf2_per_objfile.
14113 (open_dwp_file): Add dwarf2_per_objfile parameter.
14114 (open_and_init_dwp_file): Likewise.
14115 (get_dwp_file): Likewise.
14116 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14117 (queue_and_load_all_dwo_tus): Update call.
14118 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14119 data.
14120 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14121 (dwarf2_ranges_process): Likewise.
14122 (dwarf2_get_pc_bounds): Likewise.
14123 (mark_common_block_symbol_computed): Likewise.
14124 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14125 (dwarf2_read_abbrevs): Update call.
14126 (read_partial_die): Use dwarf2_per_objfile from cu.
14127 (find_partial_die): Likewise.
14128 (fixup_partial_die): Likewise.
14129 (read_attribute_value): Likewise.
14130 (read_indirect_string_at_offset_from): Add objfile parameter.
14131 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14132 parameter.
14133 (read_indirect_string_from_dwz): Add objfile parameter.
14134 (read_indirect_string): Add objfile parameter.
14135 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14136 (read_addr_index): Use dwarf2_per_objfile from cu.
14137 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14138 call dw2_setup.
14139 (read_str_index): Use dwarf2_per_objfile from cu.
14140 (get_debug_line_section): Likewise.
14141 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14142 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14143 (new_symbol_full): Use dwarf2_per_objfile from cu.
14144 (build_error_marker_type): Likewise.
14145 (lookup_die_type): Likewise.
14146 (determine_prefix): Likewise.
14147 (follow_die_offset): Likewise.
14148 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14149 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14150 (dwarf2_fetch_die_type_sect_off): Likewise.
14151 (dwarf2_get_die_type): Likewise.
14152 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14153 (get_signatured_type): Likewise.
14154 (get_DW_AT_signature_type): Likewise.
14155 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14156 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14157 (cu_debug_loc_section): Likewise.
14158 (fill_in_loclist_baton): Likewise.
14159 (dwarf2_symbol_mark_computed): Likewise.
14160 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14161 dwarf2_per_objfile.
14162 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14163 parameter.
14164 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14165 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14166 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14167 (set_die_type): Use dwarf2_free_objfile from cu.
14168 (get_die_type_at_offset): Likewise.
14169 (dwarf2_per_objfile_free): Don't assign global variable.
14170 (debug_names) <constructor>: Add dwarf2_per_objfile
14171 parameter, update m_debugstrlookup construction.
14172 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14173 parameter.
14174 <m_dwarf2_per_objfile>: New field.
14175 <lookup>: Use m_dwarf2_per_objfile.
14176 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14177 (psyms_seen_size): Likewise.
14178 (write_gdbindex): Replace objfile parameter with
14179 dwarf2_per_objfile.
14180 (write_debug_names): Likewise.
14181 (write_psymtabs_to_index): Likewise.
14182 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14183 calls.
14184
14185 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14186
14187 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14188 <dwarf2_per_objfile>: New field.
14189 (struct dwarf2_per_cu_data) <objfile>: Remove.
14190 <dwarf2_per_objfile>: New field.
14191 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14192 of objfile.
14193 (create_signatured_type_table_from_index): Likewise.
14194 (create_debug_type_hash_table): Likewise.
14195 (fill_in_sig_entry_from_dwo_entry): Likewise.
14196 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14197 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14198 objfile.
14199 (create_partial_symtab): Access objfile through
14200 dwarf2_per_objfile.
14201 (process_psymtab_comp_unit_reader): Likewise.
14202 (read_comp_units_from_section): Likewise.
14203 (scan_partial_symbols): Likewise.
14204 (add_partial_symbol): Likewise.
14205 (add_partial_subprogram): Likewise.
14206 (peek_die_abbrev): Likewise.
14207 (fixup_go_packaging): Likewise.
14208 (process_full_comp_unit): Likewise.
14209 (process_full_type_unit): Likewise.
14210 (process_imported_unit_die): Likewise.
14211 (dwarf2_compute_name): Likewise.
14212 (dwarf2_physname): Likewise.
14213 (read_import_statement): Likewise.
14214 (create_cus_hash_table): Assign dwarf2_physname instead of
14215 objfile.
14216 (read_func_scope): Access objfile through dwarf2_per_objfile.
14217 (read_lexical_block_scope): Likewise.
14218 (read_call_site_scope): Likewise.
14219 (read_variable): Likewise.
14220 (dwarf2_rnglists_process): Likewise.
14221 (dwarf2_ranges_process): Likewise.
14222 (dwarf2_ranges_read): Likewise.
14223 (dwarf2_record_block_ranges): Likewise.
14224 (dwarf2_add_field): Likewise.
14225 (dwarf2_add_member_fn): Likewise.
14226 (read_structure_type): Likewise.
14227 (process_structure_scope): Likewise.
14228 (read_enumeration_type): Likewise.
14229 (read_array_type): Likewise.
14230 (read_common_block): Likewise.
14231 (read_namespace_type): Likewise.
14232 (read_namespace): Likewise.
14233 (read_module_type): Likewise.
14234 (read_tag_pointer_type): Likewise.
14235 (read_tag_ptr_to_member_type): Likewise.
14236 (read_tag_string_type): Likewise.
14237 (read_subroutine_type): Likewise.
14238 (read_typedef): Likewise.
14239 (read_base_type): Likewise.
14240 (attr_to_dynamic_prop): Likewise.
14241 (read_subrange_type): Likewise.
14242 (read_unspecified_type): Likewise.
14243 (load_partial_dies): Likewise.
14244 (read_partial_die): Likewise.
14245 (find_partial_die): Likewise.
14246 (guess_partial_die_structure_name): Likewise.
14247 (fixup_partial_die): Likewise.
14248 (read_attribute_value): Likewise.
14249 (read_addr_index_from_leb128): Likewise.
14250 (dwarf2_read_addr_index): Likewise.
14251 (dwarf2_string_attr): Likewise.
14252 (lnp_state_machine::check_line_address): Likewise.
14253 (dwarf_decode_lines_1): Likewise.
14254 (dwarf_decode_lines): Likewise.
14255 (dwarf2_start_symtab): Likewise.
14256 (var_decode_location): Likewise.
14257 (new_symbol_full): Likewise.
14258 (dwarf2_const_value_data): Likewise.
14259 (dwarf2_const_value_attr): Likewise.
14260 (dwarf2_const_value): Likewise.
14261 (die_type): Likewise.
14262 (die_containing_type): Likewise.
14263 (lookup_die_type): Likewise.
14264 (guess_full_die_structure_name): Likewise.
14265 (anonymous_struct_prefix): Likewise.
14266 (dwarf2_name): Likewise.
14267 (follow_die_ref_or_sig): Likewise.
14268 (follow_die_offset): Likewise.
14269 (follow_die_ref): Likewise.
14270 (dwarf2_fetch_die_loc_sect_off): Likewise.
14271 (dwarf2_fetch_constant_bytes): Likewise.
14272 (dwarf2_fetch_die_type_sect_off): Likewise.
14273 (dwarf2_get_die_type): Likewise.
14274 (follow_die_sig): Likewise.
14275 (decode_locdesc): Likewise.
14276 (dwarf2_per_cu_objfile): Likewise.
14277 (dwarf2_per_cu_text_offset): Likewise.
14278 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14279 objfile.
14280 (set_die_type): Access objfile through
14281 dwarf2_per_objfile.
14282
14283 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14284
14285 * valprint.c (converted_character_d): Remove typedef.
14286 (DEF_VEC_O (converted_character_d)): Remove.
14287 (count_next_character): Use std::vector.
14288 (print_converted_chars_to_obstack): Likewise.
14289 (generic_printstr): Likewise.
14290
14291 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14292
14293 * xml-support.h (struct gdb_xml_value): Add constructor.
14294 <value>: Change type to unique_xmalloc_ptr.
14295 (gdb_xml_value_s): Remove typedef.
14296 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14297 (gdb_xml_element_start_handler): Change parameter type to
14298 std::vector.
14299 (xml_find_attribute): Likewise.
14300 * xml-support.c (xml_find_attribute): Change parameter type to
14301 std::vector and adjust.
14302 (gdb_xml_values_cleanup): Remove.
14303 (gdb_xml_parser::start_element): Adjust to std::vector.
14304 (xinclude_start_include): Change paraeter type to std::vector
14305 and adjust.
14306 * btrace.c (check_xml_btrace_version): Likewise.
14307 (parse_xml_btrace_block): Likewise.
14308 (parse_xml_btrace_pt_config_cpu): Likewise.
14309 (parse_xml_btrace_pt): Likewise.
14310 (parse_xml_btrace_conf_bts): Likewise.
14311 (parse_xml_btrace_conf_pt): Likewise.
14312 * memory-map.c (memory_map_start_memory): Likewise.
14313 (memory_map_start_property): Likewise.
14314 * osdata.c (osdata_start_osdata): Likewise.
14315 (osdata_start_item): Likewise.
14316 (osdata_start_column): Likewise.
14317 * remote.c (start_thread): Likewise.
14318 * solib-aix.c (library_list_start_library): Likewise.
14319 (library_list_start_list): Likewise.
14320 * solib-svr4.c (library_list_start_library): Likewise.
14321 (svr4_library_list_start_list): Likewise.
14322 * solib-target.c (library_list_start_segment): Likewise.
14323 (library_list_start_section): Likewise.
14324 (library_list_start_library): Likewise.
14325 (library_list_start_list): Likewise.
14326 * tracepoint.c (traceframe_info_start_memory): Likewise.
14327 (traceframe_info_start_tvar): Likewise.
14328 * xml-syscall.c (syscall_start_syscall): Likewise.
14329 * xml-tdesc.c (tdesc_start_target): Likewise.
14330 (tdesc_start_feature): Likewise.
14331 (tdesc_start_reg): Likewise.
14332 (tdesc_start_union): Likewise.
14333 (tdesc_start_struct): Likewise.
14334 (tdesc_start_flags): Likewise.
14335 (tdesc_start_enum): Likewise.
14336 (tdesc_start_field): Likewise.
14337 (tdesc_start_enum_value): Likewise.
14338 (tdesc_start_vector): Likewise.
14339
14340 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14341
14342 * extension.h (struct xmethod_worker) <clone>: Remove.
14343 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14344 Remove.
14345 (python_xmethod_worker::clone): Remove.
14346 * valops.c (find_overload_match): Use std::move instead of
14347 clone.
14348
14349 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14350
14351 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14352 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14353 <free_xmethod_worker_data>: Remove.
14354 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14355 <get_xmethod_arg_types>: Remove.
14356 <get_xmethod_result_type>: Remove.
14357 <invoke_xmethod>: Remove.
14358 * extension.c (new_xmethod_worker): Remove.
14359 (clone_xmethod_worker): Remove.
14360 (get_matching_xmethod_workers): Return void, pass std::vector by
14361 pointer.
14362 (get_xmethod_arg_types): Rename to...
14363 (xmethod_worker::get_arg_types): ... this, and adjust.
14364 (get_xmethod_result_type): Rename to...
14365 (xmethod_worker::get_result_type): ... this, and adjust.
14366 (invoke_xmethod): Remove.
14367 (free_xmethod_worker): Remove.
14368 (free_xmethod_worker_vec): Remove.
14369 * extension.h (enum ext_lang_rc): Move here from
14370 extension-priv.h.
14371 (struct xmethod_worker): Add constructor and destructor.
14372 <data>: Remove.
14373 <value>: Remove.
14374 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14375 virtual pure methods.
14376 <get_arg_types, get_result_type>: New methods.
14377 (xmethod_worker_ptr): Remove typedef.
14378 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14379 (xmethod_worker_vec): Remove typedef.
14380 (xmethod_worker_up): New typedef.
14381 (invoke_xmethod): Remove.
14382 (clone_xmethod_worker): Remove.
14383 (free_xmethod_worker): Remove.
14384 (free_xmethod_worker_vec): Remove.
14385 (get_xmethod_arg_types): Remove.
14386 (get_xmethod_result_type): Remove.
14387 * valops.c (find_method_list): Use std::vector, don't use
14388 intermediate vector.
14389 (value_find_oload_method_list): Use std::vector.
14390 (find_overload_match): Use std::vector.
14391 (find_oload_champ): Use std::vector.
14392 * value.c (value_free): Use operator delete.
14393 (value_of_xmethod): Rename to...
14394 (value_from_xmethod): ... this. Don't assign
14395 xmethod_worker::value, take rvalue-reference.
14396 (result_type_of_xmethod): Adjust.
14397 (call_xmethod): Adjust.
14398 * value.h: Include extension.h.
14399 (struct xmethod_worker): Don't forward-declare.
14400 (value_of_xmethod): Rename to...
14401 (value_from_xmethod): ... this, take rvalue-reference.
14402 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14403 (struct python_xmethod_worker): ... this, add constructor and
14404 destructor.
14405 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14406 (gdbpy_free_xmethod_worker_data): Rename to...
14407 (python_xmethod_worker::~python_xmethod_worker): ... this and
14408 adjust.
14409 (gdbpy_clone_xmethod_worker_data): Rename to...
14410 (python_xmethod_worker::clone): ... this and adjust.
14411 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14412 temporary vector.
14413 (gdbpy_get_xmethod_arg_types): Rename to...
14414 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14415 (gdbpy_get_xmethod_result_type): Rename to...
14416 (python_xmethod_worker::do_get_result_type): ... this and
14417 adjust.
14418 (gdbpy_invoke_xmethod): Rename to...
14419 (python_xmethod_worker::invoke): ... this and adjust.
14420 (new_python_xmethod_worker): Rename to...
14421 (python_xmethod_worker::python_xmethod_worker): ... this and
14422 adjust.
14423 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14424 Remove.
14425 (gdbpy_free_xmethod_worker_data): Remove.
14426 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14427 (gdbpy_get_xmethod_arg_types): Remove.
14428 (gdbpy_get_xmethod_result_type): Remove.
14429 (gdbpy_invoke_xmethod): Remove.
14430 * python/python.c (python_extension_ops): Remove obsolete
14431 callbacks.
14432
14433 2018-01-05 Pedro Alves <palves@redhat.com>
14434
14435 PR gdb/18653
14436 * common/signals-state-save-restore.c
14437 (save_original_signals_state): New parameter 'quiet'. Warn if we
14438 find a custom handler preinstalled, instead of internal erroring.
14439 But only warn if !quiet.
14440 * common/signals-state-save-restore.h
14441 (save_original_signals_state): New parameter 'quiet'.
14442 * main.c (captured_main_1): Move save_original_signals_state call
14443 after option handling, and pass QUIET.
14444
14445 2018-01-05 Pedro Alves <palves@redhat.com>
14446
14447 * spu-tdep.c (spu_catch_start): Pass
14448 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14449
14450 2018-01-05 Pedro Alves <palves@redhat.com>
14451
14452 PR gdb/22670
14453 * ada-lang.c (literal_symbol_name_matcher): New function.
14454 (ada_get_symbol_name_matcher): Use it for
14455 symbol_name_match_type::SEARCH_NAME.
14456 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14457 it down instead of assuming symbol_name_match_type::FULL.
14458 * block.h (block_lookup_symbol): New parameter 'match_type'.
14459 * c-valprint.c (print_unpacked_pointer): Use
14460 lookup_symbol_search_name instead of lookup_symbol.
14461 * compile/compile-object-load.c (get_out_value_type): Pass down
14462 symbol_name_match_type::SEARCH_NAME.
14463 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14464 symbol_name_match_type::FULL.
14465 * cp-support.c (cp_get_symbol_name_matcher): Handle
14466 symbol_name_match_type::SEARCH_NAME.
14467 * infrun.c (insert_exception_resume_breakpoint): Use
14468 lookup_symbol_search_name.
14469 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14470 * psymtab.c (maintenance_check_psymtabs): Use
14471 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14472 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14473 SYMBOL_SEARCH_NAME.
14474 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14475 if symbol_name_match_type::SEARCH_NAME.
14476 (lookup_symbol_in_language): Pass down
14477 symbol_name_match_type::FULL.
14478 (lookup_symbol_search_name): New.
14479 (lookup_language_this): Pass down
14480 symbol_name_match_type::SEARCH_NAME.
14481 (lookup_symbol_aux, lookup_local_symbol): New parameter
14482 'match_type'. Pass it down.
14483 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14484 (lookup_symbol_search_name): New declaration.
14485 (lookup_symbol_in_block): New 'match_type' parameter.
14486
14487 2018-01-05 Pedro Alves <palves@redhat.com>
14488
14489 PR gdb/22670
14490 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14491 ada_lookup_symbol.
14492 (ada_lookup_symbol): Reimplement in terms of
14493 ada_lookup_symbol_list, bits factored out from
14494 ada_lookup_encoded_symbol.
14495
14496 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14497
14498 * ada-exp.y (write_object_renaming): When subscripting an array
14499 using a symbol as the index, pass the block in call to
14500 ada_lookup_encoded_symbol when looking that symbol up.
14501
14502 2018-01-05 Jerome Guitton <guitton@adacore.com>
14503
14504 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14505 TYPE_INDEX_TYPE.
14506
14507 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14508
14509 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14510 the case where VALUE_LVAL (val0) is not lval_memory.
14511
14512 2018-01-05 Xavier Roirand <roirand@adacore.com>
14513
14514 * ada-valprint.c (print_optional_low_bound): Handle
14515 character-indexed array printing like boolean-indexed array
14516 printing.
14517
14518 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14519
14520 * NEWS: Create a new section for the next release branch.
14521 Rename the section of the current branch, now that it has
14522 been cut.
14523
14524 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14525
14526 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14527 * version.in: Bump version to 8.1.50.DATE-git.
14528
14529 2018-01-03 Xavier Roirand <roirand@adacore.com>
14530
14531 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14532 Add field.
14533 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14534 Add field.
14535 (default_exception_support_info) <catch_handlers_sym>: Add field.
14536 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14537 (ada_exception_name_addr_1): Add "catch handlers" handling.
14538 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14539 Update all callers.
14540 (create_excep_cond_exprs) <ex>: Add parameter.
14541 (re_set_exception): Update create_excep_cond_exprs call.
14542 (print_it_exception, print_one_exception, print_mention_exception)
14543 (print_recreate_exception): Add "catch handler" handling.
14544 (allocate_location_catch_handlers, re_set_catch_handlers)
14545 (check_status_catch_handlers, print_it_catch_handlers)
14546 (print_one_catch_handlers, print_mention_catch_handlers)
14547 (print_recreate_catch_handlers): New function.
14548 (catch_handlers_breakpoint_ops): New variable.
14549 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14550 Add parameter. Add "catch handler" handling.
14551 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14552 Add "catch handler" handling.
14553 (ada_exception_catchpoint_cond_string): Add "catch handler"
14554 handling.
14555 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14556 call.
14557 (catch_ada_handlers_command): New function.
14558 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14559 operations structure.
14560 (_initialize_ada_language): Add "catch handlers" command entry.
14561 * NEWS: Document "catch handlers" feature.
14562
14563 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14564
14565 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14566 account when creating the array type of the slice.
14567 (ada_value_slice): Likewise.
14568
14569 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14570
14571 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14572 New enum value.
14573 (create_array_type_with_stride): Add byte_stride_prop parameter.
14574 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14575 New parameter. Update all callers in this file.
14576 (array_type_has_dynamic_stride): New function.
14577 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14578 of arrays with dynamic byte strides.
14579 * dwarf2read.c (read_array_type): Add support for dynamic
14580 DW_AT_byte_stride attributes.
14581
14582 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14583
14584 * dwarf2read.c (read_unspecified_type): Treat
14585 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14586
14587 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14588
14589 Update copyright year range in all GDB files.
14590
14591 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
14592
14593 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14594 and gdb/testsuite/gdb.base/step-line.c.
14595
14596 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14597
14598 * copyright.py (main): Dump the contents of
14599 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14600 even if BY_HAND is empty.
14601
14602 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14603
14604 * top.c (print_gdb_version): Update Copyright year in version
14605 message.
14606
14607 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14608
14609 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14610
14611 For older changes see ChangeLog-2017.
14612 \f
14613 Local Variables:
14614 mode: change-log
14615 left-margin: 8
14616 fill-column: 74
14617 version-control: never
14618 coding: utf-8
14619 End:
This page took 0.314259 seconds and 5 git commands to generate.