]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Add FreeBSD/riscv architecture.
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-08 John Baldwin <jhb@FreeBSD.org>
2
3 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
4 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
5 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
6 * NEWS: Mention new FreeBSD/riscv target.
7 * configure.tgt: Add riscv*-*-freebsd*.
8 * riscv-fbsd-tdep.c: New file.
9 * riscv-fbsd-tdep.h: New file.
10
11 2018-10-08 John Baldwin <jhb@FreeBSD.org>
12
13 * regcache.h (struct regcache_map_entry): Note that this type can
14 be used with traditional frame caches.
15 * trad-frame.c (trad_frame_set_reg_regmap): New.
16 * trad-frame.h (trad_frame_set_reg_regmap): New.
17
18 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
19
20 PR c++/16841
21 * valops.c (get_virtual_base_offset): New function.
22 (value_struct_elt_for_reference): Use it to get virtual base offset
23 and add it in calculating class member address.
24
25 2018-10-08 John Darrington <john@darrington.wattle.id.au>
26
27 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
28 (check_producer): Check if the producer is codewarrior.
29 (producer_is_codewarrior): New function.
30 (lnp_state_machine::record_line): Ignore is_stmt flag for records
31 produced by codewarrior.
32 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
33
34 2018-10-06 Tom Tromey <tom@tromey.com>
35
36 PR python/19399:
37 * python/py-inferior.c: Add "architecture" entry.
38 (infpy_architecture): New function.
39
40 2018-10-06 Tom Tromey <tom@tromey.com>
41
42 PR python/21765:
43 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
44 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
45 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
46 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
47
48 2018-10-06 Tom Tromey <tom@tromey.com>
49
50 PR build/17077:
51 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
52 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
53 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
54 #include.
55
56 2018-10-06 Tom Tromey <tom@tromey.com>
57
58 * python/py-breakpoint.c (bppy_get_location): Handle a
59 bp_breakpoint without a location.
60
61 2018-10-06 Tom Tromey <tom@tromey.com>
62
63 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
64 (_RegEx): Reformat help text.
65 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
66 (AnyCallerIs, AnyCallerMatches): Reformat help text.
67 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
68 text.
69 * python/lib/gdb/command/xmethods.py (InfoXMethod)
70 (EnableXMethod, DisableXMethod): Remove help indentation.
71 Capitalize meta-syntactic variables.
72 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
73 (EnableUnwinder, DisableUnwinder): Remove help indentation.
74 Capitalize meta-syntactic variables.
75 * python/lib/gdb/command/explore.py (ExploreCommand)
76 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
77 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
78 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
79 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
80 Remove help indentation.
81 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
82 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
83 (DisableFrameFilter, SetFrameFilterPriority)
84 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
85
86 2018-10-06 Tom Tromey <tom@tromey.com>
87
88 PR tui/28819:
89 * tui/tui-io.c (gdb_wgetch): New function.
90 (tui_mld_getc, tui_getc): Use it.
91
92 2018-10-05 Tom Tromey <tom@tromey.com>
93
94 * sol-thread.c (sol_thread_target::wait): Rename inner
95 "save_ptid".
96
97 2018-10-04 Tom Tromey <tom@tromey.com>
98
99 * configure: Rebuild.
100 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
101
102 2018-10-04 Tom Tromey <tom@tromey.com>
103
104 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
105 declaration of "block".
106
107 2018-10-04 Tom Tromey <tom@tromey.com>
108
109 * common/filestuff.c (fdwalk): Remove inner declaration of
110 "result".
111
112 2018-10-04 Tom Tromey <tom@tromey.com>
113
114 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
115 "structs_addr" and hoist declaration.
116
117 2018-10-04 Tom Tromey <tom@tromey.com>
118
119 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
120 variable "size".
121
122 2018-10-04 Tom Tromey <tom@tromey.com>
123
124 * mdebugread.c (parse_partial_symbols): Use std::string.
125
126 2018-10-04 Tom Tromey <tom@tromey.com>
127
128 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
129 * p-valprint.c (pascal_val_print): Split inner "i" variable.
130 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
131 header.
132 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
133 more inner scope.
134 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
135 * varobj.c (varobj_update): Rename inner "newobj",
136 "type_changed".
137 * valprint.c (generic_emit_char): Rename inner "buf".
138 * valops.c (find_overload_match): Rename inner "temp".
139 (value_struct_elt_for_reference): Declare "v" in more inner
140 scope.
141 * v850-tdep.c (v850_push_dummy_call): Rename "len".
142 * unittests/array-view-selftests.c (run_tests): Rename inner
143 "vec".
144 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
145 header.
146 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
147 "tsv" in more inner scope.
148 (print_one_static_tracepoint_marker): Rename inner
149 "tuple_emitter".
150 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
151 (tic6x_push_dummy_call): Don't redeclare "addr".
152 * target-float.c: Declare "dto" lower.
153 * symtab.c (lookup_local_symbol): Rename inner "sym".
154 (find_pc_sect_line): Rename inner "pc".
155 * stack.c (print_frame): Don't redeclare "gdbarch".
156 (return_command): Rename inner "gdbarch".
157 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
158 "sp".
159 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
160 header.
161 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
162 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
163 scope.
164 * remote.c (remote_target::update_thread_list): Don't redeclare
165 "tp".
166 (remote_target::process_initial_stop_replies): Rename inner
167 "thread".
168 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
169 (remote_target::wait_as): Don't redeclare "stop_reply".
170 (remote_target::get_thread_local_address): Rename inner
171 "result".
172 (remote_target::get_tib_address): Likewise.
173
174 * regcache.c (cooked_read_test): Rename "regnum".
175 * record-btrace.c (cmd_record_btrace_start): Rename inner
176 "exception".
177 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
178 loop header.
179 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
180 header.
181 (ppu2spu_sniffer): Rename inner "buf".
182 * parse.c (operator_check_standard): Rename inner "type",
183 "objfile".
184 * p-valprint.c (pascal_val_print): Introduce new scope for
185 "low_bound", "high_bound".
186 * p-exp.y (yylex): Declare "i" in loop header.
187 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
188 Lower declaration of "s".
189 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
190 header.
191 (nios2_push_dummy_call): Rename "len".
192 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
193 "buf".
194 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
195 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
196 (linux_xfer_osdata_modules): Likewise.
197 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
198 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
199 (mips_o64_push_dummy_call): Likewise.
200 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
201 "op".
202 * mi/mi-main.c (list_available_thread_groups): Rename inner
203 "tuple_emitter".
204 (mi_cmd_data_read_memory): Rename inner "opts".
205 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
206 "tuple_emitter".
207 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
208 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
209 more inner scope.
210 (parse_partial_symbols): Rename inner "pst", "p", "name"
211 * main.c (captured_main_1): Rename inner "i"s.
212 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
213 "oso2".
214 * linux-tdep.c (linux_info_proc): Rename inner "filename".
215 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
216 * infrun.c (handle_no_resumed): Don't redeclare "thread".
217 (handle_signal_stop): Rename inner "gdbarch".
218 (handle_command): Declare "signum" in loop header.
219 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
220 "status".
221 (examine_prologue): Rename inner "sol" and "sof".
222 (ia64_extract_return_value): Rename inner "val". Declare another
223 "val" in a more inner scope.
224 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
225 inner scope.
226 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
227 "except".
228 * findvar.c (default_read_var_value): Don't redeclare "addr".
229 * f-exp.y (yylex): Declare "i" in loop header.
230 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
231 Rename inner "type", "expect_type".
232 (evaluate_subexp_for_sizeof): Rename inner "pc".
233 * elfread.c (elf_symfile_read): Rename inner "abfd".
234 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
235 "bytes_read".
236 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
237 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
238 (dwarf_decode_line_header): Rename inner "lh".
239 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
240 "offset". Declare "i" in loop header.
241 (disassemble_dwarf_expression): Rename inner "addr_size".
242 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
243 inner "result".
244 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
245 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
246 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
247 "inner_list_emitter".
248 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
249 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
250 declaration in a block.
251 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
252 * cp-valprint.c (cp_print_value_fields): Don't redeclare
253 "obstack_final_size".
254 * cp-support.c (inspect_type): Declare "i" in loop header.
255 * compile/compile.c (compile_instance::insert_symbol_error):
256 Rename inner "e".
257 * common/agent.c (agent_run_command): Remove inner "ret"
258 declaration.
259 * coffread.c (coff_symfile_read): Rename inner "name".
260 (coff_symfile_read): Rename inner "abfd".
261 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
262 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
263 "high".
264 * c-exp.y (lex_one_token): Move "len" declaration lower.
265 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
266 "gdbarch".
267 (create_exception_master_breakpoint): Likewise. Don't redeclare
268 "b".
269 (watch_command_1): Declare "mark" later.
270 (clear_command): Don't shadow "a" or "b".
271 (delete_command): Rename inner "b".
272 (delete_trace_command): Likewise.
273 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
274 "op".
275 (arm_gdbarch_init): Remove inner "e_flags".
276 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
277 "offset" in inner blocks.
278
279 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
280
281 * dwarf-index-write.c (file_write): Don't write if the vector is
282 empty.
283
284 2018-10-05 Tom de Vries <tdevries@suse.de>
285
286 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
287 PyArg_ParseTuple call.
288
289 2018-10-05 Tom de Vries <tdevries@suse.de>
290
291 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
292 PyArg_ParseTuple call.
293
294 2018-10-04 Joel Brobecker <brobecker@adacore.com>
295
296 * psymtab.c (recursively_search_psymtabs): Reformat parameters
297 to avoid exceeding 80 characters per line limit.
298
299 2018-10-04 Tom Tromey <tom@tromey.com>
300
301 * symfile.c (syms_from_objfile_1, finish_new_objfile)
302 (reread_symbols): Update.
303 * complaints.h (clear_complaints): Remove argument.
304 * complaints.c (enum complaint_series): Remove.
305 (series): Remove global.
306 (complaint_internal): Update.
307 (clear_complaints): Remove argument.
308
309 2018-10-04 Tom Tromey <tom@tromey.com>
310
311 * symfile.c (symbol_file_add_with_addrs): Do not print "no
312 debugging symbols" message if there is a separate debug objfile.
313
314 2018-10-04 Tom Tromey <tom@tromey.com>
315
316 PR cli/19551:
317 * symfile.c (symbol_file_add_with_addrs): Update output.
318 * psymtab.c (require_partial_symbols): Update output.
319
320 2018-10-04 Tom Tromey <tom@tromey.com>
321
322 PR cli/22234:
323 * complaints.c: Emit \n.
324
325 2018-10-04 Tom Tromey <tom@tromey.com>
326
327 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
328 (separate_debug_file_exists, find_separate_debug_file)
329 (add_symbol_file_command, reread_symbols, allocate_symtab)
330 (allocate_compunit_symtab): Use filtered printing, not
331 unfiltered.
332 * psymtab.c (require_partial_symbols, dump_psymtab)
333 (allocate_psymtab): Use filtered printing, not unfiltered.
334
335 2018-10-04 Tom Tromey <tom@tromey.com>
336
337 * complaints.c (complaint_internal): Correctly check complaint
338 count.
339
340 2018-10-04 Tom Tromey <tom@tromey.com>
341
342 * complaints.h (struct complaints): Remove declaration.
343 * complaints.c (clear_complaints): Remove an unused variable.
344
345 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
346
347 * MAINTAINERS (Write After Approval): Add self.
348
349 2018-10-03 Tom Tromey <tom@tromey.com>
350
351 * guile/scm-value.c (gdbscm_value_to_string): Initialize
352 "buffer_contents".
353 * coffread.c (coff_symtab_read): Initialize "newobj".
354
355 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
356
357 * dwarf2read.c (read_func_scope): Remove struct keyword in
358 range-based for.
359
360 2018-10-03 Tom Tromey <tom@tromey.com>
361
362 * README: Mention --enable-ubsan.
363 * NEWS: Mention --enable-ubsan.
364 * acinclude.m4: Include sanitize.m4.
365 * configure: Rebuild.
366 * configure.ac: Call AM_GDB_UBSAN.
367 * sanitize.m4: New file.
368
369 2018-10-03 Tom Tromey <tom@tromey.com>
370
371 * expression.h (enum exp_opcode): Use uint8_t as base type.
372 * expprint.c (op_name): Handle invalid opcodes.
373
374 2018-10-03 Tom Tromey <tom@tromey.com>
375
376 * parse.c (prefixify_expression): Add assert.
377 (parse_exp_in_context_1): Throw exception if the expression is
378 empty.
379
380 2018-10-03 Tom Tromey <tom@tromey.com>
381
382 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
383
384 2018-10-03 Tom Tromey <tom@tromey.com>
385
386 * c-exp.y (parse_number): Work in unsigned. Remove casts.
387
388 2018-10-03 Tom Tromey <tom@tromey.com>
389
390 * dwarf2read.c (read_subrange_type): Make "negative_mask"
391 unsigned.
392
393 2018-10-03 Tom Tromey <tom@tromey.com>
394
395 * findvar.c (extract_integer): Do work in an unsigned type.
396
397 2018-10-03 Tom Tromey <tom@tromey.com>
398
399 * common/enum-flags.h (enum_flags::operator~): Add static assert.
400 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
401 base type.
402 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
403 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
404 type.
405 * c-lang.h (enum c_string_type_values): Use unsigned as base
406 type.
407 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
408
409 2018-10-03 Tom Tromey <tom@tromey.com>
410
411 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
412 <~dwarf2_frame_state_reg_info>: Update.
413 <dwarf2_frame_state_reg_info>: Update.
414 <alloc_regs>: Add assertion. Update.
415 <reg>: Now a std::vector.
416 <num_regs>: Remove.
417 <swap>: Update.
418 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
419 (execute_cfa_program_test, dwarf2_frame_cache): Update.
420
421 2018-10-03 Tom Tromey <tom@tromey.com>
422
423 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
424
425 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
426
427 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
428
429 2018-10-02 Tom Tromey <tom@tromey.com>
430
431 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
432
433 2018-10-02 John Darrington <john@darrington.wattle.id.au>
434
435 * NEWS: Mention changed commands.
436 * ser-uds.c: New file.
437 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
438 * configure: Regenerate.
439 * Makefile.in: Add new file.
440 * serial.c (serial_open): Check if filename is a socket
441 and lookup the appropriate interface accordingly.
442
443 2018-10-01 Alan Hayward <alan.hayward@arm.com>
444
445 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
446 define.
447 (AARCH64_EXTRA_MAGIC): Likewise.
448 (AARCH64_FPSIMD_MAGIC): Likewise.
449 (AARCH64_SVE_MAGIC): Likewise.
450 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
451 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
452 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
453 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
454 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
455 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
456 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
457 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
458 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
459 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
460 (read_aarch64_ctx): Add function.
461 (aarch64_linux_sigframe_init): Detect FP registers.
462
463 2018-10-01 Alan Hayward <alan.hayward@arm.com>
464
465 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
466 (AARCH64_D0_REGNUM): Likewise.
467 (AARCH64_S0_REGNUM): Likewise.
468 (AARCH64_H0_REGNUM): Likewise.
469 (AARCH64_B0_REGNUM): Likewise.
470 (AARCH64_SVE_V0_REGNUM): Likewise.
471 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
472 (AARCH64_D0_REGNUM): Likewise.
473 (AARCH64_S0_REGNUM): Likewise.
474 (AARCH64_H0_REGNUM): Likewise.
475 (AARCH64_B0_REGNUM): Likewise.
476 (AARCH64_SVE_V0_REGNUM): Likewise.
477
478 2018-10-01 Gary Benson <gbenson@redhat.com>
479
480 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
481 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
482 prfpregset_t instead of gdb_prfpregset_t.
483 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
484 * configure, config.in: Rebuild.
485
486 2018-10-01 Gary Benson <gbenson@redhat.com>
487
488 * common/gdb_proc_service.h: New file, factored out from...
489 * gdb_proc_service.h: Moved common code to the above file.
490 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
491
492 2018-10-01 Gary Benson <gbenson@redhat.com>
493
494 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
495 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
496
497 2018-10-01 Gary Benson <gbenson@redhat.com>
498
499 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
500 (AC_CHECK_HEADERS): Check for linux/elf.h.
501 * configure, config.in: Rebuild.
502 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
503 doesn't define elf_fpregset_t.
504
505 2018-10-01 Gary Benson <gbenson@redhat.com>
506
507 * gdb_proc_service.h: Whitespace change.
508
509 2018-10-01 Tom Tromey <tom@tromey.com>
510
511 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
512 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
513 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
514
515 2018-10-01 Tom Tromey <tom@tromey.com>
516
517 * README: Minor change.
518
519 2018-09-30 Pedro Alves <palves@redhat.com>
520
521 * darwin-nat-info.c (darwin_debug_regions_recurse)
522 (info_mach_exceptions_command): Remove unused local variables.
523 * darwin-nat.c (darwin_decode_notify_message)
524 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
525 (darwin_stop_inferior, darwin_setup_exceptions)
526 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
527 (darwin_nat_target::attach, darwin_nat_target::detach)
528 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
529 local variables.
530 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
531 variables.
532
533 2018-09-29 Tom Tromey <tom@tromey.com>
534
535 * README: Remove some leftover text.
536
537 2018-09-29 Tom Tromey <tom@tromey.com>
538
539 * PROBLEMS: Rewrite.
540 * README: Update.
541
542 2018-09-28 John Baldwin <jhb@FreeBSD.org>
543
544 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
545 case with explicit breakpoint kind.
546 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
547 'additional_info' and related logic.
548 (riscv_debug_breakpoints): New variable.
549 (riscv_breakpoint_kind_from_pc): Use the length of the existing
550 instruction to determine the breakpoint kind.
551 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
552 flag. Update description of 'set/show riscv
553 use-compressed-breakpoints' flag.
554
555 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
556
557 (NEWS): Mention changes to frame related commands.
558 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
559 (add_prefix_cmd_suppress_notification): New function.
560 (add_com_suppress_notification): Call
561 add_cmd_suppress_notification.
562 * command.h (add_cmd_suppress_notification): Declare.
563 (add_prefix_cmd_suppress_notification): Declare.
564 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
565 (parse_frame_specification): Moved from stack.c, with
566 simplification to handle a single argument.
567 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
568 switch to the selected frame. Add a header comment.
569 * stack.c: Remove 'safe-ctype.h' include.
570 (find_frame_for_function): Add declaration.
571 (find_frame_for_address): New function.
572 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
573 (frame_selection_by_function_completer): New function.
574 (info_frame_command): Rename to...
575 (info_frame_command_core): ...this, and update parameter types.
576 (select_frame_command): Rename to...
577 (select_frame_command_core): ...this, and update parameter types.
578 (frame_command): Rename to...
579 (frame_command_core): ...this, and update parameter types.
580 (class frame_command_helper): New class to wrap implementations of
581 frame related sub-commands.
582 (frame_apply_cmd_list): New static global.
583 (frame_cmd_list): Make static.
584 (select_frame_cmd_list): New global for sub-commands.
585 (info_frame_cmd_list): New global for sub-commands.
586 (_initialize_stack): Register sub-commands for 'frame',
587 'select-frame', and 'info frame'. Update 'frame apply' commands
588 to use frame_apply_cmd_list. Move function local static
589 frame_apply_list to file static frame_apply_cmd_list for
590 consistency.
591 * stack.h (select_frame_command): Delete declarationn.
592 (select_frame_for_mi): Declare new function.
593
594 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
595
596 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
597 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
598 and NOP.
599
600 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
601
602 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
603
604 2018-09-26 Tom Tromey <tom@tromey.com>
605
606 * valops.c (auto_abandon): Remove dead code.
607
608 2018-09-26 Tom Tromey <tom@tromey.com>
609
610 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
611
612 2018-09-24 Tom Tromey <tom@tromey.com>
613
614 * common/pathstuff.c (get_standard_cache_dir): Make
615 "xdg_cache_home" and "home" const.
616 * top.c (init_history): Make "tmpenv" const.
617 * main.c (get_init_files): Make "homedir" const.
618
619 2018-09-23 Tom Tromey <tom@tromey.com>
620
621 PR python/18852:
622 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
623
624 2018-09-23 Tom Tromey <tom@tromey.com>
625
626 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
627 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
628 * python/python-internal.h (gdbpy_handle_exception): Declare.
629 * python/py-utils.c (gdbpy_handle_exception): New function.
630
631 2018-09-23 Tom Tromey <tom@tromey.com>
632
633 PR python/17284:
634 * python/py-type.c (typy_template_argument): Check for negative
635 argument number.
636
637 2018-09-23 Tom Tromey <tom@tromey.com>
638
639 PR python/14062:
640 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
641
642 2018-09-23 Tom Tromey <tom@tromey.com>
643
644 PR python/18170:
645 * python/py-value.c (valpy_int): Allow conversion from pointer
646 type.
647
648 2018-09-23 Tom Tromey <tom@tromey.com>
649
650 PR python/20126:
651 * python/py-value.c (valpy_int): Respect type sign.
652
653 2018-09-23 Tom Tromey <tom@tromey.com>
654
655 PR python/18352;
656 * python/py-value.c (valpy_float): Allow conversions from int or
657 char.
658 (valpy_int, valpy_long): Allow conversions from float.
659
660 2018-09-23 Tom Tromey <tom@tromey.com>
661
662 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
663 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
664
665 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
666
667 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
668 __sighndlr.
669 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
670
671 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
672
673 * windows-nat.c (windows_nat_target::wait): Remove a spurious
674 target_terminal::ours().
675
676 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
677
678 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
679 of vl to ULONGEST.
680
681 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
682
683 * breakpoint.c (update_inserted_breakpoint_locations): Remove
684 redundant condition.
685
686 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
687
688 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
689
690 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
691 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
692 * sol-thread.c (ps_pdmodel): Don't guard definition.
693
694 * procfs.c: Fix formatting.
695
696 * procfs.c (sysset_t_alloc): Remove.
697 (create_procinfo): Use XNEW instead of sysset_t_alloc.
698 (procfs_debug_inferior): Likewise.
699 (procfs_set_exec_trap): Likewise.
700 (proc_set_traced_sysentry): Don't allocate argp dynamically.
701 (proc_set_traced_sysexit): Likewise.
702
703 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
704 (dead_procinfo): Likewise.
705 (proc_warn): Likewise.
706 (proc_error): Likewise.
707 (proc_get_LDT_entry): Likewise.
708 (do_attach): Likewise.
709 (procfs_target::pid_to_str): Likewise.
710 (iterate_over_mappings): Likewise.
711
712 * procfs.c (create_procinfo): Fix ARI warning.
713 (proc_get_status): Likewise.
714 (proc_stop_process): Likewise.
715 (proc_run_process): Likewise.
716 (proc_kill): Likewise.
717 (proc_get_LDT_entry): Likewise.
718 (procfs_find_LDT_entry): Likewise.
719 (proc_update_threads): Likewise.
720 (proc_iterate_over_threads): Likewise.
721 (do_attach): Likewise.
722 (procfs_xfer_memory): Likewise.
723 (invalidate_cache): Likewise.
724 (procfs_target::resume): Likewise.
725 (procfs_init_inferior): Likewise.
726 (procfs_set_exec_trap): Likewise.
727 (procfs_target::thread_alive): Likewise.
728 (procfs_target::pid_to_exec_file): Likewise.
729 (iterate_over_mappings): Likewise.
730 (procfs_target::make_corefile_notes): Likewise.
731 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
732
733 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
734 (procfs_find_LDT_entry): Likewise.
735 * sol-thread.c (ps_lgetLDT): Likewise.
736
737 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
738
739 PR tdep/17903
740 * procfs.c (procfs_target): Declare pid_to_exec_file.
741 (procfs_target::pid_to_exec_file): New.
742
743 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
744
745 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
746 renaming.
747 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
748 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
749
750 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
751
752 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
753 (supply_fpregset, fill_fpregset): Move ...
754 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
755 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
756 Remove references to ioctl-based procfs.
757 Include <sys/reg.h>.
758 Remove PR_MODEL_NATIVE guards.
759 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
760 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
761
762 2018-09-19 Xavier Roirand <roirand@adacore.com>
763
764 PR gdb/20981:
765 * solib-darwin.c (darwin_get_dyld_bfd): New function.
766 (darwin_solib_get_all_image_info_addr_at_init): Update call.
767 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
768
769 2018-09-19 John Baldwin <jhb@FreeBSD.org>
770
771 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
772 (fbsd_print_sockaddr_in6): Likewise.
773
774 2018-09-19 Richard Bunt <richard.bunt@arm.com>
775 Chris January <chris.january@arm.com>
776
777 * eval.c (skip_undetermined_arglist): Skip argument list helper.
778 (evaluate_subexp_standard): Return a dummy type when
779 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
780 OP_F77_UNDETERMINED_ARGLIST case.
781 * expression.h (enum noside): Update comment.
782
783 2018-09-19 George Vasick <george.vasick@oracle.com>
784
785 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
786
787 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
788 April Chin <april.chin@oracle.com>
789 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
790
791 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
792 uint_t lwpid_t.
793 (create_procinfo): Print pids in /proc without leading zeros.
794
795 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
796
797 * nios2-tdep.c (nios2_gcc_target_options): New.
798 (nios2_gdb_arch_init): Install new hook.
799
800 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
801
802 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
803 New file.
804 * update-gnulib.sh: Apply patch.
805 * configure: Re-generate.
806
807 2018-09-18 John Baldwin <jhb@FreeBSD.org>
808
809 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
810 description. Make "info proc" command descriptions more
811 consistent.
812
813 2018-09-18 John Baldwin <jhb@FreeBSD.org>
814
815 * NEWS: Mention 'info proc files' command.
816
817 2018-09-18 John Baldwin <jhb@FreeBSD.org>
818
819 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
820 descriptors for IP_FILES and IP_ALL.
821
822 2018-09-18 John Baldwin <jhb@FreeBSD.org>
823
824 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
825 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
826 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
827 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
828 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
829 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
830 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
831 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
832 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
833 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
834 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
835 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
836 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
837 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
838 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
839 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
840 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
841 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
842 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
843 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
844 (struct fbsd_sockaddr_un): New types.
845 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
846 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
847 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
848 (fbsd_core_info_proc_files): New functions.
849 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
850 IP_ALL.
851 * fbsd-tdep.h (fbsd_info_proc_files_header)
852 (fbsd_info_proc_files_entry): New.
853
854 2018-09-18 John Baldwin <jhb@FreeBSD.org>
855
856 * defs.h (enum info_proc_what) [IP_FILES]: New value.
857 * infcmd.c (info_proc_cmd_files): New function.
858 (_initialize_infcmd): Register 'info proc files' command.
859
860 2018-09-18 John Baldwin <jhb@FreeBSD.org>
861
862 * gnulib/aclocal-m4-deps.mk: Re-generate.
863 * gnulib/aclocal.m4: Re-generate.
864 * gnulib/config.in: Re-generate.
865 * gnulib/configure: Re-generate.
866 * gnulib/import/Makefile.am: Re-generate.
867 * gnulib/import/Makefile.in: Re-generate.
868 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
869 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
870 * gnulib/import/arpa_inet.in.h: New file.
871 * gnulib/import/inet_ntop.c: New file.
872 * gnulib/import/m4/arpa_inet_h.m4: New file.
873 * gnulib/import/m4/inet_ntop.m4: New file.
874 * gnulib/import/m4/netinet_in_h.m4: New file.
875 * gnulib/import/m4/socklen.m4: New file.
876 * gnulib/import/m4/sockpfaf.m4: New file.
877 * gnulib/import/m4/stdalign.m4: New file.
878 * gnulib/import/m4/sys_uio_h.m4: New file.
879 * gnulib/import/netinet_in.in.h: New file.
880 * gnulib/import/stdalign.in.h: New file.
881 * gnulib/import/sys_socket.c: New file.
882 * gnulib/import/sys_socket.in.h: New file.
883 * gnulib/import/sys_uio.in.h: New file.
884 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
885 module.
886
887 2018-09-18 John Baldwin <jhb@FreeBSD.org>
888
889 * gnulib/aclocal-m4-deps.mk: New file.
890 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
891 deterministically.
892
893 2018-09-18 John Baldwin <jhb@FreeBSD.org>
894
895 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
896 KVE_PATH.
897
898 2018-09-18 Tom Tromey <tom@tromey.com>
899
900 * compile/compile-object-load.c (struct
901 link_hash_table_cleanup_data): Add constructor and destructor.
902 Use DISABLE_COPY_AND_ASSIGN.
903 (~link_hash_table_cleanup_data): Rename from
904 link_hash_table_free. Now a destructor.
905 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
906
907 2018-09-18 Tom Tromey <tom@tromey.com>
908
909 * compile/compile-object-run.c (do_module_cleanup): Use delete.
910 * compile/compile-object-load.c (struct munmap_list): Move to
911 header file.
912 (munmap_list::add): Rename from munmap_list_add; rewrite.
913 (munmap_list::~munmap_list): Rename from munmap_list_free.
914 (munmap_listp_free_cleanup): Remove.
915 (compile_object_load): Update.
916 * compile/compile-object-load.h (struct munmap_list): Move from
917 compile-object-load.c. Rewrite.
918
919 2018-09-18 Alan Hayward <alan.hayward@arm.com>
920
921 * aarch64-tdep.c (pass_in_v): Use register size.
922 (aarch64_extract_return_value): Likewise.
923 (aarch64_store_return_value): Likewise.
924
925 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
926
927 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
928 rlim_t.
929
930 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
931
932 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
933 Fix short help line.
934
935 2018-09-17 Tom Tromey <tom@tromey.com>
936
937 PR python/20445:
938 * configure: Rebuild.
939 * configure.ac: Conditionally use -DNDEBUG for Python.
940
941 2018-09-17 Tom Tromey <tom@tromey.com>
942
943 * configure: Rebuild.
944 * configure.ac: Use gmp as a library dependency when checking for
945 mpfr.
946
947 2018-09-17 Pedro Alves <palves@redhat.com>
948
949 * python/py-inferior.c (find_inferior_object): Delete.
950
951 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
952
953 * compile/compile-cplus-types.c
954 (compile_cplus_instance::enter_scope): Don't use new_scope after
955 std::move.
956
957 2018-09-17 Tom Tromey <tom@tromey.com>
958
959 * common/pathstuff.c (get_standard_cache_dir): Use
960 ~/Library/Caches on macOS.
961 * common/pathstuff.h (get_standard_cache_dir): Update comment.
962
963 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
964
965 PR python/23669
966 * breakpoint.c (commands_cmd_element): New.
967 (_initialize_breakpoint): Assign commands_cmd_element.
968 * breakpoint.h (commands_cmd_element): New.
969 * cli/cli-script.c (while_cmd_element, if_command,
970 define_cmd_element): New.
971 (command_name_equals): Remove.
972 (process_next_line): Compare commands by pointer, not by name.
973 (_initialize_cli_script): Assign the various cmd_list_element
974 variables.
975 * compile/compile.c (compile_cmd_element): New.
976 (_initialize_compile): Assign compile_cmd_element.
977 * compile/compile.h (compile_cmd_element): New.
978 * guile/guile.c (guile_cmd_element): New.
979 (install_gdb_commands): Assign guile_cmd_element.
980 * guile/guile.h (guile_cmd_element): New.
981 * python/python.c (python_cmd_element): New.
982 (_initialize_python): Assign python_cmd_element.
983 * python/python.h (python_cmd_element): New.
984 * tracepoint.c (while_stepping_cmd_element): New.
985 (_initialize_tracepoint): Assign while_stepping_cmd_element.
986 * tracepoint.h (while_stepping_cmd_element): New.
987
988 2018-09-17 Tom Tromey <tom@tromey.com>
989
990 * infrun.c (save_infcall_suspend_state): Return
991 infcall_suspend_state_up.
992 (save_infcall_control_state): Return infcall_control_state_up.
993 * inferior.h (save_infcall_suspend_state)
994 (save_infcall_control_state): Declare later. Return unique
995 pointers.
996
997 2018-09-17 Tom Tromey <tom@tromey.com>
998
999 * infrun.c (struct stop_context): Declare constructor,
1000 destructor, "changed" method.
1001 (stop_context::stop_context): Rename from save_stop_context.
1002 (stop_context::~stop_context): Rename from
1003 release_stop_context_cleanup.
1004 (normal_stop): Update.
1005 (stop_context::changed): Rename from stop_context_changed. Return
1006 bool.
1007
1008 2018-09-17 Tom Tromey <tom@tromey.com>
1009
1010 * inferior.h (struct infcall_suspend_state_deleter): New.
1011 (infcall_suspend_state_up): New typedef.
1012 (struct infcall_control_state_deleter): New.
1013 (infcall_control_state_up): New typedef.
1014 (make_cleanup_restore_infcall_suspend_state)
1015 (make_cleanup_restore_infcall_control_state): Don't declare.
1016 * infcall.c (call_function_by_hand_dummy): Update.
1017 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1018 (make_cleanup_restore_infcall_suspend_state): Remove.
1019 (do_restore_infcall_control_state_cleanup)
1020 (make_cleanup_restore_infcall_control_state): Remove.
1021
1022 2018-09-17 Tom Tromey <tom@tromey.com>
1023
1024 * gdbthread.h (struct thread_control_state): Add initializer.
1025 (class thread_info) <control>: Remove initializer.
1026 * inferior.h (struct inferior_control_state): Add initializer.
1027 (class inferior) <control>: Remove initializer.
1028 (exit_inferior_1): Update.
1029 * infrun.c (struct infcall_control_state): Add constructors.
1030 (save_infcall_control_state): Use new.
1031 (restore_infcall_control_state, discard_infcall_control_state):
1032 Use delete.
1033
1034 2018-09-17 Tom Tromey <tom@tromey.com>
1035
1036 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1037 unique_ptr.
1038 <siginfo_data>: Now a unique_xmalloc_ptr.
1039 (save_infcall_suspend_state, restore_infcall_suspend_state)
1040 (discard_infcall_suspend_state)
1041 (get_infcall_suspend_state_regcache): Update.
1042
1043 2018-09-17 Tom Tromey <tom@tromey.com>
1044
1045 * gdbthread.h (struct thread_suspend_state): Add initializers.
1046 (class thread_info) <suspend>: Remove initializer.
1047 * infrun.c (struct infcall_suspend_state): Add initializers.
1048 (save_infcall_suspend_state): Use new.
1049 (discard_infcall_suspend_state): Use delete.
1050
1051 2018-09-16 Tom Tromey <tom@tromey.com>
1052
1053 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1054 Remove.
1055 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1056 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1057 (py_varobj_iter_new): Likewise.
1058 (py_varobj_get_iterator): Use gdbpy_ref.
1059
1060 2018-09-16 Tom Tromey <tom@tromey.com>
1061
1062 * python/py-threadevent.c (py_get_event_thread): Simplify.
1063 * python/py-inferior.c (infpy_thread_from_thread_handle):
1064 Return immediately after calling thread_to_thread_object. Use
1065 Py_RETURN_NONE.
1066 (thread_to_thread_object): Set the exception on a NULL return.
1067
1068 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1069
1070 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1071
1072 2018-09-16 Tom Tromey <tom@tromey.com>
1073
1074 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1075 Remove.
1076
1077 2018-09-16 Tom Tromey <tom@tromey.com>
1078
1079 * python/python-internal.h (thread_to_thread_object): Change
1080 return type.
1081 * python/py-inferior.c (thread_to_thread_object): Return a new
1082 reference.
1083 (infpy_thread_from_thread_handle): Update.
1084 * python/py-infthread.c (gdbpy_selected_thread): Update.
1085 * python/py-stopevent.c (create_stop_event_object): Update.
1086 * python/py-threadevent.c (py_get_event_thread): Return a new
1087 reference.
1088 (py_get_event_thread): Update.
1089 * python/py-event.h (py_get_event_thread): Change return type.
1090 * python/py-continueevent.c (create_continue_event_object):
1091 Update.
1092
1093 2018-09-16 Tom Tromey <tom@tromey.com>
1094
1095 * python/py-progspace.c (pspy_get_objfiles): Update.
1096 * python/python-internal.h (objfile_to_objfile_object): Change
1097 return type.
1098 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1099 Update.
1100 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1101 Update.
1102 * python/python.c (gdbpy_get_current_objfile): Update.
1103 (gdbpy_objfiles): Update.
1104 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1105 Update.
1106 (objfile_to_objfile_object): Return a new reference.
1107 * python/py-symtab.c (stpy_get_objfile): Update.
1108 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1109 Update.
1110
1111 2018-09-16 Tom Tromey <tom@tromey.com>
1112
1113 * python/py-inferior.c (infpy_get_progspace): Update.
1114 * python/python-internal.h (pspace_to_pspace_object): Change
1115 return type.
1116 * python/py-newobjfileevent.c
1117 (create_clear_objfiles_event_object): Update.
1118 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1119 Update.
1120 * python/python.c (gdbpy_get_current_progspace): Update.
1121 (gdbpy_progspaces): Update.
1122 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1123 reference.
1124 * python/py-objfile.c (objfpy_get_progspace): Update.
1125 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1126 Update.
1127
1128 2018-09-16 Tom Tromey <tom@tromey.com>
1129
1130 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1131 (solib_name, block_for_pc, find_pc_line): New functions.
1132 (execute_unwinders): Update.
1133 * python/py-block.c (gdbpy_block_for_pc): Remove.
1134 * python/py-inferior.c (infpy_get_progspace): New function.
1135 (inferior_object_getset) <progspace>: Add.
1136 * python/py-progspace.c (pspy_objfiles): Rewrite.
1137 (pspy_solib_name, pspy_block_for_pc)
1138 (pspy_find_pc_line, pspy_is_valid): New functions.
1139 (progspace_object_methods): Add entries for solib_name,
1140 block_for_pc, find_pc_line, is_valid.
1141 * python/python-internal.h (gdbpy_block_for_pc)
1142 (build_objfiles_list): Don't declare.
1143 * python/python.c: Don't include solib.h.
1144 (gdbpy_solib_name, gdbpy_find_pc_line)
1145 (gdbpy_get_current_progspace, build_objfiles_list)
1146 (gdbpy_objfiles): Remove.
1147 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1148 solib_name, find_pc_line>: Remove entries.
1149
1150 2018-09-16 Tom Tromey <tom@tromey.com>
1151
1152 * top.c (new_ui_command): Use GNU style for metasyntactic
1153 variables.
1154 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1155 variables.
1156 * maint.c (maintenance_translate_address): Remove "<>" around
1157 text.
1158 * interps.c (interpreter_exec_cmd): Use GNU style for
1159 metasyntactic variables.
1160 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1161 metasyntactic variables.
1162 * tracepoint.c (tfind_range_command): Use GNU style for
1163 metasyntactic variables.
1164 (tfind_outside_command): Likewise.
1165 (_initialize_tracepoint): Likewise.
1166 * remote.c (extended_remote_target::create_inferior): Use GNU
1167 style for metasyntactic variables.
1168 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1169 metasyntactic variables.
1170 (adi_assign_command): Likewise.
1171
1172 2018-09-16 Tom Tromey <tom@tromey.com>
1173
1174 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1175 metasyntactic variables. Print message if no disassembler options
1176 are available.
1177
1178 2018-09-15 Tom Tromey <tom@tromey.com>
1179
1180 * infcmd.c (get_inferior_args): Return const char *.
1181 * inferior.h (get_inferior_args): Return type now const.
1182 * linux-tdep.c (linux_fill_prpsinfo): Update.
1183 * procfs.c (procfs_target::make_corefile_notes): Update.
1184
1185 2018-09-07 Tom Tromey <tom@tromey.com>
1186
1187 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1188 inside the TRY.
1189
1190 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1191
1192 * nios2-tdep.c (nios2_type_align): New.
1193 (nios2_gdb_arch_init): Install type_align hook.
1194
1195 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1196
1197 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1198 type that is neither object file owned, nor gdbarch owned.
1199 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1200 gdbarch is non-NULL.
1201 (alloc_type_instance): Allocate non-objfile owned types on the
1202 gdbarch obstack.
1203 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1204 using TYPE_ALLOC to ensure memory is allocated on the correct
1205 obstack.
1206 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1207 obstack, or the gdbarch obstack.
1208 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1209
1210 2018-09-14 Tom Tromey <tom@tromey.com>
1211
1212 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1213 block.
1214
1215 2018-09-14 Tom Tromey <tom@tromey.com>
1216
1217 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1218
1219 2018-09-13 Tom Tromey <tom@tromey.com>
1220
1221 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1222 static.
1223
1224 2018-09-13 Tom Tromey <tom@tromey.com>
1225
1226 * exec.c (try_open_exec_file): Use std::string.
1227
1228 2018-09-13 Tom Tromey <tom@tromey.com>
1229
1230 * utils.h (gdb_bfd_errmsg): Return std::string.
1231 * exec.c (exec_file_attach): Update.
1232 * compile/compile-object-load.c (compile_object_load): Update.
1233 * utils.c (gdb_bfd_errmsg): Return std::string.
1234
1235 2018-09-13 Tom Tromey <tom@tromey.com>
1236
1237 * procfs.c (struct procinfo_deleter): New.
1238 (procinfo_up): New typedef.
1239 (do_destroy_procinfo_cleanup): Remove.
1240 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1241
1242 2018-09-13 Tom Tromey <tom@tromey.com>
1243
1244 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1245
1246 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1247 2018-09-13 Tom Tromey <tom@tromey.com>
1248
1249 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1250 (pspy_get_objfiles): New function.
1251 (progspace_object_methods): New.
1252 (pspace_object_type): Add tp_methods callback.
1253 * python/python-internal.h (build_objfiles_list): New
1254 declaration.
1255 * python/python.c (build_objfiles_list): New function.
1256 (gdbpy_objfiles): Implement using build_objfiles_list.
1257 * NEWS: Mention the Progspace.objfiles method.
1258
1259 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1260
1261 * python/py-inferior.c (infpy_get_progspace): New function.
1262 (inferior_object_getset): Add progspace property.
1263 * NEWS: Mention the new property.
1264
1265 2018-09-13 Tom Tromey <tom@tromey.com>
1266
1267 PR rust/23650:
1268 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1269
1270 2018-09-13 Tom Tromey <tom@tromey.com>
1271
1272 PR rust/23626:
1273 * rust-lang.c (rust_enum_variant): Now static.
1274 (rust_empty_enum_p): New function.
1275 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1276 Handle empty enum.
1277
1278 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1279
1280 * python/py-inferior.c (infpy_repr): New.
1281 (inferior_object_type): Register infpy_repr.
1282 * python/py-objfile.c (objfpy_repr): New.
1283 (objfile_object_type): Register objfpy_repr.
1284
1285 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1286
1287 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1288
1289 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1290
1291 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1292 typo.
1293
1294 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1295
1296 * common/common-utils.c: Don't include '<sys/stat.h>'.
1297 (is_regular_file): Move to...
1298 * common/filestuff.c (is_regular_file): ... here.
1299 * common/common-utils.h (is_regular_file): Move to...
1300 * common/filestuff.h (is_regular_file): ... here.
1301
1302 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1303
1304 * skip.c (debug_skip): New variable.
1305 (skiplist_entry::do_skip_file_p): Add debug output.
1306 (skiplist_entry::do_skip_gfile_p): Likewise.
1307 (skiplist_entry::skip_function_p): Likewise.
1308 (_initialize_step_skip): Create debug command.
1309 * NEWS: Mention set/show debug skip.
1310
1311 2018-09-11 Xavier Roirand <roirand@adacore.com>
1312
1313 * darwin-nat.c (should_disable_startup_with_shell):
1314 New function.
1315 (darwin_nat_target::create_inferior): Add call.
1316
1317 2018-09-11 Xavier Roirand <roirand@adacore.com>
1318
1319 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1320 inf_port, msg_state>: Initialize.
1321 (struct darwin_thread_info) <signaled, single_step>: Change
1322 type and initialize.
1323 (struct darwin_thread_info) <event>: Initialize.
1324
1325 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1326
1327 PR gdb/23555
1328 PR gdb/23558
1329 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1330 guesses.
1331
1332 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1333
1334 Revert:
1335 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1336
1337 PR gdb/23555
1338 PR gdb/23558
1339 * gnulib/aclocal.m4: Regenerate.
1340 * gnulib/config.in: Regenerate.
1341 * gnulib/configure: Regenerate.
1342 * gnulib/import/Makefile.am: Update.
1343 * gnulib/import/Makefile.in: Update.
1344 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1345 * gnulib/import/_Noreturn.h: ... this.
1346 * gnulib/import/alloca.in.h: Update.
1347 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1348 * gnulib/import/arg-nonnull.h: ... this.
1349 * gnulib/import/assure.h: Update.
1350 * gnulib/import/at-func.c: Update.
1351 * gnulib/import/basename-lgpl.c: Update.
1352 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1353 * gnulib/import/c++defs.h: ... this.
1354 * gnulib/import/canonicalize-lgpl.c: Update.
1355 * gnulib/import/cdefs.h: Update.
1356 * gnulib/import/chdir-long.c: Update.
1357 * gnulib/import/chdir-long.h: Update.
1358 * gnulib/import/cloexec.c: Update.
1359 * gnulib/import/cloexec.h: Update.
1360 * gnulib/import/close.c: Update.
1361 * gnulib/import/closedir.c: Update.
1362 * gnulib/import/config.charset: Update.
1363 * gnulib/import/dirent-private.h: Update.
1364 * gnulib/import/dirent.in.h: Update.
1365 * gnulib/import/dirfd.c: Update.
1366 * gnulib/import/dirname-lgpl.c: Update.
1367 * gnulib/import/dirname.h: Update.
1368 * gnulib/import/dosname.h: Update.
1369 * gnulib/import/dup-safer-flag.c: Update.
1370 * gnulib/import/dup-safer.c: Update.
1371 * gnulib/import/dup.c: Update.
1372 * gnulib/import/dup2.c: Update.
1373 * gnulib/import/errno.in.h: Update.
1374 * gnulib/import/error.c: Update.
1375 * gnulib/import/error.h: Update.
1376 * gnulib/import/exitfail.c: Update.
1377 * gnulib/import/exitfail.h: Update.
1378 * gnulib/import/extra/update-copyright: Update.
1379 * gnulib/import/fchdir.c: Update.
1380 * gnulib/import/fcntl.c: Update.
1381 * gnulib/import/fcntl.in.h: Update.
1382 * gnulib/import/fd-hook.c: Update.
1383 * gnulib/import/fd-hook.h: Update.
1384 * gnulib/import/fd-safer-flag.c: Update.
1385 * gnulib/import/fd-safer.c: Update.
1386 * gnulib/import/fdopendir.c: Update.
1387 * gnulib/import/filename.h: Update.
1388 * gnulib/import/filenamecat-lgpl.c: Update.
1389 * gnulib/import/filenamecat.h: Update.
1390 * gnulib/import/flexmember.h: Update.
1391 * gnulib/import/float+.h: Update.
1392 * gnulib/import/float.c: Update.
1393 * gnulib/import/float.in.h: Update.
1394 * gnulib/import/fnmatch.c: Update.
1395 * gnulib/import/fnmatch.in.h: Update.
1396 * gnulib/import/fnmatch_loop.c: Update.
1397 * gnulib/import/fpucw.h: Update.
1398 * gnulib/import/frexp.c: Update.
1399 * gnulib/import/frexpl.c: Update.
1400 * gnulib/import/fstat.c: Update.
1401 * gnulib/import/fstatat.c: Update.
1402 * gnulib/import/getcwd-lgpl.c: Update.
1403 * gnulib/import/getcwd.c: Update.
1404 * gnulib/import/getdtablesize.c: Update.
1405 * gnulib/import/getlogin_r.c: Update.
1406 * gnulib/import/getprogname.c: Update.
1407 * gnulib/import/getprogname.h: Update.
1408 * gnulib/import/gettext.h: Update.
1409 * gnulib/import/gettimeofday.c: Update.
1410 * gnulib/import/glob-libc.h: Update.
1411 * gnulib/import/glob.c: Update.
1412 * gnulib/import/glob.in.h: Update.
1413 * gnulib/import/glob_internal.h: Update.
1414 * gnulib/import/glob_pattern_p.c: Update.
1415 * gnulib/import/globfree.c: Update.
1416 * gnulib/import/hard-locale.c: Update.
1417 * gnulib/import/hard-locale.h: Update.
1418 * gnulib/import/intprops.h: Update.
1419 * gnulib/import/inttypes.in.h: Update.
1420 * gnulib/import/isnan.c: Update.
1421 * gnulib/import/isnand-nolibm.h: Update.
1422 * gnulib/import/isnand.c: Update.
1423 * gnulib/import/isnanl-nolibm.h: Update.
1424 * gnulib/import/isnanl.c: Update.
1425 * gnulib/import/itold.c: Update.
1426 * gnulib/import/libc-config.h: Update.
1427 * gnulib/import/limits.in.h: Update.
1428 * gnulib/import/localcharset.c: Update.
1429 * gnulib/import/localcharset.h: Update.
1430 * gnulib/import/localtime-buffer.c: Update.
1431 * gnulib/import/localtime-buffer.h: Update.
1432 * gnulib/import/lstat.c: Update.
1433 * gnulib/import/m4/00gnulib.m4: Update.
1434 * gnulib/import/m4/__inline.m4: Update.
1435 * gnulib/import/m4/absolute-header.m4: Update.
1436 * gnulib/import/m4/alloca.m4: Update.
1437 * gnulib/import/m4/builtin-expect.m4: Update.
1438 * gnulib/import/m4/canonicalize.m4: Update.
1439 * gnulib/import/m4/chdir-long.m4: Update.
1440 * gnulib/import/m4/close.m4: Update.
1441 * gnulib/import/m4/closedir.m4: Update.
1442 * gnulib/import/m4/configmake.m4: Update.
1443 * gnulib/import/m4/d-ino.m4: Update.
1444 * gnulib/import/m4/d-type.m4: Update.
1445 * gnulib/import/m4/dirent_h.m4: Update.
1446 * gnulib/import/m4/dirfd.m4: Update.
1447 * gnulib/import/m4/dirname.m4: Update.
1448 * gnulib/import/m4/double-slash-root.m4: Update.
1449 * gnulib/import/m4/dup.m4: Update.
1450 * gnulib/import/m4/dup2.m4: Update.
1451 * gnulib/import/m4/eealloc.m4: Update.
1452 * gnulib/import/m4/environ.m4: Update.
1453 * gnulib/import/m4/errno_h.m4: Update.
1454 * gnulib/import/m4/error.m4: Update.
1455 * gnulib/import/m4/exponentd.m4: Update.
1456 * gnulib/import/m4/exponentl.m4: Update.
1457 * gnulib/import/m4/extensions.m4: Update.
1458 * gnulib/import/m4/extern-inline.m4: Update.
1459 * gnulib/import/m4/fchdir.m4: Update.
1460 * gnulib/import/m4/fcntl-o.m4: Update.
1461 * gnulib/import/m4/fcntl.m4: Update.
1462 * gnulib/import/m4/fcntl_h.m4: Update.
1463 * gnulib/import/m4/fdopendir.m4: Update.
1464 * gnulib/import/m4/filenamecat.m4: Update.
1465 * gnulib/import/m4/flexmember.m4: Update.
1466 * gnulib/import/m4/float_h.m4: Update.
1467 * gnulib/import/m4/fnmatch.m4: Update.
1468 * gnulib/import/m4/fnmatch_h.m4: Update.
1469 * gnulib/import/m4/fpieee.m4: Update.
1470 * gnulib/import/m4/frexp.m4: Update.
1471 * gnulib/import/m4/frexpl.m4: Update.
1472 * gnulib/import/m4/fstat.m4: Update.
1473 * gnulib/import/m4/fstatat.m4: Update.
1474 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1475 * gnulib/import/m4/getcwd-path-max.m4: Update.
1476 * gnulib/import/m4/getcwd.m4: Update.
1477 * gnulib/import/m4/getdtablesize.m4: Update.
1478 * gnulib/import/m4/getlogin.m4: Update.
1479 * gnulib/import/m4/getlogin_r.m4: Update.
1480 * gnulib/import/m4/getpagesize.m4: Update.
1481 * gnulib/import/m4/getprogname.m4: Update.
1482 * gnulib/import/m4/gettimeofday.m4: Update.
1483 * gnulib/import/m4/glibc21.m4: Update.
1484 * gnulib/import/m4/glob.m4: Update.
1485 * gnulib/import/m4/glob_h.m4: Update.
1486 * gnulib/import/m4/gnulib-cache.m4: Update.
1487 * gnulib/import/m4/gnulib-common.m4: Update.
1488 * gnulib/import/m4/gnulib-comp.m4: Update.
1489 * gnulib/import/m4/gnulib-tool.m4: Update.
1490 * gnulib/import/m4/hard-locale.m4: Update.
1491 * gnulib/import/m4/include_next.m4: Update.
1492 * gnulib/import/m4/inttypes-pri.m4: Update.
1493 * gnulib/import/m4/inttypes.m4: Update.
1494 * gnulib/import/m4/isnand.m4: Update.
1495 * gnulib/import/m4/isnanl.m4: Update.
1496 * gnulib/import/m4/largefile.m4: Update.
1497 * gnulib/import/m4/limits-h.m4: Update.
1498 * gnulib/import/m4/localcharset.m4: Update.
1499 * gnulib/import/m4/locale-fr.m4: Update.
1500 * gnulib/import/m4/locale-ja.m4: Update.
1501 * gnulib/import/m4/locale-zh.m4: Update.
1502 * gnulib/import/m4/localtime-buffer.m4: Update.
1503 * gnulib/import/m4/longlong.m4: Update.
1504 * gnulib/import/m4/lstat.m4: Update.
1505 * gnulib/import/m4/malloc.m4: Update.
1506 * gnulib/import/m4/malloca.m4: Update.
1507 * gnulib/import/m4/math_h.m4: Update.
1508 * gnulib/import/m4/mbrtowc.m4: Update.
1509 * gnulib/import/m4/mbsinit.m4: Update.
1510 * gnulib/import/m4/mbsrtowcs.m4: Update.
1511 * gnulib/import/m4/mbstate_t.m4: Update.
1512 * gnulib/import/m4/memchr.m4: Update.
1513 * gnulib/import/m4/memmem.m4: Update.
1514 * gnulib/import/m4/mempcpy.m4: Update.
1515 * gnulib/import/m4/memrchr.m4: Update.
1516 * gnulib/import/m4/mkdir.m4: Update.
1517 * gnulib/import/m4/mkstemp.m4: Update.
1518 * gnulib/import/m4/mmap-anon.m4: Update.
1519 * gnulib/import/m4/mode_t.m4: Update.
1520 * gnulib/import/m4/msvc-inval.m4: Update.
1521 * gnulib/import/m4/msvc-nothrow.m4: Update.
1522 * gnulib/import/m4/multiarch.m4: Update.
1523 * gnulib/import/m4/nocrash.m4: Update.
1524 * gnulib/import/m4/off_t.m4: Update.
1525 * gnulib/import/m4/onceonly.m4: Update.
1526 * gnulib/import/m4/open-cloexec.m4: Update.
1527 * gnulib/import/m4/open.m4: Update.
1528 * gnulib/import/m4/openat.m4: Update.
1529 * gnulib/import/m4/opendir.m4: Update.
1530 * gnulib/import/m4/pathmax.m4: Update.
1531 * gnulib/import/m4/rawmemchr.m4: Update.
1532 * gnulib/import/m4/readdir.m4: Update.
1533 * gnulib/import/m4/readlink.m4: Update.
1534 * gnulib/import/m4/realloc.m4: Update.
1535 * gnulib/import/m4/rename.m4: Update.
1536 * gnulib/import/m4/rewinddir.m4: Update.
1537 * gnulib/import/m4/rmdir.m4: Update.
1538 * gnulib/import/m4/save-cwd.m4: Update.
1539 * gnulib/import/m4/secure_getenv.m4: Update.
1540 * gnulib/import/m4/setenv.m4: Update.
1541 * gnulib/import/m4/signal_h.m4: Update.
1542 * gnulib/import/m4/ssize_t.m4: Update.
1543 * gnulib/import/m4/stat-time.m4: Update.
1544 * gnulib/import/m4/stat.m4: Update.
1545 * gnulib/import/m4/std-gnu11.m4: Update.
1546 * gnulib/import/m4/stdbool.m4: Update.
1547 * gnulib/import/m4/stddef_h.m4: Update.
1548 * gnulib/import/m4/stdint.m4: Update.
1549 * gnulib/import/m4/stdio_h.m4: Update.
1550 * gnulib/import/m4/stdlib_h.m4: Update.
1551 * gnulib/import/m4/strchrnul.m4: Update.
1552 * gnulib/import/m4/strdup.m4: Update.
1553 * gnulib/import/m4/strerror.m4: Update.
1554 * gnulib/import/m4/string_h.m4: Update.
1555 * gnulib/import/m4/strstr.m4: Update.
1556 * gnulib/import/m4/strtok_r.m4: Update.
1557 * gnulib/import/m4/sys_socket_h.m4: Update.
1558 * gnulib/import/m4/sys_stat_h.m4: Update.
1559 * gnulib/import/m4/sys_time_h.m4: Update.
1560 * gnulib/import/m4/sys_types_h.m4: Update.
1561 * gnulib/import/m4/tempname.m4: Update.
1562 * gnulib/import/m4/time_h.m4: Update.
1563 * gnulib/import/m4/unistd-safer.m4: Update.
1564 * gnulib/import/m4/unistd_h.m4: Update.
1565 * gnulib/import/m4/warn-on-use.m4: Update.
1566 * gnulib/import/m4/wchar_h.m4: Update.
1567 * gnulib/import/m4/wchar_t.m4: Update.
1568 * gnulib/import/m4/wctype_h.m4: Update.
1569 * gnulib/import/m4/wint_t.m4: Update.
1570 * gnulib/import/malloc.c: Update.
1571 * gnulib/import/malloc/scratch_buffer.h: Update.
1572 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1573 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1574 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1575 * gnulib/import/malloca.c: Update.
1576 * gnulib/import/malloca.h: Update.
1577 * gnulib/import/malloca.valgrind: Update.
1578 * gnulib/import/math.in.h: Update.
1579 * gnulib/import/mbrtowc.c: Update.
1580 * gnulib/import/mbsinit.c: Update.
1581 * gnulib/import/mbsrtowcs-impl.h: Update.
1582 * gnulib/import/mbsrtowcs-state.c: Update.
1583 * gnulib/import/mbsrtowcs.c: Update.
1584 * gnulib/import/memchr.c: Update.
1585 * gnulib/import/memmem.c: Update.
1586 * gnulib/import/mempcpy.c: Update.
1587 * gnulib/import/memrchr.c: Update.
1588 * gnulib/import/mkdir.c: Update.
1589 * gnulib/import/mkstemp.c: Update.
1590 * gnulib/import/msvc-inval.c: Update.
1591 * gnulib/import/msvc-inval.h: Update.
1592 * gnulib/import/msvc-nothrow.c: Update.
1593 * gnulib/import/msvc-nothrow.h: Update.
1594 * gnulib/import/open.c: Update.
1595 * gnulib/import/openat-die.c: Update.
1596 * gnulib/import/openat-priv.h: Update.
1597 * gnulib/import/openat-proc.c: Update.
1598 * gnulib/import/openat.c: Update.
1599 * gnulib/import/openat.h: Update.
1600 * gnulib/import/opendir.c: Update.
1601 * gnulib/import/pathmax.h: Update.
1602 * gnulib/import/pipe-safer.c: Update.
1603 * gnulib/import/rawmemchr.c: Update.
1604 * gnulib/import/readdir.c: Update.
1605 * gnulib/import/readlink.c: Update.
1606 * gnulib/import/realloc.c: Update.
1607 * gnulib/import/ref-add.sin: Update.
1608 * gnulib/import/ref-del.sin: Update.
1609 * gnulib/import/rename.c: Update.
1610 * gnulib/import/rewinddir.c: Update.
1611 * gnulib/import/rmdir.c: Update.
1612 * gnulib/import/same-inode.h: Update.
1613 * gnulib/import/save-cwd.c: Update.
1614 * gnulib/import/save-cwd.h: Update.
1615 * gnulib/import/scratch_buffer.h: Update.
1616 * gnulib/import/secure_getenv.c: Update.
1617 * gnulib/import/setenv.c: Update.
1618 * gnulib/import/signal.in.h: Update.
1619 * gnulib/import/stat-time.c: Update.
1620 * gnulib/import/stat-time.h: Update.
1621 * gnulib/import/stat-w32.c: Update.
1622 * gnulib/import/stat-w32.h: Update.
1623 * gnulib/import/stat.c: Update.
1624 * gnulib/import/stdbool.in.h: Update.
1625 * gnulib/import/stddef.in.h: Update.
1626 * gnulib/import/stdint.in.h: Update.
1627 * gnulib/import/stdio.in.h: Update.
1628 * gnulib/import/stdlib.in.h: Update.
1629 * gnulib/import/str-two-way.h: Update.
1630 * gnulib/import/strchrnul.c: Update.
1631 * gnulib/import/strdup.c: Update.
1632 * gnulib/import/streq.h: Update.
1633 * gnulib/import/strerror-override.c: Update.
1634 * gnulib/import/strerror-override.h: Update.
1635 * gnulib/import/strerror.c: Update.
1636 * gnulib/import/string.in.h: Update.
1637 * gnulib/import/stripslash.c: Update.
1638 * gnulib/import/strnlen1.c: Update.
1639 * gnulib/import/strnlen1.h: Update.
1640 * gnulib/import/strstr.c: Update.
1641 * gnulib/import/strtok_r.c: Update.
1642 * gnulib/import/sys_stat.in.h: Update.
1643 * gnulib/import/sys_time.in.h: Update.
1644 * gnulib/import/sys_types.in.h: Update.
1645 * gnulib/import/tempname.c: Update.
1646 * gnulib/import/tempname.h: Update.
1647 * gnulib/import/time.in.h: Update.
1648 * gnulib/import/unistd--.h: Update.
1649 * gnulib/import/unistd-safer.h: Update.
1650 * gnulib/import/unistd.in.h: Update.
1651 * gnulib/import/unsetenv.c: Update.
1652 * gnulib/import/verify.h: Update.
1653 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1654 * gnulib/import/wchar.in.h: Update.
1655 * gnulib/import/wctype.in.h: Update.
1656 * gnulib/import/xalloc-oversized.h: Update.
1657 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1658 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1659
1660 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1661
1662 * record-btrace.c (get_thread_current_frame): Remove
1663 old_inferior_ptid.
1664
1665 2018-09-10 Jerome Guitton <guitton@adacore.com>
1666
1667 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1668 with check_tag to 1 if and only if the type is tagged and the
1669 component being searched cannot been found in the current
1670 view. Otherwise, always call ada_to_fixed_type with
1671 check_tag to 0.
1672
1673 2018-09-10 Xavier Roirand <roirand@adacore.com>
1674
1675 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1676 declaration.
1677 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1678 * ada-varobj.c (ada_varobj_get_number_of_children,
1679 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1680
1681 2018-09-10 Xavier Roirand <roirand@adacore.com>
1682
1683 * ada-valprint.c (ada_value_print): Use type instead of
1684 enclosing type.
1685
1686 2018-09-10 Xavier Roirand <roirand@adacore.com>
1687
1688 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1689 an array of access to unconstrained array.
1690
1691 2018-09-10 Xavier Roirand <roirand@adacore.com>
1692
1693 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1694 (ada_check_typedef): Use it.
1695
1696 2018-09-10 Xavier Roirand <roirand@adacore.com>
1697
1698 * ada-varobj.c (ada_varobj_describe_struct_child)
1699 (ada_varobj_describe_child): Handle union case like struct one.
1700
1701 2018-09-10 Tom Tromey <tom@tromey.com>
1702
1703 PR python/18380:
1704 * python/python.c (_initialize_python): Make example in "python"
1705 help work in Python 3.
1706
1707 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1708
1709 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1710 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1711 $(EXEEXT) to the script, as it is not a program.
1712
1713 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1714
1715 * python/py-prettyprint.c (pretty_print_one_value): Return
1716 gdbpy_ref<>.
1717 (print_string_repr): Adjust.
1718 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1719 * python/python-internal.h (apply_varobj_pretty_printer): Return
1720 gdbpy_ref<>.
1721 * varobj.c (varobj_value_get_print_value): Adjust.
1722
1723 2018-09-08 Tom Tromey <tom@tromey.com>
1724
1725 PR python/16047:
1726 * python/py-prettyprint.c (pretty_print_one_value): Check for
1727 to_string method.
1728
1729 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1730
1731 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1732 replace_operator_with_call.
1733
1734 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1735
1736 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1737
1738 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1739
1740 * ada-typeprint.c (print_range): Print the bounds using TYPE
1741 rather than its TYPE_TARGET_TYPE.
1742
1743 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1744
1745 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1746 call to ada_to_fixed_value_create.
1747
1748 2018-09-08 Jerome Guitton <guitton@adacore.com>
1749
1750 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1751
1752 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1753
1754 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1755 by calls to error.
1756
1757 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1758
1759 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1760 Move update of loop variable "fi".
1761
1762 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1763
1764 * ada-lang.c (value_assign_to_component): In the case of
1765 big-endian targets, extract the bits of the given VAL
1766 using an src_offset of zero if container is not a scalar.
1767
1768 2018-09-06 Simon Ser <contact@emersion.fr>
1769
1770 PR gdb/23105
1771 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1772 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1773 * fbsd-tdep.c (fbsd_make_note_desc): New.
1774 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1775 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1776 * target.h (enum target_object) Add FreeBSD-specific
1777 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1778
1779 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1780
1781 * compile/compile-c.h (generate_c_for_variable_locations):
1782 Change reference to pointer.
1783 * compile/compile-c-support.c (compile_program) <compute>:
1784 Likewise.
1785 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1786 (generate_c_for_for_one_variable): Likewise
1787 (generate_c_for_variable_locations): Likewise
1788 * compile/compile-c-types.c (compile_c_instance::convert_type):
1789 Likewise
1790 * compile/compile-cplus-symbols.c (convert_one_symbol):
1791 std::move the scope passed to enter_scope.
1792 * compile/compile-cplus-types.c
1793 (compile_cplus_instance::enter_scope): Make parameter
1794 rvalue-reference.
1795 (compile_cplus_instance::new_scope): Change reference to
1796 pointer.
1797 (compile_cplus_instance::convert_type): Likewise
1798 (compile_cplus_convert_typedef): std::move the scope passed to
1799 enter_scope.
1800 (compile_cplus_convert_struct_or_union): Likewise.
1801 (compile_cplus_convert_enum): Likewise.
1802 (compile_cplus_convert_namespace): Likewise.
1803 * compile/compile-cplus.h (compile_cplus_instance)
1804 <enter_scope>: Make parameter rvalue-reference.
1805 * compile/compile-internal.h (compile_instance)
1806 <get_cached_type>: Likewise
1807 * compile/compile-loc2c.c (push): Likewise
1808 (pushf): Likewise
1809 (unary): Likewise
1810 (binary): Likewise
1811 (print_label): Likewise
1812 (pushf_register_address): Likewise
1813 (pushf_register): Likewise
1814 (do_compile_dwarf_expr_to_c): Likewise
1815 (compile_dwarf_expr_to_c): Likewise
1816 (compile_dwarf_bounds_to_c): Likewise
1817 * compile/compile.c (compile_instance::get_cached_type):
1818 Likewise
1819 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1820 (compile_dwarf_bounds_to_c): Likewise
1821 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1822 (dwarf2_compile_property_to_c): Likewise
1823 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1824 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1825 Likewise
1826
1827 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1828
1829 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1830 * tui/tui-data.c (init_content_element): Don't initialize it.
1831
1832 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1833
1834 * tui/tui-data.h (struct tui_win_info)
1835 <detail::opaque>: Remove.
1836 * tui/tui-data.c (init_win_info): Remove assignment.
1837
1838 2018-09-05 Tom Tromey <tom@tromey.com>
1839
1840 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1841 -Wformat-nonliteral.
1842 * target-float.c (host_float_ops<T>::to_string)
1843 (host_float_ops<T>::from_string): Use
1844 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1845 * configure: Rebuild.
1846
1847 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1848
1849 * printcmd.c (printf_c_string): Use
1850 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1851 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1852
1853 2018-09-05 Tom Tromey <tom@tromey.com>
1854
1855 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1856
1857 2018-09-05 Tom de Vries <tdevries@suse.de>
1858
1859 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1860 with resolve_abstract_p == true.
1861 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1862 defaulting to false. Propagate resolve_abstract_p to
1863 dwarf2_fetch_die_loc_sect_off.
1864 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1865 parameter, defaulting to false.
1866 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1867 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1868 parameter.
1869 * dwarf2read.h (struct die_info): Forward-declare.
1870 (die_info_ptr): New typedef.
1871 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1872
1873 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1874
1875 GDB 8.2 released.
1876
1877 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1878 Pedro Alves <palves@redhat.com>
1879
1880 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1881 "aclocal-m4-deps.mk". Include file here.
1882 $(srcdir)/aclocal.m4: Add "configure.ac".
1883 * gnulib/aclocal-m4-deps.mk: New file.
1884 * gnulib/update-gnulib.sh: Automatically update
1885 "aclocal-m4-deps.mk".
1886
1887 2018-09-04 Tom Tromey <tom@tromey.com>
1888
1889 * configure: Rebuild.
1890 * configure.ac: Remove multi-ice code.
1891
1892 2018-09-04 Tom Tromey <tom@tromey.com>
1893
1894 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1895 (ada-exp.o): Update.
1896
1897 2018-09-04 Tom Tromey <tom@tromey.com>
1898
1899 * Makefile.in (printcmd.o, target-float.o): Remove.
1900 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1901
1902 2018-09-04 Tom Tromey <tom@tromey.com>
1903
1904 * gnulib/Makefile.in: Remove obsolete comment.
1905 * Makefile.in: Remove obsolete comment.
1906
1907 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1908
1909 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1910 line with '+'.
1911
1912 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1913
1914 * riscv-tdep.c: Add 'prologue-value.h' include.
1915 (struct riscv_unwind_cache): New struct.
1916 (riscv_debug_unwinder): New global.
1917 (riscv_scan_prologue): Update arguments, capture register details
1918 from prologue scan.
1919 (riscv_skip_prologue): Reformat arguments line, move end of
1920 prologue calculation into riscv_scan_prologue.
1921 (riscv_frame_cache): Update return type, create
1922 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1923 details.
1924 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1925 (riscv_frame_prev_register): Use the trad_frame within the
1926 riscv_unwind_cache.
1927 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1928 flag.
1929
1930 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1931
1932 * trad-frame.h (trad_frame_set_realreg): Declare.
1933 (trad_frame_set_addr): Declare.
1934 * trad-frame.c (trad_frame_set_realreg): Define new function.
1935 (trad_frame_set_addr): Define new function.
1936 (trad_frame_set_reg_realreg): Use new function.
1937 (trad_frame_set_reg_addr): Use new function.
1938
1939 2018-09-01 Keith Seitz <keiths@redhat.com>
1940
1941 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1942 pulongest instead of "%lld".
1943 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1944 ATTRIBUTE_UNUSED.
1945
1946 2018-08-31 Tom Tromey <tom@tromey.com>
1947
1948 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1949 variant part type.
1950
1951 2018-08-31 Pedro Alves <palves@redhat.com>
1952
1953 * gdbarch.h: Regenerate.
1954
1955 2018-08-31 Pedro Alves <palves@redhat.com>
1956
1957 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1958 * target.h (Hardware watchpoint interfaces): Describe
1959 continuable/steppable/non-steppable watchpoints.
1960 * gdbarch.h, gdbarch.c: Regenerate.
1961
1962 2018-08-31 Pedro Alves <palves@redhat.com>
1963
1964 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1965 Delete.
1966 * s390-linux-nat.c
1967 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1968 * target.h (target_ops::have_continuable_watchpoint): Delete.
1969 (target_have_continuable_watchpoint): Delete.
1970 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1971 * target-delegates.c: Regenerate.
1972
1973 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1974
1975 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1976 the files present in "gnulib/import/m4/".
1977
1978 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1979
1980 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1981 c.sw, c.swsp, and c.sdsp.
1982
1983 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
1984
1985 * riscv-tdep.c (struct riscv_inferior_data): Delete.
1986 (riscv_read_misa_reg): Don't cache value read into inferior data.
1987 (riscv_new_inferior_data): Delete.
1988 (riscv_inferior_data_cleanup): Delete.
1989 (riscv_inferior_data): Delete.
1990 (riscv_invalidate_inferior_data): Delete.
1991 (_initialize_riscv_tdep): Remove initialisation of inferior data.
1992
1993 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
1994
1995 * compile/compile-cplus-types.c
1996 (compile_cplus_instance::leave_scope): Take the address of scope
1997 object.
1998 (compile_cplus_instance::convert_qualified_base): Compare quals
1999 to 0.
2000
2001 2018-08-30 Keith Seitz <keiths@redhat.com>
2002
2003 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2004 Use "%s" and host_address_to_string instead of "%p" in printf.
2005
2006 2018-08-29 Keith Seitz <keiths@redhat.com>
2007
2008 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2009 and compile-cplus-types.c.
2010 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2011 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2012 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2013 Declare.
2014 * compile/compile-c-support.c: Include compile-cplus.h.
2015 (load_libcompile): Templatize.
2016 (get_compile_context): "New" function.
2017 (c_get_compile_context): Use get_compile_context.
2018 (cplus_get_compile_context): New function.
2019 (cplus_push_user_expression, cplus_pop_user_expression)
2020 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2021 (cplus_compute_program): Define new structs/functions.
2022 * compile/compile-cplus-symmbols.c: New file.
2023 * compile/compile-cplus-types.c: New file.
2024 * compile/compile-cplus.h: New file.
2025 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2026 Declare.
2027 * compile/compile-object-load.c (get_out_value_type): Use
2028 strncmp_iw when comparing symbol names.
2029 (compile_object_load): Add mst_bss and mst_data.
2030 * compile/compile.c (_initialize_compile): Remove
2031 -Wno-implicit-function-declaration from `compile_args'.
2032 * compile/gcc-cp-plugin.h: New file.
2033 * NEWS: Mention C++ compile support and new debug options.
2034
2035 2018-08-29 Keith Seitz <keiths@redhat.com>
2036
2037 * linespec.c (collect_info::add_symbol): Make virtual.
2038 (struct symbol_searcher_collect_info): New struct.
2039 (symbol_searcher::find_all_symbols): New method.
2040 * symtab.h (class symbol_searcher): New class.
2041
2042 2018-08-29 Keith Seitz <keiths@redhat.com>
2043
2044 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2045 Change to vector of block_symbol. Update all users.
2046 (struct collect_info) <symbols>: Likewise.
2047 (collect_info::add_symbol): Take block_symbol as argument.
2048 Update all callers.
2049 (decode_compound_collector) <m_symbols>: Change type to vector
2050 of block_symbol. Update all users.
2051 (decode_compound_collector::operator ()): Change parameter type
2052 to block_symbol.
2053 (find_method, find_function_symbols, find_linespec_symbols)
2054 (find_label_symbols_in_block, find_label_symbols): Change symbol
2055 vectors to block_symbol vectors.
2056 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2057 block_symbol.
2058
2059 2018-08-29 Keith Seitz <keiths@redhat.com>
2060
2061 * linespec.c (symbolp): Remove typedef and VEC definitions.
2062 (bound_minimal_symbol_d): Likewise.
2063
2064 2018-08-29 Keith Seitz <keiths@redhat.com>
2065
2066 * linespec.c (decode_compound_collector::decode_compound_collector):
2067 Remove initialization for `m_symtabs'.
2068 (decode_compound_collector::release_symbols): Change return type
2069 to std::vector. Update all callers.
2070 (class decode_compound_collector) <m_symbols>: Change type to
2071 std::vector.
2072 (lookup_prefix_sym): Change return type to std::vector. Update all
2073 callers.
2074 (compare_symbols): Remove.
2075 (std_compare_symbols): Rename to `compare_symbols'.
2076 (find_method): Change `sym_classes' parameter to std::vector.
2077 Update all callers. Use std::sort to sort sym_classes.
2078 (find_linespec_symbols): Remove cleanup.
2079
2080 2018-08-29 Keith Seitz <keiths@redhat.com>
2081
2082 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2083 std::vector. Update all users.
2084 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2085 (struct collect_info) <minimal_symbols>: Likewise.
2086 (compare_msymbols): Return bool. Change parameters to const
2087 bound_minimal_symbol references.
2088 (find_method, find_function_symbols, find_linespec_symbols): Change
2089 `minsyms' parameter to std::vector. Update all callers.
2090
2091 2018-08-29 Keith Seitz <keiths@redhat.com>
2092
2093 * linespec.c (struct linespec) <label_symbols>: Change type to
2094 std::vector. Update all users.
2095 (find_label_symbols_in_block): Change `result' parameter to
2096 std::vector. Update all callers.
2097 (find_label_symbols): Return std::vector. Update all callers.
2098
2099 2018-08-29 Keith Seitz <keiths@redhat.com>
2100
2101 * linespec.c (struct linespec) <function_symbols>: Change type to
2102 std::vector. Update all users.
2103 (struct collect_info) <function_symbols>: Likewise.
2104 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2105 (std_compare_symbols): New function.
2106 (find_method, find_function_symbols, find_linespec_symbols)
2107 (find_label_symbols_in_block): Change `symbols' parameter to
2108 std::vector. Update all callers.
2109 (find_label_symbols): Likewise for `function_symbols' and
2110 `label_funcs_ret'.
2111
2112 2018-08-29 Keith Seitz <keiths@redhat.com>
2113
2114 * linespec.c (symtab_vector_up): Define.
2115 (struct linespec) <file_symtabs>: Change type to std::vector *.
2116 Update all uses.
2117 (struct collect_info) <file_symtabs>: Likewise.
2118 (collect_symtabs_from_filename): Return symtab_vector_up.
2119 Update all callers.
2120 (decode_objc): Remove cleanup.
2121 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2122 (symtab_collector::release_symtabs): Return symtab_vector_up.
2123 Update all callers.
2124 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2125 Update all users.
2126 (collect_symtabs_from_filename, symtabs_from_filename): Return
2127 symtab_vector_up. Update all callers.
2128
2129 2018-08-29 Tom Tromey <tom@tromey.com>
2130
2131 * csky-tdep.c (csky_analyze_prologue): Use
2132 core_addr_to_string_nz.
2133
2134 2018-08-29 Tom Tromey <tom@tromey.com>
2135
2136 * windows-nat.c (struct xlate_exception) <them>: Change type to
2137 DWORD.
2138 (xlate): Fix formatting. Remove last entry.
2139 (struct xlate_exception, xlate): Comment out.
2140 (windows_nat_target::resume): Use ranged for.
2141
2142 2018-08-29 Jim Wilson <jimw@sifive.com>
2143
2144 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2145 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2146 of NT_PRFPREG.
2147 (riscv_linux_nat_target::store_registers): Likewise.
2148
2149 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2150
2151 PR gdb/23555
2152 PR gdb/23558
2153 * gnulib/aclocal.m4: Regenerate.
2154 * gnulib/config.in: Regenerate.
2155 * gnulib/configure: Regenerate.
2156 * gnulib/import/Makefile.am: Update.
2157 * gnulib/import/Makefile.in: Update.
2158 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2159 * gnulib/import/_Noreturn.h: ... this.
2160 * gnulib/import/alloca.in.h: Update.
2161 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2162 * gnulib/import/arg-nonnull.h: ... this.
2163 * gnulib/import/assure.h: Update.
2164 * gnulib/import/at-func.c: Update.
2165 * gnulib/import/basename-lgpl.c: Update.
2166 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2167 * gnulib/import/c++defs.h: ... this.
2168 * gnulib/import/canonicalize-lgpl.c: Update.
2169 * gnulib/import/cdefs.h: Update.
2170 * gnulib/import/chdir-long.c: Update.
2171 * gnulib/import/chdir-long.h: Update.
2172 * gnulib/import/cloexec.c: Update.
2173 * gnulib/import/cloexec.h: Update.
2174 * gnulib/import/close.c: Update.
2175 * gnulib/import/closedir.c: Update.
2176 * gnulib/import/config.charset: Update.
2177 * gnulib/import/dirent-private.h: Update.
2178 * gnulib/import/dirent.in.h: Update.
2179 * gnulib/import/dirfd.c: Update.
2180 * gnulib/import/dirname-lgpl.c: Update.
2181 * gnulib/import/dirname.h: Update.
2182 * gnulib/import/dosname.h: Update.
2183 * gnulib/import/dup-safer-flag.c: Update.
2184 * gnulib/import/dup-safer.c: Update.
2185 * gnulib/import/dup.c: Update.
2186 * gnulib/import/dup2.c: Update.
2187 * gnulib/import/errno.in.h: Update.
2188 * gnulib/import/error.c: Update.
2189 * gnulib/import/error.h: Update.
2190 * gnulib/import/exitfail.c: Update.
2191 * gnulib/import/exitfail.h: Update.
2192 * gnulib/import/extra/update-copyright: Update.
2193 * gnulib/import/fchdir.c: Update.
2194 * gnulib/import/fcntl.c: Update.
2195 * gnulib/import/fcntl.in.h: Update.
2196 * gnulib/import/fd-hook.c: Update.
2197 * gnulib/import/fd-hook.h: Update.
2198 * gnulib/import/fd-safer-flag.c: Update.
2199 * gnulib/import/fd-safer.c: Update.
2200 * gnulib/import/fdopendir.c: Update.
2201 * gnulib/import/filename.h: Update.
2202 * gnulib/import/filenamecat-lgpl.c: Update.
2203 * gnulib/import/filenamecat.h: Update.
2204 * gnulib/import/flexmember.h: Update.
2205 * gnulib/import/float+.h: Update.
2206 * gnulib/import/float.c: Update.
2207 * gnulib/import/float.in.h: Update.
2208 * gnulib/import/fnmatch.c: Update.
2209 * gnulib/import/fnmatch.in.h: Update.
2210 * gnulib/import/fnmatch_loop.c: Update.
2211 * gnulib/import/fpucw.h: Update.
2212 * gnulib/import/frexp.c: Update.
2213 * gnulib/import/frexpl.c: Update.
2214 * gnulib/import/fstat.c: Update.
2215 * gnulib/import/fstatat.c: Update.
2216 * gnulib/import/getcwd-lgpl.c: Update.
2217 * gnulib/import/getcwd.c: Update.
2218 * gnulib/import/getdtablesize.c: Update.
2219 * gnulib/import/getlogin_r.c: Update.
2220 * gnulib/import/getprogname.c: Update.
2221 * gnulib/import/getprogname.h: Update.
2222 * gnulib/import/gettext.h: Update.
2223 * gnulib/import/gettimeofday.c: Update.
2224 * gnulib/import/glob-libc.h: Update.
2225 * gnulib/import/glob.c: Update.
2226 * gnulib/import/glob.in.h: Update.
2227 * gnulib/import/glob_internal.h: Update.
2228 * gnulib/import/glob_pattern_p.c: Update.
2229 * gnulib/import/globfree.c: Update.
2230 * gnulib/import/hard-locale.c: Update.
2231 * gnulib/import/hard-locale.h: Update.
2232 * gnulib/import/intprops.h: Update.
2233 * gnulib/import/inttypes.in.h: Update.
2234 * gnulib/import/isnan.c: Update.
2235 * gnulib/import/isnand-nolibm.h: Update.
2236 * gnulib/import/isnand.c: Update.
2237 * gnulib/import/isnanl-nolibm.h: Update.
2238 * gnulib/import/isnanl.c: Update.
2239 * gnulib/import/itold.c: Update.
2240 * gnulib/import/libc-config.h: Update.
2241 * gnulib/import/limits.in.h: Update.
2242 * gnulib/import/localcharset.c: Update.
2243 * gnulib/import/localcharset.h: Update.
2244 * gnulib/import/localtime-buffer.c: Update.
2245 * gnulib/import/localtime-buffer.h: Update.
2246 * gnulib/import/lstat.c: Update.
2247 * gnulib/import/m4/00gnulib.m4: Update.
2248 * gnulib/import/m4/__inline.m4: Update.
2249 * gnulib/import/m4/absolute-header.m4: Update.
2250 * gnulib/import/m4/alloca.m4: Update.
2251 * gnulib/import/m4/builtin-expect.m4: Update.
2252 * gnulib/import/m4/canonicalize.m4: Update.
2253 * gnulib/import/m4/chdir-long.m4: Update.
2254 * gnulib/import/m4/close.m4: Update.
2255 * gnulib/import/m4/closedir.m4: Update.
2256 * gnulib/import/m4/configmake.m4: Update.
2257 * gnulib/import/m4/d-ino.m4: Update.
2258 * gnulib/import/m4/d-type.m4: Update.
2259 * gnulib/import/m4/dirent_h.m4: Update.
2260 * gnulib/import/m4/dirfd.m4: Update.
2261 * gnulib/import/m4/dirname.m4: Update.
2262 * gnulib/import/m4/double-slash-root.m4: Update.
2263 * gnulib/import/m4/dup.m4: Update.
2264 * gnulib/import/m4/dup2.m4: Update.
2265 * gnulib/import/m4/eealloc.m4: Update.
2266 * gnulib/import/m4/environ.m4: Update.
2267 * gnulib/import/m4/errno_h.m4: Update.
2268 * gnulib/import/m4/error.m4: Update.
2269 * gnulib/import/m4/exponentd.m4: Update.
2270 * gnulib/import/m4/exponentl.m4: Update.
2271 * gnulib/import/m4/extensions.m4: Update.
2272 * gnulib/import/m4/extern-inline.m4: Update.
2273 * gnulib/import/m4/fchdir.m4: Update.
2274 * gnulib/import/m4/fcntl-o.m4: Update.
2275 * gnulib/import/m4/fcntl.m4: Update.
2276 * gnulib/import/m4/fcntl_h.m4: Update.
2277 * gnulib/import/m4/fdopendir.m4: Update.
2278 * gnulib/import/m4/filenamecat.m4: Update.
2279 * gnulib/import/m4/flexmember.m4: Update.
2280 * gnulib/import/m4/float_h.m4: Update.
2281 * gnulib/import/m4/fnmatch.m4: Update.
2282 * gnulib/import/m4/fnmatch_h.m4: Update.
2283 * gnulib/import/m4/fpieee.m4: Update.
2284 * gnulib/import/m4/frexp.m4: Update.
2285 * gnulib/import/m4/frexpl.m4: Update.
2286 * gnulib/import/m4/fstat.m4: Update.
2287 * gnulib/import/m4/fstatat.m4: Update.
2288 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2289 * gnulib/import/m4/getcwd-path-max.m4: Update.
2290 * gnulib/import/m4/getcwd.m4: Update.
2291 * gnulib/import/m4/getdtablesize.m4: Update.
2292 * gnulib/import/m4/getlogin.m4: Update.
2293 * gnulib/import/m4/getlogin_r.m4: Update.
2294 * gnulib/import/m4/getpagesize.m4: Update.
2295 * gnulib/import/m4/getprogname.m4: Update.
2296 * gnulib/import/m4/gettimeofday.m4: Update.
2297 * gnulib/import/m4/glibc21.m4: Update.
2298 * gnulib/import/m4/glob.m4: Update.
2299 * gnulib/import/m4/glob_h.m4: Update.
2300 * gnulib/import/m4/gnulib-cache.m4: Update.
2301 * gnulib/import/m4/gnulib-common.m4: Update.
2302 * gnulib/import/m4/gnulib-comp.m4: Update.
2303 * gnulib/import/m4/gnulib-tool.m4: Update.
2304 * gnulib/import/m4/hard-locale.m4: Update.
2305 * gnulib/import/m4/include_next.m4: Update.
2306 * gnulib/import/m4/inttypes-pri.m4: Update.
2307 * gnulib/import/m4/inttypes.m4: Update.
2308 * gnulib/import/m4/isnand.m4: Update.
2309 * gnulib/import/m4/isnanl.m4: Update.
2310 * gnulib/import/m4/largefile.m4: Update.
2311 * gnulib/import/m4/limits-h.m4: Update.
2312 * gnulib/import/m4/localcharset.m4: Update.
2313 * gnulib/import/m4/locale-fr.m4: Update.
2314 * gnulib/import/m4/locale-ja.m4: Update.
2315 * gnulib/import/m4/locale-zh.m4: Update.
2316 * gnulib/import/m4/localtime-buffer.m4: Update.
2317 * gnulib/import/m4/longlong.m4: Update.
2318 * gnulib/import/m4/lstat.m4: Update.
2319 * gnulib/import/m4/malloc.m4: Update.
2320 * gnulib/import/m4/malloca.m4: Update.
2321 * gnulib/import/m4/math_h.m4: Update.
2322 * gnulib/import/m4/mbrtowc.m4: Update.
2323 * gnulib/import/m4/mbsinit.m4: Update.
2324 * gnulib/import/m4/mbsrtowcs.m4: Update.
2325 * gnulib/import/m4/mbstate_t.m4: Update.
2326 * gnulib/import/m4/memchr.m4: Update.
2327 * gnulib/import/m4/memmem.m4: Update.
2328 * gnulib/import/m4/mempcpy.m4: Update.
2329 * gnulib/import/m4/memrchr.m4: Update.
2330 * gnulib/import/m4/mkdir.m4: Update.
2331 * gnulib/import/m4/mkstemp.m4: Update.
2332 * gnulib/import/m4/mmap-anon.m4: Update.
2333 * gnulib/import/m4/mode_t.m4: Update.
2334 * gnulib/import/m4/msvc-inval.m4: Update.
2335 * gnulib/import/m4/msvc-nothrow.m4: Update.
2336 * gnulib/import/m4/multiarch.m4: Update.
2337 * gnulib/import/m4/nocrash.m4: Update.
2338 * gnulib/import/m4/off_t.m4: Update.
2339 * gnulib/import/m4/onceonly.m4: Update.
2340 * gnulib/import/m4/open-cloexec.m4: Update.
2341 * gnulib/import/m4/open.m4: Update.
2342 * gnulib/import/m4/openat.m4: Update.
2343 * gnulib/import/m4/opendir.m4: Update.
2344 * gnulib/import/m4/pathmax.m4: Update.
2345 * gnulib/import/m4/rawmemchr.m4: Update.
2346 * gnulib/import/m4/readdir.m4: Update.
2347 * gnulib/import/m4/readlink.m4: Update.
2348 * gnulib/import/m4/realloc.m4: Update.
2349 * gnulib/import/m4/rename.m4: Update.
2350 * gnulib/import/m4/rewinddir.m4: Update.
2351 * gnulib/import/m4/rmdir.m4: Update.
2352 * gnulib/import/m4/save-cwd.m4: Update.
2353 * gnulib/import/m4/secure_getenv.m4: Update.
2354 * gnulib/import/m4/setenv.m4: Update.
2355 * gnulib/import/m4/signal_h.m4: Update.
2356 * gnulib/import/m4/ssize_t.m4: Update.
2357 * gnulib/import/m4/stat-time.m4: Update.
2358 * gnulib/import/m4/stat.m4: Update.
2359 * gnulib/import/m4/std-gnu11.m4: Update.
2360 * gnulib/import/m4/stdbool.m4: Update.
2361 * gnulib/import/m4/stddef_h.m4: Update.
2362 * gnulib/import/m4/stdint.m4: Update.
2363 * gnulib/import/m4/stdio_h.m4: Update.
2364 * gnulib/import/m4/stdlib_h.m4: Update.
2365 * gnulib/import/m4/strchrnul.m4: Update.
2366 * gnulib/import/m4/strdup.m4: Update.
2367 * gnulib/import/m4/strerror.m4: Update.
2368 * gnulib/import/m4/string_h.m4: Update.
2369 * gnulib/import/m4/strstr.m4: Update.
2370 * gnulib/import/m4/strtok_r.m4: Update.
2371 * gnulib/import/m4/sys_socket_h.m4: Update.
2372 * gnulib/import/m4/sys_stat_h.m4: Update.
2373 * gnulib/import/m4/sys_time_h.m4: Update.
2374 * gnulib/import/m4/sys_types_h.m4: Update.
2375 * gnulib/import/m4/tempname.m4: Update.
2376 * gnulib/import/m4/time_h.m4: Update.
2377 * gnulib/import/m4/unistd-safer.m4: Update.
2378 * gnulib/import/m4/unistd_h.m4: Update.
2379 * gnulib/import/m4/warn-on-use.m4: Update.
2380 * gnulib/import/m4/wchar_h.m4: Update.
2381 * gnulib/import/m4/wchar_t.m4: Update.
2382 * gnulib/import/m4/wctype_h.m4: Update.
2383 * gnulib/import/m4/wint_t.m4: Update.
2384 * gnulib/import/malloc.c: Update.
2385 * gnulib/import/malloc/scratch_buffer.h: Update.
2386 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2387 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2388 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2389 * gnulib/import/malloca.c: Update.
2390 * gnulib/import/malloca.h: Update.
2391 * gnulib/import/malloca.valgrind: Update.
2392 * gnulib/import/math.in.h: Update.
2393 * gnulib/import/mbrtowc.c: Update.
2394 * gnulib/import/mbsinit.c: Update.
2395 * gnulib/import/mbsrtowcs-impl.h: Update.
2396 * gnulib/import/mbsrtowcs-state.c: Update.
2397 * gnulib/import/mbsrtowcs.c: Update.
2398 * gnulib/import/memchr.c: Update.
2399 * gnulib/import/memmem.c: Update.
2400 * gnulib/import/mempcpy.c: Update.
2401 * gnulib/import/memrchr.c: Update.
2402 * gnulib/import/mkdir.c: Update.
2403 * gnulib/import/mkstemp.c: Update.
2404 * gnulib/import/msvc-inval.c: Update.
2405 * gnulib/import/msvc-inval.h: Update.
2406 * gnulib/import/msvc-nothrow.c: Update.
2407 * gnulib/import/msvc-nothrow.h: Update.
2408 * gnulib/import/open.c: Update.
2409 * gnulib/import/openat-die.c: Update.
2410 * gnulib/import/openat-priv.h: Update.
2411 * gnulib/import/openat-proc.c: Update.
2412 * gnulib/import/openat.c: Update.
2413 * gnulib/import/openat.h: Update.
2414 * gnulib/import/opendir.c: Update.
2415 * gnulib/import/pathmax.h: Update.
2416 * gnulib/import/pipe-safer.c: Update.
2417 * gnulib/import/rawmemchr.c: Update.
2418 * gnulib/import/readdir.c: Update.
2419 * gnulib/import/readlink.c: Update.
2420 * gnulib/import/realloc.c: Update.
2421 * gnulib/import/ref-add.sin: Update.
2422 * gnulib/import/ref-del.sin: Update.
2423 * gnulib/import/rename.c: Update.
2424 * gnulib/import/rewinddir.c: Update.
2425 * gnulib/import/rmdir.c: Update.
2426 * gnulib/import/same-inode.h: Update.
2427 * gnulib/import/save-cwd.c: Update.
2428 * gnulib/import/save-cwd.h: Update.
2429 * gnulib/import/scratch_buffer.h: Update.
2430 * gnulib/import/secure_getenv.c: Update.
2431 * gnulib/import/setenv.c: Update.
2432 * gnulib/import/signal.in.h: Update.
2433 * gnulib/import/stat-time.c: Update.
2434 * gnulib/import/stat-time.h: Update.
2435 * gnulib/import/stat-w32.c: Update.
2436 * gnulib/import/stat-w32.h: Update.
2437 * gnulib/import/stat.c: Update.
2438 * gnulib/import/stdbool.in.h: Update.
2439 * gnulib/import/stddef.in.h: Update.
2440 * gnulib/import/stdint.in.h: Update.
2441 * gnulib/import/stdio.in.h: Update.
2442 * gnulib/import/stdlib.in.h: Update.
2443 * gnulib/import/str-two-way.h: Update.
2444 * gnulib/import/strchrnul.c: Update.
2445 * gnulib/import/strdup.c: Update.
2446 * gnulib/import/streq.h: Update.
2447 * gnulib/import/strerror-override.c: Update.
2448 * gnulib/import/strerror-override.h: Update.
2449 * gnulib/import/strerror.c: Update.
2450 * gnulib/import/string.in.h: Update.
2451 * gnulib/import/stripslash.c: Update.
2452 * gnulib/import/strnlen1.c: Update.
2453 * gnulib/import/strnlen1.h: Update.
2454 * gnulib/import/strstr.c: Update.
2455 * gnulib/import/strtok_r.c: Update.
2456 * gnulib/import/sys_stat.in.h: Update.
2457 * gnulib/import/sys_time.in.h: Update.
2458 * gnulib/import/sys_types.in.h: Update.
2459 * gnulib/import/tempname.c: Update.
2460 * gnulib/import/tempname.h: Update.
2461 * gnulib/import/time.in.h: Update.
2462 * gnulib/import/unistd--.h: Update.
2463 * gnulib/import/unistd-safer.h: Update.
2464 * gnulib/import/unistd.in.h: Update.
2465 * gnulib/import/unsetenv.c: Update.
2466 * gnulib/import/verify.h: Update.
2467 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2468 * gnulib/import/wchar.in.h: Update.
2469 * gnulib/import/wctype.in.h: Update.
2470 * gnulib/import/xalloc-oversized.h: Update.
2471 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2472 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2473
2474 2018-08-16 Gary Benson <gbenson@redhat.com>
2475
2476 PR gdb/13000:
2477 * gdb/main.c (captured_main_1): Exit with nonzero status
2478 in batch mode if the last command to be executed failed.
2479 * NEWS: Mention the above.
2480
2481 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2482
2483 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2484 end of warning message.
2485
2486 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2487
2488 PR gdb/22943:
2489 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2490 (aarch64_extract_return_value): Use
2491 aapcs_is_vfp_call_or_return_candidate.
2492 (aarch64_return_in_memory): Likewise.
2493 (aarch64_store_return_value): Likewise.
2494
2495 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2496
2497 * aarch64-tdep.c
2498 (aapcs_is_vfp_call_or_return_candidate): Make static
2499 (pass_in_v_or_stack): Remove function.
2500 (pass_in_v_vfp_candidate): New function.
2501 (aarch64_push_dummy_call): Check for float register candidates.
2502
2503 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2504
2505 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2506 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2507 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2508
2509 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2510
2511 PR build/23399
2512 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2513 (struct ipa_sym_addresses): Rename to...
2514 (struct ipa_sym_addresses_common): ... this.
2515 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2516
2517 2018-08-28 Tom Tromey <tom@tromey.com>
2518
2519 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2520 (token_fifo): Now a std::vector.
2521 (yylex, c_parse): Update.
2522 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2523 (token_fifo): Now a std::vector.
2524 (yylex, d_parse): Update.
2525 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2526 (token_fifo): Now a std::vector.
2527 (yylex, go_parse): Update.
2528
2529 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2530
2531 * parser-defs.h (struct type_stack) <elements>: Change type to
2532 std::vector<union type_stack_elt>.
2533 <depth, size>: Remove.
2534 * parse.c (parse_exp_in_context_1): Adjust.
2535 (type_stack_reserve): Remove.
2536 (check_type_stack_depth): Remove.
2537 (insert_into_type_stack): Adjust to std::vector.
2538 (insert_type): Likewise.
2539 (push_type): Likewise.
2540 (push_type_int): Likewise.
2541 (insert_type_address_space): Likewise.
2542 (pop_type): Likewise.
2543 (pop_type_int): Likewise.
2544 (pop_typelist): Likewise.
2545 (pop_type_stack): Likewise.
2546 (append_type_stack): Likewise.
2547 (push_type_stack): Likewise.
2548 (get_type_stack): Likewise.
2549 (type_stack_cleanup): Likewise.
2550 (push_typelist): Likewise.
2551 (follow_types): Likewise.
2552 (_initialize_parse): Likewise.
2553
2554 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2555
2556 * NEWS: Mention csky target.
2557
2558 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2559 Hafiz Abid Qadeer <abidh@codesourcery.com>
2560 Don Breazeal <donb@codesourcery.com>
2561
2562 * csky-linux-tdep.c: New file.
2563 * csky-tdep.c: Likewise.
2564 * csky-tdep.h: Likewise.
2565 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2566 csky-tdep.o.
2567 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2568 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2569 * configure.tgt: Add csky support.
2570
2571 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2572
2573 * python/py-framefilter.c (py_print_frame): Print frame architecture
2574 when printing on an MI output.
2575
2576 2018-08-27 Tom Tromey <tom@tromey.com>
2577
2578 PR build/23087:
2579 * configure: Rebuild.
2580 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2581
2582 2018-08-27 Tom Tromey <tom@tromey.com>
2583
2584 * aarch64-linux-tdep.c
2585 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2586 casts to int.
2587
2588 2018-08-27 Tom Tromey <tom@tromey.com>
2589
2590 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2591 unsigned.
2592 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2593 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2594 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2595 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2596 unsigned.
2597
2598 2018-08-27 Tom Tromey <tom@tromey.com>
2599
2600 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2601 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2602
2603 2018-08-27 Tom Tromey <tom@tromey.com>
2604
2605 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2606 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2607 ULONGEST_MAX.
2608 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2609 ULONGEST_MAX.
2610 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2611 ULONGEST_MAX.
2612 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2613 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2614 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2615 ULONGEST_MAX.
2616 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2617 (ppc64_linux_sigaction_tramp_frame)
2618 (ppc32_linux_sighandler_tramp_frame)
2619 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2620 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2621 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2622 * mn10300-linux-tdep.c (am33_linux_sigframe)
2623 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2624 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2625 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2626 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2627 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2628 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2629 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2630 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2631 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2632 * microblaze-linux-tdep.c
2633 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2634 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2635 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2636 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2637 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2638 * common/common-types.h (ULONGEST_MAX): New define.
2639 (CORE_ADDR_MAX): Fix formatting.
2640 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2641 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2642 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2643 (arm_linux_rt_sigreturn_tramp_frame)
2644 (arm_eabi_linux_sigreturn_tramp_frame)
2645 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2646 (thumb2_eabi_linux_sigreturn_tramp_frame)
2647 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2648 (arm_linux_restart_syscall_tramp_frame)
2649 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2650 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2651 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2652 ULONGEST_MAX.
2653 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2654
2655 2018-08-27 Tom Tromey <tom@tromey.com>
2656
2657 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2658 CORE_ADDR_MAX.
2659 * mips-tdep.c (mips_deal_with_atomic_sequence)
2660 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2661 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2662 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2663 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2664 CORE_ADDR_MAX.
2665 * aarch64-tdep.c (aarch64_software_single_step): Use
2666 CORE_ADDR_MAX.
2667
2668 2018-08-27 Tom Tromey <tom@tromey.com>
2669
2670 * linespec.c (complete_linespec_component): Add cast to "char".
2671 * completer.c (completion_tracker::build_completion_result): Add
2672 cast to "char".
2673
2674 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2675
2676 * solist.h (struct solist, struct target_so_ops): Fix
2677 indentation.
2678
2679 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2680
2681 * ada-tasks.c (ada_task_info_s): Remove typedef.
2682 (DEF_VEC_O(ada_task_info_s)): Remove.
2683 (struct ada_tasks_inferior_data): Initialize fields.
2684 <task_list>: Make an std::vector.
2685 (get_ada_tasks_inferior_data): Allocate with new.
2686 (ada_get_task_number): Adjust.
2687 (get_task_number_from_id): Likewise.
2688 (valid_task_id): Likewise.
2689 (ada_get_task_info_from_ptid): Likewise.
2690 (iterate_over_live_ada_tasks): Likewise.
2691 (add_ada_task): Likewise.
2692 (read_known_tasks): Likewise.
2693 (ada_build_task_list): Likewise.
2694 (print_ada_task_info): Likewise.
2695 (info_task): Likewise.
2696 (task_command_1): Likewise.
2697
2698 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2699
2700 * ada-lang.c (add_angle_brackets): Return std::string.
2701
2702 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2703
2704 * python/py-threadevent.c (py_get_event_thread): Initialize
2705 pythread.
2706
2707 2018-08-24 Pedro Alves <palves@redhat.com>
2708
2709 * python/py-bpevent.c (create_breakpoint_event_object): Use
2710 copy-initialization.
2711 * python/py-continueevent.c (emit_continue_event): Use
2712 copy-initialization.
2713 * python/py-exitedevent.c (create_exited_event_object): Return a
2714 gdbpy_ref<>.
2715 (emit_exited_event): Use copy-initialization.
2716 * python/py-inferior.c (python_new_inferior)
2717 (python_inferior_deleted, add_thread_object): Use
2718 copy-initialization.
2719 * python/py-infevents.c (create_inferior_call_event_object)
2720 (create_register_changed_event_object)
2721 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2722 (emit_inferior_call_event, emit_memory_changed_event)
2723 (emit_register_changed_event): Use copy-initialization.
2724 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2725 Return a gdbpy_ref<>.
2726 (emit_new_objfile_event): Use copy-initialization.
2727 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2728 (emit_clear_objfiles_event): Use copy-initialization.
2729 * python/py-signalevent.c (create_signal_event_object): Use
2730 copy-initialization.
2731 * python/py-threadevent.c (create_thread_event_object): Use
2732 copy-initialization.
2733
2734 2018-08-24 Pedro Alves <palves@redhat.com>
2735 Simon Marchi <simon.marchi@ericsson.com>
2736
2737 PR gdb/23379
2738 * python/py-continueevent.c: Include "gdbthread.h".
2739 (create_continue_event_object): Add intro comment. Add 'ptid'
2740 parameter. Use it to find thread to pass to
2741 create_thread_event_object.
2742 (emit_continue_event): Pass PTID down to
2743 create_continue_event_object.
2744 * python/py-event.h (py_get_event_thread): Declare.
2745 (create_thread_event_object): Remove default from 'thread'
2746 parameter.
2747 * python/py-stopevent.c (create_stop_event_object): Use
2748 py_get_event_thread.
2749 * python/py-threadevent.c (get_event_thread): Rename to ...
2750 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2751 and use it to find the thread.
2752 (create_thread_event_object): Assert that THREAD isn't null.
2753 Don't find the event thread here.
2754
2755 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2756
2757 * block.h (blockrange, blockranges): New struct declarations.
2758 (struct block): Add new field named `ranges'.
2759 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2760 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2761 macros for accessing ranges in struct block.
2762 (make_blockranges): New declaration.
2763 block.c (make_blockranges): New function.
2764 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2765 for block.
2766 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2767 * blockframe.c (cache_pc_function_block): New static global.
2768 (clear_pc_function_cache): Clear cache_pc_function_block.
2769 (find_pc_partial_function): Move comment to symtab.h. Add
2770 support for non-contiguous blocks.
2771 * cli/cli-cmds.c (block.h): Include.
2772 (print_disassembly): Handle printing of non-contiguous blocks.
2773 (disassemble_current_function): Likewise.
2774 (disassemble_command): Likewise.
2775
2776 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2777 BLOCK_START.
2778 * blockframe.c (get_pc_function_start): Likewise.
2779 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2780 (gcc_symbol_address): Likewise.
2781 * compile/compile-object-run.c (compile_object_run): Likewise.
2782 * compile/compile.c (get_expr_block_and_pc): Likewise.
2783 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2784 (func_addr_to_tail_call_list): Likewise.
2785 * findvar.c (default_read_var_value): Likewise.
2786 * inline-frame.c (inline_frame_this_id): Likewise.
2787 (skip-inline_frames): Likewise.
2788 * infcmd.c (until_next_command): Likewise.
2789 * linespec.c (convert_linespec_to_sals): Likewise.
2790 * parse.c (parse_exp_in_context_1): Likewise.
2791 * printcmd.c (build_address_symbolic): likewise.
2792 (info_address_command): Likewise.
2793 symtab.c (find_function_start_sal): Likewise.
2794 (skip_prologue_sal): Likewise.
2795 (find_function_alias_target): Likewise.
2796 (find_gnu_ifunc): Likewise.
2797 * stack.c (find_frame_funname): Likewise.
2798 * symtab.c (fixup_symbol_section): Likewise.
2799 (find_function_start_sal): Likewise.
2800 (skip_prologue_sal): Likewsie.
2801 (find_function_alias_target): Likewise.
2802 (find_gnu_ifunc): Likewise.
2803 * tracepoint.c (info_scope_command): Likewise.
2804 * value.c (value_fn_field): Likewise.
2805
2806 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2807 in place of find_pc_partial_function.
2808 * blockframe.c (find_function_entry_range_from_pc): New function.
2809 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2810 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2811 for each range in a block.
2812
2813
2814 2018-08-23 Xavier Roirand <roirand@adacore.com>
2815
2816 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2817 incrementation.
2818
2819 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2820
2821 * solib-svr4.c (read_program_headers_from_bfd): Return
2822 gdb::optional<gdb::byte_vector>.
2823 (svr4_exec_displacement): Adjust.
2824
2825 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2826
2827 * solib-svr4.c (read_program_header): Return
2828 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2829 (find_program_interpreter): Return
2830 gdb::optional<gdb::byte_vector>.
2831 (scan_dyntag_auxv): Adjust.
2832 (enable_break): Adjust.
2833 (svr4_exec_displacement): Adjust.
2834
2835 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2836
2837 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2838 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2839
2840 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2841
2842 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2843 string_vprintf.
2844 * guile/scm-utils.c (gdbscm_printf): Likewise.
2845 * serial.c (serial_printf): Likewise.
2846 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2847
2848 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2849
2850 * stack.c (print_frame): Print frame architecture when printing on
2851 an MI output.
2852 * NEWS: Mention new "arch" attribute in frame output.
2853
2854 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2855
2856 * arch/aarch64.h (aarch64_regnum): Update comment.
2857
2858 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2859
2860 * NEWS: Add SVE to 8.2 section.
2861
2862 2018-08-21 Pedro Alves <palves@redhat.com>
2863
2864 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2865 out from gdbscm_parse_function_args.
2866 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2867 gdbscm_parse_function_args_1.
2868
2869 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2870
2871 PR gdb/17816
2872 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2873 operator.
2874
2875 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2876
2877 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2878
2879 2018-08-19 Michael Spang <spang@google.com>
2880
2881 PR gdb/11786
2882 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2883 for PT_TLS segments.
2884
2885 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2886
2887 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2888 dwarf_variable_value.
2889 * dwarf2-frame.c (class dwarf_expr_executor):
2890 Add override for dwarf_variable_value.
2891 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2892 (class symbol_needs_eval_context): Likewise.
2893 (indirect_synthetic_pointer): Add forward declaration.
2894 (sect_variable_value): New function.
2895 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2896 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2897 for DW_OP_GNU_variable_value.
2898
2899 2018-08-16 Tom Tromey <tom@tromey.com>
2900
2901 * top.c (read_command_file): Update.
2902 (command_line_input): Remove "repeat" argument.
2903 * ada-lang.c (get_selections): Update.
2904 * linespec.c (decode_line_2): Update.
2905 * defs.h (command_line_input): Remove argument.
2906 * cli/cli-script.c (read_next_line): Update.
2907 * python/py-gdb-readline.c: Update.
2908
2909 2018-08-17 Tom Tromey <tom@tromey.com>
2910
2911 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2912 command_line_input.
2913
2914 2018-08-15 Tom Tromey <tom@tromey.com>
2915
2916 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2917
2918 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2919
2920 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2921 If used, use find_pc_partial_function to find address range
2922 to disassemble.
2923 * mi/mi-main.c (mi_cmd_list_features): Report
2924 "data-disassemble-a-option" feature.
2925 * NEWS: Mention new -data-disassemble option -a.
2926
2927 2018-08-13 Tom Tromey <tom@tromey.com>
2928
2929 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2930
2931 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2932
2933 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2934 (aarch64_linux_collect_sve_regset): Likewise.
2935 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2936 * regcache.h (regcache_map_entry_size): New function.
2937
2938 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2939
2940 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2941 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2942 (SVE_HEADER_VL_LENGTH): Likewise.
2943 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2944 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2945 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2946 (SVE_HEADER_SIZE_OFFSET): Likewise.
2947 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2948 (SVE_HEADER_VL_OFFSET): Likewise.
2949 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2950 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2951 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2952 (SVE_HEADER_SIZE): Likewise.
2953 (aarch64_linux_core_read_vq): Add function.
2954 (aarch64_linux_core_read_description): Check for SVE section.
2955
2956 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2957
2958 * aarch64-fbsd-tdep.c
2959 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2960 collect_size.
2961 * aarch64-linux-tdep.c
2962 (aarch64_linux_iterate_over_regset_sections): Likewise.
2963 * alpha-linux-tdep.c
2964 (alpha_linux_iterate_over_regset_sections):
2965 * alpha-nbsd-tdep.c
2966 (alphanbsd_iterate_over_regset_sections): Likewise.
2967 * amd64-fbsd-tdep.c
2968 (amd64fbsd_iterate_over_regset_sections): Likewise.
2969 * amd64-linux-tdep.c
2970 (amd64_linux_iterate_over_regset_sections): Likewise.
2971 * arm-bsd-tdep.c
2972 (armbsd_iterate_over_regset_sections): Likewise.
2973 * arm-fbsd-tdep.c
2974 (arm_fbsd_iterate_over_regset_sections): Likewise.
2975 * arm-linux-tdep.c
2976 (arm_linux_iterate_over_regset_sections): Likewise.
2977 * corelow.c (get_core_registers_cb): Likewise.
2978 (core_target::fetch_registers): Likewise.
2979 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2980 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2981 * gdbarch.h (void): Regenerate.
2982 * gdbarch.sh: Add supply_size and collect_size.
2983 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2984 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2985 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2986 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2987 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2988 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2989 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2990 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2991 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2992 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2993 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2994 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2995 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2996 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2997 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2998 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2999 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3000 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3001 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3002 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3003 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3004 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3005 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3006 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3007 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3008 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3009 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3010 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3011 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3012 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3013
3014 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3015
3016 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3017 with string_printf.
3018
3019 2018-08-10 Keith Seitz <keiths@redhat.com>
3020
3021 * compile/compile-c-support.c (add_code_header, add_code_footer):
3022 Move into policy class.
3023 (c_push_user_expression, pop_user_expression_nop)
3024 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3025 (compile_program): New host class.
3026 (c_compile_program): New typedef.
3027 (c_compute_porgram): Use c_compile_program.
3028
3029 2018-08-10 Keith Seitz <keiths@redhat.com>
3030
3031 * compile/compile-internal.h (compile_instance::~compile_instance):
3032 Remove calls to htab_delete.
3033 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3034 * compile.c (compile_instance::compile_instance): Initialize
3035 htab unique pointers.
3036 (compile_instance::get_cached_type, compile_instance::insert_type)
3037 (compile_instance::error_symbol_once): Update for unique_ptr.
3038
3039 2018-08-10 Keith Seitz <keiths@redhat.com>
3040
3041 * compile/compile-c-symbols.c (struct symbol_error)
3042 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3043 (compile_instance::insert_symbol_error)
3044 (compile_instance::error_symbol_once): Move to ...
3045 * compile/compile.c: ... here.
3046
3047 2018-08-10 Keith Seitz <keiths@redhat.com>
3048
3049 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3050 instead of `new_compile_instance'.
3051 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3052 Update description.
3053 If the symbol error map is not initialized, create it.
3054 (generate_c_for_for_one_symbol): Do not check/initialize
3055 the symbol error map.
3056 * compile/compile-c-types.c (compile_c_instance): Make a class.
3057 Update all callers.
3058 (compile_instance::compile_instance): Initialize the type cache.
3059 (get_cached_type): New function.
3060 (insert_type): Update description.
3061 (compile_c_instance::m_default_cflags): Define.
3062 (convert_type): Update description. Use get_cached_type.
3063 (delete_instance): Moved to destructor.
3064 (new_compile_instance): Moved to constructor.
3065 * compile/compile-c.h (compile_c_instance): Make class inheriting
3066 from compile_instance.
3067 <base>: Remove field.
3068 <type_map, symbol_err_map>: Move to base class.
3069 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3070 * compile/compile-internal.h (compile_instance): Make class.
3071 <type_map_t, symbol_err_map_t>: Define.
3072 <fe>: Rename to `m_gcc_fe'.
3073 <scope, block, gcc_target_options>: Add `m_' prefix.
3074 <m_type_map, m_symbol_err_map>: New fields, moved from
3075 compile_c_instance.
3076 <destroy>: Remove.
3077 (convert_type, new_compile_instance): Remove.
3078 * compile/compile.c (cleanup_compile_instance): Remove.
3079 (compile_to_object): Use unique_ptr to eliminate cleanups.
3080 (compile_instance::set_print_callback, compile_instance::version)
3081 (compile_instance::set_verbose)
3082 (compile_instance::set_driver_filename)
3083 (compile_instance::set_triplet_regexp)
3084 (compile_instance::set_arguments)
3085 (compile_instance::set_source_file)
3086 (compile_instance::compile): Define.
3087
3088 2018-08-10 Keith Seitz <keiths@redhat.com>
3089
3090 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3091 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3092 gcc-c-fe.def to define C plugin.
3093 (delete_instance): Delete `c_plugin'.
3094 (new_compile_instance): Initialize `c_plugin'.
3095 * compile/compile-c.h: Include gcc_c_plugin.h.
3096 (struct compile_c_instance) <c_plugin>: New member.
3097 * gcc-c-plugin.h: New file.
3098 Update all callers with API change.
3099
3100 2018-08-10 Keith Seitz <keiths@redhat.com>
3101
3102 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3103 (HFILES_NO_SRCDIR): ... to here.
3104 Add compile-internal.h and compile-c.h.
3105 * compile/compile-c-support.c: Include compile-c.h.
3106 * compile/compile-c-symbols.c: Include compile-c.h.
3107 (generate_c_for_variable_locations): Update comment.
3108 * compile/compile-c-types.c: Include compile-c.h.
3109 * compile/compile-c.h: New file -- moved C language declarations
3110 from other files here.
3111 * compile/compile-internal.h: Do not include hashtab.h or
3112 common/enum-flags.h.
3113 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3114 (gcc_convert_symbol, gcc_symbol_address)
3115 (generate_c_for_variable_locations, c_get_mode_for_size)
3116 (c_get_range_decl_name): Definitions moved to compile-c.h.
3117 * compile/compile-loc2c.c: Include compile-c.h.
3118
3119 2018-08-10 Keith Seitz <keiths@redhat.com>
3120
3121 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3122 (c_symbol_substitution_name): ... this.
3123 Update all callers.
3124
3125 2018-08-10 Keith Seitz <keiths@redhat.com>
3126
3127 * compile/compile-c-support.c (c_compute_program): Use
3128 unique_xmalloc_ptr to eliminate cleanup.
3129 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3130 Return a unique_xmalloc_ptr and eliminate cleanup.
3131 * compile/compile-internal.h (generate_c_for_variable_locations):
3132 Return unique_xmalloc_ptr and update description.
3133
3134 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3135
3136 * corelow.c (core_target::get_core_register_section): Rename
3137 min_size to section_min_size.
3138
3139 2018-08-09 Jim Wilson <jimw@sifive.com>
3140
3141 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3142 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3143 * NEWS: Mention new GNU/Linux RISC-V target.
3144 * configure.host: Add riscv*-*-linux*.
3145 * configure.nat: Add riscv*.
3146 * configure.tgt: Add riscv*-*-linux*.
3147 * riscv-linux-nat.c: New file.
3148 * riscv-linux-tdep.c: New file.
3149
3150 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3151
3152 * infrun.c (resume): Make static, add forward declaration.
3153 (proceed): Update header comment.
3154 * infrun.h (resume): Delete declaration.
3155
3156 2018-08-09 Tom Tromey <tom@tromey.com>
3157
3158 * riscv-tdep.h: Minor formatting fixes.
3159
3160 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3161
3162 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3163 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3164 (test_mkdir_recursive): Likewise.
3165 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3166
3167 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3168
3169 * valarith.c (value_subscripted_rvalue): If an array is not in
3170 memory, and we don't know the upper bound, then we can't know that
3171 the requested element exists or not.
3172
3173 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3174
3175 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3176 (target_options_to_string): Add comment.
3177
3178 2018-08-08 Tom Tromey <tom@tromey.com>
3179
3180 * unittests/scoped_mmap-selftests.c: Check result of "write".
3181
3182 2018-08-08 Jim Wilson <jimw@sifive.com>
3183
3184 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3185 (decode_register_index_short): New.
3186 (decode_j_type_insn, decode_cj_type_insn): New.
3187 (decode_b_type_insn, decode_cb_type_insn): New.
3188 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3189 local xlen. Check xlen when decoding ambiguous compressed insns. In
3190 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3191 is_c_sw_insn instead of is_sw_insn.
3192 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3193 (riscv_software_single_step): New.
3194 * riscv-tdep.h (riscv_software_single_step): Declare.
3195
3196 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3197 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3198
3199 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3200
3201 PR gdb/18050:
3202 * target.c (dispose_inferior): Don't dispose of inferiors that are
3203 already killed.
3204
3205 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3206
3207 * remote.c (remote_target::download_tracepoint): Change char* to
3208 const char*.
3209
3210 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3211
3212 * target.h (target_options_to_string): Return an std::string.
3213 * target.c (str_comma_list_concat_elem): Return void, use
3214 std::string.
3215 (do_option): Likewise.
3216 (target_options_to_string): Return an std::string.
3217 * linux-nat.c (linux_nat_target::wait): Adjust.
3218 * target-debug.h (target_debug_print_options): Adjust.
3219
3220 2018-08-07 Tom Tromey <tom@tromey.com>
3221
3222 * Makefile.in (CPPFLAGS): New variable.
3223 (INTERNAL_CPPFLAGS): Use it.
3224
3225 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3226
3227 * NEWS: Mention the index cache.
3228
3229 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3230
3231 * common/pathstuff.h (get_standard_cache_dir): New.
3232 * common/pathstuff.c (get_standard_cache_dir): New.
3233 * build-id.h (build_id_to_string): New.
3234 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3235 DEBUG_STR_SUFFIX): Move to here.
3236 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3237 DEBUG_STR_SUFFIX): Move from there.
3238 (write_psymtabs_to_index): Make non-static, add basename
3239 parameter. Write to temporary files, rename when done.
3240 (save_gdb_index_command): Adjust call to
3241 write_psymtabs_to_index.
3242 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3243 field.
3244 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3245 (get_gdb_index_contents_from_cache): New.
3246 (get_gdb_index_contents_from_cache_dwz): New.
3247 (dwarf2_initialize_objfile): Read index from cache.
3248 (dwarf2_build_psymtabs): Save to index.
3249 * dwarf-index-cache.h: New file.
3250 * dwarf-index-cache.c: New file.
3251 * dwarf-index-write.h: New file.
3252
3253 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3254
3255 * gnulib/aclocal.m4: Re-generate.
3256 * gnulib/config.in: Re-generate.
3257 * gnulib/configure: Re-generate.
3258 * gnulib/import/Makefile.am: Re-generate.
3259 * gnulib/import/Makefile.in: Re-generate.
3260 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3261 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3262 * gnulib/import/m4/mkdir.m4: New file.
3263 * gnulib/import/mkdir.c: New file.
3264 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3265 module.
3266
3267 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3270 * common/scoped_mmap.c: New file.
3271 * common/scoped_mmap.h (destroy): New method.
3272 (~scoped_mmap, reset): Use destroy.
3273 (scoped_mmap): New move constructor.
3274 (mmap_file): New declaration.
3275 * unittests/scoped_mmap-selftests.c (test_normal,
3276 test_invalid_filename, run_tests): New functions.
3277 (_initialize_scoped_mmap_selftests): Register selftest.
3278
3279 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3280
3281 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3282 (read_gdb_index_from_buffer): ... this. Remove section
3283 parameter, add buffer parameter.
3284 (get_gdb_index_contents_ftype,
3285 get_gdb_index_contents_dwz_ftype): New typedefs.
3286 (dwarf2_read_gdb_index): Add callback parameters to get the
3287 index contents.
3288 (get_gdb_index_contents_from_section): New.
3289 (dwarf2_initialize_objfile): Update call to
3290 dwarf2_read_gdb_index.
3291
3292 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3293
3294 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3295 (gdb_open_cloexec): Likewise.
3296 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3297 (commandline_from_pid): Likewise.
3298 (linux_xfer_osdata_threads): Likewise.
3299 (linux_xfer_osdata_fds): Likewise.
3300 * ada-lang.c (is_package_name): Likewise.
3301 * auxv.c (procfs_xfer_auxv): Likewise.
3302 * breakpoint.c (print_one_breakpoint_location): Use
3303 uiout::field_fmt.
3304 (print_one_catch_solib): Use string_printf.
3305 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3306 (add_pe_forwarded_sym): Likewise.
3307 * dwarf2read.c (create_type_unit_group): Likewise.
3308 (build_error_marker_type): Likewise.
3309 * infcall.c (get_function_name): Likewise.
3310 * valprint.c (print_converted_chars_to_obstack): Likewise.
3311 * xtensa-tdep.c (xtensa_register_type): Likewise.
3312
3313 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3314
3315 * remote.c (remote_target::download_tracepoint): Fix format
3316 string errors.
3317
3318 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3319
3320 * tracefile.c: Include common/byte-vector.h.
3321 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3322 with trace_regblock_size if needed. Update uses of buf.
3323
3324 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3325
3326 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3327 std::vector<unsigned char>.
3328 * tracepoint.c (collection_list::collection_list): Remove
3329 m_regs_mask initializer from initializer list. Resize
3330 m_regs_mask using the largest remote register number.
3331 (collection_list::add_remote_register): Remove size check on
3332 m_regs_mask. Use at to access element.
3333 (collection_list::stringify): Change type of temp_buf to
3334 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3335 stringify the register mask. Use pack_hex_byte for the register
3336 mask.
3337
3338 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3339
3340 * tracepoint.h (class collection_list) <add_register>: Remove.
3341 <add_remote_register, add_ax_registers, add_local_register>:
3342 Declare.
3343 <add_memrange>: Add scope parameter.
3344 * tracepoint.c (encode_actions_1): Likewise.
3345 (collection_list::add_register): Rename to ...
3346 (collection_list::add_remote_register): ... this. Update
3347 comment.
3348 (collection_list::add_ax_registers, add_local_register): New
3349 methods.
3350 (collection_list::add_memrange): Add scope parameter. Call
3351 add_local_register instead of add_register.
3352 (finalize_tracepoint_aexpr): New function.
3353 (collection_list::collect_symbol): Update calls to add_memrange.
3354 Call add_local_register instead of add_register. Call
3355 add_ax_registers. Call finalize_tracepoint_aexpr.
3356 (encode_actions_1): Get remote regnos for $reg action. Call
3357 add_remote_register, add_ax_registers, and add_local_register.
3358 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3359 (validate_actionline): Call finalize_tracepoint_aexpr.
3360
3361 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3362
3363 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3364 Replace array buf with gdb::char_vector buf, of size
3365 get_remote_packet_size (). Replace references to buf and
3366 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3367 and xsnprintf with snprintf. Raise errors if the buffer is too
3368 small.
3369
3370 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3371
3372 * remote.c (remote_target::download_tracepoint): Fix the has_more
3373 predicate in the QTDP action list iteration.
3374
3375 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3376
3377 * remote.c (remote_target::download_tracepoint): Fix indentation
3378 in for block.
3379
3380 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3381
3382 * proc-api.c (_initialize_proc_api): Remove c, unused.
3383 * procfs.c (procfs_init_inferior): Remove signals, unused.
3384 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3385 unused.
3386
3387 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3388 Andrew Burgess <andrew.burgess@embecosm.com>
3389
3390 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3391 'W_STOPCODE (0)' as this could be ambiguous.
3392
3393 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3394
3395 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3396 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3397 "ai_socktype").
3398
3399 2018-08-02 Tom Tromey <tom@tromey.com>
3400
3401 PR symtab/16842.
3402 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3403 symbols.
3404 (process_structure_scope): Likewise.
3405
3406 2018-08-02 Xavier Roirand <roirand@adacore.com>
3407
3408 PR gdb/22629:
3409 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3410 kill inferior.
3411
3412 2018-08-02 Tom Tromey <tom@tromey.com>
3413
3414 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3415 (darwin_suspend_inferior, darwin_resume_inferior)
3416 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3417 (darwin_check_new_threads): Check result of get_darwin_inferior.
3418
3419 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3420
3421 GDB 8.1.1 released.
3422
3423 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3424
3425 * varobj.c (varobj_get_path_expr_parent): Report an error if
3426 parent is a dynamic varobj.
3427
3428 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3429
3430 * gnulib/aclocal.m4: Re-generate.
3431 * gnulib/config.in: Re-generate.
3432 * gnulib/configure: Re-generate.
3433 * gnulib/import/Makefile.in: Re-generate.
3434 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3435 * gnulib/import/m4/onceonly.m4: Re-generate.
3436
3437 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3438
3439 * target-descriptions.c (struct xml_test_tdesc): New.
3440 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3441 (record_xml_tdesc): Update.
3442 (maintenance_check_xml_descriptions): Update.
3443 * target-descriptions.h (record_xml_tdesc): Update comment.
3444
3445 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3446
3447 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3448 checking array bounds are defined.
3449
3450 2018-07-30 Tom Tromey <tom@tromey.com>
3451
3452 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3453 irreflexivity violation.
3454
3455 2018-07-30 Tom Tromey <tom@tromey.com>
3456
3457 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3458 * value.c (unpack_long): Remove lint code.
3459 * valops.c (value_ind): Remove lint code.
3460 * valarith.c (value_x_binop, value_x_unop, value_equal)
3461 (value_pos): Remove lint code.
3462
3463 2018-07-28 Tom de Vries <tdevries@suse.de>
3464
3465 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3466 with undefined upper bound as <optimized out>.
3467
3468 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3469
3470 * gcore.in: Rename variable "name" to "prefix". Expand
3471 "usage" text.
3472
3473 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3474
3475 * windows-nat.c (windows_nat_target::create_inferior): Update to
3476 call close() in global namespace.
3477
3478 2018-07-26 Tom Tromey <tom@tromey.com>
3479
3480 * dwarf-index-write.c (add_address_entry): Don't add objfile
3481 offsets.
3482 * dbxread.c (find_stab_function): Rename from
3483 find_stab_function_addr. Return a bound_minimal_symbol.
3484 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3485 Don't add objfile offsets.
3486 (end_psymtab): Use raw_text_low, raw_text_high,
3487 MSYMBOL_VALUE_RAW_ADDRESS.
3488 (read_ofile_symtab): Update.
3489 (process_one_symbol): Update.
3490 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3491 offsets.
3492 (dw2_relocate): Remove.
3493 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3494 searching addrmap.
3495 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3496 Update.
3497 (process_psymtab_comp_unit_reader, add_partial_symbol)
3498 (add_partial_subprogram, dwarf2_ranges_read): Update.
3499 (load_partial_dies): Update.
3500 (add_address_entry): Don't add objfile offsets.
3501 (dwarf2_build_include_psymtabs): Update.
3502 (create_addrmap_from_aranges): Don't add objfile offsets.
3503 (dw2_find_pc_sect_compunit_symtab): Update.
3504 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3505 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3506 Update.
3507 (parse_partial_symbols): Don't add objfile offsets. Use
3508 raw_text_low, raw_text_high. Update.
3509 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3510 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3511 or call 'relocate' quick function. Clear psymbol_map.
3512 * psympriv.h (struct partial_symbol) <address>: Add section
3513 offset.
3514 <set_unrelocated_address>: Rename from set_address.
3515 <raw_text_low, raw_text_high>: New methods.
3516 <text_low, text_high>: Add objfile parameter.
3517 (add_psymbol_to_bcache): Add 'section' parameter. Call
3518 set_unrelocated_address.
3519 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3520 (find_pc_psymbol): Update.
3521 (fixup_psymbol_section, relocate_psymtabs): Remove.
3522 (dump_psymtab, psym_functions): Update.
3523 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3524 parameter.
3525 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3526 (start_psymtab_common): Update.
3527 * symfile-debug.c (debug_qf_relocate): Remove.
3528 (debug_sym_quick_functions): Update.
3529 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3530 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3531 Update.
3532
3533 2018-07-26 Tom Tromey <tromey@redhat.com>
3534
3535 * dbxread.c (end_psymtab): Use text_high_valid and
3536 text_low_valid.
3537 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3538 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3539 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3540 Update comment.
3541 <text_low_valid, text_high_valid>: New fields.
3542 <set_text_low, set_text_high>: Update.
3543 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3544
3545 2018-07-26 Tom Tromey <tom@tromey.com>
3546
3547 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3548 Update.
3549 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3550 textlow and texthigh fields.
3551 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3552 Update.
3553 * mdebugread.c (parse_lines, parse_partial_symbols)
3554 (psymtab_to_symtab_1): Update.
3555 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3556 Rename fields. Update comment. Now private.
3557 <text_low, text_high, set_text_low, set_text_high>: New methods.
3558 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3559 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3560 (start_psymtab_common, maintenance_info_psymtabs)
3561 (maintenance_check_psymtabs): Update.
3562 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3563 texthigh fields.
3564 (scan_xcoff_symtab): Update.
3565
3566 2018-07-26 Tom Tromey <tromey@redhat.com>
3567
3568 * psympriv.h (struct partial_symbol) <unrelocated_address,
3569 address, set_address>: New methods.
3570 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3571 (fixup_psymbol_section, relocate_psymtabs): Update.
3572 (print_partial_symbols): Add 'objfile' parameter. Update.
3573 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3574 Update.
3575
3576 2018-07-26 Tom Tromey <tom@tromey.com>
3577
3578 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3579 (debug_names::write_psymbols): Update.
3580 * psympriv.h (struct partial_symbol): Derive from
3581 general_symbol_info.
3582 <obj_section>: New method.
3583 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3584 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3585 (find_pc_sect_psymbol, fixup_psymbol_section)
3586 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3587 (print_partial_symbols, recursively_search_psymtabs)
3588 (compare_psymbols, psymbol_hash, psymbol_compare)
3589 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3590 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3591
3592 2018-07-26 Tom Tromey <tromey@redhat.com>
3593
3594 * dbxread.c (end_psymtab): Remove dead code.
3595
3596 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3597
3598 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3599 DWARF unwinders are disabled.
3600 * dwarf2-frame.c: Add dwarf2read.h include.
3601 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3602 disabled.
3603 (dwarf2_frame_unwinders_enabled_p): Define.
3604 (show_dwarf_unwinders_enabled_p): New function.
3605 (_initialize_dwarf2_frame): Register switch to control DWARF
3606 unwinder use.
3607 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3608 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3609 (show_dwarf_cmdlist): Remove static keyword.
3610 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3611 (show_dwarf_cmdlist): Declare.
3612 * NEWS: Document new feature.
3613
3614 2018-07-26 Tom de Vries <tdevries@suse.de>
3615
3616 PR breakpoints/23366
3617 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3618
3619 2018-07-26 Tom de Vries <tdevries@suse.de>
3620
3621 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3622 DW_AT_count can't be translated to a dynamic prop.
3623
3624 2018-07-25 Tom de Vries <tdevries@suse.de>
3625
3626 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3627 try/catch.
3628
3629 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3630
3631 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3632
3633 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3634
3635 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3636
3637 2018-07-24 Keith Seitz <keiths@redhat.comt
3638
3639 PR symtab/23010
3640 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3641 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3642 instead of add_symbol_to_list.
3643 (read_file_scope): Call prepare_one_comp_unit before reading
3644 any other DIEs.
3645
3646 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3647
3648 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3649
3650 2018-07-24 Tom Tromey <tom@tromey.com>
3651
3652 * utils.c (malloc, realloc, free): Don't declare.
3653 * configure, config.in: Rebuild.
3654 * configure.ac: Don't check for declarations of free, malloc, or
3655 realloc.
3656
3657 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3658
3659 * aarch64-linux-nat.c
3660 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3661 variable.
3662 * arm-linux-nat.c (fetch_regs): Likewise.
3663 (store_regs): Likewise.
3664 (fetch_vfp_regs): Likewise.
3665 (store_vfp_regs): Likewise.
3666 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3667 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3668 (arm_linux_nat_target::insert_watchpoint): Likewise.
3669 (arm_linux_nat_target::remove_watchpoint): Likewise.
3670 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3671 Likewise.
3672 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3673 Likewise.
3674 * ppc-linux-nat.c (fetch_register): Likewise.
3675 (fetch_all_gp_regs): Likewise.
3676 (fetch_ppc_registers): Likewise.
3677 (store_all_gp_regs): Likewise.
3678 (store_ppc_registers): Likewise.
3679 (hwdebug_insert_point): Likewise.
3680 (can_use_watchpoint_cond_accel): Likewise.
3681 * remote-sim.c (gdb_os_write_stdout): Likewise.
3682
3683 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3684 Tom Tromey <tom@tromey.com>
3685
3686 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3687 test for it.
3688 * configure: Rebuild.
3689
3690 2018-07-22 Tom Tromey <tom@tromey.com>
3691
3692 * regformats/regdat.sh: Define xmltarget_${name} inside
3693 #ifndef IN_PROCESS_AGENT.
3694
3695 2018-07-22 Tom Tromey <tom@tromey.com>
3696
3697 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3698
3699 2018-07-22 Tom Tromey <tom@tromey.com>
3700
3701 * symfile.c (reread_symbols): Notify iter, not objfile.
3702
3703 2018-07-22 Tom Tromey <tom@tromey.com>
3704
3705 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3706 Use arch_ops.
3707 (ravenscar_thread_target::prepare_to_store): Likewise.
3708
3709 2018-07-22 Tom Tromey <tom@tromey.com>
3710
3711 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3712 unused variable. Call value_fetch_lazy when needed.
3713 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3714 Remove unused variable. Call value_fetch_lazy when needed.
3715
3716 2018-07-22 Tom Tromey <tom@tromey.com>
3717
3718 * m32c-tdep.c (mark_dma): Return void.
3719 (make_regs): Remove unused declarations.
3720
3721 2018-07-22 Tom Tromey <tom@tromey.com>
3722
3723 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3724 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3725 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3726 bkscm_get_valid_block_smob_arg_unsafe for effect.
3727
3728 2018-07-22 Tom Tromey <tom@tromey.com>
3729
3730 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3731 value_type.
3732
3733 2018-07-22 Tom Tromey <tom@tromey.com>
3734
3735 * windows-nat.c (saved_context): Conditionally define.
3736 * remote.c (remote_target::remote_btrace_maybe_reopen):
3737 Conditionally declare "warned".
3738 * inflow.c (sigquit_ours): Conditionally define.
3739 (new_tty): Move "tty" declaration inside #if.
3740 * guile/guile.c (guile_datadir): Conditionally define.
3741 * charset.c (set_be_le_names): Move some declarations inside #if.
3742 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3743 #if.
3744 (parse_xml_btrace_conf): Likewise.
3745
3746 2018-07-22 Tom Tromey <tom@tromey.com>
3747
3748 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3749
3750 2018-07-22 Tom Tromey <tom@tromey.com>
3751
3752 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3753 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3754 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3755 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3756 * stack.c (frame_apply_level_command): Remove unused variable.
3757 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3758 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3759 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3760 unused variable.
3761 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3762 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3763 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3764 variable.
3765 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3766 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3767 variable.
3768 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3769 Remove unused variable.
3770 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3771 variable.
3772 * common/tdesc.c (print_xml_feature::visit): Remove unused
3773 variable.
3774 * compile/compile-object-load.c (store_regs): Remove unused
3775 variables.
3776 * complaints.c (clear_complaints): Remove unused variable.
3777 * corelow.c (core_target_open): Remove unused variable.
3778 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3779 variable.
3780 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3781 variable.
3782 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3783 variable.
3784 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3785 variable.
3786 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3787 variable.
3788 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3789 variable.
3790 * ia64-tdep.c (examine_prologue): Remove unused variable.
3791 * infcall.c (run_inferior_call): Remove unused variable.
3792 * inferior.c (exit_inferior): Remove unused variable.
3793 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3794 * linespec.c (decode_line_2): Remove unused variable.
3795 * linux-nat.c (super_close): Remove.
3796 * linux-tdep.c (linux_info_proc): Remove unused variable.
3797 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3798 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3799 Remove unused variable.
3800 * parse.c (find_minsym_type_and_address): Remove unused variable.
3801 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3802 variable.
3803 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3804 variable.
3805 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3806 variables.
3807 * record-btrace.c (record_btrace_target::store_registers): Remove
3808 unused variable.
3809 (cmd_show_record_btrace_cpu): Remove unused variable.
3810 * riscv-tdep.c (riscv_register_reggroup_p)
3811 (riscv_push_dummy_call, riscv_return_value): Remove unused
3812 variable.
3813 * rust-exp.y (literal): Remove unused variable.
3814 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3815 unused variable.
3816 <STRUCTOP_ANONYMOUS>: Likewise.
3817 * s390-linux-tdep.c (s390_linux_init_abi_31)
3818 (s390_linux_init_abi_64): Remove unused variable.
3819 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3820 (file_select_thread, net_windows_open, _initialize_ser_windows):
3821 Remove unused variables.
3822 * symtab.c (find_pc_sect_line): Remove unused variable.
3823 * target-memory.c (compute_garbled_blocks): Remove unused
3824 variable.
3825 (target_write_memory_blocks): Remove unused variable.
3826 * target.c (target_stack::unpush): Remove unused variables.
3827 * tracepoint.c (start_tracing, all_tracepoint_actions)
3828 (merge_uploaded_trace_state_variables)
3829 (print_one_static_tracepoint_marker): Remove unused variable.
3830 * unittests/basic_string_view/element_access/char/1.cc (test01):
3831 Remove unused variable.
3832 * windows-nat.c (windows_continue, windows_add_all_dlls)
3833 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3834 Remove unused variables.
3835
3836 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3837
3838 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3839 attr_profile in HAVE_ELF.
3840 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3841 HAVE_ELF.
3842
3843 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3844
3845 * frame.c (frame_register_unwind): Change parameter name.
3846 (frame_unwind_register): Likewise.
3847 (frame_unwind_register_value): Likewise.
3848 (frame_unwind_register_signed): Likewise.
3849 (frame_unwind_register_unsigned): Likewise.
3850 * frame.h (frame_register_unwind): Likewise.
3851 (frame_unwind_register): Likewise.
3852 (frame_unwind_register_value): Likewise.
3853 (frame_unwind_register_signed): Likewise.
3854 (frame_unwind_register_unsigned): Likewise.
3855 (frame_unwind_arch): Likewise.
3856
3857 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3858
3859 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3860 ISA maintenance.
3861
3862 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3863
3864 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3865 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3866 hand.
3867
3868 2018-07-20 Keith Seitz <keiths@redhat.com>
3869
3870 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3871 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3872 m_compunit_symtab, m_language>: Add "m_" prefix.
3873 Update all uses.
3874 * buildsym.c: Update all uses.
3875
3876 2018-07-20 Tom Tromey <tom@tromey.com>
3877
3878 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3879 * buildsym.h (record_line_ftype): Remove typedef.
3880
3881 2018-07-20 Tom Tromey <tom@tromey.com>
3882
3883 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3884 (end_expandable_symtab): Likewise.
3885 (end_symtab_get_static_block): Likewise.
3886 (end_symtab_from_static_block): Likewise.
3887 * buildsym-legacy.c (augment_type_symtab): Remove.
3888 (end_expandable_symtab): Remove.
3889 (end_symtab_get_static_block): Remove.
3890 (end_symtab_from_static_block): Remove.
3891
3892 2018-07-20 Tom Tromey <tom@tromey.com>
3893
3894 * dwarf2read.c: Include buildsym.h.
3895 (struct dwarf2_cu) <builder>: New method.
3896 (fixup_go_packaging): Update.
3897 (process_full_comp_unit, process_full_type_unit): Update. Don't
3898 use scoped_free_pendings.
3899 (using_directives): Add "cu" parameter, remove "language".
3900 (read_import_statement, setup_type_unit_groups, )
3901 (read_func_scope, read_lexical_block_scope)
3902 (dwarf2_record_block_ranges, read_namespace): Update.
3903 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3904 (lnp_state_machine::handle_end_sequence): Update.
3905 (class lnp_state_machine) <m_cu>: New member.
3906 <m_record_line_callback>: Remove.
3907 <m_currently_recording_lines>: New member.
3908 (lnp_state_machine::handle_set_file): Update.
3909 (noop_record_line): Remove.
3910 (dwarf_record_line_p): Add cu parameter.
3911 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3912 (lnp_state_machine::record_line)
3913 (lnp_state_machine::lnp_state_machine)
3914 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3915 (dwarf_decode_lines): Update.
3916 (dwarf2_start_subfile): Add cu parameter.
3917 (dwarf2_start_symtab, new_symbol): Update.
3918 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3919 Remove dwarf2_per_objfile parameter.
3920 (dwarf_decode_macros): Update.
3921
3922 2018-07-20 Tom Tromey <tom@tromey.com>
3923
3924 * stabsread.c (define_symbol): Update.
3925 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3926 * dwarf2read.c (new_symbol): Update.
3927 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3928 * cp-namespace.c: Include buildsym.h.
3929 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3930 * buildsym-legacy.c (get_buildsym_compunit): New function.
3931
3932 2018-07-20 Tom Tromey <tom@tromey.com>
3933
3934 * xcoffread.c: Include buildsym-legacy.h.
3935 * windows-nat.c: Include buildsym-legacy.h.
3936 * stabsread.c: Include buildsym-legacy.h.
3937 * mdebugread.c: Include buildsym-legacy.h.
3938 * buildsym-legacy.h: New file.
3939 * buildsym-legacy.c: New file, from buildsym.c.
3940 * go32-nat.c: Include buildsym-legacy.h.
3941 * dwarf2read.c: Include buildsym-legacy.h.
3942 * dbxread.c: Include buildsym-legacy.h.
3943 * cp-namespace.c: Include buildsym-legacy.h.
3944 * coffread.c: Include buildsym-legacy.h.
3945 * buildsym.h: Move some contents to buildsym-legacy.h.
3946 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3947 buildsym-legacy.c.
3948 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3949
3950 2018-07-20 Tom Tromey <tom@tromey.com>
3951
3952 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3953 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3954 (buildsym_compunit::buildsym_compunit)
3955 (buildsym_compunit::~buildsym_compunit)
3956 (buildsym_compunit::get_macro_table): Define.
3957
3958 2018-07-20 Tom Tromey <tom@tromey.com>
3959
3960 * buildsym.c (reset_symtab_globals): Remove.
3961 (buildsym_compunit::end_symtab_from_static_block): Update.
3962 (buildsym_compunit::augment_type_symtab): Update.
3963 (end_symtab_from_static_block): Call free_buildsym_compunit.
3964 (augment_type_symtab, end_symtab, end_expandable_symtab):
3965 Likewise.
3966
3967 2018-07-20 Tom Tromey <tom@tromey.com>
3968
3969 * arch-utils.c: Do not include buildsym.h.
3970 * mipsread.c: Do not include buildsym.h.
3971 * machoread.c: Do not include buildsym.h.
3972 * elfread.c: Do not include buildsym.h.
3973
3974 2018-07-20 Tom Tromey <tom@tromey.com>
3975
3976 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3977 initialization.
3978 (buildsym_compunit): Add new constructor.
3979 (struct buildsym_compunit) <get_last_source_file, finish_block,
3980 record_block_range, start_subfile, patch_subfile_names,
3981 push_subfile, pop_subfile, record_line, get_compunit_symtab,
3982 set_last_source_start_addr, get_last_source_start_addr,
3983 get_local_using_directives, set_local_using_directives,
3984 get_global_using_directives, outermost_context_p,
3985 get_current_context_stack, get_context_stack_depth,
3986 get_current_subfile, get_local_symbols, get_file_symbols,
3987 get_global_symbols, record_debugformat, record_producer,
3988 push_context, pop_context, end_symtab_get_static_block,
3989 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3990 New public methods.
3991 <record_pending_block, finish_block_internal, make_blockvector,
3992 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3993 private methods.
3994 Update all users.
3995
3996 2018-05-22 Tom Tromey <tom@tromey.com>
3997
3998 * buildsym.c (record_pending_block): Move earlier. Remove objfile
3999 parameter.
4000 (finish_block_internal): Update.
4001
4002 2018-07-20 Tom Tromey <tom@tromey.com>
4003
4004 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4005 parameter.
4006 (finish_block_internal): Update.
4007
4008 2018-07-20 Tom Tromey <tom@tromey.com>
4009
4010 * buildsym.h (EXTERN): Don't define or undef.
4011 * buildsym.c (EXTERN): Don't define.
4012
4013 2018-07-20 Tom Tromey <tom@tromey.com>
4014
4015 * buildsym.c: Remove TODO comment.
4016
4017 2018-07-20 Tom Tromey <tom@tromey.com>
4018
4019 * coffread.c (coff_symtab_read): Update.
4020 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4021 (xcoff_new_init): Update.
4022 * mipsread.c (mipscoff_new_init): Update.
4023 * mdebugread.c (mdebug_build_psymtabs): Update.
4024 * elfread.c (elf_new_init): Update.
4025 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4026 Update.
4027 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4028 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4029 (stabsect_build_psymtabs): Update.
4030 * buildsym.h (buildsym_init): Don't declare.
4031 * buildsym.c: Update comment.
4032 (prepare_for_building): Remove.
4033 (start_symtab, restart_symtab): Update.
4034 (reset_symtab_globals): Update comment.
4035 (buildsym_init): Remove.
4036
4037 2018-07-20 Tom Tromey <tom@tromey.com>
4038
4039 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4040 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4041 (read_enum_type, common_block_start, common_block_end)
4042 (cleanup_undefined_types_1, finish_global_stabs): Update.
4043 * mdebugread.c (psymtab_to_symtab_1): Update.
4044 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4045 (read_lexical_block_scope, new_symbol): Update.
4046 * dbxread.c (process_one_symbol): Update.
4047 * coffread.c (coff_symtab_read, process_coff_symbol)
4048 (coff_read_enum_type): Update.
4049 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4050 declare.
4051 (get_local_symbols, get_file_symbols, get_global_symbols): New
4052 functions.
4053 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4054 m_global_symbols.
4055 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4056 (~scoped_free_pendings): Update.
4057 (finish_block, prepare_for_building, reset_symtab_globals)
4058 (end_symtab_get_static_block, end_symtab_with_blockvector)
4059 (augment_type_symtab, push_context): Update.
4060 (get_local_symbols, get_file_symbols, get_global_symbols): New
4061 functions.
4062 (buildsym_init): Update.
4063
4064 2018-07-20 Tom Tromey <tom@tromey.com>
4065
4066 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4067 (process_full_type_unit): Likewise.
4068 (dwarf2_start_symtab): Set list_in_scope.
4069
4070 2018-07-20 Tom Tromey <tom@tromey.com>
4071
4072 * dwarf2read.c (process_psymtab_comp_unit_reader)
4073 (build_type_psymtabs_reader): Do not set list_in_scope.
4074
4075 2018-07-20 Tom Tromey <tom@tromey.com>
4076
4077 * buildsym.c (free_pendings): Remove.
4078 (add_symbol_to_list, scoped_free_pendings)
4079 (finish_block_internal, buildsym_init): Update.
4080
4081 2018-07-20 Tom Tromey <tom@tromey.com>
4082
4083 * xcoffread.c (read_xcoff_symtab): Update.
4084 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4085 Update.
4086 * dbxread.c (process_one_symbol): Update.
4087 * coffread.c (coff_symtab_read): Update.
4088 * buildsym.h (finish_block): Update.
4089 * buildsym.c (finish_block): Remove "listhead" argument.
4090 (end_symtab_get_static_block): Update.
4091
4092 2018-07-20 Tom Tromey <tom@tromey.com>
4093
4094 * buildsym.h (class scoped_free_pendings): Remove constructor.
4095 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4096 method.
4097 <m_pending_block_obstack, m_pending_blocks>: New members.
4098 (pending_block_obstack, pending_blocks): Remove.
4099 (scoped_free_pendings::scoped_free_pendings): Default.
4100 (~scoped_free_pendings): Update.
4101 (free_pending_blocks): Remove.
4102 (finish_block_internal, record_pending_block, make_blockvector)
4103 (end_symtab_get_static_block, augment_type_symtab, push_context)
4104 (buildsym_init): Update.
4105
4106 2018-07-20 Tom Tromey <tom@tromey.com>
4107
4108 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4109 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4110 members.
4111 (pending_addrmap, pending_addrmap_obstack)
4112 (pending_addrmap_interesting): Remove.
4113 (scoped_free_pendings, record_block_range, make_blockvector)
4114 (prepare_for_building, reset_symtab_globals, buildsym_init):
4115 Update.
4116
4117 2018-07-20 Tom Tromey <tom@tromey.com>
4118
4119 * xcoffread.c (process_linenos): Update.
4120 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4121 * mdebugread.c (psymtab_to_symtab_1): Update.
4122 * dwarf2read.c (setup_type_unit_groups)
4123 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4124 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4125 * dbxread.c (process_one_symbol): Update.
4126 * coffread.c (coff_symtab_read, enter_linenos)
4127 (process_coff_symbol): Update.
4128 * buildsym.h (current_subfile): Don't declare.
4129 (get_current_subfile): Declare.
4130 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4131 member.
4132 (start_subfile, free_buildsym_compunit, push_subfile)
4133 (prepare_for_building, start_symtab): Update.
4134 (get_current_subfile): New function.
4135
4136 2018-07-20 Tom Tromey <tom@tromey.com>
4137
4138 * coffread.c (coff_symtab_read): Update.
4139 * xcoffread.c (read_xcoff_symtab): Update.
4140 * dwarf2read.c (new_symbol): Update.
4141 (read_func_scope, read_lexical_block_scope): Update.
4142 * dbxread.c (process_one_symbol): Update.
4143 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4144 (outermost_context_p): Remove macro.
4145 (outermost_context_p, get_current_context_stack)
4146 (get_context_stack_depth): Declare.
4147 (pop_context): Return struct context_stack.
4148 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4149 member.
4150 (context_stack_size): Remove.
4151 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4152 (prepare_for_building, end_symtab_get_static_block)
4153 (augment_type_symtab, push_context): Update.
4154 (pop_context): Return struct context_stack.
4155 (outermost_context_p, get_current_context_stack)
4156 (get_context_stack_depth): New functions.
4157 (buildsym_init): Update.
4158
4159 2018-07-20 Tom Tromey <tom@tromey.com>
4160
4161 * rust-exp.y: Now a pure parser. Update all rules.
4162 (%union): Move earlier.
4163 (current_parser, work_obstack): Remove globals.
4164 (rust_parser, ~rust_parser): Update.
4165 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4166 lex_character, lex_number, lex_string, lex_identifier,
4167 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4168 convert_name, convert_params_to_expression,
4169 convert_ast_to_expression, ast_basic_type, ast_operation,
4170 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4171 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4172 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4173 ast_array_type, ast_slice_type, ast_reference_type,
4174 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4175 (rust_parse): Update.
4176 (rustyyerror, rustyylex): Add parser parameter.
4177 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4178 (rust_lex_stringish_test, rust_lex_test_sequence)
4179 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4180 (rust_lex_test_push_back, rust_lex_tests): Update.
4181
4182 2018-07-19 Pedro Alves <palves@redhat.com>
4183
4184 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4185 gdb::unique_xmalloc_ptr.
4186 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4187 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4188 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4189 copy-initialization.
4190 * guile/scm-pretty-print.c (ppscm_print_children): Use
4191 gdb::unique_xmalloc_ptr instead of cleanups.
4192 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4193 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4194 gdb::unique_xmalloc_ptr.
4195 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4196 Adjust to use gdb::unique_xmalloc_ptr.
4197 * guile/scm-utils.c (extract_arg): Adjust.
4198 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4199 gdb::unique_xmalloc_ptr instead of a cleanup.
4200
4201 2018-07-19 Tom Tromey <tom@tromey.com>
4202
4203 * utils.c (do_value_free_to_mark)
4204 (make_cleanup_value_free_to_mark): Remove.
4205 * utils.h (make_cleanup_value_free_to_mark): Remove.
4206
4207 2018-07-19 Pedro Alves <palves@redhat.com>
4208
4209 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4210 forwarding reference.
4211
4212 2018-07-18 Pedro Alves <palves@redhat.com>
4213
4214 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4215 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4216 cleanup.
4217
4218 2018-07-18 Pedro Alves <palves@redhat.com>
4219
4220 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4221 exceptions.
4222 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4223 (gdbscm_wrap): New.
4224 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4225 directly instead of a cleanup.
4226 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4227 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4228 (vlscm_binop_gdbthrow): New, factored out from ...
4229 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4230 (vlscm_rich_compare): Use gdbscm_wrap.
4231 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4232 instead of a cleanup.
4233 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4234 cleanup.
4235 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4236 Use xfree directly instead of a cleanup.
4237 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4238 Adjust to use gdbscm_wrap and scoped_value_mark.
4239 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4240 (gdbscm_value_address, gdbscm_value_dereference)
4241 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4242 scoped_value_mark.
4243 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4244 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4245 scoped_value_mark.
4246 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4247 gdbscm_wrap and scoped_value_mark.
4248 (gdbscm_value_to_string): Use xfree directly instead of a
4249 cleanup. Move 'buffer' unique_ptr to TRY scope.
4250 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4251 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4252 scoped_value_mark.
4253 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4254 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4255 scoped_value_mark.
4256 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4257 gdbscm_wrap.
4258
4259 2018-07-18 Tom de Vries <tdevries@suse.de>
4260
4261 * findvar.c (default_read_var_value): Also resolve dynamic type for
4262 LOC_OPTIMIZED_OUT vars.
4263
4264 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4265
4266 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4267 decoding.
4268
4269 2018-07-17 Tom Tromey <tom@tromey.com>
4270
4271 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4272 (compute_enum_list, pascm_set_param_value_x)
4273 (gdbscm_parameter_value): Update.
4274 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4275 (gdbscm_scm_to_host_string): Update.
4276 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4277 Update.
4278 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4279 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4280 * guile/scm-string.c (gdbscm_scm_to_string): Return
4281 unique_xmalloc_ptr.
4282 (gdbscm_scm_to_host_string): Likewise.
4283
4284 2018-07-17 Tom Tromey <tom@tromey.com>
4285
4286 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4287 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4288 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4289 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4290 unique_xmalloc_ptr.
4291
4292 2018-07-17 Tom Tromey <tom@tromey.com>
4293
4294 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4295 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4296 Update.
4297 * guile/scm-cmd.c (cmdscm_function): Update.
4298 * guile/scm-pretty-print.c
4299 (ppscm_print_exception_unless_memory_error): Update.
4300 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4301 Return unique_xmalloc_ptr.
4302
4303 2018-07-17 Tom Tromey <tom@tromey.com>
4304
4305 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4306 Use string_printf.
4307
4308 2018-07-17 Jim Wilson <jimw@sifive.com>
4309
4310 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4311 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4312 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4313 unecessary braces after EF_RISCV_RVC test. Delete call to
4314 set_gdbarch_decr_pc_after_break.
4315
4316 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4317 RISCV_LAST_FP_REGNUM + 1.
4318 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4319
4320 2018-07-17 Tom Tromey <tom@tromey.com>
4321
4322 * configure.ac: Remove --disable-gdbcli.
4323 * configure: Rebuild.
4324 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4325 (SUBDIR_CLI_CFLAGS): Remove.
4326 (SFILES): Use SUBDIR_CLI_SRCS.
4327 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4328
4329 2018-07-17 Tom Tromey <tom@tromey.com>
4330
4331 PR gdb/18624:
4332 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4333
4334 2018-07-16 Jim Wilson <jimw@sifive.com>
4335
4336 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4337
4338 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4339
4340 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4341 variable.
4342 (libunwind_frame_sniffer): Likewise.
4343 (libunwind_frame_prev_register): Likewise.
4344 (libunwind_sigtramp_frame_sniffer): Likewise.
4345 * ia64-tdep.c (ia64_access_reg): Likewise.
4346 (ia64_access_rse_reg): Likewise.
4347 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4348 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4349
4350 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4351
4352 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4353
4354 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4355
4356 * remote-sim.c (gdbsim_target::close,
4357 gdbsim_target::mourn_inferior): Remove unused variables.
4358
4359 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4360
4361 * ia64-tdep.c (ktab_buf): New global.
4362 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4363 (get_kernel_table): Adjust.
4364
4365 2018-07-16 Tom Tromey <tom@tromey.com>
4366
4367 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4368 * dwarf2read.c (using_directives, new_symbol): Use
4369 outermost_context_p.
4370 * dbxread.c (process_one_symbol): Use outermost_context_p.
4371 * coffread.c (coff_symtab_read): Use outermost_context_p.
4372
4373 2018-07-16 Tom Tromey <tom@tromey.com>
4374
4375 * dwarf2read.c (using_directives, read_func_scope)
4376 (read_lexical_block_scope): Update.
4377 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4378 * buildsym.h (local_using_directives, global_using_directives):
4379 Don't declare.
4380 (get_local_using_directives, set_local_using_directives)
4381 (get_global_using_directives): Declare.
4382 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4383 m_global_using_directives>: New members.
4384 (finish_block_internal, prepare_for_building)
4385 (reset_symtab_globals, end_symtab_get_static_block)
4386 (push_context): Update.
4387 (get_local_using_directives, set_local_using_directives)
4388 (get_global_using_directives): New functions.
4389 (buildsym_init): Update.
4390
4391 2018-07-16 Tom Tromey <tom@tromey.com>
4392
4393 * xcoffread.c (xcoff_initial_scan): Don't call
4394 free_pending_blocks.
4395 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4396 * buildsym.h (class scoped_free_pendings): Add constructor.
4397 (free_pending_blocks): Don't declare.
4398 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4399 (free_pending_blocks): Now static.
4400
4401 2018-07-16 Tom Tromey <tom@tromey.com>
4402
4403 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4404 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4405 member.
4406 (struct subfile_stack): Remove.
4407 (subfile_stack): Remove.
4408 (push_subfile, pop_subfile, buildsym_init): Update.
4409
4410 2018-07-16 Tom Tromey <tom@tromey.com>
4411
4412 * buildsym.c (push_subfile): Use gdb_assert.
4413 (pop_subfile): Use gdb_assert.
4414
4415 2018-07-16 Tom Tromey <tom@tromey.com>
4416
4417 * buildsym.h (merge_symbol_lists): Remove.
4418 * buildsym.c (merge_symbol_lists): Remove.
4419
4420 2018-07-16 Tom Tromey <tom@tromey.com>
4421
4422 * stabsread.c (scan_file_globals): Update comment.
4423 * stabsread.h (scan_file_globals): Move from buildsym.h.
4424 * buildsym.h (scan_file_globals): Move to stabsread.h.
4425
4426 2018-07-16 Tom Tromey <tom@tromey.com>
4427
4428 * xcoffread.c (xcoff_new_init): Update.
4429 * mipsread.c (mipscoff_new_init): Update.
4430 * mdebugread.c (mdebug_build_psymtabs): Update.
4431 * elfread.c (elf_new_init): Update.
4432 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4433 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4434 * buildsym.h (buildsym_new_init): Don't declare.
4435 * buildsym.c (buildsym_new_init): Remove.
4436
4437 2018-07-16 Tom Tromey <tom@tromey.com>
4438
4439 * stabsread.h (within_function): Move from buildsym.h.
4440 * stabsread.c (start_stabs): Clear within_function.
4441 * coffread.c (coff_start_symtab): Clear within_function.
4442 * buildsym.h (within_function): Move to stabsread.h.
4443 * buildsym.c (prepare_for_building): Update.
4444
4445 2018-07-16 Tom Tromey <tom@tromey.com>
4446
4447 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4448 * dwarf2read.c (dwarf2_start_symtab): Don't set
4449 processing_gcc_compilation.
4450 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4451
4452 2018-07-16 Tom Tromey <tom@tromey.com>
4453
4454 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4455 (next_symbol_text_func): Move from buildsym.h.
4456 * stabsread.c (hashname): Move from buildsym.c.
4457 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4458 (next_symbol_text_func, hashname): Move to stabsread.h.
4459 * buildsym.c: Don't include bcache.h
4460 (hashname): Move to stasbread.c.
4461
4462 2018-07-16 Tom Tromey <tom@tromey.com>
4463
4464 * buildsym.h (context_stack_size): Don't declare.
4465 * buildsym.c (context_stack_size): New global.
4466
4467 2018-07-16 Tom Tromey <tom@tromey.com>
4468
4469 * dbxread.c (processing_acc_compilation): New global.
4470 * buildsym.h (processing_acc_compilation): Don't declare.
4471
4472 2018-07-16 Tom Tromey <tom@tromey.com>
4473
4474 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4475 * dbxread.c (read_ofile_symtab): Update.
4476 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4477 * buildsym.h (last_source_start_addr): Remove.
4478 (set_last_source_start_addr, get_last_source_start_addr):
4479 Declare.
4480 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4481 parameter.
4482 (struct buildsym_compunit) <m_last_source_start_addr>: New
4483 member.
4484 (prepare_for_building): Remove start_addr parameter.
4485 (start_symtab, restart_symtab, end_symtab_get_static_block)
4486 (end_symtab_with_blockvector): Update.
4487 (set_last_source_start_addr, get_last_source_start_addr): New
4488 functions.
4489
4490 2018-07-16 Tom Tromey <tom@tromey.com>
4491
4492 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4493 member.
4494 (have_line_numbers): Remove.
4495 (record_line, prepare_for_building, end_symtab_get_static_block)
4496 (augment_type_symtab): Update.
4497
4498 2018-07-16 Tom Tromey <tom@tromey.com>
4499
4500 * buildsym.c (~buildsym_compunit): Free the macro table.
4501 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4502 methods.
4503 <m_pending_macros>: New member.
4504 (pending_macros): Remove.
4505 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4506 (reset_symtab_globals, end_symtab_get_static_block)
4507 (end_symtab_with_blockvector, augment_type_symtab)
4508 (buildsym_init): Update.
4509
4510 2018-07-16 Tom Tromey <tom@tromey.com>
4511
4512 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4513 parameter.
4514 (buildsym_compunit::set_last_source_file): New method.
4515 <m_last_source_file>: New member.
4516 (prepare_for_building): Remove "name" parameter.
4517 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4518 (last_source_file): Remove.
4519 (set_last_source_file, get_last_source_file): Update.
4520
4521 2018-07-16 Tom Tromey <tom@tromey.com>
4522
4523 * buildsym.c (prepare_for_building): Add assert.
4524
4525 2018-07-16 Tom Tromey <tom@tromey.com>
4526
4527 * buildsym.c (~buildsym_compunit): Update.
4528 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4529 (start_subfile, patch_subfile_names)
4530 (end_symtab_with_blockvector): Update.
4531
4532 2018-07-16 Tom Tromey <tom@tromey.com>
4533
4534 * buildsym.c (struct buildsym_compunit): Add constructor,
4535 destructor, initializers.
4536 (start_buildsym_compunit): Remove.
4537 (free_buildsym_compunit): Use "delete".
4538 (start_symtab, restart_symtab): Use "new".
4539
4540 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4541
4542 * symfile.c (set_objfile_default_section_offset): Remove struct
4543 keyword.
4544
4545 2018-07-14 Stafford Horne <shorne@gmail.com>
4546
4547 * (Responsible Maintainers): Add myself as or1k maintainer.
4548
4549 2018-07-13 Tom Tromey <tom@tromey.com>
4550
4551 * symfile.c (set_objfile_default_section_offset): Use extra braces
4552 around initializer.
4553
4554 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4555
4556 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4557 non-branching basr.
4558
4559 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4560
4561 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4562 unittests/cli-utils-selftests.c
4563 * unittests/cli-utils-selftests.c: New file.
4564
4565 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4566
4567 * NEWS: Mention new commands. Mention change to 'thread apply'.
4568
4569 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4570
4571 * thread.c (thr_try_catch_cmd): New function.
4572 (thread_apply_all_command): Handle qcs flags.
4573 (thread_apply_command): Handle qcs flags.
4574 (taas_command): New function.
4575 (tfaas_command): New function.
4576 (_initialize_thread): Update to setup the new commands 'taas
4577 and 'tfaas'. Change doc string for 'thread apply'.
4578
4579 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4580
4581 * stack.c: (trailing_outermost_frame): New function, mostly
4582 extracted from backtrace_command_1.
4583 (leading_innermost_frame): New function.
4584 (backtrace_command_1): Update to call trailing_outermost_frame.
4585 (frame_apply_command_count): New function.
4586 (frame_apply_level_command): New function.
4587 (frame_apply_all_command): New function.
4588 (frame_apply_command): New function.
4589 (faas_command): New function.
4590 (frame_cmd_list): New variable.
4591 (_initialize_stack): Update to setup the new commands 'frame apply'
4592 and 'faas'.
4593
4594 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4595
4596 * cli-utils.c (number_or_range_parser::get_number): Only handle
4597 numbers or convenience var as numbers.
4598 (parse_flags): New function.
4599 (parse_flags_qcs): New function.
4600 (number_or_range_parser::finished): Ensure parsing end is detected
4601 before end of string.
4602 * cli-utils.h (parse_flags): New function.
4603 (parse_flags_qcs): New function.
4604 (number_or_range_parser): Remove m_finished bool.
4605 (number_or_range_parser::skip_range): Set m_in_range to false.
4606
4607 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4608
4609 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4610 on Windows.
4611
4612 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4613 Jan Kratochvil <jan.kratochvil@redhat.com>
4614 Paul Fertser <fercerpav@gmail.com>
4615 Tsutomu Seki <sekiriki@gmail.com>
4616 Pedro Alves <palves@redhat.com>
4617
4618 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4619 'unittests/parse-connection-spec-selftests.c'.
4620 (COMMON_SFILES): Add 'common/netstuff.c'.
4621 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4622 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4623 * common/netstuff.c: New file.
4624 * common/netstuff.h: New file.
4625 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4626 (wait_for_connect): Update comment. New parameter
4627 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4628 Use 'sock' directly instead of 'scb->fd'.
4629 (try_connect): New function, with code from 'net_open'.
4630 (net_open): Rewrite main loop to deal with multiple
4631 sockets/addresses. Handle IPv6-style hostnames; implement
4632 support for IPv6 connections.
4633 * unittests/parse-connection-spec-selftests.c: New file.
4634
4635 2018-07-11 Pedro Alves <palves@redhat.com>
4636
4637 PR gdb/23377
4638 * remote.c (remote_target::remote_detach_pid): Call
4639 set_current_process.
4640
4641 2018-07-11 Pedro Alves <palves@redhat.com>
4642
4643 * h8300-tdep.c (h8300_gdbarch_init): Remove
4644 set_gdbarch_ecoff_reg_to_regnum calls.
4645
4646 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4647
4648 PR c++/23373
4649 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4650 offsets/sizes for static members of a class/struct.
4651
4652 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4653
4654 * target-descriptions.c (tdesc_register_bitsize): Rename.
4655 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4656 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4657 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4658
4659 2018-07-10 Tom Tromey <tom@tromey.com>
4660
4661 * breakpoint.c (moribund_locations): Now static and a
4662 std::vector.
4663 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4664 (build_bpstat_chain, update_global_location_list)
4665 (breakpoint_retire_moribund): Update.
4666 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4667 VEC.
4668
4669 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4670
4671 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4672 (riscv_register_reggroup_p): Use new function, remove unneeded
4673 parenthesis.
4674 (riscv_push_dummy_call): Extend assert to compare against xlen or
4675 flen based on register type.
4676
4677 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4678
4679 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4680
4681 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4682
4683 * remote.c (show_hardware_watchpoint_limit): New function.
4684 (show_hardware_watchpoint_length_limit): New function.
4685 (show_hardware_breakpoint_limit): New function.
4686 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4687 where appropriate, update help text.
4688
4689 2018-07-09 Tom Tromey <tom@tromey.com>
4690
4691 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4692 (CLIBS): Don't mention NAT_CLIBS.
4693
4694 2018-07-09 Tom Tromey <tom@tromey.com>
4695
4696 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4697 (LIBGDB_OBS, clean mostlyclean): Update.
4698 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4699
4700 2018-07-09 Tom Tromey <tom@tromey.com>
4701
4702 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4703 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4704 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4705
4706 2018-07-09 Tom Tromey <tom@tromey.com>
4707
4708 * Makefile.in (ALLDEPFILES): Remove exec.c.
4709 (COMMON_OBS): Remove exec.o.
4710 (COMMON_SFILES): Add exec.c.
4711
4712 2018-07-09 Tom Tromey <tom@tromey.com>
4713
4714 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4715
4716 2018-07-09 Tom Tromey <tom@tromey.com>
4717
4718 * Makefile.in (clean mostlyclean): Remove stamp-version.
4719 (version.c): Depend on stamp-version.
4720 (stamp-version): New rule, from version.c rule.
4721
4722 2018-07-09 Tom Tromey <tom@tromey.com>
4723
4724 * Makefile.in (init.c): Depend on stamp-init.
4725 (stamp-init): New rule, from init.c rule.
4726 (clean mostlyclean): Remove stamp-init.
4727
4728 2018-07-09 Tom Tromey <tom@tromey.com>
4729
4730 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4731 SUBDIR_GCC_COMPILE_SRCS.
4732
4733 2018-07-09 Tom Tromey <tom@tromey.com>
4734
4735 * Makefile.in (init.c): Remove some unused sed rules.
4736
4737 2018-07-09 Tom Tromey <tom@tromey.com>
4738
4739 * Makefile.in (TSOBS): Remove.
4740 (INIT_FILES): Update.
4741 (LIBGDB_OBS): Update.
4742 (COMMON_SFILES): Add inflow.c.
4743 (SFILES): Remove inflow.c.
4744
4745 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4746
4747 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4748
4749 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4750
4751 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4752 get_saveloc_name, is_signal_frame_name, step_name,
4753 init_remote_name, create_addr_space_name,
4754 destroy_addr_space_name, search_unwind_table_name,
4755 find_dyn_list_name): Constify.
4756
4757 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4758
4759 * darwin-nat.c (darwin_pthread_kill): New function.
4760 (darwin_resume_thread): Use darwin_pthread_kill.
4761
4762 2018-07-05 Tom de Vries <tdevries@suse.de>
4763
4764 * macroexp.c (macro_buffer) <operator=>: New member function.
4765
4766 2018-07-04 Tom Tromey <tom@tromey.com>
4767
4768 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4769
4770 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4771
4772 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4773 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4774 * maint.c: Likewise.
4775 * top.c: Likewise.
4776
4777 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4778
4779 * NEWS: Create a new section for the next release branch.
4780 Rename the section of the current branch, now that it has
4781 been cut.
4782
4783 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4784
4785 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4786 * version.in: Bump version to 8.2.50.DATE-git.
4787
4788 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4789 Pedro Alves <palves@redhat.com>
4790
4791 * linux-nat.c (linux_init_ptrace): Rename to ...
4792 (linux_init_ptrace_procfs): ... this. Call
4793 linux_proc_init_warnings.
4794 (linux_nat_target::post_attach)
4795 (linux_nat_target::post_startup_inferior): Adjust.
4796 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4797 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4798
4799 2018-07-04 Tom de Vries <tdevries@suse.de>
4800
4801 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4802 check ...
4803 (read_comp_unit_head): ... here.
4804
4805 2018-07-03 Tom Tromey <tom@tromey.com>
4806
4807 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4808 (stop_tracing, tstatus_command)
4809 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4810 (print_one_static_tracepoint_marker): Update.
4811 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4812 std::vector.
4813 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4814 VEC.
4815 (all_tracepoints, static_tracepoints_here): Return std::vector.
4816
4817 2018-07-03 Tom Tromey <tom@tromey.com>
4818
4819 * common/ptid.c (ptid_equal): Remove.
4820 * common/ptid.h (ptid_equal): Don't declare.
4821 * ada-tasks.c: Update.
4822 * breakpoint.c: Update.
4823 * common/agent.c: Update.
4824 * corelow.c: Update.
4825 * darwin-nat-info.c: Update.
4826 * darwin-nat.c: Update.
4827 * dcache.c: Update.
4828 * dtrace-probe.c: Update.
4829 * dummy-frame.c: Update.
4830 * fbsd-nat.c: Update.
4831 * frame.c: Update.
4832 * gdbthread.h: Update.
4833 * gnu-nat.c: Update.
4834 * go32-nat.c: Update.
4835 * inf-loop.c: Update.
4836 * inf-ptrace.c: Update.
4837 * infcall.c: Update.
4838 * infcmd.c: Update.
4839 * inflow.c: Update.
4840 * infrun.c: Update.
4841 * linux-fork.c: Update.
4842 * linux-nat.c: Update.
4843 * linux-thread-db.c: Update.
4844 * mi/mi-cmd-var.c: Update.
4845 * mi/mi-interp.c: Update.
4846 * mi/mi-main.c: Update.
4847 * nto-procfs.c: Update.
4848 * ppc-linux-tdep.c: Update.
4849 * procfs.c: Update.
4850 * python/py-inferior.c: Update.
4851 * python/py-record-btrace.c: Update.
4852 * python/py-record.c: Update.
4853 * ravenscar-thread.c: Update.
4854 * regcache.c: Update.
4855 * remote-sim.c: Update.
4856 * remote.c: Update.
4857 * sol-thread.c: Update.
4858 * solib.c: Update.
4859 * target.c: Update.
4860 * tui/tui-stack.c: Update.
4861 * varobj.c: Update.
4862 * windows-nat.c: Update.
4863 * windows-tdep.c: Update.
4864
4865 2018-07-03 Tom Tromey <tom@tromey.com>
4866
4867 * common/ptid.c (ptid_match): Remove.
4868 * common/ptid.h (ptid_match): Don't declare.
4869 * fbsd-nat.c: Update.
4870 * infcmd.c: Update.
4871 * infrun.c: Update.
4872 * linux-nat.c: Update.
4873 * record-btrace.c: Update.
4874 * regcache.c: Update.
4875 * remote.c: Update.
4876
4877 2018-07-03 Tom Tromey <tom@tromey.com>
4878
4879 * common/ptid.c (ptid_tid_p): Remove.
4880 * common/ptid.h (ptid_tid_p): Don't declare.
4881 * sol-thread.c: Update.
4882
4883 2018-07-03 Tom Tromey <tom@tromey.com>
4884
4885 * common/ptid.c (ptid_lwp_p): Remove.
4886 * common/ptid.h (ptid_lwp_p): Don't declare.
4887 * fbsd-nat.c: Update.
4888 * linux-nat.c: Update.
4889 * nat/linux-procfs.c: Update.
4890 * nat/x86-linux-dregs.c: Update.
4891 * sol-thread.c: Update.
4892
4893 2018-07-03 Tom Tromey <tom@tromey.com>
4894
4895 * common/ptid.c (ptid_is_pid): Remove.
4896 * common/ptid.h (ptid_is_pid): Don't declare.
4897 * infrun.c: Update.
4898 * linux-nat.c: Update.
4899 * mi/mi-interp.c: Update.
4900 * remote.c: Update.
4901 * thread.c: Update.
4902
4903 2018-07-03 Tom Tromey <tom@tromey.com>
4904
4905 * common/ptid.c (ptid_get_tid): Remove.
4906 * common/ptid.h (ptid_get_tid): Don't declare.
4907 * ada-tasks.c: Update.
4908 * aix-thread.c: Update.
4909 * bsd-uthread.c: Update.
4910 * darwin-nat.c: Update.
4911 * fbsd-nat.c: Update.
4912 * i386-darwin-nat.c: Update.
4913 * infrun.c: Update.
4914 * linux-tdep.c: Update.
4915 * nto-procfs.c: Update.
4916 * ppc-ravenscar-thread.c: Update.
4917 * python/py-infthread.c: Update.
4918 * ravenscar-thread.c: Update.
4919 * sol-thread.c: Update.
4920 * sparc-ravenscar-thread.c: Update.
4921 * windows-nat.c: Update.
4922
4923 2018-07-03 Tom Tromey <tom@tromey.com>
4924
4925 * common/ptid.c (ptid_get_lwp): Remove.
4926 * common/ptid.h (ptid_get_lwp): Don't declare.
4927 * aarch64-linux-nat.c: Update.
4928 * ada-tasks.c: Update.
4929 * aix-thread.c: Update.
4930 * amd64-linux-nat.c: Update.
4931 * arm-linux-nat.c: Update.
4932 * corelow.c: Update.
4933 * fbsd-nat.c: Update.
4934 * fbsd-tdep.c: Update.
4935 * gnu-nat.c: Update.
4936 * i386-cygwin-tdep.c: Update.
4937 * i386-gnu-nat.c: Update.
4938 * i386-linux-nat.c: Update.
4939 * ia64-linux-nat.c: Update.
4940 * inf-ptrace.c: Update.
4941 * infrun.c: Update.
4942 * linux-fork.c: Update.
4943 * linux-nat.c: Update.
4944 * linux-tdep.c: Update.
4945 * linux-thread-db.c: Update.
4946 * mips-linux-nat.c: Update.
4947 * nat/aarch64-linux-hw-point.c: Update.
4948 * nat/aarch64-linux.c: Update.
4949 * nat/linux-btrace.c: Update.
4950 * nat/linux-osdata.c: Update.
4951 * nat/linux-procfs.c: Update.
4952 * nat/x86-linux-dregs.c: Update.
4953 * obsd-nat.c: Update.
4954 * ppc-fbsd-nat.c: Update.
4955 * ppc-linux-nat.c: Update.
4956 * procfs.c: Update.
4957 * python/py-infthread.c: Update.
4958 * ravenscar-thread.c: Update.
4959 * remote.c: Update.
4960 * s390-linux-nat.c: Update.
4961 * sol-thread.c: Update.
4962 * sol2-tdep.c: Update.
4963 * spu-linux-nat.c: Update.
4964 * x86-linux-nat.c: Update.
4965 * xtensa-linux-nat.c: Update.
4966
4967 2018-07-03 Tom Tromey <tom@tromey.com>
4968
4969 * common/ptid.c (ptid_get_pid): Remove.
4970 * common/ptid.h (ptid_get_pid): Don't declare.
4971 * aarch64-linux-nat.c: Update.
4972 * ada-lang.c: Update.
4973 * aix-thread.c: Update.
4974 * alpha-bsd-nat.c: Update.
4975 * amd64-fbsd-nat.c: Update.
4976 * amd64-linux-nat.c: Update.
4977 * arm-linux-nat.c: Update.
4978 * arm-nbsd-nat.c: Update.
4979 * auxv.c: Update.
4980 * break-catch-syscall.c: Update.
4981 * breakpoint.c: Update.
4982 * bsd-uthread.c: Update.
4983 * corelow.c: Update.
4984 * ctf.c: Update.
4985 * darwin-nat.c: Update.
4986 * fbsd-nat.c: Update.
4987 * fbsd-tdep.c: Update.
4988 * gcore.c: Update.
4989 * gnu-nat.c: Update.
4990 * hppa-nbsd-nat.c: Update.
4991 * hppa-obsd-nat.c: Update.
4992 * i386-fbsd-nat.c: Update.
4993 * ia64-linux-nat.c: Update.
4994 * inf-ptrace.c: Update.
4995 * infcmd.c: Update.
4996 * inferior.c: Update.
4997 * inferior.h: Update.
4998 * inflow.c: Update.
4999 * infrun.c: Update.
5000 * linux-fork.c: Update.
5001 * linux-nat.c: Update.
5002 * linux-tdep.c: Update.
5003 * linux-thread-db.c: Update.
5004 * m68k-bsd-nat.c: Update.
5005 * mi/mi-interp.c: Update.
5006 * mi/mi-main.c: Update.
5007 * mips-linux-nat.c: Update.
5008 * mips-nbsd-nat.c: Update.
5009 * mips64-obsd-nat.c: Update.
5010 * nat/aarch64-linux-hw-point.c: Update.
5011 * nat/aarch64-linux.c: Update.
5012 * nat/linux-btrace.c: Update.
5013 * nat/linux-osdata.c: Update.
5014 * nat/linux-procfs.c: Update.
5015 * nat/x86-linux-dregs.c: Update.
5016 * nto-procfs.c: Update.
5017 * obsd-nat.c: Update.
5018 * ppc-linux-nat.c: Update.
5019 * ppc-nbsd-nat.c: Update.
5020 * ppc-obsd-nat.c: Update.
5021 * proc-service.c: Update.
5022 * procfs.c: Update.
5023 * python/py-inferior.c: Update.
5024 * python/py-infthread.c: Update.
5025 * ravenscar-thread.c: Update.
5026 * record.c: Update.
5027 * remote-sim.c: Update.
5028 * remote.c: Update.
5029 * rs6000-nat.c: Update.
5030 * s390-linux-nat.c: Update.
5031 * sh-nbsd-nat.c: Update.
5032 * sol-thread.c: Update.
5033 * sparc-nat.c: Update.
5034 * sparc64-tdep.c: Update.
5035 * spu-linux-nat.c: Update.
5036 * spu-tdep.c: Update.
5037 * target-debug.h: Update.
5038 * target.c: Update.
5039 * thread.c: Update.
5040 * tid-parse.c: Update.
5041 * tracefile-tfile.c: Update.
5042 * vax-bsd-nat.c: Update.
5043 * windows-nat.c: Update.
5044 * x86-linux-nat.c: Update.
5045 * x86-nat.c: Update.
5046
5047 2018-07-03 Tom Tromey <tom@tromey.com>
5048
5049 * common/ptid.c (pid_to_ptid): Remove.
5050 * common/ptid.h (pid_to_ptid): Don't declare.
5051 * aix-thread.c: Update.
5052 * arm-linux-nat.c: Update.
5053 * common/ptid.c: Update.
5054 * common/ptid.h: Update.
5055 * corelow.c: Update.
5056 * ctf.c: Update.
5057 * darwin-nat.c: Update.
5058 * fbsd-nat.c: Update.
5059 * fork-child.c: Update.
5060 * gnu-nat.c: Update.
5061 * go32-nat.c: Update.
5062 * inf-ptrace.c: Update.
5063 * infcmd.c: Update.
5064 * inferior.c: Update.
5065 * infrun.c: Update.
5066 * linux-fork.c: Update.
5067 * linux-nat.c: Update.
5068 * nat/aarch64-linux-hw-point.c: Update.
5069 * nat/fork-inferior.c: Update.
5070 * nat/x86-linux-dregs.c: Update.
5071 * nto-procfs.c: Update.
5072 * obsd-nat.c: Update.
5073 * procfs.c: Update.
5074 * progspace.c: Update.
5075 * remote.c: Update.
5076 * rs6000-nat.c: Update.
5077 * s390-linux-nat.c: Update.
5078 * sol-thread.c: Update.
5079 * spu-linux-nat.c: Update.
5080 * target.c: Update.
5081 * top.c: Update.
5082 * tracefile-tfile.c: Update.
5083 * windows-nat.c: Update.
5084
5085 2018-07-03 Tom Tromey <tom@tromey.com>
5086
5087 * common/ptid.h (ptid_build): Don't declare.
5088 * common/ptid.c (ptid_build): Remove.
5089 * aix-thread.c: Update.
5090 * bsd-kvm.c: Update.
5091 * bsd-uthread.c: Update.
5092 * common/agent.c: Update.
5093 * common/ptid.c: Update.
5094 * common/ptid.h: Update.
5095 * corelow.c: Update.
5096 * darwin-nat.c: Update.
5097 * fbsd-nat.c: Update.
5098 * gnu-nat.c: Update.
5099 * linux-fork.c: Update.
5100 * linux-nat.c: Update.
5101 * linux-thread-db.c: Update.
5102 * nat/linux-osdata.c: Update.
5103 * nat/linux-procfs.c: Update.
5104 * nto-procfs.c: Update.
5105 * obsd-nat.c: Update.
5106 * proc-service.c: Update.
5107 * procfs.c: Update.
5108 * ravenscar-thread.c: Update.
5109 * remote-sim.c: Update.
5110 * remote.c: Update.
5111 * sol-thread.c: Update.
5112 * target.c: Update.
5113 * windows-nat.c: Update.
5114
5115 2018-07-03 Tom Tromey <tom@tromey.com>
5116
5117 * infrun.c (follow_exec): Use exit_inferior_silent.
5118 * inferior.c (exit_inferior_num_silent): Remove.
5119 * inferior.h (exit_inferior_num_silent): Don't declare.
5120
5121 2018-07-03 Tom Tromey <tom@tromey.com>
5122
5123 PR cli/23340:
5124 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5125 inferior_ptid on error.
5126
5127 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5128 Simon Marchi <simon.marchi@polymtl.ca>
5129
5130 PR tdep/8282
5131 * disasm.h (gdb_disassembler): Add
5132 `m_disassembler_options_holder'. member
5133 * disasm.c (get_all_disassembler_options): New function.
5134 (gdb_disassembler::gdb_disassembler): Use it.
5135 (gdb_buffered_insn_length_init_dis): Likewise.
5136 (gdb_buffered_insn_length): Adjust accordingly.
5137 (set_disassembler_options): Handle options with arguments.
5138 (show_disassembler_options_sfunc): Likewise. Add a leading new
5139 line if showing options with descriptions.
5140 (disassembler_options_completer): Adapt to using the
5141 `disasm_options_and_args_t' structure.
5142 * mips-tdep.c (mips_disassembler_options): New variable.
5143 (mips_disassembler_options_o32): Likewise.
5144 (mips_disassembler_options_n32): Likewise.
5145 (mips_disassembler_options_n64): Likewise.
5146 (gdb_print_insn_mips): Don't set `disassembler_options'.
5147 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5148 functions.
5149 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5150 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5151 `gdbarch_disassembler_options_implicit' and
5152 `gdbarch_valid_disassembler_options'.
5153 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5154 `disasm_options_and_args_t' structure.
5155 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5156 method.
5157 (valid_disassembler_options): Switch from `disasm_options_t' to
5158 the `disasm_options_and_args_t' structure.
5159 * NEWS: Document `set disassembler-options' support for the MIPS
5160 target.
5161 * gdbarch.h: Regenerate.
5162 * gdbarch.c: Regenerate.
5163
5164 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5165
5166 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5167
5168 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5169
5170 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5171 parameter in call to amd64_target_description.
5172 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5173 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5174 (amd64fbsd_init_abi): Likewise.
5175 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5176 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5177 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5178 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5179
5180 2018-06-29 Pedro Alves <palves@redhat.com>
5181
5182 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5183 "segments" parameter.
5184 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5185 (_initialize_amd64_tdep): Update call to
5186 amd64_create_target_description.
5187 (amd64_target_description): Add "segments" parameter. Adjust
5188 the implementation to use it.
5189 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5190 call to amd64_create_target_description.
5191 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5192 * gdb/arch/amd64.h (amd64_create_target_description): Add
5193 "segments" register.
5194 * gdb/arch/amd64.c (amd64_create_target_description): Add
5195 "segments" parameter. Call create_feature_i386_64bit_segments
5196 only if SEGMENTS is true.
5197 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5198 call to amd64_create_target_description.
5199
5200 2018-06-29 Pedro Alves <palves@redhat.com>
5201
5202 * thread.c (thread_target_id_str): New, factored out from ...
5203 (print_thread_info_1): ... here. Use it to compute the max
5204 "Target Id" column width.
5205
5206 2018-06-29 Pedro Alves <palves@redhat.com>
5207
5208 * remote.c (remote_target::extra_thread_info): Delete
5209 'display_buf' and 'n' locals. from the cache, regardless of
5210 packet mechanims is in use. Use cache for qThreadExtra and qP
5211 methods too.
5212
5213 2018-06-29 Pedro Alves <palves@redhat.com>
5214
5215 * blockframe.c (find_pc_sect_containing_function): New function.
5216 * breakpoint.c (print_breakpoint_location): Don't call
5217 find_pc_sect_function.
5218 * linespec.c (create_sals_line_offset): Record the location's
5219 symbol in the sal.
5220 * linespec.c (convert_address_location_to_sals): Fill in sal's
5221 symbol with find_pc_sect_containing_function.
5222 * symtab.c (find_function_start_sal): Rename to ...
5223 (find_function_start_sal_1): ... this.
5224 (find_function_start_sal): Reimplement as wrapper around
5225 find_function_start_sal_1, and use
5226 find_pc_sect_containing_function to fill in the sal's symbol.
5227 (find_function_start_sal(symbol*, bool)): Adjust.
5228 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5229 comments.
5230 (find_pc_sect_containing_function): Declare.
5231
5232 2018-06-29 Pedro Alves <palves@redhat.com>
5233
5234 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5235 true if the the location has no symbol.
5236
5237 2018-06-28 Tom Tromey <tom@tromey.com>
5238
5239 * NEWS: Mention --enable-codesign.
5240 * silent-rules.mk (ECHO_SIGN): New variable.
5241 * configure.ac: Add --enable-codesign.
5242 * configure: Rebuild.
5243 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5244 (gdb$(EXEEXT)): Optionally invoke codesign.
5245
5246 2018-06-28 Pedro Alves <palves@redhat.com>
5247
5248 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5249 comments.
5250 (switch_to_thread_no_regs): Adjust comment.
5251 * infcmd.c (stop_pc): Delete.
5252 (post_create_inferior, info_program_command): Replace references
5253 to stop_pc with references to thread_info->suspend.stop_pc.
5254 * inferior.h (stop_pc): Delete declaration.
5255 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5256 (handle_inferior_event_1, handle_signal_stop)
5257 (process_event_stop_test, keep_going_stepped_thread)
5258 (handle_step_into_function, handle_step_into_function_backward)
5259 (print_stop_location): Replace references to stop_pc with
5260 references to thread_info->suspend.stop_pc.
5261 (struct infcall_suspend_state) <stop_pc>: Delete field.
5262 (save_infcall_suspend_state, restore_infcall_suspend_state):
5263 Remove references to inf_stat->stop_pc.
5264 * linux-fork.c (fork_load_infrun_state): Likewise.
5265 * record-btrace.c (record_btrace_set_replay): Likewise.
5266 * record-full.c (record_full_goto_entry): Likewise.
5267 * remote.c (print_one_stopped_thread): Likewise.
5268 * target.c (target_resume): Extend comment.
5269 * thread.c (set_executing_thread): New.
5270 (set_executing): Use it.
5271 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5272 Remove references to stop_pc.
5273
5274 2018-06-28 Pedro Alves <palves@redhat.com>
5275
5276 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5277 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5278
5279 2018-06-28 Tom Tromey <tom@tromey.com>
5280
5281 * coffread.c (coff_symfile_finish): Update.
5282 * xcoffread.c (xcoff_symfile_finish): Update.
5283 * elfread.c (elf_symfile_finish): Update.
5284 * symfile.h (dwarf2_free_objfile): Don't declare.
5285 * dwarf2read.c (_initialize_dwarf2_read): Use
5286 register_objfile_data_with_cleanup.
5287 (dwarf2_free_objfile): Now static. Change signature.
5288
5289 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5290
5291 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5292 option "-o" to add-symbol-file-load to add an offset to each
5293 section's load address.
5294 * symfile.c (set_objfile_default_section_offset): New function.
5295
5296 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5297
5298 * symfile.c (add_symbol_file_command): Make sure that sections
5299 with the same name are sorted in the same order.
5300
5301 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5302
5303 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5304 require the second argument. If omitted, load sections at the
5305 addresses specified in the file.
5306
5307 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5308
5309 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5310 (_initialize_symfile): Add option "-o" to symbol-file to add an
5311 offset to each section of the symbol file.
5312
5313 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5314
5315 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5316
5317 2018-06-27 Tom Tromey <tom@tromey.com>
5318
5319 * stack.c (_initialize_stack): Update "func" help text.
5320
5321 2018-06-27 Tom Tromey <tom@tromey.com>
5322
5323 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5324 std::vector.
5325 (unwind_infopy_str, pyuw_create_unwind_info)
5326 (unwind_infopy_add_saved_register, pyuw_sniffer)
5327 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5328 Update.
5329 (struct saved_reg): Add constructor.
5330 <value>: Now a gdbpy_ref<>.
5331
5332 2018-06-27 Tom Tromey <tom@tromey.com>
5333
5334 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5335
5336 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5337
5338 * gdb-gdb.py.in: Format using autopep8.
5339
5340 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5341
5342 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5343 (type_lookup_function): Recognize CORE_ADDR values.
5344
5345 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5346
5347 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5348 print tag_name.
5349
5350 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5351
5352 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5353 <__lt__>: Add.
5354
5355 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5356
5357 * gdb-gdb.py: Move to...
5358 * gdb-gdb.py.in: ... here.
5359 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5360 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5361 dependencies.
5362 (distclean): Remove gdb-gdb.py when cleaning.
5363 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5364 * configure: Re-generate.
5365
5366 2018-06-27 Pedro Alves <palves@redhat.com>
5367
5368 * proc-service.c (get_ps_regcache): New.
5369 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5370 (ps_lsetfpregs): Use it.
5371
5372 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5373
5374 PR gdb/21695
5375 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5376 (dwarf_decode_lines_1): Adjust.
5377
5378 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5379
5380 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5381 override.
5382 <info_proc>: Likewise.
5383
5384 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5385
5386 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5387 to windows_fetch_one_register, and only handle the case of
5388 fetching one register. Move the code that reloads the context
5389 and iterates over all registers if R is negative to...
5390 (windows_nat_target::fetch_registers): ... here.
5391 (do_windows_store_inferior_registers): Rename to
5392 windows_store_one_register, and only handle the case of storing
5393 one register. Move the code that handles the case where r is
5394 negative to...
5395 (windows_nat_target::store_registers) ... here.
5396
5397 2018-06-26 Tom Tromey <tom@tromey.com>
5398
5399 PR rust/22574:
5400 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5401 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5402 Update.
5403 (rust_internal_print_type): Add podata parameter.
5404 (rust_print_type): Update.
5405
5406 2018-06-26 Tom Tromey <tom@tromey.com>
5407
5408 * typeprint.h (struct print_offset_data) <update, finish,
5409 maybe_print_hole>: New methods.
5410 <indentation>: New constant.
5411 * typeprint.c (print_offset_data::indentation): Define.
5412 (print_offset_data::maybe_print_hole, print_offset_data::update)
5413 (print_offset_data::finish): Move from c-typeprint.c and rename.
5414 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5415 (print_spaces_filtered_with_print_options): Update.
5416 (c_print_type_union_field_offset, maybe_print_hole)
5417 (c_print_type_struct_field_offset): Move to typeprint.c and
5418 rename.
5419 (c_type_print_base_struct_union): Update.
5420
5421 2018-06-25 Pedro Alves <palves@redhat.com>
5422
5423 * gdbthread.h (thread_info_ref, delete_thread)
5424 (delete_thread_silent, first_thread_of_inferior)
5425 (any_thread_of_inferior, switch_to_thread)
5426 (enable_thread_stack_temporaries)
5427 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5428 (get_last_thread_stack_temporary)
5429 (value_in_thread_stack_temporaries, can_access_registers_thread):
5430 Spell out "struct thread_info" instead of just "thread_info".
5431 * inferior.h (notice_new_inferior): Likewise.
5432
5433 2018-06-25 Pedro Alves <palves@redhat.com>
5434
5435 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5436 pass thread_info pointer to delete_thread.
5437 (windows_nat_target::detach): Pass inferior pointer to
5438 detach_inferior.
5439 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5440 delete_thread.
5441 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5442 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5443 and pass a thread_info pointer to delete_thread.
5444 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5445 pass thread_info pointer to delete_thread.
5446 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5447 delete_thread_silent call.
5448 * procfs.c (procfs_target::detach): Pass inferior pointer to
5449 detach_inferior.
5450 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5451 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5452 delete_thread_silent call.
5453 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5454 pass thread_info pointer to delete_thread.
5455 (windows_nat_target::detach): Pass inferior pointer to
5456 delete_inferior.
5457
5458 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5459
5460 * regcache.c (readable_regcache::read_part): Fix asserts.
5461 (reg_buffer::raw_collect_part): New function.
5462 (regcache::write_part): Fix asserts.
5463 (reg_buffer::raw_supply_part): New function.
5464 (regcache::transfer_regset_register): New helper function.
5465 (regcache::transfer_regset): Call new functions.
5466 (regcache_supply_regset): Use gdb_byte*.
5467 (regcache::supply_regset): Likewise.
5468 (regcache_collect_regset): Likewise.
5469 (regcache::collect_regset): Likewise.
5470 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5471 (reg_buffer::raw_supply_part): Likewise.
5472 (regcache::transfer_regset_register): Likewise.
5473 (regcache::transfer_regset): Use gdb_byte*.
5474
5475 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5476
5477 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5478
5479 2018-06-21 Pedro Alves <palves@redhat.com>
5480
5481 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5482 instead of a ptid_t. All callers adjusted.
5483 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5484 adjusted.
5485 (print_ada_task_info, display_current_task_id, task_command_1):
5486 Adjust.
5487 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5488 inferior_thread.
5489 (breakpoint_kind): Adjust.
5490 (remove_breakpoints_pid): Rename to ...
5491 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5492 pointer. All callers adjusted.
5493 (bpstat_clear_actions): Use inferior_thread.
5494 (get_bpstat_thread): New.
5495 (bpstat_do_actions): Use it.
5496 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5497 to take a thread_info pointer. All callers adjusted.
5498 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5499 (breakpoint_re_set_thread): Use inferior_thread.
5500 * breakpoint.h (struct inferior): Forward declare.
5501 (bpstat_stop_status): Update.
5502 (remove_breakpoints_pid): Delete.
5503 (remove_breakpoints_inf): New.
5504 * bsd-uthread.c (bsd_uthread_target::wait)
5505 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5506 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5507 (maint_btrace_packet_history_cmd)
5508 (maint_btrace_clear_packet_history_cmd): Adjust.
5509 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5510 inferior_thread.
5511 * cli/cli-interp.c: Include "inferior.h".
5512 * common/refcounted-object.h (struct
5513 refcounted_object_ref_policy): New.
5514 * compile/compile-object-load.c: Include gdbthread.h.
5515 (store_regs): Use inferior_thread.
5516 * corelow.c (core_target::close): Use current_inferior.
5517 (core_target_open): Adjust to use first_thread_of_inferior and use
5518 the current inferior.
5519 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5520 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5521 <thread>: ... this new field. All references adjusted.
5522 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5523 Take a thread_info pointer instead of a ptid_t.
5524 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5525 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5526 thread_info pointer instead of a ptid_t.
5527 * elfread.c: Include "inferior.h".
5528 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5529 Use inferior_thread.
5530 * eval.c (evaluate_subexp): Likewise.
5531 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5532 inferior_thread.
5533 * gdb_proc_service.h (struct thread_info): Forward declare.
5534 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5535 <thread>: ... this new field. All references adjusted.
5536 * gdbarch.h, gdbarch.c: Regenerate.
5537 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5538 'thread' parameter. All implementations and callers adjusted.
5539 * gdbthread.h (thread_info) <set_running>: New method.
5540 (delete_thread, delete_thread_silent): Take a thread_info pointer
5541 instead of a ptid.
5542 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5543 (first_thread_of_process): Delete, replaced by ...
5544 (first_thread_of_inferior): ... this new function. All callers
5545 adjusted.
5546 (any_live_thread_of_process): Delete, replaced by ...
5547 (any_live_thread_of_inferior): ... this new function. All callers
5548 adjusted.
5549 (switch_to_thread, switch_to_no_thread): Declare.
5550 (is_executing): Delete.
5551 (enable_thread_stack_temporaries): Update comment.
5552 <enable_thread_stack_temporaries>: Take a thread_info pointer
5553 instead of a ptid_t. Incref the thread.
5554 <~enable_thread_stack_temporaries>: Decref the thread.
5555 <m_ptid>: Delete
5556 <m_thr>: New.
5557 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5558 (get_last_thread_stack_temporary)
5559 (value_in_thread_stack_temporaries, can_access_registers_thread):
5560 Take a thread_info pointer instead of a ptid_t. All callers
5561 adjusted.
5562 * infcall.c (get_call_return_value): Use inferior_thread.
5563 (run_inferior_call): Work with thread pointers instead of ptid_t.
5564 (call_function_by_hand_dummy): Work with thread pointers instead
5565 of ptid_t. Use thread_info_ref.
5566 * infcmd.c (proceed_thread_callback): Access thread's state
5567 directly.
5568 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5569 access thread's state directly.
5570 (continue_command): Use inferior_thread.
5571 (info_program_command): Use find_thread_ptid and access thread
5572 state directly.
5573 (proceed_after_attach_callback): Use thread state directly.
5574 (notice_new_inferior): Take a thread_info pointer instead of a
5575 ptid_t. All callers adjusted.
5576 (exit_inferior): Take an inferior pointer instead of a pid. All
5577 callers adjusted.
5578 (exit_inferior_silent): New.
5579 (detach_inferior): Delete.
5580 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5581 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5582 (detach_inferior_command, kill_inferior_command): Use
5583 find_inferior_id instead of valid_gdb_inferior_id and
5584 gdb_inferior_id_to_pid.
5585 (inferior_command): Use inferior and thread pointers.
5586 * inferior.h (struct thread_info): Forward declare.
5587 (notice_new_inferior): Take a thread_info pointer instead of a
5588 ptid_t. All callers adjusted.
5589 (detach_inferior): Delete declaration.
5590 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5591 instead of a pid. All callers adjusted.
5592 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5593 (valid_gdb_inferior_id): Delete.
5594 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5595 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5596 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5597 ...
5598 <inf>: ... this new field.
5599 <step_ptid>: Delete, replaced by ...
5600 <step_thread>: ... this new field.
5601 (get_displaced_stepping_state): Take an inferior pointer instead
5602 of a pid. All callers adjusted.
5603 (displaced_step_in_progress_any_inferior): Adjust.
5604 (displaced_step_in_progress_thread): Take a thread pointer instead
5605 of a ptid_t. All callers adjusted.
5606 (displaced_step_in_progress, add_displaced_stepping_state): Take
5607 an inferior pointer instead of a pid. All callers adjusted.
5608 (get_displaced_step_closure_by_addr): Adjust.
5609 (remove_displaced_stepping_state): Take an inferior pointer
5610 instead of a pid. All callers adjusted.
5611 (displaced_step_prepare_throw, displaced_step_prepare)
5612 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5613 All callers adjusted.
5614 (start_step_over): Adjust.
5615 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5616 displaced step queue.
5617 (do_target_resume): Adjust.
5618 (fetch_inferior_event): Use inferior_thread.
5619 (context_switch, get_inferior_stop_soon): Take an
5620 execution_control_state pointer instead of a ptid_t. All callers
5621 adjusted.
5622 (switch_to_thread_cleanup): Delete.
5623 (stop_all_threads): Use scoped_restore_current_thread.
5624 * inline-frame.c: Include "gdbthread.h".
5625 (inline_state) <inline_state>: Take a thread pointer instead of a
5626 ptid_t. All callers adjusted.
5627 <ptid>: Delete, replaced by ...
5628 <thread>: ... this new field.
5629 (find_inline_frame_state): Take a thread pointer instead of a
5630 ptid_t. All callers adjusted.
5631 (skip_inline_frames, step_into_inline_frame)
5632 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5633 pointer instead of a ptid_t. All callers adjusted.
5634 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5635 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5636 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5637 pointers directly.
5638 * linux-nat.c (get_detach_signal): Likewise.
5639 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5640 (thread_db_notice_clone): Adjust.
5641 (thread_db_find_new_threads_silently)
5642 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5643 a thread pointer instead of a ptid_t. All callers adjusted.
5644 * mi/mi-cmd-var.c: Include "inferior.h".
5645 (mi_cmd_var_update_iter): Update to use thread pointers.
5646 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5647 inferior directly.
5648 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5649 out to ...
5650 (mi_output_running): ... this new function.
5651 (mi_on_resume_1): Adjust to use it.
5652 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5653 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5654 directly.
5655 (interrupt_thread_callback): : Adjust to use thread and inferior
5656 pointers.
5657 * proc-service.c: Include "gdbthread.h".
5658 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5659 * progspace-and-thread.c: Include "inferior.h".
5660 * progspace.c: Include "inferior.h".
5661 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5662 hold a reference to an inferior_object.
5663 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5664 inferior_thread.
5665 * python/py-inferior.c (struct inferior_object): Give the type a
5666 tag name instead of a typedef.
5667 (python_on_normal_stop): No need to check if the current thread is
5668 listed.
5669 (inferior_to_inferior_object): Change return type to
5670 inferior_object. All callers adjusted.
5671 (find_thread_object): Delete, bits factored out to ...
5672 (thread_to_thread_object): ... this new function.
5673 * python/py-infthread.c (create_thread_object): Use
5674 inferior_to_inferior_object.
5675 (thpy_is_stopped): Use thread pointer directly.
5676 (gdbpy_selected_thread): Use inferior_thread.
5677 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5678 field, replaced with ...
5679 <thread>: ... this new field. All users adjusted.
5680 (btpy_insn_or_gap_new): Drop const.
5681 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5682 callers adjusted.
5683 * python/py-record.c: Include "gdbthread.h".
5684 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5685 a ptid_t. All callers adjusted.
5686 (gdbpy_current_recording): Use inferior_thread.
5687 * python/py-record.h (recpy_record_object) <ptid>: Delete
5688 field, replaced with ...
5689 <thread>: ... this new field. All users adjusted.
5690 (recpy_element_object) <ptid>: Delete
5691 field, replaced with ...
5692 <thread>: ... this new field. All users adjusted.
5693 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5694 a ptid_t. All callers adjusted.
5695 * python/py-threadevent.c: Include "gdbthread.h".
5696 (get_event_thread): Use thread_to_thread_object.
5697 * python/python-internal.h (struct inferior_object): Forward
5698 declare.
5699 (find_thread_object, find_inferior_object): Delete declarations.
5700 (thread_to_thread_object, inferior_to_inferior_object): New
5701 declarations.
5702 * record-btrace.c: Include "inferior.h".
5703 (require_btrace_thread): Use inferior_thread.
5704 (record_btrace_frame_sniffer)
5705 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5706 (get_thread_current_frame): Use scoped_restore_current_thread and
5707 switch_to_thread.
5708 (get_thread_current_frame): Use thread pointer directly.
5709 (record_btrace_replay_at_breakpoint): Use thread's inferior
5710 pointer directly.
5711 * record-full.c: Include "inferior.h".
5712 * regcache.c: Include "gdbthread.h".
5713 (get_thread_arch_regcache): Use the inferior's address space
5714 directly.
5715 (get_thread_regcache, registers_changed_thread): New.
5716 * regcache.h (get_thread_regcache(thread_info *thread)): New
5717 overload.
5718 (registers_changed_thread): New.
5719 (remote_target) <remote_detach_1>: Swap order of parameters.
5720 (remote_add_thread): <remote_add_thread>: Return the new thread.
5721 (get_remote_thread_info(ptid_t)): New overload.
5722 (remote_target::remote_notice_new_inferior): Use thread pointers
5723 directly.
5724 (remote_target::process_initial_stop_replies): Use
5725 thread_info::set_running.
5726 (remote_target::remote_detach_1, remote_target::detach)
5727 (extended_remote_target::detach): Adjust.
5728 * stack.c (frame_show_address): Use inferior_thread.
5729 * target-debug.h (target_debug_print_thread_info_pp): New.
5730 * target-delegates.c: Regenerate.
5731 * target.c (default_thread_address_space): Delete.
5732 (memory_xfer_partial_1): Use current_inferior.
5733 (target_detach): Use current_inferior.
5734 (target_thread_address_space): Delete.
5735 (generic_mourn_inferior): Use current_inferior.
5736 * target.h (struct target_ops) <thread_address_space>: Delete.
5737 (target_thread_address_space): Delete.
5738 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5739 pointers directly.
5740 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5741 thread pointer instead of a ptid_t. Adjust all callers.
5742 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5743 (first_thread_of_process): Delete, replaced by ...
5744 (first_thread_of_inferior): ... this new function. All callers
5745 adjusted.
5746 (any_thread_of_process): Rename to ...
5747 (any_thread_of_inferior): ... this, and take an inferior pointer.
5748 (any_live_thread_of_process): Rename to ...
5749 (any_live_thread_of_inferior): ... this, and take an inferior
5750 pointer.
5751 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5752 (value_in_thread_stack_temporaries)
5753 (get_last_thread_stack_temporary): Take a thread pointer instead
5754 of a ptid_t. Adjust all callers.
5755 (thread_info::set_running): New.
5756 (validate_registers_access): Use inferior_thread.
5757 (can_access_registers_ptid): Rename to ...
5758 (can_access_registers_thread): ... this, and take a thread
5759 pointer.
5760 (print_thread_info_1): Adjust to compare thread pointers instead
5761 of ptids.
5762 (switch_to_no_thread, switch_to_thread): Make extern.
5763 (scoped_restore_current_thread::~scoped_restore_current_thread):
5764 Use m_thread pointer directly.
5765 (scoped_restore_current_thread::scoped_restore_current_thread):
5766 Use inferior_thread.
5767 (thread_command): Use thread pointer directly.
5768 (thread_num_make_value_helper): Use inferior_thread.
5769 * top.c (execute_command): Use inferior_thread.
5770 * tui/tui-interp.c: Include "inferior.h".
5771 * varobj.c (varobj_create): Use inferior_thread.
5772 (value_of_root_1): Use find_thread_global_id instead of
5773 global_thread_id_to_ptid.
5774
5775 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5776
5777 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5778 possible.
5779 (regcache::write_part): Likewise.
5780 (readable_regcache::cooked_read_part): Update comment.
5781 (readable_regcache::cooked_write_part): Likewise.
5782 * regcache.h: (readable_regcache::read_part): Likewise.
5783 (regcache::write_part): Likewise.
5784
5785 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5786 Dirk Schubert <dirk.schubert@arm.com>
5787
5788 * aarch64-linux-nat.c (post_attach): New.
5789 (aarch64_linux_nat_target::post_attach): Override post_attach to
5790 record the number of hardware debug registers.
5791
5792 2018-06-20 Tom Tromey <tom@tromey.com>
5793
5794 * python/py-param.c (add_setshow_generic): Make parameters const.
5795 (parmpy_init): Update.
5796
5797 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5798
5799 * regcache.h (regcache_cooked_read_ftype): Rename to...
5800 (register_read_ftype): ...this, change type to function_view.
5801 (class reg_buffer) <save>: Remove src parameter.
5802 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5803 parameter non-const in first overload. Remove src parameter in
5804 second overload.
5805 * regcache.c (do_cooked_read): Remove.
5806 (readonly_detached_regcache::readonly_detached_regcache): Make
5807 parameter non-const, adjust call to other constructor.
5808 (reg_buffer::save): Remove src parameter.
5809 * frame.c (do_frame_register_read): Remove.
5810 (frame_save_as_regcache): Use lambda function.
5811 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5812 parameter to ppu2spu_data *.
5813 (ppu2spu_sniffer): Use lambda function.
5814
5815 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5816
5817 * record-full.c (record_full_target::insert_breakpoint): Remove
5818 "struct" keyword, add const.
5819
5820 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5821
5822 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5823 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5824 * configure.ac: Remove AC_PREREQ, add missing quoting.
5825 * gnulib/configure.ac: Modernize usage of
5826 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5827 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5828 (AUTOMAKE_VERSION): Bump to 1.15.1.
5829 * configure: Re-generate.
5830 * config.in: Re-generate.
5831 * aclocal.m4: Re-generate.
5832 * gnulib/aclocal.m4: Re-generate.
5833 * gnulib/config.in: Re-generate.
5834 * gnulib/configure: Re-generate.
5835 * gnulib/import/Makefile.in: Re-generate.
5836
5837 2018-06-19 Pedro Alves <palves@redhat.com>
5838
5839 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5840 (lookup_minimal_symbol_by_pc_section): ... here with
5841 gdb_assert_not_reached added.
5842
5843 2018-06-19 Pedro Alves <palves@redhat.com>
5844
5845 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5846 parameter with a block parameter. Compare location's block symbol
5847 with the frame's block instead of addresses.
5848 (skip_inline_frames): Pass the current block instead of the
5849 frame's address. Break out as soon as we determine the frame
5850 should not be skipped.
5851
5852 2018-06-18 Tom Tromey <tom@tromey.com>
5853
5854 * solib-aix.c (solib_aix_get_section_offsets): Return
5855 unique_xmalloc_ptr.
5856 (solib_aix_solib_create_inferior_hook): Update.
5857
5858 2018-06-18 Tom Tromey <tom@tromey.com>
5859
5860 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5861
5862 2018-06-18 Tom Tromey <tom@tromey.com>
5863
5864 * solib-frv.c (frv_relocate_main_executable): Use
5865 unique_xmalloc_ptr.
5866 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5867 unique_xmalloc_ptr.
5868
5869 2018-06-18 Tom Tromey <tom@tromey.com>
5870
5871 * objfiles.h (inhibit_section_map_updates): Update.
5872 (resume_section_map_updates, resume_section_map_updates_cleanup):
5873 Remove.
5874 * solib-svr4.c (svr4_handle_solib_event): Update.
5875 * objfiles.c (inhibit_section_map_updates): Return
5876 scoped_restore_tmpl<int>.
5877 (resume_section_map_updates, resume_section_map_updates_cleanup):
5878 Remove.
5879
5880 2018-06-18 Tom Tromey <tom@tromey.com>
5881
5882 * valprint.h (read_string): Update.
5883 * valprint.c (read_string): Change type of "buffer".
5884 (val_print_string): Update.
5885 * python/py-value.c (valpy_string): Update.
5886 * language.h (struct language_defn) <la_get_string>: Change
5887 type of "buffer".
5888 (default_get_string, c_get_string): Update.
5889 * language.c (default_get_string): Change type of "buffer".
5890 * guile/scm-value.c (gdbscm_value_to_string): Update.
5891 * c-lang.c (c_get_string): Change type of "buffer".
5892
5893 2018-06-18 Tom Tromey <tom@tromey.com>
5894
5895 * ser-mingw.c (struct pipe_state_destroyer): New.
5896 (pipe_state_up): New typedef.
5897 (cleanup_pipe_state): Remove.
5898 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5899
5900 2018-06-18 Tom Tromey <tom@tromey.com>
5901
5902 * rust-lang.h (rust_yyerror): Don't declare.
5903 * rust-lang.c (rust_language_defn): Update.
5904 * rust-exp.y (yyerror): Now static.
5905 * parse.c (parse_exp_in_context_1): Update.
5906 * p-lang.h (p_yyerror): Don't declare.
5907 * p-lang.c (p_language_defn): Update.
5908 * p-exp.y (yyerror): Now static.
5909 * opencl-lang.c (opencl_language_defn): Update.
5910 * objc-lang.c (objc_language_defn): Update.
5911 * m2-lang.h (m2_yyerror): Don't declare.
5912 * m2-lang.c (m2_language_defn): Update.
5913 * m2-exp.y (yyerror): Now static.
5914 * language.h (struct language_defn) <la_error>: Remove.
5915 * language.c (unk_lang_error): Remove.
5916 (unknown_language_defn, auto_language_defn): Remove.
5917 * go-lang.h (go_yyerror): Don't declare.
5918 * go-lang.c (go_language_defn): Update.
5919 * go-exp.y (yyerror): Now static.
5920 * f-lang.h (f_yyerror): Don't declare.
5921 * f-lang.c (f_language_defn): Update.
5922 * f-exp.y (yyerror): Now static.
5923 * d-lang.h (d_yyerror): Don't declare.
5924 * d-lang.c (d_language_defn): Update.
5925 * d-exp.y (yyerror): Now static.
5926 * c-lang.h (c_yyerror): Don't declare.
5927 * c-lang.c (c_language_defn, cplus_language_defn)
5928 (asm_language_defn, minimal_language_defn): Update.
5929 * c-exp.y (yyerror): Now static.
5930 * ada-lang.h (ada_yyerror): Don't declare.
5931 * ada-lang.c (ada_language_defn): Update.
5932 * ada-exp.y (yyerror): Now static.
5933
5934 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5935
5936 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5937 (store_sveregs_to_thread): Likewise.
5938 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5939 (aarch64_linux_store_inferior_registers): Likewise.
5940 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5941 function.
5942 (aarch64_sve_regs_copy_to_regcache): Likewise.
5943 (aarch64_sve_regs_copy_from_regcache): Likewise.
5944 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5945 declaration.
5946 (aarch64_sve_regs_copy_to_regcache): Likewise.
5947 (aarch64_sve_regs_copy_from_regcache): Likewise.
5948 (sve_context): Structure from Linux headers.
5949 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5950 (SVE_SIG_ZREG_SIZE): Likewise.
5951 (SVE_SIG_PREG_SIZE): Likewise.
5952 (SVE_SIG_FFR_SIZE): Likewise.
5953 (SVE_SIG_REGS_OFFSET): Likewise.
5954 (SVE_SIG_ZREGS_OFFSET): Likewise.
5955 (SVE_SIG_ZREG_OFFSET): Likewise.
5956 (SVE_SIG_ZREGS_SIZE): Likewise.
5957 (SVE_SIG_PREGS_OFFSET): Likewise.
5958 (SVE_SIG_PREG_OFFSET): Likewise.
5959 (SVE_SIG_PREGS_SIZE): Likewise.
5960 (SVE_SIG_FFR_OFFSET): Likewise.
5961 (SVE_SIG_REGS_SIZE): Likewise.
5962 (SVE_SIG_CONTEXT_SIZE): Likewise.
5963 (SVE_PT_REGS_MASK): Likewise.
5964 (SVE_PT_REGS_FPSIMD): Likewise.
5965 (SVE_PT_REGS_SVE): Likewise.
5966 (SVE_PT_VL_INHERIT): Likewise.
5967 (SVE_PT_VL_ONEXEC): Likewise.
5968 (SVE_PT_REGS_OFFSET): Likewise.
5969 (SVE_PT_FPSIMD_OFFSET): Likewise.
5970 (SVE_PT_FPSIMD_SIZE): Likewise.
5971 (SVE_PT_SVE_ZREG_SIZE): Likewise.
5972 (SVE_PT_SVE_PREG_SIZE): Likewise.
5973 (SVE_PT_SVE_FFR_SIZE): Likewise.
5974 (SVE_PT_SVE_FPSR_SIZE): Likewise.
5975 (SVE_PT_SVE_FPCR_SIZE): Likewise.
5976 (__SVE_SIG_TO_PT): Likewise.
5977 (SVE_PT_SVE_OFFSET): Likewise.
5978 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5979 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5980 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5981 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5982 (SVE_PT_SVE_PREG_OFFSET): Likewise.
5983 (SVE_PT_SVE_PREGS_SIZE): Likewise.
5984 (SVE_PT_SVE_FFR_OFFSET): Likewise.
5985 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5986 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5987 (SVE_PT_SVE_SIZE): Likewise.
5988 (SVE_PT_SIZE): Likewise.
5989 (HAS_SVE_STATE): New define.
5990
5991 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5992
5993 * nat/aarch64-sve-linux-sigcontext.h: New file.
5994 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5995 new files.
5996 (SVE_VQ_MIN): Likewise.
5997 (SVE_VQ_MAX): Likewise.
5998 (SVE_VL_MIN): Likewise.
5999 (SVE_VL_MAX): Likewise.
6000 (SVE_NUM_ZREGS): Likewise.
6001 (SVE_NUM_PREGS): Likewise.
6002 (sve_vl_valid): Likewise.
6003 (struct user_sve_header): Likewise.
6004
6005 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6006 Richard Bunt <Richard.Bunt@arm.com>
6007
6008 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6009 was requested by GDB.
6010
6011 2018-06-15 Tom de Vries <tdevries@suse.de>
6012
6013 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6014
6015 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6016
6017 * gnulib/update-gnulib.sh: Print expected versions of
6018 autoconf/aclocal.
6019
6020 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6021
6022 * arch-utils.c (default_type_align): Use type_length_units.
6023 * gdbtypes.c (type_align): Use type_length_units.
6024
6025 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6026
6027 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6028 of 'define' command.
6029
6030 2018-06-14 Tom de Vries <tdevries@suse.de>
6031
6032 PR cli/22573
6033 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6034 get_no_prettyformat_print_options.
6035
6036 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6037
6038 * sparc-nat.h: Include target.h.
6039 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6040 <fetch_registers>: Remove this argument in function call.
6041 <store_registers>: Remove this argument in function call, remove
6042 extra semicolon.
6043 <low_forget_process>: Call sparc64_forget_process instead of
6044 sparc_forget_process.
6045
6046 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6047
6048 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6049 (procfs_target::make_corefile_notes): Adjust to new
6050 target_read_alloc return type.
6051
6052 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6053 Stephen Roberts <stephen.roberts@arm.com>
6054
6055 PR gdb/22882
6056 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6057 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6058 Move should_notify_stop local into more inner scope.
6059
6060 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6061 Stephen Roberts <stephen.roberts@arm.com>
6062
6063 PR gdb/22882
6064 * infrun.c (resume_1): Add call to mark_async_event_handler.
6065
6066 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6067
6068 * infrun.c (do_target_wait): Change old version of $pc printed.
6069
6070 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6071
6072 * dwarf2read.c (read_index_from_section): Rename to...
6073 (read_gdb_index_from_section): ... this, update all callers.
6074 (dwarf2_read_index): Rename to...
6075 (dwarf2_read_gdb_index): ... this, update all callers.
6076
6077 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6078
6079 * gdb/hppa-linux-nat.c
6080 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6081 hppa_linux_nat_target::fetch_registers.
6082
6083 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6084
6085 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6086 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6087 (AARCH64_DWARF_SVE_FFR): Likewise.
6088 (AARCH64_DWARF_SVE_P0): Likewise.
6089 (AARCH64_DWARF_SVE_Z0): Likewise.
6090
6091 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6092
6093 * common/common-regcache.h (raw_compare): New function.
6094 * regcache.c (regcache::raw_compare): Likewise.
6095 * regcache.h (regcache::raw_compare): New declaration.
6096
6097 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6098
6099 * common/common-regcache.h (reg_buffer_common): New structure.
6100 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6101 (reg_buffer::raw_supply): Likewise.
6102 (reg_buffer::raw_supply_integer): Likewise.
6103 (reg_buffer::raw_supply_zeroed): Likewise.
6104 (reg_buffer::raw_collect): Likewise.
6105 (reg_buffer::raw_collect_integer): Likewise.
6106 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6107 (reg_buffer::raw_supply): Likewise.
6108 (reg_buffer::raw_supply_integer): Likewise.
6109 (reg_buffer::raw_supply_zeroed): Likewise.
6110 (reg_buffer::raw_collect): Likewise.
6111 (reg_buffer::raw_collect_integer): Likewise.
6112
6113 2018-06-10 Tom Tromey <tom@tromey.com>
6114
6115 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6116 (class remote_state) <stop_reply_queue>: Now std::vector.
6117 (remote_state::~remote_state)
6118 (remote_target::stop_reply_queue_length): Update.
6119 (struct queue_iter_param, remove_child_of_pending_fork)
6120 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6121 (check_pending_event_prevents_wildcard_vcont_callback)
6122 (remove_stop_reply_for_inferior)
6123 (remove_stop_reply_of_remote_state)
6124 (remote_notif_remove_once_on_match)
6125 (stop_reply_match_ptid_and_ws)
6126 (remote_kill_child_of_pending_fork): Remove.
6127 (remote_target::remove_new_fork_children)
6128 (remote_target::check_pending_events_prevent_wildcard_vcont)
6129 (remote_target::discard_pending_stop_replies)
6130 (remote_target::discard_pending_stop_replies_in_queue)
6131 (remote_target::remote_notif_remove_queued_reply)
6132 (remote_target::queued_stop_reply)
6133 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6134 (remote_target::wait, remote_target::kill_new_fork_children)
6135 (remote_target::async): Update.
6136
6137 2018-06-10 Tom Tromey <tom@tromey.com>
6138
6139 * record-full.c (record_full_arch_list_cleanups): Remove.
6140 (record_full_message): Use try/catch.
6141 (record_full_wait_cleanups): Remove.
6142 (record_full_wait_1): Use try/catch.
6143 (record_full_restore): Likewise.
6144
6145 2018-06-10 Tom Tromey <tom@tromey.com>
6146
6147 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6148 declare VEC. Add constructor.
6149 <in_target_beneath>: Now bool.
6150 (record_full_breakpoints): Now a std::vector, static.
6151 (record_full_sync_record_breakpoints)
6152 (record_full_init_record_breakpoints)
6153 (record_full_target::insert_breakpoint)
6154 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6155
6156 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6157
6158 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6159 * serial.c (serial_interface_lookup): Remove struct keyword.
6160
6161 2018-06-10 Tom Tromey <tom@tromey.com>
6162
6163 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6164 method.
6165 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6166 a method.
6167 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6168 method.
6169 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6170 "beneath" as a method.
6171 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6172 Use "beneath" as a method.
6173
6174 2018-06-10 Tom Tromey <tom@tromey.com>
6175
6176 * tracefile.c (struct trace_file_writer_deleter): New.
6177 <operator()>: Rename from trace_file_writer_xfree.
6178 (trace_file_writer_up): New typedef.
6179 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6180
6181 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6182
6183 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6184 <m_registers, m_register_status>: Change type to
6185 std::unique_ptr.
6186 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6187 XCNEWVEC.
6188
6189 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6190
6191 * common/common-regcache.h (enum register_status): Add
6192 underlying type "signed char".
6193 * regcache.h (reg_buffer) <m_register_status>: Change type to
6194 register_status *.
6195 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6196 register_status instead of signed char.
6197 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6198 (reg_buffer::get_register_status): Remove cast.
6199 (readable_regcache::raw_read): Remove cast.
6200 (readable_regcache::cooked_read): Remove cast.
6201
6202 2018-06-09 Tom Tromey <tom@tromey.com>
6203
6204 * source.c (reverse_search_command, forward_search_command): Use
6205 scoped_fd.
6206
6207 2018-06-09 Tom Tromey <tom@tromey.com>
6208
6209 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6210 (serial_ops_list): Now static, std::vector.
6211 (serial_interface_lookup, serial_add_interface): Update.
6212
6213 2018-06-09 Tom Tromey <tom@tromey.com>
6214
6215 * dwarf2read.c (process_cu_includes): Update.
6216 (process_full_comp_unit): Update.
6217 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6218 std::vector.
6219
6220 2018-06-08 Paul Koning <paul_koning@dell.com>
6221
6222 PR gdb/23252
6223
6224 * python/python.c (do_start_initialization):
6225 Avoid call to internal Python API.
6226 (init__gdb_module): New function.
6227
6228 2018-06-08 Gary Benson <gbenson@redhat.com>
6229
6230 * linux-thread-db.c (valprint.h): New include.
6231 (struct check_thread_db_info): New structure.
6232 (check_thread_db_on_load, tdb_testinfo): New static globals.
6233 (check_thread_db, check_thread_db_callback): New functions.
6234 (try_thread_db_load_1): Run integrity checks if requested.
6235 (maintenance_check_libthread_db): New function.
6236 (_initialize_thread_db): Register "maint check libthread-db"
6237 and "maint set/show check-libthread-db".
6238 * NEWS: Mention the above new commands.
6239
6240 2018-06-08 Tom Tromey <tom@tromey.com>
6241
6242 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6243 now a method.
6244
6245 2018-06-08 Tom Tromey <tom@tromey.com>
6246
6247 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6248
6249 2018-06-08 Tom Tromey <tom@tromey.com>
6250
6251 * common/btrace-common.h (struct btrace_data): Add constructor,
6252 destructor, move assignment operator.
6253 <empty, clear, fini>: New methods.
6254 <format>: Initialize.
6255 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6256 (btrace_data_empty): Don't declare.
6257 * common/btrace-common.c (btrace_data_init): Remove.
6258 (btrace_data::fini): Rename from btrace_data_fini.
6259 (btrace_data::empty): Rename from btrace_data_empty.
6260 (btrace_data::clear): Rename from btrace_data_clear. Return
6261 bool.
6262 * btrace.h (make_cleanup_btrace_data): Don't declare.
6263 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6264 (parse_xml_btrace): Update.
6265 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6266 (maint_btrace_clear_packet_history_cmd): Update.
6267
6268 2018-06-07 Pedro Alves <palves@redhat.com>
6269
6270 * target.h (target_ops) <beneath>: Now a method. All references
6271 updated.
6272 (class target_stack): New.
6273 * target.c (g_target_stack): New.
6274 (g_current_top_target): Delete.
6275 (current_top_target): Get the top target out of g_target_stack.
6276 (target_stack::push, target_stack::unpush): New.
6277 (push_target, unpush_target): Reimplement.
6278 (target_is_pushed): Reimplement in terms of g_target_stack.
6279 (target_ops::beneath, target_stack::find_beneath): New.
6280
6281 2018-06-07 Pedro Alves <palves@redhat.com>
6282
6283 * target.h (find_target_beneath): Delete declaration.
6284 * target.c (find_target_beneath): Delete definition.
6285 * aix-thread.c: All callers of find_target_beneath adjusted to
6286 call target_ops::beneath instead.
6287 * bsd-uthread.c: Likewise.
6288 * linux-thread-db.c: Likewise.
6289 * ravenscar-thread.c: Likewise.
6290 * sol-thread.c: Likewise.
6291 * spu-multiarch.c: Likewise.
6292
6293 2018-06-07 Pedro Alves <palves@redhat.com>
6294
6295 * target.h (target_ops) <beneath>: Now a method. All references
6296 updated.
6297 (target_ops) <m_beneath>: New.
6298 * target.c (target_ops::beneath): New.
6299 * corelow.c: Adjust all references to target_ops::beneath.
6300 * linux-thread-db.c: Likewise.
6301 * make-target-delegates: Likewise.
6302 * record-btrace.c: Likewise.
6303 * record-full.c: Likewise.
6304 * remote.c: Likewise.
6305 * target.c: Likewise.
6306 * target-delegates.c: Regenerate.
6307
6308 2018-06-07 Pedro Alves <palves@redhat.com>
6309
6310 * target.h (target_stack): Delete.
6311 (current_top_target): Declare function.
6312 * target.c (target_stack): Delete.
6313 (g_current_top_target): New.
6314 (current_top_target): New function.
6315 * auxv.c: Use current_top_target instead of target_stack
6316 throughout.
6317 * avr-tdep.c: Likewise.
6318 * breakpoint.c: Likewise.
6319 * corefile.c: Likewise.
6320 * elfread.c: Likewise.
6321 * eval.c: Likewise.
6322 * exceptions.c: Likewise.
6323 * frame.c: Likewise.
6324 * gdbarch-selftests.c: Likewise.
6325 * gnu-v3-abi.c: Likewise.
6326 * ia64-tdep.c: Likewise.
6327 * ia64-vms-tdep.c: Likewise.
6328 * infcall.c: Likewise.
6329 * infcmd.c: Likewise.
6330 * infrun.c: Likewise.
6331 * linespec.c: Likewise.
6332 * linux-tdep.c: Likewise.
6333 * minsyms.c: Likewise.
6334 * ppc-linux-nat.c: Likewise.
6335 * ppc-linux-tdep.c: Likewise.
6336 * procfs.c: Likewise.
6337 * regcache.c: Likewise.
6338 * remote.c: Likewise.
6339 * rs6000-tdep.c: Likewise.
6340 * s390-linux-nat.c: Likewise.
6341 * s390-tdep.c: Likewise.
6342 * solib-aix.c: Likewise.
6343 * solib-darwin.c: Likewise.
6344 * solib-dsbt.c: Likewise.
6345 * solib-spu.c: Likewise.
6346 * solib-svr4.c: Likewise.
6347 * solib-target.c: Likewise.
6348 * sparc-tdep.c: Likewise.
6349 * sparc64-tdep.c: Likewise.
6350 * spu-tdep.c: Likewise.
6351 * symfile.c: Likewise.
6352 * symtab.c: Likewise.
6353 * target-descriptions.c: Likewise.
6354 * target-memory.c: Likewise.
6355 * target.c: Likewise.
6356 * target.h: Likewise.
6357 * tracefile-tfile.c: Likewise.
6358 * tracepoint.c: Likewise.
6359 * valops.c: Likewise.
6360 * valprint.c: Likewise.
6361 * value.c: Likewise.
6362 * windows-tdep.c: Likewise.
6363 * mi/mi-main.c: Likewise.
6364
6365 2018-06-07 Tom Tromey <tom@tromey.com>
6366
6367 * valprint.h (build_address_symbolic): Declare.
6368 * printcmd.c (print_address_symbolic): Update.
6369 (build_address_symbolic): Change "name" and "filename" to
6370 std::string.
6371 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6372 Update.
6373 * defs.h (build_address_symbolic): Remove declaration.
6374
6375 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6376
6377 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6378 (aarch64_vnv_type): Add function.
6379 (aarch64_pseudo_register_name): Add V regs for SVE.
6380 (aarch64_pseudo_register_type): Likewise.
6381 (aarch64_pseudo_register_reggroup_p): Likewise.
6382 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6383 (aarch64_pseudo_read_value): Add V regs for SVE.
6384 (aarch64_pseudo_write_2): Use V0 offset for SVE
6385 (aarch64_pseudo_write): Add V regs for SVE.
6386 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6387
6388 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6389
6390 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6391 (sve_vl_from_vq): Likewise.
6392
6393 2018-06-05 Tom Tromey <tom@tromey.com>
6394
6395 * cli/cli-cmds.c (show_version): Update.
6396 * top.c (print_gdb_version): Add "interactive" parameter.
6397 Update.
6398 * main.c (captured_main_1): Update.
6399 * top.h (print_gdb_version): Add "interactive" parameter and a
6400 comment.
6401
6402 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6403
6404 * common/enum-flags.h: Add trailing semicolon to example in
6405 comment.
6406
6407 2018-06-05 Tom Tromey <tom@tromey.com>
6408
6409 PR cli/12326:
6410 * NEWS: Add entry about pager.
6411 * utils.c (pagination_disabled_for_command): New global.
6412 (prompt_for_continue): Allow "c" response to prompt.
6413 (reinitialize_more_filter): Clear
6414 pagination_disabled_for_command.
6415 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6416
6417 2018-06-04 Tom Tromey <tom@tromey.com>
6418
6419 * ada-lang.h (ada_lookup_symbol_list): Update.
6420 * ada-lang.c (resolve_subexp): Update.
6421 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6422 parameter.
6423 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6424 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6425 results parameter to std::vector.
6426 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6427 Update.
6428 * ada-exp.y (block_lookup): Update.
6429 (select_possible_type_sym): Change type of syms. Remove nsyms
6430 parameter.
6431 (write_var_or_type, write_name_assoc): Update.
6432
6433 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6434
6435 * windows-nat.c (windows_nat_target::xfer_partial): Return
6436 TARGET_XFER_E_IO if we need to delegate to the target beneath
6437 but BENEATH is NULL.
6438
6439 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6440
6441 * Makefile.in (config.status): Add configure.nat as a
6442 dependency.
6443
6444 2018-06-04 Tom Tromey <tom@tromey.com>
6445
6446 * cp-name-parser.y (cpname_state): Add method declarations.
6447 (HANDLE_QUAL): Update.
6448 (cpname_state::d_grab, cpname_state::fill_comp)
6449 (cpname_state::make_operator, cpname_state::make_dtor)
6450 (cpname_state::make_builtin_type, cpname_state::make_name)
6451 (cpname_state::d_qualify, cpname_state::d_int_type)
6452 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6453 (%union): Move earlier.
6454
6455 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6456
6457 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6458
6459 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6460
6461 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6462 (aarch64_pseudo_write_1): Likewise.
6463 (aarch64_pseudo_read_value): Use helper.
6464 (aarch64_pseudo_write): Likewise.
6465
6466 2018-06-04 Pedro Alves <palves@redhat.com>
6467
6468 * darwin-nat.c (darwin_ops): Delete.
6469 (darwin_attach_pid): Use get_native_target.
6470
6471 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6472
6473 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6474 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6475
6476 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6477
6478 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6479 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6480 (aarch64_gdbarch_init): Check for SVE.
6481 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6482
6483 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6484
6485 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6486 * aarch64-tdep.h (aarch64_read_description): Likewise.
6487 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6488 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6489 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6490 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6491 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6492
6493 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6494
6495 * value.c (value_fetch_lazy_bitfield): New.
6496 (value_fetch_lazy_memory): New.
6497 (value_fetch_lazy_register): New.
6498 (value_fetch_lazy): Factor out to smaller functions.
6499
6500 2018-06-01 Tom Tromey <tom@tromey.com>
6501
6502 * cp-name-parser.y (backslashable, represented): Now const.
6503
6504 2018-06-01 Tom Tromey <tom@tromey.com>
6505
6506 * cp-name-parser.y: Include parser-defs.h.
6507 (parser_fprintf): Remove declaration.
6508
6509 2018-06-01 Tom Tromey <tom@tromey.com>
6510
6511 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6512 %parse-param.
6513 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6514 (global_result): Remove globals.
6515 (struct cpname_state): New.
6516 (yyparse): Don't declare.
6517 (yylex, yyerror): Move declarations after %union.
6518 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6519 (make_name): Add state parameter.
6520 Update all callers.
6521 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6522 parameter.
6523 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6524 Update.
6525 (yylex): Add lvalp, state parameters.
6526 (yyerror): Add state parameter.
6527 (cp_demangled_name_to_comp): Update.
6528
6529 2018-06-01 Tom Tromey <tom@tromey.com>
6530
6531 * cp-name-parser.y (parser_fprintf): Declare.
6532 (GDB_YY_REMAP_PREFIX): Define.
6533 Include yy-remap.h. Don't redefine yy* identifiers.
6534
6535 2018-06-01 Tom Tromey <tom@tromey.com>
6536
6537 * python/py-type.c (typy_legacy_template_argument): Update.
6538 * cp-support.h (cp_demangled_name_to_comp): Update.
6539 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6540 parameter to be a "std::string *".
6541 (main): Update.
6542
6543 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6544
6545 * ada-lex.l: Include "diagnostics.h" instead of
6546 "common/diagnostics.h".
6547 * unittests/environ-selftests.c: Likewise.
6548 * common/diagnostics.h: Moved to ../include.
6549
6550 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6551
6552 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6553 to language_mode_manual while calling breakpoint_re_set_one.
6554
6555 2018-06-01 Tom Tromey <tom@tromey.com>
6556
6557 * valops.c (value_cast_structs, destructor_name_p): Update.
6558 * symtab.c (gdb_mangle_name): Update.
6559 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6560 Update.
6561 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6562 (pascal_object_print_value_fields, pascal_object_print_value):
6563 Update.
6564 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6565 * linespec.c (find_methods): Update.
6566 * gdbtypes.h (type_name_no_tag): Remove.
6567 (type_name_or_error): Rename from type_name_no_tag_or_error.
6568 * gdbtypes.c (type_name_no_tag): Remove.
6569 (type_name_or_error): Rename from type_name_no_tag_or_error.
6570 (lookup_struct_elt_type, check_typedef): Update.
6571 * expprint.c (print_subexp_standard): Update.
6572 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6573 * d-namespace.c (d_lookup_nested_symbol): Update.
6574 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6575 (cp_print_class_member): Update.
6576 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6577 * completer.c (add_struct_fields): Update.
6578 * c-typeprint.c (cp_type_print_derivation_info)
6579 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6580 Update.
6581 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6582 (ada_prefer_type, ada_is_exception_sym): Update.
6583
6584 2018-06-01 Tom Tromey <tom@tromey.com>
6585
6586 * valops.c (enum_constant_from_type, value_namespace_elt)
6587 (value_maybe_namespace_elt): Update.
6588 * valarith.c (find_size_for_pointer_math): Update.
6589 * target-descriptions.c (make_gdb_type): Update.
6590 * symmisc.c (print_symbol): Update.
6591 * stabsread.c (define_symbol, read_type)
6592 (complain_about_struct_wipeout, add_undefined_type)
6593 (cleanup_undefined_types_1): Update.
6594 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6595 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6596 (rust_internal_print_type, rust_composite_type)
6597 (rust_evaluate_funcall, rust_evaluate_subexp)
6598 (rust_inclusive_range_type_p): Update.
6599 * python/py-type.c (typy_get_tag): Update.
6600 * p-typeprint.c (pascal_type_print_base): Update.
6601 * mdebugread.c (parse_symbol, parse_type): Update.
6602 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6603 Update.
6604 * guile/scm-type.c (gdbscm_type_tag): Update.
6605 * go-lang.c (sixg_string_p): Update.
6606 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6607 Update.
6608 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6609 (TYPE_TAG_NAME): Remove.
6610 * gdbtypes.c (type_name_no_tag): Simplify.
6611 (check_typedef, check_types_equal, recursive_dump_type)
6612 (copy_type_recursive, arch_composite_type): Update.
6613 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6614 in summary mode when needed.
6615 * eval.c (evaluate_funcall): Update.
6616 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6617 (process_structure_scope, read_enumeration_type)
6618 (read_namespace_type, read_module_type, determine_prefix): Update.
6619 * cp-support.c (inspect_type): Update.
6620 * coffread.c (process_coff_symbol, decode_base_type): Update.
6621 * c-varobj.c (c_is_path_expr_parent): Update.
6622 * c-typeprint.c (c_type_print_base_struct_union): Update.
6623 (c_type_print_base_1): Update. Print struct/class/union/enum in
6624 summary when using C language.
6625 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6626 (gen_maybe_namespace_elt): Update.
6627 * ada-lang.c (ada_type_name): Simplify.
6628 (empty_record, ada_template_to_fixed_record_type_1)
6629 (template_to_static_fixed_type)
6630 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6631
6632 2018-06-01 Tom Tromey <tom@tromey.com>
6633
6634 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6635 c_print_type.
6636 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6637 (c_print_type): Update.
6638 (c_print_type): New overload.
6639 (c_type_print_varspec_prefix, c_type_print_args)
6640 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6641 (c_type_print_base_struct_union, c_type_print_base_1)
6642 (cp_type_print_method_args): Add "language" parameter.
6643 (c_type_print_base): Update.
6644 * c-lang.h (c_print_type): Add new overload.
6645
6646 2018-06-01 Tom Tromey <tom@tromey.com>
6647
6648 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6649 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6650
6651 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6652
6653 * aarch64-tdep.c (aarch64_sve_register_names): New const
6654 var.
6655 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6656 (AARCH64_SVE_Z_REGS_NUM): New define.
6657 (AARCH64_SVE_P_REGS_NUM): Likewise.
6658 (AARCH64_SVE_NUM_REGS): Likewise.
6659
6660 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6661
6662 * nat/linux-ptrace.h [__alpha__]
6663 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6664 definitions.
6665
6666 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6667
6668 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6669 the endianness selected.
6670 * NEWS: Document `set endian auto' mode operation update.
6671
6672 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6673
6674 * Makefile.in: Add new header.
6675 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6676 (sve_vl_from_vg): Likewise.
6677 (sve_vq_from_vl): Likewise.
6678 (sve_vl_from_vq): Likewise.
6679 (sve_vq_from_vg): Likewise.
6680 (sve_vg_from_vq): Likewise.
6681 * configure.nat: Add new c file.
6682 * nat/aarch64-sve-linux-ptrace.c: New file.
6683 * nat/aarch64-sve-linux-ptrace.h: New file.
6684
6685 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6686
6687 * aarch64-linux-nat.c (aarch64_linux_read_description):
6688 Add parmeter zero.
6689 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6690 Likewise.
6691 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6692 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6693 (aarch64_gdbarch_init): Add parmeter zero.
6694 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6695 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6696 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6697 parmeter.
6698 * doc/gdb.texinfo: Describe SVE feature
6699 * features/aarch64-sve.c: New file.
6700
6701 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6702
6703 PR gdb/23210
6704 * gdbarch.sh (significant_addr_bit): Default to zero when
6705 not set by target architecture.
6706 * gdbarch.c: Re-generated.
6707 * utils.c (address_significant): Update.
6708
6709 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6710
6711 * stack.c (func_command): Remove trailing newline in call to error.
6712
6713 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6714
6715 * regcache.h (regcache_raw_collect): Remove, update callers to
6716 use regcache::raw_collect.
6717 * regcache.c (regcache_raw_collect): Remove.
6718
6719 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6720
6721 * regcache.h (regcache_raw_supply): Remove, update callers to
6722 use detached_regcache::raw_supply.
6723 * regcache.c (regcache_raw_supply): Remove.
6724
6725 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6726
6727 * regcache.h (regcache_cooked_write_part): Remove, update
6728 callers to use regcache::cooked_write_part.
6729 * regcache.c (regcache_cooked_write_part): Remove.
6730
6731 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6732
6733 * regcache.h (regcache_cooked_read_part): Remove, update callers
6734 to use readable_regcache::cooked_read_part.
6735 * regcache.c (regcache_cooked_read_part): Remove.
6736
6737 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6738
6739 * regcache.h (regcache_cooked_read_value): Remove, update
6740 callers to use readable_regcache::cooked_read_value.
6741 * regcache.c (regcache_cooked_read_value): Remove.
6742
6743 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6744
6745 * regcache.h (regcache_cooked_write): Remove, update callers to
6746 use regcache::cooked_write.
6747 * regcache.c (regcache_cooked_write): Remove.
6748
6749 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6750
6751 * regcache.h (regcache_invalidate): Remove, update callers to
6752 use detached_regcache::invalidate instead.
6753 * regcache.c (regcache_invalidate): Remove.
6754
6755 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6756
6757 * regcache.h (regcache_raw_write_part): Remove, update callers
6758 to use regcache::raw_write_part instead.
6759 * regcache.c (regcache_raw_write_part): Remove.
6760
6761 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6762
6763 * regcache.h (regcache_raw_read_part): Remove, update callers to
6764 use readable_regcache::raw_read_part instead.
6765 * regcache.c (regcache_raw_read_part): Remove.
6766
6767 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6768
6769 * regcache.h (regcache_cooked_read): Remove, update callers to
6770 use readable_regcache::cooked_read instead.
6771 * regcache.c (regcache_cooked_read): Remove.
6772
6773 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6774
6775 * regcache.h (regcache_raw_write): Remove, update callers to use
6776 regcache::raw_write instead.
6777 * regcache.c (regcache_raw_write): Remove.
6778
6779 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6780
6781 * regcache.h (regcache_raw_read): Remove, update callers to use
6782 readable_regcache::raw_read instead.
6783 * regcache.c (regcache_raw_read): Remove.
6784
6785 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6786
6787 * regcache.h (regcache_raw_update): Remove, update callers to
6788 use readable_regcache::raw_update instead.
6789 * regcache.c (regcache_raw_update): Remove.
6790
6791 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6792
6793 * regcache.h (regcache_register_status): Remove, update callers
6794 to use reg_buffer::get_register_status directly instead.
6795 * regcache.c (regcache_register_status): Remove.
6796
6797 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6798
6799 * regcache.h (regcache_get_ptid): Remove, update all callers to
6800 call regcache::ptid instead.
6801 * regcache.c (regcache_get_ptid): Remove.
6802
6803 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6804
6805 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6806
6807 2018-05-30 Pedro Alves <palves@redhat.com>
6808
6809 * common/common-exceptions.h (exception_rethrow): Use
6810 ATTRIBUTE_NORETURN.
6811
6812 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6813
6814 * breakpoint.c (print_solib_event, check_status_catch_solib):
6815 Remove struct keyword in range-based for loops.
6816 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6817 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6818 Likewise.
6819 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6820 Likewise.
6821 * symfile.c (addr_info_make_relative): Likewise.
6822 * thread.c (value_in_thread_stack_temporaries): Likewise.
6823
6824 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6825
6826 PR gdb/16841
6827 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6828 aggregate type to get its real type before accessing it.
6829
6830 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6831
6832 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6833 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6834 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6835 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6836 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6837 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6838 * printcmd.c (info_address_command): Likewise.
6839
6840 2018-05-29 Tom Tromey <tom@tromey.com>
6841
6842 * windows-nat.c (handle_exception): Update fall-through comment.
6843
6844 2018-05-29 Tom Tromey <tom@tromey.com>
6845
6846 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6847 (struct program_space) <added_solibs>: Now a std::vector.
6848 * breakpoint.c (print_solib_event): Update.
6849 (check_status_catch_solib): Update.
6850 * progspace.c (clear_program_space_solib_cache): Update.
6851 * solib.c (update_solib_list): Update.
6852
6853 2018-05-29 Tom Tromey <tom@tromey.com>
6854
6855 * python/py-type.c (typy_richcompare): Update.
6856 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6857 * gdbtypes.h (types_deeply_equal): Return bool.
6858 (types_equal): Likewise.
6859 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6860 declare VEC.
6861 (check_types_equal): Change worklist to std::vector. Return
6862 bool.
6863 (struct type_equality_entry): Add constructor.
6864 (compare_maybe_null_strings): Return bool.
6865 (check_types_worklist): Return bool. Change worklist to
6866 std::vector.
6867 (types_deeply_equal): Use std::vector.
6868 (types_equal): Return bool.
6869 (compare_maybe_null_strings): Simplify.
6870
6871 2018-05-29 Tom Tromey <tom@tromey.com>
6872
6873 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6874
6875 2018-05-29 Tom Tromey <tom@tromey.com>
6876
6877 * objc-lang.h: Don't include cp-support.h.
6878 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6879 declare VEC.
6880
6881 2018-05-27 Tom Tromey <tom@tromey.com>
6882
6883 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6884
6885 2018-05-25 Tom Tromey <tom@tromey.com>
6886
6887 * value.c (value::location): Initialize.
6888
6889 2018-05-25 Tom Tromey <tom@tromey.com>
6890
6891 * dbxread.c (init_bincl_list): Remove.
6892 (bincl_list): Now a std::vector.
6893 (bincls_allocated, next_bincl): Remove.
6894 (free_bincl_list, do_free_bincl_list_cleanup)
6895 (make_cleanup_free_bincl_list): Remove.
6896 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6897 unique_xmalloc_ptr.
6898 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6899 (struct header_file_location): Add constructor.
6900 (add_bincl_to_list): Remove.
6901
6902 2018-05-25 Tom Tromey <tom@tromey.com>
6903
6904 * tui/tui.c (tui_enable): Update.
6905 * mi/mi-interp.c (mi_interp::init): Update.
6906 * interps.h (class interp) <name>: New method.
6907 <m_name>: Rename from name.
6908 (~scoped_restore_interp): Update.
6909 * interps.c (interp::interp): Update.
6910 (interp_add, interp_set, interp_lookup_existing)
6911 (current_interp_named_p): Update.
6912
6913 2018-05-25 Tom Tromey <tom@tromey.com>
6914
6915 * interps.c (interp_name): Remove.
6916 * mi/mi-interp.c (mi_interp::init): Update.
6917 * interps.h (interp_name): Remove.
6918 (~scoped_restore_interp): Update.
6919 * tui/tui.c (tui_enable): Update.
6920
6921 2018-05-25 Tom Tromey <tom@tromey.com>
6922
6923 * utils.c (fputs_maybe_filtered): Update.
6924 * linespec.c (decode_line_full): Update.
6925 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6926 (mi_print_breakpoint_for_event, mi_solib_loaded)
6927 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6928 (mi_user_selected_context_changed): Update.
6929 * mi/mi-main.c (mi_execute_command): Update.
6930 * cli/cli-script.c (execute_control_command): Update.
6931 * python/python.c (execute_gdb_command): Update.
6932 * solib.c (info_sharedlibrary_command): Update.
6933 * interps.c (interp_ui_out): Remove.
6934 * interps.h (interp_ui_out): Remove.
6935
6936 2018-05-25 Tom Tromey <tom@tromey.com>
6937
6938 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6939 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6940 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6941
6942 2018-05-25 Tom Tromey <tom@tromey.com>
6943
6944 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6945 * interps.c (interp_exec): Use scoped_restore.
6946
6947 2018-05-25 Tom Tromey <tom@tromey.com>
6948
6949 * remote.c (remote_target::remote_file_get): Use
6950 gdb::byte_vector.
6951 (remote_target::remote_file_put): Likewise.
6952
6953 2018-05-25 Tom Tromey <tom@tromey.com>
6954
6955 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6956 a std::string.
6957 (get_pe_section_index, add_pe_exported_sym): Update.
6958 (read_pe_exported_syms): Use gdb::def_vector.
6959
6960 2018-05-25 Tom Tromey <tom@tromey.com>
6961
6962 * frame.c (remove_prev_frame): Remove.
6963 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6964
6965 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6966
6967 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6968 Remove prototypes.
6969 * mips-linux-nat.c (supply_fpregset): Always call
6970 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6971 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6972 `mips_fill_fpregset'.
6973 * mips-linux-tdep.c (mips_supply_fpregset)
6974 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6975 (mips_fill_fpregset_wrapper): Remove functions.
6976 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6977 (mips_linux_fpregset): Remove variable.
6978 (mips_linux_iterate_over_regset_sections): Use
6979 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6980 (mips_linux_o32_sigframe_init): Remove comment.
6981
6982 2018-05-25 Pedro Alves <palves@redhat.com>
6983
6984 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6985 (struct readahead_cache, struct packet_reg, struct
6986 remote_arch_state, class remote_state): Move higher up in the
6987 file.
6988 (remote_target::m_remote_state): Now an object instead of a pointer.
6989 (remote_target::get_remote_state): Adjust.
6990
6991 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
6992
6993 * stack.c (select_and_print_frame): Delete.
6994 (struct function_bounds): Move struct within function.
6995 (func_command): Most content moved into new function
6996 find_frame_for_function, use new function, print result, add
6997 function comment.
6998 (find_frame_for_function): New function, now returns a result.
6999
7000 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7001
7002 * stack.c (iterate_over_block_arg_vars): Fix comment.
7003 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7004
7005 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7006
7007 PR gdb/23203
7008 * frame.c
7009 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7010 Define.
7011 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7012 Define.
7013 * frame.h (class scoped_restore_selected_frame): New class.
7014 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7015 of any exception, use scoped_restore_selected_frame to restore the
7016 frame instead.
7017
7018 2018-05-24 Pedro Alves <palves@redhat.com>
7019
7020 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7021 override.
7022
7023 2018-05-23 Tom Tromey <tom@tromey.com>
7024
7025 * complaints.c (struct complaints): Remove.
7026 (symfile_complaint_book): Remove.
7027 (series): New global.
7028 (complaint_internal): Update.
7029 (clear_complaints): Update.
7030
7031 2018-05-23 Tom Tromey <tom@tromey.com>
7032
7033 * complaints.c (counters): New global.
7034 (struct complain): Remove.
7035 (struct complaints) <root>: Remove.
7036 (complaint_sentinel): Remove.
7037 (symfile_complaint_book): Update.
7038 (find_complaint) Remove.
7039 (complaint_internal, clear_complaints): Update.
7040
7041 2018-05-23 Tom Tromey <tom@tromey.com>
7042
7043 * complaints.c (struct complain) <file, line>: Remove.
7044 (find_complaint): Remove file, line parameters.
7045 (complaint_internal): Update.
7046
7047 2018-05-23 Tom Tromey <tom@tromey.com>
7048
7049 * complaints.c (vcomplaint): Remove.
7050 (complaint_internal) Merge in contents of vcomplaint.
7051
7052 2018-05-23 Tom Tromey <tom@tromey.com>
7053
7054 * complaints.c (struct complaints) <explanation>: Remove.
7055 (symfile_explanations): Remove.
7056 (symfile_complaint_book): Update.
7057 (vcomplaint): Update.
7058 (struct explanation): Remove.
7059
7060 2018-05-23 Tom Tromey <tom@tromey.com>
7061
7062 * complaints.c (symfile_complaints): Remove.
7063 (complaint_internal): Remove "complaints" parameter.
7064 (clear_complaints, vcomplaint): Remove "c" parameter.
7065 (get_complaints): Remove.
7066 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7067 (dwarf2_debug_line_missing_file_complaint)
7068 (dwarf2_debug_line_missing_end_sequence_complaint)
7069 (dwarf2_complex_location_expr_complaint)
7070 (dwarf2_const_value_length_mismatch_complaint)
7071 (dwarf2_section_buffer_overflow_complaint)
7072 (dwarf2_macro_malformed_definition_complaint)
7073 (dwarf2_invalid_attrib_class_complaint)
7074 (create_addrmap_from_index, dw2_symtab_iter_next)
7075 (dw2_expand_marked_cus)
7076 (dw2_debug_names_iterator::find_vec_in_debug_names)
7077 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7078 (create_debug_type_hash_table, init_cutu_and_read_dies)
7079 (partial_die_parent_scope, add_partial_enumeration)
7080 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7081 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7082 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7083 (create_cus_hash_table, create_dwp_hash_table)
7084 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7085 (dwarf2_rnglists_process, dwarf2_ranges_process)
7086 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7087 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7088 (handle_struct_member_die, process_structure_scope)
7089 (read_array_type, read_common_block, read_module_type)
7090 (read_tag_pointer_type, read_typedef, read_base_type)
7091 (read_subrange_type, load_partial_dies, partial_die_info::read)
7092 (partial_die_info::read, partial_die_info::read)
7093 (partial_die_info::read, read_checked_initial_length_and_offset)
7094 (dwarf2_string_attr, read_formatted_entries)
7095 (dwarf_decode_line_header)
7096 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7097 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7098 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7099 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7100 (get_signatured_type, get_DW_AT_signature_type)
7101 (decode_locdesc, file_file_name, consume_improper_spaces)
7102 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7103 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7104 (dwarf2_symbol_mark_computed, set_die_type)
7105 (read_attribute_value): Update.
7106 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7107 Update.
7108 * dbxread.c (unknown_symtype_complaint)
7109 (lbrac_mismatch_complaint, repeated_header_complaint)
7110 (set_namestring, function_outside_compilation_unit_complaint)
7111 (read_dbx_symtab, process_one_symbol): Update.
7112 * gdbtypes.c (stub_noname_complaint): Update.
7113 * windows-nat.c (handle_unload_dll): Update.
7114 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7115 (decode_base_type): Update.
7116 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7117 (eb_complaint, record_include_begin, record_include_end)
7118 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7119 (process_xcoff_symbol, read_symbol)
7120 (function_outside_compilation_unit_complaint)
7121 (scan_xcoff_symtab): Update.
7122 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7123 * buildsym.c (finish_block_internal, make_blockvector)
7124 (end_symtab_get_static_block, augment_type_symtab): Update.
7125 * dtrace-probe.c (dtrace_process_dof)
7126 (dtrace_static_probe_ops::get_probes): Update.
7127 * complaints.h (struct complaint): Don't declare.
7128 (symfile_complaints): Remove.
7129 (complaint_internal): Remove "complaints" parameter.
7130 (complaint): Likewise.
7131 (clear_complaints): Likewise.
7132 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7133 (reread_symbols): Update.
7134 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7135 (dwarf2_frame_cache, decode_frame_entry): Update.
7136 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7137 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7138 (info_selectors_command): Update.
7139 * macrotab.c (macro_include, check_for_redefinition)
7140 (macro_undef): Update.
7141 * objfiles.c (filter_overlapping_sections): Update.
7142 * stabsread.c (invalid_cpp_abbrev_complaint)
7143 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7144 (define_symbol, error_type, read_type, rs6000_builtin_type)
7145 (stabs_method_name_from_physname, read_member_functions)
7146 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7147 (attach_fields_to_type, complain_about_struct_wipeout)
7148 (read_range_type, read_args, common_block_start)
7149 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7150 Update.
7151 * mdebugread.c (index_complaint, unknown_ext_complaint)
7152 (basic_type_complaint, bad_tag_guess_complaint)
7153 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7154 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7155 (parse_procedure, parse_lines)
7156 (function_outside_compilation_unit_complaint)
7157 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7158 (bad_tag_guess_complaint, reg_value_complaint): Update.
7159 * cp-support.c (demangled_name_complaint): Update.
7160 * macroscope.c (sal_macro_scope): Update.
7161 * dwarf-index-write.c (class debug_names): Update.
7162
7163 2018-05-23 Tom Tromey <tom@tromey.com>
7164
7165 * complaints.c (clear_complaints): Remove "noisy" parameter.
7166 * complaints.h (clear_complaints): Update.
7167 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7168 (reread_symbols): Update.
7169
7170 2018-05-23 Tom Tromey <tom@tromey.com>
7171
7172 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7173 SUBSEQUENT_MESSAGE.
7174 (vcomplaint, clear_complaints): Update.
7175 (symfile_explanations): Remove some messages.
7176
7177 2018-05-23 Tom Tromey <tom@tromey.com>
7178
7179 * complaints.c (internal_complaint): Remove.
7180 * complaints.h (internal_complaint): Remove.
7181
7182 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7183
7184 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7185
7186 2018-05-22 Pedro Alves <palves@redhat.com>
7187
7188 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7189 (remote_fileio_badfd, remote_fileio_return_errno)
7190 (remote_fileio_return_success, remote_fileio_func_open)
7191 (remote_fileio_func_open, remote_fileio_func_close)
7192 (remote_fileio_func_read, remote_fileio_func_write)
7193 (remote_fileio_func_lseek, remote_fileio_func_rename)
7194 (remote_fileio_func_unlink, remote_fileio_func_stat)
7195 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7196 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7197 remote_target parameter.
7198 (remote_fio_func_map) <func>: Add remote_target parameter.
7199 (do_remote_fileio_request, remote_fileio_request):
7200 * remote-fileio.h (remote_fileio_request):
7201 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7202 remote_target parameter.
7203 (remote_notif_process, handle_notification): Adjust to pass down
7204 the remote.
7205 (remote_notif_state_allocate): Add remote_target parameter. Save
7206 it.
7207 * remote-notif.h (struct remote_target): Forward declare.
7208 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7209 remote_target parameter.
7210 (struct remote_notif_state) <remote>: New field.
7211 (remote_notif_ack, remote_notif_parse): Add remote_target
7212 parameter.
7213 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7214 remote_target parameter.
7215 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7216 (threads_listing_context, rmt_thread_action, protocol_feature)
7217 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7218 (packet_result, struct threads_listing_context, remote_state):
7219 Move definitions and declarations higher up.
7220 (remote_target) <~remote_target>: Declare.
7221 (remote_download_command_source, remote_file_put, remote_file_get)
7222 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7223 (remote_hostio_pread_vFile, remote_hostio_send_command)
7224 (remote_hostio_set_filesystem, remote_hostio_open)
7225 (remote_hostio_close, remote_hostio_unlink, remote_state)
7226 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7227 (get_memory_write_packet_size, get_memory_read_packet_size)
7228 (append_pending_thread_resumptions, remote_detach_1)
7229 (append_resumption, remote_resume_with_vcont)
7230 (add_current_inferior_and_thread, wait_ns, wait_as)
7231 (process_stop_reply, remote_notice_new_inferior)
7232 (process_initial_stop_replies, remote_add_thread)
7233 (btrace_sync_conf, remote_btrace_maybe_reopen)
7234 (remove_new_fork_children, kill_new_fork_children)
7235 (discard_pending_stop_replies, stop_reply_queue_length)
7236 (check_pending_events_prevent_wildcard_vcont)
7237 (discard_pending_stop_replies_in_queue, stop_reply)
7238 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7239 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7240 (remote_interrupt_as, remote_interrupt_ns)
7241 (remote_get_noisy_reply, remote_query_attached)
7242 (remote_add_inferior, remote_current_thread, get_current_thread)
7243 (set_thread, set_general_thread, set_continue_thread)
7244 (set_general_process, write_ptid)
7245 (remote_unpack_thread_info_response, remote_get_threadinfo)
7246 (parse_threadlist_response, remote_get_threadlist)
7247 (remote_threadlist_iterator, remote_get_threads_with_ql)
7248 (remote_get_threads_with_qxfer)
7249 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7250 (get_offsets, remote_check_symbols, remote_supported_packet)
7251 (remote_query_supported, remote_packet_size)
7252 (remote_serial_quit_handler, remote_detach_pid)
7253 (remote_vcont_probe, remote_resume_with_hc)
7254 (send_interrupt_sequence, interrupt_query)
7255 (remote_notif_get_pending_events, fetch_register_using_p)
7256 (send_g_packet, process_g_packet, fetch_registers_using_g)
7257 (store_register_using_P, store_registers_using_G)
7258 (set_remote_traceframe, check_binary_download)
7259 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7260 (remote_xfer_live_readonly_partial, remote_read_bytes)
7261 (remote_send_printf, remote_flash_write, readchar)
7262 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7263 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7264 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7265 (extended_remote_disable_randomization, extended_remote_run)
7266 (send_environment_packet, extended_remote_environment_support)
7267 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7268 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7269 (packet_command): Now methods of ...
7270 (remote_target): ... this class.
7271 (m_remote_state) <remote_target>: New field.
7272 (struct remote_state) <stop_reply_queue,
7273 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7274 fields.
7275 (remote_state::remote_state): Allocate stop_reply_queue.
7276 (remote_state): Delete global.
7277 (get_remote_state_raw): Delete.
7278 (remote_target::get_remote_state): Allocate m_remote_state on
7279 demand.
7280 (get_current_remote_target): New.
7281 (remote_ops, extended_remote_ops): Delete.
7282 (wait_forever_enabled_p, remote_async_inferior_event_token):
7283 Delete, moved to struct remote_state.
7284 (remote_target::close): Delete self. Destruction bits split to
7285 ...
7286 (remote_target::~remote_target): ... this.
7287 (show_memory_packet_size): Adjust to use
7288 get_current_remote_target.
7289 (struct protocol_feature) <func>: Add remote_target parameter.
7290 All callers adjusted.
7291 (curr_quit_handler_target): New.
7292 (remote_serial_quit_handler): Reimplement.
7293 (remote_target::open_1): Adjust to use get_current_remote_target.
7294 Heap-allocate remote_target/extended_remote_target instances.
7295 (vcont_builder::vcont_builder): Add remote_target parameter, and
7296 save it in m_remote. All callers adjusted.
7297 (vcont_builder::m_remote): New field.
7298 (vcont_builder::restart, vcont_builder::flush)
7299 (vcont_builder::push_action): Use it.
7300 (remote_target::commit_resume): Use it.
7301 (struct queue_iter_param) <remote>: New field.
7302 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7303 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7304 (check_pending_event_prevents_wildcard_vcont_callback)
7305 (remote_target::check_pending_events_prevent_wildcard_vcont)
7306 (remote_target::discard_pending_stop_replies)
7307 (remote_target::discard_pending_stop_replies_in_queue)
7308 (remote_target::remote_notif_remove_queued_reply): Fill in
7309 'remote' field.
7310 (remote_notif_get_pending_events): New.
7311 (remote_target::readchar, remote_target::remote_serial_write):
7312 Save/restore curr_quit_handler_target.
7313 (putpkt): New.
7314 (kill_new_fork_children): Fill in 'remote' field.
7315 (packet_command): Use get_current_remote_target, defer to
7316 remote_target method of same name.
7317 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7318 parameter, and save it in m_remote. All callers adjusted.
7319 (scoped_remote_fd::release): Use m_remote.
7320 (scoped_remote_fd::m_remote): New field.
7321 (remote_file_put, remote_file_get, remote_file_delete): Use
7322 get_current_remote_target, defer to remote_target method of same
7323 name.
7324 (remote_btrace_reset): Add remote_state paremeter. Update all
7325 callers.
7326 (remote_async_inferior_event_handler). Pass down 'data'.
7327 (remote_new_objfile): Use get_current_remote_target.
7328 (remote_target::vcont_r_supported): New.
7329 (set_range_stepping): Use get_current_remote_target and
7330 remote_target::vcont_r_supported.
7331 (_initialize_remote): Don't allocate 'remote_state' and
7332 'stop_reply_queue' globals.
7333 * remote.h (struct remote_target): Forward declare.
7334 (getpkt, putpkt, remote_notif_get_pending_events): Add
7335 'remote_target' parameter.
7336
7337 2018-05-22 Pedro Alves <palves@redhat.com>
7338
7339 * remote.c (vcont_builder): Now a class. Make all data members
7340 private.
7341 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7342 Declare methods.
7343 (vcont_builder_restart): Rename to ...
7344 (vcont_builder::restart): ... this.
7345 (vcont_builder_flush): Rename to ...
7346 (vcont_builder::flush): ... this.
7347 (vcont_builder_push_action): Rename to ...
7348 (vcont_builder::push_action): ... this.
7349 (remote_target::commit_resume): Adjust.
7350
7351 2018-05-22 Pedro Alves <palves@redhat.com>
7352
7353 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7354 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7355 (get_fixed_memory_packet_size): New.
7356 (get_memory_packet_size): Use it.
7357 (set_memory_packet_size): Don't override the config size with
7358 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7359 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7360 Don't refer to get_memory_packet_size if not connected to a remote
7361 target. Show "(default)" if configured size is 0.
7362
7363 2018-05-22 Pedro Alves <palves@redhat.com>
7364
7365 * remote.c (remote_target::mourn_inferior): Move
7366 discard_pending_stop_replies call here from ...
7367 (_initialize_remote): ... here.
7368
7369 2018-05-22 Pedro Alves <palves@redhat.com>
7370
7371 * remote.c (compare_section_command): Remove set_general_process
7372 call.
7373
7374 2018-05-22 Pedro Alves <palves@redhat.com>
7375
7376 * remote.c (struct packet_reg, struct remote_arch_state):
7377 Move higher up in the file.
7378 (remote_state) <m_arch_states>: Store remote_arch_state values
7379 instead of remote_arch_state pointers.
7380 (remote_state::get_remote_arch_state): Adjust.
7381
7382 2018-05-22 Pedro Alves <palves@redhat.com>
7383
7384 * remote.c: Include <unordered_map>.
7385 (remote_state): Now a class.
7386 (remote_state) <get_remote_arch_state>: Declare method.
7387 <get_remote_arch_state>: New field.
7388 (remote_arch_state) <remote_arch_state>: Declare ctor.
7389 <regs>: Now a unique_ptr.
7390 (remote_gdbarch_data_handle): Delete.
7391 (get_remote_arch_state): Delete.
7392 (remote_state::get_remote_arch_state): New.
7393 (get_remote_state): Adjust to call remote_state's
7394 get_remote_arch_state method.
7395 (init_remote_state): Delete, bits factored out to ...
7396 (remote_arch_state::remote_arch_state): ... this new method.
7397 (get_remote_packet_size, get_memory_packet_size)
7398 (process_g_packet, remote_target::fetch_registers)
7399 (remote_target::prepare_to_store, store_registers_using_G)
7400 (remote_target::store_registers, remote_target::get_trace_status):
7401 Adjust to call remote_state's method.
7402 (_initialize_remote): Remove reference to
7403 remote_gdbarch_data_handle.
7404
7405 2018-05-22 Pedro Alves <palves@redhat.com>
7406
7407 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7408 pread>: New method declarations.
7409 (remote_target::open_1): Adjust.
7410 (readahead_cache_invalidate): Rename to ...
7411 (readahead_cache::invalidate): ... this, and adjust to be a class
7412 method.
7413 (readahead_cache_invalidate_fd): Rename to ...
7414 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7415 class method.
7416 (remote_hostio_pwrite): Adjust.
7417 (remote_hostio_pread_from_cache): Rename to ...
7418 (readahead_cache::pread): ... this, and adjust to be a class
7419 method.
7420 (remote_hostio_close): Adjust.
7421
7422 2018-05-22 Pedro Alves <palves@redhat.com>
7423
7424 * remote.c (remote_hostio_close_cleanup): Delete.
7425 (class scoped_remote_fd): New.
7426 (remote_file_put, remote_file_get): Use it.
7427
7428 2018-05-22 Pedro Alves <palves@redhat.com>
7429
7430 (struct vCont_action_support): Use bool and initialize all fields.
7431 (struct readahead_cache): Initialize all fields.
7432 (remote_state): Use bool and initialize all fields.
7433 (remote_state::remote_state, remote_state::~remote_state): New.
7434 (new_remote_state): Delete.
7435 (_initialize_remote): Use new to allocate remote_state.
7436
7437 2018-05-22 Pedro Alves <palves@redhat.com>
7438 張俊芝 <zjz@zjz.name>
7439
7440 PR gdb/22973
7441 * c-exp.y: Include "c-support.h".
7442 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7443 of tolower. Use c_ident_is_alpha to scan names.
7444 * c-lang.c: Include "c-support.h".
7445 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7446 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7447 * c-support.h: New file, with bits factored out from ...
7448 * cp-name-parser.y: ... this file.
7449 Include "c-support.h".
7450 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7451 c-support.h and renamed.
7452 (symbol_end, yylex): Adjust.
7453
7454 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7455
7456 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7457 parameter type to CORE_ADDR.
7458 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7459 parameter type in declaration to CORE_ADDR.
7460 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7461 target_auxv_search to get AT_HWCAP and use the result to get the
7462 target description.
7463 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7464 to CORE_ADDR. Remove the cast of the return value to unsigned
7465 long. Fix error predicate of target_auxv_search.
7466 (ppc_linux_nat_target::read_description): Change the type of the
7467 hwcap variable to CORE_ADDR.
7468
7469 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7470
7471 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7472 if the size of fpscr is larger than 32 bits.
7473
7474 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7475
7476 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7477 (ppc32_linux_vsxregmap): New global.
7478 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7479 regcache_supply_regset, and regcache_collect_regset.
7480 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7481 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7482 (fetch_vsx_register, store_vsx_register): Remove.
7483 (fetch_vsx_registers): Add regno parameter. Get regset using
7484 ppc_linux_vsxregset. Use regset to supply registers.
7485 (store_vsx_registers): Add regno parameter. Get regset using
7486 ppc_linux_vsxregset. Use regset to collect registers.
7487 (fetch_register): Call fetch_vsx_registers instead of
7488 fetch_vsx_register.
7489 (store_register): Call store_vsx_registers instead of
7490 store_vsx_register.
7491 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7492 new regno parameter.
7493 (store_ppc_registers): Call store_vsx_registers with -1 for the
7494 new regno parameter.
7495 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7496 (ppc_collect_vsxregset): Remove.
7497
7498 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7499
7500 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7501 offset fields.
7502 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7503 for vector register offset fields.
7504 (ppc64_fbsd_reg_offsets): Likewise.
7505 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7506 to vector register offset fields.
7507 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7508 to vector register offset fields.
7509 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7510 vector register offset fields.
7511 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7512 initializers for vector register offset fields.
7513 (rs6000_aix64_reg_offsets): Likewise.
7514 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7515 (ppc_supply_vrregset): Remove.
7516 (ppc_collect_vrregset): Remove.
7517 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7518 (ppc_linux_vrregset) : New function.
7519 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7520 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7521 (ppc32_linux_vrregset): Remove.
7522 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7523 and use result instead of ppc32_linux_vrregset.
7524 (ppc32_linux_reg_offsets): Remove initializers for vector register
7525 offset fields.
7526 (ppc64_linux_reg_offsets): Likewise.
7527 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7528 * ppc-linux-nat.c: Include regset.h.
7529 (gdb_vrregset_t): Adjust comment to account for little-endian
7530 mode.
7531 (supply_vrregset, fill_vrregset): Remove.
7532 (fetch_altivec_register, store_altivec_register): Remove.
7533 (fetch_altivec_registers): Add regno parameter. Get regset using
7534 ppc_linux_vrregset. Use regset to supply registers.
7535 (store_altivec_registers): Add regno parameter. Get regset using
7536 ppc_linux_vrregset. Use regset to collect registers.
7537 (fetch_register): Call fetch_altivec_registers instead of
7538 fetch_altivec_register.
7539 (store_register): Call store_altivec_registers instead of
7540 store_altivec_register.
7541 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7542 the new regno parameter.
7543 (store_ppc_registers): Call store_altivec_registers with -1 for
7544 the new regno parameter.
7545
7546 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7547
7548 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7549 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7550 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7551 (gdb_vrregset_t): Change array type size to
7552 PPC_LINUX_SIZEOF_VRREGSET.
7553 (gdb_vsxregset_t): Change array type size to
7554 PPC_LINUX_SIZEOF_VSXREGSET.
7555 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7556 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7557 PPC_LINUX_SIZEOF_VSXREGSET.
7558
7559 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7560
7561 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7562 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7563 nat/ppc-linux.c.
7564 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7565 ppc_linux_target_wordsize with tid.
7566 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7567 wordsize with tid.
7568 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7569 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7570 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7571 tid parameter. Remove static specifier.
7572 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7573 (ppc_linux_target_wordsize): New declaration.
7574
7575 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7576
7577 * arch/ppc-linux-common.c: New file.
7578 * arch/ppc-linux-common.h: New file.
7579 * arch/ppc-linux-tdesc.h: New file.
7580 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7581 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7582 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7583 arch/ppc-linux-tdesc.h.
7584 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7585 arch/ppc-linux-tdesc.h.
7586 (ppc_linux_nat_target::read_description): Remove target
7587 description matching code. Fill a ppc_linux_features struct and
7588 call ppc_linux_match_description with it. Move comment about ISA
7589 2.05 to ppc-linux-common.c.
7590 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7591 arch/ppc-linux-tdesc.h.
7592 (ppc_linux_core_read_description): Remove target description
7593 matching code. Fill a ppc_linux_features struct and call
7594 ppc_linux_match_description with it.
7595 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7596 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7597 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7598 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7599 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7600 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7601 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7602 (tdesc_powerpc_e500l): Remove.
7603
7604 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7605
7606 * ada-lang.c (catch_assert_command): Pass empty string instead
7607 of NULL for excep_string argument.
7608
7609 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7610
7611 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7612 the width of the requested register exceeds the width of the
7613 `ptrace' data type.
7614
7615 2018-05-21 Tom Tromey <tom@tromey.com>
7616
7617 * printcmd.c (output_command): Remove.
7618 (output_command_const): Rename to output_command.
7619 * valprint.h (output_command): Rename from output_command_const.
7620 * tracepoint.c (trace_dump_actions): Call output_command.
7621
7622 2018-05-21 Tom Tromey <tom@tromey.com>
7623
7624 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7625 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7626 * ada-lang.h (create_ada_exception_catchpoint): Update.
7627 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7628 std::string.
7629 (create_excep_cond_exprs, ~ada_catchpoint)
7630 (should_stop_exception, print_one_exception)
7631 (print_mention_exception, print_recreate_exception): Update.
7632 (ada_get_next_arg): Remove.
7633 (catch_ada_exception_command_split): Use std::string. Change type
7634 of "excep_string", "cond_string".
7635 (catch_ada_exception_command): Update.
7636 (create_ada_exception_catchpoint): Change type of excep_string.
7637 (ada_exception_sal): Remove excep_string parameter.
7638 (~ada_catchpoint): Remove.
7639
7640 2018-05-21 Tom Tromey <tom@tromey.com>
7641
7642 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7643 cleanup.
7644
7645 2018-05-21 Tom Tromey <tom@tromey.com>
7646
7647 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7648 Return unique_xmalloc_ptr.
7649 (print_it_exception): Update.
7650
7651 2018-05-21 Tom Tromey <tom@tromey.com>
7652
7653 * tracepoint.c (trace_dump_actions): Use std::string.
7654
7655 2018-05-21 Tom Tromey <tom@tromey.com>
7656
7657 * symfile.c (reread_symbols): Use std::string for original_name.
7658
7659 2018-05-21 Tom Tromey <tom@tromey.com>
7660
7661 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7662 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7663 constructor.
7664
7665 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7666
7667 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7668 instance to...
7669 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7670 * objfiles.c (get_objfile_bfd_data): Allocate
7671 objfile_per_bfd_storage with obstack_new when allocating on
7672 obstack.
7673
7674 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7675
7676 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7677 OBSTACK_ZALLOC.
7678 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7679 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7680 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7681 (add_pending): Likewise.
7682 (parse_symbol): Likewise.
7683 (parse_partial_symbols): Likewise.
7684 (psymtab_to_symtab_1): Likewise.
7685 (new_psymtab): Likewise.
7686 (elfmdebug_build_psymtabs): Likewise.
7687 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7688 * objfiles.c (get_objfile_bfd_data): Likewise.
7689 (objfile_register_static_link): Likewise.
7690 * psymtab.c (allocate_psymtab): Likewise.
7691 * stabsread.c (read_member_functions): Likewise.
7692 * xcoffread.c (xcoff_end_psymtab): Likewise.
7693
7694 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7695
7696 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7697 compiler supports std::is_trivially_constructible.
7698 * common/poison.h: Include obstack.h.
7699 (IsMallocable): Define to is_trivially_constructible if the
7700 compiler supports it, define to true_type otherwise.
7701 (xobnew): New.
7702 (XOBNEW): Redefine.
7703 (xobnewvec): New.
7704 (XOBNEWVEC): Redefine.
7705 * gdb_obstack.h (obstack_zalloc): New.
7706 (OBSTACK_ZALLOC): Redefine.
7707 (obstack_calloc): New.
7708 (OBSTACK_CALLOC): Redefine.
7709 (obstack_new): New.
7710 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7711 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7712 gdbarch.c.
7713 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7714 obstack_calloc/obstack_zalloc.
7715 (gdbarch_obstack_zalloc): Remove.
7716 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7717
7718 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7719
7720 * stack.c (backtrace_command_1): Remove useless variable int i.
7721
7722 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7723
7724 * stack.c (print_frame_info): Fix comment.
7725
7726 2018-05-18 Tom Tromey <tom@tromey.com>
7727
7728 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7729 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7730 (~dwarf2_per_objfile): Update
7731 (dwarf2_get_dwz_file): Use new.
7732 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7733 unique_ptr.
7734
7735 2018-05-18 Tom Tromey <tom@tromey.com>
7736
7737 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7738 unique_ptr.
7739 * dwarf2read.c (struct dwp_file): Add constructor and
7740 initializers.
7741 (open_and_init_dwp_file): Return a unique_ptr.
7742 (dwarf2_per_objfile, create_dwp_hash_table)
7743 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7744 (lookup_dwo_unit_in_dwp): Update.
7745 (open_and_init_dwp_file, get_dwp_file): Update.
7746
7747 2018-05-18 Tom Tromey <tom@tromey.com>
7748
7749 * dwarf2read.c (dwarf2_per_objfile): Update.
7750 (struct mapped_index): Add initializers.
7751 (dwarf2_read_index): Use new.
7752 (dw2_symtab_iter_init): Update.
7753 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7754 unique_ptr.
7755
7756 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7757
7758 * dwarf2read.c (mapped_index) <total_size>: Remove.
7759
7760 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7761
7762 * unittests/format_pieces-selftests.c (test_format_specifier):
7763 Add ARI comments.
7764
7765 2018-05-18 Tom Tromey <tom@tromey.com>
7766
7767 * c-typeprint.c (maybe_print_hole): New function.
7768 (c_print_type_struct_field_offset): Update.
7769 (c_type_print_base_struct_union): Call maybe_print_hole.
7770
7771 2018-05-17 Keith Seitz <keiths@redhat.com>
7772
7773 * breakpoint.c (build_bpstat_chain): New function, moved from
7774 bpstat_stop_status.
7775 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7776 If no stop chain is passed, call build_bpstat_chain to build it.
7777 * breakpoint.h (build_bpstat_chain): Declare.
7778 (bpstat_stop_status): Move documentation here from breakpoint.c.
7779 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7780 build the stop chain and pass it to skip_inline_frames.
7781 Pass this stop chain to bpstat_stop_status.
7782 * inline-frame.c: Include breakpoint.h.
7783 (stopped_by_user_bp_inline_frame): New function.
7784 (skip_inline_frames): Add parameter `stop_chain'.
7785 Move documention to inline-frame.h.
7786 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7787 whether the frame should be elided.
7788 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7789 Add moved documentation and update for new parameter.
7790
7791 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7792
7793 PR cli/14975
7794 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7795 unittests/format_pieces-selftests.c.
7796 * common/format.h (format_piece) <operator==>: New.
7797 (format_pieces) <operator[]>: Remove.
7798 * common/format.c (format_pieces::format_pieces): Handle \e.
7799 * unittests/format_pieces-selftests.c: New.
7800
7801 2018-05-17 Tom Tromey <tom@tromey.com>
7802
7803 PR symtab/23010:
7804 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7805 (dw2_instantiate_symtab): Add skip_partial parameter.
7806 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7807 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7808 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7809 (dw2_expand_symtabs_matching_one)
7810 (dw2_find_pc_sect_compunit_symtab)
7811 (dw2_debug_names_lookup_symbol)
7812 (dw2_debug_names_expand_symtabs_for_function): Update.
7813 (init_cutu_and_read_dies): Add skip_partial parameter.
7814 (process_psymtab_comp_unit, build_type_psymtabs_1)
7815 (process_skeletonless_type_unit, load_partial_comp_unit)
7816 (psymtab_to_symtab_1): Update.
7817 (load_full_comp_unit): Add skip_partial parameter.
7818 (process_imported_unit_die, dwarf2_read_addr_index)
7819 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7820 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7821 (read_signatured_type): Update.
7822
7823 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7824
7825 * value.c (release_value): Remove unused variable.
7826 (record_latest_value): Likewise.
7827 (access_value_history): Likewise.
7828 (preserve_values): Likewise.
7829
7830 2018-05-17 Tom Tromey <tom@tromey.com>
7831
7832 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7833 Initialize.
7834
7835 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7836
7837 PR gdb/22286
7838 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7839 Also handle registers whose width is not a multiple of
7840 PTRACE_TYPE_RET.
7841 (linux_nat_trad_target::store_register): Likewise.
7842
7843 2018-05-16 Tom Tromey <tom@tromey.com>
7844
7845 * gdbcore.h (core_bfd): Redefine.
7846 * corelow.c (core_target::close): Update.
7847 (core_target_open): Update.
7848 * progspace.h (struct program_space) <cbfd>: Now a
7849 gdb_bfd_ref_ptr.
7850
7851 2018-05-16 Tom Tromey <tom@tromey.com>
7852
7853 PR cli/19551:
7854 * symfile-add-flags.h (enum symfile_add_flags)
7855 <SYMFILE_NOT_FILENAME>: New constant.
7856 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7857 objfile name from BFD.
7858 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7859 * minidebug.c (find_separate_debug_file_in_section): Put
7860 ".gnu_debugdata" into BFD's file name.
7861
7862 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7863
7864 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7865 Remove.
7866
7867 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7868
7869 PR binutils/21446
7870 * aarch64-tdep.c (aarch64_analyze_prologue,
7871 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7872 Indicate not interested in errors.
7873
7874 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7875
7876 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7877 Supply the MIPS_ZERO_REGNUM register.
7878
7879 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7880
7881 * mips-tdep.c (mask_address_var): Make variable static.
7882
7883 2018-05-14 Tom Tromey <tom@tromey.com>
7884
7885 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7886
7887 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7888
7889 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7890 FXSAVE_ADDR for the mxcsr register.
7891
7892 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7893
7894 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7895
7896 2018-05-11 Pedro Alves <palves@redhat.com>
7897
7898 * corelow.c (core_target) <core_target>: No longer inline.
7899 Initialize m_core_gdbarch, m_core_vec and build the section table
7900 here.
7901 <~core_target>: New.
7902 <core_gdbarch, get_core_register_section>: New methods.
7903 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7904 factored out from ...
7905 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7906 (core_ops): Delete.
7907 (sniff_core_bfd): Add gdbarch parameter.
7908 (core_close): Delete, merged into ...
7909 (core_target::close): ... here. Delete self.
7910 (core_close_cleanup): Delete.
7911 (core_target_open): Allocate a core_target on the heap. Use a
7912 unique_ptr instead of a cleanup. Bits moved into the core_target
7913 ctor. Adjust to use core_target methods instead of globals.
7914 (get_core_register_section): Rename to ...
7915 (core_target::get_core_register_section): ... this and adjust.
7916 (struct get_core_registers_cb_data): New.
7917 (get_core_registers_cb): Use it. Use bool.
7918 (core_target::fetch_registers, core_target::files_info)
7919 (core_target::xfer_partial, core_target::read_description)
7920 (core_target::pid_to, core_target::thread_name): Adjust to
7921 reference class fields instead of globals.
7922 * target.h (struct target_ops_deleter, target_ops_up): New.
7923
7924 2018-05-11 Pedro Alves <palves@redhat.com>
7925
7926 * corefile.c (core_file_command): Move to corelow.c.
7927 * corelow.c (the_core_target): Delete.
7928 (core_file_command): Moved from corefile.c. Check exec_bfd
7929 instead of the_core_target. Use target_detach instead of calling
7930 into the_core_target directly.
7931 (maybe_say_no_core_file_now): New.
7932 (core_target::detach): Use it.
7933 (_initialize_corelow): Remove references to the_core_target.
7934 * gdbcore.h (the_core_target): Delete.
7935
7936 2018-05-11 Tom Tromey <tromey@redhat.com>
7937 Pedro Alves <palves@redhat.com>
7938
7939 * corefile.c (core_bfd): Remove.
7940 * gdbcore.h (core_bfd): Now a macro.
7941 * progspace.h (struct program_space) <cbfd>: New field.
7942
7943 2018-05-11 Tom Tromey <tom@tromey.com>
7944
7945 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7946 gdb::def_vector.
7947
7948 2018-05-10 Tom Tromey <tom@tromey.com>
7949
7950 * configure: Rebuild.
7951 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7952
7953 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7954
7955 PR server/23158:
7956 * regformats/regdat.sh: Adjust script, following the addition
7957 of the new expedite_regs parameter to init_target_desc.
7958
7959 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7960
7961 PR gdb/23127
7962 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7963 set_gdbarch_significant_addr_bit.
7964 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7965 set_gdbarch_significant_addr_bit.
7966 * utils.c (address_significant): Update to sign extend addr.
7967
7968 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
7969
7970 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7971 (xtensa_linux_init_abi): Limit tdep->num_regs by
7972 tdep->num_nopriv_regs.
7973 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7974 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7975 not initialized.
7976
7977 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
7978
7979 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7980
7981 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
7982
7983 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7984 (I387_MXCSR_INIT_VAL): New constant.
7985 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7986 buffer if it was supplied by the inferior.
7987 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7988 (i387_xsave_get_clear_bv): New function.
7989 (i387_supply_xsave): Only read x87 control registers from the
7990 xsave buffer if the feature is enabled, and the state will have
7991 been written, otherwise, provide a suitable default.
7992 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7993 including x87 control registers. Update control registers if they
7994 have changed from the default value, and mark features as enabled
7995 as required.
7996 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7997
7998 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7999
8000 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8001
8002 2018-05-07 Tom Tromey <tom@tromey.com>
8003
8004 * configure: Rebuild.
8005 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8006
8007 2018-05-07 Tom Tromey <tom@tromey.com>
8008
8009 PR tdep/20362:
8010 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8011 bit. Use correct value for VDIV.
8012
8013 2018-05-04 Tom Tromey <tom@tromey.com>
8014
8015 * configure: Rebuild.
8016 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8017
8018 2018-05-04 Tom Tromey <tom@tromey.com>
8019
8020 * linux-record.c (record_linux_system_call) <case
8021 RECORD_SYS_RECVFROM>: Add "break".
8022
8023 2018-05-04 Tom Tromey <tom@tromey.com>
8024
8025 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8026 Add missing "break".
8027 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8028 Add missing "break".
8029
8030 2018-05-04 Tom Tromey <tom@tromey.com>
8031
8032 * rs6000-tdep.c (ppc_process_record_op4)
8033 (ppc_process_record_op63): Add fall-through comment.
8034
8035 2018-05-04 Tom Tromey <tom@tromey.com>
8036
8037 * i386-tdep.c (i386_process_record): Add fall-through comment.
8038
8039 2018-05-04 Tom Tromey <tom@tromey.com>
8040
8041 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8042 comment.
8043
8044 2018-05-04 Tom Tromey <tom@tromey.com>
8045
8046 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8047 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8048 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8049 comment.
8050 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8051 comment.
8052 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8053 comment.
8054
8055 2018-05-04 Tom Tromey <tom@tromey.com>
8056
8057 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8058
8059 2018-05-04 Tom Tromey <tom@tromey.com>
8060
8061 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8062 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8063 * symfile.c (section_is_mapped): Fix fall-through comment.
8064 * stabsread.c (define_symbol, read_member_functions): Fix
8065 fall-through comment.
8066 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8067 comment.
8068 * remote.c (remote_wait_as): Fix fall-through comment.
8069 * p-exp.y (yylex): Fix fall-through comment.
8070 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8071 comment.
8072 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8073 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8074 * jv-exp.y (yylex): Fix fall-through comment.
8075 * go-exp.y (lex_one_token): Fix fall-through comment.
8076 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8077 fall-through comment.
8078 * f-exp.y (yylex): Fix fall-through comment.
8079 * dwarf2read.c (process_die): Fix fall-through comments.
8080 * dbxread.c (process_one_symbol): Fix fall-through comment.
8081 * d-exp.y (lex_one_token): Fix fall-through comment.
8082 * cp-name-parser.y (yylex): Fix fall-through comment.
8083 * coffread.c (coff_symtab_read): Fix fall-through comment.
8084 * c-exp.y (lex_one_token): Fix fall-through comment.
8085 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8086 comment.
8087 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8088 comment.
8089
8090 2018-05-04 Tom Tromey <tom@tromey.com>
8091
8092 PR python/22730:
8093 * NEWS: Mention gdb.execute change.
8094 * gdbcmd.h (execute_control_command): Don't declare.
8095 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8096 execute_control_commands, execute_control_commands_to_string.
8097 * cli/cli-script.h (execute_control_commands)
8098 (execute_control_commands_to_string): Declare.
8099 (execute_control_command): Add from_tty parameter.
8100 * cli/cli-script.c (execute_control_commands)
8101 (execute_control_commands_to_string): New functions.
8102 (execute_user_command): Use execute_control_commands.
8103 (execute_control_command_1): Add "from_tty" parameter. Update.
8104 (execute_control_command): Likewise.
8105
8106 2018-05-04 Tom Tromey <tom@tromey.com>
8107
8108 PR python/22731:
8109 * NEWS: Mention that breakpoint commands are writable.
8110 * python/py-breakpoint.c (bppy_set_commands): New function.
8111 (breakpoint_object_getset) <"commands">: Use it.
8112
8113 2018-05-04 Tom Tromey <tom@tromey.com>
8114
8115 * tracepoint.c (actions_command): Update.
8116 * mi/mi-cmd-break.c (mi_command_line_array)
8117 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8118 (mi_read_next_line): Remove.
8119 (mi_cmd_break_commands): Update.
8120 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8121 function_view.
8122 * cli/cli-script.c (get_command_line): Update.
8123 (process_next_line): Use function_view. Constify.
8124 (recurse_read_control_structure, read_command_lines)
8125 (read_command_lines_1): Change argument types to function_view.
8126 (do_define_command, document_command): Update.
8127 * breakpoint.h (check_tracepoint_command): Don't declare.
8128 * breakpoint.c (check_tracepoint_command): Remove.
8129 (commands_command_1, create_tracepoint_from_upload): Update.
8130
8131 2018-05-04 Tom Tromey <tom@tromey.com>
8132
8133 PR gdb/11750:
8134 * cli/cli-script.h (enum command_control_type) <define_control>:
8135 New constant.
8136 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8137 (build_command_line, execute_control_command_1)
8138 (process_next_line): Likewise.
8139 (do_define_command): New function, extracted from define_command.
8140 (define_command): Use it.
8141
8142 2018-05-04 Tom Tromey <tom@tromey.com>
8143
8144 * tracepoint.c (actions_command): Update.
8145 * cli/cli-script.h (read_command_lines): Update.
8146 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8147 (MAX_TMPBUF): Remove define.
8148 (define_command): Use string_printf.
8149 (document_command): Likewise.
8150 * breakpoint.c (commands_command_1): Update.
8151
8152 2018-05-04 Tom Tromey <tom@tromey.com>
8153
8154 * top.c (execute_command): Update.
8155 * cli/cli-script.h (print_command_lines): Now varargs.
8156 * cli/cli-script.c (print_command_lines): Now varargs.
8157 (execute_control_command_1) <case while_control, case if_control>:
8158 Update.
8159
8160 2018-05-04 Tom Tromey <tom@tromey.com>
8161
8162 * tracepoint.c (all_tracepoint_actions): Rename from
8163 all_tracepoint_actions_and_cleanup. Change return type.
8164 (actions_command, encode_actions_1, encode_actions)
8165 (trace_dump_actions, tdump_command): Update.
8166 * remote.c (remote_download_command_source): Update.
8167 * python/python.c (gdbpy_eval_from_control_command)
8168 (python_command, python_interactive_command): Update.
8169 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8170 * guile/guile.c (guile_command)
8171 (gdbscm_eval_from_control_command, guile_command): Update.
8172 * compile/compile.c (compile_code_command)
8173 (compile_print_command, compile_to_object): Update.
8174 * cli/cli-script.h (struct command_lines_deleter): New.
8175 (counted_command_line): New typedef.
8176 (struct command_line): Add constructor, destructor.
8177 <body_list>: Remove.
8178 <body_list_0, body_list_1>: New members.
8179 (command_line_up): Remove typedef.
8180 (read_command_lines, read_command_lines_1, get_command_line):
8181 Update.
8182 (copy_command_lines): Don't declare.
8183 * cli/cli-script.c (build_command_line): Use "new".
8184 (get_command_line): Return counted_command_line.
8185 (print_command_lines, execute_user_command)
8186 (execute_control_command_1, while_command, if_command): Update.
8187 (realloc_body_list): Remove.
8188 (process_next_line, recurse_read_control_structure): Update.
8189 (read_command_lines, read_command_lines_1): Return counted_command_line.
8190 (free_command_lines): Use "delete".
8191 (copy_command_lines): Remove.
8192 (define_command, document_command, show_user_1): Update.
8193 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8194 a counted_command_line.
8195 * breakpoint.h (counted_command_line): Remove typedef.
8196 (breakpoint_set_commands): Update.
8197 * breakpoint.c (check_no_tracepoint_commands)
8198 (validate_commands_for_breakpoint): Update.
8199 (breakpoint_set_commands): Change commands to be a
8200 counted_command_line.
8201 (commands_command_1, update_dprintf_command_list)
8202 (create_tracepoint_from_upload): Update.
8203
8204 2018-05-04 Tom Tromey <tom@tromey.com>
8205
8206 * cli/cli-decode.h (cmd_list_element): New constructor.
8207 (~cmd_list_element): New destructor.
8208 (struct cmd_list_element): Add initializers.
8209 * cli/cli-decode.c (do_add_cmd): Use "new".
8210 (delete_cmd): Use "delete".
8211
8212 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8213 Pedro Alves <palves@redhat.com>
8214
8215 PR breakpoints/19806 and support for PR external/20207.
8216 * NEWS: Mention Aarch64 watchpoint improvements.
8217 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8218 watchpoints and PR external/20207 watchpoints.
8219 * nat/aarch64-linux-hw-point.c
8220 (kernel_supports_any_contiguous_range): New.
8221 (aarch64_watchpoint_offset): New.
8222 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8223 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8224 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8225 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8226 next_addr_orig_p. Support PR external/20207 watchpoints.
8227 (aarch64_downgrade_regs): New.
8228 (aarch64_dr_state_insert_one_point): New parameters offset and
8229 addr_orig.
8230 (aarch64_dr_state_remove_one_point): Likewise.
8231 (aarch64_handle_breakpoint): Update caller.
8232 (aarch64_handle_aligned_watchpoint): Likewise.
8233 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8234 aligned_offset.
8235 (aarch64_linux_set_debug_regs): Remove const from state. Call
8236 aarch64_downgrade_regs.
8237 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8238 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8239 (DR_CONTROL_MASK): ... this.
8240 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8241 (unsigned int aarch64_watchpoint_offset): New prototype.
8242 (aarch64_linux_set_debug_regs): Remove const from state.
8243 * utils.c (align_up, align_down): Move to ...
8244 * common/common-utils.c (align_up, align_down): ... here.
8245 * utils.h (align_up, align_down): Move to ...
8246 * common/common-utils.h (align_up, align_down): ... here.
8247
8248 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8249
8250 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8251 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8252 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8253 Re-implement to match the ABI as summarized in GCC's
8254 gcc/config/sparc/sparc.c. All callers updated.
8255 (sparc32_store_arguments): Remove assertion.
8256
8257 2018-05-04 Tom Tromey <tom@tromey.com>
8258
8259 * printcmd.c: Don't include tui.h.
8260 (decode_format): Use skip_spaces.
8261
8262 2018-05-04 Tom Tromey <tom@tromey.com>
8263
8264 PR gdb/22619:
8265 * printcmd.c (last_count): New global.
8266 (x_command): Use saved count when repeating.
8267
8268 2018-05-04 Tom Tromey <tom@tromey.com>
8269
8270 * nto-procfs.c (do_closedir_cleanup): Remove.
8271 (procfs_pidlist): Use gdb_dir_up.
8272 * procfs.c (do_closedir_cleanup): Remove.
8273 (proc_update_threads): Use gdb_dir_up.
8274 * common/filestuff.h (struct gdb_dir_deleter): New.
8275 (gdb_dir_up): New typedef.
8276
8277 2018-05-04 Tom Tromey <tom@tromey.com>
8278
8279 * ada-lang.c (print_mention_exception): Use std::string.
8280
8281 2018-05-04 Tom Tromey <tom@tromey.com>
8282
8283 * ada-lang.c (create_excep_cond_exprs): Update.
8284 (ada_exception_catchpoint_cond_string): Use std::string.
8285
8286 2018-05-04 Tom Tromey <tom@tromey.com>
8287
8288 * ada-lang.c (xget_renaming_scope): Return std::string.
8289 (old_renaming_is_invisible): Update.
8290
8291 2018-05-04 Tom Tromey <tom@tromey.com>
8292
8293 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8294 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8295
8296 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8297
8298 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8299
8300 2018-05-04 Tom Tromey <tom@tromey.com>
8301
8302 * remote.c (remote_query_supported_append): Change type.
8303 (remote_check_symbols): Update.
8304
8305 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8306
8307 PR gdb/11420
8308 * configure.ac: Prepend libpython.
8309 * python/python-config.py: Likewise.
8310 * configure: Regenerate.
8311
8312 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8313
8314 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8315
8316 2018-05-03 Pedro Alves <palves@redhat.com>
8317
8318 * s390-linux-nat.c
8319 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8320 override. Write 'true' instead of '1'.
8321 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8322 declaration.
8323
8324 2018-05-02 Pedro Alves <palves@redhat.com>
8325
8326 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8327 add_inf_child_target.
8328 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8329 add_inf_child_target.
8330 * aix-thread.c (aix_thread_target_info): New.
8331 (aix_thread_target) <shortname, longname, doc>: Delete.
8332 <info>: New.
8333 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8334 add_inf_child_target.
8335 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8336 add_inf_child_target.
8337 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8338 add_inf_child_target.
8339 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8340 add_inf_child_target.
8341 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8342 add_inf_child_target.
8343 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8344 add_inf_child_target.
8345 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8346 add_inf_child_target.
8347 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8348 add_inf_child_target.
8349 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8350 add_inf_child_target.
8351 * bfd-target.c (target_bfd_target_info): New.
8352 (target_bfd) <shortname, longname, doc>: Delete.
8353 <info>: New.
8354 * bsd-kvm.c (bsd_kvm_target_info): New.
8355 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8356 <info>: New.
8357 (bsd_kvm_target::open): Rename to ...
8358 (bsd_kvm_target_open): ... this. Adjust.
8359 * bsd-uthread.c (bsd_uthread_target_info): New.
8360 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8361 <info>: New.
8362 * corefile.c (core_file_command): Adjust.
8363 * corelow.c (core_target_info): New.
8364 (core_target) <shortname, longname, doc>: Delete.
8365 <info>: New.
8366 (core_target::open): Rename to ...
8367 (core_target_open): ... this. Adjust.
8368 * ctf.c (ctf_target_info): New.
8369 (ctf_target) <shortname, longname, doc>: Delete.
8370 <info>: New.
8371 (ctf_target::open): Rename to ...
8372 (ctf_target_open): ... this.
8373 (_initialize_ctf): Adjust.
8374 * exec.c (exec_target_info): New.
8375 (exec_target) <shortname, longname, doc>: Delete.
8376 <info>: New.
8377 (exec_target::open): Rename to ...
8378 (exec_target_open): ... this.
8379 * gdbcore.h (core_target_open): Declare.
8380 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8381 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8382 add_inf_child_target.
8383 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8384 add_inf_child_target.
8385 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8386 add_inf_child_target.
8387 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8388 add_inf_child_target.
8389 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8390 add_inf_child_target.
8391 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8392 add_inf_child_target.
8393 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8394 add_inf_child_target.
8395 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8396 add_inf_child_target.
8397 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8398 add_inf_child_target.
8399 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8400 add_inf_child_target.
8401 * inf-child.c (inf_child_target_info): New.
8402 (inf_child_target::info): New.
8403 (inf_child_open_target): Remove 'target' parameter. Use
8404 get_native_target instead.
8405 (inf_child_target::open): Delete.
8406 (add_inf_child_target): New.
8407 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8408 Delete.
8409 <info>: New.
8410 (add_inf_child_target): Declare.
8411 (inf_child_open_target): Declare.
8412 * linux-thread-db.c (thread_db_target_info): New.
8413 (thread_db_target) <shortname, longname, doc>: Delete.
8414 <info>: New.
8415 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8416 add_inf_child_target.
8417 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8418 add_inf_child_target.
8419 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8420 add_inf_child_target.
8421 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8422 add_inf_child_target.
8423 * make-target-delegates (print_class): Adjust.
8424 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8425 add_inf_child_target.
8426 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8427 add_inf_child_target.
8428 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8429 add_inf_child_target.
8430 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8431 add_inf_child_target.
8432 * nto-procfs.c (nto_native_target_info): New.
8433 (nto_procfs_target_native) <shortname, longname, doc>:
8434 Delete.
8435 <info>: New.
8436 (nto_procfs_target_info): New.
8437 (nto_procfs_target_procfs) <shortname, longname, doc>:
8438 Delete.
8439 <info>: New.
8440 (init_procfs_targets): Adjust.
8441 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8442 add_inf_child_target.
8443 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8444 add_inf_child_target.
8445 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8446 add_inf_child_target.
8447 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8448 add_inf_child_target.
8449 * ravenscar-thread.c (ravenscar_target_info): New.
8450 (ravenscar_thread_target) <shortname, longname, doc>:
8451 Delete.
8452 <info>: New.
8453 * record-btrace.c (record_btrace_target_info):
8454 (record_btrace_target) <shortname, longname, doc>: Delete.
8455 <info>: New.
8456 (record_btrace_target::open): Rename to ...
8457 (record_btrace_target_open): ... this. Adjust.
8458 * record-full.c (record_longname, record_doc): New.
8459 (record_full_base_target) <shortname, longname, doc>: Delete.
8460 <info>: New.
8461 (record_full_target_info): New.
8462 (record_full_target): <shortname>: Delete.
8463 <info>: New.
8464 (record_full_core_open_1, record_full_open_1): Update comments.
8465 (record_full_base_target::open): Rename to ...
8466 (record_full_open): ... this.
8467 (cmd_record_full_restore): Update.
8468 (_initialize_record_full): Update.
8469 * remote-sim.c (remote_sim_target_info): New.
8470 (gdbsim_target) <shortname, longname, doc>: Delete.
8471 <info>: New.
8472 (gdbsim_target::open): Rename to ...
8473 (gdbsim_target_open): ... this.
8474 (_initialize_remote_sim): Adjust.
8475 * remote.c (remote_doc): New.
8476 (remote_target_info): New.
8477 (remote_target) <shortname, longname, doc>: Delete.
8478 <info>: New.
8479 (extended_remote_target_info): New.
8480 (extended_remote_target) <shortname, longname, doc>: Delete.
8481 <info>: New.
8482 (remote_target::open_1): Make static. Adjust.
8483 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8484 * s390-linux-nat.c (_initialize_s390_nat): Use
8485 add_inf_child_target.
8486 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8487 add_inf_child_target.
8488 * sol-thread.c (thread_db_target_info): New.
8489 (sol_thread_target) <shortname, longname, doc>: Delete.
8490 <info>: New.
8491 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8492 add_inf_child_target.
8493 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8494 add_inf_child_target.
8495 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8496 add_inf_child_target.
8497 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8498 add_inf_child_target.
8499 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8500 add_inf_child_target.
8501 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8502 add_inf_child_target.
8503 * spu-linux-nat.c (_initialize_spu_nat): Use
8504 add_inf_child_target.
8505 * spu-multiarch.c (spu_multiarch_target_info): New.
8506 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8507 <info>: New.
8508 * target-delegates.c: Regenerate.
8509 * target.c: Include <unordered_map>.
8510 (target_ops_p): Delete.
8511 (DEF_VEC_P(target_ops_p)): Delete.
8512 (target_factories): New.
8513 (test_target_info): New.
8514 (test_target_ops::info): New.
8515 (open_target): Adjust to use target_factories.
8516 (add_target_with_completer): Rename to ...
8517 (add_target): ... this. Change prototype. Register target_info
8518 and open callback in target_factories. Register target_info in
8519 command context instead of target_ops.
8520 (add_target): Delete old implementation.
8521 (add_deprecated_target_alias): Change prototype. Adjust.
8522 (the_native_target): New.
8523 (set_native_target, get_native_target): New.
8524 (find_default_run_target): Use the_native_target.
8525 (find_attach_target, find_run_target): Simplify.
8526 (target_ops::open): Delete.
8527 (dummy_target_info): New.
8528 (dummy_target::shortname, dummy_target::longname)
8529 (dummy_target::doc): Delete.
8530 (dummy_target::info): New.
8531 (debug_target::shortname, debug_target::longname)
8532 (debug_target::doc): Delete.
8533 (debug_target::info): New.
8534 * target.h (struct target_info): New.
8535 (target_ops::~target_ops): Add comment.
8536 (target_ops::info): New.
8537 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8538 longer virtual. Implement in terms of target_info.
8539 (set_native_target, get_native_target): Declare.
8540 (target_open_ftype): New.
8541 (add_target, add_target_with_completer)
8542 (add_deprecated_target_alias): Change prototype.
8543 (test_target) <shortname, longname, doc>: Delete.
8544 <info>: New.
8545 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8546 add_inf_child_target.
8547 * tracefile-tfile.c (tfile_target_info): New.
8548 (tfile_target) <shortname, longname, doc>: Delete.
8549 <info>: New.
8550 (tfile_target::open): Rename to ...
8551 (tfile_target_open): ... this.
8552 (_initialize_tracefile_tfile): Adjust.
8553 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8554 add_inf_child_target.
8555 * windows-nat.c (_initialize_windows_nat): Use
8556 add_inf_child_target.
8557 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8558 add_inf_child_target.
8559
8560 2018-05-02 Pedro Alves <palves@redhat.com>
8561
8562 * linux-nat.h (linux_nat_target) <low_new_thread,
8563 low_delete_thread, low_new_fork, low_forget_process,
8564 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8565 New virtual methods.
8566 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8567 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8568 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8569 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8570 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8571 Delete.
8572 * linux-fork.c (delete_fork): Adjust to call low method.
8573 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8574 (linux_nat_new_fork, linux_nat_forget_process_hook)
8575 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8576 (linux_nat_status_is_event):
8577 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8578 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8579 to call low method.
8580 (sigtrap_is_event): Rename to ...
8581 (linux_nat_target::low_status_is_event): ... this.
8582 (linux_nat_set_status_is_event): Delete.
8583 (save_stop_reason, linux_nat_wait_1)
8584 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8585 low methods.
8586 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8587 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8588 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8589 (linux_nat_set_prepare_to_resume): Delete.
8590 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8591 low virtual methods.
8592 * amd64-linux-nat.c: Likewise.
8593 * arm-linux-nat.c: Likewise.
8594 * i386-linux-nat.c: Likewise.
8595 * ia64-linux-nat.c: Likewise.
8596 * mips-linux-nat.c: Likewise.
8597 * ppc-linux-nat.c: Likewise.
8598 * s390-linux-nat.c: Likewise.
8599 * sparc64-linux-nat.c: Likewise.
8600 * x86-linux-nat.c: Likewise.
8601 * x86-linux-nat.h: Include "nat/x86-linux.h".
8602 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8603 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8604 Override methods.
8605
8606 2018-05-02 Pedro Alves <palves@redhat.com>
8607
8608 * target.h (target_ops)
8609 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8610 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8611 stopped_by_watchpoint, have_continuable_watchpoint,
8612 stopped_data_address, watchpoint_addr_within_range,
8613 can_accel_watchpoint_condition, can_run, thread_alive,
8614 has_all_memory, has_memory, has_stack, has_registers,
8615 has_execution, can_async_p, is_async_p, supports_non_stop,
8616 always_non_stop_p, can_execute_reverse, supports_multi_process,
8617 supports_enable_disable_tracepoint,
8618 supports_disable_randomization, supports_string_tracing,
8619 supports_evaluation_of_breakpoint_conditions,
8620 can_run_breakpoint_commands, filesystem_is_local,
8621 can_download_tracepoint, get_trace_state_variable_value,
8622 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8623 record_is_replaying, record_will_replay,
8624 augmented_libraries_svr4_read>: Adjust to return bool.
8625 * aarch64-linux-nat.c: All implementations adjusted.
8626 * aix-thread.c: All implementations adjusted.
8627 * arm-linux-nat.c: All implementations adjusted.
8628 * breakpoint.c: All implementations adjusted.
8629 * bsd-kvm.c: All implementations adjusted.
8630 * bsd-uthread.c: All implementations adjusted.
8631 * corelow.c: All implementations adjusted.
8632 * ctf.c: All implementations adjusted.
8633 * darwin-nat.c: All implementations adjusted.
8634 * darwin-nat.h: All implementations adjusted.
8635 * exec.c: All implementations adjusted.
8636 * fbsd-nat.c: All implementations adjusted.
8637 * fbsd-nat.h: All implementations adjusted.
8638 * gnu-nat.c: All implementations adjusted.
8639 * gnu-nat.h: All implementations adjusted.
8640 * go32-nat.c: All implementations adjusted.
8641 * ia64-linux-nat.c: All implementations adjusted.
8642 * inf-child.c: All implementations adjusted.
8643 * inf-child.h: All implementations adjusted.
8644 * inf-ptrace.c: All implementations adjusted.
8645 * inf-ptrace.h: All implementations adjusted.
8646 * linux-nat.c: All implementations adjusted.
8647 * linux-nat.h: All implementations adjusted.
8648 * mips-linux-nat.c: All implementations adjusted.
8649 * nto-procfs.c: All implementations adjusted.
8650 * ppc-linux-nat.c: All implementations adjusted.
8651 * procfs.c: All implementations adjusted.
8652 * ravenscar-thread.c: All implementations adjusted.
8653 * record-btrace.c: All implementations adjusted.
8654 * record-full.c: All implementations adjusted.
8655 * remote-sim.c: All implementations adjusted.
8656 * remote.c: All implementations adjusted.
8657 * s390-linux-nat.c: All implementations adjusted.
8658 * sol-thread.c: All implementations adjusted.
8659 * spu-multiarch.c: All implementations adjusted.
8660 * target-delegates.c: All implementations adjusted.
8661 * target.c: All implementations adjusted.
8662 * target.h: All implementations adjusted.
8663 * tracefile-tfile.c: All implementations adjusted.
8664 * tracefile.c: All implementations adjusted.
8665 * tracefile.h: All implementations adjusted.
8666 * windows-nat.c: All implementations adjusted.
8667 * x86-linux-nat.h: All implementations adjusted.
8668 * x86-nat.h: All implementations adjusted.
8669
8670 2018-05-02 Pedro Alves <palves@redhat.com>
8671
8672 * make-target-delegates (scan_target_h): Don't trim lines here.
8673 Replace sequences of tabs and/or whitespace with a single
8674 whitespace.
8675 (top level, parsing methods): Trim each line before processing it
8676 here.
8677
8678 2018-05-02 Pedro Alves <palves@redhat.com>
8679 John Baldwin <jhb@freebsd.org>
8680
8681 * target.h (enum strata) <debug_stratum>: New.
8682 (struct target_ops) <all delegation methods>: Replace by C++
8683 virtual methods, and drop "to_" prefix. All references updated
8684 throughout.
8685 <to_shortname, to_longname, to_doc, to_data,
8686 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8687 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8688 virtual methods. All references updated throughout.
8689 <can_attach, supports_terminal_ours, can_create_inferior,
8690 get_thread_control_capabilities, attach_no_wait>: New
8691 virtual methods.
8692 <insert_breakpoint, remove_breakpoint>: Now
8693 TARGET_DEFAULT_NORETURN methods.
8694 <info_proc>: Now returns bool.
8695 <to_magic>: Delete.
8696 (OPS_MAGIC): Delete.
8697 (current_target): Delete. All references replaced by references
8698 to ...
8699 (target_stack): ... this. New.
8700 (target_shortname, target_longname): Adjust.
8701 (target_can_run): Now a function declaration.
8702 (default_child_has_all_memory, default_child_has_memory)
8703 (default_child_has_stack, default_child_has_registers)
8704 (default_child_has_execution): Remove target_ops parameter.
8705 (complete_target_initialization): Delete.
8706 (memory_breakpoint_target): New template class.
8707 (test_target_ops): Refactor as a C++ class with virtual methods.
8708 * make-target-delegates (NAME_PART): Tighten.
8709 (POINTER_PART, CP_SYMBOL): New.
8710 (SIMPLE_RETURN_PART): Reimplement.
8711 (VEC_RETURN_PART): Expect less.
8712 (RETURN_PART, VIRTUAL_PART): New.
8713 (METHOD): Adjust to C++ virtual methods.
8714 (scan_target_h): Remove reference to C99.
8715 (dname): Output "target_ops::" prefix.
8716 (write_function_header): Adjust to output a C++ class method.
8717 (write_declaration): New.
8718 (write_delegator): Adjust to output a C++ class method.
8719 (tdname): Output "dummy_target::" prefix.
8720 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8721 method.
8722 (tdefault_names, debug_names): Delete.
8723 (return_types, tdefaults, styles, argtypes_array): New.
8724 (top level): All methods are delegators.
8725 (print_class): New.
8726 (top level): Print dummy_target and debug_target classes.
8727 * target-delegates.c: Regenerate.
8728 * target-debug.h (target_debug_print_enum_info_proc_what)
8729 (target_debug_print_thread_control_capabilities)
8730 (target_debug_print_thread_info_p): New.
8731 * target.c (dummy_target): Delete.
8732 (the_dummy_target, the_debug_target): New.
8733 (target_stack): Now extern.
8734 (set_targetdebug): Push/unpush debug target.
8735 (default_child_has_all_memory, default_child_has_memory)
8736 (default_child_has_stack, default_child_has_registers)
8737 (default_child_has_execution): Remove target_ops parameter.
8738 (complete_target_initialization): Delete.
8739 (add_target_with_completer): No longer call
8740 complete_target_initialization.
8741 (target_supports_terminal_ours): Use regular delegation.
8742 (update_current_target): Delete.
8743 (push_target): No longer check magic number. Don't call
8744 update_current_target.
8745 (unpush_target): Don't call update_current_target.
8746 (target_is_pushed): No longer check magic number.
8747 (target_require_runnable): Skip for all stratums over
8748 process_stratum.
8749 (target_ops::info_proc): New.
8750 (target_info_proc): Use find_target_at and
8751 find_default_run_target.
8752 (target_supports_disable_randomization): Use regular delegation.
8753 (target_get_osdata): Use find_target_at.
8754 (target_ops::open, target_ops::close, target_ops::can_attach)
8755 (target_ops::attach, target_ops::can_create_inferior)
8756 (target_ops::create_inferior, target_ops::can_run)
8757 (target_can_run): New.
8758 (default_fileio_target): Use regular delegation.
8759 (target_ops::fileio_open, target_ops::fileio_pwrite)
8760 (target_ops::fileio_pread, target_ops::fileio_fstat)
8761 (target_ops::fileio_close, target_ops::fileio_unlink)
8762 (target_ops::fileio_readlink): New.
8763 (target_fileio_open_1, target_fileio_unlink)
8764 (target_fileio_readlink): Always call the target method. Handle
8765 FILEIO_ENOSYS.
8766 (return_zero, return_zero_has_execution): Delete.
8767 (init_dummy_target): Delete.
8768 (dummy_target::dummy_target, dummy_target::shortname)
8769 (dummy_target::longname, dummy_target::doc)
8770 (debug_target::debug_target, debug_target::shortname)
8771 (debug_target::longname, debug_target::doc): New.
8772 (target_supports_delete_record): Use regular delegation.
8773 (setup_target_debug): Delete.
8774 (maintenance_print_target_stack): Skip debug_stratum.
8775 (initialize_targets): Instantiate the_dummy_target and
8776 the_debug_target.
8777 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8778 use target_stack.
8779 (target_auxv_search, fprint_target_auxv): Adjust.
8780 (info_auxv_command): Adjust to use target_stack.
8781 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8782 * exceptions.c (print_flush): Handle a NULL target_stack.
8783 * regcache.c (target_ops_no_register): Refactor as class with
8784 virtual methods.
8785
8786 * exec.c (exec_target): New class.
8787 (exec_ops): Now an exec_target.
8788 (exec_open, exec_close_1, exec_get_section_table)
8789 (exec_xfer_partial, exec_files_info, exec_has_memory)
8790 (exec_make_note_section): Refactor as exec_target methods.
8791 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8792 Delete.
8793 (exec_target::find_memory_regions): New.
8794 (_initialize_exec): Don't call init_exec_ops.
8795 * gdbcore.h (exec_file_clear): Delete.
8796
8797 * corefile.c (core_target): Delete.
8798 (core_file_command): Adjust.
8799 * corelow.c (core_target): New class.
8800 (the_core_target): New.
8801 (core_close): Remove target_ops parameter.
8802 (core_close_cleanup): Adjust.
8803 (core_target::close): New.
8804 (core_open, core_detach, get_core_registers, core_files_info)
8805 (core_xfer_partial, core_thread_alive, core_read_description)
8806 (core_pid_to_str, core_thread_name, core_has_memory)
8807 (core_has_stack, core_has_registers, core_info_proc): Rework as
8808 core_target methods.
8809 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8810 (_initialize_corelow): Initialize the_core_target.
8811 * gdbcore.h (core_target): Delete.
8812 (the_core_target): New.
8813
8814 * ctf.c: (ctf_target): New class.
8815 (ctf_ops): Now a ctf_target.
8816 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8817 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8818 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8819 methods.
8820 (init_ctf_ops): Delete.
8821 (_initialize_ctf): Don't call it.
8822 * tracefile-tfile.c (tfile_target): New class.
8823 (tfile_ops): Now a tfile_target.
8824 (tfile_open, tfile_close, tfile_files_info)
8825 (tfile_get_tracepoint_status, tfile_trace_find)
8826 (tfile_fetch_registers, tfile_xfer_partial)
8827 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8828 Refactor as tfile_target methods.
8829 (tfile_xfer_partial_features): Remove target_ops parameter.
8830 (init_tfile_ops): Delete.
8831 (_initialize_tracefile_tfile): Don't call it.
8832 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8833 (tracefile_has_stack, tracefile_has_registers)
8834 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8835 tracefile_target methods.
8836 (init_tracefile_ops): Delete.
8837 (tracefile_target::tracefile_target): New.
8838 * tracefile.h: Include "target.h".
8839 (tracefile_target): New class.
8840 (init_tracefile_ops): Delete.
8841
8842 * spu-multiarch.c (spu_multiarch_target): New class.
8843 (spu_ops): Now a spu_multiarch_target.
8844 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8845 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8846 (spu_search_memory, spu_mourn_inferior): Refactor as
8847 spu_multiarch_target methods.
8848 (init_spu_ops): Delete.
8849 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8850 complete_target_initialization.
8851
8852 * ravenscar-thread.c (ravenscar_thread_target): New class.
8853 (ravenscar_ops): Now a ravenscar_thread_target.
8854 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8855 (ravenscar_thread_alive, ravenscar_pid_to_str)
8856 (ravenscar_fetch_registers, ravenscar_store_registers)
8857 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8858 (ravenscar_stopped_by_hw_breakpoint)
8859 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8860 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8861 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8862 methods.
8863 (init_ravenscar_thread_ops): Delete.
8864 (_initialize_ravenscar): Remove references to
8865 init_ravenscar_thread_ops and complete_target_initialization.
8866
8867 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8868 (bsd_uthread_target): New class.
8869 (bsd_uthread_ops): Now a bsd_uthread_target.
8870 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8871 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8872 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8873 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8874 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8875 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8876 (bsd_uthread_target): Delete function.
8877 (_initialize_bsd_uthread): Remove reference to
8878 complete_target_initialization.
8879
8880 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8881 (target_bfd): ... this new class.
8882 (target_bfd_xfer_partial, target_bfd_get_section_table)
8883 (target_bfd_close): Refactor as target_bfd methods.
8884 (target_bfd::~target_bfd): New.
8885 (target_bfd_reopen): Adjust.
8886 (target_bfd::close): New.
8887
8888 * record-btrace.c (record_btrace_target): New class.
8889 (record_btrace_ops): Now a record_btrace_target.
8890 (record_btrace_open, record_btrace_stop_recording)
8891 (record_btrace_disconnect, record_btrace_close)
8892 (record_btrace_async, record_btrace_info)
8893 (record_btrace_insn_history, record_btrace_insn_history_range)
8894 (record_btrace_insn_history_from, record_btrace_call_history)
8895 (record_btrace_call_history_range)
8896 (record_btrace_call_history_from, record_btrace_record_method)
8897 (record_btrace_is_replaying, record_btrace_will_replay)
8898 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8899 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8900 (record_btrace_store_registers, record_btrace_prepare_to_store)
8901 (record_btrace_to_get_unwinder)
8902 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8903 (record_btrace_commit_resume, record_btrace_wait)
8904 (record_btrace_stop, record_btrace_can_execute_reverse)
8905 (record_btrace_stopped_by_sw_breakpoint)
8906 (record_btrace_supports_stopped_by_sw_breakpoint)
8907 (record_btrace_stopped_by_hw_breakpoint)
8908 (record_btrace_supports_stopped_by_hw_breakpoint)
8909 (record_btrace_update_thread_list, record_btrace_thread_alive)
8910 (record_btrace_goto_begin, record_btrace_goto_end)
8911 (record_btrace_goto, record_btrace_stop_replaying_all)
8912 (record_btrace_execution_direction)
8913 (record_btrace_prepare_to_generate_core)
8914 (record_btrace_done_generating_core): Refactor as
8915 record_btrace_target methods.
8916 (init_record_btrace_ops): Delete.
8917 (_initialize_record_btrace): Remove reference to
8918 init_record_btrace_ops.
8919 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8920 the execution_direction global.
8921 (record_full_base_target, record_full_target)
8922 (record_full_core_target): New classes.
8923 (record_full_ops): Now a record_full_target.
8924 (record_full_core_ops): Now a record_full_core_target.
8925 (record_full_target::detach, record_full_target::disconnect)
8926 (record_full_core_target::disconnect)
8927 (record_full_target::mourn_inferior, record_full_target::kill):
8928 New.
8929 (record_full_open, record_full_close, record_full_async): Refactor
8930 as methods of the record_full_base_target class.
8931 (record_full_resume, record_full_commit_resume): Refactor
8932 as methods of the record_full_target class.
8933 (record_full_wait, record_full_stopped_by_watchpoint)
8934 (record_full_stopped_data_address)
8935 (record_full_stopped_by_sw_breakpoint)
8936 (record_full_supports_stopped_by_sw_breakpoint)
8937 (record_full_stopped_by_hw_breakpoint)
8938 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8939 methods of the record_full_base_target class.
8940 (record_full_store_registers, record_full_xfer_partial)
8941 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8942 Refactor as methods of the record_full_target class.
8943 (record_full_can_execute_reverse, record_full_get_bookmark)
8944 (record_full_goto_bookmark, record_full_execution_direction)
8945 (record_full_record_method, record_full_info, record_full_delete)
8946 (record_full_is_replaying, record_full_will_replay)
8947 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8948 (record_full_stop_replaying): Refactor as methods of the
8949 record_full_base_target class.
8950 (record_full_core_resume, record_full_core_kill)
8951 (record_full_core_fetch_registers)
8952 (record_full_core_prepare_to_store)
8953 (record_full_core_store_registers, record_full_core_xfer_partial)
8954 (record_full_core_insert_breakpoint)
8955 (record_full_core_remove_breakpoint)
8956 (record_full_core_has_execution): Refactor
8957 as methods of the record_full_core_target class.
8958 (record_full_base_target::supports_delete_record): New.
8959 (init_record_full_ops): Delete.
8960 (init_record_full_core_ops): Delete.
8961 (record_full_save): Refactor as method of the
8962 record_full_base_target class.
8963 (_initialize_record_full): Remove references to
8964 init_record_full_ops and init_record_full_core_ops.
8965
8966 * remote.c (remote_target, extended_remote_target): New classes.
8967 (remote_ops): Now a remote_target.
8968 (extended_remote_ops): Now an extended_remote_target.
8969 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8970 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8971 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8972 (remote_pass_signals, remote_set_syscall_catchpoint)
8973 (remote_program_signals, )
8974 (remote_thread_always_alive): Remove target_ops parameter.
8975 (remote_thread_alive, remote_thread_name)
8976 (remote_update_thread_list, remote_threads_extra_info)
8977 (remote_static_tracepoint_marker_at)
8978 (remote_static_tracepoint_markers_by_strid)
8979 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8980 (remote_open): Refactor as methods of remote_target.
8981 (extended_remote_open, extended_remote_detach)
8982 (extended_remote_attach, extended_remote_post_attach):
8983 (extended_remote_supports_disable_randomization)
8984 (extended_remote_create_inferior): : Refactor as method of
8985 extended_remote_target.
8986 (remote_set_permissions, remote_open_1, remote_detach)
8987 (remote_follow_fork, remote_follow_exec, remote_disconnect)
8988 (remote_resume, remote_commit_resume, remote_stop)
8989 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8990 (remote_terminal_ours, remote_wait, remote_fetch_registers)
8991 (remote_prepare_to_store, remote_store_registers)
8992 (remote_flash_erase, remote_flash_done, remote_files_info)
8993 (remote_kill, remote_mourn, remote_insert_breakpoint)
8994 (remote_remove_breakpoint, remote_insert_watchpoint)
8995 (remote_watchpoint_addr_within_range)
8996 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8997 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8998 (remote_supports_stopped_by_sw_breakpoint)
8999 (remote_stopped_by_hw_breakpoint)
9000 (remote_supports_stopped_by_hw_breakpoint)
9001 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9002 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9003 (remote_verify_memory): Refactor as methods of remote_target.
9004 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9005 parameter.
9006 (remote_xfer_partial, remote_get_memory_xfer_limit)
9007 (remote_search_memory, remote_rcmd, remote_memory_map)
9008 (remote_pid_to_str, remote_get_thread_local_address)
9009 (remote_get_tib_address, remote_read_description): Refactor as
9010 methods of remote_target.
9011 (remote_target::fileio_open, remote_target::fileio_pwrite)
9012 (remote_target::fileio_pread, remote_target::fileio_close): New.
9013 (remote_hostio_readlink, remote_hostio_fstat)
9014 (remote_filesystem_is_local, remote_can_execute_reverse)
9015 (remote_supports_non_stop, remote_supports_disable_randomization)
9016 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9017 (remote_supports_enable_disable_tracepoint)
9018 (remote_supports_string_tracing)
9019 (remote_can_run_breakpoint_commands, remote_trace_init)
9020 (remote_download_tracepoint, remote_can_download_tracepoint)
9021 (remote_download_trace_state_variable, remote_enable_tracepoint)
9022 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9023 (remote_trace_start, remote_get_trace_status)
9024 (remote_get_tracepoint_status, remote_trace_stop)
9025 (remote_trace_find, remote_get_trace_state_variable_value)
9026 (remote_save_trace_data, remote_get_raw_trace_data)
9027 (remote_set_disconnected_tracing, remote_core_of_thread)
9028 (remote_set_circular_trace_buffer, remote_traceframe_info)
9029 (remote_get_min_fast_tracepoint_insn_len)
9030 (remote_set_trace_buffer_size, remote_set_trace_notes)
9031 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9032 (remote_disable_btrace, remote_teardown_btrace)
9033 (remote_read_btrace, remote_btrace_conf)
9034 (remote_augmented_libraries_svr4_read, remote_load)
9035 (remote_pid_to_exec_file, remote_can_do_single_step)
9036 (remote_execution_direction, remote_thread_handle_to_thread_info):
9037 Refactor as methods of remote_target.
9038 (init_remote_ops, init_extended_remote_ops): Delete.
9039 (remote_can_async_p, remote_is_async_p, remote_async)
9040 (remote_thread_events, remote_upload_tracepoints)
9041 (remote_upload_trace_state_variables): Refactor as methods of
9042 remote_target.
9043 (_initialize_remote): Remove references to init_remote_ops and
9044 init_extended_remote_ops.
9045
9046 * remote-sim.c (gdbsim_target): New class.
9047 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9048 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9049 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9050 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9051 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9052 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9053 Refactor as methods of gdbsim_target.
9054 (gdbsim_ops): Now a gdbsim_target.
9055 (init_gdbsim_ops): Delete.
9056 (gdbsim_cntrl_c): Adjust.
9057 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9058
9059 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9060 (the_amd64_linux_nat_target): New.
9061 (amd64_linux_fetch_inferior_registers)
9062 (amd64_linux_store_inferior_registers): Refactor as methods of
9063 amd64_linux_nat_target.
9064 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9065 * i386-linux-nat.c: Don't include "linux-nat.h".
9066 (i386_linux_nat_target): New class.
9067 (the_i386_linux_nat_target): New.
9068 (i386_linux_fetch_inferior_registers)
9069 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9070 as methods of i386_linux_nat_target.
9071 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9072 * inf-child.c (inf_child_ops): Delete.
9073 (inf_child_fetch_inferior_registers)
9074 (inf_child_store_inferior_registers): Delete.
9075 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9076 methods of inf_child_target.
9077 (inf_child_target::supports_terminal_ours)
9078 (inf_child_target::terminal_init)
9079 (inf_child_target::terminal_inferior)
9080 (inf_child_target::terminal_ours_for_output)
9081 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9082 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9083 New.
9084 (inf_child_open, inf_child_disconnect, inf_child_close)
9085 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9086 (inf_child_post_startup_inferior, inf_child_can_run)
9087 (inf_child_pid_to_exec_file): Refactor as methods of
9088 inf_child_target.
9089 (inf_child_follow_fork): Delete.
9090 (inf_child_target::can_create_inferior)
9091 (inf_child_target::can_attach): New.
9092 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9093 (inf_child_target::has_stack, inf_child_target::has_registers)
9094 (inf_child_target::has_execution): New.
9095 (inf_child_fileio_open, inf_child_fileio_pwrite)
9096 (inf_child_fileio_pread, inf_child_fileio_fstat)
9097 (inf_child_fileio_close, inf_child_fileio_unlink)
9098 (inf_child_fileio_readlink, inf_child_use_agent)
9099 (inf_child_can_use_agent): Refactor as methods of
9100 inf_child_target.
9101 (return_zero, inf_child_target): Delete.
9102 (inf_child_target::inf_child_target): New.
9103 * inf-child.h: Include "target.h".
9104 (inf_child_target): Delete function prototype.
9105 (inf_child_target): New class.
9106 (inf_child_open_target, inf_child_mourn_inferior)
9107 (inf_child_maybe_unpush_target): Delete.
9108 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9109 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9110 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9111 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9112 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9113 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9114 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9115 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9116 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9117 methods of inf_ptrace_target.
9118 (inf_ptrace_target): Delete function.
9119 * inf-ptrace.h: Include "inf-child.h".
9120 (inf_ptrace_target): Delete function declaration.
9121 (inf_ptrace_target): New class.
9122 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9123 * linux-nat.c (linux_target): New.
9124 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9125 (linux_nat_target::~linux_nat_target): New.
9126 (linux_child_post_attach, linux_child_post_startup_inferior)
9127 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9128 (linux_child_remove_fork_catchpoint)
9129 (linux_child_insert_vfork_catchpoint)
9130 (linux_child_remove_vfork_catchpoint)
9131 (linux_child_insert_exec_catchpoint)
9132 (linux_child_remove_exec_catchpoint)
9133 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9134 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9135 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9136 (linux_nat_stopped_data_address)
9137 (linux_nat_stopped_by_sw_breakpoint)
9138 (linux_nat_supports_stopped_by_sw_breakpoint)
9139 (linux_nat_stopped_by_hw_breakpoint)
9140 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9141 (linux_nat_kill, linux_nat_mourn_inferior)
9142 (linux_nat_xfer_partial, linux_nat_thread_alive)
9143 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9144 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9145 (linux_child_static_tracepoint_markers_by_strid)
9146 (linux_nat_is_async_p, linux_nat_can_async_p)
9147 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9148 (linux_nat_supports_multi_process)
9149 (linux_nat_supports_disable_randomization, linux_nat_async)
9150 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9151 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9152 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9153 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9154 methods of linux_nat_target.
9155 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9156 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9157 parameter.
9158 (check_stopped_by_watchpoint): Adjust.
9159 (linux_xfer_partial): Delete.
9160 (linux_target_install_ops, linux_target, linux_nat_add_target):
9161 Delete.
9162 (linux_nat_target::linux_nat_target): New.
9163 * linux-nat.h: Include "inf-ptrace.h".
9164 (linux_nat_target): New.
9165 (linux_target, linux_target_install_ops, linux_nat_add_target):
9166 Delete function declarations.
9167 (linux_target): Declare global.
9168 * linux-thread-db.c (thread_db_target): New.
9169 (thread_db_target::thread_db_target): New.
9170 (thread_db_ops): Delete.
9171 (the_thread_db_target): New.
9172 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9173 (thread_db_update_thread_list, thread_db_pid_to_str)
9174 (thread_db_extra_thread_info)
9175 (thread_db_thread_handle_to_thread_info)
9176 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9177 (thread_db_resume): Refactor as methods of thread_db_target.
9178 (init_thread_db_ops): Delete.
9179 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9180 * x86-linux-nat.c: Don't include "linux-nat.h".
9181 (super_post_startup_inferior): Delete.
9182 (x86_linux_nat_target::~x86_linux_nat_target): New.
9183 (x86_linux_child_post_startup_inferior)
9184 (x86_linux_read_description, x86_linux_enable_btrace)
9185 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9186 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9187 methods of x86_linux_nat_target.
9188 (x86_linux_create_target): Delete. Bits folded ...
9189 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9190 pointer.
9191 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9192 (x86_linux_nat_target): New class.
9193 (x86_linux_create_target): Delete.
9194 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9195 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9196 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9197 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9198 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9199 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9200 make extern.
9201 (x86_use_watchpoints): Delete.
9202 * x86-nat.h: Include "breakpoint.h" and "target.h".
9203 (x86_use_watchpoints): Delete.
9204 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9205 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9206 (x86_insert_watchpoint, x86_remove_watchpoint)
9207 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9208 (x86_stopped_by_hw_breakpoint): New declarations.
9209 (x86_nat_target): New template class.
9210
9211 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9212 (the_ppc_linux_nat_target): New.
9213 (ppc_linux_fetch_inferior_registers)
9214 (ppc_linux_can_use_hw_breakpoint)
9215 (ppc_linux_region_ok_for_hw_watchpoint)
9216 (ppc_linux_ranged_break_num_registers)
9217 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9218 (ppc_linux_insert_mask_watchpoint)
9219 (ppc_linux_remove_mask_watchpoint)
9220 (ppc_linux_can_accel_watchpoint_condition)
9221 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9222 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9223 (ppc_linux_watchpoint_addr_within_range)
9224 (ppc_linux_masked_watch_num_registers)
9225 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9226 (ppc_linux_read_description): Refactor as methods of
9227 ppc_linux_nat_target.
9228 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9229
9230 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9231 (procfs_target): New class.
9232 (the_procfs_target): New.
9233 (procfs_target): Delete function.
9234 (procfs_auxv_parse, procfs_attach, procfs_detach)
9235 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9236 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9237 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9238 (procfs_create_inferior, procfs_update_thread_list)
9239 (procfs_thread_alive, procfs_pid_to_str)
9240 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9241 (procfs_stopped_data_address, procfs_insert_watchpoint)
9242 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9243 (proc_find_memory_regions, procfs_info_proc)
9244 (procfs_make_note_section): Refactor as methods of procfs_target.
9245 (_initialize_procfs): Adjust.
9246 * sol-thread.c (sol_thread_target): New class.
9247 (sol_thread_ops): Now a sol_thread_target.
9248 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9249 (sol_thread_fetch_registers, sol_thread_store_registers)
9250 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9251 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9252 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9253 (init_sol_thread_ops): Delete.
9254 (_initialize_sol_thread): Adjust. Remove references to
9255 init_sol_thread_ops and complete_target_initialization.
9256
9257 * windows-nat.c (windows_nat_target): New class.
9258 (windows_fetch_inferior_registers)
9259 (windows_store_inferior_registers, windows_resume, windows_wait)
9260 (windows_attach, windows_detach, windows_pid_to_exec_file)
9261 (windows_files_info, windows_create_inferior)
9262 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9263 (windows_close, windows_pid_to_str, windows_xfer_partial)
9264 (windows_get_tib_address, windows_get_ada_task_ptid)
9265 (windows_thread_name, windows_thread_alive): Refactor as
9266 windows_nat_target methods.
9267 (do_initial_windows_stuff): Adjust.
9268 (windows_target): Delete function.
9269 (_initialize_windows_nat): Adjust.
9270
9271 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9272 (darwin_mourn_inferior, darwin_kill_inferior)
9273 (darwin_create_inferior, darwin_attach, darwin_detach)
9274 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9275 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9276 (darwin_supports_multi_process): Refactor as darwin_nat_target
9277 methods.
9278 (darwin_resume_to, darwin_files_info): Delete.
9279 (_initialize_darwin_inferior): Rename to ...
9280 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9281 * darwin-nat.h: Include "inf-child.h".
9282 (darwin_nat_target): New class.
9283 (darwin_complete_target): Delete.
9284 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9285 (darwin_target): New.
9286 (i386_darwin_fetch_inferior_registers)
9287 (i386_darwin_store_inferior_registers): Refactor as methods of
9288 darwin_nat_target.
9289 (darwin_complete_target): Delete, with ...
9290 (_initialize_i386_darwin_nat): ... bits factored out here.
9291
9292 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9293 (the_alpha_linux_nat_target): New.
9294 (alpha_linux_register_u_offset): Refactor as
9295 alpha_linux_nat_target method.
9296 (_initialize_alpha_linux_nat): Adjust.
9297 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9298 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9299 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9300 methods of linux_nat_trad_target.
9301 (linux_trad_target): Delete.
9302 * linux-nat-trad.h (linux_trad_target): Delete function.
9303 (linux_nat_trad_target): New class.
9304 * mips-linux-nat.c (mips_linux_nat_target): New class.
9305 (super_fetch_registers, super_store_registers, super_close):
9306 Delete.
9307 (the_mips_linux_nat_target): New.
9308 (mips64_linux_regsets_fetch_registers)
9309 (mips64_linux_regsets_store_registers)
9310 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9311 (mips_linux_register_u_offset, mips_linux_read_description)
9312 (mips_linux_can_use_hw_breakpoint)
9313 (mips_linux_stopped_by_watchpoint)
9314 (mips_linux_stopped_data_address)
9315 (mips_linux_region_ok_for_hw_watchpoint)
9316 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9317 (mips_linux_close): Refactor as methods of mips_linux_nat.
9318 (_initialize_mips_linux_nat): Adjust to C++ification.
9319
9320 * aix-thread.c (aix_thread_target): New class.
9321 (aix_thread_ops): Now an aix_thread_target.
9322 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9323 (aix_thread_fetch_registers, aix_thread_store_registers)
9324 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9325 (aix_thread_thread_alive, aix_thread_pid_to_str)
9326 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9327 Refactor as methods of aix_thread_target.
9328 (init_aix_thread_ops): Delete.
9329 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9330 and complete_target_initialization.
9331 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9332 (rs6000_nat_target): New class.
9333 (the_rs6000_nat_target): New.
9334 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9335 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9336 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9337 (super_create_inferior): Delete.
9338 (_initialize_rs6000_nat): Adjust to C++ification.
9339
9340 * arm-linux-nat.c (arm_linux_nat_target): New class.
9341 (the_arm_linux_nat_target): New.
9342 (arm_linux_fetch_inferior_registers)
9343 (arm_linux_store_inferior_registers, arm_linux_read_description)
9344 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9345 (arm_linux_remove_hw_breakpoint)
9346 (arm_linux_region_ok_for_hw_watchpoint)
9347 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9348 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9349 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9350 arm_linux_nat_target.
9351 (_initialize_arm_linux_nat): Adjust to C++ification.
9352
9353 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9354 (the_aarch64_linux_nat_target): New.
9355 (aarch64_linux_fetch_inferior_registers)
9356 (aarch64_linux_store_inferior_registers)
9357 (aarch64_linux_child_post_startup_inferior)
9358 (aarch64_linux_read_description)
9359 (aarch64_linux_can_use_hw_breakpoint)
9360 (aarch64_linux_insert_hw_breakpoint)
9361 (aarch64_linux_remove_hw_breakpoint)
9362 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9363 (aarch64_linux_region_ok_for_hw_watchpoint)
9364 (aarch64_linux_stopped_data_address)
9365 (aarch64_linux_stopped_by_watchpoint)
9366 (aarch64_linux_watchpoint_addr_within_range)
9367 (aarch64_linux_can_do_single_step): Refactor as methods of
9368 aarch64_linux_nat_target.
9369 (super_post_startup_inferior): Delete.
9370 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9371
9372 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9373 (the_hppa_linux_nat_target): New.
9374 (hppa_linux_fetch_inferior_registers)
9375 (hppa_linux_store_inferior_registers): Refactor as methods of
9376 hppa_linux_nat_target.
9377 (_initialize_hppa_linux_nat): Adjust to C++ification.
9378
9379 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9380 (the_ia64_linux_nat_target): New.
9381 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9382 (ia64_linux_stopped_data_address)
9383 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9384 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9385 ia64_linux_nat_target methods.
9386 (super_xfer_partial): Delete.
9387 (_initialize_ia64_linux_nat): Adjust to C++ification.
9388
9389 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9390 (the_m32r_linux_nat_target): New.
9391 (m32r_linux_fetch_inferior_registers)
9392 (m32r_linux_store_inferior_registers): Refactor as
9393 m32r_linux_nat_target methods.
9394 (_initialize_m32r_linux_nat): Adjust to C++ification.
9395
9396 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9397 (the_m68k_linux_nat_target): New.
9398 (m68k_linux_fetch_inferior_registers)
9399 (m68k_linux_store_inferior_registers): Refactor as
9400 m68k_linux_nat_target methods.
9401 (_initialize_m68k_linux_nat): Adjust to C++ification.
9402
9403 * s390-linux-nat.c (s390_linux_nat_target): New class.
9404 (the_s390_linux_nat_target): New.
9405 (s390_linux_fetch_inferior_registers)
9406 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9407 (s390_insert_watchpoint, s390_remove_watchpoint)
9408 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9409 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9410 (s390_auxv_parse, s390_read_description): Refactor as methods of
9411 s390_linux_nat_target.
9412 (_initialize_s390_nat): Adjust to C++ification.
9413
9414 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9415 (the_sparc_linux_nat_target): New.
9416 (_initialize_sparc_linux_nat): Adjust to C++ification.
9417 * sparc-nat.c (sparc_fetch_inferior_registers)
9418 (sparc_store_inferior_registers): Remove target_ops parameter.
9419 * sparc-nat.h (sparc_fetch_inferior_registers)
9420 (sparc_store_inferior_registers): Remove target_ops parameter.
9421 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9422 (the_sparc64_linux_nat_target): New.
9423 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9424
9425 * spu-linux-nat.c (spu_linux_nat_target): New class.
9426 (the_spu_linux_nat_target): New.
9427 (spu_child_post_startup_inferior, spu_child_post_attach)
9428 (spu_child_wait, spu_fetch_inferior_registers)
9429 (spu_store_inferior_registers, spu_xfer_partial)
9430 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9431 methods.
9432 (_initialize_spu_nat): Adjust to C++ification.
9433
9434 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9435 (the_tilegx_linux_nat_target): New.
9436 (fetch_inferior_registers, store_inferior_registers):
9437 Refactor as methods.
9438 (_initialize_tile_linux_nat): Adjust to C++ification.
9439
9440 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9441 (the_xtensa_linux_nat_target): New.
9442 (xtensa_linux_fetch_inferior_registers)
9443 (xtensa_linux_store_inferior_registers): Refactor as
9444 xtensa_linux_nat_target methods.
9445 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9446
9447 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9448 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9449 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9450 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9451 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9452 (fbsd_stopped_by_sw_breakpoint)
9453 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9454 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9455 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9456 (fbsd_post_startup_inferior, fbsd_post_attach)
9457 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9458 (fbsd_set_syscall_catchpoint)
9459 (super_xfer_partial, super_resume, super_wait)
9460 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9461 (fbsd_handle_debug_trap): Remove target_ops parameter.
9462 (fbsd_nat_add_target): Delete.
9463 * fbsd-nat.h: Include "inf-ptrace.h".
9464 (fbsd_nat_add_target): Delete.
9465 (USE_SIGTRAP_SIGINFO): Define.
9466 (fbsd_nat_target): New class.
9467
9468 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9469 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9470 (amd64bsd_target): Delete.
9471 * amd64-bsd-nat.h: New file.
9472 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9473 "x86-bsd-nat.h".
9474 (amd64_fbsd_nat_target): New class.
9475 (the_amd64_fbsd_nat_target): New.
9476 (amd64fbsd_read_description): Refactor as method of
9477 amd64_fbsd_nat_target.
9478 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9479 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9480 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9481 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9482 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9483 (i386bsd_target): Delete.
9484 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9485 (i386bsd_fetch_inferior_registers)
9486 (i386bsd_store_inferior_registers): Declare.
9487 (i386_bsd_nat_target): New class.
9488 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9489 (the_i386_fbsd_nat_target): New.
9490 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9491 i386_fbsd_nat_target methods.
9492 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9493 (_initialize_i386fbsd_nat): Adjust to C++ification.
9494 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9495 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9496 (_initialize_x86_bsd_nat): Adjust to C++ification.
9497 * x86-bsd-nat.h: Include "x86-nat.h".
9498 (x86bsd_target): Delete declaration.
9499 (x86bsd_nat_target): New class.
9500
9501 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9502 (the_aarch64_fbsd_nat_target): New.
9503 (aarch64_fbsd_fetch_inferior_registers)
9504 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9505 aarch64_fbsd_nat_target.
9506 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9507 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9508 (the_alpha_bsd_nat_target): New.
9509 (alphabsd_fetch_inferior_registers)
9510 (alphabsd_store_inferior_registers): Refactor as
9511 alpha_bsd_nat_target methods.
9512 (_initialize_alphabsd_nat): Refactor as methods of
9513 alpha_bsd_nat_target.
9514 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9515 (the_amd64_nbsd_nat_target): New.
9516 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9517 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9518 (the_amd64_obsd_nat_target): New.
9519 (_initialize_amd64obsd_nat): Adjust to C++ification.
9520 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9521 (the_arm_fbsd_nat_target): New.
9522 (arm_fbsd_fetch_inferior_registers)
9523 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9524 (_initialize_arm_fbsd_nat): Refactor as methods of
9525 arm_fbsd_nat_target.
9526 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9527 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9528 (the_arm_netbsd_nat_target): New.
9529 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9530 arm_netbsd_nat_target.
9531 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9532 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9533 (the_hppa_nbsd_nat_target): New.
9534 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9535 hppa_nbsd_nat_target methods.
9536 (_initialize_hppanbsd_nat): Adjust to C++ification.
9537 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9538 (the_hppa_obsd_nat_target): New.
9539 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9540 methods of hppa_obsd_nat_target.
9541 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9542 add_target.
9543 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9544 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9545 add_target.
9546 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9547 (_initialize_i386obsd_nat): Use add_target.
9548 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9549 (the_m68k_bsd_nat_target): New.
9550 (m68kbsd_fetch_inferior_registers)
9551 (m68kbsd_store_inferior_registers): Refactor as methods of
9552 m68k_bsd_nat_target.
9553 (_initialize_m68kbsd_nat): Adjust to C++ification.
9554 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9555 (the_mips_fbsd_nat_target): New.
9556 (mips_fbsd_fetch_inferior_registers)
9557 (mips_fbsd_store_inferior_registers): Refactor as methods of
9558 mips_fbsd_nat_target.
9559 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9560 add_target.
9561 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9562 (the_mips_nbsd_nat_target): New.
9563 (mipsnbsd_fetch_inferior_registers)
9564 (mipsnbsd_store_inferior_registers): Refactor as methods of
9565 mips_nbsd_nat_target.
9566 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9567 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9568 (the_mips64_obsd_nat_target): New.
9569 (mips64obsd_fetch_inferior_registers)
9570 (mips64obsd_store_inferior_registers): Refactor as methods of
9571 mips64_obsd_nat_target.
9572 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9573 add_target.
9574 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9575 nbsd_nat_target.
9576 * nbsd-nat.h: Include "inf-ptrace.h".
9577 (nbsd_nat_target): New class.
9578 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9579 (obsd_wait): Refactor as methods of obsd_nat_target.
9580 (obsd_add_target): Delete.
9581 * obsd-nat.h: Include "inf-ptrace.h".
9582 (obsd_nat_target): New class.
9583 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9584 (the_ppc_fbsd_nat_target): New.
9585 (ppcfbsd_fetch_inferior_registers)
9586 (ppcfbsd_store_inferior_registers): Refactor as methods of
9587 ppc_fbsd_nat_target.
9588 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9589 add_target.
9590 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9591 (the_ppc_nbsd_nat_target): New.
9592 (ppcnbsd_fetch_inferior_registers)
9593 (ppcnbsd_store_inferior_registers): Refactor as methods of
9594 ppc_nbsd_nat_target.
9595 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9596 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9597 (the_ppc_obsd_nat_target): New.
9598 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9599 methods of ppc_obsd_nat_target.
9600 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9601 add_target.
9602 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9603 (the_sh_nbsd_nat_target): New.
9604 (shnbsd_fetch_inferior_registers)
9605 (shnbsd_store_inferior_registers): Refactor as methods of
9606 sh_nbsd_nat_target.
9607 (_initialize_shnbsd_nat): Adjust to C++ification.
9608 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9609 (inf_ptrace_xfer_partial): Delete.
9610 (sparc_xfer_partial, sparc_target): Delete.
9611 * sparc-nat.h (sparc_fetch_inferior_registers)
9612 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9613 (sparc_target): Delete function declaration.
9614 (sparc_target): New template class.
9615 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9616 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9617 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9618 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9619 add_target.
9620 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9621 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9622 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9623 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9624 add_target.
9625 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9626 (the_vax_bsd_nat_target): New.
9627 (vaxbsd_fetch_inferior_registers)
9628 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9629 methods.
9630 (_initialize_vaxbsd_nat): Adjust to C++ification.
9631
9632 * bsd-kvm.c (bsd_kvm_target): New class.
9633 (bsd_kvm_ops): Now a bsd_kvm_target.
9634 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9635 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9636 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9637 bsd_kvm_target.
9638 (bsd_kvm_return_one): Delete.
9639 (bsd_kvm_add_target): Adjust to C++ification.
9640
9641 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9642 (nto_procfs_target_procfs): New classes.
9643 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9644 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9645 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9646 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9647 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9648 (procfs_remove_hw_breakpoint, procfs_resume)
9649 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9650 (procfs_kill_inferior, procfs_store_registers)
9651 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9652 as methods of nto_procfs_target.
9653 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9654 (nto_native_ops): Delete.
9655 (procfs_open, procfs_native_open): Delete.
9656 (nto_native_ops): Now an nto_procfs_target_native.
9657 (init_procfs_targets): Adjust to C++ification.
9658 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9659 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9660 Refactor as methods of nto_procfs_target.
9661
9662 * go32-nat.c (go32_nat_target): New class.
9663 (the_go32_nat_target): New.
9664 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9665 (go32_store_registers, go32_xfer_partial, go32_files_info)
9666 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9667 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9668 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9669 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9670 (go32_target): Delete.
9671 (_initialize_go32_nat): Adjust to C++ification.
9672
9673 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9674 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9675 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9676 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9677 gnu_nat_target.
9678 (gnu_target): Delete.
9679 * gnu-nat.h (gnu_target): Delete.
9680 (gnu_nat_target): New class.
9681 * i386-gnu-nat.c (gnu_base_target): New.
9682 (i386_gnu_nat_target): New class.
9683 (the_i386_gnu_nat_target): New.
9684 (_initialize_i386gnu_nat): Adjust to C++ification.
9685
9686 2018-05-02 Pedro Alves <palves@redhat.com>
9687
9688 * bfd-target.c (target_bfd_xclose): Rename to ...
9689 (target_bfd_close): ... this.
9690 (target_bfd_reopen): Adjust.
9691 * target.c (target_close): Remove references to to_xclose.
9692 * target.h (target_ops::to_xclose): Delete.
9693 (target_ops::to_close): Update comments.
9694
9695 2018-05-02 Pedro Alves <palves@redhat.com>
9696
9697 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9698 "linux-nat.h".
9699 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9700 * inf-ptrace.c (inf_ptrace_register_u_offset)
9701 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9702 (inf_ptrace_store_register, inf_ptrace_store_registers)
9703 (inf_ptrace_trad_target): Move to ...
9704 * linux-nat-trad.c: ... this new file.
9705 * linux-nat-trad.h: New file.
9706 * linux-nat.c (linux_target_install_ops): Make extern.
9707 (linux_trad_target): Delete.
9708 * linux-nat.h (linux_trad_target): Delete declaration.
9709 (linux_target_install_ops): Declare.
9710 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9711 "linux-nat.h".
9712
9713 2018-05-02 Pedro Alves <palves@redhat.com>
9714
9715 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9716 procfs_target/add_target here.
9717 * procfs.c (procfs_target): Make static.
9718 (_initialize_procfs): Call add_target here.
9719 * procfs.h (struct target_ops): Remove forward declaration.
9720 (procfs_target): Remove declaration.
9721 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9722
9723 2018-05-02 Pedro Alves <palves@redhat.com>
9724
9725 * procfs.c (procfs_stopped_by_watchpoint)
9726 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9727 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9728 Forward declare.
9729 (procfs_use_watchpoints): Delete, move contents...
9730 (procfs_target): ... here.
9731 * procfs.h (procfs_use_watchpoints): Delete declaration.
9732 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9733 procfs_use_watchpoints.
9734 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9735 procfs_use_watchpoints.
9736
9737 2018-05-02 Tom Tromey <tom@tromey.com>
9738
9739 PR python/20084:
9740 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9741 and var_zuinteger_unlimited.
9742 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9743 and PARAM_ZUINTEGER_UNLIMITED.
9744 (set_parameter_value): Handle var_zuinteger and
9745 var_zuinteger_unlimited.
9746 (add_setshow_generic): Likewise.
9747 (parmpy_init): Likewise.
9748
9749 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9750
9751 PR rust/23124
9752 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9753 pointer is not null before dereferencing it.
9754
9755 2018-04-30 Tom Tromey <tom@tromey.com>
9756
9757 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9758 is_mi_like_p.
9759
9760 2018-04-30 Tom Tromey <tom@tromey.com>
9761
9762 * breakpoint.c (mention): Remove use of is_mi_like_p.
9763 (print_mention_ranged_breakpoint): Likewise.
9764 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9765 of is_mi_like_p.
9766
9767 2018-04-30 Tom Tromey <tom@tromey.com>
9768
9769 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9770
9771 2018-04-30 Tom Tromey <tom@tromey.com>
9772
9773 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9774 (info_spu_event_command): Remove some uses of is_mi_like_p.
9775
9776 2018-04-30 Tom Tromey <tom@tromey.com>
9777
9778 * python/py-framefilter.c (py_print_single_arg)
9779 (enumerate_locals, py_print_args, py_print_frame): Remove some
9780 uses of is_mi_like_p.
9781
9782 2018-04-30 Tom Tromey <tom@tromey.com>
9783
9784 * ui-out.c: Update.
9785 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9786 * ui-out.h (ui_out::is_mi_like_p): Now const.
9787 (ui_out::do_is_mi_like_p): Now const.
9788 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9789
9790 2018-04-30 Tom Tromey <tom@tromey.com>
9791
9792 * varobj.c (varobj_set_visualizer): Use new_reference.
9793 * python/python.c (gdbpy_decode_line): Use new_reference.
9794 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9795 new_reference.
9796
9797 2018-04-30 Tom Tromey <tom@tromey.com>
9798
9799 * varobj.c (install_new_value): Use new_reference.
9800 * value.h (value_incref): Return void. Swap intro comment with
9801 value_decref.
9802 * value.c (set_value_parent): Use new_reference.
9803 (value_incref): Return void. Update intro comment.
9804 (release_value): Use new_reference.
9805 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9806
9807 2018-04-30 Tom Tromey <tom@tromey.com>
9808
9809 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9810 * gdb_bfd.h (new_bfd_ref): Remove.
9811 (gdb_bfd_open): Update comment.
9812 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9813 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9814 (gdb_bfd_fdopenr): Use new_reference.
9815 * exec.c (exec_file_attach): Use new_reference.
9816
9817 2018-04-30 Tom Tromey <tom@tromey.com>
9818
9819 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9820 method.
9821
9822 2018-04-30 Tom Tromey <tom@tromey.com>
9823
9824 * jit.c (jit_read_code_entry): Use type_align.
9825 * i386-tdep.c (i386_gdbarch_init): Don't call
9826 set_gdbarch_long_long_align_bit.
9827 * gdbarch.sh: Remove long_long_align_bit.
9828 * gdbarch.c, gdbarch.h: Rebuild.
9829 * arc-tdep.c (arc_type_align): New function.
9830 (arc_gdbarch_init): Use arc_type_align. Don't call
9831 set_gdbarch_long_long_align_bit.
9832
9833 2018-04-30 Tom Tromey <tom@tromey.com>
9834
9835 * rust-lang.c (rust_type_alignment): Remove.
9836 (rust_composite_type): Use type_align.
9837
9838 2018-04-30 Tom Tromey <tom@tromey.com>
9839
9840 * NEWS: Mention Type.align.
9841 * python/py-type.c (typy_get_alignof): New function.
9842 (type_object_getset): Add "alignof".
9843
9844 2018-04-30 Tom Tromey <tom@tromey.com>
9845
9846 PR exp/17095:
9847 * NEWS: Update.
9848 * std-operator.def (UNOP_ALIGNOF): New operator.
9849 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9850 New.
9851 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9852 * c-lang.c (c_op_print_tab): Add alignof.
9853 * c-exp.y (ALIGNOF): New token.
9854 (exp): Add "ALIGNOF" production.
9855 (ident_tokens): Add _Alignof and alignof.
9856
9857 2018-04-30 Tom Tromey <tom@tromey.com>
9858
9859 * i386-tdep.c (i386_type_align): New function.
9860 (i386_gdbarch_init): Update.
9861 * gdbarch.sh (type_align): New method.
9862 * gdbarch.c, gdbarch.h: Rebuild.
9863 * arch-utils.h (default_type_align): Declare.
9864 * arch-utils.c (default_type_align): New function.
9865 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9866 (struct type) <align_log2>: New field.
9867 <instance_flags>: Now a bitfield.
9868 (TYPE_RAW_ALIGN): New macro.
9869 (type_align, type_raw_align, set_type_align): Declare.
9870 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9871 functions.
9872 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9873 (get_alignment, maybe_set_alignment): New functions.
9874 (read_structure_type, read_enumeration_type, read_array_type)
9875 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9876 (read_subrange_type, read_base_type): Set type alignment.
9877
9878 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9879
9880 * dwarf2read.c (read_index_from_section): Use bool.
9881
9882 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9883
9884 PR gdb/22950
9885 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9886 with #ifdef.
9887
9888 2018-04-29 John Reiser <jreiser@BitWagon.com>
9889
9890 PR build/22873
9891 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9892 last step, and do it atomically.
9893
9894 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9895
9896 * compile/compile-c-types.c (convert_int, convert_float):
9897 Update for C FE v1.
9898
9899 2018-04-27 Tom Tromey <tom@tromey.com>
9900
9901 PR rust/22545:
9902 * rust-lang.c (rust_inclusive_range_type_p): New function.
9903 (rust_range): Handle inclusive ranges.
9904 (rust_compute_range): Likewise.
9905 * rust-exp.y (struct rust_op) <inclusive>: New field.
9906 (DOTDOTEQ): New constant.
9907 (range_expr): Add "..=" productions.
9908 (operator_tokens): Add "..=" token.
9909 (ast_range): Add "inclusive" parameter.
9910 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9911 ranges.
9912 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9913 bounds values.
9914 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9915 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9916 Update comments.
9917 * expprint.c (print_subexp_standard): Handle new bounds values.
9918 (dump_subexp_body_standard): Likewise.
9919
9920 2018-04-27 Tom Tromey <tom@tromey.com>
9921
9922 * configure: Rebuild.
9923 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9924 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9925 "OVERRIDE".
9926 (class symbol_needs_eval_context): Likewise.
9927 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9928 (mock_mapped_index::symbol_name_at): Use "override". Remove
9929 "virtual".
9930 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9931 "override".
9932 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9933 * aarch64-tdep.c (instruction_reader::read): Use "override".
9934 (instruction_reader_test::read): Likewise.
9935 * arm-tdep.c (instruction_reader::read): Use "override".
9936 (instruction_reader_thumb::read): Likewise.
9937
9938 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9939
9940 PR remote/9665
9941 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9942 instead of remote_send.
9943 (remote_send): Remove.
9944
9945 2018-04-26 Pedro Alves <palves@redhat.com>
9946
9947 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9948 find_function_start_sal instead of find_pc_line.
9949
9950 2018-04-26 Pedro Alves <palves@redhat.com>
9951
9952 * breakpoint.c (set_breakpoint_location_function): Handle
9953 mst_data_gnu_ifunc.
9954 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9955 * elfread.c (elf_symtab_read): Give data symbols with
9956 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9957 (elf_rel_plt_read): Update comment.
9958 * linespec.c (convert_linespec_to_sals): Handle
9959 mst_data_gnu_ifunc.
9960 (minsym_found): Handle mst_data_gnu_ifunc.
9961 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9962 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9963 * parse.c (find_minsym_type_and_address): Handle
9964 mst_data_gnu_ifunc.
9965 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9966 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9967 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9968 comment.
9969 <mst_data_gnu_ifunc>: New enumerator.
9970
9971 2018-04-26 Pedro Alves <palves@redhat.com>
9972
9973 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9974 (lookup_minimal_symbol_by_pc_section): ... this. Replace
9975 'want_trampoline' parameter by a lookup_msym_prefer parameter.
9976 Handle it.
9977 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9978 (lookup_minimal_symbol_by_pc): Adjust.
9979 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9980 (lookup_solib_trampoline_symbol_by_pc): Adjust.
9981 * minsyms.h (lookup_msym_prefer): New enum.
9982 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9983 parameter by a lookup_msym_prefer parameter.
9984
9985 2018-04-26 Pedro Alves <palves@redhat.com>
9986
9987 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9988 ends in "@plt" instead of looking at the symbol's section.
9989
9990 2018-04-26 Pedro Alves <palves@redhat.com>
9991
9992 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
9993 all references.
9994 (find_pc_partial_function_gnu_ifunc): Rename to ...
9995 (find_pc_partial_function): ... this, and remove references to
9996 'is_gnu_ifunc_p'.
9997 (find_pc_partial_function): Delete old implementation.
9998 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9999
10000 2018-04-26 Pedro Alves <palves@redhat.com>
10001
10002 * linespec.c (struct bound_minimal_symbol_search_key): New.
10003 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10004 skip first line if we found a GNU ifunc minimal symbol by name.
10005 (compare_msymbols): Change parameters to work with a destructured
10006 lhs minsym.
10007 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10008 functions.
10009
10010 2018-04-26 Pedro Alves <palves@redhat.com>
10011
10012 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10013 ifunc targets here. Instead, if we have an ifunc minsym, use its
10014 address/name.
10015 (add_location_to_breakpoint): Store the minsym and the objfile in
10016 the breakpoint location.
10017 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10018 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10019 Record the minsym in the sal.
10020 * symtab.h (symtab_and_line) <msymbol>: New field.
10021
10022 2018-04-26 Pedro Alves <palves@redhat.com>
10023
10024 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10025 unless we actually resolved the ifunc.
10026
10027 2018-04-26 Pedro Alves <palves@redhat.com>
10028
10029 * c-exp.y (variable production): Prefer ifunc minsyms over
10030 regular function symbols.
10031 * symtab.c (find_gnu_ifunc): New function.
10032 * minsyms.h (lookup_msym_prefer): New enum.
10033 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10034 parameter by a lookup_msym_prefer parameter.
10035 * symtab.h (find_gnu_ifunc): New declaration.
10036
10037 2018-04-26 Pedro Alves <palves@redhat.com>
10038
10039 * blockframe.c (find_gnu_ifunc_target_type): New function.
10040 (find_function_type): New.
10041 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10042 return a value with a memory address.
10043 (eval_call): For calls to GNU ifunc functions, try to find the
10044 type of the target function from the type that the resolver
10045 returns.
10046 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10047 symbols.
10048 * infcall.c (find_function_return_type): Delete.
10049 (find_function_addr): Add 'function_type' parameter. For calls to
10050 GNU ifunc functions, try to find the type of the target function
10051 from the type that the resolver returns, and return it via
10052 FUNCTION_TYPE.
10053 (call_function_by_hand_dummy): Adjust to use the function type
10054 returned by find_function_addr.
10055 (find_function_addr): Add 'function_type' parameter and move
10056 description here.
10057 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10058 declarations.
10059
10060 2018-04-26 Pedro Alves <palves@redhat.com>
10061
10062 * c-exp.y (variable production): Skip finding an alias for ifunc
10063 symbols.
10064
10065 2018-04-26 Pedro Alves <palves@redhat.com>
10066
10067 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10068
10069 2018-04-25 Pedro Alves <palves@redhat.com>
10070
10071 * infcmd.c (kill_command): Print the pid as string, not the whole
10072 thread's ptid. Add comment. s/has been killed/killed/ in output
10073 message.
10074 * remote.c (remote_detach_1): Print the pid as string, not the
10075 whole thread's ptid.
10076
10077 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10078 Sergio Durigan Junior <sergiodj@redhat.com>
10079 Pedro Alves <palves@redhat.com>
10080
10081 * infcmd.c (kill_command): Print message when inferior has
10082 been killed.
10083 * inferior.c (print_inferior_events): Remove 'static'. Set as
10084 '1'.
10085 (add_inferior): Improve message printed when
10086 'print_inferior_events' is on.
10087 (exit_inferior): Remove message printed when
10088 'print_inferior_events' is on.
10089 (detach_inferior): Improve message printed when
10090 'print_inferior_events' is on.
10091 (initialize_inferiors): Use 'add_inferior_silent' to set
10092 'current_inferior_'.
10093 * inferior.h (print_inferior_events): Declare here as
10094 'extern'.
10095 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10096 '[Detaching...]' messages when 'print_inferior_events' is on.
10097 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10098 as prefix/suffix for messages. Remove periods. Fix erroneous
10099 'Detaching after fork from child...', replace it by '... from
10100 parent...'.
10101 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10102 prefix/suffix when printing 'Detaching...' messages. Print
10103 them when 'print_inferior_events' is on.
10104 * remote.c (remote_detach_1): Print message when detaching
10105 from inferior and '!is_fork_parent'.
10106
10107 2018-04-24 Tom Tromey <tom@tromey.com>
10108
10109 * cli-out.h: Reindent.
10110
10111 2018-04-24 Tom Tromey <tom@tromey.com>
10112
10113 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10114 (cli_ui_out::do_field_string): Use fputs_filtered.
10115 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10116
10117 2018-04-23 Tom Tromey <tom@tromey.com>
10118
10119 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10120 gdb::unique_xmalloc_ptr.
10121
10122 2018-04-23 Tom Tromey <tom@tromey.com>
10123
10124 * configure: Rebuild.
10125
10126 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10127
10128 PR gdb/23095
10129 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10130 prepare_for_testing. Set normal_bp to r_debug_state if target
10131 is bsd.
10132
10133 2018-04-21 Pedro Alves <palves@redhat.com>
10134 Rajendra SY <rajendra.sy@gmail.com>
10135
10136 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10137 * remote.c (extended_remote_attach): In all-stop mode, mark the
10138 thread as executing.
10139
10140 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10141
10142 * thread.c (thread_apply_all_command): Fix comment.
10143 (thread_command): Fix comment.
10144
10145 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10146
10147 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10148 parameter.
10149 * features/aarch64-core.c (create_feature_aarch64_core):
10150 Regenerate.
10151 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10152 Likewise.
10153 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10154 Likewise.
10155 * features/i386/32bit-avx512.c
10156 (create_feature_i386_32bit_avx512): Likewise.
10157 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10158 Likewise.
10159 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10160 Likewise.
10161 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10162 Likewise.
10163 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10164 Likewise.
10165 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10166 Likewise.
10167 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10168 Likewise.
10169 * features/i386/64bit-avx512.c
10170 (create_feature_i386_64bit_avx512): Likewise.
10171 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10172 Likewise.
10173 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10174 Likewise.
10175 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10176 Likewise.
10177 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10178 Likewise.
10179 * features/i386/64bit-segments.c
10180 (create_feature_i386_64bit_segments): Likewise.
10181 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10182 Likewise.
10183 * features/i386/x32-core.c
10184 (create_feature_i386_x32_core): Likewise.
10185 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10186 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10187 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10188 * target-descriptions.c: In generated code, don't pass xml
10189 filename.
10190
10191 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10192
10193 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10194 (print_xml_feature::visit_post): Likewise.
10195 (print_xml_feature::visit): Likewise.
10196 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10197 (print_xml_feature): Add new class.
10198 * regformats/regdat.sh: Null xmltarget on feature targets.
10199 * target-descriptions.c (struct target_desc): Add xmltarget.
10200 (maintenance_check_tdesc_xml_convert): Add unittest function.
10201 (tdesc_get_features_xml): Add function to get xml.
10202 (maintenance_check_xml_descriptions): Test xml generation.
10203 * xml-tdesc.c (string_read_description_xml): Add function.
10204 * xml-tdesc.h (string_read_description_xml): Add declaration.
10205
10206 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10207
10208 * features/Makefile: Add feature marker to targets with new style
10209 target descriptions.
10210 * regformats/aarch64.dat: Regenerate.
10211 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10212 * regformats/i386/amd64-avx-linux.dat: Likewise.
10213 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10214 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10215 * regformats/i386/amd64-linux.dat: Likewise.
10216 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10217 * regformats/i386/amd64.dat: Likewise.
10218 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10219 * regformats/i386/i386-avx-linux.dat: Likewise.
10220 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10221 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10222 * regformats/i386/i386-linux.dat: Likewise.
10223 * regformats/i386/i386-mmx-linux.dat: Likewise.
10224 * regformats/i386/i386-mpx-linux.dat: Likewise.
10225 * regformats/i386/i386.dat: Likewise.
10226 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10227 * regformats/i386/x32-avx-linux.dat: Likewise.
10228 * regformats/i386/x32-linux.dat: Likewise.
10229 * regformats/tic6x-c62x-linux.dat: Likewise.
10230 * regformats/tic6x-c64x-linux.dat: Likewise.
10231 * regformats/tic6x-c64xp-linux.dat: Likewise.
10232 * regformats/regdat.sh: Parse feature marker.
10233
10234 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10235
10236 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10237 (tdesc_osabi_name): Likewise.
10238 * target-descriptions.c (tdesc_architecture_name): Add new
10239 function.
10240 (tdesc_osabi_name): Likewise.
10241
10242 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10243
10244 * common/tdesc.c (tdesc_predefined_type): Move to here.
10245 (tdesc_named_type): Likewise.
10246 (tdesc_create_vector): Likewise.
10247 (tdesc_create_struct): Likewise.
10248 (tdesc_set_struct_size): Likewise.
10249 (tdesc_create_union): Likewise.
10250 (tdesc_create_flags): Likewise.
10251 (tdesc_create_enum): Likewise.
10252 (tdesc_add_field): Likewise.
10253 (tdesc_add_typed_bitfield): Likewise.
10254 (tdesc_add_bitfield): Likewise.
10255 (tdesc_add_flag): Likewise.
10256 (tdesc_add_enum_value): Likewise.
10257 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10258 (struct tdesc_type_vector): Likewise.
10259 (struct tdesc_type_field): Likewise.
10260 (struct tdesc_type_with_fields): Likewise.
10261 (tdesc_create_enum): Add declaration.
10262 (tdesc_add_typed_bitfield): Likewise.
10263 (tdesc_add_enum_value): Likewise.
10264 * target-descriptions.c (tdesc_type_field): Move from here.
10265 (tdesc_type_builtin): Likewise.
10266 (tdesc_type_vector): Likewise.
10267 (tdesc_type_with_fields): Likewise.
10268 (tdesc_predefined_types): Likewise.
10269 (tdesc_named_type): Likewise.
10270 (tdesc_create_vector): Likewise.
10271 (tdesc_create_struct): Likewise.
10272 (tdesc_set_struct_size): Likewise.
10273 (tdesc_create_union): Likewise.
10274 (tdesc_create_flags): Likewise.
10275 (tdesc_create_enum): Likewise.
10276 (tdesc_add_field): Likewise.
10277 (tdesc_add_typed_bitfield): Likewise.
10278 (tdesc_add_bitfield): Likewise.
10279 (tdesc_add_flag): Likewise.
10280 (tdesc_add_enum_value): Likewise.
10281 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10282 (tdesc_add_typed_bitfield): Likewise.
10283 (tdesc_add_enum_value): Likewise.
10284
10285 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10286
10287 * common/tdesc.c (tdesc_feature::accept): Move to here.
10288 (tdesc_feature::operator==): Likewise.
10289 (tdesc_create_reg): Likewise.
10290 * common/tdesc.h (tdesc_type_kind): Likewise.
10291 (struct tdesc_type): Likewise.
10292 (struct tdesc_feature): Likewise.
10293 * regformats/regdat.sh: Create a feature.
10294 * target-descriptions.c (tdesc_type_kind): Move from here.
10295 (tdesc_type): Likewise.
10296 (tdesc_type_up): Likewise.
10297 (tdesc_feature): Likewise.
10298 (tdesc_create_reg): Likewise.
10299
10300 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10301
10302 * Makefile.in: Add arch/tdesc.c
10303 * common/tdesc.c: New file.
10304 * common/tdesc.h (tdesc_element_visitor): Move to here.
10305 (tdesc_element): Likewise.
10306 (tdesc_reg): Likewise.
10307 (tdesc_reg_up): Likewise.
10308 * regformats/regdef.h (reg): Add offset to constructors.
10309 * target-descriptions.c (tdesc_element_visitor): Move from here.
10310 (tdesc_element): Likewise.
10311 (tdesc_reg): Likewise.
10312 (tdesc_reg_up): Likewise.
10313
10314 2018-04-17 Tom Tromey <tom@tromey.com>
10315
10316 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10317 discriminant field.
10318
10319 2018-04-17 Tom Tromey <tom@tromey.com>
10320
10321 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10322
10323 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10324
10325 * symtab.c (print_symbol_info): Skip printing filename and line
10326 number when `last' is NULL.
10327 (symtab_symbol_info): Use empty string instead of NULL for first
10328 invocation of print_symbol_info.
10329 (rbreak_command): Pass NULL to `last' parameter of
10330 print_symbol_info.
10331
10332 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10333
10334 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10335 instead of nullptr.
10336
10337 2018-04-16 Pedro Alves <palves@redhat.com>
10338
10339 * MAINTAINERS (sh): Remove.
10340 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10341 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10342 (ALLDEPFILES): Remove sh64-tdep.c.
10343 * NEWS: Mentions that support for SH-5/SH64 is removed.
10344 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10345 (sh*-*-openbsd*): Ditto.
10346 (sh64-*-elf*): Remove.
10347 (sh*): Remove.
10348 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10349 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10350 * sh-tdep.c: No longer include "sh64-tdep.h".
10351 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10352 * sh64-tdep.c, sh64-tdep.h: Remove files.
10353
10354 2018-04-16 Pedro Alves <palves@redhat.com>
10355
10356 * MAINTAINERS: Remove m88k.
10357 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10358 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10359 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10360 * NEWS: Mention that support for m88k was removed.
10361 * configure.host (m88*-*-*): Remove support.
10362 * configure.nat (m88k-*-*): Remove support.
10363 * configure.tgt (m88*-*-openbsd*): Remove.
10364 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10365
10366 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10367
10368 * configure.tgt (x86_tobjs): New variable.
10369 (amd64_tobjs, i386_tobjs): Use it.
10370
10371 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10372
10373 * symtab.c (print_symbol_info): Precede the symbol definition by
10374 the line number when available.
10375 * NEWS: Advertise this enhancement.
10376
10377 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10378
10379 * NEWS (New options): announce set/show record btrace cpu.
10380 * btrace.c: Include record-btrace.h.
10381 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10382 the vendor is unknown.
10383 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10384 Maybe overwrite the btrace configuration's cpu.
10385 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10386 (btrace_fetch): Add cpu parameter. Update callers.
10387 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10388 Maybe overwrite the btrace configuration's cpu. Skip enabling
10389 errata workarounds if the vendor is unknown.
10390 * python/py-record-btrace.c: Include record-btrace.h.
10391 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10392 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10393 * record-btrace.c (record_btrace_cpu_state_kind): New.
10394 (record_btrace_cpu): New.
10395 (set_record_btrace_cpu_cmdlist): New.
10396 (record_btrace_get_cpu): New.
10397 (require_btrace_thread, record_btrace_info)
10398 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10399 (cmd_set_record_btrace_cpu_none): New.
10400 (cmd_set_record_btrace_cpu_auto): New.
10401 (cmd_set_record_btrace_cpu): New.
10402 (cmd_show_record_btrace_cpu): New.
10403 (_initialize_record_btrace): Initialize set/show record btrace cpu
10404 commands.
10405 * record-btrace.h (record_btrace_get_cpu): New.
10406
10407 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10408
10409 * record.c (set_record_command): Fix typo in message.
10410
10411 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10412
10413 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10414
10415 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10416
10417 * infrun.c (process_event_stop_test): Call
10418 gdbarch_in_indirect_branch_thunk.
10419 * gdbarch.sh (in_indirect_branch_thunk): New.
10420 * gdbarch.c: Regenerated.
10421 * gdbarch.h: Regenerated.
10422 * x86-tdep.h: New.
10423 * x86-tdep.c: New.
10424 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10425 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10426 (ALLDEPFILES): Add x86-tdep.c.
10427 * arch-utils.h (default_in_indirect_branch_thunk): New.
10428 * arch-utils.c (default_in_indirect_branch_thunk): New.
10429 * i386-tdep: Include x86-tdep.h.
10430 (i386_in_indirect_branch_thunk): New.
10431 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10432 function.
10433 * amd64-tdep: Include x86-tdep.h.
10434 (amd64_in_indirect_branch_thunk): New.
10435 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10436
10437 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10438
10439 PR gdb/23053
10440 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10441 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10442 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10443 regression.
10444
10445 2018-04-12 Tom Tromey <tom@tromey.com>
10446
10447 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10448 (rust_evaluate_subexp): Likewise.
10449
10450 2018-04-12 Pedro Alves <palves@redhat.com>
10451
10452 * procfs.c (procfs_detach): Make forward declaration's prototype
10453 match definition's protototype.
10454 (proc_get_LDT_entry): Remove stale do_cleanups call.
10455
10456 2018-04-12 Pedro Alves <palves@redhat.com>
10457
10458 * target.h (target_ops::to_has_exited): Delete.
10459 (target_has_exited): Delete.
10460 * target-delegates.c: Regenerate.
10461
10462 2018-04-11 Pedro Alves <palves@redhat.com>
10463
10464 * target.c (fileio_fh_t::t): Add comment.
10465 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10466 (target_fileio_close): Handle a NULL target.
10467 (invalidate_fileio_fh): New.
10468 (target_close): Call it.
10469 * remote.c (remote_hostio_send_command): No longer check whether
10470 remote_desc is open.
10471
10472 2018-04-11 Pedro Alves <palves@redhat.com>
10473
10474 * target.c (fileio_fh_t): Make it a named struct instead of a
10475 typedef.
10476 (fileio_fh_t::is_closed): New method.
10477 (DEF_VEC_O (fileio_fh_t)): Remove.
10478 (fileio_fhandles): Now a std::vector.
10479 (is_closed_fileio_fh): Delete.
10480 (acquire_fileio_fd): Adjust. Rename parameters.
10481 (release_fileio_fd): Adjust.
10482 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10483 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10484 (target_fileio_close): Adjust.
10485
10486 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10487
10488 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10489 index.
10490
10491 2018-04-10 Pedro Alves <palves@redhat.com>
10492
10493 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10494 (scoped_finish_thread_state): New class.
10495 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10496 cleanup.
10497 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10498 (fetch_inferior_event, normal_stop): Likewise.
10499 * thread.c (finish_thread_state_cleanup): Delete.
10500
10501 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10502 Pedro Alves <palves@redhat.com>
10503
10504 * value.c: Include "selftest.h" and "common/array-view.h".
10505 (struct range) <operator ==>: New.
10506 (test_ranges_contain): New.
10507 (check_ranges_vector): New.
10508 (test_insert_into_bit_range_vector): New.
10509 (_initialize_values): Register selftests.
10510 * common/array-view.h (operator==, operator!=): New.
10511
10512 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10513
10514 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10515 an iterator.
10516 * inline-frame.c: Include <algorithm>.
10517 (struct inline_state): Add constructor.
10518 (inline_state_s): Remove.
10519 (DEF_VEC_O(inline_state_s)): Remove.
10520 (inline_states): Change type to std::vector.
10521 (find_inline_frame_state): Adjust to std::vector.
10522 (allocate_inline_frame_state): Remove.
10523 (clear_inline_frame_state): Adjust to std::vector.
10524 (skip_inline_frames): Adjust to std::vector.
10525
10526 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10527
10528 * tracepoint.h (struct trace_state_variable): Add constructor.
10529 <name>: Change type to std::string.
10530 * tracepoint.c (tsv_s): Remove.
10531 (DEF_VEC_O(tsv_s)): Remove.
10532 (tvariables): Change to std::vector.
10533 (create_trace_state_variable): Adjust to std::vector.
10534 (find_trace_state_variable): Likewise.
10535 (find_trace_state_variable_by_number): Likewise.
10536 (delete_trace_state_variable): Likewise.
10537 (trace_variable_command): Adjust to std::string.
10538 (delete_trace_variable_command): Likewise.
10539 (tvariables_info_1): Adjust to std::vector.
10540 (save_trace_state_variables): Likewise.
10541 (start_tracing): Likewise.
10542 (merge_uploaded_trace_state_variables): Adjust to std::vector
10543 and std::string.
10544 * target.h (struct target_ops)
10545 <to_download_trace_state_variable>: Pass reference to
10546 trace_state_variable.
10547 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10548 * target-delegates.c: Re-generate.
10549 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10550 (mi_tsv_deleted): Likewise.
10551 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10552 * remote.c (remote_download_trace_state_variable): Change
10553 pointer to reference and adjust.
10554 * make-target-delegates (parse_argtypes): Handle references.
10555 (write_function_header): Likewise.
10556 (munge_type): Likewise.
10557
10558 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10559
10560 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10561 string_view-selftests.c.
10562 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10563 testsuite.
10564 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10565 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10566 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10567 * unittests/basic_string_view/element_access/char/1.cc:
10568 Likewise.
10569 * unittests/basic_string_view/element_access/char/empty.cc:
10570 Likewise.
10571 * unittests/basic_string_view/element_access/char/front_back.cc:
10572 Likewise.
10573 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10574 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10575 Likewise.
10576 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10577 Likewise.
10578 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10579 Likewise.
10580 * unittests/basic_string_view/operations/compare/char/1.cc:
10581 Likewise.
10582 * unittests/basic_string_view/operations/compare/char/13650.cc:
10583 Likewise.
10584 * unittests/basic_string_view/operations/copy/char/1.cc:
10585 Likewise.
10586 * unittests/basic_string_view/operations/data/char/1.cc:
10587 Likewise.
10588 * unittests/basic_string_view/operations/find/char/1.cc:
10589 Likewise.
10590 * unittests/basic_string_view/operations/find/char/2.cc:
10591 Likewise.
10592 * unittests/basic_string_view/operations/find/char/3.cc:
10593 Likewise.
10594 * unittests/basic_string_view/operations/find/char/4.cc:
10595 Likewise.
10596 * unittests/basic_string_view/operations/rfind/char/1.cc:
10597 Likewise.
10598 * unittests/basic_string_view/operations/rfind/char/2.cc:
10599 Likewise.
10600 * unittests/basic_string_view/operations/rfind/char/3.cc:
10601 Likewise.
10602 * unittests/basic_string_view/operations/substr/char/1.cc:
10603 Likewise.
10604 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10605 * unittests/string_view-selftests.c: New file.
10606
10607 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10608
10609 * unittests/basic_string_view/capacity/1.cc: New file.
10610 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10611 * unittests/basic_string_view/cons/char/1.cc: New file.
10612 * unittests/basic_string_view/cons/char/2.cc: New file.
10613 * unittests/basic_string_view/cons/char/3.cc: New file.
10614 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10615 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10616 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10617 * unittests/basic_string_view/element_access/char/1.cc: New file.
10618 * unittests/basic_string_view/element_access/char/2.cc: New file.
10619 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10620 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10621 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10622 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10623 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10624 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10625 * unittests/basic_string_view/include.cc: New file.
10626 * unittests/basic_string_view/inserters/char/1.cc: New file.
10627 * unittests/basic_string_view/inserters/char/2.cc: New file.
10628 * unittests/basic_string_view/inserters/char/3.cc: New file.
10629 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10630 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10631 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10632 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10633 * unittests/basic_string_view/literals/types.cc: New file.
10634 * unittests/basic_string_view/literals/values.cc: New file.
10635 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10636 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10637 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10638 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10639 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10640 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10641 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10642 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10643 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10644 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10645 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10646 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10647 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10648 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10649 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10650 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10651 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10652 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10653 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10654 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10655 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10656 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10657 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10658 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10659 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10660 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10661 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10662 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10663 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10664 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10665 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10666 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10667 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10668 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10669 * unittests/basic_string_view/operators/char/2.cc: New file.
10670 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10671 * unittests/basic_string_view/range_access/char/1.cc: New file.
10672 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10673 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10674 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10675 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10676 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10677 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10678 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10679 * unittests/basic_string_view/typedefs.cc: New file.
10680 * unittests/basic_string_view/types/1.cc: New file.
10681
10682 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10683
10684 * common/gdb_string_view.h: Remove libstdc++ implementation
10685 details, adjust to gdb reality.
10686 * common/gdb_string_view.tcc: Likewise.
10687 * cli/cli-script.c (struct string_view): Remove.
10688 (user_args) <m_args>: Change element type to gdb::string_view.
10689 (user_args::insert_args): Adjust.
10690
10691 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10692
10693 * common/gdb_string_view.h: New file.
10694 * common/gdb_string_view.tcc: New file.
10695
10696 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10697
10698 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10699 * configure: Re-generate.
10700
10701 2018-04-09 Pedro Alves <palves@redhat.com>
10702
10703 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10704 (set_target_gdbarch): Call
10705 gdb::observers::architecture_changed.notify instead of
10706 observer_notify_architecture_changed.
10707
10708 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10709
10710 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10711 (do_restore_current_traceframe_cleanup): Remove.
10712 (restore_current_traceframe_cleanup_dtor): Remove.
10713 (make_cleanup_restore_current_traceframe): Remove.
10714 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10715 New.
10716 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10717 * infrun.c (fetch_inferior_event): Use
10718 scoped_restore_current_traceframe.
10719
10720 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10721
10722 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10723 Remove.
10724 <n_allocated_type_units>: Remove.
10725 <all_type_units>: Change to std::vector.
10726 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10727 to std::vector change.
10728 (dwarf2_per_objfile::get_cutu): Likewise.
10729 (dwarf2_per_objfile::get_tu): Likewise.
10730 (create_signatured_type_table_from_index): Likewise.
10731 (create_signatured_type_table_from_debug_names): Likewise.
10732 (dw2_symtab_iter_next): Likewise.
10733 (dw2_print_stats): Likewise.
10734 (dw2_expand_all_symtabs): Likewise.
10735 (dw2_expand_marked_cus): Likewise.
10736 (dw2_debug_names_iterator::next): Likewise.
10737 (dwarf2_initialize_objfile): Likewise.
10738 (add_signatured_type_cu_to_table): Likewise.
10739 (create_all_type_units): Likewise.
10740 (add_type_unit): Likewise.
10741 (struct tu_abbrev_offset): Add constructor.
10742 (build_type_psymtabs_1): Adjust to std::vector change.
10743 (print_tu_stats): Likewise.
10744 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10745 (write_debug_names): Likewise.
10746
10747 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10748
10749 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10750 Make an std::vector.
10751 <n_comp_units>: Remove.
10752 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10753 to std::vector change.
10754 (dwarf2_per_objfile::get_cutu): Likewise.
10755 (dwarf2_per_objfile::get_cu): Likewise.
10756 (create_cus_from_index): Likewise.
10757 (create_addrmap_from_index): Likewise.
10758 (create_addrmap_from_aranges): Likewise.
10759 (dwarf2_read_index): Likewise.
10760 (dw2_find_last_source_symtab): Likewise.
10761 (dw2_map_symtabs_matching_filename): Likewise.
10762 (dw2_symtab_iter_next): Likewise.
10763 (dw2_print_stats): Likewise.
10764 (dw2_expand_all_symtabs): Likewise.
10765 (dw2_expand_symtabs_with_fullname): Likewise.
10766 (dw2_expand_marked_cus): Likewise.
10767 (dw2_map_symbol_filenames): Likewise.
10768 (create_cus_from_debug_names): Likewise.
10769 (dwarf2_read_debug_names): Likewise.
10770 (dw2_debug_names_iterator::next): Likewise.
10771 (dwarf2_initialize_objfile): Likewise.
10772 (set_partial_user): Likewise.
10773 (dwarf2_build_psymtabs_hard): Likewise.
10774 (read_comp_units_from_section): Remove arguments, adjust to
10775 std::vector change.
10776 (create_all_comp_units): Adjust to std::vector and
10777 read_comp_units_from_section changes.
10778 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10779 change.
10780 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10781 (psyms_seen_size): Likewise.
10782 (write_gdbindex): Likewise.
10783 (write_debug_names): Likewise.
10784
10785 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10786
10787 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10788 with dwarf2_per_objfile.
10789 (create_cus_from_index): Likewise.
10790 (create_signatured_type_table_from_index): Likewise.
10791 (dwarf2_read_index): Likewise.
10792 (dwarf2_initialize_objfile): Likewise.
10793 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10794 per_cu rather than get_dwarf2_per_objfile.
10795
10796 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10797
10798 * dwarf2read.h (struct signatured_type): Forward declare.
10799 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10800 New methods.
10801 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10802 (dw2_get_cutu): ...this.
10803 (dwarf2_per_objfile::get_cu): Rename from...
10804 (dw2_get_cu): ...this.
10805 (dwarf2_per_objfile::get_tu): New.
10806 (create_addrmap_from_index): Adjust.
10807 (create_addrmap_from_aranges): Adjust.
10808 (dw2_find_last_source_symtab): Adjust.
10809 (dw2_map_symtabs_matching_filename): Adjust.
10810 (dw2_symtab_iter_next): Adjust.
10811 (dw2_print_stats): Adjust.
10812 (dw2_expand_all_symtabs): Adjust.
10813 (dw2_expand_symtabs_with_fullname): Adjust.
10814 (dw2_expand_marked_cus): Adjust.
10815 (dw_expand_symtabs_matching_file_matcher): Adjust.
10816 (dw2_map_symbol_filenames): Adjust.
10817 (dw2_debug_names_iterator::next): Adjust.
10818 (dwarf2_initialize_objfile): Adjust.
10819 (set_partial_user): Adjust.
10820 (dwarf2_build_psymtabs_hard): Adjust.
10821
10822 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10823
10824 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10825 Remove unused variables.
10826 (dw2_map_symtabs_matching_filename): Likewise.
10827 (dwarf2_record_block_ranges): Likewise.
10828 (dwarf2_read_addr_index): Likewise.
10829 (follow_die_offset): Likewise.
10830
10831 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10832
10833 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10834 to symbol_file_add_main.
10835
10836 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10837
10838 PR mi/22299
10839 * mi/mi-console.c (do_fputc_async_safe): New.
10840 (mi_console_file::write_async_safe): New.
10841 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10842 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10843 New.
10844 * ui-file.c (ui_file::putstrn): Adjust call to
10845 fputstrn_unfiltered.
10846 * utils.c (printchar): Replace do_fputs and do_fprintf
10847 parameters by do_fputc.
10848 (fputstr_filtered): Adjust call to printchar.
10849 (fputstr_unfiltered): Likewise.
10850 (fputstrn_filtered): Likewise.
10851 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10852 printchar.
10853 * utils.h (do_fputc_ftype): New typedef.
10854 (fputstrn_unfiltered): Add do_fputc parameter.
10855
10856 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10857
10858 * regformats/i386/i386-avx.dat: Remove.
10859
10860 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10861
10862 PR gdb/22979
10863 * amd64-tdep.c (amd64_none_init_abi): New function.
10864 (amd64_x32_none_init_abi): New function.
10865 (_initialize_amd64_tdep): Register handlers for x86-64 and
10866 x64_32 with GDB_OSABI_NONE.
10867 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10868 GDB_OSABI_NONE osabi.
10869
10870 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10871
10872 PR gdb/22980
10873 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10874 GDB_OSABI_NONE.
10875 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10876 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10877
10878 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10879
10880 * common/byte-vector.h (char_vector): New type.
10881 * target.h (target_read_alloc): Return
10882 gdb::optional<byte_vector>.
10883 (target_read_stralloc): Return gdb::optional<char_vector>.
10884 (target_get_osdata): Return gdb::optional<char_vector>.
10885 * target.c (target_read_alloc_1): Templatize. Replacement
10886 manual memory management with vector.
10887 (target_read_alloc): Change return type, adjust.
10888 (target_read_stralloc): Change return type, adjust.
10889 (target_get_osdata): Change return type, adjust.
10890 * auxv.c (struct auxv_info) <length>: Remove.
10891 <data>: Change type to gdb::optional<byte_vector>.
10892 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10893 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10894 (target_auxv_search): Adjust.
10895 (fprint_target_auxv): Adjust.
10896 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10897 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10898 (linux_make_corefile_notes): Adjust.
10899 * osdata.c (get_osdata): Adjust.
10900 * remote.c (remote_get_threads_with_qxfer): Adjust.
10901 (remote_memory_map): Adjust.
10902 (remote_traceframe_info): Adjust.
10903 (btrace_read_config): Adjust.
10904 (remote_read_btrace): Adjust.
10905 (remote_pid_to_exec_file): Adjust.
10906 * solib-aix.c (solib_aix_get_library_list): Adjust.
10907 * solib-dsbt.c (decode_loadmap): Don't free buf.
10908 (dsbt_get_initial_loadmaps): Adjust.
10909 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10910 * solib-target.c (solib_target_current_sos): Adjust.
10911 * tracepoint.c (sdata_make_value): Adjust.
10912 * xml-support.c (xinclude_start_include): Adjust.
10913 (xml_fetch_content_from_file): Adjust.
10914 * xml-support.h (xml_fetch_another): Change return type.
10915 (xml_fetch_content_from_file): Change return type.
10916 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10917 * xml-tdesc.c (file_read_description_xml): Adjust.
10918 (fetch_available_features_from_target): Change return type.
10919 (target_fetch_description_xml): Adjust.
10920 (target_read_description_xml): Adjust.
10921
10922 2018-04-06 Tom Tromey <tom@tromey.com>
10923
10924 * value.c (~value): Update.
10925 (struct value) <contents>: Now unique_xmalloc_ptr.
10926 (value_contents_bits_eq, allocate_value_contents)
10927 (value_contents_raw, value_contents_all_raw)
10928 (value_contents_for_printing, value_contents_for_printing_const)
10929 (set_value_enclosing_type): Update.
10930
10931 2018-04-06 Tom Tromey <tom@tromey.com>
10932
10933 * value.c (range_s): Remove typedef, VEC.
10934 (struct range): Add operator<.
10935 (range_lessthan): Remove.
10936 (ranges_contain): Change type.
10937 (~value): Update.
10938 (struct value) <unavailable, optimized_out>: Now std::vector.
10939 (value_entirely_available)
10940 (value_entirely_covered_by_range_vector)
10941 (value_entirely_unavailable, value_entirely_optimized_out):
10942 Update.
10943 (insert_into_bit_range_vector): Change argument type.
10944 (find_first_range_overlap): Likewise.
10945 (struct ranges_and_idx, value_contents_bits_eq)
10946 (require_not_optimized_out, require_available): Update.
10947 (ranges_copy_adjusted): Change argument types.
10948 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10949
10950 2018-04-06 Tom Tromey <tom@tromey.com>
10951
10952 * value.c (~value): Update.
10953 (struct value) <parent>: Now a value_ref_ptr.
10954 (value_parent, set_value_parent, value_address, value_copy):
10955 Update.
10956
10957 2018-04-06 Tom Tromey <tom@tromey.com>
10958
10959 * value.c (struct value): Add constructor, destructor, and member
10960 initializers.
10961 (allocate_value_lazy, value_decref): Update.
10962
10963 2018-04-06 Tom Tromey <tom@tromey.com>
10964
10965 * value.c (struct value) <released, next>: Remove.
10966 (all_values): Now a std::vector.
10967 (allocate_value_lazy): Update.
10968 (value_next): Remove.
10969 (value_mark, value_free_to_mark, release_value)
10970 (value_release_to_mark): Update.
10971
10972 2018-04-06 Tom Tromey <tom@tromey.com>
10973
10974 * value.h (fetch_subexp_value, value_release_to_mark): Update.
10975 (free_value_chain): Remove.
10976 * value.c (free_value_chain): Remove.
10977 (value_release_to_mark): Return a std::vector.
10978 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10979 std::vector.
10980 (check_condition): Update.
10981 * eval.c (fetch_subexp_value): Change "val_chain" to a
10982 std::vector.
10983 * breakpoint.c (update_watchpoint): Update.
10984 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10985
10986 2018-04-06 Tom Tromey <tom@tromey.com>
10987
10988 * value.h (free_all_values): Remove.
10989 * value.c (free_all_values): Remove.
10990
10991 2018-04-06 Tom Tromey <tom@tromey.com>
10992
10993 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10994 (value_history_chain, value_history_count): Remove.
10995 (value_history): New global.
10996 (record_latest_value, access_value_history, show_values)
10997 (preserve_values): Update.
10998
10999 2018-04-06 Tom Tromey <tom@tromey.com>
11000
11001 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11002 * varobj.c (varobj_set_display_format, varobj_set_value)
11003 (install_default_visualizer, construct_visualizer)
11004 (install_new_value, ~varobj, varobj_get_value_type)
11005 (my_value_of_variable, varobj_editable_p): Update.
11006 * c-varobj.c (c_describe_child, c_value_of_variable)
11007 (cplus_number_of_children, cplus_describe_child): Update.
11008 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11009 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11010 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11011
11012 2018-04-06 Tom Tromey <tom@tromey.com>
11013
11014 * printcmd.c (last_examine_address): Change type to
11015 value_ref_ptr.
11016 (do_examine, x_command): Update.
11017
11018 2018-04-06 Tom Tromey <tom@tromey.com>
11019
11020 * value.c (release_value): Update.
11021 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11022 (struct bpstats) <val>: Now a value_ref_ptr.
11023 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11024 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11025 (~watchpoint, print_it_watchpoint, watch_command_1)
11026 (invalidate_bp_value_on_memory_change): Update.
11027
11028 2018-04-06 Tom Tromey <tom@tromey.com>
11029
11030 * varobj.c (varobj_clear_saved_item)
11031 (update_dynamic_varobj_children, install_new_value, ~varobj):
11032 Update.
11033 * value.h (value_incref): Move declaration earlier.
11034 (value_decref): Rename from value_free.
11035 (struct value_ref_policy): New.
11036 (value_ref_ptr): New typedef.
11037 (struct value_deleter): Remove.
11038 (gdb_value_up): Remove typedef.
11039 (release_value): Change return type.
11040 (release_value_or_incref): Remove.
11041 * value.c (set_value_parent): Update.
11042 (value_incref): Change return type.
11043 (value_decref): Rename from value_free.
11044 (value_free_to_mark, free_all_values, free_value_chain): Update.
11045 (release_value): Return value_ref_ptr.
11046 (release_value_or_incref): Remove.
11047 (record_latest_value, set_internalvar, clear_internalvar):
11048 Update.
11049 * stack.c (info_frame_command): Don't call value_free.
11050 * python/py-value.c (valpy_dealloc, valpy_new)
11051 (value_to_value_object): Update.
11052 * printcmd.c (do_examine): Update.
11053 * opencl-lang.c (lval_func_free_closure): Update.
11054 * mi/mi-main.c (register_changed_p): Don't call value_free.
11055 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11056 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11057 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11058 value_free.
11059 * guile/scm-value.c (vlscm_free_value_smob)
11060 (vlscm_scm_from_value): Update.
11061 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11062 (frame_unwind_register_unsigned, get_frame_register_bytes)
11063 (put_frame_register_bytes): Don't call value_free.
11064 * findvar.c (address_from_register): Don't call value_free.
11065 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11066 * dwarf2loc.c (entry_data_value_free_closure)
11067 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11068 (dwarf2_evaluate_loc_desc_full): Update.
11069 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11070 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11071 (~watchpoint, watch_command_1)
11072 (invalidate_bp_value_on_memory_change): Update.
11073 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11074
11075 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11076
11077 PR gdb/23022
11078 * warning.m4: Add -Wno-error=deprecated-register.
11079 * configure: Re-generate.
11080
11081 2018-04-05 Tom Tromey <tom@tromey.com>
11082
11083 * linespec.h: Remove include of "vec.h".
11084
11085 2018-04-05 Tom Tromey <tom@tromey.com>
11086
11087 * linespec.c (typep): Remove typedef.
11088 (find_methods, find_superclass_methods): Take a std::vector.
11089 (find_method): Use std::vector.
11090
11091 2018-04-05 Tom Tromey <tom@tromey.com>
11092
11093 * utils.c (compare_strings): Remove.
11094 * utils.h (compare_strings): Remove.
11095 * objc-lang.h (find_imps): Update.
11096 * objc-lang.c (find_methods): Take a std::vector.
11097 (uniquify_strings, find_imps): Likewise.
11098 * linespec.c (find_methods): Take a std::vector.
11099 (decode_objc): Use std::vector.
11100 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11101 a std::vector.
11102 (find_method, find_function_symbols): Use std::vector.
11103
11104 2018-04-05 Tom Tromey <tom@tromey.com>
11105
11106 * completer.c (completion_tracker::completion_tracker): Remove
11107 cast.
11108 (completion_tracker::discard_completions): Likewise.
11109 * breakpoint.c (ambiguous_names_p): Remove cast.
11110 * ada-lang.c (_initialize_ada_language): Remove cast.
11111 * utils.h (streq): Update.
11112 (streq_hash): Add new declaration.
11113 * utils.c (streq): Return bool.
11114 (streq_hash): New function.
11115
11116 2018-04-05 Tom Tromey <tom@tromey.com>
11117
11118 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11119 Remove a string copy.
11120
11121 2018-04-05 Tom Tromey <tom@tromey.com>
11122
11123 * linespec.c (filter_results): Use std::vector.
11124 (decode_line_2, decode_line_full): Update.
11125
11126 2018-04-05 Tom Tromey <tom@tromey.com>
11127
11128 * linespec.c (canonical_to_fullform): Return std::string.
11129 (filter_results): Update.
11130 (struct decode_line_2_item): Add constructor.
11131 <fullform, displayform>: Now std::string.
11132 (decode_line_2_compare_items): Now a std::sort comparator.
11133 (decode_line_2): Update.
11134
11135 2018-04-05 Tom Tromey <tom@tromey.com>
11136
11137 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11138 (unexpected_linespec_error): Update.
11139 (linespec_parse_basic, parse_linespec): Update.
11140
11141 2018-04-05 Tom Tromey <tom@tromey.com>
11142
11143 * linespec.c (linespec_parse_basic): Reindent.
11144
11145 2018-04-05 Tom Tromey <tom@tromey.com>
11146
11147 * minsyms.h (iterate_over_minimal_symbols): Update.
11148 * minsyms.c (iterate_over_minimal_symbols): Take a
11149 gdb::function_view.
11150 * linespec.c (struct collect_minsyms): Remove.
11151 (compare_msyms): Now a std::sort comparator.
11152 (add_minsym): Add parameters.
11153 (search_minsyms_for_name): Update. Use std::vector.
11154
11155 2018-04-03 Tom Tromey <tom@tromey.com>
11156
11157 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11158 gdb::byte_vector.
11159
11160 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11161
11162 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11163
11164 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11165
11166 PR gdb/16959
11167 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11168 printing static type.
11169
11170 2018-04-01 Tom Tromey <tom@tromey.com>
11171
11172 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11173 (rs6000_xfer_shared_libraries): Update.
11174
11175 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11176
11177 * common/gdb_vecs.h (char_ptr): Remove.
11178 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11179
11180 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11181
11182 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11183 with std::vector.
11184 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11185
11186 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11187
11188 * tracepoint.h (struct uploaded_tp): Initialize fields.
11189 <actions, step_actions, cmd_strings>: Change type to
11190 std::vector<char *>.
11191 * tracepoint.c (get_uploaded_tp): Allocate with new.
11192 (free_uploaded_tps): Free with delete.
11193 (parse_tracepoint_definition): Adjust to std::vector change.
11194 * breakpoint.c (read_uploaded_action): Likewise.
11195 (create_tracepoint_from_upload): Likewise.
11196 * ctf.c (ctf_write_uploaded_tp): Likewise.
11197 (SET_ARRAY_FIELD): Likewise.
11198 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11199
11200 2018-03-30 Tom Tromey <tom@tromey.com>
11201
11202 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11203 std::unique_ptr.
11204 (svr4_keep_data_in_core): Update.
11205 (svr4_read_so_list): Update.
11206
11207 2018-03-30 Tom Tromey <tom@tromey.com>
11208
11209 * windows-nat.c (handle_output_debug_string, handle_exception):
11210 Update.
11211 * target.h (target_read_string): Update.
11212 * target.c (target_read_string): Change "string" to
11213 unique_xmalloc_ptr.
11214 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11215 Update.
11216 * solib-frv.c (frv_current_sos): Update.
11217 * solib-dsbt.c (dsbt_current_sos): Update.
11218 * solib-darwin.c (darwin_current_sos): Update.
11219 * linux-thread-db.c (inferior_has_bug): Update.
11220 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11221 Update. Remove alloca.
11222 * ada-lang.c (ada_main_name): Update.
11223
11224 2018-03-30 Tom Tromey <tom@tromey.com>
11225
11226 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11227 (struct dwo_file_deleter): New.
11228 (dwo_file_up): New typedef.
11229 (open_and_init_dwo_file): Use dwo_file_up.
11230 (free_dwo_file_cleanup): Remove.
11231
11232 2018-03-30 Tom Tromey <tom@tromey.com>
11233
11234 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11235 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11236
11237 2018-03-30 Tom Tromey <tom@tromey.com>
11238
11239 * dwarf2read.c (class free_cached_comp_units): New class.
11240 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11241 (free_cached_comp_units): Remove function.
11242
11243 2018-03-30 Tom Tromey <tom@tromey.com>
11244
11245 * utils.h (make_cleanup_unpush_target): Remove.
11246 * inf-ptrace.c (struct target_unpusher): New.
11247 (target_unpush_up) New typedef.
11248 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11249 target_unpush_up.
11250 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11251
11252 2018-03-27 Tom Tromey <tom@tromey.com>
11253
11254 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11255
11256 2018-03-27 Pedro Alves <palves@redhat.com>
11257 Tom Tromey <tom@tromey.com>
11258
11259 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11260 destructor. Now a class.
11261 (gdb_readline_wrapper_cleanup): Remove function.
11262 (gdb_readline_wrapper): Remove cleanups.
11263
11264 2018-03-27 Tom Tromey <tom@tromey.com>
11265
11266 * typeprint.h (struct type_print_options) <local_typedefs,
11267 global_typedefs>: Remove "struct" keyword.
11268 (class typedef_hash_table): New class.
11269 (recursively_update_typedef_hash, add_template_parameters)
11270 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11271 (find_typedef_in_hash): Don't declare.
11272 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11273 (typedef_hash_table::recursively_update): Rename from
11274 recursively_update_typedef_hash. Now a member.
11275 (typedef_hash_table::add_template_parameters): Rename from
11276 add_template_parameters. Now a member.
11277 (typedef_hash_table::typedef_hash_table): Now a constructor;
11278 rename from create_typedef_hash.
11279 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11280 rename from free_typedef_hash.
11281 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11282 (do_free_global_table): Remove.
11283 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11284 from copy_type_recursive.
11285 (create_global_typedef_table): Remove.
11286 (typedef_hash_table::find_global_typedef): Now a member of
11287 typedef_hash_table.
11288 (typedef_hash_table::find_typedef): Rename from
11289 find_typedef_in_hash; now a member.
11290 (whatis_exp): Update.
11291 * extension.h (struct ext_lang_type_printers): Add constructor and
11292 destructor.
11293 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11294 declare.
11295 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11296 Now a constructor; rename from start_ext_lang_type_printers.
11297 (ext_lang_type_printers): Now a destructor; rename from
11298 free_ext_lang_type_printers.
11299 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11300 Update.
11301 (c_type_print_base_struct_union): Update. Remove cleanups.
11302
11303 2018-03-27 Tom Tromey <tom@tromey.com>
11304
11305 * dwarf-index-write.c: Include <cmath>.
11306
11307 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11308
11309 * NEWS: Add entry describing new "set|show varsize-limit" command.
11310 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11311 command.
11312 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11313 "set variable".
11314
11315 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11316
11317 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11318 dwarf-index-write.c
11319 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11320 * dwarf-index-common.c: New file.
11321 * dwarf-index-common.h: New file.
11322 * dwarf-index-write.c: New file.
11323 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11324 (struct dwarf2_section_info): Move from here.
11325 (dwarf2_section_info_def): Likewise.
11326 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11327 (offset_type): Likewise.
11328 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11329 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11330 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11331 (byte_swap): Likewise.
11332 (MAYBE_SWAP): Likewise.
11333 (dwarf2_per_cu_ptr): Likewise.
11334 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11335 (struct tu_stats): Likewise.
11336 (struct dwarf2_per_objfile): Likewise.
11337 (struct dwarf2_per_cu_data): Likewise.
11338 (struct signatured_type): Likewise.
11339 (sig_type_ptr): Likewise.
11340 (DEF_VEC_P (sig_type_ptr)): Likewise.
11341 (INDEX4_SUFFIX): Likewise.
11342 (INDEX5_SUFFIX): Likewise.
11343 (DEBUG_STR_SUFFIX): Likewise.
11344 (dwarf2_read_section): Make non-static.
11345 (mapped_index_string_hash): Move from here.
11346 (dwarf5_djb_hash): Likewise.
11347 (file_write): Likewise.
11348 (class data_buf): Likewise.
11349 (struct symtab_index_entry): Likewise.
11350 (struct mapped_symtab): Likewise.
11351 (find_slot): Likewise.
11352 (hash_expand): Likewise.
11353 (add_index_entry): Likewise.
11354 (uniquify_cu_indices): Likewise.
11355 (class c_str_view): Likewise.
11356 (class c_str_view_hasher): Likewise.
11357 (class vector_hasher): Likewise.
11358 (write_hash_table): Likewise.
11359 (psym_index_map): Likewise.
11360 (struct addrmap_index_data): Likewise.
11361 (add_address_entry): Likewise.
11362 (add_address_entry_worker): Likewise.
11363 (write_address_map): Likewise.
11364 (symbol_kind): Likewise.
11365 (write_psymbols): Likewise.
11366 (struct signatured_type_index_data): Likewise.
11367 (write_one_signatured_type): Likewise.
11368 (recursively_count_psymbols): Likewise.
11369 (recursively_write_psymbols): Likewise.
11370 (class debug_names): Likewise.
11371 (check_dwarf64_offsets): Likewise.
11372 (psyms_seen_size): Likewise.
11373 (write_gdbindex): Likewise.
11374 (write_debug_names): Likewise.
11375 (assert_file_size): Likewise.
11376 (write_psymtabs_to_index): Likewise.
11377 (save_gdb_index_command): Likewise.
11378 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11379 command.
11380 * dwarf2read.h: New file.
11381
11382 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11383
11384 PR gdb/22670
11385 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11386 symbol name if the CU's language stores symbol names in linkage
11387 format.
11388 * language.h (struct language_defn)
11389 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11390 all instances of this struct.
11391
11392 2018-03-26 Tom Tromey <tom@tromey.com>
11393
11394 * stack.c (backtrace_command_1): Remove verbose code.
11395
11396 2018-03-26 Tom Tromey <tom@tromey.com>
11397
11398 * python/py-framefilter.c (py_print_type): Don't catch
11399 exceptions. Return void.
11400 (py_print_value): Likewise.
11401 (py_print_single_arg): Likewise.
11402 (enumerate_args): Don't catch exceptions.
11403 (py_print_args): Likewise.
11404 (py_print_frame): Likewise.
11405 (gdbpy_apply_frame_filter): Catch exceptions here.
11406
11407 2018-03-26 Tom Tromey <tom@tromey.com>
11408
11409 * stack.c (_initialize_stack): Remove trailing newlines from help
11410 text. Add "Usage" line to "backtrace" help.
11411
11412 2018-03-26 Tom Tromey <tom@tromey.com>
11413
11414 PR python/16486:
11415 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11416
11417 2018-03-26 Tom Tromey <tom@tromey.com>
11418
11419 * python/py-framefilter.c (py_print_single_arg): Return
11420 EXT_LANG_BT_ERROR from catch.
11421
11422 2018-03-26 Tom Tromey <tom@tromey.com>
11423
11424 PR backtrace/15584:
11425 * stack.c (backtrace_command_1): Move some code into no-filters
11426 "if".
11427
11428 2018-03-26 Tom Tromey <tom@tromey.com>
11429
11430 * python/py-framefilter.c (throw_quit_or_print_exception): New
11431 function.
11432 (gdbpy_apply_frame_filter): Use it.
11433
11434 2018-03-26 Tom Tromey <tom@tromey.com>
11435
11436 PR cli/17716:
11437 * python/py-framefilter.c (py_print_type, py_print_value)
11438 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11439 RETURN_MASK_ERROR.
11440
11441 2018-03-26 Tom Tromey <tom@tromey.com>
11442
11443 * python/py-framefilter.c (enumerate_args): Use
11444 gdb::unique_xmalloc_ptr.
11445
11446 2018-03-26 Tom Tromey <tom@tromey.com>
11447
11448 * python/py-framefilter.c (py_print_frame): Return
11449 EXT_LANG_BT_OK.
11450 (gdbpy_apply_frame_filter): Update comment.
11451 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11452 Remove.
11453 <EXT_LANG_BT_NO_FILTERS>: Change value.
11454
11455 2018-03-26 Tom Tromey <tom@tromey.com>
11456
11457 PR backtrace/15582:
11458 * stack.c (backtrace_command): Parse "hide" argument.
11459 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11460 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11461 constant.
11462
11463 2018-03-26 Tom Tromey <tom@tromey.com>
11464
11465 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11466 add "flags".
11467 (backtrace_command): Remove "fulltrace", add "flags".
11468
11469 2018-03-26 Tom Tromey <tom@tromey.com>
11470
11471 * stack.c (backtrace_command): Rewrite command line parsing.
11472
11473 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11474
11475 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11476
11477 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11478
11479 * filename-seen-cache.h: Add include guard.
11480
11481 2018-03-26 Keith Seitz <keiths@redhat.com>
11482
11483 * symfile.c (place_section): Remove "struct" from section_addr_info
11484 in comment.
11485 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11486 "struct" keyword from section_addr_info.
11487
11488 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11489
11490 * regformats/regdef.h (reg): Add constructors.
11491
11492 2018-03-25 Pedro Alves <palves@redhat.com>
11493
11494 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11495 if then/else bodies in var_func_name extraction.
11496
11497 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11498
11499 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11500 lookup_minimal_symbol() to find symbol entry.
11501 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11502
11503 2018-03-23 Keith Seitz <keiths@redhat.com>
11504
11505 PR c++/22968
11506 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11507 nested type definitions for C++, too.
11508
11509 2018-03-23 Tom Tromey <tom@tromey.com>
11510
11511 * machoread.c (struct oso_el): Add a constructor. Don't define as
11512 a typedef.
11513 (macho_register_oso): Remove.
11514 (macho_symtab_read): Take a std::vector.
11515 (oso_el_compare_name): Now a std::sort comparator.
11516 (macho_symfile_read_all_oso): Take a std::vector.
11517 (macho_symfile_read): Use std::vector. Remove cleanups.
11518
11519 2018-03-22 Tom Tromey <tom@tromey.com>
11520
11521 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11522 (record_full_goto_bookmark): Use std::string.
11523
11524 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11525
11526 PR tdep/18295
11527 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11528 a single mask.
11529
11530 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11531
11532 * rs6000-tdep.c (store_insn_p): New function.
11533 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11534 and cr_reg to their unshifted values. Use store_insn_p to
11535 match LR saves using either R1 or fdata->alloca_reg. Use
11536 store_insn_p to match CR saves. Set alloca_reg_offset
11537 when alloca_reg and framep are set. Remove lr_reg shift
11538 when assigning to fdata->lr_register.
11539
11540 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11541
11542 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11543 command line args instead of emitting a warning.
11544
11545 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11546
11547 * tracepoint.h (struct static_tracepoint_marker): Initialize
11548 fields, define default constructor, move constructor and move
11549 assignment, disable the rest.
11550 <str_id, extra>: Make std::string.
11551 (release_static_tracepoint_marker): Remove.
11552 (free_current_marker): Remove.
11553 * tracepoint.c (free_current_marker): Remove.
11554 (parse_static_tracepoint_marker_definition): Adjust to
11555 std::string, use new hex2str overload.
11556 (release_static_tracepoint_marker): Remove.
11557 (print_one_static_tracepoint_marker): Get marker by reference
11558 and adjust to std::string.
11559 (info_static_tracepoint_markers_command): Adjust to std::vector
11560 changes
11561 * target.h (static_tracepoint_marker_p): Remove typedef.
11562 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11563 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11564 bool.
11565 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11566 * target-debug.h
11567 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11568 (target_debug_print_std_vector_static_tracepoint_marker): New.
11569 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11570 to...
11571 (target_debug_print_static_tracepoint_marker_p): ... this.
11572 * target-delegates.c: Re-generate.
11573 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11574 Make std::string.
11575 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11576 (decode_static_tracepoint_spec): Adjust to std::vector.
11577 (tracepoint_print_one_detail): Adjust to std::string.
11578 (strace_marker_decode_location): Adjust to std::string.
11579 (update_static_tracepoint): Adjust to std::string, remove call
11580 to release_static_tracepoint_marker.
11581 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11582 Adjust to std::vector.
11583 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11584 (remote_static_tracepoint_markers_by_strid): Adjust to
11585 std::vector.
11586 * common/rsp-low.h (hex2str): New overload with explicit count
11587 of bytes.
11588 * common/rsp-low.c (hex2str): New overload with explicit count
11589 of bytes.
11590 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11591 (_initialize_rsp_low_selftests): Add test_hex2str test.
11592 * unittests/tracepoint-selftests.c
11593 (test_parse_static_tracepoint_marker_definition): Adjust to
11594 std::string.
11595
11596 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11597
11598 * tracepoint.c (parse_static_tracepoint_marker_definition):
11599 Consider case where the definition is followed by more
11600 definitions.
11601 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11602 tracepoint-selftests.c.
11603 * unittests/tracepoint-selftests.c: New.
11604
11605 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11606
11607 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11608 Carvalho.
11609
11610 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11611
11612 * symtab.c (find_pc_sect_line): fixed indentation.
11613
11614 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11615
11616 * symtab.c (find_pc_sect_line): now uses binary search.
11617
11618 2018-03-19 Tom Tromey <tom@tromey.com>
11619
11620 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11621 "IDENT" production.
11622
11623 2018-03-19 Pedro Alves <palves@redhat.com>
11624 Tom Tromey <tom@tromey.com>
11625
11626 * unittests/observable-selftests.c: New file.
11627 * common/observable.h: New file.
11628 * observable.h: New file.
11629 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11630 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11631 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11632 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11633 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11634 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11635 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11636 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11637 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11638 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11639 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11640 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11641 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11642 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11643 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11644 tui/tui-interp.c, valops.c: Update all users.
11645 * tui/tui-hooks.c (tui_bp_created_observer)
11646 (tui_bp_deleted_observer, tui_bp_modified_observer)
11647 (tui_inferior_exit_observer, tui_before_prompt_observer)
11648 (tui_normal_stop_observer, tui_register_changed_observer):
11649 Remove.
11650 (tui_observers_token): New global.
11651 (attach_or_detach, tui_attach_detach_observers): New functions.
11652 (tui_install_hooks, tui_remove_hooks): Use
11653 tui_attach_detach_observers.
11654 * record-btrace.c (record_btrace_thread_observer): Remove.
11655 (record_btrace_thread_observer_token): New global.
11656 * observer.sh: Remove.
11657 * observer.c: Rename to observable.c.
11658 * observable.c (namespace gdb_observers): Define new objects.
11659 (observer_debug): Move into gdb_observers namespace.
11660 (struct observer, struct observer_list, xalloc_observer_list_node)
11661 (xfree_observer_list_node, generic_observer_attach)
11662 (generic_observer_detach, generic_observer_notify): Remove.
11663 (_initialize_observer): Update.
11664 Don't include observer.inc.
11665 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11666 (clean mostlyclean): Likewise.
11667 (observer.h, observer.inc): Remove targets.
11668 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11669 (COMMON_SFILES): Use observable.c, not observer.c.
11670 * .gitignore: Remove observer.h.
11671
11672 2018-03-18 Tom Tromey <tom@tromey.com>
11673
11674 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11675 gdb::def_vector.
11676 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11677
11678 2018-03-17 Tom Tromey <tom@tromey.com>
11679
11680 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11681
11682 2018-03-17 Tom Tromey <tom@tromey.com>
11683
11684 * target.c (class scoped_target_fd): New.
11685 (target_fileio_close_cleanup): Remove.
11686 (target_fileio_read_alloc_1): Use scoped_target_fd.
11687
11688 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11689
11690 * silent-rules.mk: New.
11691 * Makefile.in: Include silent-rules.mk
11692 (srcdir, VPATH, top_srcdir): Move up.
11693 (COMPILE): Add ECHO_CXX.
11694 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11695 (init.c): Add ECHO_INIT_C.
11696 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11697 (version.c): Add ECHO_GEN.
11698 (printcmd.o): Add ECHO_CXX.
11699 (target-float.o): Add ECHO_CXX.
11700 (ada-exp.o): Add ECHO_CXX.
11701 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11702 (insight$(EXEEXT)): Add ECHO_CXXLD.
11703 * gnulib/configure.ac: Add AM_SILENT_RULES.
11704 * gnulib/aclocal.m4: Re-generate.
11705 * gnulib/configure: Re-generate.
11706 * gnulib/import/Makefile.in: Re-generate.
11707
11708 2018-03-16 Tom Tromey <tom@tromey.com>
11709
11710 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11711 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11712 * utils.c (do_free_section_addr_info)
11713 (make_cleanup_free_section_addr_info): Remove.
11714 * symfile.h (struct other_sections): Add constructor.
11715 (struct section_addr_info): Remove.
11716 (section_addr_info): New typedef.
11717 (struct sym_fns) <sym_offsets>: Change type of parameter.
11718 (build_section_addr_info_from_objfile)
11719 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11720 (default_symfile_offsets, symbol_file_add)
11721 (symbol_file_add_from_bfd)
11722 (build_section_addr_info_from_section_table): Update.
11723 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11724 * symfile.c (alloc_section_addr_info): Remove.
11725 (build_section_addr_info_from_section_table): Change return type.
11726 Update.
11727 (build_section_addr_info_from_bfd)
11728 (build_section_addr_info_from_objfile): Likewise.
11729 (free_section_addr_info): Remove.
11730 (relative_addr_info_to_section_offsets): Change type of "addrs".
11731 (addrs_section_compar): Now a std::sort comparator.
11732 (addrs_section_sort): Change return type.
11733 (addr_info_make_relative): Change type of "addrs". Update.
11734 (default_symfile_offsets, syms_from_objfile_1)
11735 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11736 (symbol_file_add_separate): Update.
11737 (symbol_file_add): Change type of "addrs". Update.
11738 (add_symbol_file_command): Update. Remove cleanups.
11739 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11740 cleanups.
11741 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11742 * solib.c (solib_read_symbols): Update.
11743 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11744 * machoread.c (macho_symfile_offsets): Update.
11745 * jit.c (jit_bfd_try_read_symtab): Update.
11746
11747 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11748
11749 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11750 unittests/utils-selftests.c.
11751 * unittests/utils-selftests.c: New file.
11752
11753 2018-03-14 Tom Tromey <tom@tromey.com>
11754
11755 PR cli/14977:
11756 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11757 for NULL.
11758
11759 2018-03-14 Tom Tromey <tom@tromey.com>
11760
11761 PR cli/19918:
11762 * printcmd.c (printf_pointer): Allow "-" in format.
11763
11764 2018-03-14 Tom Tromey <tom@tromey.com>
11765
11766 * printcmd.c (_initialize_printcmd): Add usage to printf.
11767
11768 2018-03-14 Yao Qi <qiyao@sourceware.org>
11769
11770 * MAINTAINERS: Update my email address.
11771
11772 2018-03-13 Tom Tromey <tom@tromey.com>
11773
11774 * machoread.c (macho_check_dsym): Change filenamep to a
11775 std::string*.
11776 (macho_symfile_read): Update.
11777 * symfile.c (load_command): Use std::string.
11778
11779 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11780
11781 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11782 to error message string.
11783 (riscv_register_name): Use xsnprintf instead of sprintf.
11784 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11785 internal_error.
11786 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11787 error.
11788 (riscv_push_dummy_call): Likewise.
11789
11790 2018-03-12 Tom Tromey <tom@tromey.com>
11791
11792 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11793 Use gdb::byte_vector.
11794 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11795
11796 2018-03-12 Yao Qi <yao.qi@linaro.org>
11797
11798 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11799 parameter type to readable_regcache.
11800 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11801 the declaration.
11802
11803 2018-03-11 Tom Tromey <tom@tromey.com>
11804
11805 * dwarf2read.c (struct nextfield): Add initializers.
11806 (struct nextfnfield): Remove.
11807 (struct fnfieldlist): Add initializers. Remove "length" and
11808 "head", use std::vector.
11809 (struct decl_field_list): Remove.
11810 (struct field_info): Add initializers.
11811 <fields, baseclasses>: Now std::vector.
11812 <nbaseclasses, nfnfields, typedef_field_list_count,
11813 nested_types_list_count>: Remove.
11814 (dwarf2_add_field, dwarf2_add_type_defn)
11815 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11816 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11817 (process_structure_scope): Update.
11818
11819 2018-03-11 Tom Tromey <tom@tromey.com>
11820
11821 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11822 for use by std::sort.
11823 (build_type_psymtabs_1): Use std::vector.
11824
11825 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11826
11827 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11828 and LIBMPFR in the printed configuration.
11829
11830 2018-03-08 Tom Tromey <tom@tromey.com>
11831
11832 * source.c (get_filename_and_charpos): Use scoped_fd.
11833 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11834 (procfs_pidlist): Likewise.
11835 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11836 (iterate_over_mappings): Likewise.
11837
11838 2018-03-08 Tom Tromey <tom@tromey.com>
11839
11840 * infcall.c (struct call_return_meta_info)
11841 <stack_temporaries_enabled>: Remove.
11842 (get_call_return_value, call_function_by_hand_dummy): Update.
11843 * thread.c (disable_thread_stack_temporaries): Remove.
11844 (enable_thread_stack_temporaries): Remove.
11845 (thread_stack_temporaries_enabled_p): Return bool.
11846 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11847 (get_last_thread_stack_temporary): Update.
11848 * eval.c (evaluate_subexp): Update.
11849 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11850 class, not a function.
11851 (value_ptr, value_vec): Remove typedefs.
11852 (class thread_info) <stack_temporaries_enabled>: Now bool.
11853 <stack_temporaries>: Now a std::vector.
11854 (thread_stack_temporaries_enabled_p)
11855 (value_in_thread_stack_temporaries): Return bool.
11856
11857 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11858
11859 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11860 (getpkt_or_notif_sane_1): Likewise.
11861
11862 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11863
11864 * build-id.c (build_id_to_debug_bfd): Use std::string.
11865
11866 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11867
11868 * build-id.c (find_separate_debug_file_by_buildid): Return
11869 std::string.
11870 * build-id.h (find_separate_debug_file_by_buildid): Return
11871 std::string.
11872 * coffread.c (coff_symfile_read): Adjust to std::string.
11873 * elfread.c (elf_symfile_read): Adjust to std::string.
11874 * symfile.c (separate_debug_file_exists): Change parameter to
11875 std::string.
11876 (find_separate_debug_file): Return std::string.
11877 (find_separate_debug_file_by_debuglink): Return std::string.
11878 * symfile.h (find_separate_debug_file_by_debuglink): Return
11879 std::string.
11880
11881 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11882
11883 * common/xml-utils.c (xml_escape_text): Move code to...
11884 (xml_escape_text_append): ... this new function.
11885 * common/xml-utils.h (xml_escape_text_append): New declaration.
11886 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11887 New function.
11888 (_initialize_xml_utils): register test_xml_escape_text_append as
11889 a selftest.
11890
11891 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11892
11893 * defs.h: Remove MAX_REGISTER_SIZE.
11894 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11895 asserts.
11896 * python/py-unwind.c (pyuw_sniffer): Likewise.
11897
11898 2018-03-07 Tom Tromey <tom@tromey.com>
11899
11900 * linux-tdep.c (linux_info_proc): Update.
11901 * target.h (struct target_ops) <to_fileio_readlink>: Return
11902 optional<string>.
11903 (target_fileio_readlink): Return optional<string>.
11904 * remote.c (remote_hostio_readlink): Return optional<string>.
11905 * inf-child.c (inf_child_fileio_readlink): Return
11906 optional<string>.
11907 * target.c (target_fileio_readlink): Return optional<string>.
11908
11909 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11910
11911 * regcache.c (cooked_read_test): Add riscv to the list of
11912 architectures that have a save_reggroup.
11913
11914 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11915
11916 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11917 value is not a dynamic class object.
11918
11919 2018-03-06 Tom Tromey <tom@tromey.com>
11920
11921 * rust-exp.y: Formatting fixes.
11922
11923 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11924
11925 * riscv-tdep.c (riscv_register_name): Remove target description
11926 support.
11927 (riscv_gdbarch_init): Remove target description check.
11928
11929 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11930
11931 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11932 comment.
11933 * riscv-tdep.h: Likewise.
11934
11935 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11936
11937 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11938 (riscv_pseudo_register_write): Delete.
11939 (riscv_gdbarch_init): Remove all use of pseudo registers.
11940
11941 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11942
11943 * record-btrace.c (btrace_print_lines): Replace cleanup
11944 parameter with RAII equivalents.
11945 (btrace_insn_history): Replace cleanup with RAII equivalents.
11946 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11947 make_cleanup_ui_out_tuple_begin_end): Remove.
11948 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11949 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11950 make_cleanup_ui_out_list_begin_end): Remove.
11951
11952 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11953
11954 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11955 parameter types to std::vector. Use bool.
11956 (record_btrace_wait): Replace VEC(tp_t) with
11957 std::vector<thread_info *>.
11958 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11959
11960 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11961
11962 * record-btrace.c (record_btrace_disable_callback): Remove.
11963 (struct scoped_btrace_disable): New.
11964 (record_btrace_open): Use scoped_btrace_disable.
11965
11966 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11967
11968 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11969 reading values from registers.
11970
11971 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11972
11973 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11974 where appropriate.
11975
11976 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11977
11978 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11979 change parameter type. Use GDB's print functions, and use
11980 core_addr_to_string where appropriate.
11981 (riscv_push_dummy_call): Use core_addr_to_string where
11982 appropriate, update call to riscv_print_arg_location, and reindent
11983 a few lines.
11984 (riscv_return_value): Update call to riscv_print_arg_location.
11985
11986 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11987 Tim Newsome <tim@sifive.com>
11988 Albert Ou <a0u@eecs.berkeley.edu>
11989 Darius Rad <darius@bluespec.com>
11990
11991 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11992 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11993 (ALLDEPFILES): Add riscv-tdep.c
11994 * configure.tgt: Add riscv support.
11995 * riscv-tdep.c: New file.
11996 * riscv-tdep.h: New file.
11997 * NEWS: Mention new target.
11998 * MAINTAINERS: Add entry for riscv.
11999
12000 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12001
12002 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12003 fields within aggregates.
12004
12005 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12006
12007 * record-btrace.c (btrace_print_lines): Change type of flags to
12008 gdb_disassembly_flags.
12009
12010 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12011
12012 * fbsd-nat.c: Include "inf-ptrace.h".
12013 (USE_SIGTRAP_SIGINFO): Conditionally define.
12014 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12015 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12016 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12017 function.
12018 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12019 Likewise.
12020 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12021 Likewise.
12022 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12023 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12024 "supports_stopped_by_hw_breakpoint" target methods.
12025
12026 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12027
12028 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12029 * fbsd-nat.c (debug_fbsd_nat): New variable.
12030 (show_fbsd_nat_debug): New function.
12031 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12032 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12033
12034 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12035
12036 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12037 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12038 prototype.
12039 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12040 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12041 method.
12042
12043 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12044
12045 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12046 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12047
12048 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12049
12050 * charset.c (struct charset_vector): New.
12051 (charsets): Change type to charset_vector.
12052 (find_charset_names): Adjust.
12053 (add_one): Adjust.
12054 (_initialize_charset): Adjust.
12055
12056 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12057
12058 * progspace.h (struct program_space) <deleted_solibs>: Change
12059 type to std::vector<std::string>.
12060 * progspace.c (clear_program_space_solib_cache): Adjust.
12061 * breakpoint.c (print_solib_event): Adjust.
12062 (check_status_catch_solib): Adjust.
12063 * solib.c (update_solib_list): Adjust.
12064 * ui-out.h (class ui_out) <field_string>: New overload.
12065 * ui-out.c (ui_out::field_string): New overload.
12066
12067 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12068
12069 * progspace.h (struct program_space): Add constructor and
12070 destructor, initialize fields.
12071 (add_program_space): Remove.
12072 * progspace.c (add_program_space): Rename to...
12073 (program_space::program_space): ... this.
12074 (release_program_space): Rename to...
12075 (program_space::~program_space): ... this.
12076 (delete_program_space): Use delete to delete program_space.
12077 (initialize_progspace): Use new to allocate program_space.
12078 * inferior.c (add_inferior_with_spaces): Likewise.
12079 (clone_inferior_command): Likewise.
12080 * infrun.c (follow_fork_inferior): Likewise.
12081 (handle_vfork_child_exec_or_exit): Likewise.
12082
12083 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12084
12085 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12086 (delim_string_to_char_ptr_vec): Return std::vector of
12087 gdb::unique_xmalloc_ptr.
12088 (dirnames_to_char_ptr_vec_append): Take std::vector of
12089 gdb::unique_xmalloc_ptr.
12090 (dirnames_to_char_ptr_vec): Return std::vector of
12091 gdb::unique_xmalloc_ptr.
12092 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12093 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12094 (delim_string_to_char_ptr_vec): Return an std::vector of
12095 gdb::unique_xmalloc_ptr, adjust the code.
12096 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12097 gdb::unique_xmalloc_ptr, adjust the code.
12098 (dirnames_to_char_ptr_vec): Return an std::vector of
12099 gdb::unique_xmalloc_ptr, adjust the code.
12100 * auto-load.c (auto_load_safe_path_vec): Change type to
12101 std::vector of gdb::unique_xmalloc_ptr.
12102 (auto_load_expand_dir_vars): Return an std::vector of
12103 gdb::unique_xmalloc_ptr, adjust the code.
12104 (auto_load_safe_path_vec_update): Adjust.
12105 (filename_is_in_auto_load_safe_path_vec): Adjust.
12106 (auto_load_objfile_script_1): Adjust.
12107 * build-id.c (build_id_to_debug_bfd): Adjust.
12108 * linux-thread-db.c (thread_db_load_search): Adjust.
12109 * source.c (add_path): Adjust.
12110 (openp): Adjust.
12111 * symfile.c (find_separate_debug_file): Adjust.
12112 * utils.c (do_free_char_ptr_vec): Remove.
12113 (make_cleanup_free_char_ptr_vec): Remove.
12114
12115 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12116
12117 PR gdb/22907
12118 * common/pathstuff.c: Conditionally include "<windows.h>".
12119
12120 2018-03-01 Georg Sauthoff <mail@georg.so>
12121
12122 PR gdb/22888
12123 * gcore.in: Quote variables and switch interpreter to bash.
12124
12125 2018-03-01 Tom Tromey <tom@tromey.com>
12126
12127 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12128 assertion. Add assertion for discriminant_index.
12129 (quirk_rust_enum): Use correct base type name in univariant case.
12130
12131 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12132
12133 * record.c (get_call_history_modifiers): Return a
12134 record_print_flags.
12135 (cmd_record_call_history): Adjust.
12136 * record-btrace.c (record_btrace_call_history): Adjust.
12137 (record_btrace_call_history_range): Adjust.
12138 (record_btrace_call_history_from): Adjust.
12139 * target-debug.h (target_debug_print_record_print_flags): New.
12140 * target-delegates.c: Re-generate.
12141 * target.c (target_call_history): Change flags type.
12142 (target_call_history_from): Likewise.
12143 (target_call_history_range): Likewise.
12144 * target.h (struct target_ops) <target_call_history>: Likewise.
12145 (target_call_history_from): Likewise.
12146 (target_call_history_range): Likewise.
12147
12148 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12149 Simon Marchi <simon.marchi@polymtl.ca>
12150
12151 * common/common-utils.c: Include "sys/stat.h".
12152 (is_regular_file): Move here from "source.c"; change return
12153 type to "bool".
12154 * common/common-utils.h (is_regular_file): New prototype.
12155 * common/pathstuff.c (contains_dir_separator): New function.
12156 * common/pathstuff.h (contains_dir_separator): New prototype.
12157 * source.c: Don't include "sys/stat.h".
12158 (is_regular_file): Move to "common/common-utils.c".
12159
12160 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12161
12162 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12163 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12164 * auto-load.c: Include "common/pathstuff.h".
12165 * common/common-def.h (current_directory): Move here.
12166 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12167 function.
12168 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12169 prototype.
12170 * common/pathstuff.c: New file.
12171 * common/pathstuff.h: New file.
12172 * compile/compile.c: Include "common/pathstuff.h".
12173 * defs.h (current_directory): Move to "common/common-defs.h".
12174 * dwarf2read.c: Include "common/pathstuff.h".
12175 * exec.c: Likewise.
12176 * guile/scm-safe-call.c: Likewise.
12177 * linux-thread-db.c: Likewise.
12178 * main.c: Likewise.
12179 * nto-tdep.c: Likewise.
12180 * objfiles.c: Likewise.
12181 * source.c: Likewise.
12182 * symtab.c: Likewise.
12183 * utils.c: Include "common/pathstuff.h".
12184 (gdb_realpath): Move to "common/pathstuff.c".
12185 (gdb_realpath_keepfile): Likewise.
12186 (gdb_abspath): Likewise.
12187 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12188 (gdb_realpath_keepfile): Likewise.
12189 (gdb_abspath): Likewise.
12190
12191 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12192
12193 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12194 wildcard process pid for super_resume for kernels with a
12195 specific bug.
12196
12197 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12198
12199 * compile/compile.c (get_args): Add additional comments
12200 explaining function.
12201
12202 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12203 Tom Tromey <tom@tromey.com>
12204
12205 * target.h (memory_write_request_s): Remove typedef. Don't define
12206 VEC.
12207 (target_write_memory_blocks): Change argument to std::vector.
12208 (struct memory_write_request): Add constructor.
12209 * target-memory.c (compare_block_starting_address): Return bool.
12210 Change argument types.
12211 (claim_memory): Change arguments to use std::vector.
12212 (split_regular_and_flash_blocks, blocks_to_erase)
12213 (compute_garbled_blocks): Likewise.
12214 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12215 (target_write_memory_blocks): Change argument to std::vector.
12216 * symfile.c (struct load_section_data): Add constructor and
12217 destructor. Use std::vector for "requests".
12218 (struct load_progress_data): Add initializers.
12219 (load_section_callback): Update. Use "new".
12220 (clear_memory_write_data): Remove.
12221 (generic_load): Update.
12222
12223 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12224
12225 * arch/aarch64.h: Use common/tdesc.h.
12226
12227 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12228
12229 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12230 architecture with a 64-bit ABI.
12231
12232 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12233
12234 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12235 ahead of target description loading.
12236
12237 2018-02-26 Tom Tromey <tom@tromey.com>
12238
12239 * stack.c (backtrace_command_1): Update.
12240 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12241 of "flags".
12242 * python/py-framefilter.c (py_print_frame)
12243 (gdbpy_apply_frame_filter): Change type of "flags".
12244 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12245 of "flags".
12246 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12247 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12248 * extension.h (enum frame_filter_flag): Rename from
12249 frame_filter_flags.
12250 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12251 (apply_ext_lang_frame_filter): Change type of "flags".
12252 * extension.c (apply_ext_lang_frame_filter): Change type of
12253 "flags".
12254 * extension-priv.h (struct extension_language_ops)
12255 <apply_frame_filter>: Change type of "flags".
12256
12257 2018-02-26 Tom Tromey <tom@tromey.com>
12258
12259 PR python/16497:
12260 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12261 off-by-one in py_end computation.
12262 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12263 PRINT_MORE_FRAMES.
12264 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12265 constant.
12266
12267 2018-02-26 Tom Tromey <tom@tromey.com>
12268
12269 * dwarf2read.c (struct variant_field): New.
12270 (struct nextfield) <variant>: New field.
12271 (dwarf2_add_field): Handle DW_TAG_variant_part.
12272 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12273 discriminated union.
12274 (read_structure_type): Handle DW_TAG_variant_part.
12275 (handle_struct_member_die): New function, extracted from
12276 process_structure_scope. Handle DW_TAG_variant.
12277 (process_structure_scope): Handle discriminated unions. Call
12278 handle_struct_member_die.
12279
12280 2018-02-26 Tom Tromey <tom@tromey.com>
12281
12282 * rust-lang.h (rust_last_path_segment): Declare.
12283 * rust-lang.c (rust_last_path_segment): Now public. Change
12284 contract.
12285 (struct disr_info): Remove.
12286 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12287 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12288 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12289 (rust_enum_p, rust_enum_variant): New function.
12290 (rust_underscore_fields): Remove "offset" parameter.
12291 (rust_print_enum): New function.
12292 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12293 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12294 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12295 enums.
12296 (rust_internal_print_type): New function, from rust_print_type.
12297 Remove enum code.
12298 (rust_print_type): Call rust_internal_print_type.
12299 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12300 Update enum handling.
12301 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12302 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12303 (rust_union_quirks): New functions.
12304 (process_full_comp_unit, process_full_type_unit): Call
12305 rust_union_quirks.
12306 (process_structure_scope): Update rust_unions if necessary.
12307
12308 2018-02-26 Tom Tromey <tom@tromey.com>
12309
12310 * value.h (value_union_variant): Declare.
12311 * valops.c (value_union_variant): New function.
12312 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12313 (struct discriminant_info): New.
12314 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12315 enumerator.
12316 (struct main_type) <flag_discriminated_union>: New field.
12317
12318 2018-02-26 Tom Tromey <tom@tromey.com>
12319
12320 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12321 unittests/unpack-selftests.c.
12322 * unittests/unpack-selftests.c: New file.
12323 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12324
12325 2018-02-26 Yao Qi <yao.qi@linaro.org>
12326
12327 * dwarf2read.c (struct partial_die_info) <read>: New method.
12328 (read_partial_die): Remove the declaration.
12329 (load_partial_dies): Update.
12330 (partial_die_info::partial_die_info):
12331 (read_partial_die): Change it to partial_die_info::read.
12332
12333 2018-02-26 Yao Qi <yao.qi@linaro.org>
12334
12335 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12336 (fixup_partial_die): Remove declaration.
12337 (scan_partial_symbols): Update.
12338 (partial_die_parent_scope): Likewise.
12339 (partial_die_full_name): Likewise.
12340 (fixup_partial_die): Change it to partial_die_info::fixup.
12341
12342 2018-02-26 Yao Qi <yao.qi@linaro.org>
12343
12344 * dwarf2read.c (read_partial_die): Update the declaration.
12345 (load_partial_dies): Caller update.
12346 (read_partial_die): Remove one argument abbrev_len.
12347
12348 2018-02-26 Yao Qi <yao.qi@linaro.org>
12349
12350 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12351 assignment operator.
12352 (load_partial_dies): Use ctor and copy ctor.
12353 (read_partial_die): Update.
12354 (dwarf2_cu::find_partial_die): Use ctor.
12355
12356 2018-02-26 Yao Qi <yao.qi@linaro.org>
12357
12358 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12359 (find_partial_die_in_comp_unit): Change it to
12360 dwarf2_cu::find_partial_die.
12361 (find_partial_die): Update.
12362
12363 2018-02-26 Yao Qi <yao.qi@linaro.org>
12364
12365 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12366 is NULL.
12367
12368 2018-02-26 Yao Qi <yao.qi@linaro.org>
12369
12370 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12371
12372 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12373
12374 * arch/amd64.h: Use common/tdesc.h.
12375 * arch/i386.c: Likewise.
12376 * arch/i386.h: Likewise.
12377 * arch/tic6x.c: Likewise.
12378 * arch/tdesc.h: Move file from here...
12379 * common/tdesc.h: ...to here.
12380 * features/aarch64-core.c: Regenerate.
12381 * features/aarch64-fpu.c: Regenerate.
12382 * features/i386/32bit-avx.c: Regenerate.
12383 * features/i386/32bit-avx512.c: Regenerate.
12384 * features/i386/32bit-core.c: Regenerate.
12385 * features/i386/32bit-linux.c: Regenerate.
12386 * features/i386/32bit-mpx.c: Regenerate.
12387 * features/i386/32bit-pkeys.c: Regenerate.
12388 * features/i386/32bit-sse.c: Regenerate.
12389 * features/i386/64bit-avx.c: Regenerate.
12390 * features/i386/64bit-avx512.c: Regenerate.
12391 * features/i386/64bit-core.c: Regenerate.
12392 * features/i386/64bit-linux.c: Regenerate.
12393 * features/i386/64bit-mpx.c: Regenerate.
12394 * features/i386/64bit-pkeys.c: Regenerate.
12395 * features/i386/64bit-segments.c: Regenerate.
12396 * features/i386/64bit-sse.c: Regenerate.
12397 * features/i386/x32-core.c: Regenerate.
12398 * features/tic6x-c6xp.c: Regenerate.
12399 * features/tic6x-core.c: Regenerate.
12400 * features/tic6x-gp.c: Regenerate.
12401 * target-descriptions.c: Use common/tdesc.h.
12402 * target-descriptions.h: Likewise.
12403
12404 2018-02-24 Tom Tromey <tom@tromey.com>
12405
12406 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12407 (try_thread_db_load_from_dir, thread_db_load_search): Use
12408 std::string.
12409 (info_auto_load_libthread_db_compare): Return bool. Change
12410 argument types.
12411 (info_auto_load_libthread_db): Use std::vector, std::string.
12412 Remove cleanups.
12413
12414 2018-02-24 Tom Tromey <tom@tromey.com>
12415
12416 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12417 std::string.
12418 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12419 std::string*.
12420 * gdbarch.c: Rebuild.
12421 * gdbarch.h: Rebuild.
12422 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12423 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12424 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12425 std::string*.
12426
12427 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12428
12429 * gdbtypes.h (sect_offset): Change type to uint64_t.
12430 (sect_offset_str): New function.
12431 * dwarf2read.c (create_addrmap_from_aranges): Use
12432 sect_offset_str.
12433 (error_check_comp_unit_head): Likewise.
12434 (create_debug_type_hash_table): Likewise.
12435 (read_cutu_die_from_dwo): Likewise.
12436 (init_cutu_and_read_dies): Likewise.
12437 (init_cutu_and_read_dies_no_follow): Likewise.
12438 (process_psymtab_comp_unit_reader): Likewise.
12439 (partial_die_parent_scope): Likewise.
12440 (peek_die_abbrev): Likewise.
12441 (process_queue): Likewise.
12442 (dwarf2_physname): Likewise.
12443 (read_namespace_alias): Likewise.
12444 (read_import_statement): Likewise.
12445 (create_dwo_cu_reader): Likewise.
12446 (create_cus_hash_table): Likewise.
12447 (lookup_dwo_cutu): Likewise.
12448 (inherit_abstract_dies): Likewise.
12449 (read_func_scope): Likewise.
12450 (read_call_site_scope): Likewise.
12451 (dwarf2_add_member_fn): Likewise.
12452 (read_common_block): Likewise.
12453 (read_module_type): Likewise.
12454 (read_typedef): Likewise.
12455 (read_subrange_type): Likewise.
12456 (load_partial_dies): Likewise.
12457 (read_partial_die): Likewise.
12458 (find_partial_die): Likewise.
12459 (read_str_index): Likewise.
12460 (dwarf2_string_attr): Likewise.
12461 (build_error_marker_type): Likewise.
12462 (lookup_die_type): Likewise.
12463 (dump_die_shallow): Likewise.
12464 (follow_die_ref): Likewise.
12465 (dwarf2_fetch_die_loc_sect_off): Likewise.
12466 (dwarf2_fetch_constant_bytes): Likewise.
12467 (follow_die_sig): Likewise.
12468 (get_signatured_type): Likewise.
12469 (get_DW_AT_signature_type): Likewise.
12470 (dwarf2_find_containing_comp_unit): Likewise.
12471 (set_die_type): Likewise.
12472
12473 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12474
12475 * arch/aarch64.c: Include "common-defs.h".
12476 * arch/amd64.c: Likewise.
12477 * arch/i386.c: Likewise.
12478
12479 2018-02-21 Tom Tromey <tom@tromey.com>
12480
12481 * value.h: (extract_field_op): Update.
12482 * eval.c (extract_field_op): Return a const char *.
12483 * expression.h (parse_expression_for_completion): Update.
12484 * completer.c (complete_expression): Update.
12485 (add_struct_fields): Make fieldname const.
12486 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12487 (mark_completion_tag, parse_exp_in_context_1): Update.
12488 (parse_expression_for_completion): Change "name" to
12489 unique_xmalloc_ptr*.
12490
12491 2018-02-21 Tom Tromey <tom@tromey.com>
12492
12493 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12494
12495 2018-02-21 Yao Qi <yao.qi@linaro.org>
12496
12497 * avr-tdep.c (avr_read_pc): Change parameter type to
12498 readable_regcache.
12499 * gdbarch.sh (read_pc): Likewise.
12500 * gdbarch.c: Re-generated.
12501 * gdbarch.h: Re-generated.
12502 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12503 readable_regcache.
12504 * ia64-tdep.c (ia64_read_pc): Likewise.
12505 * mips-tdep.c (mips_read_pc): Likewise.
12506 * spu-tdep.c (spu_read_pc): Likewise.
12507
12508 2018-02-21 Yao Qi <yao.qi@linaro.org>
12509
12510 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12511 * regcache-dump.c: New file.
12512 * regcache.c: Move register_dump to regcache-dump.c.
12513 (maintenance_print_registers): Likewise.
12514 (maintenance_print_raw_registers): Likewise.
12515 (maintenance_print_cooked_registers): Likewise.
12516 (maintenance_print_register_groups): Likewise.
12517 (maintenance_print_remote_registers): Likewise.
12518 (_initialize_regcache): Likewise.
12519 * regcache.h (register_dump): Moved from regcache.c.
12520
12521 2018-02-21 Yao Qi <yao.qi@linaro.org>
12522
12523 * regcache.c (regcache::regcache): Update.
12524 (regcache::invalidate): Move it to detached_regcache::invalidate.
12525 (get_thread_arch_aspace_regcache): Update.
12526 (regcache::raw_update): Update.
12527 (regcache::cooked_read): Remove some code.
12528 (regcache::cooked_read_value): Likewise.
12529 (regcache::raw_write): Remove assert on m_readonly_p.
12530 (regcache::raw_supply_integer): Move it to
12531 detached_regcache::raw_supply_integer.
12532 (regcache::raw_supply_zeroed): Likewise.
12533 * regcache.h (detached_regcache) <raw_supply_integer>: New
12534 declaration.
12535 <raw_supply_zeroed, invalidate>: Likewise.
12536 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12537 <invalidate>: Likewise.
12538 <m_readonly_p>: Removed.
12539
12540 2018-02-21 Yao Qi <yao.qi@linaro.org>
12541
12542 * infcmd.c (get_return_value): Let stop_regs point to
12543 get_current_regcache.
12544 * regcache.c (regcache::regcache): Remove.
12545 (register_dump_reg_buffer): New class.
12546 (regcache_print): Adjust.
12547 * regcache.h (regcache): Remove constructors.
12548
12549 2018-02-21 Yao Qi <yao.qi@linaro.org>
12550
12551 * regcache.c (class register_dump): New class.
12552 (register_dump_regcache, register_dump_none): New class.
12553 (register_dump_remote, register_dump_groups): New class.
12554 (regcache_print): Update.
12555 * regcache.h (regcache_dump_what): Move it to regcache.c.
12556 (regcache) <dump>: Remove.
12557
12558 2018-02-21 Yao Qi <yao.qi@linaro.org>
12559
12560 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12561 reg_buffer_rw *.
12562 (jit_unwind_reg_set_impl): Call raw_supply.
12563 (jit_frame_sniffer): Use reg_buffer_rw.
12564 * record-full.c (record_full_core_regbuf): Change its type.
12565 (record_full_core_open_1): Use reg_buffer_rw.
12566 (record_full_close): Likewise.
12567 (record_full_core_fetch_registers): Use regcache->raw_supply.
12568 (record_full_core_store_registers): Likewise.
12569 * regcache.c (regcache::get_register_status): Move it to
12570 reg_buffer.
12571 (regcache_raw_set_cached_value): Remove.
12572 (regcache::raw_set_cached_value): Remove.
12573 (regcache::raw_write): Call raw_supply.
12574 (regcache::raw_supply): Move it to reg_buffer_rw.
12575 * regcache.h (regcache_raw_set_cached_value): Remove.
12576 (reg_buffer_rw): New class.
12577
12578 2018-02-21 Yao Qi <yao.qi@linaro.org>
12579
12580 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12581 readonly_detached_regcache.
12582 (dummy_frame_prev_register): Use regcache->cooked_read.
12583 * frame.c (frame_save_as_regcache): Change return type.
12584 (frame_pop): Update.
12585 * frame.h (frame_save_as_regcache): Update declaration.
12586 * inferior.h (get_infcall_suspend_state_regcache): Update
12587 declaration.
12588 * infrun.c (infcall_suspend_state) <registers>: use
12589 readonly_detached_regcache.
12590 (save_infcall_suspend_state): Don't use regcache_dup.
12591 (get_infcall_suspend_state_regcache): Change return type.
12592 * linux-fork.c (struct fork_info) <savedregs>: Change to
12593 readonly_detached_regcache.
12594 <pc>: New field.
12595 (fork_save_infrun_state): Don't use regcache_dup.
12596 (info_checkpoints_command): Adjust.
12597 * mi/mi-main.c (register_changed_p): Update declaration.
12598 (mi_cmd_data_list_changed_registers): Use
12599 readonly_detached_regcache.
12600 (register_changed_p): Change parameter type to
12601 readonly_detached_regcache.
12602 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12603 readonly_detached_regcache.
12604 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12605 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12606 New.
12607 (regcache::save): Move it to reg_buffer.
12608 (regcache::restore): Change parameter type.
12609 (regcache_dup): Remove.
12610 * regcache.h (reg_buffer) <save>: New method.
12611 (readonly_detached_regcache): New class.
12612 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12613 readonly_detached_regcache.
12614 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12615
12616 2018-02-21 Yao Qi <yao.qi@linaro.org>
12617
12618 * frame.c (frame_save_as_regcache): Use regcache method save.
12619 (frame_pop): Use regcache method restore.
12620 * infrun.c (restore_infcall_suspend_state): Likewise.
12621 * linux-fork.c (fork_load_infrun_state): Likewise.
12622 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12623 save.
12624 * regcache.c (regcache_save): Remove.
12625 (regcache::restore): More asserts.
12626 (regcache_cpy): Remove.
12627 * regcache.h (regcache_save): Remove the declaration.
12628 (regcache::restore): Move from private to public.
12629 Remove the friend declaration of regcache_cpy.
12630 (regcache_cpy): Remove declaration.
12631
12632 2018-02-21 Yao Qi <yao.qi@linaro.org>
12633
12634 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12635 parameter type to 'readable_regcache *'.
12636 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12637 * arm-tdep.c (arm_neon_quad_read): Likewise.
12638 (arm_pseudo_read): Likewise.
12639 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12640 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12641 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12642 * gdbarch.c: Re-generated.
12643 * gdbarch.h: Re-generated.
12644 * gdbarch.sh (pseudo_register_read): Change parameter type to
12645 'readable_regcache *'.
12646 (pseudo_register_read_value): Likewise.
12647 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12648 (h8300_pseudo_register_read): Likewise.
12649 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12650 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12651 (i386_pseudo_register_read_into_value): Likewise.
12652 (i386_pseudo_register_read_value): Likewise.
12653 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12654 declaration.
12655 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12656 * m32c-tdep.c (m32c_raw_read): Likewise.
12657 (m32c_read_flg): Likewise.
12658 (m32c_banked_register): Likewise.
12659 (m32c_banked_read): Likewise.
12660 (m32c_sb_read): Likewise.
12661 (m32c_part_read): Likewise.
12662 (m32c_cat_read): Likewise.
12663 (m32c_r3r2r1r0_read): Likewise.
12664 (m32c_pseudo_register_read): Likewise.
12665 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12666 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12667 (mep_pseudo_cr64_read): Likewise.
12668 (mep_pseudo_register_read): Likewise.
12669 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12670 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12671 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12672 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12673 (regcache::cooked_read): Likewise.
12674 (regcache::cooked_read_value): Likewise.
12675 (regcache_cooked_read_signed):
12676 (regcache::cooked_read): Likewise.
12677 * regcache.h (readable_regcache): New class.
12678 (regcache): Inherit readable_regcache. Move some methods to
12679 readable_regcache.
12680 * rl78-tdep.c (rl78_pseudo_register_read): Change
12681 parameter type to 'readable_regcache *'.
12682 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12683 (e500_pseudo_register_read): Change parameter type to
12684 'readable_regcache *'.
12685 (dfp_pseudo_register_read): Likewise.
12686 (vsx_pseudo_register_read): Likewise.
12687 (efpr_pseudo_register_read): Likewise.
12688 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12689 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12690 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12691 (sh64_pseudo_register_read): Likewise.
12692 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12693 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12694 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12695 (spu_pseudo_register_read): Likewise.
12696 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12697 (xtensa_pseudo_register_read): Likewise.
12698
12699 2018-02-21 Yao Qi <yao.qi@linaro.org>
12700
12701 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12702 (regcache::arch): Move it to reg_buffer::arch.
12703 (regcache::register_buffer): Likewise.
12704 (regcache::assert_regnum): Likewise.
12705 (regcache::num_raw_registers): Likewise.
12706 * regcache.h (reg_buffer): New class.
12707 (regcache): Inherit reg_buffer.
12708
12709 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12710
12711 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12712 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12713
12714 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12715
12716 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12717
12718 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12719
12720 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12721 (SFILES): Remove common/*.c files.
12722 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12723 * common/common.host: Add common reference.
12724 * configure.ac: Likewise.
12725 * configure: Regenerate.
12726
12727 2018-02-16 Yao Qi <yao.qi@linaro.org>
12728
12729 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12730 (block_initialize_namespace): Use new.
12731 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12732 (dwarf2_free_objfile): Use delete.
12733 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12734 (copy_type_recursive): Use new.
12735 * gdb_obstack.h (allocate_on_obstack): New.
12736
12737 2018-02-15 Yao Qi <yao.qi@linaro.org>
12738
12739 PR gdb/22849
12740 * inferior.c (exit_inferior_1): Reset inf->control.
12741
12742 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12743
12744 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12745 declaration.
12746
12747 2018-02-14 Pedro Alves <palves@redhat.com>
12748
12749 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12750 frame_cleanup_after_sniffer on exception.
12751
12752 2018-02-14 Tom Tromey <tom@tromey.com>
12753
12754 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12755 const.
12756 (solib_bfd_open): Make pathname const.
12757 * solib.c (solib_bfd_open): Make pathname const.
12758 * solib-spu.c (spu_bfd_fopen): Make name const.
12759 (spu_bfd_open): Make pathname const.
12760 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12761 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12762
12763 2018-02-14 Tom Tromey <tom@tromey.com>
12764
12765 * symfile.c (symfile_bfd_open): Update.
12766 * source.h (openp, source_full_path_of, find_and_open_source):
12767 Change argument type to unique_xmalloc_ptr.
12768 * source.c (openp): Take a unique_xmalloc_ptr.
12769 (source_full_path_of, find_and_open_source): Likewise.
12770 (open_source_file, symtab_to_fullname): Update.
12771 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12772 unique_xmalloc_ptr.
12773 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12774 (exec_file_find): Update.
12775 * psymtab.c (psymtab_to_fullname): Update.
12776 * nto-tdep.h (nto_find_and_open_solib): Update.
12777 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12778 unique_xmalloc_ptr.
12779 * exec.c (exec_file_attach): Update.
12780 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12781 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12782
12783 2018-02-14 Tom Tromey <tom@tromey.com>
12784
12785 * solib.c: Include source.h.
12786 * nto-tdep.c: Include source.h.
12787 * mi/mi-cmd-env.c: Include source.h.
12788 * infcmd.c: Include source.h.
12789 * exec.c: Include source.h.
12790 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12791 (add_path, directory_switch, source_path, init_source_path): Move
12792 declarations...
12793 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12794 (add_path, directory_switch, source_path, init_source_path):
12795 ...here.
12796
12797 2018-02-14 Tom Tromey <tom@tromey.com>
12798
12799 * solist.h (exec_file_find, solib_find): Return
12800 unique_xmalloc_ptr.
12801 (solib_bfd_fopen): Take a const char *.
12802 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12803 (exec_file_find, solib_find): Likewise.
12804 (solib_bfd_fopen): Do not take ownership of "pathname".
12805 (solib_bfd_open): Use unique_xmalloc_ptr.
12806 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12807 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12808 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12809 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12810
12811 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12812
12813 * ada-lang.c (name_match_type_from_name): Remove reference to
12814 ada_name_for_lookup in function's documentation.
12815 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12816
12817 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12818
12819 * defs.h (enum openp_flags): New enum.
12820 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12821 Move to enum openp_flags.
12822 (openp_flags): New enum flags.
12823 (openp): Change parameter type to openp_flags.
12824 * source.c (openp): Change parameter type to openp_flags.
12825 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12826 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12827
12828 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12829
12830 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12831 per-command.
12832
12833 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12834
12835 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12836 into...
12837 (class dwarf2_queue_guard): ...the destructor of this new class.
12838 (dw2_do_instantiate_symtab): Create instance of the new class
12839 dwarf2_queue_guard, remove cleanup.
12840
12841 2018-02-09 Tom Tromey <tom@tromey.com>
12842
12843 * source.c (find_source_lines): Don't reference past the end of
12844 the vector.
12845
12846 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12847
12848 * remote.c (remote_btrace_maybe_reopen): Change error message.
12849 * btrace.c (btrace_enable): Likewise.
12850 (parse_xml_btrace): Likewise.
12851 (parse_xml_btrace_conf): Likewise.
12852
12853 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12854
12855 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12856 (linux_enable_pt, linux_enable_bts): Call
12857 diagnose_perf_event_open_fail.
12858
12859 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12860
12861 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12862 Remove parameter and change return type. Update callers. Move it.
12863 (linux_enable_bts, linux_enable_pt): Improve error message.
12864 (linux_enable_pt): Remove zero buffer size check.
12865 (linux_enable_btrace): Improve error messages. Remove NULL return
12866 check.
12867
12868 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12869
12870 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12871 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12872 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12873 (linux_supports_pt, linux_supports_btrace): Remove.
12874 (linux_enable_bts): Call cpu_supports_bts.
12875 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12876 * remote.c (remote_supports_btrace): Remove.
12877 (init_remote_ops): Remove remote_supports_btrace.
12878 * target-delegates.c: Regenerated.
12879 * target.c (target_supports_btrace): Remove.
12880 * target.h (target_ops) <to_supports_btrace>: Remove
12881 (target_supports_btrace): Remove.
12882 * x86-linux-nat.c (x86_linux_create_target): Remove
12883 linux_supports_btrace.
12884
12885 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12886
12887 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12888 btrace failed.
12889 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12890 exception and use message in own exception.
12891
12892 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12893
12894 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12895 (perf_event_pt_event_type): Use gdb_file_up.
12896 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12897 scoped_fd, and scoped_mmap.
12898
12899 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12900
12901 * common/scoped_mmap.h: New.
12902 * unittests/scoped_mmap-selftest.c: New.
12903 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12904 unittests/scoped_mmap-selftest.c.
12905
12906 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12907
12908 * common/scoped_fd.h: New.
12909 * unittests/scoped_fd-selftest.c: New.
12910 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12911 unittests/scoped_fd-selftest.c.
12912
12913 2018-02-09 Tom Tromey <tom@tromey.com>
12914
12915 * auto-load.c (auto_load_section_scripts): Use
12916 gdb::unique_xmalloc_ptr.
12917
12918 2018-02-09 Tom Tromey <tom@tromey.com>
12919
12920 * auto-load.c (execute_script_contents): Use std::string.
12921
12922 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12923
12924 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12925 Python function, rather than a new command.
12926
12927 2018-02-08 Tom Tromey <tom@tromey.com>
12928
12929 * solib.c (solib_find_1): Use std::string.
12930 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12931
12932 2018-02-08 Tom Tromey <tom@tromey.com>
12933
12934 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12935
12936 2018-02-08 Tom Tromey <tom@tromey.com>
12937
12938 * source.c (find_source_lines): Use gdb::def_vector.
12939
12940 2018-02-08 Tom Tromey <tom@tromey.com>
12941
12942 * macrocmd.c (struct temporary_macro_definition): New.
12943 (macro_define_command): Use temporary_macro_definition. Remove
12944 cleanups.
12945 (free_macro_definition_ptr): Remove.
12946
12947 2018-02-08 Tom Tromey <tom@tromey.com>
12948
12949 * macroexp.c (maybe_expand): Use std::string.
12950
12951 2018-02-08 Tom Tromey <tom@tromey.com>
12952
12953 * macroexp.c (struct macro_buffer): Add initializers for some
12954 members.
12955 (init_buffer, init_shared_buffer, free_buffer)
12956 (free_buffer_return_text): Remove.
12957 (macro_buffer): New constructors.
12958 (~macro_buffer): New destructor.
12959 (macro_buffer::set_shared): New method.
12960 (macro_buffer::resize_buffer, macro_buffer::appendc)
12961 (macro_buffer::appendmem): Now methods, not free functions.
12962 (set_token, append_tokens_without_splicing, stringify)
12963 (macro_stringify): Update.
12964 (gather_arguments): Change return type. Remove argc_p argument,
12965 add args_ptr argument. Use std::vector.
12966 (substitute_args): Remove argc argument. Accept std::vector.
12967 (expand): Update. Use std::vector.
12968 (scan, macro_expand, macro_expand_next): Update.
12969
12970 2018-02-08 Tom Tromey <tom@tromey.com>
12971
12972 * symtab.c (default_collect_symbol_completion_matches_break_on):
12973 Use unique_xmalloc_ptr.
12974 * macroscope.h: (sal_macro_scope, user_macro_scope)
12975 (default_macro_scope): Return unique_xmalloc_ptr.
12976 * macroscope.c (sal_macro_scope, user_macro_scope)
12977 (default_macro_scope): Return unique_xmalloc_ptr.
12978 * macroexp.h (macro_expand, macro_expand_once): Return
12979 unique_xmalloc_ptr.
12980 * macroexp.c (macro_expand, macro_expand_once): Return
12981 unique_xmalloc_ptr.
12982 * macrocmd.c (macro_expand_command, macro_expand_once_command)
12983 (info_macro_command, info_macros_command): Use
12984 unique_xmalloc_ptr.
12985 * compile/compile-c-support.c (write_macro_definitions): Use
12986 unique_xmalloc_ptr.
12987 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12988
12989 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
12990
12991 * value.c (value_static_field): Assign field type instead of
12992 containing type when returning an optimized out value.
12993
12994 2018-02-06 Yao Qi <yao.qi@linaro.org>
12995
12996 * ft32-tdep.c (ft32_read_pc): Remove.
12997 (ft32_write_pc): Remove.
12998 (ft32_gdbarch_init): Update.
12999 * m32r-tdep.c (m32r_read_pc): Remove.
13000 (m32r_gdbarch_init): Update.
13001 * mep-tdep.c (mep_read_pc): Remove.
13002 (mep_gdbarch_init): Update.
13003 * microblaze-tdep.c (microblaze_write_pc): Remove.
13004 (microblaze_gdbarch_init): Update.
13005 * mn10300-tdep.c (mn10300_read_pc): Remove.
13006 (mn10300_write_pc): Remove.
13007 (mn10300_gdbarch_init): Update.
13008 * moxie-tdep.c (moxie_read_pc): Remove.
13009 (moxie_write_pc): Remove.
13010 (moxie_gdbarch_init): Update.
13011
13012 2018-02-06 Yao Qi <yao.qi@linaro.org>
13013
13014 * expprint.c (print_subexp_standard): Handle
13015 OP_F77_UNDETERMINED_ARGLIST.
13016 (dump_subexp_body_standard): Likewise.
13017
13018 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13019
13020 * target-descriptions.c (tdesc_element_visitor) Add empty
13021 implementations.
13022 (tdesc_type): Move make_gdb_type from here.
13023 (tdesc_type_builtin): Likewise.
13024 (tdesc_type_vector): Likewise.
13025 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13026 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13027 (make_gdb_type_union): Likewise.
13028 (make_gdb_type_flags): Likewise.
13029 (make_gdb_type_enum): Likewise.
13030 (make_gdb_type): New function.
13031 (tdesc_register_type): Use static make_gdb_type.
13032
13033 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13034
13035 * infcmd.c (default_print_one_register_info): Align natural-format
13036 column values consistently one under another.
13037 (pad_to_column): New function.
13038
13039 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13040
13041 * dwarf2read.c (dwarf2_physname): Move commment.
13042
13043 2018-02-01 Leszek Swirski <leszeks@google.com>
13044
13045 * varobj.c (varobj_formatted_print_options): Allow recursive
13046 pretty printing if pretty printing is enabled.
13047
13048 2018-02-01 Leszek Swirski <leszeks@google.com>
13049
13050 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13051 names after a structop as a filename.
13052
13053 2018-02-01 Yao Qi <yao.qi@linaro.org>
13054
13055 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13056 (arm_record_coproc_data_proc): Likewise.
13057
13058 2018-02-01 Yao Qi <yao.qi@linaro.org>
13059
13060 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13061
13062 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13063
13064 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13065 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13066
13067 2018-01-31 Pedro Alves <palves@redhat.com>
13068
13069 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13070 * inflow.c (child_terminal_save_inferior): Wrap reference to
13071 tcgetpgrp in HAVE_TERMIOS_H.
13072 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13073 _WIN32.
13074 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13075 always iterate over all inferiors.
13076 (gdbsim_cntrl_c): Adjust.
13077 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13078
13079 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13080
13081 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13082 index type is objfile-owned if the element type is as well.
13083
13084 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13085
13086 GDB 8.1 released.
13087
13088 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13089
13090 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13091 "features/s390x-linux64.c".
13092 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13093 s390_linux32 and s390x_linux64.
13094 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13095 default tdesc.
13096 * s390-tdep.c: Include "features/s390-linux32.c" and
13097 "features/s390x-linux64.c".
13098 (s390_tdesc_valid): Add check for tdesc_has_registers.
13099 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13100 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13101 tdesc_s390x_linux64.
13102 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13103 tdesc_s390x_linux64 to...
13104 * s390-tdep.h: ...here.
13105
13106 2018-01-30 Pedro Alves <palves@redhat.com>
13107
13108 PR gdb/13211
13109 * config.in, configure: Regenerate.
13110 * configure.ac: Check for getpgid.
13111 * go32-nat.c (go32_pass_ctrlc): New.
13112 (go32_target): Install it.
13113 * inf-child.c (inf_child_target): Install
13114 child_terminal_save_inferior, child_pass_ctrlc and
13115 child_interrupt.
13116 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13117 (inf_ptrace_target): No longer install it.
13118 * infcmd.c (interrupt_target_1): Adjust.
13119 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13120 (child_interrupt): Declare.
13121 (inferior::terminal_state): New.
13122 * inflow.c (struct terminal_info): Update comments.
13123 (inferior_process_group): Delete.
13124 (terminal_is_ours): Delete.
13125 (gdb_tty_state): New.
13126 (child_terminal_init): Adjust.
13127 (is_gdb_terminal, sharing_input_terminal_1)
13128 (sharing_input_terminal): New functions.
13129 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13130 Set the process's actual process group in the foreground if
13131 possible. Handle is_ours_for_output/is_ours distinction. Don't
13132 mark terminal as the inferior's if not sharing GDB's terminal.
13133 Don't check attach_flag.
13134 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13135 pass down a target_terminal_state.
13136 (child_terminal_save_inferior): New, factored out from ...
13137 (child_terminal_ours_1): ... this. Handle
13138 target_terminal_state::is_ours_for_output.
13139 (child_interrupt, child_pass_ctrlc): New.
13140 (inflow_inferior_exit): Clear the inferior's terminal_state.
13141 (copy_terminal_info): Copy the inferior's terminal state.
13142 (_initialize_inflow): Remove reference to terminal_is_ours.
13143 * inflow.h (inferior_process_group): Delete.
13144 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13145 * procfs.c (procfs_target): Don't install procfs_interrupt.
13146 (procfs_interrupt): Delete.
13147 * remote.c (remote_serial_quit_handler): Adjust.
13148 (remote_interrupt): Remove ptid parameter. Adjust.
13149 * target-delegates.c: Regenerate.
13150 * target.c: Include "terminal.h".
13151 (target_terminal::terminal_state): Rename to ...
13152 (target_terminal::m_terminal_state): ... this.
13153 (target_terminal::init): Adjust.
13154 (target_terminal::inferior): Adjust to per-inferior
13155 terminal_state.
13156 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13157 (target_terminal::ours, target_terminal::ours_for_output): Use
13158 target_terminal_is_ours_kind.
13159 (target_interrupt): Remove ptid parameter. Adjust.
13160 (default_target_pass_ctrlc): Adjust.
13161 * target.h (target_ops::to_terminal_save_inferior): New field.
13162 (target_ops::to_interrupt): Remove ptid_t parameter.
13163 (target_interrupt): Remove ptid_t parameter. Update comment.
13164 (target_pass_ctrlc): Update comment.
13165 * target/target.h (target_terminal_state): New scoped enum,
13166 factored out of ...
13167 (target_terminal::terminal_state): ... here.
13168 (target_terminal::inferior): Update comments.
13169 (target_terminal::restore_inferior): New.
13170 (target_terminal::is_inferior, target_terminal::is_ours)
13171 (target_terminal::is_ours_for_output): Adjust.
13172 (target_terminal::scoped_restore_terminal_state): Adjust to
13173 rename, and call restore_inferior() instead of inferior().
13174 (target_terminal::scoped_restore_terminal_state::m_state): Change
13175 type.
13176 (target_terminal::terminal_state): Rename to ...
13177 (target_terminal::m_terminal_state): ... this and change type.
13178
13179 2018-01-30 Pedro Alves <palves@redhat.com>
13180
13181 * linux-nat.c (wait_for_signal): New function.
13182 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13183 directly.
13184 (async_terminal_is_ours)
13185 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13186 (linux_nat_add_target): Don't override
13187 to_terminal_inferior/to_terminal_ours.
13188
13189 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13190
13191 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13192
13193 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13194
13195 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13196 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13197 dwarf2_per_objfile_free here.
13198 (dwarf2_per_objfile_free): Remove.
13199 (_initialize_dwarf2_read): Don't register
13200 dwarf2_per_objfile_free as a registry cleanup.
13201
13202 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13203
13204 Avoid compilation errors in MinGW native builds
13205
13206 The error is triggered by including python-internal.h, and the
13207 error message is:
13208
13209 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13210 from build-gnulib/import/math.h:27,
13211 from d:/usr/Python26/include/pyport.h:235,
13212 from d:/usr/Python26/include/Python.h:58,
13213 from python/python-internal.h:94,
13214 from python/py-arch.c:24:
13215 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13216 using ::hypot;
13217 ^~~~~
13218
13219 This happens because Python headers define 'hypot' to expand t
13220 '_hypot' in the Windows builds.
13221 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13222 'hypoth'. This avoids a compilation error.
13223
13224 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13225
13226 * MAINTAINERS (Write After Approval): Fix ordering.
13227
13228 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13229
13230 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13231
13232 2018-01-26 Alan Modra <amodra@gmail.com>
13233
13234 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13235 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13236 Remove nop. Make const. Comment.
13237 (powerpc32_plt_stub_so_2): New.
13238 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13239 Correct count. Update uses.
13240 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13241 Move common code reading PLT entry word. Correct
13242 powerpc32_plt_stub PLT address calculation.
13243 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13244 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13245 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13246 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13247 (ppc64_standard_linkage8): Likewise.
13248 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13249 Correct insns description.
13250 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13251
13252 2018-01-24 Pedro Alves <palves@redhat.com>
13253
13254 GCC PR libstdc++/83906
13255 * gdbtypes.c (operator==(const dynamic_prop &,
13256 const dynamic_prop &)): New.
13257 (operator==(const range_bounds &, const range_bounds &)): New.
13258 (check_types_equal): Use them instead of memcmp.
13259 * gdbtypes.h (operator==(const dynamic_prop &,
13260 const dynamic_prop &)): Declare.
13261 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13262 (operator==(const range_bounds &, const range_bounds &)): Declare.
13263 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13264
13265 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13266
13267 * s390-linux-tdep.c (s390_record_address_mask)
13268 (s390_record_calc_disp_common, s390_record_calc_disp)
13269 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13270 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13271 (s390_process_record): Move to s390-tdep.c.
13272 (s390_linux_init_abi_any): Adjust.
13273 * s390-tdep.c (s390_record_address_mask)
13274 (s390_record_calc_disp_common, s390_record_calc_disp)
13275 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13276 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13277 (s390_process_record): Moved from s390-linux-tdep.c
13278 (s390_gdbarch_init): Adjust.
13279
13280 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13281
13282 * s390-linux-nat.c (s390-tdep.h): New include.
13283 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13284 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13285 (ALLDEPFILES): Add s390-tdep.c.
13286 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13287 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13288 * s390-tdep.h: ...this. New file.
13289 * s390-linux-tdep.c (s390-tdep.h): New include.
13290 (_initialize_s390_tdep): Rename to...
13291 (_initialize_s390_linux_tdep): ...this and adjust.
13292 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13293 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13294 s390-tdep.h.
13295 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13296 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13297 (s390_is_partial_instruction, s390_software_single_step)
13298 (is_non_branch_ril, s390_displaced_step_copy_insn)
13299 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13300 (s390_prologue_data, s390_addr, s390_store, s390_load)
13301 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13302 (s390_register_call_saved, s390_guess_tracepoint_registers)
13303 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13304 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13305 (s390_pseudo_register_name, s390_pseudo_register_type)
13306 (s390_pseudo_register_read, s390_pseudo_register_write)
13307 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13308 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13309 (s390_addr_bits_remove, s390_address_class_type_flags)
13310 (s390_address_class_type_flags_to_name)
13311 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13312 (s390_function_arg_float, s390_function_arg_vector)
13313 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13314 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13315 (s390_frame_align, s390_register_return_value, s390_return_value)
13316 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13317 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13318 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13319 (s390_trad_frame_prev_register, s390_unwind_cache)
13320 (s390_prologue_frame_unwind_cache)
13321 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13322 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13323 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13324 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13325 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13326 (s390_frame_base_address, s390_local_base_address)
13327 (s390_frame_base, s390_gcc_target_options)
13328 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13329 (s390_validate_reg_range, s390_tdesc_valid)
13330 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13331 * s390-tdep.c: ...this. New file.
13332
13333 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13334
13335 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13336 (s390_process_record, s390_gdbarch_tdep_alloc)
13337 (s390_linux_init_abi_any): Use/set new hook.
13338
13339 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13340
13341 * s390-linux-tdep.c (osabi.h): New include.
13342 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13343 (s390_linux_init_abi_any): New functions.
13344 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13345
13346 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13347
13348 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13349 tdesc_has_registers check
13350
13351 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13352
13353 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13354 (s390_validate_reg_range): New macro.
13355 (s390_gdbarch_init): Adjust.
13356
13357 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13358
13359 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13360 (s390_gdbarch_tdep_alloc): Adjust.
13361 (s390_gdbarch_init): Adjust.
13362
13363 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13364
13365 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13366 <have_tdb>: Change type to bool.
13367 (s390_gdbarch_tdep_alloc): Adjust.
13368 (s390_gdbarch_init): Adjust.
13369
13370 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13371
13372 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13373 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13374 (s390_gdbarch_tdep_alloc): New function.
13375 (s390_gdbarch_init): Allocate tdep at start and use its fields
13376 instead of separate variables.
13377
13378 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13379
13380 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13381 when looking for cached gdbarch and add comment for remaining.
13382
13383 2018-01-22 Pedro Alves <palves@redhat.com>
13384 Sergio Durigan Junior <sergiodj@redhat.com>
13385
13386 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13387 case.
13388
13389 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13390
13391 * MAINTAINERS: Update my company e-mail address.
13392
13393 2018-01-22 Yao Qi <yao.qi@linaro.org>
13394
13395 * regcache.c (cooked_write_test): New function.
13396 (_initialize_regcache): Register the test.
13397
13398 2018-01-22 Yao Qi <yao.qi@linaro.org>
13399
13400 * ia64-tdep.c (ia64_pseudo_register_read): Call
13401 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13402 * m32c-tdep.c (m32c_cat_read): Likewise.
13403 (m32c_r3r2r1r0_read): Likewise.
13404 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13405 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13406
13407 2018-01-22 Yao Qi <yao.qi@linaro.org>
13408
13409 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13410 method raw_read instead of regcache_raw_read.
13411 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13412 * arm-tdep.c (arm_neon_quad_read): Likewise.
13413 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13414 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13415 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13416 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13417 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13418 (i386_pseudo_register_read_into_value): Likewise.
13419 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13420 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13421 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13422 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13423 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13424 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13425 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13426 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13427 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13428
13429 2018-01-22 Yao Qi <yao.qi@linaro.org>
13430
13431 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13432 * configure.tgt: Remove target mt.
13433 * mt-tdep.c: Remove.
13434 * regcache.c (cooked_read_test): Remove the check for mt.
13435
13436 2018-01-22 Yao Qi <yao.qi@linaro.org>
13437
13438 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13439 instead of gdbarch_pseudo_register_read_value.
13440
13441 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13442
13443 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13444 language is Ada.
13445
13446 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13447
13448 * linespec.c (create_sals_line_offset): Remove code that preserved
13449 the symtab_and_line's line number.
13450
13451 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13452
13453 * varobj.c (varobj_create): Don't set valid_block when creating a
13454 floating varobj.
13455
13456 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13457
13458 * varobj.c (varobj_create): Remove out of date comment.
13459
13460 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13461
13462 PR mi/20395
13463 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13464 updating innermost block.
13465 * parse.c (innermost_block_tracker::update): Take extra type
13466 parameter, and check types match before updating innermost block.
13467 (write_dollar_variable): Update innermost block for registers.
13468 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13469 (innermost_block_tracker::innermost_block_tracker): Initialise
13470 m_types member.
13471 (innermost_block_tracker::reset): Take type parameter.
13472 (innermost_block_tracker::update): Take type parameter, and pass
13473 type through as needed.
13474 (innermost_block_tracker::m_types): New member.
13475 * varobj.c (varobj_create): Pass type when reseting innermost
13476 block.
13477
13478 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13479
13480 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13481 * ada-lang.c (resolve_subexp): Likewise.
13482 * breakpoint.c (set_breakpoint_condition) Likewise.
13483 (watch_command_1) Likewise.
13484 * c-exp.y (variable): Likewise.
13485 * d-exp.y (PrimaryExpression): Likewise.
13486 * f-exp.y (variable): Likewise.
13487 * go-exp.y (variable): Likewise.
13488 * m2-exp.y (variable): Likewise.
13489 * objfiles.c (objfile::~objfile): Likewise.
13490 * p-exp.y (variable): Likewise.
13491 * parse.c (innermost_block): Change type.
13492 * parser-defs.h (class innermost_block_tracker): New.
13493 (innermost_block): Change to innermost_block_tracker.
13494 * printcmd.c (display_command): Switch to innermost_block API.
13495 (do_one_display): Likewise.
13496 * rust-exp.y (do_one_display): Likewise.
13497 * symfile.c (clear_symtab_users): Likewise.
13498 * varobj.c (varobj_create): Switch to innermost_block API, replace
13499 use of innermost_block with block stored on varobj object.
13500
13501 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13502
13503 * expression.h (innermost_block): Remove declaration.
13504 * varobj.c: Add 'parser-defs.h' include.
13505
13506 2018-01-19 Tom Tromey <tom@tromey.com>
13507
13508 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13509 symbols in the static and global blocks.
13510
13511 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13512
13513 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13514 gdb_ptrace.h, and move including gdb_wait.h ...
13515 * nat/linux-ptrace.h: ... to here.
13516
13517 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13518
13519 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13520 inf_ptrace_detach_success.
13521 (inf_ptrace_detach_success): Add inferior parameter, use it
13522 instead of inferior_ptid, pass it to detach_inferior.
13523 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13524 parameter.
13525 * inferior.c (detach_inferior): Add overload that takes an
13526 inferior object.
13527 * inferior.h (detach_inferior): Likewise.
13528 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13529 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13530 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13531
13532 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13533
13534 * target.h (struct target_ops) <to_detach>: Add inferior
13535 parameter.
13536 (target_detach): Likewise.
13537 * target.c (dispose_inferior): Pass inferior down.
13538 (target_detach): Pass inferior down. Assert that it is equal to
13539 the current inferior.
13540 * aix-thread.c (aix_thread_detach): Pass inferior down.
13541 * corefile.c (core_file_command): Pass current_inferior() down.
13542 * corelow.c (core_detach): Add inferior parameter.
13543 * darwin-nat.c (darwin_detach): Likewise.
13544 * gnu-nat.c (gnu_detach): Likewise.
13545 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13546 * infcmd.c (detach_command): Pass current_inferior() down to
13547 target_detach.
13548 * infrun.c (follow_fork_inferior): Pass parent_inf to
13549 target_detach.
13550 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13551 target_detach.
13552 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13553 * linux-thread-db.c (thread_db_detach): Likewise.
13554 * nto-procfs.c (procfs_detach): Likewise.
13555 * procfs.c (procfs_detach): Likewise.
13556 * record.c (record_detach): Likewise.
13557 * record.h (struct inferior): Forward-declare.
13558 (record_detach): Add inferior parameter.
13559 * remote-sim.c (gdbsim_detach): Likewise.
13560 * remote.c (remote_detach_1): Likewise.
13561 (remote_detach): Likewise.
13562 (extended_remote_detach): Likewise.
13563 * sol-thread.c (sol_thread_detach): Likewise.
13564 * target-debug.h (target_debug_print_inferior_p): New macro.
13565 * target-delegates.c: Re-generate.
13566 * top.c (kill_or_detach): Pass inferior down to target_detach.
13567 * windows-nat.c (windows_detach): Add inferior parameter.
13568
13569 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13570
13571 * target.h (struct target_ops) <to_detach>: Remove args
13572 parameter.
13573 (target_detach): Likewise.
13574 * target.c (dispose_inferior): Adjust.
13575 (target_detach): Remove args parameter, adjust.
13576 * aix-thread.c (aix_thread_detach): Adjust.
13577 * corefile.c (core_file_command): Adjust.
13578 * corelow.c (core_detach): Adjust.
13579 * darwin-nat.c (darwin_detach): Adjust.
13580 * gnu-nat.c (gnu_detach): Adjust.
13581 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13582 * infcmd.c (detach_command): Adjust
13583 * infrun.c (follow_fork_inferior): Adjust.
13584 (handle_vfork_child_exec_or_exit): Adjust.
13585 * linux-fork.c (linux_fork_detach): Remove args parameter.
13586 * linux-fork.h (linux_fork_detach): Likewise.
13587 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13588 * linux-thread-db.c (thread_db_detach): Likewise.
13589 * nto-procfs.c (procfs_detach): Likewise.
13590 * procfs.c (procfs_detach): Likewise.
13591 (do_detach): Remove signo parameter.
13592 * record.c (record_detach): Remove args parameter.
13593 * record.h (record_detach): Likewise.
13594 * remote-sim.c (gdbsim_detach): Likewise.
13595 * remote.c (remote_detach_1): Likewise.
13596 (remote_detach): Likewise.
13597 (extended_remote_detach): Likewise.
13598 * sol-thread.c (sol_thread_detach): Likewise.
13599 * target-delegates.c: Re-generate.
13600 * top.c (struct qt_args) <args>: Remove field.
13601 (kill_or_detach): Don't pass args.
13602 (quit_force): Don't set args.
13603 * windows-nat.c (windows_detach): Remove args parameter.
13604
13605 2018-01-19 Yao Qi <yao.qi@linaro.org>
13606
13607 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13608 (arm_linux_init_abi): Install it.
13609
13610 2018-01-19 Yao Qi <yao.qi@linaro.org>
13611
13612 * osabi.c (gdb_osabi_names): Extend the regexp for
13613 arm-linux-gnueabihf.
13614
13615 2018-01-18 Yao Qi <yao.qi@linaro.org>
13616
13617 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13618 m_abbrevs.
13619 (abbrev_table::add_abbrev): Update.
13620 (abbrev_table::lookup_abbrev): Update.
13621
13622 2018-01-18 Yao Qi <yao.qi@linaro.org>
13623
13624 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13625
13626 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13627
13628 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13629 to "std::string".
13630
13631 2018-01-17 Tom Tromey <tom@tromey.com>
13632
13633 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13634
13635 2018-01-17 Tom Tromey <tom@tromey.com>
13636
13637 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13638 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13639 (create_array_type_with_stride): Update.
13640 * dwarf2read.c (set_die_type): Update.
13641
13642 2018-01-17 Tom Tromey <tom@tromey.com>
13643
13644 * dwarf2read.c (delayed_method_info): Remove typedef.
13645 (dwarf2_cu::method_info): Now a std::vector.
13646 (add_to_method_list): Update.
13647 (free_delayed_list): Remove.
13648 (compute_delayed_physnames): Update.
13649 (process_full_comp_unit, process_full_type_unit): Clear the method
13650 list. Remove cleanups.
13651 (psymtab_include_file_name): Add name_holder parameter. Use
13652 unique_xmalloc_ptr.
13653 (dwarf_decode_lines): Update.
13654
13655 2018-01-17 Tom Tromey <tom@tromey.com>
13656 Simon Marchi <simon.marchi@ericsson.com>
13657
13658 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13659 (dwarf2_per_objfile::free_cached_comp_units)
13660 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13661 (init_cutu_and_read_dies_no_follow): Update.
13662 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13663 (dwarf2_cu::~dwarf2_cu): New.
13664 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13665 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13666
13667 2018-01-17 Tom Tromey <tom@tromey.com>
13668 Simon Marchi <simon.marchi@ericsson.com>
13669
13670 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13671 (struct die_reader_specs) <abbrev_table>: New member.
13672 (struct abbrev_table): Add constructor.
13673 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13674 <abbrev_obstack>: Now an auto_obstack.
13675 (abbrev_table_up): New typedef.
13676 (init_cu_die_reader): Add abbrev_table parameter.
13677 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13678 Add result_dwo_abbrev_table.
13679 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13680 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13681 Update.
13682 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13683 parameter.
13684 (skip_children): Update.
13685 (abbrev_table::alloc_abbrev): Rename from
13686 abbrev_table_alloc_abbrev.
13687 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13688 (abbrev_table::lookup_abbrev): Rename from
13689 abbrev_table_lookup_abbrev.
13690 (abbrev_table_read_table): Return abbrev_table_up.
13691 (abbrev_table_free, abbrev_table_free_cleanup)
13692 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13693 (load_partial_dies): Update.
13694
13695 2018-01-17 Tom Tromey <tom@tromey.com>
13696
13697 * dwarf2read.c (dwarf2_compute_name): Update comment.
13698 (read_func_scope, read_variable): Update.
13699 (new_symbol): Remove.
13700 (new_symbol_full): Rename to new_symbol.
13701
13702 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13703
13704 PR gdb/16577
13705 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13706 a warning instead of throwing an error, set section size to 0 and return
13707 NULL.
13708 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13709
13710 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13711
13712 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13713 std::string.
13714 (linux_ptrace_attach_fail_reason_string): Likewise.
13715 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13716 Likewise.
13717 (linux_ptrace_attach_fail_reason_string): Likewise.
13718 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13719
13720 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13721
13722 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13723
13724 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13725
13726 PR gdb/21559
13727 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13728 checking for fs_base/gs_base fields in struct user_regs_struct.
13729 * configure: Regenerate.
13730
13731 2018-01-17 Yao Qi <yao.qi@linaro.org>
13732
13733 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13734 function.
13735 (aarch64_linux_init_abi): Install it to gdbarch hook
13736 gcc_target_options.
13737
13738 2018-01-15 Pedro Alves <palves@redhat.com>
13739
13740 * common/signals-state-save-restore.c
13741 (save_original_signals_state): Fix typos.
13742
13743 2017-01-12 Tom Tromey <tom@tromey.com>
13744 Sergio Durigan Junior <sergiodj@redhat.com>
13745
13746 * Makefile.in (install-only): Install gdb-add-index.
13747
13748 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13749
13750 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13751
13752 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13753
13754 * infrun.c (keep_going_pass_signal): Clear step-over info when
13755 insert_breakpoints fails.
13756
13757 2018-01-11 Pedro Alves <palves@redhat.com>
13758
13759 PR gdb/22583
13760 * infrun.c (resume): Rename to ...
13761 (resume_1): ... this.
13762 (resume): Reimplement as wrapper around resume_1.
13763
13764 2018-01-11 Pedro Alves <palves@redhat.com>
13765
13766 PR remote/22597
13767 * remote.c (remote_parse_stop_reply): Default to the last-set
13768 general thread instead of to 'magic_null_ptid'.
13769
13770 2018-01-10 Pedro Alves <palves@redhat.com>
13771
13772 * language.h (language_get_symbol_name_matcher): Rename ...
13773 (get_symbol_name_matcher): ... this.
13774 * language.c (language_get_symbol_name_matcher): Ditto.
13775 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13776 callers adjusted.
13777
13778 2018-01-10 Pedro Alves <palves@redhat.com>
13779
13780 PR gdb/22670
13781 * dwarf2read.c
13782 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13783 Adjust to use language_get_symbol_name_matcher instead of
13784 language_defn::la_get_symbol_name_matcher.
13785 * language.c (language_get_symbol_name_matcher): If in Ada mode
13786 and the lookup name is a verbatim match, return Ada's matcher.
13787 * language.h (language_get_symbol_name_matcher): Adjust comment.
13788 (ada_lookup_name_info::verbatim_p):: New method.
13789
13790 2018-01-10 Pedro Alves <palves@redhat.com>
13791
13792 PR gdb/22670
13793 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13794 minsym's language is language_auto or language_cplus, pass down
13795 language_ada instead.
13796 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13797
13798 2018-01-10 Pedro Alves <palves@redhat.com>
13799
13800 PR gdb/22670
13801 * minsyms.c (linkage_name_str): New function.
13802 (iterate_over_minimal_symbols): Use it.
13803
13804 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13805
13806 * NEWS: Document that 'info proc' now works on FreeBSD.
13807
13808 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13809
13810 * configure.ac: Check for kinfo_getfile in libutil.
13811 * configure: Regenerate.
13812 * config.in: Regenerate.
13813 * fbsd-nat.c: Include "fbsd-tdep.h".
13814 (fbsd_fetch_cmdline): New.
13815 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13816 rather than calling error.
13817 (fbsd_info_proc): New.
13818 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13819 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13820 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13821
13822 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13823
13824 * fbsd-nat.c (struct free_deleter): Remove.
13825 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13826
13827 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13828
13829 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13830 NULL for an empty pathname.
13831
13832 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13833
13834 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13835 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13836 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13837 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13838 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13839 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13840 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13841 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13842 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13843 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13844 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13845 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13846 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13847 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13848 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13849
13850 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13851
13852 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13853 (gnu_xfer_auxv): New function.
13854 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13855 TARGET_OBJECT_AUXV.
13856
13857 2018-01-08 Yao Qi <yao.qi@linaro.org>
13858 Simon Marchi <simon.marchi@ericsson.com>
13859
13860 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13861 common/selftest.c.
13862 (COMMON_OBS): Remove selftest.o.
13863 * configure.ac: Append selftest-arch.c and common/selftest.c to
13864 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13865 * configure: Re-generated.
13866 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13867 GDB_SELF_TEST.
13868 (maintenance_info_selftests): Likewise.
13869
13870 2018-01-08 Xavier Roirand <roirand@adacore.com>
13871
13872 * ada-valprint.c (val_print_packed_array_elements): Use
13873 proper number of elements when printing an array indexed
13874 by an enumeration type.
13875
13876 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13877
13878 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13879 (dw2_get_file_names_reader): Adjust.
13880 (lookup_dwo_signatured_type): Adjust.
13881 (lookup_dwp_signatured_type): Adjust.
13882 (lookup_signatured_type): Adjust.
13883 (create_type_unit_group): Adjust.
13884 (get_type_unit_group): Adjust.
13885 (process_psymtab_comp_unit_reader): Adjust.
13886 (build_type_psymtabs_reader): Adjust.
13887 (scan_partial_symbols): Adjust.
13888 (add_partial_symbol): Adjust.
13889 (add_partial_subprogram): Adjust.
13890 (peek_die_abbrev): Adjust.
13891 (fixup_go_packaging): Adjust.
13892 (process_imported_unit_die): Adjust.
13893 (dwarf2_compute_name): Adjust.
13894 (dwarf2_physname): Adjust.
13895 (read_import_statement): Adjust.
13896 (handle_DW_AT_stmt_list): Adjust.
13897 (read_file_scope): Adjust.
13898 (read_func_scope): Adjust.
13899 (read_lexical_block_scope): Adjust.
13900 (read_call_site_scope): Adjust.
13901 (read_variable): Adjust.
13902 (dwarf2_rnglists_process): Adjust.
13903 (dwarf2_ranges_process): Adjust.
13904 (dwarf2_ranges_read): Adjust.
13905 (dwarf2_get_pc_bounds): Adjust.
13906 (dwarf2_record_block_ranges): Adjust.
13907 (dwarf2_add_field): Adjust.
13908 (dwarf2_add_member_fn): Adjust.
13909 (read_structure_type): Adjust.
13910 (process_structure_scope): Adjust.
13911 (read_enumeration_type): Adjust.
13912 (read_array_type): Adjust.
13913 (mark_common_block_symbol_computed): Adjust.
13914 (read_common_block): Adjust.
13915 (read_namespace_type): Adjust.
13916 (read_namespace): Adjust.
13917 (read_module_type): Adjust.
13918 (read_tag_pointer_type): Adjust.
13919 (read_tag_ptr_to_member_type): Adjust.
13920 (read_tag_string_type): Adjust.
13921 (read_subroutine_type): Adjust.
13922 (read_typedef): Adjust.
13923 (read_base_type): Adjust.
13924 (attr_to_dynamic_prop): Adjust.
13925 (read_subrange_type): Adjust.
13926 (read_unspecified_type): Adjust.
13927 (dwarf2_read_abbrevs): Adjust.
13928 (load_partial_dies): Adjust.
13929 (read_partial_die): Adjust.
13930 (find_partial_die): Adjust.
13931 (guess_partial_die_structure_name): Adjust.
13932 (fixup_partial_die): Adjust.
13933 (read_attribute_value): Adjust.
13934 (read_addr_index): Adjust.
13935 (read_addr_index_from_leb128): Adjust.
13936 (read_str_index): Adjust.
13937 (dwarf2_string_attr): Adjust.
13938 (get_debug_line_section): Adjust.
13939 (dwarf_decode_line_header): Adjust.
13940 (lnp_state_machine::check_line_address): Adjust.
13941 (dwarf_decode_lines_1): Adjust.
13942 (dwarf_decode_lines): Adjust.
13943 (dwarf2_start_symtab): Adjust.
13944 (var_decode_location): Adjust.
13945 (new_symbol_full): Adjust.
13946 (dwarf2_const_value_data): Adjust.
13947 (dwarf2_const_value_attr): Adjust.
13948 (dwarf2_const_value): Adjust.
13949 (die_type): Adjust.
13950 (die_containing_type): Adjust.
13951 (build_error_marker_type): Adjust.
13952 (lookup_die_type): Adjust.
13953 (guess_full_die_structure_name): Adjust.
13954 (anonymous_struct_prefix): Adjust.
13955 (determine_prefix): Adjust.
13956 (dwarf2_name): Adjust.
13957 (follow_die_ref_or_sig): Adjust.
13958 (follow_die_offset): Adjust.
13959 (follow_die_ref): Adjust.
13960 (follow_die_sig_1): Adjust.
13961 (follow_die_sig): Adjust.
13962 (get_signatured_type): Adjust.
13963 (get_DW_AT_signature_type): Adjust.
13964 (decode_locdesc): Adjust.
13965 (dwarf_decode_macros): Adjust.
13966 (cu_debug_loc_section): Adjust.
13967 (fill_in_loclist_baton): Adjust.
13968 (dwarf2_symbol_mark_computed): Adjust.
13969 (init_one_comp_unit): Don't assign
13970 dwarf2_cu::dwarf2_per_objfile.
13971 (set_die_type): Adjust.
13972
13973 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
13974
13975 * dwarf2read.c (struct mapped_debug_names): Add constructor.
13976 <dwarf2_per_objfile>: New field.
13977 (dwarf2_per_objfile): Remove global.
13978 (get_dwarf2_per_objfile): New function.
13979 (set_dwarf2_per_objfile): New function.
13980 (dwarf2_build_psymtabs_hard): Change objfile parameter to
13981 dwarf2_per_objfile.
13982 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13983 (read_abbrev_offset): Likewise.
13984 (read_indirect_string): Likewise.
13985 (read_indirect_line_string): Likewise.
13986 (read_indirect_string_at_offset): Likewise.
13987 (read_indirect_string_from_dwz): Likewise.
13988 (dwarf2_find_containing_comp_unit): Change objfile parameter to
13989 dwarf2_per_objfile.
13990 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13991 (create_all_comp_units): Change objfile parameter to
13992 dwarf2_per_objfile.
13993 (create_all_type_units): Likewise.
13994 (process_queue): Add dwarf2_per_objfile parameter.
13995 (read_and_check_comp_unit_head): Likewise.
13996 (lookup_dwo_unit_in_dwp): Likewise.
13997 (get_dwp_file): Likewise.
13998 (process_cu_includes): Likewise.
13999 (struct free_dwo_file_cleanup_data): New struct.
14000 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14001 set_dwarf2_per_objfile.
14002 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14003 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14004 context, adjust calls.
14005 (dw2_instantiate_symtab): Likewise.
14006 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14007 (dw2_get_cu): Likewise.
14008 (create_cu_from_index_list): Change objfile parameter to
14009 dwarf2_per_objfile.
14010 (create_cus_from_index_list): Get dwarf2_per_objfile from
14011 context, adjust calls.
14012 (create_cus_from_index): Likewise.
14013 (create_signatured_type_table_from_index): Change objfile
14014 parameter to dwarf2_per_objfile.
14015 (create_signatured_type_table_from_debug_names): Change objfile
14016 parameter to dwarf2_per_objfile.
14017 (create_addrmap_from_index): Likewise.
14018 (create_addrmap_from_aranges): Likewise.
14019 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14020 (dw2_setup): Remove.
14021 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14022 context.
14023 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14024 get_dwarf2_per_objfile.
14025 (dw2_forget_cached_source_info): Likewise.
14026 (dw2_map_symtabs_matching_filename): Likewise.
14027 (struct dw2_symtab_iterator) <index>: Remove.
14028 <dwarf2_per_objfile>: New field.
14029 (dw2_symtab_iter_init): Replace index parameter with
14030 dwarf2_per_objfile.
14031 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14032 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14033 (dw2_print_stats): Likewise.
14034 (dw2_dump): Likewise.
14035 (dw2_expand_symtabs_for_function): Likewise.
14036 (dw2_expand_all_symtabs): Likewise.
14037 (dw2_expand_symtabs_with_fullname): Likewise.
14038 (dw2_expand_marked_cus): Replace index and objfile parameters
14039 with dwarf2_per_objfile.
14040 (dw_expand_symtabs_matching_file_matcher): Add
14041 dwarf2_per_objfile parameter and adjust calls.
14042 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14043 adjust calls.
14044 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14045 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14046 adjust calls.
14047 (create_cus_from_debug_names_list): Replace objfile parameter
14048 with dwarf2_per_objfile and adjust calls.
14049 (create_cus_from_debug_names): Likewise.
14050 (dwarf2_read_debug_names): Likewise.
14051 (mapped_debug_names::namei_to_name): Adjust call.
14052 (dw2_debug_names_iterator::next): Likewise.
14053 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14054 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14055 (dw2_debug_names_dump): Likewise.
14056 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14057 (dw2_debug_names_expand_symtabs_matching): Likewise.
14058 (dwarf2_initialize_objfile): Likewise.
14059 (dwarf2_build_psymtabs): Likewise.
14060 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14061 this_cu.
14062 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14063 (read_and_check_comp_unit_head): Likewise.
14064 (read_abbrev_offset): Likewise.
14065 (create_debug_type_hash_table): Likewise.
14066 (create_debug_types_hash_table): Likewise.
14067 (create_all_type_units): Replace objfile parameter with
14068 dwarf2_per_objfile.
14069 (add_type_unit): Add dwarf2_per_objfile parameter.
14070 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14071 with dwarf2_per_objfile.
14072 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14073 (lookup_dwp_signatured_type): Likewise.
14074 (lookup_signatured_type): Likewise.
14075 (read_cutu_die_from_dwo): Likewise.
14076 (init_tu_and_read_dwo_dies): Likewise.
14077 (init_cutu_and_read_dies): Likewise.
14078 (init_cutu_and_read_dies_no_follow): Likewise.
14079 (allocate_type_unit_groups_table): Add objfile parameter.
14080 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14081 (get_type_unit_group): Likewise.
14082 (process_psymtab_comp_unit): Update call.
14083 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14084 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14085 (print_tu_stats): Likewise.
14086 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14087 in void* parameter.
14088 (build_type_psymtabs): Change objfile parameter to
14089 dwarf2_per_objfile.
14090 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14091 passed in void* parameter.
14092 (process_skeletonless_type_units): Change objfile parameter to
14093 dwarf2_per_objfile.
14094 (set_partial_user): Likewise.
14095 (dwarf2_build_psymtabs_hard): Likewise.
14096 (read_comp_units_from_section): Likewise.
14097 (create_all_comp_units): Likewise.
14098 (scan_partial_symbols): Update calls.
14099 (add_partial_symbol): Likewise.
14100 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14101 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14102 (process_queue): Add dwarf2_per_objfile parameter.
14103 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14104 (compute_compunit_symtab_includes): Likewise.
14105 (process_cu_includes): Add dwarf2_per_objfile parameter.
14106 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14107 (process_full_type_unit): Likewise.
14108 (process_imported_unit_die): Update call.
14109 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14110 (read_file_scope): Likewise.
14111 (allocate_dwo_file_hash_table): Add objfile parameter.
14112 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14113 (create_cus_hash_table): Likewise.
14114 (create_dwp_hash_table): Likewise.
14115 (create_dwo_unit_in_dwp_v1): Likewise.
14116 (create_dwp_v2_section): Likewise.
14117 (create_dwo_unit_in_dwp_v2): Likewise.
14118 (lookup_dwo_unit_in_dwp): Likewise.
14119 (try_open_dwop_file): Likewise.
14120 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14121 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14122 cleanup to include a reference to dwarf2_per_objfile.
14123 (open_dwp_file): Add dwarf2_per_objfile parameter.
14124 (open_and_init_dwp_file): Likewise.
14125 (get_dwp_file): Likewise.
14126 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14127 (queue_and_load_all_dwo_tus): Update call.
14128 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14129 data.
14130 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14131 (dwarf2_ranges_process): Likewise.
14132 (dwarf2_get_pc_bounds): Likewise.
14133 (mark_common_block_symbol_computed): Likewise.
14134 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14135 (dwarf2_read_abbrevs): Update call.
14136 (read_partial_die): Use dwarf2_per_objfile from cu.
14137 (find_partial_die): Likewise.
14138 (fixup_partial_die): Likewise.
14139 (read_attribute_value): Likewise.
14140 (read_indirect_string_at_offset_from): Add objfile parameter.
14141 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14142 parameter.
14143 (read_indirect_string_from_dwz): Add objfile parameter.
14144 (read_indirect_string): Add objfile parameter.
14145 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14146 (read_addr_index): Use dwarf2_per_objfile from cu.
14147 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14148 call dw2_setup.
14149 (read_str_index): Use dwarf2_per_objfile from cu.
14150 (get_debug_line_section): Likewise.
14151 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14152 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14153 (new_symbol_full): Use dwarf2_per_objfile from cu.
14154 (build_error_marker_type): Likewise.
14155 (lookup_die_type): Likewise.
14156 (determine_prefix): Likewise.
14157 (follow_die_offset): Likewise.
14158 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14159 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14160 (dwarf2_fetch_die_type_sect_off): Likewise.
14161 (dwarf2_get_die_type): Likewise.
14162 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14163 (get_signatured_type): Likewise.
14164 (get_DW_AT_signature_type): Likewise.
14165 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14166 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14167 (cu_debug_loc_section): Likewise.
14168 (fill_in_loclist_baton): Likewise.
14169 (dwarf2_symbol_mark_computed): Likewise.
14170 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14171 dwarf2_per_objfile.
14172 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14173 parameter.
14174 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14175 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14176 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14177 (set_die_type): Use dwarf2_free_objfile from cu.
14178 (get_die_type_at_offset): Likewise.
14179 (dwarf2_per_objfile_free): Don't assign global variable.
14180 (debug_names) <constructor>: Add dwarf2_per_objfile
14181 parameter, update m_debugstrlookup construction.
14182 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14183 parameter.
14184 <m_dwarf2_per_objfile>: New field.
14185 <lookup>: Use m_dwarf2_per_objfile.
14186 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14187 (psyms_seen_size): Likewise.
14188 (write_gdbindex): Replace objfile parameter with
14189 dwarf2_per_objfile.
14190 (write_debug_names): Likewise.
14191 (write_psymtabs_to_index): Likewise.
14192 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14193 calls.
14194
14195 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14196
14197 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14198 <dwarf2_per_objfile>: New field.
14199 (struct dwarf2_per_cu_data) <objfile>: Remove.
14200 <dwarf2_per_objfile>: New field.
14201 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14202 of objfile.
14203 (create_signatured_type_table_from_index): Likewise.
14204 (create_debug_type_hash_table): Likewise.
14205 (fill_in_sig_entry_from_dwo_entry): Likewise.
14206 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14207 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14208 objfile.
14209 (create_partial_symtab): Access objfile through
14210 dwarf2_per_objfile.
14211 (process_psymtab_comp_unit_reader): Likewise.
14212 (read_comp_units_from_section): Likewise.
14213 (scan_partial_symbols): Likewise.
14214 (add_partial_symbol): Likewise.
14215 (add_partial_subprogram): Likewise.
14216 (peek_die_abbrev): Likewise.
14217 (fixup_go_packaging): Likewise.
14218 (process_full_comp_unit): Likewise.
14219 (process_full_type_unit): Likewise.
14220 (process_imported_unit_die): Likewise.
14221 (dwarf2_compute_name): Likewise.
14222 (dwarf2_physname): Likewise.
14223 (read_import_statement): Likewise.
14224 (create_cus_hash_table): Assign dwarf2_physname instead of
14225 objfile.
14226 (read_func_scope): Access objfile through dwarf2_per_objfile.
14227 (read_lexical_block_scope): Likewise.
14228 (read_call_site_scope): Likewise.
14229 (read_variable): Likewise.
14230 (dwarf2_rnglists_process): Likewise.
14231 (dwarf2_ranges_process): Likewise.
14232 (dwarf2_ranges_read): Likewise.
14233 (dwarf2_record_block_ranges): Likewise.
14234 (dwarf2_add_field): Likewise.
14235 (dwarf2_add_member_fn): Likewise.
14236 (read_structure_type): Likewise.
14237 (process_structure_scope): Likewise.
14238 (read_enumeration_type): Likewise.
14239 (read_array_type): Likewise.
14240 (read_common_block): Likewise.
14241 (read_namespace_type): Likewise.
14242 (read_namespace): Likewise.
14243 (read_module_type): Likewise.
14244 (read_tag_pointer_type): Likewise.
14245 (read_tag_ptr_to_member_type): Likewise.
14246 (read_tag_string_type): Likewise.
14247 (read_subroutine_type): Likewise.
14248 (read_typedef): Likewise.
14249 (read_base_type): Likewise.
14250 (attr_to_dynamic_prop): Likewise.
14251 (read_subrange_type): Likewise.
14252 (read_unspecified_type): Likewise.
14253 (load_partial_dies): Likewise.
14254 (read_partial_die): Likewise.
14255 (find_partial_die): Likewise.
14256 (guess_partial_die_structure_name): Likewise.
14257 (fixup_partial_die): Likewise.
14258 (read_attribute_value): Likewise.
14259 (read_addr_index_from_leb128): Likewise.
14260 (dwarf2_read_addr_index): Likewise.
14261 (dwarf2_string_attr): Likewise.
14262 (lnp_state_machine::check_line_address): Likewise.
14263 (dwarf_decode_lines_1): Likewise.
14264 (dwarf_decode_lines): Likewise.
14265 (dwarf2_start_symtab): Likewise.
14266 (var_decode_location): Likewise.
14267 (new_symbol_full): Likewise.
14268 (dwarf2_const_value_data): Likewise.
14269 (dwarf2_const_value_attr): Likewise.
14270 (dwarf2_const_value): Likewise.
14271 (die_type): Likewise.
14272 (die_containing_type): Likewise.
14273 (lookup_die_type): Likewise.
14274 (guess_full_die_structure_name): Likewise.
14275 (anonymous_struct_prefix): Likewise.
14276 (dwarf2_name): Likewise.
14277 (follow_die_ref_or_sig): Likewise.
14278 (follow_die_offset): Likewise.
14279 (follow_die_ref): Likewise.
14280 (dwarf2_fetch_die_loc_sect_off): Likewise.
14281 (dwarf2_fetch_constant_bytes): Likewise.
14282 (dwarf2_fetch_die_type_sect_off): Likewise.
14283 (dwarf2_get_die_type): Likewise.
14284 (follow_die_sig): Likewise.
14285 (decode_locdesc): Likewise.
14286 (dwarf2_per_cu_objfile): Likewise.
14287 (dwarf2_per_cu_text_offset): Likewise.
14288 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14289 objfile.
14290 (set_die_type): Access objfile through
14291 dwarf2_per_objfile.
14292
14293 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14294
14295 * valprint.c (converted_character_d): Remove typedef.
14296 (DEF_VEC_O (converted_character_d)): Remove.
14297 (count_next_character): Use std::vector.
14298 (print_converted_chars_to_obstack): Likewise.
14299 (generic_printstr): Likewise.
14300
14301 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14302
14303 * xml-support.h (struct gdb_xml_value): Add constructor.
14304 <value>: Change type to unique_xmalloc_ptr.
14305 (gdb_xml_value_s): Remove typedef.
14306 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14307 (gdb_xml_element_start_handler): Change parameter type to
14308 std::vector.
14309 (xml_find_attribute): Likewise.
14310 * xml-support.c (xml_find_attribute): Change parameter type to
14311 std::vector and adjust.
14312 (gdb_xml_values_cleanup): Remove.
14313 (gdb_xml_parser::start_element): Adjust to std::vector.
14314 (xinclude_start_include): Change paraeter type to std::vector
14315 and adjust.
14316 * btrace.c (check_xml_btrace_version): Likewise.
14317 (parse_xml_btrace_block): Likewise.
14318 (parse_xml_btrace_pt_config_cpu): Likewise.
14319 (parse_xml_btrace_pt): Likewise.
14320 (parse_xml_btrace_conf_bts): Likewise.
14321 (parse_xml_btrace_conf_pt): Likewise.
14322 * memory-map.c (memory_map_start_memory): Likewise.
14323 (memory_map_start_property): Likewise.
14324 * osdata.c (osdata_start_osdata): Likewise.
14325 (osdata_start_item): Likewise.
14326 (osdata_start_column): Likewise.
14327 * remote.c (start_thread): Likewise.
14328 * solib-aix.c (library_list_start_library): Likewise.
14329 (library_list_start_list): Likewise.
14330 * solib-svr4.c (library_list_start_library): Likewise.
14331 (svr4_library_list_start_list): Likewise.
14332 * solib-target.c (library_list_start_segment): Likewise.
14333 (library_list_start_section): Likewise.
14334 (library_list_start_library): Likewise.
14335 (library_list_start_list): Likewise.
14336 * tracepoint.c (traceframe_info_start_memory): Likewise.
14337 (traceframe_info_start_tvar): Likewise.
14338 * xml-syscall.c (syscall_start_syscall): Likewise.
14339 * xml-tdesc.c (tdesc_start_target): Likewise.
14340 (tdesc_start_feature): Likewise.
14341 (tdesc_start_reg): Likewise.
14342 (tdesc_start_union): Likewise.
14343 (tdesc_start_struct): Likewise.
14344 (tdesc_start_flags): Likewise.
14345 (tdesc_start_enum): Likewise.
14346 (tdesc_start_field): Likewise.
14347 (tdesc_start_enum_value): Likewise.
14348 (tdesc_start_vector): Likewise.
14349
14350 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14351
14352 * extension.h (struct xmethod_worker) <clone>: Remove.
14353 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14354 Remove.
14355 (python_xmethod_worker::clone): Remove.
14356 * valops.c (find_overload_match): Use std::move instead of
14357 clone.
14358
14359 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14360
14361 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14362 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14363 <free_xmethod_worker_data>: Remove.
14364 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14365 <get_xmethod_arg_types>: Remove.
14366 <get_xmethod_result_type>: Remove.
14367 <invoke_xmethod>: Remove.
14368 * extension.c (new_xmethod_worker): Remove.
14369 (clone_xmethod_worker): Remove.
14370 (get_matching_xmethod_workers): Return void, pass std::vector by
14371 pointer.
14372 (get_xmethod_arg_types): Rename to...
14373 (xmethod_worker::get_arg_types): ... this, and adjust.
14374 (get_xmethod_result_type): Rename to...
14375 (xmethod_worker::get_result_type): ... this, and adjust.
14376 (invoke_xmethod): Remove.
14377 (free_xmethod_worker): Remove.
14378 (free_xmethod_worker_vec): Remove.
14379 * extension.h (enum ext_lang_rc): Move here from
14380 extension-priv.h.
14381 (struct xmethod_worker): Add constructor and destructor.
14382 <data>: Remove.
14383 <value>: Remove.
14384 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14385 virtual pure methods.
14386 <get_arg_types, get_result_type>: New methods.
14387 (xmethod_worker_ptr): Remove typedef.
14388 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14389 (xmethod_worker_vec): Remove typedef.
14390 (xmethod_worker_up): New typedef.
14391 (invoke_xmethod): Remove.
14392 (clone_xmethod_worker): Remove.
14393 (free_xmethod_worker): Remove.
14394 (free_xmethod_worker_vec): Remove.
14395 (get_xmethod_arg_types): Remove.
14396 (get_xmethod_result_type): Remove.
14397 * valops.c (find_method_list): Use std::vector, don't use
14398 intermediate vector.
14399 (value_find_oload_method_list): Use std::vector.
14400 (find_overload_match): Use std::vector.
14401 (find_oload_champ): Use std::vector.
14402 * value.c (value_free): Use operator delete.
14403 (value_of_xmethod): Rename to...
14404 (value_from_xmethod): ... this. Don't assign
14405 xmethod_worker::value, take rvalue-reference.
14406 (result_type_of_xmethod): Adjust.
14407 (call_xmethod): Adjust.
14408 * value.h: Include extension.h.
14409 (struct xmethod_worker): Don't forward-declare.
14410 (value_of_xmethod): Rename to...
14411 (value_from_xmethod): ... this, take rvalue-reference.
14412 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14413 (struct python_xmethod_worker): ... this, add constructor and
14414 destructor.
14415 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14416 (gdbpy_free_xmethod_worker_data): Rename to...
14417 (python_xmethod_worker::~python_xmethod_worker): ... this and
14418 adjust.
14419 (gdbpy_clone_xmethod_worker_data): Rename to...
14420 (python_xmethod_worker::clone): ... this and adjust.
14421 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14422 temporary vector.
14423 (gdbpy_get_xmethod_arg_types): Rename to...
14424 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14425 (gdbpy_get_xmethod_result_type): Rename to...
14426 (python_xmethod_worker::do_get_result_type): ... this and
14427 adjust.
14428 (gdbpy_invoke_xmethod): Rename to...
14429 (python_xmethod_worker::invoke): ... this and adjust.
14430 (new_python_xmethod_worker): Rename to...
14431 (python_xmethod_worker::python_xmethod_worker): ... this and
14432 adjust.
14433 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14434 Remove.
14435 (gdbpy_free_xmethod_worker_data): Remove.
14436 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14437 (gdbpy_get_xmethod_arg_types): Remove.
14438 (gdbpy_get_xmethod_result_type): Remove.
14439 (gdbpy_invoke_xmethod): Remove.
14440 * python/python.c (python_extension_ops): Remove obsolete
14441 callbacks.
14442
14443 2018-01-05 Pedro Alves <palves@redhat.com>
14444
14445 PR gdb/18653
14446 * common/signals-state-save-restore.c
14447 (save_original_signals_state): New parameter 'quiet'. Warn if we
14448 find a custom handler preinstalled, instead of internal erroring.
14449 But only warn if !quiet.
14450 * common/signals-state-save-restore.h
14451 (save_original_signals_state): New parameter 'quiet'.
14452 * main.c (captured_main_1): Move save_original_signals_state call
14453 after option handling, and pass QUIET.
14454
14455 2018-01-05 Pedro Alves <palves@redhat.com>
14456
14457 * spu-tdep.c (spu_catch_start): Pass
14458 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14459
14460 2018-01-05 Pedro Alves <palves@redhat.com>
14461
14462 PR gdb/22670
14463 * ada-lang.c (literal_symbol_name_matcher): New function.
14464 (ada_get_symbol_name_matcher): Use it for
14465 symbol_name_match_type::SEARCH_NAME.
14466 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14467 it down instead of assuming symbol_name_match_type::FULL.
14468 * block.h (block_lookup_symbol): New parameter 'match_type'.
14469 * c-valprint.c (print_unpacked_pointer): Use
14470 lookup_symbol_search_name instead of lookup_symbol.
14471 * compile/compile-object-load.c (get_out_value_type): Pass down
14472 symbol_name_match_type::SEARCH_NAME.
14473 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14474 symbol_name_match_type::FULL.
14475 * cp-support.c (cp_get_symbol_name_matcher): Handle
14476 symbol_name_match_type::SEARCH_NAME.
14477 * infrun.c (insert_exception_resume_breakpoint): Use
14478 lookup_symbol_search_name.
14479 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14480 * psymtab.c (maintenance_check_psymtabs): Use
14481 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14482 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14483 SYMBOL_SEARCH_NAME.
14484 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14485 if symbol_name_match_type::SEARCH_NAME.
14486 (lookup_symbol_in_language): Pass down
14487 symbol_name_match_type::FULL.
14488 (lookup_symbol_search_name): New.
14489 (lookup_language_this): Pass down
14490 symbol_name_match_type::SEARCH_NAME.
14491 (lookup_symbol_aux, lookup_local_symbol): New parameter
14492 'match_type'. Pass it down.
14493 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14494 (lookup_symbol_search_name): New declaration.
14495 (lookup_symbol_in_block): New 'match_type' parameter.
14496
14497 2018-01-05 Pedro Alves <palves@redhat.com>
14498
14499 PR gdb/22670
14500 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14501 ada_lookup_symbol.
14502 (ada_lookup_symbol): Reimplement in terms of
14503 ada_lookup_symbol_list, bits factored out from
14504 ada_lookup_encoded_symbol.
14505
14506 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14507
14508 * ada-exp.y (write_object_renaming): When subscripting an array
14509 using a symbol as the index, pass the block in call to
14510 ada_lookup_encoded_symbol when looking that symbol up.
14511
14512 2018-01-05 Jerome Guitton <guitton@adacore.com>
14513
14514 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14515 TYPE_INDEX_TYPE.
14516
14517 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14518
14519 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14520 the case where VALUE_LVAL (val0) is not lval_memory.
14521
14522 2018-01-05 Xavier Roirand <roirand@adacore.com>
14523
14524 * ada-valprint.c (print_optional_low_bound): Handle
14525 character-indexed array printing like boolean-indexed array
14526 printing.
14527
14528 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14529
14530 * NEWS: Create a new section for the next release branch.
14531 Rename the section of the current branch, now that it has
14532 been cut.
14533
14534 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14535
14536 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14537 * version.in: Bump version to 8.1.50.DATE-git.
14538
14539 2018-01-03 Xavier Roirand <roirand@adacore.com>
14540
14541 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14542 Add field.
14543 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14544 Add field.
14545 (default_exception_support_info) <catch_handlers_sym>: Add field.
14546 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14547 (ada_exception_name_addr_1): Add "catch handlers" handling.
14548 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14549 Update all callers.
14550 (create_excep_cond_exprs) <ex>: Add parameter.
14551 (re_set_exception): Update create_excep_cond_exprs call.
14552 (print_it_exception, print_one_exception, print_mention_exception)
14553 (print_recreate_exception): Add "catch handler" handling.
14554 (allocate_location_catch_handlers, re_set_catch_handlers)
14555 (check_status_catch_handlers, print_it_catch_handlers)
14556 (print_one_catch_handlers, print_mention_catch_handlers)
14557 (print_recreate_catch_handlers): New function.
14558 (catch_handlers_breakpoint_ops): New variable.
14559 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14560 Add parameter. Add "catch handler" handling.
14561 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14562 Add "catch handler" handling.
14563 (ada_exception_catchpoint_cond_string): Add "catch handler"
14564 handling.
14565 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14566 call.
14567 (catch_ada_handlers_command): New function.
14568 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14569 operations structure.
14570 (_initialize_ada_language): Add "catch handlers" command entry.
14571 * NEWS: Document "catch handlers" feature.
14572
14573 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14574
14575 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14576 account when creating the array type of the slice.
14577 (ada_value_slice): Likewise.
14578
14579 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14580
14581 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14582 New enum value.
14583 (create_array_type_with_stride): Add byte_stride_prop parameter.
14584 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14585 New parameter. Update all callers in this file.
14586 (array_type_has_dynamic_stride): New function.
14587 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14588 of arrays with dynamic byte strides.
14589 * dwarf2read.c (read_array_type): Add support for dynamic
14590 DW_AT_byte_stride attributes.
14591
14592 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14593
14594 * dwarf2read.c (read_unspecified_type): Treat
14595 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14596
14597 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14598
14599 Update copyright year range in all GDB files.
14600
14601 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
14602
14603 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14604 and gdb/testsuite/gdb.base/step-line.c.
14605
14606 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14607
14608 * copyright.py (main): Dump the contents of
14609 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14610 even if BY_HAND is empty.
14611
14612 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14613
14614 * top.c (print_gdb_version): Update Copyright year in version
14615 message.
14616
14617 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14618
14619 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14620
14621 For older changes see ChangeLog-2017.
14622 \f
14623 Local Variables:
14624 mode: change-log
14625 left-margin: 8
14626 fill-column: 74
14627 version-control: never
14628 coding: utf-8
14629 End: