aac5b7a09a80bd677be85a21964ecbb5ca81fcdb
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-10 Gary Benson <gbenson@redhat.com>
2
3 * remote.c (remote_target::remote_send_printf): Add
4 missing va_end found by Coverity.
5
6 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
7
8 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
9
10 2018-10-09 Tom Tromey <tom@tromey.com>
11
12 * configure: Rebuild.
13 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
14 * NEWS: Update --enable-ubsan documentation.
15
16 2018-10-09 Gary Benson <gbenson@redhat.com>
17
18 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
19 found by Coverity.
20
21 2018-10-08 Tom Tromey <tom@tromey.com>
22
23 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
24 variable.
25 (riscv_fbsd_init_abi): Likewise.
26
27 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
28 * valops.c (value_struct_elt_for_reference): Rename local variable
29 to work around the shadowing a previous local warning.
30
31 2018-10-08 John Baldwin <jhb@FreeBSD.org>
32
33 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
34 * NEWS: Mention new FreeBSD/riscv native configuration.
35 * configure.host: Add riscv*-*-freebsd*.
36 * configure.nat: Likewise.
37 * riscv-fbsd-nat.c: New file.
38
39 2018-10-08 John Baldwin <jhb@FreeBSD.org>
40
41 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
42 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
43 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
44 * NEWS: Mention new FreeBSD/riscv target.
45 * configure.tgt: Add riscv*-*-freebsd*.
46 * riscv-fbsd-tdep.c: New file.
47 * riscv-fbsd-tdep.h: New file.
48
49 2018-10-08 John Baldwin <jhb@FreeBSD.org>
50
51 * regcache.h (struct regcache_map_entry): Note that this type can
52 be used with traditional frame caches.
53 * trad-frame.c (trad_frame_set_reg_regmap): New.
54 * trad-frame.h (trad_frame_set_reg_regmap): New.
55
56 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
57
58 PR c++/16841
59 * valops.c (get_virtual_base_offset): New function.
60 (value_struct_elt_for_reference): Use it to get virtual base offset
61 and add it in calculating class member address.
62
63 2018-10-08 John Darrington <john@darrington.wattle.id.au>
64
65 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
66 (check_producer): Check if the producer is codewarrior.
67 (producer_is_codewarrior): New function.
68 (lnp_state_machine::record_line): Ignore is_stmt flag for records
69 produced by codewarrior.
70 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
71
72 2018-10-06 Tom Tromey <tom@tromey.com>
73
74 PR python/19399:
75 * python/py-inferior.c: Add "architecture" entry.
76 (infpy_architecture): New function.
77
78 2018-10-06 Tom Tromey <tom@tromey.com>
79
80 PR python/21765:
81 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
82 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
83 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
84 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
85
86 2018-10-06 Tom Tromey <tom@tromey.com>
87
88 PR build/17077:
89 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
90 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
91 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
92 #include.
93
94 2018-10-06 Tom Tromey <tom@tromey.com>
95
96 * python/py-breakpoint.c (bppy_get_location): Handle a
97 bp_breakpoint without a location.
98
99 2018-10-06 Tom Tromey <tom@tromey.com>
100
101 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
102 (_RegEx): Reformat help text.
103 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
104 (AnyCallerIs, AnyCallerMatches): Reformat help text.
105 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
106 text.
107 * python/lib/gdb/command/xmethods.py (InfoXMethod)
108 (EnableXMethod, DisableXMethod): Remove help indentation.
109 Capitalize meta-syntactic variables.
110 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
111 (EnableUnwinder, DisableUnwinder): Remove help indentation.
112 Capitalize meta-syntactic variables.
113 * python/lib/gdb/command/explore.py (ExploreCommand)
114 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
115 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
116 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
117 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
118 Remove help indentation.
119 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
120 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
121 (DisableFrameFilter, SetFrameFilterPriority)
122 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
123
124 2018-10-06 Tom Tromey <tom@tromey.com>
125
126 PR tui/28819:
127 * tui/tui-io.c (gdb_wgetch): New function.
128 (tui_mld_getc, tui_getc): Use it.
129
130 2018-10-05 Tom Tromey <tom@tromey.com>
131
132 * sol-thread.c (sol_thread_target::wait): Rename inner
133 "save_ptid".
134
135 2018-10-04 Tom Tromey <tom@tromey.com>
136
137 * configure: Rebuild.
138 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
139
140 2018-10-04 Tom Tromey <tom@tromey.com>
141
142 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
143 declaration of "block".
144
145 2018-10-04 Tom Tromey <tom@tromey.com>
146
147 * common/filestuff.c (fdwalk): Remove inner declaration of
148 "result".
149
150 2018-10-04 Tom Tromey <tom@tromey.com>
151
152 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
153 "structs_addr" and hoist declaration.
154
155 2018-10-04 Tom Tromey <tom@tromey.com>
156
157 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
158 variable "size".
159
160 2018-10-04 Tom Tromey <tom@tromey.com>
161
162 * mdebugread.c (parse_partial_symbols): Use std::string.
163
164 2018-10-04 Tom Tromey <tom@tromey.com>
165
166 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
167 * p-valprint.c (pascal_val_print): Split inner "i" variable.
168 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
169 header.
170 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
171 more inner scope.
172 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
173 * varobj.c (varobj_update): Rename inner "newobj",
174 "type_changed".
175 * valprint.c (generic_emit_char): Rename inner "buf".
176 * valops.c (find_overload_match): Rename inner "temp".
177 (value_struct_elt_for_reference): Declare "v" in more inner
178 scope.
179 * v850-tdep.c (v850_push_dummy_call): Rename "len".
180 * unittests/array-view-selftests.c (run_tests): Rename inner
181 "vec".
182 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
183 header.
184 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
185 "tsv" in more inner scope.
186 (print_one_static_tracepoint_marker): Rename inner
187 "tuple_emitter".
188 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
189 (tic6x_push_dummy_call): Don't redeclare "addr".
190 * target-float.c: Declare "dto" lower.
191 * symtab.c (lookup_local_symbol): Rename inner "sym".
192 (find_pc_sect_line): Rename inner "pc".
193 * stack.c (print_frame): Don't redeclare "gdbarch".
194 (return_command): Rename inner "gdbarch".
195 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
196 "sp".
197 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
198 header.
199 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
200 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
201 scope.
202 * remote.c (remote_target::update_thread_list): Don't redeclare
203 "tp".
204 (remote_target::process_initial_stop_replies): Rename inner
205 "thread".
206 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
207 (remote_target::wait_as): Don't redeclare "stop_reply".
208 (remote_target::get_thread_local_address): Rename inner
209 "result".
210 (remote_target::get_tib_address): Likewise.
211
212 * regcache.c (cooked_read_test): Rename "regnum".
213 * record-btrace.c (cmd_record_btrace_start): Rename inner
214 "exception".
215 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
216 loop header.
217 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
218 header.
219 (ppu2spu_sniffer): Rename inner "buf".
220 * parse.c (operator_check_standard): Rename inner "type",
221 "objfile".
222 * p-valprint.c (pascal_val_print): Introduce new scope for
223 "low_bound", "high_bound".
224 * p-exp.y (yylex): Declare "i" in loop header.
225 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
226 Lower declaration of "s".
227 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
228 header.
229 (nios2_push_dummy_call): Rename "len".
230 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
231 "buf".
232 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
233 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
234 (linux_xfer_osdata_modules): Likewise.
235 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
236 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
237 (mips_o64_push_dummy_call): Likewise.
238 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
239 "op".
240 * mi/mi-main.c (list_available_thread_groups): Rename inner
241 "tuple_emitter".
242 (mi_cmd_data_read_memory): Rename inner "opts".
243 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
244 "tuple_emitter".
245 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
246 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
247 more inner scope.
248 (parse_partial_symbols): Rename inner "pst", "p", "name"
249 * main.c (captured_main_1): Rename inner "i"s.
250 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
251 "oso2".
252 * linux-tdep.c (linux_info_proc): Rename inner "filename".
253 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
254 * infrun.c (handle_no_resumed): Don't redeclare "thread".
255 (handle_signal_stop): Rename inner "gdbarch".
256 (handle_command): Declare "signum" in loop header.
257 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
258 "status".
259 (examine_prologue): Rename inner "sol" and "sof".
260 (ia64_extract_return_value): Rename inner "val". Declare another
261 "val" in a more inner scope.
262 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
263 inner scope.
264 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
265 "except".
266 * findvar.c (default_read_var_value): Don't redeclare "addr".
267 * f-exp.y (yylex): Declare "i" in loop header.
268 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
269 Rename inner "type", "expect_type".
270 (evaluate_subexp_for_sizeof): Rename inner "pc".
271 * elfread.c (elf_symfile_read): Rename inner "abfd".
272 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
273 "bytes_read".
274 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
275 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
276 (dwarf_decode_line_header): Rename inner "lh".
277 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
278 "offset". Declare "i" in loop header.
279 (disassemble_dwarf_expression): Rename inner "addr_size".
280 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
281 inner "result".
282 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
283 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
284 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
285 "inner_list_emitter".
286 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
287 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
288 declaration in a block.
289 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
290 * cp-valprint.c (cp_print_value_fields): Don't redeclare
291 "obstack_final_size".
292 * cp-support.c (inspect_type): Declare "i" in loop header.
293 * compile/compile.c (compile_instance::insert_symbol_error):
294 Rename inner "e".
295 * common/agent.c (agent_run_command): Remove inner "ret"
296 declaration.
297 * coffread.c (coff_symfile_read): Rename inner "name".
298 (coff_symfile_read): Rename inner "abfd".
299 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
300 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
301 "high".
302 * c-exp.y (lex_one_token): Move "len" declaration lower.
303 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
304 "gdbarch".
305 (create_exception_master_breakpoint): Likewise. Don't redeclare
306 "b".
307 (watch_command_1): Declare "mark" later.
308 (clear_command): Don't shadow "a" or "b".
309 (delete_command): Rename inner "b".
310 (delete_trace_command): Likewise.
311 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
312 "op".
313 (arm_gdbarch_init): Remove inner "e_flags".
314 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
315 "offset" in inner blocks.
316
317 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
318
319 * dwarf-index-write.c (file_write): Don't write if the vector is
320 empty.
321
322 2018-10-05 Tom de Vries <tdevries@suse.de>
323
324 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
325 PyArg_ParseTuple call.
326
327 2018-10-05 Tom de Vries <tdevries@suse.de>
328
329 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
330 PyArg_ParseTuple call.
331
332 2018-10-04 Joel Brobecker <brobecker@adacore.com>
333
334 * psymtab.c (recursively_search_psymtabs): Reformat parameters
335 to avoid exceeding 80 characters per line limit.
336
337 2018-10-04 Tom Tromey <tom@tromey.com>
338
339 * symfile.c (syms_from_objfile_1, finish_new_objfile)
340 (reread_symbols): Update.
341 * complaints.h (clear_complaints): Remove argument.
342 * complaints.c (enum complaint_series): Remove.
343 (series): Remove global.
344 (complaint_internal): Update.
345 (clear_complaints): Remove argument.
346
347 2018-10-04 Tom Tromey <tom@tromey.com>
348
349 * symfile.c (symbol_file_add_with_addrs): Do not print "no
350 debugging symbols" message if there is a separate debug objfile.
351
352 2018-10-04 Tom Tromey <tom@tromey.com>
353
354 PR cli/19551:
355 * symfile.c (symbol_file_add_with_addrs): Update output.
356 * psymtab.c (require_partial_symbols): Update output.
357
358 2018-10-04 Tom Tromey <tom@tromey.com>
359
360 PR cli/22234:
361 * complaints.c: Emit \n.
362
363 2018-10-04 Tom Tromey <tom@tromey.com>
364
365 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
366 (separate_debug_file_exists, find_separate_debug_file)
367 (add_symbol_file_command, reread_symbols, allocate_symtab)
368 (allocate_compunit_symtab): Use filtered printing, not
369 unfiltered.
370 * psymtab.c (require_partial_symbols, dump_psymtab)
371 (allocate_psymtab): Use filtered printing, not unfiltered.
372
373 2018-10-04 Tom Tromey <tom@tromey.com>
374
375 * complaints.c (complaint_internal): Correctly check complaint
376 count.
377
378 2018-10-04 Tom Tromey <tom@tromey.com>
379
380 * complaints.h (struct complaints): Remove declaration.
381 * complaints.c (clear_complaints): Remove an unused variable.
382
383 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
384
385 * MAINTAINERS (Write After Approval): Add self.
386
387 2018-10-03 Tom Tromey <tom@tromey.com>
388
389 * guile/scm-value.c (gdbscm_value_to_string): Initialize
390 "buffer_contents".
391 * coffread.c (coff_symtab_read): Initialize "newobj".
392
393 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * dwarf2read.c (read_func_scope): Remove struct keyword in
396 range-based for.
397
398 2018-10-03 Tom Tromey <tom@tromey.com>
399
400 * README: Mention --enable-ubsan.
401 * NEWS: Mention --enable-ubsan.
402 * acinclude.m4: Include sanitize.m4.
403 * configure: Rebuild.
404 * configure.ac: Call AM_GDB_UBSAN.
405 * sanitize.m4: New file.
406
407 2018-10-03 Tom Tromey <tom@tromey.com>
408
409 * expression.h (enum exp_opcode): Use uint8_t as base type.
410 * expprint.c (op_name): Handle invalid opcodes.
411
412 2018-10-03 Tom Tromey <tom@tromey.com>
413
414 * parse.c (prefixify_expression): Add assert.
415 (parse_exp_in_context_1): Throw exception if the expression is
416 empty.
417
418 2018-10-03 Tom Tromey <tom@tromey.com>
419
420 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
421
422 2018-10-03 Tom Tromey <tom@tromey.com>
423
424 * c-exp.y (parse_number): Work in unsigned. Remove casts.
425
426 2018-10-03 Tom Tromey <tom@tromey.com>
427
428 * dwarf2read.c (read_subrange_type): Make "negative_mask"
429 unsigned.
430
431 2018-10-03 Tom Tromey <tom@tromey.com>
432
433 * findvar.c (extract_integer): Do work in an unsigned type.
434
435 2018-10-03 Tom Tromey <tom@tromey.com>
436
437 * common/enum-flags.h (enum_flags::operator~): Add static assert.
438 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
439 base type.
440 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
441 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
442 type.
443 * c-lang.h (enum c_string_type_values): Use unsigned as base
444 type.
445 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
446
447 2018-10-03 Tom Tromey <tom@tromey.com>
448
449 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
450 <~dwarf2_frame_state_reg_info>: Update.
451 <dwarf2_frame_state_reg_info>: Update.
452 <alloc_regs>: Add assertion. Update.
453 <reg>: Now a std::vector.
454 <num_regs>: Remove.
455 <swap>: Update.
456 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
457 (execute_cfa_program_test, dwarf2_frame_cache): Update.
458
459 2018-10-03 Tom Tromey <tom@tromey.com>
460
461 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
462
463 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
464
465 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
466
467 2018-10-02 Tom Tromey <tom@tromey.com>
468
469 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
470
471 2018-10-02 John Darrington <john@darrington.wattle.id.au>
472
473 * NEWS: Mention changed commands.
474 * ser-uds.c: New file.
475 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
476 * configure: Regenerate.
477 * Makefile.in: Add new file.
478 * serial.c (serial_open): Check if filename is a socket
479 and lookup the appropriate interface accordingly.
480
481 2018-10-01 Alan Hayward <alan.hayward@arm.com>
482
483 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
484 define.
485 (AARCH64_EXTRA_MAGIC): Likewise.
486 (AARCH64_FPSIMD_MAGIC): Likewise.
487 (AARCH64_SVE_MAGIC): Likewise.
488 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
489 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
490 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
491 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
492 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
493 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
494 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
495 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
496 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
497 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
498 (read_aarch64_ctx): Add function.
499 (aarch64_linux_sigframe_init): Detect FP registers.
500
501 2018-10-01 Alan Hayward <alan.hayward@arm.com>
502
503 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
504 (AARCH64_D0_REGNUM): Likewise.
505 (AARCH64_S0_REGNUM): Likewise.
506 (AARCH64_H0_REGNUM): Likewise.
507 (AARCH64_B0_REGNUM): Likewise.
508 (AARCH64_SVE_V0_REGNUM): Likewise.
509 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
510 (AARCH64_D0_REGNUM): Likewise.
511 (AARCH64_S0_REGNUM): Likewise.
512 (AARCH64_H0_REGNUM): Likewise.
513 (AARCH64_B0_REGNUM): Likewise.
514 (AARCH64_SVE_V0_REGNUM): Likewise.
515
516 2018-10-01 Gary Benson <gbenson@redhat.com>
517
518 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
519 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
520 prfpregset_t instead of gdb_prfpregset_t.
521 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
522 * configure, config.in: Rebuild.
523
524 2018-10-01 Gary Benson <gbenson@redhat.com>
525
526 * common/gdb_proc_service.h: New file, factored out from...
527 * gdb_proc_service.h: Moved common code to the above file.
528 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
529
530 2018-10-01 Gary Benson <gbenson@redhat.com>
531
532 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
533 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
534
535 2018-10-01 Gary Benson <gbenson@redhat.com>
536
537 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
538 (AC_CHECK_HEADERS): Check for linux/elf.h.
539 * configure, config.in: Rebuild.
540 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
541 doesn't define elf_fpregset_t.
542
543 2018-10-01 Gary Benson <gbenson@redhat.com>
544
545 * gdb_proc_service.h: Whitespace change.
546
547 2018-10-01 Tom Tromey <tom@tromey.com>
548
549 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
550 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
551 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
552
553 2018-10-01 Tom Tromey <tom@tromey.com>
554
555 * README: Minor change.
556
557 2018-09-30 Pedro Alves <palves@redhat.com>
558
559 * darwin-nat-info.c (darwin_debug_regions_recurse)
560 (info_mach_exceptions_command): Remove unused local variables.
561 * darwin-nat.c (darwin_decode_notify_message)
562 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
563 (darwin_stop_inferior, darwin_setup_exceptions)
564 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
565 (darwin_nat_target::attach, darwin_nat_target::detach)
566 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
567 local variables.
568 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
569 variables.
570
571 2018-09-29 Tom Tromey <tom@tromey.com>
572
573 * README: Remove some leftover text.
574
575 2018-09-29 Tom Tromey <tom@tromey.com>
576
577 * PROBLEMS: Rewrite.
578 * README: Update.
579
580 2018-09-28 John Baldwin <jhb@FreeBSD.org>
581
582 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
583 case with explicit breakpoint kind.
584 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
585 'additional_info' and related logic.
586 (riscv_debug_breakpoints): New variable.
587 (riscv_breakpoint_kind_from_pc): Use the length of the existing
588 instruction to determine the breakpoint kind.
589 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
590 flag. Update description of 'set/show riscv
591 use-compressed-breakpoints' flag.
592
593 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
594
595 (NEWS): Mention changes to frame related commands.
596 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
597 (add_prefix_cmd_suppress_notification): New function.
598 (add_com_suppress_notification): Call
599 add_cmd_suppress_notification.
600 * command.h (add_cmd_suppress_notification): Declare.
601 (add_prefix_cmd_suppress_notification): Declare.
602 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
603 (parse_frame_specification): Moved from stack.c, with
604 simplification to handle a single argument.
605 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
606 switch to the selected frame. Add a header comment.
607 * stack.c: Remove 'safe-ctype.h' include.
608 (find_frame_for_function): Add declaration.
609 (find_frame_for_address): New function.
610 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
611 (frame_selection_by_function_completer): New function.
612 (info_frame_command): Rename to...
613 (info_frame_command_core): ...this, and update parameter types.
614 (select_frame_command): Rename to...
615 (select_frame_command_core): ...this, and update parameter types.
616 (frame_command): Rename to...
617 (frame_command_core): ...this, and update parameter types.
618 (class frame_command_helper): New class to wrap implementations of
619 frame related sub-commands.
620 (frame_apply_cmd_list): New static global.
621 (frame_cmd_list): Make static.
622 (select_frame_cmd_list): New global for sub-commands.
623 (info_frame_cmd_list): New global for sub-commands.
624 (_initialize_stack): Register sub-commands for 'frame',
625 'select-frame', and 'info frame'. Update 'frame apply' commands
626 to use frame_apply_cmd_list. Move function local static
627 frame_apply_list to file static frame_apply_cmd_list for
628 consistency.
629 * stack.h (select_frame_command): Delete declarationn.
630 (select_frame_for_mi): Declare new function.
631
632 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
633
634 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
635 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
636 and NOP.
637
638 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
639
640 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
641
642 2018-09-26 Tom Tromey <tom@tromey.com>
643
644 * valops.c (auto_abandon): Remove dead code.
645
646 2018-09-26 Tom Tromey <tom@tromey.com>
647
648 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
649
650 2018-09-24 Tom Tromey <tom@tromey.com>
651
652 * common/pathstuff.c (get_standard_cache_dir): Make
653 "xdg_cache_home" and "home" const.
654 * top.c (init_history): Make "tmpenv" const.
655 * main.c (get_init_files): Make "homedir" const.
656
657 2018-09-23 Tom Tromey <tom@tromey.com>
658
659 PR python/18852:
660 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
661
662 2018-09-23 Tom Tromey <tom@tromey.com>
663
664 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
665 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
666 * python/python-internal.h (gdbpy_handle_exception): Declare.
667 * python/py-utils.c (gdbpy_handle_exception): New function.
668
669 2018-09-23 Tom Tromey <tom@tromey.com>
670
671 PR python/17284:
672 * python/py-type.c (typy_template_argument): Check for negative
673 argument number.
674
675 2018-09-23 Tom Tromey <tom@tromey.com>
676
677 PR python/14062:
678 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
679
680 2018-09-23 Tom Tromey <tom@tromey.com>
681
682 PR python/18170:
683 * python/py-value.c (valpy_int): Allow conversion from pointer
684 type.
685
686 2018-09-23 Tom Tromey <tom@tromey.com>
687
688 PR python/20126:
689 * python/py-value.c (valpy_int): Respect type sign.
690
691 2018-09-23 Tom Tromey <tom@tromey.com>
692
693 PR python/18352;
694 * python/py-value.c (valpy_float): Allow conversions from int or
695 char.
696 (valpy_int, valpy_long): Allow conversions from float.
697
698 2018-09-23 Tom Tromey <tom@tromey.com>
699
700 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
701 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
702
703 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
704
705 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
706 __sighndlr.
707 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
708
709 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
710
711 * windows-nat.c (windows_nat_target::wait): Remove a spurious
712 target_terminal::ours().
713
714 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
715
716 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
717 of vl to ULONGEST.
718
719 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
720
721 * breakpoint.c (update_inserted_breakpoint_locations): Remove
722 redundant condition.
723
724 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
725
726 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
727
728 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
729 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
730 * sol-thread.c (ps_pdmodel): Don't guard definition.
731
732 * procfs.c: Fix formatting.
733
734 * procfs.c (sysset_t_alloc): Remove.
735 (create_procinfo): Use XNEW instead of sysset_t_alloc.
736 (procfs_debug_inferior): Likewise.
737 (procfs_set_exec_trap): Likewise.
738 (proc_set_traced_sysentry): Don't allocate argp dynamically.
739 (proc_set_traced_sysexit): Likewise.
740
741 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
742 (dead_procinfo): Likewise.
743 (proc_warn): Likewise.
744 (proc_error): Likewise.
745 (proc_get_LDT_entry): Likewise.
746 (do_attach): Likewise.
747 (procfs_target::pid_to_str): Likewise.
748 (iterate_over_mappings): Likewise.
749
750 * procfs.c (create_procinfo): Fix ARI warning.
751 (proc_get_status): Likewise.
752 (proc_stop_process): Likewise.
753 (proc_run_process): Likewise.
754 (proc_kill): Likewise.
755 (proc_get_LDT_entry): Likewise.
756 (procfs_find_LDT_entry): Likewise.
757 (proc_update_threads): Likewise.
758 (proc_iterate_over_threads): Likewise.
759 (do_attach): Likewise.
760 (procfs_xfer_memory): Likewise.
761 (invalidate_cache): Likewise.
762 (procfs_target::resume): Likewise.
763 (procfs_init_inferior): Likewise.
764 (procfs_set_exec_trap): Likewise.
765 (procfs_target::thread_alive): Likewise.
766 (procfs_target::pid_to_exec_file): Likewise.
767 (iterate_over_mappings): Likewise.
768 (procfs_target::make_corefile_notes): Likewise.
769 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
770
771 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
772 (procfs_find_LDT_entry): Likewise.
773 * sol-thread.c (ps_lgetLDT): Likewise.
774
775 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
776
777 PR tdep/17903
778 * procfs.c (procfs_target): Declare pid_to_exec_file.
779 (procfs_target::pid_to_exec_file): New.
780
781 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
782
783 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
784 renaming.
785 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
786 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
787
788 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
789
790 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
791 (supply_fpregset, fill_fpregset): Move ...
792 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
793 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
794 Remove references to ioctl-based procfs.
795 Include <sys/reg.h>.
796 Remove PR_MODEL_NATIVE guards.
797 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
798 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
799
800 2018-09-19 Xavier Roirand <roirand@adacore.com>
801
802 PR gdb/20981:
803 * solib-darwin.c (darwin_get_dyld_bfd): New function.
804 (darwin_solib_get_all_image_info_addr_at_init): Update call.
805 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
806
807 2018-09-19 John Baldwin <jhb@FreeBSD.org>
808
809 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
810 (fbsd_print_sockaddr_in6): Likewise.
811
812 2018-09-19 Richard Bunt <richard.bunt@arm.com>
813 Chris January <chris.january@arm.com>
814
815 * eval.c (skip_undetermined_arglist): Skip argument list helper.
816 (evaluate_subexp_standard): Return a dummy type when
817 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
818 OP_F77_UNDETERMINED_ARGLIST case.
819 * expression.h (enum noside): Update comment.
820
821 2018-09-19 George Vasick <george.vasick@oracle.com>
822
823 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
824
825 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
826 April Chin <april.chin@oracle.com>
827 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
828
829 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
830 uint_t lwpid_t.
831 (create_procinfo): Print pids in /proc without leading zeros.
832
833 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
834
835 * nios2-tdep.c (nios2_gcc_target_options): New.
836 (nios2_gdb_arch_init): Install new hook.
837
838 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
839
840 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
841 New file.
842 * update-gnulib.sh: Apply patch.
843 * configure: Re-generate.
844
845 2018-09-18 John Baldwin <jhb@FreeBSD.org>
846
847 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
848 description. Make "info proc" command descriptions more
849 consistent.
850
851 2018-09-18 John Baldwin <jhb@FreeBSD.org>
852
853 * NEWS: Mention 'info proc files' command.
854
855 2018-09-18 John Baldwin <jhb@FreeBSD.org>
856
857 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
858 descriptors for IP_FILES and IP_ALL.
859
860 2018-09-18 John Baldwin <jhb@FreeBSD.org>
861
862 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
863 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
864 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
865 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
866 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
867 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
868 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
869 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
870 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
871 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
872 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
873 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
874 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
875 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
876 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
877 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
878 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
879 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
880 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
881 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
882 (struct fbsd_sockaddr_un): New types.
883 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
884 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
885 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
886 (fbsd_core_info_proc_files): New functions.
887 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
888 IP_ALL.
889 * fbsd-tdep.h (fbsd_info_proc_files_header)
890 (fbsd_info_proc_files_entry): New.
891
892 2018-09-18 John Baldwin <jhb@FreeBSD.org>
893
894 * defs.h (enum info_proc_what) [IP_FILES]: New value.
895 * infcmd.c (info_proc_cmd_files): New function.
896 (_initialize_infcmd): Register 'info proc files' command.
897
898 2018-09-18 John Baldwin <jhb@FreeBSD.org>
899
900 * gnulib/aclocal-m4-deps.mk: Re-generate.
901 * gnulib/aclocal.m4: Re-generate.
902 * gnulib/config.in: Re-generate.
903 * gnulib/configure: Re-generate.
904 * gnulib/import/Makefile.am: Re-generate.
905 * gnulib/import/Makefile.in: Re-generate.
906 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
907 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
908 * gnulib/import/arpa_inet.in.h: New file.
909 * gnulib/import/inet_ntop.c: New file.
910 * gnulib/import/m4/arpa_inet_h.m4: New file.
911 * gnulib/import/m4/inet_ntop.m4: New file.
912 * gnulib/import/m4/netinet_in_h.m4: New file.
913 * gnulib/import/m4/socklen.m4: New file.
914 * gnulib/import/m4/sockpfaf.m4: New file.
915 * gnulib/import/m4/stdalign.m4: New file.
916 * gnulib/import/m4/sys_uio_h.m4: New file.
917 * gnulib/import/netinet_in.in.h: New file.
918 * gnulib/import/stdalign.in.h: New file.
919 * gnulib/import/sys_socket.c: New file.
920 * gnulib/import/sys_socket.in.h: New file.
921 * gnulib/import/sys_uio.in.h: New file.
922 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
923 module.
924
925 2018-09-18 John Baldwin <jhb@FreeBSD.org>
926
927 * gnulib/aclocal-m4-deps.mk: New file.
928 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
929 deterministically.
930
931 2018-09-18 John Baldwin <jhb@FreeBSD.org>
932
933 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
934 KVE_PATH.
935
936 2018-09-18 Tom Tromey <tom@tromey.com>
937
938 * compile/compile-object-load.c (struct
939 link_hash_table_cleanup_data): Add constructor and destructor.
940 Use DISABLE_COPY_AND_ASSIGN.
941 (~link_hash_table_cleanup_data): Rename from
942 link_hash_table_free. Now a destructor.
943 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
944
945 2018-09-18 Tom Tromey <tom@tromey.com>
946
947 * compile/compile-object-run.c (do_module_cleanup): Use delete.
948 * compile/compile-object-load.c (struct munmap_list): Move to
949 header file.
950 (munmap_list::add): Rename from munmap_list_add; rewrite.
951 (munmap_list::~munmap_list): Rename from munmap_list_free.
952 (munmap_listp_free_cleanup): Remove.
953 (compile_object_load): Update.
954 * compile/compile-object-load.h (struct munmap_list): Move from
955 compile-object-load.c. Rewrite.
956
957 2018-09-18 Alan Hayward <alan.hayward@arm.com>
958
959 * aarch64-tdep.c (pass_in_v): Use register size.
960 (aarch64_extract_return_value): Likewise.
961 (aarch64_store_return_value): Likewise.
962
963 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
964
965 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
966 rlim_t.
967
968 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
969
970 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
971 Fix short help line.
972
973 2018-09-17 Tom Tromey <tom@tromey.com>
974
975 PR python/20445:
976 * configure: Rebuild.
977 * configure.ac: Conditionally use -DNDEBUG for Python.
978
979 2018-09-17 Tom Tromey <tom@tromey.com>
980
981 * configure: Rebuild.
982 * configure.ac: Use gmp as a library dependency when checking for
983 mpfr.
984
985 2018-09-17 Pedro Alves <palves@redhat.com>
986
987 * python/py-inferior.c (find_inferior_object): Delete.
988
989 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
990
991 * compile/compile-cplus-types.c
992 (compile_cplus_instance::enter_scope): Don't use new_scope after
993 std::move.
994
995 2018-09-17 Tom Tromey <tom@tromey.com>
996
997 * common/pathstuff.c (get_standard_cache_dir): Use
998 ~/Library/Caches on macOS.
999 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1000
1001 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1002
1003 PR python/23669
1004 * breakpoint.c (commands_cmd_element): New.
1005 (_initialize_breakpoint): Assign commands_cmd_element.
1006 * breakpoint.h (commands_cmd_element): New.
1007 * cli/cli-script.c (while_cmd_element, if_command,
1008 define_cmd_element): New.
1009 (command_name_equals): Remove.
1010 (process_next_line): Compare commands by pointer, not by name.
1011 (_initialize_cli_script): Assign the various cmd_list_element
1012 variables.
1013 * compile/compile.c (compile_cmd_element): New.
1014 (_initialize_compile): Assign compile_cmd_element.
1015 * compile/compile.h (compile_cmd_element): New.
1016 * guile/guile.c (guile_cmd_element): New.
1017 (install_gdb_commands): Assign guile_cmd_element.
1018 * guile/guile.h (guile_cmd_element): New.
1019 * python/python.c (python_cmd_element): New.
1020 (_initialize_python): Assign python_cmd_element.
1021 * python/python.h (python_cmd_element): New.
1022 * tracepoint.c (while_stepping_cmd_element): New.
1023 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1024 * tracepoint.h (while_stepping_cmd_element): New.
1025
1026 2018-09-17 Tom Tromey <tom@tromey.com>
1027
1028 * infrun.c (save_infcall_suspend_state): Return
1029 infcall_suspend_state_up.
1030 (save_infcall_control_state): Return infcall_control_state_up.
1031 * inferior.h (save_infcall_suspend_state)
1032 (save_infcall_control_state): Declare later. Return unique
1033 pointers.
1034
1035 2018-09-17 Tom Tromey <tom@tromey.com>
1036
1037 * infrun.c (struct stop_context): Declare constructor,
1038 destructor, "changed" method.
1039 (stop_context::stop_context): Rename from save_stop_context.
1040 (stop_context::~stop_context): Rename from
1041 release_stop_context_cleanup.
1042 (normal_stop): Update.
1043 (stop_context::changed): Rename from stop_context_changed. Return
1044 bool.
1045
1046 2018-09-17 Tom Tromey <tom@tromey.com>
1047
1048 * inferior.h (struct infcall_suspend_state_deleter): New.
1049 (infcall_suspend_state_up): New typedef.
1050 (struct infcall_control_state_deleter): New.
1051 (infcall_control_state_up): New typedef.
1052 (make_cleanup_restore_infcall_suspend_state)
1053 (make_cleanup_restore_infcall_control_state): Don't declare.
1054 * infcall.c (call_function_by_hand_dummy): Update.
1055 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1056 (make_cleanup_restore_infcall_suspend_state): Remove.
1057 (do_restore_infcall_control_state_cleanup)
1058 (make_cleanup_restore_infcall_control_state): Remove.
1059
1060 2018-09-17 Tom Tromey <tom@tromey.com>
1061
1062 * gdbthread.h (struct thread_control_state): Add initializer.
1063 (class thread_info) <control>: Remove initializer.
1064 * inferior.h (struct inferior_control_state): Add initializer.
1065 (class inferior) <control>: Remove initializer.
1066 (exit_inferior_1): Update.
1067 * infrun.c (struct infcall_control_state): Add constructors.
1068 (save_infcall_control_state): Use new.
1069 (restore_infcall_control_state, discard_infcall_control_state):
1070 Use delete.
1071
1072 2018-09-17 Tom Tromey <tom@tromey.com>
1073
1074 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1075 unique_ptr.
1076 <siginfo_data>: Now a unique_xmalloc_ptr.
1077 (save_infcall_suspend_state, restore_infcall_suspend_state)
1078 (discard_infcall_suspend_state)
1079 (get_infcall_suspend_state_regcache): Update.
1080
1081 2018-09-17 Tom Tromey <tom@tromey.com>
1082
1083 * gdbthread.h (struct thread_suspend_state): Add initializers.
1084 (class thread_info) <suspend>: Remove initializer.
1085 * infrun.c (struct infcall_suspend_state): Add initializers.
1086 (save_infcall_suspend_state): Use new.
1087 (discard_infcall_suspend_state): Use delete.
1088
1089 2018-09-16 Tom Tromey <tom@tromey.com>
1090
1091 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1092 Remove.
1093 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1094 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1095 (py_varobj_iter_new): Likewise.
1096 (py_varobj_get_iterator): Use gdbpy_ref.
1097
1098 2018-09-16 Tom Tromey <tom@tromey.com>
1099
1100 * python/py-threadevent.c (py_get_event_thread): Simplify.
1101 * python/py-inferior.c (infpy_thread_from_thread_handle):
1102 Return immediately after calling thread_to_thread_object. Use
1103 Py_RETURN_NONE.
1104 (thread_to_thread_object): Set the exception on a NULL return.
1105
1106 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1107
1108 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1109
1110 2018-09-16 Tom Tromey <tom@tromey.com>
1111
1112 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1113 Remove.
1114
1115 2018-09-16 Tom Tromey <tom@tromey.com>
1116
1117 * python/python-internal.h (thread_to_thread_object): Change
1118 return type.
1119 * python/py-inferior.c (thread_to_thread_object): Return a new
1120 reference.
1121 (infpy_thread_from_thread_handle): Update.
1122 * python/py-infthread.c (gdbpy_selected_thread): Update.
1123 * python/py-stopevent.c (create_stop_event_object): Update.
1124 * python/py-threadevent.c (py_get_event_thread): Return a new
1125 reference.
1126 (py_get_event_thread): Update.
1127 * python/py-event.h (py_get_event_thread): Change return type.
1128 * python/py-continueevent.c (create_continue_event_object):
1129 Update.
1130
1131 2018-09-16 Tom Tromey <tom@tromey.com>
1132
1133 * python/py-progspace.c (pspy_get_objfiles): Update.
1134 * python/python-internal.h (objfile_to_objfile_object): Change
1135 return type.
1136 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1137 Update.
1138 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1139 Update.
1140 * python/python.c (gdbpy_get_current_objfile): Update.
1141 (gdbpy_objfiles): Update.
1142 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1143 Update.
1144 (objfile_to_objfile_object): Return a new reference.
1145 * python/py-symtab.c (stpy_get_objfile): Update.
1146 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1147 Update.
1148
1149 2018-09-16 Tom Tromey <tom@tromey.com>
1150
1151 * python/py-inferior.c (infpy_get_progspace): Update.
1152 * python/python-internal.h (pspace_to_pspace_object): Change
1153 return type.
1154 * python/py-newobjfileevent.c
1155 (create_clear_objfiles_event_object): Update.
1156 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1157 Update.
1158 * python/python.c (gdbpy_get_current_progspace): Update.
1159 (gdbpy_progspaces): Update.
1160 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1161 reference.
1162 * python/py-objfile.c (objfpy_get_progspace): Update.
1163 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1164 Update.
1165
1166 2018-09-16 Tom Tromey <tom@tromey.com>
1167
1168 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1169 (solib_name, block_for_pc, find_pc_line): New functions.
1170 (execute_unwinders): Update.
1171 * python/py-block.c (gdbpy_block_for_pc): Remove.
1172 * python/py-inferior.c (infpy_get_progspace): New function.
1173 (inferior_object_getset) <progspace>: Add.
1174 * python/py-progspace.c (pspy_objfiles): Rewrite.
1175 (pspy_solib_name, pspy_block_for_pc)
1176 (pspy_find_pc_line, pspy_is_valid): New functions.
1177 (progspace_object_methods): Add entries for solib_name,
1178 block_for_pc, find_pc_line, is_valid.
1179 * python/python-internal.h (gdbpy_block_for_pc)
1180 (build_objfiles_list): Don't declare.
1181 * python/python.c: Don't include solib.h.
1182 (gdbpy_solib_name, gdbpy_find_pc_line)
1183 (gdbpy_get_current_progspace, build_objfiles_list)
1184 (gdbpy_objfiles): Remove.
1185 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1186 solib_name, find_pc_line>: Remove entries.
1187
1188 2018-09-16 Tom Tromey <tom@tromey.com>
1189
1190 * top.c (new_ui_command): Use GNU style for metasyntactic
1191 variables.
1192 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1193 variables.
1194 * maint.c (maintenance_translate_address): Remove "<>" around
1195 text.
1196 * interps.c (interpreter_exec_cmd): Use GNU style for
1197 metasyntactic variables.
1198 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1199 metasyntactic variables.
1200 * tracepoint.c (tfind_range_command): Use GNU style for
1201 metasyntactic variables.
1202 (tfind_outside_command): Likewise.
1203 (_initialize_tracepoint): Likewise.
1204 * remote.c (extended_remote_target::create_inferior): Use GNU
1205 style for metasyntactic variables.
1206 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1207 metasyntactic variables.
1208 (adi_assign_command): Likewise.
1209
1210 2018-09-16 Tom Tromey <tom@tromey.com>
1211
1212 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1213 metasyntactic variables. Print message if no disassembler options
1214 are available.
1215
1216 2018-09-15 Tom Tromey <tom@tromey.com>
1217
1218 * infcmd.c (get_inferior_args): Return const char *.
1219 * inferior.h (get_inferior_args): Return type now const.
1220 * linux-tdep.c (linux_fill_prpsinfo): Update.
1221 * procfs.c (procfs_target::make_corefile_notes): Update.
1222
1223 2018-09-07 Tom Tromey <tom@tromey.com>
1224
1225 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1226 inside the TRY.
1227
1228 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1229
1230 * nios2-tdep.c (nios2_type_align): New.
1231 (nios2_gdb_arch_init): Install type_align hook.
1232
1233 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1234
1235 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1236 type that is neither object file owned, nor gdbarch owned.
1237 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1238 gdbarch is non-NULL.
1239 (alloc_type_instance): Allocate non-objfile owned types on the
1240 gdbarch obstack.
1241 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1242 using TYPE_ALLOC to ensure memory is allocated on the correct
1243 obstack.
1244 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1245 obstack, or the gdbarch obstack.
1246 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1247
1248 2018-09-14 Tom Tromey <tom@tromey.com>
1249
1250 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1251 block.
1252
1253 2018-09-14 Tom Tromey <tom@tromey.com>
1254
1255 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1256
1257 2018-09-13 Tom Tromey <tom@tromey.com>
1258
1259 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1260 static.
1261
1262 2018-09-13 Tom Tromey <tom@tromey.com>
1263
1264 * exec.c (try_open_exec_file): Use std::string.
1265
1266 2018-09-13 Tom Tromey <tom@tromey.com>
1267
1268 * utils.h (gdb_bfd_errmsg): Return std::string.
1269 * exec.c (exec_file_attach): Update.
1270 * compile/compile-object-load.c (compile_object_load): Update.
1271 * utils.c (gdb_bfd_errmsg): Return std::string.
1272
1273 2018-09-13 Tom Tromey <tom@tromey.com>
1274
1275 * procfs.c (struct procinfo_deleter): New.
1276 (procinfo_up): New typedef.
1277 (do_destroy_procinfo_cleanup): Remove.
1278 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1279
1280 2018-09-13 Tom Tromey <tom@tromey.com>
1281
1282 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1283
1284 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1285 2018-09-13 Tom Tromey <tom@tromey.com>
1286
1287 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1288 (pspy_get_objfiles): New function.
1289 (progspace_object_methods): New.
1290 (pspace_object_type): Add tp_methods callback.
1291 * python/python-internal.h (build_objfiles_list): New
1292 declaration.
1293 * python/python.c (build_objfiles_list): New function.
1294 (gdbpy_objfiles): Implement using build_objfiles_list.
1295 * NEWS: Mention the Progspace.objfiles method.
1296
1297 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1298
1299 * python/py-inferior.c (infpy_get_progspace): New function.
1300 (inferior_object_getset): Add progspace property.
1301 * NEWS: Mention the new property.
1302
1303 2018-09-13 Tom Tromey <tom@tromey.com>
1304
1305 PR rust/23650:
1306 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1307
1308 2018-09-13 Tom Tromey <tom@tromey.com>
1309
1310 PR rust/23626:
1311 * rust-lang.c (rust_enum_variant): Now static.
1312 (rust_empty_enum_p): New function.
1313 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1314 Handle empty enum.
1315
1316 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1317
1318 * python/py-inferior.c (infpy_repr): New.
1319 (inferior_object_type): Register infpy_repr.
1320 * python/py-objfile.c (objfpy_repr): New.
1321 (objfile_object_type): Register objfpy_repr.
1322
1323 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1324
1325 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1326
1327 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1328
1329 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1330 typo.
1331
1332 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1333
1334 * common/common-utils.c: Don't include '<sys/stat.h>'.
1335 (is_regular_file): Move to...
1336 * common/filestuff.c (is_regular_file): ... here.
1337 * common/common-utils.h (is_regular_file): Move to...
1338 * common/filestuff.h (is_regular_file): ... here.
1339
1340 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1341
1342 * skip.c (debug_skip): New variable.
1343 (skiplist_entry::do_skip_file_p): Add debug output.
1344 (skiplist_entry::do_skip_gfile_p): Likewise.
1345 (skiplist_entry::skip_function_p): Likewise.
1346 (_initialize_step_skip): Create debug command.
1347 * NEWS: Mention set/show debug skip.
1348
1349 2018-09-11 Xavier Roirand <roirand@adacore.com>
1350
1351 * darwin-nat.c (should_disable_startup_with_shell):
1352 New function.
1353 (darwin_nat_target::create_inferior): Add call.
1354
1355 2018-09-11 Xavier Roirand <roirand@adacore.com>
1356
1357 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1358 inf_port, msg_state>: Initialize.
1359 (struct darwin_thread_info) <signaled, single_step>: Change
1360 type and initialize.
1361 (struct darwin_thread_info) <event>: Initialize.
1362
1363 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1364
1365 PR gdb/23555
1366 PR gdb/23558
1367 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1368 guesses.
1369
1370 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1371
1372 Revert:
1373 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1374
1375 PR gdb/23555
1376 PR gdb/23558
1377 * gnulib/aclocal.m4: Regenerate.
1378 * gnulib/config.in: Regenerate.
1379 * gnulib/configure: Regenerate.
1380 * gnulib/import/Makefile.am: Update.
1381 * gnulib/import/Makefile.in: Update.
1382 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1383 * gnulib/import/_Noreturn.h: ... this.
1384 * gnulib/import/alloca.in.h: Update.
1385 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1386 * gnulib/import/arg-nonnull.h: ... this.
1387 * gnulib/import/assure.h: Update.
1388 * gnulib/import/at-func.c: Update.
1389 * gnulib/import/basename-lgpl.c: Update.
1390 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1391 * gnulib/import/c++defs.h: ... this.
1392 * gnulib/import/canonicalize-lgpl.c: Update.
1393 * gnulib/import/cdefs.h: Update.
1394 * gnulib/import/chdir-long.c: Update.
1395 * gnulib/import/chdir-long.h: Update.
1396 * gnulib/import/cloexec.c: Update.
1397 * gnulib/import/cloexec.h: Update.
1398 * gnulib/import/close.c: Update.
1399 * gnulib/import/closedir.c: Update.
1400 * gnulib/import/config.charset: Update.
1401 * gnulib/import/dirent-private.h: Update.
1402 * gnulib/import/dirent.in.h: Update.
1403 * gnulib/import/dirfd.c: Update.
1404 * gnulib/import/dirname-lgpl.c: Update.
1405 * gnulib/import/dirname.h: Update.
1406 * gnulib/import/dosname.h: Update.
1407 * gnulib/import/dup-safer-flag.c: Update.
1408 * gnulib/import/dup-safer.c: Update.
1409 * gnulib/import/dup.c: Update.
1410 * gnulib/import/dup2.c: Update.
1411 * gnulib/import/errno.in.h: Update.
1412 * gnulib/import/error.c: Update.
1413 * gnulib/import/error.h: Update.
1414 * gnulib/import/exitfail.c: Update.
1415 * gnulib/import/exitfail.h: Update.
1416 * gnulib/import/extra/update-copyright: Update.
1417 * gnulib/import/fchdir.c: Update.
1418 * gnulib/import/fcntl.c: Update.
1419 * gnulib/import/fcntl.in.h: Update.
1420 * gnulib/import/fd-hook.c: Update.
1421 * gnulib/import/fd-hook.h: Update.
1422 * gnulib/import/fd-safer-flag.c: Update.
1423 * gnulib/import/fd-safer.c: Update.
1424 * gnulib/import/fdopendir.c: Update.
1425 * gnulib/import/filename.h: Update.
1426 * gnulib/import/filenamecat-lgpl.c: Update.
1427 * gnulib/import/filenamecat.h: Update.
1428 * gnulib/import/flexmember.h: Update.
1429 * gnulib/import/float+.h: Update.
1430 * gnulib/import/float.c: Update.
1431 * gnulib/import/float.in.h: Update.
1432 * gnulib/import/fnmatch.c: Update.
1433 * gnulib/import/fnmatch.in.h: Update.
1434 * gnulib/import/fnmatch_loop.c: Update.
1435 * gnulib/import/fpucw.h: Update.
1436 * gnulib/import/frexp.c: Update.
1437 * gnulib/import/frexpl.c: Update.
1438 * gnulib/import/fstat.c: Update.
1439 * gnulib/import/fstatat.c: Update.
1440 * gnulib/import/getcwd-lgpl.c: Update.
1441 * gnulib/import/getcwd.c: Update.
1442 * gnulib/import/getdtablesize.c: Update.
1443 * gnulib/import/getlogin_r.c: Update.
1444 * gnulib/import/getprogname.c: Update.
1445 * gnulib/import/getprogname.h: Update.
1446 * gnulib/import/gettext.h: Update.
1447 * gnulib/import/gettimeofday.c: Update.
1448 * gnulib/import/glob-libc.h: Update.
1449 * gnulib/import/glob.c: Update.
1450 * gnulib/import/glob.in.h: Update.
1451 * gnulib/import/glob_internal.h: Update.
1452 * gnulib/import/glob_pattern_p.c: Update.
1453 * gnulib/import/globfree.c: Update.
1454 * gnulib/import/hard-locale.c: Update.
1455 * gnulib/import/hard-locale.h: Update.
1456 * gnulib/import/intprops.h: Update.
1457 * gnulib/import/inttypes.in.h: Update.
1458 * gnulib/import/isnan.c: Update.
1459 * gnulib/import/isnand-nolibm.h: Update.
1460 * gnulib/import/isnand.c: Update.
1461 * gnulib/import/isnanl-nolibm.h: Update.
1462 * gnulib/import/isnanl.c: Update.
1463 * gnulib/import/itold.c: Update.
1464 * gnulib/import/libc-config.h: Update.
1465 * gnulib/import/limits.in.h: Update.
1466 * gnulib/import/localcharset.c: Update.
1467 * gnulib/import/localcharset.h: Update.
1468 * gnulib/import/localtime-buffer.c: Update.
1469 * gnulib/import/localtime-buffer.h: Update.
1470 * gnulib/import/lstat.c: Update.
1471 * gnulib/import/m4/00gnulib.m4: Update.
1472 * gnulib/import/m4/__inline.m4: Update.
1473 * gnulib/import/m4/absolute-header.m4: Update.
1474 * gnulib/import/m4/alloca.m4: Update.
1475 * gnulib/import/m4/builtin-expect.m4: Update.
1476 * gnulib/import/m4/canonicalize.m4: Update.
1477 * gnulib/import/m4/chdir-long.m4: Update.
1478 * gnulib/import/m4/close.m4: Update.
1479 * gnulib/import/m4/closedir.m4: Update.
1480 * gnulib/import/m4/configmake.m4: Update.
1481 * gnulib/import/m4/d-ino.m4: Update.
1482 * gnulib/import/m4/d-type.m4: Update.
1483 * gnulib/import/m4/dirent_h.m4: Update.
1484 * gnulib/import/m4/dirfd.m4: Update.
1485 * gnulib/import/m4/dirname.m4: Update.
1486 * gnulib/import/m4/double-slash-root.m4: Update.
1487 * gnulib/import/m4/dup.m4: Update.
1488 * gnulib/import/m4/dup2.m4: Update.
1489 * gnulib/import/m4/eealloc.m4: Update.
1490 * gnulib/import/m4/environ.m4: Update.
1491 * gnulib/import/m4/errno_h.m4: Update.
1492 * gnulib/import/m4/error.m4: Update.
1493 * gnulib/import/m4/exponentd.m4: Update.
1494 * gnulib/import/m4/exponentl.m4: Update.
1495 * gnulib/import/m4/extensions.m4: Update.
1496 * gnulib/import/m4/extern-inline.m4: Update.
1497 * gnulib/import/m4/fchdir.m4: Update.
1498 * gnulib/import/m4/fcntl-o.m4: Update.
1499 * gnulib/import/m4/fcntl.m4: Update.
1500 * gnulib/import/m4/fcntl_h.m4: Update.
1501 * gnulib/import/m4/fdopendir.m4: Update.
1502 * gnulib/import/m4/filenamecat.m4: Update.
1503 * gnulib/import/m4/flexmember.m4: Update.
1504 * gnulib/import/m4/float_h.m4: Update.
1505 * gnulib/import/m4/fnmatch.m4: Update.
1506 * gnulib/import/m4/fnmatch_h.m4: Update.
1507 * gnulib/import/m4/fpieee.m4: Update.
1508 * gnulib/import/m4/frexp.m4: Update.
1509 * gnulib/import/m4/frexpl.m4: Update.
1510 * gnulib/import/m4/fstat.m4: Update.
1511 * gnulib/import/m4/fstatat.m4: Update.
1512 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1513 * gnulib/import/m4/getcwd-path-max.m4: Update.
1514 * gnulib/import/m4/getcwd.m4: Update.
1515 * gnulib/import/m4/getdtablesize.m4: Update.
1516 * gnulib/import/m4/getlogin.m4: Update.
1517 * gnulib/import/m4/getlogin_r.m4: Update.
1518 * gnulib/import/m4/getpagesize.m4: Update.
1519 * gnulib/import/m4/getprogname.m4: Update.
1520 * gnulib/import/m4/gettimeofday.m4: Update.
1521 * gnulib/import/m4/glibc21.m4: Update.
1522 * gnulib/import/m4/glob.m4: Update.
1523 * gnulib/import/m4/glob_h.m4: Update.
1524 * gnulib/import/m4/gnulib-cache.m4: Update.
1525 * gnulib/import/m4/gnulib-common.m4: Update.
1526 * gnulib/import/m4/gnulib-comp.m4: Update.
1527 * gnulib/import/m4/gnulib-tool.m4: Update.
1528 * gnulib/import/m4/hard-locale.m4: Update.
1529 * gnulib/import/m4/include_next.m4: Update.
1530 * gnulib/import/m4/inttypes-pri.m4: Update.
1531 * gnulib/import/m4/inttypes.m4: Update.
1532 * gnulib/import/m4/isnand.m4: Update.
1533 * gnulib/import/m4/isnanl.m4: Update.
1534 * gnulib/import/m4/largefile.m4: Update.
1535 * gnulib/import/m4/limits-h.m4: Update.
1536 * gnulib/import/m4/localcharset.m4: Update.
1537 * gnulib/import/m4/locale-fr.m4: Update.
1538 * gnulib/import/m4/locale-ja.m4: Update.
1539 * gnulib/import/m4/locale-zh.m4: Update.
1540 * gnulib/import/m4/localtime-buffer.m4: Update.
1541 * gnulib/import/m4/longlong.m4: Update.
1542 * gnulib/import/m4/lstat.m4: Update.
1543 * gnulib/import/m4/malloc.m4: Update.
1544 * gnulib/import/m4/malloca.m4: Update.
1545 * gnulib/import/m4/math_h.m4: Update.
1546 * gnulib/import/m4/mbrtowc.m4: Update.
1547 * gnulib/import/m4/mbsinit.m4: Update.
1548 * gnulib/import/m4/mbsrtowcs.m4: Update.
1549 * gnulib/import/m4/mbstate_t.m4: Update.
1550 * gnulib/import/m4/memchr.m4: Update.
1551 * gnulib/import/m4/memmem.m4: Update.
1552 * gnulib/import/m4/mempcpy.m4: Update.
1553 * gnulib/import/m4/memrchr.m4: Update.
1554 * gnulib/import/m4/mkdir.m4: Update.
1555 * gnulib/import/m4/mkstemp.m4: Update.
1556 * gnulib/import/m4/mmap-anon.m4: Update.
1557 * gnulib/import/m4/mode_t.m4: Update.
1558 * gnulib/import/m4/msvc-inval.m4: Update.
1559 * gnulib/import/m4/msvc-nothrow.m4: Update.
1560 * gnulib/import/m4/multiarch.m4: Update.
1561 * gnulib/import/m4/nocrash.m4: Update.
1562 * gnulib/import/m4/off_t.m4: Update.
1563 * gnulib/import/m4/onceonly.m4: Update.
1564 * gnulib/import/m4/open-cloexec.m4: Update.
1565 * gnulib/import/m4/open.m4: Update.
1566 * gnulib/import/m4/openat.m4: Update.
1567 * gnulib/import/m4/opendir.m4: Update.
1568 * gnulib/import/m4/pathmax.m4: Update.
1569 * gnulib/import/m4/rawmemchr.m4: Update.
1570 * gnulib/import/m4/readdir.m4: Update.
1571 * gnulib/import/m4/readlink.m4: Update.
1572 * gnulib/import/m4/realloc.m4: Update.
1573 * gnulib/import/m4/rename.m4: Update.
1574 * gnulib/import/m4/rewinddir.m4: Update.
1575 * gnulib/import/m4/rmdir.m4: Update.
1576 * gnulib/import/m4/save-cwd.m4: Update.
1577 * gnulib/import/m4/secure_getenv.m4: Update.
1578 * gnulib/import/m4/setenv.m4: Update.
1579 * gnulib/import/m4/signal_h.m4: Update.
1580 * gnulib/import/m4/ssize_t.m4: Update.
1581 * gnulib/import/m4/stat-time.m4: Update.
1582 * gnulib/import/m4/stat.m4: Update.
1583 * gnulib/import/m4/std-gnu11.m4: Update.
1584 * gnulib/import/m4/stdbool.m4: Update.
1585 * gnulib/import/m4/stddef_h.m4: Update.
1586 * gnulib/import/m4/stdint.m4: Update.
1587 * gnulib/import/m4/stdio_h.m4: Update.
1588 * gnulib/import/m4/stdlib_h.m4: Update.
1589 * gnulib/import/m4/strchrnul.m4: Update.
1590 * gnulib/import/m4/strdup.m4: Update.
1591 * gnulib/import/m4/strerror.m4: Update.
1592 * gnulib/import/m4/string_h.m4: Update.
1593 * gnulib/import/m4/strstr.m4: Update.
1594 * gnulib/import/m4/strtok_r.m4: Update.
1595 * gnulib/import/m4/sys_socket_h.m4: Update.
1596 * gnulib/import/m4/sys_stat_h.m4: Update.
1597 * gnulib/import/m4/sys_time_h.m4: Update.
1598 * gnulib/import/m4/sys_types_h.m4: Update.
1599 * gnulib/import/m4/tempname.m4: Update.
1600 * gnulib/import/m4/time_h.m4: Update.
1601 * gnulib/import/m4/unistd-safer.m4: Update.
1602 * gnulib/import/m4/unistd_h.m4: Update.
1603 * gnulib/import/m4/warn-on-use.m4: Update.
1604 * gnulib/import/m4/wchar_h.m4: Update.
1605 * gnulib/import/m4/wchar_t.m4: Update.
1606 * gnulib/import/m4/wctype_h.m4: Update.
1607 * gnulib/import/m4/wint_t.m4: Update.
1608 * gnulib/import/malloc.c: Update.
1609 * gnulib/import/malloc/scratch_buffer.h: Update.
1610 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1611 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1612 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1613 * gnulib/import/malloca.c: Update.
1614 * gnulib/import/malloca.h: Update.
1615 * gnulib/import/malloca.valgrind: Update.
1616 * gnulib/import/math.in.h: Update.
1617 * gnulib/import/mbrtowc.c: Update.
1618 * gnulib/import/mbsinit.c: Update.
1619 * gnulib/import/mbsrtowcs-impl.h: Update.
1620 * gnulib/import/mbsrtowcs-state.c: Update.
1621 * gnulib/import/mbsrtowcs.c: Update.
1622 * gnulib/import/memchr.c: Update.
1623 * gnulib/import/memmem.c: Update.
1624 * gnulib/import/mempcpy.c: Update.
1625 * gnulib/import/memrchr.c: Update.
1626 * gnulib/import/mkdir.c: Update.
1627 * gnulib/import/mkstemp.c: Update.
1628 * gnulib/import/msvc-inval.c: Update.
1629 * gnulib/import/msvc-inval.h: Update.
1630 * gnulib/import/msvc-nothrow.c: Update.
1631 * gnulib/import/msvc-nothrow.h: Update.
1632 * gnulib/import/open.c: Update.
1633 * gnulib/import/openat-die.c: Update.
1634 * gnulib/import/openat-priv.h: Update.
1635 * gnulib/import/openat-proc.c: Update.
1636 * gnulib/import/openat.c: Update.
1637 * gnulib/import/openat.h: Update.
1638 * gnulib/import/opendir.c: Update.
1639 * gnulib/import/pathmax.h: Update.
1640 * gnulib/import/pipe-safer.c: Update.
1641 * gnulib/import/rawmemchr.c: Update.
1642 * gnulib/import/readdir.c: Update.
1643 * gnulib/import/readlink.c: Update.
1644 * gnulib/import/realloc.c: Update.
1645 * gnulib/import/ref-add.sin: Update.
1646 * gnulib/import/ref-del.sin: Update.
1647 * gnulib/import/rename.c: Update.
1648 * gnulib/import/rewinddir.c: Update.
1649 * gnulib/import/rmdir.c: Update.
1650 * gnulib/import/same-inode.h: Update.
1651 * gnulib/import/save-cwd.c: Update.
1652 * gnulib/import/save-cwd.h: Update.
1653 * gnulib/import/scratch_buffer.h: Update.
1654 * gnulib/import/secure_getenv.c: Update.
1655 * gnulib/import/setenv.c: Update.
1656 * gnulib/import/signal.in.h: Update.
1657 * gnulib/import/stat-time.c: Update.
1658 * gnulib/import/stat-time.h: Update.
1659 * gnulib/import/stat-w32.c: Update.
1660 * gnulib/import/stat-w32.h: Update.
1661 * gnulib/import/stat.c: Update.
1662 * gnulib/import/stdbool.in.h: Update.
1663 * gnulib/import/stddef.in.h: Update.
1664 * gnulib/import/stdint.in.h: Update.
1665 * gnulib/import/stdio.in.h: Update.
1666 * gnulib/import/stdlib.in.h: Update.
1667 * gnulib/import/str-two-way.h: Update.
1668 * gnulib/import/strchrnul.c: Update.
1669 * gnulib/import/strdup.c: Update.
1670 * gnulib/import/streq.h: Update.
1671 * gnulib/import/strerror-override.c: Update.
1672 * gnulib/import/strerror-override.h: Update.
1673 * gnulib/import/strerror.c: Update.
1674 * gnulib/import/string.in.h: Update.
1675 * gnulib/import/stripslash.c: Update.
1676 * gnulib/import/strnlen1.c: Update.
1677 * gnulib/import/strnlen1.h: Update.
1678 * gnulib/import/strstr.c: Update.
1679 * gnulib/import/strtok_r.c: Update.
1680 * gnulib/import/sys_stat.in.h: Update.
1681 * gnulib/import/sys_time.in.h: Update.
1682 * gnulib/import/sys_types.in.h: Update.
1683 * gnulib/import/tempname.c: Update.
1684 * gnulib/import/tempname.h: Update.
1685 * gnulib/import/time.in.h: Update.
1686 * gnulib/import/unistd--.h: Update.
1687 * gnulib/import/unistd-safer.h: Update.
1688 * gnulib/import/unistd.in.h: Update.
1689 * gnulib/import/unsetenv.c: Update.
1690 * gnulib/import/verify.h: Update.
1691 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1692 * gnulib/import/wchar.in.h: Update.
1693 * gnulib/import/wctype.in.h: Update.
1694 * gnulib/import/xalloc-oversized.h: Update.
1695 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1696 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1697
1698 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1699
1700 * record-btrace.c (get_thread_current_frame): Remove
1701 old_inferior_ptid.
1702
1703 2018-09-10 Jerome Guitton <guitton@adacore.com>
1704
1705 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1706 with check_tag to 1 if and only if the type is tagged and the
1707 component being searched cannot been found in the current
1708 view. Otherwise, always call ada_to_fixed_type with
1709 check_tag to 0.
1710
1711 2018-09-10 Xavier Roirand <roirand@adacore.com>
1712
1713 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1714 declaration.
1715 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1716 * ada-varobj.c (ada_varobj_get_number_of_children,
1717 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1718
1719 2018-09-10 Xavier Roirand <roirand@adacore.com>
1720
1721 * ada-valprint.c (ada_value_print): Use type instead of
1722 enclosing type.
1723
1724 2018-09-10 Xavier Roirand <roirand@adacore.com>
1725
1726 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1727 an array of access to unconstrained array.
1728
1729 2018-09-10 Xavier Roirand <roirand@adacore.com>
1730
1731 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1732 (ada_check_typedef): Use it.
1733
1734 2018-09-10 Xavier Roirand <roirand@adacore.com>
1735
1736 * ada-varobj.c (ada_varobj_describe_struct_child)
1737 (ada_varobj_describe_child): Handle union case like struct one.
1738
1739 2018-09-10 Tom Tromey <tom@tromey.com>
1740
1741 PR python/18380:
1742 * python/python.c (_initialize_python): Make example in "python"
1743 help work in Python 3.
1744
1745 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1746
1747 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1748 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1749 $(EXEEXT) to the script, as it is not a program.
1750
1751 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1752
1753 * python/py-prettyprint.c (pretty_print_one_value): Return
1754 gdbpy_ref<>.
1755 (print_string_repr): Adjust.
1756 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1757 * python/python-internal.h (apply_varobj_pretty_printer): Return
1758 gdbpy_ref<>.
1759 * varobj.c (varobj_value_get_print_value): Adjust.
1760
1761 2018-09-08 Tom Tromey <tom@tromey.com>
1762
1763 PR python/16047:
1764 * python/py-prettyprint.c (pretty_print_one_value): Check for
1765 to_string method.
1766
1767 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1768
1769 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1770 replace_operator_with_call.
1771
1772 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1773
1774 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1775
1776 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1777
1778 * ada-typeprint.c (print_range): Print the bounds using TYPE
1779 rather than its TYPE_TARGET_TYPE.
1780
1781 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1782
1783 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1784 call to ada_to_fixed_value_create.
1785
1786 2018-09-08 Jerome Guitton <guitton@adacore.com>
1787
1788 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1789
1790 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1791
1792 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1793 by calls to error.
1794
1795 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1796
1797 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1798 Move update of loop variable "fi".
1799
1800 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1801
1802 * ada-lang.c (value_assign_to_component): In the case of
1803 big-endian targets, extract the bits of the given VAL
1804 using an src_offset of zero if container is not a scalar.
1805
1806 2018-09-06 Simon Ser <contact@emersion.fr>
1807
1808 PR gdb/23105
1809 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1810 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1811 * fbsd-tdep.c (fbsd_make_note_desc): New.
1812 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1813 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1814 * target.h (enum target_object) Add FreeBSD-specific
1815 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1816
1817 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * compile/compile-c.h (generate_c_for_variable_locations):
1820 Change reference to pointer.
1821 * compile/compile-c-support.c (compile_program) <compute>:
1822 Likewise.
1823 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1824 (generate_c_for_for_one_variable): Likewise
1825 (generate_c_for_variable_locations): Likewise
1826 * compile/compile-c-types.c (compile_c_instance::convert_type):
1827 Likewise
1828 * compile/compile-cplus-symbols.c (convert_one_symbol):
1829 std::move the scope passed to enter_scope.
1830 * compile/compile-cplus-types.c
1831 (compile_cplus_instance::enter_scope): Make parameter
1832 rvalue-reference.
1833 (compile_cplus_instance::new_scope): Change reference to
1834 pointer.
1835 (compile_cplus_instance::convert_type): Likewise
1836 (compile_cplus_convert_typedef): std::move the scope passed to
1837 enter_scope.
1838 (compile_cplus_convert_struct_or_union): Likewise.
1839 (compile_cplus_convert_enum): Likewise.
1840 (compile_cplus_convert_namespace): Likewise.
1841 * compile/compile-cplus.h (compile_cplus_instance)
1842 <enter_scope>: Make parameter rvalue-reference.
1843 * compile/compile-internal.h (compile_instance)
1844 <get_cached_type>: Likewise
1845 * compile/compile-loc2c.c (push): Likewise
1846 (pushf): Likewise
1847 (unary): Likewise
1848 (binary): Likewise
1849 (print_label): Likewise
1850 (pushf_register_address): Likewise
1851 (pushf_register): Likewise
1852 (do_compile_dwarf_expr_to_c): Likewise
1853 (compile_dwarf_expr_to_c): Likewise
1854 (compile_dwarf_bounds_to_c): Likewise
1855 * compile/compile.c (compile_instance::get_cached_type):
1856 Likewise
1857 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1858 (compile_dwarf_bounds_to_c): Likewise
1859 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1860 (dwarf2_compile_property_to_c): Likewise
1861 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1862 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1863 Likewise
1864
1865 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1866
1867 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1868 * tui/tui-data.c (init_content_element): Don't initialize it.
1869
1870 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
1871
1872 * tui/tui-data.h (struct tui_win_info)
1873 <detail::opaque>: Remove.
1874 * tui/tui-data.c (init_win_info): Remove assignment.
1875
1876 2018-09-05 Tom Tromey <tom@tromey.com>
1877
1878 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1879 -Wformat-nonliteral.
1880 * target-float.c (host_float_ops<T>::to_string)
1881 (host_float_ops<T>::from_string): Use
1882 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1883 * configure: Rebuild.
1884
1885 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
1886
1887 * printcmd.c (printf_c_string): Use
1888 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1889 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1890
1891 2018-09-05 Tom Tromey <tom@tromey.com>
1892
1893 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1894
1895 2018-09-05 Tom de Vries <tdevries@suse.de>
1896
1897 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1898 with resolve_abstract_p == true.
1899 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1900 defaulting to false. Propagate resolve_abstract_p to
1901 dwarf2_fetch_die_loc_sect_off.
1902 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1903 parameter, defaulting to false.
1904 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1905 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1906 parameter.
1907 * dwarf2read.h (struct die_info): Forward-declare.
1908 (die_info_ptr): New typedef.
1909 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1910
1911 2018-09-05 Joel Brobecker <brobecker@adacore.com>
1912
1913 GDB 8.2 released.
1914
1915 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
1916 Pedro Alves <palves@redhat.com>
1917
1918 * gnulib/Makefile.in (aclocal_m4_deps): Move to
1919 "aclocal-m4-deps.mk". Include file here.
1920 $(srcdir)/aclocal.m4: Add "configure.ac".
1921 * gnulib/aclocal-m4-deps.mk: New file.
1922 * gnulib/update-gnulib.sh: Automatically update
1923 "aclocal-m4-deps.mk".
1924
1925 2018-09-04 Tom Tromey <tom@tromey.com>
1926
1927 * configure: Rebuild.
1928 * configure.ac: Remove multi-ice code.
1929
1930 2018-09-04 Tom Tromey <tom@tromey.com>
1931
1932 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1933 (ada-exp.o): Update.
1934
1935 2018-09-04 Tom Tromey <tom@tromey.com>
1936
1937 * Makefile.in (printcmd.o, target-float.o): Remove.
1938 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1939
1940 2018-09-04 Tom Tromey <tom@tromey.com>
1941
1942 * gnulib/Makefile.in: Remove obsolete comment.
1943 * Makefile.in: Remove obsolete comment.
1944
1945 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
1946
1947 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1948 line with '+'.
1949
1950 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1951
1952 * riscv-tdep.c: Add 'prologue-value.h' include.
1953 (struct riscv_unwind_cache): New struct.
1954 (riscv_debug_unwinder): New global.
1955 (riscv_scan_prologue): Update arguments, capture register details
1956 from prologue scan.
1957 (riscv_skip_prologue): Reformat arguments line, move end of
1958 prologue calculation into riscv_scan_prologue.
1959 (riscv_frame_cache): Update return type, create
1960 riscv_unwind_cache, scan the prologue, and fill in remaining cache
1961 details.
1962 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1963 (riscv_frame_prev_register): Use the trad_frame within the
1964 riscv_unwind_cache.
1965 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1966 flag.
1967
1968 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
1969
1970 * trad-frame.h (trad_frame_set_realreg): Declare.
1971 (trad_frame_set_addr): Declare.
1972 * trad-frame.c (trad_frame_set_realreg): Define new function.
1973 (trad_frame_set_addr): Define new function.
1974 (trad_frame_set_reg_realreg): Use new function.
1975 (trad_frame_set_reg_addr): Use new function.
1976
1977 2018-09-01 Keith Seitz <keiths@redhat.com>
1978
1979 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1980 pulongest instead of "%lld".
1981 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1982 ATTRIBUTE_UNUSED.
1983
1984 2018-08-31 Tom Tromey <tom@tromey.com>
1985
1986 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1987 variant part type.
1988
1989 2018-08-31 Pedro Alves <palves@redhat.com>
1990
1991 * gdbarch.h: Regenerate.
1992
1993 2018-08-31 Pedro Alves <palves@redhat.com>
1994
1995 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1996 * target.h (Hardware watchpoint interfaces): Describe
1997 continuable/steppable/non-steppable watchpoints.
1998 * gdbarch.h, gdbarch.c: Regenerate.
1999
2000 2018-08-31 Pedro Alves <palves@redhat.com>
2001
2002 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2003 Delete.
2004 * s390-linux-nat.c
2005 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2006 * target.h (target_ops::have_continuable_watchpoint): Delete.
2007 (target_have_continuable_watchpoint): Delete.
2008 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2009 * target-delegates.c: Regenerate.
2010
2011 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2012
2013 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2014 the files present in "gnulib/import/m4/".
2015
2016 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2017
2018 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2019 c.sw, c.swsp, and c.sdsp.
2020
2021 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2022
2023 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2024 (riscv_read_misa_reg): Don't cache value read into inferior data.
2025 (riscv_new_inferior_data): Delete.
2026 (riscv_inferior_data_cleanup): Delete.
2027 (riscv_inferior_data): Delete.
2028 (riscv_invalidate_inferior_data): Delete.
2029 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2030
2031 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2032
2033 * compile/compile-cplus-types.c
2034 (compile_cplus_instance::leave_scope): Take the address of scope
2035 object.
2036 (compile_cplus_instance::convert_qualified_base): Compare quals
2037 to 0.
2038
2039 2018-08-30 Keith Seitz <keiths@redhat.com>
2040
2041 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2042 Use "%s" and host_address_to_string instead of "%p" in printf.
2043
2044 2018-08-29 Keith Seitz <keiths@redhat.com>
2045
2046 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2047 and compile-cplus-types.c.
2048 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2049 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2050 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2051 Declare.
2052 * compile/compile-c-support.c: Include compile-cplus.h.
2053 (load_libcompile): Templatize.
2054 (get_compile_context): "New" function.
2055 (c_get_compile_context): Use get_compile_context.
2056 (cplus_get_compile_context): New function.
2057 (cplus_push_user_expression, cplus_pop_user_expression)
2058 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2059 (cplus_compute_program): Define new structs/functions.
2060 * compile/compile-cplus-symmbols.c: New file.
2061 * compile/compile-cplus-types.c: New file.
2062 * compile/compile-cplus.h: New file.
2063 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2064 Declare.
2065 * compile/compile-object-load.c (get_out_value_type): Use
2066 strncmp_iw when comparing symbol names.
2067 (compile_object_load): Add mst_bss and mst_data.
2068 * compile/compile.c (_initialize_compile): Remove
2069 -Wno-implicit-function-declaration from `compile_args'.
2070 * compile/gcc-cp-plugin.h: New file.
2071 * NEWS: Mention C++ compile support and new debug options.
2072
2073 2018-08-29 Keith Seitz <keiths@redhat.com>
2074
2075 * linespec.c (collect_info::add_symbol): Make virtual.
2076 (struct symbol_searcher_collect_info): New struct.
2077 (symbol_searcher::find_all_symbols): New method.
2078 * symtab.h (class symbol_searcher): New class.
2079
2080 2018-08-29 Keith Seitz <keiths@redhat.com>
2081
2082 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2083 Change to vector of block_symbol. Update all users.
2084 (struct collect_info) <symbols>: Likewise.
2085 (collect_info::add_symbol): Take block_symbol as argument.
2086 Update all callers.
2087 (decode_compound_collector) <m_symbols>: Change type to vector
2088 of block_symbol. Update all users.
2089 (decode_compound_collector::operator ()): Change parameter type
2090 to block_symbol.
2091 (find_method, find_function_symbols, find_linespec_symbols)
2092 (find_label_symbols_in_block, find_label_symbols): Change symbol
2093 vectors to block_symbol vectors.
2094 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2095 block_symbol.
2096
2097 2018-08-29 Keith Seitz <keiths@redhat.com>
2098
2099 * linespec.c (symbolp): Remove typedef and VEC definitions.
2100 (bound_minimal_symbol_d): Likewise.
2101
2102 2018-08-29 Keith Seitz <keiths@redhat.com>
2103
2104 * linespec.c (decode_compound_collector::decode_compound_collector):
2105 Remove initialization for `m_symtabs'.
2106 (decode_compound_collector::release_symbols): Change return type
2107 to std::vector. Update all callers.
2108 (class decode_compound_collector) <m_symbols>: Change type to
2109 std::vector.
2110 (lookup_prefix_sym): Change return type to std::vector. Update all
2111 callers.
2112 (compare_symbols): Remove.
2113 (std_compare_symbols): Rename to `compare_symbols'.
2114 (find_method): Change `sym_classes' parameter to std::vector.
2115 Update all callers. Use std::sort to sort sym_classes.
2116 (find_linespec_symbols): Remove cleanup.
2117
2118 2018-08-29 Keith Seitz <keiths@redhat.com>
2119
2120 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2121 std::vector. Update all users.
2122 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2123 (struct collect_info) <minimal_symbols>: Likewise.
2124 (compare_msymbols): Return bool. Change parameters to const
2125 bound_minimal_symbol references.
2126 (find_method, find_function_symbols, find_linespec_symbols): Change
2127 `minsyms' parameter to std::vector. Update all callers.
2128
2129 2018-08-29 Keith Seitz <keiths@redhat.com>
2130
2131 * linespec.c (struct linespec) <label_symbols>: Change type to
2132 std::vector. Update all users.
2133 (find_label_symbols_in_block): Change `result' parameter to
2134 std::vector. Update all callers.
2135 (find_label_symbols): Return std::vector. Update all callers.
2136
2137 2018-08-29 Keith Seitz <keiths@redhat.com>
2138
2139 * linespec.c (struct linespec) <function_symbols>: Change type to
2140 std::vector. Update all users.
2141 (struct collect_info) <function_symbols>: Likewise.
2142 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2143 (std_compare_symbols): New function.
2144 (find_method, find_function_symbols, find_linespec_symbols)
2145 (find_label_symbols_in_block): Change `symbols' parameter to
2146 std::vector. Update all callers.
2147 (find_label_symbols): Likewise for `function_symbols' and
2148 `label_funcs_ret'.
2149
2150 2018-08-29 Keith Seitz <keiths@redhat.com>
2151
2152 * linespec.c (symtab_vector_up): Define.
2153 (struct linespec) <file_symtabs>: Change type to std::vector *.
2154 Update all uses.
2155 (struct collect_info) <file_symtabs>: Likewise.
2156 (collect_symtabs_from_filename): Return symtab_vector_up.
2157 Update all callers.
2158 (decode_objc): Remove cleanup.
2159 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2160 (symtab_collector::release_symtabs): Return symtab_vector_up.
2161 Update all callers.
2162 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2163 Update all users.
2164 (collect_symtabs_from_filename, symtabs_from_filename): Return
2165 symtab_vector_up. Update all callers.
2166
2167 2018-08-29 Tom Tromey <tom@tromey.com>
2168
2169 * csky-tdep.c (csky_analyze_prologue): Use
2170 core_addr_to_string_nz.
2171
2172 2018-08-29 Tom Tromey <tom@tromey.com>
2173
2174 * windows-nat.c (struct xlate_exception) <them>: Change type to
2175 DWORD.
2176 (xlate): Fix formatting. Remove last entry.
2177 (struct xlate_exception, xlate): Comment out.
2178 (windows_nat_target::resume): Use ranged for.
2179
2180 2018-08-29 Jim Wilson <jimw@sifive.com>
2181
2182 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2183 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2184 of NT_PRFPREG.
2185 (riscv_linux_nat_target::store_registers): Likewise.
2186
2187 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2188
2189 PR gdb/23555
2190 PR gdb/23558
2191 * gnulib/aclocal.m4: Regenerate.
2192 * gnulib/config.in: Regenerate.
2193 * gnulib/configure: Regenerate.
2194 * gnulib/import/Makefile.am: Update.
2195 * gnulib/import/Makefile.in: Update.
2196 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2197 * gnulib/import/_Noreturn.h: ... this.
2198 * gnulib/import/alloca.in.h: Update.
2199 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2200 * gnulib/import/arg-nonnull.h: ... this.
2201 * gnulib/import/assure.h: Update.
2202 * gnulib/import/at-func.c: Update.
2203 * gnulib/import/basename-lgpl.c: Update.
2204 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2205 * gnulib/import/c++defs.h: ... this.
2206 * gnulib/import/canonicalize-lgpl.c: Update.
2207 * gnulib/import/cdefs.h: Update.
2208 * gnulib/import/chdir-long.c: Update.
2209 * gnulib/import/chdir-long.h: Update.
2210 * gnulib/import/cloexec.c: Update.
2211 * gnulib/import/cloexec.h: Update.
2212 * gnulib/import/close.c: Update.
2213 * gnulib/import/closedir.c: Update.
2214 * gnulib/import/config.charset: Update.
2215 * gnulib/import/dirent-private.h: Update.
2216 * gnulib/import/dirent.in.h: Update.
2217 * gnulib/import/dirfd.c: Update.
2218 * gnulib/import/dirname-lgpl.c: Update.
2219 * gnulib/import/dirname.h: Update.
2220 * gnulib/import/dosname.h: Update.
2221 * gnulib/import/dup-safer-flag.c: Update.
2222 * gnulib/import/dup-safer.c: Update.
2223 * gnulib/import/dup.c: Update.
2224 * gnulib/import/dup2.c: Update.
2225 * gnulib/import/errno.in.h: Update.
2226 * gnulib/import/error.c: Update.
2227 * gnulib/import/error.h: Update.
2228 * gnulib/import/exitfail.c: Update.
2229 * gnulib/import/exitfail.h: Update.
2230 * gnulib/import/extra/update-copyright: Update.
2231 * gnulib/import/fchdir.c: Update.
2232 * gnulib/import/fcntl.c: Update.
2233 * gnulib/import/fcntl.in.h: Update.
2234 * gnulib/import/fd-hook.c: Update.
2235 * gnulib/import/fd-hook.h: Update.
2236 * gnulib/import/fd-safer-flag.c: Update.
2237 * gnulib/import/fd-safer.c: Update.
2238 * gnulib/import/fdopendir.c: Update.
2239 * gnulib/import/filename.h: Update.
2240 * gnulib/import/filenamecat-lgpl.c: Update.
2241 * gnulib/import/filenamecat.h: Update.
2242 * gnulib/import/flexmember.h: Update.
2243 * gnulib/import/float+.h: Update.
2244 * gnulib/import/float.c: Update.
2245 * gnulib/import/float.in.h: Update.
2246 * gnulib/import/fnmatch.c: Update.
2247 * gnulib/import/fnmatch.in.h: Update.
2248 * gnulib/import/fnmatch_loop.c: Update.
2249 * gnulib/import/fpucw.h: Update.
2250 * gnulib/import/frexp.c: Update.
2251 * gnulib/import/frexpl.c: Update.
2252 * gnulib/import/fstat.c: Update.
2253 * gnulib/import/fstatat.c: Update.
2254 * gnulib/import/getcwd-lgpl.c: Update.
2255 * gnulib/import/getcwd.c: Update.
2256 * gnulib/import/getdtablesize.c: Update.
2257 * gnulib/import/getlogin_r.c: Update.
2258 * gnulib/import/getprogname.c: Update.
2259 * gnulib/import/getprogname.h: Update.
2260 * gnulib/import/gettext.h: Update.
2261 * gnulib/import/gettimeofday.c: Update.
2262 * gnulib/import/glob-libc.h: Update.
2263 * gnulib/import/glob.c: Update.
2264 * gnulib/import/glob.in.h: Update.
2265 * gnulib/import/glob_internal.h: Update.
2266 * gnulib/import/glob_pattern_p.c: Update.
2267 * gnulib/import/globfree.c: Update.
2268 * gnulib/import/hard-locale.c: Update.
2269 * gnulib/import/hard-locale.h: Update.
2270 * gnulib/import/intprops.h: Update.
2271 * gnulib/import/inttypes.in.h: Update.
2272 * gnulib/import/isnan.c: Update.
2273 * gnulib/import/isnand-nolibm.h: Update.
2274 * gnulib/import/isnand.c: Update.
2275 * gnulib/import/isnanl-nolibm.h: Update.
2276 * gnulib/import/isnanl.c: Update.
2277 * gnulib/import/itold.c: Update.
2278 * gnulib/import/libc-config.h: Update.
2279 * gnulib/import/limits.in.h: Update.
2280 * gnulib/import/localcharset.c: Update.
2281 * gnulib/import/localcharset.h: Update.
2282 * gnulib/import/localtime-buffer.c: Update.
2283 * gnulib/import/localtime-buffer.h: Update.
2284 * gnulib/import/lstat.c: Update.
2285 * gnulib/import/m4/00gnulib.m4: Update.
2286 * gnulib/import/m4/__inline.m4: Update.
2287 * gnulib/import/m4/absolute-header.m4: Update.
2288 * gnulib/import/m4/alloca.m4: Update.
2289 * gnulib/import/m4/builtin-expect.m4: Update.
2290 * gnulib/import/m4/canonicalize.m4: Update.
2291 * gnulib/import/m4/chdir-long.m4: Update.
2292 * gnulib/import/m4/close.m4: Update.
2293 * gnulib/import/m4/closedir.m4: Update.
2294 * gnulib/import/m4/configmake.m4: Update.
2295 * gnulib/import/m4/d-ino.m4: Update.
2296 * gnulib/import/m4/d-type.m4: Update.
2297 * gnulib/import/m4/dirent_h.m4: Update.
2298 * gnulib/import/m4/dirfd.m4: Update.
2299 * gnulib/import/m4/dirname.m4: Update.
2300 * gnulib/import/m4/double-slash-root.m4: Update.
2301 * gnulib/import/m4/dup.m4: Update.
2302 * gnulib/import/m4/dup2.m4: Update.
2303 * gnulib/import/m4/eealloc.m4: Update.
2304 * gnulib/import/m4/environ.m4: Update.
2305 * gnulib/import/m4/errno_h.m4: Update.
2306 * gnulib/import/m4/error.m4: Update.
2307 * gnulib/import/m4/exponentd.m4: Update.
2308 * gnulib/import/m4/exponentl.m4: Update.
2309 * gnulib/import/m4/extensions.m4: Update.
2310 * gnulib/import/m4/extern-inline.m4: Update.
2311 * gnulib/import/m4/fchdir.m4: Update.
2312 * gnulib/import/m4/fcntl-o.m4: Update.
2313 * gnulib/import/m4/fcntl.m4: Update.
2314 * gnulib/import/m4/fcntl_h.m4: Update.
2315 * gnulib/import/m4/fdopendir.m4: Update.
2316 * gnulib/import/m4/filenamecat.m4: Update.
2317 * gnulib/import/m4/flexmember.m4: Update.
2318 * gnulib/import/m4/float_h.m4: Update.
2319 * gnulib/import/m4/fnmatch.m4: Update.
2320 * gnulib/import/m4/fnmatch_h.m4: Update.
2321 * gnulib/import/m4/fpieee.m4: Update.
2322 * gnulib/import/m4/frexp.m4: Update.
2323 * gnulib/import/m4/frexpl.m4: Update.
2324 * gnulib/import/m4/fstat.m4: Update.
2325 * gnulib/import/m4/fstatat.m4: Update.
2326 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2327 * gnulib/import/m4/getcwd-path-max.m4: Update.
2328 * gnulib/import/m4/getcwd.m4: Update.
2329 * gnulib/import/m4/getdtablesize.m4: Update.
2330 * gnulib/import/m4/getlogin.m4: Update.
2331 * gnulib/import/m4/getlogin_r.m4: Update.
2332 * gnulib/import/m4/getpagesize.m4: Update.
2333 * gnulib/import/m4/getprogname.m4: Update.
2334 * gnulib/import/m4/gettimeofday.m4: Update.
2335 * gnulib/import/m4/glibc21.m4: Update.
2336 * gnulib/import/m4/glob.m4: Update.
2337 * gnulib/import/m4/glob_h.m4: Update.
2338 * gnulib/import/m4/gnulib-cache.m4: Update.
2339 * gnulib/import/m4/gnulib-common.m4: Update.
2340 * gnulib/import/m4/gnulib-comp.m4: Update.
2341 * gnulib/import/m4/gnulib-tool.m4: Update.
2342 * gnulib/import/m4/hard-locale.m4: Update.
2343 * gnulib/import/m4/include_next.m4: Update.
2344 * gnulib/import/m4/inttypes-pri.m4: Update.
2345 * gnulib/import/m4/inttypes.m4: Update.
2346 * gnulib/import/m4/isnand.m4: Update.
2347 * gnulib/import/m4/isnanl.m4: Update.
2348 * gnulib/import/m4/largefile.m4: Update.
2349 * gnulib/import/m4/limits-h.m4: Update.
2350 * gnulib/import/m4/localcharset.m4: Update.
2351 * gnulib/import/m4/locale-fr.m4: Update.
2352 * gnulib/import/m4/locale-ja.m4: Update.
2353 * gnulib/import/m4/locale-zh.m4: Update.
2354 * gnulib/import/m4/localtime-buffer.m4: Update.
2355 * gnulib/import/m4/longlong.m4: Update.
2356 * gnulib/import/m4/lstat.m4: Update.
2357 * gnulib/import/m4/malloc.m4: Update.
2358 * gnulib/import/m4/malloca.m4: Update.
2359 * gnulib/import/m4/math_h.m4: Update.
2360 * gnulib/import/m4/mbrtowc.m4: Update.
2361 * gnulib/import/m4/mbsinit.m4: Update.
2362 * gnulib/import/m4/mbsrtowcs.m4: Update.
2363 * gnulib/import/m4/mbstate_t.m4: Update.
2364 * gnulib/import/m4/memchr.m4: Update.
2365 * gnulib/import/m4/memmem.m4: Update.
2366 * gnulib/import/m4/mempcpy.m4: Update.
2367 * gnulib/import/m4/memrchr.m4: Update.
2368 * gnulib/import/m4/mkdir.m4: Update.
2369 * gnulib/import/m4/mkstemp.m4: Update.
2370 * gnulib/import/m4/mmap-anon.m4: Update.
2371 * gnulib/import/m4/mode_t.m4: Update.
2372 * gnulib/import/m4/msvc-inval.m4: Update.
2373 * gnulib/import/m4/msvc-nothrow.m4: Update.
2374 * gnulib/import/m4/multiarch.m4: Update.
2375 * gnulib/import/m4/nocrash.m4: Update.
2376 * gnulib/import/m4/off_t.m4: Update.
2377 * gnulib/import/m4/onceonly.m4: Update.
2378 * gnulib/import/m4/open-cloexec.m4: Update.
2379 * gnulib/import/m4/open.m4: Update.
2380 * gnulib/import/m4/openat.m4: Update.
2381 * gnulib/import/m4/opendir.m4: Update.
2382 * gnulib/import/m4/pathmax.m4: Update.
2383 * gnulib/import/m4/rawmemchr.m4: Update.
2384 * gnulib/import/m4/readdir.m4: Update.
2385 * gnulib/import/m4/readlink.m4: Update.
2386 * gnulib/import/m4/realloc.m4: Update.
2387 * gnulib/import/m4/rename.m4: Update.
2388 * gnulib/import/m4/rewinddir.m4: Update.
2389 * gnulib/import/m4/rmdir.m4: Update.
2390 * gnulib/import/m4/save-cwd.m4: Update.
2391 * gnulib/import/m4/secure_getenv.m4: Update.
2392 * gnulib/import/m4/setenv.m4: Update.
2393 * gnulib/import/m4/signal_h.m4: Update.
2394 * gnulib/import/m4/ssize_t.m4: Update.
2395 * gnulib/import/m4/stat-time.m4: Update.
2396 * gnulib/import/m4/stat.m4: Update.
2397 * gnulib/import/m4/std-gnu11.m4: Update.
2398 * gnulib/import/m4/stdbool.m4: Update.
2399 * gnulib/import/m4/stddef_h.m4: Update.
2400 * gnulib/import/m4/stdint.m4: Update.
2401 * gnulib/import/m4/stdio_h.m4: Update.
2402 * gnulib/import/m4/stdlib_h.m4: Update.
2403 * gnulib/import/m4/strchrnul.m4: Update.
2404 * gnulib/import/m4/strdup.m4: Update.
2405 * gnulib/import/m4/strerror.m4: Update.
2406 * gnulib/import/m4/string_h.m4: Update.
2407 * gnulib/import/m4/strstr.m4: Update.
2408 * gnulib/import/m4/strtok_r.m4: Update.
2409 * gnulib/import/m4/sys_socket_h.m4: Update.
2410 * gnulib/import/m4/sys_stat_h.m4: Update.
2411 * gnulib/import/m4/sys_time_h.m4: Update.
2412 * gnulib/import/m4/sys_types_h.m4: Update.
2413 * gnulib/import/m4/tempname.m4: Update.
2414 * gnulib/import/m4/time_h.m4: Update.
2415 * gnulib/import/m4/unistd-safer.m4: Update.
2416 * gnulib/import/m4/unistd_h.m4: Update.
2417 * gnulib/import/m4/warn-on-use.m4: Update.
2418 * gnulib/import/m4/wchar_h.m4: Update.
2419 * gnulib/import/m4/wchar_t.m4: Update.
2420 * gnulib/import/m4/wctype_h.m4: Update.
2421 * gnulib/import/m4/wint_t.m4: Update.
2422 * gnulib/import/malloc.c: Update.
2423 * gnulib/import/malloc/scratch_buffer.h: Update.
2424 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2425 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2426 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2427 * gnulib/import/malloca.c: Update.
2428 * gnulib/import/malloca.h: Update.
2429 * gnulib/import/malloca.valgrind: Update.
2430 * gnulib/import/math.in.h: Update.
2431 * gnulib/import/mbrtowc.c: Update.
2432 * gnulib/import/mbsinit.c: Update.
2433 * gnulib/import/mbsrtowcs-impl.h: Update.
2434 * gnulib/import/mbsrtowcs-state.c: Update.
2435 * gnulib/import/mbsrtowcs.c: Update.
2436 * gnulib/import/memchr.c: Update.
2437 * gnulib/import/memmem.c: Update.
2438 * gnulib/import/mempcpy.c: Update.
2439 * gnulib/import/memrchr.c: Update.
2440 * gnulib/import/mkdir.c: Update.
2441 * gnulib/import/mkstemp.c: Update.
2442 * gnulib/import/msvc-inval.c: Update.
2443 * gnulib/import/msvc-inval.h: Update.
2444 * gnulib/import/msvc-nothrow.c: Update.
2445 * gnulib/import/msvc-nothrow.h: Update.
2446 * gnulib/import/open.c: Update.
2447 * gnulib/import/openat-die.c: Update.
2448 * gnulib/import/openat-priv.h: Update.
2449 * gnulib/import/openat-proc.c: Update.
2450 * gnulib/import/openat.c: Update.
2451 * gnulib/import/openat.h: Update.
2452 * gnulib/import/opendir.c: Update.
2453 * gnulib/import/pathmax.h: Update.
2454 * gnulib/import/pipe-safer.c: Update.
2455 * gnulib/import/rawmemchr.c: Update.
2456 * gnulib/import/readdir.c: Update.
2457 * gnulib/import/readlink.c: Update.
2458 * gnulib/import/realloc.c: Update.
2459 * gnulib/import/ref-add.sin: Update.
2460 * gnulib/import/ref-del.sin: Update.
2461 * gnulib/import/rename.c: Update.
2462 * gnulib/import/rewinddir.c: Update.
2463 * gnulib/import/rmdir.c: Update.
2464 * gnulib/import/same-inode.h: Update.
2465 * gnulib/import/save-cwd.c: Update.
2466 * gnulib/import/save-cwd.h: Update.
2467 * gnulib/import/scratch_buffer.h: Update.
2468 * gnulib/import/secure_getenv.c: Update.
2469 * gnulib/import/setenv.c: Update.
2470 * gnulib/import/signal.in.h: Update.
2471 * gnulib/import/stat-time.c: Update.
2472 * gnulib/import/stat-time.h: Update.
2473 * gnulib/import/stat-w32.c: Update.
2474 * gnulib/import/stat-w32.h: Update.
2475 * gnulib/import/stat.c: Update.
2476 * gnulib/import/stdbool.in.h: Update.
2477 * gnulib/import/stddef.in.h: Update.
2478 * gnulib/import/stdint.in.h: Update.
2479 * gnulib/import/stdio.in.h: Update.
2480 * gnulib/import/stdlib.in.h: Update.
2481 * gnulib/import/str-two-way.h: Update.
2482 * gnulib/import/strchrnul.c: Update.
2483 * gnulib/import/strdup.c: Update.
2484 * gnulib/import/streq.h: Update.
2485 * gnulib/import/strerror-override.c: Update.
2486 * gnulib/import/strerror-override.h: Update.
2487 * gnulib/import/strerror.c: Update.
2488 * gnulib/import/string.in.h: Update.
2489 * gnulib/import/stripslash.c: Update.
2490 * gnulib/import/strnlen1.c: Update.
2491 * gnulib/import/strnlen1.h: Update.
2492 * gnulib/import/strstr.c: Update.
2493 * gnulib/import/strtok_r.c: Update.
2494 * gnulib/import/sys_stat.in.h: Update.
2495 * gnulib/import/sys_time.in.h: Update.
2496 * gnulib/import/sys_types.in.h: Update.
2497 * gnulib/import/tempname.c: Update.
2498 * gnulib/import/tempname.h: Update.
2499 * gnulib/import/time.in.h: Update.
2500 * gnulib/import/unistd--.h: Update.
2501 * gnulib/import/unistd-safer.h: Update.
2502 * gnulib/import/unistd.in.h: Update.
2503 * gnulib/import/unsetenv.c: Update.
2504 * gnulib/import/verify.h: Update.
2505 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2506 * gnulib/import/wchar.in.h: Update.
2507 * gnulib/import/wctype.in.h: Update.
2508 * gnulib/import/xalloc-oversized.h: Update.
2509 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2510 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2511
2512 2018-08-16 Gary Benson <gbenson@redhat.com>
2513
2514 PR gdb/13000:
2515 * gdb/main.c (captured_main_1): Exit with nonzero status
2516 in batch mode if the last command to be executed failed.
2517 * NEWS: Mention the above.
2518
2519 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2520
2521 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2522 end of warning message.
2523
2524 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2525
2526 PR gdb/22943:
2527 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2528 (aarch64_extract_return_value): Use
2529 aapcs_is_vfp_call_or_return_candidate.
2530 (aarch64_return_in_memory): Likewise.
2531 (aarch64_store_return_value): Likewise.
2532
2533 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2534
2535 * aarch64-tdep.c
2536 (aapcs_is_vfp_call_or_return_candidate): Make static
2537 (pass_in_v_or_stack): Remove function.
2538 (pass_in_v_vfp_candidate): New function.
2539 (aarch64_push_dummy_call): Check for float register candidates.
2540
2541 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2542
2543 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2544 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2545 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2546
2547 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2548
2549 PR build/23399
2550 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2551 (struct ipa_sym_addresses): Rename to...
2552 (struct ipa_sym_addresses_common): ... this.
2553 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2554
2555 2018-08-28 Tom Tromey <tom@tromey.com>
2556
2557 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2558 (token_fifo): Now a std::vector.
2559 (yylex, c_parse): Update.
2560 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2561 (token_fifo): Now a std::vector.
2562 (yylex, d_parse): Update.
2563 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2564 (token_fifo): Now a std::vector.
2565 (yylex, go_parse): Update.
2566
2567 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2568
2569 * parser-defs.h (struct type_stack) <elements>: Change type to
2570 std::vector<union type_stack_elt>.
2571 <depth, size>: Remove.
2572 * parse.c (parse_exp_in_context_1): Adjust.
2573 (type_stack_reserve): Remove.
2574 (check_type_stack_depth): Remove.
2575 (insert_into_type_stack): Adjust to std::vector.
2576 (insert_type): Likewise.
2577 (push_type): Likewise.
2578 (push_type_int): Likewise.
2579 (insert_type_address_space): Likewise.
2580 (pop_type): Likewise.
2581 (pop_type_int): Likewise.
2582 (pop_typelist): Likewise.
2583 (pop_type_stack): Likewise.
2584 (append_type_stack): Likewise.
2585 (push_type_stack): Likewise.
2586 (get_type_stack): Likewise.
2587 (type_stack_cleanup): Likewise.
2588 (push_typelist): Likewise.
2589 (follow_types): Likewise.
2590 (_initialize_parse): Likewise.
2591
2592 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2593
2594 * NEWS: Mention csky target.
2595
2596 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2597 Hafiz Abid Qadeer <abidh@codesourcery.com>
2598 Don Breazeal <donb@codesourcery.com>
2599
2600 * csky-linux-tdep.c: New file.
2601 * csky-tdep.c: Likewise.
2602 * csky-tdep.h: Likewise.
2603 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2604 csky-tdep.o.
2605 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2606 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2607 * configure.tgt: Add csky support.
2608
2609 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2610
2611 * python/py-framefilter.c (py_print_frame): Print frame architecture
2612 when printing on an MI output.
2613
2614 2018-08-27 Tom Tromey <tom@tromey.com>
2615
2616 PR build/23087:
2617 * configure: Rebuild.
2618 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2619
2620 2018-08-27 Tom Tromey <tom@tromey.com>
2621
2622 * aarch64-linux-tdep.c
2623 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2624 casts to int.
2625
2626 2018-08-27 Tom Tromey <tom@tromey.com>
2627
2628 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2629 unsigned.
2630 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2631 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2632 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2633 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2634 unsigned.
2635
2636 2018-08-27 Tom Tromey <tom@tromey.com>
2637
2638 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2639 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2640
2641 2018-08-27 Tom Tromey <tom@tromey.com>
2642
2643 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2644 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2645 ULONGEST_MAX.
2646 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2647 ULONGEST_MAX.
2648 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2649 ULONGEST_MAX.
2650 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2651 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2652 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2653 ULONGEST_MAX.
2654 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2655 (ppc64_linux_sigaction_tramp_frame)
2656 (ppc32_linux_sighandler_tramp_frame)
2657 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2658 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2659 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2660 * mn10300-linux-tdep.c (am33_linux_sigframe)
2661 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2662 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2663 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2664 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2665 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2666 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2667 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2668 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2669 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2670 * microblaze-linux-tdep.c
2671 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2672 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2673 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2674 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2675 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2676 * common/common-types.h (ULONGEST_MAX): New define.
2677 (CORE_ADDR_MAX): Fix formatting.
2678 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2679 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2680 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2681 (arm_linux_rt_sigreturn_tramp_frame)
2682 (arm_eabi_linux_sigreturn_tramp_frame)
2683 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2684 (thumb2_eabi_linux_sigreturn_tramp_frame)
2685 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2686 (arm_linux_restart_syscall_tramp_frame)
2687 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2688 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2689 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2690 ULONGEST_MAX.
2691 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2692
2693 2018-08-27 Tom Tromey <tom@tromey.com>
2694
2695 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2696 CORE_ADDR_MAX.
2697 * mips-tdep.c (mips_deal_with_atomic_sequence)
2698 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2699 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2700 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2701 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2702 CORE_ADDR_MAX.
2703 * aarch64-tdep.c (aarch64_software_single_step): Use
2704 CORE_ADDR_MAX.
2705
2706 2018-08-27 Tom Tromey <tom@tromey.com>
2707
2708 * linespec.c (complete_linespec_component): Add cast to "char".
2709 * completer.c (completion_tracker::build_completion_result): Add
2710 cast to "char".
2711
2712 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2713
2714 * solist.h (struct solist, struct target_so_ops): Fix
2715 indentation.
2716
2717 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2718
2719 * ada-tasks.c (ada_task_info_s): Remove typedef.
2720 (DEF_VEC_O(ada_task_info_s)): Remove.
2721 (struct ada_tasks_inferior_data): Initialize fields.
2722 <task_list>: Make an std::vector.
2723 (get_ada_tasks_inferior_data): Allocate with new.
2724 (ada_get_task_number): Adjust.
2725 (get_task_number_from_id): Likewise.
2726 (valid_task_id): Likewise.
2727 (ada_get_task_info_from_ptid): Likewise.
2728 (iterate_over_live_ada_tasks): Likewise.
2729 (add_ada_task): Likewise.
2730 (read_known_tasks): Likewise.
2731 (ada_build_task_list): Likewise.
2732 (print_ada_task_info): Likewise.
2733 (info_task): Likewise.
2734 (task_command_1): Likewise.
2735
2736 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2737
2738 * ada-lang.c (add_angle_brackets): Return std::string.
2739
2740 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2741
2742 * python/py-threadevent.c (py_get_event_thread): Initialize
2743 pythread.
2744
2745 2018-08-24 Pedro Alves <palves@redhat.com>
2746
2747 * python/py-bpevent.c (create_breakpoint_event_object): Use
2748 copy-initialization.
2749 * python/py-continueevent.c (emit_continue_event): Use
2750 copy-initialization.
2751 * python/py-exitedevent.c (create_exited_event_object): Return a
2752 gdbpy_ref<>.
2753 (emit_exited_event): Use copy-initialization.
2754 * python/py-inferior.c (python_new_inferior)
2755 (python_inferior_deleted, add_thread_object): Use
2756 copy-initialization.
2757 * python/py-infevents.c (create_inferior_call_event_object)
2758 (create_register_changed_event_object)
2759 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2760 (emit_inferior_call_event, emit_memory_changed_event)
2761 (emit_register_changed_event): Use copy-initialization.
2762 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2763 Return a gdbpy_ref<>.
2764 (emit_new_objfile_event): Use copy-initialization.
2765 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2766 (emit_clear_objfiles_event): Use copy-initialization.
2767 * python/py-signalevent.c (create_signal_event_object): Use
2768 copy-initialization.
2769 * python/py-threadevent.c (create_thread_event_object): Use
2770 copy-initialization.
2771
2772 2018-08-24 Pedro Alves <palves@redhat.com>
2773 Simon Marchi <simon.marchi@ericsson.com>
2774
2775 PR gdb/23379
2776 * python/py-continueevent.c: Include "gdbthread.h".
2777 (create_continue_event_object): Add intro comment. Add 'ptid'
2778 parameter. Use it to find thread to pass to
2779 create_thread_event_object.
2780 (emit_continue_event): Pass PTID down to
2781 create_continue_event_object.
2782 * python/py-event.h (py_get_event_thread): Declare.
2783 (create_thread_event_object): Remove default from 'thread'
2784 parameter.
2785 * python/py-stopevent.c (create_stop_event_object): Use
2786 py_get_event_thread.
2787 * python/py-threadevent.c (get_event_thread): Rename to ...
2788 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2789 and use it to find the thread.
2790 (create_thread_event_object): Assert that THREAD isn't null.
2791 Don't find the event thread here.
2792
2793 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2794
2795 * block.h (blockrange, blockranges): New struct declarations.
2796 (struct block): Add new field named `ranges'.
2797 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2798 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2799 macros for accessing ranges in struct block.
2800 (make_blockranges): New declaration.
2801 block.c (make_blockranges): New function.
2802 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2803 for block.
2804 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2805 * blockframe.c (cache_pc_function_block): New static global.
2806 (clear_pc_function_cache): Clear cache_pc_function_block.
2807 (find_pc_partial_function): Move comment to symtab.h. Add
2808 support for non-contiguous blocks.
2809 * cli/cli-cmds.c (block.h): Include.
2810 (print_disassembly): Handle printing of non-contiguous blocks.
2811 (disassemble_current_function): Likewise.
2812 (disassemble_command): Likewise.
2813
2814 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2815 BLOCK_START.
2816 * blockframe.c (get_pc_function_start): Likewise.
2817 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2818 (gcc_symbol_address): Likewise.
2819 * compile/compile-object-run.c (compile_object_run): Likewise.
2820 * compile/compile.c (get_expr_block_and_pc): Likewise.
2821 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2822 (func_addr_to_tail_call_list): Likewise.
2823 * findvar.c (default_read_var_value): Likewise.
2824 * inline-frame.c (inline_frame_this_id): Likewise.
2825 (skip-inline_frames): Likewise.
2826 * infcmd.c (until_next_command): Likewise.
2827 * linespec.c (convert_linespec_to_sals): Likewise.
2828 * parse.c (parse_exp_in_context_1): Likewise.
2829 * printcmd.c (build_address_symbolic): likewise.
2830 (info_address_command): Likewise.
2831 symtab.c (find_function_start_sal): Likewise.
2832 (skip_prologue_sal): Likewise.
2833 (find_function_alias_target): Likewise.
2834 (find_gnu_ifunc): Likewise.
2835 * stack.c (find_frame_funname): Likewise.
2836 * symtab.c (fixup_symbol_section): Likewise.
2837 (find_function_start_sal): Likewise.
2838 (skip_prologue_sal): Likewsie.
2839 (find_function_alias_target): Likewise.
2840 (find_gnu_ifunc): Likewise.
2841 * tracepoint.c (info_scope_command): Likewise.
2842 * value.c (value_fn_field): Likewise.
2843
2844 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2845 in place of find_pc_partial_function.
2846 * blockframe.c (find_function_entry_range_from_pc): New function.
2847 * symtab.h (find_function_entry_range_from_pc): Declare and document.
2848 * objfiles.c (objfile_relocate1): Relocate start and end addresses
2849 for each range in a block.
2850
2851
2852 2018-08-23 Xavier Roirand <roirand@adacore.com>
2853
2854 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2855 incrementation.
2856
2857 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2858
2859 * solib-svr4.c (read_program_headers_from_bfd): Return
2860 gdb::optional<gdb::byte_vector>.
2861 (svr4_exec_displacement): Adjust.
2862
2863 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2864
2865 * solib-svr4.c (read_program_header): Return
2866 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2867 (find_program_interpreter): Return
2868 gdb::optional<gdb::byte_vector>.
2869 (scan_dyntag_auxv): Adjust.
2870 (enable_break): Adjust.
2871 (svr4_exec_displacement): Adjust.
2872
2873 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2874
2875 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2876 * inf-child.c (inf_child_target::terminal_save_inferior): New.
2877
2878 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2879
2880 * guile/scm-string.c (gdbscm_scm_from_printf): Use
2881 string_vprintf.
2882 * guile/scm-utils.c (gdbscm_printf): Likewise.
2883 * serial.c (serial_printf): Likewise.
2884 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2885
2886 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
2887
2888 * stack.c (print_frame): Print frame architecture when printing on
2889 an MI output.
2890 * NEWS: Mention new "arch" attribute in frame output.
2891
2892 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2893
2894 * arch/aarch64.h (aarch64_regnum): Update comment.
2895
2896 2018-08-21 Alan Hayward <alan.hayward@arm.com>
2897
2898 * NEWS: Add SVE to 8.2 section.
2899
2900 2018-08-21 Pedro Alves <palves@redhat.com>
2901
2902 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2903 out from gdbscm_parse_function_args.
2904 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2905 gdbscm_parse_function_args_1.
2906
2907 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
2908
2909 PR gdb/17816
2910 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2911 operator.
2912
2913 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
2914
2915 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2916
2917 2018-08-19 Michael Spang <spang@google.com>
2918
2919 PR gdb/11786
2920 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2921 for PT_TLS segments.
2922
2923 2018-08-18 Kevin Buettner <kevinb@redhat.com>
2924
2925 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2926 dwarf_variable_value.
2927 * dwarf2-frame.c (class dwarf_expr_executor):
2928 Add override for dwarf_variable_value.
2929 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2930 (class symbol_needs_eval_context): Likewise.
2931 (indirect_synthetic_pointer): Add forward declaration.
2932 (sect_variable_value): New function.
2933 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2934 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2935 for DW_OP_GNU_variable_value.
2936
2937 2018-08-16 Tom Tromey <tom@tromey.com>
2938
2939 * top.c (read_command_file): Update.
2940 (command_line_input): Remove "repeat" argument.
2941 * ada-lang.c (get_selections): Update.
2942 * linespec.c (decode_line_2): Update.
2943 * defs.h (command_line_input): Remove argument.
2944 * cli/cli-script.c (read_next_line): Update.
2945 * python/py-gdb-readline.c: Update.
2946
2947 2018-08-17 Tom Tromey <tom@tromey.com>
2948
2949 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2950 command_line_input.
2951
2952 2018-08-15 Tom Tromey <tom@tromey.com>
2953
2954 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2955
2956 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
2957
2958 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2959 If used, use find_pc_partial_function to find address range
2960 to disassemble.
2961 * mi/mi-main.c (mi_cmd_list_features): Report
2962 "data-disassemble-a-option" feature.
2963 * NEWS: Mention new -data-disassemble option -a.
2964
2965 2018-08-13 Tom Tromey <tom@tromey.com>
2966
2967 * common/common-defs.h (_FORTIFY_SOURCE): Define.
2968
2969 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2970
2971 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2972 (aarch64_linux_collect_sve_regset): Likewise.
2973 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2974 * regcache.h (regcache_map_entry_size): New function.
2975
2976 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2977
2978 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2979 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2980 (SVE_HEADER_VL_LENGTH): Likewise.
2981 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2982 (SVE_HEADER_FLAGS_LENGTH): Likewise.
2983 (SVE_HEADER_RESERVED_LENGTH): Likewise.
2984 (SVE_HEADER_SIZE_OFFSET): Likewise.
2985 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2986 (SVE_HEADER_VL_OFFSET): Likewise.
2987 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2988 (SVE_HEADER_FLAGS_OFFSET): Likewise.
2989 (SVE_HEADER_RESERVED_OFFSET): Likewise.
2990 (SVE_HEADER_SIZE): Likewise.
2991 (aarch64_linux_core_read_vq): Add function.
2992 (aarch64_linux_core_read_description): Check for SVE section.
2993
2994 2018-08-13 Alan Hayward <alan.hayward@arm.com>
2995
2996 * aarch64-fbsd-tdep.c
2997 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2998 collect_size.
2999 * aarch64-linux-tdep.c
3000 (aarch64_linux_iterate_over_regset_sections): Likewise.
3001 * alpha-linux-tdep.c
3002 (alpha_linux_iterate_over_regset_sections):
3003 * alpha-nbsd-tdep.c
3004 (alphanbsd_iterate_over_regset_sections): Likewise.
3005 * amd64-fbsd-tdep.c
3006 (amd64fbsd_iterate_over_regset_sections): Likewise.
3007 * amd64-linux-tdep.c
3008 (amd64_linux_iterate_over_regset_sections): Likewise.
3009 * arm-bsd-tdep.c
3010 (armbsd_iterate_over_regset_sections): Likewise.
3011 * arm-fbsd-tdep.c
3012 (arm_fbsd_iterate_over_regset_sections): Likewise.
3013 * arm-linux-tdep.c
3014 (arm_linux_iterate_over_regset_sections): Likewise.
3015 * corelow.c (get_core_registers_cb): Likewise.
3016 (core_target::fetch_registers): Likewise.
3017 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3018 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3019 * gdbarch.h (void): Regenerate.
3020 * gdbarch.sh: Add supply_size and collect_size.
3021 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3022 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3023 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3024 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3025 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3026 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3027 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3028 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3029 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3030 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3031 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3032 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3033 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3034 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3035 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3036 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3037 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3038 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3039 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3040 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3041 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3042 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3043 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3044 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3045 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3046 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3047 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3048 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3049 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3050 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3051
3052 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3053
3054 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3055 with string_printf.
3056
3057 2018-08-10 Keith Seitz <keiths@redhat.com>
3058
3059 * compile/compile-c-support.c (add_code_header, add_code_footer):
3060 Move into policy class.
3061 (c_push_user_expression, pop_user_expression_nop)
3062 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3063 (compile_program): New host class.
3064 (c_compile_program): New typedef.
3065 (c_compute_porgram): Use c_compile_program.
3066
3067 2018-08-10 Keith Seitz <keiths@redhat.com>
3068
3069 * compile/compile-internal.h (compile_instance::~compile_instance):
3070 Remove calls to htab_delete.
3071 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3072 * compile.c (compile_instance::compile_instance): Initialize
3073 htab unique pointers.
3074 (compile_instance::get_cached_type, compile_instance::insert_type)
3075 (compile_instance::error_symbol_once): Update for unique_ptr.
3076
3077 2018-08-10 Keith Seitz <keiths@redhat.com>
3078
3079 * compile/compile-c-symbols.c (struct symbol_error)
3080 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3081 (compile_instance::insert_symbol_error)
3082 (compile_instance::error_symbol_once): Move to ...
3083 * compile/compile.c: ... here.
3084
3085 2018-08-10 Keith Seitz <keiths@redhat.com>
3086
3087 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3088 instead of `new_compile_instance'.
3089 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3090 Update description.
3091 If the symbol error map is not initialized, create it.
3092 (generate_c_for_for_one_symbol): Do not check/initialize
3093 the symbol error map.
3094 * compile/compile-c-types.c (compile_c_instance): Make a class.
3095 Update all callers.
3096 (compile_instance::compile_instance): Initialize the type cache.
3097 (get_cached_type): New function.
3098 (insert_type): Update description.
3099 (compile_c_instance::m_default_cflags): Define.
3100 (convert_type): Update description. Use get_cached_type.
3101 (delete_instance): Moved to destructor.
3102 (new_compile_instance): Moved to constructor.
3103 * compile/compile-c.h (compile_c_instance): Make class inheriting
3104 from compile_instance.
3105 <base>: Remove field.
3106 <type_map, symbol_err_map>: Move to base class.
3107 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3108 * compile/compile-internal.h (compile_instance): Make class.
3109 <type_map_t, symbol_err_map_t>: Define.
3110 <fe>: Rename to `m_gcc_fe'.
3111 <scope, block, gcc_target_options>: Add `m_' prefix.
3112 <m_type_map, m_symbol_err_map>: New fields, moved from
3113 compile_c_instance.
3114 <destroy>: Remove.
3115 (convert_type, new_compile_instance): Remove.
3116 * compile/compile.c (cleanup_compile_instance): Remove.
3117 (compile_to_object): Use unique_ptr to eliminate cleanups.
3118 (compile_instance::set_print_callback, compile_instance::version)
3119 (compile_instance::set_verbose)
3120 (compile_instance::set_driver_filename)
3121 (compile_instance::set_triplet_regexp)
3122 (compile_instance::set_arguments)
3123 (compile_instance::set_source_file)
3124 (compile_instance::compile): Define.
3125
3126 2018-08-10 Keith Seitz <keiths@redhat.com>
3127
3128 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3129 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3130 gcc-c-fe.def to define C plugin.
3131 (delete_instance): Delete `c_plugin'.
3132 (new_compile_instance): Initialize `c_plugin'.
3133 * compile/compile-c.h: Include gcc_c_plugin.h.
3134 (struct compile_c_instance) <c_plugin>: New member.
3135 * gcc-c-plugin.h: New file.
3136 Update all callers with API change.
3137
3138 2018-08-10 Keith Seitz <keiths@redhat.com>
3139
3140 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3141 (HFILES_NO_SRCDIR): ... to here.
3142 Add compile-internal.h and compile-c.h.
3143 * compile/compile-c-support.c: Include compile-c.h.
3144 * compile/compile-c-symbols.c: Include compile-c.h.
3145 (generate_c_for_variable_locations): Update comment.
3146 * compile/compile-c-types.c: Include compile-c.h.
3147 * compile/compile-c.h: New file -- moved C language declarations
3148 from other files here.
3149 * compile/compile-internal.h: Do not include hashtab.h or
3150 common/enum-flags.h.
3151 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3152 (gcc_convert_symbol, gcc_symbol_address)
3153 (generate_c_for_variable_locations, c_get_mode_for_size)
3154 (c_get_range_decl_name): Definitions moved to compile-c.h.
3155 * compile/compile-loc2c.c: Include compile-c.h.
3156
3157 2018-08-10 Keith Seitz <keiths@redhat.com>
3158
3159 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3160 (c_symbol_substitution_name): ... this.
3161 Update all callers.
3162
3163 2018-08-10 Keith Seitz <keiths@redhat.com>
3164
3165 * compile/compile-c-support.c (c_compute_program): Use
3166 unique_xmalloc_ptr to eliminate cleanup.
3167 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3168 Return a unique_xmalloc_ptr and eliminate cleanup.
3169 * compile/compile-internal.h (generate_c_for_variable_locations):
3170 Return unique_xmalloc_ptr and update description.
3171
3172 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3173
3174 * corelow.c (core_target::get_core_register_section): Rename
3175 min_size to section_min_size.
3176
3177 2018-08-09 Jim Wilson <jimw@sifive.com>
3178
3179 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3180 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3181 * NEWS: Mention new GNU/Linux RISC-V target.
3182 * configure.host: Add riscv*-*-linux*.
3183 * configure.nat: Add riscv*.
3184 * configure.tgt: Add riscv*-*-linux*.
3185 * riscv-linux-nat.c: New file.
3186 * riscv-linux-tdep.c: New file.
3187
3188 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3189
3190 * infrun.c (resume): Make static, add forward declaration.
3191 (proceed): Update header comment.
3192 * infrun.h (resume): Delete declaration.
3193
3194 2018-08-09 Tom Tromey <tom@tromey.com>
3195
3196 * riscv-tdep.h: Minor formatting fixes.
3197
3198 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3199
3200 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3201 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3202 (test_mkdir_recursive): Likewise.
3203 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3204
3205 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3206
3207 * valarith.c (value_subscripted_rvalue): If an array is not in
3208 memory, and we don't know the upper bound, then we can't know that
3209 the requested element exists or not.
3210
3211 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3212
3213 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3214 (target_options_to_string): Add comment.
3215
3216 2018-08-08 Tom Tromey <tom@tromey.com>
3217
3218 * unittests/scoped_mmap-selftests.c: Check result of "write".
3219
3220 2018-08-08 Jim Wilson <jimw@sifive.com>
3221
3222 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3223 (decode_register_index_short): New.
3224 (decode_j_type_insn, decode_cj_type_insn): New.
3225 (decode_b_type_insn, decode_cb_type_insn): New.
3226 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3227 local xlen. Check xlen when decoding ambiguous compressed insns. In
3228 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3229 is_c_sw_insn instead of is_sw_insn.
3230 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3231 (riscv_software_single_step): New.
3232 * riscv-tdep.h (riscv_software_single_step): Declare.
3233
3234 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3235 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3236
3237 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3238
3239 PR gdb/18050:
3240 * target.c (dispose_inferior): Don't dispose of inferiors that are
3241 already killed.
3242
3243 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3244
3245 * remote.c (remote_target::download_tracepoint): Change char* to
3246 const char*.
3247
3248 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3249
3250 * target.h (target_options_to_string): Return an std::string.
3251 * target.c (str_comma_list_concat_elem): Return void, use
3252 std::string.
3253 (do_option): Likewise.
3254 (target_options_to_string): Return an std::string.
3255 * linux-nat.c (linux_nat_target::wait): Adjust.
3256 * target-debug.h (target_debug_print_options): Adjust.
3257
3258 2018-08-07 Tom Tromey <tom@tromey.com>
3259
3260 * Makefile.in (CPPFLAGS): New variable.
3261 (INTERNAL_CPPFLAGS): Use it.
3262
3263 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3264
3265 * NEWS: Mention the index cache.
3266
3267 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * common/pathstuff.h (get_standard_cache_dir): New.
3270 * common/pathstuff.c (get_standard_cache_dir): New.
3271 * build-id.h (build_id_to_string): New.
3272 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3273 DEBUG_STR_SUFFIX): Move to here.
3274 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3275 DEBUG_STR_SUFFIX): Move from there.
3276 (write_psymtabs_to_index): Make non-static, add basename
3277 parameter. Write to temporary files, rename when done.
3278 (save_gdb_index_command): Adjust call to
3279 write_psymtabs_to_index.
3280 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3281 field.
3282 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3283 (get_gdb_index_contents_from_cache): New.
3284 (get_gdb_index_contents_from_cache_dwz): New.
3285 (dwarf2_initialize_objfile): Read index from cache.
3286 (dwarf2_build_psymtabs): Save to index.
3287 * dwarf-index-cache.h: New file.
3288 * dwarf-index-cache.c: New file.
3289 * dwarf-index-write.h: New file.
3290
3291 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3292
3293 * gnulib/aclocal.m4: Re-generate.
3294 * gnulib/config.in: Re-generate.
3295 * gnulib/configure: Re-generate.
3296 * gnulib/import/Makefile.am: Re-generate.
3297 * gnulib/import/Makefile.in: Re-generate.
3298 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3299 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3300 * gnulib/import/m4/mkdir.m4: New file.
3301 * gnulib/import/mkdir.c: New file.
3302 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3303 module.
3304
3305 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3306
3307 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3308 * common/scoped_mmap.c: New file.
3309 * common/scoped_mmap.h (destroy): New method.
3310 (~scoped_mmap, reset): Use destroy.
3311 (scoped_mmap): New move constructor.
3312 (mmap_file): New declaration.
3313 * unittests/scoped_mmap-selftests.c (test_normal,
3314 test_invalid_filename, run_tests): New functions.
3315 (_initialize_scoped_mmap_selftests): Register selftest.
3316
3317 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3318
3319 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3320 (read_gdb_index_from_buffer): ... this. Remove section
3321 parameter, add buffer parameter.
3322 (get_gdb_index_contents_ftype,
3323 get_gdb_index_contents_dwz_ftype): New typedefs.
3324 (dwarf2_read_gdb_index): Add callback parameters to get the
3325 index contents.
3326 (get_gdb_index_contents_from_section): New.
3327 (dwarf2_initialize_objfile): Update call to
3328 dwarf2_read_gdb_index.
3329
3330 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3331
3332 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3333 (gdb_open_cloexec): Likewise.
3334 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3335 (commandline_from_pid): Likewise.
3336 (linux_xfer_osdata_threads): Likewise.
3337 (linux_xfer_osdata_fds): Likewise.
3338 * ada-lang.c (is_package_name): Likewise.
3339 * auxv.c (procfs_xfer_auxv): Likewise.
3340 * breakpoint.c (print_one_breakpoint_location): Use
3341 uiout::field_fmt.
3342 (print_one_catch_solib): Use string_printf.
3343 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3344 (add_pe_forwarded_sym): Likewise.
3345 * dwarf2read.c (create_type_unit_group): Likewise.
3346 (build_error_marker_type): Likewise.
3347 * infcall.c (get_function_name): Likewise.
3348 * valprint.c (print_converted_chars_to_obstack): Likewise.
3349 * xtensa-tdep.c (xtensa_register_type): Likewise.
3350
3351 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3352
3353 * remote.c (remote_target::download_tracepoint): Fix format
3354 string errors.
3355
3356 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3357
3358 * tracefile.c: Include common/byte-vector.h.
3359 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3360 with trace_regblock_size if needed. Update uses of buf.
3361
3362 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3363
3364 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3365 std::vector<unsigned char>.
3366 * tracepoint.c (collection_list::collection_list): Remove
3367 m_regs_mask initializer from initializer list. Resize
3368 m_regs_mask using the largest remote register number.
3369 (collection_list::add_remote_register): Remove size check on
3370 m_regs_mask. Use at to access element.
3371 (collection_list::stringify): Change type of temp_buf to
3372 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3373 stringify the register mask. Use pack_hex_byte for the register
3374 mask.
3375
3376 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3377
3378 * tracepoint.h (class collection_list) <add_register>: Remove.
3379 <add_remote_register, add_ax_registers, add_local_register>:
3380 Declare.
3381 <add_memrange>: Add scope parameter.
3382 * tracepoint.c (encode_actions_1): Likewise.
3383 (collection_list::add_register): Rename to ...
3384 (collection_list::add_remote_register): ... this. Update
3385 comment.
3386 (collection_list::add_ax_registers, add_local_register): New
3387 methods.
3388 (collection_list::add_memrange): Add scope parameter. Call
3389 add_local_register instead of add_register.
3390 (finalize_tracepoint_aexpr): New function.
3391 (collection_list::collect_symbol): Update calls to add_memrange.
3392 Call add_local_register instead of add_register. Call
3393 add_ax_registers. Call finalize_tracepoint_aexpr.
3394 (encode_actions_1): Get remote regnos for $reg action. Call
3395 add_remote_register, add_ax_registers, and add_local_register.
3396 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3397 (validate_actionline): Call finalize_tracepoint_aexpr.
3398
3399 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3400
3401 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3402 Replace array buf with gdb::char_vector buf, of size
3403 get_remote_packet_size (). Replace references to buf and
3404 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3405 and xsnprintf with snprintf. Raise errors if the buffer is too
3406 small.
3407
3408 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3409
3410 * remote.c (remote_target::download_tracepoint): Fix the has_more
3411 predicate in the QTDP action list iteration.
3412
3413 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3414
3415 * remote.c (remote_target::download_tracepoint): Fix indentation
3416 in for block.
3417
3418 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3419
3420 * proc-api.c (_initialize_proc_api): Remove c, unused.
3421 * procfs.c (procfs_init_inferior): Remove signals, unused.
3422 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3423 unused.
3424
3425 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3426 Andrew Burgess <andrew.burgess@embecosm.com>
3427
3428 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3429 'W_STOPCODE (0)' as this could be ambiguous.
3430
3431 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3432
3433 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3434 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3435 "ai_socktype").
3436
3437 2018-08-02 Tom Tromey <tom@tromey.com>
3438
3439 PR symtab/16842.
3440 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3441 symbols.
3442 (process_structure_scope): Likewise.
3443
3444 2018-08-02 Xavier Roirand <roirand@adacore.com>
3445
3446 PR gdb/22629:
3447 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3448 kill inferior.
3449
3450 2018-08-02 Tom Tromey <tom@tromey.com>
3451
3452 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3453 (darwin_suspend_inferior, darwin_resume_inferior)
3454 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3455 (darwin_check_new_threads): Check result of get_darwin_inferior.
3456
3457 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3458
3459 GDB 8.1.1 released.
3460
3461 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3462
3463 * varobj.c (varobj_get_path_expr_parent): Report an error if
3464 parent is a dynamic varobj.
3465
3466 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3467
3468 * gnulib/aclocal.m4: Re-generate.
3469 * gnulib/config.in: Re-generate.
3470 * gnulib/configure: Re-generate.
3471 * gnulib/import/Makefile.in: Re-generate.
3472 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3473 * gnulib/import/m4/onceonly.m4: Re-generate.
3474
3475 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3476
3477 * target-descriptions.c (struct xml_test_tdesc): New.
3478 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3479 (record_xml_tdesc): Update.
3480 (maintenance_check_xml_descriptions): Update.
3481 * target-descriptions.h (record_xml_tdesc): Update comment.
3482
3483 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3484
3485 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3486 checking array bounds are defined.
3487
3488 2018-07-30 Tom Tromey <tom@tromey.com>
3489
3490 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3491 irreflexivity violation.
3492
3493 2018-07-30 Tom Tromey <tom@tromey.com>
3494
3495 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3496 * value.c (unpack_long): Remove lint code.
3497 * valops.c (value_ind): Remove lint code.
3498 * valarith.c (value_x_binop, value_x_unop, value_equal)
3499 (value_pos): Remove lint code.
3500
3501 2018-07-28 Tom de Vries <tdevries@suse.de>
3502
3503 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3504 with undefined upper bound as <optimized out>.
3505
3506 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3507
3508 * gcore.in: Rename variable "name" to "prefix". Expand
3509 "usage" text.
3510
3511 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3512
3513 * windows-nat.c (windows_nat_target::create_inferior): Update to
3514 call close() in global namespace.
3515
3516 2018-07-26 Tom Tromey <tom@tromey.com>
3517
3518 * dwarf-index-write.c (add_address_entry): Don't add objfile
3519 offsets.
3520 * dbxread.c (find_stab_function): Rename from
3521 find_stab_function_addr. Return a bound_minimal_symbol.
3522 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3523 Don't add objfile offsets.
3524 (end_psymtab): Use raw_text_low, raw_text_high,
3525 MSYMBOL_VALUE_RAW_ADDRESS.
3526 (read_ofile_symtab): Update.
3527 (process_one_symbol): Update.
3528 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3529 offsets.
3530 (dw2_relocate): Remove.
3531 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3532 searching addrmap.
3533 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3534 Update.
3535 (process_psymtab_comp_unit_reader, add_partial_symbol)
3536 (add_partial_subprogram, dwarf2_ranges_read): Update.
3537 (load_partial_dies): Update.
3538 (add_address_entry): Don't add objfile offsets.
3539 (dwarf2_build_include_psymtabs): Update.
3540 (create_addrmap_from_aranges): Don't add objfile offsets.
3541 (dw2_find_pc_sect_compunit_symtab): Update.
3542 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3543 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3544 Update.
3545 (parse_partial_symbols): Don't add objfile offsets. Use
3546 raw_text_low, raw_text_high. Update.
3547 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3548 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3549 or call 'relocate' quick function. Clear psymbol_map.
3550 * psympriv.h (struct partial_symbol) <address>: Add section
3551 offset.
3552 <set_unrelocated_address>: Rename from set_address.
3553 <raw_text_low, raw_text_high>: New methods.
3554 <text_low, text_high>: Add objfile parameter.
3555 (add_psymbol_to_bcache): Add 'section' parameter. Call
3556 set_unrelocated_address.
3557 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3558 (find_pc_psymbol): Update.
3559 (fixup_psymbol_section, relocate_psymtabs): Remove.
3560 (dump_psymtab, psym_functions): Update.
3561 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3562 parameter.
3563 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3564 (start_psymtab_common): Update.
3565 * symfile-debug.c (debug_qf_relocate): Remove.
3566 (debug_sym_quick_functions): Update.
3567 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3568 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3569 Update.
3570
3571 2018-07-26 Tom Tromey <tromey@redhat.com>
3572
3573 * dbxread.c (end_psymtab): Use text_high_valid and
3574 text_low_valid.
3575 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3576 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3577 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3578 Update comment.
3579 <text_low_valid, text_high_valid>: New fields.
3580 <set_text_low, set_text_high>: Update.
3581 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3582
3583 2018-07-26 Tom Tromey <tom@tromey.com>
3584
3585 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3586 Update.
3587 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3588 textlow and texthigh fields.
3589 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3590 Update.
3591 * mdebugread.c (parse_lines, parse_partial_symbols)
3592 (psymtab_to_symtab_1): Update.
3593 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3594 Rename fields. Update comment. Now private.
3595 <text_low, text_high, set_text_low, set_text_high>: New methods.
3596 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3597 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3598 (start_psymtab_common, maintenance_info_psymtabs)
3599 (maintenance_check_psymtabs): Update.
3600 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3601 texthigh fields.
3602 (scan_xcoff_symtab): Update.
3603
3604 2018-07-26 Tom Tromey <tromey@redhat.com>
3605
3606 * psympriv.h (struct partial_symbol) <unrelocated_address,
3607 address, set_address>: New methods.
3608 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3609 (fixup_psymbol_section, relocate_psymtabs): Update.
3610 (print_partial_symbols): Add 'objfile' parameter. Update.
3611 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3612 Update.
3613
3614 2018-07-26 Tom Tromey <tom@tromey.com>
3615
3616 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3617 (debug_names::write_psymbols): Update.
3618 * psympriv.h (struct partial_symbol): Derive from
3619 general_symbol_info.
3620 <obj_section>: New method.
3621 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3622 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3623 (find_pc_sect_psymbol, fixup_psymbol_section)
3624 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3625 (print_partial_symbols, recursively_search_psymtabs)
3626 (compare_psymbols, psymbol_hash, psymbol_compare)
3627 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3628 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3629
3630 2018-07-26 Tom Tromey <tromey@redhat.com>
3631
3632 * dbxread.c (end_psymtab): Remove dead code.
3633
3634 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3635
3636 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3637 DWARF unwinders are disabled.
3638 * dwarf2-frame.c: Add dwarf2read.h include.
3639 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3640 disabled.
3641 (dwarf2_frame_unwinders_enabled_p): Define.
3642 (show_dwarf_unwinders_enabled_p): New function.
3643 (_initialize_dwarf2_frame): Register switch to control DWARF
3644 unwinder use.
3645 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3646 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3647 (show_dwarf_cmdlist): Remove static keyword.
3648 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3649 (show_dwarf_cmdlist): Declare.
3650 * NEWS: Document new feature.
3651
3652 2018-07-26 Tom de Vries <tdevries@suse.de>
3653
3654 PR breakpoints/23366
3655 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3656
3657 2018-07-26 Tom de Vries <tdevries@suse.de>
3658
3659 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3660 DW_AT_count can't be translated to a dynamic prop.
3661
3662 2018-07-25 Tom de Vries <tdevries@suse.de>
3663
3664 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3665 try/catch.
3666
3667 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3668
3669 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3670
3671 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3672
3673 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3674
3675 2018-07-24 Keith Seitz <keiths@redhat.comt
3676
3677 PR symtab/23010
3678 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3679 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3680 instead of add_symbol_to_list.
3681 (read_file_scope): Call prepare_one_comp_unit before reading
3682 any other DIEs.
3683
3684 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3685
3686 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3687
3688 2018-07-24 Tom Tromey <tom@tromey.com>
3689
3690 * utils.c (malloc, realloc, free): Don't declare.
3691 * configure, config.in: Rebuild.
3692 * configure.ac: Don't check for declarations of free, malloc, or
3693 realloc.
3694
3695 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3696
3697 * aarch64-linux-nat.c
3698 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3699 variable.
3700 * arm-linux-nat.c (fetch_regs): Likewise.
3701 (store_regs): Likewise.
3702 (fetch_vfp_regs): Likewise.
3703 (store_vfp_regs): Likewise.
3704 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3705 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3706 (arm_linux_nat_target::insert_watchpoint): Likewise.
3707 (arm_linux_nat_target::remove_watchpoint): Likewise.
3708 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3709 Likewise.
3710 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3711 Likewise.
3712 * ppc-linux-nat.c (fetch_register): Likewise.
3713 (fetch_all_gp_regs): Likewise.
3714 (fetch_ppc_registers): Likewise.
3715 (store_all_gp_regs): Likewise.
3716 (store_ppc_registers): Likewise.
3717 (hwdebug_insert_point): Likewise.
3718 (can_use_watchpoint_cond_accel): Likewise.
3719 * remote-sim.c (gdb_os_write_stdout): Likewise.
3720
3721 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3722 Tom Tromey <tom@tromey.com>
3723
3724 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3725 test for it.
3726 * configure: Rebuild.
3727
3728 2018-07-22 Tom Tromey <tom@tromey.com>
3729
3730 * regformats/regdat.sh: Define xmltarget_${name} inside
3731 #ifndef IN_PROCESS_AGENT.
3732
3733 2018-07-22 Tom Tromey <tom@tromey.com>
3734
3735 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3736
3737 2018-07-22 Tom Tromey <tom@tromey.com>
3738
3739 * symfile.c (reread_symbols): Notify iter, not objfile.
3740
3741 2018-07-22 Tom Tromey <tom@tromey.com>
3742
3743 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3744 Use arch_ops.
3745 (ravenscar_thread_target::prepare_to_store): Likewise.
3746
3747 2018-07-22 Tom Tromey <tom@tromey.com>
3748
3749 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3750 unused variable. Call value_fetch_lazy when needed.
3751 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3752 Remove unused variable. Call value_fetch_lazy when needed.
3753
3754 2018-07-22 Tom Tromey <tom@tromey.com>
3755
3756 * m32c-tdep.c (mark_dma): Return void.
3757 (make_regs): Remove unused declarations.
3758
3759 2018-07-22 Tom Tromey <tom@tromey.com>
3760
3761 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3762 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3763 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3764 bkscm_get_valid_block_smob_arg_unsafe for effect.
3765
3766 2018-07-22 Tom Tromey <tom@tromey.com>
3767
3768 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3769 value_type.
3770
3771 2018-07-22 Tom Tromey <tom@tromey.com>
3772
3773 * windows-nat.c (saved_context): Conditionally define.
3774 * remote.c (remote_target::remote_btrace_maybe_reopen):
3775 Conditionally declare "warned".
3776 * inflow.c (sigquit_ours): Conditionally define.
3777 (new_tty): Move "tty" declaration inside #if.
3778 * guile/guile.c (guile_datadir): Conditionally define.
3779 * charset.c (set_be_le_names): Move some declarations inside #if.
3780 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3781 #if.
3782 (parse_xml_btrace_conf): Likewise.
3783
3784 2018-07-22 Tom Tromey <tom@tromey.com>
3785
3786 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3787
3788 2018-07-22 Tom Tromey <tom@tromey.com>
3789
3790 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3791 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3792 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3793 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3794 * stack.c (frame_apply_level_command): Remove unused variable.
3795 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3796 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3797 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3798 unused variable.
3799 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3800 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3801 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3802 variable.
3803 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3804 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3805 variable.
3806 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3807 Remove unused variable.
3808 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3809 variable.
3810 * common/tdesc.c (print_xml_feature::visit): Remove unused
3811 variable.
3812 * compile/compile-object-load.c (store_regs): Remove unused
3813 variables.
3814 * complaints.c (clear_complaints): Remove unused variable.
3815 * corelow.c (core_target_open): Remove unused variable.
3816 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3817 variable.
3818 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3819 variable.
3820 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3821 variable.
3822 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3823 variable.
3824 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3825 variable.
3826 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3827 variable.
3828 * ia64-tdep.c (examine_prologue): Remove unused variable.
3829 * infcall.c (run_inferior_call): Remove unused variable.
3830 * inferior.c (exit_inferior): Remove unused variable.
3831 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3832 * linespec.c (decode_line_2): Remove unused variable.
3833 * linux-nat.c (super_close): Remove.
3834 * linux-tdep.c (linux_info_proc): Remove unused variable.
3835 * mi/mi-main.c (mi_execute_command): Remove unused variable.
3836 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3837 Remove unused variable.
3838 * parse.c (find_minsym_type_and_address): Remove unused variable.
3839 * printcmd.c (info_symbol_command, printf_floating): Remove unused
3840 variable.
3841 * python/py-breakpoint.c (bppy_set_commands): Remove unused
3842 variable.
3843 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3844 variables.
3845 * record-btrace.c (record_btrace_target::store_registers): Remove
3846 unused variable.
3847 (cmd_show_record_btrace_cpu): Remove unused variable.
3848 * riscv-tdep.c (riscv_register_reggroup_p)
3849 (riscv_push_dummy_call, riscv_return_value): Remove unused
3850 variable.
3851 * rust-exp.y (literal): Remove unused variable.
3852 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3853 unused variable.
3854 <STRUCTOP_ANONYMOUS>: Likewise.
3855 * s390-linux-tdep.c (s390_linux_init_abi_31)
3856 (s390_linux_init_abi_64): Remove unused variable.
3857 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3858 (file_select_thread, net_windows_open, _initialize_ser_windows):
3859 Remove unused variables.
3860 * symtab.c (find_pc_sect_line): Remove unused variable.
3861 * target-memory.c (compute_garbled_blocks): Remove unused
3862 variable.
3863 (target_write_memory_blocks): Remove unused variable.
3864 * target.c (target_stack::unpush): Remove unused variables.
3865 * tracepoint.c (start_tracing, all_tracepoint_actions)
3866 (merge_uploaded_trace_state_variables)
3867 (print_one_static_tracepoint_marker): Remove unused variable.
3868 * unittests/basic_string_view/element_access/char/1.cc (test01):
3869 Remove unused variable.
3870 * windows-nat.c (windows_continue, windows_add_all_dlls)
3871 (do_initial_windows_stuff, windows_nat_target::create_inferior):
3872 Remove unused variables.
3873
3874 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
3875
3876 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3877 attr_profile in HAVE_ELF.
3878 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3879 HAVE_ELF.
3880
3881 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
3882
3883 * frame.c (frame_register_unwind): Change parameter name.
3884 (frame_unwind_register): Likewise.
3885 (frame_unwind_register_value): Likewise.
3886 (frame_unwind_register_signed): Likewise.
3887 (frame_unwind_register_unsigned): Likewise.
3888 * frame.h (frame_register_unwind): Likewise.
3889 (frame_unwind_register): Likewise.
3890 (frame_unwind_register_value): Likewise.
3891 (frame_unwind_register_signed): Likewise.
3892 (frame_unwind_register_unsigned): Likewise.
3893 (frame_unwind_arch): Likewise.
3894
3895 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3896
3897 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3898 ISA maintenance.
3899
3900 2018-07-20 Maciej W. Rozycki <macro@mips.com>
3901
3902 * mips-linux-nat.c (mips_linux_nat_target::read_description):
3903 Call `get_ptrace_pid' rather than extracting the ptrace PID by
3904 hand.
3905
3906 2018-07-20 Keith Seitz <keiths@redhat.com>
3907
3908 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3909 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3910 m_compunit_symtab, m_language>: Add "m_" prefix.
3911 Update all uses.
3912 * buildsym.c: Update all uses.
3913
3914 2018-07-20 Tom Tromey <tom@tromey.com>
3915
3916 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3917 * buildsym.h (record_line_ftype): Remove typedef.
3918
3919 2018-07-20 Tom Tromey <tom@tromey.com>
3920
3921 * buildsym-legacy.h (augment_type_symtab): Don't declare.
3922 (end_expandable_symtab): Likewise.
3923 (end_symtab_get_static_block): Likewise.
3924 (end_symtab_from_static_block): Likewise.
3925 * buildsym-legacy.c (augment_type_symtab): Remove.
3926 (end_expandable_symtab): Remove.
3927 (end_symtab_get_static_block): Remove.
3928 (end_symtab_from_static_block): Remove.
3929
3930 2018-07-20 Tom Tromey <tom@tromey.com>
3931
3932 * dwarf2read.c: Include buildsym.h.
3933 (struct dwarf2_cu) <builder>: New method.
3934 (fixup_go_packaging): Update.
3935 (process_full_comp_unit, process_full_type_unit): Update. Don't
3936 use scoped_free_pendings.
3937 (using_directives): Add "cu" parameter, remove "language".
3938 (read_import_statement, setup_type_unit_groups, )
3939 (read_func_scope, read_lexical_block_scope)
3940 (dwarf2_record_block_ranges, read_namespace): Update.
3941 (lnp_state_machine::lnp_state_machine): Add cu parameter.
3942 (lnp_state_machine::handle_end_sequence): Update.
3943 (class lnp_state_machine) <m_cu>: New member.
3944 <m_record_line_callback>: Remove.
3945 <m_currently_recording_lines>: New member.
3946 (lnp_state_machine::handle_set_file): Update.
3947 (noop_record_line): Remove.
3948 (dwarf_record_line_p): Add cu parameter.
3949 (dwarf_record_line_1, dwarf_finish_line): Likewise.
3950 (lnp_state_machine::record_line)
3951 (lnp_state_machine::lnp_state_machine)
3952 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3953 (dwarf_decode_lines): Update.
3954 (dwarf2_start_subfile): Add cu parameter.
3955 (dwarf2_start_symtab, new_symbol): Update.
3956 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3957 Remove dwarf2_per_objfile parameter.
3958 (dwarf_decode_macros): Update.
3959
3960 2018-07-20 Tom Tromey <tom@tromey.com>
3961
3962 * stabsread.c (define_symbol): Update.
3963 * buildsym-legacy.h (get_buildsym_compunit): Declare.
3964 * dwarf2read.c (new_symbol): Update.
3965 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3966 * cp-namespace.c: Include buildsym.h.
3967 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3968 * buildsym-legacy.c (get_buildsym_compunit): New function.
3969
3970 2018-07-20 Tom Tromey <tom@tromey.com>
3971
3972 * xcoffread.c: Include buildsym-legacy.h.
3973 * windows-nat.c: Include buildsym-legacy.h.
3974 * stabsread.c: Include buildsym-legacy.h.
3975 * mdebugread.c: Include buildsym-legacy.h.
3976 * buildsym-legacy.h: New file.
3977 * buildsym-legacy.c: New file, from buildsym.c.
3978 * go32-nat.c: Include buildsym-legacy.h.
3979 * dwarf2read.c: Include buildsym-legacy.h.
3980 * dbxread.c: Include buildsym-legacy.h.
3981 * cp-namespace.c: Include buildsym-legacy.h.
3982 * coffread.c: Include buildsym-legacy.h.
3983 * buildsym.h: Move some contents to buildsym-legacy.h.
3984 * buildsym.c: Include buildsym-legacy.h. Move many functions to
3985 buildsym-legacy.c.
3986 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3987
3988 2018-07-20 Tom Tromey <tom@tromey.com>
3989
3990 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3991 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3992 (buildsym_compunit::buildsym_compunit)
3993 (buildsym_compunit::~buildsym_compunit)
3994 (buildsym_compunit::get_macro_table): Define.
3995
3996 2018-07-20 Tom Tromey <tom@tromey.com>
3997
3998 * buildsym.c (reset_symtab_globals): Remove.
3999 (buildsym_compunit::end_symtab_from_static_block): Update.
4000 (buildsym_compunit::augment_type_symtab): Update.
4001 (end_symtab_from_static_block): Call free_buildsym_compunit.
4002 (augment_type_symtab, end_symtab, end_expandable_symtab):
4003 Likewise.
4004
4005 2018-07-20 Tom Tromey <tom@tromey.com>
4006
4007 * arch-utils.c: Do not include buildsym.h.
4008 * mipsread.c: Do not include buildsym.h.
4009 * machoread.c: Do not include buildsym.h.
4010 * elfread.c: Do not include buildsym.h.
4011
4012 2018-07-20 Tom Tromey <tom@tromey.com>
4013
4014 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4015 initialization.
4016 (buildsym_compunit): Add new constructor.
4017 (struct buildsym_compunit) <get_last_source_file, finish_block,
4018 record_block_range, start_subfile, patch_subfile_names,
4019 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4020 set_last_source_start_addr, get_last_source_start_addr,
4021 get_local_using_directives, set_local_using_directives,
4022 get_global_using_directives, outermost_context_p,
4023 get_current_context_stack, get_context_stack_depth,
4024 get_current_subfile, get_local_symbols, get_file_symbols,
4025 get_global_symbols, record_debugformat, record_producer,
4026 push_context, pop_context, end_symtab_get_static_block,
4027 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4028 New public methods.
4029 <record_pending_block, finish_block_internal, make_blockvector,
4030 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4031 private methods.
4032 Update all users.
4033
4034 2018-05-22 Tom Tromey <tom@tromey.com>
4035
4036 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4037 parameter.
4038 (finish_block_internal): Update.
4039
4040 2018-07-20 Tom Tromey <tom@tromey.com>
4041
4042 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4043 parameter.
4044 (finish_block_internal): Update.
4045
4046 2018-07-20 Tom Tromey <tom@tromey.com>
4047
4048 * buildsym.h (EXTERN): Don't define or undef.
4049 * buildsym.c (EXTERN): Don't define.
4050
4051 2018-07-20 Tom Tromey <tom@tromey.com>
4052
4053 * buildsym.c: Remove TODO comment.
4054
4055 2018-07-20 Tom Tromey <tom@tromey.com>
4056
4057 * coffread.c (coff_symtab_read): Update.
4058 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4059 (xcoff_new_init): Update.
4060 * mipsread.c (mipscoff_new_init): Update.
4061 * mdebugread.c (mdebug_build_psymtabs): Update.
4062 * elfread.c (elf_new_init): Update.
4063 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4064 Update.
4065 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4066 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4067 (stabsect_build_psymtabs): Update.
4068 * buildsym.h (buildsym_init): Don't declare.
4069 * buildsym.c: Update comment.
4070 (prepare_for_building): Remove.
4071 (start_symtab, restart_symtab): Update.
4072 (reset_symtab_globals): Update comment.
4073 (buildsym_init): Remove.
4074
4075 2018-07-20 Tom Tromey <tom@tromey.com>
4076
4077 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4078 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4079 (read_enum_type, common_block_start, common_block_end)
4080 (cleanup_undefined_types_1, finish_global_stabs): Update.
4081 * mdebugread.c (psymtab_to_symtab_1): Update.
4082 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4083 (read_lexical_block_scope, new_symbol): Update.
4084 * dbxread.c (process_one_symbol): Update.
4085 * coffread.c (coff_symtab_read, process_coff_symbol)
4086 (coff_read_enum_type): Update.
4087 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4088 declare.
4089 (get_local_symbols, get_file_symbols, get_global_symbols): New
4090 functions.
4091 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4092 m_global_symbols.
4093 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4094 (~scoped_free_pendings): Update.
4095 (finish_block, prepare_for_building, reset_symtab_globals)
4096 (end_symtab_get_static_block, end_symtab_with_blockvector)
4097 (augment_type_symtab, push_context): Update.
4098 (get_local_symbols, get_file_symbols, get_global_symbols): New
4099 functions.
4100 (buildsym_init): Update.
4101
4102 2018-07-20 Tom Tromey <tom@tromey.com>
4103
4104 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4105 (process_full_type_unit): Likewise.
4106 (dwarf2_start_symtab): Set list_in_scope.
4107
4108 2018-07-20 Tom Tromey <tom@tromey.com>
4109
4110 * dwarf2read.c (process_psymtab_comp_unit_reader)
4111 (build_type_psymtabs_reader): Do not set list_in_scope.
4112
4113 2018-07-20 Tom Tromey <tom@tromey.com>
4114
4115 * buildsym.c (free_pendings): Remove.
4116 (add_symbol_to_list, scoped_free_pendings)
4117 (finish_block_internal, buildsym_init): Update.
4118
4119 2018-07-20 Tom Tromey <tom@tromey.com>
4120
4121 * xcoffread.c (read_xcoff_symtab): Update.
4122 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4123 Update.
4124 * dbxread.c (process_one_symbol): Update.
4125 * coffread.c (coff_symtab_read): Update.
4126 * buildsym.h (finish_block): Update.
4127 * buildsym.c (finish_block): Remove "listhead" argument.
4128 (end_symtab_get_static_block): Update.
4129
4130 2018-07-20 Tom Tromey <tom@tromey.com>
4131
4132 * buildsym.h (class scoped_free_pendings): Remove constructor.
4133 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4134 method.
4135 <m_pending_block_obstack, m_pending_blocks>: New members.
4136 (pending_block_obstack, pending_blocks): Remove.
4137 (scoped_free_pendings::scoped_free_pendings): Default.
4138 (~scoped_free_pendings): Update.
4139 (free_pending_blocks): Remove.
4140 (finish_block_internal, record_pending_block, make_blockvector)
4141 (end_symtab_get_static_block, augment_type_symtab, push_context)
4142 (buildsym_init): Update.
4143
4144 2018-07-20 Tom Tromey <tom@tromey.com>
4145
4146 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4147 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4148 members.
4149 (pending_addrmap, pending_addrmap_obstack)
4150 (pending_addrmap_interesting): Remove.
4151 (scoped_free_pendings, record_block_range, make_blockvector)
4152 (prepare_for_building, reset_symtab_globals, buildsym_init):
4153 Update.
4154
4155 2018-07-20 Tom Tromey <tom@tromey.com>
4156
4157 * xcoffread.c (process_linenos): Update.
4158 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4159 * mdebugread.c (psymtab_to_symtab_1): Update.
4160 * dwarf2read.c (setup_type_unit_groups)
4161 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4162 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4163 * dbxread.c (process_one_symbol): Update.
4164 * coffread.c (coff_symtab_read, enter_linenos)
4165 (process_coff_symbol): Update.
4166 * buildsym.h (current_subfile): Don't declare.
4167 (get_current_subfile): Declare.
4168 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4169 member.
4170 (start_subfile, free_buildsym_compunit, push_subfile)
4171 (prepare_for_building, start_symtab): Update.
4172 (get_current_subfile): New function.
4173
4174 2018-07-20 Tom Tromey <tom@tromey.com>
4175
4176 * coffread.c (coff_symtab_read): Update.
4177 * xcoffread.c (read_xcoff_symtab): Update.
4178 * dwarf2read.c (new_symbol): Update.
4179 (read_func_scope, read_lexical_block_scope): Update.
4180 * dbxread.c (process_one_symbol): Update.
4181 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4182 (outermost_context_p): Remove macro.
4183 (outermost_context_p, get_current_context_stack)
4184 (get_context_stack_depth): Declare.
4185 (pop_context): Return struct context_stack.
4186 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4187 member.
4188 (context_stack_size): Remove.
4189 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4190 (prepare_for_building, end_symtab_get_static_block)
4191 (augment_type_symtab, push_context): Update.
4192 (pop_context): Return struct context_stack.
4193 (outermost_context_p, get_current_context_stack)
4194 (get_context_stack_depth): New functions.
4195 (buildsym_init): Update.
4196
4197 2018-07-20 Tom Tromey <tom@tromey.com>
4198
4199 * rust-exp.y: Now a pure parser. Update all rules.
4200 (%union): Move earlier.
4201 (current_parser, work_obstack): Remove globals.
4202 (rust_parser, ~rust_parser): Update.
4203 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4204 lex_character, lex_number, lex_string, lex_identifier,
4205 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4206 convert_name, convert_params_to_expression,
4207 convert_ast_to_expression, ast_basic_type, ast_operation,
4208 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4209 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4210 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4211 ast_array_type, ast_slice_type, ast_reference_type,
4212 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4213 (rust_parse): Update.
4214 (rustyyerror, rustyylex): Add parser parameter.
4215 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4216 (rust_lex_stringish_test, rust_lex_test_sequence)
4217 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4218 (rust_lex_test_push_back, rust_lex_tests): Update.
4219
4220 2018-07-19 Pedro Alves <palves@redhat.com>
4221
4222 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4223 gdb::unique_xmalloc_ptr.
4224 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4225 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4226 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4227 copy-initialization.
4228 * guile/scm-pretty-print.c (ppscm_print_children): Use
4229 gdb::unique_xmalloc_ptr instead of cleanups.
4230 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4231 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4232 gdb::unique_xmalloc_ptr.
4233 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4234 Adjust to use gdb::unique_xmalloc_ptr.
4235 * guile/scm-utils.c (extract_arg): Adjust.
4236 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4237 gdb::unique_xmalloc_ptr instead of a cleanup.
4238
4239 2018-07-19 Tom Tromey <tom@tromey.com>
4240
4241 * utils.c (do_value_free_to_mark)
4242 (make_cleanup_value_free_to_mark): Remove.
4243 * utils.h (make_cleanup_value_free_to_mark): Remove.
4244
4245 2018-07-19 Pedro Alves <palves@redhat.com>
4246
4247 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4248 forwarding reference.
4249
4250 2018-07-18 Pedro Alves <palves@redhat.com>
4251
4252 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4253 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4254 cleanup.
4255
4256 2018-07-18 Pedro Alves <palves@redhat.com>
4257
4258 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4259 exceptions.
4260 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4261 (gdbscm_wrap): New.
4262 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4263 directly instead of a cleanup.
4264 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4265 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4266 (vlscm_binop_gdbthrow): New, factored out from ...
4267 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4268 (vlscm_rich_compare): Use gdbscm_wrap.
4269 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4270 instead of a cleanup.
4271 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4272 cleanup.
4273 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4274 Use xfree directly instead of a cleanup.
4275 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4276 Adjust to use gdbscm_wrap and scoped_value_mark.
4277 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4278 (gdbscm_value_address, gdbscm_value_dereference)
4279 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4280 scoped_value_mark.
4281 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4282 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4283 scoped_value_mark.
4284 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4285 gdbscm_wrap and scoped_value_mark.
4286 (gdbscm_value_to_string): Use xfree directly instead of a
4287 cleanup. Move 'buffer' unique_ptr to TRY scope.
4288 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4289 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4290 scoped_value_mark.
4291 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4292 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4293 scoped_value_mark.
4294 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4295 gdbscm_wrap.
4296
4297 2018-07-18 Tom de Vries <tdevries@suse.de>
4298
4299 * findvar.c (default_read_var_value): Also resolve dynamic type for
4300 LOC_OPTIMIZED_OUT vars.
4301
4302 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4303
4304 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4305 decoding.
4306
4307 2018-07-17 Tom Tromey <tom@tromey.com>
4308
4309 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4310 (compute_enum_list, pascm_set_param_value_x)
4311 (gdbscm_parameter_value): Update.
4312 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4313 (gdbscm_scm_to_host_string): Update.
4314 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4315 Update.
4316 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4317 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4318 * guile/scm-string.c (gdbscm_scm_to_string): Return
4319 unique_xmalloc_ptr.
4320 (gdbscm_scm_to_host_string): Likewise.
4321
4322 2018-07-17 Tom Tromey <tom@tromey.com>
4323
4324 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4325 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4326 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4327 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4328 unique_xmalloc_ptr.
4329
4330 2018-07-17 Tom Tromey <tom@tromey.com>
4331
4332 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4333 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4334 Update.
4335 * guile/scm-cmd.c (cmdscm_function): Update.
4336 * guile/scm-pretty-print.c
4337 (ppscm_print_exception_unless_memory_error): Update.
4338 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4339 Return unique_xmalloc_ptr.
4340
4341 2018-07-17 Tom Tromey <tom@tromey.com>
4342
4343 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4344 Use string_printf.
4345
4346 2018-07-17 Jim Wilson <jimw@sifive.com>
4347
4348 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4349 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4350 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4351 unecessary braces after EF_RISCV_RVC test. Delete call to
4352 set_gdbarch_decr_pc_after_break.
4353
4354 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4355 RISCV_LAST_FP_REGNUM + 1.
4356 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4357
4358 2018-07-17 Tom Tromey <tom@tromey.com>
4359
4360 * configure.ac: Remove --disable-gdbcli.
4361 * configure: Rebuild.
4362 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4363 (SUBDIR_CLI_CFLAGS): Remove.
4364 (SFILES): Use SUBDIR_CLI_SRCS.
4365 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4366
4367 2018-07-17 Tom Tromey <tom@tromey.com>
4368
4369 PR gdb/18624:
4370 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4371
4372 2018-07-16 Jim Wilson <jimw@sifive.com>
4373
4374 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4375
4376 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4377
4378 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4379 variable.
4380 (libunwind_frame_sniffer): Likewise.
4381 (libunwind_frame_prev_register): Likewise.
4382 (libunwind_sigtramp_frame_sniffer): Likewise.
4383 * ia64-tdep.c (ia64_access_reg): Likewise.
4384 (ia64_access_rse_reg): Likewise.
4385 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4386 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4387
4388 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4389
4390 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4391
4392 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4393
4394 * remote-sim.c (gdbsim_target::close,
4395 gdbsim_target::mourn_inferior): Remove unused variables.
4396
4397 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4398
4399 * ia64-tdep.c (ktab_buf): New global.
4400 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4401 (get_kernel_table): Adjust.
4402
4403 2018-07-16 Tom Tromey <tom@tromey.com>
4404
4405 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4406 * dwarf2read.c (using_directives, new_symbol): Use
4407 outermost_context_p.
4408 * dbxread.c (process_one_symbol): Use outermost_context_p.
4409 * coffread.c (coff_symtab_read): Use outermost_context_p.
4410
4411 2018-07-16 Tom Tromey <tom@tromey.com>
4412
4413 * dwarf2read.c (using_directives, read_func_scope)
4414 (read_lexical_block_scope): Update.
4415 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4416 * buildsym.h (local_using_directives, global_using_directives):
4417 Don't declare.
4418 (get_local_using_directives, set_local_using_directives)
4419 (get_global_using_directives): Declare.
4420 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4421 m_global_using_directives>: New members.
4422 (finish_block_internal, prepare_for_building)
4423 (reset_symtab_globals, end_symtab_get_static_block)
4424 (push_context): Update.
4425 (get_local_using_directives, set_local_using_directives)
4426 (get_global_using_directives): New functions.
4427 (buildsym_init): Update.
4428
4429 2018-07-16 Tom Tromey <tom@tromey.com>
4430
4431 * xcoffread.c (xcoff_initial_scan): Don't call
4432 free_pending_blocks.
4433 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4434 * buildsym.h (class scoped_free_pendings): Add constructor.
4435 (free_pending_blocks): Don't declare.
4436 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4437 (free_pending_blocks): Now static.
4438
4439 2018-07-16 Tom Tromey <tom@tromey.com>
4440
4441 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4442 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4443 member.
4444 (struct subfile_stack): Remove.
4445 (subfile_stack): Remove.
4446 (push_subfile, pop_subfile, buildsym_init): Update.
4447
4448 2018-07-16 Tom Tromey <tom@tromey.com>
4449
4450 * buildsym.c (push_subfile): Use gdb_assert.
4451 (pop_subfile): Use gdb_assert.
4452
4453 2018-07-16 Tom Tromey <tom@tromey.com>
4454
4455 * buildsym.h (merge_symbol_lists): Remove.
4456 * buildsym.c (merge_symbol_lists): Remove.
4457
4458 2018-07-16 Tom Tromey <tom@tromey.com>
4459
4460 * stabsread.c (scan_file_globals): Update comment.
4461 * stabsread.h (scan_file_globals): Move from buildsym.h.
4462 * buildsym.h (scan_file_globals): Move to stabsread.h.
4463
4464 2018-07-16 Tom Tromey <tom@tromey.com>
4465
4466 * xcoffread.c (xcoff_new_init): Update.
4467 * mipsread.c (mipscoff_new_init): Update.
4468 * mdebugread.c (mdebug_build_psymtabs): Update.
4469 * elfread.c (elf_new_init): Update.
4470 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4471 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4472 * buildsym.h (buildsym_new_init): Don't declare.
4473 * buildsym.c (buildsym_new_init): Remove.
4474
4475 2018-07-16 Tom Tromey <tom@tromey.com>
4476
4477 * stabsread.h (within_function): Move from buildsym.h.
4478 * stabsread.c (start_stabs): Clear within_function.
4479 * coffread.c (coff_start_symtab): Clear within_function.
4480 * buildsym.h (within_function): Move to stabsread.h.
4481 * buildsym.c (prepare_for_building): Update.
4482
4483 2018-07-16 Tom Tromey <tom@tromey.com>
4484
4485 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4486 * dwarf2read.c (dwarf2_start_symtab): Don't set
4487 processing_gcc_compilation.
4488 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4489
4490 2018-07-16 Tom Tromey <tom@tromey.com>
4491
4492 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4493 (next_symbol_text_func): Move from buildsym.h.
4494 * stabsread.c (hashname): Move from buildsym.c.
4495 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4496 (next_symbol_text_func, hashname): Move to stabsread.h.
4497 * buildsym.c: Don't include bcache.h
4498 (hashname): Move to stasbread.c.
4499
4500 2018-07-16 Tom Tromey <tom@tromey.com>
4501
4502 * buildsym.h (context_stack_size): Don't declare.
4503 * buildsym.c (context_stack_size): New global.
4504
4505 2018-07-16 Tom Tromey <tom@tromey.com>
4506
4507 * dbxread.c (processing_acc_compilation): New global.
4508 * buildsym.h (processing_acc_compilation): Don't declare.
4509
4510 2018-07-16 Tom Tromey <tom@tromey.com>
4511
4512 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4513 * dbxread.c (read_ofile_symtab): Update.
4514 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4515 * buildsym.h (last_source_start_addr): Remove.
4516 (set_last_source_start_addr, get_last_source_start_addr):
4517 Declare.
4518 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4519 parameter.
4520 (struct buildsym_compunit) <m_last_source_start_addr>: New
4521 member.
4522 (prepare_for_building): Remove start_addr parameter.
4523 (start_symtab, restart_symtab, end_symtab_get_static_block)
4524 (end_symtab_with_blockvector): Update.
4525 (set_last_source_start_addr, get_last_source_start_addr): New
4526 functions.
4527
4528 2018-07-16 Tom Tromey <tom@tromey.com>
4529
4530 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4531 member.
4532 (have_line_numbers): Remove.
4533 (record_line, prepare_for_building, end_symtab_get_static_block)
4534 (augment_type_symtab): Update.
4535
4536 2018-07-16 Tom Tromey <tom@tromey.com>
4537
4538 * buildsym.c (~buildsym_compunit): Free the macro table.
4539 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4540 methods.
4541 <m_pending_macros>: New member.
4542 (pending_macros): Remove.
4543 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4544 (reset_symtab_globals, end_symtab_get_static_block)
4545 (end_symtab_with_blockvector, augment_type_symtab)
4546 (buildsym_init): Update.
4547
4548 2018-07-16 Tom Tromey <tom@tromey.com>
4549
4550 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4551 parameter.
4552 (buildsym_compunit::set_last_source_file): New method.
4553 <m_last_source_file>: New member.
4554 (prepare_for_building): Remove "name" parameter.
4555 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4556 (last_source_file): Remove.
4557 (set_last_source_file, get_last_source_file): Update.
4558
4559 2018-07-16 Tom Tromey <tom@tromey.com>
4560
4561 * buildsym.c (prepare_for_building): Add assert.
4562
4563 2018-07-16 Tom Tromey <tom@tromey.com>
4564
4565 * buildsym.c (~buildsym_compunit): Update.
4566 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4567 (start_subfile, patch_subfile_names)
4568 (end_symtab_with_blockvector): Update.
4569
4570 2018-07-16 Tom Tromey <tom@tromey.com>
4571
4572 * buildsym.c (struct buildsym_compunit): Add constructor,
4573 destructor, initializers.
4574 (start_buildsym_compunit): Remove.
4575 (free_buildsym_compunit): Use "delete".
4576 (start_symtab, restart_symtab): Use "new".
4577
4578 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4579
4580 * symfile.c (set_objfile_default_section_offset): Remove struct
4581 keyword.
4582
4583 2018-07-14 Stafford Horne <shorne@gmail.com>
4584
4585 * (Responsible Maintainers): Add myself as or1k maintainer.
4586
4587 2018-07-13 Tom Tromey <tom@tromey.com>
4588
4589 * symfile.c (set_objfile_default_section_offset): Use extra braces
4590 around initializer.
4591
4592 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4593
4594 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4595 non-branching basr.
4596
4597 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4598
4599 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4600 unittests/cli-utils-selftests.c
4601 * unittests/cli-utils-selftests.c: New file.
4602
4603 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4604
4605 * NEWS: Mention new commands. Mention change to 'thread apply'.
4606
4607 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4608
4609 * thread.c (thr_try_catch_cmd): New function.
4610 (thread_apply_all_command): Handle qcs flags.
4611 (thread_apply_command): Handle qcs flags.
4612 (taas_command): New function.
4613 (tfaas_command): New function.
4614 (_initialize_thread): Update to setup the new commands 'taas
4615 and 'tfaas'. Change doc string for 'thread apply'.
4616
4617 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4618
4619 * stack.c: (trailing_outermost_frame): New function, mostly
4620 extracted from backtrace_command_1.
4621 (leading_innermost_frame): New function.
4622 (backtrace_command_1): Update to call trailing_outermost_frame.
4623 (frame_apply_command_count): New function.
4624 (frame_apply_level_command): New function.
4625 (frame_apply_all_command): New function.
4626 (frame_apply_command): New function.
4627 (faas_command): New function.
4628 (frame_cmd_list): New variable.
4629 (_initialize_stack): Update to setup the new commands 'frame apply'
4630 and 'faas'.
4631
4632 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4633
4634 * cli-utils.c (number_or_range_parser::get_number): Only handle
4635 numbers or convenience var as numbers.
4636 (parse_flags): New function.
4637 (parse_flags_qcs): New function.
4638 (number_or_range_parser::finished): Ensure parsing end is detected
4639 before end of string.
4640 * cli-utils.h (parse_flags): New function.
4641 (parse_flags_qcs): New function.
4642 (number_or_range_parser): Remove m_finished bool.
4643 (number_or_range_parser::skip_range): Set m_in_range to false.
4644
4645 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4646
4647 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4648 on Windows.
4649
4650 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4651 Jan Kratochvil <jan.kratochvil@redhat.com>
4652 Paul Fertser <fercerpav@gmail.com>
4653 Tsutomu Seki <sekiriki@gmail.com>
4654 Pedro Alves <palves@redhat.com>
4655
4656 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4657 'unittests/parse-connection-spec-selftests.c'.
4658 (COMMON_SFILES): Add 'common/netstuff.c'.
4659 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4660 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4661 * common/netstuff.c: New file.
4662 * common/netstuff.h: New file.
4663 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4664 (wait_for_connect): Update comment. New parameter
4665 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4666 Use 'sock' directly instead of 'scb->fd'.
4667 (try_connect): New function, with code from 'net_open'.
4668 (net_open): Rewrite main loop to deal with multiple
4669 sockets/addresses. Handle IPv6-style hostnames; implement
4670 support for IPv6 connections.
4671 * unittests/parse-connection-spec-selftests.c: New file.
4672
4673 2018-07-11 Pedro Alves <palves@redhat.com>
4674
4675 PR gdb/23377
4676 * remote.c (remote_target::remote_detach_pid): Call
4677 set_current_process.
4678
4679 2018-07-11 Pedro Alves <palves@redhat.com>
4680
4681 * h8300-tdep.c (h8300_gdbarch_init): Remove
4682 set_gdbarch_ecoff_reg_to_regnum calls.
4683
4684 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4685
4686 PR c++/23373
4687 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4688 offsets/sizes for static members of a class/struct.
4689
4690 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4691
4692 * target-descriptions.c (tdesc_register_bitsize): Rename.
4693 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4694 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4695 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4696
4697 2018-07-10 Tom Tromey <tom@tromey.com>
4698
4699 * breakpoint.c (moribund_locations): Now static and a
4700 std::vector.
4701 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4702 (build_bpstat_chain, update_global_location_list)
4703 (breakpoint_retire_moribund): Update.
4704 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4705 VEC.
4706
4707 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4708
4709 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4710 (riscv_register_reggroup_p): Use new function, remove unneeded
4711 parenthesis.
4712 (riscv_push_dummy_call): Extend assert to compare against xlen or
4713 flen based on register type.
4714
4715 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4716
4717 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4718
4719 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4720
4721 * remote.c (show_hardware_watchpoint_limit): New function.
4722 (show_hardware_watchpoint_length_limit): New function.
4723 (show_hardware_breakpoint_limit): New function.
4724 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4725 where appropriate, update help text.
4726
4727 2018-07-09 Tom Tromey <tom@tromey.com>
4728
4729 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4730 (CLIBS): Don't mention NAT_CLIBS.
4731
4732 2018-07-09 Tom Tromey <tom@tromey.com>
4733
4734 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4735 (LIBGDB_OBS, clean mostlyclean): Update.
4736 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4737
4738 2018-07-09 Tom Tromey <tom@tromey.com>
4739
4740 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4741 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4742 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4743
4744 2018-07-09 Tom Tromey <tom@tromey.com>
4745
4746 * Makefile.in (ALLDEPFILES): Remove exec.c.
4747 (COMMON_OBS): Remove exec.o.
4748 (COMMON_SFILES): Add exec.c.
4749
4750 2018-07-09 Tom Tromey <tom@tromey.com>
4751
4752 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4753
4754 2018-07-09 Tom Tromey <tom@tromey.com>
4755
4756 * Makefile.in (clean mostlyclean): Remove stamp-version.
4757 (version.c): Depend on stamp-version.
4758 (stamp-version): New rule, from version.c rule.
4759
4760 2018-07-09 Tom Tromey <tom@tromey.com>
4761
4762 * Makefile.in (init.c): Depend on stamp-init.
4763 (stamp-init): New rule, from init.c rule.
4764 (clean mostlyclean): Remove stamp-init.
4765
4766 2018-07-09 Tom Tromey <tom@tromey.com>
4767
4768 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4769 SUBDIR_GCC_COMPILE_SRCS.
4770
4771 2018-07-09 Tom Tromey <tom@tromey.com>
4772
4773 * Makefile.in (init.c): Remove some unused sed rules.
4774
4775 2018-07-09 Tom Tromey <tom@tromey.com>
4776
4777 * Makefile.in (TSOBS): Remove.
4778 (INIT_FILES): Update.
4779 (LIBGDB_OBS): Update.
4780 (COMMON_SFILES): Add inflow.c.
4781 (SFILES): Remove inflow.c.
4782
4783 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4784
4785 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4786
4787 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4788
4789 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4790 get_saveloc_name, is_signal_frame_name, step_name,
4791 init_remote_name, create_addr_space_name,
4792 destroy_addr_space_name, search_unwind_table_name,
4793 find_dyn_list_name): Constify.
4794
4795 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4796
4797 * darwin-nat.c (darwin_pthread_kill): New function.
4798 (darwin_resume_thread): Use darwin_pthread_kill.
4799
4800 2018-07-05 Tom de Vries <tdevries@suse.de>
4801
4802 * macroexp.c (macro_buffer) <operator=>: New member function.
4803
4804 2018-07-04 Tom Tromey <tom@tromey.com>
4805
4806 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4807
4808 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4809
4810 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4811 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4812 * maint.c: Likewise.
4813 * top.c: Likewise.
4814
4815 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4816
4817 * NEWS: Create a new section for the next release branch.
4818 Rename the section of the current branch, now that it has
4819 been cut.
4820
4821 2018-07-04 Joel Brobecker <brobecker@adacore.com>
4822
4823 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4824 * version.in: Bump version to 8.2.50.DATE-git.
4825
4826 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
4827 Pedro Alves <palves@redhat.com>
4828
4829 * linux-nat.c (linux_init_ptrace): Rename to ...
4830 (linux_init_ptrace_procfs): ... this. Call
4831 linux_proc_init_warnings.
4832 (linux_nat_target::post_attach)
4833 (linux_nat_target::post_startup_inferior): Adjust.
4834 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4835 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4836
4837 2018-07-04 Tom de Vries <tdevries@suse.de>
4838
4839 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4840 check ...
4841 (read_comp_unit_head): ... here.
4842
4843 2018-07-03 Tom Tromey <tom@tromey.com>
4844
4845 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4846 (stop_tracing, tstatus_command)
4847 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4848 (print_one_static_tracepoint_marker): Update.
4849 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4850 std::vector.
4851 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
4852 VEC.
4853 (all_tracepoints, static_tracepoints_here): Return std::vector.
4854
4855 2018-07-03 Tom Tromey <tom@tromey.com>
4856
4857 * common/ptid.c (ptid_equal): Remove.
4858 * common/ptid.h (ptid_equal): Don't declare.
4859 * ada-tasks.c: Update.
4860 * breakpoint.c: Update.
4861 * common/agent.c: Update.
4862 * corelow.c: Update.
4863 * darwin-nat-info.c: Update.
4864 * darwin-nat.c: Update.
4865 * dcache.c: Update.
4866 * dtrace-probe.c: Update.
4867 * dummy-frame.c: Update.
4868 * fbsd-nat.c: Update.
4869 * frame.c: Update.
4870 * gdbthread.h: Update.
4871 * gnu-nat.c: Update.
4872 * go32-nat.c: Update.
4873 * inf-loop.c: Update.
4874 * inf-ptrace.c: Update.
4875 * infcall.c: Update.
4876 * infcmd.c: Update.
4877 * inflow.c: Update.
4878 * infrun.c: Update.
4879 * linux-fork.c: Update.
4880 * linux-nat.c: Update.
4881 * linux-thread-db.c: Update.
4882 * mi/mi-cmd-var.c: Update.
4883 * mi/mi-interp.c: Update.
4884 * mi/mi-main.c: Update.
4885 * nto-procfs.c: Update.
4886 * ppc-linux-tdep.c: Update.
4887 * procfs.c: Update.
4888 * python/py-inferior.c: Update.
4889 * python/py-record-btrace.c: Update.
4890 * python/py-record.c: Update.
4891 * ravenscar-thread.c: Update.
4892 * regcache.c: Update.
4893 * remote-sim.c: Update.
4894 * remote.c: Update.
4895 * sol-thread.c: Update.
4896 * solib.c: Update.
4897 * target.c: Update.
4898 * tui/tui-stack.c: Update.
4899 * varobj.c: Update.
4900 * windows-nat.c: Update.
4901 * windows-tdep.c: Update.
4902
4903 2018-07-03 Tom Tromey <tom@tromey.com>
4904
4905 * common/ptid.c (ptid_match): Remove.
4906 * common/ptid.h (ptid_match): Don't declare.
4907 * fbsd-nat.c: Update.
4908 * infcmd.c: Update.
4909 * infrun.c: Update.
4910 * linux-nat.c: Update.
4911 * record-btrace.c: Update.
4912 * regcache.c: Update.
4913 * remote.c: Update.
4914
4915 2018-07-03 Tom Tromey <tom@tromey.com>
4916
4917 * common/ptid.c (ptid_tid_p): Remove.
4918 * common/ptid.h (ptid_tid_p): Don't declare.
4919 * sol-thread.c: Update.
4920
4921 2018-07-03 Tom Tromey <tom@tromey.com>
4922
4923 * common/ptid.c (ptid_lwp_p): Remove.
4924 * common/ptid.h (ptid_lwp_p): Don't declare.
4925 * fbsd-nat.c: Update.
4926 * linux-nat.c: Update.
4927 * nat/linux-procfs.c: Update.
4928 * nat/x86-linux-dregs.c: Update.
4929 * sol-thread.c: Update.
4930
4931 2018-07-03 Tom Tromey <tom@tromey.com>
4932
4933 * common/ptid.c (ptid_is_pid): Remove.
4934 * common/ptid.h (ptid_is_pid): Don't declare.
4935 * infrun.c: Update.
4936 * linux-nat.c: Update.
4937 * mi/mi-interp.c: Update.
4938 * remote.c: Update.
4939 * thread.c: Update.
4940
4941 2018-07-03 Tom Tromey <tom@tromey.com>
4942
4943 * common/ptid.c (ptid_get_tid): Remove.
4944 * common/ptid.h (ptid_get_tid): Don't declare.
4945 * ada-tasks.c: Update.
4946 * aix-thread.c: Update.
4947 * bsd-uthread.c: Update.
4948 * darwin-nat.c: Update.
4949 * fbsd-nat.c: Update.
4950 * i386-darwin-nat.c: Update.
4951 * infrun.c: Update.
4952 * linux-tdep.c: Update.
4953 * nto-procfs.c: Update.
4954 * ppc-ravenscar-thread.c: Update.
4955 * python/py-infthread.c: Update.
4956 * ravenscar-thread.c: Update.
4957 * sol-thread.c: Update.
4958 * sparc-ravenscar-thread.c: Update.
4959 * windows-nat.c: Update.
4960
4961 2018-07-03 Tom Tromey <tom@tromey.com>
4962
4963 * common/ptid.c (ptid_get_lwp): Remove.
4964 * common/ptid.h (ptid_get_lwp): Don't declare.
4965 * aarch64-linux-nat.c: Update.
4966 * ada-tasks.c: Update.
4967 * aix-thread.c: Update.
4968 * amd64-linux-nat.c: Update.
4969 * arm-linux-nat.c: Update.
4970 * corelow.c: Update.
4971 * fbsd-nat.c: Update.
4972 * fbsd-tdep.c: Update.
4973 * gnu-nat.c: Update.
4974 * i386-cygwin-tdep.c: Update.
4975 * i386-gnu-nat.c: Update.
4976 * i386-linux-nat.c: Update.
4977 * ia64-linux-nat.c: Update.
4978 * inf-ptrace.c: Update.
4979 * infrun.c: Update.
4980 * linux-fork.c: Update.
4981 * linux-nat.c: Update.
4982 * linux-tdep.c: Update.
4983 * linux-thread-db.c: Update.
4984 * mips-linux-nat.c: Update.
4985 * nat/aarch64-linux-hw-point.c: Update.
4986 * nat/aarch64-linux.c: Update.
4987 * nat/linux-btrace.c: Update.
4988 * nat/linux-osdata.c: Update.
4989 * nat/linux-procfs.c: Update.
4990 * nat/x86-linux-dregs.c: Update.
4991 * obsd-nat.c: Update.
4992 * ppc-fbsd-nat.c: Update.
4993 * ppc-linux-nat.c: Update.
4994 * procfs.c: Update.
4995 * python/py-infthread.c: Update.
4996 * ravenscar-thread.c: Update.
4997 * remote.c: Update.
4998 * s390-linux-nat.c: Update.
4999 * sol-thread.c: Update.
5000 * sol2-tdep.c: Update.
5001 * spu-linux-nat.c: Update.
5002 * x86-linux-nat.c: Update.
5003 * xtensa-linux-nat.c: Update.
5004
5005 2018-07-03 Tom Tromey <tom@tromey.com>
5006
5007 * common/ptid.c (ptid_get_pid): Remove.
5008 * common/ptid.h (ptid_get_pid): Don't declare.
5009 * aarch64-linux-nat.c: Update.
5010 * ada-lang.c: Update.
5011 * aix-thread.c: Update.
5012 * alpha-bsd-nat.c: Update.
5013 * amd64-fbsd-nat.c: Update.
5014 * amd64-linux-nat.c: Update.
5015 * arm-linux-nat.c: Update.
5016 * arm-nbsd-nat.c: Update.
5017 * auxv.c: Update.
5018 * break-catch-syscall.c: Update.
5019 * breakpoint.c: Update.
5020 * bsd-uthread.c: Update.
5021 * corelow.c: Update.
5022 * ctf.c: Update.
5023 * darwin-nat.c: Update.
5024 * fbsd-nat.c: Update.
5025 * fbsd-tdep.c: Update.
5026 * gcore.c: Update.
5027 * gnu-nat.c: Update.
5028 * hppa-nbsd-nat.c: Update.
5029 * hppa-obsd-nat.c: Update.
5030 * i386-fbsd-nat.c: Update.
5031 * ia64-linux-nat.c: Update.
5032 * inf-ptrace.c: Update.
5033 * infcmd.c: Update.
5034 * inferior.c: Update.
5035 * inferior.h: Update.
5036 * inflow.c: Update.
5037 * infrun.c: Update.
5038 * linux-fork.c: Update.
5039 * linux-nat.c: Update.
5040 * linux-tdep.c: Update.
5041 * linux-thread-db.c: Update.
5042 * m68k-bsd-nat.c: Update.
5043 * mi/mi-interp.c: Update.
5044 * mi/mi-main.c: Update.
5045 * mips-linux-nat.c: Update.
5046 * mips-nbsd-nat.c: Update.
5047 * mips64-obsd-nat.c: Update.
5048 * nat/aarch64-linux-hw-point.c: Update.
5049 * nat/aarch64-linux.c: Update.
5050 * nat/linux-btrace.c: Update.
5051 * nat/linux-osdata.c: Update.
5052 * nat/linux-procfs.c: Update.
5053 * nat/x86-linux-dregs.c: Update.
5054 * nto-procfs.c: Update.
5055 * obsd-nat.c: Update.
5056 * ppc-linux-nat.c: Update.
5057 * ppc-nbsd-nat.c: Update.
5058 * ppc-obsd-nat.c: Update.
5059 * proc-service.c: Update.
5060 * procfs.c: Update.
5061 * python/py-inferior.c: Update.
5062 * python/py-infthread.c: Update.
5063 * ravenscar-thread.c: Update.
5064 * record.c: Update.
5065 * remote-sim.c: Update.
5066 * remote.c: Update.
5067 * rs6000-nat.c: Update.
5068 * s390-linux-nat.c: Update.
5069 * sh-nbsd-nat.c: Update.
5070 * sol-thread.c: Update.
5071 * sparc-nat.c: Update.
5072 * sparc64-tdep.c: Update.
5073 * spu-linux-nat.c: Update.
5074 * spu-tdep.c: Update.
5075 * target-debug.h: Update.
5076 * target.c: Update.
5077 * thread.c: Update.
5078 * tid-parse.c: Update.
5079 * tracefile-tfile.c: Update.
5080 * vax-bsd-nat.c: Update.
5081 * windows-nat.c: Update.
5082 * x86-linux-nat.c: Update.
5083 * x86-nat.c: Update.
5084
5085 2018-07-03 Tom Tromey <tom@tromey.com>
5086
5087 * common/ptid.c (pid_to_ptid): Remove.
5088 * common/ptid.h (pid_to_ptid): Don't declare.
5089 * aix-thread.c: Update.
5090 * arm-linux-nat.c: Update.
5091 * common/ptid.c: Update.
5092 * common/ptid.h: Update.
5093 * corelow.c: Update.
5094 * ctf.c: Update.
5095 * darwin-nat.c: Update.
5096 * fbsd-nat.c: Update.
5097 * fork-child.c: Update.
5098 * gnu-nat.c: Update.
5099 * go32-nat.c: Update.
5100 * inf-ptrace.c: Update.
5101 * infcmd.c: Update.
5102 * inferior.c: Update.
5103 * infrun.c: Update.
5104 * linux-fork.c: Update.
5105 * linux-nat.c: Update.
5106 * nat/aarch64-linux-hw-point.c: Update.
5107 * nat/fork-inferior.c: Update.
5108 * nat/x86-linux-dregs.c: Update.
5109 * nto-procfs.c: Update.
5110 * obsd-nat.c: Update.
5111 * procfs.c: Update.
5112 * progspace.c: Update.
5113 * remote.c: Update.
5114 * rs6000-nat.c: Update.
5115 * s390-linux-nat.c: Update.
5116 * sol-thread.c: Update.
5117 * spu-linux-nat.c: Update.
5118 * target.c: Update.
5119 * top.c: Update.
5120 * tracefile-tfile.c: Update.
5121 * windows-nat.c: Update.
5122
5123 2018-07-03 Tom Tromey <tom@tromey.com>
5124
5125 * common/ptid.h (ptid_build): Don't declare.
5126 * common/ptid.c (ptid_build): Remove.
5127 * aix-thread.c: Update.
5128 * bsd-kvm.c: Update.
5129 * bsd-uthread.c: Update.
5130 * common/agent.c: Update.
5131 * common/ptid.c: Update.
5132 * common/ptid.h: Update.
5133 * corelow.c: Update.
5134 * darwin-nat.c: Update.
5135 * fbsd-nat.c: Update.
5136 * gnu-nat.c: Update.
5137 * linux-fork.c: Update.
5138 * linux-nat.c: Update.
5139 * linux-thread-db.c: Update.
5140 * nat/linux-osdata.c: Update.
5141 * nat/linux-procfs.c: Update.
5142 * nto-procfs.c: Update.
5143 * obsd-nat.c: Update.
5144 * proc-service.c: Update.
5145 * procfs.c: Update.
5146 * ravenscar-thread.c: Update.
5147 * remote-sim.c: Update.
5148 * remote.c: Update.
5149 * sol-thread.c: Update.
5150 * target.c: Update.
5151 * windows-nat.c: Update.
5152
5153 2018-07-03 Tom Tromey <tom@tromey.com>
5154
5155 * infrun.c (follow_exec): Use exit_inferior_silent.
5156 * inferior.c (exit_inferior_num_silent): Remove.
5157 * inferior.h (exit_inferior_num_silent): Don't declare.
5158
5159 2018-07-03 Tom Tromey <tom@tromey.com>
5160
5161 PR cli/23340:
5162 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5163 inferior_ptid on error.
5164
5165 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5166 Simon Marchi <simon.marchi@polymtl.ca>
5167
5168 PR tdep/8282
5169 * disasm.h (gdb_disassembler): Add
5170 `m_disassembler_options_holder'. member
5171 * disasm.c (get_all_disassembler_options): New function.
5172 (gdb_disassembler::gdb_disassembler): Use it.
5173 (gdb_buffered_insn_length_init_dis): Likewise.
5174 (gdb_buffered_insn_length): Adjust accordingly.
5175 (set_disassembler_options): Handle options with arguments.
5176 (show_disassembler_options_sfunc): Likewise. Add a leading new
5177 line if showing options with descriptions.
5178 (disassembler_options_completer): Adapt to using the
5179 `disasm_options_and_args_t' structure.
5180 * mips-tdep.c (mips_disassembler_options): New variable.
5181 (mips_disassembler_options_o32): Likewise.
5182 (mips_disassembler_options_n32): Likewise.
5183 (mips_disassembler_options_n64): Likewise.
5184 (gdb_print_insn_mips): Don't set `disassembler_options'.
5185 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5186 functions.
5187 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5188 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5189 `gdbarch_disassembler_options_implicit' and
5190 `gdbarch_valid_disassembler_options'.
5191 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5192 `disasm_options_and_args_t' structure.
5193 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5194 method.
5195 (valid_disassembler_options): Switch from `disasm_options_t' to
5196 the `disasm_options_and_args_t' structure.
5197 * NEWS: Document `set disassembler-options' support for the MIPS
5198 target.
5199 * gdbarch.h: Regenerate.
5200 * gdbarch.c: Regenerate.
5201
5202 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5203
5204 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5205
5206 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5207
5208 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5209 parameter in call to amd64_target_description.
5210 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5211 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5212 (amd64fbsd_init_abi): Likewise.
5213 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5214 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5215 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5216 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5217
5218 2018-06-29 Pedro Alves <palves@redhat.com>
5219
5220 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5221 "segments" parameter.
5222 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5223 (_initialize_amd64_tdep): Update call to
5224 amd64_create_target_description.
5225 (amd64_target_description): Add "segments" parameter. Adjust
5226 the implementation to use it.
5227 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5228 call to amd64_create_target_description.
5229 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5230 * gdb/arch/amd64.h (amd64_create_target_description): Add
5231 "segments" register.
5232 * gdb/arch/amd64.c (amd64_create_target_description): Add
5233 "segments" parameter. Call create_feature_i386_64bit_segments
5234 only if SEGMENTS is true.
5235 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5236 call to amd64_create_target_description.
5237
5238 2018-06-29 Pedro Alves <palves@redhat.com>
5239
5240 * thread.c (thread_target_id_str): New, factored out from ...
5241 (print_thread_info_1): ... here. Use it to compute the max
5242 "Target Id" column width.
5243
5244 2018-06-29 Pedro Alves <palves@redhat.com>
5245
5246 * remote.c (remote_target::extra_thread_info): Delete
5247 'display_buf' and 'n' locals. from the cache, regardless of
5248 packet mechanims is in use. Use cache for qThreadExtra and qP
5249 methods too.
5250
5251 2018-06-29 Pedro Alves <palves@redhat.com>
5252
5253 * blockframe.c (find_pc_sect_containing_function): New function.
5254 * breakpoint.c (print_breakpoint_location): Don't call
5255 find_pc_sect_function.
5256 * linespec.c (create_sals_line_offset): Record the location's
5257 symbol in the sal.
5258 * linespec.c (convert_address_location_to_sals): Fill in sal's
5259 symbol with find_pc_sect_containing_function.
5260 * symtab.c (find_function_start_sal): Rename to ...
5261 (find_function_start_sal_1): ... this.
5262 (find_function_start_sal): Reimplement as wrapper around
5263 find_function_start_sal_1, and use
5264 find_pc_sect_containing_function to fill in the sal's symbol.
5265 (find_function_start_sal(symbol*, bool)): Adjust.
5266 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5267 comments.
5268 (find_pc_sect_containing_function): Declare.
5269
5270 2018-06-29 Pedro Alves <palves@redhat.com>
5271
5272 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5273 true if the the location has no symbol.
5274
5275 2018-06-28 Tom Tromey <tom@tromey.com>
5276
5277 * NEWS: Mention --enable-codesign.
5278 * silent-rules.mk (ECHO_SIGN): New variable.
5279 * configure.ac: Add --enable-codesign.
5280 * configure: Rebuild.
5281 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5282 (gdb$(EXEEXT)): Optionally invoke codesign.
5283
5284 2018-06-28 Pedro Alves <palves@redhat.com>
5285
5286 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5287 comments.
5288 (switch_to_thread_no_regs): Adjust comment.
5289 * infcmd.c (stop_pc): Delete.
5290 (post_create_inferior, info_program_command): Replace references
5291 to stop_pc with references to thread_info->suspend.stop_pc.
5292 * inferior.h (stop_pc): Delete declaration.
5293 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5294 (handle_inferior_event_1, handle_signal_stop)
5295 (process_event_stop_test, keep_going_stepped_thread)
5296 (handle_step_into_function, handle_step_into_function_backward)
5297 (print_stop_location): Replace references to stop_pc with
5298 references to thread_info->suspend.stop_pc.
5299 (struct infcall_suspend_state) <stop_pc>: Delete field.
5300 (save_infcall_suspend_state, restore_infcall_suspend_state):
5301 Remove references to inf_stat->stop_pc.
5302 * linux-fork.c (fork_load_infrun_state): Likewise.
5303 * record-btrace.c (record_btrace_set_replay): Likewise.
5304 * record-full.c (record_full_goto_entry): Likewise.
5305 * remote.c (print_one_stopped_thread): Likewise.
5306 * target.c (target_resume): Extend comment.
5307 * thread.c (set_executing_thread): New.
5308 (set_executing): Use it.
5309 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5310 Remove references to stop_pc.
5311
5312 2018-06-28 Pedro Alves <palves@redhat.com>
5313
5314 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5315 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5316
5317 2018-06-28 Tom Tromey <tom@tromey.com>
5318
5319 * coffread.c (coff_symfile_finish): Update.
5320 * xcoffread.c (xcoff_symfile_finish): Update.
5321 * elfread.c (elf_symfile_finish): Update.
5322 * symfile.h (dwarf2_free_objfile): Don't declare.
5323 * dwarf2read.c (_initialize_dwarf2_read): Use
5324 register_objfile_data_with_cleanup.
5325 (dwarf2_free_objfile): Now static. Change signature.
5326
5327 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5328
5329 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5330 option "-o" to add-symbol-file-load to add an offset to each
5331 section's load address.
5332 * symfile.c (set_objfile_default_section_offset): New function.
5333
5334 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5335
5336 * symfile.c (add_symbol_file_command): Make sure that sections
5337 with the same name are sorted in the same order.
5338
5339 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5340
5341 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5342 require the second argument. If omitted, load sections at the
5343 addresses specified in the file.
5344
5345 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5346
5347 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5348 (_initialize_symfile): Add option "-o" to symbol-file to add an
5349 offset to each section of the symbol file.
5350
5351 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5352
5353 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5354
5355 2018-06-27 Tom Tromey <tom@tromey.com>
5356
5357 * stack.c (_initialize_stack): Update "func" help text.
5358
5359 2018-06-27 Tom Tromey <tom@tromey.com>
5360
5361 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5362 std::vector.
5363 (unwind_infopy_str, pyuw_create_unwind_info)
5364 (unwind_infopy_add_saved_register, pyuw_sniffer)
5365 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5366 Update.
5367 (struct saved_reg): Add constructor.
5368 <value>: Now a gdbpy_ref<>.
5369
5370 2018-06-27 Tom Tromey <tom@tromey.com>
5371
5372 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5373
5374 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5375
5376 * gdb-gdb.py.in: Format using autopep8.
5377
5378 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5379
5380 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5381 (type_lookup_function): Recognize CORE_ADDR values.
5382
5383 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5384
5385 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5386 print tag_name.
5387
5388 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5389
5390 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5391 <__lt__>: Add.
5392
5393 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5394
5395 * gdb-gdb.py: Move to...
5396 * gdb-gdb.py.in: ... here.
5397 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5398 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5399 dependencies.
5400 (distclean): Remove gdb-gdb.py when cleaning.
5401 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5402 * configure: Re-generate.
5403
5404 2018-06-27 Pedro Alves <palves@redhat.com>
5405
5406 * proc-service.c (get_ps_regcache): New.
5407 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5408 (ps_lsetfpregs): Use it.
5409
5410 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5411
5412 PR gdb/21695
5413 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5414 (dwarf_decode_lines_1): Adjust.
5415
5416 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5417
5418 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5419 override.
5420 <info_proc>: Likewise.
5421
5422 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5423
5424 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5425 to windows_fetch_one_register, and only handle the case of
5426 fetching one register. Move the code that reloads the context
5427 and iterates over all registers if R is negative to...
5428 (windows_nat_target::fetch_registers): ... here.
5429 (do_windows_store_inferior_registers): Rename to
5430 windows_store_one_register, and only handle the case of storing
5431 one register. Move the code that handles the case where r is
5432 negative to...
5433 (windows_nat_target::store_registers) ... here.
5434
5435 2018-06-26 Tom Tromey <tom@tromey.com>
5436
5437 PR rust/22574:
5438 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5439 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5440 Update.
5441 (rust_internal_print_type): Add podata parameter.
5442 (rust_print_type): Update.
5443
5444 2018-06-26 Tom Tromey <tom@tromey.com>
5445
5446 * typeprint.h (struct print_offset_data) <update, finish,
5447 maybe_print_hole>: New methods.
5448 <indentation>: New constant.
5449 * typeprint.c (print_offset_data::indentation): Define.
5450 (print_offset_data::maybe_print_hole, print_offset_data::update)
5451 (print_offset_data::finish): Move from c-typeprint.c and rename.
5452 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5453 (print_spaces_filtered_with_print_options): Update.
5454 (c_print_type_union_field_offset, maybe_print_hole)
5455 (c_print_type_struct_field_offset): Move to typeprint.c and
5456 rename.
5457 (c_type_print_base_struct_union): Update.
5458
5459 2018-06-25 Pedro Alves <palves@redhat.com>
5460
5461 * gdbthread.h (thread_info_ref, delete_thread)
5462 (delete_thread_silent, first_thread_of_inferior)
5463 (any_thread_of_inferior, switch_to_thread)
5464 (enable_thread_stack_temporaries)
5465 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5466 (get_last_thread_stack_temporary)
5467 (value_in_thread_stack_temporaries, can_access_registers_thread):
5468 Spell out "struct thread_info" instead of just "thread_info".
5469 * inferior.h (notice_new_inferior): Likewise.
5470
5471 2018-06-25 Pedro Alves <palves@redhat.com>
5472
5473 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5474 pass thread_info pointer to delete_thread.
5475 (windows_nat_target::detach): Pass inferior pointer to
5476 detach_inferior.
5477 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5478 delete_thread.
5479 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5480 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5481 and pass a thread_info pointer to delete_thread.
5482 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5483 pass thread_info pointer to delete_thread.
5484 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5485 delete_thread_silent call.
5486 * procfs.c (procfs_target::detach): Pass inferior pointer to
5487 detach_inferior.
5488 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5489 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5490 delete_thread_silent call.
5491 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5492 pass thread_info pointer to delete_thread.
5493 (windows_nat_target::detach): Pass inferior pointer to
5494 delete_inferior.
5495
5496 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5497
5498 * regcache.c (readable_regcache::read_part): Fix asserts.
5499 (reg_buffer::raw_collect_part): New function.
5500 (regcache::write_part): Fix asserts.
5501 (reg_buffer::raw_supply_part): New function.
5502 (regcache::transfer_regset_register): New helper function.
5503 (regcache::transfer_regset): Call new functions.
5504 (regcache_supply_regset): Use gdb_byte*.
5505 (regcache::supply_regset): Likewise.
5506 (regcache_collect_regset): Likewise.
5507 (regcache::collect_regset): Likewise.
5508 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5509 (reg_buffer::raw_supply_part): Likewise.
5510 (regcache::transfer_regset_register): Likewise.
5511 (regcache::transfer_regset): Use gdb_byte*.
5512
5513 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5514
5515 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5516
5517 2018-06-21 Pedro Alves <palves@redhat.com>
5518
5519 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5520 instead of a ptid_t. All callers adjusted.
5521 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5522 adjusted.
5523 (print_ada_task_info, display_current_task_id, task_command_1):
5524 Adjust.
5525 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5526 inferior_thread.
5527 (breakpoint_kind): Adjust.
5528 (remove_breakpoints_pid): Rename to ...
5529 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5530 pointer. All callers adjusted.
5531 (bpstat_clear_actions): Use inferior_thread.
5532 (get_bpstat_thread): New.
5533 (bpstat_do_actions): Use it.
5534 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5535 to take a thread_info pointer. All callers adjusted.
5536 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5537 (breakpoint_re_set_thread): Use inferior_thread.
5538 * breakpoint.h (struct inferior): Forward declare.
5539 (bpstat_stop_status): Update.
5540 (remove_breakpoints_pid): Delete.
5541 (remove_breakpoints_inf): New.
5542 * bsd-uthread.c (bsd_uthread_target::wait)
5543 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5544 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5545 (maint_btrace_packet_history_cmd)
5546 (maint_btrace_clear_packet_history_cmd): Adjust.
5547 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5548 inferior_thread.
5549 * cli/cli-interp.c: Include "inferior.h".
5550 * common/refcounted-object.h (struct
5551 refcounted_object_ref_policy): New.
5552 * compile/compile-object-load.c: Include gdbthread.h.
5553 (store_regs): Use inferior_thread.
5554 * corelow.c (core_target::close): Use current_inferior.
5555 (core_target_open): Adjust to use first_thread_of_inferior and use
5556 the current inferior.
5557 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5558 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5559 <thread>: ... this new field. All references adjusted.
5560 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5561 Take a thread_info pointer instead of a ptid_t.
5562 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5563 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5564 thread_info pointer instead of a ptid_t.
5565 * elfread.c: Include "inferior.h".
5566 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5567 Use inferior_thread.
5568 * eval.c (evaluate_subexp): Likewise.
5569 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5570 inferior_thread.
5571 * gdb_proc_service.h (struct thread_info): Forward declare.
5572 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5573 <thread>: ... this new field. All references adjusted.
5574 * gdbarch.h, gdbarch.c: Regenerate.
5575 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5576 'thread' parameter. All implementations and callers adjusted.
5577 * gdbthread.h (thread_info) <set_running>: New method.
5578 (delete_thread, delete_thread_silent): Take a thread_info pointer
5579 instead of a ptid.
5580 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5581 (first_thread_of_process): Delete, replaced by ...
5582 (first_thread_of_inferior): ... this new function. All callers
5583 adjusted.
5584 (any_live_thread_of_process): Delete, replaced by ...
5585 (any_live_thread_of_inferior): ... this new function. All callers
5586 adjusted.
5587 (switch_to_thread, switch_to_no_thread): Declare.
5588 (is_executing): Delete.
5589 (enable_thread_stack_temporaries): Update comment.
5590 <enable_thread_stack_temporaries>: Take a thread_info pointer
5591 instead of a ptid_t. Incref the thread.
5592 <~enable_thread_stack_temporaries>: Decref the thread.
5593 <m_ptid>: Delete
5594 <m_thr>: New.
5595 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5596 (get_last_thread_stack_temporary)
5597 (value_in_thread_stack_temporaries, can_access_registers_thread):
5598 Take a thread_info pointer instead of a ptid_t. All callers
5599 adjusted.
5600 * infcall.c (get_call_return_value): Use inferior_thread.
5601 (run_inferior_call): Work with thread pointers instead of ptid_t.
5602 (call_function_by_hand_dummy): Work with thread pointers instead
5603 of ptid_t. Use thread_info_ref.
5604 * infcmd.c (proceed_thread_callback): Access thread's state
5605 directly.
5606 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5607 access thread's state directly.
5608 (continue_command): Use inferior_thread.
5609 (info_program_command): Use find_thread_ptid and access thread
5610 state directly.
5611 (proceed_after_attach_callback): Use thread state directly.
5612 (notice_new_inferior): Take a thread_info pointer instead of a
5613 ptid_t. All callers adjusted.
5614 (exit_inferior): Take an inferior pointer instead of a pid. All
5615 callers adjusted.
5616 (exit_inferior_silent): New.
5617 (detach_inferior): Delete.
5618 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5619 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5620 (detach_inferior_command, kill_inferior_command): Use
5621 find_inferior_id instead of valid_gdb_inferior_id and
5622 gdb_inferior_id_to_pid.
5623 (inferior_command): Use inferior and thread pointers.
5624 * inferior.h (struct thread_info): Forward declare.
5625 (notice_new_inferior): Take a thread_info pointer instead of a
5626 ptid_t. All callers adjusted.
5627 (detach_inferior): Delete declaration.
5628 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5629 instead of a pid. All callers adjusted.
5630 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5631 (valid_gdb_inferior_id): Delete.
5632 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5633 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5634 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5635 ...
5636 <inf>: ... this new field.
5637 <step_ptid>: Delete, replaced by ...
5638 <step_thread>: ... this new field.
5639 (get_displaced_stepping_state): Take an inferior pointer instead
5640 of a pid. All callers adjusted.
5641 (displaced_step_in_progress_any_inferior): Adjust.
5642 (displaced_step_in_progress_thread): Take a thread pointer instead
5643 of a ptid_t. All callers adjusted.
5644 (displaced_step_in_progress, add_displaced_stepping_state): Take
5645 an inferior pointer instead of a pid. All callers adjusted.
5646 (get_displaced_step_closure_by_addr): Adjust.
5647 (remove_displaced_stepping_state): Take an inferior pointer
5648 instead of a pid. All callers adjusted.
5649 (displaced_step_prepare_throw, displaced_step_prepare)
5650 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5651 All callers adjusted.
5652 (start_step_over): Adjust.
5653 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5654 displaced step queue.
5655 (do_target_resume): Adjust.
5656 (fetch_inferior_event): Use inferior_thread.
5657 (context_switch, get_inferior_stop_soon): Take an
5658 execution_control_state pointer instead of a ptid_t. All callers
5659 adjusted.
5660 (switch_to_thread_cleanup): Delete.
5661 (stop_all_threads): Use scoped_restore_current_thread.
5662 * inline-frame.c: Include "gdbthread.h".
5663 (inline_state) <inline_state>: Take a thread pointer instead of a
5664 ptid_t. All callers adjusted.
5665 <ptid>: Delete, replaced by ...
5666 <thread>: ... this new field.
5667 (find_inline_frame_state): Take a thread pointer instead of a
5668 ptid_t. All callers adjusted.
5669 (skip_inline_frames, step_into_inline_frame)
5670 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5671 pointer instead of a ptid_t. All callers adjusted.
5672 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5673 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5674 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5675 pointers directly.
5676 * linux-nat.c (get_detach_signal): Likewise.
5677 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5678 (thread_db_notice_clone): Adjust.
5679 (thread_db_find_new_threads_silently)
5680 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5681 a thread pointer instead of a ptid_t. All callers adjusted.
5682 * mi/mi-cmd-var.c: Include "inferior.h".
5683 (mi_cmd_var_update_iter): Update to use thread pointers.
5684 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5685 inferior directly.
5686 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5687 out to ...
5688 (mi_output_running): ... this new function.
5689 (mi_on_resume_1): Adjust to use it.
5690 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5691 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5692 directly.
5693 (interrupt_thread_callback): : Adjust to use thread and inferior
5694 pointers.
5695 * proc-service.c: Include "gdbthread.h".
5696 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5697 * progspace-and-thread.c: Include "inferior.h".
5698 * progspace.c: Include "inferior.h".
5699 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5700 hold a reference to an inferior_object.
5701 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5702 inferior_thread.
5703 * python/py-inferior.c (struct inferior_object): Give the type a
5704 tag name instead of a typedef.
5705 (python_on_normal_stop): No need to check if the current thread is
5706 listed.
5707 (inferior_to_inferior_object): Change return type to
5708 inferior_object. All callers adjusted.
5709 (find_thread_object): Delete, bits factored out to ...
5710 (thread_to_thread_object): ... this new function.
5711 * python/py-infthread.c (create_thread_object): Use
5712 inferior_to_inferior_object.
5713 (thpy_is_stopped): Use thread pointer directly.
5714 (gdbpy_selected_thread): Use inferior_thread.
5715 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5716 field, replaced with ...
5717 <thread>: ... this new field. All users adjusted.
5718 (btpy_insn_or_gap_new): Drop const.
5719 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5720 callers adjusted.
5721 * python/py-record.c: Include "gdbthread.h".
5722 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5723 a ptid_t. All callers adjusted.
5724 (gdbpy_current_recording): Use inferior_thread.
5725 * python/py-record.h (recpy_record_object) <ptid>: Delete
5726 field, replaced with ...
5727 <thread>: ... this new field. All users adjusted.
5728 (recpy_element_object) <ptid>: Delete
5729 field, replaced with ...
5730 <thread>: ... this new field. All users adjusted.
5731 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5732 a ptid_t. All callers adjusted.
5733 * python/py-threadevent.c: Include "gdbthread.h".
5734 (get_event_thread): Use thread_to_thread_object.
5735 * python/python-internal.h (struct inferior_object): Forward
5736 declare.
5737 (find_thread_object, find_inferior_object): Delete declarations.
5738 (thread_to_thread_object, inferior_to_inferior_object): New
5739 declarations.
5740 * record-btrace.c: Include "inferior.h".
5741 (require_btrace_thread): Use inferior_thread.
5742 (record_btrace_frame_sniffer)
5743 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5744 (get_thread_current_frame): Use scoped_restore_current_thread and
5745 switch_to_thread.
5746 (get_thread_current_frame): Use thread pointer directly.
5747 (record_btrace_replay_at_breakpoint): Use thread's inferior
5748 pointer directly.
5749 * record-full.c: Include "inferior.h".
5750 * regcache.c: Include "gdbthread.h".
5751 (get_thread_arch_regcache): Use the inferior's address space
5752 directly.
5753 (get_thread_regcache, registers_changed_thread): New.
5754 * regcache.h (get_thread_regcache(thread_info *thread)): New
5755 overload.
5756 (registers_changed_thread): New.
5757 (remote_target) <remote_detach_1>: Swap order of parameters.
5758 (remote_add_thread): <remote_add_thread>: Return the new thread.
5759 (get_remote_thread_info(ptid_t)): New overload.
5760 (remote_target::remote_notice_new_inferior): Use thread pointers
5761 directly.
5762 (remote_target::process_initial_stop_replies): Use
5763 thread_info::set_running.
5764 (remote_target::remote_detach_1, remote_target::detach)
5765 (extended_remote_target::detach): Adjust.
5766 * stack.c (frame_show_address): Use inferior_thread.
5767 * target-debug.h (target_debug_print_thread_info_pp): New.
5768 * target-delegates.c: Regenerate.
5769 * target.c (default_thread_address_space): Delete.
5770 (memory_xfer_partial_1): Use current_inferior.
5771 (target_detach): Use current_inferior.
5772 (target_thread_address_space): Delete.
5773 (generic_mourn_inferior): Use current_inferior.
5774 * target.h (struct target_ops) <thread_address_space>: Delete.
5775 (target_thread_address_space): Delete.
5776 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5777 pointers directly.
5778 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5779 thread pointer instead of a ptid_t. Adjust all callers.
5780 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5781 (first_thread_of_process): Delete, replaced by ...
5782 (first_thread_of_inferior): ... this new function. All callers
5783 adjusted.
5784 (any_thread_of_process): Rename to ...
5785 (any_thread_of_inferior): ... this, and take an inferior pointer.
5786 (any_live_thread_of_process): Rename to ...
5787 (any_live_thread_of_inferior): ... this, and take an inferior
5788 pointer.
5789 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5790 (value_in_thread_stack_temporaries)
5791 (get_last_thread_stack_temporary): Take a thread pointer instead
5792 of a ptid_t. Adjust all callers.
5793 (thread_info::set_running): New.
5794 (validate_registers_access): Use inferior_thread.
5795 (can_access_registers_ptid): Rename to ...
5796 (can_access_registers_thread): ... this, and take a thread
5797 pointer.
5798 (print_thread_info_1): Adjust to compare thread pointers instead
5799 of ptids.
5800 (switch_to_no_thread, switch_to_thread): Make extern.
5801 (scoped_restore_current_thread::~scoped_restore_current_thread):
5802 Use m_thread pointer directly.
5803 (scoped_restore_current_thread::scoped_restore_current_thread):
5804 Use inferior_thread.
5805 (thread_command): Use thread pointer directly.
5806 (thread_num_make_value_helper): Use inferior_thread.
5807 * top.c (execute_command): Use inferior_thread.
5808 * tui/tui-interp.c: Include "inferior.h".
5809 * varobj.c (varobj_create): Use inferior_thread.
5810 (value_of_root_1): Use find_thread_global_id instead of
5811 global_thread_id_to_ptid.
5812
5813 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5814
5815 * regcache.c (readable_regcache::read_part): Avoid memcpy when
5816 possible.
5817 (regcache::write_part): Likewise.
5818 (readable_regcache::cooked_read_part): Update comment.
5819 (readable_regcache::cooked_write_part): Likewise.
5820 * regcache.h: (readable_regcache::read_part): Likewise.
5821 (regcache::write_part): Likewise.
5822
5823 2018-06-21 Richard Bunt <richard.bunt@arm.com>
5824 Dirk Schubert <dirk.schubert@arm.com>
5825
5826 * aarch64-linux-nat.c (post_attach): New.
5827 (aarch64_linux_nat_target::post_attach): Override post_attach to
5828 record the number of hardware debug registers.
5829
5830 2018-06-20 Tom Tromey <tom@tromey.com>
5831
5832 * python/py-param.c (add_setshow_generic): Make parameters const.
5833 (parmpy_init): Update.
5834
5835 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5836
5837 * regcache.h (regcache_cooked_read_ftype): Rename to...
5838 (register_read_ftype): ...this, change type to function_view.
5839 (class reg_buffer) <save>: Remove src parameter.
5840 (readonly_detached_regcache) <readonly_detached_regcache>: Make
5841 parameter non-const in first overload. Remove src parameter in
5842 second overload.
5843 * regcache.c (do_cooked_read): Remove.
5844 (readonly_detached_regcache::readonly_detached_regcache): Make
5845 parameter non-const, adjust call to other constructor.
5846 (reg_buffer::save): Remove src parameter.
5847 * frame.c (do_frame_register_read): Remove.
5848 (frame_save_as_regcache): Use lambda function.
5849 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5850 parameter to ppu2spu_data *.
5851 (ppu2spu_sniffer): Use lambda function.
5852
5853 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
5854
5855 * record-full.c (record_full_target::insert_breakpoint): Remove
5856 "struct" keyword, add const.
5857
5858 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5859
5860 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5861 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5862 * configure.ac: Remove AC_PREREQ, add missing quoting.
5863 * gnulib/configure.ac: Modernize usage of
5864 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
5865 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5866 (AUTOMAKE_VERSION): Bump to 1.15.1.
5867 * configure: Re-generate.
5868 * config.in: Re-generate.
5869 * aclocal.m4: Re-generate.
5870 * gnulib/aclocal.m4: Re-generate.
5871 * gnulib/config.in: Re-generate.
5872 * gnulib/configure: Re-generate.
5873 * gnulib/import/Makefile.in: Re-generate.
5874
5875 2018-06-19 Pedro Alves <palves@redhat.com>
5876
5877 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5878 (lookup_minimal_symbol_by_pc_section): ... here with
5879 gdb_assert_not_reached added.
5880
5881 2018-06-19 Pedro Alves <palves@redhat.com>
5882
5883 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5884 parameter with a block parameter. Compare location's block symbol
5885 with the frame's block instead of addresses.
5886 (skip_inline_frames): Pass the current block instead of the
5887 frame's address. Break out as soon as we determine the frame
5888 should not be skipped.
5889
5890 2018-06-18 Tom Tromey <tom@tromey.com>
5891
5892 * solib-aix.c (solib_aix_get_section_offsets): Return
5893 unique_xmalloc_ptr.
5894 (solib_aix_solib_create_inferior_hook): Update.
5895
5896 2018-06-18 Tom Tromey <tom@tromey.com>
5897
5898 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5899
5900 2018-06-18 Tom Tromey <tom@tromey.com>
5901
5902 * solib-frv.c (frv_relocate_main_executable): Use
5903 unique_xmalloc_ptr.
5904 * solib-dsbt.c (dsbt_relocate_main_executable): Use
5905 unique_xmalloc_ptr.
5906
5907 2018-06-18 Tom Tromey <tom@tromey.com>
5908
5909 * objfiles.h (inhibit_section_map_updates): Update.
5910 (resume_section_map_updates, resume_section_map_updates_cleanup):
5911 Remove.
5912 * solib-svr4.c (svr4_handle_solib_event): Update.
5913 * objfiles.c (inhibit_section_map_updates): Return
5914 scoped_restore_tmpl<int>.
5915 (resume_section_map_updates, resume_section_map_updates_cleanup):
5916 Remove.
5917
5918 2018-06-18 Tom Tromey <tom@tromey.com>
5919
5920 * valprint.h (read_string): Update.
5921 * valprint.c (read_string): Change type of "buffer".
5922 (val_print_string): Update.
5923 * python/py-value.c (valpy_string): Update.
5924 * language.h (struct language_defn) <la_get_string>: Change
5925 type of "buffer".
5926 (default_get_string, c_get_string): Update.
5927 * language.c (default_get_string): Change type of "buffer".
5928 * guile/scm-value.c (gdbscm_value_to_string): Update.
5929 * c-lang.c (c_get_string): Change type of "buffer".
5930
5931 2018-06-18 Tom Tromey <tom@tromey.com>
5932
5933 * ser-mingw.c (struct pipe_state_destroyer): New.
5934 (pipe_state_up): New typedef.
5935 (cleanup_pipe_state): Remove.
5936 (pipe_windows_open): Use pipe_state_up. Don't release argv.
5937
5938 2018-06-18 Tom Tromey <tom@tromey.com>
5939
5940 * rust-lang.h (rust_yyerror): Don't declare.
5941 * rust-lang.c (rust_language_defn): Update.
5942 * rust-exp.y (yyerror): Now static.
5943 * parse.c (parse_exp_in_context_1): Update.
5944 * p-lang.h (p_yyerror): Don't declare.
5945 * p-lang.c (p_language_defn): Update.
5946 * p-exp.y (yyerror): Now static.
5947 * opencl-lang.c (opencl_language_defn): Update.
5948 * objc-lang.c (objc_language_defn): Update.
5949 * m2-lang.h (m2_yyerror): Don't declare.
5950 * m2-lang.c (m2_language_defn): Update.
5951 * m2-exp.y (yyerror): Now static.
5952 * language.h (struct language_defn) <la_error>: Remove.
5953 * language.c (unk_lang_error): Remove.
5954 (unknown_language_defn, auto_language_defn): Remove.
5955 * go-lang.h (go_yyerror): Don't declare.
5956 * go-lang.c (go_language_defn): Update.
5957 * go-exp.y (yyerror): Now static.
5958 * f-lang.h (f_yyerror): Don't declare.
5959 * f-lang.c (f_language_defn): Update.
5960 * f-exp.y (yyerror): Now static.
5961 * d-lang.h (d_yyerror): Don't declare.
5962 * d-lang.c (d_language_defn): Update.
5963 * d-exp.y (yyerror): Now static.
5964 * c-lang.h (c_yyerror): Don't declare.
5965 * c-lang.c (c_language_defn, cplus_language_defn)
5966 (asm_language_defn, minimal_language_defn): Update.
5967 * c-exp.y (yyerror): Now static.
5968 * ada-lang.h (ada_yyerror): Don't declare.
5969 * ada-lang.c (ada_language_defn): Update.
5970 * ada-exp.y (yyerror): Now static.
5971
5972 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5973
5974 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5975 (store_sveregs_to_thread): Likewise.
5976 (aarch64_linux_fetch_inferior_registers): Check for SVE.
5977 (aarch64_linux_store_inferior_registers): Likewise.
5978 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5979 function.
5980 (aarch64_sve_regs_copy_to_regcache): Likewise.
5981 (aarch64_sve_regs_copy_from_regcache): Likewise.
5982 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5983 declaration.
5984 (aarch64_sve_regs_copy_to_regcache): Likewise.
5985 (aarch64_sve_regs_copy_from_regcache): Likewise.
5986 (sve_context): Structure from Linux headers.
5987 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5988 (SVE_SIG_ZREG_SIZE): Likewise.
5989 (SVE_SIG_PREG_SIZE): Likewise.
5990 (SVE_SIG_FFR_SIZE): Likewise.
5991 (SVE_SIG_REGS_OFFSET): Likewise.
5992 (SVE_SIG_ZREGS_OFFSET): Likewise.
5993 (SVE_SIG_ZREG_OFFSET): Likewise.
5994 (SVE_SIG_ZREGS_SIZE): Likewise.
5995 (SVE_SIG_PREGS_OFFSET): Likewise.
5996 (SVE_SIG_PREG_OFFSET): Likewise.
5997 (SVE_SIG_PREGS_SIZE): Likewise.
5998 (SVE_SIG_FFR_OFFSET): Likewise.
5999 (SVE_SIG_REGS_SIZE): Likewise.
6000 (SVE_SIG_CONTEXT_SIZE): Likewise.
6001 (SVE_PT_REGS_MASK): Likewise.
6002 (SVE_PT_REGS_FPSIMD): Likewise.
6003 (SVE_PT_REGS_SVE): Likewise.
6004 (SVE_PT_VL_INHERIT): Likewise.
6005 (SVE_PT_VL_ONEXEC): Likewise.
6006 (SVE_PT_REGS_OFFSET): Likewise.
6007 (SVE_PT_FPSIMD_OFFSET): Likewise.
6008 (SVE_PT_FPSIMD_SIZE): Likewise.
6009 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6010 (SVE_PT_SVE_PREG_SIZE): Likewise.
6011 (SVE_PT_SVE_FFR_SIZE): Likewise.
6012 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6013 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6014 (__SVE_SIG_TO_PT): Likewise.
6015 (SVE_PT_SVE_OFFSET): Likewise.
6016 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6017 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6018 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6019 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6020 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6021 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6022 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6023 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6024 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6025 (SVE_PT_SVE_SIZE): Likewise.
6026 (SVE_PT_SIZE): Likewise.
6027 (HAS_SVE_STATE): New define.
6028
6029 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6030
6031 * nat/aarch64-sve-linux-sigcontext.h: New file.
6032 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6033 new files.
6034 (SVE_VQ_MIN): Likewise.
6035 (SVE_VQ_MAX): Likewise.
6036 (SVE_VL_MIN): Likewise.
6037 (SVE_VL_MAX): Likewise.
6038 (SVE_NUM_ZREGS): Likewise.
6039 (SVE_NUM_PREGS): Likewise.
6040 (sve_vl_valid): Likewise.
6041 (struct user_sve_header): Likewise.
6042
6043 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6044 Richard Bunt <Richard.Bunt@arm.com>
6045
6046 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6047 was requested by GDB.
6048
6049 2018-06-15 Tom de Vries <tdevries@suse.de>
6050
6051 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6052
6053 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6054
6055 * gnulib/update-gnulib.sh: Print expected versions of
6056 autoconf/aclocal.
6057
6058 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6059
6060 * arch-utils.c (default_type_align): Use type_length_units.
6061 * gdbtypes.c (type_align): Use type_length_units.
6062
6063 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6064
6065 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6066 of 'define' command.
6067
6068 2018-06-14 Tom de Vries <tdevries@suse.de>
6069
6070 PR cli/22573
6071 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6072 get_no_prettyformat_print_options.
6073
6074 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6075
6076 * sparc-nat.h: Include target.h.
6077 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6078 <fetch_registers>: Remove this argument in function call.
6079 <store_registers>: Remove this argument in function call, remove
6080 extra semicolon.
6081 <low_forget_process>: Call sparc64_forget_process instead of
6082 sparc_forget_process.
6083
6084 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6085
6086 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6087 (procfs_target::make_corefile_notes): Adjust to new
6088 target_read_alloc return type.
6089
6090 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6091 Stephen Roberts <stephen.roberts@arm.com>
6092
6093 PR gdb/22882
6094 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6095 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6096 Move should_notify_stop local into more inner scope.
6097
6098 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6099 Stephen Roberts <stephen.roberts@arm.com>
6100
6101 PR gdb/22882
6102 * infrun.c (resume_1): Add call to mark_async_event_handler.
6103
6104 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6105
6106 * infrun.c (do_target_wait): Change old version of $pc printed.
6107
6108 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6109
6110 * dwarf2read.c (read_index_from_section): Rename to...
6111 (read_gdb_index_from_section): ... this, update all callers.
6112 (dwarf2_read_index): Rename to...
6113 (dwarf2_read_gdb_index): ... this, update all callers.
6114
6115 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6116
6117 * gdb/hppa-linux-nat.c
6118 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6119 hppa_linux_nat_target::fetch_registers.
6120
6121 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6122
6123 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6124 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6125 (AARCH64_DWARF_SVE_FFR): Likewise.
6126 (AARCH64_DWARF_SVE_P0): Likewise.
6127 (AARCH64_DWARF_SVE_Z0): Likewise.
6128
6129 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6130
6131 * common/common-regcache.h (raw_compare): New function.
6132 * regcache.c (regcache::raw_compare): Likewise.
6133 * regcache.h (regcache::raw_compare): New declaration.
6134
6135 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6136
6137 * common/common-regcache.h (reg_buffer_common): New structure.
6138 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6139 (reg_buffer::raw_supply): Likewise.
6140 (reg_buffer::raw_supply_integer): Likewise.
6141 (reg_buffer::raw_supply_zeroed): Likewise.
6142 (reg_buffer::raw_collect): Likewise.
6143 (reg_buffer::raw_collect_integer): Likewise.
6144 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6145 (reg_buffer::raw_supply): Likewise.
6146 (reg_buffer::raw_supply_integer): Likewise.
6147 (reg_buffer::raw_supply_zeroed): Likewise.
6148 (reg_buffer::raw_collect): Likewise.
6149 (reg_buffer::raw_collect_integer): Likewise.
6150
6151 2018-06-10 Tom Tromey <tom@tromey.com>
6152
6153 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6154 (class remote_state) <stop_reply_queue>: Now std::vector.
6155 (remote_state::~remote_state)
6156 (remote_target::stop_reply_queue_length): Update.
6157 (struct queue_iter_param, remove_child_of_pending_fork)
6158 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6159 (check_pending_event_prevents_wildcard_vcont_callback)
6160 (remove_stop_reply_for_inferior)
6161 (remove_stop_reply_of_remote_state)
6162 (remote_notif_remove_once_on_match)
6163 (stop_reply_match_ptid_and_ws)
6164 (remote_kill_child_of_pending_fork): Remove.
6165 (remote_target::remove_new_fork_children)
6166 (remote_target::check_pending_events_prevent_wildcard_vcont)
6167 (remote_target::discard_pending_stop_replies)
6168 (remote_target::discard_pending_stop_replies_in_queue)
6169 (remote_target::remote_notif_remove_queued_reply)
6170 (remote_target::queued_stop_reply)
6171 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6172 (remote_target::wait, remote_target::kill_new_fork_children)
6173 (remote_target::async): Update.
6174
6175 2018-06-10 Tom Tromey <tom@tromey.com>
6176
6177 * record-full.c (record_full_arch_list_cleanups): Remove.
6178 (record_full_message): Use try/catch.
6179 (record_full_wait_cleanups): Remove.
6180 (record_full_wait_1): Use try/catch.
6181 (record_full_restore): Likewise.
6182
6183 2018-06-10 Tom Tromey <tom@tromey.com>
6184
6185 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6186 declare VEC. Add constructor.
6187 <in_target_beneath>: Now bool.
6188 (record_full_breakpoints): Now a std::vector, static.
6189 (record_full_sync_record_breakpoints)
6190 (record_full_init_record_breakpoints)
6191 (record_full_target::insert_breakpoint)
6192 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6193
6194 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6195
6196 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6197 * serial.c (serial_interface_lookup): Remove struct keyword.
6198
6199 2018-06-10 Tom Tromey <tom@tromey.com>
6200
6201 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6202 method.
6203 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6204 a method.
6205 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6206 method.
6207 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6208 "beneath" as a method.
6209 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6210 Use "beneath" as a method.
6211
6212 2018-06-10 Tom Tromey <tom@tromey.com>
6213
6214 * tracefile.c (struct trace_file_writer_deleter): New.
6215 <operator()>: Rename from trace_file_writer_xfree.
6216 (trace_file_writer_up): New typedef.
6217 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6218
6219 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6220
6221 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6222 <m_registers, m_register_status>: Change type to
6223 std::unique_ptr.
6224 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6225 XCNEWVEC.
6226
6227 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6228
6229 * common/common-regcache.h (enum register_status): Add
6230 underlying type "signed char".
6231 * regcache.h (reg_buffer) <m_register_status>: Change type to
6232 register_status *.
6233 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6234 register_status instead of signed char.
6235 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6236 (reg_buffer::get_register_status): Remove cast.
6237 (readable_regcache::raw_read): Remove cast.
6238 (readable_regcache::cooked_read): Remove cast.
6239
6240 2018-06-09 Tom Tromey <tom@tromey.com>
6241
6242 * source.c (reverse_search_command, forward_search_command): Use
6243 scoped_fd.
6244
6245 2018-06-09 Tom Tromey <tom@tromey.com>
6246
6247 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6248 (serial_ops_list): Now static, std::vector.
6249 (serial_interface_lookup, serial_add_interface): Update.
6250
6251 2018-06-09 Tom Tromey <tom@tromey.com>
6252
6253 * dwarf2read.c (process_cu_includes): Update.
6254 (process_full_comp_unit): Update.
6255 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6256 std::vector.
6257
6258 2018-06-08 Paul Koning <paul_koning@dell.com>
6259
6260 PR gdb/23252
6261
6262 * python/python.c (do_start_initialization):
6263 Avoid call to internal Python API.
6264 (init__gdb_module): New function.
6265
6266 2018-06-08 Gary Benson <gbenson@redhat.com>
6267
6268 * linux-thread-db.c (valprint.h): New include.
6269 (struct check_thread_db_info): New structure.
6270 (check_thread_db_on_load, tdb_testinfo): New static globals.
6271 (check_thread_db, check_thread_db_callback): New functions.
6272 (try_thread_db_load_1): Run integrity checks if requested.
6273 (maintenance_check_libthread_db): New function.
6274 (_initialize_thread_db): Register "maint check libthread-db"
6275 and "maint set/show check-libthread-db".
6276 * NEWS: Mention the above new commands.
6277
6278 2018-06-08 Tom Tromey <tom@tromey.com>
6279
6280 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6281 now a method.
6282
6283 2018-06-08 Tom Tromey <tom@tromey.com>
6284
6285 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6286
6287 2018-06-08 Tom Tromey <tom@tromey.com>
6288
6289 * common/btrace-common.h (struct btrace_data): Add constructor,
6290 destructor, move assignment operator.
6291 <empty, clear, fini>: New methods.
6292 <format>: Initialize.
6293 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6294 (btrace_data_empty): Don't declare.
6295 * common/btrace-common.c (btrace_data_init): Remove.
6296 (btrace_data::fini): Rename from btrace_data_fini.
6297 (btrace_data::empty): Rename from btrace_data_empty.
6298 (btrace_data::clear): Rename from btrace_data_clear. Return
6299 bool.
6300 * btrace.h (make_cleanup_btrace_data): Don't declare.
6301 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6302 (parse_xml_btrace): Update.
6303 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6304 (maint_btrace_clear_packet_history_cmd): Update.
6305
6306 2018-06-07 Pedro Alves <palves@redhat.com>
6307
6308 * target.h (target_ops) <beneath>: Now a method. All references
6309 updated.
6310 (class target_stack): New.
6311 * target.c (g_target_stack): New.
6312 (g_current_top_target): Delete.
6313 (current_top_target): Get the top target out of g_target_stack.
6314 (target_stack::push, target_stack::unpush): New.
6315 (push_target, unpush_target): Reimplement.
6316 (target_is_pushed): Reimplement in terms of g_target_stack.
6317 (target_ops::beneath, target_stack::find_beneath): New.
6318
6319 2018-06-07 Pedro Alves <palves@redhat.com>
6320
6321 * target.h (find_target_beneath): Delete declaration.
6322 * target.c (find_target_beneath): Delete definition.
6323 * aix-thread.c: All callers of find_target_beneath adjusted to
6324 call target_ops::beneath instead.
6325 * bsd-uthread.c: Likewise.
6326 * linux-thread-db.c: Likewise.
6327 * ravenscar-thread.c: Likewise.
6328 * sol-thread.c: Likewise.
6329 * spu-multiarch.c: Likewise.
6330
6331 2018-06-07 Pedro Alves <palves@redhat.com>
6332
6333 * target.h (target_ops) <beneath>: Now a method. All references
6334 updated.
6335 (target_ops) <m_beneath>: New.
6336 * target.c (target_ops::beneath): New.
6337 * corelow.c: Adjust all references to target_ops::beneath.
6338 * linux-thread-db.c: Likewise.
6339 * make-target-delegates: Likewise.
6340 * record-btrace.c: Likewise.
6341 * record-full.c: Likewise.
6342 * remote.c: Likewise.
6343 * target.c: Likewise.
6344 * target-delegates.c: Regenerate.
6345
6346 2018-06-07 Pedro Alves <palves@redhat.com>
6347
6348 * target.h (target_stack): Delete.
6349 (current_top_target): Declare function.
6350 * target.c (target_stack): Delete.
6351 (g_current_top_target): New.
6352 (current_top_target): New function.
6353 * auxv.c: Use current_top_target instead of target_stack
6354 throughout.
6355 * avr-tdep.c: Likewise.
6356 * breakpoint.c: Likewise.
6357 * corefile.c: Likewise.
6358 * elfread.c: Likewise.
6359 * eval.c: Likewise.
6360 * exceptions.c: Likewise.
6361 * frame.c: Likewise.
6362 * gdbarch-selftests.c: Likewise.
6363 * gnu-v3-abi.c: Likewise.
6364 * ia64-tdep.c: Likewise.
6365 * ia64-vms-tdep.c: Likewise.
6366 * infcall.c: Likewise.
6367 * infcmd.c: Likewise.
6368 * infrun.c: Likewise.
6369 * linespec.c: Likewise.
6370 * linux-tdep.c: Likewise.
6371 * minsyms.c: Likewise.
6372 * ppc-linux-nat.c: Likewise.
6373 * ppc-linux-tdep.c: Likewise.
6374 * procfs.c: Likewise.
6375 * regcache.c: Likewise.
6376 * remote.c: Likewise.
6377 * rs6000-tdep.c: Likewise.
6378 * s390-linux-nat.c: Likewise.
6379 * s390-tdep.c: Likewise.
6380 * solib-aix.c: Likewise.
6381 * solib-darwin.c: Likewise.
6382 * solib-dsbt.c: Likewise.
6383 * solib-spu.c: Likewise.
6384 * solib-svr4.c: Likewise.
6385 * solib-target.c: Likewise.
6386 * sparc-tdep.c: Likewise.
6387 * sparc64-tdep.c: Likewise.
6388 * spu-tdep.c: Likewise.
6389 * symfile.c: Likewise.
6390 * symtab.c: Likewise.
6391 * target-descriptions.c: Likewise.
6392 * target-memory.c: Likewise.
6393 * target.c: Likewise.
6394 * target.h: Likewise.
6395 * tracefile-tfile.c: Likewise.
6396 * tracepoint.c: Likewise.
6397 * valops.c: Likewise.
6398 * valprint.c: Likewise.
6399 * value.c: Likewise.
6400 * windows-tdep.c: Likewise.
6401 * mi/mi-main.c: Likewise.
6402
6403 2018-06-07 Tom Tromey <tom@tromey.com>
6404
6405 * valprint.h (build_address_symbolic): Declare.
6406 * printcmd.c (print_address_symbolic): Update.
6407 (build_address_symbolic): Change "name" and "filename" to
6408 std::string.
6409 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6410 Update.
6411 * defs.h (build_address_symbolic): Remove declaration.
6412
6413 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6414
6415 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6416 (aarch64_vnv_type): Add function.
6417 (aarch64_pseudo_register_name): Add V regs for SVE.
6418 (aarch64_pseudo_register_type): Likewise.
6419 (aarch64_pseudo_register_reggroup_p): Likewise.
6420 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6421 (aarch64_pseudo_read_value): Add V regs for SVE.
6422 (aarch64_pseudo_write_2): Use V0 offset for SVE
6423 (aarch64_pseudo_write): Add V regs for SVE.
6424 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6425
6426 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6427
6428 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6429 (sve_vl_from_vq): Likewise.
6430
6431 2018-06-05 Tom Tromey <tom@tromey.com>
6432
6433 * cli/cli-cmds.c (show_version): Update.
6434 * top.c (print_gdb_version): Add "interactive" parameter.
6435 Update.
6436 * main.c (captured_main_1): Update.
6437 * top.h (print_gdb_version): Add "interactive" parameter and a
6438 comment.
6439
6440 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6441
6442 * common/enum-flags.h: Add trailing semicolon to example in
6443 comment.
6444
6445 2018-06-05 Tom Tromey <tom@tromey.com>
6446
6447 PR cli/12326:
6448 * NEWS: Add entry about pager.
6449 * utils.c (pagination_disabled_for_command): New global.
6450 (prompt_for_continue): Allow "c" response to prompt.
6451 (reinitialize_more_filter): Clear
6452 pagination_disabled_for_command.
6453 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6454
6455 2018-06-04 Tom Tromey <tom@tromey.com>
6456
6457 * ada-lang.h (ada_lookup_symbol_list): Update.
6458 * ada-lang.c (resolve_subexp): Update.
6459 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6460 parameter.
6461 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6462 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6463 results parameter to std::vector.
6464 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6465 Update.
6466 * ada-exp.y (block_lookup): Update.
6467 (select_possible_type_sym): Change type of syms. Remove nsyms
6468 parameter.
6469 (write_var_or_type, write_name_assoc): Update.
6470
6471 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6472
6473 * windows-nat.c (windows_nat_target::xfer_partial): Return
6474 TARGET_XFER_E_IO if we need to delegate to the target beneath
6475 but BENEATH is NULL.
6476
6477 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6478
6479 * Makefile.in (config.status): Add configure.nat as a
6480 dependency.
6481
6482 2018-06-04 Tom Tromey <tom@tromey.com>
6483
6484 * cp-name-parser.y (cpname_state): Add method declarations.
6485 (HANDLE_QUAL): Update.
6486 (cpname_state::d_grab, cpname_state::fill_comp)
6487 (cpname_state::make_operator, cpname_state::make_dtor)
6488 (cpname_state::make_builtin_type, cpname_state::make_name)
6489 (cpname_state::d_qualify, cpname_state::d_int_type)
6490 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6491 (%union): Move earlier.
6492
6493 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6494
6495 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6496
6497 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6498
6499 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6500 (aarch64_pseudo_write_1): Likewise.
6501 (aarch64_pseudo_read_value): Use helper.
6502 (aarch64_pseudo_write): Likewise.
6503
6504 2018-06-04 Pedro Alves <palves@redhat.com>
6505
6506 * darwin-nat.c (darwin_ops): Delete.
6507 (darwin_attach_pid): Use get_native_target.
6508
6509 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6510
6511 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6512 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6513
6514 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6515
6516 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6517 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6518 (aarch64_gdbarch_init): Check for SVE.
6519 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6520
6521 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6522
6523 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6524 * aarch64-tdep.h (aarch64_read_description): Likewise.
6525 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6526 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6527 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6528 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6529 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6530
6531 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6532
6533 * value.c (value_fetch_lazy_bitfield): New.
6534 (value_fetch_lazy_memory): New.
6535 (value_fetch_lazy_register): New.
6536 (value_fetch_lazy): Factor out to smaller functions.
6537
6538 2018-06-01 Tom Tromey <tom@tromey.com>
6539
6540 * cp-name-parser.y (backslashable, represented): Now const.
6541
6542 2018-06-01 Tom Tromey <tom@tromey.com>
6543
6544 * cp-name-parser.y: Include parser-defs.h.
6545 (parser_fprintf): Remove declaration.
6546
6547 2018-06-01 Tom Tromey <tom@tromey.com>
6548
6549 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6550 %parse-param.
6551 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6552 (global_result): Remove globals.
6553 (struct cpname_state): New.
6554 (yyparse): Don't declare.
6555 (yylex, yyerror): Move declarations after %union.
6556 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6557 (make_name): Add state parameter.
6558 Update all callers.
6559 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6560 parameter.
6561 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6562 Update.
6563 (yylex): Add lvalp, state parameters.
6564 (yyerror): Add state parameter.
6565 (cp_demangled_name_to_comp): Update.
6566
6567 2018-06-01 Tom Tromey <tom@tromey.com>
6568
6569 * cp-name-parser.y (parser_fprintf): Declare.
6570 (GDB_YY_REMAP_PREFIX): Define.
6571 Include yy-remap.h. Don't redefine yy* identifiers.
6572
6573 2018-06-01 Tom Tromey <tom@tromey.com>
6574
6575 * python/py-type.c (typy_legacy_template_argument): Update.
6576 * cp-support.h (cp_demangled_name_to_comp): Update.
6577 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6578 parameter to be a "std::string *".
6579 (main): Update.
6580
6581 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6582
6583 * ada-lex.l: Include "diagnostics.h" instead of
6584 "common/diagnostics.h".
6585 * unittests/environ-selftests.c: Likewise.
6586 * common/diagnostics.h: Moved to ../include.
6587
6588 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6589
6590 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6591 to language_mode_manual while calling breakpoint_re_set_one.
6592
6593 2018-06-01 Tom Tromey <tom@tromey.com>
6594
6595 * valops.c (value_cast_structs, destructor_name_p): Update.
6596 * symtab.c (gdb_mangle_name): Update.
6597 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6598 Update.
6599 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6600 (pascal_object_print_value_fields, pascal_object_print_value):
6601 Update.
6602 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6603 * linespec.c (find_methods): Update.
6604 * gdbtypes.h (type_name_no_tag): Remove.
6605 (type_name_or_error): Rename from type_name_no_tag_or_error.
6606 * gdbtypes.c (type_name_no_tag): Remove.
6607 (type_name_or_error): Rename from type_name_no_tag_or_error.
6608 (lookup_struct_elt_type, check_typedef): Update.
6609 * expprint.c (print_subexp_standard): Update.
6610 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6611 * d-namespace.c (d_lookup_nested_symbol): Update.
6612 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6613 (cp_print_class_member): Update.
6614 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6615 * completer.c (add_struct_fields): Update.
6616 * c-typeprint.c (cp_type_print_derivation_info)
6617 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6618 Update.
6619 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6620 (ada_prefer_type, ada_is_exception_sym): Update.
6621
6622 2018-06-01 Tom Tromey <tom@tromey.com>
6623
6624 * valops.c (enum_constant_from_type, value_namespace_elt)
6625 (value_maybe_namespace_elt): Update.
6626 * valarith.c (find_size_for_pointer_math): Update.
6627 * target-descriptions.c (make_gdb_type): Update.
6628 * symmisc.c (print_symbol): Update.
6629 * stabsread.c (define_symbol, read_type)
6630 (complain_about_struct_wipeout, add_undefined_type)
6631 (cleanup_undefined_types_1): Update.
6632 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6633 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6634 (rust_internal_print_type, rust_composite_type)
6635 (rust_evaluate_funcall, rust_evaluate_subexp)
6636 (rust_inclusive_range_type_p): Update.
6637 * python/py-type.c (typy_get_tag): Update.
6638 * p-typeprint.c (pascal_type_print_base): Update.
6639 * mdebugread.c (parse_symbol, parse_type): Update.
6640 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6641 Update.
6642 * guile/scm-type.c (gdbscm_type_tag): Update.
6643 * go-lang.c (sixg_string_p): Update.
6644 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6645 Update.
6646 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6647 (TYPE_TAG_NAME): Remove.
6648 * gdbtypes.c (type_name_no_tag): Simplify.
6649 (check_typedef, check_types_equal, recursive_dump_type)
6650 (copy_type_recursive, arch_composite_type): Update.
6651 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6652 in summary mode when needed.
6653 * eval.c (evaluate_funcall): Update.
6654 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6655 (process_structure_scope, read_enumeration_type)
6656 (read_namespace_type, read_module_type, determine_prefix): Update.
6657 * cp-support.c (inspect_type): Update.
6658 * coffread.c (process_coff_symbol, decode_base_type): Update.
6659 * c-varobj.c (c_is_path_expr_parent): Update.
6660 * c-typeprint.c (c_type_print_base_struct_union): Update.
6661 (c_type_print_base_1): Update. Print struct/class/union/enum in
6662 summary when using C language.
6663 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6664 (gen_maybe_namespace_elt): Update.
6665 * ada-lang.c (ada_type_name): Simplify.
6666 (empty_record, ada_template_to_fixed_record_type_1)
6667 (template_to_static_fixed_type)
6668 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6669
6670 2018-06-01 Tom Tromey <tom@tromey.com>
6671
6672 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6673 c_print_type.
6674 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6675 (c_print_type): Update.
6676 (c_print_type): New overload.
6677 (c_type_print_varspec_prefix, c_type_print_args)
6678 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6679 (c_type_print_base_struct_union, c_type_print_base_1)
6680 (cp_type_print_method_args): Add "language" parameter.
6681 (c_type_print_base): Update.
6682 * c-lang.h (c_print_type): Add new overload.
6683
6684 2018-06-01 Tom Tromey <tom@tromey.com>
6685
6686 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6687 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6688
6689 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6690
6691 * aarch64-tdep.c (aarch64_sve_register_names): New const
6692 var.
6693 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6694 (AARCH64_SVE_Z_REGS_NUM): New define.
6695 (AARCH64_SVE_P_REGS_NUM): Likewise.
6696 (AARCH64_SVE_NUM_REGS): Likewise.
6697
6698 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6699
6700 * nat/linux-ptrace.h [__alpha__]
6701 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6702 definitions.
6703
6704 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6705
6706 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6707 the endianness selected.
6708 * NEWS: Document `set endian auto' mode operation update.
6709
6710 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6711
6712 * Makefile.in: Add new header.
6713 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6714 (sve_vl_from_vg): Likewise.
6715 (sve_vq_from_vl): Likewise.
6716 (sve_vl_from_vq): Likewise.
6717 (sve_vq_from_vg): Likewise.
6718 (sve_vg_from_vq): Likewise.
6719 * configure.nat: Add new c file.
6720 * nat/aarch64-sve-linux-ptrace.c: New file.
6721 * nat/aarch64-sve-linux-ptrace.h: New file.
6722
6723 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6724
6725 * aarch64-linux-nat.c (aarch64_linux_read_description):
6726 Add parmeter zero.
6727 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6728 Likewise.
6729 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6730 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6731 (aarch64_gdbarch_init): Add parmeter zero.
6732 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6733 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6734 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6735 parmeter.
6736 * doc/gdb.texinfo: Describe SVE feature
6737 * features/aarch64-sve.c: New file.
6738
6739 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6740
6741 PR gdb/23210
6742 * gdbarch.sh (significant_addr_bit): Default to zero when
6743 not set by target architecture.
6744 * gdbarch.c: Re-generated.
6745 * utils.c (address_significant): Update.
6746
6747 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6748
6749 * stack.c (func_command): Remove trailing newline in call to error.
6750
6751 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6752
6753 * regcache.h (regcache_raw_collect): Remove, update callers to
6754 use regcache::raw_collect.
6755 * regcache.c (regcache_raw_collect): Remove.
6756
6757 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6758
6759 * regcache.h (regcache_raw_supply): Remove, update callers to
6760 use detached_regcache::raw_supply.
6761 * regcache.c (regcache_raw_supply): Remove.
6762
6763 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6764
6765 * regcache.h (regcache_cooked_write_part): Remove, update
6766 callers to use regcache::cooked_write_part.
6767 * regcache.c (regcache_cooked_write_part): Remove.
6768
6769 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6770
6771 * regcache.h (regcache_cooked_read_part): Remove, update callers
6772 to use readable_regcache::cooked_read_part.
6773 * regcache.c (regcache_cooked_read_part): Remove.
6774
6775 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6776
6777 * regcache.h (regcache_cooked_read_value): Remove, update
6778 callers to use readable_regcache::cooked_read_value.
6779 * regcache.c (regcache_cooked_read_value): Remove.
6780
6781 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6782
6783 * regcache.h (regcache_cooked_write): Remove, update callers to
6784 use regcache::cooked_write.
6785 * regcache.c (regcache_cooked_write): Remove.
6786
6787 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6788
6789 * regcache.h (regcache_invalidate): Remove, update callers to
6790 use detached_regcache::invalidate instead.
6791 * regcache.c (regcache_invalidate): Remove.
6792
6793 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6794
6795 * regcache.h (regcache_raw_write_part): Remove, update callers
6796 to use regcache::raw_write_part instead.
6797 * regcache.c (regcache_raw_write_part): Remove.
6798
6799 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6800
6801 * regcache.h (regcache_raw_read_part): Remove, update callers to
6802 use readable_regcache::raw_read_part instead.
6803 * regcache.c (regcache_raw_read_part): Remove.
6804
6805 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6806
6807 * regcache.h (regcache_cooked_read): Remove, update callers to
6808 use readable_regcache::cooked_read instead.
6809 * regcache.c (regcache_cooked_read): Remove.
6810
6811 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6812
6813 * regcache.h (regcache_raw_write): Remove, update callers to use
6814 regcache::raw_write instead.
6815 * regcache.c (regcache_raw_write): Remove.
6816
6817 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6818
6819 * regcache.h (regcache_raw_read): Remove, update callers to use
6820 readable_regcache::raw_read instead.
6821 * regcache.c (regcache_raw_read): Remove.
6822
6823 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6824
6825 * regcache.h (regcache_raw_update): Remove, update callers to
6826 use readable_regcache::raw_update instead.
6827 * regcache.c (regcache_raw_update): Remove.
6828
6829 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6830
6831 * regcache.h (regcache_register_status): Remove, update callers
6832 to use reg_buffer::get_register_status directly instead.
6833 * regcache.c (regcache_register_status): Remove.
6834
6835 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6836
6837 * regcache.h (regcache_get_ptid): Remove, update all callers to
6838 call regcache::ptid instead.
6839 * regcache.c (regcache_get_ptid): Remove.
6840
6841 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6842
6843 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6844
6845 2018-05-30 Pedro Alves <palves@redhat.com>
6846
6847 * common/common-exceptions.h (exception_rethrow): Use
6848 ATTRIBUTE_NORETURN.
6849
6850 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
6851
6852 * breakpoint.c (print_solib_event, check_status_catch_solib):
6853 Remove struct keyword in range-based for loops.
6854 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6855 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6856 Likewise.
6857 * linespec.c (find_superclass_methods, search_minsyms_for_name):
6858 Likewise.
6859 * symfile.c (addr_info_make_relative): Likewise.
6860 * thread.c (value_in_thread_stack_temporaries): Likewise.
6861
6862 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
6863
6864 PR gdb/16841
6865 * valops.c (value_struct_elt_for_reference): Call check_typedef on
6866 aggregate type to get its real type before accessing it.
6867
6868 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
6869
6870 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6871 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6872 * coff-pe-read.c (add_pe_forwarded_sym): Replace
6873 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6874 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6875 * jit.c (jit_breakpoint_re_set_internal): Likewise.
6876 * printcmd.c (info_address_command): Likewise.
6877
6878 2018-05-29 Tom Tromey <tom@tromey.com>
6879
6880 * windows-nat.c (handle_exception): Update fall-through comment.
6881
6882 2018-05-29 Tom Tromey <tom@tromey.com>
6883
6884 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
6885 (struct program_space) <added_solibs>: Now a std::vector.
6886 * breakpoint.c (print_solib_event): Update.
6887 (check_status_catch_solib): Update.
6888 * progspace.c (clear_program_space_solib_cache): Update.
6889 * solib.c (update_solib_list): Update.
6890
6891 2018-05-29 Tom Tromey <tom@tromey.com>
6892
6893 * python/py-type.c (typy_richcompare): Update.
6894 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6895 * gdbtypes.h (types_deeply_equal): Return bool.
6896 (types_equal): Likewise.
6897 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
6898 declare VEC.
6899 (check_types_equal): Change worklist to std::vector. Return
6900 bool.
6901 (struct type_equality_entry): Add constructor.
6902 (compare_maybe_null_strings): Return bool.
6903 (check_types_worklist): Return bool. Change worklist to
6904 std::vector.
6905 (types_deeply_equal): Use std::vector.
6906 (types_equal): Return bool.
6907 (compare_maybe_null_strings): Simplify.
6908
6909 2018-05-29 Tom Tromey <tom@tromey.com>
6910
6911 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
6912
6913 2018-05-29 Tom Tromey <tom@tromey.com>
6914
6915 * objc-lang.h: Don't include cp-support.h.
6916 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
6917 declare VEC.
6918
6919 2018-05-27 Tom Tromey <tom@tromey.com>
6920
6921 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6922
6923 2018-05-25 Tom Tromey <tom@tromey.com>
6924
6925 * value.c (value::location): Initialize.
6926
6927 2018-05-25 Tom Tromey <tom@tromey.com>
6928
6929 * dbxread.c (init_bincl_list): Remove.
6930 (bincl_list): Now a std::vector.
6931 (bincls_allocated, next_bincl): Remove.
6932 (free_bincl_list, do_free_bincl_list_cleanup)
6933 (make_cleanup_free_bincl_list): Remove.
6934 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6935 unique_xmalloc_ptr.
6936 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6937 (struct header_file_location): Add constructor.
6938 (add_bincl_to_list): Remove.
6939
6940 2018-05-25 Tom Tromey <tom@tromey.com>
6941
6942 * tui/tui.c (tui_enable): Update.
6943 * mi/mi-interp.c (mi_interp::init): Update.
6944 * interps.h (class interp) <name>: New method.
6945 <m_name>: Rename from name.
6946 (~scoped_restore_interp): Update.
6947 * interps.c (interp::interp): Update.
6948 (interp_add, interp_set, interp_lookup_existing)
6949 (current_interp_named_p): Update.
6950
6951 2018-05-25 Tom Tromey <tom@tromey.com>
6952
6953 * interps.c (interp_name): Remove.
6954 * mi/mi-interp.c (mi_interp::init): Update.
6955 * interps.h (interp_name): Remove.
6956 (~scoped_restore_interp): Update.
6957 * tui/tui.c (tui_enable): Update.
6958
6959 2018-05-25 Tom Tromey <tom@tromey.com>
6960
6961 * utils.c (fputs_maybe_filtered): Update.
6962 * linespec.c (decode_line_full): Update.
6963 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6964 (mi_print_breakpoint_for_event, mi_solib_loaded)
6965 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6966 (mi_user_selected_context_changed): Update.
6967 * mi/mi-main.c (mi_execute_command): Update.
6968 * cli/cli-script.c (execute_control_command): Update.
6969 * python/python.c (execute_gdb_command): Update.
6970 * solib.c (info_sharedlibrary_command): Update.
6971 * interps.c (interp_ui_out): Remove.
6972 * interps.h (interp_ui_out): Remove.
6973
6974 2018-05-25 Tom Tromey <tom@tromey.com>
6975
6976 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6977 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6978 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6979
6980 2018-05-25 Tom Tromey <tom@tromey.com>
6981
6982 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6983 * interps.c (interp_exec): Use scoped_restore.
6984
6985 2018-05-25 Tom Tromey <tom@tromey.com>
6986
6987 * remote.c (remote_target::remote_file_get): Use
6988 gdb::byte_vector.
6989 (remote_target::remote_file_put): Likewise.
6990
6991 2018-05-25 Tom Tromey <tom@tromey.com>
6992
6993 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6994 a std::string.
6995 (get_pe_section_index, add_pe_exported_sym): Update.
6996 (read_pe_exported_syms): Use gdb::def_vector.
6997
6998 2018-05-25 Tom Tromey <tom@tromey.com>
6999
7000 * frame.c (remove_prev_frame): Remove.
7001 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7002
7003 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7004
7005 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7006 Remove prototypes.
7007 * mips-linux-nat.c (supply_fpregset): Always call
7008 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7009 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7010 `mips_fill_fpregset'.
7011 * mips-linux-tdep.c (mips_supply_fpregset)
7012 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7013 (mips_fill_fpregset_wrapper): Remove functions.
7014 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7015 (mips_linux_fpregset): Remove variable.
7016 (mips_linux_iterate_over_regset_sections): Use
7017 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7018 (mips_linux_o32_sigframe_init): Remove comment.
7019
7020 2018-05-25 Pedro Alves <palves@redhat.com>
7021
7022 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7023 (struct readahead_cache, struct packet_reg, struct
7024 remote_arch_state, class remote_state): Move higher up in the
7025 file.
7026 (remote_target::m_remote_state): Now an object instead of a pointer.
7027 (remote_target::get_remote_state): Adjust.
7028
7029 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7030
7031 * stack.c (select_and_print_frame): Delete.
7032 (struct function_bounds): Move struct within function.
7033 (func_command): Most content moved into new function
7034 find_frame_for_function, use new function, print result, add
7035 function comment.
7036 (find_frame_for_function): New function, now returns a result.
7037
7038 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7039
7040 * stack.c (iterate_over_block_arg_vars): Fix comment.
7041 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7042
7043 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7044
7045 PR gdb/23203
7046 * frame.c
7047 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7048 Define.
7049 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7050 Define.
7051 * frame.h (class scoped_restore_selected_frame): New class.
7052 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7053 of any exception, use scoped_restore_selected_frame to restore the
7054 frame instead.
7055
7056 2018-05-24 Pedro Alves <palves@redhat.com>
7057
7058 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7059 override.
7060
7061 2018-05-23 Tom Tromey <tom@tromey.com>
7062
7063 * complaints.c (struct complaints): Remove.
7064 (symfile_complaint_book): Remove.
7065 (series): New global.
7066 (complaint_internal): Update.
7067 (clear_complaints): Update.
7068
7069 2018-05-23 Tom Tromey <tom@tromey.com>
7070
7071 * complaints.c (counters): New global.
7072 (struct complain): Remove.
7073 (struct complaints) <root>: Remove.
7074 (complaint_sentinel): Remove.
7075 (symfile_complaint_book): Update.
7076 (find_complaint) Remove.
7077 (complaint_internal, clear_complaints): Update.
7078
7079 2018-05-23 Tom Tromey <tom@tromey.com>
7080
7081 * complaints.c (struct complain) <file, line>: Remove.
7082 (find_complaint): Remove file, line parameters.
7083 (complaint_internal): Update.
7084
7085 2018-05-23 Tom Tromey <tom@tromey.com>
7086
7087 * complaints.c (vcomplaint): Remove.
7088 (complaint_internal) Merge in contents of vcomplaint.
7089
7090 2018-05-23 Tom Tromey <tom@tromey.com>
7091
7092 * complaints.c (struct complaints) <explanation>: Remove.
7093 (symfile_explanations): Remove.
7094 (symfile_complaint_book): Update.
7095 (vcomplaint): Update.
7096 (struct explanation): Remove.
7097
7098 2018-05-23 Tom Tromey <tom@tromey.com>
7099
7100 * complaints.c (symfile_complaints): Remove.
7101 (complaint_internal): Remove "complaints" parameter.
7102 (clear_complaints, vcomplaint): Remove "c" parameter.
7103 (get_complaints): Remove.
7104 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7105 (dwarf2_debug_line_missing_file_complaint)
7106 (dwarf2_debug_line_missing_end_sequence_complaint)
7107 (dwarf2_complex_location_expr_complaint)
7108 (dwarf2_const_value_length_mismatch_complaint)
7109 (dwarf2_section_buffer_overflow_complaint)
7110 (dwarf2_macro_malformed_definition_complaint)
7111 (dwarf2_invalid_attrib_class_complaint)
7112 (create_addrmap_from_index, dw2_symtab_iter_next)
7113 (dw2_expand_marked_cus)
7114 (dw2_debug_names_iterator::find_vec_in_debug_names)
7115 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7116 (create_debug_type_hash_table, init_cutu_and_read_dies)
7117 (partial_die_parent_scope, add_partial_enumeration)
7118 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7119 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7120 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7121 (create_cus_hash_table, create_dwp_hash_table)
7122 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7123 (dwarf2_rnglists_process, dwarf2_ranges_process)
7124 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7125 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7126 (handle_struct_member_die, process_structure_scope)
7127 (read_array_type, read_common_block, read_module_type)
7128 (read_tag_pointer_type, read_typedef, read_base_type)
7129 (read_subrange_type, load_partial_dies, partial_die_info::read)
7130 (partial_die_info::read, partial_die_info::read)
7131 (partial_die_info::read, read_checked_initial_length_and_offset)
7132 (dwarf2_string_attr, read_formatted_entries)
7133 (dwarf_decode_line_header)
7134 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7135 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7136 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7137 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7138 (get_signatured_type, get_DW_AT_signature_type)
7139 (decode_locdesc, file_file_name, consume_improper_spaces)
7140 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7141 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7142 (dwarf2_symbol_mark_computed, set_die_type)
7143 (read_attribute_value): Update.
7144 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7145 Update.
7146 * dbxread.c (unknown_symtype_complaint)
7147 (lbrac_mismatch_complaint, repeated_header_complaint)
7148 (set_namestring, function_outside_compilation_unit_complaint)
7149 (read_dbx_symtab, process_one_symbol): Update.
7150 * gdbtypes.c (stub_noname_complaint): Update.
7151 * windows-nat.c (handle_unload_dll): Update.
7152 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7153 (decode_base_type): Update.
7154 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7155 (eb_complaint, record_include_begin, record_include_end)
7156 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7157 (process_xcoff_symbol, read_symbol)
7158 (function_outside_compilation_unit_complaint)
7159 (scan_xcoff_symtab): Update.
7160 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7161 * buildsym.c (finish_block_internal, make_blockvector)
7162 (end_symtab_get_static_block, augment_type_symtab): Update.
7163 * dtrace-probe.c (dtrace_process_dof)
7164 (dtrace_static_probe_ops::get_probes): Update.
7165 * complaints.h (struct complaint): Don't declare.
7166 (symfile_complaints): Remove.
7167 (complaint_internal): Remove "complaints" parameter.
7168 (complaint): Likewise.
7169 (clear_complaints): Likewise.
7170 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7171 (reread_symbols): Update.
7172 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7173 (dwarf2_frame_cache, decode_frame_entry): Update.
7174 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7175 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7176 (info_selectors_command): Update.
7177 * macrotab.c (macro_include, check_for_redefinition)
7178 (macro_undef): Update.
7179 * objfiles.c (filter_overlapping_sections): Update.
7180 * stabsread.c (invalid_cpp_abbrev_complaint)
7181 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7182 (define_symbol, error_type, read_type, rs6000_builtin_type)
7183 (stabs_method_name_from_physname, read_member_functions)
7184 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7185 (attach_fields_to_type, complain_about_struct_wipeout)
7186 (read_range_type, read_args, common_block_start)
7187 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7188 Update.
7189 * mdebugread.c (index_complaint, unknown_ext_complaint)
7190 (basic_type_complaint, bad_tag_guess_complaint)
7191 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7192 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7193 (parse_procedure, parse_lines)
7194 (function_outside_compilation_unit_complaint)
7195 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7196 (bad_tag_guess_complaint, reg_value_complaint): Update.
7197 * cp-support.c (demangled_name_complaint): Update.
7198 * macroscope.c (sal_macro_scope): Update.
7199 * dwarf-index-write.c (class debug_names): Update.
7200
7201 2018-05-23 Tom Tromey <tom@tromey.com>
7202
7203 * complaints.c (clear_complaints): Remove "noisy" parameter.
7204 * complaints.h (clear_complaints): Update.
7205 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7206 (reread_symbols): Update.
7207
7208 2018-05-23 Tom Tromey <tom@tromey.com>
7209
7210 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7211 SUBSEQUENT_MESSAGE.
7212 (vcomplaint, clear_complaints): Update.
7213 (symfile_explanations): Remove some messages.
7214
7215 2018-05-23 Tom Tromey <tom@tromey.com>
7216
7217 * complaints.c (internal_complaint): Remove.
7218 * complaints.h (internal_complaint): Remove.
7219
7220 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7221
7222 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7223
7224 2018-05-22 Pedro Alves <palves@redhat.com>
7225
7226 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7227 (remote_fileio_badfd, remote_fileio_return_errno)
7228 (remote_fileio_return_success, remote_fileio_func_open)
7229 (remote_fileio_func_open, remote_fileio_func_close)
7230 (remote_fileio_func_read, remote_fileio_func_write)
7231 (remote_fileio_func_lseek, remote_fileio_func_rename)
7232 (remote_fileio_func_unlink, remote_fileio_func_stat)
7233 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7234 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7235 remote_target parameter.
7236 (remote_fio_func_map) <func>: Add remote_target parameter.
7237 (do_remote_fileio_request, remote_fileio_request):
7238 * remote-fileio.h (remote_fileio_request):
7239 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7240 remote_target parameter.
7241 (remote_notif_process, handle_notification): Adjust to pass down
7242 the remote.
7243 (remote_notif_state_allocate): Add remote_target parameter. Save
7244 it.
7245 * remote-notif.h (struct remote_target): Forward declare.
7246 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7247 remote_target parameter.
7248 (struct remote_notif_state) <remote>: New field.
7249 (remote_notif_ack, remote_notif_parse): Add remote_target
7250 parameter.
7251 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7252 remote_target parameter.
7253 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7254 (threads_listing_context, rmt_thread_action, protocol_feature)
7255 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7256 (packet_result, struct threads_listing_context, remote_state):
7257 Move definitions and declarations higher up.
7258 (remote_target) <~remote_target>: Declare.
7259 (remote_download_command_source, remote_file_put, remote_file_get)
7260 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7261 (remote_hostio_pread_vFile, remote_hostio_send_command)
7262 (remote_hostio_set_filesystem, remote_hostio_open)
7263 (remote_hostio_close, remote_hostio_unlink, remote_state)
7264 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7265 (get_memory_write_packet_size, get_memory_read_packet_size)
7266 (append_pending_thread_resumptions, remote_detach_1)
7267 (append_resumption, remote_resume_with_vcont)
7268 (add_current_inferior_and_thread, wait_ns, wait_as)
7269 (process_stop_reply, remote_notice_new_inferior)
7270 (process_initial_stop_replies, remote_add_thread)
7271 (btrace_sync_conf, remote_btrace_maybe_reopen)
7272 (remove_new_fork_children, kill_new_fork_children)
7273 (discard_pending_stop_replies, stop_reply_queue_length)
7274 (check_pending_events_prevent_wildcard_vcont)
7275 (discard_pending_stop_replies_in_queue, stop_reply)
7276 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7277 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7278 (remote_interrupt_as, remote_interrupt_ns)
7279 (remote_get_noisy_reply, remote_query_attached)
7280 (remote_add_inferior, remote_current_thread, get_current_thread)
7281 (set_thread, set_general_thread, set_continue_thread)
7282 (set_general_process, write_ptid)
7283 (remote_unpack_thread_info_response, remote_get_threadinfo)
7284 (parse_threadlist_response, remote_get_threadlist)
7285 (remote_threadlist_iterator, remote_get_threads_with_ql)
7286 (remote_get_threads_with_qxfer)
7287 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7288 (get_offsets, remote_check_symbols, remote_supported_packet)
7289 (remote_query_supported, remote_packet_size)
7290 (remote_serial_quit_handler, remote_detach_pid)
7291 (remote_vcont_probe, remote_resume_with_hc)
7292 (send_interrupt_sequence, interrupt_query)
7293 (remote_notif_get_pending_events, fetch_register_using_p)
7294 (send_g_packet, process_g_packet, fetch_registers_using_g)
7295 (store_register_using_P, store_registers_using_G)
7296 (set_remote_traceframe, check_binary_download)
7297 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7298 (remote_xfer_live_readonly_partial, remote_read_bytes)
7299 (remote_send_printf, remote_flash_write, readchar)
7300 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7301 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7302 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7303 (extended_remote_disable_randomization, extended_remote_run)
7304 (send_environment_packet, extended_remote_environment_support)
7305 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7306 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7307 (packet_command): Now methods of ...
7308 (remote_target): ... this class.
7309 (m_remote_state) <remote_target>: New field.
7310 (struct remote_state) <stop_reply_queue,
7311 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7312 fields.
7313 (remote_state::remote_state): Allocate stop_reply_queue.
7314 (remote_state): Delete global.
7315 (get_remote_state_raw): Delete.
7316 (remote_target::get_remote_state): Allocate m_remote_state on
7317 demand.
7318 (get_current_remote_target): New.
7319 (remote_ops, extended_remote_ops): Delete.
7320 (wait_forever_enabled_p, remote_async_inferior_event_token):
7321 Delete, moved to struct remote_state.
7322 (remote_target::close): Delete self. Destruction bits split to
7323 ...
7324 (remote_target::~remote_target): ... this.
7325 (show_memory_packet_size): Adjust to use
7326 get_current_remote_target.
7327 (struct protocol_feature) <func>: Add remote_target parameter.
7328 All callers adjusted.
7329 (curr_quit_handler_target): New.
7330 (remote_serial_quit_handler): Reimplement.
7331 (remote_target::open_1): Adjust to use get_current_remote_target.
7332 Heap-allocate remote_target/extended_remote_target instances.
7333 (vcont_builder::vcont_builder): Add remote_target parameter, and
7334 save it in m_remote. All callers adjusted.
7335 (vcont_builder::m_remote): New field.
7336 (vcont_builder::restart, vcont_builder::flush)
7337 (vcont_builder::push_action): Use it.
7338 (remote_target::commit_resume): Use it.
7339 (struct queue_iter_param) <remote>: New field.
7340 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7341 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7342 (check_pending_event_prevents_wildcard_vcont_callback)
7343 (remote_target::check_pending_events_prevent_wildcard_vcont)
7344 (remote_target::discard_pending_stop_replies)
7345 (remote_target::discard_pending_stop_replies_in_queue)
7346 (remote_target::remote_notif_remove_queued_reply): Fill in
7347 'remote' field.
7348 (remote_notif_get_pending_events): New.
7349 (remote_target::readchar, remote_target::remote_serial_write):
7350 Save/restore curr_quit_handler_target.
7351 (putpkt): New.
7352 (kill_new_fork_children): Fill in 'remote' field.
7353 (packet_command): Use get_current_remote_target, defer to
7354 remote_target method of same name.
7355 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7356 parameter, and save it in m_remote. All callers adjusted.
7357 (scoped_remote_fd::release): Use m_remote.
7358 (scoped_remote_fd::m_remote): New field.
7359 (remote_file_put, remote_file_get, remote_file_delete): Use
7360 get_current_remote_target, defer to remote_target method of same
7361 name.
7362 (remote_btrace_reset): Add remote_state paremeter. Update all
7363 callers.
7364 (remote_async_inferior_event_handler). Pass down 'data'.
7365 (remote_new_objfile): Use get_current_remote_target.
7366 (remote_target::vcont_r_supported): New.
7367 (set_range_stepping): Use get_current_remote_target and
7368 remote_target::vcont_r_supported.
7369 (_initialize_remote): Don't allocate 'remote_state' and
7370 'stop_reply_queue' globals.
7371 * remote.h (struct remote_target): Forward declare.
7372 (getpkt, putpkt, remote_notif_get_pending_events): Add
7373 'remote_target' parameter.
7374
7375 2018-05-22 Pedro Alves <palves@redhat.com>
7376
7377 * remote.c (vcont_builder): Now a class. Make all data members
7378 private.
7379 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7380 Declare methods.
7381 (vcont_builder_restart): Rename to ...
7382 (vcont_builder::restart): ... this.
7383 (vcont_builder_flush): Rename to ...
7384 (vcont_builder::flush): ... this.
7385 (vcont_builder_push_action): Rename to ...
7386 (vcont_builder::push_action): ... this.
7387 (remote_target::commit_resume): Adjust.
7388
7389 2018-05-22 Pedro Alves <palves@redhat.com>
7390
7391 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7392 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7393 (get_fixed_memory_packet_size): New.
7394 (get_memory_packet_size): Use it.
7395 (set_memory_packet_size): Don't override the config size with
7396 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7397 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7398 Don't refer to get_memory_packet_size if not connected to a remote
7399 target. Show "(default)" if configured size is 0.
7400
7401 2018-05-22 Pedro Alves <palves@redhat.com>
7402
7403 * remote.c (remote_target::mourn_inferior): Move
7404 discard_pending_stop_replies call here from ...
7405 (_initialize_remote): ... here.
7406
7407 2018-05-22 Pedro Alves <palves@redhat.com>
7408
7409 * remote.c (compare_section_command): Remove set_general_process
7410 call.
7411
7412 2018-05-22 Pedro Alves <palves@redhat.com>
7413
7414 * remote.c (struct packet_reg, struct remote_arch_state):
7415 Move higher up in the file.
7416 (remote_state) <m_arch_states>: Store remote_arch_state values
7417 instead of remote_arch_state pointers.
7418 (remote_state::get_remote_arch_state): Adjust.
7419
7420 2018-05-22 Pedro Alves <palves@redhat.com>
7421
7422 * remote.c: Include <unordered_map>.
7423 (remote_state): Now a class.
7424 (remote_state) <get_remote_arch_state>: Declare method.
7425 <get_remote_arch_state>: New field.
7426 (remote_arch_state) <remote_arch_state>: Declare ctor.
7427 <regs>: Now a unique_ptr.
7428 (remote_gdbarch_data_handle): Delete.
7429 (get_remote_arch_state): Delete.
7430 (remote_state::get_remote_arch_state): New.
7431 (get_remote_state): Adjust to call remote_state's
7432 get_remote_arch_state method.
7433 (init_remote_state): Delete, bits factored out to ...
7434 (remote_arch_state::remote_arch_state): ... this new method.
7435 (get_remote_packet_size, get_memory_packet_size)
7436 (process_g_packet, remote_target::fetch_registers)
7437 (remote_target::prepare_to_store, store_registers_using_G)
7438 (remote_target::store_registers, remote_target::get_trace_status):
7439 Adjust to call remote_state's method.
7440 (_initialize_remote): Remove reference to
7441 remote_gdbarch_data_handle.
7442
7443 2018-05-22 Pedro Alves <palves@redhat.com>
7444
7445 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7446 pread>: New method declarations.
7447 (remote_target::open_1): Adjust.
7448 (readahead_cache_invalidate): Rename to ...
7449 (readahead_cache::invalidate): ... this, and adjust to be a class
7450 method.
7451 (readahead_cache_invalidate_fd): Rename to ...
7452 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7453 class method.
7454 (remote_hostio_pwrite): Adjust.
7455 (remote_hostio_pread_from_cache): Rename to ...
7456 (readahead_cache::pread): ... this, and adjust to be a class
7457 method.
7458 (remote_hostio_close): Adjust.
7459
7460 2018-05-22 Pedro Alves <palves@redhat.com>
7461
7462 * remote.c (remote_hostio_close_cleanup): Delete.
7463 (class scoped_remote_fd): New.
7464 (remote_file_put, remote_file_get): Use it.
7465
7466 2018-05-22 Pedro Alves <palves@redhat.com>
7467
7468 (struct vCont_action_support): Use bool and initialize all fields.
7469 (struct readahead_cache): Initialize all fields.
7470 (remote_state): Use bool and initialize all fields.
7471 (remote_state::remote_state, remote_state::~remote_state): New.
7472 (new_remote_state): Delete.
7473 (_initialize_remote): Use new to allocate remote_state.
7474
7475 2018-05-22 Pedro Alves <palves@redhat.com>
7476 張俊芝 <zjz@zjz.name>
7477
7478 PR gdb/22973
7479 * c-exp.y: Include "c-support.h".
7480 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7481 of tolower. Use c_ident_is_alpha to scan names.
7482 * c-lang.c: Include "c-support.h".
7483 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7484 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7485 * c-support.h: New file, with bits factored out from ...
7486 * cp-name-parser.y: ... this file.
7487 Include "c-support.h".
7488 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7489 c-support.h and renamed.
7490 (symbol_end, yylex): Adjust.
7491
7492 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7493
7494 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7495 parameter type to CORE_ADDR.
7496 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7497 parameter type in declaration to CORE_ADDR.
7498 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7499 target_auxv_search to get AT_HWCAP and use the result to get the
7500 target description.
7501 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7502 to CORE_ADDR. Remove the cast of the return value to unsigned
7503 long. Fix error predicate of target_auxv_search.
7504 (ppc_linux_nat_target::read_description): Change the type of the
7505 hwcap variable to CORE_ADDR.
7506
7507 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7508
7509 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7510 if the size of fpscr is larger than 32 bits.
7511
7512 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7513
7514 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7515 (ppc32_linux_vsxregmap): New global.
7516 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7517 regcache_supply_regset, and regcache_collect_regset.
7518 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7519 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7520 (fetch_vsx_register, store_vsx_register): Remove.
7521 (fetch_vsx_registers): Add regno parameter. Get regset using
7522 ppc_linux_vsxregset. Use regset to supply registers.
7523 (store_vsx_registers): Add regno parameter. Get regset using
7524 ppc_linux_vsxregset. Use regset to collect registers.
7525 (fetch_register): Call fetch_vsx_registers instead of
7526 fetch_vsx_register.
7527 (store_register): Call store_vsx_registers instead of
7528 store_vsx_register.
7529 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7530 new regno parameter.
7531 (store_ppc_registers): Call store_vsx_registers with -1 for the
7532 new regno parameter.
7533 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7534 (ppc_collect_vsxregset): Remove.
7535
7536 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7537
7538 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7539 offset fields.
7540 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7541 for vector register offset fields.
7542 (ppc64_fbsd_reg_offsets): Likewise.
7543 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7544 to vector register offset fields.
7545 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7546 to vector register offset fields.
7547 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7548 vector register offset fields.
7549 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7550 initializers for vector register offset fields.
7551 (rs6000_aix64_reg_offsets): Likewise.
7552 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7553 (ppc_supply_vrregset): Remove.
7554 (ppc_collect_vrregset): Remove.
7555 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7556 (ppc_linux_vrregset) : New function.
7557 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7558 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7559 (ppc32_linux_vrregset): Remove.
7560 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7561 and use result instead of ppc32_linux_vrregset.
7562 (ppc32_linux_reg_offsets): Remove initializers for vector register
7563 offset fields.
7564 (ppc64_linux_reg_offsets): Likewise.
7565 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7566 * ppc-linux-nat.c: Include regset.h.
7567 (gdb_vrregset_t): Adjust comment to account for little-endian
7568 mode.
7569 (supply_vrregset, fill_vrregset): Remove.
7570 (fetch_altivec_register, store_altivec_register): Remove.
7571 (fetch_altivec_registers): Add regno parameter. Get regset using
7572 ppc_linux_vrregset. Use regset to supply registers.
7573 (store_altivec_registers): Add regno parameter. Get regset using
7574 ppc_linux_vrregset. Use regset to collect registers.
7575 (fetch_register): Call fetch_altivec_registers instead of
7576 fetch_altivec_register.
7577 (store_register): Call store_altivec_registers instead of
7578 store_altivec_register.
7579 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7580 the new regno parameter.
7581 (store_ppc_registers): Call store_altivec_registers with -1 for
7582 the new regno parameter.
7583
7584 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7585
7586 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7587 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7588 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7589 (gdb_vrregset_t): Change array type size to
7590 PPC_LINUX_SIZEOF_VRREGSET.
7591 (gdb_vsxregset_t): Change array type size to
7592 PPC_LINUX_SIZEOF_VSXREGSET.
7593 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7594 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7595 PPC_LINUX_SIZEOF_VSXREGSET.
7596
7597 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7598
7599 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7600 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7601 nat/ppc-linux.c.
7602 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7603 ppc_linux_target_wordsize with tid.
7604 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7605 wordsize with tid.
7606 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7607 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7608 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7609 tid parameter. Remove static specifier.
7610 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7611 (ppc_linux_target_wordsize): New declaration.
7612
7613 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7614
7615 * arch/ppc-linux-common.c: New file.
7616 * arch/ppc-linux-common.h: New file.
7617 * arch/ppc-linux-tdesc.h: New file.
7618 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7619 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7620 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7621 arch/ppc-linux-tdesc.h.
7622 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7623 arch/ppc-linux-tdesc.h.
7624 (ppc_linux_nat_target::read_description): Remove target
7625 description matching code. Fill a ppc_linux_features struct and
7626 call ppc_linux_match_description with it. Move comment about ISA
7627 2.05 to ppc-linux-common.c.
7628 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7629 arch/ppc-linux-tdesc.h.
7630 (ppc_linux_core_read_description): Remove target description
7631 matching code. Fill a ppc_linux_features struct and call
7632 ppc_linux_match_description with it.
7633 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7634 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7635 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7636 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7637 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7638 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7639 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7640 (tdesc_powerpc_e500l): Remove.
7641
7642 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7643
7644 * ada-lang.c (catch_assert_command): Pass empty string instead
7645 of NULL for excep_string argument.
7646
7647 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7648
7649 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7650 the width of the requested register exceeds the width of the
7651 `ptrace' data type.
7652
7653 2018-05-21 Tom Tromey <tom@tromey.com>
7654
7655 * printcmd.c (output_command): Remove.
7656 (output_command_const): Rename to output_command.
7657 * valprint.h (output_command): Rename from output_command_const.
7658 * tracepoint.c (trace_dump_actions): Call output_command.
7659
7660 2018-05-21 Tom Tromey <tom@tromey.com>
7661
7662 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7663 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7664 * ada-lang.h (create_ada_exception_catchpoint): Update.
7665 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7666 std::string.
7667 (create_excep_cond_exprs, ~ada_catchpoint)
7668 (should_stop_exception, print_one_exception)
7669 (print_mention_exception, print_recreate_exception): Update.
7670 (ada_get_next_arg): Remove.
7671 (catch_ada_exception_command_split): Use std::string. Change type
7672 of "excep_string", "cond_string".
7673 (catch_ada_exception_command): Update.
7674 (create_ada_exception_catchpoint): Change type of excep_string.
7675 (ada_exception_sal): Remove excep_string parameter.
7676 (~ada_catchpoint): Remove.
7677
7678 2018-05-21 Tom Tromey <tom@tromey.com>
7679
7680 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7681 cleanup.
7682
7683 2018-05-21 Tom Tromey <tom@tromey.com>
7684
7685 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7686 Return unique_xmalloc_ptr.
7687 (print_it_exception): Update.
7688
7689 2018-05-21 Tom Tromey <tom@tromey.com>
7690
7691 * tracepoint.c (trace_dump_actions): Use std::string.
7692
7693 2018-05-21 Tom Tromey <tom@tromey.com>
7694
7695 * symfile.c (reread_symbols): Use std::string for original_name.
7696
7697 2018-05-21 Tom Tromey <tom@tromey.com>
7698
7699 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7700 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7701 constructor.
7702
7703 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7704
7705 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7706 instance to...
7707 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7708 * objfiles.c (get_objfile_bfd_data): Allocate
7709 objfile_per_bfd_storage with obstack_new when allocating on
7710 obstack.
7711
7712 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7713
7714 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7715 OBSTACK_ZALLOC.
7716 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7717 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7718 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7719 (add_pending): Likewise.
7720 (parse_symbol): Likewise.
7721 (parse_partial_symbols): Likewise.
7722 (psymtab_to_symtab_1): Likewise.
7723 (new_psymtab): Likewise.
7724 (elfmdebug_build_psymtabs): Likewise.
7725 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7726 * objfiles.c (get_objfile_bfd_data): Likewise.
7727 (objfile_register_static_link): Likewise.
7728 * psymtab.c (allocate_psymtab): Likewise.
7729 * stabsread.c (read_member_functions): Likewise.
7730 * xcoffread.c (xcoff_end_psymtab): Likewise.
7731
7732 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7733
7734 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7735 compiler supports std::is_trivially_constructible.
7736 * common/poison.h: Include obstack.h.
7737 (IsMallocable): Define to is_trivially_constructible if the
7738 compiler supports it, define to true_type otherwise.
7739 (xobnew): New.
7740 (XOBNEW): Redefine.
7741 (xobnewvec): New.
7742 (XOBNEWVEC): Redefine.
7743 * gdb_obstack.h (obstack_zalloc): New.
7744 (OBSTACK_ZALLOC): Redefine.
7745 (obstack_calloc): New.
7746 (OBSTACK_CALLOC): Redefine.
7747 (obstack_new): New.
7748 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7749 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7750 gdbarch.c.
7751 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7752 obstack_calloc/obstack_zalloc.
7753 (gdbarch_obstack_zalloc): Remove.
7754 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7755
7756 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7757
7758 * stack.c (backtrace_command_1): Remove useless variable int i.
7759
7760 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7761
7762 * stack.c (print_frame_info): Fix comment.
7763
7764 2018-05-18 Tom Tromey <tom@tromey.com>
7765
7766 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7767 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7768 (~dwarf2_per_objfile): Update
7769 (dwarf2_get_dwz_file): Use new.
7770 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7771 unique_ptr.
7772
7773 2018-05-18 Tom Tromey <tom@tromey.com>
7774
7775 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7776 unique_ptr.
7777 * dwarf2read.c (struct dwp_file): Add constructor and
7778 initializers.
7779 (open_and_init_dwp_file): Return a unique_ptr.
7780 (dwarf2_per_objfile, create_dwp_hash_table)
7781 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7782 (lookup_dwo_unit_in_dwp): Update.
7783 (open_and_init_dwp_file, get_dwp_file): Update.
7784
7785 2018-05-18 Tom Tromey <tom@tromey.com>
7786
7787 * dwarf2read.c (dwarf2_per_objfile): Update.
7788 (struct mapped_index): Add initializers.
7789 (dwarf2_read_index): Use new.
7790 (dw2_symtab_iter_init): Update.
7791 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7792 unique_ptr.
7793
7794 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7795
7796 * dwarf2read.c (mapped_index) <total_size>: Remove.
7797
7798 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7799
7800 * unittests/format_pieces-selftests.c (test_format_specifier):
7801 Add ARI comments.
7802
7803 2018-05-18 Tom Tromey <tom@tromey.com>
7804
7805 * c-typeprint.c (maybe_print_hole): New function.
7806 (c_print_type_struct_field_offset): Update.
7807 (c_type_print_base_struct_union): Call maybe_print_hole.
7808
7809 2018-05-17 Keith Seitz <keiths@redhat.com>
7810
7811 * breakpoint.c (build_bpstat_chain): New function, moved from
7812 bpstat_stop_status.
7813 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7814 If no stop chain is passed, call build_bpstat_chain to build it.
7815 * breakpoint.h (build_bpstat_chain): Declare.
7816 (bpstat_stop_status): Move documentation here from breakpoint.c.
7817 * infrun.c (handle_signal_stop): Before eliding inlined frames,
7818 build the stop chain and pass it to skip_inline_frames.
7819 Pass this stop chain to bpstat_stop_status.
7820 * inline-frame.c: Include breakpoint.h.
7821 (stopped_by_user_bp_inline_frame): New function.
7822 (skip_inline_frames): Add parameter `stop_chain'.
7823 Move documention to inline-frame.h.
7824 If non-NULL, use stopped_by_user_bp_inline_frame to determine
7825 whether the frame should be elided.
7826 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7827 Add moved documentation and update for new parameter.
7828
7829 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7830
7831 PR cli/14975
7832 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7833 unittests/format_pieces-selftests.c.
7834 * common/format.h (format_piece) <operator==>: New.
7835 (format_pieces) <operator[]>: Remove.
7836 * common/format.c (format_pieces::format_pieces): Handle \e.
7837 * unittests/format_pieces-selftests.c: New.
7838
7839 2018-05-17 Tom Tromey <tom@tromey.com>
7840
7841 PR symtab/23010:
7842 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7843 (dw2_instantiate_symtab): Add skip_partial parameter.
7844 (dw2_find_last_source_symtab, dw2_map_expand_apply)
7845 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7846 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7847 (dw2_expand_symtabs_matching_one)
7848 (dw2_find_pc_sect_compunit_symtab)
7849 (dw2_debug_names_lookup_symbol)
7850 (dw2_debug_names_expand_symtabs_for_function): Update.
7851 (init_cutu_and_read_dies): Add skip_partial parameter.
7852 (process_psymtab_comp_unit, build_type_psymtabs_1)
7853 (process_skeletonless_type_unit, load_partial_comp_unit)
7854 (psymtab_to_symtab_1): Update.
7855 (load_full_comp_unit): Add skip_partial parameter.
7856 (process_imported_unit_die, dwarf2_read_addr_index)
7857 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7858 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7859 (read_signatured_type): Update.
7860
7861 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
7862
7863 * value.c (release_value): Remove unused variable.
7864 (record_latest_value): Likewise.
7865 (access_value_history): Likewise.
7866 (preserve_values): Likewise.
7867
7868 2018-05-17 Tom Tromey <tom@tromey.com>
7869
7870 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7871 Initialize.
7872
7873 2018-05-16 Maciej W. Rozycki <macro@mips.com>
7874
7875 PR gdb/22286
7876 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7877 Also handle registers whose width is not a multiple of
7878 PTRACE_TYPE_RET.
7879 (linux_nat_trad_target::store_register): Likewise.
7880
7881 2018-05-16 Tom Tromey <tom@tromey.com>
7882
7883 * gdbcore.h (core_bfd): Redefine.
7884 * corelow.c (core_target::close): Update.
7885 (core_target_open): Update.
7886 * progspace.h (struct program_space) <cbfd>: Now a
7887 gdb_bfd_ref_ptr.
7888
7889 2018-05-16 Tom Tromey <tom@tromey.com>
7890
7891 PR cli/19551:
7892 * symfile-add-flags.h (enum symfile_add_flags)
7893 <SYMFILE_NOT_FILENAME>: New constant.
7894 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
7895 objfile name from BFD.
7896 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7897 * minidebug.c (find_separate_debug_file_in_section): Put
7898 ".gnu_debugdata" into BFD's file name.
7899
7900 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
7901
7902 * regcache.c (regcache_read_ftype, regcache_write_ftype):
7903 Remove.
7904
7905 2018-05-15 Tamar Christina <tamar.christina@arm.com>
7906
7907 PR binutils/21446
7908 * aarch64-tdep.c (aarch64_analyze_prologue,
7909 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7910 Indicate not interested in errors.
7911
7912 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7913
7914 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7915 Supply the MIPS_ZERO_REGNUM register.
7916
7917 2018-05-15 Maciej W. Rozycki <macro@mips.com>
7918
7919 * mips-tdep.c (mask_address_var): Make variable static.
7920
7921 2018-05-14 Tom Tromey <tom@tromey.com>
7922
7923 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7924
7925 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
7926
7927 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7928 FXSAVE_ADDR for the mxcsr register.
7929
7930 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
7931
7932 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7933
7934 2018-05-11 Pedro Alves <palves@redhat.com>
7935
7936 * corelow.c (core_target) <core_target>: No longer inline.
7937 Initialize m_core_gdbarch, m_core_vec and build the section table
7938 here.
7939 <~core_target>: New.
7940 <core_gdbarch, get_core_register_section>: New methods.
7941 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7942 factored out from ...
7943 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7944 (core_ops): Delete.
7945 (sniff_core_bfd): Add gdbarch parameter.
7946 (core_close): Delete, merged into ...
7947 (core_target::close): ... here. Delete self.
7948 (core_close_cleanup): Delete.
7949 (core_target_open): Allocate a core_target on the heap. Use a
7950 unique_ptr instead of a cleanup. Bits moved into the core_target
7951 ctor. Adjust to use core_target methods instead of globals.
7952 (get_core_register_section): Rename to ...
7953 (core_target::get_core_register_section): ... this and adjust.
7954 (struct get_core_registers_cb_data): New.
7955 (get_core_registers_cb): Use it. Use bool.
7956 (core_target::fetch_registers, core_target::files_info)
7957 (core_target::xfer_partial, core_target::read_description)
7958 (core_target::pid_to, core_target::thread_name): Adjust to
7959 reference class fields instead of globals.
7960 * target.h (struct target_ops_deleter, target_ops_up): New.
7961
7962 2018-05-11 Pedro Alves <palves@redhat.com>
7963
7964 * corefile.c (core_file_command): Move to corelow.c.
7965 * corelow.c (the_core_target): Delete.
7966 (core_file_command): Moved from corefile.c. Check exec_bfd
7967 instead of the_core_target. Use target_detach instead of calling
7968 into the_core_target directly.
7969 (maybe_say_no_core_file_now): New.
7970 (core_target::detach): Use it.
7971 (_initialize_corelow): Remove references to the_core_target.
7972 * gdbcore.h (the_core_target): Delete.
7973
7974 2018-05-11 Tom Tromey <tromey@redhat.com>
7975 Pedro Alves <palves@redhat.com>
7976
7977 * corefile.c (core_bfd): Remove.
7978 * gdbcore.h (core_bfd): Now a macro.
7979 * progspace.h (struct program_space) <cbfd>: New field.
7980
7981 2018-05-11 Tom Tromey <tom@tromey.com>
7982
7983 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7984 gdb::def_vector.
7985
7986 2018-05-10 Tom Tromey <tom@tromey.com>
7987
7988 * configure: Rebuild.
7989 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7990
7991 2018-05-10 Joel Brobecker <brobecker@adacore.com>
7992
7993 PR server/23158:
7994 * regformats/regdat.sh: Adjust script, following the addition
7995 of the new expedite_regs parameter to init_target_desc.
7996
7997 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
7998
7999 PR gdb/23127
8000 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8001 set_gdbarch_significant_addr_bit.
8002 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8003 set_gdbarch_significant_addr_bit.
8004 * utils.c (address_significant): Update to sign extend addr.
8005
8006 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8007
8008 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8009 (xtensa_linux_init_abi): Limit tdep->num_regs by
8010 tdep->num_nopriv_regs.
8011 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8012 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8013 not initialized.
8014
8015 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8016
8017 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8018
8019 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8020
8021 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8022 (I387_MXCSR_INIT_VAL): New constant.
8023 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8024 buffer if it was supplied by the inferior.
8025 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8026 (i387_xsave_get_clear_bv): New function.
8027 (i387_supply_xsave): Only read x87 control registers from the
8028 xsave buffer if the feature is enabled, and the state will have
8029 been written, otherwise, provide a suitable default.
8030 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8031 including x87 control registers. Update control registers if they
8032 have changed from the default value, and mark features as enabled
8033 as required.
8034 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8035
8036 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8037
8038 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8039
8040 2018-05-07 Tom Tromey <tom@tromey.com>
8041
8042 * configure: Rebuild.
8043 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8044
8045 2018-05-07 Tom Tromey <tom@tromey.com>
8046
8047 PR tdep/20362:
8048 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8049 bit. Use correct value for VDIV.
8050
8051 2018-05-04 Tom Tromey <tom@tromey.com>
8052
8053 * configure: Rebuild.
8054 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8055
8056 2018-05-04 Tom Tromey <tom@tromey.com>
8057
8058 * linux-record.c (record_linux_system_call) <case
8059 RECORD_SYS_RECVFROM>: Add "break".
8060
8061 2018-05-04 Tom Tromey <tom@tromey.com>
8062
8063 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8064 Add missing "break".
8065 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8066 Add missing "break".
8067
8068 2018-05-04 Tom Tromey <tom@tromey.com>
8069
8070 * rs6000-tdep.c (ppc_process_record_op4)
8071 (ppc_process_record_op63): Add fall-through comment.
8072
8073 2018-05-04 Tom Tromey <tom@tromey.com>
8074
8075 * i386-tdep.c (i386_process_record): Add fall-through comment.
8076
8077 2018-05-04 Tom Tromey <tom@tromey.com>
8078
8079 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8080 comment.
8081
8082 2018-05-04 Tom Tromey <tom@tromey.com>
8083
8084 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8085 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8086 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8087 comment.
8088 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8089 comment.
8090 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8091 comment.
8092
8093 2018-05-04 Tom Tromey <tom@tromey.com>
8094
8095 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8096
8097 2018-05-04 Tom Tromey <tom@tromey.com>
8098
8099 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8100 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8101 * symfile.c (section_is_mapped): Fix fall-through comment.
8102 * stabsread.c (define_symbol, read_member_functions): Fix
8103 fall-through comment.
8104 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8105 comment.
8106 * remote.c (remote_wait_as): Fix fall-through comment.
8107 * p-exp.y (yylex): Fix fall-through comment.
8108 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8109 comment.
8110 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8111 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8112 * jv-exp.y (yylex): Fix fall-through comment.
8113 * go-exp.y (lex_one_token): Fix fall-through comment.
8114 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8115 fall-through comment.
8116 * f-exp.y (yylex): Fix fall-through comment.
8117 * dwarf2read.c (process_die): Fix fall-through comments.
8118 * dbxread.c (process_one_symbol): Fix fall-through comment.
8119 * d-exp.y (lex_one_token): Fix fall-through comment.
8120 * cp-name-parser.y (yylex): Fix fall-through comment.
8121 * coffread.c (coff_symtab_read): Fix fall-through comment.
8122 * c-exp.y (lex_one_token): Fix fall-through comment.
8123 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8124 comment.
8125 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8126 comment.
8127
8128 2018-05-04 Tom Tromey <tom@tromey.com>
8129
8130 PR python/22730:
8131 * NEWS: Mention gdb.execute change.
8132 * gdbcmd.h (execute_control_command): Don't declare.
8133 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8134 execute_control_commands, execute_control_commands_to_string.
8135 * cli/cli-script.h (execute_control_commands)
8136 (execute_control_commands_to_string): Declare.
8137 (execute_control_command): Add from_tty parameter.
8138 * cli/cli-script.c (execute_control_commands)
8139 (execute_control_commands_to_string): New functions.
8140 (execute_user_command): Use execute_control_commands.
8141 (execute_control_command_1): Add "from_tty" parameter. Update.
8142 (execute_control_command): Likewise.
8143
8144 2018-05-04 Tom Tromey <tom@tromey.com>
8145
8146 PR python/22731:
8147 * NEWS: Mention that breakpoint commands are writable.
8148 * python/py-breakpoint.c (bppy_set_commands): New function.
8149 (breakpoint_object_getset) <"commands">: Use it.
8150
8151 2018-05-04 Tom Tromey <tom@tromey.com>
8152
8153 * tracepoint.c (actions_command): Update.
8154 * mi/mi-cmd-break.c (mi_command_line_array)
8155 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8156 (mi_read_next_line): Remove.
8157 (mi_cmd_break_commands): Update.
8158 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8159 function_view.
8160 * cli/cli-script.c (get_command_line): Update.
8161 (process_next_line): Use function_view. Constify.
8162 (recurse_read_control_structure, read_command_lines)
8163 (read_command_lines_1): Change argument types to function_view.
8164 (do_define_command, document_command): Update.
8165 * breakpoint.h (check_tracepoint_command): Don't declare.
8166 * breakpoint.c (check_tracepoint_command): Remove.
8167 (commands_command_1, create_tracepoint_from_upload): Update.
8168
8169 2018-05-04 Tom Tromey <tom@tromey.com>
8170
8171 PR gdb/11750:
8172 * cli/cli-script.h (enum command_control_type) <define_control>:
8173 New constant.
8174 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8175 (build_command_line, execute_control_command_1)
8176 (process_next_line): Likewise.
8177 (do_define_command): New function, extracted from define_command.
8178 (define_command): Use it.
8179
8180 2018-05-04 Tom Tromey <tom@tromey.com>
8181
8182 * tracepoint.c (actions_command): Update.
8183 * cli/cli-script.h (read_command_lines): Update.
8184 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8185 (MAX_TMPBUF): Remove define.
8186 (define_command): Use string_printf.
8187 (document_command): Likewise.
8188 * breakpoint.c (commands_command_1): Update.
8189
8190 2018-05-04 Tom Tromey <tom@tromey.com>
8191
8192 * top.c (execute_command): Update.
8193 * cli/cli-script.h (print_command_lines): Now varargs.
8194 * cli/cli-script.c (print_command_lines): Now varargs.
8195 (execute_control_command_1) <case while_control, case if_control>:
8196 Update.
8197
8198 2018-05-04 Tom Tromey <tom@tromey.com>
8199
8200 * tracepoint.c (all_tracepoint_actions): Rename from
8201 all_tracepoint_actions_and_cleanup. Change return type.
8202 (actions_command, encode_actions_1, encode_actions)
8203 (trace_dump_actions, tdump_command): Update.
8204 * remote.c (remote_download_command_source): Update.
8205 * python/python.c (gdbpy_eval_from_control_command)
8206 (python_command, python_interactive_command): Update.
8207 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8208 * guile/guile.c (guile_command)
8209 (gdbscm_eval_from_control_command, guile_command): Update.
8210 * compile/compile.c (compile_code_command)
8211 (compile_print_command, compile_to_object): Update.
8212 * cli/cli-script.h (struct command_lines_deleter): New.
8213 (counted_command_line): New typedef.
8214 (struct command_line): Add constructor, destructor.
8215 <body_list>: Remove.
8216 <body_list_0, body_list_1>: New members.
8217 (command_line_up): Remove typedef.
8218 (read_command_lines, read_command_lines_1, get_command_line):
8219 Update.
8220 (copy_command_lines): Don't declare.
8221 * cli/cli-script.c (build_command_line): Use "new".
8222 (get_command_line): Return counted_command_line.
8223 (print_command_lines, execute_user_command)
8224 (execute_control_command_1, while_command, if_command): Update.
8225 (realloc_body_list): Remove.
8226 (process_next_line, recurse_read_control_structure): Update.
8227 (read_command_lines, read_command_lines_1): Return counted_command_line.
8228 (free_command_lines): Use "delete".
8229 (copy_command_lines): Remove.
8230 (define_command, document_command, show_user_1): Update.
8231 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8232 a counted_command_line.
8233 * breakpoint.h (counted_command_line): Remove typedef.
8234 (breakpoint_set_commands): Update.
8235 * breakpoint.c (check_no_tracepoint_commands)
8236 (validate_commands_for_breakpoint): Update.
8237 (breakpoint_set_commands): Change commands to be a
8238 counted_command_line.
8239 (commands_command_1, update_dprintf_command_list)
8240 (create_tracepoint_from_upload): Update.
8241
8242 2018-05-04 Tom Tromey <tom@tromey.com>
8243
8244 * cli/cli-decode.h (cmd_list_element): New constructor.
8245 (~cmd_list_element): New destructor.
8246 (struct cmd_list_element): Add initializers.
8247 * cli/cli-decode.c (do_add_cmd): Use "new".
8248 (delete_cmd): Use "delete".
8249
8250 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8251 Pedro Alves <palves@redhat.com>
8252
8253 PR breakpoints/19806 and support for PR external/20207.
8254 * NEWS: Mention Aarch64 watchpoint improvements.
8255 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8256 watchpoints and PR external/20207 watchpoints.
8257 * nat/aarch64-linux-hw-point.c
8258 (kernel_supports_any_contiguous_range): New.
8259 (aarch64_watchpoint_offset): New.
8260 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8261 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8262 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8263 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8264 next_addr_orig_p. Support PR external/20207 watchpoints.
8265 (aarch64_downgrade_regs): New.
8266 (aarch64_dr_state_insert_one_point): New parameters offset and
8267 addr_orig.
8268 (aarch64_dr_state_remove_one_point): Likewise.
8269 (aarch64_handle_breakpoint): Update caller.
8270 (aarch64_handle_aligned_watchpoint): Likewise.
8271 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8272 aligned_offset.
8273 (aarch64_linux_set_debug_regs): Remove const from state. Call
8274 aarch64_downgrade_regs.
8275 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8276 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8277 (DR_CONTROL_MASK): ... this.
8278 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8279 (unsigned int aarch64_watchpoint_offset): New prototype.
8280 (aarch64_linux_set_debug_regs): Remove const from state.
8281 * utils.c (align_up, align_down): Move to ...
8282 * common/common-utils.c (align_up, align_down): ... here.
8283 * utils.h (align_up, align_down): Move to ...
8284 * common/common-utils.h (align_up, align_down): ... here.
8285
8286 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8287
8288 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8289 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8290 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8291 Re-implement to match the ABI as summarized in GCC's
8292 gcc/config/sparc/sparc.c. All callers updated.
8293 (sparc32_store_arguments): Remove assertion.
8294
8295 2018-05-04 Tom Tromey <tom@tromey.com>
8296
8297 * printcmd.c: Don't include tui.h.
8298 (decode_format): Use skip_spaces.
8299
8300 2018-05-04 Tom Tromey <tom@tromey.com>
8301
8302 PR gdb/22619:
8303 * printcmd.c (last_count): New global.
8304 (x_command): Use saved count when repeating.
8305
8306 2018-05-04 Tom Tromey <tom@tromey.com>
8307
8308 * nto-procfs.c (do_closedir_cleanup): Remove.
8309 (procfs_pidlist): Use gdb_dir_up.
8310 * procfs.c (do_closedir_cleanup): Remove.
8311 (proc_update_threads): Use gdb_dir_up.
8312 * common/filestuff.h (struct gdb_dir_deleter): New.
8313 (gdb_dir_up): New typedef.
8314
8315 2018-05-04 Tom Tromey <tom@tromey.com>
8316
8317 * ada-lang.c (print_mention_exception): Use std::string.
8318
8319 2018-05-04 Tom Tromey <tom@tromey.com>
8320
8321 * ada-lang.c (create_excep_cond_exprs): Update.
8322 (ada_exception_catchpoint_cond_string): Use std::string.
8323
8324 2018-05-04 Tom Tromey <tom@tromey.com>
8325
8326 * ada-lang.c (xget_renaming_scope): Return std::string.
8327 (old_renaming_is_invisible): Update.
8328
8329 2018-05-04 Tom Tromey <tom@tromey.com>
8330
8331 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8332 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8333
8334 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8335
8336 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8337
8338 2018-05-04 Tom Tromey <tom@tromey.com>
8339
8340 * remote.c (remote_query_supported_append): Change type.
8341 (remote_check_symbols): Update.
8342
8343 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8344
8345 PR gdb/11420
8346 * configure.ac: Prepend libpython.
8347 * python/python-config.py: Likewise.
8348 * configure: Regenerate.
8349
8350 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8351
8352 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8353
8354 2018-05-03 Pedro Alves <palves@redhat.com>
8355
8356 * s390-linux-nat.c
8357 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8358 override. Write 'true' instead of '1'.
8359 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8360 declaration.
8361
8362 2018-05-02 Pedro Alves <palves@redhat.com>
8363
8364 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8365 add_inf_child_target.
8366 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8367 add_inf_child_target.
8368 * aix-thread.c (aix_thread_target_info): New.
8369 (aix_thread_target) <shortname, longname, doc>: Delete.
8370 <info>: New.
8371 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8372 add_inf_child_target.
8373 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8374 add_inf_child_target.
8375 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8376 add_inf_child_target.
8377 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8378 add_inf_child_target.
8379 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8380 add_inf_child_target.
8381 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8382 add_inf_child_target.
8383 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8384 add_inf_child_target.
8385 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8386 add_inf_child_target.
8387 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8388 add_inf_child_target.
8389 * bfd-target.c (target_bfd_target_info): New.
8390 (target_bfd) <shortname, longname, doc>: Delete.
8391 <info>: New.
8392 * bsd-kvm.c (bsd_kvm_target_info): New.
8393 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8394 <info>: New.
8395 (bsd_kvm_target::open): Rename to ...
8396 (bsd_kvm_target_open): ... this. Adjust.
8397 * bsd-uthread.c (bsd_uthread_target_info): New.
8398 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8399 <info>: New.
8400 * corefile.c (core_file_command): Adjust.
8401 * corelow.c (core_target_info): New.
8402 (core_target) <shortname, longname, doc>: Delete.
8403 <info>: New.
8404 (core_target::open): Rename to ...
8405 (core_target_open): ... this. Adjust.
8406 * ctf.c (ctf_target_info): New.
8407 (ctf_target) <shortname, longname, doc>: Delete.
8408 <info>: New.
8409 (ctf_target::open): Rename to ...
8410 (ctf_target_open): ... this.
8411 (_initialize_ctf): Adjust.
8412 * exec.c (exec_target_info): New.
8413 (exec_target) <shortname, longname, doc>: Delete.
8414 <info>: New.
8415 (exec_target::open): Rename to ...
8416 (exec_target_open): ... this.
8417 * gdbcore.h (core_target_open): Declare.
8418 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8419 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8420 add_inf_child_target.
8421 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8422 add_inf_child_target.
8423 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8424 add_inf_child_target.
8425 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8426 add_inf_child_target.
8427 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8428 add_inf_child_target.
8429 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8430 add_inf_child_target.
8431 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8432 add_inf_child_target.
8433 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8434 add_inf_child_target.
8435 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8436 add_inf_child_target.
8437 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8438 add_inf_child_target.
8439 * inf-child.c (inf_child_target_info): New.
8440 (inf_child_target::info): New.
8441 (inf_child_open_target): Remove 'target' parameter. Use
8442 get_native_target instead.
8443 (inf_child_target::open): Delete.
8444 (add_inf_child_target): New.
8445 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8446 Delete.
8447 <info>: New.
8448 (add_inf_child_target): Declare.
8449 (inf_child_open_target): Declare.
8450 * linux-thread-db.c (thread_db_target_info): New.
8451 (thread_db_target) <shortname, longname, doc>: Delete.
8452 <info>: New.
8453 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8454 add_inf_child_target.
8455 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8456 add_inf_child_target.
8457 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8458 add_inf_child_target.
8459 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8460 add_inf_child_target.
8461 * make-target-delegates (print_class): Adjust.
8462 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8463 add_inf_child_target.
8464 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8465 add_inf_child_target.
8466 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8467 add_inf_child_target.
8468 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8469 add_inf_child_target.
8470 * nto-procfs.c (nto_native_target_info): New.
8471 (nto_procfs_target_native) <shortname, longname, doc>:
8472 Delete.
8473 <info>: New.
8474 (nto_procfs_target_info): New.
8475 (nto_procfs_target_procfs) <shortname, longname, doc>:
8476 Delete.
8477 <info>: New.
8478 (init_procfs_targets): Adjust.
8479 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8480 add_inf_child_target.
8481 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8482 add_inf_child_target.
8483 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8484 add_inf_child_target.
8485 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8486 add_inf_child_target.
8487 * ravenscar-thread.c (ravenscar_target_info): New.
8488 (ravenscar_thread_target) <shortname, longname, doc>:
8489 Delete.
8490 <info>: New.
8491 * record-btrace.c (record_btrace_target_info):
8492 (record_btrace_target) <shortname, longname, doc>: Delete.
8493 <info>: New.
8494 (record_btrace_target::open): Rename to ...
8495 (record_btrace_target_open): ... this. Adjust.
8496 * record-full.c (record_longname, record_doc): New.
8497 (record_full_base_target) <shortname, longname, doc>: Delete.
8498 <info>: New.
8499 (record_full_target_info): New.
8500 (record_full_target): <shortname>: Delete.
8501 <info>: New.
8502 (record_full_core_open_1, record_full_open_1): Update comments.
8503 (record_full_base_target::open): Rename to ...
8504 (record_full_open): ... this.
8505 (cmd_record_full_restore): Update.
8506 (_initialize_record_full): Update.
8507 * remote-sim.c (remote_sim_target_info): New.
8508 (gdbsim_target) <shortname, longname, doc>: Delete.
8509 <info>: New.
8510 (gdbsim_target::open): Rename to ...
8511 (gdbsim_target_open): ... this.
8512 (_initialize_remote_sim): Adjust.
8513 * remote.c (remote_doc): New.
8514 (remote_target_info): New.
8515 (remote_target) <shortname, longname, doc>: Delete.
8516 <info>: New.
8517 (extended_remote_target_info): New.
8518 (extended_remote_target) <shortname, longname, doc>: Delete.
8519 <info>: New.
8520 (remote_target::open_1): Make static. Adjust.
8521 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8522 * s390-linux-nat.c (_initialize_s390_nat): Use
8523 add_inf_child_target.
8524 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8525 add_inf_child_target.
8526 * sol-thread.c (thread_db_target_info): New.
8527 (sol_thread_target) <shortname, longname, doc>: Delete.
8528 <info>: New.
8529 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8530 add_inf_child_target.
8531 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8532 add_inf_child_target.
8533 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8534 add_inf_child_target.
8535 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8536 add_inf_child_target.
8537 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8538 add_inf_child_target.
8539 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8540 add_inf_child_target.
8541 * spu-linux-nat.c (_initialize_spu_nat): Use
8542 add_inf_child_target.
8543 * spu-multiarch.c (spu_multiarch_target_info): New.
8544 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8545 <info>: New.
8546 * target-delegates.c: Regenerate.
8547 * target.c: Include <unordered_map>.
8548 (target_ops_p): Delete.
8549 (DEF_VEC_P(target_ops_p)): Delete.
8550 (target_factories): New.
8551 (test_target_info): New.
8552 (test_target_ops::info): New.
8553 (open_target): Adjust to use target_factories.
8554 (add_target_with_completer): Rename to ...
8555 (add_target): ... this. Change prototype. Register target_info
8556 and open callback in target_factories. Register target_info in
8557 command context instead of target_ops.
8558 (add_target): Delete old implementation.
8559 (add_deprecated_target_alias): Change prototype. Adjust.
8560 (the_native_target): New.
8561 (set_native_target, get_native_target): New.
8562 (find_default_run_target): Use the_native_target.
8563 (find_attach_target, find_run_target): Simplify.
8564 (target_ops::open): Delete.
8565 (dummy_target_info): New.
8566 (dummy_target::shortname, dummy_target::longname)
8567 (dummy_target::doc): Delete.
8568 (dummy_target::info): New.
8569 (debug_target::shortname, debug_target::longname)
8570 (debug_target::doc): Delete.
8571 (debug_target::info): New.
8572 * target.h (struct target_info): New.
8573 (target_ops::~target_ops): Add comment.
8574 (target_ops::info): New.
8575 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8576 longer virtual. Implement in terms of target_info.
8577 (set_native_target, get_native_target): Declare.
8578 (target_open_ftype): New.
8579 (add_target, add_target_with_completer)
8580 (add_deprecated_target_alias): Change prototype.
8581 (test_target) <shortname, longname, doc>: Delete.
8582 <info>: New.
8583 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8584 add_inf_child_target.
8585 * tracefile-tfile.c (tfile_target_info): New.
8586 (tfile_target) <shortname, longname, doc>: Delete.
8587 <info>: New.
8588 (tfile_target::open): Rename to ...
8589 (tfile_target_open): ... this.
8590 (_initialize_tracefile_tfile): Adjust.
8591 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8592 add_inf_child_target.
8593 * windows-nat.c (_initialize_windows_nat): Use
8594 add_inf_child_target.
8595 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8596 add_inf_child_target.
8597
8598 2018-05-02 Pedro Alves <palves@redhat.com>
8599
8600 * linux-nat.h (linux_nat_target) <low_new_thread,
8601 low_delete_thread, low_new_fork, low_forget_process,
8602 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8603 New virtual methods.
8604 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8605 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8606 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8607 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8608 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8609 Delete.
8610 * linux-fork.c (delete_fork): Adjust to call low method.
8611 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8612 (linux_nat_new_fork, linux_nat_forget_process_hook)
8613 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8614 (linux_nat_status_is_event):
8615 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8616 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8617 to call low method.
8618 (sigtrap_is_event): Rename to ...
8619 (linux_nat_target::low_status_is_event): ... this.
8620 (linux_nat_set_status_is_event): Delete.
8621 (save_stop_reason, linux_nat_wait_1)
8622 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8623 low methods.
8624 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8625 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8626 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8627 (linux_nat_set_prepare_to_resume): Delete.
8628 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8629 low virtual methods.
8630 * amd64-linux-nat.c: Likewise.
8631 * arm-linux-nat.c: Likewise.
8632 * i386-linux-nat.c: Likewise.
8633 * ia64-linux-nat.c: Likewise.
8634 * mips-linux-nat.c: Likewise.
8635 * ppc-linux-nat.c: Likewise.
8636 * s390-linux-nat.c: Likewise.
8637 * sparc64-linux-nat.c: Likewise.
8638 * x86-linux-nat.c: Likewise.
8639 * x86-linux-nat.h: Include "nat/x86-linux.h".
8640 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8641 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8642 Override methods.
8643
8644 2018-05-02 Pedro Alves <palves@redhat.com>
8645
8646 * target.h (target_ops)
8647 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8648 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8649 stopped_by_watchpoint, have_continuable_watchpoint,
8650 stopped_data_address, watchpoint_addr_within_range,
8651 can_accel_watchpoint_condition, can_run, thread_alive,
8652 has_all_memory, has_memory, has_stack, has_registers,
8653 has_execution, can_async_p, is_async_p, supports_non_stop,
8654 always_non_stop_p, can_execute_reverse, supports_multi_process,
8655 supports_enable_disable_tracepoint,
8656 supports_disable_randomization, supports_string_tracing,
8657 supports_evaluation_of_breakpoint_conditions,
8658 can_run_breakpoint_commands, filesystem_is_local,
8659 can_download_tracepoint, get_trace_state_variable_value,
8660 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8661 record_is_replaying, record_will_replay,
8662 augmented_libraries_svr4_read>: Adjust to return bool.
8663 * aarch64-linux-nat.c: All implementations adjusted.
8664 * aix-thread.c: All implementations adjusted.
8665 * arm-linux-nat.c: All implementations adjusted.
8666 * breakpoint.c: All implementations adjusted.
8667 * bsd-kvm.c: All implementations adjusted.
8668 * bsd-uthread.c: All implementations adjusted.
8669 * corelow.c: All implementations adjusted.
8670 * ctf.c: All implementations adjusted.
8671 * darwin-nat.c: All implementations adjusted.
8672 * darwin-nat.h: All implementations adjusted.
8673 * exec.c: All implementations adjusted.
8674 * fbsd-nat.c: All implementations adjusted.
8675 * fbsd-nat.h: All implementations adjusted.
8676 * gnu-nat.c: All implementations adjusted.
8677 * gnu-nat.h: All implementations adjusted.
8678 * go32-nat.c: All implementations adjusted.
8679 * ia64-linux-nat.c: All implementations adjusted.
8680 * inf-child.c: All implementations adjusted.
8681 * inf-child.h: All implementations adjusted.
8682 * inf-ptrace.c: All implementations adjusted.
8683 * inf-ptrace.h: All implementations adjusted.
8684 * linux-nat.c: All implementations adjusted.
8685 * linux-nat.h: All implementations adjusted.
8686 * mips-linux-nat.c: All implementations adjusted.
8687 * nto-procfs.c: All implementations adjusted.
8688 * ppc-linux-nat.c: All implementations adjusted.
8689 * procfs.c: All implementations adjusted.
8690 * ravenscar-thread.c: All implementations adjusted.
8691 * record-btrace.c: All implementations adjusted.
8692 * record-full.c: All implementations adjusted.
8693 * remote-sim.c: All implementations adjusted.
8694 * remote.c: All implementations adjusted.
8695 * s390-linux-nat.c: All implementations adjusted.
8696 * sol-thread.c: All implementations adjusted.
8697 * spu-multiarch.c: All implementations adjusted.
8698 * target-delegates.c: All implementations adjusted.
8699 * target.c: All implementations adjusted.
8700 * target.h: All implementations adjusted.
8701 * tracefile-tfile.c: All implementations adjusted.
8702 * tracefile.c: All implementations adjusted.
8703 * tracefile.h: All implementations adjusted.
8704 * windows-nat.c: All implementations adjusted.
8705 * x86-linux-nat.h: All implementations adjusted.
8706 * x86-nat.h: All implementations adjusted.
8707
8708 2018-05-02 Pedro Alves <palves@redhat.com>
8709
8710 * make-target-delegates (scan_target_h): Don't trim lines here.
8711 Replace sequences of tabs and/or whitespace with a single
8712 whitespace.
8713 (top level, parsing methods): Trim each line before processing it
8714 here.
8715
8716 2018-05-02 Pedro Alves <palves@redhat.com>
8717 John Baldwin <jhb@freebsd.org>
8718
8719 * target.h (enum strata) <debug_stratum>: New.
8720 (struct target_ops) <all delegation methods>: Replace by C++
8721 virtual methods, and drop "to_" prefix. All references updated
8722 throughout.
8723 <to_shortname, to_longname, to_doc, to_data,
8724 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8725 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8726 virtual methods. All references updated throughout.
8727 <can_attach, supports_terminal_ours, can_create_inferior,
8728 get_thread_control_capabilities, attach_no_wait>: New
8729 virtual methods.
8730 <insert_breakpoint, remove_breakpoint>: Now
8731 TARGET_DEFAULT_NORETURN methods.
8732 <info_proc>: Now returns bool.
8733 <to_magic>: Delete.
8734 (OPS_MAGIC): Delete.
8735 (current_target): Delete. All references replaced by references
8736 to ...
8737 (target_stack): ... this. New.
8738 (target_shortname, target_longname): Adjust.
8739 (target_can_run): Now a function declaration.
8740 (default_child_has_all_memory, default_child_has_memory)
8741 (default_child_has_stack, default_child_has_registers)
8742 (default_child_has_execution): Remove target_ops parameter.
8743 (complete_target_initialization): Delete.
8744 (memory_breakpoint_target): New template class.
8745 (test_target_ops): Refactor as a C++ class with virtual methods.
8746 * make-target-delegates (NAME_PART): Tighten.
8747 (POINTER_PART, CP_SYMBOL): New.
8748 (SIMPLE_RETURN_PART): Reimplement.
8749 (VEC_RETURN_PART): Expect less.
8750 (RETURN_PART, VIRTUAL_PART): New.
8751 (METHOD): Adjust to C++ virtual methods.
8752 (scan_target_h): Remove reference to C99.
8753 (dname): Output "target_ops::" prefix.
8754 (write_function_header): Adjust to output a C++ class method.
8755 (write_declaration): New.
8756 (write_delegator): Adjust to output a C++ class method.
8757 (tdname): Output "dummy_target::" prefix.
8758 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8759 method.
8760 (tdefault_names, debug_names): Delete.
8761 (return_types, tdefaults, styles, argtypes_array): New.
8762 (top level): All methods are delegators.
8763 (print_class): New.
8764 (top level): Print dummy_target and debug_target classes.
8765 * target-delegates.c: Regenerate.
8766 * target-debug.h (target_debug_print_enum_info_proc_what)
8767 (target_debug_print_thread_control_capabilities)
8768 (target_debug_print_thread_info_p): New.
8769 * target.c (dummy_target): Delete.
8770 (the_dummy_target, the_debug_target): New.
8771 (target_stack): Now extern.
8772 (set_targetdebug): Push/unpush debug target.
8773 (default_child_has_all_memory, default_child_has_memory)
8774 (default_child_has_stack, default_child_has_registers)
8775 (default_child_has_execution): Remove target_ops parameter.
8776 (complete_target_initialization): Delete.
8777 (add_target_with_completer): No longer call
8778 complete_target_initialization.
8779 (target_supports_terminal_ours): Use regular delegation.
8780 (update_current_target): Delete.
8781 (push_target): No longer check magic number. Don't call
8782 update_current_target.
8783 (unpush_target): Don't call update_current_target.
8784 (target_is_pushed): No longer check magic number.
8785 (target_require_runnable): Skip for all stratums over
8786 process_stratum.
8787 (target_ops::info_proc): New.
8788 (target_info_proc): Use find_target_at and
8789 find_default_run_target.
8790 (target_supports_disable_randomization): Use regular delegation.
8791 (target_get_osdata): Use find_target_at.
8792 (target_ops::open, target_ops::close, target_ops::can_attach)
8793 (target_ops::attach, target_ops::can_create_inferior)
8794 (target_ops::create_inferior, target_ops::can_run)
8795 (target_can_run): New.
8796 (default_fileio_target): Use regular delegation.
8797 (target_ops::fileio_open, target_ops::fileio_pwrite)
8798 (target_ops::fileio_pread, target_ops::fileio_fstat)
8799 (target_ops::fileio_close, target_ops::fileio_unlink)
8800 (target_ops::fileio_readlink): New.
8801 (target_fileio_open_1, target_fileio_unlink)
8802 (target_fileio_readlink): Always call the target method. Handle
8803 FILEIO_ENOSYS.
8804 (return_zero, return_zero_has_execution): Delete.
8805 (init_dummy_target): Delete.
8806 (dummy_target::dummy_target, dummy_target::shortname)
8807 (dummy_target::longname, dummy_target::doc)
8808 (debug_target::debug_target, debug_target::shortname)
8809 (debug_target::longname, debug_target::doc): New.
8810 (target_supports_delete_record): Use regular delegation.
8811 (setup_target_debug): Delete.
8812 (maintenance_print_target_stack): Skip debug_stratum.
8813 (initialize_targets): Instantiate the_dummy_target and
8814 the_debug_target.
8815 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
8816 use target_stack.
8817 (target_auxv_search, fprint_target_auxv): Adjust.
8818 (info_auxv_command): Adjust to use target_stack.
8819 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8820 * exceptions.c (print_flush): Handle a NULL target_stack.
8821 * regcache.c (target_ops_no_register): Refactor as class with
8822 virtual methods.
8823
8824 * exec.c (exec_target): New class.
8825 (exec_ops): Now an exec_target.
8826 (exec_open, exec_close_1, exec_get_section_table)
8827 (exec_xfer_partial, exec_files_info, exec_has_memory)
8828 (exec_make_note_section): Refactor as exec_target methods.
8829 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8830 Delete.
8831 (exec_target::find_memory_regions): New.
8832 (_initialize_exec): Don't call init_exec_ops.
8833 * gdbcore.h (exec_file_clear): Delete.
8834
8835 * corefile.c (core_target): Delete.
8836 (core_file_command): Adjust.
8837 * corelow.c (core_target): New class.
8838 (the_core_target): New.
8839 (core_close): Remove target_ops parameter.
8840 (core_close_cleanup): Adjust.
8841 (core_target::close): New.
8842 (core_open, core_detach, get_core_registers, core_files_info)
8843 (core_xfer_partial, core_thread_alive, core_read_description)
8844 (core_pid_to_str, core_thread_name, core_has_memory)
8845 (core_has_stack, core_has_registers, core_info_proc): Rework as
8846 core_target methods.
8847 (ignore, core_remove_breakpoint, init_core_ops): Delete.
8848 (_initialize_corelow): Initialize the_core_target.
8849 * gdbcore.h (core_target): Delete.
8850 (the_core_target): New.
8851
8852 * ctf.c: (ctf_target): New class.
8853 (ctf_ops): Now a ctf_target.
8854 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8855 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8856 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8857 methods.
8858 (init_ctf_ops): Delete.
8859 (_initialize_ctf): Don't call it.
8860 * tracefile-tfile.c (tfile_target): New class.
8861 (tfile_ops): Now a tfile_target.
8862 (tfile_open, tfile_close, tfile_files_info)
8863 (tfile_get_tracepoint_status, tfile_trace_find)
8864 (tfile_fetch_registers, tfile_xfer_partial)
8865 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8866 Refactor as tfile_target methods.
8867 (tfile_xfer_partial_features): Remove target_ops parameter.
8868 (init_tfile_ops): Delete.
8869 (_initialize_tracefile_tfile): Don't call it.
8870 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8871 (tracefile_has_stack, tracefile_has_registers)
8872 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8873 tracefile_target methods.
8874 (init_tracefile_ops): Delete.
8875 (tracefile_target::tracefile_target): New.
8876 * tracefile.h: Include "target.h".
8877 (tracefile_target): New class.
8878 (init_tracefile_ops): Delete.
8879
8880 * spu-multiarch.c (spu_multiarch_target): New class.
8881 (spu_ops): Now a spu_multiarch_target.
8882 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8883 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8884 (spu_search_memory, spu_mourn_inferior): Refactor as
8885 spu_multiarch_target methods.
8886 (init_spu_ops): Delete.
8887 (_initialize_spu_multiarch): Remove references to init_spu_ops,
8888 complete_target_initialization.
8889
8890 * ravenscar-thread.c (ravenscar_thread_target): New class.
8891 (ravenscar_ops): Now a ravenscar_thread_target.
8892 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8893 (ravenscar_thread_alive, ravenscar_pid_to_str)
8894 (ravenscar_fetch_registers, ravenscar_store_registers)
8895 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8896 (ravenscar_stopped_by_hw_breakpoint)
8897 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8898 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8899 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8900 methods.
8901 (init_ravenscar_thread_ops): Delete.
8902 (_initialize_ravenscar): Remove references to
8903 init_ravenscar_thread_ops and complete_target_initialization.
8904
8905 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8906 (bsd_uthread_target): New class.
8907 (bsd_uthread_ops): Now a bsd_uthread_target.
8908 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8909 (bsd_uthread_close, bsd_uthread_mourn_inferior)
8910 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8911 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8912 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8913 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8914 (bsd_uthread_target): Delete function.
8915 (_initialize_bsd_uthread): Remove reference to
8916 complete_target_initialization.
8917
8918 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
8919 (target_bfd): ... this new class.
8920 (target_bfd_xfer_partial, target_bfd_get_section_table)
8921 (target_bfd_close): Refactor as target_bfd methods.
8922 (target_bfd::~target_bfd): New.
8923 (target_bfd_reopen): Adjust.
8924 (target_bfd::close): New.
8925
8926 * record-btrace.c (record_btrace_target): New class.
8927 (record_btrace_ops): Now a record_btrace_target.
8928 (record_btrace_open, record_btrace_stop_recording)
8929 (record_btrace_disconnect, record_btrace_close)
8930 (record_btrace_async, record_btrace_info)
8931 (record_btrace_insn_history, record_btrace_insn_history_range)
8932 (record_btrace_insn_history_from, record_btrace_call_history)
8933 (record_btrace_call_history_range)
8934 (record_btrace_call_history_from, record_btrace_record_method)
8935 (record_btrace_is_replaying, record_btrace_will_replay)
8936 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8937 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8938 (record_btrace_store_registers, record_btrace_prepare_to_store)
8939 (record_btrace_to_get_unwinder)
8940 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8941 (record_btrace_commit_resume, record_btrace_wait)
8942 (record_btrace_stop, record_btrace_can_execute_reverse)
8943 (record_btrace_stopped_by_sw_breakpoint)
8944 (record_btrace_supports_stopped_by_sw_breakpoint)
8945 (record_btrace_stopped_by_hw_breakpoint)
8946 (record_btrace_supports_stopped_by_hw_breakpoint)
8947 (record_btrace_update_thread_list, record_btrace_thread_alive)
8948 (record_btrace_goto_begin, record_btrace_goto_end)
8949 (record_btrace_goto, record_btrace_stop_replaying_all)
8950 (record_btrace_execution_direction)
8951 (record_btrace_prepare_to_generate_core)
8952 (record_btrace_done_generating_core): Refactor as
8953 record_btrace_target methods.
8954 (init_record_btrace_ops): Delete.
8955 (_initialize_record_btrace): Remove reference to
8956 init_record_btrace_ops.
8957 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8958 the execution_direction global.
8959 (record_full_base_target, record_full_target)
8960 (record_full_core_target): New classes.
8961 (record_full_ops): Now a record_full_target.
8962 (record_full_core_ops): Now a record_full_core_target.
8963 (record_full_target::detach, record_full_target::disconnect)
8964 (record_full_core_target::disconnect)
8965 (record_full_target::mourn_inferior, record_full_target::kill):
8966 New.
8967 (record_full_open, record_full_close, record_full_async): Refactor
8968 as methods of the record_full_base_target class.
8969 (record_full_resume, record_full_commit_resume): Refactor
8970 as methods of the record_full_target class.
8971 (record_full_wait, record_full_stopped_by_watchpoint)
8972 (record_full_stopped_data_address)
8973 (record_full_stopped_by_sw_breakpoint)
8974 (record_full_supports_stopped_by_sw_breakpoint)
8975 (record_full_stopped_by_hw_breakpoint)
8976 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8977 methods of the record_full_base_target class.
8978 (record_full_store_registers, record_full_xfer_partial)
8979 (record_full_insert_breakpoint, record_full_remove_breakpoint):
8980 Refactor as methods of the record_full_target class.
8981 (record_full_can_execute_reverse, record_full_get_bookmark)
8982 (record_full_goto_bookmark, record_full_execution_direction)
8983 (record_full_record_method, record_full_info, record_full_delete)
8984 (record_full_is_replaying, record_full_will_replay)
8985 (record_full_goto_begin, record_full_goto_end, record_full_goto)
8986 (record_full_stop_replaying): Refactor as methods of the
8987 record_full_base_target class.
8988 (record_full_core_resume, record_full_core_kill)
8989 (record_full_core_fetch_registers)
8990 (record_full_core_prepare_to_store)
8991 (record_full_core_store_registers, record_full_core_xfer_partial)
8992 (record_full_core_insert_breakpoint)
8993 (record_full_core_remove_breakpoint)
8994 (record_full_core_has_execution): Refactor
8995 as methods of the record_full_core_target class.
8996 (record_full_base_target::supports_delete_record): New.
8997 (init_record_full_ops): Delete.
8998 (init_record_full_core_ops): Delete.
8999 (record_full_save): Refactor as method of the
9000 record_full_base_target class.
9001 (_initialize_record_full): Remove references to
9002 init_record_full_ops and init_record_full_core_ops.
9003
9004 * remote.c (remote_target, extended_remote_target): New classes.
9005 (remote_ops): Now a remote_target.
9006 (extended_remote_ops): Now an extended_remote_target.
9007 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9008 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9009 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9010 (remote_pass_signals, remote_set_syscall_catchpoint)
9011 (remote_program_signals, )
9012 (remote_thread_always_alive): Remove target_ops parameter.
9013 (remote_thread_alive, remote_thread_name)
9014 (remote_update_thread_list, remote_threads_extra_info)
9015 (remote_static_tracepoint_marker_at)
9016 (remote_static_tracepoint_markers_by_strid)
9017 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9018 (remote_open): Refactor as methods of remote_target.
9019 (extended_remote_open, extended_remote_detach)
9020 (extended_remote_attach, extended_remote_post_attach):
9021 (extended_remote_supports_disable_randomization)
9022 (extended_remote_create_inferior): : Refactor as method of
9023 extended_remote_target.
9024 (remote_set_permissions, remote_open_1, remote_detach)
9025 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9026 (remote_resume, remote_commit_resume, remote_stop)
9027 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9028 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9029 (remote_prepare_to_store, remote_store_registers)
9030 (remote_flash_erase, remote_flash_done, remote_files_info)
9031 (remote_kill, remote_mourn, remote_insert_breakpoint)
9032 (remote_remove_breakpoint, remote_insert_watchpoint)
9033 (remote_watchpoint_addr_within_range)
9034 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9035 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9036 (remote_supports_stopped_by_sw_breakpoint)
9037 (remote_stopped_by_hw_breakpoint)
9038 (remote_supports_stopped_by_hw_breakpoint)
9039 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9040 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9041 (remote_verify_memory): Refactor as methods of remote_target.
9042 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9043 parameter.
9044 (remote_xfer_partial, remote_get_memory_xfer_limit)
9045 (remote_search_memory, remote_rcmd, remote_memory_map)
9046 (remote_pid_to_str, remote_get_thread_local_address)
9047 (remote_get_tib_address, remote_read_description): Refactor as
9048 methods of remote_target.
9049 (remote_target::fileio_open, remote_target::fileio_pwrite)
9050 (remote_target::fileio_pread, remote_target::fileio_close): New.
9051 (remote_hostio_readlink, remote_hostio_fstat)
9052 (remote_filesystem_is_local, remote_can_execute_reverse)
9053 (remote_supports_non_stop, remote_supports_disable_randomization)
9054 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9055 (remote_supports_enable_disable_tracepoint)
9056 (remote_supports_string_tracing)
9057 (remote_can_run_breakpoint_commands, remote_trace_init)
9058 (remote_download_tracepoint, remote_can_download_tracepoint)
9059 (remote_download_trace_state_variable, remote_enable_tracepoint)
9060 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9061 (remote_trace_start, remote_get_trace_status)
9062 (remote_get_tracepoint_status, remote_trace_stop)
9063 (remote_trace_find, remote_get_trace_state_variable_value)
9064 (remote_save_trace_data, remote_get_raw_trace_data)
9065 (remote_set_disconnected_tracing, remote_core_of_thread)
9066 (remote_set_circular_trace_buffer, remote_traceframe_info)
9067 (remote_get_min_fast_tracepoint_insn_len)
9068 (remote_set_trace_buffer_size, remote_set_trace_notes)
9069 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9070 (remote_disable_btrace, remote_teardown_btrace)
9071 (remote_read_btrace, remote_btrace_conf)
9072 (remote_augmented_libraries_svr4_read, remote_load)
9073 (remote_pid_to_exec_file, remote_can_do_single_step)
9074 (remote_execution_direction, remote_thread_handle_to_thread_info):
9075 Refactor as methods of remote_target.
9076 (init_remote_ops, init_extended_remote_ops): Delete.
9077 (remote_can_async_p, remote_is_async_p, remote_async)
9078 (remote_thread_events, remote_upload_tracepoints)
9079 (remote_upload_trace_state_variables): Refactor as methods of
9080 remote_target.
9081 (_initialize_remote): Remove references to init_remote_ops and
9082 init_extended_remote_ops.
9083
9084 * remote-sim.c (gdbsim_target): New class.
9085 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9086 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9087 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9088 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9089 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9090 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9091 Refactor as methods of gdbsim_target.
9092 (gdbsim_ops): Now a gdbsim_target.
9093 (init_gdbsim_ops): Delete.
9094 (gdbsim_cntrl_c): Adjust.
9095 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9096
9097 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9098 (the_amd64_linux_nat_target): New.
9099 (amd64_linux_fetch_inferior_registers)
9100 (amd64_linux_store_inferior_registers): Refactor as methods of
9101 amd64_linux_nat_target.
9102 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9103 * i386-linux-nat.c: Don't include "linux-nat.h".
9104 (i386_linux_nat_target): New class.
9105 (the_i386_linux_nat_target): New.
9106 (i386_linux_fetch_inferior_registers)
9107 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9108 as methods of i386_linux_nat_target.
9109 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9110 * inf-child.c (inf_child_ops): Delete.
9111 (inf_child_fetch_inferior_registers)
9112 (inf_child_store_inferior_registers): Delete.
9113 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9114 methods of inf_child_target.
9115 (inf_child_target::supports_terminal_ours)
9116 (inf_child_target::terminal_init)
9117 (inf_child_target::terminal_inferior)
9118 (inf_child_target::terminal_ours_for_output)
9119 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9120 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9121 New.
9122 (inf_child_open, inf_child_disconnect, inf_child_close)
9123 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9124 (inf_child_post_startup_inferior, inf_child_can_run)
9125 (inf_child_pid_to_exec_file): Refactor as methods of
9126 inf_child_target.
9127 (inf_child_follow_fork): Delete.
9128 (inf_child_target::can_create_inferior)
9129 (inf_child_target::can_attach): New.
9130 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9131 (inf_child_target::has_stack, inf_child_target::has_registers)
9132 (inf_child_target::has_execution): New.
9133 (inf_child_fileio_open, inf_child_fileio_pwrite)
9134 (inf_child_fileio_pread, inf_child_fileio_fstat)
9135 (inf_child_fileio_close, inf_child_fileio_unlink)
9136 (inf_child_fileio_readlink, inf_child_use_agent)
9137 (inf_child_can_use_agent): Refactor as methods of
9138 inf_child_target.
9139 (return_zero, inf_child_target): Delete.
9140 (inf_child_target::inf_child_target): New.
9141 * inf-child.h: Include "target.h".
9142 (inf_child_target): Delete function prototype.
9143 (inf_child_target): New class.
9144 (inf_child_open_target, inf_child_mourn_inferior)
9145 (inf_child_maybe_unpush_target): Delete.
9146 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9147 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9148 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9149 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9150 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9151 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9152 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9153 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9154 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9155 methods of inf_ptrace_target.
9156 (inf_ptrace_target): Delete function.
9157 * inf-ptrace.h: Include "inf-child.h".
9158 (inf_ptrace_target): Delete function declaration.
9159 (inf_ptrace_target): New class.
9160 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9161 * linux-nat.c (linux_target): New.
9162 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9163 (linux_nat_target::~linux_nat_target): New.
9164 (linux_child_post_attach, linux_child_post_startup_inferior)
9165 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9166 (linux_child_remove_fork_catchpoint)
9167 (linux_child_insert_vfork_catchpoint)
9168 (linux_child_remove_vfork_catchpoint)
9169 (linux_child_insert_exec_catchpoint)
9170 (linux_child_remove_exec_catchpoint)
9171 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9172 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9173 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9174 (linux_nat_stopped_data_address)
9175 (linux_nat_stopped_by_sw_breakpoint)
9176 (linux_nat_supports_stopped_by_sw_breakpoint)
9177 (linux_nat_stopped_by_hw_breakpoint)
9178 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9179 (linux_nat_kill, linux_nat_mourn_inferior)
9180 (linux_nat_xfer_partial, linux_nat_thread_alive)
9181 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9182 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9183 (linux_child_static_tracepoint_markers_by_strid)
9184 (linux_nat_is_async_p, linux_nat_can_async_p)
9185 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9186 (linux_nat_supports_multi_process)
9187 (linux_nat_supports_disable_randomization, linux_nat_async)
9188 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9189 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9190 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9191 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9192 methods of linux_nat_target.
9193 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9194 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9195 parameter.
9196 (check_stopped_by_watchpoint): Adjust.
9197 (linux_xfer_partial): Delete.
9198 (linux_target_install_ops, linux_target, linux_nat_add_target):
9199 Delete.
9200 (linux_nat_target::linux_nat_target): New.
9201 * linux-nat.h: Include "inf-ptrace.h".
9202 (linux_nat_target): New.
9203 (linux_target, linux_target_install_ops, linux_nat_add_target):
9204 Delete function declarations.
9205 (linux_target): Declare global.
9206 * linux-thread-db.c (thread_db_target): New.
9207 (thread_db_target::thread_db_target): New.
9208 (thread_db_ops): Delete.
9209 (the_thread_db_target): New.
9210 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9211 (thread_db_update_thread_list, thread_db_pid_to_str)
9212 (thread_db_extra_thread_info)
9213 (thread_db_thread_handle_to_thread_info)
9214 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9215 (thread_db_resume): Refactor as methods of thread_db_target.
9216 (init_thread_db_ops): Delete.
9217 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9218 * x86-linux-nat.c: Don't include "linux-nat.h".
9219 (super_post_startup_inferior): Delete.
9220 (x86_linux_nat_target::~x86_linux_nat_target): New.
9221 (x86_linux_child_post_startup_inferior)
9222 (x86_linux_read_description, x86_linux_enable_btrace)
9223 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9224 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9225 methods of x86_linux_nat_target.
9226 (x86_linux_create_target): Delete. Bits folded ...
9227 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9228 pointer.
9229 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9230 (x86_linux_nat_target): New class.
9231 (x86_linux_create_target): Delete.
9232 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9233 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9234 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9235 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9236 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9237 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9238 make extern.
9239 (x86_use_watchpoints): Delete.
9240 * x86-nat.h: Include "breakpoint.h" and "target.h".
9241 (x86_use_watchpoints): Delete.
9242 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9243 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9244 (x86_insert_watchpoint, x86_remove_watchpoint)
9245 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9246 (x86_stopped_by_hw_breakpoint): New declarations.
9247 (x86_nat_target): New template class.
9248
9249 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9250 (the_ppc_linux_nat_target): New.
9251 (ppc_linux_fetch_inferior_registers)
9252 (ppc_linux_can_use_hw_breakpoint)
9253 (ppc_linux_region_ok_for_hw_watchpoint)
9254 (ppc_linux_ranged_break_num_registers)
9255 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9256 (ppc_linux_insert_mask_watchpoint)
9257 (ppc_linux_remove_mask_watchpoint)
9258 (ppc_linux_can_accel_watchpoint_condition)
9259 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9260 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9261 (ppc_linux_watchpoint_addr_within_range)
9262 (ppc_linux_masked_watch_num_registers)
9263 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9264 (ppc_linux_read_description): Refactor as methods of
9265 ppc_linux_nat_target.
9266 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9267
9268 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9269 (procfs_target): New class.
9270 (the_procfs_target): New.
9271 (procfs_target): Delete function.
9272 (procfs_auxv_parse, procfs_attach, procfs_detach)
9273 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9274 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9275 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9276 (procfs_create_inferior, procfs_update_thread_list)
9277 (procfs_thread_alive, procfs_pid_to_str)
9278 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9279 (procfs_stopped_data_address, procfs_insert_watchpoint)
9280 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9281 (proc_find_memory_regions, procfs_info_proc)
9282 (procfs_make_note_section): Refactor as methods of procfs_target.
9283 (_initialize_procfs): Adjust.
9284 * sol-thread.c (sol_thread_target): New class.
9285 (sol_thread_ops): Now a sol_thread_target.
9286 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9287 (sol_thread_fetch_registers, sol_thread_store_registers)
9288 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9289 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9290 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9291 (init_sol_thread_ops): Delete.
9292 (_initialize_sol_thread): Adjust. Remove references to
9293 init_sol_thread_ops and complete_target_initialization.
9294
9295 * windows-nat.c (windows_nat_target): New class.
9296 (windows_fetch_inferior_registers)
9297 (windows_store_inferior_registers, windows_resume, windows_wait)
9298 (windows_attach, windows_detach, windows_pid_to_exec_file)
9299 (windows_files_info, windows_create_inferior)
9300 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9301 (windows_close, windows_pid_to_str, windows_xfer_partial)
9302 (windows_get_tib_address, windows_get_ada_task_ptid)
9303 (windows_thread_name, windows_thread_alive): Refactor as
9304 windows_nat_target methods.
9305 (do_initial_windows_stuff): Adjust.
9306 (windows_target): Delete function.
9307 (_initialize_windows_nat): Adjust.
9308
9309 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9310 (darwin_mourn_inferior, darwin_kill_inferior)
9311 (darwin_create_inferior, darwin_attach, darwin_detach)
9312 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9313 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9314 (darwin_supports_multi_process): Refactor as darwin_nat_target
9315 methods.
9316 (darwin_resume_to, darwin_files_info): Delete.
9317 (_initialize_darwin_inferior): Rename to ...
9318 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9319 * darwin-nat.h: Include "inf-child.h".
9320 (darwin_nat_target): New class.
9321 (darwin_complete_target): Delete.
9322 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9323 (darwin_target): New.
9324 (i386_darwin_fetch_inferior_registers)
9325 (i386_darwin_store_inferior_registers): Refactor as methods of
9326 darwin_nat_target.
9327 (darwin_complete_target): Delete, with ...
9328 (_initialize_i386_darwin_nat): ... bits factored out here.
9329
9330 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9331 (the_alpha_linux_nat_target): New.
9332 (alpha_linux_register_u_offset): Refactor as
9333 alpha_linux_nat_target method.
9334 (_initialize_alpha_linux_nat): Adjust.
9335 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9336 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9337 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9338 methods of linux_nat_trad_target.
9339 (linux_trad_target): Delete.
9340 * linux-nat-trad.h (linux_trad_target): Delete function.
9341 (linux_nat_trad_target): New class.
9342 * mips-linux-nat.c (mips_linux_nat_target): New class.
9343 (super_fetch_registers, super_store_registers, super_close):
9344 Delete.
9345 (the_mips_linux_nat_target): New.
9346 (mips64_linux_regsets_fetch_registers)
9347 (mips64_linux_regsets_store_registers)
9348 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9349 (mips_linux_register_u_offset, mips_linux_read_description)
9350 (mips_linux_can_use_hw_breakpoint)
9351 (mips_linux_stopped_by_watchpoint)
9352 (mips_linux_stopped_data_address)
9353 (mips_linux_region_ok_for_hw_watchpoint)
9354 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9355 (mips_linux_close): Refactor as methods of mips_linux_nat.
9356 (_initialize_mips_linux_nat): Adjust to C++ification.
9357
9358 * aix-thread.c (aix_thread_target): New class.
9359 (aix_thread_ops): Now an aix_thread_target.
9360 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9361 (aix_thread_fetch_registers, aix_thread_store_registers)
9362 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9363 (aix_thread_thread_alive, aix_thread_pid_to_str)
9364 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9365 Refactor as methods of aix_thread_target.
9366 (init_aix_thread_ops): Delete.
9367 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9368 and complete_target_initialization.
9369 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9370 (rs6000_nat_target): New class.
9371 (the_rs6000_nat_target): New.
9372 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9373 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9374 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9375 (super_create_inferior): Delete.
9376 (_initialize_rs6000_nat): Adjust to C++ification.
9377
9378 * arm-linux-nat.c (arm_linux_nat_target): New class.
9379 (the_arm_linux_nat_target): New.
9380 (arm_linux_fetch_inferior_registers)
9381 (arm_linux_store_inferior_registers, arm_linux_read_description)
9382 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9383 (arm_linux_remove_hw_breakpoint)
9384 (arm_linux_region_ok_for_hw_watchpoint)
9385 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9386 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9387 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9388 arm_linux_nat_target.
9389 (_initialize_arm_linux_nat): Adjust to C++ification.
9390
9391 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9392 (the_aarch64_linux_nat_target): New.
9393 (aarch64_linux_fetch_inferior_registers)
9394 (aarch64_linux_store_inferior_registers)
9395 (aarch64_linux_child_post_startup_inferior)
9396 (aarch64_linux_read_description)
9397 (aarch64_linux_can_use_hw_breakpoint)
9398 (aarch64_linux_insert_hw_breakpoint)
9399 (aarch64_linux_remove_hw_breakpoint)
9400 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9401 (aarch64_linux_region_ok_for_hw_watchpoint)
9402 (aarch64_linux_stopped_data_address)
9403 (aarch64_linux_stopped_by_watchpoint)
9404 (aarch64_linux_watchpoint_addr_within_range)
9405 (aarch64_linux_can_do_single_step): Refactor as methods of
9406 aarch64_linux_nat_target.
9407 (super_post_startup_inferior): Delete.
9408 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9409
9410 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9411 (the_hppa_linux_nat_target): New.
9412 (hppa_linux_fetch_inferior_registers)
9413 (hppa_linux_store_inferior_registers): Refactor as methods of
9414 hppa_linux_nat_target.
9415 (_initialize_hppa_linux_nat): Adjust to C++ification.
9416
9417 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9418 (the_ia64_linux_nat_target): New.
9419 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9420 (ia64_linux_stopped_data_address)
9421 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9422 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9423 ia64_linux_nat_target methods.
9424 (super_xfer_partial): Delete.
9425 (_initialize_ia64_linux_nat): Adjust to C++ification.
9426
9427 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9428 (the_m32r_linux_nat_target): New.
9429 (m32r_linux_fetch_inferior_registers)
9430 (m32r_linux_store_inferior_registers): Refactor as
9431 m32r_linux_nat_target methods.
9432 (_initialize_m32r_linux_nat): Adjust to C++ification.
9433
9434 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9435 (the_m68k_linux_nat_target): New.
9436 (m68k_linux_fetch_inferior_registers)
9437 (m68k_linux_store_inferior_registers): Refactor as
9438 m68k_linux_nat_target methods.
9439 (_initialize_m68k_linux_nat): Adjust to C++ification.
9440
9441 * s390-linux-nat.c (s390_linux_nat_target): New class.
9442 (the_s390_linux_nat_target): New.
9443 (s390_linux_fetch_inferior_registers)
9444 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9445 (s390_insert_watchpoint, s390_remove_watchpoint)
9446 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9447 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9448 (s390_auxv_parse, s390_read_description): Refactor as methods of
9449 s390_linux_nat_target.
9450 (_initialize_s390_nat): Adjust to C++ification.
9451
9452 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9453 (the_sparc_linux_nat_target): New.
9454 (_initialize_sparc_linux_nat): Adjust to C++ification.
9455 * sparc-nat.c (sparc_fetch_inferior_registers)
9456 (sparc_store_inferior_registers): Remove target_ops parameter.
9457 * sparc-nat.h (sparc_fetch_inferior_registers)
9458 (sparc_store_inferior_registers): Remove target_ops parameter.
9459 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9460 (the_sparc64_linux_nat_target): New.
9461 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9462
9463 * spu-linux-nat.c (spu_linux_nat_target): New class.
9464 (the_spu_linux_nat_target): New.
9465 (spu_child_post_startup_inferior, spu_child_post_attach)
9466 (spu_child_wait, spu_fetch_inferior_registers)
9467 (spu_store_inferior_registers, spu_xfer_partial)
9468 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9469 methods.
9470 (_initialize_spu_nat): Adjust to C++ification.
9471
9472 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9473 (the_tilegx_linux_nat_target): New.
9474 (fetch_inferior_registers, store_inferior_registers):
9475 Refactor as methods.
9476 (_initialize_tile_linux_nat): Adjust to C++ification.
9477
9478 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9479 (the_xtensa_linux_nat_target): New.
9480 (xtensa_linux_fetch_inferior_registers)
9481 (xtensa_linux_store_inferior_registers): Refactor as
9482 xtensa_linux_nat_target methods.
9483 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9484
9485 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9486 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9487 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9488 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9489 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9490 (fbsd_stopped_by_sw_breakpoint)
9491 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9492 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9493 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9494 (fbsd_post_startup_inferior, fbsd_post_attach)
9495 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9496 (fbsd_set_syscall_catchpoint)
9497 (super_xfer_partial, super_resume, super_wait)
9498 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9499 (fbsd_handle_debug_trap): Remove target_ops parameter.
9500 (fbsd_nat_add_target): Delete.
9501 * fbsd-nat.h: Include "inf-ptrace.h".
9502 (fbsd_nat_add_target): Delete.
9503 (USE_SIGTRAP_SIGINFO): Define.
9504 (fbsd_nat_target): New class.
9505
9506 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9507 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9508 (amd64bsd_target): Delete.
9509 * amd64-bsd-nat.h: New file.
9510 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9511 "x86-bsd-nat.h".
9512 (amd64_fbsd_nat_target): New class.
9513 (the_amd64_fbsd_nat_target): New.
9514 (amd64fbsd_read_description): Refactor as method of
9515 amd64_fbsd_nat_target.
9516 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9517 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9518 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9519 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9520 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9521 (i386bsd_target): Delete.
9522 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9523 (i386bsd_fetch_inferior_registers)
9524 (i386bsd_store_inferior_registers): Declare.
9525 (i386_bsd_nat_target): New class.
9526 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9527 (the_i386_fbsd_nat_target): New.
9528 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9529 i386_fbsd_nat_target methods.
9530 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9531 (_initialize_i386fbsd_nat): Adjust to C++ification.
9532 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9533 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9534 (_initialize_x86_bsd_nat): Adjust to C++ification.
9535 * x86-bsd-nat.h: Include "x86-nat.h".
9536 (x86bsd_target): Delete declaration.
9537 (x86bsd_nat_target): New class.
9538
9539 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9540 (the_aarch64_fbsd_nat_target): New.
9541 (aarch64_fbsd_fetch_inferior_registers)
9542 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9543 aarch64_fbsd_nat_target.
9544 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9545 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9546 (the_alpha_bsd_nat_target): New.
9547 (alphabsd_fetch_inferior_registers)
9548 (alphabsd_store_inferior_registers): Refactor as
9549 alpha_bsd_nat_target methods.
9550 (_initialize_alphabsd_nat): Refactor as methods of
9551 alpha_bsd_nat_target.
9552 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9553 (the_amd64_nbsd_nat_target): New.
9554 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9555 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9556 (the_amd64_obsd_nat_target): New.
9557 (_initialize_amd64obsd_nat): Adjust to C++ification.
9558 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9559 (the_arm_fbsd_nat_target): New.
9560 (arm_fbsd_fetch_inferior_registers)
9561 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9562 (_initialize_arm_fbsd_nat): Refactor as methods of
9563 arm_fbsd_nat_target.
9564 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9565 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9566 (the_arm_netbsd_nat_target): New.
9567 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9568 arm_netbsd_nat_target.
9569 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9570 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9571 (the_hppa_nbsd_nat_target): New.
9572 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9573 hppa_nbsd_nat_target methods.
9574 (_initialize_hppanbsd_nat): Adjust to C++ification.
9575 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9576 (the_hppa_obsd_nat_target): New.
9577 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9578 methods of hppa_obsd_nat_target.
9579 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9580 add_target.
9581 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9582 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9583 add_target.
9584 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9585 (_initialize_i386obsd_nat): Use add_target.
9586 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9587 (the_m68k_bsd_nat_target): New.
9588 (m68kbsd_fetch_inferior_registers)
9589 (m68kbsd_store_inferior_registers): Refactor as methods of
9590 m68k_bsd_nat_target.
9591 (_initialize_m68kbsd_nat): Adjust to C++ification.
9592 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9593 (the_mips_fbsd_nat_target): New.
9594 (mips_fbsd_fetch_inferior_registers)
9595 (mips_fbsd_store_inferior_registers): Refactor as methods of
9596 mips_fbsd_nat_target.
9597 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9598 add_target.
9599 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9600 (the_mips_nbsd_nat_target): New.
9601 (mipsnbsd_fetch_inferior_registers)
9602 (mipsnbsd_store_inferior_registers): Refactor as methods of
9603 mips_nbsd_nat_target.
9604 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9605 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9606 (the_mips64_obsd_nat_target): New.
9607 (mips64obsd_fetch_inferior_registers)
9608 (mips64obsd_store_inferior_registers): Refactor as methods of
9609 mips64_obsd_nat_target.
9610 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9611 add_target.
9612 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9613 nbsd_nat_target.
9614 * nbsd-nat.h: Include "inf-ptrace.h".
9615 (nbsd_nat_target): New class.
9616 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9617 (obsd_wait): Refactor as methods of obsd_nat_target.
9618 (obsd_add_target): Delete.
9619 * obsd-nat.h: Include "inf-ptrace.h".
9620 (obsd_nat_target): New class.
9621 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9622 (the_ppc_fbsd_nat_target): New.
9623 (ppcfbsd_fetch_inferior_registers)
9624 (ppcfbsd_store_inferior_registers): Refactor as methods of
9625 ppc_fbsd_nat_target.
9626 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9627 add_target.
9628 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9629 (the_ppc_nbsd_nat_target): New.
9630 (ppcnbsd_fetch_inferior_registers)
9631 (ppcnbsd_store_inferior_registers): Refactor as methods of
9632 ppc_nbsd_nat_target.
9633 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9634 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9635 (the_ppc_obsd_nat_target): New.
9636 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9637 methods of ppc_obsd_nat_target.
9638 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9639 add_target.
9640 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9641 (the_sh_nbsd_nat_target): New.
9642 (shnbsd_fetch_inferior_registers)
9643 (shnbsd_store_inferior_registers): Refactor as methods of
9644 sh_nbsd_nat_target.
9645 (_initialize_shnbsd_nat): Adjust to C++ification.
9646 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9647 (inf_ptrace_xfer_partial): Delete.
9648 (sparc_xfer_partial, sparc_target): Delete.
9649 * sparc-nat.h (sparc_fetch_inferior_registers)
9650 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9651 (sparc_target): Delete function declaration.
9652 (sparc_target): New template class.
9653 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9654 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9655 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9656 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9657 add_target.
9658 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9659 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9660 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9661 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9662 add_target.
9663 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9664 (the_vax_bsd_nat_target): New.
9665 (vaxbsd_fetch_inferior_registers)
9666 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9667 methods.
9668 (_initialize_vaxbsd_nat): Adjust to C++ification.
9669
9670 * bsd-kvm.c (bsd_kvm_target): New class.
9671 (bsd_kvm_ops): Now a bsd_kvm_target.
9672 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9673 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9674 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9675 bsd_kvm_target.
9676 (bsd_kvm_return_one): Delete.
9677 (bsd_kvm_add_target): Adjust to C++ification.
9678
9679 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9680 (nto_procfs_target_procfs): New classes.
9681 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9682 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9683 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9684 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9685 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9686 (procfs_remove_hw_breakpoint, procfs_resume)
9687 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9688 (procfs_kill_inferior, procfs_store_registers)
9689 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9690 as methods of nto_procfs_target.
9691 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9692 (nto_native_ops): Delete.
9693 (procfs_open, procfs_native_open): Delete.
9694 (nto_native_ops): Now an nto_procfs_target_native.
9695 (init_procfs_targets): Adjust to C++ification.
9696 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9697 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9698 Refactor as methods of nto_procfs_target.
9699
9700 * go32-nat.c (go32_nat_target): New class.
9701 (the_go32_nat_target): New.
9702 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9703 (go32_store_registers, go32_xfer_partial, go32_files_info)
9704 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9705 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9706 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9707 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9708 (go32_target): Delete.
9709 (_initialize_go32_nat): Adjust to C++ification.
9710
9711 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9712 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9713 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9714 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9715 gnu_nat_target.
9716 (gnu_target): Delete.
9717 * gnu-nat.h (gnu_target): Delete.
9718 (gnu_nat_target): New class.
9719 * i386-gnu-nat.c (gnu_base_target): New.
9720 (i386_gnu_nat_target): New class.
9721 (the_i386_gnu_nat_target): New.
9722 (_initialize_i386gnu_nat): Adjust to C++ification.
9723
9724 2018-05-02 Pedro Alves <palves@redhat.com>
9725
9726 * bfd-target.c (target_bfd_xclose): Rename to ...
9727 (target_bfd_close): ... this.
9728 (target_bfd_reopen): Adjust.
9729 * target.c (target_close): Remove references to to_xclose.
9730 * target.h (target_ops::to_xclose): Delete.
9731 (target_ops::to_close): Update comments.
9732
9733 2018-05-02 Pedro Alves <palves@redhat.com>
9734
9735 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9736 "linux-nat.h".
9737 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9738 * inf-ptrace.c (inf_ptrace_register_u_offset)
9739 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9740 (inf_ptrace_store_register, inf_ptrace_store_registers)
9741 (inf_ptrace_trad_target): Move to ...
9742 * linux-nat-trad.c: ... this new file.
9743 * linux-nat-trad.h: New file.
9744 * linux-nat.c (linux_target_install_ops): Make extern.
9745 (linux_trad_target): Delete.
9746 * linux-nat.h (linux_trad_target): Delete declaration.
9747 (linux_target_install_ops): Declare.
9748 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9749 "linux-nat.h".
9750
9751 2018-05-02 Pedro Alves <palves@redhat.com>
9752
9753 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9754 procfs_target/add_target here.
9755 * procfs.c (procfs_target): Make static.
9756 (_initialize_procfs): Call add_target here.
9757 * procfs.h (struct target_ops): Remove forward declaration.
9758 (procfs_target): Remove declaration.
9759 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9760
9761 2018-05-02 Pedro Alves <palves@redhat.com>
9762
9763 * procfs.c (procfs_stopped_by_watchpoint)
9764 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9765 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9766 Forward declare.
9767 (procfs_use_watchpoints): Delete, move contents...
9768 (procfs_target): ... here.
9769 * procfs.h (procfs_use_watchpoints): Delete declaration.
9770 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9771 procfs_use_watchpoints.
9772 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9773 procfs_use_watchpoints.
9774
9775 2018-05-02 Tom Tromey <tom@tromey.com>
9776
9777 PR python/20084:
9778 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9779 and var_zuinteger_unlimited.
9780 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9781 and PARAM_ZUINTEGER_UNLIMITED.
9782 (set_parameter_value): Handle var_zuinteger and
9783 var_zuinteger_unlimited.
9784 (add_setshow_generic): Likewise.
9785 (parmpy_init): Likewise.
9786
9787 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9788
9789 PR rust/23124
9790 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9791 pointer is not null before dereferencing it.
9792
9793 2018-04-30 Tom Tromey <tom@tromey.com>
9794
9795 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9796 is_mi_like_p.
9797
9798 2018-04-30 Tom Tromey <tom@tromey.com>
9799
9800 * breakpoint.c (mention): Remove use of is_mi_like_p.
9801 (print_mention_ranged_breakpoint): Likewise.
9802 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9803 of is_mi_like_p.
9804
9805 2018-04-30 Tom Tromey <tom@tromey.com>
9806
9807 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9808
9809 2018-04-30 Tom Tromey <tom@tromey.com>
9810
9811 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9812 (info_spu_event_command): Remove some uses of is_mi_like_p.
9813
9814 2018-04-30 Tom Tromey <tom@tromey.com>
9815
9816 * python/py-framefilter.c (py_print_single_arg)
9817 (enumerate_locals, py_print_args, py_print_frame): Remove some
9818 uses of is_mi_like_p.
9819
9820 2018-04-30 Tom Tromey <tom@tromey.com>
9821
9822 * ui-out.c: Update.
9823 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9824 * ui-out.h (ui_out::is_mi_like_p): Now const.
9825 (ui_out::do_is_mi_like_p): Now const.
9826 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9827
9828 2018-04-30 Tom Tromey <tom@tromey.com>
9829
9830 * varobj.c (varobj_set_visualizer): Use new_reference.
9831 * python/python.c (gdbpy_decode_line): Use new_reference.
9832 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9833 new_reference.
9834
9835 2018-04-30 Tom Tromey <tom@tromey.com>
9836
9837 * varobj.c (install_new_value): Use new_reference.
9838 * value.h (value_incref): Return void. Swap intro comment with
9839 value_decref.
9840 * value.c (set_value_parent): Use new_reference.
9841 (value_incref): Return void. Update intro comment.
9842 (release_value): Use new_reference.
9843 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9844
9845 2018-04-30 Tom Tromey <tom@tromey.com>
9846
9847 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9848 * gdb_bfd.h (new_bfd_ref): Remove.
9849 (gdb_bfd_open): Update comment.
9850 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9851 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9852 (gdb_bfd_fdopenr): Use new_reference.
9853 * exec.c (exec_file_attach): Use new_reference.
9854
9855 2018-04-30 Tom Tromey <tom@tromey.com>
9856
9857 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9858 method.
9859
9860 2018-04-30 Tom Tromey <tom@tromey.com>
9861
9862 * jit.c (jit_read_code_entry): Use type_align.
9863 * i386-tdep.c (i386_gdbarch_init): Don't call
9864 set_gdbarch_long_long_align_bit.
9865 * gdbarch.sh: Remove long_long_align_bit.
9866 * gdbarch.c, gdbarch.h: Rebuild.
9867 * arc-tdep.c (arc_type_align): New function.
9868 (arc_gdbarch_init): Use arc_type_align. Don't call
9869 set_gdbarch_long_long_align_bit.
9870
9871 2018-04-30 Tom Tromey <tom@tromey.com>
9872
9873 * rust-lang.c (rust_type_alignment): Remove.
9874 (rust_composite_type): Use type_align.
9875
9876 2018-04-30 Tom Tromey <tom@tromey.com>
9877
9878 * NEWS: Mention Type.align.
9879 * python/py-type.c (typy_get_alignof): New function.
9880 (type_object_getset): Add "alignof".
9881
9882 2018-04-30 Tom Tromey <tom@tromey.com>
9883
9884 PR exp/17095:
9885 * NEWS: Update.
9886 * std-operator.def (UNOP_ALIGNOF): New operator.
9887 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9888 New.
9889 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9890 * c-lang.c (c_op_print_tab): Add alignof.
9891 * c-exp.y (ALIGNOF): New token.
9892 (exp): Add "ALIGNOF" production.
9893 (ident_tokens): Add _Alignof and alignof.
9894
9895 2018-04-30 Tom Tromey <tom@tromey.com>
9896
9897 * i386-tdep.c (i386_type_align): New function.
9898 (i386_gdbarch_init): Update.
9899 * gdbarch.sh (type_align): New method.
9900 * gdbarch.c, gdbarch.h: Rebuild.
9901 * arch-utils.h (default_type_align): Declare.
9902 * arch-utils.c (default_type_align): New function.
9903 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9904 (struct type) <align_log2>: New field.
9905 <instance_flags>: Now a bitfield.
9906 (TYPE_RAW_ALIGN): New macro.
9907 (type_align, type_raw_align, set_type_align): Declare.
9908 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9909 functions.
9910 * dwarf2read.c (quirk_rust_enum): Set type alignment.
9911 (get_alignment, maybe_set_alignment): New functions.
9912 (read_structure_type, read_enumeration_type, read_array_type)
9913 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9914 (read_subrange_type, read_base_type): Set type alignment.
9915
9916 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
9917
9918 * dwarf2read.c (read_index_from_section): Use bool.
9919
9920 2018-04-29 Fabian Groffen <grobian@gentoo.org>
9921
9922 PR gdb/22950
9923 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9924 with #ifdef.
9925
9926 2018-04-29 John Reiser <jreiser@BitWagon.com>
9927
9928 PR build/22873
9929 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9930 last step, and do it atomically.
9931
9932 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
9933
9934 * compile/compile-c-types.c (convert_int, convert_float):
9935 Update for C FE v1.
9936
9937 2018-04-27 Tom Tromey <tom@tromey.com>
9938
9939 PR rust/22545:
9940 * rust-lang.c (rust_inclusive_range_type_p): New function.
9941 (rust_range): Handle inclusive ranges.
9942 (rust_compute_range): Likewise.
9943 * rust-exp.y (struct rust_op) <inclusive>: New field.
9944 (DOTDOTEQ): New constant.
9945 (range_expr): Add "..=" productions.
9946 (operator_tokens): Add "..=" token.
9947 (ast_range): Add "inclusive" parameter.
9948 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9949 ranges.
9950 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9951 bounds values.
9952 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9953 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9954 Update comments.
9955 * expprint.c (print_subexp_standard): Handle new bounds values.
9956 (dump_subexp_body_standard): Likewise.
9957
9958 2018-04-27 Tom Tromey <tom@tromey.com>
9959
9960 * configure: Rebuild.
9961 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9962 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9963 "OVERRIDE".
9964 (class symbol_needs_eval_context): Likewise.
9965 * dwarf2read.c (mock_mapped_index::symbol_name_count)
9966 (mock_mapped_index::symbol_name_at): Use "override". Remove
9967 "virtual".
9968 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9969 "override".
9970 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9971 * aarch64-tdep.c (instruction_reader::read): Use "override".
9972 (instruction_reader_test::read): Likewise.
9973 * arm-tdep.c (instruction_reader::read): Use "override".
9974 (instruction_reader_thumb::read): Likewise.
9975
9976 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
9977
9978 PR remote/9665
9979 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9980 instead of remote_send.
9981 (remote_send): Remove.
9982
9983 2018-04-26 Pedro Alves <palves@redhat.com>
9984
9985 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9986 find_function_start_sal instead of find_pc_line.
9987
9988 2018-04-26 Pedro Alves <palves@redhat.com>
9989
9990 * breakpoint.c (set_breakpoint_location_function): Handle
9991 mst_data_gnu_ifunc.
9992 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9993 * elfread.c (elf_symtab_read): Give data symbols with
9994 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9995 (elf_rel_plt_read): Update comment.
9996 * linespec.c (convert_linespec_to_sals): Handle
9997 mst_data_gnu_ifunc.
9998 (minsym_found): Handle mst_data_gnu_ifunc.
9999 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10000 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10001 * parse.c (find_minsym_type_and_address): Handle
10002 mst_data_gnu_ifunc.
10003 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10004 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10005 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10006 comment.
10007 <mst_data_gnu_ifunc>: New enumerator.
10008
10009 2018-04-26 Pedro Alves <palves@redhat.com>
10010
10011 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10012 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10013 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10014 Handle it.
10015 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10016 (lookup_minimal_symbol_by_pc): Adjust.
10017 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10018 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10019 * minsyms.h (lookup_msym_prefer): New enum.
10020 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10021 parameter by a lookup_msym_prefer parameter.
10022
10023 2018-04-26 Pedro Alves <palves@redhat.com>
10024
10025 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10026 ends in "@plt" instead of looking at the symbol's section.
10027
10028 2018-04-26 Pedro Alves <palves@redhat.com>
10029
10030 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10031 all references.
10032 (find_pc_partial_function_gnu_ifunc): Rename to ...
10033 (find_pc_partial_function): ... this, and remove references to
10034 'is_gnu_ifunc_p'.
10035 (find_pc_partial_function): Delete old implementation.
10036 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10037
10038 2018-04-26 Pedro Alves <palves@redhat.com>
10039
10040 * linespec.c (struct bound_minimal_symbol_search_key): New.
10041 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10042 skip first line if we found a GNU ifunc minimal symbol by name.
10043 (compare_msymbols): Change parameters to work with a destructured
10044 lhs minsym.
10045 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10046 functions.
10047
10048 2018-04-26 Pedro Alves <palves@redhat.com>
10049
10050 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10051 ifunc targets here. Instead, if we have an ifunc minsym, use its
10052 address/name.
10053 (add_location_to_breakpoint): Store the minsym and the objfile in
10054 the breakpoint location.
10055 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10056 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10057 Record the minsym in the sal.
10058 * symtab.h (symtab_and_line) <msymbol>: New field.
10059
10060 2018-04-26 Pedro Alves <palves@redhat.com>
10061
10062 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10063 unless we actually resolved the ifunc.
10064
10065 2018-04-26 Pedro Alves <palves@redhat.com>
10066
10067 * c-exp.y (variable production): Prefer ifunc minsyms over
10068 regular function symbols.
10069 * symtab.c (find_gnu_ifunc): New function.
10070 * minsyms.h (lookup_msym_prefer): New enum.
10071 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10072 parameter by a lookup_msym_prefer parameter.
10073 * symtab.h (find_gnu_ifunc): New declaration.
10074
10075 2018-04-26 Pedro Alves <palves@redhat.com>
10076
10077 * blockframe.c (find_gnu_ifunc_target_type): New function.
10078 (find_function_type): New.
10079 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10080 return a value with a memory address.
10081 (eval_call): For calls to GNU ifunc functions, try to find the
10082 type of the target function from the type that the resolver
10083 returns.
10084 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10085 symbols.
10086 * infcall.c (find_function_return_type): Delete.
10087 (find_function_addr): Add 'function_type' parameter. For calls to
10088 GNU ifunc functions, try to find the type of the target function
10089 from the type that the resolver returns, and return it via
10090 FUNCTION_TYPE.
10091 (call_function_by_hand_dummy): Adjust to use the function type
10092 returned by find_function_addr.
10093 (find_function_addr): Add 'function_type' parameter and move
10094 description here.
10095 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10096 declarations.
10097
10098 2018-04-26 Pedro Alves <palves@redhat.com>
10099
10100 * c-exp.y (variable production): Skip finding an alias for ifunc
10101 symbols.
10102
10103 2018-04-26 Pedro Alves <palves@redhat.com>
10104
10105 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10106
10107 2018-04-25 Pedro Alves <palves@redhat.com>
10108
10109 * infcmd.c (kill_command): Print the pid as string, not the whole
10110 thread's ptid. Add comment. s/has been killed/killed/ in output
10111 message.
10112 * remote.c (remote_detach_1): Print the pid as string, not the
10113 whole thread's ptid.
10114
10115 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10116 Sergio Durigan Junior <sergiodj@redhat.com>
10117 Pedro Alves <palves@redhat.com>
10118
10119 * infcmd.c (kill_command): Print message when inferior has
10120 been killed.
10121 * inferior.c (print_inferior_events): Remove 'static'. Set as
10122 '1'.
10123 (add_inferior): Improve message printed when
10124 'print_inferior_events' is on.
10125 (exit_inferior): Remove message printed when
10126 'print_inferior_events' is on.
10127 (detach_inferior): Improve message printed when
10128 'print_inferior_events' is on.
10129 (initialize_inferiors): Use 'add_inferior_silent' to set
10130 'current_inferior_'.
10131 * inferior.h (print_inferior_events): Declare here as
10132 'extern'.
10133 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10134 '[Detaching...]' messages when 'print_inferior_events' is on.
10135 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10136 as prefix/suffix for messages. Remove periods. Fix erroneous
10137 'Detaching after fork from child...', replace it by '... from
10138 parent...'.
10139 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10140 prefix/suffix when printing 'Detaching...' messages. Print
10141 them when 'print_inferior_events' is on.
10142 * remote.c (remote_detach_1): Print message when detaching
10143 from inferior and '!is_fork_parent'.
10144
10145 2018-04-24 Tom Tromey <tom@tromey.com>
10146
10147 * cli-out.h: Reindent.
10148
10149 2018-04-24 Tom Tromey <tom@tromey.com>
10150
10151 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10152 (cli_ui_out::do_field_string): Use fputs_filtered.
10153 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10154
10155 2018-04-23 Tom Tromey <tom@tromey.com>
10156
10157 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10158 gdb::unique_xmalloc_ptr.
10159
10160 2018-04-23 Tom Tromey <tom@tromey.com>
10161
10162 * configure: Rebuild.
10163
10164 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10165
10166 PR gdb/23095
10167 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10168 prepare_for_testing. Set normal_bp to r_debug_state if target
10169 is bsd.
10170
10171 2018-04-21 Pedro Alves <palves@redhat.com>
10172 Rajendra SY <rajendra.sy@gmail.com>
10173
10174 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10175 * remote.c (extended_remote_attach): In all-stop mode, mark the
10176 thread as executing.
10177
10178 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10179
10180 * thread.c (thread_apply_all_command): Fix comment.
10181 (thread_command): Fix comment.
10182
10183 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10184
10185 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10186 parameter.
10187 * features/aarch64-core.c (create_feature_aarch64_core):
10188 Regenerate.
10189 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10190 Likewise.
10191 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10192 Likewise.
10193 * features/i386/32bit-avx512.c
10194 (create_feature_i386_32bit_avx512): Likewise.
10195 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10196 Likewise.
10197 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10198 Likewise.
10199 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10200 Likewise.
10201 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10202 Likewise.
10203 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10204 Likewise.
10205 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10206 Likewise.
10207 * features/i386/64bit-avx512.c
10208 (create_feature_i386_64bit_avx512): Likewise.
10209 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10210 Likewise.
10211 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10212 Likewise.
10213 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10214 Likewise.
10215 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10216 Likewise.
10217 * features/i386/64bit-segments.c
10218 (create_feature_i386_64bit_segments): Likewise.
10219 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10220 Likewise.
10221 * features/i386/x32-core.c
10222 (create_feature_i386_x32_core): Likewise.
10223 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10224 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10225 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10226 * target-descriptions.c: In generated code, don't pass xml
10227 filename.
10228
10229 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10230
10231 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10232 (print_xml_feature::visit_post): Likewise.
10233 (print_xml_feature::visit): Likewise.
10234 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10235 (print_xml_feature): Add new class.
10236 * regformats/regdat.sh: Null xmltarget on feature targets.
10237 * target-descriptions.c (struct target_desc): Add xmltarget.
10238 (maintenance_check_tdesc_xml_convert): Add unittest function.
10239 (tdesc_get_features_xml): Add function to get xml.
10240 (maintenance_check_xml_descriptions): Test xml generation.
10241 * xml-tdesc.c (string_read_description_xml): Add function.
10242 * xml-tdesc.h (string_read_description_xml): Add declaration.
10243
10244 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10245
10246 * features/Makefile: Add feature marker to targets with new style
10247 target descriptions.
10248 * regformats/aarch64.dat: Regenerate.
10249 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10250 * regformats/i386/amd64-avx-linux.dat: Likewise.
10251 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10252 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10253 * regformats/i386/amd64-linux.dat: Likewise.
10254 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10255 * regformats/i386/amd64.dat: Likewise.
10256 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10257 * regformats/i386/i386-avx-linux.dat: Likewise.
10258 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10259 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10260 * regformats/i386/i386-linux.dat: Likewise.
10261 * regformats/i386/i386-mmx-linux.dat: Likewise.
10262 * regformats/i386/i386-mpx-linux.dat: Likewise.
10263 * regformats/i386/i386.dat: Likewise.
10264 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10265 * regformats/i386/x32-avx-linux.dat: Likewise.
10266 * regformats/i386/x32-linux.dat: Likewise.
10267 * regformats/tic6x-c62x-linux.dat: Likewise.
10268 * regformats/tic6x-c64x-linux.dat: Likewise.
10269 * regformats/tic6x-c64xp-linux.dat: Likewise.
10270 * regformats/regdat.sh: Parse feature marker.
10271
10272 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10273
10274 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10275 (tdesc_osabi_name): Likewise.
10276 * target-descriptions.c (tdesc_architecture_name): Add new
10277 function.
10278 (tdesc_osabi_name): Likewise.
10279
10280 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10281
10282 * common/tdesc.c (tdesc_predefined_type): Move to here.
10283 (tdesc_named_type): Likewise.
10284 (tdesc_create_vector): Likewise.
10285 (tdesc_create_struct): Likewise.
10286 (tdesc_set_struct_size): Likewise.
10287 (tdesc_create_union): Likewise.
10288 (tdesc_create_flags): Likewise.
10289 (tdesc_create_enum): Likewise.
10290 (tdesc_add_field): Likewise.
10291 (tdesc_add_typed_bitfield): Likewise.
10292 (tdesc_add_bitfield): Likewise.
10293 (tdesc_add_flag): Likewise.
10294 (tdesc_add_enum_value): Likewise.
10295 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10296 (struct tdesc_type_vector): Likewise.
10297 (struct tdesc_type_field): Likewise.
10298 (struct tdesc_type_with_fields): Likewise.
10299 (tdesc_create_enum): Add declaration.
10300 (tdesc_add_typed_bitfield): Likewise.
10301 (tdesc_add_enum_value): Likewise.
10302 * target-descriptions.c (tdesc_type_field): Move from here.
10303 (tdesc_type_builtin): Likewise.
10304 (tdesc_type_vector): Likewise.
10305 (tdesc_type_with_fields): Likewise.
10306 (tdesc_predefined_types): Likewise.
10307 (tdesc_named_type): Likewise.
10308 (tdesc_create_vector): Likewise.
10309 (tdesc_create_struct): Likewise.
10310 (tdesc_set_struct_size): Likewise.
10311 (tdesc_create_union): Likewise.
10312 (tdesc_create_flags): Likewise.
10313 (tdesc_create_enum): Likewise.
10314 (tdesc_add_field): Likewise.
10315 (tdesc_add_typed_bitfield): Likewise.
10316 (tdesc_add_bitfield): Likewise.
10317 (tdesc_add_flag): Likewise.
10318 (tdesc_add_enum_value): Likewise.
10319 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10320 (tdesc_add_typed_bitfield): Likewise.
10321 (tdesc_add_enum_value): Likewise.
10322
10323 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10324
10325 * common/tdesc.c (tdesc_feature::accept): Move to here.
10326 (tdesc_feature::operator==): Likewise.
10327 (tdesc_create_reg): Likewise.
10328 * common/tdesc.h (tdesc_type_kind): Likewise.
10329 (struct tdesc_type): Likewise.
10330 (struct tdesc_feature): Likewise.
10331 * regformats/regdat.sh: Create a feature.
10332 * target-descriptions.c (tdesc_type_kind): Move from here.
10333 (tdesc_type): Likewise.
10334 (tdesc_type_up): Likewise.
10335 (tdesc_feature): Likewise.
10336 (tdesc_create_reg): Likewise.
10337
10338 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10339
10340 * Makefile.in: Add arch/tdesc.c
10341 * common/tdesc.c: New file.
10342 * common/tdesc.h (tdesc_element_visitor): Move to here.
10343 (tdesc_element): Likewise.
10344 (tdesc_reg): Likewise.
10345 (tdesc_reg_up): Likewise.
10346 * regformats/regdef.h (reg): Add offset to constructors.
10347 * target-descriptions.c (tdesc_element_visitor): Move from here.
10348 (tdesc_element): Likewise.
10349 (tdesc_reg): Likewise.
10350 (tdesc_reg_up): Likewise.
10351
10352 2018-04-17 Tom Tromey <tom@tromey.com>
10353
10354 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10355 discriminant field.
10356
10357 2018-04-17 Tom Tromey <tom@tromey.com>
10358
10359 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10360
10361 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10362
10363 * symtab.c (print_symbol_info): Skip printing filename and line
10364 number when `last' is NULL.
10365 (symtab_symbol_info): Use empty string instead of NULL for first
10366 invocation of print_symbol_info.
10367 (rbreak_command): Pass NULL to `last' parameter of
10368 print_symbol_info.
10369
10370 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10371
10372 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10373 instead of nullptr.
10374
10375 2018-04-16 Pedro Alves <palves@redhat.com>
10376
10377 * MAINTAINERS (sh): Remove.
10378 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10379 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10380 (ALLDEPFILES): Remove sh64-tdep.c.
10381 * NEWS: Mentions that support for SH-5/SH64 is removed.
10382 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10383 (sh*-*-openbsd*): Ditto.
10384 (sh64-*-elf*): Remove.
10385 (sh*): Remove.
10386 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10387 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10388 * sh-tdep.c: No longer include "sh64-tdep.h".
10389 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10390 * sh64-tdep.c, sh64-tdep.h: Remove files.
10391
10392 2018-04-16 Pedro Alves <palves@redhat.com>
10393
10394 * MAINTAINERS: Remove m88k.
10395 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10396 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10397 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10398 * NEWS: Mention that support for m88k was removed.
10399 * configure.host (m88*-*-*): Remove support.
10400 * configure.nat (m88k-*-*): Remove support.
10401 * configure.tgt (m88*-*-openbsd*): Remove.
10402 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10403
10404 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10405
10406 * configure.tgt (x86_tobjs): New variable.
10407 (amd64_tobjs, i386_tobjs): Use it.
10408
10409 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10410
10411 * symtab.c (print_symbol_info): Precede the symbol definition by
10412 the line number when available.
10413 * NEWS: Advertise this enhancement.
10414
10415 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10416
10417 * NEWS (New options): announce set/show record btrace cpu.
10418 * btrace.c: Include record-btrace.h.
10419 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10420 the vendor is unknown.
10421 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10422 Maybe overwrite the btrace configuration's cpu.
10423 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10424 (btrace_fetch): Add cpu parameter. Update callers.
10425 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10426 Maybe overwrite the btrace configuration's cpu. Skip enabling
10427 errata workarounds if the vendor is unknown.
10428 * python/py-record-btrace.c: Include record-btrace.h.
10429 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10430 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10431 * record-btrace.c (record_btrace_cpu_state_kind): New.
10432 (record_btrace_cpu): New.
10433 (set_record_btrace_cpu_cmdlist): New.
10434 (record_btrace_get_cpu): New.
10435 (require_btrace_thread, record_btrace_info)
10436 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10437 (cmd_set_record_btrace_cpu_none): New.
10438 (cmd_set_record_btrace_cpu_auto): New.
10439 (cmd_set_record_btrace_cpu): New.
10440 (cmd_show_record_btrace_cpu): New.
10441 (_initialize_record_btrace): Initialize set/show record btrace cpu
10442 commands.
10443 * record-btrace.h (record_btrace_get_cpu): New.
10444
10445 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10446
10447 * record.c (set_record_command): Fix typo in message.
10448
10449 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10450
10451 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10452
10453 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10454
10455 * infrun.c (process_event_stop_test): Call
10456 gdbarch_in_indirect_branch_thunk.
10457 * gdbarch.sh (in_indirect_branch_thunk): New.
10458 * gdbarch.c: Regenerated.
10459 * gdbarch.h: Regenerated.
10460 * x86-tdep.h: New.
10461 * x86-tdep.c: New.
10462 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10463 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10464 (ALLDEPFILES): Add x86-tdep.c.
10465 * arch-utils.h (default_in_indirect_branch_thunk): New.
10466 * arch-utils.c (default_in_indirect_branch_thunk): New.
10467 * i386-tdep: Include x86-tdep.h.
10468 (i386_in_indirect_branch_thunk): New.
10469 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10470 function.
10471 * amd64-tdep: Include x86-tdep.h.
10472 (amd64_in_indirect_branch_thunk): New.
10473 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10474
10475 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10476
10477 PR gdb/23053
10478 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10479 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10480 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10481 regression.
10482
10483 2018-04-12 Tom Tromey <tom@tromey.com>
10484
10485 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10486 (rust_evaluate_subexp): Likewise.
10487
10488 2018-04-12 Pedro Alves <palves@redhat.com>
10489
10490 * procfs.c (procfs_detach): Make forward declaration's prototype
10491 match definition's protototype.
10492 (proc_get_LDT_entry): Remove stale do_cleanups call.
10493
10494 2018-04-12 Pedro Alves <palves@redhat.com>
10495
10496 * target.h (target_ops::to_has_exited): Delete.
10497 (target_has_exited): Delete.
10498 * target-delegates.c: Regenerate.
10499
10500 2018-04-11 Pedro Alves <palves@redhat.com>
10501
10502 * target.c (fileio_fh_t::t): Add comment.
10503 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10504 (target_fileio_close): Handle a NULL target.
10505 (invalidate_fileio_fh): New.
10506 (target_close): Call it.
10507 * remote.c (remote_hostio_send_command): No longer check whether
10508 remote_desc is open.
10509
10510 2018-04-11 Pedro Alves <palves@redhat.com>
10511
10512 * target.c (fileio_fh_t): Make it a named struct instead of a
10513 typedef.
10514 (fileio_fh_t::is_closed): New method.
10515 (DEF_VEC_O (fileio_fh_t)): Remove.
10516 (fileio_fhandles): Now a std::vector.
10517 (is_closed_fileio_fh): Delete.
10518 (acquire_fileio_fd): Adjust. Rename parameters.
10519 (release_fileio_fd): Adjust.
10520 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10521 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10522 (target_fileio_close): Adjust.
10523
10524 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10525
10526 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10527 index.
10528
10529 2018-04-10 Pedro Alves <palves@redhat.com>
10530
10531 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10532 (scoped_finish_thread_state): New class.
10533 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10534 cleanup.
10535 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10536 (fetch_inferior_event, normal_stop): Likewise.
10537 * thread.c (finish_thread_state_cleanup): Delete.
10538
10539 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10540 Pedro Alves <palves@redhat.com>
10541
10542 * value.c: Include "selftest.h" and "common/array-view.h".
10543 (struct range) <operator ==>: New.
10544 (test_ranges_contain): New.
10545 (check_ranges_vector): New.
10546 (test_insert_into_bit_range_vector): New.
10547 (_initialize_values): Register selftests.
10548 * common/array-view.h (operator==, operator!=): New.
10549
10550 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10551
10552 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10553 an iterator.
10554 * inline-frame.c: Include <algorithm>.
10555 (struct inline_state): Add constructor.
10556 (inline_state_s): Remove.
10557 (DEF_VEC_O(inline_state_s)): Remove.
10558 (inline_states): Change type to std::vector.
10559 (find_inline_frame_state): Adjust to std::vector.
10560 (allocate_inline_frame_state): Remove.
10561 (clear_inline_frame_state): Adjust to std::vector.
10562 (skip_inline_frames): Adjust to std::vector.
10563
10564 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10565
10566 * tracepoint.h (struct trace_state_variable): Add constructor.
10567 <name>: Change type to std::string.
10568 * tracepoint.c (tsv_s): Remove.
10569 (DEF_VEC_O(tsv_s)): Remove.
10570 (tvariables): Change to std::vector.
10571 (create_trace_state_variable): Adjust to std::vector.
10572 (find_trace_state_variable): Likewise.
10573 (find_trace_state_variable_by_number): Likewise.
10574 (delete_trace_state_variable): Likewise.
10575 (trace_variable_command): Adjust to std::string.
10576 (delete_trace_variable_command): Likewise.
10577 (tvariables_info_1): Adjust to std::vector.
10578 (save_trace_state_variables): Likewise.
10579 (start_tracing): Likewise.
10580 (merge_uploaded_trace_state_variables): Adjust to std::vector
10581 and std::string.
10582 * target.h (struct target_ops)
10583 <to_download_trace_state_variable>: Pass reference to
10584 trace_state_variable.
10585 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10586 * target-delegates.c: Re-generate.
10587 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10588 (mi_tsv_deleted): Likewise.
10589 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10590 * remote.c (remote_download_trace_state_variable): Change
10591 pointer to reference and adjust.
10592 * make-target-delegates (parse_argtypes): Handle references.
10593 (write_function_header): Likewise.
10594 (munge_type): Likewise.
10595
10596 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10597
10598 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10599 string_view-selftests.c.
10600 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10601 testsuite.
10602 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10603 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10604 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10605 * unittests/basic_string_view/element_access/char/1.cc:
10606 Likewise.
10607 * unittests/basic_string_view/element_access/char/empty.cc:
10608 Likewise.
10609 * unittests/basic_string_view/element_access/char/front_back.cc:
10610 Likewise.
10611 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10612 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10613 Likewise.
10614 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10615 Likewise.
10616 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10617 Likewise.
10618 * unittests/basic_string_view/operations/compare/char/1.cc:
10619 Likewise.
10620 * unittests/basic_string_view/operations/compare/char/13650.cc:
10621 Likewise.
10622 * unittests/basic_string_view/operations/copy/char/1.cc:
10623 Likewise.
10624 * unittests/basic_string_view/operations/data/char/1.cc:
10625 Likewise.
10626 * unittests/basic_string_view/operations/find/char/1.cc:
10627 Likewise.
10628 * unittests/basic_string_view/operations/find/char/2.cc:
10629 Likewise.
10630 * unittests/basic_string_view/operations/find/char/3.cc:
10631 Likewise.
10632 * unittests/basic_string_view/operations/find/char/4.cc:
10633 Likewise.
10634 * unittests/basic_string_view/operations/rfind/char/1.cc:
10635 Likewise.
10636 * unittests/basic_string_view/operations/rfind/char/2.cc:
10637 Likewise.
10638 * unittests/basic_string_view/operations/rfind/char/3.cc:
10639 Likewise.
10640 * unittests/basic_string_view/operations/substr/char/1.cc:
10641 Likewise.
10642 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10643 * unittests/string_view-selftests.c: New file.
10644
10645 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10646
10647 * unittests/basic_string_view/capacity/1.cc: New file.
10648 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10649 * unittests/basic_string_view/cons/char/1.cc: New file.
10650 * unittests/basic_string_view/cons/char/2.cc: New file.
10651 * unittests/basic_string_view/cons/char/3.cc: New file.
10652 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10653 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10654 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10655 * unittests/basic_string_view/element_access/char/1.cc: New file.
10656 * unittests/basic_string_view/element_access/char/2.cc: New file.
10657 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10658 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10659 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10660 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10661 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10662 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10663 * unittests/basic_string_view/include.cc: New file.
10664 * unittests/basic_string_view/inserters/char/1.cc: New file.
10665 * unittests/basic_string_view/inserters/char/2.cc: New file.
10666 * unittests/basic_string_view/inserters/char/3.cc: New file.
10667 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10668 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10669 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10670 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10671 * unittests/basic_string_view/literals/types.cc: New file.
10672 * unittests/basic_string_view/literals/values.cc: New file.
10673 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10674 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10675 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10676 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10677 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10678 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10679 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10680 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10681 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10682 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10683 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10684 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10685 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10686 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10687 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10688 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10689 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10690 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10691 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10692 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10693 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10694 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10695 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10696 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10697 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10698 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10699 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10700 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10701 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10702 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10703 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10704 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10705 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10706 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10707 * unittests/basic_string_view/operators/char/2.cc: New file.
10708 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10709 * unittests/basic_string_view/range_access/char/1.cc: New file.
10710 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10711 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10712 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10713 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10714 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10715 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10716 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10717 * unittests/basic_string_view/typedefs.cc: New file.
10718 * unittests/basic_string_view/types/1.cc: New file.
10719
10720 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10721
10722 * common/gdb_string_view.h: Remove libstdc++ implementation
10723 details, adjust to gdb reality.
10724 * common/gdb_string_view.tcc: Likewise.
10725 * cli/cli-script.c (struct string_view): Remove.
10726 (user_args) <m_args>: Change element type to gdb::string_view.
10727 (user_args::insert_args): Adjust.
10728
10729 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10730
10731 * common/gdb_string_view.h: New file.
10732 * common/gdb_string_view.tcc: New file.
10733
10734 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10735
10736 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10737 * configure: Re-generate.
10738
10739 2018-04-09 Pedro Alves <palves@redhat.com>
10740
10741 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10742 (set_target_gdbarch): Call
10743 gdb::observers::architecture_changed.notify instead of
10744 observer_notify_architecture_changed.
10745
10746 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10747
10748 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10749 (do_restore_current_traceframe_cleanup): Remove.
10750 (restore_current_traceframe_cleanup_dtor): Remove.
10751 (make_cleanup_restore_current_traceframe): Remove.
10752 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10753 New.
10754 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10755 * infrun.c (fetch_inferior_event): Use
10756 scoped_restore_current_traceframe.
10757
10758 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10759
10760 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10761 Remove.
10762 <n_allocated_type_units>: Remove.
10763 <all_type_units>: Change to std::vector.
10764 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10765 to std::vector change.
10766 (dwarf2_per_objfile::get_cutu): Likewise.
10767 (dwarf2_per_objfile::get_tu): Likewise.
10768 (create_signatured_type_table_from_index): Likewise.
10769 (create_signatured_type_table_from_debug_names): Likewise.
10770 (dw2_symtab_iter_next): Likewise.
10771 (dw2_print_stats): Likewise.
10772 (dw2_expand_all_symtabs): Likewise.
10773 (dw2_expand_marked_cus): Likewise.
10774 (dw2_debug_names_iterator::next): Likewise.
10775 (dwarf2_initialize_objfile): Likewise.
10776 (add_signatured_type_cu_to_table): Likewise.
10777 (create_all_type_units): Likewise.
10778 (add_type_unit): Likewise.
10779 (struct tu_abbrev_offset): Add constructor.
10780 (build_type_psymtabs_1): Adjust to std::vector change.
10781 (print_tu_stats): Likewise.
10782 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10783 (write_debug_names): Likewise.
10784
10785 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10786
10787 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10788 Make an std::vector.
10789 <n_comp_units>: Remove.
10790 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10791 to std::vector change.
10792 (dwarf2_per_objfile::get_cutu): Likewise.
10793 (dwarf2_per_objfile::get_cu): Likewise.
10794 (create_cus_from_index): Likewise.
10795 (create_addrmap_from_index): Likewise.
10796 (create_addrmap_from_aranges): Likewise.
10797 (dwarf2_read_index): Likewise.
10798 (dw2_find_last_source_symtab): Likewise.
10799 (dw2_map_symtabs_matching_filename): Likewise.
10800 (dw2_symtab_iter_next): Likewise.
10801 (dw2_print_stats): Likewise.
10802 (dw2_expand_all_symtabs): Likewise.
10803 (dw2_expand_symtabs_with_fullname): Likewise.
10804 (dw2_expand_marked_cus): Likewise.
10805 (dw2_map_symbol_filenames): Likewise.
10806 (create_cus_from_debug_names): Likewise.
10807 (dwarf2_read_debug_names): Likewise.
10808 (dw2_debug_names_iterator::next): Likewise.
10809 (dwarf2_initialize_objfile): Likewise.
10810 (set_partial_user): Likewise.
10811 (dwarf2_build_psymtabs_hard): Likewise.
10812 (read_comp_units_from_section): Remove arguments, adjust to
10813 std::vector change.
10814 (create_all_comp_units): Adjust to std::vector and
10815 read_comp_units_from_section changes.
10816 (dwarf2_find_containing_comp_unit): Adjust to std::vector
10817 change.
10818 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10819 (psyms_seen_size): Likewise.
10820 (write_gdbindex): Likewise.
10821 (write_debug_names): Likewise.
10822
10823 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10824
10825 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10826 with dwarf2_per_objfile.
10827 (create_cus_from_index): Likewise.
10828 (create_signatured_type_table_from_index): Likewise.
10829 (dwarf2_read_index): Likewise.
10830 (dwarf2_initialize_objfile): Likewise.
10831 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
10832 per_cu rather than get_dwarf2_per_objfile.
10833
10834 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10835
10836 * dwarf2read.h (struct signatured_type): Forward declare.
10837 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10838 New methods.
10839 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10840 (dw2_get_cutu): ...this.
10841 (dwarf2_per_objfile::get_cu): Rename from...
10842 (dw2_get_cu): ...this.
10843 (dwarf2_per_objfile::get_tu): New.
10844 (create_addrmap_from_index): Adjust.
10845 (create_addrmap_from_aranges): Adjust.
10846 (dw2_find_last_source_symtab): Adjust.
10847 (dw2_map_symtabs_matching_filename): Adjust.
10848 (dw2_symtab_iter_next): Adjust.
10849 (dw2_print_stats): Adjust.
10850 (dw2_expand_all_symtabs): Adjust.
10851 (dw2_expand_symtabs_with_fullname): Adjust.
10852 (dw2_expand_marked_cus): Adjust.
10853 (dw_expand_symtabs_matching_file_matcher): Adjust.
10854 (dw2_map_symbol_filenames): Adjust.
10855 (dw2_debug_names_iterator::next): Adjust.
10856 (dwarf2_initialize_objfile): Adjust.
10857 (set_partial_user): Adjust.
10858 (dwarf2_build_psymtabs_hard): Adjust.
10859
10860 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10861
10862 * dwarf2read.c (create_signatured_type_table_from_debug_names):
10863 Remove unused variables.
10864 (dw2_map_symtabs_matching_filename): Likewise.
10865 (dwarf2_record_block_ranges): Likewise.
10866 (dwarf2_read_addr_index): Likewise.
10867 (follow_die_offset): Likewise.
10868
10869 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10870
10871 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10872 to symbol_file_add_main.
10873
10874 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10875
10876 PR mi/22299
10877 * mi/mi-console.c (do_fputc_async_safe): New.
10878 (mi_console_file::write_async_safe): New.
10879 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10880 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10881 New.
10882 * ui-file.c (ui_file::putstrn): Adjust call to
10883 fputstrn_unfiltered.
10884 * utils.c (printchar): Replace do_fputs and do_fprintf
10885 parameters by do_fputc.
10886 (fputstr_filtered): Adjust call to printchar.
10887 (fputstr_unfiltered): Likewise.
10888 (fputstrn_filtered): Likewise.
10889 (fputstrn_unfiltered): Add do_fputc parameter, pass to
10890 printchar.
10891 * utils.h (do_fputc_ftype): New typedef.
10892 (fputstrn_unfiltered): Add do_fputc parameter.
10893
10894 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10895
10896 * regformats/i386/i386-avx.dat: Remove.
10897
10898 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10899
10900 PR gdb/22979
10901 * amd64-tdep.c (amd64_none_init_abi): New function.
10902 (amd64_x32_none_init_abi): New function.
10903 (_initialize_amd64_tdep): Register handlers for x86-64 and
10904 x64_32 with GDB_OSABI_NONE.
10905 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10906 GDB_OSABI_NONE osabi.
10907
10908 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10909
10910 PR gdb/22980
10911 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10912 GDB_OSABI_NONE.
10913 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10914 * osabi.c (gdb_osabi_names): Add "unknown" entry.
10915
10916 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
10917
10918 * common/byte-vector.h (char_vector): New type.
10919 * target.h (target_read_alloc): Return
10920 gdb::optional<byte_vector>.
10921 (target_read_stralloc): Return gdb::optional<char_vector>.
10922 (target_get_osdata): Return gdb::optional<char_vector>.
10923 * target.c (target_read_alloc_1): Templatize. Replacement
10924 manual memory management with vector.
10925 (target_read_alloc): Change return type, adjust.
10926 (target_read_stralloc): Change return type, adjust.
10927 (target_get_osdata): Change return type, adjust.
10928 * auxv.c (struct auxv_info) <length>: Remove.
10929 <data>: Change type to gdb::optional<byte_vector>.
10930 (auxv_inferior_data_cleanup): Free auxv_info with delete.
10931 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10932 (target_auxv_search): Adjust.
10933 (fprint_target_auxv): Adjust.
10934 * avr-tdep.c (avr_io_reg_read_command): Adjust.
10935 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10936 (linux_make_corefile_notes): Adjust.
10937 * osdata.c (get_osdata): Adjust.
10938 * remote.c (remote_get_threads_with_qxfer): Adjust.
10939 (remote_memory_map): Adjust.
10940 (remote_traceframe_info): Adjust.
10941 (btrace_read_config): Adjust.
10942 (remote_read_btrace): Adjust.
10943 (remote_pid_to_exec_file): Adjust.
10944 * solib-aix.c (solib_aix_get_library_list): Adjust.
10945 * solib-dsbt.c (decode_loadmap): Don't free buf.
10946 (dsbt_get_initial_loadmaps): Adjust.
10947 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10948 * solib-target.c (solib_target_current_sos): Adjust.
10949 * tracepoint.c (sdata_make_value): Adjust.
10950 * xml-support.c (xinclude_start_include): Adjust.
10951 (xml_fetch_content_from_file): Adjust.
10952 * xml-support.h (xml_fetch_another): Change return type.
10953 (xml_fetch_content_from_file): Change return type.
10954 * xml-syscall.c (xml_init_syscalls_info): Adjust.
10955 * xml-tdesc.c (file_read_description_xml): Adjust.
10956 (fetch_available_features_from_target): Change return type.
10957 (target_fetch_description_xml): Adjust.
10958 (target_read_description_xml): Adjust.
10959
10960 2018-04-06 Tom Tromey <tom@tromey.com>
10961
10962 * value.c (~value): Update.
10963 (struct value) <contents>: Now unique_xmalloc_ptr.
10964 (value_contents_bits_eq, allocate_value_contents)
10965 (value_contents_raw, value_contents_all_raw)
10966 (value_contents_for_printing, value_contents_for_printing_const)
10967 (set_value_enclosing_type): Update.
10968
10969 2018-04-06 Tom Tromey <tom@tromey.com>
10970
10971 * value.c (range_s): Remove typedef, VEC.
10972 (struct range): Add operator<.
10973 (range_lessthan): Remove.
10974 (ranges_contain): Change type.
10975 (~value): Update.
10976 (struct value) <unavailable, optimized_out>: Now std::vector.
10977 (value_entirely_available)
10978 (value_entirely_covered_by_range_vector)
10979 (value_entirely_unavailable, value_entirely_optimized_out):
10980 Update.
10981 (insert_into_bit_range_vector): Change argument type.
10982 (find_first_range_overlap): Likewise.
10983 (struct ranges_and_idx, value_contents_bits_eq)
10984 (require_not_optimized_out, require_available): Update.
10985 (ranges_copy_adjusted): Change argument types.
10986 (value_optimized_out, value_copy, value_fetch_lazy): Update.
10987
10988 2018-04-06 Tom Tromey <tom@tromey.com>
10989
10990 * value.c (~value): Update.
10991 (struct value) <parent>: Now a value_ref_ptr.
10992 (value_parent, set_value_parent, value_address, value_copy):
10993 Update.
10994
10995 2018-04-06 Tom Tromey <tom@tromey.com>
10996
10997 * value.c (struct value): Add constructor, destructor, and member
10998 initializers.
10999 (allocate_value_lazy, value_decref): Update.
11000
11001 2018-04-06 Tom Tromey <tom@tromey.com>
11002
11003 * value.c (struct value) <released, next>: Remove.
11004 (all_values): Now a std::vector.
11005 (allocate_value_lazy): Update.
11006 (value_next): Remove.
11007 (value_mark, value_free_to_mark, release_value)
11008 (value_release_to_mark): Update.
11009
11010 2018-04-06 Tom Tromey <tom@tromey.com>
11011
11012 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11013 (free_value_chain): Remove.
11014 * value.c (free_value_chain): Remove.
11015 (value_release_to_mark): Return a std::vector.
11016 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11017 std::vector.
11018 (check_condition): Update.
11019 * eval.c (fetch_subexp_value): Change "val_chain" to a
11020 std::vector.
11021 * breakpoint.c (update_watchpoint): Update.
11022 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11023
11024 2018-04-06 Tom Tromey <tom@tromey.com>
11025
11026 * value.h (free_all_values): Remove.
11027 * value.c (free_all_values): Remove.
11028
11029 2018-04-06 Tom Tromey <tom@tromey.com>
11030
11031 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11032 (value_history_chain, value_history_count): Remove.
11033 (value_history): New global.
11034 (record_latest_value, access_value_history, show_values)
11035 (preserve_values): Update.
11036
11037 2018-04-06 Tom Tromey <tom@tromey.com>
11038
11039 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11040 * varobj.c (varobj_set_display_format, varobj_set_value)
11041 (install_default_visualizer, construct_visualizer)
11042 (install_new_value, ~varobj, varobj_get_value_type)
11043 (my_value_of_variable, varobj_editable_p): Update.
11044 * c-varobj.c (c_describe_child, c_value_of_variable)
11045 (cplus_number_of_children, cplus_describe_child): Update.
11046 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11047 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11048 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11049
11050 2018-04-06 Tom Tromey <tom@tromey.com>
11051
11052 * printcmd.c (last_examine_address): Change type to
11053 value_ref_ptr.
11054 (do_examine, x_command): Update.
11055
11056 2018-04-06 Tom Tromey <tom@tromey.com>
11057
11058 * value.c (release_value): Update.
11059 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11060 (struct bpstats) <val>: Now a value_ref_ptr.
11061 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11062 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11063 (~watchpoint, print_it_watchpoint, watch_command_1)
11064 (invalidate_bp_value_on_memory_change): Update.
11065
11066 2018-04-06 Tom Tromey <tom@tromey.com>
11067
11068 * varobj.c (varobj_clear_saved_item)
11069 (update_dynamic_varobj_children, install_new_value, ~varobj):
11070 Update.
11071 * value.h (value_incref): Move declaration earlier.
11072 (value_decref): Rename from value_free.
11073 (struct value_ref_policy): New.
11074 (value_ref_ptr): New typedef.
11075 (struct value_deleter): Remove.
11076 (gdb_value_up): Remove typedef.
11077 (release_value): Change return type.
11078 (release_value_or_incref): Remove.
11079 * value.c (set_value_parent): Update.
11080 (value_incref): Change return type.
11081 (value_decref): Rename from value_free.
11082 (value_free_to_mark, free_all_values, free_value_chain): Update.
11083 (release_value): Return value_ref_ptr.
11084 (release_value_or_incref): Remove.
11085 (record_latest_value, set_internalvar, clear_internalvar):
11086 Update.
11087 * stack.c (info_frame_command): Don't call value_free.
11088 * python/py-value.c (valpy_dealloc, valpy_new)
11089 (value_to_value_object): Update.
11090 * printcmd.c (do_examine): Update.
11091 * opencl-lang.c (lval_func_free_closure): Update.
11092 * mi/mi-main.c (register_changed_p): Don't call value_free.
11093 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11094 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11095 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11096 value_free.
11097 * guile/scm-value.c (vlscm_free_value_smob)
11098 (vlscm_scm_from_value): Update.
11099 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11100 (frame_unwind_register_unsigned, get_frame_register_bytes)
11101 (put_frame_register_bytes): Don't call value_free.
11102 * findvar.c (address_from_register): Don't call value_free.
11103 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11104 * dwarf2loc.c (entry_data_value_free_closure)
11105 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11106 (dwarf2_evaluate_loc_desc_full): Update.
11107 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11108 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11109 (~watchpoint, watch_command_1)
11110 (invalidate_bp_value_on_memory_change): Update.
11111 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11112
11113 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11114
11115 PR gdb/23022
11116 * warning.m4: Add -Wno-error=deprecated-register.
11117 * configure: Re-generate.
11118
11119 2018-04-05 Tom Tromey <tom@tromey.com>
11120
11121 * linespec.h: Remove include of "vec.h".
11122
11123 2018-04-05 Tom Tromey <tom@tromey.com>
11124
11125 * linespec.c (typep): Remove typedef.
11126 (find_methods, find_superclass_methods): Take a std::vector.
11127 (find_method): Use std::vector.
11128
11129 2018-04-05 Tom Tromey <tom@tromey.com>
11130
11131 * utils.c (compare_strings): Remove.
11132 * utils.h (compare_strings): Remove.
11133 * objc-lang.h (find_imps): Update.
11134 * objc-lang.c (find_methods): Take a std::vector.
11135 (uniquify_strings, find_imps): Likewise.
11136 * linespec.c (find_methods): Take a std::vector.
11137 (decode_objc): Use std::vector.
11138 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11139 a std::vector.
11140 (find_method, find_function_symbols): Use std::vector.
11141
11142 2018-04-05 Tom Tromey <tom@tromey.com>
11143
11144 * completer.c (completion_tracker::completion_tracker): Remove
11145 cast.
11146 (completion_tracker::discard_completions): Likewise.
11147 * breakpoint.c (ambiguous_names_p): Remove cast.
11148 * ada-lang.c (_initialize_ada_language): Remove cast.
11149 * utils.h (streq): Update.
11150 (streq_hash): Add new declaration.
11151 * utils.c (streq): Return bool.
11152 (streq_hash): New function.
11153
11154 2018-04-05 Tom Tromey <tom@tromey.com>
11155
11156 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11157 Remove a string copy.
11158
11159 2018-04-05 Tom Tromey <tom@tromey.com>
11160
11161 * linespec.c (filter_results): Use std::vector.
11162 (decode_line_2, decode_line_full): Update.
11163
11164 2018-04-05 Tom Tromey <tom@tromey.com>
11165
11166 * linespec.c (canonical_to_fullform): Return std::string.
11167 (filter_results): Update.
11168 (struct decode_line_2_item): Add constructor.
11169 <fullform, displayform>: Now std::string.
11170 (decode_line_2_compare_items): Now a std::sort comparator.
11171 (decode_line_2): Update.
11172
11173 2018-04-05 Tom Tromey <tom@tromey.com>
11174
11175 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11176 (unexpected_linespec_error): Update.
11177 (linespec_parse_basic, parse_linespec): Update.
11178
11179 2018-04-05 Tom Tromey <tom@tromey.com>
11180
11181 * linespec.c (linespec_parse_basic): Reindent.
11182
11183 2018-04-05 Tom Tromey <tom@tromey.com>
11184
11185 * minsyms.h (iterate_over_minimal_symbols): Update.
11186 * minsyms.c (iterate_over_minimal_symbols): Take a
11187 gdb::function_view.
11188 * linespec.c (struct collect_minsyms): Remove.
11189 (compare_msyms): Now a std::sort comparator.
11190 (add_minsym): Add parameters.
11191 (search_minsyms_for_name): Update. Use std::vector.
11192
11193 2018-04-03 Tom Tromey <tom@tromey.com>
11194
11195 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11196 gdb::byte_vector.
11197
11198 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11199
11200 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11201
11202 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11203
11204 PR gdb/16959
11205 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11206 printing static type.
11207
11208 2018-04-01 Tom Tromey <tom@tromey.com>
11209
11210 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11211 (rs6000_xfer_shared_libraries): Update.
11212
11213 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11214
11215 * common/gdb_vecs.h (char_ptr): Remove.
11216 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11217
11218 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11219
11220 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11221 with std::vector.
11222 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11223
11224 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11225
11226 * tracepoint.h (struct uploaded_tp): Initialize fields.
11227 <actions, step_actions, cmd_strings>: Change type to
11228 std::vector<char *>.
11229 * tracepoint.c (get_uploaded_tp): Allocate with new.
11230 (free_uploaded_tps): Free with delete.
11231 (parse_tracepoint_definition): Adjust to std::vector change.
11232 * breakpoint.c (read_uploaded_action): Likewise.
11233 (create_tracepoint_from_upload): Likewise.
11234 * ctf.c (ctf_write_uploaded_tp): Likewise.
11235 (SET_ARRAY_FIELD): Likewise.
11236 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11237
11238 2018-03-30 Tom Tromey <tom@tromey.com>
11239
11240 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11241 std::unique_ptr.
11242 (svr4_keep_data_in_core): Update.
11243 (svr4_read_so_list): Update.
11244
11245 2018-03-30 Tom Tromey <tom@tromey.com>
11246
11247 * windows-nat.c (handle_output_debug_string, handle_exception):
11248 Update.
11249 * target.h (target_read_string): Update.
11250 * target.c (target_read_string): Change "string" to
11251 unique_xmalloc_ptr.
11252 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11253 Update.
11254 * solib-frv.c (frv_current_sos): Update.
11255 * solib-dsbt.c (dsbt_current_sos): Update.
11256 * solib-darwin.c (darwin_current_sos): Update.
11257 * linux-thread-db.c (inferior_has_bug): Update.
11258 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11259 Update. Remove alloca.
11260 * ada-lang.c (ada_main_name): Update.
11261
11262 2018-03-30 Tom Tromey <tom@tromey.com>
11263
11264 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11265 (struct dwo_file_deleter): New.
11266 (dwo_file_up): New typedef.
11267 (open_and_init_dwo_file): Use dwo_file_up.
11268 (free_dwo_file_cleanup): Remove.
11269
11270 2018-03-30 Tom Tromey <tom@tromey.com>
11271
11272 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11273 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11274
11275 2018-03-30 Tom Tromey <tom@tromey.com>
11276
11277 * dwarf2read.c (class free_cached_comp_units): New class.
11278 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11279 (free_cached_comp_units): Remove function.
11280
11281 2018-03-30 Tom Tromey <tom@tromey.com>
11282
11283 * utils.h (make_cleanup_unpush_target): Remove.
11284 * inf-ptrace.c (struct target_unpusher): New.
11285 (target_unpush_up) New typedef.
11286 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11287 target_unpush_up.
11288 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11289
11290 2018-03-27 Tom Tromey <tom@tromey.com>
11291
11292 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11293
11294 2018-03-27 Pedro Alves <palves@redhat.com>
11295 Tom Tromey <tom@tromey.com>
11296
11297 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11298 destructor. Now a class.
11299 (gdb_readline_wrapper_cleanup): Remove function.
11300 (gdb_readline_wrapper): Remove cleanups.
11301
11302 2018-03-27 Tom Tromey <tom@tromey.com>
11303
11304 * typeprint.h (struct type_print_options) <local_typedefs,
11305 global_typedefs>: Remove "struct" keyword.
11306 (class typedef_hash_table): New class.
11307 (recursively_update_typedef_hash, add_template_parameters)
11308 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11309 (find_typedef_in_hash): Don't declare.
11310 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11311 (typedef_hash_table::recursively_update): Rename from
11312 recursively_update_typedef_hash. Now a member.
11313 (typedef_hash_table::add_template_parameters): Rename from
11314 add_template_parameters. Now a member.
11315 (typedef_hash_table::typedef_hash_table): Now a constructor;
11316 rename from create_typedef_hash.
11317 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11318 rename from free_typedef_hash.
11319 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11320 (do_free_global_table): Remove.
11321 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11322 from copy_type_recursive.
11323 (create_global_typedef_table): Remove.
11324 (typedef_hash_table::find_global_typedef): Now a member of
11325 typedef_hash_table.
11326 (typedef_hash_table::find_typedef): Rename from
11327 find_typedef_in_hash; now a member.
11328 (whatis_exp): Update.
11329 * extension.h (struct ext_lang_type_printers): Add constructor and
11330 destructor.
11331 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11332 declare.
11333 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11334 Now a constructor; rename from start_ext_lang_type_printers.
11335 (ext_lang_type_printers): Now a destructor; rename from
11336 free_ext_lang_type_printers.
11337 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11338 Update.
11339 (c_type_print_base_struct_union): Update. Remove cleanups.
11340
11341 2018-03-27 Tom Tromey <tom@tromey.com>
11342
11343 * dwarf-index-write.c: Include <cmath>.
11344
11345 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11346
11347 * NEWS: Add entry describing new "set|show varsize-limit" command.
11348 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11349 command.
11350 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11351 "set variable".
11352
11353 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11354
11355 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11356 dwarf-index-write.c
11357 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11358 * dwarf-index-common.c: New file.
11359 * dwarf-index-common.h: New file.
11360 * dwarf-index-write.c: New file.
11361 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11362 (struct dwarf2_section_info): Move from here.
11363 (dwarf2_section_info_def): Likewise.
11364 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11365 (offset_type): Likewise.
11366 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11367 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11368 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11369 (byte_swap): Likewise.
11370 (MAYBE_SWAP): Likewise.
11371 (dwarf2_per_cu_ptr): Likewise.
11372 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11373 (struct tu_stats): Likewise.
11374 (struct dwarf2_per_objfile): Likewise.
11375 (struct dwarf2_per_cu_data): Likewise.
11376 (struct signatured_type): Likewise.
11377 (sig_type_ptr): Likewise.
11378 (DEF_VEC_P (sig_type_ptr)): Likewise.
11379 (INDEX4_SUFFIX): Likewise.
11380 (INDEX5_SUFFIX): Likewise.
11381 (DEBUG_STR_SUFFIX): Likewise.
11382 (dwarf2_read_section): Make non-static.
11383 (mapped_index_string_hash): Move from here.
11384 (dwarf5_djb_hash): Likewise.
11385 (file_write): Likewise.
11386 (class data_buf): Likewise.
11387 (struct symtab_index_entry): Likewise.
11388 (struct mapped_symtab): Likewise.
11389 (find_slot): Likewise.
11390 (hash_expand): Likewise.
11391 (add_index_entry): Likewise.
11392 (uniquify_cu_indices): Likewise.
11393 (class c_str_view): Likewise.
11394 (class c_str_view_hasher): Likewise.
11395 (class vector_hasher): Likewise.
11396 (write_hash_table): Likewise.
11397 (psym_index_map): Likewise.
11398 (struct addrmap_index_data): Likewise.
11399 (add_address_entry): Likewise.
11400 (add_address_entry_worker): Likewise.
11401 (write_address_map): Likewise.
11402 (symbol_kind): Likewise.
11403 (write_psymbols): Likewise.
11404 (struct signatured_type_index_data): Likewise.
11405 (write_one_signatured_type): Likewise.
11406 (recursively_count_psymbols): Likewise.
11407 (recursively_write_psymbols): Likewise.
11408 (class debug_names): Likewise.
11409 (check_dwarf64_offsets): Likewise.
11410 (psyms_seen_size): Likewise.
11411 (write_gdbindex): Likewise.
11412 (write_debug_names): Likewise.
11413 (assert_file_size): Likewise.
11414 (write_psymtabs_to_index): Likewise.
11415 (save_gdb_index_command): Likewise.
11416 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11417 command.
11418 * dwarf2read.h: New file.
11419
11420 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11421
11422 PR gdb/22670
11423 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11424 symbol name if the CU's language stores symbol names in linkage
11425 format.
11426 * language.h (struct language_defn)
11427 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11428 all instances of this struct.
11429
11430 2018-03-26 Tom Tromey <tom@tromey.com>
11431
11432 * stack.c (backtrace_command_1): Remove verbose code.
11433
11434 2018-03-26 Tom Tromey <tom@tromey.com>
11435
11436 * python/py-framefilter.c (py_print_type): Don't catch
11437 exceptions. Return void.
11438 (py_print_value): Likewise.
11439 (py_print_single_arg): Likewise.
11440 (enumerate_args): Don't catch exceptions.
11441 (py_print_args): Likewise.
11442 (py_print_frame): Likewise.
11443 (gdbpy_apply_frame_filter): Catch exceptions here.
11444
11445 2018-03-26 Tom Tromey <tom@tromey.com>
11446
11447 * stack.c (_initialize_stack): Remove trailing newlines from help
11448 text. Add "Usage" line to "backtrace" help.
11449
11450 2018-03-26 Tom Tromey <tom@tromey.com>
11451
11452 PR python/16486:
11453 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11454
11455 2018-03-26 Tom Tromey <tom@tromey.com>
11456
11457 * python/py-framefilter.c (py_print_single_arg): Return
11458 EXT_LANG_BT_ERROR from catch.
11459
11460 2018-03-26 Tom Tromey <tom@tromey.com>
11461
11462 PR backtrace/15584:
11463 * stack.c (backtrace_command_1): Move some code into no-filters
11464 "if".
11465
11466 2018-03-26 Tom Tromey <tom@tromey.com>
11467
11468 * python/py-framefilter.c (throw_quit_or_print_exception): New
11469 function.
11470 (gdbpy_apply_frame_filter): Use it.
11471
11472 2018-03-26 Tom Tromey <tom@tromey.com>
11473
11474 PR cli/17716:
11475 * python/py-framefilter.c (py_print_type, py_print_value)
11476 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11477 RETURN_MASK_ERROR.
11478
11479 2018-03-26 Tom Tromey <tom@tromey.com>
11480
11481 * python/py-framefilter.c (enumerate_args): Use
11482 gdb::unique_xmalloc_ptr.
11483
11484 2018-03-26 Tom Tromey <tom@tromey.com>
11485
11486 * python/py-framefilter.c (py_print_frame): Return
11487 EXT_LANG_BT_OK.
11488 (gdbpy_apply_frame_filter): Update comment.
11489 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11490 Remove.
11491 <EXT_LANG_BT_NO_FILTERS>: Change value.
11492
11493 2018-03-26 Tom Tromey <tom@tromey.com>
11494
11495 PR backtrace/15582:
11496 * stack.c (backtrace_command): Parse "hide" argument.
11497 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11498 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11499 constant.
11500
11501 2018-03-26 Tom Tromey <tom@tromey.com>
11502
11503 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11504 add "flags".
11505 (backtrace_command): Remove "fulltrace", add "flags".
11506
11507 2018-03-26 Tom Tromey <tom@tromey.com>
11508
11509 * stack.c (backtrace_command): Rewrite command line parsing.
11510
11511 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11512
11513 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11514
11515 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11516
11517 * filename-seen-cache.h: Add include guard.
11518
11519 2018-03-26 Keith Seitz <keiths@redhat.com>
11520
11521 * symfile.c (place_section): Remove "struct" from section_addr_info
11522 in comment.
11523 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11524 "struct" keyword from section_addr_info.
11525
11526 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11527
11528 * regformats/regdef.h (reg): Add constructors.
11529
11530 2018-03-25 Pedro Alves <palves@redhat.com>
11531
11532 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11533 if then/else bodies in var_func_name extraction.
11534
11535 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11536
11537 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11538 lookup_minimal_symbol() to find symbol entry.
11539 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11540
11541 2018-03-23 Keith Seitz <keiths@redhat.com>
11542
11543 PR c++/22968
11544 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11545 nested type definitions for C++, too.
11546
11547 2018-03-23 Tom Tromey <tom@tromey.com>
11548
11549 * machoread.c (struct oso_el): Add a constructor. Don't define as
11550 a typedef.
11551 (macho_register_oso): Remove.
11552 (macho_symtab_read): Take a std::vector.
11553 (oso_el_compare_name): Now a std::sort comparator.
11554 (macho_symfile_read_all_oso): Take a std::vector.
11555 (macho_symfile_read): Use std::vector. Remove cleanups.
11556
11557 2018-03-22 Tom Tromey <tom@tromey.com>
11558
11559 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11560 (record_full_goto_bookmark): Use std::string.
11561
11562 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11563
11564 PR tdep/18295
11565 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11566 a single mask.
11567
11568 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11569
11570 * rs6000-tdep.c (store_insn_p): New function.
11571 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11572 and cr_reg to their unshifted values. Use store_insn_p to
11573 match LR saves using either R1 or fdata->alloca_reg. Use
11574 store_insn_p to match CR saves. Set alloca_reg_offset
11575 when alloca_reg and framep are set. Remove lr_reg shift
11576 when assigning to fdata->lr_register.
11577
11578 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11579
11580 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11581 command line args instead of emitting a warning.
11582
11583 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11584
11585 * tracepoint.h (struct static_tracepoint_marker): Initialize
11586 fields, define default constructor, move constructor and move
11587 assignment, disable the rest.
11588 <str_id, extra>: Make std::string.
11589 (release_static_tracepoint_marker): Remove.
11590 (free_current_marker): Remove.
11591 * tracepoint.c (free_current_marker): Remove.
11592 (parse_static_tracepoint_marker_definition): Adjust to
11593 std::string, use new hex2str overload.
11594 (release_static_tracepoint_marker): Remove.
11595 (print_one_static_tracepoint_marker): Get marker by reference
11596 and adjust to std::string.
11597 (info_static_tracepoint_markers_command): Adjust to std::vector
11598 changes
11599 * target.h (static_tracepoint_marker_p): Remove typedef.
11600 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11601 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11602 bool.
11603 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11604 * target-debug.h
11605 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11606 (target_debug_print_std_vector_static_tracepoint_marker): New.
11607 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11608 to...
11609 (target_debug_print_static_tracepoint_marker_p): ... this.
11610 * target-delegates.c: Re-generate.
11611 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11612 Make std::string.
11613 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11614 (decode_static_tracepoint_spec): Adjust to std::vector.
11615 (tracepoint_print_one_detail): Adjust to std::string.
11616 (strace_marker_decode_location): Adjust to std::string.
11617 (update_static_tracepoint): Adjust to std::string, remove call
11618 to release_static_tracepoint_marker.
11619 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11620 Adjust to std::vector.
11621 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11622 (remote_static_tracepoint_markers_by_strid): Adjust to
11623 std::vector.
11624 * common/rsp-low.h (hex2str): New overload with explicit count
11625 of bytes.
11626 * common/rsp-low.c (hex2str): New overload with explicit count
11627 of bytes.
11628 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11629 (_initialize_rsp_low_selftests): Add test_hex2str test.
11630 * unittests/tracepoint-selftests.c
11631 (test_parse_static_tracepoint_marker_definition): Adjust to
11632 std::string.
11633
11634 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11635
11636 * tracepoint.c (parse_static_tracepoint_marker_definition):
11637 Consider case where the definition is followed by more
11638 definitions.
11639 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11640 tracepoint-selftests.c.
11641 * unittests/tracepoint-selftests.c: New.
11642
11643 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11644
11645 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11646 Carvalho.
11647
11648 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11649
11650 * symtab.c (find_pc_sect_line): fixed indentation.
11651
11652 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11653
11654 * symtab.c (find_pc_sect_line): now uses binary search.
11655
11656 2018-03-19 Tom Tromey <tom@tromey.com>
11657
11658 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11659 "IDENT" production.
11660
11661 2018-03-19 Pedro Alves <palves@redhat.com>
11662 Tom Tromey <tom@tromey.com>
11663
11664 * unittests/observable-selftests.c: New file.
11665 * common/observable.h: New file.
11666 * observable.h: New file.
11667 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11668 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11669 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11670 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11671 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11672 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11673 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11674 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11675 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11676 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11677 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11678 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11679 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11680 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11681 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11682 tui/tui-interp.c, valops.c: Update all users.
11683 * tui/tui-hooks.c (tui_bp_created_observer)
11684 (tui_bp_deleted_observer, tui_bp_modified_observer)
11685 (tui_inferior_exit_observer, tui_before_prompt_observer)
11686 (tui_normal_stop_observer, tui_register_changed_observer):
11687 Remove.
11688 (tui_observers_token): New global.
11689 (attach_or_detach, tui_attach_detach_observers): New functions.
11690 (tui_install_hooks, tui_remove_hooks): Use
11691 tui_attach_detach_observers.
11692 * record-btrace.c (record_btrace_thread_observer): Remove.
11693 (record_btrace_thread_observer_token): New global.
11694 * observer.sh: Remove.
11695 * observer.c: Rename to observable.c.
11696 * observable.c (namespace gdb_observers): Define new objects.
11697 (observer_debug): Move into gdb_observers namespace.
11698 (struct observer, struct observer_list, xalloc_observer_list_node)
11699 (xfree_observer_list_node, generic_observer_attach)
11700 (generic_observer_detach, generic_observer_notify): Remove.
11701 (_initialize_observer): Update.
11702 Don't include observer.inc.
11703 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11704 (clean mostlyclean): Likewise.
11705 (observer.h, observer.inc): Remove targets.
11706 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11707 (COMMON_SFILES): Use observable.c, not observer.c.
11708 * .gitignore: Remove observer.h.
11709
11710 2018-03-18 Tom Tromey <tom@tromey.com>
11711
11712 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11713 gdb::def_vector.
11714 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11715
11716 2018-03-17 Tom Tromey <tom@tromey.com>
11717
11718 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11719
11720 2018-03-17 Tom Tromey <tom@tromey.com>
11721
11722 * target.c (class scoped_target_fd): New.
11723 (target_fileio_close_cleanup): Remove.
11724 (target_fileio_read_alloc_1): Use scoped_target_fd.
11725
11726 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11727
11728 * silent-rules.mk: New.
11729 * Makefile.in: Include silent-rules.mk
11730 (srcdir, VPATH, top_srcdir): Move up.
11731 (COMPILE): Add ECHO_CXX.
11732 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11733 (init.c): Add ECHO_INIT_C.
11734 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11735 (version.c): Add ECHO_GEN.
11736 (printcmd.o): Add ECHO_CXX.
11737 (target-float.o): Add ECHO_CXX.
11738 (ada-exp.o): Add ECHO_CXX.
11739 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11740 (insight$(EXEEXT)): Add ECHO_CXXLD.
11741 * gnulib/configure.ac: Add AM_SILENT_RULES.
11742 * gnulib/aclocal.m4: Re-generate.
11743 * gnulib/configure: Re-generate.
11744 * gnulib/import/Makefile.in: Re-generate.
11745
11746 2018-03-16 Tom Tromey <tom@tromey.com>
11747
11748 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11749 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11750 * utils.c (do_free_section_addr_info)
11751 (make_cleanup_free_section_addr_info): Remove.
11752 * symfile.h (struct other_sections): Add constructor.
11753 (struct section_addr_info): Remove.
11754 (section_addr_info): New typedef.
11755 (struct sym_fns) <sym_offsets>: Change type of parameter.
11756 (build_section_addr_info_from_objfile)
11757 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11758 (default_symfile_offsets, symbol_file_add)
11759 (symbol_file_add_from_bfd)
11760 (build_section_addr_info_from_section_table): Update.
11761 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11762 * symfile.c (alloc_section_addr_info): Remove.
11763 (build_section_addr_info_from_section_table): Change return type.
11764 Update.
11765 (build_section_addr_info_from_bfd)
11766 (build_section_addr_info_from_objfile): Likewise.
11767 (free_section_addr_info): Remove.
11768 (relative_addr_info_to_section_offsets): Change type of "addrs".
11769 (addrs_section_compar): Now a std::sort comparator.
11770 (addrs_section_sort): Change return type.
11771 (addr_info_make_relative): Change type of "addrs". Update.
11772 (default_symfile_offsets, syms_from_objfile_1)
11773 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11774 (symbol_file_add_separate): Update.
11775 (symbol_file_add): Change type of "addrs". Update.
11776 (add_symbol_file_command): Update. Remove cleanups.
11777 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11778 cleanups.
11779 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11780 * solib.c (solib_read_symbols): Update.
11781 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11782 * machoread.c (macho_symfile_offsets): Update.
11783 * jit.c (jit_bfd_try_read_symtab): Update.
11784
11785 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11786
11787 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11788 unittests/utils-selftests.c.
11789 * unittests/utils-selftests.c: New file.
11790
11791 2018-03-14 Tom Tromey <tom@tromey.com>
11792
11793 PR cli/14977:
11794 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11795 for NULL.
11796
11797 2018-03-14 Tom Tromey <tom@tromey.com>
11798
11799 PR cli/19918:
11800 * printcmd.c (printf_pointer): Allow "-" in format.
11801
11802 2018-03-14 Tom Tromey <tom@tromey.com>
11803
11804 * printcmd.c (_initialize_printcmd): Add usage to printf.
11805
11806 2018-03-14 Yao Qi <qiyao@sourceware.org>
11807
11808 * MAINTAINERS: Update my email address.
11809
11810 2018-03-13 Tom Tromey <tom@tromey.com>
11811
11812 * machoread.c (macho_check_dsym): Change filenamep to a
11813 std::string*.
11814 (macho_symfile_read): Update.
11815 * symfile.c (load_command): Use std::string.
11816
11817 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
11818
11819 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11820 to error message string.
11821 (riscv_register_name): Use xsnprintf instead of sprintf.
11822 (riscv_insn::fetch_instruction): Use gdb_assert instead of
11823 internal_error.
11824 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11825 error.
11826 (riscv_push_dummy_call): Likewise.
11827
11828 2018-03-12 Tom Tromey <tom@tromey.com>
11829
11830 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11831 Use gdb::byte_vector.
11832 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11833
11834 2018-03-12 Yao Qi <yao.qi@linaro.org>
11835
11836 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11837 parameter type to readable_regcache.
11838 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11839 the declaration.
11840
11841 2018-03-11 Tom Tromey <tom@tromey.com>
11842
11843 * dwarf2read.c (struct nextfield): Add initializers.
11844 (struct nextfnfield): Remove.
11845 (struct fnfieldlist): Add initializers. Remove "length" and
11846 "head", use std::vector.
11847 (struct decl_field_list): Remove.
11848 (struct field_info): Add initializers.
11849 <fields, baseclasses>: Now std::vector.
11850 <nbaseclasses, nfnfields, typedef_field_list_count,
11851 nested_types_list_count>: Remove.
11852 (dwarf2_add_field, dwarf2_add_type_defn)
11853 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11854 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11855 (process_structure_scope): Update.
11856
11857 2018-03-11 Tom Tromey <tom@tromey.com>
11858
11859 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11860 for use by std::sort.
11861 (build_type_psymtabs_1): Use std::vector.
11862
11863 2018-03-09 Eli Zaretskii <eliz@gnu.org>
11864
11865 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11866 and LIBMPFR in the printed configuration.
11867
11868 2018-03-08 Tom Tromey <tom@tromey.com>
11869
11870 * source.c (get_filename_and_charpos): Use scoped_fd.
11871 * nto-procfs.c (procfs_open_1): Use scoped_fd.
11872 (procfs_pidlist): Likewise.
11873 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11874 (iterate_over_mappings): Likewise.
11875
11876 2018-03-08 Tom Tromey <tom@tromey.com>
11877
11878 * infcall.c (struct call_return_meta_info)
11879 <stack_temporaries_enabled>: Remove.
11880 (get_call_return_value, call_function_by_hand_dummy): Update.
11881 * thread.c (disable_thread_stack_temporaries): Remove.
11882 (enable_thread_stack_temporaries): Remove.
11883 (thread_stack_temporaries_enabled_p): Return bool.
11884 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11885 (get_last_thread_stack_temporary): Update.
11886 * eval.c (evaluate_subexp): Update.
11887 * gdbthread.h (class enable_thread_stack_temporaries): Now a
11888 class, not a function.
11889 (value_ptr, value_vec): Remove typedefs.
11890 (class thread_info) <stack_temporaries_enabled>: Now bool.
11891 <stack_temporaries>: Now a std::vector.
11892 (thread_stack_temporaries_enabled_p)
11893 (value_in_thread_stack_temporaries): Return bool.
11894
11895 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
11896
11897 * remote.c (putpkt_binary): Fix omitted bytes reporting.
11898 (getpkt_or_notif_sane_1): Likewise.
11899
11900 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11901
11902 * build-id.c (build_id_to_debug_bfd): Use std::string.
11903
11904 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11905
11906 * build-id.c (find_separate_debug_file_by_buildid): Return
11907 std::string.
11908 * build-id.h (find_separate_debug_file_by_buildid): Return
11909 std::string.
11910 * coffread.c (coff_symfile_read): Adjust to std::string.
11911 * elfread.c (elf_symfile_read): Adjust to std::string.
11912 * symfile.c (separate_debug_file_exists): Change parameter to
11913 std::string.
11914 (find_separate_debug_file): Return std::string.
11915 (find_separate_debug_file_by_debuglink): Return std::string.
11916 * symfile.h (find_separate_debug_file_by_debuglink): Return
11917 std::string.
11918
11919 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
11920
11921 * common/xml-utils.c (xml_escape_text): Move code to...
11922 (xml_escape_text_append): ... this new function.
11923 * common/xml-utils.h (xml_escape_text_append): New declaration.
11924 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11925 New function.
11926 (_initialize_xml_utils): register test_xml_escape_text_append as
11927 a selftest.
11928
11929 2018-03-07 Alan Hayward <alan.hayward@arm.com>
11930
11931 * defs.h: Remove MAX_REGISTER_SIZE.
11932 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11933 asserts.
11934 * python/py-unwind.c (pyuw_sniffer): Likewise.
11935
11936 2018-03-07 Tom Tromey <tom@tromey.com>
11937
11938 * linux-tdep.c (linux_info_proc): Update.
11939 * target.h (struct target_ops) <to_fileio_readlink>: Return
11940 optional<string>.
11941 (target_fileio_readlink): Return optional<string>.
11942 * remote.c (remote_hostio_readlink): Return optional<string>.
11943 * inf-child.c (inf_child_fileio_readlink): Return
11944 optional<string>.
11945 * target.c (target_fileio_readlink): Return optional<string>.
11946
11947 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
11948
11949 * regcache.c (cooked_read_test): Add riscv to the list of
11950 architectures that have a save_reggroup.
11951
11952 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
11953
11954 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11955 value is not a dynamic class object.
11956
11957 2018-03-06 Tom Tromey <tom@tromey.com>
11958
11959 * rust-exp.y: Formatting fixes.
11960
11961 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11962
11963 * riscv-tdep.c (riscv_register_name): Remove target description
11964 support.
11965 (riscv_gdbarch_init): Remove target description check.
11966
11967 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11968
11969 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11970 comment.
11971 * riscv-tdep.h: Likewise.
11972
11973 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
11974
11975 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11976 (riscv_pseudo_register_write): Delete.
11977 (riscv_gdbarch_init): Remove all use of pseudo registers.
11978
11979 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11980
11981 * record-btrace.c (btrace_print_lines): Replace cleanup
11982 parameter with RAII equivalents.
11983 (btrace_insn_history): Replace cleanup with RAII equivalents.
11984 * ui-out.h (make_cleanup_ui_out_list_begin_end,
11985 make_cleanup_ui_out_tuple_begin_end): Remove.
11986 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11987 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11988 make_cleanup_ui_out_list_begin_end): Remove.
11989
11990 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11991
11992 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11993 parameter types to std::vector. Use bool.
11994 (record_btrace_wait): Replace VEC(tp_t) with
11995 std::vector<thread_info *>.
11996 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11997
11998 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
11999
12000 * record-btrace.c (record_btrace_disable_callback): Remove.
12001 (struct scoped_btrace_disable): New.
12002 (record_btrace_open): Use scoped_btrace_disable.
12003
12004 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12005
12006 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12007 reading values from registers.
12008
12009 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12010
12011 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12012 where appropriate.
12013
12014 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12015
12016 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12017 change parameter type. Use GDB's print functions, and use
12018 core_addr_to_string where appropriate.
12019 (riscv_push_dummy_call): Use core_addr_to_string where
12020 appropriate, update call to riscv_print_arg_location, and reindent
12021 a few lines.
12022 (riscv_return_value): Update call to riscv_print_arg_location.
12023
12024 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12025 Tim Newsome <tim@sifive.com>
12026 Albert Ou <a0u@eecs.berkeley.edu>
12027 Darius Rad <darius@bluespec.com>
12028
12029 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12030 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12031 (ALLDEPFILES): Add riscv-tdep.c
12032 * configure.tgt: Add riscv support.
12033 * riscv-tdep.c: New file.
12034 * riscv-tdep.h: New file.
12035 * NEWS: Mention new target.
12036 * MAINTAINERS: Add entry for riscv.
12037
12038 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12039
12040 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12041 fields within aggregates.
12042
12043 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12044
12045 * record-btrace.c (btrace_print_lines): Change type of flags to
12046 gdb_disassembly_flags.
12047
12048 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12049
12050 * fbsd-nat.c: Include "inf-ptrace.h".
12051 (USE_SIGTRAP_SIGINFO): Conditionally define.
12052 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12053 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12054 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12055 function.
12056 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12057 Likewise.
12058 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12059 Likewise.
12060 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12061 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12062 "supports_stopped_by_hw_breakpoint" target methods.
12063
12064 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12065
12066 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12067 * fbsd-nat.c (debug_fbsd_nat): New variable.
12068 (show_fbsd_nat_debug): New function.
12069 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12070 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12071
12072 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12073
12074 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12075 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12076 prototype.
12077 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12078 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12079 method.
12080
12081 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12082
12083 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12084 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12085
12086 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12087
12088 * charset.c (struct charset_vector): New.
12089 (charsets): Change type to charset_vector.
12090 (find_charset_names): Adjust.
12091 (add_one): Adjust.
12092 (_initialize_charset): Adjust.
12093
12094 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12095
12096 * progspace.h (struct program_space) <deleted_solibs>: Change
12097 type to std::vector<std::string>.
12098 * progspace.c (clear_program_space_solib_cache): Adjust.
12099 * breakpoint.c (print_solib_event): Adjust.
12100 (check_status_catch_solib): Adjust.
12101 * solib.c (update_solib_list): Adjust.
12102 * ui-out.h (class ui_out) <field_string>: New overload.
12103 * ui-out.c (ui_out::field_string): New overload.
12104
12105 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12106
12107 * progspace.h (struct program_space): Add constructor and
12108 destructor, initialize fields.
12109 (add_program_space): Remove.
12110 * progspace.c (add_program_space): Rename to...
12111 (program_space::program_space): ... this.
12112 (release_program_space): Rename to...
12113 (program_space::~program_space): ... this.
12114 (delete_program_space): Use delete to delete program_space.
12115 (initialize_progspace): Use new to allocate program_space.
12116 * inferior.c (add_inferior_with_spaces): Likewise.
12117 (clone_inferior_command): Likewise.
12118 * infrun.c (follow_fork_inferior): Likewise.
12119 (handle_vfork_child_exec_or_exit): Likewise.
12120
12121 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12122
12123 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12124 (delim_string_to_char_ptr_vec): Return std::vector of
12125 gdb::unique_xmalloc_ptr.
12126 (dirnames_to_char_ptr_vec_append): Take std::vector of
12127 gdb::unique_xmalloc_ptr.
12128 (dirnames_to_char_ptr_vec): Return std::vector of
12129 gdb::unique_xmalloc_ptr.
12130 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12131 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12132 (delim_string_to_char_ptr_vec): Return an std::vector of
12133 gdb::unique_xmalloc_ptr, adjust the code.
12134 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12135 gdb::unique_xmalloc_ptr, adjust the code.
12136 (dirnames_to_char_ptr_vec): Return an std::vector of
12137 gdb::unique_xmalloc_ptr, adjust the code.
12138 * auto-load.c (auto_load_safe_path_vec): Change type to
12139 std::vector of gdb::unique_xmalloc_ptr.
12140 (auto_load_expand_dir_vars): Return an std::vector of
12141 gdb::unique_xmalloc_ptr, adjust the code.
12142 (auto_load_safe_path_vec_update): Adjust.
12143 (filename_is_in_auto_load_safe_path_vec): Adjust.
12144 (auto_load_objfile_script_1): Adjust.
12145 * build-id.c (build_id_to_debug_bfd): Adjust.
12146 * linux-thread-db.c (thread_db_load_search): Adjust.
12147 * source.c (add_path): Adjust.
12148 (openp): Adjust.
12149 * symfile.c (find_separate_debug_file): Adjust.
12150 * utils.c (do_free_char_ptr_vec): Remove.
12151 (make_cleanup_free_char_ptr_vec): Remove.
12152
12153 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12154
12155 PR gdb/22907
12156 * common/pathstuff.c: Conditionally include "<windows.h>".
12157
12158 2018-03-01 Georg Sauthoff <mail@georg.so>
12159
12160 PR gdb/22888
12161 * gcore.in: Quote variables and switch interpreter to bash.
12162
12163 2018-03-01 Tom Tromey <tom@tromey.com>
12164
12165 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12166 assertion. Add assertion for discriminant_index.
12167 (quirk_rust_enum): Use correct base type name in univariant case.
12168
12169 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12170
12171 * record.c (get_call_history_modifiers): Return a
12172 record_print_flags.
12173 (cmd_record_call_history): Adjust.
12174 * record-btrace.c (record_btrace_call_history): Adjust.
12175 (record_btrace_call_history_range): Adjust.
12176 (record_btrace_call_history_from): Adjust.
12177 * target-debug.h (target_debug_print_record_print_flags): New.
12178 * target-delegates.c: Re-generate.
12179 * target.c (target_call_history): Change flags type.
12180 (target_call_history_from): Likewise.
12181 (target_call_history_range): Likewise.
12182 * target.h (struct target_ops) <target_call_history>: Likewise.
12183 (target_call_history_from): Likewise.
12184 (target_call_history_range): Likewise.
12185
12186 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12187 Simon Marchi <simon.marchi@polymtl.ca>
12188
12189 * common/common-utils.c: Include "sys/stat.h".
12190 (is_regular_file): Move here from "source.c"; change return
12191 type to "bool".
12192 * common/common-utils.h (is_regular_file): New prototype.
12193 * common/pathstuff.c (contains_dir_separator): New function.
12194 * common/pathstuff.h (contains_dir_separator): New prototype.
12195 * source.c: Don't include "sys/stat.h".
12196 (is_regular_file): Move to "common/common-utils.c".
12197
12198 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12199
12200 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12201 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12202 * auto-load.c: Include "common/pathstuff.h".
12203 * common/common-def.h (current_directory): Move here.
12204 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12205 function.
12206 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12207 prototype.
12208 * common/pathstuff.c: New file.
12209 * common/pathstuff.h: New file.
12210 * compile/compile.c: Include "common/pathstuff.h".
12211 * defs.h (current_directory): Move to "common/common-defs.h".
12212 * dwarf2read.c: Include "common/pathstuff.h".
12213 * exec.c: Likewise.
12214 * guile/scm-safe-call.c: Likewise.
12215 * linux-thread-db.c: Likewise.
12216 * main.c: Likewise.
12217 * nto-tdep.c: Likewise.
12218 * objfiles.c: Likewise.
12219 * source.c: Likewise.
12220 * symtab.c: Likewise.
12221 * utils.c: Include "common/pathstuff.h".
12222 (gdb_realpath): Move to "common/pathstuff.c".
12223 (gdb_realpath_keepfile): Likewise.
12224 (gdb_abspath): Likewise.
12225 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12226 (gdb_realpath_keepfile): Likewise.
12227 (gdb_abspath): Likewise.
12228
12229 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12230
12231 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12232 wildcard process pid for super_resume for kernels with a
12233 specific bug.
12234
12235 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12236
12237 * compile/compile.c (get_args): Add additional comments
12238 explaining function.
12239
12240 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12241 Tom Tromey <tom@tromey.com>
12242
12243 * target.h (memory_write_request_s): Remove typedef. Don't define
12244 VEC.
12245 (target_write_memory_blocks): Change argument to std::vector.
12246 (struct memory_write_request): Add constructor.
12247 * target-memory.c (compare_block_starting_address): Return bool.
12248 Change argument types.
12249 (claim_memory): Change arguments to use std::vector.
12250 (split_regular_and_flash_blocks, blocks_to_erase)
12251 (compute_garbled_blocks): Likewise.
12252 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12253 (target_write_memory_blocks): Change argument to std::vector.
12254 * symfile.c (struct load_section_data): Add constructor and
12255 destructor. Use std::vector for "requests".
12256 (struct load_progress_data): Add initializers.
12257 (load_section_callback): Update. Use "new".
12258 (clear_memory_write_data): Remove.
12259 (generic_load): Update.
12260
12261 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12262
12263 * arch/aarch64.h: Use common/tdesc.h.
12264
12265 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12266
12267 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12268 architecture with a 64-bit ABI.
12269
12270 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12271
12272 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12273 ahead of target description loading.
12274
12275 2018-02-26 Tom Tromey <tom@tromey.com>
12276
12277 * stack.c (backtrace_command_1): Update.
12278 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12279 of "flags".
12280 * python/py-framefilter.c (py_print_frame)
12281 (gdbpy_apply_frame_filter): Change type of "flags".
12282 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12283 of "flags".
12284 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12285 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12286 * extension.h (enum frame_filter_flag): Rename from
12287 frame_filter_flags.
12288 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12289 (apply_ext_lang_frame_filter): Change type of "flags".
12290 * extension.c (apply_ext_lang_frame_filter): Change type of
12291 "flags".
12292 * extension-priv.h (struct extension_language_ops)
12293 <apply_frame_filter>: Change type of "flags".
12294
12295 2018-02-26 Tom Tromey <tom@tromey.com>
12296
12297 PR python/16497:
12298 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12299 off-by-one in py_end computation.
12300 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12301 PRINT_MORE_FRAMES.
12302 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12303 constant.
12304
12305 2018-02-26 Tom Tromey <tom@tromey.com>
12306
12307 * dwarf2read.c (struct variant_field): New.
12308 (struct nextfield) <variant>: New field.
12309 (dwarf2_add_field): Handle DW_TAG_variant_part.
12310 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12311 discriminated union.
12312 (read_structure_type): Handle DW_TAG_variant_part.
12313 (handle_struct_member_die): New function, extracted from
12314 process_structure_scope. Handle DW_TAG_variant.
12315 (process_structure_scope): Handle discriminated unions. Call
12316 handle_struct_member_die.
12317
12318 2018-02-26 Tom Tromey <tom@tromey.com>
12319
12320 * rust-lang.h (rust_last_path_segment): Declare.
12321 * rust-lang.c (rust_last_path_segment): Now public. Change
12322 contract.
12323 (struct disr_info): Remove.
12324 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12325 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12326 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12327 (rust_enum_p, rust_enum_variant): New function.
12328 (rust_underscore_fields): Remove "offset" parameter.
12329 (rust_print_enum): New function.
12330 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12331 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12332 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12333 enums.
12334 (rust_internal_print_type): New function, from rust_print_type.
12335 Remove enum code.
12336 (rust_print_type): Call rust_internal_print_type.
12337 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12338 Update enum handling.
12339 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12340 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12341 (rust_union_quirks): New functions.
12342 (process_full_comp_unit, process_full_type_unit): Call
12343 rust_union_quirks.
12344 (process_structure_scope): Update rust_unions if necessary.
12345
12346 2018-02-26 Tom Tromey <tom@tromey.com>
12347
12348 * value.h (value_union_variant): Declare.
12349 * valops.c (value_union_variant): New function.
12350 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12351 (struct discriminant_info): New.
12352 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12353 enumerator.
12354 (struct main_type) <flag_discriminated_union>: New field.
12355
12356 2018-02-26 Tom Tromey <tom@tromey.com>
12357
12358 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12359 unittests/unpack-selftests.c.
12360 * unittests/unpack-selftests.c: New file.
12361 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12362
12363 2018-02-26 Yao Qi <yao.qi@linaro.org>
12364
12365 * dwarf2read.c (struct partial_die_info) <read>: New method.
12366 (read_partial_die): Remove the declaration.
12367 (load_partial_dies): Update.
12368 (partial_die_info::partial_die_info):
12369 (read_partial_die): Change it to partial_die_info::read.
12370
12371 2018-02-26 Yao Qi <yao.qi@linaro.org>
12372
12373 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12374 (fixup_partial_die): Remove declaration.
12375 (scan_partial_symbols): Update.
12376 (partial_die_parent_scope): Likewise.
12377 (partial_die_full_name): Likewise.
12378 (fixup_partial_die): Change it to partial_die_info::fixup.
12379
12380 2018-02-26 Yao Qi <yao.qi@linaro.org>
12381
12382 * dwarf2read.c (read_partial_die): Update the declaration.
12383 (load_partial_dies): Caller update.
12384 (read_partial_die): Remove one argument abbrev_len.
12385
12386 2018-02-26 Yao Qi <yao.qi@linaro.org>
12387
12388 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12389 assignment operator.
12390 (load_partial_dies): Use ctor and copy ctor.
12391 (read_partial_die): Update.
12392 (dwarf2_cu::find_partial_die): Use ctor.
12393
12394 2018-02-26 Yao Qi <yao.qi@linaro.org>
12395
12396 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12397 (find_partial_die_in_comp_unit): Change it to
12398 dwarf2_cu::find_partial_die.
12399 (find_partial_die): Update.
12400
12401 2018-02-26 Yao Qi <yao.qi@linaro.org>
12402
12403 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12404 is NULL.
12405
12406 2018-02-26 Yao Qi <yao.qi@linaro.org>
12407
12408 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12409
12410 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12411
12412 * arch/amd64.h: Use common/tdesc.h.
12413 * arch/i386.c: Likewise.
12414 * arch/i386.h: Likewise.
12415 * arch/tic6x.c: Likewise.
12416 * arch/tdesc.h: Move file from here...
12417 * common/tdesc.h: ...to here.
12418 * features/aarch64-core.c: Regenerate.
12419 * features/aarch64-fpu.c: Regenerate.
12420 * features/i386/32bit-avx.c: Regenerate.
12421 * features/i386/32bit-avx512.c: Regenerate.
12422 * features/i386/32bit-core.c: Regenerate.
12423 * features/i386/32bit-linux.c: Regenerate.
12424 * features/i386/32bit-mpx.c: Regenerate.
12425 * features/i386/32bit-pkeys.c: Regenerate.
12426 * features/i386/32bit-sse.c: Regenerate.
12427 * features/i386/64bit-avx.c: Regenerate.
12428 * features/i386/64bit-avx512.c: Regenerate.
12429 * features/i386/64bit-core.c: Regenerate.
12430 * features/i386/64bit-linux.c: Regenerate.
12431 * features/i386/64bit-mpx.c: Regenerate.
12432 * features/i386/64bit-pkeys.c: Regenerate.
12433 * features/i386/64bit-segments.c: Regenerate.
12434 * features/i386/64bit-sse.c: Regenerate.
12435 * features/i386/x32-core.c: Regenerate.
12436 * features/tic6x-c6xp.c: Regenerate.
12437 * features/tic6x-core.c: Regenerate.
12438 * features/tic6x-gp.c: Regenerate.
12439 * target-descriptions.c: Use common/tdesc.h.
12440 * target-descriptions.h: Likewise.
12441
12442 2018-02-24 Tom Tromey <tom@tromey.com>
12443
12444 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12445 (try_thread_db_load_from_dir, thread_db_load_search): Use
12446 std::string.
12447 (info_auto_load_libthread_db_compare): Return bool. Change
12448 argument types.
12449 (info_auto_load_libthread_db): Use std::vector, std::string.
12450 Remove cleanups.
12451
12452 2018-02-24 Tom Tromey <tom@tromey.com>
12453
12454 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12455 std::string.
12456 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12457 std::string*.
12458 * gdbarch.c: Rebuild.
12459 * gdbarch.h: Rebuild.
12460 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12461 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12462 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12463 std::string*.
12464
12465 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12466
12467 * gdbtypes.h (sect_offset): Change type to uint64_t.
12468 (sect_offset_str): New function.
12469 * dwarf2read.c (create_addrmap_from_aranges): Use
12470 sect_offset_str.
12471 (error_check_comp_unit_head): Likewise.
12472 (create_debug_type_hash_table): Likewise.
12473 (read_cutu_die_from_dwo): Likewise.
12474 (init_cutu_and_read_dies): Likewise.
12475 (init_cutu_and_read_dies_no_follow): Likewise.
12476 (process_psymtab_comp_unit_reader): Likewise.
12477 (partial_die_parent_scope): Likewise.
12478 (peek_die_abbrev): Likewise.
12479 (process_queue): Likewise.
12480 (dwarf2_physname): Likewise.
12481 (read_namespace_alias): Likewise.
12482 (read_import_statement): Likewise.
12483 (create_dwo_cu_reader): Likewise.
12484 (create_cus_hash_table): Likewise.
12485 (lookup_dwo_cutu): Likewise.
12486 (inherit_abstract_dies): Likewise.
12487 (read_func_scope): Likewise.
12488 (read_call_site_scope): Likewise.
12489 (dwarf2_add_member_fn): Likewise.
12490 (read_common_block): Likewise.
12491 (read_module_type): Likewise.
12492 (read_typedef): Likewise.
12493 (read_subrange_type): Likewise.
12494 (load_partial_dies): Likewise.
12495 (read_partial_die): Likewise.
12496 (find_partial_die): Likewise.
12497 (read_str_index): Likewise.
12498 (dwarf2_string_attr): Likewise.
12499 (build_error_marker_type): Likewise.
12500 (lookup_die_type): Likewise.
12501 (dump_die_shallow): Likewise.
12502 (follow_die_ref): Likewise.
12503 (dwarf2_fetch_die_loc_sect_off): Likewise.
12504 (dwarf2_fetch_constant_bytes): Likewise.
12505 (follow_die_sig): Likewise.
12506 (get_signatured_type): Likewise.
12507 (get_DW_AT_signature_type): Likewise.
12508 (dwarf2_find_containing_comp_unit): Likewise.
12509 (set_die_type): Likewise.
12510
12511 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12512
12513 * arch/aarch64.c: Include "common-defs.h".
12514 * arch/amd64.c: Likewise.
12515 * arch/i386.c: Likewise.
12516
12517 2018-02-21 Tom Tromey <tom@tromey.com>
12518
12519 * value.h: (extract_field_op): Update.
12520 * eval.c (extract_field_op): Return a const char *.
12521 * expression.h (parse_expression_for_completion): Update.
12522 * completer.c (complete_expression): Update.
12523 (add_struct_fields): Make fieldname const.
12524 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12525 (mark_completion_tag, parse_exp_in_context_1): Update.
12526 (parse_expression_for_completion): Change "name" to
12527 unique_xmalloc_ptr*.
12528
12529 2018-02-21 Tom Tromey <tom@tromey.com>
12530
12531 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12532
12533 2018-02-21 Yao Qi <yao.qi@linaro.org>
12534
12535 * avr-tdep.c (avr_read_pc): Change parameter type to
12536 readable_regcache.
12537 * gdbarch.sh (read_pc): Likewise.
12538 * gdbarch.c: Re-generated.
12539 * gdbarch.h: Re-generated.
12540 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12541 readable_regcache.
12542 * ia64-tdep.c (ia64_read_pc): Likewise.
12543 * mips-tdep.c (mips_read_pc): Likewise.
12544 * spu-tdep.c (spu_read_pc): Likewise.
12545
12546 2018-02-21 Yao Qi <yao.qi@linaro.org>
12547
12548 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12549 * regcache-dump.c: New file.
12550 * regcache.c: Move register_dump to regcache-dump.c.
12551 (maintenance_print_registers): Likewise.
12552 (maintenance_print_raw_registers): Likewise.
12553 (maintenance_print_cooked_registers): Likewise.
12554 (maintenance_print_register_groups): Likewise.
12555 (maintenance_print_remote_registers): Likewise.
12556 (_initialize_regcache): Likewise.
12557 * regcache.h (register_dump): Moved from regcache.c.
12558
12559 2018-02-21 Yao Qi <yao.qi@linaro.org>
12560
12561 * regcache.c (regcache::regcache): Update.
12562 (regcache::invalidate): Move it to detached_regcache::invalidate.
12563 (get_thread_arch_aspace_regcache): Update.
12564 (regcache::raw_update): Update.
12565 (regcache::cooked_read): Remove some code.
12566 (regcache::cooked_read_value): Likewise.
12567 (regcache::raw_write): Remove assert on m_readonly_p.
12568 (regcache::raw_supply_integer): Move it to
12569 detached_regcache::raw_supply_integer.
12570 (regcache::raw_supply_zeroed): Likewise.
12571 * regcache.h (detached_regcache) <raw_supply_integer>: New
12572 declaration.
12573 <raw_supply_zeroed, invalidate>: Likewise.
12574 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12575 <invalidate>: Likewise.
12576 <m_readonly_p>: Removed.
12577
12578 2018-02-21 Yao Qi <yao.qi@linaro.org>
12579
12580 * infcmd.c (get_return_value): Let stop_regs point to
12581 get_current_regcache.
12582 * regcache.c (regcache::regcache): Remove.
12583 (register_dump_reg_buffer): New class.
12584 (regcache_print): Adjust.
12585 * regcache.h (regcache): Remove constructors.
12586
12587 2018-02-21 Yao Qi <yao.qi@linaro.org>
12588
12589 * regcache.c (class register_dump): New class.
12590 (register_dump_regcache, register_dump_none): New class.
12591 (register_dump_remote, register_dump_groups): New class.
12592 (regcache_print): Update.
12593 * regcache.h (regcache_dump_what): Move it to regcache.c.
12594 (regcache) <dump>: Remove.
12595
12596 2018-02-21 Yao Qi <yao.qi@linaro.org>
12597
12598 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12599 reg_buffer_rw *.
12600 (jit_unwind_reg_set_impl): Call raw_supply.
12601 (jit_frame_sniffer): Use reg_buffer_rw.
12602 * record-full.c (record_full_core_regbuf): Change its type.
12603 (record_full_core_open_1): Use reg_buffer_rw.
12604 (record_full_close): Likewise.
12605 (record_full_core_fetch_registers): Use regcache->raw_supply.
12606 (record_full_core_store_registers): Likewise.
12607 * regcache.c (regcache::get_register_status): Move it to
12608 reg_buffer.
12609 (regcache_raw_set_cached_value): Remove.
12610 (regcache::raw_set_cached_value): Remove.
12611 (regcache::raw_write): Call raw_supply.
12612 (regcache::raw_supply): Move it to reg_buffer_rw.
12613 * regcache.h (regcache_raw_set_cached_value): Remove.
12614 (reg_buffer_rw): New class.
12615
12616 2018-02-21 Yao Qi <yao.qi@linaro.org>
12617
12618 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12619 readonly_detached_regcache.
12620 (dummy_frame_prev_register): Use regcache->cooked_read.
12621 * frame.c (frame_save_as_regcache): Change return type.
12622 (frame_pop): Update.
12623 * frame.h (frame_save_as_regcache): Update declaration.
12624 * inferior.h (get_infcall_suspend_state_regcache): Update
12625 declaration.
12626 * infrun.c (infcall_suspend_state) <registers>: use
12627 readonly_detached_regcache.
12628 (save_infcall_suspend_state): Don't use regcache_dup.
12629 (get_infcall_suspend_state_regcache): Change return type.
12630 * linux-fork.c (struct fork_info) <savedregs>: Change to
12631 readonly_detached_regcache.
12632 <pc>: New field.
12633 (fork_save_infrun_state): Don't use regcache_dup.
12634 (info_checkpoints_command): Adjust.
12635 * mi/mi-main.c (register_changed_p): Update declaration.
12636 (mi_cmd_data_list_changed_registers): Use
12637 readonly_detached_regcache.
12638 (register_changed_p): Change parameter type to
12639 readonly_detached_regcache.
12640 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12641 readonly_detached_regcache.
12642 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12643 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12644 New.
12645 (regcache::save): Move it to reg_buffer.
12646 (regcache::restore): Change parameter type.
12647 (regcache_dup): Remove.
12648 * regcache.h (reg_buffer) <save>: New method.
12649 (readonly_detached_regcache): New class.
12650 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12651 readonly_detached_regcache.
12652 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12653
12654 2018-02-21 Yao Qi <yao.qi@linaro.org>
12655
12656 * frame.c (frame_save_as_regcache): Use regcache method save.
12657 (frame_pop): Use regcache method restore.
12658 * infrun.c (restore_infcall_suspend_state): Likewise.
12659 * linux-fork.c (fork_load_infrun_state): Likewise.
12660 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12661 save.
12662 * regcache.c (regcache_save): Remove.
12663 (regcache::restore): More asserts.
12664 (regcache_cpy): Remove.
12665 * regcache.h (regcache_save): Remove the declaration.
12666 (regcache::restore): Move from private to public.
12667 Remove the friend declaration of regcache_cpy.
12668 (regcache_cpy): Remove declaration.
12669
12670 2018-02-21 Yao Qi <yao.qi@linaro.org>
12671
12672 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12673 parameter type to 'readable_regcache *'.
12674 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12675 * arm-tdep.c (arm_neon_quad_read): Likewise.
12676 (arm_pseudo_read): Likewise.
12677 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12678 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12679 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12680 * gdbarch.c: Re-generated.
12681 * gdbarch.h: Re-generated.
12682 * gdbarch.sh (pseudo_register_read): Change parameter type to
12683 'readable_regcache *'.
12684 (pseudo_register_read_value): Likewise.
12685 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12686 (h8300_pseudo_register_read): Likewise.
12687 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12688 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12689 (i386_pseudo_register_read_into_value): Likewise.
12690 (i386_pseudo_register_read_value): Likewise.
12691 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12692 declaration.
12693 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12694 * m32c-tdep.c (m32c_raw_read): Likewise.
12695 (m32c_read_flg): Likewise.
12696 (m32c_banked_register): Likewise.
12697 (m32c_banked_read): Likewise.
12698 (m32c_sb_read): Likewise.
12699 (m32c_part_read): Likewise.
12700 (m32c_cat_read): Likewise.
12701 (m32c_r3r2r1r0_read): Likewise.
12702 (m32c_pseudo_register_read): Likewise.
12703 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12704 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12705 (mep_pseudo_cr64_read): Likewise.
12706 (mep_pseudo_register_read): Likewise.
12707 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12708 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12709 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12710 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12711 (regcache::cooked_read): Likewise.
12712 (regcache::cooked_read_value): Likewise.
12713 (regcache_cooked_read_signed):
12714 (regcache::cooked_read): Likewise.
12715 * regcache.h (readable_regcache): New class.
12716 (regcache): Inherit readable_regcache. Move some methods to
12717 readable_regcache.
12718 * rl78-tdep.c (rl78_pseudo_register_read): Change
12719 parameter type to 'readable_regcache *'.
12720 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12721 (e500_pseudo_register_read): Change parameter type to
12722 'readable_regcache *'.
12723 (dfp_pseudo_register_read): Likewise.
12724 (vsx_pseudo_register_read): Likewise.
12725 (efpr_pseudo_register_read): Likewise.
12726 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12727 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12728 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12729 (sh64_pseudo_register_read): Likewise.
12730 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12731 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12732 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12733 (spu_pseudo_register_read): Likewise.
12734 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12735 (xtensa_pseudo_register_read): Likewise.
12736
12737 2018-02-21 Yao Qi <yao.qi@linaro.org>
12738
12739 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12740 (regcache::arch): Move it to reg_buffer::arch.
12741 (regcache::register_buffer): Likewise.
12742 (regcache::assert_regnum): Likewise.
12743 (regcache::num_raw_registers): Likewise.
12744 * regcache.h (reg_buffer): New class.
12745 (regcache): Inherit reg_buffer.
12746
12747 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12748
12749 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12750 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12751
12752 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12753
12754 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12755
12756 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12757
12758 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12759 (SFILES): Remove common/*.c files.
12760 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12761 * common/common.host: Add common reference.
12762 * configure.ac: Likewise.
12763 * configure: Regenerate.
12764
12765 2018-02-16 Yao Qi <yao.qi@linaro.org>
12766
12767 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12768 (block_initialize_namespace): Use new.
12769 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12770 (dwarf2_free_objfile): Use delete.
12771 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12772 (copy_type_recursive): Use new.
12773 * gdb_obstack.h (allocate_on_obstack): New.
12774
12775 2018-02-15 Yao Qi <yao.qi@linaro.org>
12776
12777 PR gdb/22849
12778 * inferior.c (exit_inferior_1): Reset inf->control.
12779
12780 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12781
12782 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12783 declaration.
12784
12785 2018-02-14 Pedro Alves <palves@redhat.com>
12786
12787 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12788 frame_cleanup_after_sniffer on exception.
12789
12790 2018-02-14 Tom Tromey <tom@tromey.com>
12791
12792 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12793 const.
12794 (solib_bfd_open): Make pathname const.
12795 * solib.c (solib_bfd_open): Make pathname const.
12796 * solib-spu.c (spu_bfd_fopen): Make name const.
12797 (spu_bfd_open): Make pathname const.
12798 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12799 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12800
12801 2018-02-14 Tom Tromey <tom@tromey.com>
12802
12803 * symfile.c (symfile_bfd_open): Update.
12804 * source.h (openp, source_full_path_of, find_and_open_source):
12805 Change argument type to unique_xmalloc_ptr.
12806 * source.c (openp): Take a unique_xmalloc_ptr.
12807 (source_full_path_of, find_and_open_source): Likewise.
12808 (open_source_file, symtab_to_fullname): Update.
12809 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12810 unique_xmalloc_ptr.
12811 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12812 (exec_file_find): Update.
12813 * psymtab.c (psymtab_to_fullname): Update.
12814 * nto-tdep.h (nto_find_and_open_solib): Update.
12815 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12816 unique_xmalloc_ptr.
12817 * exec.c (exec_file_attach): Update.
12818 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12819 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12820
12821 2018-02-14 Tom Tromey <tom@tromey.com>
12822
12823 * solib.c: Include source.h.
12824 * nto-tdep.c: Include source.h.
12825 * mi/mi-cmd-env.c: Include source.h.
12826 * infcmd.c: Include source.h.
12827 * exec.c: Include source.h.
12828 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12829 (add_path, directory_switch, source_path, init_source_path): Move
12830 declarations...
12831 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12832 (add_path, directory_switch, source_path, init_source_path):
12833 ...here.
12834
12835 2018-02-14 Tom Tromey <tom@tromey.com>
12836
12837 * solist.h (exec_file_find, solib_find): Return
12838 unique_xmalloc_ptr.
12839 (solib_bfd_fopen): Take a const char *.
12840 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12841 (exec_file_find, solib_find): Likewise.
12842 (solib_bfd_fopen): Do not take ownership of "pathname".
12843 (solib_bfd_open): Use unique_xmalloc_ptr.
12844 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12845 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12846 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12847 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12848
12849 2018-02-14 Joel Brobecker <brobecker@adacore.com>
12850
12851 * ada-lang.c (name_match_type_from_name): Remove reference to
12852 ada_name_for_lookup in function's documentation.
12853 * ada-lang.h (ada_name_for_lookup): Delete declaration.
12854
12855 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12856
12857 * defs.h (enum openp_flags): New enum.
12858 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12859 Move to enum openp_flags.
12860 (openp_flags): New enum flags.
12861 (openp): Change parameter type to openp_flags.
12862 * source.c (openp): Change parameter type to openp_flags.
12863 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12864 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12865
12866 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
12867
12868 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12869 per-command.
12870
12871 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
12872
12873 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12874 into...
12875 (class dwarf2_queue_guard): ...the destructor of this new class.
12876 (dw2_do_instantiate_symtab): Create instance of the new class
12877 dwarf2_queue_guard, remove cleanup.
12878
12879 2018-02-09 Tom Tromey <tom@tromey.com>
12880
12881 * source.c (find_source_lines): Don't reference past the end of
12882 the vector.
12883
12884 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12885
12886 * remote.c (remote_btrace_maybe_reopen): Change error message.
12887 * btrace.c (btrace_enable): Likewise.
12888 (parse_xml_btrace): Likewise.
12889 (parse_xml_btrace_conf): Likewise.
12890
12891 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12892
12893 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12894 (linux_enable_pt, linux_enable_bts): Call
12895 diagnose_perf_event_open_fail.
12896
12897 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12898
12899 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12900 Remove parameter and change return type. Update callers. Move it.
12901 (linux_enable_bts, linux_enable_pt): Improve error message.
12902 (linux_enable_pt): Remove zero buffer size check.
12903 (linux_enable_btrace): Improve error messages. Remove NULL return
12904 check.
12905
12906 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12907
12908 * btrace.c (btrace_enable): Remove target_supports_btrace call.
12909 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12910 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12911 (linux_supports_pt, linux_supports_btrace): Remove.
12912 (linux_enable_bts): Call cpu_supports_bts.
12913 * nat/linux-btrace.h (linux_supports_btrace): Remove.
12914 * remote.c (remote_supports_btrace): Remove.
12915 (init_remote_ops): Remove remote_supports_btrace.
12916 * target-delegates.c: Regenerated.
12917 * target.c (target_supports_btrace): Remove.
12918 * target.h (target_ops) <to_supports_btrace>: Remove
12919 (target_supports_btrace): Remove.
12920 * x86-linux-nat.c (x86_linux_create_target): Remove
12921 linux_supports_btrace.
12922
12923 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12924
12925 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12926 btrace failed.
12927 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12928 exception and use message in own exception.
12929
12930 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12931
12932 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12933 (perf_event_pt_event_type): Use gdb_file_up.
12934 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12935 scoped_fd, and scoped_mmap.
12936
12937 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12938
12939 * common/scoped_mmap.h: New.
12940 * unittests/scoped_mmap-selftest.c: New.
12941 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12942 unittests/scoped_mmap-selftest.c.
12943
12944 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
12945
12946 * common/scoped_fd.h: New.
12947 * unittests/scoped_fd-selftest.c: New.
12948 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12949 unittests/scoped_fd-selftest.c.
12950
12951 2018-02-09 Tom Tromey <tom@tromey.com>
12952
12953 * auto-load.c (auto_load_section_scripts): Use
12954 gdb::unique_xmalloc_ptr.
12955
12956 2018-02-09 Tom Tromey <tom@tromey.com>
12957
12958 * auto-load.c (execute_script_contents): Use std::string.
12959
12960 2018-02-09 Joel Brobecker <brobecker@adacore.com>
12961
12962 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12963 Python function, rather than a new command.
12964
12965 2018-02-08 Tom Tromey <tom@tromey.com>
12966
12967 * solib.c (solib_find_1): Use std::string.
12968 (solib_bfd_fopen): Use unique_xmalloc_ptr.
12969
12970 2018-02-08 Tom Tromey <tom@tromey.com>
12971
12972 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12973
12974 2018-02-08 Tom Tromey <tom@tromey.com>
12975
12976 * source.c (find_source_lines): Use gdb::def_vector.
12977
12978 2018-02-08 Tom Tromey <tom@tromey.com>
12979
12980 * macrocmd.c (struct temporary_macro_definition): New.
12981 (macro_define_command): Use temporary_macro_definition. Remove
12982 cleanups.
12983 (free_macro_definition_ptr): Remove.
12984
12985 2018-02-08 Tom Tromey <tom@tromey.com>
12986
12987 * macroexp.c (maybe_expand): Use std::string.
12988
12989 2018-02-08 Tom Tromey <tom@tromey.com>
12990
12991 * macroexp.c (struct macro_buffer): Add initializers for some
12992 members.
12993 (init_buffer, init_shared_buffer, free_buffer)
12994 (free_buffer_return_text): Remove.
12995 (macro_buffer): New constructors.
12996 (~macro_buffer): New destructor.
12997 (macro_buffer::set_shared): New method.
12998 (macro_buffer::resize_buffer, macro_buffer::appendc)
12999 (macro_buffer::appendmem): Now methods, not free functions.
13000 (set_token, append_tokens_without_splicing, stringify)
13001 (macro_stringify): Update.
13002 (gather_arguments): Change return type. Remove argc_p argument,
13003 add args_ptr argument. Use std::vector.
13004 (substitute_args): Remove argc argument. Accept std::vector.
13005 (expand): Update. Use std::vector.
13006 (scan, macro_expand, macro_expand_next): Update.
13007
13008 2018-02-08 Tom Tromey <tom@tromey.com>
13009
13010 * symtab.c (default_collect_symbol_completion_matches_break_on):
13011 Use unique_xmalloc_ptr.
13012 * macroscope.h: (sal_macro_scope, user_macro_scope)
13013 (default_macro_scope): Return unique_xmalloc_ptr.
13014 * macroscope.c (sal_macro_scope, user_macro_scope)
13015 (default_macro_scope): Return unique_xmalloc_ptr.
13016 * macroexp.h (macro_expand, macro_expand_once): Return
13017 unique_xmalloc_ptr.
13018 * macroexp.c (macro_expand, macro_expand_once): Return
13019 unique_xmalloc_ptr.
13020 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13021 (info_macro_command, info_macros_command): Use
13022 unique_xmalloc_ptr.
13023 * compile/compile-c-support.c (write_macro_definitions): Use
13024 unique_xmalloc_ptr.
13025 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13026
13027 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13028
13029 * value.c (value_static_field): Assign field type instead of
13030 containing type when returning an optimized out value.
13031
13032 2018-02-06 Yao Qi <yao.qi@linaro.org>
13033
13034 * ft32-tdep.c (ft32_read_pc): Remove.
13035 (ft32_write_pc): Remove.
13036 (ft32_gdbarch_init): Update.
13037 * m32r-tdep.c (m32r_read_pc): Remove.
13038 (m32r_gdbarch_init): Update.
13039 * mep-tdep.c (mep_read_pc): Remove.
13040 (mep_gdbarch_init): Update.
13041 * microblaze-tdep.c (microblaze_write_pc): Remove.
13042 (microblaze_gdbarch_init): Update.
13043 * mn10300-tdep.c (mn10300_read_pc): Remove.
13044 (mn10300_write_pc): Remove.
13045 (mn10300_gdbarch_init): Update.
13046 * moxie-tdep.c (moxie_read_pc): Remove.
13047 (moxie_write_pc): Remove.
13048 (moxie_gdbarch_init): Update.
13049
13050 2018-02-06 Yao Qi <yao.qi@linaro.org>
13051
13052 * expprint.c (print_subexp_standard): Handle
13053 OP_F77_UNDETERMINED_ARGLIST.
13054 (dump_subexp_body_standard): Likewise.
13055
13056 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13057
13058 * target-descriptions.c (tdesc_element_visitor) Add empty
13059 implementations.
13060 (tdesc_type): Move make_gdb_type from here.
13061 (tdesc_type_builtin): Likewise.
13062 (tdesc_type_vector): Likewise.
13063 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13064 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13065 (make_gdb_type_union): Likewise.
13066 (make_gdb_type_flags): Likewise.
13067 (make_gdb_type_enum): Likewise.
13068 (make_gdb_type): New function.
13069 (tdesc_register_type): Use static make_gdb_type.
13070
13071 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13072
13073 * infcmd.c (default_print_one_register_info): Align natural-format
13074 column values consistently one under another.
13075 (pad_to_column): New function.
13076
13077 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13078
13079 * dwarf2read.c (dwarf2_physname): Move commment.
13080
13081 2018-02-01 Leszek Swirski <leszeks@google.com>
13082
13083 * varobj.c (varobj_formatted_print_options): Allow recursive
13084 pretty printing if pretty printing is enabled.
13085
13086 2018-02-01 Leszek Swirski <leszeks@google.com>
13087
13088 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13089 names after a structop as a filename.
13090
13091 2018-02-01 Yao Qi <yao.qi@linaro.org>
13092
13093 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13094 (arm_record_coproc_data_proc): Likewise.
13095
13096 2018-02-01 Yao Qi <yao.qi@linaro.org>
13097
13098 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13099
13100 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13101
13102 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13103 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13104
13105 2018-01-31 Pedro Alves <palves@redhat.com>
13106
13107 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13108 * inflow.c (child_terminal_save_inferior): Wrap reference to
13109 tcgetpgrp in HAVE_TERMIOS_H.
13110 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13111 _WIN32.
13112 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13113 always iterate over all inferiors.
13114 (gdbsim_cntrl_c): Adjust.
13115 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13116
13117 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13118
13119 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13120 index type is objfile-owned if the element type is as well.
13121
13122 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13123
13124 GDB 8.1 released.
13125
13126 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13127
13128 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13129 "features/s390x-linux64.c".
13130 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13131 s390_linux32 and s390x_linux64.
13132 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13133 default tdesc.
13134 * s390-tdep.c: Include "features/s390-linux32.c" and
13135 "features/s390x-linux64.c".
13136 (s390_tdesc_valid): Add check for tdesc_has_registers.
13137 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13138 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13139 tdesc_s390x_linux64.
13140 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13141 tdesc_s390x_linux64 to...
13142 * s390-tdep.h: ...here.
13143
13144 2018-01-30 Pedro Alves <palves@redhat.com>
13145
13146 PR gdb/13211
13147 * config.in, configure: Regenerate.
13148 * configure.ac: Check for getpgid.
13149 * go32-nat.c (go32_pass_ctrlc): New.
13150 (go32_target): Install it.
13151 * inf-child.c (inf_child_target): Install
13152 child_terminal_save_inferior, child_pass_ctrlc and
13153 child_interrupt.
13154 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13155 (inf_ptrace_target): No longer install it.
13156 * infcmd.c (interrupt_target_1): Adjust.
13157 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13158 (child_interrupt): Declare.
13159 (inferior::terminal_state): New.
13160 * inflow.c (struct terminal_info): Update comments.
13161 (inferior_process_group): Delete.
13162 (terminal_is_ours): Delete.
13163 (gdb_tty_state): New.
13164 (child_terminal_init): Adjust.
13165 (is_gdb_terminal, sharing_input_terminal_1)
13166 (sharing_input_terminal): New functions.
13167 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13168 Set the process's actual process group in the foreground if
13169 possible. Handle is_ours_for_output/is_ours distinction. Don't
13170 mark terminal as the inferior's if not sharing GDB's terminal.
13171 Don't check attach_flag.
13172 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13173 pass down a target_terminal_state.
13174 (child_terminal_save_inferior): New, factored out from ...
13175 (child_terminal_ours_1): ... this. Handle
13176 target_terminal_state::is_ours_for_output.
13177 (child_interrupt, child_pass_ctrlc): New.
13178 (inflow_inferior_exit): Clear the inferior's terminal_state.
13179 (copy_terminal_info): Copy the inferior's terminal state.
13180 (_initialize_inflow): Remove reference to terminal_is_ours.
13181 * inflow.h (inferior_process_group): Delete.
13182 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13183 * procfs.c (procfs_target): Don't install procfs_interrupt.
13184 (procfs_interrupt): Delete.
13185 * remote.c (remote_serial_quit_handler): Adjust.
13186 (remote_interrupt): Remove ptid parameter. Adjust.
13187 * target-delegates.c: Regenerate.
13188 * target.c: Include "terminal.h".
13189 (target_terminal::terminal_state): Rename to ...
13190 (target_terminal::m_terminal_state): ... this.
13191 (target_terminal::init): Adjust.
13192 (target_terminal::inferior): Adjust to per-inferior
13193 terminal_state.
13194 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13195 (target_terminal::ours, target_terminal::ours_for_output): Use
13196 target_terminal_is_ours_kind.
13197 (target_interrupt): Remove ptid parameter. Adjust.
13198 (default_target_pass_ctrlc): Adjust.
13199 * target.h (target_ops::to_terminal_save_inferior): New field.
13200 (target_ops::to_interrupt): Remove ptid_t parameter.
13201 (target_interrupt): Remove ptid_t parameter. Update comment.
13202 (target_pass_ctrlc): Update comment.
13203 * target/target.h (target_terminal_state): New scoped enum,
13204 factored out of ...
13205 (target_terminal::terminal_state): ... here.
13206 (target_terminal::inferior): Update comments.
13207 (target_terminal::restore_inferior): New.
13208 (target_terminal::is_inferior, target_terminal::is_ours)
13209 (target_terminal::is_ours_for_output): Adjust.
13210 (target_terminal::scoped_restore_terminal_state): Adjust to
13211 rename, and call restore_inferior() instead of inferior().
13212 (target_terminal::scoped_restore_terminal_state::m_state): Change
13213 type.
13214 (target_terminal::terminal_state): Rename to ...
13215 (target_terminal::m_terminal_state): ... this and change type.
13216
13217 2018-01-30 Pedro Alves <palves@redhat.com>
13218
13219 * linux-nat.c (wait_for_signal): New function.
13220 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13221 directly.
13222 (async_terminal_is_ours)
13223 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13224 (linux_nat_add_target): Don't override
13225 to_terminal_inferior/to_terminal_ours.
13226
13227 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13228
13229 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13230
13231 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13232
13233 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13234 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13235 dwarf2_per_objfile_free here.
13236 (dwarf2_per_objfile_free): Remove.
13237 (_initialize_dwarf2_read): Don't register
13238 dwarf2_per_objfile_free as a registry cleanup.
13239
13240 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13241
13242 Avoid compilation errors in MinGW native builds
13243
13244 The error is triggered by including python-internal.h, and the
13245 error message is:
13246
13247 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13248 from build-gnulib/import/math.h:27,
13249 from d:/usr/Python26/include/pyport.h:235,
13250 from d:/usr/Python26/include/Python.h:58,
13251 from python/python-internal.h:94,
13252 from python/py-arch.c:24:
13253 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13254 using ::hypot;
13255 ^~~~~
13256
13257 This happens because Python headers define 'hypot' to expand t
13258 '_hypot' in the Windows builds.
13259 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13260 'hypoth'. This avoids a compilation error.
13261
13262 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13263
13264 * MAINTAINERS (Write After Approval): Fix ordering.
13265
13266 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13267
13268 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13269
13270 2018-01-26 Alan Modra <amodra@gmail.com>
13271
13272 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13273 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13274 Remove nop. Make const. Comment.
13275 (powerpc32_plt_stub_so_2): New.
13276 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13277 Correct count. Update uses.
13278 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13279 Move common code reading PLT entry word. Correct
13280 powerpc32_plt_stub PLT address calculation.
13281 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13282 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13283 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13284 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13285 (ppc64_standard_linkage8): Likewise.
13286 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13287 Correct insns description.
13288 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13289
13290 2018-01-24 Pedro Alves <palves@redhat.com>
13291
13292 GCC PR libstdc++/83906
13293 * gdbtypes.c (operator==(const dynamic_prop &,
13294 const dynamic_prop &)): New.
13295 (operator==(const range_bounds &, const range_bounds &)): New.
13296 (check_types_equal): Use them instead of memcmp.
13297 * gdbtypes.h (operator==(const dynamic_prop &,
13298 const dynamic_prop &)): Declare.
13299 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13300 (operator==(const range_bounds &, const range_bounds &)): Declare.
13301 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13302
13303 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13304
13305 * s390-linux-tdep.c (s390_record_address_mask)
13306 (s390_record_calc_disp_common, s390_record_calc_disp)
13307 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13308 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13309 (s390_process_record): Move to s390-tdep.c.
13310 (s390_linux_init_abi_any): Adjust.
13311 * s390-tdep.c (s390_record_address_mask)
13312 (s390_record_calc_disp_common, s390_record_calc_disp)
13313 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13314 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13315 (s390_process_record): Moved from s390-linux-tdep.c
13316 (s390_gdbarch_init): Adjust.
13317
13318 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13319
13320 * s390-linux-nat.c (s390-tdep.h): New include.
13321 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13322 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13323 (ALLDEPFILES): Add s390-tdep.c.
13324 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13325 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13326 * s390-tdep.h: ...this. New file.
13327 * s390-linux-tdep.c (s390-tdep.h): New include.
13328 (_initialize_s390_tdep): Rename to...
13329 (_initialize_s390_linux_tdep): ...this and adjust.
13330 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13331 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13332 s390-tdep.h.
13333 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13334 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13335 (s390_is_partial_instruction, s390_software_single_step)
13336 (is_non_branch_ril, s390_displaced_step_copy_insn)
13337 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13338 (s390_prologue_data, s390_addr, s390_store, s390_load)
13339 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13340 (s390_register_call_saved, s390_guess_tracepoint_registers)
13341 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13342 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13343 (s390_pseudo_register_name, s390_pseudo_register_type)
13344 (s390_pseudo_register_read, s390_pseudo_register_write)
13345 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13346 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13347 (s390_addr_bits_remove, s390_address_class_type_flags)
13348 (s390_address_class_type_flags_to_name)
13349 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13350 (s390_function_arg_float, s390_function_arg_vector)
13351 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13352 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13353 (s390_frame_align, s390_register_return_value, s390_return_value)
13354 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13355 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13356 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13357 (s390_trad_frame_prev_register, s390_unwind_cache)
13358 (s390_prologue_frame_unwind_cache)
13359 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13360 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13361 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13362 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13363 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13364 (s390_frame_base_address, s390_local_base_address)
13365 (s390_frame_base, s390_gcc_target_options)
13366 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13367 (s390_validate_reg_range, s390_tdesc_valid)
13368 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13369 * s390-tdep.c: ...this. New file.
13370
13371 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13372
13373 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13374 (s390_process_record, s390_gdbarch_tdep_alloc)
13375 (s390_linux_init_abi_any): Use/set new hook.
13376
13377 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13378
13379 * s390-linux-tdep.c (osabi.h): New include.
13380 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13381 (s390_linux_init_abi_any): New functions.
13382 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13383
13384 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13385
13386 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13387 tdesc_has_registers check
13388
13389 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13390
13391 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13392 (s390_validate_reg_range): New macro.
13393 (s390_gdbarch_init): Adjust.
13394
13395 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13396
13397 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13398 (s390_gdbarch_tdep_alloc): Adjust.
13399 (s390_gdbarch_init): Adjust.
13400
13401 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13402
13403 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13404 <have_tdb>: Change type to bool.
13405 (s390_gdbarch_tdep_alloc): Adjust.
13406 (s390_gdbarch_init): Adjust.
13407
13408 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13409
13410 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13411 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13412 (s390_gdbarch_tdep_alloc): New function.
13413 (s390_gdbarch_init): Allocate tdep at start and use its fields
13414 instead of separate variables.
13415
13416 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13417
13418 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13419 when looking for cached gdbarch and add comment for remaining.
13420
13421 2018-01-22 Pedro Alves <palves@redhat.com>
13422 Sergio Durigan Junior <sergiodj@redhat.com>
13423
13424 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13425 case.
13426
13427 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13428
13429 * MAINTAINERS: Update my company e-mail address.
13430
13431 2018-01-22 Yao Qi <yao.qi@linaro.org>
13432
13433 * regcache.c (cooked_write_test): New function.
13434 (_initialize_regcache): Register the test.
13435
13436 2018-01-22 Yao Qi <yao.qi@linaro.org>
13437
13438 * ia64-tdep.c (ia64_pseudo_register_read): Call
13439 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13440 * m32c-tdep.c (m32c_cat_read): Likewise.
13441 (m32c_r3r2r1r0_read): Likewise.
13442 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13443 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13444
13445 2018-01-22 Yao Qi <yao.qi@linaro.org>
13446
13447 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13448 method raw_read instead of regcache_raw_read.
13449 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13450 * arm-tdep.c (arm_neon_quad_read): Likewise.
13451 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13452 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13453 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13454 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13455 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13456 (i386_pseudo_register_read_into_value): Likewise.
13457 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13458 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13459 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13460 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13461 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13462 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13463 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13464 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13465 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13466
13467 2018-01-22 Yao Qi <yao.qi@linaro.org>
13468
13469 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13470 * configure.tgt: Remove target mt.
13471 * mt-tdep.c: Remove.
13472 * regcache.c (cooked_read_test): Remove the check for mt.
13473
13474 2018-01-22 Yao Qi <yao.qi@linaro.org>
13475
13476 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13477 instead of gdbarch_pseudo_register_read_value.
13478
13479 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13480
13481 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13482 language is Ada.
13483
13484 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13485
13486 * linespec.c (create_sals_line_offset): Remove code that preserved
13487 the symtab_and_line's line number.
13488
13489 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13490
13491 * varobj.c (varobj_create): Don't set valid_block when creating a
13492 floating varobj.
13493
13494 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13495
13496 * varobj.c (varobj_create): Remove out of date comment.
13497
13498 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13499
13500 PR mi/20395
13501 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13502 updating innermost block.
13503 * parse.c (innermost_block_tracker::update): Take extra type
13504 parameter, and check types match before updating innermost block.
13505 (write_dollar_variable): Update innermost block for registers.
13506 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13507 (innermost_block_tracker::innermost_block_tracker): Initialise
13508 m_types member.
13509 (innermost_block_tracker::reset): Take type parameter.
13510 (innermost_block_tracker::update): Take type parameter, and pass
13511 type through as needed.
13512 (innermost_block_tracker::m_types): New member.
13513 * varobj.c (varobj_create): Pass type when reseting innermost
13514 block.
13515
13516 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13517
13518 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13519 * ada-lang.c (resolve_subexp): Likewise.
13520 * breakpoint.c (set_breakpoint_condition) Likewise.
13521 (watch_command_1) Likewise.
13522 * c-exp.y (variable): Likewise.
13523 * d-exp.y (PrimaryExpression): Likewise.
13524 * f-exp.y (variable): Likewise.
13525 * go-exp.y (variable): Likewise.
13526 * m2-exp.y (variable): Likewise.
13527 * objfiles.c (objfile::~objfile): Likewise.
13528 * p-exp.y (variable): Likewise.
13529 * parse.c (innermost_block): Change type.
13530 * parser-defs.h (class innermost_block_tracker): New.
13531 (innermost_block): Change to innermost_block_tracker.
13532 * printcmd.c (display_command): Switch to innermost_block API.
13533 (do_one_display): Likewise.
13534 * rust-exp.y (do_one_display): Likewise.
13535 * symfile.c (clear_symtab_users): Likewise.
13536 * varobj.c (varobj_create): Switch to innermost_block API, replace
13537 use of innermost_block with block stored on varobj object.
13538
13539 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13540
13541 * expression.h (innermost_block): Remove declaration.
13542 * varobj.c: Add 'parser-defs.h' include.
13543
13544 2018-01-19 Tom Tromey <tom@tromey.com>
13545
13546 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13547 symbols in the static and global blocks.
13548
13549 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13550
13551 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13552 gdb_ptrace.h, and move including gdb_wait.h ...
13553 * nat/linux-ptrace.h: ... to here.
13554
13555 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13556
13557 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13558 inf_ptrace_detach_success.
13559 (inf_ptrace_detach_success): Add inferior parameter, use it
13560 instead of inferior_ptid, pass it to detach_inferior.
13561 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13562 parameter.
13563 * inferior.c (detach_inferior): Add overload that takes an
13564 inferior object.
13565 * inferior.h (detach_inferior): Likewise.
13566 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13567 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13568 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13569
13570 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13571
13572 * target.h (struct target_ops) <to_detach>: Add inferior
13573 parameter.
13574 (target_detach): Likewise.
13575 * target.c (dispose_inferior): Pass inferior down.
13576 (target_detach): Pass inferior down. Assert that it is equal to
13577 the current inferior.
13578 * aix-thread.c (aix_thread_detach): Pass inferior down.
13579 * corefile.c (core_file_command): Pass current_inferior() down.
13580 * corelow.c (core_detach): Add inferior parameter.
13581 * darwin-nat.c (darwin_detach): Likewise.
13582 * gnu-nat.c (gnu_detach): Likewise.
13583 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13584 * infcmd.c (detach_command): Pass current_inferior() down to
13585 target_detach.
13586 * infrun.c (follow_fork_inferior): Pass parent_inf to
13587 target_detach.
13588 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13589 target_detach.
13590 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13591 * linux-thread-db.c (thread_db_detach): Likewise.
13592 * nto-procfs.c (procfs_detach): Likewise.
13593 * procfs.c (procfs_detach): Likewise.
13594 * record.c (record_detach): Likewise.
13595 * record.h (struct inferior): Forward-declare.
13596 (record_detach): Add inferior parameter.
13597 * remote-sim.c (gdbsim_detach): Likewise.
13598 * remote.c (remote_detach_1): Likewise.
13599 (remote_detach): Likewise.
13600 (extended_remote_detach): Likewise.
13601 * sol-thread.c (sol_thread_detach): Likewise.
13602 * target-debug.h (target_debug_print_inferior_p): New macro.
13603 * target-delegates.c: Re-generate.
13604 * top.c (kill_or_detach): Pass inferior down to target_detach.
13605 * windows-nat.c (windows_detach): Add inferior parameter.
13606
13607 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13608
13609 * target.h (struct target_ops) <to_detach>: Remove args
13610 parameter.
13611 (target_detach): Likewise.
13612 * target.c (dispose_inferior): Adjust.
13613 (target_detach): Remove args parameter, adjust.
13614 * aix-thread.c (aix_thread_detach): Adjust.
13615 * corefile.c (core_file_command): Adjust.
13616 * corelow.c (core_detach): Adjust.
13617 * darwin-nat.c (darwin_detach): Adjust.
13618 * gnu-nat.c (gnu_detach): Adjust.
13619 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13620 * infcmd.c (detach_command): Adjust
13621 * infrun.c (follow_fork_inferior): Adjust.
13622 (handle_vfork_child_exec_or_exit): Adjust.
13623 * linux-fork.c (linux_fork_detach): Remove args parameter.
13624 * linux-fork.h (linux_fork_detach): Likewise.
13625 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13626 * linux-thread-db.c (thread_db_detach): Likewise.
13627 * nto-procfs.c (procfs_detach): Likewise.
13628 * procfs.c (procfs_detach): Likewise.
13629 (do_detach): Remove signo parameter.
13630 * record.c (record_detach): Remove args parameter.
13631 * record.h (record_detach): Likewise.
13632 * remote-sim.c (gdbsim_detach): Likewise.
13633 * remote.c (remote_detach_1): Likewise.
13634 (remote_detach): Likewise.
13635 (extended_remote_detach): Likewise.
13636 * sol-thread.c (sol_thread_detach): Likewise.
13637 * target-delegates.c: Re-generate.
13638 * top.c (struct qt_args) <args>: Remove field.
13639 (kill_or_detach): Don't pass args.
13640 (quit_force): Don't set args.
13641 * windows-nat.c (windows_detach): Remove args parameter.
13642
13643 2018-01-19 Yao Qi <yao.qi@linaro.org>
13644
13645 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13646 (arm_linux_init_abi): Install it.
13647
13648 2018-01-19 Yao Qi <yao.qi@linaro.org>
13649
13650 * osabi.c (gdb_osabi_names): Extend the regexp for
13651 arm-linux-gnueabihf.
13652
13653 2018-01-18 Yao Qi <yao.qi@linaro.org>
13654
13655 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13656 m_abbrevs.
13657 (abbrev_table::add_abbrev): Update.
13658 (abbrev_table::lookup_abbrev): Update.
13659
13660 2018-01-18 Yao Qi <yao.qi@linaro.org>
13661
13662 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13663
13664 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13665
13666 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13667 to "std::string".
13668
13669 2018-01-17 Tom Tromey <tom@tromey.com>
13670
13671 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13672
13673 2018-01-17 Tom Tromey <tom@tromey.com>
13674
13675 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13676 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13677 (create_array_type_with_stride): Update.
13678 * dwarf2read.c (set_die_type): Update.
13679
13680 2018-01-17 Tom Tromey <tom@tromey.com>
13681
13682 * dwarf2read.c (delayed_method_info): Remove typedef.
13683 (dwarf2_cu::method_info): Now a std::vector.
13684 (add_to_method_list): Update.
13685 (free_delayed_list): Remove.
13686 (compute_delayed_physnames): Update.
13687 (process_full_comp_unit, process_full_type_unit): Clear the method
13688 list. Remove cleanups.
13689 (psymtab_include_file_name): Add name_holder parameter. Use
13690 unique_xmalloc_ptr.
13691 (dwarf_decode_lines): Update.
13692
13693 2018-01-17 Tom Tromey <tom@tromey.com>
13694 Simon Marchi <simon.marchi@ericsson.com>
13695
13696 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13697 (dwarf2_per_objfile::free_cached_comp_units)
13698 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13699 (init_cutu_and_read_dies_no_follow): Update.
13700 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13701 (dwarf2_cu::~dwarf2_cu): New.
13702 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13703 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13704
13705 2018-01-17 Tom Tromey <tom@tromey.com>
13706 Simon Marchi <simon.marchi@ericsson.com>
13707
13708 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13709 (struct die_reader_specs) <abbrev_table>: New member.
13710 (struct abbrev_table): Add constructor.
13711 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13712 <abbrev_obstack>: Now an auto_obstack.
13713 (abbrev_table_up): New typedef.
13714 (init_cu_die_reader): Add abbrev_table parameter.
13715 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13716 Add result_dwo_abbrev_table.
13717 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13718 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13719 Update.
13720 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13721 parameter.
13722 (skip_children): Update.
13723 (abbrev_table::alloc_abbrev): Rename from
13724 abbrev_table_alloc_abbrev.
13725 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13726 (abbrev_table::lookup_abbrev): Rename from
13727 abbrev_table_lookup_abbrev.
13728 (abbrev_table_read_table): Return abbrev_table_up.
13729 (abbrev_table_free, abbrev_table_free_cleanup)
13730 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13731 (load_partial_dies): Update.
13732
13733 2018-01-17 Tom Tromey <tom@tromey.com>
13734
13735 * dwarf2read.c (dwarf2_compute_name): Update comment.
13736 (read_func_scope, read_variable): Update.
13737 (new_symbol): Remove.
13738 (new_symbol_full): Rename to new_symbol.
13739
13740 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13741
13742 PR gdb/16577
13743 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13744 a warning instead of throwing an error, set section size to 0 and return
13745 NULL.
13746 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13747
13748 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13749
13750 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13751 std::string.
13752 (linux_ptrace_attach_fail_reason_string): Likewise.
13753 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13754 Likewise.
13755 (linux_ptrace_attach_fail_reason_string): Likewise.
13756 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13757
13758 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13759
13760 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13761
13762 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13763
13764 PR gdb/21559
13765 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13766 checking for fs_base/gs_base fields in struct user_regs_struct.
13767 * configure: Regenerate.
13768
13769 2018-01-17 Yao Qi <yao.qi@linaro.org>
13770
13771 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13772 function.
13773 (aarch64_linux_init_abi): Install it to gdbarch hook
13774 gcc_target_options.
13775
13776 2018-01-15 Pedro Alves <palves@redhat.com>
13777
13778 * common/signals-state-save-restore.c
13779 (save_original_signals_state): Fix typos.
13780
13781 2017-01-12 Tom Tromey <tom@tromey.com>
13782 Sergio Durigan Junior <sergiodj@redhat.com>
13783
13784 * Makefile.in (install-only): Install gdb-add-index.
13785
13786 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13787
13788 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13789
13790 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13791
13792 * infrun.c (keep_going_pass_signal): Clear step-over info when
13793 insert_breakpoints fails.
13794
13795 2018-01-11 Pedro Alves <palves@redhat.com>
13796
13797 PR gdb/22583
13798 * infrun.c (resume): Rename to ...
13799 (resume_1): ... this.
13800 (resume): Reimplement as wrapper around resume_1.
13801
13802 2018-01-11 Pedro Alves <palves@redhat.com>
13803
13804 PR remote/22597
13805 * remote.c (remote_parse_stop_reply): Default to the last-set
13806 general thread instead of to 'magic_null_ptid'.
13807
13808 2018-01-10 Pedro Alves <palves@redhat.com>
13809
13810 * language.h (language_get_symbol_name_matcher): Rename ...
13811 (get_symbol_name_matcher): ... this.
13812 * language.c (language_get_symbol_name_matcher): Ditto.
13813 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13814 callers adjusted.
13815
13816 2018-01-10 Pedro Alves <palves@redhat.com>
13817
13818 PR gdb/22670
13819 * dwarf2read.c
13820 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13821 Adjust to use language_get_symbol_name_matcher instead of
13822 language_defn::la_get_symbol_name_matcher.
13823 * language.c (language_get_symbol_name_matcher): If in Ada mode
13824 and the lookup name is a verbatim match, return Ada's matcher.
13825 * language.h (language_get_symbol_name_matcher): Adjust comment.
13826 (ada_lookup_name_info::verbatim_p):: New method.
13827
13828 2018-01-10 Pedro Alves <palves@redhat.com>
13829
13830 PR gdb/22670
13831 * ada-lang.c (ada_collect_symbol_completion_matches): If the
13832 minsym's language is language_auto or language_cplus, pass down
13833 language_ada instead.
13834 * symtab.c (compare_symbol_name): Don't frob symbol language here.
13835
13836 2018-01-10 Pedro Alves <palves@redhat.com>
13837
13838 PR gdb/22670
13839 * minsyms.c (linkage_name_str): New function.
13840 (iterate_over_minimal_symbols): Use it.
13841
13842 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13843
13844 * NEWS: Document that 'info proc' now works on FreeBSD.
13845
13846 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13847
13848 * configure.ac: Check for kinfo_getfile in libutil.
13849 * configure: Regenerate.
13850 * config.in: Regenerate.
13851 * fbsd-nat.c: Include "fbsd-tdep.h".
13852 (fbsd_fetch_cmdline): New.
13853 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13854 rather than calling error.
13855 (fbsd_info_proc): New.
13856 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13857 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13858 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13859
13860 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13861
13862 * fbsd-nat.c (struct free_deleter): Remove.
13863 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13864
13865 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13866
13867 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13868 NULL for an empty pathname.
13869
13870 2018-01-09 John Baldwin <jhb@FreeBSD.org>
13871
13872 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13873 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13874 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13875 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13876 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13877 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13878 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13879 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13880 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13881 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13882 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13883 (fbsd_core_fetch_timeval, fbsd_print_sigset)
13884 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13885 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
13886 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13887
13888 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
13889
13890 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13891 (gnu_xfer_auxv): New function.
13892 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13893 TARGET_OBJECT_AUXV.
13894
13895 2018-01-08 Yao Qi <yao.qi@linaro.org>
13896 Simon Marchi <simon.marchi@ericsson.com>
13897
13898 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13899 common/selftest.c.
13900 (COMMON_OBS): Remove selftest.o.
13901 * configure.ac: Append selftest-arch.c and common/selftest.c to
13902 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
13903 * configure: Re-generated.
13904 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13905 GDB_SELF_TEST.
13906 (maintenance_info_selftests): Likewise.
13907
13908 2018-01-08 Xavier Roirand <roirand@adacore.com>
13909
13910 * ada-valprint.c (val_print_packed_array_elements): Use
13911 proper number of elements when printing an array indexed
13912 by an enumeration type.
13913
13914 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
13915
13916 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13917 (dw2_get_file_names_reader): Adjust.
13918 (lookup_dwo_signatured_type): Adjust.
13919 (lookup_dwp_signatured_type): Adjust.
13920 (lookup_signatured_type): Adjust.
13921 (create_type_unit_group): Adjust.
13922 (get_type_unit_group): Adjust.
13923 (process_psymtab_comp_unit_reader): Adjust.
13924 (build_type_psymtabs_reader): Adjust.
13925 (scan_partial_symbols): Adjust.
13926 (add_partial_symbol): Adjust.
13927 (add_partial_subprogram): Adjust.
13928 (peek_die_abbrev): Adjust.
13929 (fixup_go_packaging): Adjust.
13930 (process_imported_unit_die): Adjust.
13931 (dwarf2_compute_name): Adjust.
13932 (dwarf2_physname): Adjust.
13933 (read_import_statement): Adjust.
13934 (handle_DW_AT_stmt_list): Adjust.
13935 (read_file_scope): Adjust.
13936 (read_func_scope): Adjust.
13937 (read_lexical_block_scope): Adjust.
13938 (read_call_site_scope): Adjust.
13939 (read_variable): Adjust.
13940 (dwarf2_rnglists_process): Adjust.
13941 (dwarf2_ranges_process): Adjust.
13942 (dwarf2_ranges_read): Adjust.
13943 (dwarf2_get_pc_bounds): Adjust.
13944 (dwarf2_record_block_ranges): Adjust.
13945 (dwarf2_add_field): Adjust.
13946 (dwarf2_add_member_fn): Adjust.
13947 (read_structure_type): Adjust.
13948 (process_structure_scope): Adjust.
13949 (read_enumeration_type): Adjust.
13950 (read_array_type): Adjust.
13951 (mark_common_block_symbol_computed): Adjust.
13952 (read_common_block): Adjust.
13953 (read_namespace_type): Adjust.
13954 (read_namespace): Adjust.
13955 (read_module_type): Adjust.
13956 (read_tag_pointer_type): Adjust.
13957 (read_tag_ptr_to_member_type): Adjust.
13958 (read_tag_string_type): Adjust.
13959 (read_subroutine_type): Adjust.
13960 (read_typedef): Adjust.
13961 (read_base_type): Adjust.
13962 (attr_to_dynamic_prop): Adjust.
13963 (read_subrange_type): Adjust.
13964 (read_unspecified_type): Adjust.
13965 (dwarf2_read_abbrevs): Adjust.
13966 (load_partial_dies): Adjust.
13967 (read_partial_die): Adjust.
13968 (find_partial_die): Adjust.
13969 (guess_partial_die_structure_name): Adjust.
13970 (fixup_partial_die): Adjust.
13971 (read_attribute_value): Adjust.
13972 (read_addr_index): Adjust.
13973 (read_addr_index_from_leb128): Adjust.
13974 (read_str_index): Adjust.
13975 (dwarf2_string_attr): Adjust.
13976 (get_debug_line_section): Adjust.
13977 (dwarf_decode_line_header): Adjust.
13978 (lnp_state_machine::check_line_address): Adjust.
13979 (dwarf_decode_lines_1): Adjust.
13980 (dwarf_decode_lines): Adjust.
13981 (dwarf2_start_symtab): Adjust.
13982 (var_decode_location): Adjust.
13983 (new_symbol_full): Adjust.
13984 (dwarf2_const_value_data): Adjust.
13985 (dwarf2_const_value_attr): Adjust.
13986 (dwarf2_const_value): Adjust.
13987 (die_type): Adjust.
13988 (die_containing_type): Adjust.
13989 (build_error_marker_type): Adjust.
13990 (lookup_die_type): Adjust.
13991 (guess_full_die_structure_name): Adjust.
13992 (anonymous_struct_prefix): Adjust.
13993 (determine_prefix): Adjust.
13994 (dwarf2_name): Adjust.
13995 (follow_die_ref_or_sig): Adjust.
13996 (follow_die_offset): Adjust.
13997 (follow_die_ref): Adjust.
13998 (follow_die_sig_1): Adjust.
13999 (follow_die_sig): Adjust.
14000 (get_signatured_type): Adjust.
14001 (get_DW_AT_signature_type): Adjust.
14002 (decode_locdesc): Adjust.
14003 (dwarf_decode_macros): Adjust.
14004 (cu_debug_loc_section): Adjust.
14005 (fill_in_loclist_baton): Adjust.
14006 (dwarf2_symbol_mark_computed): Adjust.
14007 (init_one_comp_unit): Don't assign
14008 dwarf2_cu::dwarf2_per_objfile.
14009 (set_die_type): Adjust.
14010
14011 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14012
14013 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14014 <dwarf2_per_objfile>: New field.
14015 (dwarf2_per_objfile): Remove global.
14016 (get_dwarf2_per_objfile): New function.
14017 (set_dwarf2_per_objfile): New function.
14018 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14019 dwarf2_per_objfile.
14020 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14021 (read_abbrev_offset): Likewise.
14022 (read_indirect_string): Likewise.
14023 (read_indirect_line_string): Likewise.
14024 (read_indirect_string_at_offset): Likewise.
14025 (read_indirect_string_from_dwz): Likewise.
14026 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14027 dwarf2_per_objfile.
14028 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14029 (create_all_comp_units): Change objfile parameter to
14030 dwarf2_per_objfile.
14031 (create_all_type_units): Likewise.
14032 (process_queue): Add dwarf2_per_objfile parameter.
14033 (read_and_check_comp_unit_head): Likewise.
14034 (lookup_dwo_unit_in_dwp): Likewise.
14035 (get_dwp_file): Likewise.
14036 (process_cu_includes): Likewise.
14037 (struct free_dwo_file_cleanup_data): New struct.
14038 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14039 set_dwarf2_per_objfile.
14040 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14041 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14042 context, adjust calls.
14043 (dw2_instantiate_symtab): Likewise.
14044 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14045 (dw2_get_cu): Likewise.
14046 (create_cu_from_index_list): Change objfile parameter to
14047 dwarf2_per_objfile.
14048 (create_cus_from_index_list): Get dwarf2_per_objfile from
14049 context, adjust calls.
14050 (create_cus_from_index): Likewise.
14051 (create_signatured_type_table_from_index): Change objfile
14052 parameter to dwarf2_per_objfile.
14053 (create_signatured_type_table_from_debug_names): Change objfile
14054 parameter to dwarf2_per_objfile.
14055 (create_addrmap_from_index): Likewise.
14056 (create_addrmap_from_aranges): Likewise.
14057 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14058 (dw2_setup): Remove.
14059 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14060 context.
14061 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14062 get_dwarf2_per_objfile.
14063 (dw2_forget_cached_source_info): Likewise.
14064 (dw2_map_symtabs_matching_filename): Likewise.
14065 (struct dw2_symtab_iterator) <index>: Remove.
14066 <dwarf2_per_objfile>: New field.
14067 (dw2_symtab_iter_init): Replace index parameter with
14068 dwarf2_per_objfile.
14069 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14070 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14071 (dw2_print_stats): Likewise.
14072 (dw2_dump): Likewise.
14073 (dw2_expand_symtabs_for_function): Likewise.
14074 (dw2_expand_all_symtabs): Likewise.
14075 (dw2_expand_symtabs_with_fullname): Likewise.
14076 (dw2_expand_marked_cus): Replace index and objfile parameters
14077 with dwarf2_per_objfile.
14078 (dw_expand_symtabs_matching_file_matcher): Add
14079 dwarf2_per_objfile parameter and adjust calls.
14080 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14081 adjust calls.
14082 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14083 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14084 adjust calls.
14085 (create_cus_from_debug_names_list): Replace objfile parameter
14086 with dwarf2_per_objfile and adjust calls.
14087 (create_cus_from_debug_names): Likewise.
14088 (dwarf2_read_debug_names): Likewise.
14089 (mapped_debug_names::namei_to_name): Adjust call.
14090 (dw2_debug_names_iterator::next): Likewise.
14091 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14092 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14093 (dw2_debug_names_dump): Likewise.
14094 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14095 (dw2_debug_names_expand_symtabs_matching): Likewise.
14096 (dwarf2_initialize_objfile): Likewise.
14097 (dwarf2_build_psymtabs): Likewise.
14098 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14099 this_cu.
14100 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14101 (read_and_check_comp_unit_head): Likewise.
14102 (read_abbrev_offset): Likewise.
14103 (create_debug_type_hash_table): Likewise.
14104 (create_debug_types_hash_table): Likewise.
14105 (create_all_type_units): Replace objfile parameter with
14106 dwarf2_per_objfile.
14107 (add_type_unit): Add dwarf2_per_objfile parameter.
14108 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14109 with dwarf2_per_objfile.
14110 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14111 (lookup_dwp_signatured_type): Likewise.
14112 (lookup_signatured_type): Likewise.
14113 (read_cutu_die_from_dwo): Likewise.
14114 (init_tu_and_read_dwo_dies): Likewise.
14115 (init_cutu_and_read_dies): Likewise.
14116 (init_cutu_and_read_dies_no_follow): Likewise.
14117 (allocate_type_unit_groups_table): Add objfile parameter.
14118 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14119 (get_type_unit_group): Likewise.
14120 (process_psymtab_comp_unit): Update call.
14121 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14122 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14123 (print_tu_stats): Likewise.
14124 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14125 in void* parameter.
14126 (build_type_psymtabs): Change objfile parameter to
14127 dwarf2_per_objfile.
14128 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14129 passed in void* parameter.
14130 (process_skeletonless_type_units): Change objfile parameter to
14131 dwarf2_per_objfile.
14132 (set_partial_user): Likewise.
14133 (dwarf2_build_psymtabs_hard): Likewise.
14134 (read_comp_units_from_section): Likewise.
14135 (create_all_comp_units): Likewise.
14136 (scan_partial_symbols): Update calls.
14137 (add_partial_symbol): Likewise.
14138 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14139 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14140 (process_queue): Add dwarf2_per_objfile parameter.
14141 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14142 (compute_compunit_symtab_includes): Likewise.
14143 (process_cu_includes): Add dwarf2_per_objfile parameter.
14144 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14145 (process_full_type_unit): Likewise.
14146 (process_imported_unit_die): Update call.
14147 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14148 (read_file_scope): Likewise.
14149 (allocate_dwo_file_hash_table): Add objfile parameter.
14150 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14151 (create_cus_hash_table): Likewise.
14152 (create_dwp_hash_table): Likewise.
14153 (create_dwo_unit_in_dwp_v1): Likewise.
14154 (create_dwp_v2_section): Likewise.
14155 (create_dwo_unit_in_dwp_v2): Likewise.
14156 (lookup_dwo_unit_in_dwp): Likewise.
14157 (try_open_dwop_file): Likewise.
14158 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14159 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14160 cleanup to include a reference to dwarf2_per_objfile.
14161 (open_dwp_file): Add dwarf2_per_objfile parameter.
14162 (open_and_init_dwp_file): Likewise.
14163 (get_dwp_file): Likewise.
14164 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14165 (queue_and_load_all_dwo_tus): Update call.
14166 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14167 data.
14168 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14169 (dwarf2_ranges_process): Likewise.
14170 (dwarf2_get_pc_bounds): Likewise.
14171 (mark_common_block_symbol_computed): Likewise.
14172 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14173 (dwarf2_read_abbrevs): Update call.
14174 (read_partial_die): Use dwarf2_per_objfile from cu.
14175 (find_partial_die): Likewise.
14176 (fixup_partial_die): Likewise.
14177 (read_attribute_value): Likewise.
14178 (read_indirect_string_at_offset_from): Add objfile parameter.
14179 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14180 parameter.
14181 (read_indirect_string_from_dwz): Add objfile parameter.
14182 (read_indirect_string): Add objfile parameter.
14183 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14184 (read_addr_index): Use dwarf2_per_objfile from cu.
14185 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14186 call dw2_setup.
14187 (read_str_index): Use dwarf2_per_objfile from cu.
14188 (get_debug_line_section): Likewise.
14189 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14190 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14191 (new_symbol_full): Use dwarf2_per_objfile from cu.
14192 (build_error_marker_type): Likewise.
14193 (lookup_die_type): Likewise.
14194 (determine_prefix): Likewise.
14195 (follow_die_offset): Likewise.
14196 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14197 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14198 (dwarf2_fetch_die_type_sect_off): Likewise.
14199 (dwarf2_get_die_type): Likewise.
14200 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14201 (get_signatured_type): Likewise.
14202 (get_DW_AT_signature_type): Likewise.
14203 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14204 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14205 (cu_debug_loc_section): Likewise.
14206 (fill_in_loclist_baton): Likewise.
14207 (dwarf2_symbol_mark_computed): Likewise.
14208 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14209 dwarf2_per_objfile.
14210 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14211 parameter.
14212 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14213 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14214 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14215 (set_die_type): Use dwarf2_free_objfile from cu.
14216 (get_die_type_at_offset): Likewise.
14217 (dwarf2_per_objfile_free): Don't assign global variable.
14218 (debug_names) <constructor>: Add dwarf2_per_objfile
14219 parameter, update m_debugstrlookup construction.
14220 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14221 parameter.
14222 <m_dwarf2_per_objfile>: New field.
14223 <lookup>: Use m_dwarf2_per_objfile.
14224 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14225 (psyms_seen_size): Likewise.
14226 (write_gdbindex): Replace objfile parameter with
14227 dwarf2_per_objfile.
14228 (write_debug_names): Likewise.
14229 (write_psymtabs_to_index): Likewise.
14230 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14231 calls.
14232
14233 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14234
14235 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14236 <dwarf2_per_objfile>: New field.
14237 (struct dwarf2_per_cu_data) <objfile>: Remove.
14238 <dwarf2_per_objfile>: New field.
14239 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14240 of objfile.
14241 (create_signatured_type_table_from_index): Likewise.
14242 (create_debug_type_hash_table): Likewise.
14243 (fill_in_sig_entry_from_dwo_entry): Likewise.
14244 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14245 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14246 objfile.
14247 (create_partial_symtab): Access objfile through
14248 dwarf2_per_objfile.
14249 (process_psymtab_comp_unit_reader): Likewise.
14250 (read_comp_units_from_section): Likewise.
14251 (scan_partial_symbols): Likewise.
14252 (add_partial_symbol): Likewise.
14253 (add_partial_subprogram): Likewise.
14254 (peek_die_abbrev): Likewise.
14255 (fixup_go_packaging): Likewise.
14256 (process_full_comp_unit): Likewise.
14257 (process_full_type_unit): Likewise.
14258 (process_imported_unit_die): Likewise.
14259 (dwarf2_compute_name): Likewise.
14260 (dwarf2_physname): Likewise.
14261 (read_import_statement): Likewise.
14262 (create_cus_hash_table): Assign dwarf2_physname instead of
14263 objfile.
14264 (read_func_scope): Access objfile through dwarf2_per_objfile.
14265 (read_lexical_block_scope): Likewise.
14266 (read_call_site_scope): Likewise.
14267 (read_variable): Likewise.
14268 (dwarf2_rnglists_process): Likewise.
14269 (dwarf2_ranges_process): Likewise.
14270 (dwarf2_ranges_read): Likewise.
14271 (dwarf2_record_block_ranges): Likewise.
14272 (dwarf2_add_field): Likewise.
14273 (dwarf2_add_member_fn): Likewise.
14274 (read_structure_type): Likewise.
14275 (process_structure_scope): Likewise.
14276 (read_enumeration_type): Likewise.
14277 (read_array_type): Likewise.
14278 (read_common_block): Likewise.
14279 (read_namespace_type): Likewise.
14280 (read_namespace): Likewise.
14281 (read_module_type): Likewise.
14282 (read_tag_pointer_type): Likewise.
14283 (read_tag_ptr_to_member_type): Likewise.
14284 (read_tag_string_type): Likewise.
14285 (read_subroutine_type): Likewise.
14286 (read_typedef): Likewise.
14287 (read_base_type): Likewise.
14288 (attr_to_dynamic_prop): Likewise.
14289 (read_subrange_type): Likewise.
14290 (read_unspecified_type): Likewise.
14291 (load_partial_dies): Likewise.
14292 (read_partial_die): Likewise.
14293 (find_partial_die): Likewise.
14294 (guess_partial_die_structure_name): Likewise.
14295 (fixup_partial_die): Likewise.
14296 (read_attribute_value): Likewise.
14297 (read_addr_index_from_leb128): Likewise.
14298 (dwarf2_read_addr_index): Likewise.
14299 (dwarf2_string_attr): Likewise.
14300 (lnp_state_machine::check_line_address): Likewise.
14301 (dwarf_decode_lines_1): Likewise.
14302 (dwarf_decode_lines): Likewise.
14303 (dwarf2_start_symtab): Likewise.
14304 (var_decode_location): Likewise.
14305 (new_symbol_full): Likewise.
14306 (dwarf2_const_value_data): Likewise.
14307 (dwarf2_const_value_attr): Likewise.
14308 (dwarf2_const_value): Likewise.
14309 (die_type): Likewise.
14310 (die_containing_type): Likewise.
14311 (lookup_die_type): Likewise.
14312 (guess_full_die_structure_name): Likewise.
14313 (anonymous_struct_prefix): Likewise.
14314 (dwarf2_name): Likewise.
14315 (follow_die_ref_or_sig): Likewise.
14316 (follow_die_offset): Likewise.
14317 (follow_die_ref): Likewise.
14318 (dwarf2_fetch_die_loc_sect_off): Likewise.
14319 (dwarf2_fetch_constant_bytes): Likewise.
14320 (dwarf2_fetch_die_type_sect_off): Likewise.
14321 (dwarf2_get_die_type): Likewise.
14322 (follow_die_sig): Likewise.
14323 (decode_locdesc): Likewise.
14324 (dwarf2_per_cu_objfile): Likewise.
14325 (dwarf2_per_cu_text_offset): Likewise.
14326 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14327 objfile.
14328 (set_die_type): Access objfile through
14329 dwarf2_per_objfile.
14330
14331 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14332
14333 * valprint.c (converted_character_d): Remove typedef.
14334 (DEF_VEC_O (converted_character_d)): Remove.
14335 (count_next_character): Use std::vector.
14336 (print_converted_chars_to_obstack): Likewise.
14337 (generic_printstr): Likewise.
14338
14339 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14340
14341 * xml-support.h (struct gdb_xml_value): Add constructor.
14342 <value>: Change type to unique_xmalloc_ptr.
14343 (gdb_xml_value_s): Remove typedef.
14344 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14345 (gdb_xml_element_start_handler): Change parameter type to
14346 std::vector.
14347 (xml_find_attribute): Likewise.
14348 * xml-support.c (xml_find_attribute): Change parameter type to
14349 std::vector and adjust.
14350 (gdb_xml_values_cleanup): Remove.
14351 (gdb_xml_parser::start_element): Adjust to std::vector.
14352 (xinclude_start_include): Change paraeter type to std::vector
14353 and adjust.
14354 * btrace.c (check_xml_btrace_version): Likewise.
14355 (parse_xml_btrace_block): Likewise.
14356 (parse_xml_btrace_pt_config_cpu): Likewise.
14357 (parse_xml_btrace_pt): Likewise.
14358 (parse_xml_btrace_conf_bts): Likewise.
14359 (parse_xml_btrace_conf_pt): Likewise.
14360 * memory-map.c (memory_map_start_memory): Likewise.
14361 (memory_map_start_property): Likewise.
14362 * osdata.c (osdata_start_osdata): Likewise.
14363 (osdata_start_item): Likewise.
14364 (osdata_start_column): Likewise.
14365 * remote.c (start_thread): Likewise.
14366 * solib-aix.c (library_list_start_library): Likewise.
14367 (library_list_start_list): Likewise.
14368 * solib-svr4.c (library_list_start_library): Likewise.
14369 (svr4_library_list_start_list): Likewise.
14370 * solib-target.c (library_list_start_segment): Likewise.
14371 (library_list_start_section): Likewise.
14372 (library_list_start_library): Likewise.
14373 (library_list_start_list): Likewise.
14374 * tracepoint.c (traceframe_info_start_memory): Likewise.
14375 (traceframe_info_start_tvar): Likewise.
14376 * xml-syscall.c (syscall_start_syscall): Likewise.
14377 * xml-tdesc.c (tdesc_start_target): Likewise.
14378 (tdesc_start_feature): Likewise.
14379 (tdesc_start_reg): Likewise.
14380 (tdesc_start_union): Likewise.
14381 (tdesc_start_struct): Likewise.
14382 (tdesc_start_flags): Likewise.
14383 (tdesc_start_enum): Likewise.
14384 (tdesc_start_field): Likewise.
14385 (tdesc_start_enum_value): Likewise.
14386 (tdesc_start_vector): Likewise.
14387
14388 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14389
14390 * extension.h (struct xmethod_worker) <clone>: Remove.
14391 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14392 Remove.
14393 (python_xmethod_worker::clone): Remove.
14394 * valops.c (find_overload_match): Use std::move instead of
14395 clone.
14396
14397 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14398
14399 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14400 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14401 <free_xmethod_worker_data>: Remove.
14402 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14403 <get_xmethod_arg_types>: Remove.
14404 <get_xmethod_result_type>: Remove.
14405 <invoke_xmethod>: Remove.
14406 * extension.c (new_xmethod_worker): Remove.
14407 (clone_xmethod_worker): Remove.
14408 (get_matching_xmethod_workers): Return void, pass std::vector by
14409 pointer.
14410 (get_xmethod_arg_types): Rename to...
14411 (xmethod_worker::get_arg_types): ... this, and adjust.
14412 (get_xmethod_result_type): Rename to...
14413 (xmethod_worker::get_result_type): ... this, and adjust.
14414 (invoke_xmethod): Remove.
14415 (free_xmethod_worker): Remove.
14416 (free_xmethod_worker_vec): Remove.
14417 * extension.h (enum ext_lang_rc): Move here from
14418 extension-priv.h.
14419 (struct xmethod_worker): Add constructor and destructor.
14420 <data>: Remove.
14421 <value>: Remove.
14422 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14423 virtual pure methods.
14424 <get_arg_types, get_result_type>: New methods.
14425 (xmethod_worker_ptr): Remove typedef.
14426 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14427 (xmethod_worker_vec): Remove typedef.
14428 (xmethod_worker_up): New typedef.
14429 (invoke_xmethod): Remove.
14430 (clone_xmethod_worker): Remove.
14431 (free_xmethod_worker): Remove.
14432 (free_xmethod_worker_vec): Remove.
14433 (get_xmethod_arg_types): Remove.
14434 (get_xmethod_result_type): Remove.
14435 * valops.c (find_method_list): Use std::vector, don't use
14436 intermediate vector.
14437 (value_find_oload_method_list): Use std::vector.
14438 (find_overload_match): Use std::vector.
14439 (find_oload_champ): Use std::vector.
14440 * value.c (value_free): Use operator delete.
14441 (value_of_xmethod): Rename to...
14442 (value_from_xmethod): ... this. Don't assign
14443 xmethod_worker::value, take rvalue-reference.
14444 (result_type_of_xmethod): Adjust.
14445 (call_xmethod): Adjust.
14446 * value.h: Include extension.h.
14447 (struct xmethod_worker): Don't forward-declare.
14448 (value_of_xmethod): Rename to...
14449 (value_from_xmethod): ... this, take rvalue-reference.
14450 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14451 (struct python_xmethod_worker): ... this, add constructor and
14452 destructor.
14453 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14454 (gdbpy_free_xmethod_worker_data): Rename to...
14455 (python_xmethod_worker::~python_xmethod_worker): ... this and
14456 adjust.
14457 (gdbpy_clone_xmethod_worker_data): Rename to...
14458 (python_xmethod_worker::clone): ... this and adjust.
14459 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14460 temporary vector.
14461 (gdbpy_get_xmethod_arg_types): Rename to...
14462 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14463 (gdbpy_get_xmethod_result_type): Rename to...
14464 (python_xmethod_worker::do_get_result_type): ... this and
14465 adjust.
14466 (gdbpy_invoke_xmethod): Rename to...
14467 (python_xmethod_worker::invoke): ... this and adjust.
14468 (new_python_xmethod_worker): Rename to...
14469 (python_xmethod_worker::python_xmethod_worker): ... this and
14470 adjust.
14471 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14472 Remove.
14473 (gdbpy_free_xmethod_worker_data): Remove.
14474 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14475 (gdbpy_get_xmethod_arg_types): Remove.
14476 (gdbpy_get_xmethod_result_type): Remove.
14477 (gdbpy_invoke_xmethod): Remove.
14478 * python/python.c (python_extension_ops): Remove obsolete
14479 callbacks.
14480
14481 2018-01-05 Pedro Alves <palves@redhat.com>
14482
14483 PR gdb/18653
14484 * common/signals-state-save-restore.c
14485 (save_original_signals_state): New parameter 'quiet'. Warn if we
14486 find a custom handler preinstalled, instead of internal erroring.
14487 But only warn if !quiet.
14488 * common/signals-state-save-restore.h
14489 (save_original_signals_state): New parameter 'quiet'.
14490 * main.c (captured_main_1): Move save_original_signals_state call
14491 after option handling, and pass QUIET.
14492
14493 2018-01-05 Pedro Alves <palves@redhat.com>
14494
14495 * spu-tdep.c (spu_catch_start): Pass
14496 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14497
14498 2018-01-05 Pedro Alves <palves@redhat.com>
14499
14500 PR gdb/22670
14501 * ada-lang.c (literal_symbol_name_matcher): New function.
14502 (ada_get_symbol_name_matcher): Use it for
14503 symbol_name_match_type::SEARCH_NAME.
14504 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14505 it down instead of assuming symbol_name_match_type::FULL.
14506 * block.h (block_lookup_symbol): New parameter 'match_type'.
14507 * c-valprint.c (print_unpacked_pointer): Use
14508 lookup_symbol_search_name instead of lookup_symbol.
14509 * compile/compile-object-load.c (get_out_value_type): Pass down
14510 symbol_name_match_type::SEARCH_NAME.
14511 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14512 symbol_name_match_type::FULL.
14513 * cp-support.c (cp_get_symbol_name_matcher): Handle
14514 symbol_name_match_type::SEARCH_NAME.
14515 * infrun.c (insert_exception_resume_breakpoint): Use
14516 lookup_symbol_search_name.
14517 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14518 * psymtab.c (maintenance_check_psymtabs): Use
14519 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14520 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14521 SYMBOL_SEARCH_NAME.
14522 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14523 if symbol_name_match_type::SEARCH_NAME.
14524 (lookup_symbol_in_language): Pass down
14525 symbol_name_match_type::FULL.
14526 (lookup_symbol_search_name): New.
14527 (lookup_language_this): Pass down
14528 symbol_name_match_type::SEARCH_NAME.
14529 (lookup_symbol_aux, lookup_local_symbol): New parameter
14530 'match_type'. Pass it down.
14531 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14532 (lookup_symbol_search_name): New declaration.
14533 (lookup_symbol_in_block): New 'match_type' parameter.
14534
14535 2018-01-05 Pedro Alves <palves@redhat.com>
14536
14537 PR gdb/22670
14538 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14539 ada_lookup_symbol.
14540 (ada_lookup_symbol): Reimplement in terms of
14541 ada_lookup_symbol_list, bits factored out from
14542 ada_lookup_encoded_symbol.
14543
14544 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14545
14546 * ada-exp.y (write_object_renaming): When subscripting an array
14547 using a symbol as the index, pass the block in call to
14548 ada_lookup_encoded_symbol when looking that symbol up.
14549
14550 2018-01-05 Jerome Guitton <guitton@adacore.com>
14551
14552 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14553 TYPE_INDEX_TYPE.
14554
14555 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14556
14557 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14558 the case where VALUE_LVAL (val0) is not lval_memory.
14559
14560 2018-01-05 Xavier Roirand <roirand@adacore.com>
14561
14562 * ada-valprint.c (print_optional_low_bound): Handle
14563 character-indexed array printing like boolean-indexed array
14564 printing.
14565
14566 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14567
14568 * NEWS: Create a new section for the next release branch.
14569 Rename the section of the current branch, now that it has
14570 been cut.
14571
14572 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14573
14574 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14575 * version.in: Bump version to 8.1.50.DATE-git.
14576
14577 2018-01-03 Xavier Roirand <roirand@adacore.com>
14578
14579 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14580 Add field.
14581 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14582 Add field.
14583 (default_exception_support_info) <catch_handlers_sym>: Add field.
14584 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14585 (ada_exception_name_addr_1): Add "catch handlers" handling.
14586 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14587 Update all callers.
14588 (create_excep_cond_exprs) <ex>: Add parameter.
14589 (re_set_exception): Update create_excep_cond_exprs call.
14590 (print_it_exception, print_one_exception, print_mention_exception)
14591 (print_recreate_exception): Add "catch handler" handling.
14592 (allocate_location_catch_handlers, re_set_catch_handlers)
14593 (check_status_catch_handlers, print_it_catch_handlers)
14594 (print_one_catch_handlers, print_mention_catch_handlers)
14595 (print_recreate_catch_handlers): New function.
14596 (catch_handlers_breakpoint_ops): New variable.
14597 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14598 Add parameter. Add "catch handler" handling.
14599 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14600 Add "catch handler" handling.
14601 (ada_exception_catchpoint_cond_string): Add "catch handler"
14602 handling.
14603 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14604 call.
14605 (catch_ada_handlers_command): New function.
14606 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14607 operations structure.
14608 (_initialize_ada_language): Add "catch handlers" command entry.
14609 * NEWS: Document "catch handlers" feature.
14610
14611 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14612
14613 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14614 account when creating the array type of the slice.
14615 (ada_value_slice): Likewise.
14616
14617 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14618
14619 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14620 New enum value.
14621 (create_array_type_with_stride): Add byte_stride_prop parameter.
14622 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14623 New parameter. Update all callers in this file.
14624 (array_type_has_dynamic_stride): New function.
14625 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14626 of arrays with dynamic byte strides.
14627 * dwarf2read.c (read_array_type): Add support for dynamic
14628 DW_AT_byte_stride attributes.
14629
14630 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14631
14632 * dwarf2read.c (read_unspecified_type): Treat
14633 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14634
14635 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14636
14637 Update copyright year range in all GDB files.
14638
14639 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
14640
14641 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14642 and gdb/testsuite/gdb.base/step-line.c.
14643
14644 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14645
14646 * copyright.py (main): Dump the contents of
14647 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14648 even if BY_HAND is empty.
14649
14650 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14651
14652 * top.c (print_gdb_version): Update Copyright year in version
14653 message.
14654
14655 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14656
14657 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14658
14659 For older changes see ChangeLog-2017.
14660 \f
14661 Local Variables:
14662 mode: change-log
14663 left-margin: 8
14664 fill-column: 74
14665 version-control: never
14666 coding: utf-8
14667 End:
This page took 0.35263 seconds and 3 git commands to generate.